OSDN Git Service

client is version0.4.32, updated add image.
authoritozyun <itozyun@gmail.com>
Wed, 16 May 2012 21:44:04 +0000 (06:44 +0900)
committeritozyun <itozyun@gmail.com>
Wed, 16 May 2012 21:44:04 +0000 (06:44 +0900)
public/assets/system.js
public/assets/work.js

index 45f770a..6162a6f 100644 (file)
@@ -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 );
index 670a3bc..901e9c7 100644 (file)
@@ -1,6 +1,6 @@
 /*\r
  * pettanR work.js\r
- *   version 0.4.30\r
+ *   version 0.4.32\r
  *   \r
  * author:\r
  *   itozyun\r
@@ -877,6 +877,15 @@ pettanr.editor = pettanr.view.registerApplication( function(){
        var IMAGE_EXPLORER_WINDOW = ( function(){\r
                var instance, finder;\r
                \r
+               function onFileSelect( _file ){\r
+                       // 他の image ファイルも許可する?\r
+                       if( pettanr.driver.isPettanrFileInstance( _file ) === true ){\r
+                               if( _file.getType() === pettanr.driver.FILE_TYPE.PICTURE ){\r
+                                       COMIC_ELEMENT_CONTROL.onImageSelect( pettanr.driver._getAPI().getFileData( _file ) );\r
+                               }\r
+                       }\r
+               }\r
+               \r
                return WINDOWS_CONTROL.createWindow(\r
                        {\r
                                onInit: function(){\r
@@ -889,15 +898,17 @@ pettanr.editor = pettanr.view.registerApplication( function(){
                                                document.getElementById( 'image-exproler-container'),\r
                                                pettanr.driver.createPictureTree(),\r
                                                null, null,\r
+                                               onFileSelect,\r
                                                COMIC_ELEMENT_CONTROL.onImageSelect\r
                                        );\r
+\r
                                        finder.resize( _w, _h );\r
                                },\r
                                onResize: function( _w, _h ){\r
                                        finder.resize( _w, _h );\r
                                }\r
                        },\r
-                       'image-exproler', 'Album', 0, 215, 400, 350, false, true, true, 300, 300\r
+                       'image-exproler', 'Album', 0, 215, 600, 350, false, true, true, 300, 300\r
                );\r
        })();\r
        \r