Commits

Juan Carlos Picado Herrera committed 7979ef6

More In progress
Notifications with thousands fixed

  • Participants
  • Parent commits bbf7302

Comments (0)

Files changed (4)

enme-js/resources-enme-war/src/main/resources/resource/js/me/core/enme.js

         }
       },
 
+      /**
+       * Convert huge number to relative quantities
+       * @method
+       */
+      relativeQuantity : function (quantity) {
+         if (typeof quantity === 'number') {
+              if (quantity > 9999) {
+                  var q = "" + quantity;
+                  return ">1K";
+              } else if (quantity < 9999) {
+                  return quantity;
+              }
+         }
+      },
+
     /**
      * Get format time based on format string.
      * @param date

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

 
             dojo.subscribe("/notifications/service/messages", this, "_updateStatus");
             dojo.subscribe("/notifications/service/update", this, function() {
-                console.log("dskald;ksal;dksal;kdlaskl;dsaldsa");
                 _timer();
             });
 
              });
              //encuestame.session.activity.updateNot(total, notStatus.totalNewNot);
              notStatus.totalNot = notStatus.totalNewNot;
-             this._count.innerHTML = notStatus.totalNot;
+             this._count.innerHTML = _ENME.relativeQuantity(notStatus.totalNot);
          },
 
          /*

enme-js/resources-enme-war/src/main/resources/resource/js/me/web/widget/stream/templates/frontEnd.html

 <div>
     <div data-dojo-attach-point="_list"></div>
     <div class="pagination" data-dojo-attach-point="_pagination">
-        <div data-dojo-attach-point="_stream" class="titleNext"> More</div>
+        <div data-dojo-attach-point="_stream" class="titleNext">
+        	 More
+     	</div>
     </div>
 </div>

enme-js/resources-enme-war/src/main/resources/resource/js/me/web/widget/ui/More.js

-define([ "dojo/_base/declare", "dijit/_WidgetBase", "dijit/_TemplatedMixin",
+/*
+ * Copyright 2013 encuestame
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/***
+ *  @author juanpicado19D0Tgm@ilDOTcom
+ *  @version 1.146
+ *  @module
+ *  @namespace
+ *  @class
+ */
+define([ "dojo/_base/declare",
+    "dijit/_WidgetBase",
+    "dijit/_TemplatedMixin",
     "dijit/_WidgetsInTemplateMixin",
-    "me/core/main_widgets/EnmeMainLayoutWidget", "me/core/enme",
+    "me/core/main_widgets/EnmeMainLayoutWidget",
+    "me/core/enme",
     "dojo/text!me/web/widget/ui/templates/more.html" ], function(declare,
     _WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin, main_widget,
     _ENME, template) {