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 492 if ($rootScope.refreshcheck == null) {
493 493 $location.path('/');
494 494 }
495   -
496 495 $rootScope.isLoading = true;
497 496 $('#spinner').css('visibility', 'visible');
498 497 $scope.voId = $rootScope.getLocalStorageValue("currentAIImageId");
... ... @@ -514,17 +513,19 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
514 513 .select('_contentImage');
515 514  
516 515 $scope.clickedAIImage = "~/../content/images/ai/images/" + clickedAIImage[0]._contentImage;
  516 +
517 517 if (clickedAIImage.length > 0) {
  518 +
518 519 $.jsPanel({
519 520 id: 'aiImagePanel',
520 521 selector: '.aiView',
521 522 theme: 'success',
522 523 currentController: 'AIController',
523 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 526 '<div class="col-sm-12 img-thumbnail" align="center">' +
526 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 529 '</div>',
529 530 //ajax: {
530 531 // url: 'app/views/ci/ci-view-detail.html'
... ... @@ -532,7 +533,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
532 533 title: $rootScope.getLocalStorageValue("currentViewTitle"),
533 534 position: {
534 535 top: 70,
535   - left: 20,
  536 + left: 20,
536 537 },
537 538  
538 539 size: { width: $(window).outerWidth() - 20, height: $(window).outerHeight() - 110 },
... ... @@ -540,22 +541,26 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
540 541 });
541 542  
542 543 $('#canvasDiv img').load(function () {
543   -
  544 +
544 545 $rootScope.isLoading = false;
545 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 552 $rootScope.currentSlug = 'adam-images-detail';
550 553 $rootScope.openViews.push(
551 554 {
552 555 "module": $rootScope.currentActiveModuleTitle, "bodyView": tittle, "state": 'max', "BodyViewId": $rootScope.currentAIImageId,
553 556 "slug": $rootScope.currentSlug
554 557 });
555   -
  558 +
556 559 $("#aiImagePanel .img-thumbnail").css("min-height", $("#aiImagePanel .jsPanel-content").height());
557 560 $('.jsPanel-content .jsPanel-theme-success').css('overflow-y', 'auto !important')
558 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 583 $('#outlineColor .minicolors >.minicolors-swatch > .minicolors-swatch-color').css("background-color", "rgb(0,0,0)")
579 584 $('#outlineColor .minicolors >.minicolors-panel > .minicolors-grid >.minicolors-picker').css({ "top": "145px", "left": "4px" });
580 585  
581   -
582 586 $("#canvas").css("display", "block");
583 587 $("#canvasPaint").css("display", "block");
584   - //$("#canvas").css("min-height", $(".img-thumbnail").height());
585   - //$("#canvasPaint").css("min-height", $(".img-thumbnail").height());
586   -
  588 +
587 589 $rootScope.onDrawingCanvasClick();
588 590 $rootScope.FreeStylePaint();
589 591 });
... ... @@ -613,12 +615,10 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
613 615 var curAIListViewScroll = $rootScope.getLocalStorageValue("AIListViewScroll");
614 616 if (typeof (curAIListViewScroll) !== "undefined" && curAIListViewScroll !== null && curAIListViewScroll !== '') {
615 617 if (typeof InstallTrigger !== 'undefined') {
616   -
617   - $('#ListViewDiv').animate({ scrollTop: $rootScope.getLocalStorageValue("AIListViewScroll") });
  618 + $('#ListViewDiv').animate({ scrollTop: $rootScope.getLocalStorageValue("AIListViewScroll") });
618 619 }
619 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 5610 $("#printPSOptions").val("100%");
5611 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 5617 // code for printng in ipads
5615 5618 var $ua = navigator.userAgent;
5616 5619 if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
... ...