diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 51ce8ab..091f2b2 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -1307,8 +1307,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l else { if ($('#termlistfilter_'+windowviewid+ ' option[selected="selected"]').attr("id")) { if (e.keyCode == 13) { - onListManagerTermSelection($('#termlistfilter_'+windowviewid+ ' option[selected="selected"]').attr("id"),false); - $scope.IsSearchVisible=false; + onListManagerTermSelection($('#termlistfilter_'+windowviewid+ ' option[selected="selected"]').attr("id"),false); } } } @@ -1324,17 +1323,20 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $('#searchlangaugeDiv').empty(); $('#searchlangaugeDiv').css("display","none"); var languageArray = $rootScope.lexiconLanguageArray; + + $("#btnDATermSearch_"+windowviewid).parent().css("margin-right", "10px"); if(languageArray.length>1) { + $("#btnDATermSearch_"+windowviewid).parent().css("margin-right", "-10px"); $('#searchlangaugeDiv').css("display","block"); var option=''; for (var i = 0; i <= languageArray.length - 1; i++) { option=option+''; } var $all = $('#searchlangaugeDiv').append( - '
'+ - ''+ option+ ''+ '
' @@ -1343,6 +1345,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } + $scope.changeSearchText(windowviewid) } $scope.CanvasDivScroll = function (windowviewid) { @@ -3007,7 +3010,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l if ($scope.isLayerChange == true) { $scope.isLayerChange = false; } - + $('#typedTermName_' + windowviewid).val(''); + $("#typedTermName_" + windowviewid).attr("name", '0'); //birendra // for mac os Command key use for multi selection if (evt.ctrlKey || evt.metaKey) { @@ -3016,7 +3020,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l else { $scope.SetwindowStoreData(windowviewid,'isListManagerSelected',false); - $('#typedTermName_' + windowviewid).val(''); + $scope.SetwindowStoreData(windowviewid, 'fullTermlist', []); $scope.SetwindowStoreData(windowviewid, 'AllTerms', []); $scope.SetwindowStoreData(windowviewid,'previousHighlightList',[]); @@ -3505,6 +3509,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l if ($scope.isLayerChange == true) { $scope.isLayerChange = false; } + $('#typedTermName_' + windowviewid).val(''); + $("#typedTermName_" + windowviewid).attr("name", '0'); //birendra // for mac os Command key use for multi selection if (evt.ctrlKey || evt.metaKey) { @@ -3514,8 +3520,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } else { - $scope.SetwindowStoreData(windowviewid,'isListManagerSelected',false); - $('#typedTermName_' + windowviewid).val(''); + $scope.SetwindowStoreData(windowviewid,'isListManagerSelected',false); $scope.SetwindowStoreData(windowviewid, 'fullTermlist', []); $scope.SetwindowStoreData(windowviewid, 'AllTerms', []); $scope.SetwindowStoreData(windowviewid,'previousHighlightList',[]); @@ -5009,6 +5014,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.SetwindowStoreData(windowviewid, 'fullTermlist', []); $('#typedTermName_' + windowviewid).val(''); + $("#typedTermName_" + windowviewid).attr("name", '0'); if (($("#canvasPaintDA_"+windowviewid).css("display") == "block") && ($("#canvasDA_"+windowviewid).css("display") == "block")) { if ($rootScope.isAnnotatiomToolBarPopupActive == false) { @@ -10318,6 +10324,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $rootScope.CloseAnnotationTool(); $('#typedTermName_' + windowviewid).val(''); + $("#typedTermName_" + windowviewid).attr("name", '0'); } $scope.loadBodyViewChangedBySetting = function (windowviewid, isLexiconChange) { @@ -10329,9 +10336,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l { // remove first annotation text $scope.SetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData',true); - $scope.removeAllAnnotationText(windowviewid); - - $scope.langSearchLoad(windowviewid); + $scope.removeAllAnnotationText(windowviewid); //load term data and also language data $rootScope.daloadSearchData(windowviewid); timeintval = $interval(function(){loadBodyViewBySetting(windowviewid)},5); @@ -10340,7 +10345,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l var vocabTermDataArray = $scope.GetwindowStoreData(panid, 'vocabTermDataArray'); if (vocabTermDataArray!=null) { var intval=$scope.GetwindowStoreData(panid,'intervalObject'); - $scope.stopVocab(intval); + $scope.stopVocab(intval); + $scope.langSearchLoad(windowviewid); //loading da for selected panel $scope.CalculateImageCordinates(viewOrientationId, panid); @@ -10652,6 +10658,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $rootScope.CloseAnnotationTool(); $('#typedTermName_' + windowviewid).val(''); + $("#typedTermName_" + windowviewid).attr("name", '0'); } //removed the event and using function @@ -11027,11 +11034,11 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l var searchfilterdata = $filter('filter')(languageVocabData, searchvalue); if(searchvalue.trim()!="") { - $scope.AllSearchData = $filter('orderBy')(searchfilterdata, '_TermText.length'); + searchfilterdata = $filter('orderBy')(searchfilterdata, '_TermText.length'); } else { - $scope.AllSearchData = $filter('orderBy')(searchfilterdata, '_TermText'); + searchfilterdata = $filter('orderBy')(searchfilterdata, '_TermText'); } $scope.limitTofilterdata = $filter('limitTo')(searchfilterdata, 500); @@ -11409,14 +11416,19 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $rootScope.UnsaveCurriculum = true; var currenttermidTxt=$("#" + selectedtermid).text(); $scope.SetwindowStoreData(windowviewid,'searchSelectedText',currenttermidTxt); + $scope.IsSearchVisible=false; var actualTermNumber= selectedtermid.split('_')[0]; if (isTermListOptionClicked == true) { $('#typedTermName_' + windowviewid).val(''); + $("#typedTermName_" + windowviewid).attr("name", '0'); } else { $('#typedTermName_' + windowviewid).val(currenttermidTxt); + $("#typedTermName_" + windowviewid).attr("name", actualTermNumber); + $("#termlistfilter_" + windowviewid).empty(); + $("#termlistfilter_" + windowviewid).css("display", "none"); } if ($scope.GetwindowStoreData(windowviewid,'isTransparencyActivated')) { $scope.CloseTransparencyBox(false,windowviewid); @@ -11898,9 +11910,85 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l var $all = $('#termlistfilter_'+windowviewid).appendTo('#searchListDiv_' + windowviewid); $compile($all)($scope); - + + $("#typedTermName_" + windowviewid).attr("name", "0"); + }; + + $scope.changeSearchLanguage = function (event) { + + var len= (event.currentTarget.id).split("_").length; + var windowviewid = (event.currentTarget.id).split("_")[len-1]; + + $scope.changeSearchText(windowviewid); + + } + + $scope.changeSearchText = function (windowviewid) { + + setTimeout(function () { + + // var searchvalue = $("#typedTermName_" + windowviewid).val(); + var term_num = $("#typedTermName_" + windowviewid).attr("name"); + if(term_num!=undefined && term_num!="0") + { + var langId = $("#searchLanguageLm_"+windowviewid+" option:selected").val(); + if(langId!=undefined) + { + var selectedLanguage = new jinqJs() + .from( $rootScope.lexiconLanguageArray) + .where('id == ' + langId) + .select()[0]; + + var lanName=selectedLanguage.language; + + } + else + { + var lanName=$rootScope.lexiconLanguageArray[0].language; + } + + var allVocabTermDataArray=$scope.GetwindowStoreData(windowviewid,'vocabTermDataArray'); + + var FoundVovabTerm = new jinqJs() + .from( allVocabTermDataArray) + .where('language == ' + lanName) + .select('vocabTermTxt')[0]; + + var foundterm= FoundVovabTerm.vocabTermTxt; + + var selectedTerm = new jinqJs() + .from( foundterm) + .where('_ActualTermNumber == '+term_num) + .select()[0]; + + + if(selectedTerm!=undefined) + { + + $("#typedTermName_" + windowviewid).attr("name", selectedTerm._ActualTermNumber); + $("#typedTermName_" + windowviewid).val(selectedTerm._TermText); + + } + else + { + $("#typedTermName_" + windowviewid).attr("name", "0"); + $("#typedTermName_" + windowviewid).val(''); + } + + } + else + { + $("#typedTermName_" + windowviewid).attr("name", "0"); + $("#typedTermName_" + windowviewid).val(''); + } + + },100) + + + } + $scope.ApplySearch = function (event) { var len= (event.currentTarget.id).split("_").length; var windowviewid = (event.currentTarget.id).split("_")[len-1]; @@ -12004,6 +12092,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l var langId = $("#selectLanguage_"+windowviewid+" option:selected").val(); if(langId!=undefined) { + var selectedLanguage = new jinqJs() .from( $rootScope.lexiconLanguageArray) .where('id == ' + langId) @@ -12016,7 +12105,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l { var lanName=$rootScope.lexiconLanguageArray[0].language; } - + + $("#searchLanguageLm_"+windowviewid).val(langId); $scope.loadSearchList(windowviewid,lanName,totalstructure); },100) @@ -12363,6 +12453,13 @@ function changeLanguageList(event) { scope.changeLanguageList(event); }); } +function changeSearchLanguage(event) { + event.stopPropagation(); + var scope = angular.element(document.getElementsByClassName("daBodyView")).scope(); + scope.$apply(function () { + scope.changeSearchLanguage(event); + }); +} function LoadMore(event) { event.stopPropagation(); diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html b/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html index fce65b9..c9ebac3 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html @@ -243,19 +243,18 @@ - -
- -
- -
+
+
-
+
+ +
+