aboutsummaryrefslogtreecommitdiffstats
path: root/alias-angular/app/js/directives.js
diff options
context:
space:
mode:
Diffstat (limited to 'alias-angular/app/js/directives.js')
-rw-r--r--alias-angular/app/js/directives.js15
1 files changed, 0 insertions, 15 deletions
diff --git a/alias-angular/app/js/directives.js b/alias-angular/app/js/directives.js
index 3b9b652..ffa618c 100644
--- a/alias-angular/app/js/directives.js
+++ b/alias-angular/app/js/directives.js
@@ -7,22 +7,7 @@ angular.module('Alias.directives', []).
var directiveDefinition = {
restrict: 'C',
link: function(scope, elm, attrs) {
- var tabs = elm.find('li');
- var selectedTab = tabs.filter('.active');
- if (!selectedTab.length) {
- selectedTab = tabs.filter(':first');
- selectedTab.addClass('active');
- }
- var selectedPane = $(selectedTab.find('a').attr('href'));
- selectedPane.addClass('active');
-
elm.on('click', function(event) {
- selectedTab.removeClass('active');
- selectedPane.removeClass('active');
- selectedTab = angular.element(event.target).parent();
- selectedPane = $(selectedTab.find('a').attr('href'));
- selectedTab.addClass('active');
- selectedPane.addClass('active');
event.preventDefault();
});
}