1
0
mirror of https://github.com/nextcloud/ocsms.git synced 2026-08-23 22:32:54 +00:00

move more functions & attributes from legacy.js to app.js

This commit is contained in:
Loic Blot
2017-12-28 18:58:50 +01:00
parent 2b6e52205e
commit 177cb69b10
3 changed files with 22 additions and 23 deletions
+15
View File
@@ -15,7 +15,9 @@ var Sms = {
unreadCountAllConv: 0,
unreadCountNotifStep: 12,
lastUnreadCountAllConv: 0,
lastContactListMsgDate: 0,
originalTitle: document.title,
photoVersion: 1,
_winRegexp: /(.*)\/ocsms.*/,
@@ -26,6 +28,19 @@ var Sms = {
console.log("A very bad error happened when parsing window location");
}
return match[1] + '/ocsms' + endpoint;
},
selectConversation: function (item) {
if (item === 'undefined' || item == null) {
return;
}
if (this.selectedConversation != null) {
this.selectedConversation.parent().removeClass('selected');
}
this.selectedConversation = item;
this.selectedConversation.parent().addClass('selected');
this.selectedConversation.css("font-weight", "normal");
this.selectedConversation.html(this.selectedConversation.attr("mailbox-label"));
}
};