From: itozyun Date: Wed, 16 May 2012 21:44:04 +0000 (+0900) Subject: client is version0.4.32, updated add image. X-Git-Url: http://git.osdn.net/view?p=pettanr%2Fpettanr.git;a=commitdiff_plain;h=fb22235666042d14b3466c07659c10a98587d299;hp=9f252bcab153a30640a0410abdfc73f64496a5f5 client is version0.4.32, updated add image. --- diff --git a/public/assets/system.js b/public/assets/system.js index 45f770ad..6162a6fb 100644 --- a/public/assets/system.js +++ b/public/assets/system.js @@ -1,6 +1,6 @@ /* * pettanR system.js - * version 0.4.30 + * version 0.4.32 * * author: * itozyun @@ -974,7 +974,7 @@ pettanr.finder = ( function(){ } } - var FinderClass = function( ELM_CONTAINER, tree, header, footer, viewerOption ){ + var FinderClass = function( ELM_CONTAINER, tree, header, footer, onSelect, viewerOption, editorOption ){ var ICON_ARRAY = [], BREAD_ARRAY = [], elmContainer = ELM_ORIGIN_CONTAINER.cloneNode( true ), @@ -1059,11 +1059,13 @@ pettanr.finder = ( function(){ if( _file !== null && ( _file.getChildFileLength() !== -1 || _file.getType() === pettanr.file.FILE_TYPE.FOLDER)){ tree.down( i ); draw( w, h ); + } else { + Type.isFunction( onSelect ) === true && onSelect( _file ); } } } - function onEditor( _file, _app ){ - _app.boot( _file ); + function onEditor( _file, _app, editorOption ){ + _app.boot( _file, editorOption ); } function onViwer( _file, _app ){ _app.bootInOverlay( _file, viewerOption ); @@ -1071,12 +1073,12 @@ pettanr.finder = ( function(){ function onAction( _file ){ } - this.rootElement = elmContainer; + this.rootElement = elmContainer; this.parentElement = ELM_CONTAINER; - this.displayName = 'finder'; - this.ID = 'finder'; - this.MIN_WIDTH = 240; - this.MIN_HEIGHT = 240; + this.displayName = 'finder'; + this.ID = 'finder'; + this.MIN_WIDTH = 240; + this.MIN_HEIGHT = 240; this.init = function(){ //$( elmLocation).click( onHeadClick); //$( elmContainer).click( onBodyClick); @@ -1127,10 +1129,10 @@ pettanr.finder = ( function(){ init: function(){ }, - createFinder: function( _applicationReference, _elmTarget, _tree, _header, _footer, _viewerOption ){ + createFinder: function( _applicationReference, _elmTarget, _tree, _header, _footer, _onSelect, _viewerOption, _editorOption ){ if( pettanr.view.isApplicationReference( _applicationReference ) === false ) return; - var _finder = new FinderClass( _elmTarget, _tree, _header, _footer, _viewerOption ); + var _finder = new FinderClass( _elmTarget, _tree, _header, _footer, _onSelect, _viewerOption, _editorOption ); FINDER_ARRAY.push( _finder ); return _finder; }, @@ -1558,7 +1560,15 @@ pettanr.driver = ( function(){ return pettanr.file.createTree( FILE_DATA_SERVICE_ROOT ); //FILE_DATA_COMICS_ROOT); }, createPictureTree: function(){ - return pettanr.file.createTree( FILE_DATA_PICTURE_ROOT ); + var _tree = pettanr.file.createTree( FILE_DATA_PICTURE_ROOT ); + _root = _tree.getRootFile(); + _myPic = _root.getChildFileByIndex( 0 ); + _pic = _root.getChildFileByIndex( 1 ); + _myPic.getSeqentialFiles(); + _pic.getSeqentialFiles(); + _myPic.destroy(); + _pic.destroy(); + return _tree; }, createArtistTree: function(){ return pettanr.file.createTree( FILE_DATA_ARTIST_ROOT ); diff --git a/public/assets/work.js b/public/assets/work.js index 670a3bcf..901e9c78 100644 --- a/public/assets/work.js +++ b/public/assets/work.js @@ -1,6 +1,6 @@ /* * pettanR work.js - * version 0.4.30 + * version 0.4.32 * * author: * itozyun @@ -877,6 +877,15 @@ pettanr.editor = pettanr.view.registerApplication( function(){ var IMAGE_EXPLORER_WINDOW = ( function(){ var instance, finder; + function onFileSelect( _file ){ + // 他の image ファイルも許可する? + if( pettanr.driver.isPettanrFileInstance( _file ) === true ){ + if( _file.getType() === pettanr.driver.FILE_TYPE.PICTURE ){ + COMIC_ELEMENT_CONTROL.onImageSelect( pettanr.driver._getAPI().getFileData( _file ) ); + } + } + } + return WINDOWS_CONTROL.createWindow( { onInit: function(){ @@ -889,15 +898,17 @@ pettanr.editor = pettanr.view.registerApplication( function(){ document.getElementById( 'image-exproler-container'), pettanr.driver.createPictureTree(), null, null, + onFileSelect, COMIC_ELEMENT_CONTROL.onImageSelect ); + finder.resize( _w, _h ); }, onResize: function( _w, _h ){ finder.resize( _w, _h ); } }, - 'image-exproler', 'Album', 0, 215, 400, 350, false, true, true, 300, 300 + 'image-exproler', 'Album', 0, 215, 600, 350, false, true, true, 300, 300 ); })();