From 28a5d4fbf8a42649360e9d1e1206c062e0a5ce8d Mon Sep 17 00:00:00 2001 From: Guillaume Horel Date: Mon, 2 Apr 2012 02:37:41 -0400 Subject: regorg files --- app/js/app.js | 10 ---------- app/js/controllers.js | 21 --------------------- app/js/directives.js | 10 ---------- app/js/filters.js | 9 --------- app/js/services.js | 23 ----------------------- 5 files changed, 73 deletions(-) delete mode 100644 app/js/app.js delete mode 100644 app/js/controllers.js delete mode 100644 app/js/directives.js delete mode 100644 app/js/filters.js delete mode 100644 app/js/services.js (limited to 'app/js') diff --git a/app/js/app.js b/app/js/app.js deleted file mode 100644 index 795f1db..0000000 --- a/app/js/app.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - - -// Declare app level module which depends on filters, and services -angular.module('myApp', ['myApp.filters', 'myApp.services', 'myApp.directives']). - config(['$routeProvider', function($routeProvider) { - $routeProvider.when('/view1', {template: 'partials/partial1.html', controller: MyCtrl1}); - $routeProvider.when('/view2', {template: 'partials/partial2.html', controller: MyCtrl2}); - $routeProvider.otherwise({redirectTo: '/view1'}); - }]); diff --git a/app/js/controllers.js b/app/js/controllers.js deleted file mode 100644 index 4199c7f..0000000 --- a/app/js/controllers.js +++ /dev/null @@ -1,21 +0,0 @@ -'use strict'; -/* App Controllers */ - -function RosterCtl($scope, connection) { - $scope.contacts = []; - $scope.init = function() { - var query = $iq({type : 'get'}).c('query', {xmlns : Strophe.NS.ROSTER}); - connection.sendIQ(query, success); - }; - $scope.onRoster = function(iq) { - var elems = iq.getElementsByTagName('query'); - var query = elems[0]; - Strophe.forEachChild(query, 'item', function(item){ - var jid = item.getAttribute('jid'); - var name = item.getAttribute('name') || jid; - $scope.contacts.push(name); - }); - return true; - }; -}; -RosterCtl.$inject = ['$scope','connection']; \ No newline at end of file diff --git a/app/js/directives.js b/app/js/directives.js deleted file mode 100644 index 8ed47bb..0000000 --- a/app/js/directives.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; -/* http://docs-next.angularjs.org/api/angular.module.ng.$compileProvider.directive */ - - -angular.module('myApp.directives', []). - directive('appVersion', ['version', function(version) { - return function(scope, elm, attrs) { - elm.text(version); - }; - }]); diff --git a/app/js/filters.js b/app/js/filters.js deleted file mode 100644 index ef89b6b..0000000 --- a/app/js/filters.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; -/* http://docs-next.angularjs.org/api/angular.module.ng.$filter */ - -angular.module('myApp.filters', []). - filter('interpolate', ['version', function(version) { - return function(text) { - return String(text).replace(/\%VERSION\%/mg, version); - } - }]); diff --git a/app/js/services.js b/app/js/services.js deleted file mode 100644 index 02d8a8b..0000000 --- a/app/js/services.js +++ /dev/null @@ -1,23 +0,0 @@ -'use strict'; - -angular.module('Alias.services', [], function($provide) { -$provide.factory('connection', - ['$log', function($log) { - function connect_callback(status){ - if ( status == Strophe.Status.CONNECTING ) { - $log('Strophe is connecting.'); - } else if ( status == Strophe.Status.CONNFAIL ) { - $log('Strophe failed to connect.'); - } else if ( status == Strophe.Status.DISCONNECTING ) { - $log('Strophe is disconnecting.'); - } else if ( status == Strophe.Status.DISCONNECTED ) { - $dev.log('Strophe is disconnected.'); - } else if ( status == Strophe.Status.CONNECTED ) { - $log('Strophe is connected.'); - } - }; - var connection = new Strophe.Connection(BOSH_SERVICE); - connection.connect(NAME, PASSWORD, connect_callback); - return connection; - }]); -}); \ No newline at end of file -- cgit v1.2.3-70-g09d2