summaryrefslogtreecommitdiffstats
path: root/js/directive
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-05-23 20:19:06 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-05-23 20:19:06 +0200
commit0b22611a929fc317c6ad073d2ddf5f198ee836f3 (patch)
treeca3593e76af10dc6a81ed0412c6d0e6434f73331 /js/directive
parent94e24c1e1a53db60e6924b39ad308b6b2d2e8c2b (diff)
more boilerplate
Diffstat (limited to 'js/directive')
-rw-r--r--js/directive/NewsAutoFocus.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/js/directive/NewsAutoFocus.js b/js/directive/NewsAutoFocus.js
new file mode 100644
index 000000000..a66f4453c
--- /dev/null
+++ b/js/directive/NewsAutoFocus.js
@@ -0,0 +1,17 @@
+/**
+ * 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('newsAutoFocus', () => {
+ 'use strict';
+
+ return (scope, elem, attrs) => {
+ $(attrs.newsAutofocus).focus();
+ };
+
+}); \ No newline at end of file