summaryrefslogtreecommitdiffstats
path: root/js/directive
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2015-05-02 10:19:19 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2015-05-02 10:19:28 +0200
commit8313074915401859de4e6236fa14f9ad428451f5 (patch)
tree0a9eabf7509566ad1dee4fe5df46361929736eb1 /js/directive
parent0f88a5283349097362bf384bd114ca68b1a4bc02 (diff)
use system notifications, fix #779
Diffstat (limited to 'js/directive')
-rw-r--r--js/directive/NewsInstantNotification.js24
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