/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

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