diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/AIController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/AIController.js
index ce24bb7..e265dbd 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/AIController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/AIController.js
@@ -492,7 +492,6 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
if ($rootScope.refreshcheck == null) {
$location.path('/');
}
-
$rootScope.isLoading = true;
$('#spinner').css('visibility', 'visible');
$scope.voId = $rootScope.getLocalStorageValue("currentAIImageId");
@@ -514,17 +513,19 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
.select('_contentImage');
$scope.clickedAIImage = "~/../content/images/ai/images/" + clickedAIImage[0]._contentImage;
+
if (clickedAIImage.length > 0) {
+
$.jsPanel({
id: 'aiImagePanel',
selector: '.aiView',
theme: 'success',
currentController: 'AIController',
parentSlug: 'ADAM-images',
- content: '
' +
+ content: '
' +
'
' +
'

' +
- '
' +
+ '
' +
'
',
//ajax: {
// url: 'app/views/ci/ci-view-detail.html'
@@ -532,7 +533,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
title: $rootScope.getLocalStorageValue("currentViewTitle"),
position: {
top: 70,
- left: 20,
+ left: 20,
},
size: { width: $(window).outerWidth() - 20, height: $(window).outerHeight() - 110 },
@@ -540,22 +541,26 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
});
$('#canvasDiv img').load(function () {
-
+
$rootScope.isLoading = false;
$('#spinner').css('visibility', 'hidden');
-
+ var canvas = document.getElementById("canvas");
+ var canvasPaint = document.getElementById("canvasPaint");
+ canvas.height = $(".img-thumbnail").height();
+ canvasPaint.height = $(".img-thumbnail").height();
});
-
$rootScope.currentSlug = 'adam-images-detail';
$rootScope.openViews.push(
{
"module": $rootScope.currentActiveModuleTitle, "bodyView": tittle, "state": 'max', "BodyViewId": $rootScope.currentAIImageId,
"slug": $rootScope.currentSlug
});
-
+
$("#aiImagePanel .img-thumbnail").css("min-height", $("#aiImagePanel .jsPanel-content").height());
$('.jsPanel-content .jsPanel-theme-success').css('overflow-y', 'auto !important')
var jspContentHeight = $('.jsPanel-content').height();
+
+
}
@@ -578,12 +583,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
$('#outlineColor .minicolors >.minicolors-swatch > .minicolors-swatch-color').css("background-color", "rgb(0,0,0)")
$('#outlineColor .minicolors >.minicolors-panel > .minicolors-grid >.minicolors-picker').css({ "top": "145px", "left": "4px" });
-
$("#canvas").css("display", "block");
$("#canvasPaint").css("display", "block");
- //$("#canvas").css("min-height", $(".img-thumbnail").height());
- //$("#canvasPaint").css("min-height", $(".img-thumbnail").height());
-
+
$rootScope.onDrawingCanvasClick();
$rootScope.FreeStylePaint();
});
@@ -613,12 +615,10 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
var curAIListViewScroll = $rootScope.getLocalStorageValue("AIListViewScroll");
if (typeof (curAIListViewScroll) !== "undefined" && curAIListViewScroll !== null && curAIListViewScroll !== '') {
if (typeof InstallTrigger !== 'undefined') {
-
- $('#ListViewDiv').animate({ scrollTop: $rootScope.getLocalStorageValue("AIListViewScroll") });
+ $('#ListViewDiv').animate({ scrollTop: $rootScope.getLocalStorageValue("AIListViewScroll") });
}
else {
-
- $('#ListViewDiv').scrollTop($rootScope.getLocalStorageValue("AIListViewScroll"));
+ $('#ListViewDiv').scrollTop($rootScope.getLocalStorageValue("AIListViewScroll"));
}
}
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
index 5cf995b..03eccbc 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -5610,7 +5610,10 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
$("#printPSOptions").val("100%");
ResizeImage(1);
}
- var contents = document.getElementById(id).innerHTML;
+ var contents;
+ $(document).ready(function () {
+ contents = document.getElementById(id).innerHTML;
+ });
// code for printng in ipads
var $ua = navigator.userAgent;
if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {