Modification pour ie.
a marche presque... mais ie fait encore des trucs nuls... darcs-hash:20061116222359-f46e9-a7348bde89828fabf9bc2c40a5aafc0c52fed8c4.gz
This commit is contained in:
parent
2ce1e81bcf
commit
dce073de67
2 changed files with 38 additions and 41 deletions
|
@ -20,13 +20,13 @@ class root:
|
|||
def index(self, submit = None, fileList = None, newFile = None ):
|
||||
data = {}
|
||||
cherrypy.session['impression'] = None
|
||||
if submit == "submit_send":
|
||||
if submit == "Envoyer":
|
||||
try:
|
||||
self.savePDF(newFile)
|
||||
data['fileName'] = newFile.filename
|
||||
except FileError, e:
|
||||
data['openError'] = e.args[0]
|
||||
elif submit == "submit_chose":
|
||||
elif submit == "Choisir":
|
||||
if (fileList):
|
||||
data['fileName'] = fileList
|
||||
else:
|
||||
|
@ -92,8 +92,11 @@ class root:
|
|||
filepath = os.path.join(os.path.join(FILE_UPLOAD_BASE_FOLDER, cherrypy.session['uid']+"/"), fileName)
|
||||
cherrypy.session['impression'] = crans.impression.impression(filepath, cherrypy.session['uid'])
|
||||
return {'nbPages': cherrypy.session['impression'].pages()}
|
||||
except crans.impression.FichierInvalide, e:
|
||||
cherrypy.log("useFile : %s (%s)" % (str(e), e.file()), 'IMPRESSION', 1)
|
||||
return {'erreur':str(e) }
|
||||
except Exception, e:
|
||||
cherrypy.log("useFile (erreur): %s" % str(e), 'IMPRESSION', 1)
|
||||
cherrypy.log("useFile : %s" % str(e), 'IMPRESSION', 1)
|
||||
return {'erreur':str(e) }
|
||||
useFile.exposed= True
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue