[Git][noosfero/noosfero][stable-1.7] Merge branch 'permanent-notification' into 'master'

Rodrigo Souto gitlab at mg.gitlab.com
Wed Feb 8 17:13:31 BRST 2017


Rodrigo Souto pushed to branch stable-1.7 at Noosfero / noosfero


Commits:
a00c3119 by Rodrigo Souto at 2017-02-08T19:13:29+00:00
Merge branch 'permanent-notification' into 'master'

notification: make permanent notification through requireInteraction property

See merge request !1100
- - - - -


1 changed file:

- public/javascripts/application.js


Changes:

=====================================
public/javascripts/application.js
=====================================
--- a/public/javascripts/application.js
+++ b/public/javascripts/application.js
@@ -1136,6 +1136,9 @@ function notifyMe(title, options) {
      return null;
    }
 
+  if(PERMANENT_NOTIFICATIONS)
+    options.requireInteraction = true
+
   // Let's check if the user is okay to get some notification
   var notification = null;
   if (Notification.permission === "granted") {
@@ -1160,15 +1163,11 @@ function notifyMe(title, options) {
     });
   }
 
-  if(!PERMANENT_NOTIFICATIONS)
-    setTimeout(function() {notification.close()}, 5000);
-
   notification.onclick = function(){
     notification.close();
     // Chromium tweak
     window.open().close();
     window.focus();
-    this.cancel();
   };
 
   return notification;



View it on GitLab: https://gitlab.com/noosfero/noosfero/commit/a00c3119cd05420d3bc4d788ce3c19357d75de4d
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20170208/0b7bec0d/attachment-0001.html>


More information about the Noosfero-dev mailing list