OSDN Git Service

version 0.5.29, fixed PointingDeviceEventTree.ScrollManager, peta.apps.
authoritozyun <itozyun@gmail.com>
Sat, 8 Dec 2012 14:48:36 +0000 (23:48 +0900)
committeritozyun <itozyun@gmail.com>
Sat, 8 Dec 2012 14:48:36 +0000 (23:48 +0900)
0.5.x/javascripts/peta.apps.js
0.5.x/javascripts/system.js

index 40f7a5f..cebdf95 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * pettanR peta.apps.js
- *   version 0.5.28
+ *   version 0.5.29
  *   
  * author:
  *   itozyun
@@ -28,7 +28,7 @@
                                _data.state = Const.FILE.STATE.OK;
                                
                                if( Type.isArray( _json ) === true ){
-                                       for( var i=0, l = _json.length; i<l; ++i ){
+                                       for( var i = 0, l = _json.length; i < l; ++i ){
                                                buildFileData( _json[ i ], _data );
                                        };
                                } else
@@ -2235,12 +2235,14 @@ var Editor = gOS.registerApplication( function(){
                var onHelpLoad = function( _xml ){
                        var jqXML          = $( _xml ),
                                helpTitle      = jqXML.find( 'pages' ).eq( 0 ).attr( 'title' ),
+                               elmRoot        = document.createElement( 'div' ),
                                elmNavi        = document.createElement( 'div' ),
                                elmItemOrigin  = document.createElement( 'a' ),
                                elmPages       = document.createElement( 'div' ),
                                elmPageOrigin  = document.createElement( 'div' ),
                                elmTitleOrigin = document.createElement( 'h2' ),
                                elmPage;
+                       elmRoot.className       = 'multi-page-container clearfix';
                        elmNavi.className       = 'sidenavi';
                        elmItemOrigin.className = 'sidenavi-item';
                        elmItemOrigin.href      = '#';
@@ -2276,8 +2278,9 @@ var Editor = gOS.registerApplication( function(){
                                MENU_BAR_CONTROL.HELP.createOption( title, null, onSelectionClick, true );
                                ++numPage;
                        });
-                       
-                       jqAjaxContents.removeClass( 'loading' ).append( elmNavi, elmPages );
+                       elmRoot.appendChild( elmNavi );
+                       elmRoot.appendChild( elmPages );
+                       jqAjaxContents.removeClass( 'loading' ).append( elmRoot );
                        
                        jqNaviItems = jqAjaxContents.find( 'a.' + elmItemOrigin.className ).click( onNaviClick );
                        jqPages     = jqAjaxContents.find( '.page-content' );
@@ -2966,7 +2969,7 @@ var Editor = gOS.registerApplication( function(){
                                                baseW    = _w;
                                                baseH    = _h = _memoryY -_y;
                                                flip( false, true);
-                                               flipH    = currentElement.flipH();
+                                               flipH    = currentElement.flipH;
                                        } else {
                                        // flipVH
                                                _memoryX = _x;
@@ -3492,7 +3495,6 @@ var Editor = gOS.registerApplication( function(){
                        this.resize( this.x + shiftX, this.y + shiftY );
                },
                mouseover : function( e ){
-                       console.log( 'w:' + this.node.width() + ' h:' + this.node.height() + ' x:' + this.node.x() + ' y:' + this.node.y() )
                        PanelElementOperatorManager.show( this );
                }
        };
@@ -3716,6 +3718,8 @@ var Editor = gOS.registerApplication( function(){
                                this.$.stop().remove();
                                this.balloon.destroy();
                                this.node.remove();
+                               
+                               this.destroy = null;
                        }
                }
        );
@@ -4080,7 +4084,7 @@ var Editor = gOS.registerApplication( function(){
                                        '</div>',
                                        '<div class="window-body"></div>',
                                        '<div class="window-footer">',
-                                               '<div class="window-resize-button"></div>',
+                                               '<div class="window-resize-button"></div>',
                                        '</div>',
                                '</div>',
                                
@@ -4367,10 +4371,10 @@ var ComicConsole = gOS.registerApplication( function(){
                        _optionList = _select.getElementsByTagName( 'option' )
                        if( _name === 'comic[visible]' ){
                                _select.selectedIndex = comboboxVisible.selectIndex();
-                       } else
+                       }/* else
                        if( _name === 'comic[editable]' ){
-                               // _select.selectedIndex = comboboxEditable.selectIndex();
-                       };
+                               _select.selectedIndex = comboboxEditable.selectIndex();
+                       } */;
                };
                app.submit();
        };
@@ -4471,10 +4475,10 @@ var ComicConsole = gOS.registerApplication( function(){
                                option = optionList[ j ];
                                if( select.name === 'comic[visible]' ){
                                        comboboxVisible.createOption( option.innerHTML, option.value, option.selected );
-                               } else
+                               }/* else
                                if( select.name === 'comic[editable]' ){
-                                       // comboboxEditable.createOption( option.innerHTML, option.value, option.selected );
-                               };
+                                       comboboxEditable.createOption( option.innerHTML, option.value, option.selected );
+                               }*/;
                        };
                };
                inputTitle.focus();
@@ -4482,7 +4486,6 @@ var ComicConsole = gOS.registerApplication( function(){
                //node.mesure();
                app.onPaneResize( windowW, windowH );
                
-               
                delete app.onFoemReady;
        };
        this.submitError = function(){
@@ -4495,6 +4498,7 @@ var ComicConsole = gOS.registerApplication( function(){
 
 var UploadConsole = gOS.registerApplication( function(){
        var windowW, windowH,
+               eventRoot, node,
                buttonSubmit, buttonCancel,
                elmFile,
                app = this;
@@ -4531,6 +4535,8 @@ var UploadConsole = gOS.registerApplication( function(){
                
                app.fetchCSS( pettanr.CONST.URL_PETA_APPS_CSS );
                
+               eventRoot = app.getPointingDeviceEventTreeRoot();
+               
                delete app.onInit;
        };
        this.elmProgressID   = 'upload-console-progress';
@@ -4540,8 +4546,6 @@ var UploadConsole = gOS.registerApplication( function(){
        this.hideUploader    = false;
        FormApplicationHelper( this );
        this.onFormReady     = function(){
-               app.onPaneResize( windowW, windowH );
-
                var _inputList = app.elmForm.getElementsByTagName( 'input' ),
                        _input;
                for( var i = _inputList.length; i; ){
@@ -4553,6 +4557,9 @@ var UploadConsole = gOS.registerApplication( function(){
                                _input.style.display = 'none';
                        };
                };
+               node.mesure();
+               app.onPaneResize( windowW, windowH );
+               node.mesureChildren();
                delete app.onFoemReady;
        };
        this.submitError = function(){
@@ -4562,20 +4569,23 @@ var UploadConsole = gOS.registerApplication( function(){
                app.addTimer( clickCancel , 5000, true );
        };
        this.onOpen = function( w, h ){
-               var ui           = app.createUIGroup();
-               buttonSubmit     = ui.createButton( document.getElementById( 'upload-console-post-button'), clickOK );
-               buttonCancel     = ui.createButton( document.getElementById( 'upload-console-cancel-button'), clickCancel );
+               node             = eventRoot.createNode( app.rootElement, true, true );
+               var ui           = app.createUIGroup( node );
+               
+               buttonSubmit     = ui.createButton( document.getElementById( 'upload-console-post-button' ), clickOK );
+               buttonCancel     = ui.createButton( document.getElementById( 'upload-console-cancel-button' ), clickCancel );
 
                app.onPaneResize( w, h );
                app.fetchScript();
        };
-       this.onPaneResize = function( _windowW, _windowH){
-               windowW = _windowW;
-               windowH = _windowH;
-               app.rootElement.style.cssText = [
-                       'left:', Math.floor( ( _windowW - app.rootElement.offsetWidth  ) /2 ), 'px;',
-                       'top:',  Math.floor( ( _windowH - app.rootElement.offsetHeight ) /2 ), 'px;'
-               ].join( '' );
+       this.onPaneResize = function( w, h ){
+               windowW = w;
+               windowH = h;
+               //app.rootElement.style.cssText = [
+               //      'left:', Math.floor( ( _w - app.rootElement.offsetWidth  ) /2 ), 'px;',
+               //      'top:',  Math.floor( ( _h- app.rootElement.offsetHeight ) /2 ), 'px;'
+               //].join( '' );
+               node.update( w / 2 - node.width() / 2, h / 2 - node.height() / 2 );
        };
        this.onClose = function(){
                app.destroyHelper();
@@ -4585,11 +4595,15 @@ var UploadConsole = gOS.registerApplication( function(){
 
 var ArtistConsole = gOS.registerApplication( function(){
        var windowW, windowH,
+               eventRoot, node,
+               elmName, elmLicense,
+               inputName, inputLicense,
                buttonSubmit, buttonCancel,
                app = this;
 
        function clickOK(){
                if( !app.elmForm || !app.elmIframe || app.isUploading === true ) return false;
+               inputUpdate();
                app.submit();
                return false;
        };
@@ -4598,6 +4612,10 @@ var ArtistConsole = gOS.registerApplication( function(){
                ArtistConsole.shutdown();
                return false;
        };
+       function inputUpdate( v ){
+               elmName.value    = inputName.value();
+               elmLicense.value = inputLicense.value();
+       };
 
        /* grobal method */
        this.MIN_WIDTH   = 320;
@@ -4608,16 +4626,25 @@ var ArtistConsole = gOS.registerApplication( function(){
                app.rootElement.innerHTML = [
                        '<div id="artist-console-header" class="console-header">Register Artist</div>',
                        '<div id="artist-console" class="console-inner">',
-                               '<div id="register"></div>',
+                               '<div id="artist-console-name" class="field">',
+                                       '<span class="field-label">Name:</span>',
+                                       '<span id="artist-console-name-value" class="comic-console-value editable-value">artist name here.</span>',
+                               '</div>',
+                               '<div id="artist-console-license" class="field">',
+                                       '<span class="field-label">License:</span>',
+                                       '<span id="artist-console-license-value" class="comic-console-value editable-value">license here.</span>',
+                               '</div>',
                                '<div class="console-button-container">',
                                        '<div id="artist-console-post-button" class="button console-submit-button">register</div>',
                                        '<div id="artist-console-cancel-button" class="button console-cancel-button">cancel</div>',
                                '</div>',
                                '<div id="artist-console-progress" class="console-progress">&nbsp;</div>',
+                               '<div id="register" style="display:none;"></div>',
                        '</div>'
                ].join( '' );
                
                app.fetchCSS( pettanr.CONST.URL_PETA_APPS_CSS );
+               eventRoot = app.getPointingDeviceEventTreeRoot();
                
                delete app.onInit;
        };
@@ -4628,8 +4655,6 @@ var ArtistConsole = gOS.registerApplication( function(){
        this.hideUploader    = false;
        FormApplicationHelper( this );
        this.onFormReady     = function(){
-               app.onPaneResize( windowW, windowH );
-
                var _inputList = app.elmForm.getElementsByTagName( 'input' ),
                        _input;
                for( var i = _inputList.length; i; ){
@@ -4637,7 +4662,18 @@ var ArtistConsole = gOS.registerApplication( function(){
                        if( _input.type === 'submit' ){
                                _input.style.display = 'none';
                        };
+                       if( _input.name === 'artist[name]' ){
+                               elmName = _input;
+                       };
+                       if( _input.name === 'artist[default_license_id]' ){
+                               elmLicense = _input;
+                       };
                };
+               
+               node.mesure();
+               app.onPaneResize( windowW, windowH );
+               node.mesureChildren();
+               
                delete app.onFoemReady;
        };
        this.submitError = function(){
@@ -4647,20 +4683,25 @@ var ArtistConsole = gOS.registerApplication( function(){
                app.addTimer( clickCancel , 5000, true );
        };
        this.onOpen = function( w, h ){
-               var ui           = app.createUIGroup();
-               buttonSubmit     = ui.createButton( document.getElementById( 'artist-console-post-button'), clickOK );
-               buttonCancel     = ui.createButton( document.getElementById( 'artist-console-cancel-button'), clickCancel );
+               node             = eventRoot.createNode( app.rootElement, true, true );
+               var ui           = app.createUIGroup( node );
+               
+               inputName        = ui.createInputText( document.getElementById( 'artist-console-name' ), inputUpdate );
+               inputLicense     = ui.createInputText( document.getElementById( 'artist-console-license' ), inputUpdate );
+               buttonSubmit     = ui.createButton( document.getElementById( 'artist-console-post-button' ), clickOK );
+               buttonCancel     = ui.createButton( document.getElementById( 'artist-console-cancel-button' ), clickCancel );
 
                app.onPaneResize( w, h );
                app.fetchScript();
        };
-       this.onPaneResize = function( _windowW, _windowH ){
-               windowW = _windowW;
-               windowH = _windowH;
-               app.rootElement.style.cssText = [
-                       'left:', Math.floor( ( _windowW - app.rootElement.offsetWidth  ) /2 ), 'px;',
-                       'top:',  Math.floor( ( _windowH - app.rootElement.offsetHeight ) /2 ), 'px;'
-               ].join( '' );
+       this.onPaneResize = function( w, h ){
+               windowW = w;
+               windowH = h;
+               //app.rootElement.style.cssText = [
+               //      'left:', Math.floor( ( _w - app.rootElement.offsetWidth  ) /2 ), 'px;',
+               //      'top:',  Math.floor( ( _h- app.rootElement.offsetHeight ) /2 ), 'px;'
+               //].join( '' );
+               node.update( w / 2 - node.width() / 2, h / 2 - node.height() / 2 );
        };
        this.onClose = function(){
                app.destroyHelper();
@@ -4668,6 +4709,139 @@ var ArtistConsole = gOS.registerApplication( function(){
        };
 }, true, true, 'Artist Console', 'artistConsole', null, '#FFC40D' );
 
+var PanelConsole = gOS.registerApplication( function(){
+       var windowW, windowH,
+               eventRoot, node, inputData,
+               comboboxPublish, buttonPost, buttonClose,
+               elmInput,
+               app         = this,
+               model       = null;
+               
+       /*
+        * upload ボタンが押されたらまず iframe をつくる.
+        */
+       function clickOK(){
+               if( !app.elmForm || !app.elmIframe || app.isUploading === true ) return false;
+               inputData.value();
+               app.submit();
+               return false;
+       }
+
+       function clickCancel(){
+               if( app.isUploading === true ) return false;
+               PanelConsole.shutdown();
+               return false;
+       };
+       function publishUpdate(){
+               if( model ){
+                       model.publish( comboboxPublish.selectIndex() === 1 );
+                       elmInput.value = model.getJsonPostString().replace( /\n/g, '' );
+                       inputData.value( elmInput.value );              
+               } else {
+                       elmInput.value = inputData.value();
+               };
+       };
+
+       /* grobal method */
+       this.MIN_WIDTH   = 320;
+       this.MIN_HEIGHT  = 320;
+       this.onInit = function(){
+               app.rootElement.id = 'panel-console-wrapper';
+               app.rootElement.className = 'console-wrapper';
+               app.rootElement.innerHTML = [
+                       '<div id="panel-console-header" class="console-header">Create New Panel (dev)</div>',
+                       '<div id="panel-console" class="console-inner">',
+                               '<div id="panel-console-data" class="field">',
+                                       '<span class="field-label">POST DATA:</span>',
+                                       '<span id="panel-console-data-value" class="comic-console-value editable-value">panel json here.</span>',
+                               '</div>',
+                               '<div id="panel-console-publish" class="field">',
+                                       '<span class="field-label">Publish:</span>',
+                                       '<span id="panel-console-publish-value" class="combobox"></span>',
+                               '</div>',
+                               '<div class="console-button-container">',
+                                       '<div id="panel-console-post-button" class="button console-submit-button">post</div>',
+                                       '<div id="panel-console-cancel-button" class="button console-cancel-button">cancel</div>',
+                               '</div>',
+                               '<div id="panel-console-progress" class="console-progress">&nbsp;</div>',
+                               '<div id="newpanel" style="display:none;"></div>',
+                       '</div>'
+               ].join( '' );
+
+               app.fetchCSS( pettanr.CONST.URL_PETA_APPS_CSS );
+               eventRoot = app.getPointingDeviceEventTreeRoot();
+
+               delete app.onInit;
+       };
+       this.elmProgressID   = 'panel-console-progress';
+       this.elmUploaderID   = 'newpanel';
+       this.elmIframeName   = 'targetFrameNewPanel'
+       this.scriptSrc       = pettanr.CONST.CREATE_PANEL_JS;
+       this.hideUploader    = false;
+       FormApplicationHelper( this );
+       this.onFormReady     = function(){
+               var _inputList = app.elmForm.getElementsByTagName( 'input' ),
+                       _input;
+               for( var i = _inputList.length; i; ){
+                       _input = _inputList[ --i ];
+                       if( _input.type === 'submit' ){
+                               _input.style.display = 'none';
+                       };
+                       if( _input.name === 'json' ){
+                               elmInput     = _input;
+                               publishUpdate();
+                       };
+               };
+               
+               node.mesure();
+               app.onPaneResize( windowW, windowH );
+               node.mesureChildren();
+               
+               delete app.onFoemReady;
+       };
+       this.submitError = function(){
+               app.addTimer( clickCancel , 5000, true );
+       };
+       this.submitSuccess = function(){
+               app.addTimer( clickCancel , 5000, true );
+       };
+       this.onOpen = function( w, h, _model ){
+               node    = eventRoot.createNode( app.rootElement, true, true );
+               var ui  = app.createUIGroup( node ),
+                       elm = document.getElementById( 'panel-console-publish' );
+                       
+               inputData        = ui.createInputText( document.getElementById( 'panel-console-data' ), publishUpdate );
+               
+               if( _model ){
+                       comboboxPublish = ui.createCombobox( elm, publishUpdate );
+                       comboboxPublish.createOption( 'only me', '0', _model.publish() === false );
+                       comboboxPublish.createOption( 'publish', '1', _model.publish() === true );
+                       model = _model;
+               } else {
+                       elm.parentNode.removeChild( elm );
+               };
+               
+               buttonPost       = ui.createButton( document.getElementById( 'panel-console-post-button' ), clickOK );
+               buttonClose      = ui.createButton( document.getElementById( 'panel-console-cancel-button' ), clickCancel );
+               
+               app.onPaneResize( w, h );
+               app.fetchScript();
+       };
+       this.onPaneResize = function( w, h ){
+               windowW = w;
+               windowH = h;
+               //app.rootElement.style.cssText = [
+               //      'left:', Math.floor( ( _w - app.rootElement.offsetWidth  ) /2 ), 'px;',
+               //      'top:',  Math.floor( ( _h- app.rootElement.offsetHeight ) /2 ), 'px;'
+               //].join( '' );
+               node.update( w / 2 - node.width() / 2, h / 2 - node.height() / 2 );
+       };
+       this.onClose = function(){
+               app.destroyHelper();
+               model && model.destroy();
+               app = model = comboboxPublish = buttonPost = buttonClose = elmInput = null;
+       };
+}, true, true, 'Panel Console', 'panelConsole', null, '#603CBA' );
 
 var Model = ( function(){
        
@@ -5030,123 +5204,4 @@ var OutputConsole = gOS.registerApplication( function(){
        };
 }, true, false, 'Output Console', 'outputConsole', null, '#2D89F0' );
 
-
-var PanelConsole = gOS.registerApplication( function(){
-       var windowW, windowH,
-               comboboxPublish, buttonPost, buttonClose,
-               elmInput,
-               app         = this,
-               model       = null;
-               
-       /*
-        * upload ボタンが押されたらまず iframe をつくる.
-        */
-       function clickOK(){
-               if( !app.elmForm || !app.elmIframe || app.isUploading === true ) return false;
-               app.submit();
-               return false;
-       }
-
-       function clickCancel(){
-               if( app.isUploading === true ) return false;
-               PanelConsole.shutdown();
-               return false;
-       };
-       function publishUpdate(){
-               if( model ){
-                       model.publish( comboboxPublish.selectIndex() === 1 );
-                       elmInput.value = model.getJsonPostString().replace( /\n/g, '' );                        
-               };
-       };
-
-       /* grobal method */
-       this.MIN_WIDTH   = 320;
-       this.MIN_HEIGHT  = 320;
-       this.onInit = function(){
-               app.rootElement.id = 'panel-console-wrapper';
-               app.rootElement.className = 'console-wrapper';
-               app.rootElement.innerHTML = [
-                       '<div id="panel-console-header" class="console-header">Create New Panel (dev)</div>',
-                       '<div id="panel-console" class="console-inner">',
-                               '<div id="newpanel"></div>',
-                               '<div id="panel-console-publish" class="field">',
-                                       '<span class="field-label">Publish:</span>',
-                                       '<span id="panel-console-publish-value" class="combobox"></span>',
-                               '</div>',
-                               '<div class="console-button-container">',
-                                       '<div id="panel-console-post-button" class="button console-submit-button">post</div>',
-                                       '<div id="panel-console-cancel-button" class="button console-cancel-button">cancel</div>',
-                               '</div>',
-                               '<div id="panel-console-progress" class="console-progress">&nbsp;</div>',
-                       '</div>'
-               ].join( '' );
-
-               app.fetchCSS( pettanr.CONST.URL_PETA_APPS_CSS );
-
-               delete app.onInit;
-       };
-       this.elmProgressID   = 'panel-console-progress';
-       this.elmUploaderID   = 'newpanel';
-       this.elmIframeName   = 'targetFrameNewPanel'
-       this.scriptSrc       = pettanr.CONST.CREATE_PANEL_JS;
-       this.hideUploader    = false;
-       FormApplicationHelper( this );
-       this.onFormReady     = function(){
-               app.onPaneResize( windowW, windowH );
-
-               var _inputList = app.elmForm.getElementsByTagName( 'input' ),
-                       _input;
-               for( var i = _inputList.length; i; ){
-                       _input = _inputList[ --i ];
-                       if( _input.type === 'submit' ){
-                               _input.style.display = 'none';
-                       };
-                       if( _input.name === 'json' ){
-                               elmInput     = _input;
-                               publishUpdate();
-                       };
-               };
-               
-               delete app.onFoemReady;
-       };
-       this.submitError = function(){
-               app.addTimer( clickCancel , 5000, true );
-       };
-       this.submitSuccess = function(){
-               app.addTimer( clickCancel , 5000, true );
-       };
-       this.onOpen = function( w, h, _model ){
-               var ui  = app.createUIGroup(),
-                       elm = document.getElementById( 'panel-console-publish' );
-               if( _model ){
-                       comboboxPublish  = ui.createCombobox( elm, publishUpdate );
-                       comboboxPublish.createOption( 'only me', '0', _model.publish() === false );
-                       comboboxPublish.createOption( 'publish', '1', _model.publish() === true );
-                       model = _model;
-               } else {
-                       elm.parentNode.removeChild( elm );
-               };
-               
-               buttonPost       = ui.createButton( document.getElementById( 'panel-console-post-button' ), clickOK );
-               buttonClose      = ui.createButton( document.getElementById( 'panel-console-cancel-button' ), clickCancel );
-               
-               app.onPaneResize( w, h );
-               app.fetchScript();
-       };
-       this.onPaneResize = function( _windowW, _windowH ){
-               windowW = _windowW;
-               windowH = _windowH;
-               app.rootElement.style.cssText = [
-                       'left:', Math.floor( ( _windowW - app.rootElement.offsetWidth  ) /2 ), 'px;',
-                       'top:',  Math.floor( ( _windowH - app.rootElement.offsetHeight ) /2 ), 'px;'
-               ].join( '' );
-       };
-       this.onClose = function(){
-               app.destroyHelper();
-               model && model.destroy();
-               app = model = comboboxPublish = buttonPost = buttonClose = elmInput = null;
-       };
-}, true, true, 'Panel Console', 'panelConsole', null, '#603CBA' );
-
-
 })( pettanr, gOS, window, document );
index a33b501..4ffdd4b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * pettanR system.js
- *   version 0.5.28
+ *   version 0.5.29
  *
  * gadgetOS
  *   author:
                }
        };
 
-var EX = ( function(){
-       var F = new Function();
-       
+var Class = ( function(){
        function clone( src ){
                var ret;
                if( Type.isArray(src) === true ){
@@ -133,26 +131,35 @@ var EX = ( function(){
                return ret;
        };
        
+       function extend(){
+               
+       };
+       
+       var f = true;
+       var c = Util.copyArray;
+       
+       function I(){
+               var klass = this;
+               f = false;
+               var instance = klass.pool.shift() || new klass();
+               f = true;
+               instance.init.apply( instance, c( arguments ) );
+               klass.live.push( instance );
+               return instance;
+       };
+       
        return {
-               extend: function( base, extend ){
-                       F.prototype = base;
-                       var ret = new F;
-                       for( var p in extend ){
-                               ret[ p ] = extend[ p ];
+               create : function( def, final, pool, abstract ){
+                       var klass = function(){
+                               var a = arguments;
+                               if( f ) return I.apply( a.collee, c( a ) );
                        };
-                       return ret;
-               },
-               clone: function( obj ){
-                       return clone( obj );
-               },
-               kill: function(){
-                       var self = this, v;
-                       for( var p in s ){
-                               if( self.hasOwnProperty && !self.hasOwnProperty( p ) ) continue;
-                               v = self[ p ];
-                               v && v instanceof TicketBase && self.kill();
-                               delete self[ p ];
-                       }
+                       klass.prototype = def;
+                       if( pool === true ){
+                               klass.pool = [];
+                               klass.live = [];
+                       };
+                       return klass;
                }
        }
 })();
@@ -1499,7 +1506,7 @@ var PointingDeviceEventTree = ( function(){
                                this.hoverClass = hover;
                                this.scroll     = clip && scroll;                               
                                this.mesure();
-                               this.scroll === true && this.addEventListener( 'mouseover', this.onScrollReady, this );
+                               this.scroll === true && ScrollBarManager.register( this );
                        } else {
                                this.update( rangeOrElm.x, rangeOrElm.y, rangeOrElm.w, rangeOrElm.h );
                        };
@@ -1520,7 +1527,6 @@ var PointingDeviceEventTree = ( function(){
                                        this.y = y;
                                        this.w = w;
                                        this.h = h;
-                                       console.log( ' ---- mesure' + this.elm.id + ' x:' + this.x + ' y:' + this.y + ' w:' + w + ' h:' + h )
                                        parent = this.parentData;
                                        parent && this._updateAbsoluteXY( parent.absoluteX, parent.absoluteY, parent.scrollingX, parent.scrollingY );
                                        this._updateRectangle();
@@ -1658,6 +1664,7 @@ var PointingDeviceEventTree = ( function(){
                                // this.w = r - x;
                                // this.h = b - y;
                                this.parentData && this.parentData.clip === false && this.parentData._updateRectangle();
+                               return true;
                        };
                },
                setPosition : function( x, y ){
@@ -1800,24 +1807,6 @@ var PointingDeviceEventTree = ( function(){
                        };
                        forceNodeData  = null;
                },
-               onScrollReady : function( e ){
-                       ScrollBarManager.show( this );
-               },
-               onMouseWheelScroll : function( e ){
-                       this._scrollY += e.wheelDelta;
-                       ScrollBarManager.update( this );
-                       //return true;
-               },
-               onMouseDragScroll : function( e ){
-                       //e.dragOffsetY;
-                       this._scrollY = this.scrollStartY + e.dragOffsetY;
-                       ScrollBarManager.update( this );
-                       this.scrollStartY = this._scrollY;
-                       return true;
-               },
-               onScrollComplete : function( e ){
-                       ScrollBarManager.hide( this );
-               },
                scrollTo : function( x, y ){
                        this._scrollX = x;
                        this._scrollY = y;
@@ -1930,7 +1919,7 @@ var PointingDeviceEventTree = ( function(){
                this.node    = node;
                this.type    = eventType;
                this.handler = handler;
-               this.thisObj = opt_thisObject;
+               this.thisObj = opt_thisObject || node;
        };
        EventTicketClass.prototype = {
                match : function( eventType, handler ){
@@ -1949,22 +1938,22 @@ var PointingDeviceEventTree = ( function(){
                fire : ( function(){
                        if( Function.prototype.call ){
                                return function( e ){
-                                       return this.handler.call( this.thisObj || this.node, e );
+                                       return this.handler.call( this.thisObj, e );
                                };                              
                        };
                        return function( e ){
-                               var thisObj = this.thisObj || this.node,
-                                       ret;
-                               thisObj._currentHandler = this.handler;
-                               ret = thisObj._currentHandler( e );
-                               delete thisObj._currentHandler;
+                               var ret;
+                               this.thisObj._currentHandler = this.handler;
+                               ret = this.thisObj._currentHandler( e );
+                               delete this.thisObj._currentHandler;
                                return ret;                                     
                        };
                })()
        };
        
        var ScrollBarManager = ( function(){
-               var elmBar          = document.createElement( 'div' ),
+               var elmScroller     = document.createElement( 'div' ),
+                       elmBar          = document.createElement( 'div' ),
                        smoothList      = [],
                        currentNodeData = null;
                
@@ -1980,8 +1969,8 @@ var PointingDeviceEventTree = ( function(){
                                        } else {
                                                y = data._scrollY < y ? data._scrollY : y;
                                        };
-                                       data.scrollingY = y;
-                                       data.elmScroller.style.top = y + 'px';
+                                       data.scrollingY    = y;
+                                       data.elm.scrollTop = -y;
                                };
                                if( data.scrollingY === data._scrollY ){
                                        list.splice( i, 1 );
@@ -1992,74 +1981,103 @@ var PointingDeviceEventTree = ( function(){
                        list.length === 0 && SystemTimer.remove( SUPER_USER_KEY, tick );
                };
                
+               function onScrollStart( e ){
+                       var data = this;
+                       if( data === currentNodeData ) return;
+                       currentNodeData && onScrollComplete();
+                       
+                       data.elm.parentNode.appendChild( elmScroller );
+                       elmScroller.appendChild( data.elm );
+                       
+                       elmScroller.style.cssText = 'position:absolute;left:0;top:0;';
+                       elmScroller.appendChild( elmBar );      
+                       
+                       data.scrollStartX  = data.scrollingX;
+                       data.scrollStartY  = data.scrollingY;
+                       data.elm.scrollTop = -data.scrollingY;
+                       data.addEventListener( 'mousewheel', onMouseWheelScroll, data );
+                       data.addEventListener( 'mousedrag',  onMouseDragScroll, data );
+                       data.addEventListener( 'mouseout',   onScrollComplete, data );
+                       currentNodeData = data;
+                       ScrollBarManager.update( data );
+               };
+               function onScrollComplete( e ){
+                       if( currentNodeData === null ) return;
+                       
+                       var data   = currentNodeData;
+                       var parent = elmScroller.parentNode;
+                       parent.appendChild( currentNodeData.elm );
+                       parent.removeChild( elmScroller );
+                       currentNodeData.elm.scrollTop = -data.scrollingY;
+                       
+                       data.removeEventListener( 'mousewheel', onMouseWheelScroll, data );
+                       data.removeEventListener( 'mousedrag',  onMouseDragScroll, data );
+                       data.removeEventListener( 'mouseout',   onScrollComplete, data );
+                       currentNodeData = null;
+               };              
+               function onMouseWheelScroll( e ){
+                       var data = this;
+                       this._scrollY += e.wheelDelta;
+                       ScrollBarManager.update( this );
+                       return true;
+               };
+               function onMouseDragScroll( e ){
+                       var data = this;
+                       //e.dragOffsetY;
+                       this._scrollY = this.scrollStartY + e.dragOffsetY;
+                       ScrollBarManager.update( this );
+                       this.scrollStartY = this._scrollY;
+                       return true;
+               };
+               
                return {
-                       show : function( data ){
-                               console.log( '############ show ' + ( currentNodeData === null ) )
-                               if( data === currentNodeData ) return;
-                               currentNodeData && ScrollBarManager.hide( currentNodeData );
-                               if( !data.elmScroller ){
-                                       data.elmScroll = data.elm.firstChild;
-                                       data.elmScroller = document.createElement( 'div' );
-                                       data.elm.appendChild( data.elmScroller );
-                                       data.elmScroller.style.cssText = 'position:absolute;top:0;left:0;width:100%;';
-                                       data.elmScroller.appendChild( data.elmScroll );
-                               };
-                               data.scrollStartX = data.scrollingX;
-                               data.scrollStartY = data.scrollingY;
-                               //data._scrollX = data.elmScroll.offsetLeft;
-                               //data._scrollY = data.elmScroll.offsetTop;
-                               data.addEventListener( 'mousewheel', data.onMouseWheelScroll, data );
-                               data.addEventListener( 'mousedrag',  data.onMouseDragScroll, data );
-                               data.addEventListener( 'mouseout',   data.onScrollComplete, data );
-                               currentNodeData = data;
-                               data.elm.appendChild( elmBar );
-                               ScrollBarManager.update( data );
+                       register : function( data ){
+                               data.addEventListener( 'mouseover', onScrollStart, data );
                        },
                        update : function( data ){
-                               //if( data !== currentNodeData ) return;
-                               if( data.elmScroll === null ) return;
-                               var contentH = data._scrollH = data.elmScroll.offsetHeight,
-                                       scrollY  = data._scrollY,
+                               if( data !== currentNodeData ) return;
+
+                               var contentH = data._scrollH = data.elm.scrollHeight,
                                        clipH    = data.h,
-                                       barH     = Math.floor( clipH * ( clipH / contentH ) ),
                                        offsetH  = contentH - clipH,
-                                       barY;
-                               if( 0 < scrollY ) scrollY  = data._scrollY = 0;
-                               if( scrollY < -offsetH ) scrollY = data._scrollY = -offsetH;
-                               barY = Math.floor( ( clipH - barH ) * -scrollY / ( contentH - clipH ) );
-                               if( contentH <= clipH ) data._scrollY = barY = barH = scrollY = 0;
-                               data.smoothY = ( data._scrollY - data.scrollingY ) / 10;
-                               elmBar.style.cssText = [
-                                       'position:absolute;',
-                                       'width:10px;',
-                                       'background-color:#333;',
-                                       'right:2px;',
-                                       'height:', barH, 'px;',
-                                       'top:', barY, 'px;'
-                               ].join( '' );
-                               if( data.scrollingY !== data._scrollY && Util.getIndex( smoothList, data ) === -1 ){
+                                       scrollY  = data._scrollY = 0 < data._scrollY ? 0 : ( data._scrollY < -offsetH ? -offsetH : data._scrollY ),
+                                       barH, barY;
+                               elmScroller.style.width  = data.w + 'px';
+                               elmScroller.style.height = clipH + 'px';                                
+                               if( offsetH < 1 ){
+                                       data._scrollY = scrollY = 0;
+                                       elmBar.style.display = 'none';
+                               } else {
+                                       barH     = Math.floor( clipH * ( clipH / contentH ) );
+                                       barY     = Math.floor( ( clipH - barH ) * - scrollY / offsetH );
+                                       elmBar.style.cssText = [
+                                               'position:absolute;',
+                                               'width:10px;',
+                                               'background-color:#333;',
+                                               'right:2px;',
+                                               'font-size:0;line-height:0;',
+                                               'height:', barH, 'px;',
+                                               'top:', data.y + barY, 'px;'
+                                       ].join( '' );                                   
+                               };
+                               data.smoothY = ( scrollY - data.scrollingY ) / 10;
+                               if( data.scrollingY !== scrollY && Util.getIndex( smoothList, data ) === -1 ){
                                        smoothList.length === 0 && SystemTimer.add( SUPER_USER_KEY, tick, 16 );
                                        smoothList.push( data );
                                };
-                       },
-                       hide : function( data ){
-                               console.log( '############ hide ' + ( currentNodeData === null ) )
-                               if( data !== currentNodeData ) return;
-                               data.removeEventListener( 'mousewheel', data.onMouseWheelScroll, data );
-                               data.removeEventListener( 'mousedrag',  data.onMouseDragScroll, data );
-                               data.removeEventListener( 'mouseout',   data.onScrollComplete, data );
-                               data.elm.removeChild( elmBar );
-                               currentNodeData = null;
                        }
                };
        })();
        
        return {
                create : function( apiuser ){
-                       var root = new NodeClass( apiuser, null, null, apiuser.rootElement ),
-                               data = NodePrivateData.get( root ),
-                               elm  = document.createElement( 'div' );
+                       var     elm  = document.createElement( 'div' ),
+                               root, data;
                        body.appendChild( elm );
+                       
+                       root = new NodeClass( apiuser, null, null, elm );
+                       data = NodePrivateData.get( root );
+                       
                        // elm.style.cssText = 'position:absolute;top:0;left:0;height:100%;';
                        elm.className      = 'mouse-operation-catcher';
                        elm.unselectable   = 'on';
@@ -2125,11 +2143,16 @@ var Application = ( function(){
                this.displayName  = displayName;
                this.thumbnailUrl = thumbnailUrl;
                this.tailColor    = tailColor;
+               
+               function asyncBoot(){
+                       application = Application.boot( appClass, displayName, self.getUID(), isOverlay, Util.copyArray( arguments ) );
+               };
+               
                this.getUID = function(){
                        return Util.getIndex( API_USER_LIST, appClass );
                };
                this.boot = function( /* _option */ ){
-                       application = Application.boot( appClass, displayName, self.getUID(), isOverlay, Util.copyArray( arguments ) );
+                       AsyncCall.add( this, asyncBoot, Util.copyArray( arguments ) );
                };
                this.shutdown = function(){
                        if( !application ) return false;
@@ -2494,6 +2517,7 @@ var Application = ( function(){
                        if( document.attachEvent ){
                                wrappedHandlerClass = function( ticket ){
                                        this.handler = function(){
+                                               if( ticket === null ) alert( window.event.type )
                                                if( ticket.fire( new wrappedEventClass( window.event, ticket.element ) ) !== false ) return;
                                                // e.preventDefault();
                                                // e.stopPropagation();
@@ -3189,7 +3213,8 @@ var KeyEvent = ( function(){
                        key            = e.keyCode, // || e.which,
                        shift          = Type.isBoolean( e.shiftKey ) === true ? e.shiftKey : ( e.modifiers & Event.SHIFT_MASK ),
                        ctrl           = Type.isBoolean( e.ctrlKey  ) === true ? e.ctrlKey  : ( e.modifiers & Event.CONTROL_MASK ),
-                       lock           = type === 'keyup' ? LOCK_UP : LOCK_DOWN;
+                       lock           = type === 'keyup' ? LOCK_UP : LOCK_DOWN,
+                       i, t;
                        
                // block chattering
                if( Util.getIndex( lock, key ) !== -1 ) return;
@@ -3202,10 +3227,13 @@ var KeyEvent = ( function(){
                if( key === 17 || ctrl === true ){
                        KeyEvent.ctrlEnabled  = type !== 'keyup';
                };
-               for( var i=currentList.length, t; t = currentList[ --i ]; ){
+               for( i = currentList.length; i; ){
+                       t = currentList[ --i ];
                        if( Type.isFunction( t[ type ] ) === true && t.keyCode === key && ( t.shift === undefined || t.shift === shift ) && ( t.ctrl === undefined || t.ctrl === ctrl )){
-                               AsyncCall.add( t.apiuser, t[ type ], e );
-                               cancel = true;
+                               if( t[ type ].call( t.apiuser, e ) === false ){
+                                       cancel = true;
+                                       break;
+                               };
                        };
                };
                if( cancel === true || key === 18 || key === 9 || key === 27 || e.altKey === true ){ // 13.enter 18.esc 9.tab 27.esc   || ( key === 13 && overlayEnabled === false)
@@ -3849,41 +3877,57 @@ var UI = ( function(){
                        ret.id   = 'ui-textinput';
                        return ret;
                })();
+               var currentData;
+               
+               function updateWrapperPosition(){
+                       var p = Position.cumulativeOffset( currentData.elmValue ),
+                               w = currentData.elmValue.offsetWidth - 2,
+                               _w;             
+                       elmInput.style.cssText = [
+                               'left:',   p[ 0 ], 'px;',
+                               'top:',    p[ 1 ], 'px;',//,
+                               'width:',  w, 'px;'//,
+                               //'height:', data.elmValue.offsetHeight, 'px;',
+                               //'position:absolute;'
+                       ].join( '' );
+                       
+                       //_w = elmInput.offsetWidth;
+                       //if( w !== _w ) elmInput.style.width = ( w - ( _w - w ) ) + 'px;';     
+               };
                
                return {
                        show: function( data ){
                                // this.groupData.node.addEventListener( 'mouseout' );
-                               var p = Position.cumulativeOffset( data.elmValue ),
-                                       w = data.elmValue.offsetWidth - 2,
-                                       _w;
-                               elmInput.style.cssText = [
-                                       'left:',   p[ 0 ], 'px;',
-                                       'top:',    p[ 1 ], 'px;',//,
-                                       'width:',  w, 'px;'//,
-                                       //'height:', data.elmValue.offsetHeight, 'px;',
-                                       //'position:absolute;'
-                               ].join( '' );
-                               elmInput.value = data.value;
+                               currentData = data;
+
                                body.appendChild( elmInput );
-                               _w = elmInput.offsetWidth;
-                               if( w !== _w ) elmInput.style.width = ( w - ( _w - w ) ) + 'px;';
+                               elmInput.value = data.value;
+                               updateWrapperPosition();
                                
                                elmInput.focus();
                                elmInput.select();
+                               
+                               SystemTimer.add( SUPER_USER_KEY, updateWrapperPosition, 500 );
                        },
                        hide : function( data ){
+                               if( currentData !== data ) return;
+                               currentData = null;
                                body.removeChild( elmInput );
                                var ret = elmInput.value;
                                elmInput.value = '';
+                               SystemTimer.remove( SUPER_USER_KEY, updateWrapperPosition );
                                return ret;
                        },
                        update : function( data ){
                                elmInput.value = data.value;
+                       },
+                       onWindowResize: function( _w, _h ){
+                               AsyncCall.add( currentData.apiuser, updateWrapperPosition );
                        }
                };
        })();
        
-       var InputTextClass = function( groupData, elmWrapper, elmValue, onUpdate, validater ){
+       var TextInputClass = function( groupData, elmWrapper, elmValue, onUpdate, validater ){
                var data = new UIItemPrivateData();
                data.init( groupData, this, elmWrapper, elmValue.innerHTML, onUpdate, validater, false, true, true );
                Util.addClass( elmValue, 'editable-text' );
@@ -3893,7 +3937,7 @@ var UI = ( function(){
                data.node.addEventListener( 'click', this.focus, this );
                //MouseEvent.add( groupData.apiuser, elmWrapper, 'click', instance.focus );
        };
-       InputTextClass.prototype = {
+       TextInputClass.prototype = {
                value : function( value ){
                        var data = UIItemPrivateData.get( this );
                        if( Type.isString( value ) === true || Type.isNumber( value ) === true ){
@@ -3914,8 +3958,8 @@ var UI = ( function(){
                        var data = UIItemPrivateData.get( this ),
                                newValue;
                        if( data.focus === false ) return;
-                       newValue  = TextInputManager.hide( data );
-                       newValue = keep !== 27 ? ( data.validater ? '' + data.validater( newValue ) : newValue ) : value; // 27:ESC
+                       newValue = TextInputManager.hide( data );
+                       newValue = keep !== 27 ? ( data.validater ? '' + data.validater( newValue ) : newValue ) : data.value; // 27:ESC
 
                        data.elmValue.innerHTML = newValue;
                        
@@ -3925,15 +3969,23 @@ var UI = ( function(){
                        data.focus = false;
                        finish( data );
                },
-               enabled : function(){
+               enabled : function( v ){
                        var data = UIItemPrivateData.get( this );
+                       if( Type.isBoolean( v ) === true && data.enabled !== v ){
+                               Util.toggleClass( data.elm, 'ui-textinput-disabled', !v );
+                               if( data.focus === true && v === false ) this.blur();
+                               data.enabled = v;
+                               data.node.disabled( !( data.visible && v ) );
+                       };
                        return data.enabled;
                },
-               visible : function( _visible ){
+               visible : function( v ){
                        var data = UIItemPrivateData.get( this );
-                       if( Type.isBoolean( _visible ) === true ){
-                               data.elm.style.display = _visible ? '' : 'none';
-                               data.visible = _visible;
+                       if( Type.isBoolean( v ) === true && data.visible !== v ){
+                               data.elm.style.display = v ? '' : 'none';
+                               if( data.focus === true && v === false ) this.blur();
+                               data.visible = v;
+                               data.node.disabled( !( data.enabled && v ) );
                        };
                        return data.visible;
                },
@@ -3943,11 +3995,121 @@ var UI = ( function(){
                        data.destroy();
                }
        };
+
+/* --------------------------------
+ * TextInputManager
+ */
+       var FileInputManager = ( function(){
+               var currentData,
+                       elmForm,
+                       elmInput;
+               
+               function updateWrapperPosition(){
+                       var p = Position.cumulativeOffset( currentData.elmValue ),
+                               w = currentData.elmValue.offsetWidth - 2,
+                               _w;             
+                       elmInput.style.cssText = [
+                               'left:',   p[ 0 ], 'px;',
+                               'top:',    p[ 1 ], 'px;',//,
+                               'width:',  w, 'px;'//,
+                               //'height:', data.elmValue.offsetHeight, 'px;',
+                               //'position:absolute;'
+                       ].join( '' );
+                       
+                       _w = elmInput.offsetWidth;
+                       if( w !== _w ) elmInput.style.width = ( w - ( _w - w ) ) + 'px;';       
+               };
+               
+               function change( e ){
+                       var data = currentData,
+                               file = data.elmFileInputReal.value;
+                       if( data.value !== file ){
+                               data.onUpdate && AsyncCall.add( data.groupData.apiuser, data.onUpdate, [ file, data.value ], this );
+                               data.elmValue.innerHTML = data.value = value;
+                               currentData.blur();
+                       };                      
+               };
+               
+               return {
+                       show : function( data ){
+                               currentData = data;
+                               updateWrapperPosition();
+                               
+                               elmInput = data.elmFileInputReal;
+                               elmInput.focus();
+                               data.node.addEventListener( 'change', change, data );
+                               
+                               SystemTimer.add( SUPER_USER_KEY, updateWrapperPosition, 500 );
+                       },
+                       hide : function( data ){
+                               if( currentData !== data ) return;
+                               data.node.removeEventListener( 'change', change );
+                               currentData = null;
+                               SystemTimer.remove( SUPER_USER_KEY, updateWrapperPosition );
+                       },
+                       onWindowResize: function( _w, _h ){
+                               AsyncCall.add( currentData.apiuser, updateWrapperPosition );
+                       }
+               };
+       })();
+       
+       var FileInputClass = function( groupData, elmWrapper, onUpdate, elmFileInputReal, elmValue ){
+               var data = new UIItemPrivateData();
+               data.init( groupData, this, elmWrapper, null, onUpdate, null, false, true, true );
+               data.node = groupData.node.createNode( elmWrapper, false, true, 'ui-fileinput-hover', 'pointer' );
+               data.elmValue = elmValue;
+               data.elmFileInputReal = elmFileInputReal;
+               data.node.addEventListener( 'mouseover', this.focus, this );
+       };
+       FileInputClass.prototype = {
+               value : function(){
+                       return data.value;
+               },
+               focus : function(){
+                       var data = UIItemPrivateData.get( this );
+                       data.focus = true;
+                       Util.addClass( data.elm, 'fileinput-has-focus' );
+                       start( data );
+                       FileInputManager.show( data );
+               },
+               blur : function( keyCode ){
+                       var data = UIItemPrivateData.get( this );
+                       Util.removeClass( data.elm, 'fileinput-has-focus' );
+                       data.focus = false;
+                       FileInputManager.hide( data );
+                       finish( data );
+               },
+               enabled : function( v ){
+                       var data = UIItemPrivateData.get( this );
+                       if( Type.isBoolean( v ) === true && data.enabled !== v ){
+                               if( data.focus === true && v === false ) this.blur();
+                               Util.toggleClass( data.elm, 'fileinput-disabled', !v );
+                               data.enabled = v;
+                               data.node.disabled( !( data.visible && v ) );
+                       };
+                       return data.enabled;
+               },
+               visible : function( v ){
+                       var data = UIItemPrivateData.get( this );
+                       if( Type.isBoolean( v ) === true && data.visible !== v ){
+                               if( data.focus === true && v === false ) this.blur();
+                               data.elm.style.display = v ? '' : 'none';
+                               data.visible = v;
+                               data.node.disabled( !( data.enabled && v ) );
+                       };
+                       return data.visible;
+               },
+               destroy : function(){
+                       var data = UIItemPrivateData.get( this );
+                       data.focus === true && FileInputManager.hide( data );
+                       data.destroy();
+               }
+       };
        
        var ButtonClass = function( groupData, elmWrapper, onUpdate ){
                var data = new UIItemPrivateData();
                data.init( groupData, this, elmWrapper, null, onUpdate, null, false, true, true );
-               data.node = groupData.node.createNode( elmWrapper, false, true, 'ui-inpittext-hover', 'pointer' );
+               data.node = groupData.node.createNode( elmWrapper, false, true, 'ui-button-hover', 'pointer' );
                data.node.addEventListener( 'click', onUpdate );
                //MouseEvent.add( groupData.apiuser, elmWrapper, 'click', onUpdate );
        };
@@ -3965,19 +4127,21 @@ var UI = ( function(){
                        data.focus = false;
                        finish( data );
                },
-               enabled : function( _enabled ){
+               enabled : function( v ){
                        var data = UIItemPrivateData.get( this );
-                       if( Type.isBoolean( _enabled ) === true && data.enabled !== _enabled ){
-                               _enabled === true ? Util.removeClass( data.elm, 'button-disabled' ) : Util.addClass( data.elm, 'button-disabled' );
-                               data.enabled = _enabled;
+                       if( Type.isBoolean( v ) === true && data.enabled !== v ){
+                               Util.toggleClass( data.elm, 'button-disabled', !v );
+                               data.enabled = v;
+                               data.node.disabled( !( data.visible && v ) );
                        };
                        return data.enabled;
                },
-               visible : function( _visible ){
+               visible : function( v ){
                        var data = UIItemPrivateData.get( this );
-                       if( Type.isBoolean( _visible ) === true ){
-                               data.elm.style.display = _visible ? '' : 'none';
-                               data.visible = _visible;
+                       if( Type.isBoolean( v ) === true && data.visible !== v ){
+                               data.elm.style.display = v ? '' : 'none';
+                               data.visible = v;
+                               data.node.disabled( !( data.enabled && v ) );
                        };
                        return data.visible;
                },
@@ -4001,14 +4165,12 @@ var UI = ( function(){
                data.selectIndex = 0;
                data.optionList  = [];
 
-               data.node = groupData.node.createNode( elmWrapper, false, true, 'ui-inpittext-hover', 'pointer' );
+               data.node = groupData.node.createNode( elmWrapper, false, true, 'ui-combobox-hover', 'pointer' );
                data.node.addEventListener( 'click', this.focus, this );
-               // MouseEvent.add( groupData.apiuser, data.elm, 'click', this.focus );
        };
        ComboBoxClass.prototype = {
                focus : function( e ){
                        var data = UIItemPrivateData.get( this );
-                       // MouseEvent.remove( data.groupData.apiuser, data.elm, 'click', this.focus );
                        data.node.removeEventListener( 'click', this.focus );
                        data.focus = true;
                        data.elmA.className = 'combobox-has-focus';
@@ -4023,17 +4185,24 @@ var UI = ( function(){
                        data.elmA.className = '';
                        finish( data );
                        data.node.addEventListener( 'click', this.focus, this );
-                       // MouseEvent.add( data.groupData.apiuser, data.elm, 'click', this.focus );
                },
-               enabled : function(){
+               enabled : function( v ){
                        var data = UIItemPrivateData.get( this );
+                       if( Type.isBoolean( v ) === true && data.enabled !== v ){
+                               Util.toggleClass( data.elm, 'ui-combobox-disabled', !v );
+                               if( data.focus === true && v === false ) this.blur();
+                               data.enabled = v;
+                               data.node.disabled( !( data.visible && v ) );
+                       };
                        return data.enabled;
                },
-               visible : function( _visible ){
+               visible : function( v ){
                        var data = UIItemPrivateData.get( this );
-                       if( Type.isBoolean( _visible ) === true ){
-                               data.elm.style.display = _visible ? '' : 'none';
-                               data.visible = _visible;
+                       if( Type.isBoolean( v ) === true && data.visible !== v ){
+                               data.elm.style.display = v ? '' : 'none';
+                               if( data.focus === true && v === false ) this.blur();
+                               data.visible = v;
+                               data.node.disabled( !( data.enabled && v ) );
                        };
                        return data.visible;
                },
@@ -4333,7 +4502,7 @@ var UI = ( function(){
                                elmValue = Util.getElementsByClassName( elmWrapper, 'editable-value' )[ 0 ],
                                ret;
                        if( elmValue ){
-                               ret = new InputTextClass( data, elmWrapper, elmValue, onUpdate, validater );
+                               ret = new TextInputClass( data, elmWrapper, elmValue, onUpdate, validater );
                                data.itemList.push( ret );
                                return ret;
                        };
@@ -4345,10 +4514,15 @@ var UI = ( function(){
                        data.itemList.push( ret );
                        return ret;
                },
-               createFileInput : function( elm, onUpdate, validater, elmFileInput ){
-                       var data = UIGroupPrivateData.get( this ),
-                               ret  = new FileInputClass( data, elm, onUpdate, validater, elmFileInput );
-                       data.itemList.push( ret );
+               createFileInput : function( elm, onUpdate, validater, elmFileInputReal ){
+                       var data     = UIGroupPrivateData.get( this ),
+                               elmValue = Util.getElementsByClassName( elmWrapper, 'fileinput-value' )[ 0 ],
+                               ret;
+                       if( elmValue ){
+                               ret = new FileInputClass( data, elm, onUpdate, validater, elmFileInputReal, elmValue );
+                               data.itemList.push( ret );
+                               return ret;
+                       };
                        return ret;
                },
                createCombobox : function( elm, onUpdate, optionList ){
@@ -4369,17 +4543,24 @@ var UI = ( function(){
                visible : function( v ){
                        var data = UIGroupPrivateData.get( this );
                        if( Type.isBoolean( v ) === true && data.visible !== v ){
-                               data.node.disabled( !v );
-                               data.visible = v;
-                               if( v === false && currentUi === this ){
-                                       currentItem.blur();
-                                       // finish( UIItemPrivateData.get( currentItem ) );
+                               for( var i = data.itemList.length; i; ){
+                                       data.itemList[ --i ].visible( v );
                                };
+                               data.visible = v;
+                               data.node.disabled( !( data.enabled && v ) );
                        };
                        return data.visible;
                },
                enabled : function( v ){
-                       
+                       var data = UIGroupPrivateData.get( this );
+                       if( Type.isBoolean( v ) === true && data.enabled !== v ){
+                               for( var i = data.itemList.length; i; ){
+                                       data.itemList[ --i ].enabled( v );
+                               };
+                               data.enabled = v;
+                               data.node.disabled( !( data.visible && v ) );
+                       };
+                       return data.enabled;
                },
                destroy : function(){
                        var data = UIGroupPrivateData.get( this ),
@@ -4440,8 +4621,8 @@ var UI = ( function(){
                        keyCode === 13 && currentItem instanceof ComboBoxClass && OptionControl.onEnter();
                        keyCode === 13 && tabShift( index, 1 );                 
                        currentItem && currentItem.blur( keyCode );
+                       return false;
                };
-               return false;
        };
 
        function tabShift( index, way ){
@@ -4477,6 +4658,8 @@ var UI = ( function(){
                        windowW = w;
                        windowH = h;
                        currentItem instanceof ComboBoxClass && OptionControl.onWindowResize( w, h );
+                       currentItem instanceof TextInputClass && TextInputManager.onWindowResize( w, h );
+                       currentItem instanceof FileInputClass && FileInputManager.onWindowResize( w, h );
                },
                onCurrentApplicationChange: function( _apiuser ){
                        currentList = UI_LIST[ _apiuser.getUID() ];