adding different lists of folders
This commit is contained in:
@@ -146,7 +146,7 @@ def imagescript(path,list):
|
||||
|
||||
def imagelinks(path,list):
|
||||
''' Returns the HTML string of images '''
|
||||
strout='<div id="thumbcontainer">'
|
||||
strout='<div id="thumbcontainer"><noscript>'
|
||||
strout+='<h1>Images</h1>'
|
||||
descriptions=getdescriptions(path,list)
|
||||
n=0
|
||||
@@ -155,7 +155,7 @@ def imagelinks(path,list):
|
||||
desc=doublequotes.sub('',unicode(descriptions[n],encoding="utf8").encode('ascii', 'xmlcharrefreplace'))
|
||||
strout+='<span class="imagebox thumbbox" id="n'+str(n)+'"><a href="'+urllib.quote(i)+'"><img class="thumbimage" "title="'+desc+'" src="_tn/tn_'+urllib.quote(i)+'.jpg"><br/>'+unicode(nice,encoding="utf8").encode('ascii', 'xmlcharrefreplace')+'</a></span>'
|
||||
n+=1
|
||||
strout+='</div>'
|
||||
strout+='</noscript></div>'
|
||||
return strout
|
||||
|
||||
def filescript(path,list):
|
||||
|
||||
@@ -32,7 +32,7 @@ function setup() {
|
||||
if (notsupported()) {
|
||||
return;
|
||||
}
|
||||
hidethumbs();
|
||||
//hidethumbs();
|
||||
document.onkeydown=keypressed;
|
||||
var req=request();
|
||||
if (req!=-1) {
|
||||
@@ -162,7 +162,8 @@ function allthumbs() {
|
||||
function subfoldersmalllist() {
|
||||
// Shows a small subfolder list
|
||||
ob=document.getElementById('pathcontainer');
|
||||
pathstr='<span id="pathsmalllink">Subfolders: ';
|
||||
pathstr='<span class="pathsmalllink">Subfolders: ';
|
||||
pathstr+='<span class="pathsmalllink">(<a href="javascript:void(0);" onclick="subfoldersmalllist();">text</a> <a href="javascript:void(0);" onclick="subfolderbiglist();">icon</a> <a href="javascript:void(0);" onclick="subfolderdetaillist();">list</a>)</span> ';
|
||||
for (p=0; p<pathlist.length; p++) {
|
||||
pathstr+='<a href="'+encodeURI(pathlist[p][0])+'/index.html">'+nicestring(pathlist[p][0])+'</a>('+String(pathlist[p][1])+')/ ';
|
||||
}
|
||||
@@ -175,7 +176,7 @@ function subfoldersmalllist() {
|
||||
function subfolderbiglist() {
|
||||
// Shows a subfolder list with thumbnails
|
||||
ob=document.getElementById('pathcontainer');
|
||||
pathstr='<h2>Subfolders:</h2>';
|
||||
pathstr='<h2>Subfolders: <span class="pathsmalllink">(<a href="javascript:void(0);" onclick="subfoldersmalllist();">text</a> <a href="javascript:void(0);" onclick="subfolderbiglist();">icon</a> <a href="javascript:void(0);" onclick="subfolderdetaillist();">list</a>)</span></h2>';
|
||||
for (p=0; p<pathlist.length; p++) {
|
||||
if (pathimage[p].length>0) {
|
||||
imgstr='<span class="pathbox" id="p'+p+'" style="background-image:url(\''+encodeURI(pathimage[p])+'\');">';
|
||||
@@ -187,6 +188,23 @@ function subfolderbiglist() {
|
||||
} else { ob.innerHTML=pathstr; }
|
||||
return;
|
||||
}
|
||||
function subfolderdetaillist() {
|
||||
// Shows a subfolder list with thumbnails
|
||||
ob=document.getElementById('pathcontainer');
|
||||
pathstr='<h2>Subfolders: <span class="pathsmalllink">(<a href="javascript:void(0);" onclick="subfoldersmalllist();">text</a> <a href="javascript:void(0);" onclick="subfolderbiglist();">icon</a> <a href="javascript:void(0);" onclick="subfolderdetaillist();">list</a>)</span></h2>';
|
||||
for (p=0; p<pathlist.length; p++) {
|
||||
|
||||
if (pathimage[p].length>0) {
|
||||
imgstr='<span class="pathbox" id="p'+p+'" style="background-image:url(\''+encodeURI(pathimage[p])+'\');" >';
|
||||
} else { imgstr='<span class="pathbox" id="p'+p+'">'; }
|
||||
pathstr+='<div class="pathdetailrow"><a title="'+pathlist[p][0]+'" href="'+encodeURI(pathlist[p][0])+'/index.html">'+imgstr+'</span><span class="pathdetaillink"><span class="pathdetaillinktext">'+(pathlist[p][0])+' ('+String(pathlist[p][1])+')</span></span></a></div>';
|
||||
|
||||
}
|
||||
if (pathlist.length==0) {
|
||||
ob.innerHTML='';
|
||||
} else { ob.innerHTML=pathstr; }
|
||||
return;
|
||||
}
|
||||
function sortlist(property) {
|
||||
// sorts the image list based on time or name, or reverse sort
|
||||
var templist=[]
|
||||
|
||||
@@ -33,7 +33,20 @@ body {
|
||||
opacity: 0.8;
|
||||
display: block;
|
||||
}
|
||||
#pathsmalllink {
|
||||
.pathdetailrow {
|
||||
float:left;
|
||||
clear:both;
|
||||
margin-bottom:1px;
|
||||
}
|
||||
.pathdetaillink {
|
||||
white-space:nowrap;
|
||||
overflow:hidden;
|
||||
line-height:80px;
|
||||
}
|
||||
.pathdetaillinktext {
|
||||
background-color: white;
|
||||
}
|
||||
.pathsmalllink {
|
||||
font-size: x-small;
|
||||
}
|
||||
.thumbbox {
|
||||
|
||||
Reference in New Issue
Block a user