From e2e5b717a7a689fdb201ff2b4d82bb4fac0a21be Mon Sep 17 00:00:00 2001 From: Utkarsh Singh Date: Tue, 17 Jan 2017 12:32:29 +0530 Subject: [PATCH] Refs : #10871 --- 400-SOURCECODE/AIAHTML5.Web/AIAHTML5.Web.csproj | 3 +++ 400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 400-SOURCECODE/AIAHTML5.Web/app/widget/TopMenu.html | 2 +- 400-SOURCECODE/AIAHTML5.Web/content/css/print-Portrait.css | 33 +++++++++++++++++++++++++++++++++ 400-SOURCECODE/AIAHTML5.Web/content/css/print-main.css | 1025 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 400-SOURCECODE/AIAHTML5.Web/content/images/adam-logo-small.png | Bin 0 -> 2418 bytes 400-SOURCECODE/AIAHTML5.Web/index.html | 29 +++++++++++++++++++++++++++++ 7 files changed, 1137 insertions(+), 1 deletion(-) create mode 100644 400-SOURCECODE/AIAHTML5.Web/content/css/print-Portrait.css create mode 100644 400-SOURCECODE/AIAHTML5.Web/content/css/print-main.css create mode 100644 400-SOURCECODE/AIAHTML5.Web/content/images/adam-logo-small.png diff --git a/400-SOURCECODE/AIAHTML5.Web/AIAHTML5.Web.csproj b/400-SOURCECODE/AIAHTML5.Web/AIAHTML5.Web.csproj index fed418b..ff558d9 100644 --- a/400-SOURCECODE/AIAHTML5.Web/AIAHTML5.Web.csproj +++ b/400-SOURCECODE/AIAHTML5.Web/AIAHTML5.Web.csproj @@ -78,6 +78,8 @@ + + @@ -116,6 +118,7 @@ + diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js index 7b8e4a8..caa0074 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js @@ -2501,6 +2501,52 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", console.log('close') $(".export-image").css("display", "none"); }; + + $rootScope.ShowPrintWindow = function () { // Print Active Viewer + html2canvas($("#canvasDiv"), { + onrendered: function (canvas) { + var dataURL = canvas.toDataURL("image/jpeg"); + var imageToPrint = new Image(); + imageToPrint.src = dataURL; + $('#snipImage').attr('src', dataURL); + + $('#spnModule').text($rootScope.currentActiveModuleTitle); + $('#spnBodyViewTitle').text(localStorage.getItem('currentViewTitle')); + + PrintDivContentByID('printBox'); // Open Print Window + } + }); + }; + + function PrintDivContentByID(id) { + var contents = document.getElementById(id).innerHTML; + var frame1 = $('