summaryrefslogtreecommitdiffstats
path: root/js-old/directive/NewsStopPropagation.js
diff options
context:
space:
mode:
Diffstat (limited to 'js-old/directive/NewsStopPropagation.js')
-rw-r--r--js-old/directive/NewsStopPropagation.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/js-old/directive/NewsStopPropagation.js b/js-old/directive/NewsStopPropagation.js
new file mode 100644
index 000000000..fdf0b89c7
--- /dev/null
+++ b/js-old/directive/NewsStopPropagation.js
@@ -0,0 +1,20 @@
+/**
+ * Nextcloud - 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', function () {
+ 'use strict';
+ return {
+ restrict: 'A',
+ link: function (scope, element) {
+ element.bind('click', function (event) {
+ event.stopPropagation();
+ });
+ }
+ };
+}); \ No newline at end of file