1
0
mirror of https://github.com/nextcloud/ocsms.git synced 2026-08-21 05:13:18 +00:00

Add basic route , method and icon for removing single message

This commit is contained in:
Loic Blot
2015-06-25 18:17:59 +00:00
parent d8a776bea9
commit d8ecc06314
4 changed files with 27 additions and 5 deletions
+9 -5
View File
@@ -64,8 +64,10 @@ app.controller('OcSmsController', ['$scope',
$("li[peer-label='" + g_curContactName + "']").remove();
g_curPhoneNumber = null;
});
}
};
$scope.removeMessage = function(messageId) {
alert('test');
};
$scope.addContact = function (ct) {
$scope.$apply(function () {
$scope.contacts.push(ct);
@@ -109,6 +111,7 @@ var refreshConversation = function() {
document.title = g_originalTitle + " (" + g_unreadCountCurrentConv + ")";
desktopNotify(g_unreadCountCurrentConv + " unread message(s) in conversation with " + g_curContactName);
}
}
setMessageCountInfo(jsondata);
@@ -309,12 +312,13 @@ function formatConversation(jsondata) {
formatedHour + ":" + formatedMin;
buf += '<div><div class="' + msgClass + '"><div>' +
vals["msg"] + '</div><div class="msg-date">' +
formatedDate + '</div></div><div class="msg-spacer"></div></div>';
vals["msg"] + '</div>' +
'<div style="display: block;" id="ocsms-message-removal" class="icon-delete svn delete action" ng-click="removeMessage(' + id + ');"></div>' +
'<div class="msg-date">' + formatedDate + '</div>' +
'</div><div class="msg-spacer"></div></div>';
msgCount++;
});
return [msgCount,buf];
}