From 5624cd684bb42584ffc9d498b46478bfbd5db1af Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Fri, 9 Jan 2015 16:49:35 +0000 Subject: [PATCH] Prepare angular controllers for better JS code and convert setting send button to angular --- js/script.js | 16 +++++++++++++++- templates/main.php | 6 +++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/js/script.js b/js/script.js index 45647f2..8e790c2 100644 --- a/js/script.js +++ b/js/script.js @@ -20,7 +20,21 @@ var unreadCountNotifStep = 12; var lastUnreadCountAllConv = 0; var originalTitle = document.title; -angular.module('OcSms', ['OC']); +var app = angular.module('OcSms', ['OC']); + +app.controller('SettingsController', ['$scope', + function ($scope) { + $scope.buttons = [{}]; + $scope.sendCountry = function () { + alert('sendCountry'); + }; + } +]); + +app.controller('ContactsController' ['$scope', function ($scope) { + } +]); + $.urlParam = function(name){ var results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(window.location.href); diff --git a/templates/main.php b/templates/main.php index 0d723ba..8bc379d 100644 --- a/templates/main.php +++ b/templates/main.php @@ -8,7 +8,7 @@ use \OCA\OcSms\Lib\CountryCodes; ?>
-
+
  • There isn't any conversation
@@ -17,13 +17,13 @@ use \OCA\OcSms\Lib\CountryCodes;
-
+
- +