|
|
| version 1.11, 2004/01/06 16:16:42 | version 1.12, 2004/01/06 16:47:49 |
|---|---|
| Line 466 class ImageCollection(Folder, Persistent | Line 466 class ImageCollection(Folder, Persistent |
| nr=0 | nr=0 |
| else: | else: |
| nr=0 | nr=0 |
| try: | |
| num=ids.index(filename) | |
| except: | |
| num=0 | |
| if ids.index(filename)==0: | if num==0: |
| return "" | return "" |
| else: | else: |
| if selected: | if selected: |
| Line 500 class ImageCollection(Folder, Persistent | Line 504 class ImageCollection(Folder, Persistent |
| """set coltimes row""" | """set coltimes row""" |
| RESPONSE=self.REQUEST.RESPONSE | RESPONSE=self.REQUEST.RESPONSE |
| if not rows: | if not rows: |
| rows=100000 | rows=None |
| if rows=="": | if rows=="": |
| rows=100000 | rows=None |
| if rows: | |
| RESPONSE.setCookie("ImageViewerRows",rows) | RESPONSE.setCookie("ImageViewerRows",rows) |
| RESPONSE.setCookie("ImageViewerCols",cols) | RESPONSE.setCookie("ImageViewerCols",cols) |
| RESPONSE.redirect(self.REQUEST['URL1']+"/setDone") | RESPONSE.redirect(self.REQUEST['URL1']+"/setDone") |
| def getColTimesRow(self): | def getColTimesRow(self): |
| """coltimesrow""" | |
| REQUEST=self.REQUEST | REQUEST=self.REQUEST |
| """matrix""" | """matrix""" |
| Line 517 class ImageCollection(Folder, Persistent | Line 524 class ImageCollection(Folder, Persistent |
| try: | try: |
| rows=int(REQUEST.cookies["ImageViewerRows"]) | rows=int(REQUEST.cookies["ImageViewerRows"]) |
| except: | except: |
| rows=20 | rows=None |
| else: | else: |
| rows=20 | rows=None |
| if REQUEST.cookies.has_key("ImageViewerCols"): | if REQUEST.cookies.has_key("ImageViewerCols"): |
| print "COLS",REQUEST.cookies["ImageViewerCols"] | #print "COLS",REQUEST.cookies["ImageViewerCols"] |
| cols=int(REQUEST.cookies["ImageViewerCols"]) | cols=int(REQUEST.cookies["ImageViewerCols"]) |
| else: | else: |
| cols=4 | cols=4 |
| print cols,rows | |
| idsnumber=len(self.show_thumbs()) | |
| if rows: | |
| if cols*rows >idsnumber: | |
| rows=int(idsnumber/cols)+1 | |
| return (cols,rows) | return (cols,rows) |
| Line 548 class ImageCollection(Folder, Persistent | Line 559 class ImageCollection(Folder, Persistent |
| print "NOR:",numberOfRows | print "NOR:",numberOfRows |
| if numberOfRows: | if numberOfRows: |
| try: | |
| startPic=idsAll.index(startId) | startPic=idsAll.index(startId) |
| endPic=startPic+numberOfColumns*numberOfRows | endPic=startPic+numberOfColumns*numberOfRows |
| ids=idsAll[startPic:endPic] | ids=idsAll[startPic:endPic] |
| except: | |
| ids=idsAll | |
| else: | else: |
| ids=idsAll | ids=idsAll |