Roo/Resizable.js
[roojs1] / roojs-core-debug.js
index 022a2f4..5d578b5 100644 (file)
@@ -120,7 +120,7 @@ Roo.apply = function(o, c, defaults){
         BLANK_IMAGE_URL : "http:/"+"/localhost/s.gif",
 
         emptyFn : function(){},
-
+        
         /**
          * Copies all the properties of config to obj if they don't already exist.
          * @param {Object} obj The receiver of the properties
@@ -9554,7 +9554,28 @@ if(opt.anim.isAnimated()){
         } : function(ns, name){
             var d = this.dom;
             return d.getAttributeNS(ns, name) || d.getAttribute(ns+":"+name) || d.getAttribute(name) || d[name];
+        },
+        
+        
+        /**
+         * Sets or Returns the value the dom attribute value
+         * @param {String} name The attribute name
+         * @param {String} value (optional) The value to set the attribute to
+         * @return {String} The attribute value
+         */
+        attr : function(name){
+            if (arguments.length > 1) {
+                this.dom.setAttribute(name, arguments[1]);
+                return arguments[1];
+            }
+            if (!this.dom.hasAttribute(name)) {
+                return undefined;
+            }
+            return this.dom.getAttribute(name);
         }
+        
+        
+        
     };
 
     var ep = El.prototype;
@@ -12172,15 +12193,20 @@ Roo.extend(Roo.DomTemplate, Roo.Template, {
         
         // covert the html into DOM...
         var doc = false;
+        var div =false;
         try {
             doc = document.implementation.createHTMLDocument("");
+            doc.documentElement.innerHTML =   this.html  ;
+            div = doc.documentElement;
         } catch (e) {
-            // old IE...
-            doc = new ActiveXObject("htmlfile");
+            // old IE... - nasty -- it causes all sorts of issues.. with
+            // images getting pulled from server..
+            div = document.createElement('div');
+            div.innerHTML = this.html;
         }
         //doc.documentElement.innerHTML = htmlBody
-        var div = doc.documentElement;
-        div.innerHTML =   this.html  ;
+         
+        
         
         this.tpls = [];
         var _t = this;
@@ -12400,7 +12426,7 @@ Roo.extend(Roo.DomTemplate, Roo.Template, {
                 return "'"+ sep +   udef_st   +    format + name + args + "))"+sep+"'";
             }
              
-            if (args.length) {
+            if (args && args.length) {
                 // called with xxyx.yuu:(test,test)
                 // change to ()
                 return "'"+ sep + udef_st  + name + '(' +  args + "))"+sep+"'";