refactor(dashboard): Restructured front-end dashboard code.
This commit is contained in:
13
mod/dashboard/app/scripts/common/directives/highlight.js
Normal file
13
mod/dashboard/app/scripts/common/directives/highlight.js
Normal file
@ -0,0 +1,13 @@
|
||||
'use strict';
|
||||
|
||||
angular.module('etcdControlPanel')
|
||||
.directive('highlight', function() {
|
||||
return {
|
||||
restrict: 'A',
|
||||
link: function(scope, element, attrs) {
|
||||
if('#' + scope.etcdPath === attrs.href) {
|
||||
element.parent().parent().addClass('etcd-selected');
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
Reference in New Issue
Block a user