PageRenderTime 24ms CodeModel.GetById 16ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/aspnet_client/system_web/2_0_50727/CrystalReportWebFormViewer3/js/print.js

http://github.com/khaneh/Orders
JavaScript | 55 lines | 46 code | 9 blank | 0 comment | 9 complexity | 5990816be111a007b1c2ccfde8ef1445 MD5 | raw file
 1var IE_PRINT_CONTROL_PRODUCTVERSION = "10,2,0,1078"
 2var NS_PRINT_CONTROL_PRODUCTVERSION = "10.2.0.1078"
 3
 4function blockEvents() {
 5    var deadend;
 6    opener.captureEvents(Event.CLICK, Event.MOUSEDOWN, Event.MOUSEUP, Event.FOCUS);
 7    opener.onclick = deadend;
 8    opener.onmousedown = deadend;
 9    opener.onmouseup = deadend;
10    opener.focus = deadend;
11}
12
13function unblockEvents() {
14    opener.releaseEvents(Event.CLICK, Event.MOUSEDOWN, Event.MOUSEUP, Event.FOCUS);
15    opener.onclick = null;
16    opener.mousedown = null;
17    opener.mouseup = null;
18    opener.onfocus = null;
19}
20
21function finished() {
22    setTimeout("close()", 1000);
23}
24
25function installNsPlugin(pluginUrl, clientVersionRegistry) {
26    var err = InstallTrigger.compareVersion(clientVersionRegistry, NS_PRINT_CONTROL_PRODUCTVERSION);
27
28    if (err < 0)
29    {
30        xpi={'Crystal Reports ActiveX Print Control Plug-in':pluginUrl};
31        InstallTrigger.install(xpi, callback);
32    }
33}
34
35function callback(url, status) {
36    if (status) {
37        alert("Installation of the ActiveX Print Control failed.  Error code: " + status);
38    }
39}
40
41function checkModal(dlgWindow) {
42    if (dlgWindow && !dlgWindow.closed)
43    dlgWindow.focus();
44}
45
46function cancelPrinting(printControl) {
47    if (printControl && printControl.IsBusy) {
48        printControl.CancelPrinting();
49    }
50}
51
52function checkUserCancelledInstallation(printControl) {
53    if (printControl && printControl.IsBusy == undefined)
54        close();
55}