mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-25 04:24:45 -04:00
Added basic options support. Refactored js.
This commit is contained in:
parent
b7387adfc8
commit
b8fba3ac8e
15 changed files with 682 additions and 639 deletions
|
@ -1,4 +1,4 @@
|
||||||
# h5ai v0.5.2   ·   a beautified Apache index
|
# h5ai v0.5.3   ·   a beautified Apache index
|
||||||
|
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
@ -47,6 +47,13 @@ please respect their rights.
|
||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
|
### v0.5.3
|
||||||
|
*2011-07-04*
|
||||||
|
|
||||||
|
* refactored js
|
||||||
|
* added basic options support
|
||||||
|
|
||||||
|
|
||||||
### v0.5.2
|
### v0.5.2
|
||||||
*2011-07-02*
|
*2011-07-02*
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ custom = true
|
||||||
|
|
||||||
# project
|
# project
|
||||||
project.name = h5ai
|
project.name = h5ai
|
||||||
project.version = 0.5.2
|
project.version = 0.5.3
|
||||||
|
|
||||||
|
|
||||||
# src
|
# src
|
||||||
|
|
|
@ -15,8 +15,9 @@
|
||||||
using
|
using
|
||||||
<a href="http://tiheum.deviantart.com/art/Faenza-Icons-173323228" target="_blank" title="icon theme for Gnome">Faenza icons</a>
|
<a href="http://tiheum.deviantart.com/art/Faenza-Icons-173323228" target="_blank" title="icon theme for Gnome">Faenza icons</a>
|
||||||
</footer>
|
</footer>
|
||||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
|
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
|
||||||
<script>window.jQuery || document.write( '<script src="/h5ai/js/lib/jquery.min.js"><\/script>' )</script>
|
<script>window.jQuery || document.write( '<script src="/h5ai/js/lib/jquery.min.js"><\/script>' )</script>
|
||||||
|
<script src="/h5ai/options.js"></script>
|
||||||
<script src="/h5ai/js/main.js"></script>
|
<script src="/h5ai/js/main.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
99
src/h5ai/js/inc/file.js
Normal file
99
src/h5ai/js/inc/file.js
Normal file
|
@ -0,0 +1,99 @@
|
||||||
|
|
||||||
|
var File = function ( utils, folder, tableRow ) {
|
||||||
|
|
||||||
|
if ( ! /\/$/.test( folder ) ) {
|
||||||
|
folder += "/";
|
||||||
|
};
|
||||||
|
|
||||||
|
if ( tableRow !== undefined ) {
|
||||||
|
var $tds = $( tableRow ).find( "td" );
|
||||||
|
var $img = $( $tds.get( 0 ) ).find( "img" );
|
||||||
|
var $a= $( $tds.get( 1 ) ).find( "a" );
|
||||||
|
|
||||||
|
this.parentFolder = folder;
|
||||||
|
this.icon16 = $img.attr( "src" );
|
||||||
|
this.alt = $img.attr( "alt" );
|
||||||
|
this.label = $a.text();
|
||||||
|
this.href = $a.attr("href");
|
||||||
|
this.date = $( $tds.get(2) ).text();
|
||||||
|
this.size = $( $tds.get(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.content = undefined;
|
||||||
|
|
||||||
|
|
||||||
|
this.isComplete = function () {
|
||||||
|
|
||||||
|
if ( this.isFolder ) {
|
||||||
|
if ( this.content === undefined ) {
|
||||||
|
return false;
|
||||||
|
} else if ( this.content instanceof Array ) {
|
||||||
|
for ( idx in this.content ) {
|
||||||
|
if ( !this.content[idx].isComplete() ) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
this.toHtml = function () {
|
||||||
|
|
||||||
|
var $entry = $( "<div class='entry' />" );
|
||||||
|
|
||||||
|
try {
|
||||||
|
var $a = $( "<a href='" + this.absHref + "' />" )
|
||||||
|
.appendTo( $entry )
|
||||||
|
.append( $( "<span class='icon'><img src='" + this.icon16 + "' /></span>" ) )
|
||||||
|
.append( $( "<span class='label'>" + this.label + "</span>" ) );
|
||||||
|
|
||||||
|
if ( this.isFolder ) {
|
||||||
|
$entry.addClass( "folder" );
|
||||||
|
if ( this.absHref === document.location.pathname ) {
|
||||||
|
$a.find( ".icon img" ).attr( "src", "/h5ai/images/folder-open.png" );
|
||||||
|
$entry.addClass( "current" );
|
||||||
|
};
|
||||||
|
if ( this.content instanceof Array ) {
|
||||||
|
var $ul = $( "<ul class='content' />" ).appendTo( $entry );
|
||||||
|
for ( idx in this.content ) {
|
||||||
|
$( "<li />" ).append( this.content[idx].toHtml() ).appendTo( $ul );
|
||||||
|
};
|
||||||
|
} else if ( this.content === undefined ) {
|
||||||
|
$a.append( $( "<span class='hint'><img src='/h5ai/images/loading.png' /></span>" ) );
|
||||||
|
} else if ( this.content === 200 ) {
|
||||||
|
$a.find( ".icon img" ).attr( "src", "/h5ai/images/folder-page.png" );
|
||||||
|
$a.append( $( "<span class='hint'><img src='/h5ai/images/page.png' /></span>" ) );
|
||||||
|
} else {
|
||||||
|
$a.append( $( "<span class='hint error'>" + this.content + "</span>" ) );
|
||||||
|
$entry.addClass( "notListable" );
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
$entry.addClass( "file" );
|
||||||
|
};
|
||||||
|
|
||||||
|
} catch( err ) {
|
||||||
|
$( "<span class='fail'>fail</span>" ).appendTo( $entry );
|
||||||
|
};
|
||||||
|
|
||||||
|
return $entry;
|
||||||
|
};
|
||||||
|
};
|
|
@ -1,28 +1,13 @@
|
||||||
( function( $ ) {
|
|
||||||
|
|
||||||
|
var H5ai = function ( options ) {
|
||||||
|
|
||||||
/*******************************
|
|
||||||
* init after dom load
|
|
||||||
*******************************/
|
|
||||||
|
|
||||||
$( function() {
|
|
||||||
|
|
||||||
$.h5ai = new H5ai();
|
|
||||||
} );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
H5ai = function ( options ) {
|
|
||||||
|
|
||||||
/*******************************
|
/*******************************
|
||||||
* config
|
* config
|
||||||
*******************************/
|
*******************************/
|
||||||
|
|
||||||
var config = {
|
var defaults = {
|
||||||
columnClasses: [ "icon", "name", "date", "size" ],
|
columnClasses: [ "icon", "name", "date", "size" ],
|
||||||
defaultSortOrder: "C=N;O=A",
|
defaultSortOrder: "C=N;O=A",
|
||||||
viewmodes: [ "details", "icons" ],
|
|
||||||
store: {
|
store: {
|
||||||
viewmode: "h5ai.viewmode"
|
viewmode: "h5ai.viewmode"
|
||||||
},
|
},
|
||||||
|
@ -36,8 +21,14 @@
|
||||||
callbacks: {
|
callbacks: {
|
||||||
folderClick: [],
|
folderClick: [],
|
||||||
fileClick: []
|
fileClick: []
|
||||||
|
},
|
||||||
|
|
||||||
|
viewmodes: [ "details", "icons" ],
|
||||||
|
showTree: false,
|
||||||
|
folderStatus: {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
this.config = $.extend( {}, defaults, options );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -48,7 +39,7 @@
|
||||||
this.folderClick = function ( fn ) {
|
this.folderClick = function ( fn ) {
|
||||||
|
|
||||||
if ( typeof fn === "function" ) {
|
if ( typeof fn === "function" ) {
|
||||||
config.callbacks.folderClick.push( fn );
|
this.config.callbacks.folderClick.push( fn );
|
||||||
};
|
};
|
||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
|
@ -57,7 +48,7 @@
|
||||||
this.fileClick = function ( fn ) {
|
this.fileClick = function ( fn ) {
|
||||||
|
|
||||||
if ( typeof fn === "function" ) {
|
if ( typeof fn === "function" ) {
|
||||||
config.callbacks.fileClick.push( fn );
|
this.config.callbacks.fileClick.push( fn );
|
||||||
};
|
};
|
||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
|
@ -65,15 +56,15 @@
|
||||||
|
|
||||||
|
|
||||||
/*******************************
|
/*******************************
|
||||||
* init (will be called at the bottom)
|
* init
|
||||||
*******************************/
|
*******************************/
|
||||||
|
|
||||||
var init = function () {
|
this.init = function () {
|
||||||
|
|
||||||
applyViewmode();
|
this.applyViewmode();
|
||||||
initBreadcrumb();
|
this.initBreadcrumb();
|
||||||
initViews();
|
this.initViews();
|
||||||
customize();
|
this.customize();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -82,18 +73,18 @@
|
||||||
* callback triggers
|
* callback triggers
|
||||||
*******************************/
|
*******************************/
|
||||||
|
|
||||||
var triggerFolderClick = function ( label ) {
|
this.triggerFolderClick = function ( label ) {
|
||||||
|
|
||||||
for ( idx in config.callbacks.folderClick ) {
|
for ( idx in this.config.callbacks.folderClick ) {
|
||||||
config.callbacks.folderClick[idx].call( window, label );
|
this.config.callbacks.folderClick[idx].call( window, label );
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
var triggerFileClick = function ( label ) {
|
this.triggerFileClick = function ( label ) {
|
||||||
|
|
||||||
for ( idx in config.callbacks.fileClick ) {
|
for ( idx in this.config.callbacks.fileClick ) {
|
||||||
config.callbacks.fileClick[idx].call( window, label );
|
this.config.callbacks.fileClick[idx].call( window, label );
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -103,29 +94,44 @@
|
||||||
* local stored viewmode
|
* local stored viewmode
|
||||||
*******************************/
|
*******************************/
|
||||||
|
|
||||||
var getViewmode = function () {
|
this.getViewmode = function () {
|
||||||
|
|
||||||
var viewmode = localStorage.getItem( config.store.viewmode );
|
var viewmode = localStorage.getItem( this.config.store.viewmode );
|
||||||
if ( $.inArray( viewmode, config.viewmodes ) ) {
|
if ( $.inArray( viewmode, this.config.viewmodes ) >= 0 ) {
|
||||||
return viewmode;
|
return viewmode;
|
||||||
};
|
};
|
||||||
return config.viewmodes[0];
|
return this.config.viewmodes[0];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
var applyViewmode = function ( viewmode ) {
|
this.applyViewmode = function ( viewmode ) {
|
||||||
|
|
||||||
$( "#table" ).hide();
|
|
||||||
if ( viewmode !== undefined ) {
|
if ( viewmode !== undefined ) {
|
||||||
localStorage.setItem( config.store.viewmode, viewmode );
|
localStorage.setItem( this.config.store.viewmode, viewmode );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$( "body > nav li.view" ).hide();
|
||||||
|
if ( this.config.viewmodes.length > 1 ) {
|
||||||
|
if ( $.inArray( "details", this.config.viewmodes ) >= 0 ) {
|
||||||
|
$( "#viewdetails" ).show();
|
||||||
|
};
|
||||||
|
if ( $.inArray( "icons", this.config.viewmodes ) >= 0 ) {
|
||||||
|
$( "#viewicons" ).show();
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
$( "body > nav li.view" ).removeClass( "current" );
|
$( "body > nav li.view" ).removeClass( "current" );
|
||||||
if ( getViewmode() === "icons" ) {
|
if ( this.getViewmode() === "details" ) {
|
||||||
|
$( "#viewdetails" ).closest( "li" ).addClass( "current" );
|
||||||
|
$( "#table" ).hide();
|
||||||
|
$( "#extended" ).addClass( "details-view" ).removeClass( "icons-view" ).show();
|
||||||
|
} else if ( this.getViewmode() === "icons" ) {
|
||||||
$( "#viewicons" ).closest( "li" ).addClass( "current" );
|
$( "#viewicons" ).closest( "li" ).addClass( "current" );
|
||||||
|
$( "#table" ).hide();
|
||||||
$( "#extended" ).removeClass( "details-view" ).addClass( "icons-view" ).show();
|
$( "#extended" ).removeClass( "details-view" ).addClass( "icons-view" ).show();
|
||||||
} else {
|
} else {
|
||||||
$( "#viewdetails" ).closest( "li" ).addClass( "current" );
|
$( "#table" ).show();
|
||||||
$( "#extended" ).addClass( "details-view" ).removeClass( "icons-view" ).show();
|
$( "#extended" ).hide();
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -135,7 +141,7 @@
|
||||||
* breadcrumb and doc title
|
* breadcrumb and doc title
|
||||||
*******************************/
|
*******************************/
|
||||||
|
|
||||||
var initBreadcrumb = function () {
|
this.initBreadcrumb = function () {
|
||||||
|
|
||||||
$( "#domain span" ).text( document.domain );
|
$( "#domain span" ).text( document.domain );
|
||||||
var pathname = decodeURI( document.location.pathname );
|
var pathname = decodeURI( document.location.pathname );
|
||||||
|
@ -146,7 +152,7 @@
|
||||||
var part = parts[idx];
|
var part = parts[idx];
|
||||||
if ( part !== "" ) {
|
if ( part !== "" ) {
|
||||||
path += part + "/";
|
path += part + "/";
|
||||||
$ul.append( $( "<li class='crumb'><a href='" + path + "'><img src='" + config.icons.crumb + "' alt='>' />" + part + "</a></li>" ) );
|
$ul.append( $( "<li class='crumb'><a href='" + path + "'><img src='" + this.config.icons.crumb + "' alt='>' />" + part + "</a></li>" ) );
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
$( "body > nav .crumb:last" ).addClass( "current" );
|
$( "body > nav .crumb:last" ).addClass( "current" );
|
||||||
|
@ -160,12 +166,13 @@
|
||||||
* table view
|
* table view
|
||||||
*******************************/
|
*******************************/
|
||||||
|
|
||||||
var initTableView = function () {
|
this.initTableView = function () {
|
||||||
|
|
||||||
|
var ref = this;
|
||||||
function getColumnClass( idx ) {
|
function getColumnClass( idx ) {
|
||||||
|
|
||||||
if ( idx >= 0 && idx < config.columnClasses.length ) {
|
if ( idx >= 0 && idx < ref.config.columnClasses.length ) {
|
||||||
return config.columnClasses[idx];
|
return ref.config.columnClasses[idx];
|
||||||
};
|
};
|
||||||
return "unknown";
|
return "unknown";
|
||||||
};
|
};
|
||||||
|
@ -185,7 +192,7 @@
|
||||||
* extended view
|
* extended view
|
||||||
*******************************/
|
*******************************/
|
||||||
|
|
||||||
var initExtendedView = function () {
|
this.initExtendedView = function () {
|
||||||
|
|
||||||
var $ul = $( "<ul/>" );
|
var $ul = $( "<ul/>" );
|
||||||
|
|
||||||
|
@ -202,13 +209,13 @@
|
||||||
// header sort icons
|
// header sort icons
|
||||||
var order = document.location.search;
|
var order = document.location.search;
|
||||||
if ( order === "" ) {
|
if ( order === "" ) {
|
||||||
order = config.defaultSortOrder;
|
order = this.config.defaultSortOrder;
|
||||||
};
|
};
|
||||||
var $icon;
|
var $icon;
|
||||||
if ( order.indexOf( "O=A" ) >= 0 ) {
|
if ( order.indexOf( "O=A" ) >= 0 ) {
|
||||||
$icon = $( "<img src='" + config.icons.ascending + "' class='sort' alt='ascending' />" );
|
$icon = $( "<img src='" + this.config.icons.ascending + "' class='sort' alt='ascending' />" );
|
||||||
} else {
|
} else {
|
||||||
$icon = $( "<img src='" + config.icons.descending + "' class='sort' alt='descending' />" );
|
$icon = $( "<img src='" + this.config.icons.descending + "' class='sort' alt='descending' />" );
|
||||||
};
|
};
|
||||||
if ( order.indexOf( "C=N" ) >= 0 ) {
|
if ( order.indexOf( "C=N" ) >= 0 ) {
|
||||||
$li.find( "a.label" ).append( $icon );
|
$li.find( "a.label" ).append( $icon );
|
||||||
|
@ -257,13 +264,14 @@
|
||||||
$( "#extended" ).append( $( "<div class='clearfix' />" ) );
|
$( "#extended" ).append( $( "<div class='clearfix' />" ) );
|
||||||
|
|
||||||
// click callbacks
|
// click callbacks
|
||||||
|
var ref = this;
|
||||||
$( "#extended .entry.folder" )
|
$( "#extended .entry.folder" )
|
||||||
.click( function() {
|
.click( function() {
|
||||||
triggerFolderClick( $( this ).find( ".label" ).text() );
|
ref.triggerFolderClick( $( this ).find( ".label" ).text() );
|
||||||
} );
|
} );
|
||||||
$( "#extended .entry.file" )
|
$( "#extended .entry.file" )
|
||||||
.click( function() {
|
.click( function() {
|
||||||
triggerFileClick( $( this ).find( ".label" ).text() );
|
ref.triggerFileClick( $( this ).find( ".label" ).text() );
|
||||||
} );
|
} );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -272,18 +280,19 @@
|
||||||
* init views
|
* init views
|
||||||
*******************************/
|
*******************************/
|
||||||
|
|
||||||
var initViews = function () {
|
this.initViews = function () {
|
||||||
|
|
||||||
initTableView();
|
this.initTableView();
|
||||||
initExtendedView();
|
this.initExtendedView();
|
||||||
|
|
||||||
|
var ref = this;
|
||||||
$( "#viewdetails" ).closest( "li" )
|
$( "#viewdetails" ).closest( "li" )
|
||||||
.click( function () {
|
.click( function () {
|
||||||
applyViewmode( "details" );
|
ref.applyViewmode( "details" );
|
||||||
} );
|
} );
|
||||||
$( "#viewicons" ).closest( "li" )
|
$( "#viewicons" ).closest( "li" )
|
||||||
.click( function () {
|
.click( function () {
|
||||||
applyViewmode( "icons" );
|
ref.applyViewmode( "icons" );
|
||||||
} );
|
} );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -293,10 +302,10 @@
|
||||||
* customize
|
* customize
|
||||||
*******************************/
|
*******************************/
|
||||||
|
|
||||||
var customize = function () {
|
this.customize = function () {
|
||||||
|
|
||||||
$.ajax( {
|
$.ajax( {
|
||||||
url: config.customHeader,
|
url: this.config.customHeader,
|
||||||
dataType: "html",
|
dataType: "html",
|
||||||
success: function ( data ) {
|
success: function ( data ) {
|
||||||
$( "#content > header" ).append( $( data ) ).show();
|
$( "#content > header" ).append( $( data ) ).show();
|
||||||
|
@ -304,21 +313,11 @@
|
||||||
} );
|
} );
|
||||||
|
|
||||||
$.ajax( {
|
$.ajax( {
|
||||||
url: config.customFooter,
|
url: this.config.customFooter,
|
||||||
dataType: "html",
|
dataType: "html",
|
||||||
success: function ( data ) {
|
success: function ( data ) {
|
||||||
$( "#content > footer" ).prepend( $( data ) ).show();
|
$( "#content > footer" ).prepend( $( data ) ).show();
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/*******************************
|
|
||||||
* finally run init
|
|
||||||
*******************************/
|
|
||||||
|
|
||||||
init();
|
|
||||||
};
|
|
||||||
|
|
||||||
} )( jQuery );
|
|
||||||
|
|
|
@ -1,312 +0,0 @@
|
||||||
|
|
||||||
( function( $ ) {
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*******************************
|
|
||||||
* init after dom load
|
|
||||||
*******************************/
|
|
||||||
|
|
||||||
$( function() {
|
|
||||||
|
|
||||||
window.setTimeout( function() {
|
|
||||||
$.h5aiTree = new H5aiTree();
|
|
||||||
}, 1 );
|
|
||||||
} );
|
|
||||||
|
|
||||||
|
|
||||||
H5aiTree = function ( options ) {
|
|
||||||
|
|
||||||
|
|
||||||
var folderRegEx = /\/$/;
|
|
||||||
var pathnameRegEx = /^(\/(.*\/)*)([^\/]+\/?)$/;
|
|
||||||
var contentTypeRegEx = /^text\/html;h5ai=/;
|
|
||||||
|
|
||||||
|
|
||||||
function init() {
|
|
||||||
|
|
||||||
checkCrumb();
|
|
||||||
initShifting();
|
|
||||||
populateTree();
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
function splitPathname( pathname ) {
|
|
||||||
|
|
||||||
if ( pathname === "/" ) {
|
|
||||||
return [ "", "/" ];
|
|
||||||
};
|
|
||||||
var match = pathnameRegEx.exec( pathname );
|
|
||||||
return [ match[1], match[3] ];
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
function checkCrumb() {
|
|
||||||
|
|
||||||
$( "li.crumb a" ).each( function() {
|
|
||||||
|
|
||||||
var $a = $( this );
|
|
||||||
var pathname = $a.attr( "href" );
|
|
||||||
checkPathname( pathname, function ( status ) {
|
|
||||||
if ( status !== 0 ) {
|
|
||||||
$( "<img class='hint' src='/h5ai/images/page.png' alt='not listable' />" ).appendTo( $a );
|
|
||||||
if ( status !== 200 ) {
|
|
||||||
$( "<span class='hint'>(" + status + ")</span>" ).appendTo( $a );
|
|
||||||
};
|
|
||||||
};
|
|
||||||
} );
|
|
||||||
} );
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
function shiftTree( show ) {
|
|
||||||
|
|
||||||
var $tree = $( "#tree" );
|
|
||||||
var $extended = $( "#extended" );
|
|
||||||
var show = show || false;
|
|
||||||
|
|
||||||
if ( $tree.outerWidth() < $extended.offset().left || show ) {
|
|
||||||
$tree.stop().animate( { left: 0 } );
|
|
||||||
} else {
|
|
||||||
//var left = Math.max( 24 - $tree.outerWidth(), $extended.offset().left - $tree.outerWidth() - 16 );
|
|
||||||
var left = 24 - $tree.outerWidth();
|
|
||||||
$tree.stop().animate( { left: left } );
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
function initShifting() {
|
|
||||||
|
|
||||||
$( "#tree" ).hover(
|
|
||||||
function () {
|
|
||||||
shiftTree( true );
|
|
||||||
},
|
|
||||||
function () {
|
|
||||||
shiftTree();
|
|
||||||
}
|
|
||||||
);
|
|
||||||
$( window ).resize( function() {
|
|
||||||
shiftTree();
|
|
||||||
} );
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
function populateTree() {
|
|
||||||
|
|
||||||
var $tree = $( "#tree" );
|
|
||||||
$tree.css( { left: -400 } ).show();
|
|
||||||
shiftTree();
|
|
||||||
var pathname = decodeURI( document.location.pathname );
|
|
||||||
fetchTree( pathname, function( entry ) {
|
|
||||||
$tree.empty().append( entry.toHtml() );
|
|
||||||
shiftTree();
|
|
||||||
} );
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
function fetchTree( pathname, callback ) {
|
|
||||||
|
|
||||||
walkBack( pathname, function( walkbackedPathname ) {
|
|
||||||
var entry = new Entry( walkbackedPathname );
|
|
||||||
fetchEntriesRecursive( walkbackedPathname, function ( content ) {
|
|
||||||
entry.content = content;
|
|
||||||
callback( entry );
|
|
||||||
} );
|
|
||||||
} );
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
function walkBack( pathname, callback ) {
|
|
||||||
|
|
||||||
var splits = splitPathname( pathname );
|
|
||||||
var parent = splits[0];
|
|
||||||
if ( parent === "" ) {
|
|
||||||
callback( pathname );
|
|
||||||
} else {
|
|
||||||
checkPathname( parent, function( state ) {
|
|
||||||
if ( state === 0 ) {
|
|
||||||
walkBack( parent, callback );
|
|
||||||
} else {
|
|
||||||
callback( pathname );
|
|
||||||
};
|
|
||||||
} );
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
function fetchEntriesRecursive( pathname, callback ) {
|
|
||||||
|
|
||||||
fetchEntries( pathname, false, function ( entries ) {
|
|
||||||
if ( entries instanceof Array ) {
|
|
||||||
for ( idx in entries ) {
|
|
||||||
( function ( entry ) {
|
|
||||||
if ( entry.isFolder ) {
|
|
||||||
fetchEntriesRecursive( entry.absHref, function( content ) {
|
|
||||||
entry.content = content;
|
|
||||||
callback( entries );
|
|
||||||
} );
|
|
||||||
};
|
|
||||||
} ) ( entries[idx] );
|
|
||||||
};
|
|
||||||
};
|
|
||||||
callback( entries );
|
|
||||||
} );
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
function fetchEntries( pathname, includeParent, callback ) {
|
|
||||||
|
|
||||||
checkPathname( pathname, function ( status ) {
|
|
||||||
console.log( "checkPathname", pathname, status );
|
|
||||||
if ( status !== 0 ) {
|
|
||||||
callback( status );
|
|
||||||
} else {
|
|
||||||
$.ajax( {
|
|
||||||
url: pathname,
|
|
||||||
type: "GET",
|
|
||||||
dataType: "html",
|
|
||||||
error: function ( xhr ) {
|
|
||||||
// since it was checked before this should never happen
|
|
||||||
callback( xhr.status );
|
|
||||||
},
|
|
||||||
success: function ( html, status, xhr ) {
|
|
||||||
if ( !contentTypeRegEx.test( xhr.getResponseHeader( "Content-Type" ) ) ) {
|
|
||||||
// since it was checked before this should never happen
|
|
||||||
callback( xhr.status );
|
|
||||||
} else {
|
|
||||||
var entries = [];
|
|
||||||
$( html ).find( "#table table td" ).closest( "tr" ).each( function () {
|
|
||||||
var entry = new Entry( pathname, this );
|
|
||||||
if ( !entry.isParentFolder || includeParent ) {
|
|
||||||
entries.push( entry );
|
|
||||||
};
|
|
||||||
} );
|
|
||||||
callback( entries );
|
|
||||||
};
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
};
|
|
||||||
} );
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
function checkPathname( pathname, callback ) {
|
|
||||||
|
|
||||||
$.ajax( {
|
|
||||||
url: pathname,
|
|
||||||
type: "HEAD",
|
|
||||||
complete: function ( xhr ) {
|
|
||||||
if ( xhr.status === 200 && contentTypeRegEx.test( xhr.getResponseHeader( "Content-Type" ) ) ) {
|
|
||||||
callback( 0 );
|
|
||||||
} else {
|
|
||||||
callback( xhr.status );
|
|
||||||
};
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
Entry = function ( folder, tableRow ) {
|
|
||||||
|
|
||||||
if ( !folderRegEx.test( folder ) ) {
|
|
||||||
folder += "/";
|
|
||||||
};
|
|
||||||
|
|
||||||
if ( tableRow !== undefined ) {
|
|
||||||
var $tds = $( tableRow ).find( "td" );
|
|
||||||
var $img = $( $tds.get( 0 ) ).find( "img" );
|
|
||||||
var $a= $( $tds.get( 1 ) ).find( "a" );
|
|
||||||
|
|
||||||
this.parentFolder = folder;
|
|
||||||
this.icon16 = $img.attr( "src" );
|
|
||||||
this.alt = $img.attr( "alt" );
|
|
||||||
this.label = $a.text();
|
|
||||||
this.href = $a.attr("href");
|
|
||||||
this.date = $( $tds.get(2) ).text();
|
|
||||||
this.size = $( $tds.get(3) ).text();
|
|
||||||
} else {
|
|
||||||
var splits = 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.content = undefined;
|
|
||||||
|
|
||||||
|
|
||||||
this.isComplete = function () {
|
|
||||||
|
|
||||||
if ( this.isFolder ) {
|
|
||||||
if ( this.content === undefined ) {
|
|
||||||
return false;
|
|
||||||
} else if ( this.content instanceof Array ) {
|
|
||||||
for ( idx in this.content ) {
|
|
||||||
if ( !this.content[idx].isComplete() ) {
|
|
||||||
return false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
return true;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
this.toHtml = function () {
|
|
||||||
|
|
||||||
var $entry = $( "<div class='entry' />" );
|
|
||||||
|
|
||||||
try {
|
|
||||||
var $a = $( "<a href='" + this.absHref + "' />" )
|
|
||||||
.appendTo( $entry )
|
|
||||||
.append( $( "<span class='icon'><img src='" + this.icon16 + "' /></span>" ) )
|
|
||||||
.append( $( "<span class='label'>" + this.label + "</span>" ) );
|
|
||||||
|
|
||||||
if ( this.isFolder ) {
|
|
||||||
$entry.addClass( "folder" );
|
|
||||||
if ( this.absHref === document.location.pathname ) {
|
|
||||||
$a.find( ".icon img" ).attr( "src", "/h5ai/images/folder-open.png" );
|
|
||||||
$entry.addClass( "current" );
|
|
||||||
};
|
|
||||||
if ( this.content instanceof Array ) {
|
|
||||||
var $ul = $( "<ul class='content' />" ).appendTo( $entry );
|
|
||||||
for ( idx in this.content ) {
|
|
||||||
$( "<li />" ).append( this.content[idx].toHtml() ).appendTo( $ul );
|
|
||||||
};
|
|
||||||
} else if ( this.content === undefined ) {
|
|
||||||
$a.append( $( "<span class='hint'><img src='/h5ai/images/loading.png' /></span>" ) );
|
|
||||||
} else if ( this.content === 200 ) {
|
|
||||||
$a.find( ".icon img" ).attr( "src", "/h5ai/images/folder-page.png" );
|
|
||||||
$a.append( $( "<span class='hint'><img src='/h5ai/images/page.png' /></span>" ) );
|
|
||||||
} else {
|
|
||||||
$a.append( $( "<span class='hint error'>" + this.content + "</span>" ) );
|
|
||||||
$entry.addClass( "notListable" );
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
$entry.addClass( "file" );
|
|
||||||
};
|
|
||||||
|
|
||||||
} catch( err ) {
|
|
||||||
$( "<span class='fail'>fail</span>" ).appendTo( $entry );
|
|
||||||
};
|
|
||||||
|
|
||||||
return $entry;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
init()
|
|
||||||
};
|
|
||||||
|
|
||||||
} )( jQuery );
|
|
183
src/h5ai/js/inc/tree.js
Normal file
183
src/h5ai/js/inc/tree.js
Normal file
|
@ -0,0 +1,183 @@
|
||||||
|
|
||||||
|
var Tree = function ( utils, h5ai ) {
|
||||||
|
|
||||||
|
var thistree = this;
|
||||||
|
var contentTypeRegEx = /^text\/html;h5ai=/;
|
||||||
|
|
||||||
|
this.init = function () {
|
||||||
|
|
||||||
|
if ( h5ai.config.showTree ) {
|
||||||
|
this.checkCrumb();
|
||||||
|
this.initShifting();
|
||||||
|
this.populateTree();
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
this.checkCrumb = function () {
|
||||||
|
|
||||||
|
$( "li.crumb a" ).each( function() {
|
||||||
|
|
||||||
|
var $a = $( this );
|
||||||
|
var pathname = $a.attr( "href" );
|
||||||
|
thistree.checkPathname( pathname, function ( status ) {
|
||||||
|
if ( status !== 0 ) {
|
||||||
|
$( "<img class='hint' src='/h5ai/images/page.png' alt='not listable' />" ).appendTo( $a );
|
||||||
|
if ( status !== 200 ) {
|
||||||
|
$( "<span class='hint'>(" + status + ")</span>" ).appendTo( $a );
|
||||||
|
};
|
||||||
|
};
|
||||||
|
} );
|
||||||
|
} );
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
this.shiftTree = function ( show ) {
|
||||||
|
|
||||||
|
var $tree = $( "#tree" );
|
||||||
|
var $extended = $( "#extended" );
|
||||||
|
var show = show || false;
|
||||||
|
|
||||||
|
if ( $tree.outerWidth() < $extended.offset().left || show ) {
|
||||||
|
$tree.stop().animate( { left: 0 } );
|
||||||
|
} else {
|
||||||
|
$tree.stop().animate( { left: 24 - $tree.outerWidth() } );
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
this.initShifting = function () {
|
||||||
|
|
||||||
|
$( "#tree" ).hover(
|
||||||
|
function () {
|
||||||
|
thistree.shiftTree( true );
|
||||||
|
},
|
||||||
|
function () {
|
||||||
|
thistree.shiftTree();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
$( window ).resize( function() {
|
||||||
|
thistree.shiftTree();
|
||||||
|
} );
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
this.populateTree = function () {
|
||||||
|
|
||||||
|
var $tree = $( "#tree" );
|
||||||
|
$tree.css( { left: -400 } ).show();
|
||||||
|
|
||||||
|
this.shiftTree();
|
||||||
|
|
||||||
|
this.fetchTree( decodeURI( document.location.pathname ), function( entry ) {
|
||||||
|
$tree.empty().append( entry.toHtml() );
|
||||||
|
thistree.shiftTree();
|
||||||
|
} );
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
this.fetchTree = function ( pathname, callback ) {
|
||||||
|
|
||||||
|
this.walkBack( pathname, function( walkbackedPathname ) {
|
||||||
|
var entry = new File( utils, walkbackedPathname );
|
||||||
|
thistree.fetchEntriesRecursive( walkbackedPathname, function ( content ) {
|
||||||
|
entry.content = content;
|
||||||
|
callback( entry );
|
||||||
|
} );
|
||||||
|
} );
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
this.walkBack = function ( pathname, callback ) {
|
||||||
|
|
||||||
|
var splits = utils.splitPathname( pathname );
|
||||||
|
var parent = splits[0];
|
||||||
|
if ( parent === "" ) {
|
||||||
|
callback( pathname );
|
||||||
|
} else {
|
||||||
|
this.checkPathname( parent, function( state ) {
|
||||||
|
if ( state === 0 ) {
|
||||||
|
thistree.walkBack( parent, callback );
|
||||||
|
} else {
|
||||||
|
callback( pathname );
|
||||||
|
};
|
||||||
|
} );
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
this.fetchEntriesRecursive = function ( pathname, callback ) {
|
||||||
|
|
||||||
|
this.fetchEntries( pathname, false, function ( entries ) {
|
||||||
|
if ( entries instanceof Array ) {
|
||||||
|
for ( idx in entries ) {
|
||||||
|
( function ( entry ) {
|
||||||
|
if ( entry.isFolder ) {
|
||||||
|
thistree.fetchEntriesRecursive( entry.absHref, function( content ) {
|
||||||
|
entry.content = content;
|
||||||
|
callback( entries );
|
||||||
|
} );
|
||||||
|
};
|
||||||
|
} ) ( entries[idx] );
|
||||||
|
};
|
||||||
|
};
|
||||||
|
callback( entries );
|
||||||
|
} );
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
this.fetchEntries = function ( pathname, includeParent, callback ) {
|
||||||
|
|
||||||
|
this.checkPathname( pathname, function ( status ) {
|
||||||
|
console.log( "checkPathname", pathname, status );
|
||||||
|
if ( status !== 0 ) {
|
||||||
|
callback( status );
|
||||||
|
} else {
|
||||||
|
$.ajax( {
|
||||||
|
url: pathname,
|
||||||
|
type: "GET",
|
||||||
|
dataType: "html",
|
||||||
|
error: function ( xhr ) {
|
||||||
|
// since it was checked before this should never happen
|
||||||
|
callback( xhr.status );
|
||||||
|
},
|
||||||
|
success: function ( html, status, xhr ) {
|
||||||
|
if ( !contentTypeRegEx.test( xhr.getResponseHeader( "Content-Type" ) ) ) {
|
||||||
|
// since it was checked before this should never happen
|
||||||
|
callback( xhr.status );
|
||||||
|
} else {
|
||||||
|
var entries = [];
|
||||||
|
$( html ).find( "#table table td" ).closest( "tr" ).each( function () {
|
||||||
|
var entry = new File( utils, pathname, this );
|
||||||
|
if ( !entry.isParentFolder || includeParent ) {
|
||||||
|
entries.push( entry );
|
||||||
|
};
|
||||||
|
} );
|
||||||
|
callback( entries );
|
||||||
|
};
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
};
|
||||||
|
} );
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
this.checkPathname = function ( pathname, callback ) {
|
||||||
|
|
||||||
|
if ( h5ai.config.folderStatus[ pathname ] !== undefined ) {
|
||||||
|
callback( h5ai.config.folderStatus[ pathname ] );
|
||||||
|
} else {
|
||||||
|
$.ajax( {
|
||||||
|
url: pathname,
|
||||||
|
type: "HEAD",
|
||||||
|
complete: function ( xhr ) {
|
||||||
|
if ( xhr.status === 200 && contentTypeRegEx.test( xhr.getResponseHeader( "Content-Type" ) ) ) {
|
||||||
|
callback( 0 );
|
||||||
|
} else {
|
||||||
|
callback( xhr.status );
|
||||||
|
};
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
15
src/h5ai/js/inc/utils.js
Normal file
15
src/h5ai/js/inc/utils.js
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
|
||||||
|
var Utils = function () {
|
||||||
|
|
||||||
|
var pathnameRegEx = /^(\/(.*\/)*)([^\/]+\/?)$/;
|
||||||
|
|
||||||
|
this.splitPathname = function ( pathname ) {
|
||||||
|
|
||||||
|
if ( pathname === "/" ) {
|
||||||
|
return [ "", "/" ];
|
||||||
|
};
|
||||||
|
var match = pathnameRegEx.exec( pathname );
|
||||||
|
return [ match[1], match[3] ];
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
|
@ -1,3 +1,37 @@
|
||||||
// @include "inc/jquery.json.min.js"
|
( function( $ ) {
|
||||||
// @include "inc/h5ai.js"
|
|
||||||
// #not#include "inc/h5aitree.js"
|
// @include "inc/utils.js"
|
||||||
|
// @include "inc/h5ai.js"
|
||||||
|
// @include "inc/file.js"
|
||||||
|
// @include "inc/tree.js"
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************
|
||||||
|
* create
|
||||||
|
*******************************/
|
||||||
|
|
||||||
|
var utils = new Utils();
|
||||||
|
var h5ai = new H5ai( h5aiOptions );
|
||||||
|
var tree = new Tree( utils, h5ai );
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************
|
||||||
|
* register public api
|
||||||
|
*******************************/
|
||||||
|
|
||||||
|
$.h5ai = {
|
||||||
|
folderClick: h5ai.folderClick,
|
||||||
|
fileClick: h5ai.fileClick
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************
|
||||||
|
* init after dom load
|
||||||
|
*******************************/
|
||||||
|
|
||||||
|
$( function() {
|
||||||
|
h5ai.init();
|
||||||
|
tree.init();
|
||||||
|
} );
|
||||||
|
|
||||||
|
} )( jQuery );
|
8
src/h5ai/options.js
Normal file
8
src/h5ai/options.js
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
|
||||||
|
h5aiOptions = {
|
||||||
|
viewmodes: [ "icons", "details" ],
|
||||||
|
showTree: true,
|
||||||
|
folderStatus: {
|
||||||
|
"/develop/folder-types/phpsite/": 200
|
||||||
|
}
|
||||||
|
};
|
|
@ -1,5 +1,5 @@
|
||||||
################################
|
################################
|
||||||
# h5ai 0.5.2
|
# h5ai 0.5.3
|
||||||
# customized .htaccess
|
# customized .htaccess
|
||||||
################################
|
################################
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
|
|
||||||
IndexOrderDefault Ascending Name
|
IndexOrderDefault Ascending Name
|
||||||
|
|
||||||
IndexOptions Type=text/html;h5ai=0.5.2
|
IndexOptions Type=text/html;h5ai=0.5.3
|
||||||
IndexOptions Charset=UTF-8
|
IndexOptions Charset=UTF-8
|
||||||
IndexOptions FancyIndexing
|
IndexOptions FancyIndexing
|
||||||
IndexOptions HTMLTable
|
IndexOptions HTMLTable
|
||||||
|
|
|
@ -11,12 +11,13 @@
|
||||||
<img class="techclass" src="/h5ai/images/html5-storage.png" alt="html5-storage" />
|
<img class="techclass" src="/h5ai/images/html5-storage.png" alt="html5-storage" />
|
||||||
<img class="techclass" src="/h5ai/images/html5-css3.png" alt="html5-css3" />
|
<img class="techclass" src="/h5ai/images/html5-css3.png" alt="html5-css3" />
|
||||||
</a>
|
</a>
|
||||||
<a href="http://larsjung.de/h5ai" target="_blank" title="h5ai 0.5.2">h5ai</a>
|
<a href="http://larsjung.de/h5ai" target="_blank" title="h5ai 0.5.3">h5ai</a>
|
||||||
using
|
using
|
||||||
<a href="http://tiheum.deviantart.com/art/Faenza-Icons-173323228" target="_blank" title="icon theme for Gnome">Faenza icons</a>
|
<a href="http://tiheum.deviantart.com/art/Faenza-Icons-173323228" target="_blank" title="icon theme for Gnome">Faenza icons</a>
|
||||||
</footer>
|
</footer>
|
||||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
|
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
|
||||||
<script>window.jQuery || document.write( '<script src="/h5ai/js/lib/jquery.min.js"><\/script>' )</script>
|
<script>window.jQuery || document.write( '<script src="/h5ai/js/lib/jquery.min.js"><\/script>' )</script>
|
||||||
|
<script src="/h5ai/options.js"></script>
|
||||||
<script src="/h5ai/js/main.js"></script>
|
<script src="/h5ai/js/main.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
|
@ -3,7 +3,7 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>Directory index · styled with h5ai</title>
|
<title>Directory index · styled with h5ai</title>
|
||||||
<meta name="h5ai-version" content="h5ai 0.5.2">
|
<meta name="h5ai-version" content="h5ai 0.5.3">
|
||||||
<meta name="description" content="Directory index styled with h5ai (http://larsjung.de/h5ai)">
|
<meta name="description" content="Directory index styled with h5ai (http://larsjung.de/h5ai)">
|
||||||
<meta name="keywords" content="directory, index, autoindex, h5ai">
|
<meta name="keywords" content="directory, index, autoindex, h5ai">
|
||||||
<link rel="shortcut icon" type="image/png" href="/h5ai/images/h5ai-16x16.png">
|
<link rel="shortcut icon" type="image/png" href="/h5ai/images/h5ai-16x16.png">
|
||||||
|
|
File diff suppressed because one or more lines are too long
8
target/h5ai/options.js
Normal file
8
target/h5ai/options.js
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
|
||||||
|
h5aiOptions = {
|
||||||
|
viewmodes: [ "icons", "details" ],
|
||||||
|
showTree: true,
|
||||||
|
folderStatus: {
|
||||||
|
"/develop/folder-types/phpsite/": 200
|
||||||
|
}
|
||||||
|
};
|
Loading…
Add table
Add a link
Reference in a new issue