From 3b4724ae4006538a5f17a332f26beef71afa2c39 Mon Sep 17 00:00:00 2001 From: 98287028191 Date: Thu, 17 Dec 2015 16:12:15 -0200 Subject: [PATCH] Retirado o botão de remover da página ranking --- src/app/components/category-list/category-list.directive.js | 17 ++++++++++++++--- src/app/components/category-list/category-list.html | 3 +-- src/app/pages/auth/new-password.html | 3 ++- src/app/pages/auth/newPassword.controller.js | 2 +- src/app/pages/ranking/ranking.controller.js | 4 ++-- src/app/pages/ranking/ranking.html | 4 +++- 6 files changed, 23 insertions(+), 10 deletions(-) diff --git a/src/app/components/category-list/category-list.directive.js b/src/app/components/category-list/category-list.directive.js index 01c5844..496fe70 100644 --- a/src/app/components/category-list/category-list.directive.js +++ b/src/app/components/category-list/category-list.directive.js @@ -9,23 +9,33 @@ function categoryList() { /** @ngInject */ - function CategoryListController($rootScope, $element, $log) { + function CategoryListController($rootScope, $location, $element, $log) { $log.debug('CategoryListController'); // alias var vm = this; - + // dependencies vm.$rootScope = $rootScope; + vm.$location = $location; vm.$element = $element; vm.$log = $log; + // initialization vm.init(); } CategoryListController.prototype.init = function() { var vm = this; + vm.pathUrl = vm.$location.$$path; + //var pathUrl = String(window.location.pathname) + vm.escodeRemover = true; + + // Disable button remove of page ranking + if(vm.pathUrl=="/ranking"){ + vm.escodeRemover = false; + } // Default values if(!vm.isCollapsed){ @@ -47,12 +57,13 @@ CategoryListController.prototype.selectCategory = function(category, $event) { var vm = this; - + // prevent glitch $event.stopPropagation(); if (category !== vm.selectedCategory) { vm.selectedCategory = category; + }else{ if(vm._disableUnselect()){ diff --git a/src/app/components/category-list/category-list.html b/src/app/components/category-list/category-list.html index 26d057f..d66726a 100644 --- a/src/app/components/category-list/category-list.html +++ b/src/app/components/category-list/category-list.html @@ -5,7 +5,6 @@ Filtrar por Tema -