Commit f77610add07bc2463de5e9ee93f80f341e2e17c3
1 parent
01314f9c
Code Changes for Save CB
Showing
1 changed file
with
59 additions
and
0 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js
... | ... | @@ -209,6 +209,9 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
209 | 209 | |
210 | 210 | $rootScope.exportToFile = function () { |
211 | 211 | |
212 | + for (var i = 0; i < $rootScope.structure.length; i++) { | |
213 | + | |
214 | + } | |
212 | 215 | $rootScope.selectedNodeSingle.push( |
213 | 216 | { |
214 | 217 | "slideshow": { |
... | ... | @@ -278,7 +281,63 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
278 | 281 | }); |
279 | 282 | }; |
280 | 283 | |
284 | + $rootScope.saveCurricullam = function (file_Name) { | |
285 | + | |
286 | + $scope.selectedNodeSingleObj.push( | |
287 | + { | |
288 | + "slideshow": { | |
289 | + "presentation": { | |
290 | + "structure": { | |
291 | + "structure": [ | |
292 | + { | |
293 | + "_label": "Untitled Slide", | |
294 | + "_id": "-1507902782", | |
295 | + "_isRoot": "false", | |
296 | + "_isBranch": "false", | |
297 | + "_isLocked": "false" | |
298 | + } | |
281 | 299 | |
300 | + ], | |
301 | + "_label": "Untitled Curriculum", | |
302 | + "_id": "-225638207", | |
303 | + "_isRoot": "true", | |
304 | + "_isBranch": "true", | |
305 | + "_isLocked": "false" | |
306 | + }, | |
307 | + "_anchor": "true", | |
308 | + "_window_position": "6,10", | |
309 | + "_window_size": "828,453" | |
310 | + }, | |
311 | + "content": { | |
312 | + "element": [ | |
313 | + { | |
314 | + "notes": "<TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Microsoft Sans Serif\" SIZE=\"13\" COLOR=\"#000000\" LETTERSPACING=\"0\" KERNING=\"0\"> </FONT></P></TEXTFORMAT><TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Microsoft Sans Serif\" SIZE=\"13\" COLOR=\"#000000\" LETTERSPACING=\"0\" KERNING=\"0\"> </FONT></P></TEXTFORMAT><TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Microsoft Sans Serif\" SIZE=\"13\" COLOR=\"#000000\" LETTERSPACING=\"0\" KERNING=\"0\"> </FONT></P></TEXTFORMAT>", | |
315 | + "windows": { | |
316 | + "window": "{\"windowTitle\":\"Hand (Post/Ant)\",\"selectedCallouts\":[],\"annotationData\":\"\",\"minimised\":false,\"scrollPosition\":{\"vertical\":78,\"horizontal\":120},\"selectedStructureID\":7446,\"maximised\":false,\"size\":{\"width\":800,\"height\":753},\"id\":\"424\",\"showSelectedPins\":true,\"scaleIndex\":0,\"bodySystemId\":11,\"windowListId\":\"0\",\"imageId\":\"424\",\"position\":{\"x\":840,\"y\":10},\"mType\":\"ATLAS_ANATOMY\",\"hideCallOuts\":true,\"containsCapturedContent\":true,\"selectedPins\":[\"32783\"],\"contextMenu\":{\"hideLeftBar\":false,\"hideTitleBar\":false,\"hideTopToolBar\":false,\"lockResize\":false}}" | |
317 | + }, | |
318 | + "_id": "-1507902782" | |
319 | + } | |
320 | + ] | |
321 | + } | |
322 | + } | |
323 | + }); | |
324 | + console.log($scope.selectedNodeSingle); | |
325 | + $scope.exportToFile(); | |
326 | + $http({ method: 'Post', url: 'content/data/json/cb/SlideShow/json/' + $scope.fileName + '.json' }).success(function (data) { | |
327 | + localStorage.setItem("cbJsonDataObject", JSON.stringify(data)); | |
328 | + $rootScope.cbJsonData = JSON.parse(localStorage.getItem("cbJsonDataObject")); | |
329 | + $rootScope.cbDynamicJsonData = data; | |
330 | + //$scope.getCBsummary(); | |
331 | + $rootScope.cbJsonData.slideshow.content.element="Eement data"; | |
332 | + $rootScope.cbDynamicJsonData.slideshow.content.element="slideshow element data"; | |
333 | + $rootScope.note = "save data" | |
334 | + //$scope.openCurriculumDetail(); | |
335 | + }) | |
336 | + .error(function (data, status, headers, config) { | |
337 | + console.log(data); | |
338 | + }); | |
339 | + | |
340 | + } | |
282 | 341 | |
283 | 342 | //$rootScope.saveCurricullam = function (file_Name) { |
284 | 343 | // $scope.selectedNodeSingleObj.push( | ... | ... |