diff options
Diffstat (limited to 'js/directive')
-rw-r--r-- | js/directive/NewsStopPropagation.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/js/directive/NewsStopPropagation.js b/js/directive/NewsStopPropagation.js new file mode 100644 index 000000000..daa62ae59 --- /dev/null +++ b/js/directive/NewsStopPropagation.js @@ -0,0 +1,20 @@ +/** + * ownCloud - News + * + * This file is licensed under the Affero General Public License version 3 or + * later. See the COPYING file. + * + * @author Bernhard Posselt <dev@bernhard-posselt.com> + * @copyright Bernhard Posselt 2014 + */ +app.directive('newsStopPropagation', () => { + 'use strict'; + return { + restrict: 'A', + link: (scope, element) => { + element.bind('click', (e) => { + e.stopPropagation(); + }); + } + }; + });
\ No newline at end of file |