0
|
ccc0120发布于2017-6-3 20:43(编辑于 2023-9-6 09:34)
|
555
|
-
macro_hard
不加呢
-
macro_hard
那就这样
(function ($) {
var $PrintDiv,
$PDFReader,
$flashIframe,
$appletDiv,
showFlashPrintSetting,
fitPaper,
showAppletPrintSetting = null;
var appletJarName = \"/fr-applet-8.0.jar\";
function isShowFlashPrintSetting() {
if (typeof showFlashPrintSetting != \"boolean\") {
$(function () {
FR.ajax({
url : FR.servletURL,
data : {
op : \"flash_print\",
cmd : \"get_fp_setting\"
},
async : false,
complete : function (res, status) {
if (status == \"success\") {
showFlashPrintSetting = res.responseText == \"true\"
}
}
})
})
}
return showFlashPrintSetting
}
function isPrintAsPPAPI() {
var isPPAPI = false;
var type = \"application/x-shockwave-flash\";
var mimeTypes = navigator.mimeTypes;
var endsWith = function (str, suffix) {
return str.indexOf(suffix, str.length - suffix.length) !== -1
};
if (mimeTypes && mimeTypes[type] && mimeTypes[type].enabledPlugin && (mimeTypes[type].enabledPlugin.filename === \"pepflashplayer.dll\" || mimeTypes[type].enabledPlugin.filename === \"libpepflashplayer.so\" || mimeTypes[type].enabledPlugin.filename == \"PepperFlashPlayer.plugin\" || endsWith(mimeTypes[type].enabledPlugin.filename, \"Chrome.plugin\"))) {
isPPAPI = true
}
return isPPAPI
}
function isFitPaper() {
if (!fitPaper) {
$(function () {
FR.ajax({
url : FR.servletURL,
data : {
op : \"flash_print\",
cmd : \"fit_fs_paper\"
},
async : false,
complete : function (res, status) {
if (status == \"success\") {
fitPaper = res.responseText == \"true\"
}
}
})
})
}
return fitPaper
}
function supportPDFPrint() {
return FR.Browser.isIE()
}
function supportCodebase() {
return FR.Browser.isIE()
}
function isShowAppletPrintSetting() {
if (typeof showAppletPrintSetting != \"boolean\") {
$(function () {
FR.ajax({
url : FR.servletURL,
data : {
op : \"fr_applet\",
cmd : \"applet_print_setting\"
},
async : false,
complete : function (res, status) {
if (status == \"success\") {
showAppletPrintSetting = res.responseText == \"true\"
}
}
})
})
}
return showAppletPrintSetting
}
function isAppletPrintOver(sessionID) {
var appletPrintOver;
FR.ajax({
url : FR.servletURL,
data : {
op : \"fr_applet\",
cmd : \"is_printover\",
sessionID : sessionID,
data : new Date().getTime()
},
async : false,
complete : function (res, status) {
if (status == \"success\") {
appletPrintOver = res.responseText == \"true\"
}
}
});
return appletPrintOver
}
function isSingleSheetFunc(sessionID) {
var isSingleSheet;
FR.ajax({
url : FR.servletURL,
data : {
op : \"fr_applet\",
cmd : \"is_singleSheet\",
sessionID : sessionID
},
async : false,
complete : function (res, status) {
if (status == \"success\") {
isSingleSheet = res.responseText == \"true\"
}
}
});
return isSingleSheet
}
function checkPDFPrint(sessionID, popupSetup) {
FR.ajax({
url : FR.servletURL,
type : \"POST\",
data : {
op : \"fr_pdfprint\",
cmd : \"pt_check\",
sessionID : sessionID
},
complete : function (res, status) {
var resText = res.responseText;
if (\"ok\" == resText) {
(function () {
FR.closeDialog();
if (popupSetup === true) {
$PDFReader[0].print()
} else {
$PDFReader[0].printAllFit(true)
}
if (_g()) {
_g().fireEvent(\"afterpdfprint\")
}
}).defer(2000)
} else {
if (\"gening\" == resText) {
checkPDFPrint.defer(300, this, [sessionID, popupSetup])
} else {
FR.Msg.toast(resText)
}
}
}
})
}
function __getSessionID__(opts) {
var config = {};
if (arguments.length === 1) {
config = arguments[0]
} else {
if (arguments.length === 2) {
config.url = arguments[0];
$.extend(config, arguments[1])
}
}
var sessionID = null;
var udata;
config.url = config.url.replace(\"op=\", \"op_=\");
if (config && config.form) {
var $form = $(config.form);
udata = $.param($form.serializeArray().concat([{
name : \"op\",
value : \"getSessionID\"
}
]))
} else {
if (config && config[\"formid\"]) {
$form = $(\"#\" + config[\"formid\"]);
udata = $.param($form.serializeArray().concat([{
name : \"op\",
value : \"getSessionID\"
}
]))
} else {
if (config && config.data) {
udata = $.extend({
op : \"getSessionID\"
}, config.data)
} else {
udata = {
op : \"getSessionID\"
}
}
}
}
FR.ajax({
url : config.url,
type : \"POST\",
data : udata,
async : false,
complete : function (res, status) {
if (status == \"success\") {
sessionID = res.responseText
}
}
});
return sessionID
}
$.extend(FR, {
doPDFPrint : function (sessionID, popupSetup) {
var isShowDialog = false;
FR.ajax({
url : FR.servletURL,
data : {
op : \"fr_pdfprint\",
cmd : \"pdf_print_setting\"
},
type : \"POST\",
async : false,
complete : function (res, status) {
isShowDialog = res.responseText === \"true\"
}
});
var config = {
\"url\" : FR.servletURL + \"?sessionID=\" + sessionID,
\"isPopUp\" : isShowDialog
};
FR.doURLPDFPrint(config)
},
doURLPDFPrint : function (config) {
var url = arguments[0];
var isPopUp;
if (typeof url == \"string\") {
isPopUp = arguments[1];
config = arguments[2]
} else {
url = config.url;
isPopUp = config.isPopUp
}
var sessionID = __getSessionID__(url, config);
if (!supportPDFPrint()) {
window.open(FR.servletURL + \"?op=fr_pdfprint&cmd=native&sessionID=\" + sessionID, \"_blank\");
return
}
if (FR.Report.Plugin.Print.pdfURLPrint) {
FR.Report.Plugin.Print.pdfURLPrint(sessionID);
return
}
if ($PrintDiv == null) {
$PrintDiv = $(\"<div>\").appendTo(\"body\")
}
FR.showDialog(FR.i18nText(\"FR-Engine_Printing\"), 250, 100, FR.i18nText(\"FR-Engine-Loading_Component\") + \"...\");
FR.ajax({
url : FR.servletURL,
data : {
sessionID : sessionID,
op : \"fr_pdfprint\",
cmd : \"pt_print\",
frandom : Math.random()
},
type : \"POST\",
complete : function (res, status) {
if (status == \"success\") {
var resText = res.responseText;
if (resText == \"timeout\") {
FR.closeDialog();
return
}
$PrintDiv[0].innerHTML = res.responseText;
$PDFReader = $PrintDiv.find(\"Object\");
try {
$PDFReader[0].gotoFirstPage();
FR.showDialog(FR.i18nText(\"FR-Engine_Printing\"), 250, 100, FR.i18nText(\"FR-Engine-Loading_PDF\") + \"...\");
checkPDFPrint.defer(300, this, [sessionID, isPopUp])
} catch (e) {
var content = \'<div style=\"text-align:center;\">\' + FR.i18nText(\"FR-Engine_Please_Install\") + \' <a href=\"http://www.baidu.com\" target=\"_blank\">Adobe Reader</a>.\' + \"</div>\";
FR.showDialog(FR.i18nText(\"FR-Engine_Alert\"), 200, 80, content)
}
}
}
})
},
doURLAppletPrint : function (config) {
var url = arguments[0];
var isShowDialog;
var pageIndex;
var loadJVM;
var printerName;
var choosePrinter;
var copies;
if (typeof url == \"string\") {
isShowDialog = arguments[1];
if (isShowDialog == undefined || !(typeof isShowDialog == \"boolean\")) {
isShowDialog = isShowAppletPrintSetting()
}
config = arguments[2]
} else {
url = config.url;
isShowDialog = config.isPopUp;
pageIndex = config.pageIndex;
loadJVM = config.loadJVM;
choosePrinter = config.choosePrinter;
printerName = config.printerName;
copies = config.copies ? config.copies : 1;
if (isShowDialog == undefined || !(typeof isShowDialog == \"boolean\")) {
isShowDialog = isShowAppletPrintSetting()
}
}
var index = 0;
var isIE9 = FR.Browser.isIE9();
if (isShowDialog) {
var dialog = new FR.Dialog({
title : FR.i18nText(\"FR-Engine_Setting\"),
confirm : true,
resizeable : false,
width : 450,
height : 190,
contentWidget : {
type : \"tablelayout\",
columnSize : [20, 100, 155, 150],
rowSize : [10, 20, 20, 20],
vgap : 10,
items : [[{
el : $(\"<div>\")
}
], [{
el : $(\"<div>\")
}, {
el : {
type : \"radio\",
widgetName : \"All_Pages\",
text : FR.i18nText(\"HJS-All_Pages\"),
selected : true,
fontSize : 12,
fontFamily : \"SimSun\",
listeners : [{
eventName : FR.Events.STATECHANGE,
action : function () {
if (this.isSelected()) {
dialog.getWidgetByName(\"Specified_Pages\").setSelected(false)
}
}
}
]
}
}, {
el : $(\"<div>\")
}, {
el : $(\"<div>\")
}
], [{
el : $(\"<div>\")
}, {
el : {
type : \"radio\",
widgetName : \"Specified_Pages\",
text : FR.i18nText(\"HJS-Specified_Pages\") + \":\",
fontSize : 12,
fontFamily : \"SimSun\",
listeners : [{
eventName : FR.Events.STATECHANGE,
action : function () {
if (this.isSelected()) {
dialog.getWidgetByName(\"All_Pages\").setSelected(false)
}
}
}
]
}
}, {
el : {
type : \"text\",
width : \"155px\",
fontSize : 12,
fontFamily : \"SimSun\",
widgetName : \"CurrentPageNum\",
value : \"1-1\"
}
}, {
el : {
type : \"label\",
fontsize : 12,
fontFamily : \"SimSun\",
textalign : \"right\",
value : \"(\" + FR.i18nText(\"FR-Engine_Example\") + \": 2,5,7-10,12)\"
}
}
], [{
el : $(\"<div>\")
}, {
el : {
type : \"label\",
value : FR.i18nText(\"FR-Engine_Print_Copy\") + \": \",
fontSize : 12,
fontFamily : \"SimSun\",
textalign : \"left\"
}
}, {
el : {
type : \"text\",
width : \"155px\",
fontSize : 12,
fontFamily : \"SimSun\",
widgetName : \"Copies_txt\",
value : \"1\"
}
}
]]
},
onOK : function () {
FR.closeDialog();
if (dialog.getWidgetByName(\"Specified_Pages\").isSelected()) {
index = dialog.getWidgetByName(\"CurrentPageNum\").getValue()
}
copies = dialog.getWidgetByName(\"Copies_txt\").getValue();
if ($appletDiv == null) {
$appletDiv = $(\"<div>\").appendTo(\"body\")
}
var sessionID = __getSessionID__(url, config);
if (url.indexOf(\"reportlet\") != -1 || url.indexOf(\"resultlets\") != -1 || (config && config.data && config.data.reportlets)) {
if (url.indexOf(\"?\") != -1) {
url += \"&_=\" + new Date().getTime()
} else {
url += \"?_=\" + new Date().getTime()
}
var sessionID = __getSessionID__(url, config);
url = FR.servletURL + \"?sessionID=\" + sessionID
}
var isSingleSheet = isSingleSheetFunc(sessionID);
var attributes = null;
var parameters = null;
if (supportCodebase()) {
attributes = {
codebase : FR.server + \"/jre.exe\"
};
parameters = {
code : \"com.fr.print.PrintApplet\",
archive : FR.server + appletJarName,
url : FR.serverURL + url + \"&op=fr_applet&cmd=print\",
isIE9 : isIE9,
isShowDialog : isShowDialog || choosePrinter,
printerName : printerName,
index : index,
copies : copies,
isSingleSheet : isSingleSheet
}
} else {
attributes = {
code : \"com.fr.print.PrintApplet.class\",
archive : FR.server + appletJarName,
width : 0,
height : 0
};
parameters = {
url : FR.serverURL + url + \"&op=fr_applet&cmd=print\",
isIE9 : isIE9,
isShowDialog : isShowDialog || choosePrinter,
printerName : printerName,
index : index,
copies : copies,
isSingleSheet : isSingleSheet
}
}
deployJava.runApplet(attributes, parameters, \"1.4\");
FR.closeDialog();
var isOverFunc = function () {
if (!isAppletPrintOver(sessionID)) {
return
}
clearInterval(sh);
if (_g()) {
_g().fireEvent(\"afterappletprint\")
}
$(\"applet\").remove()
};
var sh = setInterval(isOverFunc, 3000)
},
onCancel : function () {
index = 0;
FR.closeDialog()
}
});
dialog.setVisible(true)
} else {
if (pageIndex != undefined && (typeof pageIndex == \"number\")) {
index = pageIndex
}
var sessionID = __getSessionID__(url, config);
if (url.indexOf(\"reportlet\") != -1 || url.indexOf(\"resultlets\") != -1 || (config && config.data && config.data.reportlets)) {
if (url.indexOf(\"?\") != -1) {
url += \"&_=\" + new Date().getTime()
} else {
url += \"?_=\" + new Date().getTime()
}
var sessionID = __getSessionID__(url, config);
url = FR.servletURL + \"?sessionID=\" + sessionID
}
var isSingleSheet = isSingleSheetFunc(sessionID);
if (supportCodebase()) {
attributes = {
codebase : FR.server + \"/jre.exe\"
};
parameters = {
code : \"com.fr.print.PrintApplet\",
archive : FR.server + appletJarName,
url : FR.serverURL + url + \"&op=fr_applet&cmd=print\",
isIE9 : isIE9,
isShowDialog : isShowDialog,
printerName : printerName,
index : index,
isSingleSheet : isSingleSheet
}
} else {
var attributes = {
code : \"com.fr.print.PrintApplet.class\",
archive : FR.server + appletJarName,
width : 0,
height : 0
};
var parameters = {
url : FR.serverURL + url + \"&op=fr_applet&cmd=print\",
isIE9 : isIE9,
index : index,
isShowDialog : isShowDialog,
printerName : printerName,
isSingleSheet : isSingleSheet,
copies : copies
}
}
deployJava.runApplet(attributes, parameters, \"1.4\");
FR.closeDialog();
var isOverFunc = function () {
if (!isAppletPrintOver(sessionID)) {
return
}
clearInterval(sh);
if (_g()) {
_g().fireEvent(\"afterappletprint\")
}
$(\"applet\").remove()
};
var sh = setInterval(isOverFunc, 3000)
}
},
doAppletPrint : function (sessionID, choosePrinter, printerName) {
var url = FR.servletURL + \"?sessionID=\" + sessionID;
if (_g().fireEvent(\"beforeappletprint\") === false) {
return
}
var config = {
\"url\" : url,
\"choosePrinter\" : choosePrinter,
\"printerName\" : printerName
};
FR.doURLAppletPrint(config)
},
doFlashPrint : function (sessionID, currentPageIndex) {
if (_g().fireEvent(\"beforeflashprint\") === false) {
return
}
var fitPaper = isFitPaper();
FR.doPrintURL(FR.servletURL + \"?sessionID=\" + sessionID, currentPageIndex, fitPaper)
},
doPrintURL : function (url, currentPageIndex, fitPaper, config) {
var config = arguments[3];
if (config == undefined) {
config = {
\"url\" : url,
\"pageIndex\" : currentPageIndex,
\"isAutoZoom\" : fitPaper
}
}
FR.doURLFlashPrint(config)
},
isInstalledFlash : function () {
if (this.$i_flash === true) {
return true
}
var i_flash = false;
var n = navigator;
if (n.plugins && n.plugins.length) {
for (var ii = 0; ii < n.plugins.length; ii++) {
if (n.plugins[ii] && n.plugins[ii].name.indexOf(\"Shockwave Flash\") != -1) {
i_flash = true;
break
}
}
} else {
if (window.ActiveXObject) {
for (var ii = 11; ii >= 2; ii--) {
try {
var fl = eval(\"new ActiveXObject(\'ShockwaveFlash.ShockwaveFlash.\" + ii + \"\');\");
if (fl) {
i_flash = true;
break
}
} catch (e) {}
}
}
}
this.$i_flash = i_flash;
return i_flash
},
flashInstall : function () {
var content;
FR.ajax({
type : \"POST\",
url : FR.servletURL + \"?op=flash_print&cmd=get_fp_installpath\",
complete : function (res, status) {
if (status == \"success\") {
var path = res.responseText;
if (typeof path == \"string\" && path.length > 0 && path.length < 150) {
content = \'<div style=\"text-align:center;\">\' + FR.i18nText(\"FR-Engine_Please_Install\") + \' <a href=\"http://www.baidu.com\" target=\"_blank\">FlashPlayer</a>.\' + FR.i18nText(\"FR-Engine_Restart_Browser_After_Installation\") + \"</div>\"
}
}
if (!content) {
content = \'<div style=\"text-align:center;\">\' + FR.i18nText(\"FR-Engine_Please_Install\") + \' <a href=\"http://www.baidu.com\" target=\"_blank\">FlashPlayer</a>.\' + FR.i18nText(\"FR-Engine_Restart_Browser_After_Installation\") + \"</div>\"
}
FR.showDialog(FR.i18nText(\"FR-Engine_Alert\"), 305, 75, content)
}
})
},
doURLFlashPrint : function (config) {
var url = arguments[0];
var currentPageIndex;
var isShowDialog;
var isAutoZoom;
if (typeof url == \"string\") {
isShowDialog = arguments[1];
isAutoZoom = isFitPaper();
if (isShowDialog == undefined || !(typeof isShowDialog == \"boolean\")) {
isShowDialog = isShowFlashPrintSetting()
}
config = arguments[2]
} else {
url = config.url;
currentPageIndex = config.pageIndex;
isShowDialog = config.isPopUp;
isAutoZoom = config.isAutoZoom;
if (isShowDialog == undefined || !(typeof isShowDialog == \"boolean\")) {
isShowDialog = isShowFlashPrintSetting()
}
if (isAutoZoom == undefined || !(typeof isAutoZoom == \"boolean\")) {
isAutoZoom = isFitPaper()
}
}
if (FR.isInstalledFlash() === true) {
if ($flashIframe == null) {
FR.__flash__ = function () {
FR.doPrintURL.call(this, url, currentPageIndex, isAutoZoom, config);
delete FR.__flash__
};
$flashIframe = $(\"<iframe>\").css({
position : \"absolute\",
left : -1000,
top : -1000
}).attr(\"src\", FR.servletURL + \"?op=resource&resource=/com/fr/web/core/printer.html\").appendTo(\"body\")
} else {
var checkVersion = FR.Browser.isIE() && (FR.Browser.isIE8Before() || !$.support.boxModel);
var fm = checkVersion ? $flashIframe[0].contentWindow[\"flashMovie\"] : $flashIframe[0].contentDocument[\"flashMovie\"];
if (fm != null && fm.doLoadFlash != null) {
var servletURL = url.split(\"?\")[0];
currentPageIndex = currentPageIndex || 1;
var sessionID = __getSessionID__(url, config);
var isPPAPIPrint = isPrintAsPPAPI();
FR.ajax({
type : \"POST\",
url : servletURL,
data : {
sessionID : sessionID,
op : \"flash_print\",
cmd : \"get_fp_pageinfo\"
},
complete : function (res, status) {
if (!FR.versionRemind(res.responseText)) {
return
}
var message_array = res.responseText.split(\"?\");
var info_array = message_array[0].split(\";\");
if (info_array[0].indexOf(\"FAILPASS\") != -1) {
FR.Msg.toast(FR.i18nText(\"FR-Engine-Flash_Print_Not_Support\"));
return
}
var init_page_setting = \"1-\" + info_array[0];
var offset = message_array.length > 1 ? message_array[1].split(\";\") : [\"0.0\", \"0.0\"];
var print_fn = function (page_setting, isAutoZoom, paperinfo, isPrintAsImage, isPPAPIPrint) {
FR.showDialog(FR.i18nText(\"FR-Engine_Print\"), 250, 100, FR.i18nText(\"FR-Engine_Start_Print\") + \"...\");
fm.doLoadFlash(servletURL, sessionID, FR.string2ints(page_setting).join(\",\"), isAutoZoom, paperinfo, isPrintAsImage, isPPAPIPrint);
$flashIframe = null;
if (_g()) {
_g().fireEvent(\"afterflashprint\")
}
};
if (isShowDialog) {
var dialog = new FR.Dialog({
title : FR.i18nText(\"FR-Engine_Setting\"),
confirm : true,
resizeable : false,
width : 450,
height : 280,
contentWidget : {
type : \"border\",
width : 420,
height : 240,
items : [{
region : \"north\",
el : {
type : \"tablelayout\",
columnSize : [20, 100, 155, 150],
rowSize : [10, 20, 20, 20],
height : 120,
vgap : 10,
items : [[{
el : $(\"<div>\")
}
], [{
el : $(\"<div>\")
}, {
el : {
type : \"radio\",
fontSize : 12,
fontFamily : \"SimSun\",
widgetName : \"All_Pages\",
text : FR.i18nText(\"HJS-All_Pages\"),
selected : true,
only_be_selected : true,
listeners : [{
eventName : FR.Events.STATECHANGE,
action : function () {
if (this.isSelected()) {
dialog.getWidgetByName(\"Current_Page\").setSelected(false);
dialog.getWidgetByName(\"Specified_Pages\").setSelected(false)
}
}
}
]
}
}, {
el : $(\"<div>\")
}, {
el : $(\"<div>\")
}
], [{
el : $(\"<div>\")
}, {
el : {
type : \"radio\",
fontSize : 12,
fontFamily : \"SimSun\",
widgetName : \"Current_Page\",
text : FR.i18nText(\"HJS-Current_Page\") + \":\",
only_be_selected : true,
listeners : [{
eventName : FR.Events.STATECHANGE,
action : function () {
if (this.isSelected()) {
dialog.getWidgetByName(\"All_Pages\").setSelected(false);
dialog.getWidgetByName(\"Specified_Pages\").setSelected(false)
}
}
}
]
}
}, {
el : {
type : \"label\",
fontsize : 12,
fontFamily : \"SimSun\",
value : FR.i18nText(\"FR-Engine-Page_Number\") + \" \" + FR.i18nText(\"FR-Engine_Is\") + \" \" + currentPageIndex
}
}, {
el : $(\"<div>\")
}
], [{
el : $(\"<div>\")
}, {
el : {
type : \"radio\",
fontSize : 12,
fontFamily : \"SimSun\",
widgetName : \"Specified_Pages\",
text : FR.i18nText(\"HJS-Specified_Pages\") + \":\",
only_be_selected : true,
listeners : [{
eventName : FR.Events.STATECHANGE,
action : function () {
if (this.isSelected()) {
dialog.getWidgetByName(\"All_Pages\").setSelected(false);
dialog.getWidgetByName(\"Current_Page\").setSelected(false)
}
}
}
]
}
}, {
el : {
type : \"text\",
fontSize : 12,
fontFamily : \"SimSun\",
widgetName : \"SpecifiedPagesNum\",
value : \"1-2\"
}
}, {
el : {
type : \"label\",
fontsize : 12,
fontFamily : \"SimSun\",
textalign : \"right\",
value : \"(\" + FR.i18nText(\"FR-Engine_Example\") + \" : 2,5,7-10,12)\"
}
}
]]
}
}, {
region : \"center\",
el : {
type : \"tablelayout\",
columnSize : [16, 300],
rowSize : [20, 20],
vgap : 0,
items : [[{
el : $(\"<div>\")
}, {
el : {
type : \"checkbox\",
fontSize : 12,
fontFamily : \"SimSun\",
widgetName : \"AsImage\",
text : FR.i18nText(\"FR-Engine-Print_As_Image\"),
selected : false,
disabled : false
}
}
], [{
el : $(\"<div>\")
}, {
el : {
type : \"checkbox\",
widgetName : \"FitPaperSize\",
fontSize : 12,
fontFamily : \"SimSun\",
text : FR.i18nText(\"Print-Print_To_Fit_Paper_Size\"),
selected : isFitPaper(),
disabled : false
}
}
]]
}
}, {
region : \"south\",
el : {
type : \"tablelayout\",
columnSize : [20, 300],
rowSize : [25],
height : 35,
items : [[{
el : $(\"<div>\")
}, {
el : {
type : \"label\",
fontsize : 16,
fontFamily : \"SimSun\",
color : \"red\",
value : FR.i18nText(\"FR-Engine-Print_Set_Printer_Offset\") + \": X=\" + offset[0] + \"mm Y=\" + offset[1] + \"mm\"
}
}
]]
}
}
]
},
onOK : function () {
FR.closeDialog();
if (dialog.getWidgetByName(\"Current_Page\").isSelected()) {
init_page_setting = currentPageIndex + \"\"
} else {
if (dialog.getWidgetByName(\"Specified_Pages\").isSelected()) {
init_page_setting = dialog.getWidgetByName(\"SpecifiedPagesNum\").getValue()
}
}
var printAsImage = dialog.getWidgetByName(\"AsImage\").isSelected();
var isFit = dialog.getWidgetByName(\"FitPaperSize\").isSelected();
print_fn(init_page_setting, isFit, info_array[1] ? info_array[1] : \"\", printAsImage, isPPAPIPrint)
},
onCancel : function () {
FR.closeDialog()
}
});
dialog.setVisible(true)
} else {
print_fn(init_page_setting, isAutoZoom, info_array[1] ? info_array[1] : \"\", false, isPPAPIPrint)
}
}
})
} else {
FR.flashInstall()
}
}
} else {
FR.flashInstall()
}
}
})
})(jQuery);
|
|