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)
var tweetForm = $this.parents("form"); var tweetForm = $this.parents("form");
var remainingCount = tweetForm.find(".post-area-remaining"); var remainingCount = tweetForm.find(".post-area-remaining");
remainingCount.text(140); remainingCount.text(140);
$replyText.attr("placeholder", "Your message was sent!");
if ($this.parents('.modal-wrapper').length) { if ($this.parents('.modal-wrapper').length) {
closeModal($this); closeModal($this);
} else if ($this.parents('.prompt-wrapper').length) { } else if ($this.parents('.prompt-wrapper').length) {

29
js/interface_localization.js

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

2
js/twister_following.js

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

27
js/twister_newmsgs.js

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

8
js/twister_timeline.js

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

Loading…
Cancel
Save