diff --git a/acrobat-plugin/src/Imposition-00-Core.js b/acrobat-plugin/src/Imposition-00-Core.js index 1ade93f..b3222fb 100755 --- a/acrobat-plugin/src/Imposition-00-Core.js +++ b/acrobat-plugin/src/Imposition-00-Core.js @@ -241,7 +241,7 @@ try { cName: "CDImpLivret", cUser: "Livret / Delivretiser", cParent: "ImpositionPro", - cExec: "try{app.alert('Livret: lancement...');CDImp.Livret.lancer(event.target);}catch(e){app.alert('Erreur: '+e);}", + cExec: "try{CDImp.Livret.lancer();}catch(e){app.alert('Erreur: '+e);}", cEnable: "event.rc = true;", nPos: 0 }); @@ -251,7 +251,7 @@ try { cName: "CDImpNUp", cUser: "N-Up / Step and Repeat", cParent: "ImpositionPro", - cExec: "if(CDImp.NUp&&CDImp.NUp.lancer)CDImp.NUp.lancer(event.target);", + cExec: "if(CDImp.NUp&&CDImp.NUp.lancer)CDImp.NUp.lancer();", cEnable: "event.rc = true;", nPos: 1 }); @@ -261,7 +261,7 @@ try { cName: "CDImpDecoupe", cUser: "Decoupe et reassemblage", cParent: "ImpositionPro", - cExec: "if(CDImp.Decoupe&&CDImp.Decoupe.lancer)CDImp.Decoupe.lancer(event.target);", + cExec: "if(CDImp.Decoupe&&CDImp.Decoupe.lancer)CDImp.Decoupe.lancer();", cEnable: "event.rc = true;", nPos: 2 }); @@ -271,7 +271,7 @@ try { cName: "CDImpMarges", cUser: "Marges et cadrages", cParent: "ImpositionPro", - cExec: "if(CDImp.Marges&&CDImp.Marges.lancer)CDImp.Marges.lancer(event.target);", + cExec: "if(CDImp.Marges&&CDImp.Marges.lancer)CDImp.Marges.lancer();", cEnable: "event.rc = true;", nPos: 3 }); @@ -281,7 +281,7 @@ try { cName: "CDImpReperes", cUser: "Reperes et numerotation", cParent: "ImpositionPro", - cExec: "if(CDImp.Reperes&&CDImp.Reperes.lancer)CDImp.Reperes.lancer(event.target);", + cExec: "if(CDImp.Reperes&&CDImp.Reperes.lancer)CDImp.Reperes.lancer();", cEnable: "event.rc = true;", nPos: 4 }); @@ -291,7 +291,7 @@ try { cName: "CDImpAuto", cUser: "Automatisation", cParent: "ImpositionPro", - cExec: "if(CDImp.Auto&&CDImp.Auto.lancer)CDImp.Auto.lancer(event.target);", + cExec: "if(CDImp.Auto&&CDImp.Auto.lancer)CDImp.Auto.lancer();", cEnable: "event.rc = true;", nPos: 5 }); diff --git a/acrobat-plugin/src/Imposition-02-Livret.js b/acrobat-plugin/src/Imposition-02-Livret.js index 5cca0c6..59396b1 100755 --- a/acrobat-plugin/src/Imposition-02-Livret.js +++ b/acrobat-plugin/src/Imposition-02-Livret.js @@ -243,19 +243,22 @@ CDImp.Livret.lancer = function (doc) { try { doc = CDImp.Util.getDocActif(doc); } catch (e) { - CDImp.Util.erreur(e.toString()); + app.alert("Veuillez ouvrir un document PDF avant de lancer l'imposition."); return; } - var sens = app.popUpMenu( - { cName: "Creer un livret (imposition)", cReturn: "imposer" }, - { cName: "Delivretiser (revenir a l'ordre de lecture)", cReturn: "delivretiser" } - ); - if (!sens) { - return; // annulation + var choix = app.alert({ + cMsg: "Que souhaitez-vous faire ?\n\nOui = Creer un livret (imposition)\nNon = Delivretiser (revenir a l'ordre de lecture)", + cTitle: "Livret / Delivretiser", + nIcon: 2, + nType: 3 + }); + // 4=Oui, 3=Non, 2=Annuler + if (choix === 2) { + return; } - if (sens === "delivretiser") { + if (choix === 3) { CDImp.Livret.delivretiser(doc); return; }