[lib/impression, intranet/impression] stripping trailing whitespaces
Ignore-this: a462d23b95fcfc99372f15a2dc645851 darcs-hash:20090516013103-bd074-7538108fca4203285f67d9f4adff82ade6c33f62.gz
This commit is contained in:
parent
5f5b832609
commit
fdfd2254d3
6 changed files with 71 additions and 72 deletions
|
@ -2,8 +2,8 @@
|
|||
* Impression
|
||||
************************************************************
|
||||
* Impression.settings : panneau de configuration
|
||||
* Impression.popup : popup
|
||||
* Impression.AJAX : ajax
|
||||
* Impression.popup : popup
|
||||
* Impression.AJAX : ajax
|
||||
*/
|
||||
Impression = {};
|
||||
|
||||
|
@ -17,7 +17,7 @@ Impression.settings = {};
|
|||
//// images : images used for previewing
|
||||
//
|
||||
Impression.settings.images = [
|
||||
"portrait_couleurs_agraphediagonale.png",
|
||||
"portrait_couleurs_agraphediagonale.png",
|
||||
"portrait_couleurs_pasdagraphes.png",
|
||||
"portrait_couleurs_uneagraphe.png",
|
||||
"portrait_couleurs_Deuxagraphes.png",
|
||||
|
@ -61,7 +61,7 @@ Impression.settings.reset = function () {
|
|||
Impression.settings.update();
|
||||
}
|
||||
|
||||
Impression.settings.disableForm = function(bool)
|
||||
Impression.settings.disableForm = function(bool)
|
||||
{
|
||||
log("Set Disable Form : " + bool);
|
||||
var fields = this.theform.elements;
|
||||
|
@ -74,9 +74,9 @@ Impression.settings.disableForm = function(bool)
|
|||
//
|
||||
//// getValue : parse a field and store value in fielld.name
|
||||
//
|
||||
Impression.settings.getValue = function(field)
|
||||
Impression.settings.getValue = function(field)
|
||||
{
|
||||
if (field.value)
|
||||
if (field.value)
|
||||
{
|
||||
this[field.name] = field.value;
|
||||
log( field.name + " is now " + this[field.name]);
|
||||
|
@ -95,7 +95,7 @@ Impression.settings.getCopies = function(field) {
|
|||
this.copies = 1;
|
||||
logError("Can't get copies");
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
this.copies = parseInt(field.value);
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ Impression.settings.setValue = function(afield, avalue) {
|
|||
//// setDisableField : set field disabled on/off
|
||||
//
|
||||
Impression.settings.setDisableField = function( afield, isdisabled ) {
|
||||
afield.disabled = isdisabled ;
|
||||
afield.disabled = isdisabled ;
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -133,7 +133,7 @@ Impression.settings.update = function () {
|
|||
this.getValue(this.theform.type_impression_couleur);
|
||||
else
|
||||
this.getValue(this.theform.type_impression_nb);
|
||||
|
||||
|
||||
if (this.theform.disposition_recto.checked)
|
||||
this.getValue(this.theform.disposition_recto);
|
||||
else if (this.theform.disposition_recto_verso.checked)
|
||||
|
@ -156,28 +156,28 @@ Impression.settings.update = function () {
|
|||
} else {
|
||||
this.setDisableField(this.theform.agrafes, false);
|
||||
}
|
||||
if (this.papier == "A4tr")
|
||||
if (this.papier == "A4tr")
|
||||
{
|
||||
this.theform.disposition_recto.checked = true;
|
||||
this.disableField(this.theform.disposition_recto);
|
||||
this.disableField(this.theform.disposition_recto_verso);
|
||||
this.getValue(this.theform.disposition_recto);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
this.setDisableField(this.theform.disposition_recto, false);
|
||||
this.setDisableField(this.theform.disposition_recto_verso, false);
|
||||
this.setDisableField(this.theform.disposition_recto, false);
|
||||
this.setDisableField(this.theform.disposition_recto_verso, false);
|
||||
}
|
||||
|
||||
|
||||
this.updatePreview();
|
||||
Impression.AJAX.recalcPrix();
|
||||
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
//// updatePreview : update preview with new value
|
||||
//
|
||||
Impression.settings.updatePreview = function()
|
||||
Impression.settings.updatePreview = function()
|
||||
{
|
||||
var image_name = "";
|
||||
if (this.papier == "A4tr")
|
||||
|
@ -197,23 +197,23 @@ Impression.popup = {};
|
|||
|
||||
Impression.popup.popupImpression = function(code, codeJ) {
|
||||
Popup.hide();
|
||||
Popup.create({}, "Impression en cours...",
|
||||
Popup.create({}, "Impression en cours...",
|
||||
DIV(
|
||||
{"id":"printingPopupContent", "style":"background-image:url(./static/dialog-printer.png)"},
|
||||
{"id":"printingPopupContent", "style":"background-image:url(./static/dialog-printer.png)"},
|
||||
SPAN("code: "+code),
|
||||
SPAN("Batiment J: "+codeJ),
|
||||
A({"href":"https://wiki.crans.org/VieCrans/ImpressionReseau", "class":"aide", "target":"_blank"}, "Comment récupérer mon impression ? "),
|
||||
A({"href":"index", "class":"aide", "style":"text-align:right;"}, "Nouvelle impression")
|
||||
)
|
||||
|
||||
|
||||
);
|
||||
Popup.display();
|
||||
}
|
||||
|
||||
Impression.popup.popupError = function(erreur) {
|
||||
Popup.hide();
|
||||
Popup.create({}, "Erreur",
|
||||
DIV({"id":"printingPopupContent", "style":"background-image:url(./static/dialog-warning.png)"},
|
||||
Popup.create({}, "Erreur",
|
||||
DIV({"id":"printingPopupContent", "style":"background-image:url(./static/dialog-warning.png)"},
|
||||
SPAN(erreur),
|
||||
A({"href":"mailto:nounous@crans.org", "class":"crans_help aide"}, "Envoyer un rapport aux nounous"),
|
||||
Popup.closeLink({"class":"aide", "style":"text-align:right;"}, "Fermer")));
|
||||
|
@ -222,9 +222,9 @@ Impression.popup.popupError = function(erreur) {
|
|||
|
||||
Impression.popup.popupSolde = function(code) {
|
||||
Popup.hide();
|
||||
Popup.create({}, "Solde insuffisant",
|
||||
Popup.create({}, "Solde insuffisant",
|
||||
DIV(
|
||||
{"id":"printingPopupContent", "style":"background-image:url(./static/dialog-solde.png)"},
|
||||
{"id":"printingPopupContent", "style":"background-image:url(./static/dialog-solde.png)"},
|
||||
SPAN("pas assez de sous"),
|
||||
A({"href":"https://wiki.crans.org/CransPratique/SoldeImpression", "class":"aide", "target":"_blank"}, "Comment recharger mon compte ? "),
|
||||
Popup.closeLink({"class":"aide", "style":"text-align:right;"}, "Fermer")));
|
||||
|
@ -233,9 +233,9 @@ Impression.popup.popupSolde = function(code) {
|
|||
|
||||
Impression.popup.popupCodes = function(codeList) {
|
||||
Popup.hide();
|
||||
Popup.create({}, "Codes de mes impressions",
|
||||
Popup.create({}, "Codes de mes impressions",
|
||||
DIV(
|
||||
{"id":"printingPopupContent", "style":"background-image:url(./static/dialog-lock.png)"},
|
||||
{"id":"printingPopupContent", "style":"background-image:url(./static/dialog-lock.png)"},
|
||||
SPAN("Mes codes"),
|
||||
//UL({"size":"4", "style":"width:6em;; height:4em;padding:0;margin:0;list-style-type:none;overflow:auto;"}, map(function (code) {return LI({}, code);}, codeList)),
|
||||
SELECT({"size":"4", "style":"width:100%;"}, map(function (code) {return LI({}, code);}, codeList)),
|
||||
|
@ -249,7 +249,7 @@ Impression.popup.popupCodes = function(codeList) {
|
|||
Impression.mesCodes
|
||||
*****************************/
|
||||
Impression.mesCodes = {};
|
||||
Impression.mesCodes.getCodes = function ()
|
||||
Impression.mesCodes.getCodes = function ()
|
||||
{
|
||||
Impression.AJAX.call('codeList', this.displayCodes );
|
||||
}
|
||||
|
@ -268,17 +268,17 @@ Impression.mesCodes.displayCodes = function (result) {
|
|||
*****************************/
|
||||
Impression.AJAX = {};
|
||||
|
||||
Impression.AJAX.call = function(url,callback) {
|
||||
Impression.AJAX.call = function(url,callback) {
|
||||
AJAX.call( url, callback, true);
|
||||
}
|
||||
|
||||
Impression.AJAX.modifPrix = function( text, wheel )
|
||||
Impression.AJAX.modifPrix = function( text, wheel )
|
||||
{
|
||||
if (wheel)
|
||||
if (wheel)
|
||||
{
|
||||
var image = createDOM("IMG",{'src':'./static/indicator.gif'});
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
var image = new DIV({});
|
||||
}
|
||||
|
@ -299,7 +299,7 @@ Impression.AJAX.usefile = function(filename) {
|
|||
this.call('useFile?fileName=' + filename,this.analysefini );
|
||||
}
|
||||
|
||||
Impression.AJAX.analysefini = function(AJAXResp)
|
||||
Impression.AJAX.analysefini = function(AJAXResp)
|
||||
{
|
||||
logDebug('AJAX terminated (usefile)');
|
||||
if (AJAXResp.erreur) {
|
||||
|
@ -314,7 +314,7 @@ Impression.AJAX.analysefini = function(AJAXResp)
|
|||
}
|
||||
}
|
||||
|
||||
Impression.AJAX.recalcPrix = function()
|
||||
Impression.AJAX.recalcPrix = function()
|
||||
{
|
||||
settings = Impression.settings;
|
||||
var url = "changeSettings?copies=" + settings.copies
|
||||
|
@ -334,7 +334,7 @@ Impression.AJAX.changePrix = function(AJAXResp)
|
|||
Impression.settings.disableForm(true);
|
||||
logWarning('Erreur distante : ' + AJAXResp.erreur);
|
||||
} else {
|
||||
Impression.AJAX.modifPrix("Coût : " + AJAXResp.nouvPrix + "€", false);
|
||||
Impression.AJAX.modifPrix("Coût : " + AJAXResp.nouvPrix + "€", false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue