OSDN Git Service

version 0.5.38, update detaile page.
authoritozyun <itozyun@gmail.com>
Wed, 2 Jan 2013 13:37:37 +0000 (22:37 +0900)
committeritozyun <itozyun@gmail.com>
Wed, 2 Jan 2013 13:37:37 +0000 (22:37 +0900)
0.5.x/javascripts/peta.apps.js
0.5.x/javascripts/system.js
0.5.x/stylesheets/system.css

index d21ca21..a15e85a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * pettanR peta.apps.js
- *   version 0.5.34
+ *   version 0.5.38
  *   
  * author:
  *   itozyun
                                        return [ Editor ];
                                }
                                if( _type === FILE_TYPE.COMIC ){
-                                       return [Editor, ComicConsole ];
+                                       return [ Editor, ComicConsole ];
                                }
                                return [];
                        }
@@ -853,15 +853,14 @@ var PremiumSatge = gOS.registerApplication( function(){
                self.addEventListener( elmButton, 'click', clickClose );
                tree.addTreeEventListener( Const.TREE.EVENT.UPDATE, drawIcons );
                
-               if( Driver.isPettanrFileInstance( _ARTISTIDorFILE ) === true ){
-                       var _data = FileAPI.getFileData( _ARTISTIDorFILE );
-                       if( _ARTISTIDorFILE.getType() === FILE_TYPE.ARTIST || FILE_DATA_MY_PICTURES_ROOT === _data ){
-                               artistID = _data.id || -1;
-                       }
+               var data = FileAPI.getFileData( _ARTISTIDorFILE );
+               if( data.type === FILE_TYPE.ARTIST || FILE_DATA_MY_PICTURES_ROOT === data ){
+                       artistID = data.id || -1;
                } else
                if( Type.isNumber( _ARTISTIDorFILE ) === true ){
+                       alert( _ARTISTIDorFILE )
                        artistID = _ARTISTIDorFILE;
-               }
+               };
                
                onUpdate = _onUpdate || null;
                onUpdateContext = opt_thisObj || null;
index 64a6830..4731aee 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * pettanR system.js
- *   version 0.5.37
+ *   version 0.5.38
  *
  * gadgetOS
  *   author:
                }
        };
 
+/**
+ * Class を定義し システムの管理下に置く.
+ * 全てのクラスと pool が有効の場合インスタンスへの参照が保持される.
+ *  1. Class.create( def, opt_final, opt_pool, opt_abstract ) でクラスを登録.
+ *  2. コンストラクタ となるメソッドは、Constructor : function( arg ){ ... }, に書く.
+ *  3. 通常通り new で インスタンス生成
+ *  4. kill() でオブジェクトをクリーンして削除、pool が有効の場合は pool される.
+ *  5. pool が有効の場合、new で pool されたインスタンスが返される.
+ *  6. 
+ * 
+ */
 var Class = ( function(){
-       var CLASS_LIST = [];
+       var CLASS_LIST   = [],
+               DEF_LIST     = [],
+               PRIVATE_LIST = [];
        
        function getClass( instance ){
                var list     = CLASS_LIST,
                        i        = list.length,
                        getIndex = Util.getIndex,
-                       klass;
+                       klass, def, live, pool;
                for( ; i; ){
                        klass = list[ --i ];
-                       if( klass.live && getIndex( klass.live, instance ) !== -1 ) return klass;
-                       if( klass.pool && getIndex( klass.pool, instance ) !== -1 ) return klass;
+                       def   = getDef( klass );
+                       if( def.live && getIndex( def.live, instance ) !== -1 ) return klass;
+                       if( def.pool && getIndex( def.pool, instance ) !== -1 ) return klass;
                        if( instance instanceof klass ) return klass;
                };
-               return null;
+               throw new Error( 'Class not found!' );
        };
        
-       function clone( src ){
-               var ret, key;
-               if( Type.isArray( src ) === true ){
-                       ret = [];
-               } else
-               if( Type.isObject( src ) === true ){
-                       ret = {};
-               } else
-               if( Type.isNumber( src ) === true || Type.isString( src ) === true || Type.isBoolean( src ) === true ){
-                       return src;
-               } else {
-                       return null;
-               };
-               for( key in src ){
-                       ret[ key ] = clone( src[ key ]);
-               };
-               return ret;
+       function getDef( klass ){
+               var i = Util.getIndex( CLASS_LIST, klass );
+               if( i !== -1 ) return DEF_LIST[ i ];
        };
        
-       function copy( base, extend ){
-               for( var key in extend ){
-                       base[ key ] = extend[ key ];
+       /* over のプロパティを target にコピーする.ただし target の プロパティが優先, force で解除 */
+       function override( target, over, force ){
+               for( var p in over ){
+                       if( force === true || typeof target[ p ] === 'undefined' ){
+                               target[ p ] = over[ p ];
+                       };
                };
-               return base;
+               return target;
        };
        
-       function extend(){
-               
+       /* サブクラスを作るメソッド  
+        * var subClass = superClass.inherits( ... ) 
+        * http://d.hatena.ne.jp/m-hiyama/20051018/1129605002
+        */
+       function inherits( def, opt_pool, opt_abstract, opt_final, opt_super, opt_PrivateClass ){
+               var Super = this,
+                       def   = getDef( Super ),
+                       Traits, klass;
+               abstractFlag = false;
+               Traits       = new Super;
+               abstractFlag = true;
+               klass = Class.create( override( Traits, def, true ), opt_pool, opt_abstract, opt_final, opt_PrivateClass );
+               if( opt_super === true ){
+                       def.Super = Super.prototype;
+               };
+               return klass;
        };
        
+       /* Class.create で作られたクラスのインスタンスが共通で備えるメソッド */
        var basic = {
-               clear : function(){
-                       var o = this,
+               kill : function(){
+                       var instance = this,
                                p, v,
-                               klass = getClass( o );
-                       for( p in o ){
-                               if( o.hasOwnProperty && !o.hasOwnProperty( p ) ) continue;
-                               v = o[ p ];
-                               delete o[ p ];
+                               klass = getClass( instance ),
+                               def   = getDef( klass ),
+                               privateData, i;
+                       Type.isFunction( o.onKill ) === true && o.onKill();
+                       
+                       for( p in instance ){
+                               if( instance.hasOwnProperty && !instance.hasOwnProperty( p ) ) continue;
+                               v = instance[ p ];
+                               delete instance[ p ];
+                       };
+                       if( def.pool ){
+                               klass.live.splice( Util.getIndex( klass.live, instance ), 1 );
+                               klass.pool.push( instance );
                        };
-                       if( klass && klass.pool ){
-                               klass.live.splice( Util.getIndex( klass.live, o ), 1 );
-                               klass.pool.push( o );
+                       if( def.privateClass ){
+                               privateData = instance.getPrivateData();
+                               privateData && privateData.kill();
+                       };
+                       if( def.isPrivate === true ){
+                               i = Util.getIndex( def.dataList, instance );
+                               def.dataList.splice( i, 1 );
+                               def.userList.splice( i, 1 );
                        };
                }
        };
+       /* privateDataclass をもつクラスに追加されるメソッド */
+       function newPrivateData( instance /*, args */ ){
+               var klass = getDef( getClass( instance ) ).privateClass,
+                       def   = getDef( klass ),
+                       i     = Util.getIndex( def.userList, instance ),
+                       args  = c( arguments ),
+                       data;
+               if( i === -1 ){
+                       throw new Error( 'Private already exist!' );
+               };
+               privateFlag = false;
+               args.unshift();
+               data = I.apply( klass, args );
+               privateFlag = false;
+               def.dataList.push( data );
+               def.userList.push( instance );
+               return data;
+       };
+       function getPrivateData( instance ){
+               var klass = getDef( getClass( instance ) ).privateClass,
+                       def   = getDef( klass ),
+                       i     = Util.getIndex( def.userList, instance );
+               if( i !== -1 ) return def.userList[ i ];
+       };
        
-       var f = true;
-       var c = Util.copyArray;
-       var a;
+       /*
+        * new の実体.コンストラクタの機能は instance.Constructor に書く.
+        * これにより pool された オブジェクト(破棄されたインスタンス) を再利用できる
+        */
+       var abstractFlag = true,
+               privateFlag  = true,
+               f = true,
+               c = Util.copyArray,
+               a, dataUser;
        function I(){
                var klass = this,
+                       def   = getDef( klass ),   
                        instance;
-               if( klass.Abstract === true ){
-                       throw new Error( 'AbstractClass!' );
+               if( def.abstract === true ){
+                       if( abstractFlag === true ){
+                               throw new Error( 'AbstractClass!' );
+                       };
+                       f = false;
+                       instance = new klass();
+                       f = true;
+                       return instance;
                };
-               if( klass.pool && klass.pool.length > 0 ){
-                       instance = klass.pool.shift();
+               if( def.isPrivate === true && privateFlag === true ){
+                       throw new Error( 'use class.newPrivateData( instance, args )!' );
+               };              
+               if( def.pool && def.pool.length > 0 ){
+                       instance = def.pool.shift();
                } else {
                        f = false;
                        instance = new klass();
                        f = true;
                };
-               if( klass._super ){
-                       instance._super = klass._super.prototype;
+               if( def.Super ){
+                       instance.Super = def.Super;
                };
-               instance.init && instance.init.apply( instance, c( arguments ) );
-               klass.live && klass.live.push( instance );
+               instance.Constructor && instance.Constructor.apply( instance, c( arguments ) );
+               def.live && def.live.push( instance );
                return instance;
        };
        
        return {
-               create : function( def, opt_final, pool, opt_abstract ){
+               create : function( def, opt_pool, opt_abstract, opt_final, opt_PrivateClass ){
                        var klass = function(){
-                               a = arguments;
-                               if( f ) return I.apply( a.callee, c( a ) );
+                                       a = arguments;
+                                       if( f ) return I.apply( a.callee, c( a ) );
+                               },
+                               def   = {},
+                               _def;
+                       klass.prototype = override( def, basic, false );
+                       if( opt_final === true && opt_abstract === true ){
+                               throw new Error( 'final & Abstract!' );
                        };
-                       klass.prototype = copy( copy( {}, basic ), def );
                        if( opt_final !== true ){
-                               klass.extend = extend;
-                       };
-                       if( pool === true ){
-                               klass.pool = [];
-                               klass.live = [];
+                               klass.inherits = inherits;
                        };
                        if( opt_abstract === true ){
-                               klass.Abstract = true;
+                               def.abstract = true;
+                       } else 
+                       if( opt_pool === true ){
+                               def.pool = [];
+                               def.live = [];
+                       };
+                       if( opt_PrivateClass ){
+                               _def = getDef( opt_PrivateClass );
+                               if( !_def || _def.isPrivate !== true ){
+                                       throw new Error( 'PrivateClass not found! please, Class.createPrivateData().' );
+                               };
+                               def.privateClass  = opt_PrivateClass;
+                               klass.newPrivateData = newPrivateData;
+                               klass.getPrivateData = getPrivateData;
                        };
                        CLASS_LIST.push( klass );
+                       DEF_LIST.push( def );
+                       return klass;
+               },
+               createPrivateData : function( def, opt_abstract, opt_final ){
+                       var klass = Class.create( def, true, opt_abstract, opt_final ),
+                               def   = getDef( klass );
+                       def.isPrivate = true;
+                       def.userList  = [];
+                       def.dataList  = [];
                        return klass;
+               },
+               onShutdown : function(){
+                       
                }
        };
 })();
@@ -329,7 +426,7 @@ var SystemTimer = ( function(){
                        };
                    update();
                }
-       }
+       };
 })();
 
 /* --------------------------------------------------------------
@@ -1510,7 +1607,7 @@ var PointingDeviceEventTree = ( function(){
        };
 
        /**
-        * clip : true の場合、子ノードの変更によってヒットエリアを変化させない.elm には overflow:hidden としておくのが通常.
+        * clip : true の場合、子ノードの変更によってヒットエリアを変化させない.elm には overflow:hidden としておくのが通常.
         */
        var NodePrivateData = function(){};
        NodePrivateData.prototype = {
@@ -1947,6 +2044,7 @@ var PointingDeviceEventTree = ( function(){
                                list  = NodePrivateData.dataList,
                                node;
                        this.removeEventListener();
+                       ScrollBarManager.remove( this );
                        if( nodes ){
                                while( node = nodes.shift() ) node._destroy();
                                delete this.childData;
@@ -2196,6 +2294,12 @@ var PointingDeviceEventTree = ( function(){
                                        smoothList.length === 0 && SystemTimer.add( SUPER_USER_KEY, tick, 16 );
                                        smoothList.push( data );
                                };
+                       },
+                       remove : function( data ){
+                               var list = smoothList,
+                                       i    = Util.getIndex( list, data );
+                               data === currentNodeData && scrollRelease();
+                               i !== -1 && list.splice( i, 1 );
                        }
                };
        })();
@@ -2278,10 +2382,12 @@ var Application = ( function(){
                function asyncBoot(){
                        application = Application.boot( appClass, displayName, self.getUID(), isOverlay, Util.copyArray( arguments ) );
                };
-               
                this.getUID = function(){
                        return Util.getIndex( API_USER_LIST, appClass );
                };
+               this.getDisplayName = function(){
+                       return this.displayName;
+               };
                this.boot = function( /* _option */ ){
                        AsyncCall.add( this, asyncBoot, Util.copyArray( arguments ) );
                };
@@ -4003,6 +4109,10 @@ var UI = ( function(){
                        var list = UIItemPrivateData.list;
                        list.splice( Util.getIndex( list, this ), 1 );
                        
+                       list = this.groupData.itemList;
+                       var i = Util.getIndex( list, this.item );
+                       i !== -1 && list.splice( i, 1 );
+                       
                        this.node && this.node.remove();
                }
        };
@@ -4909,7 +5019,6 @@ var UIForm = ( function(){
                                                                wrap.appendChild( form );
                                                                data.init( this, this.ui.createFileInput( el, data.onUpdate, null, form ) );
                                                                this.itemList.push( data );
-                                                               // alert( i )
                                                                break;
                                                        case 'button':
                                                                break;
@@ -5006,14 +5115,12 @@ var UIForm = ( function(){
 var Finder = ( function(){
        var FINDER_LIST              = [],
                ELM_ORIGIN_LOCATION_ITEM = Util.pullHtmlAsTemplete( '<div class="finder-location-item"></div>' ),
-               ICON_CLASSNAME           = 'finder-icon-thumbnail';
-       
-       var HTML_FINDER_ICON = ( function(){
+               HTML_FINDER_ICON = ( function(){
                        return ( UA.isIE === true && UA.ieVersion < 8 ?
                        [
                                '<div class="finder-icon fnder-icon-ie7">',
-                                       '<span class="finder-icon-handle"></span>',
-                                       '<span class="' + ICON_CLASSNAME + '"></span>',
+                                       '<div class="finder-icon-handle"></div>',
+                                       '<div class="file-icon"><div></div></div>',
                                        '<span class="finder-icon-cell finder-icon-ie-filename">',
                                                '<span class="finder-icon-vertical-middle-outer">',
                                                        '<span class="finder-icon-vertical-middle-inner">',
@@ -5028,16 +5135,16 @@ var Finder = ( function(){
                                                        '</span>',
                                                '</span>',
                                        '</span>',
-                                       '<span class="finder-icon-down"></span>',
+                                       '<div class="finder-icon-down"></div>',
                                '</div>'
                        ] :
                        [
                                '<div class="finder-icon fnder-icon-modern">',
-                                       '<span class="finder-icon-handle"></span>',
-                                       '<span class="' + ICON_CLASSNAME + '"></span>',
-                                       '<span class="finder-icon-filename break-word">file name</span>',
-                                       '<span class="finder-icon-summary break-word">file descriptiion</span>',
-                                       '<span class="finder-icon-down">&gt;</span>',
+                                       '<div class="finder-icon-handle"></div>',
+                                       '<div class="file-icon"><div></div></div>',
+                                       '<div class="finder-icon-filename break-word">file name</div>',
+                                       '<div class="finder-icon-summary break-word">file descriptiion</div>',
+                                       '<div class="finder-icon-down">&gt;</div>',
                                '</div>'
                        ] ).join( '' );
                })(),
@@ -5096,14 +5203,14 @@ var Finder = ( function(){
                        var file       = this.file,
                                elm        = this.elm,
                                thumb      = file.getThumbnail(),
-                               elmThumb   = Util.getElementsByClassName( elm, ICON_CLASSNAME )[ 0 ],
+                               elmThumb   = Util.getElementsByClassName( elm, 'file-icon' )[ 0 ].firstChild,
                                elmName    = Util.getElementsByClassName( elm, 'finder-icon-filename' )[ 0 ],
                                elmDesc    = Util.getElementsByClassName( elm, 'finder-icon-summary' )[ 0 ];
                        if( thumb.image ){
-                               elmThumb.className = ICON_CLASSNAME + ' has-thumbnail';
+                               elmThumb.className = 'has-thumbnail';
                                elmThumb.style.backgroundImage = [ 'url(', thumb.image, ')' ].join( '' );
                        } else {
-                               elmThumb.className = ICON_CLASSNAME + ' ' + thumb.className;
+                               elmThumb.className = thumb.className;
                                elmThumb.style.backgroundImage = '';
                        };
                        
@@ -5359,8 +5466,45 @@ var Finder = ( function(){
                }
        };
        
+       var ApplicationButton = function(){};
+       ApplicationButton.prototype = {
+               elm     : null,
+               button  : null,
+               app     : null,
+               fileUID : -1,
+               init    : function( ui, elmParent, app, file ){
+                       if( this.elm === null ){
+                               this.elm = document.createElement( 'div' );
+                       };
+                       elmParent.appendChild( this.elm );
+                       this.elm.className = 'button';
+                       this.elm.innerHTML = app.getDisplayName();
+                       
+                       var that = this;
+                       this.button = ui.createButton( this.elm, function(){
+                               that.onClick();
+                       } );
+                       
+                       this.app = app;
+                       this.fileUID = file.getUID();
+               },
+               onClick : function(){
+                       this.app.boot( this.fileUID );
+                       return false;
+               },
+               destroy : function(){
+                       var elm = this.elm;
+                       elm.parentNode.removeChild( elm );
+                       
+                       this.button.destroy();
+                       //this.kill()
+                       //this.elm = elm;
+               }
+       };
+       
        var DetailPageClass = function(){};
        DetailPageClass.prototype = Util.extend( new PageClass(), {
+               appButtons : null,
                init : function( finderData ){
                        this.finderData = finderData;
                        this.apiuser    = finderData.apiuser;
@@ -5371,27 +5515,36 @@ var Finder = ( function(){
                        if( this.elm === null ){
                                this.elm = Util.pullHtmlAsTemplete( [
                                        '<div class="finder-detail">',
-                                               '<div class="finder-icon"><div class="finder-detail-thumbnail"></div></div>',
+                                               '<div class="file-icon"><div></div></div>',
                                                '<div class="finder-detail-filename break-word">file name</div>',
                                                '<div class="finder-detail-summary break-word">file descriptiion</div>',
+                                               '<div>View this file</div>',
+                                               '<div class="viewer-apps"></div>',                                              
+                                               '<div>Edit this file</div>',
+                                               '<div class="editor-apps"></div>',
                                        '</div>'
                                ].join( '' ) );
                        };
                        this.elm.style.display = 'none';
                        this.elmScroll.appendChild( this.elm );
                        this.node = this.nodeRoot.createNode( this.elm, true, false );
+                       
+                       this.ui = this.apiuser.createUIGroup( this.node );
+                       this.appButtons = [];
                },
-               draw : function( file ){                        
+               draw : function( file ){
                        var elm        = this.elm,
                                thumb      = file.getThumbnail(),
-                               elmThumb   = Util.getElementsByClassName( elm, 'finder-detail-thumbnail' )[ 0 ],
+                               elmThumb   = Util.getElementsByClassName( elm, 'file-icon' )[ 0 ].firstChild,
                                elmName    = Util.getElementsByClassName( elm, 'finder-detail-filename' )[ 0 ],
-                               elmDesc    = Util.getElementsByClassName( elm, 'finder-detail-summary' )[ 0 ];
+                               elmDesc    = Util.getElementsByClassName( elm, 'finder-detail-summary' )[ 0 ],
+                               tmpButtons = Util.copyArray( this.appButtons ),
+                               apps, app, elmContainer;
                        if( thumb.image ){
-                               elmThumb.className = 'finder-detail-thumbnail has-thumbnail';
+                               elmThumb.className = 'has-thumbnail';
                                elmThumb.style.backgroundImage = [ 'url(', thumb.image, ')' ].join( '' );
                        } else {
-                               elmThumb.className = 'finder-detail-thumbnail ' + thumb.className;
+                               elmThumb.className = thumb.className;
                                elmThumb.style.backgroundImage = '';
                        };
                        
@@ -5400,7 +5553,26 @@ var Finder = ( function(){
                        this.node.width( this.nodeRoot.width() );
                        this.node.height( this.nodeRoot.height() );
                        
-                       this.elmScroll.style.height = this.nodeRoot.height() + 'px';
+                       this.appButtons.length = 0;
+                       
+                       apps         = file.viewerApplicationList();
+                       elmContainer = Util.getElementsByClassName( elm, 'viewer-apps' )[ 0 ];
+                       for( i = 0; i < apps.length; ++i ){
+                               button = 0 < tmpButtons.length ? tmpButtons.shift() : new ApplicationButton();
+                               button.init( this.ui, elmContainer, apps[ i ], file );
+                               this.appButtons.push( button );
+                       };
+                       apps         = file.editorApplicationList();
+                       elmContainer = Util.getElementsByClassName( elm, 'editor-apps' )[ 0 ];
+                       for( i = 0; i < apps.length; ++i ){
+                               button = 0 < tmpButtons.length ? tmpButtons.shift() : new ApplicationButton();
+                               button.init( this.ui, elmContainer, apps[ i ], file );
+                               this.appButtons.push( button );
+                       };
+                       
+                       while( button = tmpButtons.shift() ) button.destroy();
+                       
+                       this.resize();
                },
                pan : function(){
                        var page = this,
@@ -5420,10 +5592,13 @@ var Finder = ( function(){
                        
                },
                resize : function(){
-               
+                       this.elmScroll.style.height = this.nodeRoot.height() + 'px';
                },
                destroy : function(){
-                       
+                       var button;
+                       while( button = this.appButtons.shift() ) button.destroy();
+                       this.ui.destroy();
+                       this.node.remove();
                }
        });
        
@@ -5497,6 +5672,8 @@ var Finder = ( function(){
                        FinderPrivateData.LIST.push( this );
                },
                onIconClick : function( e ){
+                       if( this.panInPage === this.pageDetail ) return;
+                       
                        var target = e.target,
                                list   = this.panInPage.iconList,
                                i, icon,
@@ -5507,6 +5684,10 @@ var Finder = ( function(){
                                if( icon.node === target ){
                                        i = icon._index;
                                        file = this.currentFile.getChildFileAt( i );
+                                       if( target.width() - 30 < e.layerX ){
+                                               this.tree.down( i );
+                                               this.draw( this.w, this.h, 1, true );
+                                       } else
                                        if( file.getChildFileLength() !== -1 || file.getType() === Const.FILE.TYPE.FOLDER ){
                                                this.tree.down( i );
                                                this.draw( this.w, this.h, 1 );
@@ -5532,13 +5713,13 @@ var Finder = ( function(){
                        this.tree.up( i );
                        this.draw( this.w, this.h, -1 );
                },
-               draw : function( w, h, way ){
+               draw : function( w, h, way, showDetail ){
                        var data = this, page;
                        data.w = w = Type.isFinite( w ) === true ? w : data.w;
                        data.h = h = Type.isFinite( h ) === true ? h : data.h;
                        
                        var file     = this.currentFile = this.tree.getCurrentFile(),
-                               isFolder = file.getChildFileLength() !== -1 || file.getType() === Const.FILE.TYPE.FOLDER;
+                               isFolder = showDetail !== true && ( file.getChildFileLength() !== -1 || file.getType() === Const.FILE.TYPE.FOLDER );
                        
                        data.elmPath && data.drawPath( w );
                        page = this.panInPage;
index f414194..852f2b8 100644 (file)
@@ -1,7 +1,7 @@
 @charset "UTF-8";\r
 \r
 /* pettanR system.css\r
- *   version 0.5.37\r
+ *   version 0.5.38\r
  * \r
  *   author:\r
  *     itozyun\r
        .finder-icon-hover {\r
                background-color:                       #eee;\r
        }\r
-               .fnder-icon-modern span {\r
+       .finder-icon-modern {\r
+               display:                                        table;\r
+               table-layout:                           fixed;\r
+       }\r
+               .fnder-icon-modern div {\r
                        display:                                        table-cell;\r
                vertical-align:                         middle;\r
                line-height:                            1.3em;\r
                        width:                                          20px;\r
                        height:                                         74px;\r
                }\r
-               \r
-               .finder-icon-thumbnail,\r
-               .finder-detail-thumbnail {\r
-                       width:                                          64px;\r
-                       height:                                         74px;\r
-                       cursor:                                         pointer;\r
-                       background-repeat:                      no-repeat;\r
-                       background-position:            50% 50%;\r
-                       background-image:                       url('../images/sprite.gif');\r
-               }\r
-               \r
+                               \r
                .finder-icon-down {\r
                        font-size:                                      40px;\r
                        line-height:                            74px !important;\r
                .finder-icon-down-hover {\r
                        color:                                          #111;\r
                }\r
-               \r
-               \r
-               .finder-icon .file-type-folder {\r
-                       background-position:            0 -75px;\r
-               }\r
-               .finder-icon .file-type-album {\r
-               }\r
-               .finder-icon .file-type-author {\r
-                       background-position:            -70px -75px;\r
-               }               \r
-               .finder-icon .file-type-comic {\r
-                       background-position:            0 -145px;\r
-               }\r
-               .finder-icon .file-type-cabinet {\r
-                       background-position:            -70px -145px;\r
-               }\r
-               .finder-icon .file-type-panel {\r
-                       background-position:            0 -215px;\r
-               }\r
-               .finder-icon .file-type-artist {\r
-                       background-position:            -70px -215px;\r
-               }\r
-               .finder-icon .file-type-balloon {\r
-                       background-position:            0 -285px;\r
-               }\r
-               .finder-icon .file-type-charactor {\r
-                       background-position:            -70px -285px;\r
-               }               \r
-               .has-thumbnail {\r
-               }\r
                .fnder-icon-modern .finder-icon-filename {\r
                        width:                                          200px;\r
                        padding:                                        5px 10px;\r
 \r
        /*  Finder Icon ie7-\r
        --------------------------------------------------------------------------------------*/\r
-       .finder-icon a,\r
-       .finder-icon a:link,\r
-       .finder-icon a:visited,\r
-       .finder-icon a:active {\r
-               display:                                block;\r
-               height:                                 74px;\r
-               text-decoration:                none;\r
-               zoom:                                   1;\r
-               cursor:                                 pointer;\r
-       }\r
-       .finder-icon a:hover {\r
-               _background-color:              #eee;\r
-               color:                                  #333;\r
-       }\r
                .fnder-icon-ie7 .finder-icon-handle,\r
                .fnder-icon-ie7 .finder-icon-thumbnail {\r
                zoom:                                   1;\r
                                }\r
                                        .fnder-icon-ie7 .finder-icon-filename,\r
                                        .fnder-icon-ie7 .finder-icon-summary {\r
-                                                       position:               relative;\r
-                                                       top:                    -50%;\r
+                                                       position:                               relative;\r
+                                                       top:                                    -50%;\r
                                        }\r
                                        \r
+       /*  File Icon\r
+       --------------------------------------------------------------------------------------*/\r
+               .file-icon div {\r
+                       width:                                          64px;\r
+                       height:                                         74px;\r
+                       cursor:                                         pointer;\r
+                       background-repeat:                      no-repeat;\r
+                       background-position:            50% 50%;\r
+                       background-image:                       url('../images/sprite.gif');\r
+               }\r
+               .file-icon .file-type-folder {\r
+                       background-position:            0 -75px;\r
+               }\r
+               .file-icon .file-type-album {\r
+               }\r
+               .file-icon .file-type-author {\r
+                       background-position:            -70px -75px;\r
+               }               \r
+               .file-icon .file-type-comic {\r
+                       background-position:            0 -145px;\r
+               }\r
+               .file-icon .file-type-cabinet {\r
+                       background-position:            -70px -145px;\r
+               }\r
+               .file-icon .file-type-panel {\r
+                       background-position:            0 -215px;\r
+               }\r
+               .file-icon .file-type-artist {\r
+                       background-position:            -70px -215px;\r
+               }\r
+               .file-icon .file-type-balloon {\r
+                       background-position:            0 -285px;\r
+               }\r
+               .file-icon .file-type-charactor {\r
+                       background-position:            -70px -285px;\r
+               }               \r
+               .has-thumbnail {\r
+               }\r
+                                       \r
        /*  Finder Detail\r
        --------------------------------------------------------------------------------------*/\r
        .finder-detail {\r