Commit a11203d25e93819252889a48f04044b31a2000be

Authored by Sandeep Kumar
1 parent 7c37f83f

Changes for Min Max JS Panel for SaveCB

400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js
... ... @@ -403,14 +403,16 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location
403 403  
404 404 });
405 405 //$scope.jsPanel3D.status = "minimized";
406   - var max = $scope.Get3DwindowStoreData(windowviewid, 'maximised');
407   - var min = $scope.Get3DwindowStoreData(windowviewid, 'minimised');
408   - if ($scope.jsPanel3D.status === "maximized" && max) {
  406 + //var max = $scope.Get3DwindowStoreData(windowviewid, 'maximised');
  407 + //var min = $scope.Get3DwindowStoreData(windowviewid, 'minimised');
  408 + var isMaximize = $scope.ThreeDOpenInOtherModules.maximised;
  409 + var isMinimize = $scope.ThreeDOpenInOtherModules.minimised;
  410 + if (isMaximize) {
409 411 $scope.jsPanel3D.maximize();
410 412 $scope.Set3DwindowStoreData(windowviewid, 'maximised', true);
411 413 $scope.Set3DwindowStoreData(windowviewid, 'minimised', false);
412 414 }
413   - else if ($scope.jsPanel3D.status === "minimized" && min) {
  415 + else if (isMinimize) {
414 416 $scope.jsPanel3D.minimize();
415 417 $scope.Set3DwindowStoreData(windowviewid, 'minimised', true);
416 418 $scope.Set3DwindowStoreData(windowviewid, 'maximised', false);
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js
... ... @@ -847,7 +847,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
847 847 theme: 'success',
848 848 currentController: 'CAController',
849 849 parentSlug: $scope.GetCAwindowStoreData(windowviewid, 'parentSlugName'),
850   - content: '<script src="' + playerScript + '"></script><script>$(document).ready(function(){videojs("#playerinlineVideo_' + windowviewid + '").pause();$("#btnTxtOnOff_' + windowviewid + '").click(function(){if($.trim($(this).text()) === "Text Off"){$(this).text("Text On");$("#sid_' + windowviewid + '").css("visibility","hidden");}else{$(this).text("Text Off");$("#sid_' + windowviewid + '").css("visibility","visible");} GetTextVisibity(event); });});</script>' +
  850 + content: '<script src="' + playerScript + '"></script><script>$(document).ready(function(){videojs("#playerinlineVideo_' + windowviewid + '").pause();$("#btnTxtOnOff_' + windowviewid + '").click(function(){if($.trim($(this).text()) === "Text Off"){$(this).text("Text On");$("#sid_' + windowviewid + '").css("visibility","hidden");}else{$(this).text("Text Off");$("#sid_' + windowviewid + '").css("visibility","visible");} GetTextVisibityCA(event); });});</script>' +
851 851 '<div id="pid" class="row"><div id="divplayerinlineVideo_' + windowviewid + '" class="col-sm-12" align="center" width="640" height="480"><video width="640" height="360"' +
852 852 'class="ADAM_Video video-js vjs-default-skin vjs-big-play-centered" type="$videoType" id="playerinlineVideo_' + windowviewid + '" onloadstart="videoOnLoad(event)"' +
853 853 ' poster="' + poster + '"' +
... ... @@ -879,14 +879,16 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
879 879  
880 880 });
881 881  
882   - var max = $scope.GetCAwindowStoreData(windowviewid, 'maximised');
883   - var min = $scope.GetCAwindowStoreData(windowviewid, 'minimised');
884   - if ($scope.jsPanelCA.status === "maximized" && max) {
  882 + //var max = $scope.GetCAwindowStoreData(windowviewid, 'maximised');
  883 + //var min = $scope.GetCAwindowStoreData(windowviewid, 'minimised');
  884 + var isMaximize = $scope.caOpenInOtherModules.maximised;
  885 + var isMinimize = $scope.caOpenInOtherModules.minimised;
  886 + if (isMaximize) {
885 887 $scope.jsPanelCA.maximize();
886 888 $scope.SetCAwindowStoreData(windowviewid, 'maximised', true);
887 889 $scope.SetCAwindowStoreData(windowviewid, 'minimised', false);
888 890 }
889   - else if ($scope.jsPanelCA.status === "minimized" && min) {
  891 + else if (isMinimize) {
890 892 $scope.jsPanelCA.minimize();
891 893 $scope.SetCAwindowStoreData(windowviewid, 'minimised', true);
892 894 $scope.SetCAwindowStoreData(windowviewid, 'maximised', false);
... ... @@ -1127,7 +1129,7 @@ function videoOnLoad(event) {
1127 1129 });
1128 1130 }
1129 1131  
1130   -function GetTextVisibity(event) {
  1132 +function GetTextVisibityCA(event) {
1131 1133 var scope = angular.element(document.getElementById("CAView")).scope();
1132 1134 var windowviewid = (event.target.id).split("_")[1];
1133 1135 var btnTextValue = event.target.innerText;
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js
... ... @@ -845,7 +845,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
845 845 '<div class="col-sm-12 img-thumbnail" align="center">' +
846 846 '<img src="' + selectedCIImage + '" alt="" title="" class="img-responsive "><div class="col-sm-12 well img-subtitle">' +
847 847 '<div align="left" id="sid_' + windowviewid + '"><p>' + selectedImageCISummary + '</p></div><button id="btnTxtOnOff_' + windowviewid + '" class="btn btn-primary pull-right">Text Off</button>' +
848   - '<script>$(document).ready(function(){ var $ua = navigator.userAgent;if(($ua.match(/(iPod|iPhone|iPad|android)/i))) { var jspanelContainerWidth = $(".jsPanel-content").css("width"); $(".jsPanel-content").css({ "width": "100%", "min-width": jspanelContainerWidth });$("#' + $scope.jsPanelID + '").css("width", "100%"); }$("#btnTxtOnOff_' + windowviewid + '").click(function(){if($.trim($(this).text()) === "Text Off"){$(this).text("Text On");$("#sid_' + windowviewid + '").css("visibility","hidden");}else{$(this).text("Text Off");$("#sid_' + windowviewid + '").css("visibility","visible");} GetTextVisibity(event);});});</script></div>' +
  848 + '<script>$(document).ready(function(){ var $ua = navigator.userAgent;if(($ua.match(/(iPod|iPhone|iPad|android)/i))) { var jspanelContainerWidth = $(".jsPanel-content").css("width"); $(".jsPanel-content").css({ "width": "100%", "min-width": jspanelContainerWidth });$("#' + $scope.jsPanelID + '").css("width", "100%"); }$("#btnTxtOnOff_' + windowviewid + '").click(function(){if($.trim($(this).text()) === "Text Off"){$(this).text("Text On");$("#sid_' + windowviewid + '").css("visibility","hidden");}else{$(this).text("Text Off");$("#sid_' + windowviewid + '").css("visibility","visible");} GetTextVisibityCI(event);});});</script></div>' +
849 849 '</div></div>',
850 850 title: $rootScope.getLocalStorageValue("currentViewTitle"),
851 851 position: {
... ... @@ -860,14 +860,16 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
860 860  
861 861 });
862 862  
863   - var max = $scope.GetCIwindowStoreData(windowviewid, 'maximised');
864   - var min = $scope.GetCIwindowStoreData(windowviewid, 'minimised');
865   - if ($scope.jsPanelCI.status === "maximized" && max) {
  863 + //var max = $scope.GetCIwindowStoreData(windowviewid, 'maximised');
  864 + //var min = $scope.GetCIwindowStoreData(windowviewid, 'minimised');
  865 + var isMaximize = $scope.ciOpenInOtherModules.maximised;
  866 + var isMinimize = $scope.ciOpenInOtherModules.minimised;
  867 + if (isMaximize) {
866 868 $scope.jsPanelCI.maximize();
867 869 $scope.SetCIwindowStoreData(windowviewid, 'maximised', true);
868 870 $scope.SetCIwindowStoreData(windowviewid, 'minimised', false);
869 871 }
870   - else if ($scope.jsPanelCI.status === "minimized" && min) {
  872 + else if (isMinimize) {
871 873 $scope.jsPanelCI.minimize();
872 874 $scope.SetCIwindowStoreData(windowviewid, 'minimised', true);
873 875 $scope.SetCIwindowStoreData(windowviewid, 'maximised', false);
... ... @@ -1151,7 +1153,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1151 1153 }]
1152 1154 );
1153 1155  
1154   - function GetTextVisibity(event) {
  1156 + function GetTextVisibityCI(event) {
1155 1157  
1156 1158 var scope = angular.element(document.getElementById("CIView")).scope();
1157 1159 // var len = (event.target.id).split("_").length;
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js
... ... @@ -22,6 +22,15 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
22 22 //alert("scroll");
23 23 }
24 24  
  25 + //$scope.showDeleteEditorModel = function () {
  26 + // document.getElementById('cbModelDeleteBackground').style.display = "block";
  27 + // document.getElementById('cbModelDeleteEditorId').style.display = "block";
  28 + //}
  29 + $rootScope.closeEditorModel = function () {
  30 + document.getElementById('cbModelDeleteBackground').style.display = "none";
  31 + document.getElementById('cbModelDeleteEditorId').style.display = "none";
  32 + }
  33 +
25 34 angular.element(document).ready(function (e) {
26 35  
27 36 $("#sidebar-wrapper").on('click', function (event) {
... ... @@ -31,11 +40,11 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
31 40 });
32 41  
33 42 // close all selected open panel in CB
34   - $(document).on("click", " .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () {
  43 + $(document).on("click", " .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () {
35 44  
36 45 // close in case of Curriculum Builder
37 46 var id = $(event.target).parent().parent().parent().parent().attr('id');
38   - //$rootScope.saveCIWindowActivity("", "");//Calling for Save widodow data for Save Cb
  47 +
39 48 if (id == "CBTinyMCEPanel") {
40 49 tinymce.execCommand('mceRemoveControl', true, 'CBTextArea');
41 50 tinymce.execCommand('mceFocus', true, 'CBTextArea');
... ... @@ -63,6 +72,8 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
63 72 });
64 73  
65 74  
  75 +
  76 +
66 77 $scope.CBDisableUI = function () {
67 78  
68 79 $rootScope.isLoading = true;
... ... @@ -97,6 +108,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
97 108 }
98 109  
99 110 });
  111 +
100 112 $rootScope.firstSelectedNodeId = null;
101 113 //load json data
102 114 $scope.loadCurriculumBuiderData = function () {
... ... @@ -179,101 +191,133 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
179 191  
180 192 }
181 193  
182   - $rootScope.OpenExistingCurriculum = function (file_Name) {
183   -
184   - //$window.location.reload();
185   - $("#opencbview").trigger("click");
186   - var fileupload = document.getElementById("opencbview");
  194 +
  195 + $rootScope.OpenExistingCurriculum = function (event) {
  196 +
  197 + //OPen for diffrent html page
  198 + //$location.url();
  199 + //$location.path();
  200 + //if ($location.url() == "/curriculum-builder") {
  201 + // event.toElement.href = "http://localhost/curriculum-builder";
  202 + //}
  203 + //else {
  204 + // if ($location.url() == "/curriculum-builder-detail") {
  205 + // event.toElement.href = "http://localhost/curriculum-builder-detail";
  206 + // }
  207 + //}
  208 +
  209 + $("#openCBJsonFile").trigger("click");
  210 + var fileupload = document.getElementById("openCBJsonFile");
187 211  
188 212 fileupload.onchange = function () {
189   - // $route.reload();
190   - //$location.url("/curriculum-builder");
191   - //$location.path("/curriculum-builder");
192   -
193   - //var name = document.getElementById("opencbview").files[0].name;
194   -
195   - //$scope.CBDisableUI();
196   - $rootScope.AutherName = "";
197   - $rootScope.summary = "";
198   - $rootScope.FileTitle = "Sandy File";
199 213  
200   - $('#modal-CurBuilder').css("display", "block");
201   - $("#CurBuilderbackground").css("display", "block")
202   - $scope.getJsonFileFromLocal();
  214 + var fileId, file, objFileRead;
  215 + if (typeof window.FileReader !== 'function') {
  216 + alert("The file API isn't supported on this browser yet.");
  217 + return;
  218 + }
  219 + fileId = document.getElementById('openCBJsonFile');
  220 + if (!fileId) {
  221 + alert("File couldn't find the element.");
  222 + }
  223 + else if (!fileId.files) {
  224 + alert("This browser doesn't seem to support the `files` property of file inputs.");
  225 + }
  226 + else if (!fileId.files[0]) {
  227 + alert("Please select a file before clicking 'Load'");
  228 + }
  229 + else {
  230 + file = fileId.files[0];
  231 + var extension = file.name.split(".")[1];
  232 + if (file.type == "application/json" && extension == "json") {
  233 + objFileRead = new FileReader();
  234 + objFileRead.onload = receivedFile;
  235 + objFileRead.readAsText(file);
  236 + } else {
  237 + alert("Please select only Saved Curriculum Builder Json file!");
  238 + }
  239 +
  240 + }
203 241  
  242 + function receivedFile(e) {
  243 + //let lines = e.target.result;
  244 + var jsonData = JSON.parse(e.target.result);
  245 + localStorage.setItem("cbJsonDataObject", JSON.stringify(jsonData));
  246 + $rootScope.cbJsonData = ""; $rootScope.cbDynamicJsonData = "";
  247 + $rootScope.cbJsonData = JSON.parse(e.target.result);
  248 + $rootScope.cbDynamicJsonData = JSON.parse(e.target.result);
  249 + $rootScope.cbTreeFirstLabel = $rootScope.cbJsonData.slideshow.presentation.structure._label;
204 250  
  251 + $rootScope.getCBsummary();
  252 + $scope.CBEnableUI();
205 253  
206   - //var fileName = fileupload.value.replace('C:\\fakepath\\', '');;
207   - //alert(fileName);
  254 + $rootScope.AutherName = "";
  255 + $rootScope.summary = "";
  256 + $rootScope.FileTitle = $rootScope.cbTreeFirstLabel;
208 257  
209   - //switch ($location.url()) {
210   - // case '/curriculum-builder-detail':
211   - // $location.url('/curriculum-builder');
212   - // break;
213   - //}
214   - // $scope.fileName = file_Name;
  258 + $timeout(function () {
  259 + $('#modal-CurBuilder').css("display", "block");
  260 + $("#CurBuilderbackground").css("display", "block");
  261 + //$scope.openCurriculumDetail();
  262 + }, 200);
  263 +
  264 + }
  265 + };
215 266  
216   -
217   -
218   - // $http({
219   - // method: 'GET',
220   - // url: '' + fileName
221   - // }).success(function (data) {
222   -
223   - // localStorage.setItem("cbJsonDataObject", JSON.stringify(data));
224   - // $rootScope.cbJsonData = JSON.parse(localStorage.getItem("cbJsonDataObject"));
225   - // $rootScope.cbDynamicJsonData = data;
226   -
227   - // $rootScope.getCBsummary();
  267 + }
228 268  
229   - // $scope.openCurriculumDetailtest();
230   - // })
231   - //.error(function (data, status, headers, config) {
232   - // console.log(data);
233   - // });
234 269  
235   - };
236   - }
  270 + //$scope.getJsonFileFromLocal = function loadFile() {
  271 + // var fileId, file, fr;
237 272  
  273 + // if (typeof window.FileReader !== 'function') {
  274 + // alert("The file API isn't supported on this browser yet.");
  275 + // return;
  276 + // }
  277 + // fileId = document.getElementById('opencbview');
  278 + // if (!fileId) {
  279 + // alert("File couldn't find the element.");
  280 + // }
  281 + // else if (!fileId.files) {
  282 + // alert("This browser doesn't seem to support the `files` property of file inputs.");
  283 + // }
  284 + // else if (!fileId.files[0]) {
  285 + // alert("Please select a file before clicking 'Load'");
  286 + // }
  287 + // else {
  288 + // file = fileId.files[0];
  289 + // fr = new FileReader();
  290 + // fr.onload = receivedText;
  291 + // fr.readAsText(file);
  292 +
  293 + // }
238 294  
239   - $scope.getJsonFileFromLocal = function loadFile() {
240   - var fileId, file, fr;
  295 + // function receivedText(e) {
  296 + // let lines = e.target.result;
241 297  
242   - if (typeof window.FileReader !== 'function') {
243   - alert("The file API isn't supported on this browser yet.");
244   - return;
245   - }
246   - fileId = document.getElementById('opencbview');
247   - if (!fileId) {
248   - alert("File couldn't find the element.");
249   - }
250   - else if (!fileId.files) {
251   - alert("This browser doesn't seem to support the `files` property of file inputs.");
252   - }
253   - else if (!fileId.files[0]) {
254   - alert("Please select a file before clicking 'Load'");
255   - }
256   - else {
257   - file = fileId.files[0];
258   - fr = new FileReader();
259   - fr.onload = receivedText;
260   - fr.readAsText(file);
261   - }
  298 + // var newArr = JSON.parse(lines);
  299 + // localStorage.setItem("cbJsonDataObject", JSON.stringify(newArr));
  300 + // $rootScope.cbJsonData = ""; $rootScope.cbDynamicJsonData = "";
  301 + // $rootScope.cbJsonData = JSON.parse(lines);
  302 + // $rootScope.cbDynamicJsonData = JSON.parse(lines);
  303 + // $rootScope.cbTreeFirstLabel = $rootScope.cbJsonData.slideshow.presentation.structure._label;
262 304  
263   - function receivedText(e) {
264   - let lines = e.target.result;
  305 + // $rootScope.getCBsummary();
  306 + // $scope.CBEnableUI();
265 307  
266   - var newArr = JSON.parse(lines);
267   - localStorage.setItem("cbJsonDataObject", JSON.stringify(newArr));
268   - $rootScope.cbJsonData = ""; $rootScope.cbDynamicJsonData = "";
269   - $rootScope.cbJsonData = JSON.parse(lines);
270   - $rootScope.cbDynamicJsonData = JSON.parse(lines);
271   - $rootScope.getCBsummary();
272   - $scope.CBEnableUI();
  308 + // $rootScope.AutherName = "";
  309 + // $rootScope.summary = "";
  310 + // $rootScope.FileTitle = $rootScope.cbTreeFirstLabel;
  311 +
  312 + // $timeout(function () {
  313 + // $('#modal-CurBuilder').css("display", "block");
  314 + // $("#CurBuilderbackground").css("display", "block");
  315 + // }, 3000);
273 316  
274   - $scope.openCurriculumDetail();
275   - }
276   - }
  317 + // //$scope.loadSlideShowXmldata();
  318 + // //$scope.openCurriculumDetail();
  319 + // }
  320 + //}
277 321  
278 322 //$rootScope.OpenExistingCurriculum = function (file_Name) {
279 323  
... ... @@ -1491,7 +1535,76 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
1491 1535 }
1492 1536  
1493 1537 $rootScope.saveCurricullam = function (file_Name) {
1494   - $scope.exportToFile(file_Name);
  1538 +
  1539 + //$scope.exportToFile(file_Name);
  1540 +
  1541 + var cbCurrentId = document.getElementById('cbSelect').value;
  1542 + if ($rootScope.structureObjForSaveCB.length == 0) {
  1543 + //$rootScope.structureObjForSaveCB = $rootScope.structure;// only Tree Array
  1544 + //$rootScope.structureObjForSaveCB = $rootScope.stru.slideshow.presentation.structure.structure;
  1545 + $rootScope.structureObjForSaveCB = $rootScope.stru.structure.structure;
  1546 + }
  1547 + if ($rootScope.contentNotesForSaveCB.length == 0) {
  1548 + //$rootScope.contentNotesForSaveCB = $rootScope.cbJsonData.slideshow.content.element;
  1549 + $rootScope.contentNotesForSaveCB = $rootScope.cbDynamicContents;//Assign Dnamic Contents
  1550 + }
  1551 + $rootScope.updatedContentFromEditor(cbCurrentId);
  1552 +
  1553 + $scope.updateWindowsContentForSaveCB(cbCurrentId);
  1554 +
  1555 + $rootScope.dynamicUpdatedJsonForSaveCB =
  1556 + {
  1557 + "slideshow": {
  1558 + "presentation": {
  1559 + "structure": {
  1560 + "structure": //[
  1561 +
  1562 + $rootScope.structureObjForSaveCB,
  1563 + //],
  1564 + "_label": $rootScope.cbTreeFirstLabel,
  1565 + "_id": $rootScope.cbTreeFirstID,
  1566 + "_isRoot": "true",
  1567 + "_isBranch": "true",
  1568 + "_isLocked": "false"
  1569 + },
  1570 + "_anchor": "true",
  1571 + "_window_position": "6,10",
  1572 + "_window_size": "828,453" // Apply Dynamic
  1573 + },
  1574 + "content": {
  1575 + "element": //[
  1576 +
  1577 + $rootScope.contentNotesForSaveCB,
  1578 + //]
  1579 + }
  1580 + }
  1581 +
  1582 + };
  1583 +
  1584 + $scope.slideshow = $rootScope.dynamicUpdatedJsonForSaveCB;
  1585 + $scope.filename = "SandySaveCB.json";
  1586 + var filename = $scope.filename;
  1587 + var blob = new Blob([angular.toJson($rootScope.dynamicUpdatedJsonForSaveCB, true)], { type: 'text/text' });
  1588 + if (window.navigator && window.navigator.msSaveOrOpenBlob) {
  1589 + window.navigator.msSaveOrOpenBlob(blob, filename);
  1590 + }
  1591 + else {
  1592 + document.execCommand("SaveAs", true, filename);
  1593 + //$("#bo").document.execCommand("SaveAs", true, filename);
  1594 + //angular.element(document.execCommand("SaveAs", false, filename)).scope();
  1595 +
  1596 + var event = document.createEvent('MouseEvents'),
  1597 + saveElement = document.createElement('a');
  1598 + saveElement.download = filename;
  1599 + saveElement.href = window.URL.createObjectURL(blob);
  1600 + saveElement.dataset.downloadurl = ['text/json', saveElement.download, saveElement.href].join(':');
  1601 + event.initEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
  1602 + saveElement.dispatchEvent(event);
  1603 + //window.URL.revokeObjectURL(url); // clean the url.createObjectURL resource
  1604 + }
  1605 + $rootScope.dynamicUpdatedJsonForSaveCB = "";
  1606 + //$rootScope.contentNotesForSaveCB = [];
  1607 + //$rootScope.structureObjForSaveCB = [];
1495 1608 }
1496 1609  
1497 1610  
... ... @@ -1636,17 +1749,20 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
1636 1749 if (window.navigator && window.navigator.msSaveOrOpenBlob) {
1637 1750 window.navigator.msSaveOrOpenBlob(blob, filename);
1638 1751 }
1639   - else {
1640   - //document.execCommand("SaveAs", true, filename);
1641   - //angular.element(document.execCommand("SaveAs", false, filename)).scope();
1642   - var e = document.createEvent('MouseEvents'),
1643   - a = document.createElement('a');
1644   - a.download = filename;
1645   - a.href = window.URL.createObjectURL(blob);
1646   - a.dataset.downloadurl = ['text/json', a.download, a.href].join(':');
1647   - e.initEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
1648   - a.dispatchEvent(e);
1649   - window.URL.revokeObjectURL(url); // clean the url.createObjectURL resource
  1752 + else {
  1753 +
  1754 + $(document).execCommand("SaveAs", true, filename);
  1755 + document.execCommand("SaveAs", true, filename);
  1756 + angular.element(document.execCommand("SaveAs", false, filename)).scope();
  1757 +
  1758 + //var e = document.createEvent('MouseEvents'),
  1759 + //a = document.createElement('a');
  1760 + // a.download = filename;
  1761 + //a.href = window.URL.createObjectURL(blob);
  1762 + //a.dataset.downloadurl = ['text/json', a.download, a.href].join(':');
  1763 + //e.initEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
  1764 + //a.dispatchEvent(e);
  1765 + //window.URL.revokeObjectURL(url); // clean the url.createObjectURL resource
1650 1766 }
1651 1767 $rootScope.dynamicUpdatedJsonForSaveCB = "";
1652 1768 //$rootScope.contentNotesForSaveCB = [];
... ... @@ -1892,7 +2008,12 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
1892 2008 $scope.loadContentOfSelectedSlide = function (id) {
1893 2009 // alert("Id" + id);
1894 2010 console.log("id= " + id)
1895   - var content = $rootScope.cbJsonData.slideshow.content.element;
  2011 + //var content = $rootScope.cbJsonData.slideshow.content.element;
  2012 +
  2013 + if ($rootScope.contentNotesForSaveCB.length == 0) {
  2014 + $rootScope.contentNotesForSaveCB = $rootScope.cbDynamicContents;
  2015 + }
  2016 + var content = $rootScope.contentNotesForSaveCB;
1896 2017  
1897 2018 var contenctForSelectedSlide = new jinqJs()
1898 2019 .from(content)
... ... @@ -2384,7 +2505,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
2384 2505 windowTitle: $rootScope.CAWindowData[i].currentViewTitle,
2385 2506 maximised: $rootScope.CAWindowData[i].maximised,
2386 2507 mType: $rootScope.CAWindowData[i].moduleName,
2387   - id: $rootScope.CAWindowData[i].imageId,
  2508 + id: $rootScope.CAWindowData[i].imageId,//Add id in CA.js
2388 2509 scrollFlvPosition: { vertical: 0, horizontal: 0 },// N
2389 2510 windowListId: 0 //$rootScope.CAWindowData[i] // N
2390 2511 });
... ... @@ -2478,17 +2599,17 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
2478 2599 horizontal: $rootScope.AAWindowData[i].horizontalScroll
2479 2600 },
2480 2601 selectedStructureID: 0,//N
2481   - selectedPins: $rootScope.AAWindowData[i].clickedPins,
  2602 + selectedPins: $rootScope.AAWindowData[i].selectedPins,
2482 2603 maximised: $rootScope.AAWindowData[i].maximised,
2483 2604 size: {
2484 2605 width: $rootScope.AAWindowData[i].width,
2485 2606 height: $rootScope.AAWindowData[i].height
2486 2607 },
2487   - id: $rootScope.AAWindowData[i].imageId,
  2608 + id: $rootScope.AAWindowData[i].id,
2488 2609 showSelectedPins: $rootScope.AAWindowData[i].isShowSelectedSystemPinsClicked,
2489 2610 hideCallOuts: false,//N
2490 2611 showAllPins: $rootScope.AAWindowData[i].isShowBodyWithCBPinData,//N
2491   - scaleIndex: 0,//N
  2612 + scaleIndex: $rootScope.AAWindowData[i].sliderVal,
2492 2613 bodySystemId: $rootScope.AAWindowData[i].SelectedSystemID,
2493 2614 windowListId: "0",//N
2494 2615 imageId: $rootScope.AAWindowData[i].imageId,
... ... @@ -2584,11 +2705,11 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
2584 2705  
2585 2706 $scope.updateWindowsContentForSaveCB = function (currentId) {
2586 2707  
2587   - //$scope.saveDAWindowActivity();
2588   - //$scope.saveAAWindowActivity(currentId);
2589   - //$scope.saveCIWindowActivity(currentId);
2590   - //$scope.saveCAWindowActivity();
2591   - //$scope.save3DWindowActivity();
  2708 + //$scope.saveDAWindowActivity(currentId);
  2709 + $scope.saveAAWindowActivity(currentId);
  2710 + $scope.saveCIWindowActivity(currentId);
  2711 + $scope.saveCAWindowActivity(currentId);
  2712 + $scope.save3DWindowActivity(currentId);
2592 2713 //$scope.savePicWindowActivity($scope.windowDataforCB);
2593 2714 if ($scope.updatedWindowListForSaveCB.length > 0) {
2594 2715 findKeyForChange($rootScope.contentNotesForSaveCB, currentId);
... ... @@ -2602,7 +2723,6 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
2602 2723 console.log($rootScope.contentNotesForSaveCB);
2603 2724 }
2604 2725  
2605   -
2606 2726  
2607 2727 //$rootScope.updateWindowsContentForSaveCB = function (windowData) {
2608 2728 // //findKeyForChange($scope.windowDataforCB, keyname)
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... ... @@ -1389,7 +1389,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
1389 1389 $rootScope.PrintViewer = "PrintViewer";
1390 1390  
1391 1391 $rootScope.newCurriculum = "newCurriculum";
1392   - $rootScope.openCurriculum = "openCurriculum";
  1392 + $rootScope.openCurriculum = "";
1393 1393 $rootScope.saveCurriculam = "saveCurriculam";
1394 1394  
1395 1395 $rootScope.disableSubMenu = "disableSubMenu";
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
... ... @@ -96,7 +96,9 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
96 96 'width': 0,
97 97 'height': 0,
98 98 'minimised': false,
99   - 'maximised': false
  99 + 'maximised': false,
  100 + 'id': 0,
  101 + 'selectedPins': []
100 102  
101 103 });
102 104  
... ... @@ -150,7 +152,9 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
150 152 'width': 0,
151 153 'height': 0,
152 154 'minimised': false,
153   - 'maximised': false
  155 + 'maximised': false,
  156 + 'id': 0,
  157 + 'selectedPins': []
154 158  
155 159 });
156 160  
... ... @@ -454,7 +458,14 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
454 458 localStorage.setItem("currentViewTitle", anatomyTitle);
455 459  
456 460 var systemId = $scope.aaOpenInOtherModules.selectedBodysystemId;
457   - $scope.SetAAwindowStoreData(windowviewid,'SelectedSystemID',systemId);
  461 + $scope.SetAAwindowStoreData(windowviewid, 'SelectedSystemID', systemId);
  462 +
  463 + // set zoom level And SelectedPins
  464 + $scope.SetAAwindowStoreData(windowviewid, 'sliderVal', $scope.aaOpenInOtherModules.zoomLevel);
  465 +
  466 + //var selectedPins = $scope.GetAAwindowStoreData(windowviewid, 'selectedPins');
  467 + //selectedPins.push($scope.aaOpenInOtherModules.selectedPins);
  468 + //$scope.SetAAwindowStoreData(windowviewid, 'selectedPins', selectedPins);
458 469  
459 470 // note:: in few json like "articulation" imageId as same id
460 471 // get wrong detail by imageId
... ... @@ -464,7 +475,8 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
464 475  
465 476 // serial no of imageid
466 477 var sId = $scope.aaOpenInOtherModules.id;
467   -
  478 +
  479 + $scope.SetAAwindowStoreData(windowviewid, 'id', sId);
468 480  
469 481 $scope.SetAAwindowStoreData(windowviewid,'parentSlugName',($location.url()).replace('/', ''));
470 482  
... ... @@ -583,14 +595,16 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
583 595 $('#spinner').css('visibility', 'visible');
584 596  
585 597 //Perform Activity as per SaveCb JSPanel
586   - var max = $scope.GetAAwindowStoreData(windowviewid, 'maximised');
587   - var min = $scope.GetAAwindowStoreData(windowviewid, 'minimised');
588   - if ($scope.jsPanelAA.status === "maximized" && max) {
  598 + //var max = $scope.GetAAwindowStoreData(windowviewid, 'maximised');
  599 + //var min = $scope.GetAAwindowStoreData(windowviewid, 'minimised');
  600 + var isMaximize = $scope.aaOpenInOtherModules.maximised;
  601 + var isMinimize = $scope.aaOpenInOtherModules.minimised;
  602 + if (isMaximize) {
589 603 $scope.jsPanelAA.maximize();
590 604 $scope.SetAAwindowStoreData(windowviewid, 'maximised', true);
591 605 $scope.SetAAwindowStoreData(windowviewid, 'minimised', false);
592 606 }
593   - else if ($scope.jsPanelAA.status === "minimized" && min) {
  607 + else if (isMinimize) {
594 608 $scope.jsPanelAA.minimize();
595 609 $scope.SetAAwindowStoreData(windowviewid, 'minimised', true);
596 610 $scope.SetAAwindowStoreData(windowviewid, 'maximised', false);
... ... @@ -677,7 +691,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
677 691 //6. Show all pins on AA opened item
678 692  
679 693 $scope.showAllPins(windowviewid);
680   -
  694 + //$scope.showSelectedPins(windowviewid);
681 695  
682 696 $timeout(function () {
683 697 //7. Highlight all system body list in left side
... ... @@ -705,11 +719,11 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
705 719  
706 720  
707 721 $scope.Setslider = function (windowviewid) {
708   -
  722 + var zoomLevel = $scope.GetAAwindowStoreData(windowviewid,'sliderVal');
709 723 $("#Vslider_" + windowviewid).slider({
710 724 min: 25,
711 725 max: 100,
712   - value: 100,
  726 + value: zoomLevel,
713 727 range: "min",
714 728 orientation: "vertical",
715 729 slide: function (event, ui) {
... ... @@ -717,18 +731,21 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
717 731 var targetid = event.target.id;
718 732 var len= (targetid).split("_").length;
719 733 var windviewid = (targetid).split("_")[len-1];
720   - changeThumbnailSize(event, ui,windviewid);
  734 + changeThumbnailSize(event, ui.value, windviewid);
721 735 }
722   - }//,
  736 + }
  737 + //,
723 738 // change: function (event, ui) {
724 739  
725   - // changeThumbnailSize(event, ui);
  740 +
726 741 // }
727   - })
  742 + })
728 743 .slider("pips", {
729 744 rest: "label",
730 745 step: "15"
731 746 });
  747 +
  748 + changeThumbnailSize(event, zoomLevel, windowviewid);
732 749 }
733 750  
734 751  
... ... @@ -781,21 +798,21 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
781 798 }
782 799  
783 800  
784   - function changeThumbnailSize(event, ui,windowviewid) {
  801 + function changeThumbnailSize(event, value,windowviewid) {
785 802 var scope = angular.element(document.getElementById("aaBodyView")).scope();
786 803 scope.$apply(function () {
787   - $scope.SetAAwindowStoreData(windowviewid,'sliderVal',ui.value)
  804 + $scope.SetAAwindowStoreData(windowviewid,'sliderVal',value)
788 805 scope.removeSpeechBubble(windowviewid);
789 806 var relativeWidth = 0;
790 807 var relativeHeight = 0;
791   - if (ui.value == 25 || ui.value == 40 || ui.value == 55 || ui.value == 70 || ui.value == 85 || ui.value == 100) {
  808 + if (value == 25 || value == 40 || value == 55 || value == 70 || value == 85 || value == 100) {
792 809 $("#listManager").css("display", "none");
793 810 $("#optionsListManagerTab").removeClass("active");
794 811  
795   - relativeWidth = (scope.ViewImageWidth)*(ui.value/100);
796   - relativeHeight = (scope.ViewImageHeight)*(ui.value/100);
797   - // scope.sliderPercentValue = (ui.value/100);
798   - $scope.SetAAwindowStoreData(windowviewid,'sliderPercentValue',(ui.value/100));
  812 + relativeWidth = (scope.ViewImageWidth)*(value/100);
  813 + relativeHeight = (scope.ViewImageHeight)*(value/100);
  814 + // scope.sliderPercentValue = (value/100);
  815 + $scope.SetAAwindowStoreData(windowviewid,'sliderPercentValue',(value/100));
799 816  
800 817 $("#modItemImage_"+windowviewid).css("width", relativeWidth + "px");
801 818 $("#modItemImage_"+windowviewid).css("height", relativeHeight + "px");
... ... @@ -914,17 +931,24 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
914 931  
915 932 var clickedPins=$scope.GetAAwindowStoreData(windowviewid,'clickedPins');
916 933 var activePinArray=$scope.GetAAwindowStoreData(windowviewid,'activePinArray');
917   -
  934 + var selectedPins;
918 935 for (var i = 0; i < $scope.aaOpenInOtherModules.selectedPins.length; i++) {
  936 +
  937 + selectedPins = $scope.GetAAwindowStoreData(windowviewid, 'selectedPins');
919 938  
920   - var pinid=$scope.aaOpenInOtherModules.selectedPins[i];
  939 + var pinid = $scope.aaOpenInOtherModules.selectedPins[i];
  940 +
  941 + selectedPins.push(pinid);
  942 +
921 943 var pinvalue='PinArc_' + pinid;
922 944 var isFound = jQuery.inArray(pinvalue, activePinArray)
923 945 if (isFound == -1) {
924 946 activePinArray.push(pinvalue);
925 947 clickedPins.push({ 'id': pinid});
926 948 }
927   - }
  949 + }
  950 +
  951 + $scope.SetAAwindowStoreData(windowviewid, 'selectedPins', selectedPins);
928 952  
929 953 for (var i = 0; i < $scope.aaOpenInOtherModules.selectedCallouts.length; i++) {
930 954  
... ... @@ -1385,7 +1409,8 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1385 1409 }
1386 1410 else {
1387 1411 $scope.SetAAwindowStoreData(windowviewid,'clickedPins',[]);
1388   - $scope.SetAAwindowStoreData(windowviewid,'activePinArray',[]);
  1412 + $scope.SetAAwindowStoreData(windowviewid, 'activePinArray', []);
  1413 + $scope.SetAAwindowStoreData(windowviewid, 'selectedPins', []);
1389 1414 }
1390 1415  
1391 1416 var isHidePinBtnClicked=$scope.GetAAwindowStoreData(windowviewid,'isHidePinBtnClicked');
... ... @@ -2171,7 +2196,8 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
2171 2196 click: function (clickedPin) {
2172 2197  
2173 2198 if (clickedPin.event.ctrlKey == false) {
2174   - $scope.SetAAwindowStoreData(windowviewid,'clickedPins',[]);
  2199 + $scope.SetAAwindowStoreData(windowviewid, 'clickedPins', []);
  2200 + $scope.SetAAwindowStoreData(windowviewid, 'selectedPins', []);
2175 2201 }
2176 2202 var pinID = (clickedPin.name).substring(7, (clickedPin.name).length);
2177 2203 var aaPinData = $scope.GetAAwindowStoreData(windowviewid,'aaPinData');
... ... @@ -2620,6 +2646,10 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
2620 2646 $scope.showSystemPins = function (seletedSystemPinData, isShowSelectedPins,windowviewid) {
2621 2647  
2622 2648 if (isShowSelectedPins) {
  2649 +
  2650 + var selectedPins = [];
  2651 + $scope.SetAAwindowStoreData(windowviewid, 'selectedPins', []);
  2652 +
2623 2653 var clickedPins=$scope.GetAAwindowStoreData(windowviewid,'clickedPins');
2624 2654 angular.forEach(clickedPins, function (value, key) {
2625 2655  
... ... @@ -2627,6 +2657,9 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
2627 2657 .from(seletedSystemPinData)
2628 2658 .where('_PinId != ' + value.id)
2629 2659 .select();
  2660 +
  2661 + selectedPins.push(value.id);
  2662 + $scope.SetAAwindowStoreData(windowviewid, 'selectedPins', selectedPins);
2630 2663 });
2631 2664  
2632 2665 angular.forEach(clickedPins, function (value1, key1) {
... ... @@ -2797,8 +2830,13 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
2797 2830 $scope.SetAAwindowStoreData(windowviewid,'clickedPins',[]);
2798 2831 var clickpin = [];
2799 2832 clickpin.push({ 'id': pinDataForTerm[0]._PinId });
2800   - $scope.SetAAwindowStoreData(windowviewid,'clickedPins',clickpin);
2801   -
  2833 + $scope.SetAAwindowStoreData(windowviewid, 'clickedPins', clickpin);
  2834 +
  2835 + $scope.SetAAwindowStoreData(windowviewid, 'selectedPins', []);
  2836 + var selectedPins = [];
  2837 + selectedPins.push(pinDataForTerm[0]._PinId);
  2838 + $scope.SetAAwindowStoreData(windowviewid, 'selectedPins', selectedPins);
  2839 +
2802 2840 $scope.SetAAwindowStoreData(windowviewid,'activePinArray',[]);
2803 2841 var activePin = [];
2804 2842 activePin.push(pinID);
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/CBuild/CBuild-view.html
... ... @@ -38,5 +38,6 @@
38 38 </div><!-- /.modal-content -->
39 39 </div><!-- /.modal-dialog -->
40 40 </div>
41   - <input type="file" id="opencbview" style="display: none" />
  41 + <input type="file" id="openCBJsonFile" style="display: none" />
  42 +
42 43 </div>
43 44 \ No newline at end of file
... ...
400-SOURCECODE/AIAHTML5.Web/app/widget/TopMenu.html
... ... @@ -11,9 +11,9 @@
11 11 <li ng-class="disableSubMenu"><a href="#">Open Test</a></li>
12 12 <li ng-class="disableSubMenu"><a href="#">Save Test As</a></li>
13 13 <li role="separator" class="divider"></li>
14   - <li ng-class="newCurriculum"><a href="#" ng-click="NewCurricullumData('NewCurriculam')">New Curriculum</a></li>
15   - <li ng-class="openCurriculum" ng-click="OpenExistingCurriculum()"> <a href=" #">Open Existing Curriculum</a></li>
16   - <li ng-class="saveCurriculam" ng-click="exportToFile()"><a href="#">Save Curriculum As</a></li>
  14 + <li ng-class="newCurriculum"><a href="curriculum-builder-detail" ng-click="NewCurricullumData('NewCurriculam')">New Curriculum</a></li>
  15 + <li ng-class="openCurriculum" ng-click="OpenExistingCurriculum($event)"> <a href="curriculum-builder">Open Existing Curriculum</a></li>
  16 + <li ng-class="saveCurriculam" ng-click="saveCurricullam($event)"><a href="curriculum-builder-detail">Save Curriculum As</a></li>
17 17 <li role="separator" class="divider"></li>
18 18 <li ng-class="exportImage"><a href="" id="exportImageAnchor" data-toggle="modal" ng-click="ShowExportImageWindow()">Export Image</a></li>
19 19 <li role="separator" class="divider"></li>
... ... @@ -90,5 +90,5 @@
90 90 </div>
91 91 </div>
92 92  
93   - <input type="file" id="opencbview" style="display: none" />
  93 + <input type="file" id="openCBJsonFile" style="display: none" />
94 94 </div>
95 95 \ No newline at end of file
... ...