diff --git a/js/script.js b/js/script.js index 5295fad..809bd47 100644 --- a/js/script.js +++ b/js/script.js @@ -22,27 +22,21 @@ var originalTitle = document.title; var app = angular.module('OcSms', ['OC']); -app.controller('SettingsController', ['$scope', +app.controller('OcSmsController', ['$scope', function ($scope) { $scope.buttons = [ {text: "Send"} ]; + $scope.contacts = []; $scope.sendCountry = function () { $.post(OC.generateUrl('/apps/ocsms/set/country'),{'country': $('select[name=intl_phone]').val()}); }; - } -]); - -app.controller('ContactsController' ['$scope', - function ($scope) { $scope.loadConversation = function () { alert('loadConversation'); }; } ]); - - $.urlParam = function(name){ var results = new RegExp('[\?&]' + name + '=([^]*)').exec(window.location.href); if (results == null) { @@ -116,7 +110,7 @@ var checkNewMessages = function() { if (typeof jsondata['photos'][peerLabel] != 'undefined') { peerListBuf += 'style="background-image: url(' + jsondata['photos'][peerLabel] + ');"'; } - peerListBuf += '>' + peerLabel + ' (' + val + ')'; + peerListBuf += '>' + peerLabel + ' (' + val + ')'; $('#app-mailbox-peers ul').prepend(peerListBuf); bufferedContacts.push(peerLabel); @@ -320,7 +314,7 @@ function fetchInitialPeerList(jsondata) { if (typeof jsondata['photos'][peerLabel] != 'undefined') { peerListBuf += 'style="background-image: url(' + jsondata['photos'][peerLabel] + ');"'; } - peerListBuf += '>' + peerLabel + ''; + peerListBuf += '>' + peerLabel + ''; bufferedContacts.push(peerLabel); } }); diff --git a/templates/main.php b/templates/main.php index f562036..0672089 100644 --- a/templates/main.php +++ b/templates/main.php @@ -7,17 +7,20 @@ use \OCA\OcSms\Lib\CountryCodes; \OCP\Util::addStyle('ocsms', 'style'); ?> -