ajout du statut de l'imprimante
darcs-hash:20061013102845-f46e9-f7214edb3cef8b6e0b22f8d48edd3e64c6c71020.gz
This commit is contained in:
parent
45cc775a82
commit
6cbf7fe710
3 changed files with 55 additions and 40 deletions
|
@ -2,6 +2,7 @@
|
|||
import cherrypy, tempfile, shutil, os
|
||||
import crans.impression
|
||||
import crans.impression.digicode
|
||||
import crans.impression.etat_imprimante
|
||||
|
||||
FILE_UPLOAD_BASE_FOLDER = cherrypy.config.get('fileUpload.folder', "/var/impression/fichiers/")
|
||||
|
||||
|
@ -34,6 +35,11 @@ class root:
|
|||
data['openError'] = "Choisissez un fichier"
|
||||
|
||||
data['fileList'] = self.getUploadedFileListFor(cherrypy.session['uid'])
|
||||
try:
|
||||
data['etatImprimante'] = "<br />".join(crans.impression.etat_imprimante.etat())
|
||||
except Exception, e:
|
||||
data['etatImprimante'] = 'Imprimante hors ligne'
|
||||
data['Erreur_imprimante'] = str(e)
|
||||
return {'template':'impression',
|
||||
'values':data,
|
||||
'stylesheets':['impression.css'],
|
||||
|
|
|
@ -1,42 +1,38 @@
|
|||
#import crans.impression
|
||||
|
||||
<div id="globalDiv">
|
||||
|
||||
<form id="form_impression" name="form_impression" onsubmit="Impression.popup();return false;">
|
||||
<fieldset><legend>Options d'impression</legend>
|
||||
<div id="leftColumn">
|
||||
<div id="preview" onclick="Impression.settings.init();"></div>
|
||||
<div class="clear prix_impression" id="prix_placeholder"></div>
|
||||
</div>
|
||||
<div class="clear prix_impression" id="prix_placeholder"></div>
|
||||
</div>
|
||||
|
||||
<div id="rightColumn">
|
||||
<div id="rightColumn">
|
||||
<fieldset><legend>Type d'impression</legend>
|
||||
<label for="type_impression_couleur" class="labelRadio compact"><input type="radio" name="type_impression" id="type_impression_couleur" class="inputRadio" value="$crans.impression.IMPRESSION_COULEUR" checked="checked" onClick="Impression.settings.update(this);" /> Couleurs</label>
|
||||
<label for="type_impression_nb" class="labelRadio compact"><input type="radio" name="type_impression" id="type_impression_nb" class="inputRadio" value="$crans.impression.IMPRESSION_NB" onClick="Impression.settings.update(this);" />Noir et blanc</label>
|
||||
</fieldset>
|
||||
<label for="type_impression_couleur" class="labelRadio compact"><input type="radio" name="type_impression" id="type_impression_couleur" class="inputRadio" value="$crans.impression.IMPRESSION_COULEUR" checked="checked" onClick="Impression.settings.update(this);" /> Couleurs</label>
|
||||
<label for="type_impression_nb" class="labelRadio compact"><input type="radio" name="type_impression" id="type_impression_nb" class="inputRadio" value="$crans.impression.IMPRESSION_NB" onClick="Impression.settings.update(this);" />Noir et blanc</label>
|
||||
</fieldset>
|
||||
|
||||
<fieldset><legend>Copies et papier</legend>
|
||||
<fieldset><legend>Copies et papier</legend>
|
||||
|
||||
<label for="papier" class="labelInput">Papier:</label>
|
||||
<select name="papier" id="papier" class="selectOne" onChange="Impression.settings.update(this);">
|
||||
#for type_papier in $crans.impression.PAPIER_VALEURS_POSSIBLES
|
||||
<option value="$type_papier">$crans.impression.LABELS[type_papier]</option>
|
||||
<label for="papier" class="labelInput">Papier:</label>
|
||||
<select name="papier" id="papier" class="selectOne" onChange="Impression.settings.update(this);">
|
||||
#for type_papier in $crans.impression.PAPIER_VALEURS_POSSIBLES
|
||||
<option value="$type_papier">$crans.impression.LABELS[type_papier]</option>
|
||||
#end for
|
||||
</select>
|
||||
|
||||
<br />
|
||||
|
||||
<label for="agrafes" class="labelInput">Agrafes:</label>
|
||||
<select name="agrafes" id="agrafes" class="selectOne" onChange="Impression.settings.update(this);">
|
||||
</select>
|
||||
<br />
|
||||
<label for="agrafes" class="labelInput">Agrafes:</label>
|
||||
<select name="agrafes" id="agrafes" class="selectOne" onChange="Impression.settings.update(this);">
|
||||
#for type_agrafes in $crans.impression.AGRAPHES_VALEURS_POSSIBLES
|
||||
<option value="$type_agrafes">$crans.impression.LABELS[type_agrafes]</option>
|
||||
#end for
|
||||
</select>
|
||||
</select>
|
||||
<br />
|
||||
|
||||
<br />
|
||||
|
||||
<label for="nb_copies" class="labelInput">Copies:</label>
|
||||
<input onKeyUp="Impression.settings.update(this);" type="text" name="nb_copies" id="nb_copies" class="inputText" size="10" maxlength="50" value="1" />
|
||||
<label for="nb_copies" class="labelInput">Copies:</label>
|
||||
<input onKeyUp="Impression.settings.update(this);" type="text" name="nb_copies" id="nb_copies" class="inputText" size="10" maxlength="50" value="1" />
|
||||
</fieldset>
|
||||
|
||||
<fieldset><legend>Disposition</legend>
|
||||
|
@ -45,7 +41,7 @@
|
|||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="clear bouttons">
|
||||
<div class="clear bouttons">
|
||||
<input type="reset" value="Reset" onclick="Impression.settings.reset();return false;" />
|
||||
<input type="button" value="Devis" onclick="window.open('devis')" />
|
||||
<input type="button" value="Imprimer" onclick="Impression.AJAX.lancerImpression();"/>
|
||||
|
@ -60,12 +56,15 @@
|
|||
<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>
|
||||
|
||||
|
||||
<!-- <li><a href="historique">Historique</a></li> -->
|
||||
</ul>
|
||||
|
||||
#if not $getVar('fileName',False)
|
||||
#if not $getVar('Erreur_imprimante',False)
|
||||
#if not $getVar('fileName',False)
|
||||
<div id="popupFichiers">
|
||||
<h1>Impression - Choix fichier</h1>
|
||||
<div id="insideDiv">
|
||||
|
@ -96,24 +95,34 @@
|
|||
roundElement("popupFichiers");
|
||||
roundElement("insideDiv");
|
||||
</script>
|
||||
#end if
|
||||
|
||||
#end if
|
||||
|
||||
</div>
|
||||
|
||||
#if $getVar('fileName',False)
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
Impression.settings.init();
|
||||
Impression.AJAX.usefile('$fileName');
|
||||
Impression.settings.preloadAllImages();
|
||||
//-->
|
||||
</script>
|
||||
#if $getVar('fileName',False)
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
Impression.settings.init();
|
||||
Impression.AJAX.usefile('$fileName');
|
||||
Impression.settings.preloadAllImages();
|
||||
//-->
|
||||
</script>
|
||||
#else
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
Impression.settings.init();
|
||||
Impression.settings.disableForm(true);
|
||||
//-->
|
||||
</script>
|
||||
#end if
|
||||
#else
|
||||
## desactivation de l'interface si l'imprimant a un probleme
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
Impression.settings.init();
|
||||
Impression.settings.disableForm(true);
|
||||
logError("$Erreur_imprimante");
|
||||
//-->
|
||||
</script>
|
||||
#end if
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
padding:20px;
|
||||
background:#eee;
|
||||
border:3px solid #ddd;
|
||||
margin:auto auto;
|
||||
margin:0 auto;
|
||||
}
|
||||
.liens {
|
||||
text-align:right;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue