OSDN Git Service

Version 0.6.30, bugfix.
[pettanr/clientJs.git] / 0.6.x / js / dom / 11_XDomNode.js
index d2d22c6..c5a562c 100644 (file)
@@ -357,11 +357,11 @@ Node.prototype.append = function( v ){
                                //} else {\r
                                        \r
                                //};\r
-                       } else\r
-                       if( ( i = Node._reserveRemoval.indexOf( v ) ) !== -1 ){\r
-                               if( !this._state ) alert( 'xnode already destroyed!' );\r
-                               Node._reserveRemoval.splice( i, 1 );\r
-                       };\r
+                       };// else\r
+                       //if( ( i = Node._reserveRemoval.indexOf( v ) ) !== -1 ){\r
+                       //      if( !this._state ) alert( 'xnode already destroyed!' );\r
+                       //      Node._reserveRemoval.splice( i, 1 );\r
+                       //};\r
                        break;\r
                default :\r
                        return this;\r
@@ -421,11 +421,11 @@ Node.prototype.appendAt = function( start, v ){
                                //} else {\r
                                        \r
                                //};\r
-                       } else\r
-                       if( ( i = Node._reserveRemoval.indexOf( v ) ) !== -1 ){\r
-                               if( !this._state ) alert( 'xnode already destroyed!' );\r
-                               Node._reserveRemoval.splice( i, 1 );\r
-                       };\r
+                       };// else\r
+                       //if( ( i = Node._reserveRemoval.indexOf( v ) ) !== -1 ){\r
+                       //      if( !this._state ) alert( 'xnode already destroyed!' );\r
+                       //      Node._reserveRemoval.splice( i, 1 );\r
+                       //};\r
                        break;\r
                default :\r
                        return this;\r
@@ -720,7 +720,7 @@ Node.prototype.hasClass = function( v ){
 Node._outerFlag = null;\r
 \r
 Node.prototype.html = function( html ){\r
-       var _ = '', xnodes, n, i, l;\r
+       var _ = '', q = '"', xnodes, n, i, l;\r
        // setter\r
        if( X.Type.isString( html ) ){\r
                if( this._xnodeType === 3 ) return this.text( html );\r
@@ -737,10 +737,10 @@ Node.prototype.html = function( html ){
        };\r
        html = !Node._outerFlag ? [] : [\r
                '<', this._tag,\r
-               this._id ? ' id="' + this._id + '"' : _,\r
-               this._className ? ' class="' + this._className + '"' : _,\r
+               this._id ? ' id="' + this._id + q : _,\r
+               this._className ? ' class="' + this._className + q : _,\r
                this._attrText || ( this._attrText = X.Dom.Attr.objToAttrText( this._attrs ) ),\r
-               this._cssText ? ' style="' + this._cssText + '"' : _,\r
+               this._cssText ? ' style="' + this._cssText + q : _,\r
        '>' ];\r
        \r
        n = html.length;\r
@@ -768,7 +768,8 @@ Node.prototype.text = function( text ){
                        };\r
                        return this;\r
                };\r
-               text ? this.empty().createText( text ) : this.empty();\r
+               if( !text ) return this.empty();\r
+               this.empty().createText( text );\r
                return this;\r
        };\r
        // getter\r
@@ -820,7 +821,6 @@ Node.prototype._startUpdate = function(){
                return;\r
        };\r
 \r
-\r
        X.Dom._listeners && X.Dom._listeners[ X.Dom.Event.BEFORE_UPDATE ] && X.Dom.dispatch( { type : X.Dom.Event.BEFORE_UPDATE } );\r
 \r
        removal = Node._reserveRemoval;\r
@@ -837,7 +837,7 @@ Node.prototype._startUpdate = function(){
                removal.length = 0;             \r
        };\r
        \r
-       this._commitUpdate();\r
+       Node._html._dirty ? Node._html._commitUpdate() : this._commitUpdate();\r
        \r
        X.Dom._listeners && X.Dom._listeners[ X.Dom.Event.AFTER_UPDATE ] && X.Dom.dispatch( { type : X.Dom.Event.AFTER_UPDATE } );\r
        //this._rawNode.style.visibility = tmp;\r
@@ -949,7 +949,7 @@ Node.prototype._updateRawNode =
                        };\r
                        // className\r
                        if( this._dirty & X.Dom.Dirty.CLASSNAME ){\r
-                               if( X.UA.IE && X.UA.IE < 7 ){\r
+                               if( X.UA.IE && X.UA.IE < 8 ){\r
                                        elm.className = this._className;\r
                                        // ie5 only\r
                                        if( X.Dom.State.IE5_DISPLAY_NONE_FIX && elm.currentStyle.display === 'none' ){\r
@@ -1184,7 +1184,7 @@ Node.prototype._afterActualCreate =
                                elm.style.filter = X.Dom.Style.SPECIAL_FIX( this._css );\r
                                delete this._dirty;\r
                        };\r
-                       this._restoreEvent();// イベントの復帰\r
+                       \r
                        delete this._isNew;\r
                } else {\r
                        this._dirty && this._updateRawNode( elm );\r
@@ -1196,7 +1196,7 @@ Node.prototype._afterActualCreate =
                        };\r
                };\r
                \r
-               return this;\r
+               this._restoreEvent();// イベントの復帰\r
        }) :\r
        document.all ? (function(){\r
                var xnodes, i;\r
@@ -1209,11 +1209,12 @@ Node.prototype._afterActualCreate =
                                xnodes[ --i ]._afterActualCreate();\r
                        };\r
                };\r
+               // textarea への value の適用はここで\r
                if( this._dirty & X.Dom.Dirty.IE_FILTER ){\r
                        this._ie4getRawNode().style.filter = X.Dom.Style.SPECIAL_FIX( this._css );\r
                };\r
                delete this._dirty;\r
-               return this._restoreEvent();// イベントの復帰\r
+               this._restoreEvent();// イベントの復帰\r
        }) :\r
        (function(){});\r
 \r