diff options
| author | Guillaume Horel <guillaume.horel@gmail.com> | 2012-04-02 02:37:41 -0400 |
|---|---|---|
| committer | Guillaume Horel <guillaume.horel@gmail.com> | 2012-04-02 02:37:41 -0400 |
| commit | 28a5d4fbf8a42649360e9d1e1206c062e0a5ce8d (patch) | |
| tree | 0c0842aab6ca8259f14fc9b760eb742098fa1aaa /app/js | |
| parent | 0a74881345b16b39487493364bb0c24f8cc47967 (diff) | |
| download | alias-28a5d4fbf8a42649360e9d1e1206c062e0a5ce8d.tar.gz | |
regorg files
Diffstat (limited to 'app/js')
| -rw-r--r-- | app/js/app.js | 10 | ||||
| -rw-r--r-- | app/js/controllers.js | 21 | ||||
| -rw-r--r-- | app/js/directives.js | 10 | ||||
| -rw-r--r-- | app/js/filters.js | 9 | ||||
| -rw-r--r-- | app/js/services.js | 23 |
5 files changed, 0 insertions, 73 deletions
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 |
