From 8313074915401859de4e6236fa14f9ad428451f5 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Sat, 2 May 2015 10:19:19 +0200 Subject: use system notifications, fix #779 --- js/directive/NewsInstantNotification.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 js/directive/NewsInstantNotification.js (limited to 'js/directive') 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 + * @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 -- cgit v1.2.3