Commit c8e711ce6bd4342e36ed05d25ce7883cf92b4f96
1 parent
6f513c1b
Code changes for CI Window data to Save CB
Showing
2 changed files
with
167 additions
and
269 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js
... | ... | @@ -709,7 +709,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
709 | 709 | } |
710 | 710 | } |
711 | 711 | } |
712 | - | |
712 | + var isActive = false; | |
713 | 713 | //Start Code by Sandeep for TicketNo: 49226(3) |
714 | 714 | $scope.DropDownSelectNodeClick = function (nodeid) { |
715 | 715 | if ($rootScope.contentNotesForSaveCB.length == 0) { |
... | ... | @@ -717,9 +717,11 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
717 | 717 | } |
718 | 718 | var currentCb_id = document.getElementById('cbSelect').value; |
719 | 719 | $rootScope.updatedContentFromEditor(currentCb_id);//Calling for Update Note for Save CB |
720 | - | |
721 | - $scope.windowsContentForSelectedSlide(nodeid);// Calling for Update Window content for Save Cb | |
722 | 720 | |
721 | + if (isActive) { | |
722 | + $scope.updateWindowsContentForSaveCBTest(currentCb_id);// Calling for Update Window content for Save Cb | |
723 | + } | |
724 | + isActive = true; | |
723 | 725 | traverseTreeSelectedSingleObj($rootScope.stru, nodeid); |
724 | 726 | traverse($rootScope.stru, nodeid); |
725 | 727 | |
... | ... | @@ -2197,50 +2199,61 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
2197 | 2199 | for (var i = 0 ; i < selectedSlideContent[0].windows.window.length; i++) { |
2198 | 2200 | $scope.windowDataforCB = JSON.parse(selectedSlideContent[0].windows.window[i]) |
2199 | 2201 | $scope.setWinDataToArray.push($scope.windowDataforCB); |
2200 | - } | |
2201 | - //for (var j = 0; j < $scope.setWinDataToArray.length; j++) { | |
2202 | - // //$scope.updateWindowsContentForSaveCB($scope.setWinDataToArray[j]); | |
2203 | - //} | |
2202 | + } | |
2204 | 2203 | } |
2205 | 2204 | else { |
2206 | 2205 | $scope.windowDataforCB = JSON.parse(selectedSlideContent[0].windows.window) |
2207 | 2206 | $scope.setWinDataToArray.push($scope.windowDataforCB); |
2208 | 2207 | } |
2208 | + $rootScope.updateWindowsContentForSaveCB(currentId); | |
2209 | 2209 | } |
2210 | 2210 | } |
2211 | + | |
2212 | + $scope.updatedWindowListForSaveCB = []; | |
2211 | 2213 | |
2212 | - $rootScope.updateWindowsContentForSaveCB = function (mType) { | |
2213 | - //for (var j = 0; j < $scope.setWinDataToArray.length; j++) { | |
2214 | - switch (mType) { | |
2214 | + $rootScope.updateWindowsContentForSaveCB = function (currentId) { | |
2215 | + var isAA = true; var isCI = true; var isDA = true; | |
2216 | + for (var j = 0; j < $scope.setWinDataToArray.length; j++) { | |
2217 | + | |
2218 | + switch ($scope.setWinDataToArray[j].mType) { | |
2215 | 2219 | case "MY_PICTURES": |
2216 | 2220 | $scope.savePicWindowActivity($scope.windowDataforCB); |
2217 | 2221 | break; |
2218 | 2222 | case "DISSECTIBLE_ANATOMY": |
2219 | - $scope.saveDAWindowActivity($scope.windowDataforCB); | |
2223 | + $scope.saveDAWindowActivity(); | |
2220 | 2224 | break; |
2221 | - case "ATLAS_ANATOMY": | |
2222 | - //$scope.saveAAWindowActivity(singleWindowObj); | |
2223 | - for (var i = 0; i < $rootScope.AAWindowData.length;) { | |
2224 | - $scope.setWinDataToArray[j].windowTitle = $rootScope.AAWindowData[i].currentViewTitle; | |
2225 | - $scope.setWinDataToArray[j].hideAllPins = $rootScope.AAWindowData[i].isHidePinBtnClicked; | |
2226 | - | |
2227 | - } | |
2228 | - | |
2225 | + case "ATLAS_ANATOMY": | |
2226 | + if (isAA) { | |
2227 | + $scope.saveAAWindowActivity(); | |
2228 | + isAA = false; | |
2229 | + } | |
2229 | 2230 | break; |
2230 | 2231 | case "CLINICAL_ILLUSTRATIONS": |
2231 | - $scope.saveCIWindowActivity(keyName, val); | |
2232 | + if (isCI) { | |
2233 | + $scope.saveCIWindowActivity(); | |
2234 | + isCI = false; | |
2235 | + } | |
2232 | 2236 | break; |
2233 | 2237 | case "CLINICAL_ANIMATIONS": |
2234 | - $scope.saveCAWindowActivity($scope.windowDataforCB); | |
2238 | + $scope.saveCAWindowActivity(); | |
2235 | 2239 | break; |
2236 | 2240 | case "THREE_D_ANATOMY": |
2237 | - $scope.save3DWindowActivity($scope.windowDataforCB); | |
2241 | + $scope.save3DWindowActivity(); | |
2238 | 2242 | break; |
2239 | 2243 | default: |
2240 | - text = "I have never heard of that fruit..."; | |
2244 | + | |
2241 | 2245 | } |
2242 | - } | |
2246 | + } | |
2247 | + findKeyForChange($rootScope.contentNotesForSaveCB, currentId); | |
2248 | + $scope.selectedKey.windows.window = []; | |
2243 | 2249 | |
2250 | + for (var s = 0; s < $scope.updatedWindowListForSaveCB.length; s++) | |
2251 | + { | |
2252 | + var arrToStrWinObj = JSON.stringify($scope.updatedWindowListForSaveCB[s]); | |
2253 | + $scope.selectedKey.windows.window.push(arrToStrWinObj); | |
2254 | + } | |
2255 | + $scope.updatedWindowListForSaveCB = []; | |
2256 | + console.log($scope.selectedKey.windows.window); | |
2244 | 2257 | } |
2245 | 2258 | |
2246 | 2259 | function findKeyForChange(o, keyname) { |
... | ... | @@ -2261,9 +2274,84 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
2261 | 2274 | } |
2262 | 2275 | } |
2263 | 2276 | |
2264 | - $rootScope.saveCIWindowActivity = function (keyName, value) { | |
2277 | + $scope.saveCIWindowActivity = function (currentId) { | |
2278 | + if ($rootScope.CIWindowData != undefined && $rootScope.CIWindowData.length > 0 ) { | |
2279 | + for (var i = 0; i < $rootScope.CIWindowData.length; i++) { | |
2280 | + $scope.updatedWindowListForSaveCB.push({ | |
2281 | + | |
2282 | + containsCapturedContent: true,//$rootScope.CIWindowData[i] | |
2283 | + annotationData: "",//$rootScope.CIWindowData[i] | |
2284 | + contextMenu: { lockResize: false, hideTitleBar: false }, | |
2285 | + position: { | |
2286 | + top: $rootScope.jsPanelTop, | |
2287 | + left: $rootScope.jsPanelLeft, | |
2288 | + }, | |
2289 | + size: { | |
2290 | + width: $rootScope.jsPanelWidth, | |
2291 | + height: $rootScope.jsPanelHeight | |
2292 | + }, | |
2293 | + textVisible: $rootScope.CIWindowData[i].isTextVisible, | |
2294 | + imageId: $rootScope.CIWindowData[i].imageId, | |
2295 | + minimised: false,//$rootScope.CIWindowData[i] | |
2296 | + windowTitle: $rootScope.CIWindowData[i].currentViewTitle, | |
2297 | + maximised: false,//$rootScope.CIWindowData[i] | |
2298 | + mType: $rootScope.CIWindowData[i].moduleName, | |
2299 | + id: 0,//$rootScope.CIWindowData[i].id, | |
2300 | + scrollPosition: { | |
2301 | + vertical: 0, | |
2302 | + horizontal: 0 | |
2303 | + }, | |
2304 | + windowListId: 0 //$rootScope.CIWindowData[i] | |
2305 | + }); | |
2306 | + | |
2307 | + } | |
2308 | + $rootScope.CIWindowData = []; | |
2309 | + } | |
2310 | + | |
2311 | + } | |
2312 | + | |
2313 | + $scope.saveAAWindowActivity = function () { | |
2314 | + | |
2315 | + if ($rootScope.AAWindowData != undefined && $rootScope.AAWindowData.length > 0) { | |
2316 | + for (var i = 0; i < $rootScope.AAWindowData.length; i++) { | |
2317 | + $scope.updatedWindowListForSaveCB.push({ | |
2318 | + | |
2319 | + windowTitle: $rootScope.AAWindowData[i].currentViewTitle, | |
2320 | + hideAllPins: $rootScope.AAWindowData[i].isHidePinBtnClicked, | |
2321 | + selectedCallouts: $rootScope.AAWindowData[i].CBselectedpinCordinate, | |
2322 | + annotationData: "",//No find in AA.js | |
2323 | + minimised: false,//N | |
2324 | + scrollPosition: { vertical: 279, horizontal: 313 },//N | |
2325 | + selectedStructureID: 0,//N | |
2326 | + selectedPins: $rootScope.AAWindowData[i].clickedPins, | |
2327 | + maximised: false,//N | |
2328 | + size: { width: 800, height: 297 },//N | |
2329 | + id: "492",//N | |
2330 | + showSelectedPins: $rootScope.AAWindowData[i].isShowSelectedSystemPinsClicked, | |
2331 | + hideCallOuts: false,//N | |
2332 | + showAllPins: $rootScope.AAWindowData[i].isShowBodyWithCBPinData,//N | |
2333 | + scaleIndex: 0,//N | |
2334 | + bodySystemId: $rootScope.AAWindowData[i].SelectedSystemID, | |
2335 | + windowListId: "0",//N | |
2336 | + imageId: $rootScope.AAWindowData[i].imageId, | |
2337 | + position: { x: 840, y: 263 },//N | |
2338 | + mType: $rootScope.AAWindowData[i].moduleName, | |
2339 | + containsCapturedContent: true, | |
2340 | + contextMenu: { hideLeftBar: false, hideTitleBar: false, hideTopToolBar: false, lockResize: false }, | |
2341 | + | |
2342 | + //position: { top: $rootScope.jsPanelTop, left: $rootScope.jsPanelLeft }, | |
2343 | + //size: { width: $rootScope.jsPanelWidth, height: $rootScope.jsPanelHeight } | |
2344 | + | |
2345 | + | |
2346 | + }); | |
2347 | + } | |
2348 | + $rootScope.AAWindowData = []; | |
2349 | + } | |
2350 | + } | |
2351 | + | |
2352 | + $scope.saveCIWindowActivityTest = function (keyName, value) { | |
2265 | 2353 | for (var i = 0; i < $scope.setWinDataToArray.length; i++) { |
2266 | - $scope.setWinDataToArray[i][keyName] = value; | |
2354 | + $scope.setWinDataToArray[i][keyName] = value; | |
2267 | 2355 | var current_id; |
2268 | 2356 | if (($rootScope.getLocalStorageValue("cbSelectId")) != '') { |
2269 | 2357 | current_id = $rootScope.getLocalStorageValue("cbSelectId"); |
... | ... | @@ -2278,97 +2366,62 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
2278 | 2366 | $scope.selectedKey.windows.window = ""; |
2279 | 2367 | if (keyName != "") { |
2280 | 2368 | $scope.selectedKey.windows.window = JSON.stringify($scope.setWinDataToArray[i]); |
2281 | - } | |
2369 | + } | |
2282 | 2370 | } |
2283 | 2371 | console.log($rootScope.contentNotesForSaveCB); |
2284 | 2372 | |
2285 | 2373 | //$scope.windowDataforCB = { |
2286 | - //slideId: currentId,//SlideNo, | |
2287 | - //currentWindowId: windowId, | |
2288 | - //mType: windowData.mType, | |
2289 | - //containsCapturedContent: windowData.containsCapturedContent, | |
2290 | - | |
2291 | - //textVisible: checkVisiblity//windowData.textVisible, | |
2292 | - //anatomyTitle: windowData.currentViewTitle, | |
2293 | - //horizontalScroll: windowData.scrollPosition.horizontal + 'px', | |
2294 | - //verticalScroll: windowData.scrollPosition.vertical + 'px', | |
2295 | - //imageId: windowData.imageId,//N | |
2296 | - //maximised: windowData.maximised,//Not Found | |
2297 | - //minimised: windowData.minimised,//Not Found | |
2298 | - //id: windowData.id, | |
2299 | - //size: windowData.size, | |
2300 | - //position: windowData.position, | |
2301 | - //position: { | |
2302 | - // top: $rootScope.jsPanelTop, | |
2303 | - // left: $rootScope.jsPanelLeft, | |
2304 | - //}, | |
2305 | - | |
2306 | - //size: { | |
2307 | - // width: $rootScope.jsPanelWidth, | |
2308 | - // height: $rootScope.jsPanelHeight | |
2309 | - //}, | |
2310 | - //contextMenu: windowData.contextMenu, | |
2311 | - //annotationData: windowData.annotationData | |
2312 | - | |
2374 | + //slideId: currentId,//SlideNo, | |
2375 | + //currentWindowId: windowId, | |
2376 | + //mType: windowData.mType, | |
2377 | + //containsCapturedContent: windowData.containsCapturedContent, | |
2378 | + | |
2379 | + //textVisible: checkVisiblity//windowData.textVisible, | |
2380 | + //anatomyTitle: windowData.currentViewTitle, | |
2381 | + //horizontalScroll: windowData.scrollPosition.horizontal + 'px', | |
2382 | + //verticalScroll: windowData.scrollPosition.vertical + 'px', | |
2383 | + //imageId: windowData.imageId,//N | |
2384 | + //maximised: windowData.maximised,//Not Found | |
2385 | + //minimised: windowData.minimised,//Not Found | |
2386 | + //id: windowData.id, | |
2387 | + //size: windowData.size, | |
2388 | + //position: windowData.position, | |
2389 | + //position: { | |
2390 | + // top: $rootScope.jsPanelTop, | |
2391 | + // left: $rootScope.jsPanelLeft, | |
2392 | + //}, | |
2393 | + | |
2394 | + //size: { | |
2395 | + // width: $rootScope.jsPanelWidth, | |
2396 | + // height: $rootScope.jsPanelHeight | |
2397 | + //}, | |
2398 | + //contextMenu: windowData.contextMenu, | |
2399 | + //annotationData: windowData.annotationData | |
2400 | + | |
2313 | 2401 | //}; |
2314 | 2402 | |
2315 | 2403 | } |
2316 | 2404 | |
2317 | - $scope.saveAAWindowActivity = function (singleWindowObj) { | |
2318 | - findKeyForChange($rootScope.contentNotesForSaveCB, current_id); | |
2319 | - if ($rootScope.AAWindowData.length > 0) { | |
2320 | - for (var j = 0; j < $scope.setWinDataToArray.length;) { | |
2321 | - for (var i = 0; i < $rootScope.AAWindowData.length; i++) { | |
2322 | - j++; | |
2323 | - if ($scope.setWinDataToArray[j].mType == $rootScope.AAWindowData[i].currentViewTitle) { | |
2324 | - | |
2325 | - $scope.setWinDataToArray[j].windowTitle = $rootScope.AAWindowData[i].currentViewTitle; | |
2326 | - $scope.setWinDataToArray[j].hideAllPins = $rootScope.AAWindowData[i].isHidePinBtnClicked; | |
2327 | - //$scope.setWinDataToArray[j].selectedCallouts = $rootScope.AAWindowData[i].currentViewTitle; | |
2328 | - //$scope.setWinDataToArray[j].annotationData = $rootScope.AAWindowData[i].currentViewTitle; | |
2329 | - //$scope.setWinDataToArray[j].minimised = $rootScope.AAWindowData[i].currentViewTitle; | |
2330 | - //$scope.setWinDataToArray[j].scrollPosition = $rootScope.AAWindowData[i].currentViewTitle; | |
2331 | - //$scope.setWinDataToArray[j].selectedStructureID = $rootScope.AAWindowData[i].currentViewTitle; | |
2332 | - //$scope.setWinDataToArray[j].maximised = $rootScope.AAWindowData[i].currentViewTitle; | |
2333 | - //$scope.setWinDataToArray[j].size = $rootScope.AAWindowData[i].currentViewTitle; | |
2334 | - //$scope.setWinDataToArray[j].id = $rootScope.AAWindowData[i].currentViewTitle; | |
2335 | - //$scope.setWinDataToArray[j].hideCallOuts = $rootScope.AAWindowData[i].currentViewTitle; | |
2336 | - //$scope.setWinDataToArray[j].scaleIndex = $rootScope.AAWindowData[i].currentViewTitle; | |
2337 | - //$scope.setWinDataToArray[j].bodySystemId = $rootScope.AAWindowData[i].currentViewTitle; | |
2338 | - //$scope.setWinDataToArray[j].windowListId = $rootScope.AAWindowData[i].currentViewTitle; | |
2339 | - //$scope.setWinDataToArray[j].imageId = $rootScope.AAWindowData[i].imageId; | |
2340 | - //$scope.setWinDataToArray[j].position = $rootScope.AAWindowData[i].currentViewTitle; | |
2341 | - //$scope.setWinDataToArray[j].mType = $rootScope.AAWindowData[i].currentViewTitle; | |
2342 | - //$scope.setWinDataToArray[j].containsCapturedContent = $rootScope.AAWindowData[i].currentViewTitle; | |
2343 | - //$scope.setWinDataToArray[j].selectedPins = $rootScope.AAWindowData[i].currentViewTitle; | |
2344 | - //$scope.setWinDataToArray[j].contextMenu = $rootScope.AAWindowData[i].currentViewTitle; | |
2345 | - } | |
2346 | - | |
2347 | - } | |
2348 | - | |
2349 | - } | |
2405 | + $scope.updateWindowsContentForSaveCBTest = function (currentId) { | |
2406 | + | |
2407 | + //$scope.saveDAWindowActivity(); | |
2408 | + //$scope.saveAAWindowActivity(currentId); | |
2409 | + $scope.saveCIWindowActivity(currentId); | |
2410 | + //$scope.saveCAWindowActivity(); | |
2411 | + //$scope.save3DWindowActivity(); | |
2412 | + //$scope.savePicWindowActivity($scope.windowDataforCB); | |
2413 | + if ($scope.updatedWindowListForSaveCB.length > 0) { | |
2414 | + findKeyForChange($rootScope.contentNotesForSaveCB, currentId); | |
2415 | + $scope.selectedKey.windows.window = []; | |
2416 | + for (var s = 0; s < $scope.updatedWindowListForSaveCB.length; s++) { | |
2417 | + var arrToStrWinObj = JSON.stringify($scope.updatedWindowListForSaveCB[s]); | |
2418 | + $scope.selectedKey.windows.window.push(arrToStrWinObj); | |
2419 | + } | |
2350 | 2420 | } |
2351 | - | |
2352 | - } | |
2353 | - | |
2354 | - //$scope.saveAAWindowActivity = function (windowObjForSelectedSlide) { | |
2355 | - // findKeyForChange($rootScope.contentNotesForSaveCB, current_id); | |
2356 | - // if (windowObjForSelectedSlide.length > 0) { | |
2357 | - // for (var i = 0; i < windowObjForSelectedSlide.length; i++) { | |
2358 | - // if ($scope.selectedKey.length > 0) { | |
2359 | - // for (var j = 0; j < $scope.selectedKey.windows.window.length; j++) { | |
2360 | - // if (windowObjForSelectedSlide[i].mType == "ATLAS_ANATOMY") {//$scope.selectedKey[j].mType | |
2361 | - // $scope.selectedKey.windows.window[j] = ""; | |
2362 | - // $scope.selectedKey.windows.window[j] = windowObjForSelectedSlide[i]; | |
2363 | - // } | |
2364 | - // break; | |
2365 | - // } | |
2366 | - // } | |
2367 | - | |
2368 | - // } | |
2369 | - // } | |
2370 | - // $scope.selectedKey.windows.window = ""; | |
2371 | - //} | |
2421 | + $scope.updatedWindowListForSaveCB = []; | |
2422 | + console.log($rootScope.contentNotesForSaveCB); | |
2423 | + } | |
2424 | + | |
2372 | 2425 | |
2373 | 2426 | //$rootScope.updateWindowsContentForSaveCB = function (windowData) { |
2374 | 2427 | |
... | ... | @@ -2445,162 +2498,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
2445 | 2498 | |
2446 | 2499 | // }); |
2447 | 2500 | |
2448 | - //} | |
2449 | - | |
2450 | - | |
2451 | - | |
2452 | - | |
2453 | - $scope.addSectionForSaveDraft = function (currentid, AddSecionId, parentid) { | |
2454 | - | |
2455 | - if ($rootScope.structureObjForSaveCB.length == 0) { | |
2456 | - //$rootScope.structureObjForSaveCB = $rootScope.structure;// only Tree Array | |
2457 | - //$rootScope.structureObjForSaveCB = $rootScope.stru.slideshow.presentation.structure.structure; | |
2458 | - $rootScope.structureObjForSaveCB = $rootScope.stru.structure.structure; | |
2459 | - } | |
2460 | - //$rootScope.structureObjForSaveCB = $rootScope.stru;//All json Structure with tree array | |
2461 | - //$rootScope.structureObjForSaveCB = $rootScope.structure;// only Tree Array | |
2462 | - //$rootScope.updateSaveDraftDynamicTest = []; | |
2463 | - | |
2464 | - traverseTreeSelectedSingleObj($rootScope.stru, currentid); | |
2465 | - traverse($rootScope.stru, currentid); | |
2466 | - if (currentid == $rootScope.cbTreeFirstID) { | |
2467 | - $rootScope.selectedNodeSingle.push( | |
2468 | - { | |
2469 | - //"structure": { | |
2470 | - "structure": [ | |
2471 | - //{ | |
2472 | - // "_label": "NEW ", | |
2473 | - // "_id": AddSlideId, | |
2474 | - // "_isRoot": "false", | |
2475 | - // "_isBranch": "false", | |
2476 | - // "_isLocked": "false" | |
2477 | - //} | |
2478 | - ], | |
2479 | - "_label": "New Section", | |
2480 | - "_id": AddSecionId, | |
2481 | - "_isRoot": "false", | |
2482 | - "_isBranch": "true", | |
2483 | - "_isLocked": "false" | |
2484 | - //} | |
2485 | - | |
2486 | - }); | |
2487 | - | |
2488 | - $rootScope.structureObjForSaveCB.push( | |
2489 | - { | |
2490 | - | |
2491 | - "structure": [ | |
2492 | - ], | |
2493 | - "_label": "New Section", | |
2494 | - "_id": AddSecionId, | |
2495 | - "_isRoot": "false", | |
2496 | - "_isBranch": "true", | |
2497 | - "_isLocked": "false" | |
2498 | - | |
2499 | - }); | |
2500 | - } | |
2501 | - //else if (currentid == parentid && $rootScope.cbTreeFirstID != parentid) { | |
2502 | - // $rootScope.selectedNodeSingle.push( | |
2503 | - // { | |
2504 | - | |
2505 | - // "structure": [ | |
2506 | - // ], | |
2507 | - // "_label": "New Section", | |
2508 | - // "_id": AddSecionId, | |
2509 | - // "_isRoot": "false", | |
2510 | - // "_isBranch": "true", | |
2511 | - // "_isLocked": "false" | |
2512 | - // }); | |
2513 | - | |
2514 | - // $rootScope.structureObjForSaveCB.push( | |
2515 | - // { | |
2516 | - // "structure": { | |
2517 | - // "structure": [ | |
2518 | - // ], | |
2519 | - // "_label": "New Section", | |
2520 | - // "_id": AddSecionId, | |
2521 | - // "_isRoot": "false", | |
2522 | - // "_isBranch": "true", | |
2523 | - // "_isLocked": "false" | |
2524 | - // } | |
2525 | - // }); | |
2526 | - // } | |
2527 | - else { | |
2528 | - $scope.selectedNodeSingleObj['structure'].push( | |
2529 | - { | |
2530 | - "structure": [ | |
2531 | - ], | |
2532 | - "_label": "New Section", | |
2533 | - "_id": AddSecionId, | |
2534 | - "_isRoot": "false", | |
2535 | - "_isBranch": "true", | |
2536 | - "_isLocked": "false" | |
2537 | - }); | |
2538 | - | |
2539 | - for (var i = 0; i < $rootScope.structureObjForSaveCB.length; i++) { | |
2540 | - if ($rootScope.structureObjForSaveCB[i]._id == currentid) { | |
2541 | - $rootScope.structureObjForSaveCB[i]['structure'] = $scope.selectedNodeSingleObj['structure']; | |
2542 | - } | |
2543 | - } | |
2544 | - } | |
2545 | - // setTimeout(function () { traverseTreeForSetIcons($rootScope.stru, currentid); }, 1500); | |
2546 | - | |
2547 | - } | |
2548 | - | |
2549 | - $scope.addSlideForSaveDraft = function (currentid, AddSlideId, parentid) { | |
2550 | - | |
2551 | - if ($rootScope.structureObjForSaveCB.length == 0) { | |
2552 | - //$rootScope.structureObjForSaveCB = $rootScope.structure;// only Tree Array | |
2553 | - //$rootScope.structureObjForSaveCB = $rootScope.stru.slideshow.presentation.structure.structure; | |
2554 | - $rootScope.structureObjForSaveCB = $rootScope.stru.structure.structure; | |
2555 | - } | |
2556 | - traverseTreeSelectedSingleObj($rootScope.stru, currentid); | |
2557 | - //traverse($rootScope.stru, currentid); | |
2558 | - //Assign object by traverse method $scope.selectedNodeSiblingObjs | |
2559 | - | |
2560 | - //console.log(JSON.stringify($scope.upDateJsonObj)) | |
2561 | - //if (currentid == "-225638207") { | |
2562 | - if (currentid == $rootScope.cbTreeFirstID) { | |
2563 | - $rootScope.selectedNodeSingle.push( | |
2564 | - { | |
2565 | - "_label": "NEW Slide1", | |
2566 | - "_id": AddSlideId, | |
2567 | - "_isRoot": "false", | |
2568 | - "_isBranch": "false", | |
2569 | - "_isLocked": "false" | |
2570 | - }); | |
2571 | - | |
2572 | - $rootScope.structureObjForSaveCB.push({ | |
2573 | - "_label": "NEW Slide1", | |
2574 | - "_id": AddSlideId, | |
2575 | - "_isRoot": "false", | |
2576 | - "_isBranch": "false", | |
2577 | - "_isLocked": "false" | |
2578 | - }); | |
2579 | - //for (var i = 0; i < $rootScope.structureObjForSaveCB.length; i++) { | |
2580 | - // if ($rootScope.structureObjForSaveCB[i]._id == currentid) { | |
2581 | - // $rootScope.structureObjForSaveCB[i] = $rootScope.selectedNodeSingle; | |
2582 | - // } | |
2583 | - //} | |
2584 | - } | |
2585 | - else { | |
2586 | - $scope.selectedNodeSingleObj['structure'].push({ | |
2587 | - "_label": "New Slide", | |
2588 | - "_id": AddSlideId, | |
2589 | - "_isRoot": "false", | |
2590 | - "_isBranch": "false", | |
2591 | - "_isLocked": "false" | |
2592 | - }); | |
2593 | - for (var i = 0; i < $rootScope.structureObjForSaveCB.length; i++) { | |
2594 | - if ($rootScope.structureObjForSaveCB[i]._id == currentid) { | |
2595 | - $rootScope.structureObjForSaveCB[i]['structure'] = $scope.selectedNodeSingleObj['structure']; | |
2596 | - } | |
2597 | - } | |
2598 | - } | |
2599 | - // setTimeout(function () { traverseTreeForSetIcons($rootScope.stru, currentid); }, 3000); | |
2600 | - setTimeout(function () { $("#jstree").jstree(true).set_icon(AddSlideId, "../../../content/images/CB/file.png"); }, 100); | |
2601 | - | |
2602 | - } | |
2603 | - | |
2501 | + //} | |
2604 | 2502 | |
2605 | 2503 | |
2606 | 2504 | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
... | ... | @@ -2473,7 +2473,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
2473 | 2473 | $rootScope.isLoading = true; |
2474 | 2474 | $('#spinner').css('visibility', 'visible'); |
2475 | 2475 | $scope.hideSpeechBubble(windowviewid); |
2476 | - | |
2476 | + $scope.SetAAwindowStoreData(windowviewid, 'isShowBodyWithCBPinData', false); | |
2477 | 2477 | $scope.SetAAwindowStoreData(windowviewid, 'isHidePinBtnClicked', true); |
2478 | 2478 | |
2479 | 2479 | var aaPinData = $scope.GetAAwindowStoreData(windowviewid,'aaPinData'); |
... | ... | @@ -2504,7 +2504,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
2504 | 2504 | $rootScope.isLoading = true; |
2505 | 2505 | $('#spinner').css('visibility', 'visible'); |
2506 | 2506 | $scope.SetAAwindowStoreData(windowviewid,'isHidePinBtnClicked',false); |
2507 | - //$scope.updateWindowsContentForSaveCB(); | |
2507 | + | |
2508 | 2508 | var selectedSystemName=$scope.GetAAwindowStoreData(windowviewid,'selectedSystemName'); |
2509 | 2509 | if (selectedSystemName != null && selectedSystemName != undefined) { |
2510 | 2510 | var selectedSystemPinData=$scope.GetAAwindowStoreData(windowviewid,'selectedSystemPinData'); |
... | ... | @@ -2526,7 +2526,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
2526 | 2526 | } |
2527 | 2527 | } |
2528 | 2528 | |
2529 | - | |
2529 | + $scope.SetAAwindowStoreData(windowviewid, 'isShowBodyWithCBPinData', true); | |
2530 | 2530 | }; |
2531 | 2531 | |
2532 | 2532 | $scope.showSelectedPins = function (windowviewid) { |
... | ... | @@ -2538,7 +2538,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
2538 | 2538 | $scope.DisableUI(); |
2539 | 2539 | $rootScope.isLoading = true; |
2540 | 2540 | $('#spinner').css('visibility', 'visible'); |
2541 | - | |
2541 | + $scope.SetAAwindowStoreData(windowviewid, 'isShowBodyWithCBPinData', false); | |
2542 | 2542 | $scope.SetAAwindowStoreData(windowviewid,'isHidePinBtnClicked',false); |
2543 | 2543 | var selectedSystemName=$scope.GetAAwindowStoreData(windowviewid,'selectedSystemName'); |
2544 | 2544 | if (selectedSystemName != null && selectedSystemName != undefined) { |
... | ... | @@ -2975,7 +2975,7 @@ function hidePins(event) { |
2975 | 2975 | rootScope.$apply(function () { |
2976 | 2976 | rootScope.hidePins(windowviewid); |
2977 | 2977 | //Calling for Save CB Window data |
2978 | - rootScope.updateWindowsContentForSaveCB(); | |
2978 | + //rootScope.updateWindowsContentForSaveCB(); | |
2979 | 2979 | }); |
2980 | 2980 | |
2981 | 2981 | ... | ... |