--- zogiLib/zogiLib.py 2004/06/03 18:05:57 1.22 +++ zogiLib/zogiLib.py 2004/06/04 12:28:12 1.23 @@ -491,6 +491,12 @@ class zogiLib(Folder): tag += '' return tag + def createScalerDiv(self): + """generate scaler img and table with navigation arrows""" + self.checkQuery() + pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt/zogilib_img_div')).__of__(self) + return pt() + def createAuxDiv(self): """generate other divs""" self.checkQuery() @@ -628,6 +634,15 @@ class zogiLib(Folder): if not (self.REQUEST.SESSION): print "ZOGILIB: have to store query!!" storeQuery(self) + + def zogilibPath(self): + """returns an URL to the zogiLib instance""" + url = self.REQUEST['URL1'] + url += self.basePath + # should end with "/" + if len(url) > 0 and url[-1] != '/': + url += '/' + return url def getDLParam(self, param): """returns parameter""" @@ -659,24 +674,16 @@ class zogiLib(Folder): def setDLParams(self,pn=None,ws=None,rot=None,brgt=None,cont=None): """setze Parameter""" - ret="" - - if brgt: - self.setDLParam('brgt', brgt) - if cont: - self.setDLParam('cont', cont) + self.setDLParam('brgt', brgt) + self.setDLParam('cont', cont) + self.setDLParam('ws', ws) + self.setDLParam('rot', rot) if pn: # unmark self.setDLParam('mk', None) self.setDLParam('pn', pn) - - if ws: - self.setDLParam('ws', ws) - - if rot: - self.setDLParam('rot', rot) return self.display() @@ -707,8 +714,10 @@ class zogiLib(Folder): def getBiggerWS(self): """ws+1""" - ws=self.getDLParam('ws') + ws = self.getDLParam('ws') + print "ws: ", ws if ws: + print "WS!" return int(ws)+1 else: return 2 @@ -717,10 +726,7 @@ class zogiLib(Folder): """ws-1""" ws=self.getDLParam('ws') if ws: - if int(ws)==1: - return 1 - else: - return int(ws)-1 + return max(int(ws)-1, 1) else: return 1