diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js index 431e6e3..b3c410f 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js @@ -36,7 +36,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ $("#sidebar-wrapper").on('click', function (event) { //4. on click disable menu option - $scope.$emit("cBEnableDisableMenuOption",""); + $scope.$emit("cBEnableDisableMenuOption", ""); }); // close all selected open panel in CB @@ -84,14 +84,34 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ $('#HomeContainerDiv').css('pointer-events', 'none'); $('#HomeContainerDiv').css('opacity', '0.7'); + + $('#CBTextArea_ifr').css('pointer-events', 'none'); + $('#CBTextArea_ifr').css('opacity', '0.7'); + + + $('#jstree').css('pointer-events', 'none'); + $('#jstree').css('opacity', '0.7'); + + $('#cbEditorTopMenuBar').css('pointer-events', 'none'); + $('#cbEditorTopMenuBar').css('opacity', '0.7'); + + $('#cbEditorLeftSideBar').css('pointer-events', 'none'); + $('#cbEditorLeftSideBar').css('opacity', '0.7'); + + $('#cbEditorRightSideBar').css('pointer-events', 'none'); + $('#cbEditorRightSideBar').css('opacity', '0.7'); + + $('.tox-editor-header').css('pointer-events', 'none'); + $('.tox-editor-header').css('opacity', '0.7'); + + $timeout(function () { // in case failed default time out 40 second var opcity = $("#HomeContainerDiv").css("opacity") - if (opcity != 1) - { + if (opcity != 1) { $scope.CBEnableUI(); } }, 40000); @@ -105,6 +125,25 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ // CB module enable all $('#HomeContainerDiv').css('pointer-events', 'auto'); $('#HomeContainerDiv').css('opacity', '1'); + + $('#CBTextArea_ifr').css('pointer-events', 'auto'); + $('#CBTextArea_ifr').css('opacity', '1'); + + $('#jstree').css('pointer-events', 'auto'); + $('#jstree').css('opacity', '1'); + + $('#cbEditorTopMenuBar').css('pointer-events', 'auto'); + $('#cbEditorTopMenuBar').css('opacity', '1'); + + $('#cbEditorLeftSideBar').css('pointer-events', 'auto'); + $('#cbEditorLeftSideBar').css('opacity', '1'); + + $('#cbEditorRightSideBar').css('pointer-events', 'auto'); + $('#cbEditorRightSideBar').css('opacity', '01'); + + $('.tox-editor-header').css('pointer-events', 'auto'); + $('.tox-editor-header').css('opacity', '1'); + } }); @@ -169,9 +208,9 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ $scope.loadSlideShowXmldata = function (e) { $scope.CBDisableUI(); - $rootScope.AutherName=""; - $rootScope.summary=""; - $rootScope.FileTitle=e.target.text; + $rootScope.AutherName = ""; + $rootScope.summary = ""; + $rootScope.FileTitle = e.target.text; $scope.fileName = e.target.id.split('.'); $('#modal-CurBuilder').css("display", "block"); @@ -284,12 +323,12 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ $scope.ImagePanelclick(); var imfgEle = document.getElementById("imgtag"); - if (imfgEle!=null) + if (imfgEle != null) imfgEle.src = "data:image/png;base64," + $rootScope.windowsimageSource; setTimeout(function () { - var cleintht=imfgEle.clientHeight; - if(cleintht>0) + var cleintht = imfgEle.clientHeight; + if (cleintht > 0) $('#CBSourceImagePanel .jsPanel-content').css('height', cleintht); $scope.CBEnableUI(); }, 200) @@ -299,8 +338,8 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ $scope.ImagePanelclick = function () { $("#CBSourceImagePanel").on('click', function (event) { - var pnlName=event.currentTarget.id; - $scope.$emit("cBEnableDisableMenuOption",pnlName); + var pnlName = event.currentTarget.id; + $scope.$emit("cBEnableDisableMenuOption", pnlName); }); } $rootScope.getCBsummary = function () { @@ -382,7 +421,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ $timeout(function () { $scope.TinyMCEPanelclick(); - },1000); + }, 1000); } @@ -391,15 +430,15 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ $("#CBTinyMCEPanel").on('click', function (event) { //3. on click disable menu option - $scope.$emit("cBEnableDisableMenuOption",""); + $scope.$emit("cBEnableDisableMenuOption", ""); }); } - $scope.myeditorclick=function() { + $scope.myeditorclick = function () { //1. disable menu options - $scope.$emit("cBEnableDisableMenuOption",""); + $scope.$emit("cBEnableDisableMenuOption", ""); } @@ -478,31 +517,28 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ if ($scope.SelectedNotes != "" && $scope.SelectedNotes != undefined) { tinymce.get("CBTextArea").setContent($scope.SelectedNotes); - $scope.LoadModuleName = []; - $scope.Slidenumber = $scope.selectedNodeSingleObj._id; + $scope.LoadModuleName = []; + $scope.Slidenumber = $scope.selectedNodeSingleObj._id; setTimeout(function () { if ($scope.selectedNodeSingleObj.windows != "") { $scope.loadContentOfSelectedSlide($scope.selectedNodeSingleObj._id) } - else - { + else { $scope.CBEnableUI(); } - },200); + }, 200); //$scope.CBEnableUI(); } - else - { + else { tinymce.get("CBTextArea").setContent(""); $scope.CBEnableUI(); } } - else - { + else { $scope.CBEnableUI(); } } @@ -571,7 +607,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ //document.getElementById("slideNumber").innerHTML = "Slide " + $scope.currentSlideNumber + " of " + Object.keys($scope.selectedNodeSingleObj).length; document.getElementById("slideNumber").innerHTML = "Slide " + $scope.currentSlideNumber + " of " + Object.keys($scope.selectedNodeSiblingObjs).length; } - else{ + else { document.getElementById("slideNumber").innerHTML = "Slide " + $scope.currentSlideNumber + " of " + Object.keys($scope.selectedNodeSingleObj).length; } } @@ -815,7 +851,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ var newSummary = document.getElementById('cbRenameSummary').value; var newversion = document.getElementById('cbRenameVersionNo').value; var newSectionText = document.getElementById('cbRenameSectionTitle').value; - if (newSectionText == ""){ + if (newSectionText == "") { newSectionText = $scope.selectedNodeSingleObj._label; } var newSlideName = ("" + newSectionText + ""); @@ -1262,15 +1298,15 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ $rootScope.contentNotesForSaveCB = remaingNotesForCB; - traverseTreeSelectedSingleObj($rootScope.stru, cbCurrentId); + traverseTreeSelectedSingleObj($rootScope.stru, cbCurrentId); if ($scope.selectedNodeSingleObj._isBranch == "false") { - $rootScope.contentNotesForSaveCB.push( - { - "notes": notesForSelectedSlide, - "windows": windowsInSelectedSlide, - "_id": cbCurrentId - }); + $rootScope.contentNotesForSaveCB.push( + { + "notes": notesForSelectedSlide, + "windows": windowsInSelectedSlide, + "_id": cbCurrentId + }); } else if ($scope.selectedNodeSingleObj._isBranch == "true" && $scope.selectedNodeSingleObj._isRoot == "true") { @@ -1280,7 +1316,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ { "windows": windowsInSelectedSlide, "summary": $scope.selectedNodeSingleObj.summary, - "author": $scope.selectedNodeSingleObj.author, + "author": $scope.selectedNodeSingleObj.author, "modified": $scope.selectedNodeSingleObj.modified, "password": "", "version": $scope.selectedNodeSingleObj.version, @@ -1310,7 +1346,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ $rootScope.cbDynamicContents = $rootScope.contentNotesForSaveCB; $rootScope.note = $rootScope.contentNotesForSaveCB; - console.log($rootScope.contentNotesForSaveCB); + console.log($rootScope.contentNotesForSaveCB); } @@ -1327,7 +1363,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ //$rootScope.contentNotesForSaveCB = $rootScope.cbJsonData.slideshow.content.element; $rootScope.contentNotesForSaveCB = $rootScope.cbDynamicContents;//Assign Dnamic Contents } - $rootScope.updatedContentFromEditor(cbCurrentId); + $rootScope.updatedContentFromEditor(cbCurrentId); $rootScope.dynamicUpdatedJsonForSaveCB = { @@ -1368,12 +1404,12 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ else { $(document).execCommand("SaveAs", true, filename); - document.execCommand("SaveAs", true, filename); - angular.element(document.execCommand("SaveAs", false, filename)).scope(); + 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.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); @@ -1384,19 +1420,19 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ //$rootScope.contentNotesForSaveCB = []; //$rootScope.structureObjForSaveCB = []; - // $http({ method: 'Post', url: $scope.fileName }).success(function (data) { - // localStorage.setItem("cbJsonDataObject", JSON.stringify(data)); - // $rootScope.cbJsonData = JSON.parse(localStorage.getItem("cbJsonDataObject")); - // $rootScope.cbDynamicJsonData = data; - // //$scope.getCBsummary(); - // $rootScope.cbJsonData.slideshow.content.element = "Eement data"; - // $rootScope.cbDynamicJsonData.slideshow.content.element = "slideshow element data"; - // $rootScope.note = "save data" - // //$scope.openCurriculumDetail(); - // }) - //.error(function (data, status, headers, config) { - // console.log(data); - //}); + // $http({ method: 'Post', url: $scope.fileName }).success(function (data) { + // localStorage.setItem("cbJsonDataObject", JSON.stringify(data)); + // $rootScope.cbJsonData = JSON.parse(localStorage.getItem("cbJsonDataObject")); + // $rootScope.cbDynamicJsonData = data; + // //$scope.getCBsummary(); + // $rootScope.cbJsonData.slideshow.content.element = "Eement data"; + // $rootScope.cbDynamicJsonData.slideshow.content.element = "slideshow element data"; + // $rootScope.note = "save data" + // //$scope.openCurriculumDetail(); + // }) + //.error(function (data, status, headers, config) { + // console.log(data); + //}); }; $scope.addSection = function (currentid, AddSecionId) { @@ -1413,14 +1449,14 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ if (currentid == "-225638207") { $rootScope.selectedNodeSingle.push( { - "structure": { - "structure": [ - ], - "_label": "New Section", - "_id": AddSecionId, - "_isRoot": "false", - "_isBranch": "true", - "_isLocked": "false" + "structure": { + "structure": [ + ], + "_label": "New Section", + "_id": AddSecionId, + "_isRoot": "false", + "_isBranch": "true", + "_isLocked": "false" } }); @@ -1475,11 +1511,11 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ // }); //} //else { - for (var i = 0; i < $rootScope.structureObjForSaveCB.length; i++) { - if ($rootScope.structureObjForSaveCB[i]._id == currentid) { - $rootScope.structureObjForSaveCB[i]['structure'] = $scope.selectedNodeSingleObj['structure']; - } + for (var i = 0; i < $rootScope.structureObjForSaveCB.length; i++) { + if ($rootScope.structureObjForSaveCB[i]._id == currentid) { + $rootScope.structureObjForSaveCB[i]['structure'] = $scope.selectedNodeSingleObj['structure']; } + } //} } // setTimeout(function () { traverseTreeForSetIcons($rootScope.stru, currentid); }, 1500); @@ -1504,13 +1540,13 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ "_isBranch": "false", "_isLocked": "false" }); - $rootScope.structureObjForSaveCB.push({ + $rootScope.structureObjForSaveCB.push({ "_label": "NEW Slide1", "_id": AddSlideId, "_isRoot": "false", "_isBranch": "false", "_isLocked": "false" - }); + }); } else { $scope.selectedNodeSingleObj['structure'].push({ @@ -1537,11 +1573,11 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ // }); //} //else { - for (var i = 0; i < $rootScope.structureObjForSaveCB.length; i++) { - if ($rootScope.structureObjForSaveCB[i]._id == currentid) { - $rootScope.structureObjForSaveCB[i]['structure'] = $scope.selectedNodeSingleObj['structure']; - } + for (var i = 0; i < $rootScope.structureObjForSaveCB.length; i++) { + if ($rootScope.structureObjForSaveCB[i]._id == currentid) { + $rootScope.structureObjForSaveCB[i]['structure'] = $scope.selectedNodeSingleObj['structure']; } + } //} } // setTimeout(function () { traverseTreeForSetIcons($rootScope.stru, currentid); }, 3000); @@ -1617,7 +1653,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ .from(content) .where("_id == " + id) .select(); - // console.log('contenctForSelectedSlide' + contenctForSelectedSlide[0].notes) + // console.log('contenctForSelectedSlide' + contenctForSelectedSlide[0].notes) var windowsInSelectedSlide = contenctForSelectedSlide[0].windows; var allwindowData = windowsInSelectedSlide.window; var windowData; @@ -1765,49 +1801,49 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ if ($scope.LoadModuleName != undefined) { - var index = $scope.LoadModuleName.indexOf(name); - if (index != -1) { - // remove module which one is loaded - $scope.LoadModuleName.splice(index, 1); - } + var index = $scope.LoadModuleName.indexOf(name); + if (index != -1) { + // remove module which one is loaded + $scope.LoadModuleName.splice(index, 1); + } - if ($scope.LoadModuleName.length > 0) { - var nextmodulename = $scope.LoadModuleName[0]; - $scope.loadModuleWithCB(nextmodulename); + if ($scope.LoadModuleName.length > 0) { + var nextmodulename = $scope.LoadModuleName[0]; + $scope.loadModuleWithCB(nextmodulename); - } - else { //Added Code by sandeep for user story-52696 - $("#viwerSelect").empty(); - var modulePanel = $("#HomeContainerDiv").find("div[id*='ImagePanel']"); - if (modulePanel != undefined && modulePanel != null) { - // $('#viwerSelect').append(''); - - //Added code by sandeep for fixed Bug-58066 - if (modulePanel.length > 0) { - $('#viwerSelect').show(); - } - } - else { - $('#viwerSelect').hide(); - } - for (var i = 0 ; i < modulePanel.length; i++) { - var paneld = modulePanel[i].id; - var panelTitle = document.getElementById(paneld).childNodes[0].innerText; - $('#viwerSelect').append(''); - } + } + else { //Added Code by sandeep for user story-52696 + $("#viwerSelect").empty(); + var modulePanel = $("#HomeContainerDiv").find("div[id*='ImagePanel']"); + if (modulePanel != undefined && modulePanel != null) { + // $('#viwerSelect').append(''); - $scope.CBEnableUI(); - // scroll down to first panel + //Added code by sandeep for fixed Bug-58066 if (modulePanel.length > 0) { - if (modulePanel[0].id != undefined) { - var lastpanel = modulePanel[0].id; - //$('body,html').animate({ scrollTop: $('#' + lastpanel).position().top }, 1000); - } - } - - + $('#viwerSelect').show(); + } + } + else { + $('#viwerSelect').hide(); + } + for (var i = 0 ; i < modulePanel.length; i++) { + var paneld = modulePanel[i].id; + var panelTitle = document.getElementById(paneld).childNodes[0].innerText; + $('#viwerSelect').append(''); } + $scope.CBEnableUI(); + // scroll down to first panel + if (modulePanel.length > 0) { + if (modulePanel[0].id != undefined) { + var lastpanel = modulePanel[0].id; + //$('body,html').animate({ scrollTop: $('#' + lastpanel).position().top }, 1000); + } + } + + + } + } }); @@ -1970,24 +2006,23 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ } $scope.loadDissectibleAnatomyModule = function (moduleName) { - var DAData = ModuleService.getModuleData(moduleName); + var DAData = ModuleService.getModuleData(moduleName); - if (DAData != undefined && DAData.length > 0) { - $rootScope.isCallFromOtherModule = true; + if (DAData != undefined && DAData.length > 0) { + $rootScope.isCallFromOtherModule = true; - var daSectionExist = document.getElementById('daCustomModuleDiv'); + var daSectionExist = document.getElementById('daCustomModuleDiv'); - if (daSectionExist==null){ - $('#cbparentcustomDiv').append($('
')); - $e = $('#daCustomModuleDiv').append("