correction du bug qui empechait les nom de fichier avec des espaces
darcs-hash:20061020085525-f46e9-34b58ef1d532f18fdc542ad3cd0796af16f5c0d0.gz
This commit is contained in:
parent
04e67f6795
commit
714eafb781
3 changed files with 20 additions and 11 deletions
|
@ -51,10 +51,10 @@ class root:
|
|||
def useFile(self, fileName):
|
||||
try:
|
||||
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'])
|
||||
cherrypy.session['impression'] = crans.impression.impression(filepath.replace(' ', '\ '), cherrypy.session['uid'])
|
||||
return {'nbPages': cherrypy.session['impression'].pages()}
|
||||
except:
|
||||
return {'erreur':'Fichier invalide'}
|
||||
except Exception, e:
|
||||
return {'erreur':str(e) }
|
||||
useFile.exposed= True
|
||||
|
||||
|
||||
|
|
|
@ -19,19 +19,27 @@ ul#actionMenu li {
|
|||
clear:both;
|
||||
}
|
||||
/* ****************************************** *
|
||||
* <!-- file name -->
|
||||
* <!-- file name, menu de gauche -->
|
||||
* ****************************************** */
|
||||
#fileName {
|
||||
width:150px;
|
||||
text-align:center;
|
||||
float:left;
|
||||
//float:left;
|
||||
padding:50px 5px 5px 5px;
|
||||
//eight:20px;
|
||||
background: url(../images/pdf-icon.png) center top no-repeat;
|
||||
margin-top:-30px;
|
||||
//margin-top:-30px;
|
||||
margin-bottom:10px;
|
||||
overflow:auto;
|
||||
}
|
||||
#actionNouvelleImpression {
|
||||
margin:1em 0;
|
||||
}
|
||||
#actionEtatImprimante {
|
||||
padding:0.4em;
|
||||
border: thin black solid;
|
||||
margin:1em 0;
|
||||
}
|
||||
|
||||
/* ******************************************* *
|
||||
* <!-- formulaire reglages impression -->
|
||||
|
|
|
@ -51,14 +51,15 @@
|
|||
|
||||
|
||||
<ul id="actionMenu">
|
||||
#if $getVar('fileName',False)
|
||||
|
||||
#if $getVar('fileName',False)
|
||||
<li><div id="fileName"><span>$fileName</span></div></li>
|
||||
<li><span style="font-weight:bold;">pages: </span><span id="fileNbPages"></span></li>
|
||||
<li><a href="index">Nouvelle impression</a></li>
|
||||
#end if
|
||||
<li><span style="font-weight:bold;">État
|
||||
imprimante:</span><br /><span> $etatImprimante </span></li>
|
||||
|
||||
#end if
|
||||
<li id="actionEtatImprimante"><span style="font-weight:bold;">État
|
||||
imprimante:</span><br /><span> $etatImprimante </span></li>
|
||||
<li id="actionNouvelleImpression"><a href="index">Nouvelle impression</a></li>
|
||||
|
||||
<!-- <li><a href="historique">Historique</a></li> -->
|
||||
</ul>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue