OSDN Git Service

version 0.5.19, fixed Cabinet & Gallery.
authoritozyun <itozyun@gmail.com>
Mon, 12 Nov 2012 23:31:30 +0000 (08:31 +0900)
committeritozyun <itozyun@gmail.com>
Mon, 12 Nov 2012 23:31:30 +0000 (08:31 +0900)
0.5.x/javascripts/peta.apps.js
0.5.x/javascripts/system.js
0.5.x/stylesheets/peta.apps.css

index e4efa29..2fa2a04 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * pettanR peta.apps.js
- *   version 0.5.18
+ *   version 0.5.19
  *   
  * author:
  *   itozyun
@@ -484,6 +484,7 @@ var Cabinet = gOS.registerApplication( function(){
        var self         = this,
                finder       = null,
                tree         = null,
+               nodeClose    = null,
                nodePath     = null,
                nodeBody     = null,
                headerH      = 0;
@@ -495,7 +496,7 @@ var Cabinet = gOS.registerApplication( function(){
                self.rootElement.id = 'cabinet-root';
                self.rootElement.innerHTML = [
                        '<div id="cabinet-header">',
-                               'Cabinet',
+                               '<div class="header-title">Cabinet</div>',
                                '<div id="cabinet-close-button">x</div>',
                                '<div id="cabinet-path" class="finder-path"></div>',
                        '</div>',
@@ -503,21 +504,21 @@ var Cabinet = gOS.registerApplication( function(){
                ].join( '' );
                
                self.fetchCSS( pettanr.CONST.URL_PETA_APPS_CSS );
+               self.useInteractiveLayer( 'mousemove', 'mousedown', 'mouseup', 'mouseout' );
                
                tree = FileAPI.createTree( FILE_DATA_SERVICE_ROOT );
-               self.useInteractiveLayer( 'mousemove', 'mousedown', 'mouseup', 'mouseout' );
                
                delete self.onInit;
        };
        this.onOpen = function( _w, _h ){
                headerH = Util.getElementSize( document.getElementById( 'cabinet-header' ) ).height;
                
-               self.addEventListener( document.getElementById( 'cabinet-close-button' ), 'click', Cabinet.shutdown );
-               
                var eventRoot = self.getPointingDeviceEventTreeRoot();
                eventRoot.addEventListener( 'mousemove', new Function() );
-               nodePath = eventRoot.createNode( document.getElementById( 'cabinet-path' ), false, false );
-               nodeBody = eventRoot.createNode( document.getElementById( 'cabinet-container' ), false, true, null, '', true );
+               nodeClose = eventRoot.createNode( document.getElementById( 'cabinet-close-button' ), false, false, 'close-button-hover', 'pointer' );
+               nodeClose.addEventListener( 'click', Cabinet.shutdown );
+               nodePath  = eventRoot.createNode( document.getElementById( 'cabinet-path' ), false, false );
+               nodeBody  = eventRoot.createNode( document.getElementById( 'cabinet-container' ), false, true, null, '', true );
                
                finder = self.createFinder( nodeBody, tree );
                finder.createPath( nodePath );
@@ -539,6 +540,8 @@ var Gallery = gOS.registerApplication( function(){
        var self         = this,
                finder       = null,
                tree         = null,
+               nodePath     = null,
+               nodeBody     = null,
                headerH      = 0;
 
        this.bgColor     = '#FFFFFF';
@@ -547,11 +550,16 @@ var Gallery = gOS.registerApplication( function(){
        this.onInit = function(){
                self.rootElement.id        = 'gallery-root';
                self.rootElement.innerHTML = [
-                       '<div id="gallery-header">Cabinet<div id="gallery-close-button">x</div></div>',
+                       '<div id="gallery-header">',
+                               '<div class="header-title">Gallery</div>',
+                               '<div id="gallery-close-button">x</div>',
+                               '<div id="gallery-path" class="finder-path"></div>',
+                       '</div>',
                        '<div id="gallery-container" class="finder-container"></div>'
                ].join( '' );
                
                self.fetchCSS( pettanr.CONST.URL_PETA_APPS_CSS );
+               self.useInteractiveLayer( 'mousemove', 'mousedown', 'mouseup', 'mouseout' );
                
                tree = FileAPI.createTree( FILE_DATA_PICTURE_ROOT );
                var     _root  = tree.getRootFile(),
@@ -562,21 +570,29 @@ var Gallery = gOS.registerApplication( function(){
                _myPic.destroy();
                _pic.destroy();
        };
-       this.onOpen = function( _w, _h ){
+       this.onOpen = function( w, h ){
                headerH = Util.getElementSize( document.getElementById( 'gallery-header' ) ).height;
                
                self.addEventListener( document.getElementById( 'gallery-close-button' ), 'click', Gallery.shutdown );
                
-               finder = self.createFinder( self.rootElement, tree );
-               self.onPaneResize( _w, _h );
+               var eventRoot = self.getPointingDeviceEventTreeRoot();
+               eventRoot.addEventListener( 'mousemove', new Function() );
+               nodePath = eventRoot.createNode( document.getElementById( 'gallery-path' ), false, false );
+               nodeBody = eventRoot.createNode( document.getElementById( 'gallery-container' ), false, true, null, '', true );
+               
+               finder = self.createFinder( nodeBody, tree );
+               finder.createPath( nodePath );
+               self.onPaneResize( w, h );
        };
        this.onClose = function(){
                finder.destroy();
                tree.destroy();
                finder = tree = null;
        };
-       this.onPaneResize = function( _w, _h ){
-               finder.resize( _w, _h - headerH );
+       this.onPaneResize = function( w, h ){
+               nodePath.width( w );
+               nodeBody.update( 0, headerH, w, h - headerH );
+               finder.resize( w, h - headerH );
        };
 }, false, true, 'Gallery', 'gallery', null, '#01A31C' );
 
index f24189c..3069f60 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * pettanR system.js
- *   version 0.5.18
+ *   version 0.5.19
  *
  * gadgetOS
  *   author:
@@ -1074,6 +1074,26 @@ var AbstractBasicPane = function(){
        };
 };
 
+var ApplicationPrivateDataClass = function(){
+       
+};
+ApplicationPrivateDataClass.prototype = {
+       appClass      : null,
+       application   : null,
+       displayName   : null,
+       isOverlay     : false,
+       rootElement   : null,
+       bgColor       : '#C1CACF',
+       uiList        : null,
+       finderList    : null,
+       layer         : null,
+       eventRoot     : null,
+       fetchResource : 0,
+       bootParams    : null,
+       phase         : 0,
+       cursor        : ''
+};
+
 var AbstractApplication = function( displayName, appClass, isOverlay ){
        var self          = null, // init で設定
                uiList        = [],
index 71e8452..c4dc403 100644 (file)
@@ -1,7 +1,7 @@
 @charset "UTF-8";\r
 \r
 /* pettanR peta.apps.css\r
- *   version 0.5.18\r
+ *   version 0.5.19\r
  * \r
  *   author:\r
  *     itozyun\r
                color:                          #fff;\r
                font-size:                      12pt;\r
                line-height:            1;\r
-               padding:                        6pt 0 6pt 5pt;\r
-       }\r
-       #cabinet-close-button, #gallery-close-button {\r
-               position:                       absolute;\r
-               right:                          0;\r
-               top:                            0;\r
-               border-left:            1px solid #666;\r
-               height:                         24pt;\r
-               padding:                        6pt 9pt 6pt 9pt;\r
-               text-align:                     center;\r
-               cursor:                         pointer;\r
+               padding:                        0;\r
        }\r
+               .header-title {\r
+                       padding : 6pt;\r
+               }\r
+               #cabinet-close-button, #gallery-close-button {\r
+                       position:                       absolute;\r
+                       right:                          0;\r
+                       top:                            0;\r
+                       border-left:            1px solid #666;\r
+                       height:                         24pt;\r
+                       padding:                        6pt 9pt 6pt 9pt;\r
+                       text-align:                     center;\r
+                       cursor:                         pointer;\r
+               }\r
+               .close-button-hover {\r
+                       background-color:       #333;\r
+               }\r
 \r
 /*--------------------------------------------------------------------------------------\r
  * \r