diff --git a/Qalbum.py b/Qalbum.py
index 8ea9b89..8aa56db 100755
--- a/Qalbum.py
+++ b/Qalbum.py
@@ -184,9 +184,8 @@ def filelinks(path,list):
strout+='
Attachments'
n=0
for i in list:
- nice=nicestring(i)
size=sizestring(os.path.getsize(os.path.join(path,i)))
- strout+=''+unicode(nice,encoding="utf8").encode('ascii', 'xmlcharrefreplace')+' ['+size+']'
+ strout+=''+unicode(i,encoding="utf8").encode('ascii', 'xmlcharrefreplace')+' ['+size+']'
n+=1
strout+=''
return strout
diff --git a/galleryscript.js b/galleryscript.js
index db37f01..8978b35 100644
--- a/galleryscript.js
+++ b/galleryscript.js
@@ -239,12 +239,10 @@ function subfolderdetaillist() {
ob=document.getElementById('pathcontainer');
pathstr='';
for (p=0; p0) {
imgstr='';
} else { imgstr=''; }
pathstr+='';
-
}
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='Close';
+ /* Items to setup:
+ * var currentimage=-1; = offset
+ * var originals=false;
+ * var fullscreen=false;
+ * var slideshowinterval;
+ * sort name, time, namerev, timerev
+ */
+ str+='Configuration
'+
+ 'Your query will be searched in file names. ';
+ if (location.protocol!='file:') {
+ str+='Example: '+
+ top.location.origin+top.location.pathname+'?full=1';
+ }
+ el.innerHTML=str;
+ return el
+}
function notsupported() {
// not supported devices (i.e. the javascript doesnt work properly )
diff --git a/gallerystyle.css b/gallerystyle.css
index f6d2fd4..0108afe 100644
--- a/gallerystyle.css
+++ b/gallerystyle.css
@@ -64,7 +64,7 @@ body {
}
.attachmentbox {
float: left;
- width: 150px;
+ clear: both;
}
.thumbimage {
height:90px;
@@ -146,6 +146,15 @@ body {
#preloadcontainer {
display: none;
}
+#setupcontainer {
+ position: absolute;
+ top: 10px;
+ left: 10px;
+ padding: 10px 10px 10px 10px;
+ z-index:99;
+ background-color: white;
+ border: solid 1px black;
+}
h1 {
font-size: large;
font-family: sans-serif;