From dd994bf6f54608b8b5a09d69c7304f4f51f8f2de Mon Sep 17 00:00:00 2001 From: ville rantanen Date: Tue, 1 Oct 2013 16:46:41 +0300 Subject: [PATCH] New structure for storing images --- Qalbum.py | 60 +++++++++++++------------- galleryscript.js | 108 ++++++++++++++++++++++------------------------- 2 files changed, 81 insertions(+), 87 deletions(-) diff --git a/Qalbum.py b/Qalbum.py index 5784f42..61c7437 100755 --- a/Qalbum.py +++ b/Qalbum.py @@ -132,20 +132,25 @@ def getpathlist(path,options=False): def pathscript(path,list): ''' Returns the javascript string of pathlist and pathimage arrays ''' - scrstr='' + this_str+='image:"" }' + elements.append(this_str) + scrstr+=','.join(elements)+'];' return scrstr def pathlinks(path,list): ''' Returns the HTML string of subfolders ''' + if len(list)==0: + return '
' pathstr='
' pathstr+='

Subfolders

' for p in list: @@ -164,24 +169,28 @@ def pathlinks(path,list): def imagescript(path,list): ''' Returns the javascript string of imagelist and imagedesc ''' - strout='' + strout+=','.join(elements)+'];' return strout def imagelinks(path,list): ''' Returns the HTML string of images ''' + if len(list)==0: + return '
' strout='