summaryrefslogtreecommitdiffstats
path: root/js-old/directive/NewsToggleShow.js
diff options
context:
space:
mode:
Diffstat (limited to 'js-old/directive/NewsToggleShow.js')
-rw-r--r--js-old/directive/NewsToggleShow.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/js-old/directive/NewsToggleShow.js b/js-old/directive/NewsToggleShow.js
new file mode 100644
index 000000000..f683dddd5
--- /dev/null
+++ b/js-old/directive/NewsToggleShow.js
@@ -0,0 +1,24 @@
+/**
+ * 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('newsToggleShow', function () {
+ 'use strict';
+ return {
+ restrict: 'A',
+ scope: {
+ 'newsToggleShow': '@'
+ },
+ link: function (scope, elem) {
+ elem.click(function () {
+ var target = $(scope.newsToggleShow);
+ target.toggle();
+ });
+ }
+ };
+});