summaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-02-12 03:07:28 +0100
committerBernhard Posselt <nukeawhale@gmail.com>2013-02-12 03:07:28 +0100
commit17902de40c7db3228219e673e7c05419bb12d4a4 (patch)
treec821b0f04458b43a969c73ea70d255ca20a82fa6 /js
parent399007f6b70470e29a0f29ea0920b54c0db222f0 (diff)
forward import click to hidden file input
Diffstat (limited to 'js')
-rw-r--r--js/app.js35
1 files changed, 35 insertions, 0 deletions
diff --git a/js/app.js b/js/app.js
index 796ffcf97..ce8f161c7 100644
--- a/js/app.js
+++ b/js/app.js
@@ -2391,6 +2391,41 @@
/*
+ Used to forward clicks to another element via jquery selector
+
+ The expression which can be passed looks like this {selector:'#opml-upload'}
+ */
+
+
+ angular.module('News').directive('forwardClick', function() {
+ return function(scope, elm, attr) {
+ var options;
+ options = scope.$eval(attr.forwardClick);
+ if (angular.isDefined(options.selector)) {
+ return elm.click(function() {
+ return $(options.selector).trigger('click');
+ });
+ }
+ };
+ });
+
+ /*
+ # ownCloud news app
+ #
+ # @author Alessandro Cosentino
+ # @author Bernhard Posselt
+ # Copyright (c) 2012 - Alessandro Cosentino <cosenal@gmail.com>
+ # Copyright (c) 2012 - Bernhard Posselt <nukeawhale@gmail.com>
+ #
+ # This file is licensed under the Affero General Public License version 3 or
+ # later.
+ #
+ # See the COPYING-README file
+ #
+ */
+
+
+ /*
# This is used to signal the settings bar that the app has been focused and that
# it should hide
*/