diff --git a/appinfo/routes.php b/appinfo/routes.php index 3846f3d..8046f28 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -19,6 +19,7 @@ $application->registerRoutes($this, array('routes' => array( array('name' => 'sms#get_conversation', 'url' => '/get/conversation', 'verb' => 'GET'), array('name' => 'sms#delete_conversation', 'url' => '/delete/conversation', 'verb' => 'POST'), array('name' => 'sms#check_new_messages', 'url' => '/get/new_messages', 'verb' => 'GET'), + array('name' => 'sms#delete_message', 'url' => '/delete/message', 'verb' => 'GET'), array('name' => 'sms#set_country', 'url'=> '/set/country', 'verb' => 'POST'), array('name' => 'sms#get_country', 'url'=> '/get/country', 'verb' => 'GET'), diff --git a/controller/smscontroller.php b/controller/smscontroller.php index 1f272b0..acb2391 100644 --- a/controller/smscontroller.php +++ b/controller/smscontroller.php @@ -212,6 +212,14 @@ class SmsController extends Controller { return new JSONResponse(array("phonelist" => $phoneList, "contacts" => $contacts, "photos" => $photos)); } + /** + * @NoAdminRequired + * @NoCSRFRequired + */ + public function deleteMessage ($messageId, $phoneNumber) { + return new JSONResponse(array()); + } + /** * @NoAdminRequired */ diff --git a/css/style.css b/css/style.css index 137a4a2..4d72f9d 100644 --- a/css/style.css +++ b/css/style.css @@ -97,6 +97,15 @@ cursor: pointer; } +#ocsms-message-removal { + float: right; + margin-left: 10px; +} + +#ocsms-message-removal:hover { + cursor: pointer; +} + #ocsms-empty-conversation { position: absolute; text-align: center; diff --git a/js/public/app.js b/js/public/app.js index b7bead5..c097537 100644 --- a/js/public/app.js +++ b/js/public/app.js @@ -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 += '
' + - vals["msg"] + '
' + - formatedDate + '
'; + vals["msg"] + '' + + '
' + + '
' + formatedDate + '
' + + '
'; msgCount++; }); - return [msgCount,buf]; }