From a11203d25e93819252889a48f04044b31a2000be Mon Sep 17 00:00:00 2001 From: Sandeep Kumar Date: Mon, 24 Feb 2020 10:45:15 +0530 Subject: [PATCH] Changes for Min Max JS Panel for SaveCB --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js | 10 ++++++---- 400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js | 14 ++++++++------ 400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js | 14 ++++++++------ 400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js | 328 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------------------------------------------------------------------------- 400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js | 2 +- 400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------- 400-SOURCECODE/AIAHTML5.Web/app/views/CBuild/CBuild-view.html | 3 ++- 400-SOURCECODE/AIAHTML5.Web/app/widget/TopMenu.html | 8 ++++---- 8 files changed, 320 insertions(+), 155 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js index 41afb06..d98479b 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js @@ -403,14 +403,16 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location }); //$scope.jsPanel3D.status = "minimized"; - var max = $scope.Get3DwindowStoreData(windowviewid, 'maximised'); - var min = $scope.Get3DwindowStoreData(windowviewid, 'minimised'); - if ($scope.jsPanel3D.status === "maximized" && max) { + //var max = $scope.Get3DwindowStoreData(windowviewid, 'maximised'); + //var min = $scope.Get3DwindowStoreData(windowviewid, 'minimised'); + var isMaximize = $scope.ThreeDOpenInOtherModules.maximised; + var isMinimize = $scope.ThreeDOpenInOtherModules.minimised; + if (isMaximize) { $scope.jsPanel3D.maximize(); $scope.Set3DwindowStoreData(windowviewid, 'maximised', true); $scope.Set3DwindowStoreData(windowviewid, 'minimised', false); } - else if ($scope.jsPanel3D.status === "minimized" && min) { + else if (isMinimize) { $scope.jsPanel3D.minimize(); $scope.Set3DwindowStoreData(windowviewid, 'minimised', true); $scope.Set3DwindowStoreData(windowviewid, 'maximised', false); diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js index e1124d8..e482996 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js @@ -847,7 +847,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout theme: 'success', currentController: 'CAController', parentSlug: $scope.GetCAwindowStoreData(windowviewid, 'parentSlugName'), - content: '' + + content: '' + '
' + '
', title: $rootScope.getLocalStorageValue("currentViewTitle"), position: { @@ -860,14 +860,16 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout }); - var max = $scope.GetCIwindowStoreData(windowviewid, 'maximised'); - var min = $scope.GetCIwindowStoreData(windowviewid, 'minimised'); - if ($scope.jsPanelCI.status === "maximized" && max) { + //var max = $scope.GetCIwindowStoreData(windowviewid, 'maximised'); + //var min = $scope.GetCIwindowStoreData(windowviewid, 'minimised'); + var isMaximize = $scope.ciOpenInOtherModules.maximised; + var isMinimize = $scope.ciOpenInOtherModules.minimised; + if (isMaximize) { $scope.jsPanelCI.maximize(); $scope.SetCIwindowStoreData(windowviewid, 'maximised', true); $scope.SetCIwindowStoreData(windowviewid, 'minimised', false); } - else if ($scope.jsPanelCI.status === "minimized" && min) { + else if (isMinimize) { $scope.jsPanelCI.minimize(); $scope.SetCIwindowStoreData(windowviewid, 'minimised', true); $scope.SetCIwindowStoreData(windowviewid, 'maximised', false); @@ -1151,7 +1153,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout }] ); - function GetTextVisibity(event) { + function GetTextVisibityCI(event) { var scope = angular.element(document.getElementById("CIView")).scope(); // var len = (event.target.id).split("_").length; diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js index 32752f0..2b9839e 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js @@ -22,6 +22,15 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ //alert("scroll"); } + //$scope.showDeleteEditorModel = function () { + // document.getElementById('cbModelDeleteBackground').style.display = "block"; + // document.getElementById('cbModelDeleteEditorId').style.display = "block"; + //} + $rootScope.closeEditorModel = function () { + document.getElementById('cbModelDeleteBackground').style.display = "none"; + document.getElementById('cbModelDeleteEditorId').style.display = "none"; + } + angular.element(document).ready(function (e) { $("#sidebar-wrapper").on('click', function (event) { @@ -31,11 +40,11 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ }); // close all selected open panel in CB - $(document).on("click", " .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () { + $(document).on("click", " .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () { // close in case of Curriculum Builder var id = $(event.target).parent().parent().parent().parent().attr('id'); - //$rootScope.saveCIWindowActivity("", "");//Calling for Save widodow data for Save Cb + if (id == "CBTinyMCEPanel") { tinymce.execCommand('mceRemoveControl', true, 'CBTextArea'); tinymce.execCommand('mceFocus', true, 'CBTextArea'); @@ -63,6 +72,8 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ }); + + $scope.CBDisableUI = function () { $rootScope.isLoading = true; @@ -97,6 +108,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ } }); + $rootScope.firstSelectedNodeId = null; //load json data $scope.loadCurriculumBuiderData = function () { @@ -179,101 +191,133 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ } - $rootScope.OpenExistingCurriculum = function (file_Name) { - - //$window.location.reload(); - $("#opencbview").trigger("click"); - var fileupload = document.getElementById("opencbview"); + + $rootScope.OpenExistingCurriculum = function (event) { + + //OPen for diffrent html page + //$location.url(); + //$location.path(); + //if ($location.url() == "/curriculum-builder") { + // event.toElement.href = "http://localhost/curriculum-builder"; + //} + //else { + // if ($location.url() == "/curriculum-builder-detail") { + // event.toElement.href = "http://localhost/curriculum-builder-detail"; + // } + //} + + $("#openCBJsonFile").trigger("click"); + var fileupload = document.getElementById("openCBJsonFile"); fileupload.onchange = function () { - // $route.reload(); - //$location.url("/curriculum-builder"); - //$location.path("/curriculum-builder"); - - //var name = document.getElementById("opencbview").files[0].name; - - //$scope.CBDisableUI(); - $rootScope.AutherName = ""; - $rootScope.summary = ""; - $rootScope.FileTitle = "Sandy File"; - $('#modal-CurBuilder').css("display", "block"); - $("#CurBuilderbackground").css("display", "block") - $scope.getJsonFileFromLocal(); + var fileId, file, objFileRead; + if (typeof window.FileReader !== 'function') { + alert("The file API isn't supported on this browser yet."); + return; + } + fileId = document.getElementById('openCBJsonFile'); + if (!fileId) { + alert("File couldn't find the element."); + } + else if (!fileId.files) { + alert("This browser doesn't seem to support the `files` property of file inputs."); + } + else if (!fileId.files[0]) { + alert("Please select a file before clicking 'Load'"); + } + else { + file = fileId.files[0]; + var extension = file.name.split(".")[1]; + if (file.type == "application/json" && extension == "json") { + objFileRead = new FileReader(); + objFileRead.onload = receivedFile; + objFileRead.readAsText(file); + } else { + alert("Please select only Saved Curriculum Builder Json file!"); + } + + } + function receivedFile(e) { + //let lines = e.target.result; + var jsonData = JSON.parse(e.target.result); + localStorage.setItem("cbJsonDataObject", JSON.stringify(jsonData)); + $rootScope.cbJsonData = ""; $rootScope.cbDynamicJsonData = ""; + $rootScope.cbJsonData = JSON.parse(e.target.result); + $rootScope.cbDynamicJsonData = JSON.parse(e.target.result); + $rootScope.cbTreeFirstLabel = $rootScope.cbJsonData.slideshow.presentation.structure._label; + $rootScope.getCBsummary(); + $scope.CBEnableUI(); - //var fileName = fileupload.value.replace('C:\\fakepath\\', '');; - //alert(fileName); + $rootScope.AutherName = ""; + $rootScope.summary = ""; + $rootScope.FileTitle = $rootScope.cbTreeFirstLabel; - //switch ($location.url()) { - // case '/curriculum-builder-detail': - // $location.url('/curriculum-builder'); - // break; - //} - // $scope.fileName = file_Name; + $timeout(function () { + $('#modal-CurBuilder').css("display", "block"); + $("#CurBuilderbackground").css("display", "block"); + //$scope.openCurriculumDetail(); + }, 200); + + } + }; - - - // $http({ - // method: 'GET', - // url: '' + fileName - // }).success(function (data) { - - // localStorage.setItem("cbJsonDataObject", JSON.stringify(data)); - // $rootScope.cbJsonData = JSON.parse(localStorage.getItem("cbJsonDataObject")); - // $rootScope.cbDynamicJsonData = data; - - // $rootScope.getCBsummary(); + } - // $scope.openCurriculumDetailtest(); - // }) - //.error(function (data, status, headers, config) { - // console.log(data); - // }); - }; - } + //$scope.getJsonFileFromLocal = function loadFile() { + // var fileId, file, fr; + // if (typeof window.FileReader !== 'function') { + // alert("The file API isn't supported on this browser yet."); + // return; + // } + // fileId = document.getElementById('opencbview'); + // if (!fileId) { + // alert("File couldn't find the element."); + // } + // else if (!fileId.files) { + // alert("This browser doesn't seem to support the `files` property of file inputs."); + // } + // else if (!fileId.files[0]) { + // alert("Please select a file before clicking 'Load'"); + // } + // else { + // file = fileId.files[0]; + // fr = new FileReader(); + // fr.onload = receivedText; + // fr.readAsText(file); + + // } - $scope.getJsonFileFromLocal = function loadFile() { - var fileId, file, fr; + // function receivedText(e) { + // let lines = e.target.result; - if (typeof window.FileReader !== 'function') { - alert("The file API isn't supported on this browser yet."); - return; - } - fileId = document.getElementById('opencbview'); - if (!fileId) { - alert("File couldn't find the element."); - } - else if (!fileId.files) { - alert("This browser doesn't seem to support the `files` property of file inputs."); - } - else if (!fileId.files[0]) { - alert("Please select a file before clicking 'Load'"); - } - else { - file = fileId.files[0]; - fr = new FileReader(); - fr.onload = receivedText; - fr.readAsText(file); - } + // var newArr = JSON.parse(lines); + // localStorage.setItem("cbJsonDataObject", JSON.stringify(newArr)); + // $rootScope.cbJsonData = ""; $rootScope.cbDynamicJsonData = ""; + // $rootScope.cbJsonData = JSON.parse(lines); + // $rootScope.cbDynamicJsonData = JSON.parse(lines); + // $rootScope.cbTreeFirstLabel = $rootScope.cbJsonData.slideshow.presentation.structure._label; - function receivedText(e) { - let lines = e.target.result; + // $rootScope.getCBsummary(); + // $scope.CBEnableUI(); - var newArr = JSON.parse(lines); - localStorage.setItem("cbJsonDataObject", JSON.stringify(newArr)); - $rootScope.cbJsonData = ""; $rootScope.cbDynamicJsonData = ""; - $rootScope.cbJsonData = JSON.parse(lines); - $rootScope.cbDynamicJsonData = JSON.parse(lines); - $rootScope.getCBsummary(); - $scope.CBEnableUI(); + // $rootScope.AutherName = ""; + // $rootScope.summary = ""; + // $rootScope.FileTitle = $rootScope.cbTreeFirstLabel; + + // $timeout(function () { + // $('#modal-CurBuilder').css("display", "block"); + // $("#CurBuilderbackground").css("display", "block"); + // }, 3000); - $scope.openCurriculumDetail(); - } - } + // //$scope.loadSlideShowXmldata(); + // //$scope.openCurriculumDetail(); + // } + //} //$rootScope.OpenExistingCurriculum = function (file_Name) { @@ -1491,7 +1535,76 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ } $rootScope.saveCurricullam = function (file_Name) { - $scope.exportToFile(file_Name); + + //$scope.exportToFile(file_Name); + + var cbCurrentId = document.getElementById('cbSelect').value; + if ($rootScope.structureObjForSaveCB.length == 0) { + //$rootScope.structureObjForSaveCB = $rootScope.structure;// only Tree Array + //$rootScope.structureObjForSaveCB = $rootScope.stru.slideshow.presentation.structure.structure; + $rootScope.structureObjForSaveCB = $rootScope.stru.structure.structure; + } + if ($rootScope.contentNotesForSaveCB.length == 0) { + //$rootScope.contentNotesForSaveCB = $rootScope.cbJsonData.slideshow.content.element; + $rootScope.contentNotesForSaveCB = $rootScope.cbDynamicContents;//Assign Dnamic Contents + } + $rootScope.updatedContentFromEditor(cbCurrentId); + + $scope.updateWindowsContentForSaveCB(cbCurrentId); + + $rootScope.dynamicUpdatedJsonForSaveCB = + { + "slideshow": { + "presentation": { + "structure": { + "structure": //[ + + $rootScope.structureObjForSaveCB, + //], + "_label": $rootScope.cbTreeFirstLabel, + "_id": $rootScope.cbTreeFirstID, + "_isRoot": "true", + "_isBranch": "true", + "_isLocked": "false" + }, + "_anchor": "true", + "_window_position": "6,10", + "_window_size": "828,453" // Apply Dynamic + }, + "content": { + "element": //[ + + $rootScope.contentNotesForSaveCB, + //] + } + } + + }; + + $scope.slideshow = $rootScope.dynamicUpdatedJsonForSaveCB; + $scope.filename = "SandySaveCB.json"; + var filename = $scope.filename; + var blob = new Blob([angular.toJson($rootScope.dynamicUpdatedJsonForSaveCB, true)], { type: 'text/text' }); + if (window.navigator && window.navigator.msSaveOrOpenBlob) { + window.navigator.msSaveOrOpenBlob(blob, filename); + } + else { + document.execCommand("SaveAs", true, filename); + //$("#bo").document.execCommand("SaveAs", true, filename); + //angular.element(document.execCommand("SaveAs", false, filename)).scope(); + + var event = document.createEvent('MouseEvents'), + saveElement = document.createElement('a'); + saveElement.download = filename; + saveElement.href = window.URL.createObjectURL(blob); + saveElement.dataset.downloadurl = ['text/json', saveElement.download, saveElement.href].join(':'); + event.initEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); + saveElement.dispatchEvent(event); + //window.URL.revokeObjectURL(url); // clean the url.createObjectURL resource + } + $rootScope.dynamicUpdatedJsonForSaveCB = ""; + //$rootScope.contentNotesForSaveCB = []; + //$rootScope.structureObjForSaveCB = []; } @@ -1636,17 +1749,20 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ if (window.navigator && window.navigator.msSaveOrOpenBlob) { window.navigator.msSaveOrOpenBlob(blob, filename); } - else { - //document.execCommand("SaveAs", true, filename); - //angular.element(document.execCommand("SaveAs", false, filename)).scope(); - var e = document.createEvent('MouseEvents'), - a = document.createElement('a'); - a.download = filename; - a.href = window.URL.createObjectURL(blob); - a.dataset.downloadurl = ['text/json', a.download, a.href].join(':'); - e.initEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); - a.dispatchEvent(e); - window.URL.revokeObjectURL(url); // clean the url.createObjectURL resource + else { + + $(document).execCommand("SaveAs", true, filename); + document.execCommand("SaveAs", true, filename); + angular.element(document.execCommand("SaveAs", false, filename)).scope(); + + //var e = document.createEvent('MouseEvents'), + //a = document.createElement('a'); + // a.download = filename; + //a.href = window.URL.createObjectURL(blob); + //a.dataset.downloadurl = ['text/json', a.download, a.href].join(':'); + //e.initEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); + //a.dispatchEvent(e); + //window.URL.revokeObjectURL(url); // clean the url.createObjectURL resource } $rootScope.dynamicUpdatedJsonForSaveCB = ""; //$rootScope.contentNotesForSaveCB = []; @@ -1892,7 +2008,12 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ $scope.loadContentOfSelectedSlide = function (id) { // alert("Id" + id); console.log("id= " + id) - var content = $rootScope.cbJsonData.slideshow.content.element; + //var content = $rootScope.cbJsonData.slideshow.content.element; + + if ($rootScope.contentNotesForSaveCB.length == 0) { + $rootScope.contentNotesForSaveCB = $rootScope.cbDynamicContents; + } + var content = $rootScope.contentNotesForSaveCB; var contenctForSelectedSlide = new jinqJs() .from(content) @@ -2384,7 +2505,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ windowTitle: $rootScope.CAWindowData[i].currentViewTitle, maximised: $rootScope.CAWindowData[i].maximised, mType: $rootScope.CAWindowData[i].moduleName, - id: $rootScope.CAWindowData[i].imageId, + id: $rootScope.CAWindowData[i].imageId,//Add id in CA.js scrollFlvPosition: { vertical: 0, horizontal: 0 },// N windowListId: 0 //$rootScope.CAWindowData[i] // N }); @@ -2478,17 +2599,17 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ horizontal: $rootScope.AAWindowData[i].horizontalScroll }, selectedStructureID: 0,//N - selectedPins: $rootScope.AAWindowData[i].clickedPins, + selectedPins: $rootScope.AAWindowData[i].selectedPins, maximised: $rootScope.AAWindowData[i].maximised, size: { width: $rootScope.AAWindowData[i].width, height: $rootScope.AAWindowData[i].height }, - id: $rootScope.AAWindowData[i].imageId, + id: $rootScope.AAWindowData[i].id, showSelectedPins: $rootScope.AAWindowData[i].isShowSelectedSystemPinsClicked, hideCallOuts: false,//N showAllPins: $rootScope.AAWindowData[i].isShowBodyWithCBPinData,//N - scaleIndex: 0,//N + scaleIndex: $rootScope.AAWindowData[i].sliderVal, bodySystemId: $rootScope.AAWindowData[i].SelectedSystemID, windowListId: "0",//N imageId: $rootScope.AAWindowData[i].imageId, @@ -2584,11 +2705,11 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ $scope.updateWindowsContentForSaveCB = function (currentId) { - //$scope.saveDAWindowActivity(); - //$scope.saveAAWindowActivity(currentId); - //$scope.saveCIWindowActivity(currentId); - //$scope.saveCAWindowActivity(); - //$scope.save3DWindowActivity(); + //$scope.saveDAWindowActivity(currentId); + $scope.saveAAWindowActivity(currentId); + $scope.saveCIWindowActivity(currentId); + $scope.saveCAWindowActivity(currentId); + $scope.save3DWindowActivity(currentId); //$scope.savePicWindowActivity($scope.windowDataforCB); if ($scope.updatedWindowListForSaveCB.length > 0) { findKeyForChange($rootScope.contentNotesForSaveCB, currentId); @@ -2602,7 +2723,6 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ console.log($rootScope.contentNotesForSaveCB); } - //$rootScope.updateWindowsContentForSaveCB = function (windowData) { // //findKeyForChange($scope.windowDataforCB, keyname) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js index e119733..ed11148 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js @@ -1389,7 +1389,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A $rootScope.PrintViewer = "PrintViewer"; $rootScope.newCurriculum = "newCurriculum"; - $rootScope.openCurriculum = "openCurriculum"; + $rootScope.openCurriculum = ""; $rootScope.saveCurriculam = "saveCurriculam"; $rootScope.disableSubMenu = "disableSubMenu"; diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js index fd516ce..2e5553e 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js @@ -96,7 +96,9 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou 'width': 0, 'height': 0, 'minimised': false, - 'maximised': false + 'maximised': false, + 'id': 0, + 'selectedPins': [] }); @@ -150,7 +152,9 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou 'width': 0, 'height': 0, 'minimised': false, - 'maximised': false + 'maximised': false, + 'id': 0, + 'selectedPins': [] }); @@ -454,7 +458,14 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou localStorage.setItem("currentViewTitle", anatomyTitle); var systemId = $scope.aaOpenInOtherModules.selectedBodysystemId; - $scope.SetAAwindowStoreData(windowviewid,'SelectedSystemID',systemId); + $scope.SetAAwindowStoreData(windowviewid, 'SelectedSystemID', systemId); + + // set zoom level And SelectedPins + $scope.SetAAwindowStoreData(windowviewid, 'sliderVal', $scope.aaOpenInOtherModules.zoomLevel); + + //var selectedPins = $scope.GetAAwindowStoreData(windowviewid, 'selectedPins'); + //selectedPins.push($scope.aaOpenInOtherModules.selectedPins); + //$scope.SetAAwindowStoreData(windowviewid, 'selectedPins', selectedPins); // note:: in few json like "articulation" imageId as same id // get wrong detail by imageId @@ -464,7 +475,8 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou // serial no of imageid var sId = $scope.aaOpenInOtherModules.id; - + + $scope.SetAAwindowStoreData(windowviewid, 'id', sId); $scope.SetAAwindowStoreData(windowviewid,'parentSlugName',($location.url()).replace('/', '')); @@ -583,14 +595,16 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $('#spinner').css('visibility', 'visible'); //Perform Activity as per SaveCb JSPanel - var max = $scope.GetAAwindowStoreData(windowviewid, 'maximised'); - var min = $scope.GetAAwindowStoreData(windowviewid, 'minimised'); - if ($scope.jsPanelAA.status === "maximized" && max) { + //var max = $scope.GetAAwindowStoreData(windowviewid, 'maximised'); + //var min = $scope.GetAAwindowStoreData(windowviewid, 'minimised'); + var isMaximize = $scope.aaOpenInOtherModules.maximised; + var isMinimize = $scope.aaOpenInOtherModules.minimised; + if (isMaximize) { $scope.jsPanelAA.maximize(); $scope.SetAAwindowStoreData(windowviewid, 'maximised', true); $scope.SetAAwindowStoreData(windowviewid, 'minimised', false); } - else if ($scope.jsPanelAA.status === "minimized" && min) { + else if (isMinimize) { $scope.jsPanelAA.minimize(); $scope.SetAAwindowStoreData(windowviewid, 'minimised', true); $scope.SetAAwindowStoreData(windowviewid, 'maximised', false); @@ -677,7 +691,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou //6. Show all pins on AA opened item $scope.showAllPins(windowviewid); - + //$scope.showSelectedPins(windowviewid); $timeout(function () { //7. Highlight all system body list in left side @@ -705,11 +719,11 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $scope.Setslider = function (windowviewid) { - + var zoomLevel = $scope.GetAAwindowStoreData(windowviewid,'sliderVal'); $("#Vslider_" + windowviewid).slider({ min: 25, max: 100, - value: 100, + value: zoomLevel, range: "min", orientation: "vertical", slide: function (event, ui) { @@ -717,18 +731,21 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou var targetid = event.target.id; var len= (targetid).split("_").length; var windviewid = (targetid).split("_")[len-1]; - changeThumbnailSize(event, ui,windviewid); + changeThumbnailSize(event, ui.value, windviewid); } - }//, + } + //, // change: function (event, ui) { - // changeThumbnailSize(event, ui); + // } - }) + }) .slider("pips", { rest: "label", step: "15" }); + + changeThumbnailSize(event, zoomLevel, windowviewid); } @@ -781,21 +798,21 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou } - function changeThumbnailSize(event, ui,windowviewid) { + function changeThumbnailSize(event, value,windowviewid) { var scope = angular.element(document.getElementById("aaBodyView")).scope(); scope.$apply(function () { - $scope.SetAAwindowStoreData(windowviewid,'sliderVal',ui.value) + $scope.SetAAwindowStoreData(windowviewid,'sliderVal',value) scope.removeSpeechBubble(windowviewid); var relativeWidth = 0; var relativeHeight = 0; - if (ui.value == 25 || ui.value == 40 || ui.value == 55 || ui.value == 70 || ui.value == 85 || ui.value == 100) { + if (value == 25 || value == 40 || value == 55 || value == 70 || value == 85 || value == 100) { $("#listManager").css("display", "none"); $("#optionsListManagerTab").removeClass("active"); - relativeWidth = (scope.ViewImageWidth)*(ui.value/100); - relativeHeight = (scope.ViewImageHeight)*(ui.value/100); - // scope.sliderPercentValue = (ui.value/100); - $scope.SetAAwindowStoreData(windowviewid,'sliderPercentValue',(ui.value/100)); + relativeWidth = (scope.ViewImageWidth)*(value/100); + relativeHeight = (scope.ViewImageHeight)*(value/100); + // scope.sliderPercentValue = (value/100); + $scope.SetAAwindowStoreData(windowviewid,'sliderPercentValue',(value/100)); $("#modItemImage_"+windowviewid).css("width", relativeWidth + "px"); $("#modItemImage_"+windowviewid).css("height", relativeHeight + "px"); @@ -914,17 +931,24 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou var clickedPins=$scope.GetAAwindowStoreData(windowviewid,'clickedPins'); var activePinArray=$scope.GetAAwindowStoreData(windowviewid,'activePinArray'); - + var selectedPins; for (var i = 0; i < $scope.aaOpenInOtherModules.selectedPins.length; i++) { + + selectedPins = $scope.GetAAwindowStoreData(windowviewid, 'selectedPins'); - var pinid=$scope.aaOpenInOtherModules.selectedPins[i]; + var pinid = $scope.aaOpenInOtherModules.selectedPins[i]; + + selectedPins.push(pinid); + var pinvalue='PinArc_' + pinid; var isFound = jQuery.inArray(pinvalue, activePinArray) if (isFound == -1) { activePinArray.push(pinvalue); clickedPins.push({ 'id': pinid}); } - } + } + + $scope.SetAAwindowStoreData(windowviewid, 'selectedPins', selectedPins); for (var i = 0; i < $scope.aaOpenInOtherModules.selectedCallouts.length; i++) { @@ -1385,7 +1409,8 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou } else { $scope.SetAAwindowStoreData(windowviewid,'clickedPins',[]); - $scope.SetAAwindowStoreData(windowviewid,'activePinArray',[]); + $scope.SetAAwindowStoreData(windowviewid, 'activePinArray', []); + $scope.SetAAwindowStoreData(windowviewid, 'selectedPins', []); } var isHidePinBtnClicked=$scope.GetAAwindowStoreData(windowviewid,'isHidePinBtnClicked'); @@ -2171,7 +2196,8 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou click: function (clickedPin) { if (clickedPin.event.ctrlKey == false) { - $scope.SetAAwindowStoreData(windowviewid,'clickedPins',[]); + $scope.SetAAwindowStoreData(windowviewid, 'clickedPins', []); + $scope.SetAAwindowStoreData(windowviewid, 'selectedPins', []); } var pinID = (clickedPin.name).substring(7, (clickedPin.name).length); var aaPinData = $scope.GetAAwindowStoreData(windowviewid,'aaPinData'); @@ -2620,6 +2646,10 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $scope.showSystemPins = function (seletedSystemPinData, isShowSelectedPins,windowviewid) { if (isShowSelectedPins) { + + var selectedPins = []; + $scope.SetAAwindowStoreData(windowviewid, 'selectedPins', []); + var clickedPins=$scope.GetAAwindowStoreData(windowviewid,'clickedPins'); angular.forEach(clickedPins, function (value, key) { @@ -2627,6 +2657,9 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou .from(seletedSystemPinData) .where('_PinId != ' + value.id) .select(); + + selectedPins.push(value.id); + $scope.SetAAwindowStoreData(windowviewid, 'selectedPins', selectedPins); }); angular.forEach(clickedPins, function (value1, key1) { @@ -2797,8 +2830,13 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $scope.SetAAwindowStoreData(windowviewid,'clickedPins',[]); var clickpin = []; clickpin.push({ 'id': pinDataForTerm[0]._PinId }); - $scope.SetAAwindowStoreData(windowviewid,'clickedPins',clickpin); - + $scope.SetAAwindowStoreData(windowviewid, 'clickedPins', clickpin); + + $scope.SetAAwindowStoreData(windowviewid, 'selectedPins', []); + var selectedPins = []; + selectedPins.push(pinDataForTerm[0]._PinId); + $scope.SetAAwindowStoreData(windowviewid, 'selectedPins', selectedPins); + $scope.SetAAwindowStoreData(windowviewid,'activePinArray',[]); var activePin = []; activePin.push(pinID); diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/CBuild/CBuild-view.html b/400-SOURCECODE/AIAHTML5.Web/app/views/CBuild/CBuild-view.html index 0fc204b..8b6a27b 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/views/CBuild/CBuild-view.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/views/CBuild/CBuild-view.html @@ -38,5 +38,6 @@ - + + \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.Web/app/widget/TopMenu.html b/400-SOURCECODE/AIAHTML5.Web/app/widget/TopMenu.html index 3a84c74..368a116 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/widget/TopMenu.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/widget/TopMenu.html @@ -11,9 +11,9 @@
  • Open Test
  • Save Test As
  • -
  • New Curriculum
  • -
  • Open Existing Curriculum
  • -
  • Save Curriculum As
  • +
  • New Curriculum
  • +
  • Open Existing Curriculum
  • +
  • Save Curriculum As
  • Export Image
  • @@ -90,5 +90,5 @@ - + \ No newline at end of file -- libgit2 0.21.4