diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
index 34cdf94..3f7991e 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
@@ -77,16 +77,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
$timeout(function () {
- // if ($rootScope.isListViewRowClicked == true) {
- // $rootScope.isListViewRowClicked = false;
- $("#demoView").remove();
- $("#viewList").append("
" + $rootScope.listArray[0].text + "
Open ");
- var moduleItemDataToBeSavedID
- $("#list-view table tbody tr").removeClass("active");
- var moduleItemDataToBeSavedID = localStorage.getItem("listViewSelectedID");
- $("#list-view table tbody #" + moduleItemDataToBeSavedID).addClass("active");
- $scope.isListViewButtonClicked = true;
- // }
+ // if ($rootScope.isListViewRowClicked == true) {
+ // $rootScope.isListViewRowClicked = false;
+ $("#demoView").remove();
+ $("#viewList").append("" + $rootScope.listArray[0].text + "
Open ");
+ var moduleItemDataToBeSavedID
+ $("#list-view table tbody tr").removeClass("active");
+ var moduleItemDataToBeSavedID = localStorage.getItem("listViewSelectedID");
+ $("#list-view table tbody #" + moduleItemDataToBeSavedID).addClass("active");
+ $scope.isListViewButtonClicked = true;
+ // }
}, 2000);
}
};
@@ -135,10 +135,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
else {
var moduleItemDataToBeSavedID = event.currentTarget.id;
- localStorage.setItem("listViewSelectedID", moduleItemDataToBeSavedID);
+ localStorage.setItem("listViewSelectedID", moduleItemDataToBeSavedID);
var moduleItemDataToBeSaved = $("#list-view table tbody #" + moduleItemDataToBeSavedID).find('td:eq(0)').text();
}
- }
+ }
else
{
var moduleItemDataToBeSaved = event.target.id;
@@ -230,51 +230,59 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
//0.4 for Opening module item, load it into image
var openedImage = new Image();
+ openedImage.id = 'modItemImage';
openedImage.name = $rootScope.OpenItemImagePath;
- openedImage.onload = getImageHeightWidth;
+
+ openedImage.onload = function () {
+ $scope.imageWidth = this.width;
+ $scope.imageHeight = this.height;
+
+
+ $timeout(function () {
+ $compile(aaViewElement.contents())($scope);
+
+ if (document.getElementById('aaDetailPageDiv') != null) {
+
+ //0.4 added some stylesheets
+ $('.aaBodyView').css("height", $(window).outerHeight() - $('.navbar-fixed-top').height());
+ $('.aaBodyView').css("width", $(window).outerWidth());
+ $rootScope.canvasDivHeight = $('.aaBodyView').height();
+
+ $('.canvasDivClass').css("height", $rootScope.canvasDivHeight);
+
+ $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle");
+ $("#modItemImage").attr('src', $rootScope.OpenItemImagePath);
+
+
+ $rootScope.ViewImageWidth = $("#modItemImage").width();
+ $scope.ViewImageWidth = $("#modItemImage").width();
+ $scope.ViewImageHeight = $("#modItemImage").height();
+
+ $scope.relativeDimesion = 0;
+ $("#modItemImage").css("width", $rootScope.ViewImageWidth + "px");
+ //0.5 create canvas on the top of image so that I can draw a line over the canvas.
+ var canvas = document.createElement('canvas');
+ canvas.id = 'aaDetailViewCanvas';
+ canvas.className = '.aaCanvas'
+ canvas.height = parseInt(($scope.imageHeight));
+ canvas.width = parseInt($scope.imageWidth);
+ canvas.style.left = '0px';
+ canvas.style.top = '0px';
+ canvas.style.position = "absolute";
+ $("#canvasDiv").append(canvas);
+ $scope.context = canvas.getContext("2d")
+ //6. Show all pins on AA opened item
+ $scope.showAllPins();
+ //7. Highlight all system body list in left side
+ $scope.highlightBodySystemList();
+ }
+ }, 1050);
+ }
+
openedImage.onerror = loadFailure;
openedImage.src = $rootScope.OpenItemImagePath;
-
- $timeout(function () {
- $compile(aaViewElement.contents())($scope);
-
- if (document.getElementById('aaDetailPageDiv') != null) {
-
- //0.4 added some stylesheets
- $('.aaBodyView').css("height", $(window).outerHeight() - $('.navbar-fixed-top').height());
- $('.aaBodyView').css("width", $(window).outerWidth());
- $rootScope.canvasDivHeight = $('.aaBodyView').height();
-
- $('.canvasDivClass').css("height", $rootScope.canvasDivHeight);
-
- $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle");
- $("#modItemImage").attr('src', $rootScope.OpenItemImagePath);
-
-
- $rootScope.ViewImageWidth = $("#modItemImage").width();
- $scope.ViewImageWidth = $("#modItemImage").width();
- $scope.ViewImageHeight = $("#modItemImage").height();
-
- $scope.relativeDimesion = 0;
- $("#modItemImage").css("width", $rootScope.ViewImageWidth + "px");
- //0.5 create canvas on the top of image so that I can draw a line over the canvas.
- var canvas = document.createElement('canvas');
- canvas.id = 'aaDetailViewCanvas';
- canvas.className = '.aaCanvas'
- canvas.height = parseInt(($scope.imageHeight));
- canvas.width = parseInt($scope.imageWidth);
- canvas.style.left = '0px';
- canvas.style.top = '0px';
- canvas.style.position = "absolute";
- $("#canvasDiv").append(canvas);
- $scope.context = canvas.getContext("2d")
- //6. Show all pins on AA opened item
- $scope.showAllPins();
- //7. Highlight all system body list in left side
- $scope.highlightBodySystemList();
- }
- }, 1050);
}
+
}
$scope.highlightBodySystemList = function () {
@@ -297,13 +305,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
return true;
}
- function getImageHeightWidth() {
- $scope.imageWidth = this.width;
- $scope.imageHeight = this.height;
- }
-
-
-
angular.element(document).ready(function (e) {
$("#ImagePanel").resize(function () {