diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js index 4ebd56b..5612ab3 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js @@ -49,25 +49,29 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou else { + $('#grid-view').css("display", "none"); if ($scope.isListViewDataLoaded == true) { - var htm = ''; - htm += ""; - $.ajax({ - url: '~/../content/data/json/aa/aa_dat_contentlist.json', - dataType: "json", - success: function (result) { - $(result.root.Item).each(function (key, value) { - console.log(key + " " + value); - htm += "" - htm += ''; - htm += "" - }); - htm += "
Title Region SystemView Type
' + value._Title + '' + value._BodyRegion + '' + value._BodySystem + '' + value._ViewOrientation + '' + value._ImageType + '
"; - $("#list-view").html(htm); - $compile(htm)($scope); - } - }); + 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) + .orderBy([{ field: '_Title', sort: 'asc' }]) + .select(); + var htm = ''; + htm += ""; + angular.forEach($scope.selectedAAListViewData, function (value, key) { + htm += "" + htm += ''; + htm += "" + }); + htm += "
Title Region SystemView Type
' + value._Title + '' + value._BodyRegion + '' + value._BodySystem + '' + value._ViewOrientation + '' + value._ImageType + '
"; + $("#list-view").html(htm); + $compile(htm)($scope); + }); $('#list-view').css("display", "block"); $scope.isListViewDataLoaded = false; }