You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openmonero/html/js/directives/modal.js

28 lines
825 B

thinwalletDirectives.directive('showModal', function(ModalService) {
return {
link: function(scope, element, attrs) {
var modal = attrs.showModal;
element.click(function() {
scope.$apply(function() {
ModalService.show(modal);
});
});
}
};
});
thinwalletDirectives.directive('hideModal', function(ModalService) {
return {
link: function(scope, element, attrs) {
var modal = attrs.hideModal;
if(!modal) {
modal = element.parents('[modal-name]').attr('modal-name');
}
element.click(function() {
scope.$apply(function() {
ModalService.hide(modal);
});
});
}
};
});