Commit 3b4724ae4006538a5f17a332f26beef71afa2c39

Authored by 98287028191
1 parent 72255466

Retirado o botão de remover da página ranking

src/app/components/category-list/category-list.directive.js
@@ -9,23 +9,33 @@ @@ -9,23 +9,33 @@
9 function categoryList() { 9 function categoryList() {
10 10
11 /** @ngInject */ 11 /** @ngInject */
12 - function CategoryListController($rootScope, $element, $log) { 12 + function CategoryListController($rootScope, $location, $element, $log) {
13 $log.debug('CategoryListController'); 13 $log.debug('CategoryListController');
14 14
15 // alias 15 // alias
16 var vm = this; 16 var vm = this;
17 - 17 +
18 // dependencies 18 // dependencies
19 vm.$rootScope = $rootScope; 19 vm.$rootScope = $rootScope;
  20 + vm.$location = $location;
20 vm.$element = $element; 21 vm.$element = $element;
21 vm.$log = $log; 22 vm.$log = $log;
22 23
  24 +
23 // initialization 25 // initialization
24 vm.init(); 26 vm.init();
25 } 27 }
26 28
27 CategoryListController.prototype.init = function() { 29 CategoryListController.prototype.init = function() {
28 var vm = this; 30 var vm = this;
  31 + vm.pathUrl = vm.$location.$$path;
  32 + //var pathUrl = String(window.location.pathname)
  33 + vm.escodeRemover = true;
  34 +
  35 + // Disable button remove of page ranking
  36 + if(vm.pathUrl=="/ranking"){
  37 + vm.escodeRemover = false;
  38 + }
29 39
30 // Default values 40 // Default values
31 if(!vm.isCollapsed){ 41 if(!vm.isCollapsed){
@@ -47,12 +57,13 @@ @@ -47,12 +57,13 @@
47 57
48 CategoryListController.prototype.selectCategory = function(category, $event) { 58 CategoryListController.prototype.selectCategory = function(category, $event) {
49 var vm = this; 59 var vm = this;
50 - 60 +
51 // prevent glitch 61 // prevent glitch
52 $event.stopPropagation(); 62 $event.stopPropagation();
53 63
54 if (category !== vm.selectedCategory) { 64 if (category !== vm.selectedCategory) {
55 vm.selectedCategory = category; 65 vm.selectedCategory = category;
  66 +
56 }else{ 67 }else{
57 68
58 if(vm._disableUnselect()){ 69 if(vm._disableUnselect()){
src/app/components/category-list/category-list.html
@@ -5,7 +5,6 @@ @@ -5,7 +5,6 @@
5 <!-- <span class="visible-xs"><b>Filtrar</b> por Tema <span class="glyphicon glyphicon-filter pull-right"></span></span> --> 5 <!-- <span class="visible-xs"><b>Filtrar</b> por Tema <span class="glyphicon glyphicon-filter pull-right"></span></span> -->
6 <b>Filtrar</b> por Tema <span class="glyphicon glyphicon-filter pull-right"></span> 6 <b>Filtrar</b> por Tema <span class="glyphicon glyphicon-filter pull-right"></span>
7 </h3> 7 </h3>
8 -  
9 <!-- <div class="list-group ng-hide" ng-show="!vm.isCollapsed" ng-class="vm.selectedCategory.slug"> --> 8 <!-- <div class="list-group ng-hide" ng-show="!vm.isCollapsed" ng-class="vm.selectedCategory.slug"> -->
10 <div class="list-group" ng-class="vm.selectedCategory.slug"> 9 <div class="list-group" ng-class="vm.selectedCategory.slug">
11 <button type="button" class="list-group-item category-list--item" 10 <button type="button" class="list-group-item category-list--item"
@@ -17,7 +16,7 @@ @@ -17,7 +16,7 @@
17 <span class="category-list--icon icon" aria-hidden="true" ng-class="'icon-tema-' + category.slug + '-small'"></span> 16 <span class="category-list--icon icon" aria-hidden="true" ng-class="'icon-tema-' + category.slug + '-small'"></span>
18 <span class="category-list--label">{{::category.name}}</span> 17 <span class="category-list--label">{{::category.name}}</span>
19 <span class="category-list--icon--right glyphicon glyphicon-chevron-right hidden-xs" ng-hide="vm.selectedCategory.slug === category.slug"></span> 18 <span class="category-list--icon--right glyphicon glyphicon-chevron-right hidden-xs" ng-hide="vm.selectedCategory.slug === category.slug"></span>
20 - <span class="category-list--icon--right glyphicon glyphicon-remove hidden-xs" ng-show="vm.selectedCategory.slug === category.slug"></span> 19 + <span ng-if="vm.escodeRemover" class="category-list--icon--right glyphicon glyphicon-remove hidden-xs" ng-show="vm.selectedCategory.slug === category.slug"></span>
21 <div ng-if="category.archived" class="category-list--icon-archived"> 20 <div ng-if="category.archived" class="category-list--icon-archived">
22 <span class="glyphicon glyphicon-ok" aria-hidden="true"></span> 21 <span class="glyphicon glyphicon-ok" aria-hidden="true"></span>
23 </div> 22 </div>
src/app/pages/auth/new-password.html
@@ -31,7 +31,8 @@ @@ -31,7 +31,8 @@
31 novalidate 31 novalidate
32 name="newPasswordForm" 32 name="newPasswordForm"
33 ng-submit="newPasswordForm.$valid && pageNewPassword.submitNewPassword($event, newPasswordForm)"> 33 ng-submit="newPasswordForm.$valid && pageNewPassword.submitNewPassword($event, newPasswordForm)">
34 - <input type="hidden" id="code" name="code" value="{{::pageNewPassword.token}}" /> 34 +
  35 +
35 <div class="row"> 36 <div class="row">
36 <div class="col-md-6"> 37 <div class="col-md-6">
37 <div class="form-group"> 38 <div class="form-group">
src/app/pages/auth/newPassword.controller.js
@@ -43,7 +43,7 @@ @@ -43,7 +43,7 @@
43 43
44 // get form data 44 // get form data
45 var data = { 45 var data = {
46 - code: newPasswordForm.code, 46 + code: vm.token,
47 newPassword: newPasswordForm.newPassword.$modelValue, 47 newPassword: newPasswordForm.newPassword.$modelValue,
48 newPasswordConfirmation: newPasswordForm.newPasswordConfirmation.$modelValue 48 newPasswordConfirmation: newPasswordForm.newPasswordConfirmation.$modelValue
49 }; 49 };
src/app/pages/ranking/ranking.controller.js
@@ -37,8 +37,8 @@ @@ -37,8 +37,8 @@
37 vm.query = null; 37 vm.query = null;
38 vm.search = vm.$location.search(); 38 vm.search = vm.$location.search();
39 //Remove "X" from the theme at the ranking page 39 //Remove "X" from the theme at the ranking page
40 - // vm.slug = vm.$location.$$path;  
41 - // console.log(vm.$location.$$path); 40 + vm.slug = vm.$location.$$path;
  41 + console.log("aqui",vm.$location.$$path);
42 42
43 if (vm.search.tema) { 43 if (vm.search.tema) {
44 vm._filtredByThemeSlug = vm.search.tema; 44 vm._filtredByThemeSlug = vm.search.tema;
src/app/pages/ranking/ranking.html
@@ -40,9 +40,11 @@ @@ -40,9 +40,11 @@
40 <div class="container"> 40 <div class="container">
41 <div id="lista-de-propostas" class="row"> 41 <div id="lista-de-propostas" class="row">
42 <div class="col-sm-4 col-md-3"> 42 <div class="col-sm-4 col-md-3">
  43 + <!-- Banner lateral de temas -->
43 <div ng-if="pageRanking.themes"> 44 <div ng-if="pageRanking.themes">
44 - <category-list categories="pageRanking.themes" selected-category="pageRanking.selectedTheme" disable-unselect="true"></category-list> 45 + <category-list categories="pageRanking.themes" selected-category="" disable-unselect="true"></category-list>
45 </div> 46 </div>
  47 +
46 <div ng-if="pageRanking.filtredPrograms && pageRanking.selectedProgram" class="topics-select--wrapper"> 48 <div ng-if="pageRanking.filtredPrograms && pageRanking.selectedProgram" class="topics-select--wrapper">
47 <topics-select topics="pageRanking.filtredPrograms" selected-topic="pageRanking.selectedProgram"></topics-select> 49 <topics-select topics="pageRanking.filtredPrograms" selected-topic="pageRanking.selectedProgram"></topics-select>
48 </div> 50 </div>