From 7b8a1a363328e5618a96c704252425a45426144f Mon Sep 17 00:00:00 2001 From: Mukul Date: Fri, 12 May 2017 16:19:54 +0530 Subject: [PATCH] this is for bug 17129 --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js | 44 ++++++++++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js index 716dace..910eafe 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js @@ -3440,18 +3440,38 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic var curPosture = localStorage.getItem('currentViewTitle'); if (document.getElementById('jsPanel-1')) { //document.getElementsByClassName('ppImagePanel')) { - setTimeout(function () { - document.getElementById('imgPortrait').setAttribute('src', dataURL); - document.getElementById('imgLandscape').setAttribute('src', dataURL); - document.getElementById('spnModulePor').innerHTML = curModule; - document.getElementById('spnBodyViewTitlePor').innerHTML = curPosture; - document.getElementById('spnModuleLan').innerHTML = curModule; - document.getElementById('spnBodyViewTitleLan').innerHTML = curPosture; - if ($('#printcontainer').length > 0) { - $("#printcontainer").css('width', $(window).outerWidth()); - $("#printcontainer").css('height', $(window).outerHeight()); - } - }, 320); + if (dataURL == "" || dataURL == undefined) + { + + setTimeout(function () { + document.getElementById('imgPortrait').setAttribute('src', dataURL); + document.getElementById('imgLandscape').setAttribute('src', dataURL); + document.getElementById('spnModulePor').innerHTML = curModule; + document.getElementById('spnBodyViewTitlePor').innerHTML = curPosture; + document.getElementById('spnModuleLan').innerHTML = curModule; + document.getElementById('spnBodyViewTitleLan').innerHTML = curPosture; + if ($('#printcontainer').length > 0) { + $("#printcontainer").css('width', $(window).outerWidth()); + $("#printcontainer").css('height', $(window).outerHeight()); + } + }, 520); + } + else + { + setTimeout(function () { + document.getElementById('imgPortrait').setAttribute('src', dataURL); + document.getElementById('imgLandscape').setAttribute('src', dataURL); + document.getElementById('spnModulePor').innerHTML = curModule; + document.getElementById('spnBodyViewTitlePor').innerHTML = curPosture; + document.getElementById('spnModuleLan').innerHTML = curModule; + document.getElementById('spnBodyViewTitleLan').innerHTML = curPosture; + if ($('#printcontainer').length > 0) { + $("#printcontainer").css('width', $(window).outerWidth()); + $("#printcontainer").css('height', $(window).outerHeight()); + } + }, 320); + } + } $('#fileMenuAnchor').addClass('disableMenuannotation'); -- libgit2 0.21.4