From 4f09cbf00e30c035e874b8a3a86650a9ded6e529 Mon Sep 17 00:00:00 2001 From: Lars Jung Date: Fri, 24 Jun 2011 15:20:23 +0200 Subject: [PATCH] Cleaned js. --- src/h5ai/js/main.js | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/src/h5ai/js/main.js b/src/h5ai/js/main.js index fff302b5..e403e2df 100644 --- a/src/h5ai/js/main.js +++ b/src/h5ai/js/main.js @@ -13,14 +13,8 @@ - /******************************* - * h5ai - *******************************/ - H5ai = function ( options ) { - - /******************************* * config *******************************/ @@ -123,14 +117,14 @@ if ( viewmode !== undefined ) { localStorage.setItem( config.store.viewmode, viewmode ); - } + }; if ( getViewmode() === "icons" ) { $( "#details" ).hide(); $( "#icons" ).show(); } else { $( "#details" ).show(); $( "#icons" ).hide(); - } + }; }; @@ -151,8 +145,8 @@ if ( part !== "" ) { path += part + "/"; $ul.append( $( "
  • >" + part + "
  • " ) ); - } - } + }; + }; $( "nav li a" ).closest( "li" ) .click( function () { @@ -178,7 +172,7 @@ if ( idx >= 0 && idx < config.columnClasses.length ) { return config.columnClasses[idx]; - } + }; return "unknown"; }; @@ -219,7 +213,7 @@ $entries = $( "#details tr.entry" ); if ( $entries.size() === 0 || $entries.size() === 1 && $entries.find( "td.name a" ).text() === "Parent Directory" ) { $( "#details" ).append( $( "
    empty
    " ) ); - } + }; }; @@ -228,20 +222,20 @@ var order = document.location.search; if ( order === "" ) { order = config.defaultSortOrder; - } + }; var $icon; if ( order.indexOf( "O=A" ) >= 0 ) { $icon = $( "ascending" ); } else { $icon = $( "descending" ); - } + }; if ( order.indexOf( "C=N" ) >= 0 ) { $( "#details th.name a" ).append( $icon ); } else if ( order.indexOf( "C=M" ) >= 0 ) { $( "#details th.date a" ).prepend( $icon ); } else if ( order.indexOf( "C=S" ) >= 0 ) { $( "#details th.size a" ).prepend( $icon ); - } + }; }; @@ -275,7 +269,7 @@ $entry.addClass( "folder" ); } else { $entry.addClass( "file" ); - } + }; } ); $div.append( $( "
    " ) ); $( "#icons" ).append( $div );