Commit 9e274da979d80c97c53d4ff3aea7b18156732da1
Exists in
master
and in
6 other branches
Merge branch 'fix-issues'
Showing
10 changed files
with
30 additions
and
16 deletions
Show diff stats
src/app/components/app-navbar/app-navbar.directive.js
| ... | ... | @@ -9,17 +9,25 @@ |
| 9 | 9 | function appNavbar() { |
| 10 | 10 | |
| 11 | 11 | /** @ngInject */ |
| 12 | - function NavbarController($log) { | |
| 12 | + function NavbarController(AuthService, $log) { | |
| 13 | 13 | $log.debug('NavbarController'); |
| 14 | 14 | |
| 15 | 15 | var vm = this; |
| 16 | - | |
| 17 | - vm.scrollTo = function(hash) { | |
| 18 | - var $el = angular.element('#' + hash); | |
| 19 | - angular.element('body').animate({scrollTop: $el.offset().top}, 'slow'); | |
| 20 | - }; | |
| 16 | + vm.AuthService = AuthService; | |
| 17 | + vm.$log = $log; | |
| 21 | 18 | } |
| 22 | 19 | |
| 20 | + // NavbarController.prototype.scrollTo = function (hash){ | |
| 21 | + // var $el = angular.element('#' + hash); | |
| 22 | + // angular.element('html,body').animate({scrollTop: $el.offset().top}, 'slow'); | |
| 23 | + // }; | |
| 24 | + | |
| 25 | + NavbarController.prototype.onClickLogout = function (){ | |
| 26 | + var vm = this; | |
| 27 | + | |
| 28 | + vm.AuthService.logout(); | |
| 29 | + }; | |
| 30 | + | |
| 23 | 31 | var directive = { |
| 24 | 32 | restrict: 'E', |
| 25 | 33 | templateUrl: 'app/components/app-navbar/app-navbar.html', | ... | ... |
src/app/components/app-navbar/app-navbar.html
| ... | ... | @@ -22,6 +22,11 @@ |
| 22 | 22 | |
| 23 | 23 | <div id="navbar-collapse" class="collapse navbar-collapse"> |
| 24 | 24 | <ul class="nav navbar-nav navbar-right"> |
| 25 | + <li class="hidden-sm hidden-md hidden-lg"> | |
| 26 | + <a ng-show="$root.currentUser === undefined" ui-sref="entrar">Entrar</a> | |
| 27 | + <a ng-show="$root.currentUser !== undefined" href="#" ng-click="vm.onClickLogout()">Sair</a> | |
| 28 | + </li> | |
| 29 | + <li ui-sref-active="active"><a ui-sref="inicio">Início</a></li> | |
| 25 | 30 | <li ui-sref-active="active"><a ui-sref="sobre">Sobre</a></li> |
| 26 | 31 | <li ui-sref-active="active"><a ui-sref="programas">Programas</a></li> |
| 27 | 32 | <li ui-sref-active="active"><a ui-sref="propostas">Propostas</a></li> |
| ... | ... | @@ -33,7 +38,7 @@ |
| 33 | 38 | <social-share class="dropdown-menu dropdown-menu-right" arrow-class="social-share--arrow"></social-share> |
| 34 | 39 | <div class="clearfix"></div> |
| 35 | 40 | </li> |
| 36 | - <li class="hidden-sm hidden-md hidden-lg" style="border: none; padding-bottom: 10px !important;"> | |
| 41 | + <li class="hidden-sm hidden-md hidden-lg" style="border: none; margin-top: 15px; padding-bottom: 10px !important;"> | |
| 37 | 42 | <div class="text text-right" style="padding-right: 20px;">DIALOGA <b>NAS REDES</b></div> |
| 38 | 43 | <ul class="social-share list-inline"> |
| 39 | 44 | <li> | ... | ... |
src/app/components/article-service/article.service.js
src/app/components/auth/auth.service.js
src/app/components/proposal-box/proposal-box.html
| ... | ... | @@ -17,7 +17,7 @@ |
| 17 | 17 | <div class="row"> |
| 18 | 18 | <div class="col-xs-12"> |
| 19 | 19 | <div class="feedback" ng-if="vm.STATE === vm.VOTE_STATUS.SUCCESS"> |
| 20 | - <p class="feedback--title">Obrigado por apoiar<br/>esta proposta!</p> | |
| 20 | + <p class="feedback--title">Obrigado por participar!</p> | |
| 21 | 21 | |
| 22 | 22 | <!-- actions --> |
| 23 | 23 | <div class="row feedback--message"> | ... | ... |
src/app/components/topic-list/topic-list.directive.js
| ... | ... | @@ -55,7 +55,7 @@ |
| 55 | 55 | |
| 56 | 56 | if (!angular.equals({}, vm.search)) { |
| 57 | 57 | var $el = vm.$element; |
| 58 | - angular.element('body').animate({scrollTop: $el.offset().top}, 'slow'); | |
| 58 | + angular.element('html,body').animate({scrollTop: $el.offset().top}, 'slow'); | |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | // update window location params | ... | ... |
src/app/pages/inicio/inicio.controller.js
| ... | ... | @@ -156,7 +156,7 @@ |
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | vm.$timeout(function() { |
| 159 | - angular.element('body').animate({scrollTop: scrollTop}, 'fast'); | |
| 159 | + angular.element('html,body').animate({scrollTop: scrollTop}, 'fast'); | |
| 160 | 160 | }, 0); // force queue |
| 161 | 161 | } |
| 162 | 162 | }; |
| ... | ... | @@ -222,7 +222,7 @@ |
| 222 | 222 | // scroll to result grid |
| 223 | 223 | var $searchResult = angular.element('#search-result'); |
| 224 | 224 | if ($searchResult && $searchResult.length > 0) { |
| 225 | - angular.element('body').animate({scrollTop: $searchResult.offset().top}, 'fast'); | |
| 225 | + angular.element('html,body').animate({scrollTop: $searchResult.offset().top}, 'fast'); | |
| 226 | 226 | vm.filtredPrograms = vm.getFiltredPrograms(); |
| 227 | 227 | }else { |
| 228 | 228 | vm.$log.warn('#search-result element not found.'); | ... | ... |
src/app/pages/programas/programa.controller.js
| ... | ... | @@ -181,7 +181,7 @@ |
| 181 | 181 | vm.$timeout(function() { |
| 182 | 182 | var target = angular.element('.focused-proposal'); |
| 183 | 183 | if (target && target.length > 0) { |
| 184 | - angular.element('body').animate({scrollTop: target.offset().top}, 'fast'); | |
| 184 | + angular.element('html,body').animate({scrollTop: target.offset().top}, 'fast'); | |
| 185 | 185 | } |
| 186 | 186 | }, 300); |
| 187 | 187 | } |
| ... | ... | @@ -248,7 +248,7 @@ |
| 248 | 248 | var vm = this; |
| 249 | 249 | var el = vm.$element.find(rule); |
| 250 | 250 | el.slideDown(); |
| 251 | - angular.element('body').animate({scrollTop: el.offset().top}, 'fast'); | |
| 251 | + angular.element('html,body').animate({scrollTop: el.offset().top}, 'fast'); | |
| 252 | 252 | }; |
| 253 | 253 | |
| 254 | 254 | ProgramaPageController.prototype.findAndHide = function(rule) { | ... | ... |
src/app/pages/programas/programas.controller.js
| ... | ... | @@ -147,7 +147,7 @@ |
| 147 | 147 | // scroll to result grid |
| 148 | 148 | var $searchResult = angular.element('#search-result'); |
| 149 | 149 | if ($searchResult && $searchResult.length > 0) { |
| 150 | - angular.element('body').animate({scrollTop: $searchResult.offset().top}, 'fast'); | |
| 150 | + angular.element('html,body').animate({scrollTop: $searchResult.offset().top}, 'fast'); | |
| 151 | 151 | vm.filtredPrograms = vm.getFiltredPrograms(); |
| 152 | 152 | }else { |
| 153 | 153 | vm.$log.warn('#search-result element not found.'); | ... | ... |
src/app/pages/propostas/propostas.controller.js
| ... | ... | @@ -170,7 +170,7 @@ |
| 170 | 170 | // scroll to result grid |
| 171 | 171 | var $searchResult = angular.element('#search-result'); |
| 172 | 172 | if ($searchResult && $searchResult.length > 0) { |
| 173 | - angular.element('body').animate({scrollTop: $searchResult.offset().top}, 'fast'); | |
| 173 | + angular.element('html,body').animate({scrollTop: $searchResult.offset().top}, 'fast'); | |
| 174 | 174 | vm.filterProposals(); |
| 175 | 175 | }else { |
| 176 | 176 | vm.$log.warn('#search-result element not found.'); | ... | ... |