1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190
| <script type="text/javascript" src="js/jquery/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery-ui.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery.modal.js"></script>
<link rel="stylesheet" type="text/css" href="css/opt-progressionBar.css" />
<link rel="stylesheet" type="text/css" href="css/jquery-ui.css" media="screen" />
<script type="text/javascript" src="js/fenetreModale.js"></script></script>
<script type="text/javascript">
var $dialog = null;
var timeOutId;
$(document).ready(
function() {
$('span.magasinReference').hover(
function() {
var idSpan = $(this).attr('id');
if ($('#infoBulleReference_' + idSpan).length > 0) {
// affichage de l'infobulle deja créée
$('#infoBulleReference_' + idSpan).show();
} else {
// recherche AJAX et création de l'infobulle
// apres declanchement du timeout
timeOutId = setTimeout(function() {afficherMagasinReferencesApresTimer(idSpan);}, 500);
}
},
function() {
clearTimeout(timeOutId);
$('span.infoBulleReference').hide();
}
);
<%-- initPotentiel(); --%>
$('span.magasinReference>input').focus(
function() {
var idSpan = $(this).parent().attr('id');
if ($('#infoBulleReference_' + idSpan).length > 0) {
// affichage de l'infobulle deja créée
$('#infoBulleReference_' + idSpan).show();
} else {
afficherMagasinReferencesApresTimer(idSpan);
}
}
);
$('span.magasinReference>input').blur(
function() {
$('span.infoBulleReference').hide();
}
);
// recherche des informations complementaire de la liste des produits de facon asynchrone
$.ajax({
type: "GET",
url: 'collections.engagements.informationsComplemetaire.do',
beforeSend: function(x) {
if(x && x.overrideMimeType) {
x.overrideMimeType("application/j-son;charset=UTF-8");
}
},
dataType: "json",
error: function() {
$('span.informationComplementaire').html('N.D');
},
success: function(data) {
$('span.informationComplementaire').html('');
$.each(data, function(i, item) {
var codeProduit = item.codeProduit;
var stock = item.stock;
var engagementAutreOperation = item.engagementAutreOperation;
var venteOperationChainee = item.venteOperationChainee;
var nbJourRuptureOperationChainee = item.nbJourRuptureOperationChainee;
if (null != stock || null != engagementAutreOperation || null != venteOperationChainee) {
var htmlStr = '<table style=" width: 100%;">';
if (null != stock) {
htmlStr += '<tr><td style="text-align: left; white-space: nowrap;">stock:</td><td style="text-align: right; white-space: nowrap;">' + stock + '</td></tr>';
}
if (null != engagementAutreOperation) {
/*htmlStr += '<tr><td style="text-align: left; white-space: nowrap;">livr:</td><td style="text-align: right; white-space: nowrap;">';
htmlStr += '<a href="#" tabindex="-1" onclick="popup_consult(950, 500,\'load.popup.do\',new Array(\'url\', \'codeProduit\'), new Array(\'collections.popup.engagementAutreOperation.do\', \'' + codeProduit + '\')); return false;">';
htmlStr += engagementAutreOperation;
htmlStr += '</a>';
htmlStr += '</td></tr>';*/
htmlStr += '<tr><td style="text-align: left; white-space: nowrap;">livr:</td><td style="text-align: right; white-space: nowrap;">';
htmlStr += '<a href="#" tabindex="-1" onclick="popup_consult(950, 500,\'collections.popup.engagementAutreOperation.do\',new Array(\'codeProduit\'), new Array(\'' + codeProduit + '\')); return false;">';
htmlStr += engagementAutreOperation;
htmlStr += '</a>';
htmlStr += '</td></tr>';
}
if (null != venteOperationChainee) {
htmlStr += '<tr><td style="text-align: left; white-space: nowrap;">vte N-1:</td><td style="text-align: right; white-space: nowrap;">';
htmlStr += '<a href="#" tabindex="-1" title="ventes de l\'opération N-1';
if (null != nbJourRuptureOperationChainee && nbJourRuptureOperationChainee > 0) {
htmlStr += '
dont ' + nbJourRuptureOperationChainee + ' jours en rupture';
}
htmlStr += '
cliquer sur ce chiffre pour plus de détail"'; // fin du title
if (null != nbJourRuptureOperationChainee && nbJourRuptureOperationChainee > 0) {
htmlStr += ' style="color: red;"';
}
//htmlStr += ' onclick="popup_consult(950, 500,\'load.popup.do\',new Array(\'url\', \'codeProduit\', \'codeOperation\', \'mode\', \'resultat\'), new Array(\'archives.rechercheArchive.do\', \'' + codeProduit + '\', \'' + $('#codeOperation').val() + '\', \'engagement\', \'1\')); return false;">';
htmlStr += ' onclick="popup_consult(950, 500,\'archives.rechercheArchive.do\',new Array(\'codeProduit\', \'codeOperation\', \'mode\', \'resultat\'), new Array(\'' + codeProduit + '\', \'' + $('#codeOperation').val() + '\', \'engagement\', \'1\')); return false;">';
/*if (null != nbJourRuptureOperationChainee && nbJourRuptureOperationChainee > 0) {
htmlStr += '<div style="color: red;">';
}*/
htmlStr += venteOperationChainee;
if (null != nbJourRuptureOperationChainee && nbJourRuptureOperationChainee > 0) {
htmlStr += '</div>';
}
htmlStr += '</a>';
htmlStr += '</td></tr>';
}
htmlStr += '</table>';
$('#informationComplementaire_' + codeProduit).html(htmlStr);
}
});
}
});
$('span.photoMiniature').each(function() {
var photoMiniature = $(this);
//var ean = photoMiniature.attr('id');
//var urlPhotoVignette = $('#urlBasePhoto').val() + $('#codeOperation').val() + ean + 'V.jpg';
var codeProduit = photoMiniature.attr('id');
var urlPhotoVignette = $('#urlPetitePhoto_'+codeProduit).val();
var img = new Image();
$(img).load(function () {
$(this).hide(); // image masquée par defaut
$(this).attr('id', 'imgVignette_'+codeProduit);
photoMiniature.append(this); // ajout dans le dom
// reduction (si nécessaire) de la taille de l'image en respectant le ratio
img = redimensionnerImage(img, 50, 55);
$(this).fadeIn(500); // affichage temporisé
}).error(function () {
// traitement en cas d'erreur : rien = l'image restera masquée
}).hover(function(e) { // entrée en survol de l'image
//var urlPhotoGrande = 'http://basemultimedia.provera.fr/document.aspx?vue=G&mdl=1&ean=' + ean;
var urlPhotoGrande = $('#urlGrandePhoto_'+codeProduit).val();
var posX = photoMiniature.offset().left + 55;
var posY = photoMiniature.offset().top - 60;
afficherCalqueImage(e, urlPhotoGrande, posX, posY, 700, 500, 'imgVignette_'+codeProduit);
}, function() { // sortie en survol de l'image
$("#bulle").empty();
$("#bulle").hide();
}).attr('src', urlPhotoVignette);
});
}
);
/* ensuite j'appelle cette fonction */
function popup () {
var url = "......";
var objRetour = new Object();
objRetour.actif="off";
objRetour.params=null;
var args = new Object();
args.i=i;
args.j=j;
args.pro=pro;
var optionsPopup = new Object();
optionsPopup.dialogWidth = dialogWidth;
optionsPopup.dialogHeight = dialogHeight;
optionsPopup.isValeurRetour = true;
ouvrirFenetreModale(url, optionsPopup, args, objRetour); // --> fenetreModale;JS
}
</script> |