mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-04 01:29:21 +00:00
21 lines
408 B
JavaScript
21 lines
408 B
JavaScript
|
|
'use strict';
|
||
|
|
|
||
|
|
(function(){
|
||
|
|
|
||
|
|
angular
|
||
|
|
.module('habitrpg')
|
||
|
|
.directive('expandMenu', expandMenu);
|
||
|
|
|
||
|
|
function expandMenu() {
|
||
|
|
return {
|
||
|
|
restrict: 'A',
|
||
|
|
link: function(scope, element, attrs) {
|
||
|
|
element.on('click', function(event) {
|
||
|
|
scope._expandedMenu = (scope._expandedMenu == attrs.menu) ? null : attrs.menu;
|
||
|
|
scope.$apply()
|
||
|
|
});
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}());
|