/*
* pettanR system.js
- * version 0.4.29
+ * version 0.4.32
*
* author:
* itozyun
}
}
- var FinderClass = function( ELM_CONTAINER, tree, header, footer ){
+ var FinderClass = function( ELM_CONTAINER, tree, header, footer, onSelect, viewerOption, editorOption ){
var ICON_ARRAY = [],
BREAD_ARRAY = [],
elmContainer = ELM_ORIGIN_CONTAINER.cloneNode( true ),
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 );
+ _app.bootInOverlay( _file, viewerOption );
}
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);
init: function(){
},
- createFinder: function( _applicationReference, _elmTarget, _tree, _header, _footer ){
+ 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 );
+ var _finder = new FinderClass( _elmTarget, _tree, _header, _footer, _onSelect, _viewerOption, _editorOption );
FINDER_ARRAY.push( _finder );
return _finder;
},
pettanr.driver = ( function(){
- var MyAuthorID = 'current_author' in window ? current_author.id : ( pettanr.DEBUG ? 1 : -1 ),
- MyArtistID = 'current_artist' in window ? current_artist.id : ( pettanr.DEBUG ? 1 : -1 ),
+ var MyAuthorID = 'current_author' in window ? current_author.id : ( pettanr.CONST.SERVER_SUPPORT === false ? 1 : -1 ),
+ MyArtistID = 'current_artist' in window ? current_artist.id : ( pettanr.CONST.SERVER_SUPPORT === false ? 1 : -1 ),
Driver = {
getSeqentialFiles: function( _file){
var _data = FileAPI.getFileData( _file),
_json = _data !== null ? _data.json : null;
if( _json === true && _data.type === pettanr.driver.FILE_TYPE.COMIC ){
- if( pettanr.LOCAL === true ){
+ if( pettanr.CONST.SERVER_SUPPORT === false ){
_json = [ 'json\/comics_', _data.id, '.json' ].join( '' );
} else {
_json = [ pettanr.CONST.PETTANR_ROOT_PATH, 'comics\/', _data.id, '.json\/play\/' ].join( '' );
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 );
elmButton.onclick = clickOK;
- var BASE_PATH = pettanr.LOCAL === true ? 'resource_pictures\/' : pettanr.CONST.RESOURCE_PICTURE_PATH,
+ var BASE_PATH = pettanr.CONST.RESOURCE_PICTURE_PATH,
THUMB_PATH = BASE_PATH, // + 'thumbnail/',
LIMIT_FILESIZE = 1024 * 10; // 10KB