Commit 885da7bcf27f0f5860e032fabd1800bdcf4515bc

Authored by Amrita Vishnoi
1 parent 63196a87

List Manager is merged

400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -19,9 +19,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
19 19 $scope.TermNumberData;
20 20 $rootScope.BodySystemData
21 21 $scope.bodyViewId = 0;
22   - $scope.bgartData;
  22 + $rootScope.bgartData;
23 23 //view specific constants
24   - $scope.voId;
  24 + $rootScope.voId;
25 25 $scope.layerNumber;
26 26 $scope.daCounter = 1;
27 27 $scope.bagartDetails;
... ... @@ -292,7 +292,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
292 292 $scope.openBodyView = function () {
293 293 //debugger;
294 294 $rootScope.isLoading = true;
295   - $scope.voId = localStorage.getItem("currentBodyViewId");;
  295 + $rootScope.voId = localStorage.getItem("currentBodyViewId");;
296 296  
297 297 //load bodyRegion data
298 298 var brViewdata = DataService.getJson('~/../content/data/json/da/da_dat_brview.json')
... ... @@ -501,29 +501,29 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
501 501 $scope.layerNumber = 0;
502 502 $scope.skinTone = DA[0].ethnicity;
503 503  
504   - $scope.viewOrientationId = $scope.voId;
505   - if ($scope.voId == 5) {
  504 + $scope.viewOrientationId = $rootScope.voId;
  505 + if ($rootScope.voId == 5) {
506 506 $scope.viewOrientationId = 1;
507 507 }
508   - else if ($scope.voId == 6) {
  508 + else if ($rootScope.voId == 6) {
509 509 $scope.viewOrientationId = 2;
510 510 }
511   - else if ($scope.voId == 7) {
  511 + else if ($rootScope.voId == 7) {
512 512 $scope.viewOrientationId = 3;
513 513 }
514   - else if ($scope.voId == 8) {
  514 + else if ($rootScope.voId == 8) {
515 515 $scope.viewOrientationId = 4;
516 516 }
517   - else if ($scope.voId == 9) {
  517 + else if ($rootScope.voId == 9) {
518 518 $scope.viewOrientationId = 5;
519 519 }
520   - else if ($scope.voId == 10) {
  520 + else if ($rootScope.voId == 10) {
521 521 $scope.viewOrientationId = 6;
522 522 }
523   - else if ($scope.voId == 11) {
  523 + else if ($rootScope.voId == 11) {
524 524 $scope.viewOrientationId = 5;
525 525 }
526   - else if ($scope.voId == 12) {
  526 + else if ($rootScope.voId == 12) {
527 527 $scope.viewOrientationId = 6;
528 528 }
529 529  
... ... @@ -536,13 +536,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
536 536 bgartdata.then(
537 537 function (result) {
538 538 //debugger;
539   - $scope.bgartData = result;
  539 + $rootScope.bgartData = result;
540 540 $scope.CalculateImageCordinates($scope.viewOrientationId);
541 541  
542 542 },
543 543 function (error) {
544 544 // handle errors here
545   - console.log(' $scope.bgartData = ' + error.statusText);
  545 + console.log(' $rootScope.bgartData = ' + error.statusText);
546 546 });
547 547 };
548 548  
... ... @@ -550,7 +550,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
550 550 //calculate coordinates for body region images
551 551 $scope.CalculateImageCordinates = function (viewOrientationId) {
552 552  
553   - // debugger;
  553 + console.log('CalculateImageCordinates');
554 554 //remove the previous layer mask data from array
555 555 var n = $rootScope.MaskCanvasData.length
556 556  
... ... @@ -577,7 +577,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
577 577  
578 578 //calculate image coordinates and draw image
579 579 var bodyRegionCoordinates = $rootScope.BodyRegionData.BodyRegionViews;
580   - // var viewOrientationId = String($scope.voId);
  580 + // var viewOrientationId = String($rootScope.voId);
581 581  
582 582  
583 583 $scope.bodyRegionCoordinates = new jinqJs()
... ... @@ -585,10 +585,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
585 585 .where('_ViewOrientationId == ' + viewOrientationId)
586 586 .select();
587 587  
588   - // if ($scope.voId == 9 || $scope.voId == 11) {
  588 + // if ($rootScope.voId == 9 || $rootScope.voId == 11) {
589 589  
590 590 $scope.bagartDetails = new jinqJs()
591   - .from($scope.bgartData.BackgroundArts.BackgroundArtDetail)
  591 + .from($rootScope.bgartData.BackgroundArts.BackgroundArtDetail)
592 592 .where('_ViewOrientationId == ' + viewOrientationId)
593 593 .select();
594 594 //}
... ... @@ -758,7 +758,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
758 758 var rectangle = scaleRectangle(value._X, value._Y, value._Height, value._Width, value._MirrorValue);
759 759  
760 760  
761   - var src = "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $scope.voId + "/layers/0/" + value._BodyRegionId + "/" + $scope.figLaefImageName;
  761 + var src = "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/0/" + value._BodyRegionId + "/" + $scope.figLaefImageName;
762 762  
763 763 $scope.DrawImage(rectangle.scaledHeight, rectangle.scaledWidth, rectangle.scaledX, rectangle.scaledY, src, 'modestyImg' + value._BodyRegionId, 'N')
764 764  
... ... @@ -883,7 +883,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
883 883  
884 884 if (bodyRegion == bodyRegionId && bodyRegionSkinTone == $scope.skinTone) {
885 885  
886   - return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $scope.voId + "/layers/" + $scope.layerNumber + "/" + bodyRegionId + "/" + $scope.skinTone + "/" + SelectedLayerData.BodyRegion[z].Image._ImageName;
  886 + return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $scope.layerNumber + "/" + bodyRegionId + "/" + $scope.skinTone + "/" + SelectedLayerData.BodyRegion[z].Image._ImageName;
887 887 }
888 888 }
889 889 }
... ... @@ -891,10 +891,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
891 891 else {
892 892 // debugger;
893 893 //below 4 bodyviews have only single body region
894   - if ($scope.voId == 9 || $scope.voId == 11 || $scope.voId == 10 || $scope.voId == 12) {
  894 + if ($rootScope.voId == 9 || $rootScope.voId == 11 || $rootScope.voId == 10 || $rootScope.voId == 12) {
895 895 var bodyRegion = SelectedLayerData.BodyRegion._BodyRegionId;
896 896  
897   - return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $scope.voId + "/layers/" + $scope.layerNumber + "/" + bodyRegionId + "/" + SelectedLayerData.BodyRegion.Image._ImageName;
  897 + return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $scope.layerNumber + "/" + bodyRegionId + "/" + SelectedLayerData.BodyRegion.Image._ImageName;
898 898  
899 899 }
900 900 else // it is for other body view which have multiple body regions and layer no > 0
... ... @@ -904,7 +904,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
904 904 var bodyRegion = SelectedLayerData.BodyRegion[z]._BodyRegionId;
905 905 if (bodyRegion == bodyRegionId) {
906 906  
907   - return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $scope.voId + "/layers/" + $scope.layerNumber + "/" + bodyRegionId + "/" + SelectedLayerData.BodyRegion[z].Image._ImageName;
  907 + return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $scope.layerNumber + "/" + bodyRegionId + "/" + SelectedLayerData.BodyRegion[z].Image._ImageName;
908 908  
909 909  
910 910 }
... ... @@ -941,12 +941,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
941 941 for (var z = 0; z <= $scope.bagartDetailsOnSktn.length; z++) {
942 942 var gender = $scope.bagartDetailsOnSktn[z]._Gender;
943 943 if (gender == selectedGender) {
944   - return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $scope.voId + "/layers/0/" + bodyRegionId + "/" + $scope.skinTone + "/" + $scope.bagartDetailsOnSktn[z]._ImageId;
  944 + return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/0/" + bodyRegionId + "/" + $scope.skinTone + "/" + $scope.bagartDetailsOnSktn[z]._ImageId;
945 945 }
946 946 }
947 947 }
948 948 else {
949   - return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $scope.voId + "/layers/0/" + bodyRegionId + "/" + $scope.skinTone + "/" + $scope.bagartDetailsOnSktn[0]._ImageId;
  949 + return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/0/" + bodyRegionId + "/" + $scope.skinTone + "/" + $scope.bagartDetailsOnSktn[0]._ImageId;
950 950  
951 951 }
952 952 }
... ... @@ -1229,7 +1229,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1229 1229 //set z index to make leaf canvas on top of hip canavs
1230 1230 imgCanvas.style.zIndex = "200";
1231 1231 }
1232   - if (($scope.voId == 11 || $scope.voId == 9) && bodyRegionId == 6) {
  1232 + if (($rootScope.voId == 11 || $rootScope.voId == 9) && bodyRegionId == 6) {
1233 1233 imgCanvas.style.zIndex = "500";
1234 1234 }
1235 1235  
... ... @@ -1302,7 +1302,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1302 1302 //see the annotation apart from leaf then the actual click will be on modesty canvas, but for annotation er
1303 1303 //
1304 1304 else if (maskCanvasId.match('modestyImg') && RGBColor == '000000') {
1305   - //if ($scope.voId == 11) {
  1305 + //if ($rootScope.voId == 11) {
1306 1306 // maskCanvasId = 'imageCanvas6_mci';
1307 1307 // x = $('#imageCanvas6_mci').left;
1308 1308 // y = $('#imageCanvas6_mci').top;
... ... @@ -1630,6 +1630,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1630 1630  
1631 1631 $scope.HighlightBodyByTermList = function (TermList) {
1632 1632  
  1633 +
  1634 + console.log('HighlightBodyByTermList is called');
  1635 +
1633 1636 $scope.highlightedBR = null;
1634 1637 $scope.highlightedBR = [];
1635 1638  
... ... @@ -1653,9 +1656,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1653 1656  
1654 1657 $timeout(function () {
1655 1658 for (var x = 0; x < 9; x++) {
1656   - // console.log('$rootScope.MaskCanvasData.length= ' + n)
1657   - // debugger
1658 1659  
  1660 + console.log('$rootScope.MaskCanvasData.length= ' + n)
  1661 + // debugger
  1662 +
1659 1663 var bodyRegionId = $rootScope.MaskCanvasData[x].bodyRegionId;
1660 1664 var canvasId = $rootScope.MaskCanvasData[x].canvasId;
1661 1665 var maskData = $rootScope.MaskCanvasData[x].maskData;
... ... @@ -3025,8 +3029,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3025 3029 }
3026 3030 if ($scope.TransparencyBoxStartX <= bodyRegionRight && value.X <= transparencyBoxRight && $scope.TransparencyBoxStartY <= bodyRegionBottom && value.Y <= transparencyBoxBottom) {
3027 3031  
3028   - //if ($scope.voId != "9") {
3029   - // if ($scope.voId != "11") {
  3032 + //if ($rootScope.voId != "9") {
  3033 + // if ($rootScope.voId != "11") {
3030 3034 // $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false);
3031 3035  
3032 3036 // }
... ... @@ -3038,7 +3042,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3038 3042 // $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false);
3039 3043 // }
3040 3044 //}
3041   - if (($scope.voId == "9" || $scope.voId == "11")) {
  3045 + if (($rootScope.voId == "9" || $rootScope.voId == "11")) {
3042 3046 if (value.bodyRegionId == "6") {
3043 3047 $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false);
3044 3048 }
... ... @@ -3385,7 +3389,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3385 3389 var length = imageData.length;
3386 3390  
3387 3391 //change background of image from transparent to white
3388   - if ($scope.voId == 9 || $scope.voId == 11) {
  3392 + if ($rootScope.voId == 9 || $rootScope.voId == 11) {
3389 3393 for (var i = 3; i < length; i += 4) {
3390 3394 imageData[i] = '#FFFFFFFF';
3391 3395 }
... ... @@ -4241,6 +4245,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4241 4245 $scope.highLightBody = function ()
4242 4246 {
4243 4247  
  4248 + console.log('highLightBody is called');
4244 4249  
4245 4250 if ($rootScope.isHighLight == true) {
4246 4251  
... ... @@ -4346,6 +4351,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4346 4351  
4347 4352 if ($scope.grayeddBR.length == 9) {
4348 4353 if ($scope.isHighlightByListManager == true) {
  4354 +
  4355 + console.log('$scope.grayeddBR.length is ' + $scope.grayeddBR.length);
4349 4356 $timeout(function () {
4350 4357  
4351 4358 // $rootScope.isHighLight = false;
... ... @@ -4569,7 +4576,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4569 4576 // $(event.currentTarget.attributes[2].value).parent().addClass("active");
4570 4577  
4571 4578 var viewname = localStorage.getItem("currentViewTitle")
4572   - var currentBodyViewId = $scope.correspondingBodyViewIds[$scope.voId];
  4579 + var currentBodyViewId = $scope.correspondingBodyViewIds[$rootScope.voId];
4573 4580  
4574 4581 if ((event.currentTarget.attributes[1].value == 'Male') && (localStorage.getItem("genderId") == 'Female')) {
4575 4582  
... ... @@ -4639,7 +4646,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4639 4646 }
4640 4647  
4641 4648  
4642   - $scope.voId = currentBodyViewId;
  4649 + $rootScope.voId = currentBodyViewId;
4643 4650  
4644 4651 var layerJsonPath = '~/../content/data/json/da/body-views/' + currentBodyViewId + '/da_dat_layer_' + currentBodyViewId + '.json';
4645 4652  
... ... @@ -4688,18 +4695,18 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4688 4695 var selectedViewId = $scope.bodyViews[event.currentTarget.attributes[1].value];
4689 4696 $scope.viewOrientationId = selectedViewId;
4690 4697 if (localStorage.getItem("genderId") == 'Male') {
4691   - if ($scope.voId != selectedViewId) {
  4698 + if ($rootScope.voId != selectedViewId) {
4692 4699 if (selectedViewId == 5) {
4693   - $scope.voId = 9;
  4700 + $rootScope.voId = 9;
4694 4701 }
4695 4702 else if (selectedViewId == 6) {
4696   - $scope.voId = 10;
  4703 + $rootScope.voId = 10;
4697 4704 }
4698 4705 else
4699   - $scope.voId = selectedViewId;
  4706 + $rootScope.voId = selectedViewId;
4700 4707 $rootScope.isLoading = true;
4701 4708  
4702   - $scope.loadSelectedBodyView($scope.voId);
  4709 + $scope.loadSelectedBodyView($rootScope.voId);
4703 4710 };
4704 4711  
4705 4712  
... ... @@ -4716,11 +4723,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4716 4723 }
4717 4724 else
4718 4725 selectedViewId = $scope.correspondingBodyViewIds[selectedViewId];;
4719   - if ($scope.voId != selectedViewId) {
4720   - $scope.voId = selectedViewId;
  4726 + if ($rootScope.voId != selectedViewId) {
  4727 + $rootScope.voId = selectedViewId;
4721 4728 $rootScope.isLoading = true;
4722 4729  
4723   - $scope.loadSelectedBodyView($scope.voId);
  4730 + $scope.loadSelectedBodyView($rootScope.voId);
4724 4731 };
4725 4732  
4726 4733  
... ... @@ -4869,6 +4876,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4869 4876  
4870 4877 }
4871 4878  
  4879 +
  4880 +
4872 4881 function OnPaintCanvasMouseMove(event) {
4873 4882  
4874 4883 if ($rootScope.isDrawingToolSelected == true) {
... ... @@ -4893,7 +4902,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4893 4902 //body highlight options functinality
4894 4903 $scope.LoadBodySystemData = function () {
4895 4904  
4896   - var currentBodyViewId = $scope.voId;
  4905 + var currentBodyViewId = $rootScope.voId;
4897 4906 var systemListHtml = '<ul class="dropdown-menu" aria-labelledby="dropdownMenu2"><li><a href="#" title="Current Structure">Current Structure</a></li> <li role="separator" class="divider"></li>'
4898 4907 var systemList = $rootScope.CommonData.DACommonData.BodySystems.Item;
4899 4908  
... ... @@ -4972,6 +4981,500 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4972 4981  
4973 4982 }
4974 4983  
  4984 + //list manager
  4985 + $scope.$on('listManagerEvent', function (event, data) {
  4986 + // debugger;
  4987 + console.log('listManagerEvent')
  4988 + if ($rootScope.islistManagerEventAlredayDispachted == true) {
  4989 +
  4990 +
  4991 + var systemList = $rootScope.CommonData.DACommonData.BodySystems.Item;
  4992 +
  4993 + //var systemListHtml = '<option value="0" selected="">All</option>'
  4994 +
  4995 + var $all = $('<option ng-click=refreshTermListOnSystemSelection($event) id="0" selected="">All</option>').appendTo('#bodySystems');
  4996 + $compile($all)($scope);
  4997 +
  4998 + angular.forEach(systemList, function (value, key) {
  4999 +
  5000 + var $elem = $('<option ng-click=refreshTermListOnSystemSelection($event) id="' + value._BodySystemId + '" title="' + value._Name + '" >' + value._Name + '</option>').appendTo('#bodySystems');
  5001 + $compile($elem)($scope);
  5002 + // systemListHtml = systemListHtml + '<<option id="' + value._BodySystemId + '" title="' + value._Name + '" ng-click=" $scope.refreshTermListOnSystemSelection(event)">' + value._Name + '</option>'
  5003 + })
  5004 +
  5005 +
  5006 + // $('#bodySystems').append(systemListHtml);
  5007 +
  5008 +
  5009 + var currentView = localStorage.getItem("currentViewTitle");
  5010 + var viewNmeHtml = '<option>' + currentView + '</option>'
  5011 + $('#viewName').append(viewNmeHtml);
  5012 +
  5013 + var len = $rootScope.openModules.length;
  5014 + var openViewLen = $rootScope.openViews.length;
  5015 +
  5016 + var currentOpenModuleId = $rootScope.openModules[len - 1].ModuleId;
  5017 + var currentOpenViewId = $rootScope.openViews[openViewLen - 1].BodyViewId;
  5018 + $rootScope.viewOrientationId = currentOpenViewId;
  5019 + //confirm that this is DA module which is last open
  5020 + if (currentOpenModuleId == 1) {
  5021 + $http({ method: 'GET', url: '~/../content/data/json/da/body-views/' + currentOpenViewId + '/da_dat_tm_sg_' + currentOpenViewId + '.json' }).success(function (data) {
  5022 + $scope.TermNumberData = data;
  5023 + var actualtermList = new jinqJs()
  5024 + .from($scope.TermNumberData.TermData.Term)
  5025 + .select('_ActualTermNumber');
  5026 +
  5027 + var TermTextList = [];
  5028 + var TermTextList = [];
  5029 +
  5030 + $scope.loadListManger();
  5031 +
  5032 +
  5033 + })
  5034 + .error(function (data, status, headers, config) {
  5035 +
  5036 + console.log(data);
  5037 +
  5038 + });
  5039 +
  5040 +
  5041 +
  5042 + $rootScope.islistManagerEventAlredayDispachted = false;
  5043 + var jj;
  5044 + }
  5045 +
  5046 + }
  5047 +
  5048 +
  5049 +
  5050 + });
  5051 +
  5052 + $scope.loadListManger = function () {
  5053 +
  5054 +
  5055 +
  5056 + var path = '~/../content/data/json/da/vocab/english/cm_dat_vocabterm_1.json'
  5057 +
  5058 + $http({ method: 'GET', url: '~/../content/data/json/da/vocab/english/cm_dat_vocabterm_1.json' }).success(function (data) {
  5059 +
  5060 + var VocabTermData = data;
  5061 +
  5062 + var vocabTermTxt = [];
  5063 +
  5064 + angular.forEach($scope.TermNumberData.TermData.Term, function (value1, key1) {
  5065 +
  5066 + angular.forEach(VocabTermData.VocabTerms.Term, function (value2, key2) {
  5067 +
  5068 +
  5069 + if (value1._ActualTermNumber === value2._ActualTermNumber) {
  5070 + vocabTermTxt.push(
  5071 +
  5072 + {
  5073 +
  5074 + "_ActualTermNumber": value2._ActualTermNumber,
  5075 +
  5076 + "_TermText": value2._TermText,
  5077 +
  5078 + "_cdId": value2._cdId
  5079 +
  5080 + }
  5081 +
  5082 + );
  5083 +
  5084 + }
  5085 +
  5086 + })
  5087 +
  5088 +
  5089 +
  5090 + })
  5091 +
  5092 +
  5093 +
  5094 + $scope.VocabTermTxt = new jinqJs()
  5095 +
  5096 + .from(vocabTermTxt)
  5097 +
  5098 + .distinct('_TermText', '_ActualTermNumber')
  5099 +
  5100 + .orderBy([{ field: '_TermText', sort: 'asc' }])
  5101 +
  5102 + .select('_ActualTermNumber', '_TermText', '_cdId');
  5103 +
  5104 +
  5105 + for (var j = 0; j < $scope.VocabTermTxt.length; j++) {
  5106 + var $el = $('<option ng-click=HighlightBodyOnListManagerSelection($event) id=' + $scope.VocabTermTxt[j]._ActualTermNumber + '>' + $scope.VocabTermTxt[j]._TermText + '</option>').appendTo('#termList')
  5107 + $compile($el)($scope);
  5108 + }
  5109 + var termsTotal = '<span class="pull-left marginTop5">' + $scope.VocabTermTxt.length + ' Structures</span>';
  5110 + $("#totalTerms").empty();
  5111 + $('#totalTerms').append(termsTotal);
  5112 +
  5113 + $rootScope.isLoading = false;
  5114 + $('#spinner').css('visibility', 'hidden');
  5115 +
  5116 + })
  5117 +
  5118 + .error(function (data, status, headers, config) {
  5119 +
  5120 + console.log(data);
  5121 +
  5122 + });
  5123 + }
  5124 +
  5125 +
  5126 + $scope.HighlightBodyOnListManagerSelection = function (event) {
  5127 +
  5128 +
  5129 + //debugger
  5130 + $rootScope.isListManagerSelected = true;
  5131 + $rootScope.isLoading = true;
  5132 +
  5133 + $('#spinner').css('visibility', 'visible');
  5134 + //1.
  5135 + var actualTermNumber = event.currentTarget.id;//attributes[0].value;
  5136 + $scope.TermList = $scope.getTermNumberList(actualTermNumber);
  5137 +
  5138 + //2.
  5139 + var internalLayerNumberList = [];
  5140 + for (var i = 0; i < $scope.TermList.length; i++) {
  5141 + var layerNumber = $scope.TermList[i]._InternalLayerNumber
  5142 +
  5143 + internalLayerNumberList[i] = parseInt(layerNumber);
  5144 + }
  5145 +
  5146 + internalLayerNumberList.sort(function (a, b) { return a - b })
  5147 + var internalLayerNumber = internalLayerNumberList[0]//.replace('00', '');
  5148 +
  5149 + //3. get layer number
  5150 + if (internalLayerNumber >= DA[0].SKIN_START_INTERNAL_LAYER && internalLayerNumber <= DA[0].SKIN_END_INTERNAL_LAYER) {
  5151 +
  5152 + internalLayerNumber = DA[0].SKIN_DEFAULT_INTERNAL_LAYER;
  5153 + }
  5154 +
  5155 + var layerNumber;
  5156 + var matchedLayerNumber = new jinqJs()
  5157 + .from($rootScope.BodyLayerData.Layers.DataLayer)
  5158 + .where("_lni == " + internalLayerNumber)
  5159 + .select('_LayerNumber');
  5160 +
  5161 + if (matchedLayerNumber == null || matchedLayerNumber.length == 0) {
  5162 + layerNumber = 0;
  5163 + }
  5164 + else {
  5165 + layerNumber = matchedLayerNumber[0]._LayerNumber
  5166 + }
  5167 +
  5168 + if (layerNumber == 0) {
  5169 + layerNumber = $scope.totalLayers;
  5170 + }
  5171 + else {
  5172 + layerNumber = parseInt(layerNumber) - 1;
  5173 + }
  5174 +
  5175 + $scope.layerNumber = layerNumber;
  5176 +
  5177 + //4.get scroll position
  5178 + if (actualTermNumber != DA[0].SKIN_TERM_ID) {
  5179 +
  5180 + $scope.termCoordinate = $scope.getTermCoordinate(actualTermNumber);
  5181 +
  5182 + }
  5183 +
  5184 + //5.
  5185 + $scope.matchdedDataOnLayer = new jinqJs()
  5186 + .from($scope.TermNumberData.TermData.Term)
  5187 + .where('_InternalLayerNumber == ' + internalLayerNumber)
  5188 + .select();
  5189 +
  5190 + //6.
  5191 + var matchedDataonActualTerm = new jinqJs()
  5192 + .from($scope.matchdedDataOnLayer)
  5193 + .where('_ActualTermNumber == ' + actualTermNumber)
  5194 + .select('_TermNumber');
  5195 +
  5196 +
  5197 + var termNo = matchedDataonActualTerm[0]._TermNumber.toString();
  5198 +
  5199 + //7.get termList
  5200 + $scope.fullTermlist = [];
  5201 + $scope.AllTerms = [];
  5202 +
  5203 + if (termNo != DA[0].figLeafTermId) {
  5204 +
  5205 + $scope.getChildTermList(termNo);
  5206 + // $timeout(function () { $scope.getSiblings(termNo) }, 50);
  5207 + $scope.getSiblings(termNo)
  5208 + }
  5209 +
  5210 +
  5211 +
  5212 +
  5213 + $('#txtlayerNumber').val((parseInt($scope.layerNumber)));
  5214 + $('#layerChangeSlider').slider("option", "value", parseInt($scope.totalLayers) - parseInt($scope.layerNumber));
  5215 +
  5216 + //8.remove current layer canavses
  5217 + for (var i = 1; i < 7; i++) {
  5218 +
  5219 + var id;
  5220 + var maskId;
  5221 +
  5222 + id = 'imageCanvas' + i;
  5223 + maskId = 'imageCanvas' + i + '_mci';
  5224 +
  5225 + var canvas = document.getElementById(id);
  5226 + document.getElementById('canvasDiv').removeChild(canvas);
  5227 +
  5228 + var maskcanvas = document.getElementById(maskId);
  5229 + document.getElementById('canvasDiv').removeChild(maskcanvas);
  5230 +
  5231 + if (i == 4 || i == 5 || i == 6) {
  5232 + id = 'imageCanvas' + i + '_MR';
  5233 + maskId = 'imageCanvas' + i + '_MR_mci';
  5234 +
  5235 + var canvas = document.getElementById(id);
  5236 + document.getElementById('canvasDiv').removeChild(canvas);
  5237 +
  5238 + var maskcanvas = document.getElementById(maskId);
  5239 + document.getElementById('canvasDiv').removeChild(maskcanvas);
  5240 + }
  5241 +
  5242 + //remove modesty canavs
  5243 + var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']");
  5244 + for (var j = 0; j < modestyCanvases.length; j++) {
  5245 + modestyCanvases[j].remove();
  5246 + }
  5247 + }
  5248 +
  5249 + //9.
  5250 + $timeout(function () {
  5251 + $rootScope.isHighLight = false;
  5252 + $scope.CalculateImageCordinates($scope.viewOrientationId)
  5253 + }, 10);
  5254 +
  5255 + $scope.isHighlightByListManager = true;
  5256 +
  5257 + //10.
  5258 + $timeout(function () {
  5259 + $rootScope.isHighLight = true;
  5260 + $scope.highLightBody()
  5261 + }, 500);
  5262 + //$timeout(function () {
  5263 +
  5264 + // // $rootScope.isHighLight = false;
  5265 +
  5266 + // $scope.HighlightBodyByTermList($scope.TermList)
  5267 + //}, 2000);
  5268 +
  5269 + //4.get scroll position
  5270 +
  5271 + }
  5272 +
  5273 + $scope.getChildTermList = function (termNo) {
  5274 +
  5275 +
  5276 + var data = new jinqJs()
  5277 + .from($scope.matchdedDataOnLayer)
  5278 + .where("_ParentTermNumber == " + termNo)
  5279 + .select();
  5280 +
  5281 + var data2 = new jinqJs()
  5282 + .from(data)
  5283 + .where("_TermNumber != " + termNo)
  5284 + .select();
  5285 +
  5286 + var k;
  5287 + if (data2 != null && data2.length > 0) {
  5288 + for (var i = 0; i < data2.length; i++) {
  5289 +
  5290 + var serachTerm = data2[i]._TermNumber;
  5291 + var isFound = jQuery.inArray(serachTerm, $scope.fullTermlist)
  5292 + if (isFound == -1) {
  5293 + $scope.fullTermlist.push(serachTerm);
  5294 + $scope.AllTerms.push({ '_TermNumber': serachTerm })
  5295 + $scope.getChildTermList(serachTerm);
  5296 + }
  5297 + }
  5298 + }
  5299 + }
  5300 +
  5301 + $scope.getSiblings = function (termNo) {
  5302 +
  5303 + var data = new jinqJs()
  5304 + .from($scope.matchdedDataOnLayer)
  5305 + .where("_TermNumber == " + termNo)
  5306 + .select();
  5307 + var termNo = data[0]._ActualTermNumber;
  5308 +
  5309 + var data2 = new jinqJs()
  5310 + .from($scope.matchdedDataOnLayer)
  5311 + .where("_ActualTermNumber == " + termNo)
  5312 + .select();
  5313 +
  5314 + if (data2 != null && data2.length > 0) {
  5315 + for (var i = 0; i < data2.length; i++) {
  5316 + $scope.fullTermlist.push(data2[i]._TermNumber);
  5317 + $scope.AllTerms.push({ '_TermNumber': data2[i]._TermNumber })
  5318 + $scope.getChildTermList(data2[i]._TermNumber);
  5319 + }
  5320 + }
  5321 + }
  5322 +
  5323 + $scope.getTermCoordinate = function (actualTermNumber) {
  5324 +
  5325 + return {
  5326 + x: $scope.TermList[0]._CenterX,
  5327 + y: $scope.TermList[0]._CenterY
  5328 + }
  5329 + }
  5330 +
  5331 + $scope.aligneCanvasWithTerm = function () {
  5332 + console.log('aligneCanvasWithTerm')
  5333 + var newX = parseInt($scope.scaleValue($scope.termCoordinate.x, $scope.zoomInOut, DA[0].ZOOM_TERM_DATA));
  5334 + var newY = parseInt($scope.scaleValue($scope.termCoordinate.y, $scope.zoomInOut, DA[0].ZOOM_TERM_DATA));
  5335 +
  5336 + var canvasX = parseInt($('#canvasDiv').css('left'));
  5337 + var canvasY = parseInt($('#canvasDiv').css('top'));
  5338 + var canvasWidth = parseInt($('#canvasDiv').css('width'));
  5339 + var canvasHeight = parseInt($('#canvasDiv').css('height'));
  5340 + var canvasBottom = canvasY + canvasHeight;
  5341 + var canvasRight = canvasX + canvasWidth
  5342 +
  5343 +
  5344 + if (newX >= canvasX && newX <= canvasRight && newY >= canvasY && newY <= canvasBottom) {
  5345 +
  5346 + }
  5347 + else {
  5348 + newX = newX - canvasWidth / 2;
  5349 + newY = newY - canvasHeight / 2;
  5350 +
  5351 + }
  5352 +
  5353 +
  5354 +
  5355 + console.log('newX =' + newX + ',newY= ' + newY)
  5356 + $('#canvasDiv').scrollLeft(newX);
  5357 + $('#canvasDiv').scrollTop(newY);
  5358 +
  5359 +
  5360 + }
  5361 +
  5362 + $scope.scaleValue = function (nValue, nNewZoom, nExistingZoom) {
  5363 +
  5364 + var iReturnValue = nValue * nNewZoom;
  5365 + return Math.round(iReturnValue / nExistingZoom);
  5366 + }
  5367 +
  5368 + $scope.refreshTermListOnSystemSelection = function (event) {
  5369 +
  5370 + $('#termList').empty();
  5371 + // $('#termList').innerHTML = '';
  5372 +
  5373 + if (event.currentTarget.id == 0) {
  5374 + $scope.loadListManger();
  5375 + }
  5376 + else {
  5377 + var bodySystemDataPath = '~/../content/data/json/da/body-views/' + localStorage.getItem("currentBodyViewId") + '/da_dat_body_system_term_' + localStorage.getItem("currentBodyViewId") + '.json';
  5378 + DataService.getJson(bodySystemDataPath)
  5379 + .then(
  5380 + function (result) {
  5381 +
  5382 + $rootScope.BodySystemData = result;
  5383 + var systemMatchedTermList = new jinqJs()
  5384 + .from($rootScope.BodySystemData.BodySystem.BodySystemTerm)
  5385 + .where('_SystemNumber == ' + event.currentTarget.id)
  5386 + .select();
  5387 +
  5388 + $scope.refreshTerms(systemMatchedTermList);
  5389 + },
  5390 + function (error) {
  5391 + console.log(error.statusText)
  5392 + }
  5393 + )
  5394 +
  5395 + }
  5396 + }
  5397 +
  5398 + $scope.refreshTerms = function (termList) {
  5399 +
  5400 + var path = '~/../content/data/json/da/vocab/english/cm_dat_vocabterm_1.json'
  5401 +
  5402 + $http({ method: 'GET', url: '~/../content/data/json/da/vocab/english/cm_dat_vocabterm_1.json' }).success(function (data) {
  5403 +
  5404 + var VocabTermData = data;
  5405 +
  5406 + var vocabTermTxt = [];
  5407 +
  5408 + for (var i = 0; i < termList.length; i++) {
  5409 +
  5410 + var actulaTermNumber = new jinqJs()
  5411 + .from($scope.TermNumberData.TermData.Term)
  5412 + .where('_TermNumber == ' + termList[i]._TermNumber)
  5413 + .select('_ActualTermNumber');
  5414 + angular.forEach(VocabTermData.VocabTerms.Term, function (value2, key2) {
  5415 +
  5416 +
  5417 + if (actulaTermNumber[0]._ActualTermNumber == value2._ActualTermNumber) {
  5418 + vocabTermTxt.push(
  5419 +
  5420 + {
  5421 +
  5422 + "_ActualTermNumber": value2._ActualTermNumber,
  5423 +
  5424 + "_TermText": value2._TermText,
  5425 +
  5426 + "_cdId": value2._cdId
  5427 +
  5428 + }
  5429 +
  5430 + );
  5431 +
  5432 + }
  5433 +
  5434 + })
  5435 +
  5436 + }
  5437 +
  5438 +
  5439 +
  5440 +
  5441 +
  5442 + $scope.VocabTermTxt = new jinqJs()
  5443 +
  5444 + .from(vocabTermTxt)
  5445 +
  5446 + .distinct('_TermText', '_ActualTermNumber')
  5447 +
  5448 + .orderBy([{ field: '_TermText', sort: 'asc' }])
  5449 +
  5450 + .select('_ActualTermNumber', '_TermText', '_cdId');
  5451 +
  5452 +
  5453 + for (var j = 0; j < $scope.VocabTermTxt.length; j++) {
  5454 + var $el = $('<option ng-click=HighlightBodyOnListManagerSelection($event) id=' + $scope.VocabTermTxt[j]._ActualTermNumber + '>' + $scope.VocabTermTxt[j]._TermText + '</option>').appendTo('#termList')
  5455 + $compile($el)($scope);
  5456 + }
  5457 +
  5458 + var termsTotal = '<span class="pull-left marginTop5">' + $scope.VocabTermTxt.length + ' Structures</span>';
  5459 + $("#totalTerms").empty();
  5460 + //$('#totalTerms').innerHTML = '';
  5461 +
  5462 + $('#totalTerms').append(termsTotal);
  5463 + $rootScope.isLoading = false;
  5464 + $('#spinner').css('visibility', 'hidden');
  5465 +
  5466 + })
  5467 +
  5468 + .error(function (data, status, headers, config) {
  5469 +
  5470 + console.log(data);
  5471 +
  5472 + });
  5473 +
  5474 +
  5475 + }
  5476 +
  5477 +
4975 5478 }]
4976 5479  
4977 5480 );
4978 5481 \ No newline at end of file
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... ... @@ -209,17 +209,43 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
209 209  
210 210 //list manager function
211 211  
  212 + //list manager function
  213 +
212 214 $rootScope.ShowListManager = function () {
  215 + console.log('ShowListManager')
213 216  
214 217 $('#listManager').css('display', 'block');
  218 + $("#listManager").css("visibility", "visible");
  219 + $('#listManager').draggable();
215 220  
216 221 $rootScope.isLoading = true;
217 222 $('#spinner').css('visibility', 'visible');
218 223 $rootScope.islistManagerEventAlredayDispachted = true;
219   -
  224 +
220 225 $rootScope.$broadcast('listManagerEvent', true);
221 226 }
222 227  
  228 + $rootScope.CloseListManager = function () {
  229 + console.log('close')
  230 + $rootScope.isListManagerSelected = false;
  231 + $('#listManager').css('display', 'none');
  232 + $("#listManager").css("visibility", "hidden");
  233 + // $rootScope.isAnnotationWindowClose = true;
  234 + // if('#termList')
  235 + if ($('#termList option').length > 0) {
  236 + //$('#termList option') = null;
  237 + //$('#termList').innerHTML='';
  238 + $('#termList')
  239 + .find('option')
  240 + .remove()
  241 + .end()
  242 + if ($('#termList option').length > 0) {
  243 +
  244 + }
  245 + }
  246 +
  247 +
  248 + }
223 249  
224 250 function fillListManagerTerms() {
225 251  
... ...
400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js
... ... @@ -162,6 +162,11 @@ AIA.constant(&#39;DA&#39;, [
162 162 ethnicity: 'W',
163 163 modesty: 'Y',
164 164 figLeafTermId: '5868',
  165 + SKIN_START_INTERNAL_LAYER: 100,
  166 + SKIN_END_INTERNAL_LAYER: 199,
  167 + SKIN_DEFAULT_INTERNAL_LAYER: 100,
  168 + ZOOM_TERM_DATA: 50,
  169 + SKIN_TERM_ID: 1
165 170 },
166 171 ]);
167 172  
... ...
400-SOURCECODE/AIAHTML5.Web/index.html
... ... @@ -282,118 +282,109 @@
282 282 </div>
283 283  
284 284 <!--List manager-->
285   -
286 285 <style>
287   - select[multiple], select[size] {
288   - height: 100%;
289   - }
  286 + #listManager {
  287 + background:#fff; border-radius:3px; border:1px solid #ededed;
  288 + -webkit-box-shadow: 0px 0px 2px 1px rgba(173,173,173,1);
  289 + -moz-box-shadow: 0px 0px 2px 1px rgba(173,173,173,1);
  290 + box-shadow: 0px 0px 2px 1px rgba(173,173,173,1);
  291 + width:350px;
  292 + position:absolute;top:170px;left:140px;display:none;z-index:1100;
  293 +
  294 + }
  295 + #listManager .annotation-modal-header{ background:#818f44; padding:2px 10px; }
  296 + #listManager .annotation-modal-header h4{ color:#fff; font-size:15px; line-height:20px;}
  297 + #listManager .modal-header .close{ color:#fff; margin:0; opacity:10; text-shadow:none;}
  298 + #listManager .modal-footer{ padding:5px 10px;}
  299 +
  300 + </style>
  301 + <div id="listManager" style="">
  302 + <div class="modal-header annotation-modal-header">
  303 + <button type="button" class="close" aria-label="Close" ng-click="CloseListManager()"><span aria-hidden="true">&times;</span></button>
  304 + <h4 class="modal-title" id="myModalLabel">List Manager</h4>
  305 + </div>
  306 + <div class="modal-body">
  307 + <div class="row paddingTopBtm10">
  308 + <div class="col-sm-12" ng-init="FillListManager()">
  309 +
  310 + <div class="form-group">
  311 + <label for="sel1">Window</label>
  312 + <select class="form-control" id="viewName">
  313 + <!--<option>Male Lateral</option>-->
  314 +
  315 + </select>
  316 + </div>
  317 + <div style="">
  318 + <div class="form-group">
  319 + <div onclick="mytoggle()" class="btn btn-success btn-block" style="padding:3px 12px;">
  320 + <i class=" fa fa-caret-right"></i> <span>Restrict List to</span>
  321 + </div>
  322 + </div>
  323 +
  324 + <div id="divSection" style="display:none;">
  325 +
  326 +
  327 +
  328 + <div class="well well-sm marginTopBtm10">
  329 + <div class="form-horizontal">
  330 + <div class="form-group">
  331 + <label class="col-sm-4 control-label" for="System">System</label>
  332 + <div class="col-sm-8">
  333 + <select id="bodySystems" class="form-control"></select>
  334 + </div>
  335 + </div>
  336 + <div class="form-group">
  337 + <label class="col-sm-4 control-label" for="inputPassword3">Area</label>
  338 + <div class="col-sm-8">
  339 + <select class="form-control">
  340 + <option value="1" selected="">Entire View</option>
  341 + </select>
  342 + </div>
  343 + </div>
  344 + </div>
  345 + </div>
  346 +
  347 +
  348 + </div>
  349 +
  350 +
  351 +
  352 + <div class="form-group">
  353 + <select id="termList" class="form-control" multiple="" size="10"></select>
  354 + </div>
  355 +
  356 + </div>
  357 + <div style="clear:both;"></div>
  358 +
  359 +
  360 +
  361 +
  362 + </div>
  363 + </div>
  364 +
  365 + </div>
  366 + <div class="modal-footer" id="totalTerms">
  367 + <!--<span class="pull-left marginTop5">424 Structures</span>-->
  368 + <button data-dismiss="modal" class="btn btn-primary" type="button"><i class="fa fa-arrow-circle-right"></i></button>
  369 + </div>
  370 + </div>
  371 + <script>
  372 + function mytoggle() {
  373 + var div = document.getElementById("divSection");
  374 + if (div.style.display == 'block') {
  375 + div.style.display = 'none';
  376 + return;
  377 + }
  378 + div.style.display = 'block';
  379 + }
  380 + </script>
  381 +
  382 +
  383 +
290 384  
291   - .container {
292   - margin-left: auto;
293   - margin-right: auto;
294   - padding-left: 15px;
295   - padding-right: 15px;
296   - }
297   - </style>
298   - <div id="listManager" style="position:fixed;top:80px;left:300px;display:none;z-index:1100;">
299   - <div class="container" style="background:white;width:400px;height:500px;" ng-init="FillListManager()">
300   - <div class="form-group">
301   - <label for="sel1">Window</label>
302   - <select class="form-control" id="sel1">
303   - <option>Male Lateral</option>
304   -
305   - </select>
306   - </div>
307   - <div style="">
308   - <div onclick="mytoggle()">
309   - <span class="caret"></span> <span>Restrict List to</span>
310   - </div>
311   - <div id="divSection" style="display:none;">
312   - <div class="form-group form-inline">
313   - <label for=" email">
314   - System
315   - </label>
316   - <select class="form-control" id="sel1">
317   - <option>ALL</option>
318   - <option>Male Lateral</option>
319   -
320   - </select>
321   - </div>
322   - <div class="form-group form-inline">
323   - <label for=" email">
324   - Area:
325   - </label>
326   - <select class="form-control" id="sel1">
327   - <option>Entire View</option>
328   - <option>Entire View</option>
329   -
330   - </select>
331   - </div>
332   - </div>
333   - <div style="background:white;width:100%;height:400px;">
334   - <select id="termList" class="form-control" multiple="">
335   - <!--<option>ABC</option>
336   - <option>ABC</option>
337   - <option>ABC</option>
338   - <option>ABC</option>
339   - <option>ABC</option>
340   - <option>ABC</option>
341   - <option>ABC</option>
342   - <option>ABC</option>
343   - <option>ABC</option>
344   - <option>ABC</option>
345   - <option>ABC</option>
346   - <option>ABC</option>
347   - <option>ABC</option>
348   - <option>ABC</option>
349   - <option>ABC</option>
350   - <option>ABC</option>
351   - <option>ABC</option>
352   - <option>ABC</option>
353   - <option>ABC</option>
354   - <option>ABC</option>
355   - <option>ABC</option>
356   - <option>ABC</option>
357   - <option>ABC</option>
358   - <option>ABC</option>
359   - <option>ABC</option>
360   - <option>ABC</option>
361   - <option>ABC</option>
362   - <option>ABC</option>
363   - <option>ABC</option>
364   - <option>ABC</option>
365   - <option>ABC</option>
366   - <option>ABC</option>
367   - <option>ABC</option>
368   - <option>ABC</option>
369   - <option>ABC</option>
370   - <option>ABC</option>
371   - <option>ABC</option>
372   - <option>ABC</option>
373   - <option>ABC</option>
374   - <option>ABC</option>
375   - <option>ABC</option>
376   - <option>ABC</option>-->
377   -
378   - </select>
379   - </div>
380   - </div>
381   - <div style="clear:both;"></div>
382   - <div>
383   - <div style="float:left;">2330 Structure</div>
384   -
385   - <div style="float:right;">
386   - <div>
387   - icon
388   - <span class="caret"></span>
389   - </div>
390 385  
391   - </div>
392 386  
393 387  
394   - </div>
395   - </div>
396   - </div>
397 388 <script>
398 389 function mytoggle() {
399 390 var div = document.getElementById("divSection");
... ...