diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
index a490eb4..95691f3 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -628,7 +628,6 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
$rootScope.lexiconLanguageArray = [];
$rootScope.lexiconLanguageArray.push({ id: "1", language: "English" });
$(document).ready(function () {
-
$rootScope.isLexiconTabClicked = true;
$rootScope.lexiconData = function () {
@@ -4495,38 +4494,50 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
});
function PrintDivContentByID(id) {
+
if (id == 'printBoxPor') {
$("#printPSOptions").val("100%");
ResizeImage(1);
}
var contents = document.getElementById(id).innerHTML;
-
- var frame1 = $('');
- frame1[0].name = "frame1";
- frame1.css({ "position": "absolute", "top": "-1000000px" });
- $("body").append(frame1);
-
- var frameDoc = frame1[0].contentWindow ? frame1[0].contentWindow : frame1[0].contentDocument.document ? frame1[0].contentDocument.document : frame1[0].contentDocument;
-
- frameDoc.document.open();
- //Create a new HTML document.
- frameDoc.document.write('
');//Print Preview
- frameDoc.document.write('');
- //Append the external CSS file.
- frameDoc.document.write('');
- frameDoc.document.write('');
- //Append the DIV contents.
- frameDoc.document.write(contents);
- frameDoc.document.write('');
- frameDoc.document.close();
-
- setTimeout(function () {
- window.frames["frame1"].focus();
- window.frames["frame1"].print();
- frame1.remove();
- }, 320);
-
- console.log('close')
+ // code for printng in ipads
+ var $ua = navigator.userAgent;
+ if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
+ $("#canvasDiv").append("
");
+ html2canvas($("#canvasDiv"), {
+ onrendered: function (canvas) {
+ var imgsrc = canvas.toDataURL("image/png");
+ var printContent = '
';
+ var newPrintWindow = window.open();
+ $(newPrintWindow.document.body).html(printContent);
+ newPrintWindow.print();
+ }
+ });
+ }
+ else {
+ var frame1 = $('');
+ frame1[0].name = "frame1";
+ frame1.css({ "position": "absolute", "top": "-1000000px" });
+ $("body").append(frame1);
+ var frameDoc = frame1[0].contentWindow ? frame1[0].contentWindow : frame1[0].contentDocument.document ? frame1[0].contentDocument.document : frame1[0].contentDocument;
+ frameDoc.document.open();
+ //Create a new HTML document.
+ frameDoc.document.write('');//Print Preview
+ frameDoc.document.write('');
+ //Append the external CSS file.
+ frameDoc.document.write('');
+ frameDoc.document.write('');
+ //Append the DIV contents.
+ frameDoc.document.write(contents);
+ frameDoc.document.write('');
+ frameDoc.document.close();
+ setTimeout(function () {
+ window.frames["frame1"].focus();
+ window.frames["frame1"].print();
+ frame1.remove();
+ }, 320);
+ }
+ console.log('close');
}
$(document).on('click', '#jsPanel-1 .jsglyph-remove', function () {