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

Move generateUrl to Sms object, add SmsSettings::init & drop it from angular app

This commit is contained in:
Loic Blot
2017-12-28 18:34:15 +01:00
parent 0c54bfbf06
commit cc14f86893
5 changed files with 58 additions and 51 deletions
+13 -1
View File
@@ -9,12 +9,24 @@
*/
var Sms = {
// Attributes
selectedConversation: null,
unreadCountCurrentConv: 0,
unreadCountAllConv: 0,
unreadCountNotifStep: 12,
lastUnreadCountAllConv: 0,
originalTitle: document.title
originalTitle: document.title,
_winRegexp: /(.*)\/ocsms.*/,
// Functions
generateURL: function (endpoint) {
var match = this._winRegexp.exec(window.location.href);
if (match.length !== 2) {
console.log("A very bad error happened when parsing window location");
}
return match[1] + '/ocsms' + endpoint;
}
};
var ContactRenderer = {