version 1.27, 2004/06/21 16:19:56
|
version 1.28, 2004/06/22 13:35:50
|
Line 15 import urllib
|
Line 15 import urllib
|
import types |
import types |
from Globals import package_home |
from Globals import package_home |
|
|
|
ZOGIVERSION = "0.9.4 ROC:22.6.2004" |
|
|
def sendFile(self, filename, type): |
def sendFile(self, filename, type): |
"""sends an object or a local file (in the product) as response""" |
"""sends an object or a local file (in the product) as response""" |
paths = filename.split('/') |
paths = filename.split('/') |
Line 438 class zogiLib(Folder):
|
Line 440 class zogiLib(Folder):
|
else: |
else: |
self.dlTarget = "digilib" |
self.dlTarget = "digilib" |
|
|
|
def version(self): |
|
"""version information""" |
|
return ZOGIVERSION |
|
|
def getDLInfo(self): |
def getDLInfo(self): |
"""get DLInfo from digilib server""" |
"""get DLInfo from digilib server""" |
paramH={} |
paramH={} |
Line 539 class zogiLib(Folder):
|
Line 545 class zogiLib(Folder):
|
|
|
|
|
def option_js(self): |
def option_js(self): |
"""option_js""" |
"""javascript""" |
pt=PageTemplateFile(os.path.join(package_home(globals()), 'zpt/option_js')).__of__(self) |
return sendFile(self, 'js/option.js', 'text/plain') |
return pt() |
|
|
|
def dl_lib_js(self): |
def dl_lib_js(self): |
"""javascript""" |
"""javascript""" |
Line 717 class zogiLib(Folder):
|
Line 722 class zogiLib(Folder):
|
# assemble query string |
# assemble query string |
ret = "" |
ret = "" |
for param in dlParams.keys(): |
for param in dlParams.keys(): |
|
if dlParams[param] == None: continue |
val = str(dlParams[param]) |
val = str(dlParams[param]) |
if val != "": |
if val != "": |
ret += param + "=" + val + "&" |
ret += param + "=" + val + "&" |
|
|
# omit trailing "&" |
# omit trailing "&" |
return ret.rstrip('&') |
return ret.rstrip('&') |
|
|