diff options
Diffstat (limited to 'js/directive/ClickOutside.js')
-rw-r--r-- | js/directive/ClickOutside.js | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/js/directive/ClickOutside.js b/js/directive/ClickOutside.js deleted file mode 100644 index 7021a6330..000000000 --- a/js/directive/ClickOutside.js +++ /dev/null @@ -1,31 +0,0 @@ -/** -* Nextcloud - News -* -* This file is licensed under the Affero General Public License version 3 or -* later. See the COPYING file. -* -* @author Marco Nassabain <marco.nassabain@hotmail.com> -* @author Nicolas Wendling <nicolas.wendling1011@gmail.com> -* @author Jimmy Huynh <natorisaki@gmail.com> -* @author Aurélien David <dav.aurelien@gmail.com> -*/ -app.directive('clickOutside', function ($document) { - 'use strict'; - - return { - restrict: 'A', - scope: { - clickOutside: '&' - }, - link: function (scope, el) { - - $document.on('click', function (e) { - if (el !== e.target && !el[0].contains(e.target)) { - scope.$apply(function () { - scope.$eval(scope.clickOutside); - }); - } - }); - } - }; -}); |