fix: remplacer app.alert nType:3 par app.response pour Livret
Les alertes multiples sont bloquees dans Acrobat 2026 depuis un cExec menu. app.response avec saisie I/D fonctionne comme premiere et unique interaction modale. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -240,29 +240,27 @@ CDImp.Livret.delivretiser = function (doc) {
|
||||
// Point d'entree du module (appele depuis le panneau principal, Module 1)
|
||||
// -----------------------------------------------------------------------
|
||||
CDImp.Livret.lancer = function (doc) {
|
||||
app.alert("DEBUG 1: entree dans lancer");
|
||||
try {
|
||||
doc = CDImp.Util.getDocActif(doc);
|
||||
} catch (e) {
|
||||
app.alert("DEBUG: pas de doc - " + e);
|
||||
app.alert("Veuillez ouvrir un document PDF.");
|
||||
return;
|
||||
}
|
||||
app.alert("DEBUG 2: doc ok, numPages=" + doc.numPages);
|
||||
|
||||
var choix = app.alert({
|
||||
cMsg: "Que souhaitez-vous faire ?\n\nOui = Creer un livret (imposition)\nNon = Delivretiser (revenir a l'ordre de lecture)",
|
||||
var choix = app.response({
|
||||
cQuestion: "Tapez I pour Imposer (creer un livret)\nou D pour Delivretiser (revenir a l'ordre de lecture) :",
|
||||
cTitle: "Livret / Delivretiser",
|
||||
nIcon: 2,
|
||||
nType: 3
|
||||
cDefault: "I"
|
||||
});
|
||||
app.alert("DEBUG 3: choix=" + choix);
|
||||
// 4=Oui, 3=Non, 2=Annuler
|
||||
if (choix === 2) {
|
||||
if (!choix) return;
|
||||
choix = choix.toUpperCase();
|
||||
|
||||
if (choix === "D") {
|
||||
CDImp.Livret.delivretiser(doc);
|
||||
return;
|
||||
}
|
||||
|
||||
if (choix === 3) {
|
||||
CDImp.Livret.delivretiser(doc);
|
||||
if (choix !== "I") {
|
||||
app.alert("Choix non reconnu. Tapez I ou D.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user