Commit ee92d6b82a99f1fb194b3b3bfc2dce2e9a5f96c0

Authored by Nikita Kulshreshtha
1 parent 69379ea4

list manager implemeted but highlight is not working in list manager

400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -8,16 +8,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
8 8 $scope.BodyViewData;
9 9 $scope.selectedGenderBodyViewData;
10 10 $scope.imagePath = "";
11   - $scope.BodyRegionData;
12   - $scope.BodyRegionCordinatesData;
  11 + $rootScope.BodyRegionData;
  12 + $rootScope.BodyRegionCordinatesData;
13 13 $scope.isTransparencyActivated;
14   - $scope.BodyLayerData;
  14 + $rootScope.BodyLayerData;
15 15 $scope.VocabTermData;
16 16 $scope.CommonData
17 17 $scope.TermNumberData;
18 18 $rootScope.BodySystemData
19 19 $scope.bodyViewId = 0;
20   - $scope.bgartData;
  20 + $rootScope.bgartData;
21 21 //view specific constants
22 22 $scope.voId;
23 23 $scope.layerNumber;
... ... @@ -260,7 +260,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
260 260 brViewdata.then(
261 261 function (result) {
262 262 // debugger;
263   - $scope.BodyRegionData = result;
  263 + $rootScope.BodyRegionData = result;
264 264 $scope.isBodyRegionDataLoaded = true;
265 265 // alert('da_dat_brview= ' + result)
266 266  
... ... @@ -278,7 +278,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
278 278 function (result) {
279 279 //debugger;
280 280  
281   - $scope.BodyLayerData = result;
  281 + $rootScope.BodyLayerData = result;
282 282 $scope.isBodylayerdataLoaded = true;
283 283  
284 284 //load json for annotations
... ... @@ -385,13 +385,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
385 385 },
386 386 function (error) {
387 387 // handle errors here
388   - console.log(' $scope.BodyLayerData= ' + error.statusText);
  388 + console.log(' $rootScope.BodyLayerData= ' + error.statusText);
389 389 }
390 390 );
391 391 },
392 392 function (error) {
393 393 // handle errors here
394   - console.log(' $scope.BodyRegionData = ' + error.statusText);
  394 + console.log(' $rootScope.BodyRegionData = ' + error.statusText);
395 395 }
396 396 );
397 397  
... ... @@ -448,7 +448,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
448 448 bgartdata.then(
449 449 function (result) {
450 450 //debugger;
451   - $scope.bgartData = result;
  451 + $rootScope.bgartData = result;
452 452 $scope.CalculateImageCordinates($scope.viewOrientationId);
453 453  
454 454 },
... ... @@ -462,7 +462,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
462 462 //calculate coordinates for body region images
463 463 $scope.CalculateImageCordinates = function (viewOrientationId) {
464 464  
465   - // debugger;
  465 +
466 466 //remove the previous layer mask data from array
467 467 var n = $scope.MaskCanvasData.length
468 468  
... ... @@ -478,7 +478,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
478 478 }
479 479  
480 480 //set height of canvas div and left tool bar as per window size
481   - $scope.BodyRegionCordinatesData = []; // create an empty array
  481 + $rootScope.BodyRegionCordinatesData = []; // create an empty array
482 482  
483 483 $('#daBodyview').css('width', '100%');
484 484 $('#canvasDiv').css('height', $('#daImagePanel').outerHeight() - 104)
... ... @@ -488,7 +488,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
488 488  
489 489  
490 490 //calculate image coordinates and draw image
491   - var bodyRegionCoordinates = $scope.BodyRegionData.BodyRegionViews;
  491 + var bodyRegionCoordinates = $rootScope.BodyRegionData.BodyRegionViews;
492 492 // var viewOrientationId = String($scope.voId);
493 493  
494 494  
... ... @@ -500,7 +500,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
500 500 // if ($scope.voId == 9 || $scope.voId == 11) {
501 501  
502 502 $scope.bagartDetails = new jinqJs()
503   - .from($scope.bgartData.BackgroundArts.BackgroundArtDetail)
  503 + .from($scope.bgartData.BackgroundArts.BackgroundArtDetail)
504 504 .where('_ViewOrientationId == ' + viewOrientationId)
505 505 .select();
506 506 //}
... ... @@ -510,7 +510,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
510 510 angular.forEach($scope.bodyRegionCoordinates, function (value, key) {
511 511  
512 512  
513   -
514 513 if (value._HaveMirrorImage == 'Y') {
515 514  
516 515 //DrawMirroredImage
... ... @@ -538,7 +537,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
538 537 //2.Draw mirror image
539 538 $scope.DrawMirroredImage(Math.round(rectangle.scaledHeight), Math.round(rectangle.scaledWidth), Math.round(rectangle.scaledX), Math.round(rectangle.scaledY), src, value._BodyRegionId, 'N');
540 539 // debugger;
541   - $scope.BodyRegionCordinatesData.push(
  540 + $rootScope.BodyRegionCordinatesData.push(
542 541 {
543 542 "bodyRegionId": value._BodyRegionId, "Height": Math.round(rectangle.scaledHeight), "Width": Math.round(rectangle.scaledWidth),
544 543 "X": Math.round(rectangle.scaledX), "Y": Math.round(rectangle.scaledY), "IsMirror": 'Yes'
... ... @@ -571,7 +570,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
571 570  
572 571 //1.Draw body region which have mirror image
573 572 $scope.DrawImage(Math.round(rectangle.scaledHeight), Math.round(rectangle.scaledWidth), Math.round(rectangle.scaledX), Math.round(rectangle.scaledY), src, value._BodyRegionId, 'N');
574   - $scope.BodyRegionCordinatesData.push(
  573 + $rootScope.BodyRegionCordinatesData.push(
575 574 {
576 575 "bodyRegionId": value._BodyRegionId, "Height": Math.round(rectangle.scaledHeight), "Width": Math.round(rectangle.scaledWidth),
577 576 "X": Math.round(rectangle.scaledX), "Y": Math.round(rectangle.scaledY), "IsMirror": 'No'
... ... @@ -614,7 +613,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
614 613 //2.Draw body region which don't have mirror image
615 614 $scope.DrawImage(Math.round(rectangle.scaledHeight), Math.round(rectangle.scaledWidth), Math.round(rectangle.scaledX), Math.round(rectangle.scaledY), src, value._BodyRegionId, 'N');
616 615  
617   - $scope.BodyRegionCordinatesData.push(
  616 + $rootScope.BodyRegionCordinatesData.push(
618 617 {
619 618 "bodyRegionId": value._BodyRegionId, "Height": Math.round(rectangle.scaledHeight), "Width": Math.round(rectangle.scaledWidth),
620 619 "X": Math.round(rectangle.scaledX), "Y": Math.round(rectangle.scaledY), "IsMirror": 'No'
... ... @@ -768,7 +767,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
768 767  
769 768 $scope.GetImageSource = function (bodyRegionId) {
770 769 // debugger;
771   - var dataLength = $scope.BodyLayerData.Layers.DataLayer.length;
  770 + var dataLength = $rootScope.BodyLayerData.Layers.DataLayer.length;
772 771  
773 772 //set max for LayerNumber input
774 773 $scope.totalLayers = dataLength - 1;
... ... @@ -783,7 +782,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
783 782  
784 783  
785 784 var SelectedLayerData = [];
786   - SelectedLayerData = $scope.BodyLayerData.Layers.DataLayer[dataLength - $scope.userInput - 1];
  785 + SelectedLayerData = $rootScope.BodyLayerData.Layers.DataLayer[dataLength - $scope.userInput - 1];
787 786 if ($scope.layerNumber == 0) {
788 787 for (var z = 0; z <= SelectedLayerData.BodyRegion.length; z++) {
789 788  
... ... @@ -1402,7 +1401,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1402 1401  
1403 1402 $scope.HighlightBodyByTermList = function (TermList) {
1404 1403  
1405   -
  1404 + // debugger
1406 1405 //terminate previous running workers to create space for new workers
1407 1406 var workerCount = $scope.runningWorkers.length;
1408 1407 if (workerCount > 0) {
... ... @@ -3172,6 +3171,25 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3172 3171 };
3173 3172  
3174 3173  
  3174 + //clsoe worker process
  3175 + $scope.$on('jsPanelCloseEvent', function (event, data) {
  3176 +
  3177 + console.log('terminate worker process')
  3178 + //terminate previous running workers to create space for new workers
  3179 + if ($scope.runningWorkers != null) {
  3180 + var workerCount = $scope.runningWorkers.length;
  3181 + if (workerCount > 0) {
  3182 + for (var i = workerCount - 1; i >= 0; i--) {
  3183 + var runningWorker = $scope.runningWorkers[i].workerName;
  3184 + runningWorker.terminate();
  3185 + $scope.runningWorkers.splice(i, 1);
  3186 + // workerCount--;
  3187 + }
  3188 + }
  3189 + }
  3190 +
  3191 + })
  3192 +
3175 3193 $scope.OnIdentityClick = function () {
3176 3194  
3177 3195 // $('#btnIdentity').addClass('btn-primary');
... ... @@ -3220,19 +3238,39 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3220 3238 }
3221 3239  
3222 3240 $scope.flushCanvas = function () {
3223   - angular.forEach($scope.ColoredImageSRC, function (value, key) {
3224   -
  3241 + console.log('$scope.flushCanvas ')
  3242 + //angular.forEach($rootScope.ColoredImageSRC, function (value, key) {
  3243 + // debugger;
3225 3244  
  3245 + // var id;
  3246 + // var maskId;
  3247 + // if (value.haveMirror == 'true') {
  3248 + // id = 'imageCanvas' + value.bodyRegionId + '_MR';
  3249 + // maskId = 'imageCanvas' + value.bodyRegionId + '_MR_mci'
  3250 + // }
  3251 + // else {
  3252 + // id = 'imageCanvas' + value.bodyRegionId;
  3253 + // maskId = 'imageCanvas' + value.bodyRegionId + '_mci';
  3254 + // }
  3255 +
  3256 + // var canvas = document.getElementById(id);
  3257 + // document.getElementById('canvasDiv').removeChild(canvas);
  3258 +
  3259 + // var maskcanvas = document.getElementById(maskId);
  3260 + // document.getElementById('canvasDiv').removeChild(maskcanvas);
  3261 +
  3262 + // var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']");
  3263 + // for (var i = 0; i < modestyCanvases.length; i++) {
  3264 + // modestyCanvases[i].remove();
  3265 + // }
  3266 + //});
  3267 +
  3268 + for (var i = 1; i < 7; i++) {
3226 3269 var id;
3227 3270 var maskId;
3228   - if (value.haveMirror == 'true') {
3229   - id = 'imageCanvas' + value.bodyRegionId + '_MR';
3230   - maskId = 'imageCanvas' + value.bodyRegionId + '_MR_mci'
3231   - }
3232   - else {
3233   - id = 'imageCanvas' + value.bodyRegionId;
3234   - maskId = 'imageCanvas' + value.bodyRegionId + '_mci';
3235   - }
  3271 +
  3272 + id = 'imageCanvas' + i;
  3273 + maskId = 'imageCanvas' + i + '_mci';
3236 3274  
3237 3275 var canvas = document.getElementById(id);
3238 3276 document.getElementById('canvasDiv').removeChild(canvas);
... ... @@ -3240,11 +3278,23 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3240 3278 var maskcanvas = document.getElementById(maskId);
3241 3279 document.getElementById('canvasDiv').removeChild(maskcanvas);
3242 3280  
  3281 + if (i == 4 && i == 5 && i == 6) {
  3282 + id = 'imageCanvas' +i+ '_MR';
  3283 + maskId = 'imageCanvas' + i + '_MR_mci';
  3284 +
  3285 + var canvas = document.getElementById(id);
  3286 + document.getElementById('canvasDiv').removeChild(canvas);
  3287 +
  3288 + var maskcanvas = document.getElementById(maskId);
  3289 + document.getElementById('canvasDiv').removeChild(maskcanvas);
  3290 + }
  3291 +
  3292 + //remove modesty canavs
3243 3293 var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']");
3244 3294 for (var i = 0; i < modestyCanvases.length; i++) {
3245 3295 modestyCanvases[i].remove();
3246 3296 }
3247   - });
  3297 + }
3248 3298 }
3249 3299  
3250 3300 $scope.enableHighlight = function () {
... ... @@ -3263,7 +3313,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3263 3313  
3264 3314 $scope.highLightBody = function () {
3265 3315  
3266   -
  3316 + //debugger
3267 3317 if ($rootScope.isHighLight == true) {
3268 3318  
3269 3319 angular.forEach($scope.ColoredImageSRC, function (value, key) {
... ... @@ -3468,7 +3518,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3468 3518 function (result) {
3469 3519 //debugger;
3470 3520  
3471   - $scope.BodyLayerData = result;
  3521 + $rootScope.BodyLayerData = result;
3472 3522 $scope.isBodylayerdataLoaded = true;
3473 3523  
3474 3524 //load json for annotations
... ... @@ -3495,7 +3545,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3495 3545  
3496 3546 function (error) {
3497 3547 // handle errors here
3498   - console.log(' $scope.BodyLayerData= ' + error.statusText);
  3548 + console.log(' $rootScope.BodyLayerData= ' + error.statusText);
3499 3549 }
3500 3550 );
3501 3551 }
... ... @@ -3652,20 +3702,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3652 3702  
3653 3703  
3654 3704  
3655   - // $scope.Draw=function(x, y, isDown) {
3656   - // if (isDown) {
3657   - // $scope.paintCanvasContext.beginPath();
3658   - // $scope.paintCanvasContext.strokeStyle = '#000000';
3659   - // $scope.paintCanvasContext.lineWidth = 1//$('#selWidth').val();
3660   - // $scope.paintCanvasContext.lineJoin = "round";
3661   - // $scope.paintCanvasContext.moveTo($scope.lastX, $scope.lastY);
3662   - // $scope.paintCanvasContext.lineTo(x, y);
3663   - // $scope.paintCanvasContext.closePath();
3664   - // $scope.paintCanvasContext.stroke();
3665   - // }
3666   - // $scope.lastX = x; $scope.lastY = y;
3667   - //}
3668   -
3669 3705 //body highlight options functinality
3670 3706 $scope.LoadBodySystemData = function () {
3671 3707  
... ... @@ -3718,7 +3754,175 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3718 3754  
3719 3755 $timeout(function () { $scope.HighlightBodyByTermList(systemMatchedTermList) }, 100);
3720 3756  
3721   - }
  3757 + }
  3758 +
  3759 +
  3760 +
  3761 +
  3762 +
  3763 + //list manager
  3764 + $scope.$on('listManagerEvent', function (event, data) {
  3765 + // debugger;
  3766 +
  3767 + if ($rootScope.islistManagerEventAlredayDispachted == true) {
  3768 +
  3769 + var len = $rootScope.openModules.length;
  3770 + var openViewLen = $rootScope.openViews.length;
  3771 +
  3772 + var currentOpenModuleId = $rootScope.openModules[len - 1].ModuleId;
  3773 + var currentOpenViewId = $rootScope.openViews[openViewLen - 1].BodyViewId;
  3774 + $scope.viewOrientationId = currentOpenViewId;
  3775 + //confirm that this is DA module which is last open
  3776 + if (currentOpenModuleId == 1) {
  3777 + $http({ method: 'GET', url: '~/../content/data/json/da/body-views/' + currentOpenViewId + '/da_dat_tm_sg_' + currentOpenViewId + '.json' }).success(function (data) {
  3778 + $scope.TermNumberData = data;
  3779 + var actualtermList = new jinqJs()
  3780 + .from($scope.TermNumberData.TermData.Term)
  3781 + .select('_ActualTermNumber');
  3782 +
  3783 + var TermTextList = [];
  3784 + var path = '~/../content/data/json/da/vocab/english/cm_dat_vocabterm_1.json'
  3785 +
  3786 + $http({ method: 'GET', url: '~/../content/data/json/da/vocab/english/cm_dat_vocabterm_1.json' }).success(function (data) {
  3787 +
  3788 + var VocabTermData = data;
  3789 +
  3790 + var vocabTermTxt = [];
  3791 +
  3792 + angular.forEach($scope.TermNumberData.TermData.Term, function (value1, key1) {
  3793 +
  3794 + angular.forEach(VocabTermData.VocabTerms.Term, function (value2, key2) {
  3795 +
  3796 +
  3797 + if (value1._ActualTermNumber === value2._ActualTermNumber) {
  3798 + vocabTermTxt.push(
  3799 +
  3800 + {
  3801 +
  3802 + "_ActualTermNumber": value2._ActualTermNumber,
  3803 +
  3804 + "_TermText": value2._TermText,
  3805 +
  3806 + "_cdId": value2._cdId
  3807 +
  3808 + }
  3809 +
  3810 + );
  3811 +
  3812 + }
  3813 +
  3814 + })
  3815 +
  3816 +
  3817 +
  3818 + })
  3819 +
  3820 +
  3821 +
  3822 + $scope.VocabTermTxt = new jinqJs()
  3823 +
  3824 + .from(vocabTermTxt)
  3825 +
  3826 + .distinct('_TermText', '_ActualTermNumber')
  3827 +
  3828 + .orderBy([{ field: '_TermText', sort: 'asc' }])
  3829 +
  3830 + .select('_ActualTermNumber', '_TermText', '_cdId');
  3831 +
  3832 +
  3833 + for (var j = 0; j < $scope.VocabTermTxt.length; j++) {
  3834 + var $el = $('<option ng-click=HighlightBodyOnListManagerSelection($event) id=' + $scope.VocabTermTxt[j]._ActualTermNumber + '>' + $scope.VocabTermTxt[j]._TermText + '</option>').appendTo('#termList')
  3835 + $compile($el)($scope);
  3836 + }
  3837 +
  3838 + $rootScope.isLoading = false;
  3839 + $('#spinner').css('visibility', 'hidden');
  3840 +
  3841 + })
  3842 +
  3843 + .error(function (data, status, headers, config) {
  3844 +
  3845 + console.log(data);
  3846 +
  3847 + });
  3848 +
  3849 +
  3850 +
  3851 + })
  3852 + .error(function (data, status, headers, config) {
  3853 +
  3854 + console.log(data);
  3855 +
  3856 + });
  3857 +
  3858 +
  3859 +
  3860 + $rootScope.islistManagerEventAlredayDispachted = false;
  3861 + var jj;
  3862 + }
  3863 + }
  3864 +
  3865 + });
  3866 +
  3867 + $scope.HighlightBodyOnListManagerSelection = function (event) {
  3868 +
  3869 + alert('hi: ' + event.currentTarget.attributes[0].value);
  3870 + debugger;
  3871 + var actualTermNumber = event.currentTarget.attributes[0].value;
  3872 + var TermList = $scope.getTermNumberList(actualTermNumber);
  3873 + var layerNumberList = [];
  3874 + for (var i = 0; i < TermList.length; i++) {
  3875 + var layerNumber = TermList[i]._InternalLayerNumber
  3876 +
  3877 + layerNumberList[i] = layerNumber;
  3878 + }
  3879 + // debugger;
  3880 + //4.
  3881 + layerNumberList.sort();
  3882 + var lNum = layerNumberList[0].replace('00', '');
  3883 + $scope.layerNumber = parseInt(lNum) - 1;
  3884 +
  3885 +
  3886 + //remove current layer canavses
  3887 + for (var i = 1; i < 7; i++) {
  3888 + debugger;
  3889 + var id;
  3890 + var maskId;
  3891 +
  3892 + id = 'imageCanvas' + i;
  3893 + maskId = 'imageCanvas' + i + '_mci';
  3894 +
  3895 + var canvas = document.getElementById(id);
  3896 + document.getElementById('canvasDiv').removeChild(canvas);
  3897 +
  3898 + var maskcanvas = document.getElementById(maskId);
  3899 + document.getElementById('canvasDiv').removeChild(maskcanvas);
  3900 +
  3901 + if (i == 4 || i == 5 || i == 6) {
  3902 + id = 'imageCanvas' + i + '_MR';
  3903 + maskId = 'imageCanvas' + i + '_MR_mci';
  3904 +
  3905 + var canvas = document.getElementById(id);
  3906 + document.getElementById('canvasDiv').removeChild(canvas);
  3907 +
  3908 + var maskcanvas = document.getElementById(maskId);
  3909 + document.getElementById('canvasDiv').removeChild(maskcanvas);
  3910 + }
  3911 +
  3912 + //remove modesty canavs
  3913 + var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']");
  3914 + for (var j = 0; j < modestyCanvases.length; j++) {
  3915 + modestyCanvases[j].remove();
  3916 + }
  3917 + }
  3918 +
  3919 +
  3920 + $timeout(function () { $scope.CalculateImageCordinates($scope.viewOrientationId) }, 100);
  3921 +
  3922 + $rootScope.isHighLight = true;
  3923 + $timeout(function () { $scope.highLightBody() }, 100);
  3924 + $timeout(function () { $scope.HighlightBodyByTermList(TermList) }, 100);
  3925 + }
3722 3926  
3723 3927 }]
3724 3928  
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... ... @@ -29,7 +29,9 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
29 29 $rootScope.lastX;
30 30 $rootScope.lastY;
31 31 $rootScope.CommonData;
  32 +
32 33 //jspanel functionality..
  34 +
33 35 $rootScope.openParent = function (slug) {
34 36 // debugger;
35 37 var openViews = $rootScope.openViews;
... ... @@ -41,6 +43,8 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
41 43 }
42 44 $('#daImagePanel').remove();
43 45 $location.url('/' + slug);
  46 +
  47 + $rootScope.$broadcast('jsPanelCloseEvent', true);
44 48 }
45 49  
46 50 //called on jsanel minimize
... ... @@ -203,5 +207,31 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
203 207 }
204 208  
205 209  
  210 + //list manager function
  211 +
  212 + $rootScope.ShowListManager = function () {
  213 +
  214 + $('#listManager').css('display', 'block');
  215 +
  216 + $rootScope.isLoading = true;
  217 + $('#spinner').css('visibility', 'visible');
  218 + $rootScope.islistManagerEventAlredayDispachted = true;
  219 +
  220 + $rootScope.$broadcast('listManagerEvent', true);
  221 + }
  222 +
  223 +
  224 + function fillListManagerTerms() {
  225 +
  226 + var len = $rootScope.openModules.length;
  227 + var openViewLen = $rootScope.openViews.length;
  228 +
  229 + var currentOpenModuleId = $rootScope.openModules[len - 1].ModuleId;
  230 + var currentOpenViewId = $rootScope.openViews[openViewLen - 1].BodyViewId;
  231 + if (currentOpenModuleId == 1) {
  232 +
  233 + }
  234 +
  235 + }
206 236 }]
207 237 );
208 238 \ No newline at end of file
... ...
400-SOURCECODE/AIAHTML5.Web/app/widget/TopMenu.html
... ... @@ -26,7 +26,9 @@
26 26 <li class="dropdown">
27 27 <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Options<span class="caret"></span></a>
28 28 <ul class="dropdown-menu">
29   - <li><a href="#">List Manager</a></li>
  29 + <!--<li><a href="#" ng-click="ShowListManager()">List Manager</a></li>-->
  30 +
  31 + <li><a href="#" ng-click="ShowListManager()">List Manager</a></li>
30 32 <li><a href="#">Annotation Toolbar</a></li>
31 33 <li><a href="#">Add to Existing Curriculum</a></li>
32 34 <li><a href="#">Settings</a></li>
... ...
400-SOURCECODE/AIAHTML5.Web/index.html
... ... @@ -61,6 +61,154 @@
61 61 </div>
62 62 </div>>
63 63  
  64 +
  65 + <!--list manager Modal-->
  66 + <div class="modal fade" id="ShowListManager" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" ng-init="tab = 1" style="width:27%;left:50%;overflow:hidden;height:500px;top:100px">
  67 + <div class="modal-dialog" role="document" style="width:400px;">
  68 + <div class="modal-content" style="width:100%;max-width:400px;">
  69 + <div class="modal-header setting-modal-header" style="padding: 5px 10px; border-bottom: 1px solid #e5e5e5;">
  70 + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  71 + <h4 class="modal-title" id="myModalLabel">Setting</h4>
  72 + </div>
  73 + <div class="modal-body">
  74 + <div class="row" style="padding-top:20px;">
  75 + <div class="col-sm-12">
  76 +
  77 + <div aria-label="..." role="group" class="btn-group btn-group-justified">
  78 + <div role="group" class="btn-group">
  79 + <button class="btn btn-sm btn-success" type="button" ng-click="tab = 1">Appearance</button>
  80 + </div>
  81 + <div role="group" class="btn-group">
  82 + <button class="btn btn-sm btn-success" type="button" ng-click="tab = 2">Lexicons</button>
  83 + </div>
  84 + <div role="group" class="btn-group">
  85 + <button class="btn btn-sm btn-success" type="button" ng-click="tab = 3">Dissectible</button>
  86 + </div>
  87 + </div>
  88 +
  89 + </div>
  90 +
  91 +
  92 + <div class="col-sm-12" ng-show="tab === 1">
  93 +
  94 +
  95 + <div class="row">
  96 + <div class="center-block col-md-11" style="float: none; background-color:#E2E2E2;height:300px;">
  97 + <div class="row" style="padding-top: 22px;">
  98 + <div class="center-block col-md-10" style="float: none; ">
  99 + <h5><strong>System Font</strong></h5>
  100 +
  101 + <div style="border:2px solid #ACACAC;float:left;padding:15px;background-color:#CCCCCC;">
  102 + <div class="col-md-3" style="padding-left:0px;">
  103 + Sample
  104 + </div>
  105 + <div class="col-md-6" style="padding-right:0px;">
  106 + <input type="text" value="" style="width:85%;">
  107 + </div>
  108 + <div class="col-md-3" style="padding-left:0px;">
  109 + <button class="btn btn-primary" style="margin-bottom:5px;">Change</button>
  110 + <button class="btn btn-primary" style="margin-bottom:5px;">Default</button>
  111 + </div>
  112 +
  113 + </div>
  114 + </div>
  115 + </div>
  116 +
  117 + </div>
  118 + </div>
  119 +
  120 + </div>
  121 + <div class="col-sm-12" ng-show="tab === 2">
  122 +
  123 +
  124 + <div class="row">
  125 + <div class="center-block col-md-11" style="float: none; background-color:#E2E2E2;height:300px;">
  126 + <div class="col-md-6">
  127 + <h6><strong>Primary Lexicon</strong></h6>
  128 + <input type="text" value="English" style="width:90%;">
  129 + <button class="btn btn-primary" style="float:right;margin-bottom:5px;margin-top:5px;">Change</button>
  130 + <h6>Secondry Lexicon</h6>
  131 + <textarea style="width:90%;"></textarea>
  132 + <button>Change</button>
  133 + <button>Change</button>
  134 + </div>
  135 + <div class="col-md-6">
  136 + <h6>Available Lexicon</h6>
  137 + <select multiple class="form-control" id="sel2">
  138 + <option>1</option>
  139 + <option>2</option>
  140 + <option>3</option>
  141 + <option>4</option>
  142 + <option>5</option>
  143 + </select>
  144 +
  145 + <p>Note: Some languages require special system fonts to display correctly</p>
  146 + </div>
  147 +
  148 + </div>
  149 + </div>
  150 +
  151 + </div>
  152 + <div class="col-sm-12" ng-show="tab === 3">
  153 +
  154 + <div class="row">
  155 + <div class="center-block col-md-11" style="float: none; background-color:#E2E2E2;height:300px;">
  156 + <h6>Skin Tones</h6>
  157 + <div class="center-block col-md-8" style="float: none;">
  158 + <div class="col-md-6">
  159 + <img class="img-responsive" alt="" src="http://placehold.it/400x300">
  160 + </div>
  161 + <div class="col-md-6">
  162 + <img class="img-responsive" alt="" src="http://placehold.it/400x300">
  163 + </div>
  164 + <div class="col-md-6">
  165 + <img class="img-responsive" alt="" src="http://placehold.it/400x300">
  166 + </div>
  167 + <div class="col-md-6">
  168 + <img class="img-responsive" alt="" src="http://placehold.it/400x300">
  169 + </div>
  170 +
  171 + </div>
  172 + <h6>Modesty Setting</h6>
  173 + <div class="col-md-6">
  174 + <div class="col-md-4">
  175 + <img class="img-responsive" alt="" src="http://placehold.it/400x300">
  176 + </div>
  177 + <div class="col-md-8">
  178 +
  179 + <div class="radio">
  180 + <label><input type="radio" name="optradio" checked>On</label>
  181 + </div>
  182 + <div class="radio">
  183 + <label><input type="radio" name="optradio">Off</label>
  184 + </div>
  185 +
  186 + </div>
  187 + </div>
  188 + <div class="col-md-6">
  189 + <h6>Annotaion</h6>
  190 + <div class="checkbox">
  191 + <label><input type="checkbox" value="" checked>Erase Annotations when changeing layers</label>
  192 + </div>
  193 + </div>
  194 + </div>
  195 +
  196 + </div>
  197 +
  198 +
  199 +
  200 + </div>
  201 + </div>
  202 + <div class="modal-footer">
  203 + <button type="button" class="btn btn-primary">Ok</button>
  204 + <button type="button" class="btn btn-primary" data-dismiss="modal">Cancle</button>
  205 + <button type="button" class="btn btn-primary">Apply</button>
  206 + </div>
  207 + </div>
  208 + </div>
  209 + </div>
  210 + </div>
  211 +
64 212 <!--Annotation Modal-->
65 213 <div class="annotationTollbar" style="position:fixed;top:80px;right:500px;display:none;z-index:1100;">
66 214 <div class="annotationbar">
... ... @@ -130,6 +278,131 @@
130 278 </div>
131 279 </div>
132 280 </div>
  281 +
  282 + <!--List manager-->
  283 +
  284 + <style>
  285 + select[multiple], select[size] {
  286 + height: 100%;
  287 + }
  288 +
  289 + .container {
  290 + margin-left: auto;
  291 + margin-right: auto;
  292 + padding-left: 15px;
  293 + padding-right: 15px;
  294 + }
  295 + </style>
  296 + <div id="listManager" style="position:fixed;top:80px;left:300px;display:none;z-index:1100;">
  297 + <div class="container" style="background:white;width:400px;height:500px;" ng-init="FillListManager()">
  298 + <div class="form-group">
  299 + <label for="sel1">Window</label>
  300 + <select class="form-control" id="sel1">
  301 + <option>Male Lateral</option>
  302 +
  303 + </select>
  304 + </div>
  305 + <div style="">
  306 + <div onclick="mytoggle()">
  307 + <span class="caret"></span> <span>Restrict List to</span>
  308 + </div>
  309 + <div id="divSection" style="display:none;">
  310 + <div class="form-group form-inline">
  311 + <label for=" email">
  312 + System
  313 + </label>
  314 + <select class="form-control" id="sel1">
  315 + <option>ALL</option>
  316 + <option>Male Lateral</option>
  317 +
  318 + </select>
  319 + </div>
  320 + <div class="form-group form-inline">
  321 + <label for=" email">
  322 + Area:
  323 + </label>
  324 + <select class="form-control" id="sel1">
  325 + <option>Entire View</option>
  326 + <option>Entire View</option>
  327 +
  328 + </select>
  329 + </div>
  330 + </div>
  331 + <div style="background:white;width:100%;height:400px;">
  332 + <select id="termList" class="form-control" multiple="">
  333 + <!--<option>ABC</option>
  334 + <option>ABC</option>
  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 +
  376 + </select>
  377 + </div>
  378 + </div>
  379 + <div style="clear:both;"></div>
  380 + <div>
  381 + <div style="float:left;">2330 Structure</div>
  382 +
  383 + <div style="float:right;">
  384 + <div>
  385 + icon
  386 + <span class="caret"></span>
  387 + </div>
  388 +
  389 + </div>
  390 +
  391 +
  392 + </div>
  393 + </div>
  394 + </div>
  395 + <script>
  396 + function mytoggle() {
  397 + var div = document.getElementById("divSection");
  398 + if (div.style.display == 'block') {
  399 + div.style.display = 'none';
  400 + return;
  401 + }
  402 + div.style.display = 'block';
  403 + }
  404 + </script>
  405 +
133 406  
134 407 <!--<script src="libs/jquery/1.11.3/jquery.min.js"></script>-->
135 408 <script src="libs/jquery/2.1.3/jquery.min.js"></script>
... ...