Browse Source

removed notification when sending own post or DM, fixed hashtag searching and message about sending

master
Simon Grim 10 years ago
parent
commit
581d6c0a8d
  1. 3
      js/interface_common.js
  2. 29
      js/interface_localization.js
  3. 2
      js/twister_following.js
  4. 27
      js/twister_newmsgs.js
  5. 8
      js/twister_timeline.js

3
js/interface_common.js

@ -1316,8 +1316,7 @@ var postSubmit = function(e, oldLastPostId) @@ -1316,8 +1316,7 @@ var postSubmit = function(e, oldLastPostId)
var tweetForm = $this.parents("form");
var remainingCount = tweetForm.find(".post-area-remaining");
remainingCount.text(140);
$replyText.attr("placeholder", "Your message was sent!");
if ($this.parents('.modal-wrapper').length) {
closeModal($this);
} else if ($this.parents('.prompt-wrapper').length) {

29
js/interface_localization.js

@ -49,7 +49,6 @@ if(preferredLanguage == "en"){ @@ -49,7 +49,6 @@ if(preferredLanguage == "en"){
"Connections:": "Connections: ", // to network
"Connection lost.": "Connection lost.",
"days": "%{smart_count} day |||| %{smart_count} days",
"Desktop notifications": "Desktop notifications",
"Detailed information": "Detailed information",
"DHT network down.": "DHT network down.",
"Direct Messages": "Direct Messages",
@ -192,6 +191,7 @@ if(preferredLanguage == "en"){ @@ -192,6 +191,7 @@ if(preferredLanguage == "en"){
"Theme": "Theme",
"Keys": "Keys",
"Notifications": "Notifications",
"Desktop notifications": "Desktop notifications",
"Sound notifications": "Sound notifications",
"Send key": "Send key",
"Posts display": "Posts display",
@ -428,6 +428,8 @@ if(preferredLanguage == "es"){ @@ -428,6 +428,8 @@ if(preferredLanguage == "es"){
"Ignore": "Ignorar",
"Theme": "Tema",
"Keys": "Teclas",
"Notifications": "Notificaciones",
"Desktop notifications": "Notificaciones de Escritorio",
"Sound notifications": "Notificaciones de Sonido",
"Send key": "Send key",
"Posts display": "Posts display",
@ -661,6 +663,8 @@ if(preferredLanguage == "uk"){ @@ -661,6 +663,8 @@ if(preferredLanguage == "uk"){
"Ignore": "Ignore",
"Theme": "Theme",
"Keys": "Keys",
"Notifications": "Notifications",
"Desktop notifications": "Desktop notifications",
"Sound notifications": "Sound notifications",
"Send key": "Send key",
"Posts display": "Posts display",
@ -893,6 +897,8 @@ if(preferredLanguage == "zh"){ @@ -893,6 +897,8 @@ if(preferredLanguage == "zh"){
"Ignore": "Ignore",
"Theme": "Theme",
"Keys": "Keys",
"Notifications": "Notifications",
"Desktop notifications": "Desktop notifications",
"Sound notifications": "Sound notifications",
"Send key": "Send key",
"Posts display": "Posts display",
@ -1126,6 +1132,8 @@ if(preferredLanguage == "nl"){ @@ -1126,6 +1132,8 @@ if(preferredLanguage == "nl"){
"Ignore": "Ignore",
"Theme": "Theme",
"Keys": "Keys",
"Notifications": "Notifications",
"Desktop notifications": "Desktop notifications",
"Sound notifications": "Sound notifications",
"Send key": "Send key",
"Posts display": "Posts display",
@ -1356,6 +1364,8 @@ if(preferredLanguage == "it"){ @@ -1356,6 +1364,8 @@ if(preferredLanguage == "it"){
"Ignore": "Ignore",
"Theme": "Theme",
"Keys": "Keys",
"Notifications": "Notifications",
"Desktop notifications": "Desktop notifications",
"Sound notifications": "Sound notifications",
"Send key": "Send key",
"Posts display": "Posts display",
@ -1590,6 +1600,8 @@ if(preferredLanguage == "fr"){ @@ -1590,6 +1600,8 @@ if(preferredLanguage == "fr"){
"Ignore": "Ignore",
"Theme": "Theme",
"Keys": "Keys",
"Notifications": "Notifications",
"Desktop notifications": "Desktop notifications",
"Sound notifications": "Sound notifications",
"Send key": "Send key",
"Posts display": "Posts display",
@ -1686,7 +1698,6 @@ if(preferredLanguage == "ru"){ @@ -1686,7 +1698,6 @@ if(preferredLanguage == "ru"){
"Connections:": "Соединений: ",
"Connection lost.": "Соединение с сетью было потеряно.",
"days": "%{smart_count} день |||| %{smart_count} дней",
"Desktop notifications": "Уведомления рабочего стола",
"Detailed information": "Подробная информация",
"DHT network down.": "Недоступна DHT сеть.",
"Direct Messages": "Личные сообщения",
@ -1828,6 +1839,8 @@ if(preferredLanguage == "ru"){ @@ -1828,6 +1839,8 @@ if(preferredLanguage == "ru"){
"Ignore": "Игнорировать",
"Theme": "Тема",
"Keys": "Клавиши",
"Notifications": "Уведомления",
"Desktop notifications": "Уведомления рабочего стола",
"Sound notifications": "Звуковые уведомления",
"Send key": "Отправка сообщения",
"Posts display": "Отображение сообщений",
@ -2067,7 +2080,9 @@ if(preferredLanguage == "de"){ @@ -2067,7 +2080,9 @@ if(preferredLanguage == "de"){
"Ignore": "Ignorieren",
"Theme": "Theme",
"Keys": "Keys",
"Sound notifications": "Audioeinstellungen",
"Notifications": "Benachrichtigungen",
"Desktop notifications": "Desktophinweisen",
"Sound notifications": "Audioeinstellungen",
"Send key": "Send key",
"Posts display": "Posts display",
"Post editor": "Nachrichten-Editor",
@ -2297,6 +2312,8 @@ if(preferredLanguage == "ja"){ @@ -2297,6 +2312,8 @@ if(preferredLanguage == "ja"){
"Ignore": "Ignore",
"Theme": "Theme",
"Keys": "Keys",
"Notifications": "Notifications",
"Desktop notifications": "Desktop notifications",
"Sound notifications": "Sound notifications",
"Send key": "Send key",
"Posts display": "Posts display",
@ -2533,6 +2550,8 @@ if(preferredLanguage == "pt-BR"){ @@ -2533,6 +2550,8 @@ if(preferredLanguage == "pt-BR"){
"Ignore": "Ignore",
"Theme": "Theme",
"Keys": "Keys",
"Notifications": "Notifications",
"Desktop notifications": "Desktop notifications",
"Sound notifications": "Sound notifications",
"Send key": "Send key",
"Posts display": "Posts display",
@ -2756,6 +2775,8 @@ if(preferredLanguage == "tr"){ @@ -2756,6 +2775,8 @@ if(preferredLanguage == "tr"){
"Ignore": "Görmezden gel",
"Theme": "Tema",
"Keys": "Tuşlar",
"Notifications": "Uyarılar",
"Desktop notifications": "Masaüstü uyarılar",
"Sound notifications": "Sesli uyarılar",
"Send key": "Gönderme tuşu",
"Posts display": "Gönderiler",
@ -2996,6 +3017,8 @@ if(preferredLanguage == "cs"){ @@ -2996,6 +3017,8 @@ if(preferredLanguage == "cs"){
"Ignore": "Ignorovat",
"Theme": "Styl grafiky",
"Keys": "Klávesy",
"Notifications": "Upozornění",
"Desktop notifications": "Upozornění na ploše",
"Sound notifications": "Zvuková upozornění",
"Send key": "Klávesa pro odeslání",
"Posts display": "Zobrazení příspěvků",

2
js/twister_following.js

@ -586,7 +586,7 @@ function userSearchKeypress(event) { @@ -586,7 +586,7 @@ function userSearchKeypress(event) {
searchResults.slideUp( "fast" );
if ( event.which == 13 )
openHashtagModalFromSearch(partialName.substr(1));
window.location.hash = '#hashtag?hashtag=' + encodeURIComponent(partialName.substr(1));
return;
}

27
js/twister_newmsgs.js

@ -115,18 +115,21 @@ function requestMentionsCount() { @@ -115,18 +115,21 @@ function requestMentionsCount() {
if( _newDMsUpdated ) {
_newDMsUpdated = false;
$.MAL.soundNotifyDM();
var desktopNotification = new Notify(polyglot.t('notify_desktop_title'), {
body: 'You got '+polyglot.t('new_direct_messages', getNewDMsCount())+'.',
icon: '../img/twister_mini.png',
tag: 'twister_notification_new_DMs',
timeout: _desktopNotificationTimeout,
notifyClick: function() {
window.location.hash = '#directmessages';
}
});
desktopNotification.show();
var newDMs = getNewDMsCount();
if ( newDMs ) {
$.MAL.soundNotifyDM();
var desktopNotification = new Notify(polyglot.t('notify_desktop_title'), {
body: 'You got '+polyglot.t('new_direct_messages', newDMs)+'.',
icon: '../img/twister_mini.png',
tag: 'twister_notification_new_DMs',
timeout: _desktopNotificationTimeout,
notifyClick: function() {
window.location.hash = '#directmessages';
}
});
desktopNotification.show();
}
}
}

8
js/twister_timeline.js

@ -279,13 +279,13 @@ function processLastHave(userHaves) @@ -279,13 +279,13 @@ function processLastHave(userHaves)
function processNewPostsConfirmation(expected, posts)
{
//we don't want to produce alert for the posts that won't be displayed
var p2h = 0;
var pnp = 0;
for( var i = posts.length-1; i >= 0; i-- ) {
if (willBeHidden(posts[i])) {
p2h++;
if (willBeHidden(posts[i]) || posts[i]['userpost']['n'] === defaultScreenName) {
pnp++;
}
}
_newPostsPending += posts.length - p2h;
_newPostsPending += posts.length - pnp;
if( _newPostsPending ) {
$.MAL.reportNewPosts(_newPostsPending);
}

Loading…
Cancel
Save