Commit edee73463ec8640d7b05877dfd97977a3ed6b616
1 parent
fbb93b59
Exists in
master
and in
8 other branches
Lint code
Showing
12 changed files
with
49 additions
and
53 deletions
Show diff stats
gulp/images.js
| @@ -10,7 +10,7 @@ var sprity = require('sprity'); | @@ -10,7 +10,7 @@ var sprity = require('sprity'); | ||
| 10 | gulp.task('sprites', function () { | 10 | gulp.task('sprites', function () { |
| 11 | var src = [ | 11 | var src = [ |
| 12 | path.join(conf.paths.src, '/assets/images/icons/*.png'), | 12 | path.join(conf.paths.src, '/assets/images/icons/*.png'), |
| 13 | - path.join('!' + conf.paths.src, '/assets/images/icons/sprite.png') | 13 | + path.join('!' + conf.paths.src, '/assets/images/icons/sprite.png') |
| 14 | ]; | 14 | ]; |
| 15 | var destCss = path.join(conf.paths.tmp, '/serve/app/'); | 15 | var destCss = path.join(conf.paths.tmp, '/serve/app/'); |
| 16 | var destImg = path.join(conf.paths.src, '/assets/images/icons'); | 16 | var destImg = path.join(conf.paths.src, '/assets/images/icons'); |
gulp/scripts.js
| @@ -13,5 +13,5 @@ gulp.task('scripts', function () { | @@ -13,5 +13,5 @@ gulp.task('scripts', function () { | ||
| 13 | .pipe($.jshint()) | 13 | .pipe($.jshint()) |
| 14 | .pipe($.jshint.reporter('jshint-stylish')) | 14 | .pipe($.jshint.reporter('jshint-stylish')) |
| 15 | .pipe(browserSync.reload({ stream: true })) | 15 | .pipe(browserSync.reload({ stream: true })) |
| 16 | - .pipe($.size()) | 16 | + .pipe($.size()); |
| 17 | }); | 17 | }); |
gulp/unit-tests.js
src/app/components/article-box/article-box.directive.js
| @@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
| 6 | .directive('articleBox', articleBox); | 6 | .directive('articleBox', articleBox); |
| 7 | 7 | ||
| 8 | /** @ngInject */ | 8 | /** @ngInject */ |
| 9 | - function articleBox($rootScope) { | 9 | + function articleBox() { |
| 10 | 10 | ||
| 11 | /** @ngInject */ | 11 | /** @ngInject */ |
| 12 | function ArticleBoxController($state, PATH, $log) { | 12 | function ArticleBoxController($state, PATH, $log) { |
src/app/components/article-preview/article-preview.directive.js
| @@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
| 6 | .directive('articlePreview', articlePreview); | 6 | .directive('articlePreview', articlePreview); |
| 7 | 7 | ||
| 8 | /** @ngInject */ | 8 | /** @ngInject */ |
| 9 | - function articlePreview($rootScope) { | 9 | + function articlePreview() { |
| 10 | 10 | ||
| 11 | /** @ngInject */ | 11 | /** @ngInject */ |
| 12 | function ArticlePreviewController($state, PATH, $log) { | 12 | function ArticlePreviewController($state, PATH, $log) { |
src/app/components/article-service/article.service.js
| @@ -189,19 +189,19 @@ | @@ -189,19 +189,19 @@ | ||
| 189 | }); | 189 | }); |
| 190 | } | 190 | } |
| 191 | 191 | ||
| 192 | - function getSubscribers (event_id, params, cbSuccess, cbError) { | ||
| 193 | - var url = service.apiArticles + event_id + '/followers?_=' + new Date().getTime(); | ||
| 194 | - var paramsExtended = angular.extend({ | ||
| 195 | - // 'fields[]': ['id', 'slug', 'title', 'abstract', 'body', 'categories', 'created_at', 'start_date', 'end_date', 'hits'], | ||
| 196 | - 'content_type':'Event' | ||
| 197 | - }, params); | ||
| 198 | - | ||
| 199 | - UtilService.get(url, {params: paramsExtended}).then(function(data){ | ||
| 200 | - cbSuccess(data.articles); | ||
| 201 | - }).catch(function(error){ | ||
| 202 | - cbError(error); | ||
| 203 | - }); | ||
| 204 | - } | 192 | + // function getSubscribers (event_id, params, cbSuccess, cbError) { |
| 193 | + // var url = service.apiArticles + event_id + '/followers?_=' + new Date().getTime(); | ||
| 194 | + // var paramsExtended = angular.extend({ | ||
| 195 | + // // 'fields[]': ['id', 'slug', 'title', 'abstract', 'body', 'categories', 'created_at', 'start_date', 'end_date', 'hits'], | ||
| 196 | + // 'content_type':'Event' | ||
| 197 | + // }, params); | ||
| 198 | + | ||
| 199 | + // UtilService.get(url, {params: paramsExtended}).then(function(data){ | ||
| 200 | + // cbSuccess(data.articles); | ||
| 201 | + // }).catch(function(error){ | ||
| 202 | + // cbError(error); | ||
| 203 | + // }); | ||
| 204 | + // } | ||
| 205 | 205 | ||
| 206 | function subscribeToEvent (event_id, params, cbSuccess, cbError) { | 206 | function subscribeToEvent (event_id, params, cbSuccess, cbError) { |
| 207 | 207 |
src/app/components/auth/auth.service.js
| @@ -17,7 +17,7 @@ | @@ -17,7 +17,7 @@ | ||
| 17 | var encodedData = ''; | 17 | var encodedData = ''; |
| 18 | encodedData += 'name=' + data.name; | 18 | encodedData += 'name=' + data.name; |
| 19 | encodedData += '&email=' + data.email; | 19 | encodedData += '&email=' + data.email; |
| 20 | - encodedData += '&login=' + data.email.substr(0, data.email.indexOf('@')).toLowerCase().replace(/\W+/g,"").substr(0,25) + "-" + Date.now(); | 20 | + encodedData += '&login=' + data.email.substr(0, data.email.indexOf('@')).toLowerCase().replace(/\W+/g,'').substr(0,25) + '-' + Date.now(); |
| 21 | encodedData += '&email=' + data.email; | 21 | encodedData += '&email=' + data.email; |
| 22 | encodedData += '&password=' + data.password; | 22 | encodedData += '&password=' + data.password; |
| 23 | encodedData += '&password_confirmation=' + data.password_confirmation; | 23 | encodedData += '&password_confirmation=' + data.password_confirmation; |
| @@ -51,10 +51,10 @@ | @@ -51,10 +51,10 @@ | ||
| 51 | 51 | ||
| 52 | function activate (code) { | 52 | function activate (code) { |
| 53 | var url = '/api/v1/activate'; | 53 | var url = '/api/v1/activate'; |
| 54 | - var data = { | ||
| 55 | - private_token: API.token, | ||
| 56 | - activation_code: code | ||
| 57 | - }; | 54 | + // var data = { |
| 55 | + // private_token: API.token, | ||
| 56 | + // activation_code: code | ||
| 57 | + // }; | ||
| 58 | var encodedData = 'private_token=' + API.token; | 58 | var encodedData = 'private_token=' + API.token; |
| 59 | encodedData += '&activation_code=' + code; | 59 | encodedData += '&activation_code=' + code; |
| 60 | 60 | ||
| @@ -75,11 +75,11 @@ | @@ -75,11 +75,11 @@ | ||
| 75 | 75 | ||
| 76 | function changePassword (code, newPassword, newPasswordConfirmation){ | 76 | function changePassword (code, newPassword, newPasswordConfirmation){ |
| 77 | var url = '/api/v1/new_password'; | 77 | var url = '/api/v1/new_password'; |
| 78 | - var data = { | ||
| 79 | - code: code, | ||
| 80 | - password: newPassword, | ||
| 81 | - password_confirmation: newPasswordConfirmation | ||
| 82 | - }; | 78 | + // var data = { |
| 79 | + // code: code, | ||
| 80 | + // password: newPassword, | ||
| 81 | + // password_confirmation: newPasswordConfirmation | ||
| 82 | + // }; | ||
| 83 | var encodedData = 'code=' + code; | 83 | var encodedData = 'code=' + code; |
| 84 | encodedData += '&password=' + newPassword; | 84 | encodedData += '&password=' + newPassword; |
| 85 | encodedData += '&password_confirmation=' + newPasswordConfirmation; | 85 | encodedData += '&password_confirmation=' + newPasswordConfirmation; |
| @@ -159,21 +159,21 @@ | @@ -159,21 +159,21 @@ | ||
| 159 | return (service.isAuthenticated() && authorizedRoles.indexOf(Session.userRole) !== -1); | 159 | return (service.isAuthenticated() && authorizedRoles.indexOf(Session.userRole) !== -1); |
| 160 | } | 160 | } |
| 161 | 161 | ||
| 162 | - function _encodeObj(obj){ | ||
| 163 | - var result = []; | ||
| 164 | - var str = null; | ||
| 165 | - var p = null; | ||
| 166 | - | ||
| 167 | - for (p in obj) { | ||
| 168 | - if (obj.hasOwnProperty(p)) { | ||
| 169 | - // str = encodeURIComponent(p) + '=' + obj[p]; | ||
| 170 | - str = p + '=' + obj[p]; | ||
| 171 | - result.push(str); | ||
| 172 | - } | ||
| 173 | - } | ||
| 174 | - | ||
| 175 | - return result.join('&'); | ||
| 176 | - } | 162 | + // function _encodeObj(obj){ |
| 163 | + // var result = []; | ||
| 164 | + // var str = null; | ||
| 165 | + // var p = null; | ||
| 166 | + | ||
| 167 | + // for (p in obj) { | ||
| 168 | + // if (obj.hasOwnProperty(p)) { | ||
| 169 | + // // str = encodeURIComponent(p) + '=' + obj[p]; | ||
| 170 | + // str = p + '=' + obj[p]; | ||
| 171 | + // result.push(str); | ||
| 172 | + // } | ||
| 173 | + // } | ||
| 174 | + | ||
| 175 | + // return result.join('&'); | ||
| 176 | + // } | ||
| 177 | 177 | ||
| 178 | var service = { | 178 | var service = { |
| 179 | register: register, | 179 | register: register, |
src/app/components/event-list/event-list.directive.js
| @@ -57,9 +57,8 @@ | @@ -57,9 +57,8 @@ | ||
| 57 | vm.$log.debug('response', response); | 57 | vm.$log.debug('response', response); |
| 58 | }, function(error){ | 58 | }, function(error){ |
| 59 | vm.$log.debug('error', error); | 59 | vm.$log.debug('error', error); |
| 60 | - }) | 60 | + }); |
| 61 | } | 61 | } |
| 62 | - | ||
| 63 | }; | 62 | }; |
| 64 | 63 | ||
| 65 | var directive = { | 64 | var directive = { |
| @@ -75,6 +74,5 @@ | @@ -75,6 +74,5 @@ | ||
| 75 | }; | 74 | }; |
| 76 | 75 | ||
| 77 | return directive; | 76 | return directive; |
| 78 | - | ||
| 79 | } | 77 | } |
| 80 | })(); | 78 | })(); |
src/app/components/guid-service/guid.service.js
src/app/components/proposal-grid/proposal-grid.directive.js
| @@ -29,7 +29,7 @@ | @@ -29,7 +29,7 @@ | ||
| 29 | } | 29 | } |
| 30 | 30 | ||
| 31 | ProposalGridController.prototype.init = function() { | 31 | ProposalGridController.prototype.init = function() { |
| 32 | - var vm = this; | 32 | + // var vm = this; |
| 33 | }; | 33 | }; |
| 34 | 34 | ||
| 35 | ProposalGridController.prototype.attachListeners = function() { | 35 | ProposalGridController.prototype.attachListeners = function() { |
src/app/pages/auth/auth.controller.js
src/app/pages/programas/programa.controller.js
| @@ -162,12 +162,12 @@ | @@ -162,12 +162,12 @@ | ||
| 162 | var el = vm.$element.find(rule); | 162 | var el = vm.$element.find(rule); |
| 163 | el.slideDown(); | 163 | el.slideDown(); |
| 164 | angular.element('body').animate({scrollTop: el.offset().top}, 'fast'); | 164 | angular.element('body').animate({scrollTop: el.offset().top}, 'fast'); |
| 165 | - } | 165 | + }; |
| 166 | 166 | ||
| 167 | ProgramaPageController.prototype.findAndHide = function(rule) { | 167 | ProgramaPageController.prototype.findAndHide = function(rule) { |
| 168 | var vm = this; | 168 | var vm = this; |
| 169 | vm.$element.find(rule).slideUp(); | 169 | vm.$element.find(rule).slideUp(); |
| 170 | - } | 170 | + }; |
| 171 | 171 | ||
| 172 | ProgramaPageController.prototype.sendProposal = function() { | 172 | ProgramaPageController.prototype.sendProposal = function() { |
| 173 | var vm = this; | 173 | var vm = this; |