OSDN Git Service

client is varsion0.4.24, fixed finder icon for ie7-.
[pettanr/pettanr.git] / public / assets / system.js
index 9ffc788..4eae123 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * pettanR system.js
- *   version 0.4.23
+ *   version 0.4.24
  *   
  * author:
  *   itozyun
@@ -8,20 +8,6 @@
  *   3-clause BSD
  */
 
-
-pettanr.log = ( function(){
-       return {
-               init: function(){}
-       }
-})();
-
-pettanr.io = ( function(){
-       
-       return {
-               init: function(){}
-       }
-})();
-
 /*
  * 画像一覧は
  *     お気に入り画像一覧 > tag:ペン次郎 > ペン次郎:笑う
@@ -814,7 +800,11 @@ pettanr.file = ( function(){
 pettanr.finder = ( function(){
        var FINDER_ARRAY = [],
                ELM_ORIGIN_FINDER_LOCATION_ITEM = pettanr.util.pullHtmlAsTemplete( 'templete-finder-location-item'),
-               ELM_ORIGIN_FINDER_ICON = pettanr.util.pullHtmlAsTemplete( 'templete-finder-icon'),
+               ELM_ORIGIN_FINDER_ICON = ( function(){
+                               var forIE = pettanr.util.pullHtmlAsTemplete( 'templete-finder-icon-ie'),
+                                       modern = pettanr.util.pullHtmlAsTemplete( 'templete-finder-icon');
+                               return pettanr.ua.isIE === true && pettanr.ua.ieVersion < 8 ? forIE : modern;
+                       })(),
                ELM_ORIGIN_CONTAINER = pettanr.util.pullHtmlAsTemplete( 'templete-finder-container'),
                ICON_HEIGHT = pettanr.util.getElementSize( ELM_ORIGIN_FINDER_ICON).height,
                ICON_CLASSNAME = 'finder-icon-thumbnail',
@@ -833,14 +823,6 @@ pettanr.finder = ( function(){
                        file, w, index, style, instansce,
                        onDownCallback, onEditorCallback, onViewerCallback, onActionCallback,
                        viewerList, editorList;
-               ELM_WRAPPER.onmouseover = onOver;
-               function onOver(){
-                       ELM_WRAPPER.style.backgroundColor = '#eee';
-               }
-               ELM_WRAPPER.onmouseout = onOut;
-               function onOut(){
-                       ELM_WRAPPER.style.backgroundColor = '';
-               }
                
                ELM_WRAPPER.onclick = onDownClick;
                function onDownClick(){
@@ -886,7 +868,7 @@ pettanr.finder = ( function(){
                        };
                }
                function resize(){
-                       ELM_WRAPPER.style.top = (index * ICON_HEIGHT) +'px';
+                       // ELM_WRAPPER.style.top = (index * ICON_HEIGHT) +'px';
                }
                function onCollect(){
                        elmContainer.removeChild( ELM_WRAPPER );
@@ -1614,18 +1596,21 @@ pettanr.driver = ( function(){
 })();
 
 pettanr.entrance = pettanr.view.registerApplication( function(){
+       var wrap = document.getElementById('inner-wrapper'),
+               pageHeaderH = pettanr.util.getElementSize( document.getElementById( 'header' ) ).height,
+               instance = this;
        this.displayName = 'Home';
        this.ID          = 'Home';
        this.rootElement = document.getElementById('entrance');
        this.onOpen = function( _w, _h, _option ){
-               var pageHeaderH = pettanr.util.getElementSize( document.getElementById( 'header' ) ).height;
-               document.getElementById('inner-wrapper').style.height = ( _h - pageHeaderH ) + 'px';
+               wrap.style.display = '';
+               wrap.style.height = ( _h - pageHeaderH ) + 'px';
        }
        this.onClose = function(){
-               document.getElementById('inner-wrapper').style.height = '0px';
+               wrap.style.display = 'none';
        }
        this.onPaneResize = function( _w, _h){
-               this.onOpen( _w, _h );
+               instance.onOpen( _w, _h );
        }
 });
 pettanr.entrance.addToLancher();
@@ -1724,18 +1709,23 @@ if( pettanr.DEBUG === true){
                        elmDl.appendChild( elmDt);
                        elmDl.appendChild( elmDd);
                }
+               
+               var wrap = document.getElementById('inner-wrapper'),
+                       pageHeaderH = pettanr.util.getElementSize( document.getElementById( 'header' )).height,
+                       instance = this;
+               
                this.displayName = 'Debug';
                this.ID          = 'debug';
                this.rootElement = document.getElementById( 'debug' );
                this.onOpen = function( _w, _h, _option ){
-                       var pageHeaderH = pettanr.util.getElementSize( document.getElementById( 'header' )).height;
-                       document.getElementById( 'inner-wrapper' ).style.height = ( _h - pageHeaderH ) + 'px';
+                       wrap.style.display = '';
+                       wrap.style.height = ( _h - pageHeaderH ) + 'px';
                }
                this.onClose = function(){
-                       document.getElementById( 'inner-wrapper' ).style.height = '0px';
+                       wrap.style.display = 'none';
                }
                this.onPaneResize = function( _w, _h ){
-                       pettanr.debug.onOpen( _w, _h );
+                       instance.onOpen( _w, _h );
                }
        });
        pettanr.debug.addToLancher();
@@ -1814,8 +1804,8 @@ pettanr.premiumSatge = pettanr.view.registerApplication( function(){
                        elmIconTitle.firstChild.data = imgW + 'x' + imgH;
                        var zoom = 128 /( imgW > imgH ? imgW : imgH),
                                MATH_FLOOR = Math.floor
-                               h = MATH_FLOOR( imgH *zoom ),
-                               w = MATH_FLOOR( imgW *zoom );
+                               h = MATH_FLOOR( imgH *zoom ),
+                               w = MATH_FLOOR( imgW *zoom );
                        reversibleImage.elm.style.cssText = [
                                'width:', w, 'px;',
                                'height:', h +'px;',