diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
index 6f16da1..0fd1819 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
@@ -36,10 +36,11 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
$scope.activePinArray = [];
$scope.showTabButton = true;
$scope.isListViewDataLoaded = true;
-
+ $rootScope.myModuleId = 1;
$scope.setActiveTab = function (tabToSet) {
-
+
$scope.activeTab = tabToSet;
+ $rootScope.myModuleId = $scope.activeTab;
localStorage.setItem("activeTab", $scope.activeTab);
if ($scope.activeTab == 1) {
$('#grid-view').css("display","block");
@@ -52,7 +53,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
$('#grid-view').css("display", "none");
if ($scope.isListViewDataLoaded == true) {
var htm = '';
- htm += "
Title | Region | System | View | Type |
";
+ htm += " Titlemukul | Region | System | View | Type |
";
$.ajax({
url: '~/../content/data/json/aa/aa_dat_contentlist.json',
dataType: "json",
@@ -389,14 +390,131 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
}
}
+ //$scope.FilterByImage = function (query) {
+ // alert("$rootScope.moduleId" + $rootScope.myModuleId);
+ // //alert(JSON.stringify(query));
+ // // $scope.moduleId = moduleId;
+ // if ($rootScope.myModuleId == 2) {
+ // $('#grid-view').css("display", "none");
+
+ // if ($scope.isListViewDataLoaded == false) {
+ // $rootScope.selectedbodyregion = query.selectedbodyregion;
+ // $rootScope.selectedbodysystem = query.selectedbodysystem;
+ // alert($rootScope.selectedbodyregion);
+ // alert($rootScope.selectedbodysystem);
+ // var promise = ModuleService.loadModuleDataBasedOnModuleName($scope.moduleName)
+ // .then(
+ // function (result) {
+ // // alert(JSON.stringify($scope.moduleLandingData));
+ // $scope.moduleLandingData = result;
+ // $scope.selectedAAListViewData = new jinqJs()
+ // .from($scope.moduleLandingData.data.root.Item)
+ // .where('_BodyRegion = ' + $rootScope.selectedbodyregion, '_BodySystem = ' + $rootScope.selectedbodysystem)
+ // .orderBy([{ field: '_Title', sort: 'asc' }])
+ // .select();
+ // var htm = '';
+ // htm += " Title | Region | System | View | Type |
";
+ // angular.forEach($scope.selectedAAListViewData, function (value, key) {
+ // htm += ""
+ // htm += '' + value._Title + ' | ' + value._BodyRegion + ' | ' + value._BodySystem + ' | ' + value._ViewOrientation + ' | ' + value._ImageType + ' | ';
+ // htm += "
"
+ // });
+ // htm += "
";
+ // $("#list-view").html(htm);
+ // $compile(htm)($scope);
+
+
+
+ // // $(result.root.Item).each(function (key, value) {
+ // // console.log(key + " " + value);
+ // // htm += ""
+ // // htm += '' + value._Title + ' | ' + value._BodyRegion + ' | ' + value._BodySystem + ' | ' + value._ViewOrientation + ' | ' + value._ImageType + ' | ';
+ // // htm += "
"
+ // // });
+ // // htm += "
";
+ // // $("#list-view").html(htm);
+ // // $compile(htm)($scope);
+ // });
+
+ // $('#list-view').css("display", "block");
+ // $scope.isListViewDataLoaded = false;
+ // }
+ // }
+ //}
+ $scope.FilterByImage = function (query) {
+ alert("$rootScope.moduleId" + $rootScope.myModuleId);
+ //alert(JSON.stringify(query));
+ // $scope.moduleId = moduleId;
+ if ($rootScope.myModuleId == 2) {
+ $('#grid-view').css("display", "none");
+
+ if ($scope.isListViewDataLoaded == false) {
+ $rootScope.selectedbodyregion = query.selectedbodyregion;
+ $rootScope.selectedbodysystem = query.selectedbodysystem;
+ alert($rootScope.selectedbodyregion);
+ alert($rootScope.selectedbodysystem);
+ var promise = ModuleService.loadModuleDataBasedOnModuleName($scope.moduleName)
+ .then(
+ function (result) {
+ // alert(JSON.stringify($scope.moduleLandingData));
+ $scope.moduleLandingData = result;
+ if (typeof (query.selectedbodyregion) !== "undefined" && (query.selectedbodyregion !== null && query.selectedbodyregion !== "")) {
+ }
+ else {
+ }
+ if (typeof (query.selectedbodysystem) !== "undefined" && (query.selectedbodysystem !== null && query.selectedbodysystem !== "")) {
+ }
+ else {
- $scope.FilterByImage = function (moduleId, query) {
- //alert(JSON.stringify(query));
- $scope.moduleId = moduleId;
+ } if (typeof (query.selectedorientation) !== "undefined" && (query.selectedorientation !== null && query.selectedorientation !== "")) {
+ }
+ else
+ {
+ }
+ if (typeof (query.selectedimagetype) !== "undefined" && (query.selectedimagetype !== null && query.selectedimagetype !== "")) {
+ }
+ else
+ {
+
+ }
+ $scope.selectedAAListViewData = new jinqJs()
+ .from($scope.moduleLandingData.data.root.Item)
+ .where('_BodyRegion = ' + $rootScope.selectedbodyregion, '_BodySystem = ' + $rootScope.selectedbodysystem)
+ .orderBy([{ field: '_Title', sort: 'asc' }])
+ .select();
+
+ var htm = '';
+ htm += " Title | Region | System | View | Type |
";
+ angular.forEach($scope.selectedAAListViewData, function (value, key) {
+ htm += ""
+ htm += '' + value._Title + ' | ' + value._BodyRegion + ' | ' + value._BodySystem + ' | ' + value._ViewOrientation + ' | ' + value._ImageType + ' | ';
+ htm += "
"
+ });
+ htm += "
";
+ $("#list-view").html(htm);
+ $compile(htm)($scope);
+
+
+
+ // $(result.root.Item).each(function (key, value) {
+ // console.log(key + " " + value);
+ // htm += ""
+ // htm += '' + value._Title + ' | ' + value._BodyRegion + ' | ' + value._BodySystem + ' | ' + value._ViewOrientation + ' | ' + value._ImageType + ' | ';
+ // htm += "
"
+ // });
+ // htm += "
";
+ // $("#list-view").html(htm);
+ // $compile(htm)($scope);
+ });
+
+ $('#list-view').css("display", "block");
+ $scope.isListViewDataLoaded = false;
+ }
+ }
console.log('loadForModuleById is called')
- $rootScope.moduleName = Modules[moduleId].Name;
+ $rootScope.moduleName = Modules[$rootScope.myModuleId].Name;
while ($scope.searchAAListViewData.length) {
$scope.searchAAListViewData.pop();
}
@@ -558,7 +676,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
}
- $scope.Reset = function (moduleId, query) {
+ $scope.Reset = function (query) {
query.selectedbodyregion = "";
query.selectedbodysystem = "";
@@ -586,7 +704,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
// $scope.searchCIListViewData.pop();
//}
- $scope.FilterByImage(1, query);
+ $scope.FilterByImage(query);
}
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/tile-view.html b/400-SOURCECODE/AIAHTML5.Web/app/views/tile-view.html
index cb230d1..63faef3 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/views/tile-view.html
+++ b/400-SOURCECODE/AIAHTML5.Web/app/views/tile-view.html
@@ -55,8 +55,8 @@
Search
-
-