diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
index adcfebb..5f31c1e 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
@@ -33,9 +33,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
selectedorientation: '',
selectedimagetype: '',
};
-
+ //$rootScope.isListViewRowClicked = false;
$scope.showTabButton = true;
$scope.isListViewDataLoaded = true;
+
$scope.setActiveTab = function (tabToSet) {
$scope.activeTab = tabToSet;
@@ -47,6 +48,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
else
{
+
$('#grid-view').css("display", "none");
if ($scope.isListViewDataLoaded == true) {
var htm = '';
@@ -62,7 +64,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
htm += ""
});
htm += "";
- $("#list-view").append(htm);
+ $("#list-view").html(htm);
$compile(htm)($scope);
}
});
@@ -73,8 +75,20 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
{
$('#list-view').css("display", "block");
}
+
+ $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;
+ // }
+ }, 2000);
}
-
};
$scope.loadForModuleById = function (moduleId) {
@@ -110,25 +124,28 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
//});
$scope.isOpenBtnClicked = false;
$scope.openModuleItemView = function (event) {
-
+
+ localStorage.setItem("activeTab", $scope.activeTab);
//0. Get selected Image Id
if ($scope.isListViewButtonClicked == true) {
if ($scope.isOpenBtnClicked == true) {
- // alert($("#demoText").html());
+
var moduleItemDataToBeSaved = $("#demoText").html();
$scope.isOpenBtnClicked = false;
}
else {
var moduleItemDataToBeSavedID = event.currentTarget.id;
+ localStorage.setItem("listViewSelectedID", moduleItemDataToBeSavedID);
var moduleItemDataToBeSaved = $("#list-view table tbody #" + moduleItemDataToBeSavedID).find('td:eq(0)').text();
}
}
else
{
var moduleItemDataToBeSaved = event.target.id;
+ localStorage.setItem("listViewSelectedID", event.currentTarget.id);
$scope.isListViewButtonClicked = false;
}
-
+
//1.Filter selected module ietem data and get the pushed opened moduile array object
$rootScope.OpenedTileData = ModuleService.GetOpenedTileData(moduleItemDataToBeSaved, $scope.moduleLandingData);
@@ -138,8 +155,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$rootScope.bodySystemName = $rootScope.OpenedTileData[2];
$rootScope.OpenItemImagePath = "../../../content/images/aa/images/" + $rootScope.OpenedTileData[3];
$scope.OpenItemImagePath = "../../../content/images/aa/images/" + $rootScope.OpenedTileData[3];
-
- //3. set opened module item title
+ $rootScope.listArray = [];
+ $rootScope.listArray.push({ "imageName": $rootScope.OpenItemImagePath, "text": moduleItemDataToBeSaved });
+ //3. set opened module item ti
localStorage.setItem("currentViewTitle", $rootScope.OpenedTileData[6]);
//3. Navigate to the Module-item-view
@@ -149,11 +167,17 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.openListViewModuleItem = function (event) {
+
$("#demoView").remove();
var moduleItemDataToBeSavedID = event.currentTarget.id;
+ $("#list-view table tbody tr").removeClass("active");
+ localStorage.setItem("listViewSelectedID", moduleItemDataToBeSavedID);
+ $("#list-view table tbody #" + moduleItemDataToBeSavedID).addClass("active");
var moduleItemDataToBeSaved = $("#list-view table tbody #" + moduleItemDataToBeSavedID).find('td:eq(0)').text();
$rootScope.OpenedTileData = ModuleService.GetOpenedTileData(moduleItemDataToBeSaved, $scope.moduleLandingData);
$rootScope.OpenItemImagePath = "../../../content/images/aa/images/" + $rootScope.OpenedTileData[3];
+ $rootScope.listArray = [];
+ $rootScope.listArray.push({ "imageName": $rootScope.OpenItemImagePath, "text": moduleItemDataToBeSaved });
$("#viewList").append("" + moduleItemDataToBeSaved + "
Open ");
}
@@ -277,13 +301,20 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
-
+
angular.element(document).ready(function (e) {
$("#ImagePanel").resize(function () {
$("#canvasDiv").scrollLeft($rootScope.CanvasDivLeftPosition);
$("#canvasDiv").scrollTop($rootScope.CanvasDivTopPosition);
});
+ $(document).on("click", "#ImagePanel .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () {
+ $scope.setActiveTab(parseInt(localStorage.getItem("activeTab")));
+ //if (localStorage.getItem("activeTab") != null) {
+
+ // $rootScope.isListViewRowClicked = true;
+ //}
+ });
})
$scope.showAllPins = function () {
@@ -1546,6 +1577,7 @@ function openModuleItemView(event) {
}
function openListViewModuleItem(event) {
+
var scope = angular.element(document.getElementById("list-view")).scope();
scope.isListViewButtonClicked = true;
scope.$apply(function () {
@@ -1554,6 +1586,7 @@ function openListViewModuleItem(event) {
}
function openCurrentView(event) {
+
var scope = angular.element(document.getElementById("list-view")).scope();
scope.isOpenBtnClicked = true;
scope.$apply(function () {