summaryrefslogtreecommitdiffstats
path: root/js/directive
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-09-09 22:37:31 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-09-09 22:37:31 +0200
commit7b3ed892681a44e2739e4062e44c53fa0a904667 (patch)
tree92dd6c67d38f2dd8ed6949646f36fd6d9a2c138f /js/directive
parentff528b18df31085263c6362feae89e3dc7f62c1b (diff)
only toggle item if in compact mode
Diffstat (limited to 'js/directive')
-rw-r--r--js/directive/NewsStopPropagation.js20
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