fix caption on hidden figures
[roojs1] / roojs-core-debug.js
index 040021f..c899eea 100644 (file)
@@ -505,15 +505,18 @@ Roo.factory(conf, Roo.data);
             return s.replace(/([.*+?^${}()|[\]\/\\])/g, "\\$1");
         },
 
-        // internal
-        callback : function(cb, scope, args, delay){
-            if(typeof cb == "function"){
-                if(delay){
-                    cb.defer(delay, scope, args || []);
-                }else{
-                    cb.apply(scope, args || []);
-                }
+        // internal (non-delayed, will get a return value..)
+        callback : function(cb, scope, args, delay)
+               {
+            if(typeof cb != "function"){
+                               return false;
+                       }
+                       if(delay){
+                               cb.defer(delay, scope, args || []);
+                               return false
             }
+                       return cb.apply(scope, args || []);
+
         },
 
         /**
@@ -1205,9 +1208,8 @@ document.write(dt.format(Date.patterns.ShortDate));
 /**
  Returns the number of milliseconds between this date and date
  @param {Date} date (optional) Defaults to now
- @param {Date} date (optional) Defaults to now
- @param {String} interval   A valid date interval enum value (eg. Date.DAY)
- @return {Number} The diff in milliseconds
+ @param {String} interval (optional) Default Date.MILLI, A valid date interval enum value (eg. Date.DAY) 
+ @return {Number} The diff in milliseconds or units of interval
  @member Date getElapsed
  */
 Date.prototype.getElapsed = function(date, interval)
@@ -1219,11 +1221,11 @@ Date.prototype.getElapsed = function(date, interval)
         case  Date.SECOND:
             return Math.floor(ret / (1000));
         case  Date.MINUTE:
-            return Math.floor(ret / (100*60));
+            return Math.floor(ret / (1000*60));
         case  Date.HOUR:
-            return Math.floor(ret / (100*60*60));
+            return Math.floor(ret / (1000*60*60));
         case  Date.DAY:
-            return Math.floor(ret / (100*60*60*24));
+            return Math.floor(ret / (1000*60*60*24));
         case  Date.MONTH: // this does not give exact number...??
             return ((date.format("Y") - this.format("Y")) * 12) + (date.format("m") - this.format("m"));
         case  Date.YEAR: // this does not give exact number...??
@@ -5514,7 +5516,7 @@ Roo.DomHelper = function(){
         if (typeof(o) == 'string') {
             return parentNode.appendChild(document.createTextNode(o));
         }
-        o.tag = o.tag || div;
+        o.tag = o.tag || 'div';
         if (o.ns && Roo.isIE) {
             ns = false;
             o.tag = o.ns + ':' + o.tag;
@@ -16993,6 +16995,13 @@ Roo.extend(Roo.Component, Roo.util.Observable, {
      */
     actionMode : "el",
 
+        /**
+     * @cfg {String} style
+     * css styles to add to component
+     * eg. text-align:right;
+     */
+    style : false,
+       
     /** @private */
     getActionEl : function(){
         return this[this.actionMode];