Commit e7b3194d3be7a16f50e90c1a897c180c3fb4cfd0
1 parent
6e9b06b6
have some issue...
Showing
5 changed files
with
252 additions
and
132 deletions
150-DOCUMENTATION/Scrum/AIA_DailyScrum.xlsx
No preview for this file type
400-SOURCECODE/AIAHTML5.Web/AIAHTML5.Web.csproj
@@ -55,6 +55,7 @@ | @@ -55,6 +55,7 @@ | ||
55 | <Content Include="app\main\Link.js" /> | 55 | <Content Include="app\main\Link.js" /> |
56 | <Content Include="app\services\AuthenticationService.js" /> | 56 | <Content Include="app\services\AuthenticationService.js" /> |
57 | <Content Include="app\services\DataService.js" /> | 57 | <Content Include="app\services\DataService.js" /> |
58 | + <Content Include="app\services\ModuleService456.js" /> | ||
58 | <Content Include="app\services\ModuleService.js" /> | 59 | <Content Include="app\services\ModuleService.js" /> |
59 | <Content Include="app\utility\BitmapData.js" /> | 60 | <Content Include="app\utility\BitmapData.js" /> |
60 | <Content Include="app\utility\Matrix.js" /> | 61 | <Content Include="app\utility\Matrix.js" /> |
400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
@@ -15,7 +15,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, BodyRegions, Bod | @@ -15,7 +15,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, BodyRegions, Bod | ||
15 | $scope.AllImageType = []; | 15 | $scope.AllImageType = []; |
16 | $scope.moduleData = []; | 16 | $scope.moduleData = []; |
17 | 17 | ||
18 | - $scope.loadForModuleById = function (moduleId) { | 18 | + $scope.loadForModuleById = function (moduleId) { |
19 | 19 | ||
20 | $scope.moduleId = moduleId; | 20 | $scope.moduleId = moduleId; |
21 | 21 | ||
@@ -26,115 +26,136 @@ function ($scope, $rootScope, $compile, $http, $log, $location, BodyRegions, Bod | @@ -26,115 +26,136 @@ function ($scope, $rootScope, $compile, $http, $log, $location, BodyRegions, Bod | ||
26 | 26 | ||
27 | var data = ModuleService.loadModuleDataBasedOnModuleName($scope.moduleName); | 27 | var data = ModuleService.loadModuleDataBasedOnModuleName($scope.moduleName); |
28 | 28 | ||
29 | - alert('returned data: ' + data); | 29 | + // alert(data); |
30 | } | 30 | } |
31 | + | ||
32 | + $scope.$on('SendTileDataEvent', function (event, data) { | ||
33 | + | ||
34 | + | ||
35 | + alert($rootScope.tileHTML); | ||
36 | + | ||
37 | + }) | ||
38 | + | ||
39 | + // var abc= ModuleService.loadModuleDataBasedOnModuleName($scope.moduleName) | ||
40 | + // abc.then( | ||
41 | + // function (result) { | ||
42 | + // var data = result; | ||
43 | + // alert('returned data: ' + data); | ||
44 | + | ||
45 | + // }, | ||
46 | + // function (error) { | ||
47 | + // alert('returned error: ' + abc); | ||
48 | + // console.log(' $rootScope.TermNumberData= ' + error.statusText); | ||
49 | + // } | ||
50 | + // ) | ||
51 | + //}; | ||
31 | 52 | ||
32 | - $scope.loadDataForModule = function (moduleName) | ||
33 | - { | ||
34 | - | ||
35 | - //0. load filter static data | ||
36 | - | ||
37 | - $scope.AllBodyRegion = BodyRegions; | ||
38 | - $scope.AllBodySystem = BodySystems; | ||
39 | - $scope.AllOrientation = ViewOrientations; | ||
40 | - $scope.AllImageType = ImageTypes; | ||
41 | - | ||
42 | - //1. load dynamic data for module specific images | ||
43 | - var jsonPath; | ||
44 | - if(moduleName==ATLAS_ANATOMY) | ||
45 | - { | ||
46 | - jsonPath ='~/../content/data/json/aa/aa_dat_contentlist.json'; | ||
47 | - } | ||
48 | - else if(moduleName == CLINICAL_ANIMATION) | ||
49 | - { | ||
50 | - //to do, in next phase of project | ||
51 | - jsonPath ='~/../content/data/json/ca/ca_dat_contentlist.json'; | ||
52 | - } | ||
53 | - else if(moduleName == CLINICAL_ILLUSTRATION) | ||
54 | - { | ||
55 | - //to do, in next phase of project | ||
56 | - jsonPath ='~/../content/data/json/ci/ci_dat_contentlist.json'; | ||
57 | - } | ||
58 | - | ||
59 | - var promise = DataService.getJson(jsonPath) | ||
60 | - promise.then( | ||
61 | - function (result) { | ||
62 | - $scope.AtlasAnatomyData = result; | 53 | + //$scope.loadDataForModule = function (moduleName) |
54 | + //{ | ||
55 | + | ||
56 | + // //0. load filter static data | ||
57 | + | ||
58 | + // $scope.AllBodyRegion = BodyRegions; | ||
59 | + // $scope.AllBodySystem = BodySystems; | ||
60 | + // $scope.AllOrientation = ViewOrientations; | ||
61 | + // $scope.AllImageType = ImageTypes; | ||
62 | + | ||
63 | + // //1. load dynamic data for module specific images | ||
64 | + // var jsonPath; | ||
65 | + // if(moduleName==ATLAS_ANATOMY) | ||
66 | + // { | ||
67 | + // jsonPath ='~/../content/data/json/aa/aa_dat_contentlist.json'; | ||
68 | + // } | ||
69 | + // else if(moduleName == CLINICAL_ANIMATION) | ||
70 | + // { | ||
71 | + // //to do, in next phase of project | ||
72 | + // jsonPath ='~/../content/data/json/ca/ca_dat_contentlist.json'; | ||
73 | + // } | ||
74 | + // else if(moduleName == CLINICAL_ILLUSTRATION) | ||
75 | + // { | ||
76 | + // //to do, in next phase of project | ||
77 | + // jsonPath ='~/../content/data/json/ci/ci_dat_contentlist.json'; | ||
78 | + // } | ||
79 | + | ||
80 | + // var promise = DataService.getJson(jsonPath) | ||
81 | + // promise.then( | ||
82 | + // function (result) { | ||
83 | + // $scope.AtlasAnatomyData = result; | ||
63 | 84 | ||
64 | - $scope.data = new jinqJs() | ||
65 | - .from($scope.AtlasAnatomyData.root.Item) | ||
66 | - .orderBy([{ field: '_Title', sort: 'asc' }]) | ||
67 | - .select(); | ||
68 | - | ||
69 | - //console.log($scope.selectedCIListViewData); | ||
70 | - //$('#grid-view').empty(); | ||
71 | - angular.forEach($scope.data, function (value, key) | ||
72 | - { | ||
73 | - // $rootScope.moduleData = []; | ||
74 | - $scope.moduleData.push({ "id": value._Id, "imageID": value._ImageId, "TileName": value._TileImageName, "DivImageTitle": value._Title }); | ||
75 | - // $scope.moduleData.push(value._ImageId); | ||
76 | - // $scope.moduleData.push(value._TileImageName); | 85 | + // $scope.data = new jinqJs() |
86 | + // .from($scope.AtlasAnatomyData.root.Item) | ||
87 | + // .orderBy([{ field: '_Title', sort: 'asc' }]) | ||
88 | + // .select(); | ||
89 | + | ||
90 | + // //console.log($scope.selectedCIListViewData); | ||
91 | + // //$('#grid-view').empty(); | ||
92 | + // angular.forEach($scope.data, function (value, key) | ||
93 | + // { | ||
94 | + // // $rootScope.moduleData = []; | ||
95 | + // $scope.moduleData.push({ "id": value._Id, "imageID": value._ImageId, "TileName": value._TileImageName, "DivImageTitle": value._Title }); | ||
96 | + // // $scope.moduleData.push(value._ImageId); | ||
97 | + // // $scope.moduleData.push(value._TileImageName); | ||
77 | 98 | ||
78 | - $scope.ImageName = value._TileImageName; | ||
79 | - $scope.imagePath = "~/../content/images/aa/thumbnails/" + value._TileImageName; | ||
80 | - $scope.TileViewId = value._Id; | 99 | + // $scope.ImageName = value._TileImageName; |
100 | + // $scope.imagePath = "~/../content/images/aa/thumbnails/" + value._TileImageName; | ||
101 | + // $scope.TileViewId = value._Id; | ||
81 | 102 | ||
82 | - var $el = $('<div id="' + value._Id + '" class="col-sm-3 col-md-3" title = "' + value._Title + '" data-ng-click="openModuleItem()">' | ||
83 | - + '<div class="thumbnail" >' | ||
84 | - + '<img class="tinyImg" id="' + value._Title + '"ng-src="' + $scope.imagePath + '" alt="" title="" >' | ||
85 | - + '<div class="caption"><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view'); | 103 | + // var $el = $('<div id="' + value._Id + '" class="col-sm-3 col-md-3" title = "' + value._Title + '" data-ng-click="openModuleItem()">' |
104 | + // + '<div class="thumbnail" >' | ||
105 | + // + '<img class="tinyImg" id="' + value._Title + '"ng-src="' + $scope.imagePath + '" alt="" title="" >' | ||
106 | + // + '<div class="caption"><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view'); | ||
86 | 107 | ||
87 | 108 | ||
88 | - $compile($el)($scope); | 109 | + // $compile($el)($scope); |
89 | 110 | ||
90 | - //$(".sidebar").mCustomScrollbar({ | ||
91 | - // autoHideScrollbar: true, | ||
92 | - // //theme:"rounded" | ||
93 | - //}); | 111 | + // //$(".sidebar").mCustomScrollbar({ |
112 | + // // autoHideScrollbar: true, | ||
113 | + // // //theme:"rounded" | ||
114 | + // //}); | ||
94 | 115 | ||
95 | 116 | ||
96 | - }); | 117 | + // }); |
97 | 118 | ||
98 | - $scope.scroll(); | 119 | + // $scope.scroll(); |
99 | 120 | ||
100 | - }, | ||
101 | - function (error) { | ||
102 | - // handle errors here | ||
103 | - console.log(' $scope.IllustrationData = ' + error.statusText); | ||
104 | - } | ||
105 | - ); | 121 | + // }, |
122 | + // function (error) { | ||
123 | + // // handle errors here | ||
124 | + // console.log(' $scope.IllustrationData = ' + error.statusText); | ||
125 | + // } | ||
126 | + // ); | ||
106 | 127 | ||
107 | 128 | ||
108 | - } | 129 | + //} |
109 | 130 | ||
110 | $scope.scroll = function () { | 131 | $scope.scroll = function () { |
111 | $("html,body").scrollTop(0); | 132 | $("html,body").scrollTop(0); |
112 | } | 133 | } |
113 | 134 | ||
114 | - $scope.openModuleItem = function ($event) { | 135 | + //$scope.openModuleItem = function ($event) { |
115 | 136 | ||
116 | - var moduleItemDataToBeSaved = []; | 137 | + // var moduleItemDataToBeSaved = []; |
117 | 138 | ||
118 | 139 | ||
119 | - for(var i=0;i<=$scope.moduleData.length-1;i++) | ||
120 | - { | 140 | + // for(var i=0;i<=$scope.moduleData.length-1;i++) |
141 | + // { | ||
121 | 142 | ||
122 | - if ($scope.moduleData[i].DivImageTitle == event.target.id) | ||
123 | - { | 143 | + // if ($scope.moduleData[i].DivImageTitle == event.target.id) |
144 | + // { | ||
124 | 145 | ||
125 | - alert($scope.moduleData[i].imageID); | 146 | + // alert($scope.moduleData[i].imageID); |
126 | 147 | ||
127 | - moduleItemDataToBeSaved.push($scope.moduleData[i].imageID, $scope.moduleData[i].id,$scope.moduleName); | ||
128 | - } | 148 | + // moduleItemDataToBeSaved.push($scope.moduleData[i].imageID, $scope.moduleData[i].id,$scope.moduleName); |
149 | + // } | ||
129 | 150 | ||
130 | - } | 151 | + // } |
131 | 152 | ||
132 | 153 | ||
133 | - ModuleService.SaveOpenedModules(moduleItemDataToBeSaved); | 154 | + // ModuleService.SaveOpenedModules(moduleItemDataToBeSaved); |
134 | 155 | ||
135 | - //var isSaved= ModuleService.SaveOpenedModules(moduleDetails); | ||
136 | - //alert(isSaved); | 156 | + // //var isSaved= ModuleService.SaveOpenedModules(moduleDetails); |
157 | + // //alert(isSaved); | ||
137 | 158 | ||
138 | - } | 159 | + //} |
139 | 160 | ||
140 | }]); | 161 | }]); |
400-SOURCECODE/AIAHTML5.Web/app/services/ModuleService.js
@@ -4,17 +4,16 @@ var CLINICAL_ANIMATION = 'Clinical Animations'; | @@ -4,17 +4,16 @@ var CLINICAL_ANIMATION = 'Clinical Animations'; | ||
4 | var OpenedModuleItemList = []; | 4 | var OpenedModuleItemList = []; |
5 | var ModDetail = []; | 5 | var ModDetail = []; |
6 | 6 | ||
7 | -AIA.factory('ModuleService', function (DataService) | ||
8 | -{ | 7 | +//module.service( 'Book', [ '$rootScope', function( $rootScope ) { |
8 | +AIA.service('ModuleService', ['$rootScope', function ($rootScope, DataService) { | ||
9 | return { | 9 | return { |
10 | - SaveOpenedModules: function (moduleDetails) | ||
11 | - { | 10 | + SaveOpenedModules: function (moduleDetails) { |
12 | ModDetail = moduleDetails; | 11 | ModDetail = moduleDetails; |
13 | 12 | ||
14 | - OpenedModuleItemList.push("imageId: "+ moduleDetails[0]); | 13 | + OpenedModuleItemList.push("imageId: " + moduleDetails[0]); |
15 | OpenedModuleItemList.push("moduleId:" + moduleDetails[1]); | 14 | OpenedModuleItemList.push("moduleId:" + moduleDetails[1]); |
16 | OpenedModuleItemList.push("moduleName: " + moduleDetails[2]); | 15 | OpenedModuleItemList.push("moduleName: " + moduleDetails[2]); |
17 | - | 16 | + |
18 | 17 | ||
19 | //var moduleId = moduleDetails.moduleId; | 18 | //var moduleId = moduleDetails.moduleId; |
20 | //OpenedModuleList.push(moduleId); | 19 | //OpenedModuleList.push(moduleId); |
@@ -32,23 +31,22 @@ AIA.factory('ModuleService', function (DataService) | @@ -32,23 +31,22 @@ AIA.factory('ModuleService', function (DataService) | ||
32 | //moduleData.push(value._ViewOrientation); | 31 | //moduleData.push(value._ViewOrientation); |
33 | //moduleData.push(value._ImageType); | 32 | //moduleData.push(value._ImageType); |
34 | //moduleData.push(value._TileImageName); | 33 | //moduleData.push(value._TileImageName); |
35 | - | ||
36 | - | 34 | + |
35 | + | ||
37 | console.log('called service'); | 36 | console.log('called service'); |
38 | 37 | ||
39 | - | ||
40 | - this.renderModuleItemById(); | ||
41 | - | 38 | + |
39 | + this.renderModuleItemById(); | ||
40 | + | ||
42 | }, | 41 | }, |
43 | 42 | ||
44 | - renderModuleItemById : function () { | ||
45 | - | 43 | + renderModuleItemById: function () { |
44 | + | ||
46 | var jsonFileForOpenModule; | 45 | var jsonFileForOpenModule; |
47 | 46 | ||
48 | - if (ModDetail[2] == ATLAS_ANATOMY) | ||
49 | - { | ||
50 | - this.loadPinData(); | ||
51 | - | 47 | + if (ModDetail[2] == ATLAS_ANATOMY) { |
48 | + this.loadPinData(); | ||
49 | + | ||
52 | } | 50 | } |
53 | else if (ModDetail[2] == CLINICAL_ANIMATION) { | 51 | else if (ModDetail[2] == CLINICAL_ANIMATION) { |
54 | 52 | ||
@@ -73,41 +71,69 @@ AIA.factory('ModuleService', function (DataService) | @@ -73,41 +71,69 @@ AIA.factory('ModuleService', function (DataService) | ||
73 | 71 | ||
74 | }) | 72 | }) |
75 | }, | 73 | }, |
76 | - | ||
77 | - loadModuleDataBasedOnModuleName: function (moduleName) { | ||
78 | - | ||
79 | - alert('loadModuleDataBasedOnModuleName is called'); | ||
80 | - | ||
81 | - var jsonPath; | ||
82 | - if (moduleName == ATLAS_ANATOMY) { | ||
83 | - jsonPath = '~/../content/data/json/aa/aa_dat_contentlist.json'; | ||
84 | - } | ||
85 | - else if (moduleName == CLINICAL_ANIMATION) { | ||
86 | - //to do, in next phase of project | ||
87 | - jsonPath = '~/../content/data/json/ca/ca_dat_contentlist.json'; | ||
88 | - } | ||
89 | - else if (moduleName == CLINICAL_ILLUSTRATION) { | ||
90 | - //to do, in next phase of project | ||
91 | - jsonPath = '~/../content/data/json/ci/ci_dat_contentlist.json'; | ||
92 | - } | ||
93 | - | ||
94 | - var promise = DataService.getJson(jsonPath) | ||
95 | - promise.then( | ||
96 | - function (result) { | ||
97 | - var AtlasAnatomyData = result; | ||
98 | - | ||
99 | - var data = new jinqJs() | ||
100 | - .from($scope.AtlasAnatomyData.root.Item) | ||
101 | - .orderBy([{ field: '_Title', sort: 'asc' }]) | ||
102 | - .select(); | ||
103 | - | ||
104 | - // to do we can now load pin data here | ||
105 | 74 | ||
106 | - }) | 75 | + loadModuleDataBasedOnModuleName: function (moduleName) { |
76 | + | ||
77 | + alert('loadModuleDataBasedOnModuleName is called'); | ||
78 | + | ||
79 | + var jsonPath; | ||
80 | + if (moduleName == ATLAS_ANATOMY) { | ||
81 | + jsonPath = '~/../content/data/json/aa/aa_dat_contentlist.json'; | ||
82 | + } | ||
83 | + else if (moduleName == CLINICAL_ANIMATION) { | ||
84 | + //to do, in next phase of project | ||
85 | + jsonPath = '~/../content/data/json/ca/ca_dat_contentlist.json'; | ||
86 | + } | ||
87 | + else if (moduleName == CLINICAL_ILLUSTRATION) { | ||
88 | + //to do, in next phase of project | ||
89 | + jsonPath = '~/../content/data/json/ci/ci_dat_contentlist.json'; | ||
107 | } | 90 | } |
91 | + | ||
92 | + var promise = DataService.getJson(jsonPath) | ||
93 | + .then( | ||
94 | + function (result) { | ||
95 | + var AtlasAnatomyData = result; | ||
96 | + | ||
97 | + var data = new jinqJs() | ||
98 | + .from(AtlasAnatomyData.root.Item) | ||
99 | + .orderBy([{ field: '_Title', sort: 'asc' }]) | ||
100 | + .select(); | ||
101 | + | ||
102 | + | ||
103 | + | ||
104 | + angular.forEach(data, function (value, key) { | ||
105 | + // $rootScope.moduleData = []; | ||
106 | + //$scope.moduleData.push({ "id": value._Id, "imageID": value._ImageId, "TileName": value._TileImageName, "DivImageTitle": value._Title }); | ||
107 | + // $scope.moduleData.push(value._ImageId); | ||
108 | + // $scope.moduleData.push(value._TileImageName); | ||
109 | + | ||
110 | + var ImageName = value._TileImageName; | ||
111 | + var imagePath = "~/../content/images/aa/thumbnails/" + value._TileImageName; | ||
112 | + //$scope.TileViewId = value._Id; | ||
113 | + | ||
114 | + $rootScope.tileHTML = $('<div id="' + value._Id + '" class="col-sm-3 col-md-3" title = "' + value._Title + '" data-ng-click="openModuleItem()">' | ||
115 | + + '<div class="thumbnail" >' | ||
116 | + + '<img class="tinyImg" id="' + value._Title + '"ng-src="' + imagePath + '" alt="" title="" >' | ||
117 | + + '<div class="caption"><p>' + value._Title + '</p></div></a></div></div>');//.appendTo('#grid-view'); | ||
118 | + debugger; | ||
119 | + }) | ||
120 | + | ||
121 | + //if ($rootScope.tileHTML != undefined) { | ||
122 | + // alert('come before broadcast') | ||
123 | + // $rootScope.$broadcast('SendTileDataEvent', true); | ||
124 | + | ||
125 | + //} | ||
126 | + | ||
127 | + }, | ||
128 | + function (error) { | ||
129 | + // handle errors here | ||
130 | + console.log(' $rootScope.TermNumberData= ' + error.statusText); | ||
131 | + } | ||
132 | + ) | ||
108 | } | 133 | } |
109 | - | 134 | + } |
135 | + | ||
136 | + | ||
110 | 137 | ||
111 | - | ||
112 | - | ||
113 | -}); | ||
114 | \ No newline at end of file | 138 | \ No newline at end of file |
139 | +}]); | ||
140 | + | ||
115 | \ No newline at end of file | 141 | \ No newline at end of file |
400-SOURCECODE/AIAHTML5.Web/app/services/ModuleService456.js
0 → 100644
1 | +var ATLAS_ANATOMY = 'Atlas Anatomy'; | ||
2 | +var CLINICAL_ILLUSTRATION = 'Clinical Illustrations'; | ||
3 | +var CLINICAL_ANIMATION = 'Clinical Animations'; | ||
4 | +var OpenedModuleItemList = []; | ||
5 | +var ModDetail = []; | ||
6 | + | ||
7 | +AIA.service("ModuleService", function ($http, $q, DataService) { | ||
8 | + | ||
9 | + var deferred = $q.defer(); | ||
10 | + | ||
11 | + this.loadModuleDataBasedOnModuleName = function (moduleName) { | ||
12 | + var tileHtml; | ||
13 | + | ||
14 | + | ||
15 | + var jsonPath; | ||
16 | + if (moduleName == ATLAS_ANATOMY) { | ||
17 | + jsonPath = '~/../content/data/json/aa/aa_dat_contentlist.json'; | ||
18 | + } | ||
19 | + else if (moduleName == CLINICAL_ANIMATION) { | ||
20 | + //to do, in next phase of project | ||
21 | + jsonPath = '~/../content/data/json/ca/ca_dat_contentlist.json'; | ||
22 | + } | ||
23 | + else if (moduleName == CLINICAL_ILLUSTRATION) { | ||
24 | + //to do, in next phase of project | ||
25 | + jsonPath = '~/../content/data/json/ci/ci_dat_contentlist.json'; | ||
26 | + } | ||
27 | + | ||
28 | + var promise = DataService.getJson(jsonPath) | ||
29 | + promise.then( | ||
30 | + function (result) { | ||
31 | + var AtlasAnatomyData = result; | ||
32 | + | ||
33 | + var data = new jinqJs() | ||
34 | + .from(AtlasAnatomyData.root.Item) | ||
35 | + .orderBy([{ field: '_Title', sort: 'asc' }]) | ||
36 | + .select(); | ||
37 | + | ||
38 | + var tileHTML; | ||
39 | + | ||
40 | + angular.forEach(data, function (value, key) { | ||
41 | + // $rootScope.moduleData = []; | ||
42 | + //$scope.moduleData.push({ "id": value._Id, "imageID": value._ImageId, "TileName": value._TileImageName, "DivImageTitle": value._Title }); | ||
43 | + // $scope.moduleData.push(value._ImageId); | ||
44 | + // $scope.moduleData.push(value._TileImageName); | ||
45 | + | ||
46 | + var ImageName = value._TileImageName; | ||
47 | + var imagePath = "~/../content/images/aa/thumbnails/" + value._TileImageName; | ||
48 | + //$scope.TileViewId = value._Id; | ||
49 | + | ||
50 | + tileHTML = $('<div id="' + value._Id + '" class="col-sm-3 col-md-3" title = "' + value._Title + '" data-ng-click="openModuleItem()">' | ||
51 | + + '<div class="thumbnail" >' | ||
52 | + + '<img class="tinyImg" id="' + value._Title + '"ng-src="' + imagePath + '" alt="" title="" >' | ||
53 | + + '<div class="caption"><p>' + value._Title + '</p></div></a></div></div>');//.appendTo('#grid-view'); | ||
54 | + }) | ||
55 | + var deferred = $q.defer(); | ||
56 | + return tileHTML | ||
57 | + .then(function (response) { | ||
58 | + // promise is fulfilled | ||
59 | + //debugger; | ||
60 | + deferred.resolve(response.data); | ||
61 | + // promise is returned | ||
62 | + return deferred.promise; | ||
63 | + }, function (response) { | ||
64 | + // the following line rejects the promise | ||
65 | + deferred.reject(response); | ||
66 | + // promise is returned | ||
67 | + return deferred.promise; | ||
68 | + }) | ||
69 | + ; | ||
70 | + } | ||
71 | + )} | ||
72 | +}); | ||
0 | \ No newline at end of file | 73 | \ No newline at end of file |