diff --git a/README.md b/README.md index b209acf2..878189ca 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# h5ai v0.7   ·   a beautified Apache index +# h5ai v0.8   ·   a beautified Apache index ## Screenshots @@ -47,6 +47,16 @@ please respect their rights. ## Changelog +### v0.8 +*2011-07-08* + +* removed slashes from folder labels +* optionally rename parent folder entries to real folder names, see `options.js` +* long breadcrumbs (multiple rows) no longer hide content +* error folder icons are opaque now +* refactored js a lot (again...) + + ### v0.7 *2011-07-07* @@ -58,15 +68,15 @@ please respect their rights. *2011-07-05* * refactored js -* added localization, see options.js +* added localization, see `options.js` ### v0.5.3 *2011-07-04* * refactored js -* added basic options support -* commented options.js +* added basic options support via `options.js` +* commented `options.js` * optional tree sidebar diff --git a/build.properties b/build.properties index 77cc8ce9..fd2c5bf0 100644 --- a/build.properties +++ b/build.properties @@ -3,7 +3,7 @@ custom = true # project project.name = h5ai -project.version = 0.7 +project.version = 0.8 # src diff --git a/src/h5ai/css/inc/extended.less b/src/h5ai/css/inc/extended.less index 4ba42860..84e09398 100644 --- a/src/h5ai/css/inc/extended.less +++ b/src/h5ai/css/inc/extended.less @@ -46,13 +46,16 @@ } &.error { > a, > a:visited { - opacity: 0.7; color: #999; - .hint { - font-size: 0.9em; - font-style: italic; - color: #c55; + .label { + opacity: 0.7; + + .hint { + font-size: 0.9em; + font-style: italic; + color: #c55; + } } } } @@ -145,7 +148,6 @@ color: #e80; border-color: #eee; background-color: #f6f6f6; - //.box-shadow( 0, 0, 20px, #999 ); } .icon { display: block; @@ -169,13 +171,16 @@ } &.error { > a, > a:visited { - opacity: 0.7; color: #999; - .hint { - font-size: 0.9em; - font-style: italic; - color: #c55; + .label { + opacity: 0.7; + + .hint { + font-size: 0.9em; + font-style: italic; + color: #c55; + } } } } diff --git a/src/h5ai/js/inc/file.js b/src/h5ai/js/inc/file.js deleted file mode 100644 index 5058df01..00000000 --- a/src/h5ai/js/inc/file.js +++ /dev/null @@ -1,143 +0,0 @@ - -var File = function ( utils, folder, tableRow ) { - - var THIS = this; - - - - if ( ! /\/$/.test( folder ) ) { - folder += "/"; - }; - - if ( tableRow !== undefined ) { - var $tds = $( tableRow ).find( "td" ); - var $img = $tds.eq( 0 ).find( "img" ); - var $a= $tds.eq( 1 ).find( "a" ); - - this.parentFolder = folder; - this.icon16 = $img.attr( "src" ); - this.alt = $img.attr( "alt" ); - this.label = $a.text(); - this.href = decodeURI( $a.attr("href") ); - this.date = $tds.eq( 2 ).text(); - this.size = $tds.eq( 3 ).text(); - } else { - var splits = utils.splitPathname( folder ); - - this.parentFolder = splits[0]; - this.label = splits[1]; - this.icon16 = "/h5ai/icons/16x16/folder.png"; - this.alt = "[DIR]"; - this.href = this.label; - this.date = ""; - this.size = ""; - if ( this.label === "/" ) { - this.label = document.domain + "/"; - }; - }; - - this.icon48 = this.icon16.replace( "16x16", "48x48" ); - this.isFolder = ( this.alt === "[DIR]" ); - this.isParentFolder = ( this.isFolder && this.label === "Parent Directory" ); - this.absHref = this.isParentFolder ? this.href : this.parentFolder + this.href; - this.status = undefined; // undefined, "h5ai" or HTTP response code - this.content = undefined; - this.$treeHtml = undefined; - - - this.isEmpty = function() { - - if ( this.content === undefined ) { - return true; - }; - for ( var prop in this.content ) { - if( this.content.hasOwnProperty( prop ) ) { - return false; - }; - }; - return true; - }; - - - this.updateTreeHtml = function () { - - var $html = $( "
" ).data( "file", this ); - var $blank = $( "" ).appendTo( $html ); - - try { - var $a = $( "" ) - .appendTo( $html ) - .append( $( "" ) ) - .append( $( "" + this.label + "" ) ); - - if ( this.isFolder ) { - - $html.addClass( "folder" ); - - // indicator - if ( this.status === undefined || !this.isEmpty() ) { - var $indicator = $( "" ); - if ( this.status === undefined ) { - $indicator.addClass( "unknown" ); - } else { - $indicator.addClass( "open" ); - }; - $indicator.click( function( event ) { - if ( $indicator.hasClass( "unknown" ) ) { - tree.fetchEntry( THIS.absHref, function ( newEntry ) { - $html.replaceWith( newEntry.updateTreeHtml() ); - } ); - } else if ( $indicator.hasClass( "open" ) ) { - $indicator.removeClass( "open" ); - $html.find( "> ul.content" ).slideUp(); - } else { - $indicator.addClass( "open" ); - $html.find( "> ul.content" ).slideDown(); - }; - } ); - $blank.replaceWith( $indicator ); - }; - - // is this the current folder? - if ( this.absHref === decodeURI( document.location.pathname ) ) { - $html.addClass( "current" ); - $a.find( ".icon img" ).attr( "src", "/h5ai/icons/16x16/folder-open.png" ); - }; - - // does it have subfolders? - if ( !this.isEmpty() ) { - var $ul = $( "