OSDN Git Service

version 0.5.31, UIForm.FileInput working.
authoritozyun <itozyun@gmail.com>
Thu, 13 Dec 2012 00:17:52 +0000 (09:17 +0900)
committeritozyun <itozyun@gmail.com>
Thu, 13 Dec 2012 00:17:52 +0000 (09:17 +0900)
0.5.x/javascripts/peta.apps.js
0.5.x/javascripts/peta.common.js
0.5.x/javascripts/system.js
0.5.x/stylesheets/peta.apps.css
0.5.x/stylesheets/system.css

index e3c79c7..6bfa509 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * pettanR peta.apps.js
- *   version 0.5.30
+ *   version 0.5.31
  *   
  * author:
  *   itozyun
@@ -4486,7 +4486,7 @@ var ComicConsole = gOS.registerApplication( function(){
                //node.mesure();
                app.onPaneResize( windowW, windowH );
                
-               delete app.onFoemReady;
+               delete app.onFormReady;
        };
        this.submitError = function(){
                app.addTimer( clickCancel , 5000, true );
@@ -4498,7 +4498,7 @@ var ComicConsole = gOS.registerApplication( function(){
 
 var UploadConsole = gOS.registerApplication( function(){
        var windowW, windowH,
-               eventRoot, node,
+               eventRoot, node, nodeForm,
                buttonSubmit, buttonCancel,
                elmFile,
                app = this;
@@ -4524,7 +4524,7 @@ var UploadConsole = gOS.registerApplication( function(){
                app.rootElement.innerHTML = [
                        '<div id="upload-console-header" class="console-header">Upload Picture</div>',
                        '<div id="upload-console" class="console-inner">',
-                               '<div id="uploader"></div>',
+                               '<div id="upload-console-uiform"></div>',
                                '<div class="console-button-container">',
                                        '<div id="upload-console-post-button" class="button console-submit-button">upload</div>',
                                        '<div id="upload-console-cancel-button" class="button console-cancel-button">cancel</div>',
@@ -4536,7 +4536,7 @@ var UploadConsole = gOS.registerApplication( function(){
                app.fetchCSS( pettanr.CONST.URL_PETA_APPS_CSS );
                
                eventRoot = app.getPointingDeviceEventTreeRoot();
-               
+               document.body.appendChild( Util.pullHtmlAsTemplete( '<div id="uploader"></div>' ) );
                delete app.onInit;
        };
        this.elmProgressID   = 'upload-console-progress';
@@ -4545,8 +4545,29 @@ var UploadConsole = gOS.registerApplication( function(){
        this.scriptSrc       = pettanr.CONST.UPLOAD_PICTURE_JS;
        this.hideUploader    = false;
        FormApplicationHelper( this );
+       this.onOpen = function( w, h ){
+               node             = eventRoot.createNode( app.rootElement, true, true );
+               nodeForm         = node.createNode( document.getElementById( 'upload-console-uiform' ), false, 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( w, h ){
+               windowW = w;
+               windowH = h;
+               node.update( w / 2 - node.width() / 2, h / 2 - node.height() / 2 );
+       };
+       this.onClose = function(){
+               app.destroyHelper();
+               app = elmFile = buttonSubmit = buttonCancel = null;
+       };
        this.onFormReady     = function(){
-               var _inputList = app.elmForm.getElementsByTagName( 'input' ),
+               var elmForm    = app.elmForm,
+                       _inputList = elmForm.getElementsByTagName( 'input' ),
                        _input;
                for( var i = _inputList.length; i; ){
                        _input = _inputList[ --i ];
@@ -4559,8 +4580,9 @@ var UploadConsole = gOS.registerApplication( function(){
                };
                node.mesure();
                app.onPaneResize( windowW, windowH );
+               app.createUIForm( nodeForm, elmForm );
                node.mesureChildren();
-               delete app.onFoemReady;
+               delete app.onFormReady;
        };
        this.submitError = function(){
                app.addTimer( clickCancel , 5000, true );
@@ -4568,29 +4590,6 @@ var UploadConsole = gOS.registerApplication( function(){
        this.submitSuccess = function(){
                app.addTimer( clickCancel , 5000, true );
        };
-       this.onOpen = function( w, h ){
-               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( 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();
-               app = elmFile = buttonSubmit = buttonCancel = null;
-       };
 }, true, true, 'Upload Console', 'uploadConsole', null, '#01A31C' );
 
 var ArtistConsole = gOS.registerApplication( function(){
@@ -4674,7 +4673,7 @@ var ArtistConsole = gOS.registerApplication( function(){
                app.onPaneResize( windowW, windowH );
                node.mesureChildren();
                
-               delete app.onFoemReady;
+               delete app.onFormReady;
        };
        this.submitError = function(){
                app.addTimer( clickCancel , 5000, true );
@@ -4797,7 +4796,7 @@ var PanelConsole = gOS.registerApplication( function(){
                app.onPaneResize( windowW, windowH );
                node.mesureChildren();
                
-               delete app.onFoemReady;
+               delete app.onFormReady;
        };
        this.submitError = function(){
                app.addTimer( clickCancel , 5000, true );
index c6e1e3e..e84a860 100644 (file)
@@ -1,6 +1,6 @@
 /*\r
  * pettanR peta.common.js\r
- *   version 0.5.18\r
+ *   version 0.5.31\r
  * \r
  *   author:\r
  *     itozyun\r
@@ -32,15 +32,15 @@ var pettanr = ( function(){
                                        } else\r
                                        if( elm.length === 1){\r
                                                ret[ name] = true;\r
-                                       }\r
-                       }\r
+                                       };\r
+                               };\r
                        return ret;\r
-                   }\r
+                   };\r
                    return {};\r
                })(),\r
                IS_DEBUG = Type.isBoolean( URL_PARAMS.debug ) ? URL_PARAMS.debug : IS_LOCAL === true;\r
        return {\r
-               version: '0.5.8',\r
+               version: '0.5.31',\r
                URL_PARAMS: URL_PARAMS,\r
                LOCAL: IS_LOCAL,\r
                DEBUG: IS_DEBUG,\r
index 51e02ab..0e68aad 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * pettanR system.js
- *   version 0.5.30
+ *   version 0.5.31
  *
  * gadgetOS
  *   author:
@@ -17,6 +17,8 @@
        var API_USER_LIST  = [ SUPER_USER_KEY ];
        var numApiUser     = 1;
        
+       function EMPTY_FUNCTION(){};
+       
        function isApiUser( _user ){
                return _user === SUPER_USER_KEY ||
                        File.isDriver( _user ) === true ||
        };
 
 var Class = ( function(){
+       var CLASS_LIST = [];
+       
+       function getClass( instance ){
+               var list     = CLASS_LIST,
+                       l        = list.length,
+                       getIndex = Util.getIndex,
+                       klass, live, pool;
+               for( ; i; ){
+                       klass = list[ --i ]
+                       live  = klass.live;
+                       if( live && getIndex( live, instance ) !== -1 ) return klass;
+                       pool  = klass.pool;
+                       if( pool && getIndex( pool, instance ) !== -1 ) return klass;
+                       if( instance instanceof klass ) return klass;
+               };
+               return null;
+       };
+       
        function clone( src ){
-               var ret;
-               if( Type.isArray(src) === true ){
+               var ret, key;
+               if( Type.isArray( src ) === true ){
                        ret = [];
                } else
-               if( Type.isObject(src) === true ){
+               if( Type.isObject( src ) === true ){
                        ret = {};
                } else
-               if( Type.isNumber(src) === true || Type.isString(src) === true || Type.isBoolean( src ) === true ){
+               if( Type.isNumber( src ) === true || Type.isString( src ) === true || Type.isBoolean( src ) === true ){
                        return src;
                } else {
                        return null;
                };
-               for( var key in src ){
+               for( key in src ){
                        ret[ key ] = clone( src[ key ]);
                };
                return ret;
        };
        
+       function copy( base, extend ){
+               for( var key in extend ){
+                       base[ key ] = extend[ key ];
+               };
+               return base;
+       };
+       
        function extend(){
                
        };
        
+       var basic = {
+               clear : function(){
+                       var o = this,
+                               p, v,
+                               klass = getClass( o );
+                       for( p in o ){
+                               if( o.hasOwnProperty && !o.hasOwnProperty( p ) ) continue;
+                               v = o[ p ];
+                               delete o[ p ];
+                       };
+                       if( klass && klass.pool ){
+                               klass.live.splice( Util.getIndex( klass.live, o ), 1 );
+                               klass.pool.push( o );
+                       };
+               }
+       };
+       
        var f = true;
        var c = Util.copyArray;
-       
+       var a;
        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 );
+               var klass = this,
+                       instance;
+               if( klass.abstract === true ){
+                       throw new Error( 'AbstractClass!' );
+               };
+               if( klass.pool && klass.pool.length > 0 ){
+                       instance = klass.pool.shift();
+               } else {
+                       f = false;
+                       instance = new klass();
+                       f = true;
+               };
+               if( klass._super ){
+                       instance._super = klass._super.prototype;
+               };
+               instance.init && instance.init.apply( instance, c( arguments ) );
+               klass.live && klass.live.push( instance );
                return instance;
        };
        
        return {
                create : function( def, final, pool, abstract ){
                        var klass = function(){
-                               var a = arguments;
+                               a = arguments;
                                if( f ) return I.apply( a.collee, c( a ) );
                        };
-                       klass.prototype = def;
+                       klass.prototype = copy( copy( {}, basic ), def );
+                       if( final !== true ){
+                               klass.extend = extend;
+                       };
                        if( pool === true ){
                                klass.pool = [];
                                klass.live = [];
                        };
+                       if( abstract === true ){
+                               klass.abstract = true;
+                       };
                        return klass;
                }
-       }
+       };
 })();
 
 var TicketBase = function(){
        this.kill = function(){
-               var t = this, v;
-               for( var p in t ){
+               var t = this, v, p;
+               for( p in t ){
                        if( t.hasOwnProperty && !t.hasOwnProperty( p ) ) continue;
                        v = t[ p ];
                        v && v instanceof TicketBase && v.kill();
                        delete t[ p ];
-               }
+               };
        };
 };
 
@@ -1065,6 +1126,7 @@ ApplicationPrivateData.prototype = {
        rootElement   : null,
        bgColor       : '#C1CACF',
        uiList        : null,
+       formList      : null,
        finderList    : null,
        styleCursor   : null,
        eventRoot     : null,
@@ -1076,6 +1138,7 @@ ApplicationPrivateData.prototype = {
        h             : 0,
        init          : function( appClass, displayName, isOverlay ){
                this.appClass    = appClass;
+               // this.application = app;
                this.displayName = displayName;
                this.isOverlay   = isOverlay;
                this.rootElement = document.createElement( 'div' );
@@ -1129,8 +1192,8 @@ AbstractApplication.prototype = {
        },
        init : function(){
                var data = ApplicationPrivateData.get( this );
-               this.rootElement = data.rootElement;
-               data.application = this;
+               // this.rootElement = data.rootElement;
+               // data.application = this;
                data.phase = 1;
                data.appClass === Page.appClass && Page.show();
                this.onInit();
@@ -1199,6 +1262,13 @@ AbstractApplication.prototype = {
                data.uiList.push( ui );
                return ui;
        },
+       createUIForm : function( nodeOrElm, opt_elmForm ){
+               var data = ApplicationPrivateData.get( this ),
+                       form = UIForm.createForm( this, nodeOrElm, opt_elmForm );
+               if( data.formList === null ) data.formList = [];
+               data.formList.push( form );
+               return form;
+       },
        createFinder : function( _elmTarget, _tree, _onSelect, _viewerOption, _editorOption ){
                var data   = ApplicationPrivateData.get( this ),
                        finder = Finder.create( this, _elmTarget, _tree, _onSelect, _viewerOption, _editorOption );
@@ -1961,18 +2031,21 @@ var PointingDeviceEventTree = ( function(){
                this.handler    = stayhandler;
                this.thisObject = opt_thisObject;
        };
-       StayEventTicketClass.prototype = {
-               type : 'mousestay',
-               mousestayHandler : function( e ){
+       StayEventTicketClass.prototype = Util.extend( new EventTicketClass( null, 'mousestay' ), {
+               // type : 'mousestay',
+               e    : null,
+               mouseoverHandler : function( e ){
+                       this.e = NodePrivateData.createEvent( e, this.type, this.data, true );
                        this.node.addEventListener( 'mouseout',  this.mousestayHandler, this );
                        this.node.addEventListener( 'mousemove', this.mousemoveHandler, this );
                        SystemTimer.add( this.data.apiuser, this.timeoutHandler, null, this );
                },
                timeoutHandler : function(){
                        this.mouseoutHandler();
-                       return this.fire(  );
+                       return this.fire( this.e );
                },
-               mouseoutHandler : function( e ){
+               mousemoveHandler : function( e ){
+                       this.e = NodePrivateData.createEvent( e, this.type, this.data, true );
                        SystemTimer.remove( this.data.apiuser, this.timeoutHandler );
                        SystemTimer.add( this.data.apiuser, this.timeoutHandler, null, this );
                },
@@ -1980,8 +2053,9 @@ var PointingDeviceEventTree = ( function(){
                        this.node.removeEventListener( 'mouseout', this.mousestayHandler );
                        this.node.removeEventListener( 'mousemove', this.mousemoveHandler );
                        SystemTimer.remove( this.data.apiuser, this.timeoutHandler );
+                       delete this.e;
                }
-       };
+       });
        
        var ScrollBarManager = ( function(){
                var elmScroller     = document.createElement( 'div' ),
@@ -2229,6 +2303,9 @@ var Application = ( function(){
                        var application = new appClass(),
                                data = ApplicationPrivateData.get( application );
                        
+                       application.rootElement = data.rootElement;
+                       data.application = application;
+                       
                        coveredApplication = isOverlay === true ? currentApplication : null;
                        
                        Application.onCurrentApplicationChange( application );
@@ -3735,8 +3812,7 @@ var Overlay = ( function(){
        };
        function asyncInit( /* arguments */ ){
                application.init();
-               elmContainer.insertBefore( application.rootElement, elmCloseButton );
-               application.rootElement.style.display = 'none';
+               //application.rootElement.style.display = 'none';
        };
        function asyncOpen( /* arguments */ ){
                var _arg = Util.copyArray( arguments );
@@ -3783,7 +3859,7 @@ var Overlay = ( function(){
                        application = _application;
                        
                        //asyncInit();
-                       
+                       elmContainer.insertBefore( application.rootElement, elmCloseButton );
                        _application.addAsyncCall( asyncInit );
                        _application.addAsyncCall( asyncOpen, _bootParams );                    
                },
@@ -3953,7 +4029,7 @@ var UI = ( function(){
                                elmInput.value = data.value;
                        },
                        onWindowResize: function( _w, _h ){
-                               AsyncCall.add( currentData.apiuser, updateWrapperPosition );
+                               AsyncCall.add( currentUser, updateWrapperPosition );
                        }
                };
        })();
@@ -4033,13 +4109,14 @@ var UI = ( function(){
        var FileInputManager = ( function(){
                var currentData,
                        elmForm,
-                       elmInput;
+                       elmWrap,
+                       evt;
                
                function updateWrapperPosition(){
                        var p = Position.cumulativeOffset( currentData.elmValue ),
-                               w = currentData.elmValue.offsetWidth - 2,
+                               w = currentData.elmValue.offsetWidth,
                                _w;             
-                       elmInput.style.cssText = [
+                       elmWrap.style.cssText = [
                                'left:',   p[ 0 ], 'px;',
                                'top:',    p[ 1 ], 'px;',//,
                                'width:',  w, 'px;'//,
@@ -4047,44 +4124,58 @@ var UI = ( function(){
                                //'position:absolute;'
                        ].join( '' );
                        
-                       _w = elmInput.offsetWidth;
-                       if( w !== _w ) elmInput.style.width = ( w - ( _w - w ) ) + 'px;';       
+                       _w = elmWrap.offsetWidth;
+                       if( w !== _w ) elmWrap.style.width = ( w - ( _w - w ) ) + 'px'; 
                };
                
                function change( e ){
                        var data = currentData,
                                file = data.elmFileInputReal.value;
+                       file = file.split( '\\' );
+                       file = file[ file.length - 1 ];
                        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();
-                       };                      
+                               data.elmValue.innerHTML = data.value = file;
+                       };
+                       currentData.item.blur();
+               };
+               function asyncMouseout(){
+                       currentData && currentData.item.blur();
                };
                
                return {
                        show : function( data ){
                                currentData = data;
-                               updateWrapperPosition();
-                               
-                               elmInput = data.elmFileInputReal;
-                               elmInput.focus();
-                               data.node.addEventListener( 'change', change, data );
+
+                               elmWrap = data.elmFileInputReal.parentNode;
+                               // 
                                
+                               updateWrapperPosition();
+                               data.elmFileInputReal.focus();
+                               //data.node.addEventListener( 'change', change, data );
+                               evt = new EventTicketClass( data.elmFileInputReal, 'change', change );
+                               // MouseEvent.add( currentUser, data.elmFileInputReal, 'mouseout', asyncMouseout );
+                               // MouseEvent.add( elmWrap, 'click', data.elmFileInputReal.focus, data.elmFileInputReal );
+                               currentData.elmFileInputReal.onchange = change;
                                SystemTimer.add( SUPER_USER_KEY, updateWrapperPosition, 500 );
                        },
                        hide : function( data ){
                                if( currentData !== data ) return;
-                               data.node.removeEventListener( 'change', change );
+                               // data.node.removeEventListener( 'change', change );
+                               evt.destroy();
+                               MouseEvent.remove( currentUser, currentData.elmFileInputReal, 'mouseout', asyncMouseout );
+                               currentData.elmFileInputReal.onchange = null;
+                               elmWrap.style.display = 'none';
                                currentData = null;
                                SystemTimer.remove( SUPER_USER_KEY, updateWrapperPosition );
                        },
                        onWindowResize: function( _w, _h ){
-                               AsyncCall.add( currentData.apiuser, updateWrapperPosition );
+                               AsyncCall.add( currentUser, updateWrapperPosition );
                        }
                };
        })();
        
-       var FileInputClass = function( groupData, elmWrapper, onUpdate, elmFileInputReal, elmValue ){
+       var FileInputClass = function( groupData, elmWrapper, onUpdate, validater, 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' );
@@ -4498,7 +4589,7 @@ var UI = ( function(){
        };
        
        var UIGroupClass = function( apiuser, node ){
-               ( new UIGroupPrivateData() ).init( apiuser, node, this );       
+               ( new UIGroupPrivateData() ).init( apiuser, node, this );
        };
        UIGroupClass.prototype = {
                focus : function( _value ){
@@ -4547,7 +4638,7 @@ var UI = ( function(){
                },
                createFileInput : function( elm, onUpdate, validater, elmFileInputReal ){
                        var data     = UIGroupPrivateData.get( this ),
-                               elmValue = Util.getElementsByClassName( elmWrapper, 'fileinput-value' )[ 0 ],
+                               elmValue = Util.getElementsByClassName( elm, 'fileinput-value' )[ 0 ],
                                ret;
                        if( elmValue ){
                                ret = new FileInputClass( data, elm, onUpdate, validater, elmFileInputReal, elmValue );
@@ -4701,9 +4792,159 @@ var UI = ( function(){
                onSystemShutdown: function(){
                        
                }
-       }
+       };
 })();
 
+var UIForm = ( function(){
+       var FORM_LIST           = [];
+       var CLASSNAME_FORM      = 'uiform-invisible';
+       var CLASSNAME_FILE_WRAP = 'ui-fileinput-wrapper';
+       var FormItemData = function(){};
+       FormItemData.prototype = {
+               formData : null,
+               uiItem   : null,
+               init: function( formData, uiItem ){
+                       this.formData = formData;
+                       this.uiItem   = uiItem;
+               }
+       };
+       
+       var FormPrivateData = function(){};
+       FormPrivateData.prototype = {
+               apiuser  : null,
+               node     : null,
+               form     : null,
+               elmForm  : null,
+               itemList : null,
+               visible  : true,
+               enabled  : true,
+               init     : function( apiuser, from, node, elm, elmForm ){
+                       this.apiuser      = apiuser;
+                       this.form         = form;
+                       this.ui           = apiuser.createUIGroup( node );
+                       this.node         = node;
+                       this.elm          = elm;
+                       this.elmForm      = elmForm;
+                       this.itemList     = [];
+                       elmForm.className = CLASSNAME_FORM;
+                       FormPrivateData.list.push( this );
+                       
+                       var forms = Util.copyArray( elmForm.getElementsByTagName( '*' ) ),
+                               l     = forms.length,
+                               i     = 0,
+                               items = 'input,select,textarea,button',
+                               form, data, el, wrap;
+                       for( ; i<l; ++i ){
+                               form = forms[ i ];
+                               if( form.nodeType !== 1 ) continue;
+                               switch( form.tagName.toLowerCase() ){
+                                       case 'input':
+                                               switch( form.type.toLowerCase() ){
+                                                       case 'text':
+                                                               break;
+                                                       case 'file':
+                                                               el = Util.pullHtmlAsTemplete( '<div class="uiform-file-container"><div class="uiform-label"></div><div class="uiform-file fileinput-value"></div></div>' );
+                                                               elm.appendChild( el );
+                                                               data = new FormItemData();
+                                                               wrap = document.createElement( 'div' );
+                                                               form.parentNode.insertBefore( wrap, form );
+                                                               wrap.className = CLASSNAME_FILE_WRAP;
+                                                               wrap.appendChild( form );
+                                                               data.init( this, this.ui.createFileInput( el, null, null, form ) );
+                                                               this.itemList.push( data );
+                                                               // alert( i )
+                                                               break;
+                                                       case 'button':
+                                                               break;
+                                                       default:
+                                                               continue;
+                                               };
+                                               break;
+                                       case 'select':
+                                               break;
+                                       case 'button':
+                                               break;
+                                       case 'textarea':
+                                               break;
+                                       default:
+                                               continue;
+                               };
+                       };
+               },
+               destroy  : function(){
+                       
+               }
+       };
+       FormPrivateData.list = [];
+       FormPrivateData.get  = function( from ){
+               var list = FormPrivateData.list,
+                       i    = list.length;
+               for( ; i; ){
+                       if( list[ --i ].form === form ) return list[ i ];
+               };
+               return null;
+       };
+       
+       var FormClass = function( apiuser, node, elm, elmForm ){
+               ( new FormPrivateData() ).init( apiuser, this, node, elm, elmForm );
+       };
+       FormClass.prototype = {
+               createTextInput : function(){
+                       
+               },
+               createMultiLineInput : function(){
+                       
+               },
+               createFileInput : function(){
+                       
+               },
+               createButton : function(){
+                       
+               },
+               createComboBox : function(){
+                       
+               },
+               submit : function(){
+                       
+               }
+       };
+       
+       return {
+               createForm: function( apiuser, nodeOrElm, opt_elmForm ){
+                       var uid  = apiuser.getUID(),
+                               list = FORM_LIST[ uid ],
+                               node, elm, form;
+                       if( PointingDeviceEventTree.isNodeInstance( nodeOrElm ) === true ){
+                               node = nodeOrElm;
+                               elm  = PointingDeviceEventTree._getNodePrivateData( nodeOrElm ).elm;
+                       } else {
+                               // App が eventTree を持っている?
+                               // App が eventTree を持っていない
+                               elm  = nodeOrElm;
+                       };  
+                       form = new FormClass( apiuser, node, elm, opt_elmForm );
+                       if( Type.isArray( list ) === false ){
+                               list = FORM_LIST[ uid ] = [];
+                       };
+                       list.push( form );
+                       return form;
+               },
+               onWindowResize: function( w, h ){
+                       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 ){
+               },
+               onApplicationShutdown: function( _apiuser ){
+               },
+               onSystemShutdown: function(){
+                       
+               }
+       };
+})();
 
 var Finder = ( function(){
        var HTML_FINDER_ICON = ( function(){
index 7d995e3..bd1b795 100644 (file)
@@ -1,7 +1,7 @@
 @charset "UTF-8";\r
 \r
 /* pettanR peta.apps.css\r
- *   version 0.5.26\r
+ *   version 0.5.31\r
  * \r
  *   author:\r
  *     itozyun\r
                                                }\r
 \r
                /*  Panel Console\r
-               --------------------------------------------------------------------------------------*/                        \r
+               --------------------------------------------------------------------------------------*/\r
+               #panel-console-data-value {\r
+                       width: 180px;\r
+                       height: 16px;\r
+                       line-height:22px;\r
+                       overflow:hidden;\r
+                       text-align:left;\r
+               }                       \r
                #panel-console-publish-value {\r
                                                        width:                  180px;\r
                                                        text-align:             center; \r
                }\r
-                                               \r
+               \r
+               #artist-console-name-value,\r
+               #artist-console-license-value {\r
+                       width: 180px;\r
+                       text-align:left;\r
+               }\r
+                               \r
                /*  Comic Reader\r
                --------------------------------------------------------------------------------------*/\r
                #comic-reader-wrapper {}\r
 \r
        /*  page contents\r
        --------------------------------------------------------------------------------------*/\r
+       .multi-page-container {\r
+               width:                          100%;\r
+       }\r
                .sidenavi {\r
                        width:                          100px;\r
                        float:                          left;\r
                        }\r
                .page-contents {\r
                        _position:                              relative; /* for ie6 */\r
-                       margin-left:                    100px;\r
                        padding:                                1em 1em 2em 1em;\r
+                       margin-left:                    100px;\r
                }\r
                        .page-content {\r
                                display:                                none;\r
index e670ddc..b93e626 100644 (file)
@@ -1,7 +1,7 @@
 @charset "UTF-8";\r
 \r
 /* pettanR system.css\r
- *   version 0.5.23\r
+ *   version 0.5.31\r
  * \r
  *   author:\r
  *     itozyun\r
   /**/\r
 }\r
 \r
+/*  UIForm\r
+--------------------------------------------------------------------------------------*/\r
+       .uiform-invisible {\r
+               position     : absolute;\r
+               top          : 0;\r
+               left         : 0;\r
+       }\r
+               .uiform-invisible * {\r
+                       display      : none;\r
+                       position     : absolute;\r
+               }\r
+                       .ui-fileinput-wrapper,\r
+                       .uiform-file {\r
+                               border-style:           solid;\r
+                               border-width:           1px;\r
+                               font-size:                      14px;\r
+                               line-height:            2em;\r
+                               height:                         2em;\r
+                               border-color:           #666 #bbb #ccc #777;\r
+                               display:                        block;\r
+                               color:                          #333;\r
+                               padding:                        3px;\r
+                               overflow:                       hidden;\r
+                               zoom         : 1;\r
+                       }\r
+                       .uiform-invisible .ui-fileinput-wrapper input {\r
+                               opacity          : 0.5;\r
+                               border           : 0;\r
+                               display          : block;\r
+                               position         : absolute;\r
+                               top              : 0;\r
+                               right            : 0;\r
+                               font-size        : 999px;\r
+                               line-height      : 1em;\r
+                               color            : #fff;\r
+                               background-color : transparent;\r
+                               cursor           : pointer;\r
+                               /*padding          : 999px;*/\r
+                       }\r
+                       .pettanr-ActiveX-enabled .uiform-invisible .ui-fileinput-wrapper input {\r
+                               filter:                         alpha( opacity=50 );\r
+                               -ms-filter:                     alpha( opacity=50 );\r
+                       }\r
+\r
 /*  Button\r
 --------------------------------------------------------------------------------------*/\r
        .button {\r
                -moz-border-radius:             3px;\r
                -webkit-border-radius:  3px;\r
        }\r
-       .button-hover {\r
+       .button-hover,\r
+       .ui-button-hover {\r
                color:                                  #333;\r
                border-color:                   #999 #888 #777;\r
        }\r
                        line-height:            16px;           \r
                }\r
                .editable-text {\r
-                       border-color:           #666 #aaa #bbb #777;\r
+                       border-color:           #666 #bbb #ccc #777;\r
                        display:                        inline-block;\r
                        color:                          #333;\r
                        zoom:                           1;\r
                        background-color:       #fff;\r
                        padding:                        3px;\r
                }\r
+               .ui-inpittext-hover .editable-text {\r
+                       border-color:           #4D90FE;\r
+               }\r
                        \r
        /*  combobox\r
        --------------------------------------------------------------------------------------*/        \r
                .combobox a:visited,\r
                .combobox a:hover,\r
                .combobox a:active {\r
-                       border:                         1px solid #ccc;\r
+                               border-style:           solid;\r
+                               border-width:           1px;\r
+                       border-color:           #666 #bbb #ccc #777;\r
                                font-size:                      14px;\r
                                line-height:            16px;                   \r
                                padding:                        3px;\r
                                }\r
                                .combobox  a.combobox-has-focus .combobox-toggle {\r
                                        color:                          #4D90FE;\r
-                               }                               \r
-                               \r
+                               }\r
+               .ui-combobox-hover .combobox a {\r
+                       border-color:           #4D90FE;\r
+               }\r
+               .ui-combobox-hover .combobox-toggle {\r
+                       color:                          #4D90FE;\r
+               }\r
                                \r
        .option-container {\r
                position:                       absolute;\r