Commit d0789d51299a3f6b5400d3fc32add0f178fc2212

Authored by mangaldeep patel
1 parent c8437ee2

Commit AIA BUGS

400-SOURCECODE/AIAHTML5.Web/app/controllers/AIController.js
@@ -492,7 +492,6 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout @@ -492,7 +492,6 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
492 if ($rootScope.refreshcheck == null) { 492 if ($rootScope.refreshcheck == null) {
493 $location.path('/'); 493 $location.path('/');
494 } 494 }
495 -  
496 $rootScope.isLoading = true; 495 $rootScope.isLoading = true;
497 $('#spinner').css('visibility', 'visible'); 496 $('#spinner').css('visibility', 'visible');
498 $scope.voId = $rootScope.getLocalStorageValue("currentAIImageId"); 497 $scope.voId = $rootScope.getLocalStorageValue("currentAIImageId");
@@ -514,17 +513,19 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout @@ -514,17 +513,19 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
514 .select('_contentImage'); 513 .select('_contentImage');
515 514
516 $scope.clickedAIImage = "~/../content/images/ai/images/" + clickedAIImage[0]._contentImage; 515 $scope.clickedAIImage = "~/../content/images/ai/images/" + clickedAIImage[0]._contentImage;
  516 +
517 if (clickedAIImage.length > 0) { 517 if (clickedAIImage.length > 0) {
  518 +
518 $.jsPanel({ 519 $.jsPanel({
519 id: 'aiImagePanel', 520 id: 'aiImagePanel',
520 selector: '.aiView', 521 selector: '.aiView',
521 theme: 'success', 522 theme: 'success',
522 currentController: 'AIController', 523 currentController: 'AIController',
523 parentSlug: 'ADAM-images', 524 parentSlug: 'ADAM-images',
524 - content: '<div class="row" id="canvasDiv"><div style="align:left;"><canvas id="canvas" ng-click="onDrawingCanvasClick($event)" width="1369" height="536" class="canvas-annotationStyle" style="position: absolute; background-color: transparent;z-index:1 "></canvas> <canvas id="canvasPaint" ng-click="FreeStylePaint($event)" width="1369" height="536" class="canvas-annotationStyle1" style="position: absolute;z-index:0;"></canvas></div>' + 525 + content: '<div class="row" id="canvasDiv"><div style="align:left;"><canvas id="canvas" ng-click="onDrawingCanvasClick($event)" width="1369" class="canvas-annotationStyle" style="position: absolute; background-color: transparent;z-index:1 "></canvas> <canvas id="canvasPaint" ng-click="FreeStylePaint($event)" width="1369" class="canvas-annotationStyle1" style="position: absolute;z-index:0;"></canvas></div>' +
525 '<div class="col-sm-12 img-thumbnail" align="center">' + 526 '<div class="col-sm-12 img-thumbnail" align="center">' +
526 '<img src="' + $scope.clickedAIImage + '" alt="" title="" class="img-responsive ">' + 527 '<img src="' + $scope.clickedAIImage + '" alt="" title="" class="img-responsive ">' +
527 - '<script>$(document).ready(function(){ var $ua = navigator.userAgent;if(($ua.match(/(iPod|iPhone|iPad|android)/i))) { var jspanelContainerWidth = $(".jsPanel-content").css("width"); $(".jsPanel-content").css({ "width": "100%", "min-width": jspanelContainerWidth });$("#aiImagePanel").css("width", "100%"); }$("#btnTxtOnOff").click(function(){if($.trim($(this).text()) === "Text Off"){$(this).text("Text On");$("#sid").css("visibility","hidden");}else{$(this).text("Text Off");$("#sid").css("visibility","visible");}});});</script></div>' + 528 + '<script>$(document).ready(function(){ var $ua = navigator.userAgent;if(($ua.match(/(iPod|iPhone|iPad|android)/i))) { var jspanelContainerWidth = $(".jsPanel-content").css("width"); $(".jsPanel-content").css({ "width": "100%", "min-width": jspanelContainerWidth });$("#aiImagePanel").css("width", "100%"); }$("#btnTxtOnOff").click(function(){if($.trim($(this).text()) === "Text Off"){$(this).text("Text On");$("#sid").css("visibility","hidden");}else{$(this).text("Text Off");$("#sid").css("visibility","visible");}});});</script></div>' +
528 '</div>', 529 '</div>',
529 //ajax: { 530 //ajax: {
530 // url: 'app/views/ci/ci-view-detail.html' 531 // url: 'app/views/ci/ci-view-detail.html'
@@ -532,7 +533,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout @@ -532,7 +533,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
532 title: $rootScope.getLocalStorageValue("currentViewTitle"), 533 title: $rootScope.getLocalStorageValue("currentViewTitle"),
533 position: { 534 position: {
534 top: 70, 535 top: 70,
535 - left: 20, 536 + left: 20,
536 }, 537 },
537 538
538 size: { width: $(window).outerWidth() - 20, height: $(window).outerHeight() - 110 }, 539 size: { width: $(window).outerWidth() - 20, height: $(window).outerHeight() - 110 },
@@ -540,22 +541,26 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout @@ -540,22 +541,26 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
540 }); 541 });
541 542
542 $('#canvasDiv img').load(function () { 543 $('#canvasDiv img').load(function () {
543 - 544 +
544 $rootScope.isLoading = false; 545 $rootScope.isLoading = false;
545 $('#spinner').css('visibility', 'hidden'); 546 $('#spinner').css('visibility', 'hidden');
546 - 547 + var canvas = document.getElementById("canvas");
  548 + var canvasPaint = document.getElementById("canvasPaint");
  549 + canvas.height = $(".img-thumbnail").height();
  550 + canvasPaint.height = $(".img-thumbnail").height();
547 }); 551 });
548 -  
549 $rootScope.currentSlug = 'adam-images-detail'; 552 $rootScope.currentSlug = 'adam-images-detail';
550 $rootScope.openViews.push( 553 $rootScope.openViews.push(
551 { 554 {
552 "module": $rootScope.currentActiveModuleTitle, "bodyView": tittle, "state": 'max', "BodyViewId": $rootScope.currentAIImageId, 555 "module": $rootScope.currentActiveModuleTitle, "bodyView": tittle, "state": 'max', "BodyViewId": $rootScope.currentAIImageId,
553 "slug": $rootScope.currentSlug 556 "slug": $rootScope.currentSlug
554 }); 557 });
555 - 558 +
556 $("#aiImagePanel .img-thumbnail").css("min-height", $("#aiImagePanel .jsPanel-content").height()); 559 $("#aiImagePanel .img-thumbnail").css("min-height", $("#aiImagePanel .jsPanel-content").height());
557 $('.jsPanel-content .jsPanel-theme-success').css('overflow-y', 'auto !important') 560 $('.jsPanel-content .jsPanel-theme-success').css('overflow-y', 'auto !important')
558 var jspContentHeight = $('.jsPanel-content').height(); 561 var jspContentHeight = $('.jsPanel-content').height();
  562 +
  563 +
559 564
560 565
561 } 566 }
@@ -578,12 +583,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout @@ -578,12 +583,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
578 $('#outlineColor .minicolors >.minicolors-swatch > .minicolors-swatch-color').css("background-color", "rgb(0,0,0)") 583 $('#outlineColor .minicolors >.minicolors-swatch > .minicolors-swatch-color').css("background-color", "rgb(0,0,0)")
579 $('#outlineColor .minicolors >.minicolors-panel > .minicolors-grid >.minicolors-picker').css({ "top": "145px", "left": "4px" }); 584 $('#outlineColor .minicolors >.minicolors-panel > .minicolors-grid >.minicolors-picker').css({ "top": "145px", "left": "4px" });
580 585
581 -  
582 $("#canvas").css("display", "block"); 586 $("#canvas").css("display", "block");
583 $("#canvasPaint").css("display", "block"); 587 $("#canvasPaint").css("display", "block");
584 - //$("#canvas").css("min-height", $(".img-thumbnail").height());  
585 - //$("#canvasPaint").css("min-height", $(".img-thumbnail").height());  
586 - 588 +
587 $rootScope.onDrawingCanvasClick(); 589 $rootScope.onDrawingCanvasClick();
588 $rootScope.FreeStylePaint(); 590 $rootScope.FreeStylePaint();
589 }); 591 });
@@ -613,12 +615,10 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout @@ -613,12 +615,10 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
613 var curAIListViewScroll = $rootScope.getLocalStorageValue("AIListViewScroll"); 615 var curAIListViewScroll = $rootScope.getLocalStorageValue("AIListViewScroll");
614 if (typeof (curAIListViewScroll) !== "undefined" && curAIListViewScroll !== null && curAIListViewScroll !== '') { 616 if (typeof (curAIListViewScroll) !== "undefined" && curAIListViewScroll !== null && curAIListViewScroll !== '') {
615 if (typeof InstallTrigger !== 'undefined') { 617 if (typeof InstallTrigger !== 'undefined') {
616 -  
617 - $('#ListViewDiv').animate({ scrollTop: $rootScope.getLocalStorageValue("AIListViewScroll") }); 618 + $('#ListViewDiv').animate({ scrollTop: $rootScope.getLocalStorageValue("AIListViewScroll") });
618 } 619 }
619 else { 620 else {
620 -  
621 - $('#ListViewDiv').scrollTop($rootScope.getLocalStorageValue("AIListViewScroll")); 621 + $('#ListViewDiv').scrollTop($rootScope.getLocalStorageValue("AIListViewScroll"));
622 } 622 }
623 623
624 } 624 }
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -5610,7 +5610,10 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A @@ -5610,7 +5610,10 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
5610 $("#printPSOptions").val("100%"); 5610 $("#printPSOptions").val("100%");
5611 ResizeImage(1); 5611 ResizeImage(1);
5612 } 5612 }
5613 - var contents = document.getElementById(id).innerHTML; 5613 + var contents;
  5614 + $(document).ready(function () {
  5615 + contents = document.getElementById(id).innerHTML;
  5616 + });
5614 // code for printng in ipads 5617 // code for printng in ipads
5615 var $ua = navigator.userAgent; 5618 var $ua = navigator.userAgent;
5616 if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { 5619 if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {