OSDN Git Service

client is version0.4.21, brush up around boot application.
authoritozyun <itozyun@gmail.com>
Tue, 17 Apr 2012 12:31:22 +0000 (21:31 +0900)
committeritozyun <itozyun@gmail.com>
Tue, 17 Apr 2012 12:31:22 +0000 (21:31 +0900)
public/assets/common.js
public/assets/system.js
public/assets/work.js

index c37ca43..5369fd7 100644 (file)
@@ -1,6 +1,6 @@
 /*\r
  * pettanR common.js\r
- *   version 0.4.19\r
+ *   version 0.4.21\r
  * \r
  * author: itozyun\r
  */\r
@@ -108,7 +108,7 @@ var pettanr = ( function(){
                IS_DEBUG = Type.isBoolean( URL_PARAMS.debug ) ? URL_PARAMS.debug : IS_LOCAL === true,\r
                jqWindow , jqDocument , jqBody;\r
        return {\r
-               version: '0.4.19',\r
+               version: '0.4.21',\r
                init: function(){\r
                        jqWindow = $( window);\r
                        jqDocument = $( document);\r
@@ -845,26 +845,27 @@ pettanr.view = ( function(){
                currentApplication = null;\r
        \r
        var AbstractBasicPane = function(){\r
+               this.onPaneResize = function( _w, _h ){}\r
+               this.resize = function( _w, _h ){\r
+                       if( this.MIN_WIDTH > _w || this.MIN_HEIGHT > _h ){\r
+                               if( Type.isHTMLElement( this.rootElement ) === true ){\r
+                                       // 小さすぎる!、と表示\r
+                               }\r
+                               return;\r
+                       }\r
+                       this.onPaneResize( _w, _h );\r
+               }\r
+               this.MIN_WIDTH = 240;\r
+               this.MIN_HEIGHT = 240;\r
+       }\r
+       \r
+       var AbstractApplication = function(){\r
+               this.displayName = 'app name';\r
+               this.ID = 'app id';\r
                this.rootElement = null;\r
                this.parentElement = null;\r
                this.nextSibling = null;\r
-               this.onOpen = function( _w, _h /*, _option */ ){\r
-                       // overrride\r
-               };\r
-               this.onClose = function(){\r
-                       // overrride\r
-                       return true;\r
-               } // false の場合、close の拒否 \r
-               this.onPaneResize = function( _w, _h ){}\r
                this.open = function( _w, _h /*, _option */ ){\r
-                       if( this.nextSibling && this.nextSibling.parentNode === this.parentElement ){\r
-                               this.parentElement.insertBefore( this.rootElement, this.nextSibling );\r
-                       } else\r
-                       if( this.parentElement ){\r
-                               this.parentElement.appendChild( this.rootElement );\r
-                       } else {\r
-                               this.rootElement && document.body.appendChild( this.rootElement );\r
-                       }\r
                        if( this.MIN_WIDTH > _w || this.MIN_HEIGHT > _h ){\r
                                if( Type.isHTMLElement( this.rootElement ) === true ){\r
                                        // 小さすぎる!、と表示\r
@@ -879,72 +880,57 @@ pettanr.view = ( function(){
                }\r
                this.close = function(){\r
                        if( this.onClose() === false ){\r
-                               \r
+                               return;\r
                        }\r
                        if( this.rootElement && this.rootElement.parentNode ){\r
                                this.rootElement.parentNode.removeChild( this.rootElement );\r
                        }\r
                }\r
-               this.resize = function( _w, _h ){\r
-                       if( this.MIN_WIDTH > _w || this.MIN_HEIGHT > _h ){\r
-                               if( Type.isHTMLElement( this.rootElement ) === true ){\r
-                                       // 小さすぎる!、と表示\r
-                               }\r
-                               return;\r
-                       }\r
-                       this.onPaneResize( _w, _h );\r
-               }\r
-               this.MIN_WIDTH = 240;\r
-               this.MIN_HEIGHT = 240;\r
-       }\r
-       \r
-       var AbstractApplication = function(){\r
-               this.displayName = 'app name';\r
-               this.ID = 'app id';\r
+               this.onOpen = function( _w, _h /*, _option */ ){\r
+                       // overrride\r
+               };\r
+               this.onClose = function(){\r
+                       // overrride\r
+                       return true;\r
+               } // false の場合、close の拒否 \r
        }\r
        AbstractApplication.prototype = new AbstractBasicPane();\r
        \r
-       var ApplicationReference = function( _application ){\r
+       var ApplicationReference = function( application ){\r
                this.inOverlay = false;\r
+               this.getUID = function(){\r
+                       return pettanr.util.getIndex( APPLICATION_LIST, application );\r
+               }\r
                this.boot = function( /* _option */ ){\r
                        if( arguments.length > 0 ){\r
-                               bootApplication( _application, pettanr.util.copyArray( arguments ) );\r
+                               bootApplication( application, pettanr.util.copyArray( arguments ) );\r
                        } else {\r
-                               bootApplication( _application );\r
+                               bootApplication( application );\r
                        }\r
                }\r
                this.bootInOverlay = function( /* _option */ ){\r
                        this.inOverlay = true;\r
-                       pettanr.overlay.show( _application );\r
-                       \r
-                       if( arguments.length > 0 ){\r
-                               var _arguments = pettanr.util.copyArray( arguments );\r
-                               _arguments.unshift( jqWindow.width(), jqWindow.height() )\r
-                               // argumentsRellay( _application.open, _arguments );\r
-                               _application.open.apply( _application, _arguments );\r
-                       } else {\r
-                               _application.open( jqWindow.width(), jqWindow.height() );\r
-                       }\r
+                       pettanr.overlay.show( application, pettanr.util.copyArray( arguments ) );\r
                }\r
                this.shutdown = function(){\r
                        if( this.inOverlay === true ){\r
                                pettanr.overlay.hide();\r
-                               _application.close();\r
+                               application.close();\r
                                this.inOverlay = false;\r
                        } else {\r
                                bootApplication( 0 );\r
                        }\r
                }\r
                this.addToLancher = function(){\r
-                       if( pettanr.util.getIndex( LUNCHER_APPLICATION_LIST, _application ) !== -1 ) return;\r
-                       LUNCHER_APPLICATION_LIST.push( _application );\r
+                       if( pettanr.util.getIndex( LUNCHER_APPLICATION_LIST, application ) !== -1 ) return;\r
+                       LUNCHER_APPLICATION_LIST.push( application );\r
        \r
                        var navi = document.getElementById('global-navi'),\r
                                item = document.createElement('a');\r
                        navi.appendChild( item );\r
                        navi.style.width = ( ( item.offsetWidth || 80 ) * LUNCHER_APPLICATION_LIST.length ) + 'px';\r
                        item.href = '#';\r
-                       item.appendChild( document.createTextNode( _application.displayName ));\r
+                       item.appendChild( document.createTextNode( application.displayName ));\r
                        item.onclick = LoginUserNavi.show;\r
                }\r
        }\r
@@ -988,11 +974,18 @@ pettanr.view = ( function(){
                }\r
                \r
                if( currentApplication === _application ) return;\r
-               \r
                currentApplication && currentApplication.close();\r
-\r
                currentApplication = _application;\r
                \r
+               if( _application.nextSibling && _application.nextSibling.parentNode === _application.parentElement ){\r
+                       _application.parentElement.insertBefore( _application.rootElement, _application.nextSibling );\r
+               } else\r
+               if( _application.parentElement ){\r
+                       _application.parentElement.appendChild( _application.rootElement );\r
+               } else {\r
+                       _application.rootElement && document.body.appendChild( _application.rootElement );\r
+               }\r
+                       \r
                if( _arguments ){\r
                        _arguments.unshift( jqWindow.width(), jqWindow.height() );\r
                        _application.open.apply( _application, _arguments );\r
@@ -1024,8 +1017,8 @@ pettanr.view = ( function(){
        function onWindowResize(){\r
                var w = jqWindow.width(),\r
                        h = jqWindow.height();\r
-               currentApplication && currentApplication.resize && currentApplication.resize( w, h );\r
-               pettanr.overlay.currentID !== null && pettanr.overlay.onWindowResize( w, h );\r
+               currentApplication && currentApplication.resize( w, h );\r
+               pettanr.overlay.onWindowResize( w, h );\r
        }\r
 \r
        return {\r
@@ -1034,7 +1027,9 @@ pettanr.view = ( function(){
                        jqWindow.resize( onWindowResize );\r
                        \r
                        var _option = {}; // urlパラメータ\r
-\r
+                       \r
+                       onWindowResize();\r
+                       \r
                        bootApplication( pettanr.URL_PARAMS.view || 0 );\r
                        \r
                        delete pettanr.view.init;\r
@@ -1082,12 +1077,13 @@ pettanr.overlay = ( function(){
                ELM_CONTAINER = document.getElementById( 'overlay-container' ),\r
                jqConteiner, jqShadow, jqCloseButton,// jqBody, \r
                currentOverlay = null,\r
+               bootParams = null,\r
                visible = false,\r
                windowW, windowH;\r
 \r
        function close(){\r
                currentOverlay && currentOverlay.close();\r
-               pettanr.overlay.hide();         \r
+               pettanr.overlay.hide();\r
        }\r
        function asyncResize(){\r
                currentOverlay.resize( windowW, windowH);\r
@@ -1098,7 +1094,7 @@ pettanr.overlay = ( function(){
                return false;           \r
        }\r
        function onFadeInComplete(){\r
-               \r
+\r
        }\r
        function onFadeOutComplete(){\r
                if( currentOverlay.rootElement && currentOverlay.rootElement.parentNode === ELM_CONTAINER ){\r
@@ -1117,23 +1113,31 @@ pettanr.overlay = ( function(){
                        \r
                        delete pettanr.overlay.init;\r
                },\r
-               show: function( _overlay ){\r
+               show: function( _overlay, _bootParams ){\r
                        if( visible === true && currentOverlay === _overlay ) return;\r
                        if( pettanr.view.isApplicationInstance( _overlay ) === false ) return;\r
                        \r
                        document.body.style.overflow = 'hidden';\r
-                       ELM_CONTAINER.insertBefore( _overlay.rootElement, document.getElementById( 'overlay-close-button' ));\r
                        \r
+                       this.visible = visible = true;\r
+                       this.currentID = _overlay.ID;\r
+                       currentOverlay = _overlay;\r
+                       bootParams = _bootParams;\r
+\r
                        jqConteiner.stop().css( {\r
                                filter:         '',\r
                                opacity:        '',\r
                                top:            document.documentElement.scrollTop || document.body.scrollTop\r
                        }).fadeIn( onFadeInComplete );\r
-                       \r
-                       this.visible = visible = true;\r
-                       currentOverlay = _overlay;\r
-                       this.currentID = _overlay.ID;\r
-                       // jqCloseButton.toggle( !!_overlay.onClose );\r
+\r
+                       ELM_CONTAINER.insertBefore( currentOverlay.rootElement, document.getElementById( 'overlay-close-button' ));\r
+       \r
+                       if( Type.isArray( bootParams ) === true ){\r
+                               bootParams.unshift( windowW, windowH )\r
+                               currentOverlay.open.apply( currentOverlay, bootParams );\r
+                       } else {\r
+                               currentOverlay.open( windowW, windowH, bootParams );\r
+                       }\r
                },\r
                hide: function(){\r
                        if( visible === false) return;\r
@@ -1148,33 +1152,18 @@ pettanr.overlay = ( function(){
                visible: visible,\r
                currentID: null,\r
                onWindowResize: function( _windowW, _windowH ){\r
+                       windowW = _windowW;\r
+                       windowH = _windowH;                     \r
+                       \r
+                       if( currentOverlay === null ) return;\r
+                       \r
                        jqConteiner.css({\r
                                height:         _windowH,\r
                                top:            document.documentElement.scrollTop || document.body.scrollTop\r
                        });\r
-                       jqShadow.css( { height: _windowH});\r
-                       windowW = _windowW;\r
-                       windowH = _windowH;\r
+                       jqShadow.css( { height: _windowH });\r
                        // 先にeditorのcanvasを確定する。\r
-                       currentOverlay && setTimeout( asyncResize, 0);\r
-               },\r
-               registerOverlay: function( _basicPane){\r
-                       var _api = pettanr.view.createBasicPane( _basicPane );\r
-                       // OverlayAPI\r
-                       return {\r
-                               show: function( _basicPane ){\r
-                                       \r
-                               },\r
-                               hide: function( _basciPane ){\r
-                                       \r
-                               },\r
-                               isCurrent: function( _basicPane ){\r
-                                       \r
-                               }\r
-                       }\r
-               },\r
-               isOverlay: function( _basicPane ){\r
-                       \r
+                       setTimeout( asyncResize, 0);\r
                }\r
        }\r
 })();\r
index 22c8c97..7710a75 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * pettanR system.js
- *   version 0.4.20
+ *   version 0.4.21
  *   
  * author:
  *   itozyun
@@ -388,6 +388,14 @@ pettanr.file = ( function(){
                        }
                        return -1;
                },
+               getChildFileByIndex: function( _index ){
+                       var _access = FILE_CONTROLER.getFileDataAccess( this ),
+                               _children = FILE_CONTROLER.getChildren( this );
+                       if( typeof _index !== 'number' || _index < 0 || Type.isArray( _children ) === false || _index >= _children.length) return null;
+                       var _file = new FileClass( _access.TREE, _access.DATA, _children[ _index ]);
+                       // _file.init();
+                       return _file;
+               },
                getName: function(){
                        var driver = FILE_CONTROLER.getDriver( this );
                        if( typeof driver.getName === 'function'){
@@ -473,14 +481,6 @@ pettanr.file = ( function(){
                onDelete: function(){
                        
                },
-               getChildFileByIndex: function( _index ){
-                       var _access = FILE_CONTROLER.getFileDataAccess( this ),
-                               _children = FILE_CONTROLER.getChildren( this );
-                       if( typeof _index !== 'number' || _index < 0 || Type.isArray( _children ) === false || _index >= _children.length) return null;
-                       var _file = new FileClass( _access.TREE, _access.data, _children[ _index ]);
-                       // _file.init();
-                       return _file;
-               },
                move: function( _newFolder, _newIndex, opt_callback ){
                        var _access = FILE_CONTROLER.getFileDataAccess( this );
                        _access.TREE.move( _access.parentData, this.getUID(), _newFolder, _newIndex, opt_callback );
@@ -891,7 +891,7 @@ pettanr.finder = ( function(){
                                
                        },
                        destroy: function(){
-                               elmContainer.removeChild( ELM_WRAPPER);
+                               elmContainer.removeChild( ELM_WRAPPER );
                                file && file.destroy();
                                file = elmContainer = onDownCallback = onEditorCallback = onViewerCallback = onActionCallback = viewerList = editorList = null;
                                FINDER_ICON_POOL.push( instansce);
@@ -978,6 +978,7 @@ pettanr.finder = ( function(){
                        instance = this;
                        
                tree.addTreeEventListener( pettanr.file.TREE_EVENT.UPDATE, draw );
+               ELM_CONTAINER.appendChild( elmContainer );
                
                function draw( _w, _h ){
                        w = Type.isFinite( _w ) === true ? _w : w;
@@ -1057,20 +1058,16 @@ pettanr.finder = ( function(){
                this.init = function(){
                        //$( elmLocation).click( onHeadClick);
                        //$( elmContainer).click( onBodyClick);
-                       var position = pettanr.util.getAbsolutePosition( elmLocation);
+                       var position = pettanr.util.getAbsolutePosition( elmLocation );
                        headX = position.x;
                        headY = position.y;
                        bodyY = pettanr.util.getAbsolutePosition( elmBody ).y;
                        delete instance.init;
                }
-               this.onOpen = function( _w, _h, _option ){
-                       instance.init && instance.init();
-                       draw( _w, _h );
-               }
-               this.onClose = function(){
-                       return true;
-               }
                this.onPaneResize = function( _w, _h ){
+                       instance.init && instance.init();
+                       draw( _w, _h );                 
+                       
                        w = _w;
                        h = _h;
                        elmBody.style.height = ( _h - headH ) + 'px';
@@ -1108,7 +1105,9 @@ pettanr.finder = ( function(){
                init: function(){
                        
                },
-               createFinder: function( _elmTarget, _tree, _header, _footer ){
+               createFinder: function( _applicationReference, _elmTarget, _tree, _header, _footer ){
+                       if( pettanr.view.isApplicationReference( _applicationReference ) === false ) return;
+                       
                        var _finder = new FinderClass( _elmTarget, _tree, _header, _footer );
                        FINDER_ARRAY.push( _finder );
                        return _finder;
@@ -1294,7 +1293,8 @@ pettanr.driver = ( function(){
                        name:           'My Comics',
                        type:           pettanr.file.FILE_TYPE.FOLDER,
                        children:       [],
-                       driver:         Driver
+                       driver:         Driver,
+                       id:                     MyAuthorID
                },
                FILE_DATA_LATEST_COMICS = {
                        name:           'Latest Comics',
@@ -1306,7 +1306,8 @@ pettanr.driver = ( function(){
                        type:           pettanr.file.FILE_TYPE.FOLDER,
                        children:       [],
                        driver:         Driver,
-                       json:           pettanr.CONST.URL_ORIGINAL_PICTURES_JSON
+                       json:           pettanr.CONST.URL_ORIGINAL_PICTURES_JSON,
+                       id:                     MyArtistID
                },
                FILE_DATA_AUTHOR_ROOT = {
                        name:           'Authors',
@@ -1506,7 +1507,11 @@ pettanr.driver = ( function(){
                        if( _artist){
                                _data.artist = _artist = buildFileData( _artist, FILE_DATA_ARTIST_ROOT );
                                addChildData( _artist, _data );
-                               _artist.id === MyArtistID && addChildData( FILE_DATA_MY_PICTURES_ROOT, _data );
+                               if( _artist.id === MyArtistID ){
+                                       addChildData( FILE_DATA_MY_PICTURES_ROOT, _data );
+                                       //FILE_DATA_MY_PICTURES_ROOT.type = pettanr.driver.FILE_TYPE.ARTIST;
+                                       //FILE_DATA_MY_PICTURES_ROOT.id = MyArtistID;
+                               }
                        }
                }
                return _data;
@@ -1549,6 +1554,9 @@ pettanr.driver = ( function(){
                _getAPI: function(){
                        return FileAPI;
                },
+               _getMyPicturesData: function(){
+                       return FILE_DATA_MY_PICTURES_ROOT;
+               },
                FILE_TYPE: {
                        COMIC:                          FileAPI.createFileTypeID(),
                        PANEL:                          FileAPI.createFileTypeID(),
@@ -1588,12 +1596,12 @@ pettanr.cabinet = pettanr.view.registerApplication( function(){
        this.displayName = 'Comic list';
        this.ID          = 'Comiclist';
        this.rootElement = elmContainer;
-       this.onOpen = function( _w, _h, _option ){
-               finder = finder || pettanr.finder.createFinder( elmContainer, pettanr.driver.createComicTree() );
-               finder.open( _w, _h - pageHeaderH, _option );
+       this.onOpen = function( _w, _h ){
+               finder = finder || pettanr.finder.createFinder( pettanr.cabinet, elmContainer, pettanr.driver.createComicTree() );
+               finder.resize( _w, _h - pageHeaderH );
        }
        this.onClose = function(){
-               finder.close();
+               // finder.close();
        }
        this.onPaneResize = function( _w, _h){
                finder.resize( _w, _h - pageHeaderH );
@@ -1610,12 +1618,12 @@ pettanr.gallery = pettanr.view.registerApplication( function(){
        this.displayName = 'Pictures';
        this.ID          = 'pictures';
        this.rootElement = elmContainer;
-       this.onOpen = function( _w, _h, _option ){
-               finder = finder || pettanr.finder.createFinder( elmContainer, pettanr.driver.createPictureTree() );
-               finder.open( _w, _h - pageHeaderH, _option );
+       this.onOpen = function( _w, _h ){
+               finder = finder || pettanr.finder.createFinder( pettanr.gallery, elmContainer, pettanr.driver.createPictureTree() );
+               finder.resize( _w, _h - pageHeaderH );
        }
        this.onClose = function(){
-               finder.close();
+               // finder.close();
        }
        this.onPaneResize = function( _w, _h){
                finder.resize( _w, _h - pageHeaderH );
@@ -1858,9 +1866,9 @@ pettanr.premiumSatge = pettanr.view.registerApplication( function(){
                var _data, _artistID = -1;
                
                if( pettanr.driver.isPettanrFileInstance( _ARTISTIDorFILE ) === true ){
-                       if( _ARTISTIDorFILE.getType() === pettanr.driver.FILE_TYPE.ARTIST ){
-                               _data = pettanr.driver._getAPI().getFileData( _ARTISTIDorFILE );
-                               _artistID = _data !== null ? _data.id || 0 : -1;
+                       _data = pettanr.driver._getAPI().getFileData( _ARTISTIDorFILE );
+                       if( _ARTISTIDorFILE.getType() === pettanr.driver.FILE_TYPE.ARTIST || pettanr.driver._getMyPicturesData() === _data ){
+                               _artistID = _data.id || -1;
                        }
                } else
                if( Type.isNumber( _ARTISTIDorFILE ) === true ){
index 84e4a21..8433a9a 100644 (file)
@@ -1,6 +1,6 @@
 /*\r
  * pettanR work.js\r
- *   version 0.4.19\r
+ *   version 0.4.21\r
  *   \r
  * author:\r
  *   itozyun\r
@@ -881,8 +881,8 @@ pettanr.editor = pettanr.view.registerApplication( function(){
                                        delete this.onInit;\r
                                },\r
                                onOpen: function( _w, _h){\r
-                                       finder = finder || pettanr.finder.createFinder( document.getElementById( 'image-exproler-container'), pettanr.driver.createPictureTree());\r
-                                       finder.open( _w, _h );\r
+                                       finder = finder || pettanr.finder.createFinder( pettanr.editor, document.getElementById( 'image-exproler-container'), pettanr.driver.createPictureTree());\r
+                                       finder.resize( _w, _h );\r
                                },\r
                                onResize: function( _w, _h ){\r
                                        finder.resize( _w, _h );\r
@@ -3145,7 +3145,7 @@ pettanr.comicConsole = pettanr.view.registerApplication( function(){
        this.MIN_WIDTH   = 320;\r
        this.MIN_HEIGHT  = 320;\r
        this.init = function(){\r
-               instance.jqWrap = jqWrap = $( '#comic-console-wrapper').hide();\r
+               jqWrap = $( '#comic-console-wrapper').hide();\r
                $( '#comic-console-post-button').click( clickOK );\r
                $( '#comic-console-cancel-button').click( clickCancel );\r
                \r
@@ -3158,7 +3158,6 @@ pettanr.comicConsole = pettanr.view.registerApplication( function(){
                \r
                delete instance.init;\r
        }\r
-       this.jqWrap = null;\r
        this.onOpen = function( w, h ){\r
                instance.init && instance.init();\r
                \r
@@ -3187,8 +3186,8 @@ pettanr.comicConsole = pettanr.view.registerApplication( function(){
        this.onPaneResize = function( _windowW, _windowH){\r
                jqWrap.css(\r
                        {\r
-                               left:   Math.floor( ( _windowW -jqWrap.width()) /2),\r
-                               top:    Math.floor( ( _windowH -jqWrap.height()) /2)\r
+                               left:   Math.floor( ( _windowW - jqWrap.width()) /2),\r
+                               top:    Math.floor( ( _windowH - jqWrap.height()) /2)\r
                        }\r
                );\r
        }\r
@@ -3315,13 +3314,12 @@ pettanr.uploadConsole = pettanr.view.registerApplication( function(){
        this.MIN_WIDTH   = 320;\r
        this.MIN_HEIGHT  = 320;\r
        this.init = function(){\r
-               instance.jqWrap = jqWrap = $( '#upload-console-wrapper').hide();\r
+               jqWrap = $( '#upload-console-wrapper').hide();\r
                $( '#upload-console-post-button').click( clickOK );\r
                $( '#upload-console-cancel-button').click( clickCancel );\r
 \r
                delete instance.init;\r
        }\r
-       this.jqWrap = null;\r
        this.onOpen = function( w, h){\r
                instance.init && instance.init();\r
                /*\r
@@ -3469,13 +3467,12 @@ pettanr.panelConsole = pettanr.view.registerApplication( function(){
        this.MIN_WIDTH   = 320;\r
        this.MIN_HEIGHT  = 320;\r
        this.init = function(){\r
-               instance.jqWrap = jqWrap = $( '#panel-console-wrapper').hide();\r
+               jqWrap = $( '#panel-console-wrapper').hide();\r
                $( '#panel-console-post-button').click( clickOK );\r
                $( '#panel-console-cancel-button').click( clickCancel );\r
 \r
                delete instance.init;\r
        }\r
-       this.jqWrap = null;\r
        this.onOpen = function( w, h ){\r
                instance.init && instance.init();\r
                /*\r
@@ -3623,13 +3620,12 @@ pettanr.artistConsole = pettanr.view.registerApplication( function(){
        this.MIN_WIDTH   = 320;\r
        this.MIN_HEIGHT  = 320;\r
        this.init = function(){\r
-               instance.jqWrap = jqWrap = $( '#artist-console-wrapper').hide();\r
+               jqWrap = $( '#artist-console-wrapper').hide();\r
                $( '#artist-console-post-button').click( clickOK );\r
                $( '#artist-console-cancel-button').click( clickCancel );\r
 \r
                delete instance.init;\r
        }\r
-       this.jqWrap = null;\r
        this.onOpen = function( w, h ){\r
                instance.init && instance.init();\r
                /*\r
@@ -3696,19 +3692,18 @@ pettanr.outputConsole = pettanr.view.registerApplication( function(){
        this.MIN_WIDTH   = 320;\r
        this.MIN_HEIGHT  = 320;\r
        this.init = function(){\r
-               instance.jqWrap = jqWrap = $( '#output-console-wrapper').hide();\r
+               jqWrap = $( '#output-console-wrapper').hide();\r
                jqOutputArea = $( '#output-area');\r
                delete instance.init;\r
        }\r
-       this.jqWrap = null;\r
        this.onOpen = function( _w, _h, _text ){\r
                instance.init && instance.init();\r
                \r
                jqWrap.show();\r
-               instance.onWindowResize( _w, _h );\r
+               instance.onPaneResize( _w, _h );\r
                jqOutputArea.val( _text).focus();\r
        }\r
-       this.onWindowResize = function( _w, _h){\r
+       this.onPaneResize = function( _w, _h){\r
                jqWrap.css(\r
                        {\r
                                left:   Math.floor( ( _w -jqWrap.width()) /2),\r