[-] MO : TNT Carrier (1.1)

This commit is contained in:
fSerny
2011-11-23 00:29:59 +00:00
parent 0fa99a23cc
commit 45bd35a19a
22 changed files with 428 additions and 324 deletions
+5 -6
View File
@@ -148,7 +148,6 @@ function tntRCafficheRelais(jData) {
tntRCjTable.append(tntRCligneBlanche6Col());
jMessage.append(tntRCjTable);
jMessage.append(tntRCchangerCodePostal());
};
@@ -159,10 +158,10 @@ function tntB2CRelaisColisGetBodyMain() {
"<table>"+
"<tr>"+
"<td>" + tntRCMsgBodyInput + "</td>"+
"<td><input type='text' id='tntRCInputCP' class='tntRCInput' maxlength='5' size='5' value=''/></td>"+
"<td><input type='text' id='tntRCInputCP' class='tntRCInput' maxlength='3' size='3' value=''/></td>"+
"<td><a href='#' onclick='tntRCgetDepot();'><img class='tntRCButton' src='" + pathToImages + "bt-OK-2.jpg' onmouseover='this.src=\"" + pathToImages + "bt-OK-1.jpg\"' onmouseout='this.src=\"" + pathToImages + "bt-OK-2.jpg\"'></a></td>" +
"</tr>"+
"</table>" +
"</table>" +
"</div>"+
"<div id='tntRCLoading' style='display:none;'>" + tntRCMsgBodyLoading + "</div>"+
"<div id='tntRCError' class='tntRCError' style='display:none;'></div>");
@@ -181,7 +180,7 @@ function tntB2CRelaisColis() {
var tntRelaisColisB2C = $("#tntB2CRelaisColis");
tntRelaisColisB2C.html(
"<div id='tntRCblocEntete'>"+
"<div class='tntRCHeader'>"+ tntRCMsgHeaderTitle + "</div>"+
"<!--<div class='tntRCHeader'>"+ tntRCMsgHeaderTitle + "</div>-->"+
"<div class='tntRCSubHeader'>" + tntRCMsgSubHeaderTitle + "</div>"+
"</div>"+
"<div id='blocCodePostal' class='tntRCBody'>"+
@@ -308,7 +307,7 @@ function tntRCafficheCommunes(jData) {
tntRCligneBlanche6Col());
blocCodePostal.html(tntRCjTable);
alert('lol');
// Bloc de saisie d'un nouveau code postal
blocCodePostal.append(tntRCchangerCodePostal());
}
@@ -556,7 +555,7 @@ function tntRCchangerCodePostal(){
"<table>"+
"<tr>"+
"<td width='300px'>Vous pouvez choisir un autre code postal de livraison :</td>"+
"<td width='55px'><input type='text' id='tntRCInputCP' class='tntRCInput' maxlength='5' size='5' value='' /></td>"+
"<td width='55px'><input type='text' id='tntRCInputCP' class='tntRCInput' maxlength='3' size='3' value='' /></td>"+
"<td><a href='#' onclick='tntRCgetDepot();'><img class='tntRCButton' src='" + pathToImages + "bt-OK-2.jpg' onmouseover='this.src=\"" + pathToImages + "bt-OK-1.jpg\"' onmouseout='this.src=\"" + pathToImages + "bt-OK-2.jpg\"'></a></td>" +
"</tr>"+
"</table>"+
+11 -3
View File
@@ -4,16 +4,22 @@ function tntRCgetDepot()
tntRCcodePostal = $("#tntRCInputCP").val();
if (tntRCcodePostal=="") return;
if (isNaN(parseInt(tntRCcodePostal))) {
tntRCgetRelaisColis(tntRCMsgErrCodePostal);
tntRCgetRelaisColis("Veuillez saisir un code d&eacute;partemental correct");
return;
}
tntRCsetChargementEnCours();
$("#tntRCLoading").load(
$.get(
"../modules/tntcarrier/tntGetDepot.php?code="+tntRCcodePostal,
function(response, status, xhr)
{
if (status == "error")
$("#tntRCLoading").html(xhr.status + " " + xhr.statusText);
if (response == "The field 'department' is not a valid french department code.\n")
$("#tntRCLoading").html("Vous n'avez pas saisi un code correct d&eacute;partemental fran&ccedil;ais\n");
else if (response.indexOf("The security token could not be authenticated or authorized") >= 0)
$("#tntRCLoading").html("Vos identifiants sont incorrects\n");
else
$("#tntRCLoading").html(response);
}
);
}
@@ -34,10 +40,12 @@ $(document).ready(function() {
transport1.click(function() {
$("#divPex").css("display", "none");
$("#divClosing").css("display", "");
$("#tnt_exp_names").css("display", "");
});
transport2.click(function() {
$("#divPex").css("display", "");
$("#divClosing").css("display", "none");
$("#tnt_exp_names").css("display", "none");
});
});
@@ -51,7 +59,7 @@ function callbackSelectionRelais()
var city = document.getElementById("tntRCSelectedCommune").value;
if (!code || code == "")
alert("Aucun depot selectionne");
alert("Aucune agence d\351pot selectionn\351e");
else
{
document.getElementById("tnt_carrier_shipping_pex").value = code;