diff options
Diffstat (limited to 'js/directive/NewsInstantNotification.js')
-rw-r--r-- | js/directive/NewsInstantNotification.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/js/directive/NewsInstantNotification.js b/js/directive/NewsInstantNotification.js new file mode 100644 index 000000000..f66db3d69 --- /dev/null +++ b/js/directive/NewsInstantNotification.js @@ -0,0 +1,24 @@ +/** + * 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('newsInstantNotification', function () { + 'use strict'; + + return { + restrict: 'E', + link: function (scope, elem) { + elem.hide(); + + var notification = elem.html(); + OC.Notification.showHtml(notification); + } + }; + +});
\ No newline at end of file |