version 1.19, 2004/03/15 17:11:43
|
version 1.22, 2004/06/25 12:49:01
|
Line 74 class ImageDigilib(Folder,Persistent,Imp
|
Line 74 class ImageDigilib(Folder,Persistent,Imp
|
f=open(filename,"w") |
f=open(filename,"w") |
f.write(filedata) |
f.write(filedata) |
f.close() |
f.close() |
|
try: |
os.chmod(filename,0644) |
os.chmod(filename,0644) |
|
except: |
|
"""hack""" |
os.popen("ssh nausikaa2.rz-berlin.mpg.de /usr/local/mpiwg/scripts/scaleomat.pl %s /mpiwg/temp/online/scaled/small 100 &"% self.ImageViewerPath) |
os.popen("ssh nausikaa2.rz-berlin.mpg.de /usr/local/mpiwg/scripts/scaleomat.pl %s /mpiwg/temp/online/scaled/small 100 &"% self.ImageViewerPath) |
|
|
|
|
Line 83 class ImageDigilib(Folder,Persistent,Imp
|
Line 86 class ImageDigilib(Folder,Persistent,Imp
|
|
|
def download(self): |
def download(self): |
"""download""" |
"""download""" |
path="http://nausikaa2.rz-berlin.mpg.de/digitallibrary/servlet/Scaler/?fn="+self.ImageViewerPath+"/"+self.filename+"&mo=rawfile,highres" |
path="http://nausikaa2.rz-berlin.mpg.de/digitallibrary/servlet/Scaler/?fn="+self.ImageViewerPath+"/"+self.filename+"&mo=rawfile,hires" |
#self.REQUEST.SESSION['string']="<img src=\"%s\">"% path |
#self.REQUEST.SESSION['string']="<img src=\"%s\">"% path |
#pt=PageTemplateFile('Products/ImageArchive/thumb.zpt').__of__(self) |
#pt=PageTemplateFile('Products/ImageArchive/thumb.zpt').__of__(self) |
return self.REQUEST.RESPONSE.redirect(path) |
return self.REQUEST.RESPONSE.redirect(path) |
Line 110 class ImageDigilib(Folder,Persistent,Imp
|
Line 113 class ImageDigilib(Folder,Persistent,Imp
|
"""show image""" |
"""show image""" |
#DEVELOP: take first one for server |
#DEVELOP: take first one for server |
|
|
path="http://nausikaa2.rz-berlin.mpg.de:18080/digitallibrary/digilib.jsp?lv=1&fn="+self.ImageViewerPath+"/"+self.filename |
path="http://content.mpiwg-berlin.mpg.de/zogilib_images?lv=2&fn="+self.ImageViewerPath+"/"+self.filename |
|
|
#path="http://localhost:8080/mpiwg/online/"+self.ImageViewerPath+"/"+self.filename |
#path="http://localhost:8080/mpiwg/online/"+self.ImageViewerPath+"/"+self.filename |
#self.REQUEST.SESSION['string']="<img src=\"%s\">"% path |
#self.REQUEST.SESSION['string']="<img src=\"%s\">"% path |
Line 534 class ImageCollection(Folder, Persistent
|
Line 537 class ImageCollection(Folder, Persistent
|
try: |
try: |
rows=int(REQUEST.cookies["ImageViewerRows"]) |
rows=int(REQUEST.cookies["ImageViewerRows"]) |
except: |
except: |
rows=None |
rows=6 |
else: |
else: |
rows=None |
rows=6 |
|
|
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=3 |
cols=2 |
|
|
idsnumber=len(self.show_thumbs()) |
idsnumber=len(self.show_thumbs()) |
if rows: |
if rows: |
Line 661 def manage_AddImageCollection(self,id,ti
|
Line 664 def manage_AddImageCollection(self,id,ti
|
|
|
|
|
class ImageCollectionIFrame(ImageCollection): |
class ImageCollectionIFrame(ImageCollection): |
"""Class für Collection set als IFrame""" |
"""Class fuer Collection set als IFrame""" |
|
|
meta_type="ImageCollectionIFrame" |
meta_type="ImageCollectionIFrame" |
label=ImageCollection.title |
label=ImageCollection.title |
|
|
|
def rotate(self,angle,url,RESPONSE): |
|
"""rotate""" |
|
|
|
RESPONSE.redirect("javascript:document.domain='mpg.de';parent.iframe.right.rotation(%i)"%int(angle)) |
|
RESPONSE.redirect(url) |
def request(self): |
def request(self): |
"""request""" |
"""request""" |
return self.REQUEST |
return self.REQUEST |