Commits

Juan Carlos Picado Herrera committed eb03852

bugfixes all notifications UI

Comments (0)

Files changed (5)

enme-war/src/main/webapp/resource/css-compile/common.css

     user-select: none;
 }
 
+a.point {
+  cursor: pointer;
+  text-decoration: none;
+}
+
 .web-sub-tittle {
   background-color: white;
   border: 1px solid #CCC;

enme-war/src/main/webapp/resource/css-compile/web/components/notification-list.css

 .web-notification-list .list a:link, .web-notification-list .list a:visited {
     color: #4A52AC;
     text-decoration: underline;
+    cursor: pointer;
 }
 
 .web-notification-list .list .web-sub-tittle {

enme-war/src/main/webapp/resource/js/me/web/widget/notifications/Notification.js

             window.setInterval(_timer, this.delay || 20000);
 
             dojo.subscribe("/notifications/service/messages", this, "_updateStatus");
+            dojo.subscribe("/notifications/service/update", this, function() {
+                console.log("dskald;ksal;dksal;kdlaskl;dsaldsa");
+                _timer();
+            });
 
             dojo.addOnUnload(function() {
                 if (subscriptionNotification !== null) {

enme-war/src/main/webapp/resource/js/me/web/widget/notifications/NotificationListItem.js

          * remove notification.
          * @method _removeNotification
          */
-        _remove : function(event) {
+        _remove : function(e) {
             //TODO: display dialog.
+            e.stopPropagation();
             this._removeNotification();
         },
 
          * @method _removeNotification
          */
         _removeNotification : function() {
-            var load = dojo.hitch(this, function(data) {
+            var parent = this,
+            load = dojo.hitch(this, function(data) {
                  dojo.destroy(this.domNode);
-             });
-             var error = function(error) {
+                 dojo.publish('/notifications/service/update');
+             }),
+            error = function(error) {
                  console.debug("error", error);
              };
              var params = {

enme-war/src/main/webapp/resource/js/me/web/widget/notifications/template/notificationListItem.html

     </span>
      <span class="options">
         <span class="">
-            <a href="#" data-dojo-attach-event="onclick:_remove">
+            <a class="unselectable point"  data-dojo-attach-event="onclick:_remove">
                 Delete
             </a>
         </span>