/*
* pettanR peta.apps.js
- * version 0.5.27
+ * version 0.5.28
*
* author:
* itozyun
function onLoadJson( _file, _json ){
var _access = FileAPI.getFileDataAccess( _file ),
- _data = _access !== null ? _access.DATA : null;
+ _data = _access !== null ? _access.DATA : null;
if( _data === null ){
onErrorJson( _file );
return;
app.elmIframe = null;
app.elmForm = null;
app.fetchScript = function(){
- app.elmProgress = document.getElementById( app.elmProgressID );
+ app.elmProgress = document.getElementById( app.elmProgressID );
if( !( app.elmUploader = document.getElementById( app.elmUploaderID ) ) ){
app.elmUploader = document.createElement( 'div' );
var elmHeader, elmProgress,
windowW, windowH,
inputTitle, inputW, inputH,
+ eventRoot, node,
comboboxVisible, // comboboxEditable,
buttonSubmit, buttonCancel,
app = this;
].join( '' );
app.fetchCSS( pettanr.CONST.URL_PETA_APPS_CSS );
+ eventRoot = app.getPointingDeviceEventTreeRoot();
delete app.onInit;
};
this.elmIframeName = 'targetFrameCreateComic'
this.scriptSrc = pettanr.CONST.CREATE_COMIC_JS;
this.hideUploader = true;
+
FormApplicationHelper( this );
- this.onFormReady = function(){
- app.onPaneResize( windowW, windowH );
+
+ this.onOpen = function( w, h ){
+ node = eventRoot.createNode( app.rootElement, true, true );
+
+ var ui = app.createUIGroup( node );
+ inputTitle = ui.createInputText( document.getElementById( 'comic-console-title') );
+ inputW = ui.createInputText( document.getElementById( 'comic-console-width') );
+ inputH = ui.createInputText( document.getElementById( 'comic-console-height') );
+ comboboxVisible = ui.createCombobox( document.getElementById( 'comic-console-visible') );
+ // comboboxEditable = ui.createCombobox( document.getElementById( 'comic-console-editable') );
+ buttonSubmit = ui.createButton( document.getElementById( 'comic-console-post-button'), clickOK );
+ buttonCancel = ui.createButton( document.getElementById( 'comic-console-cancel-button'), clickCancel );
+
+ app.onPaneResize( w, h );
+ app.fetchScript();
+ delete app.onOpen;
+ };
+ 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 = inputTitle = inputW = inputH = comboboxVisible = buttonSubmit = buttonCancel = null;
+ };
+ this.onFormReady = function(){
var selectList = app.elmForm.getElementsByTagName( 'select' ),
select,
j, m,
};
inputTitle.focus();
+ //node.mesure();
+ app.onPaneResize( windowW, windowH );
+
+
delete app.onFoemReady;
};
this.submitError = function(){
this.submitSuccess = function(){
app.addTimer( clickCancel , 5000, true );
};
- this.onOpen = function( w, h ){
- var ui = app.createUIGroup();
-
- inputTitle = ui.createInputText( document.getElementById( 'comic-console-title') );
- inputW = ui.createInputText( document.getElementById( 'comic-console-width') );
- inputH = ui.createInputText( document.getElementById( 'comic-console-height') );
- comboboxVisible = ui.createCombobox( document.getElementById( 'comic-console-visible') );
- // comboboxEditable = ui.createCombobox( document.getElementById( 'comic-console-editable') );
- buttonSubmit = ui.createButton( document.getElementById( 'comic-console-post-button'), clickOK );
- buttonCancel = ui.createButton( document.getElementById( 'comic-console-cancel-button'), clickCancel );
-
- app.onPaneResize( w, h );
- app.fetchScript();
- delete app.onOpen;
- };
- 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( '' );
- };
- this.onClose = function(){
- app.destroyHelper();
- app = inputTitle = inputW = inputH = comboboxVisible = buttonSubmit = buttonCancel = null;
- };
}, true, true, 'Comic Console', 'comicConsole', null, '#D44A26' );
var UploadConsole = gOS.registerApplication( function(){
/*
* pettanR system.js
- * version 0.5.26
+ * version 0.5.28
*
* gadgetOS
* author:
},
destroy : function(){
var data = UIItemPrivateData.get( this );
- if( data.focus === true ){
- data.elmValue.removeChild( ELM_INPUT_TEXT );
- };
+ data.focus === true && TextInputManager.hide( data );
data.destroy();
}
};
data.focus = true;
data.elmA.className = 'combobox-has-focus';
start( data );
- OptionControl.show( data.groupData.apiuser, this, data.optionList );
+ OptionControl.show( data );
return false;
},
blur : function( keyCode ){
},
destroy : function(){
var data = UIItemPrivateData.get( this );
- this.blur();
+ data.focus === true && OptionControl.hide( this );
+ // this.blur();
// MouseEvent.remove( data.groupData.apiuser, data.elm );
data.optionList.length = 0;
data.destroy();
SystemTimer.add( SUPER_USER_KEY, updateWrapperPosition, 500 );
},
hide: function( _combobox ){
- if( currentCombobox !== data.item || currentCombobox === null ) return;
+ if( currentCombobox !== _combobox || currentCombobox === null ) return;
var _option;
while( _option = OPTION_LIST.shift() ){
destroy : function(){
var data = UIGroupPrivateData.get( this ),
_item;
- while( _item = data.itemList.shift() ){
- _item.destroy();
- };
if( currentUi === this ){
currentItem.blur();
// finish( UIItemPrivateData.get( currentItem ) );
+ };
+ while( _item = data.itemList.shift() ){
+ _item.destroy();
};
data.destroy();
}