Starting to work with configuration window
This commit is contained in:
@@ -239,12 +239,10 @@ function subfolderdetaillist() {
|
||||
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='';
|
||||
@@ -563,13 +561,21 @@ function keypressed(e) {
|
||||
if (currentimage>(imagelist.length-1)) { currentimage=0; }
|
||||
showimage(currentimage);
|
||||
}
|
||||
// f: fullscreen
|
||||
if (unicode==70) {
|
||||
flipfullscreen();
|
||||
}
|
||||
// o: originals
|
||||
if (unicode==79) {
|
||||
fliporiginals();
|
||||
}
|
||||
// f: fullscreen
|
||||
if (unicode==70) {
|
||||
flipfullscreen();
|
||||
// s: setup
|
||||
if (unicode==83) {
|
||||
if (document.getElementById('setupcontainer')) {
|
||||
usersetupclose();
|
||||
} else {
|
||||
usersetup();
|
||||
}
|
||||
}
|
||||
// x: mark image
|
||||
if (unicode==88) {
|
||||
@@ -584,6 +590,43 @@ function keypressed(e) {
|
||||
|
||||
return;
|
||||
}
|
||||
function usersetup() {
|
||||
if (!document.getElementById('setupcontainer')) {
|
||||
el=getsetupwindow();
|
||||
document.body.appendChild(el);
|
||||
el.scrollIntoView(true);
|
||||
}
|
||||
return
|
||||
}
|
||||
function usersetupclose() {
|
||||
if (document.getElementById('setupcontainer')) {
|
||||
var el=document.getElementById('setupcontainer')
|
||||
el.parentNode.removeChild(el);
|
||||
}
|
||||
return
|
||||
}
|
||||
function getsetupwindow() {
|
||||
/* Returns an object containing the long help text */
|
||||
var el = document.createElement('div');
|
||||
el.setAttribute("id", 'setupcontainer');
|
||||
//el.setAttribute("class", 'result-help');
|
||||
var str='<a href="javascript:void(0)" onclick="usersetupclose();">Close</a>';
|
||||
/* Items to setup:
|
||||
* var currentimage=-1; = offset
|
||||
* var originals=false;
|
||||
* var fullscreen=false;
|
||||
* var slideshowinterval;
|
||||
* sort name, time, namerev, timerev
|
||||
*/
|
||||
str+='<div class="headsmall">Configuration</div> '+
|
||||
'Your query will be searched in file names. ';
|
||||
if (location.protocol!='file:') {
|
||||
str+='<li/>Example: <a href="'+top.location.origin+top.location.pathname+'?full=1" target="_BLANK">'+
|
||||
top.location.origin+top.location.pathname+'?full=1</a>';
|
||||
}
|
||||
el.innerHTML=str;
|
||||
return el
|
||||
}
|
||||
|
||||
function notsupported() {
|
||||
// not supported devices (i.e. the javascript doesnt work properly )
|
||||
|
||||
Reference in New Issue
Block a user