diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js index 9b50fd5..6fed9d3 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js @@ -12,6 +12,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ $rootScope.structureObjForSaveCB = []; $rootScope.contentNotesForSaveCB = []; $rootScope.dynamicUpdatedJsonForSaveCB = ""; + $scope.isChangeFromDropDown=false; //$rootScope.updateSaveDraftCB = []; $scope.IsVisible = function () { $scope.scroll(); @@ -541,7 +542,9 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ } } - $rootScope.cbSelectOnChange = function (obj) { + $rootScope.cbSelectOnChange = function (obj,prevValue) { + $scope.isChangeFromDropDown=true; + $scope.lastSlideValue=prevValue; $('#jstree').jstree(true).deselect_all(); $('#jstree').jstree('select_node', obj.value); } @@ -563,11 +566,25 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ if ($rootScope.contentNotesForSaveCB.length == 0) { $rootScope.contentNotesForSaveCB = $rootScope.cbDynamicContents;//Assign Dnamic Contents } - var currentCb_id = document.getElementById('cbSelect').value; - $rootScope.updatedContentFromEditor(currentCb_id);//Calling for Update Note for Save CB + + if($scope.isChangeFromDropDown==true) + { + // modified by birendra + // in case of select dropdown current and prev id come same. + var lastslideid = $scope.lastSlideValue; + $scope.isChangeFromDropDown=false; + $scope.lastSlideValue=""; + + } + else + { + var lastslideid = document.getElementById('cbSelect').value; + } + + $rootScope.updatedContentFromEditor(lastslideid);//Calling for Update Note for Save CB if (isActive) { - $scope.updateWindowsContentForSaveCB(currentCb_id,true);// Calling for Update Window content for Save Cb + $scope.updateWindowsContentForSaveCB(lastslideid,true);// Calling for Update Window content for Save Cb } isActive = true; traverseTreeSelectedSingleObj($rootScope.stru, nodeid); @@ -628,6 +645,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ $rootScope.cbNext = function () { + $scope.isChangeFromDropDown=false; var cbCurrentId = document.getElementById('cbSelect').value; var counter = 0; @@ -655,6 +673,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ } $rootScope.cbBack = function () { + $scope.isChangeFromDropDown=false; var cbCurrentId = document.getElementById('cbSelect').value; var counter = 0; $("#jstree").jstree("open_all"); diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/CBuild/curriculum-builder-TinyMCEjspanel.html b/400-SOURCECODE/AIAHTML5.Web/app/views/CBuild/curriculum-builder-TinyMCEjspanel.html index d44815f..ce8d408 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/views/CBuild/curriculum-builder-TinyMCEjspanel.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/views/CBuild/curriculum-builder-TinyMCEjspanel.html @@ -21,7 +21,7 @@
- +