Commit 613b1a7c543ef1478eeaaf2876adc3ef5ea60371

Authored by Nikita Kulshreshtha
2 parents 414afdff 05cbcd96

Merge branch 'Bugs_v10_Merge1' into Develop

400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js
... ... @@ -449,6 +449,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
449 449 {
450 450 $('#AnnotaionPopupDiv').find('input, textarea, button, select,img,div').attr('disabled', 'disabled');
451 451 $('#slider-range-min-2').slider('disable');
  452 + $("#annotationpaintbrushsize").attr('disabled', 'disabled');
  453 + //$("#annotationpaintbrushsize").attr("href", "#");
452 454 }
453 455 $rootScope.isLoading = true;
454 456 $('#spinner').css('visibility', 'visible');
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... ... @@ -171,18 +171,25 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
171 171 //7904
172 172 if ($rootScope.MenuModuleName == "DA") {
173 173 if ($rootScope.disableAnnotationtoolOnListManager == true) {
174   - $('#AnnotaionPopupDiv').find('input, textarea, button, select,img,div').attr('disabled', 'disabled');
  174 + $('#AnnotaionPopupDiv').find('a,input, textarea, button, select,img,div').attr('disabled', 'disabled');
175 175 $('#slider-range-min-2').slider('disable');
  176 + $("#annotationpaintbrushsize").attr('disabled', 'disabled');
  177 +
176 178  
177 179 // $rootScope.disableAnnotationTB = false;
178 180 } else {
179 181 $('#AnnotaionPopupDiv').find('input, textarea, button, select,img,div').removeAttr('disabled', 'disabled');
180 182 $('#slider-range-min-2').slider('enable');
  183 + $("#annotationpaintbrushsize").removeAttr('disabled', 'disabled');
181 184 }
182 185 // document.getElementById('modelbackground').style.display = "block";
183 186 // document.getElementById('modeleditstyle').style.display = "block";
184 187  
185 188 }
  189 + if ($rootScope.MenuModuleName == "CA")
  190 + {
  191 + $("#annotationpaintbrushsize").attr("href", "#");
  192 + }
186 193 $("#OnIdentify").addClass("annotationtoolbartab");
187 194 $("#annotationToolBarOptions").addClass("active");
188 195 $("#annotationButton").addClass("active");
... ... @@ -338,32 +345,54 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
338 345 $(".btn-annotation").removeClass("activebtncolor");
339 346 $(".btn-annotation-rectangle").addClass("activebtncolor");
340 347 }
  348 +
341 349 $rootScope.paintBrush = function () {
342   - // debugger;
343   - // $('.btnCursor').addClass('activebtncolor');
344   - $rootScope.setListManagerZindex = true;
345   - $("#canvasPaint").css("display", "block");
346   - $("#canvas").css("display", "block");
347   - $rootScope.switchCanvasToPaintCanvas();
348   - $rootScope.shapeType = "FreeStylePaint";
  350 + if ($rootScope.disableAnnotationtoolOnListManager == true) {
  351 + $rootScope.switchCanvas();
  352 + var canvasPaintZindex = $('#canvasPaint').css("z-index"); //x
  353 +
  354 + var canvasZindex = $('#canvas').css("z-index"); //y
  355 + var listManagerZindex = $('#listManager').css("z-index"); //z
  356 + if (canvasPaintZindex > canvasZindex) {
  357 +
  358 + $('#listManager').css("z-index", canvasPaintZindex);
  359 +
  360 + } else {
  361 +
  362 + $('#listManager').css("z-index", canvasZindex);
  363 + }
  364 +
  365 + } else {
  366 + // debugger;
  367 + // $('.btnCursor').addClass('activebtncolor');
  368 + $rootScope.setListManagerZindex = true;
  369 + $("#canvasPaint").css("display", "block");
  370 + $("#canvas").css("display", "block");
  371 + $rootScope.switchCanvasToPaintCanvas();
  372 + $rootScope.shapeType = "FreeStylePaint";
349 373 var btnBrushSizeValue = $("#btnBrushSize").val();
350 374 $rootScope.shapeSize = parseInt(btnBrushSizeValue);
351 375 $("#annotationpaintbrushsize").attr("data-size", $rootScope.shapeSize);
352 376  
353 377 $("#annotationpaintbrushsize").attr("data-color", $rootScope.shapestyleFillColor);
354 378  
355   - if ($rootScope.shapeSize == '') {
356   - $('#canvasPaint').sketch({ defaultSize: 1 });
357   - }
358   - else {
  379 +
  380 +
  381 + if ($rootScope.shapeSize == '') {
  382 + $('#canvasPaint').sketch({ defaultSize: 1 });
  383 + }
  384 + else {
359 385 $('#canvasPaint').sketch();
360 386  
361   - }
  387 + }
  388 +
362 389  
  390 + // $('#canvasPaint').sketch();
363 391  
364   - // $('#canvasPaint').sketch();
365 392  
  393 + }
366 394  
  395 +
367 396  
368 397 }
369 398  
... ... @@ -461,7 +490,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
461 490 $rootScope.shapestyleborderWidth = 2;
462 491 $rootScope.shapestyleborderStyles = "solid";
463 492 $rootScope.shapestyle = function (id) {
464   - // debugger;
  493 + // debugger;
465 494 document.getElementById('modelbackground').style.display = "none";
466 495 document.getElementById('modeleditstyle').style.display = "none";
467 496  
... ... @@ -507,6 +536,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
507 536 $('#slider-range-min-4 span.ui-slider-handle').css("left", (previewOpacity * 100) + "%");
508 537  
509 538 };
  539 +
510 540 }
511 541 }
512 542  
... ... @@ -537,6 +567,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
537 567  
538 568 }
539 569  
  570 +
  571 +
540 572  
541 573 //----End-------------
542 574  
... ... @@ -605,6 +637,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
605 637 }
606 638  
607 639 $rootScope.RectangleFn = function (canvasId, RectNumber, shapestyleFillColor, shapestyleborderColor, shapestyleOpacity, shapestyleborderWidth, offsetX1, offsetY1, x, y) {
  640 + // alert("offsetX:" + offsetX1 + " offsetY:" + offsetY1 + " x:" + x + " y:" + y);
608 641 $(canvasId).addLayer({
609 642 layer: true,
610 643 name: 'Rect_' + RectNumber,
... ... @@ -618,7 +651,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
618 651 width: x - offsetX1,
619 652 height: y - offsetY1,
620 653  
621   - resizeFromCenter: false,
  654 + resizeFromCenter: true,
622 655  
623 656 dblclick: function () {
624 657 // $rootScope.backOpacity();
... ... @@ -1187,7 +1220,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
1187 1220 case "Rectangle":
1188 1221 $rootScope.rectNumber = $rootScope.ObjectIndex++;
1189 1222 $rootScope.RectangleFn('#canvas', $rootScope.rectNumber, $rootScope.shapestyleFillColor, $rootScope.shapestyleborderColor, $rootScope.shapestyleOpacity, $rootScope.shapestyleborderWidth, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y);
1190   -
  1223 +
1191 1224 break;
1192 1225  
1193 1226 case "Circle":
... ... @@ -1891,10 +1924,14 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
1891 1924  
1892 1925 $rootScope.disableAnnotationtoolOnListManager = false;
1893 1926 $rootScope.ShowListManager = function () {
  1927 + $rootScope.switchCanvas();
  1928 + $("#annotationpaintbrushsize").attr("href", "#");
1894 1929 console.log('ShowListManager')
  1930 +
1895 1931 $rootScope.disableAnnotationtoolOnListManager = true;
1896   - $('#AnnotaionPopupDiv').find('input, textarea, button, select,img,div').attr('disabled', 'disabled');
  1932 + $('#AnnotaionPopupDiv').find('a,input, textarea, button, select,img,div').attr('disabled', 'disabled');
1897 1933 $('#slider-range-min-2').slider('disable');
  1934 + $("#annotationpaintbrushsize").attr('disabled', 'disabled');
1898 1935 $rootScope.isLoading = true;
1899 1936 $('#spinner').css('visibility', 'visible');
1900 1937  
... ... @@ -1919,13 +1956,17 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
1919 1956 }
1920 1957  
1921 1958 $rootScope.CloseListManager = function () {
1922   - console.log('close')
  1959 +
  1960 +
  1961 + console.log('close');
1923 1962 $rootScope.disableAnnotationtoolOnListManager = false;
1924 1963 if ($rootScope.MenuModuleName == "DA") {
1925   -
  1964 + $("#annotationpaintbrushsize").attr("href", "#canvasPaint");
1926 1965 if ($rootScope.disableAnnotationtoolOnListManager == false) {
1927   - $('#AnnotaionPopupDiv').find('input, textarea, button, select,img,div').removeAttr('disabled', 'disabled');
  1966 + $('#AnnotaionPopupDiv').find('a,input, textarea, button, select,img,div').removeAttr('disabled', 'disabled');
1928 1967 $('#slider-range-min-2').slider('enable');
  1968 + $("#annotationpaintbrushsize").removeAttr('disabled', 'disabled');
  1969 + $rootScope.switchCanvasToPaintCanvas();
1929 1970 }
1930 1971 }
1931 1972 $('#listManager').css('display', 'none');
... ...
400-SOURCECODE/AIAHTML5.Web/app/widget/TopMenu.html
... ... @@ -15,7 +15,7 @@
15 15 <li><a href="#">Open Existing Curriculum</a></li>
16 16 <li><a href="#">Save Curriculum As</a></li>
17 17 <li role="separator" class="divider"></li>
18   - <li><a href="#">Export Image</a></li>
  18 + <li><a href="#" data-toggle="modal">Export Image</a></li>
19 19 <li role="separator" class="divider"></li>
20 20 <li><a href="#">Print Active Viewer</a></li>
21 21 <li><a href="#">Print All Open Viewers</a></li>
... ... @@ -87,5 +87,5 @@
87 87 </div>
88 88 </div>
89 89 </div>
90   -
  90 +
91 91 </div>
... ...
400-SOURCECODE/AIAHTML5.Web/index.html
1 1 ๏ปฟ<!DOCTYPE html>
2 2 <html lang="en" ng-cloak ng-app="AIA">
3 3 <head>
4   - <!--<base href="/AIAHTML5/" />-->
  4 + <!--<base href="/AIAHTML5/" />-->
5 5 <!--<base href="/AIA/" />-->
6 6 <base href="/" />
7 7 <meta charset="utf-8">
... ... @@ -23,7 +23,6 @@
23 23 <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:400,800,700,600,400italic">
24 24  
25 25 <!--<link rel="styleSheet" href="themes/default/css/uigrid/ui-grid.min.css" />-->
26   -
27 26 <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
28 27 <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
29 28 <!--[if lt IE 9]>
... ... @@ -42,7 +41,6 @@
42 41  
43 42 <!--Annotation Toolbar: Jcanvas-->
44 43 <style>
45   -
46 44 /*.ActiveDefaultColorAnnotation {
47 45 background-color: #000000!important;
48 46 }*/
... ... @@ -53,9 +51,9 @@
53 51 color: #fff !important;
54 52  
55 53 }
56   -
57   -
58   - .ActiveFormattingButtonClass {
  54 +
  55 +
  56 + .ActiveFormattingButtonClass {
59 57 background-color: #1B92D0 !important;
60 58 }
61 59  
... ... @@ -151,7 +149,6 @@
151 149 color: #000;
152 150 border-radius: 0;
153 151 }
154   -
155 152 </style>
156 153  
157 154  
... ... @@ -487,7 +484,7 @@
487 484 <button type="button" class="close" aria-label="Close" ng-click="CloseAnnotationTool()"><span aria-hidden="true">&times;</span></button>
488 485 <h4 class="modal-title" id="myModalLabel">Annotation</h4>
489 486 </div>
490   - <div class="modal-body" id="AnnotaionPopupDiv" >
  487 + <div class="modal-body" id="AnnotaionPopupDiv">
491 488 <div class="row">
492 489 <div class="col-sm-12">
493 490 <h5>Mode</h5>
... ... @@ -495,7 +492,7 @@
495 492 <div class="btn-group btn-group-justified" role="group" aria-label="...">
496 493 <div class="btn-group" role="group" tooltip>
497 494 <div id="identify-block" style="display: none; font-size:13px;">Identify Mode</div>
498   - <button id="OnIdentify" type="button" class="btn btn-sm btn-success" ng-click="OnIdentifyClick()">Identify</button>
  495 + <button id="OnIdentify" type="button" class="btn btn-sm btn-success" ng-click="OnIdentifyClick()">Identify</button>
499 496 </div>
500 497 <div class="btn-group" role="group">
501 498 <div id="draw-block" style="display: none; font-size: 13px;">Draw Mode</div>
... ... @@ -528,7 +525,7 @@
528 525  
529 526 <div id="edit-block" style="display: none; font-size: 13px;">Edit Shape Style</div>
530 527 <div class="outlinediv">
531   - <div id="shapeStyleDiv" class="fullcolordiv" ng-click="disableAnnotationtoolOnListManager||enableAnnotationToolBar()">
  528 + <div id="shapeStyleDiv" class="fullcolordiv" ng-click="disableAnnotationtoolOnListManager||enableAnnotationToolBar()">
532 529  
533 530 </div>
534 531  
... ... @@ -579,77 +576,77 @@
579 576 </div>
580 577  
581 578 <!--Modal For Annotation Text Box-->
582   - <div id="annotationTextModal" style="display:none;z-index: 1000000000;width:500px;height:241px;padding-right:0!important;position:fixed;left:0;right:0;top:0px;bottom:0;margin:auto;">
583   -
584   - <div class="modal-content">
585   - <div class="modal-header" style="background-color: #808D43;padding:10px;border-bottom:0;">
586   - <!--<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>-->
587   - <h4 class="modal-title" id="myModalLabel" style="font-weight:bold;">Enter Text to be put in a box</h4>
588   - </div>
589   - <div class="modal-body">
590   - <div class="col-xs-12" style="padding:20px 0;">
591   - <div class="form-inline">
592   - <!--Annotation: Text in different font style is same.-->
593   - <select class="form-control" id="selected-font-family"></select>
594   - <select class="form-control" id="selected-font-size">
595   - <option>14</option>
596   - <option>16</option>
597   - <option>18</option>
598   - <option>20</option>
599   - <option>22</option>
600   - <option>24</option>
601   - <option>26</option>
602   - <option>28</option>
603   - <option>36</option>
604   - <option>48</option>
605   - <option>72</option>
606   - </select>
607   - <span style="vertical-align:middle;">
608   - <span id="text-bold" class="Edittext-btn-css">
609   - <i aria-hidden="true" class="fa fa-bold" style="color: #fff"></i>
610   - </span>
611   - <span id="text-italic" class="Edittext-btn-css">
612   - <i class="fa fa-italic" aria-hidden="true" style="color: #fff"></i>
613   -
614   - </span>
615   - <span id="text-underline" class="underline-btn-css">
616   - <i class="fa fa-underline" aria-hidden="true" style="color: #fff"></i>
617   - </span>
  579 + <div id="annotationTextModal" style="display:none;z-index: 1000000000;width:500px;height:241px;padding-right:0!important;position:fixed;left:0;right:0;top:0px;bottom:0;margin:auto;">
  580 +
  581 + <div class="modal-content">
  582 + <div class="modal-header" style="background-color: #808D43;padding:10px;border-bottom:0;">
  583 + <!--<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>-->
  584 + <h4 class="modal-title" id="myModalLabel" style="font-weight:bold;">Enter Text to be put in a box</h4>
  585 + </div>
  586 + <div class="modal-body">
  587 + <div class="col-xs-12" style="padding:20px 0;">
  588 + <div class="form-inline">
  589 + <!--Annotation: Text in different font style is same.-->
  590 + <select class="form-control" id="selected-font-family"></select>
  591 + <select class="form-control" id="selected-font-size">
  592 + <option>14</option>
  593 + <option>16</option>
  594 + <option>18</option>
  595 + <option>20</option>
  596 + <option>22</option>
  597 + <option>24</option>
  598 + <option>26</option>
  599 + <option>28</option>
  600 + <option>36</option>
  601 + <option>48</option>
  602 + <option>72</option>
  603 + </select>
  604 + <span style="vertical-align:middle;">
  605 + <span id="text-bold" class="Edittext-btn-css">
  606 + <i aria-hidden="true" class="fa fa-bold" style="color: #fff"></i>
618 607 </span>
  608 + <span id="text-italic" class="Edittext-btn-css">
  609 + <i class="fa fa-italic" aria-hidden="true" style="color: #fff"></i>
619 610  
620   - <div class="form-group" id="font-color" style="display:inline-flex;vertical-align:top;cursor:pointer;margin-right:36px;">
  611 + </span>
  612 + <span id="text-underline" class="underline-btn-css">
  613 + <i class="fa fa-underline" aria-hidden="true" style="color: #fff"></i>
  614 + </span>
  615 + </span>
621 616  
622   - <input type="text" id="saturation-demo" class="form-control demo" data-control="saturation" style="display:none;" value="#0088cc">
623   - </div>
  617 + <div class="form-group" id="font-color" style="display:inline-flex;vertical-align:top;cursor:pointer;margin-right:36px;">
624 618  
625   - <span style="vertical-align:middle;">
626   - <span id="text-left" class="Edittext-btn-css">
627   - <i aria-hidden="true" class="fa fa-align-left" style="color: #fff"></i>
628   - </span>
629   - <span id="text-center" class="Edittext-btn-css">
630   - <i class="fa fa-align-center" aria-hidden="true" style="color: #fff"></i>
  619 + <input type="text" id="saturation-demo" class="form-control demo" data-control="saturation" style="display:none;" value="#0088cc">
  620 + </div>
631 621  
  622 + <span style="vertical-align:middle;">
  623 + <span id="text-left" class="Edittext-btn-css">
  624 + <i aria-hidden="true" class="fa fa-align-left" style="color: #fff"></i>
  625 + </span>
  626 + <span id="text-center" class="Edittext-btn-css">
  627 + <i class="fa fa-align-center" aria-hidden="true" style="color: #fff"></i>
632 628  
633   - </span>
634   - <span id="text-right" class="underline-btn-css">
635   - <i class="fa fa-align-right" aria-hidden="true" style="color: #fff"></i>
  629 +
  630 + </span>
  631 + <span id="text-right" class="underline-btn-css">
  632 + <i class="fa fa-align-right" aria-hidden="true" style="color: #fff"></i>
636 633  
637 634  
638   - </span>
639 635 </span>
  636 + </span>
640 637  
641 638  
642   - </div>
643 639 </div>
644   - <textarea class="form-control" id="text_area" rows="3" style="font-family: 'Verdana, sans-serif';font-size:14px; font-weight: normal; font-style: normal; color: #000; text-align: left; text-decoration: none;"></textarea>
645   - </div>
646   - <div class="modal-footer">
647   - <!--<button type="button" class="btn btn-default" ng-click="closeModal()" data-dismiss="modal">Close</button>-->
648   - <button type="button" class="btn btn-default" ng-click="closeModal()" id="closeEditText" data-dismiss="modal">Close</button>
649   - <button type="button" id="saveBtn" class="btn btn-primary" data-dismiss="modal" ng-click="saveText()">Save</button>
650 640 </div>
  641 + <textarea class="form-control" id="text_area" rows="3" style="font-family: 'Verdana, sans-serif';font-size:14px; font-weight: normal; font-style: normal; color: #000; text-align: left; text-decoration: none;"></textarea>
651 642 </div>
652   -
  643 + <div class="modal-footer">
  644 + <!--<button type="button" class="btn btn-default" ng-click="closeModal()" data-dismiss="modal">Close</button>-->
  645 + <button type="button" class="btn btn-default" ng-click="closeModal()" id="closeEditText" data-dismiss="modal">Close</button>
  646 + <button type="button" id="saveBtn" class="btn btn-primary" data-dismiss="modal" ng-click="saveText()">Save</button>
  647 + </div>
  648 + </div>
  649 +
653 650 </div>
654 651  
655 652  
... ... @@ -670,7 +667,7 @@
670 667 top: 170px;
671 668 left: 140px;
672 669 display: none;
673   - z-index: 1100;
  670 + z-index: 110000;
674 671 }
675 672  
676 673 #listManager .annotation-modal-header {
... ... @@ -878,13 +875,13 @@
878 875 </div>
879 876  
880 877 <div class="marginTopBtm10">
881   -
  878 +
882 879 <div class="well well-sm no-margin-btm blankshapediv">
883   - <div class="outlinediv">
884   - <div id="imgOpacity" class="fullcolordiv imgopacity">
885   - </div>
886   - </div>
887   - </div>
  880 + <div class="outlinediv">
  881 + <div id="imgOpacity" class="fullcolordiv imgopacity">
  882 + </div>
  883 + </div>
  884 + </div>
888 885  
889 886 </div>
890 887 </div>
... ... @@ -897,9 +894,6 @@
897 894 </div>
898 895 </div>
899 896  
900   -
901   -
902   -
903 897 <!--<div class="modal fade" id="editshapestyle" tabindex="-1" role="dialog" aria-labelledby="myModalLabel33" style="z-index:1000000000;width:302px;margin-left:auto;margin-right:auto;overflow:hidden;height:460px;">
904 898 <div class="modal-dialog modal-sm" role="document">
905 899 <div class="modal-content">
... ... @@ -936,7 +930,7 @@
936 930 </div>
937 931  
938 932  
939   -
  933 +
940 934 </label>
941 935 </div>
942 936 </div>
... ... @@ -945,7 +939,7 @@
945 939 <label class="pull-left" style="font-weight:normal;">Scale</label>
946 940 <div id="edit-slider-3" class="pull-left" style="width:62%; margin-left:3%; margin-top:2%;">
947 941 <div id="slider-range-min-3"></div>
948   -
  942 +
949 943 </div>
950 944 </div>
951 945  
... ... @@ -1024,11 +1018,9 @@
1024 1018 </div>-->
1025 1019  
1026 1020 <script>
1027   - function enableDisableFillOption()
1028   - {
  1021 + function enableDisableFillOption() {
1029 1022  
1030   - if (document.getElementById('fill-option').checked)
1031   - {
  1023 + if (document.getElementById('fill-option').checked) {
1032 1024  
1033 1025 //$("#filloption1").css({ "pointer-events": "auto" });
1034 1026 //$("#filloption12").css({ "pointer-events": "auto" });
... ... @@ -1046,14 +1038,13 @@
1046 1038  
1047 1039  
1048 1040 }
1049   - else
1050   - {
  1041 + else {
1051 1042  
1052 1043 //$("#filloption1").css({ "pointer-events": "none" });
1053 1044 //$("#filloption2").css({ "pointer-events": "none" });
1054   - $("#edit-slider-3").css({ "pointer-events": "none"});
1055   - $("#edit-slider-4").css({ "pointer-events": "none"});
1056   - $("#editstylebackgroundcolor").css({ "pointer-events": "none"});
  1045 + $("#edit-slider-3").css({ "pointer-events": "none" });
  1046 + $("#edit-slider-4").css({ "pointer-events": "none" });
  1047 + $("#editstylebackgroundcolor").css({ "pointer-events": "none" });
1057 1048 $("#editstyleTexture").css({ "pointer-events": "none" });
1058 1049 $(".enableDisableOpacity label").css({ "cursor": "default" });
1059 1050 $(".enableDisableOpacity").css({ "opacity": ".5" })
... ... @@ -1082,20 +1073,20 @@
1082 1073 }
1083 1074 }
1084 1075  
1085   - </script>
  1076 + </script>
1086 1077  
1087   - <script>
1088   - function mytoggle() {
1089   - var div = document.getElementById("divSection");
1090   - if (div.style.display == 'block') {
1091   - div.style.display = 'none';
1092   - return;
1093   - }
1094   - div.style.display = 'block';
  1078 + <script>
  1079 + function mytoggle() {
  1080 + var div = document.getElementById("divSection");
  1081 + if (div.style.display == 'block') {
  1082 + div.style.display = 'none';
  1083 + return;
1095 1084 }
  1085 + div.style.display = 'block';
  1086 + }
1096 1087 </script>
1097 1088  
1098   -
  1089 +
1099 1090 <script>
1100 1091 function mytoggle() {
1101 1092 var div = document.getElementById("divSection");
... ... @@ -1111,17 +1102,16 @@
1111 1102  
1112 1103 object.value = object.value.replace(/[^0-9]/g, '');
1113 1104 if (parseInt(object.value) <= 0) {
1114   - object.value =1;
  1105 + object.value = 1;
1115 1106 }
1116   - if (parseInt(object.value)>=1 && parseInt(object.value) <= 60) {
  1107 + if (parseInt(object.value) >= 1 && parseInt(object.value) <= 60) {
1117 1108 object.value = object.value;
1118 1109 }
1119   - if(parseInt(object.value) > 60)
1120   - {
  1110 + if (parseInt(object.value) > 60) {
1121 1111 object.value = object.value.slice(0, 1);
1122   -
  1112 +
1123 1113 }
1124   -
  1114 +
1125 1115 }
1126 1116 </script>
1127 1117  
... ... @@ -1169,12 +1159,15 @@
1169 1159 <script src="app/controllers/LinkController.js"></script>
1170 1160 <script src="app/services/DataService.js"></script>
1171 1161 <script src="libs/jquery/jquery_plugin/jqueryui.js"></script>
1172   -
1173   - <script src="libs/jquery/jquery_plugin/color-picker/jquery.minicolors.min.js"></script>
  1162 +
  1163 + <script src="libs/jquery/jquery_plugin/color-picker/jquery.minicolors.min.js"></script>
1174 1164 <!--<script src="libs/colorpicker/jquery.minicolors.min.js"></script>-->
1175 1165 <!--<script src="libs/color-picker/jquery.minicolors.min.js"></script>-->
1176 1166  
1177 1167 <script src="libs/sketch.js"></script>
  1168 + <script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/0.4.1/html2canvas.js"></script>
  1169 +
  1170 + <script src="libs/FileSaver.js"></script>
1178 1171 <!--<script type="text/javascript">
1179 1172 $(function () {
1180 1173 $('#canvas').sketch();
... ... @@ -1225,7 +1218,7 @@
1225 1218 $("#slider-range-min-2").slider("value", parseInt(brushIncrementedValue));
1226 1219 }
1227 1220 });
1228   - $("#btnBrushSizeDecrease").click(function () {
  1221 + $("#btnBrushSizeDecrease").click(function () {
1229 1222 var brushDecreaseVar = $("#btnBrushSize").val();
1230 1223 if (brushDecreaseVar <= 1) {
1231 1224 $("#slider-range-min-2").slider("value", 1);
... ... @@ -1398,7 +1391,7 @@
1398 1391 $("#text_area").css("text-decoration", "none");
1399 1392 }
1400 1393  
1401   -
  1394 +
1402 1395 });
1403 1396  
1404 1397  
... ... @@ -1440,10 +1433,10 @@
1440 1433 }
1441 1434 });
1442 1435  
1443   -
  1436 +
1444 1437  
1445 1438 $('.borderColorCanvasPreview').each(function () {
1446   - // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation");
  1439 + // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation");
1447 1440 $(this).minicolors({
1448 1441 control: $(this).attr('data-control') || 'hue',
1449 1442 defaultValue: $(this).attr('data-defaultValue') || '',
... ... @@ -1459,8 +1452,8 @@
1459 1452 if (opacity) value += ', ' + opacity;
1460 1453 if (typeof console === 'object') {
1461 1454 console.log(value);
1462   -
1463   - borderColor = value;
  1455 +
  1456 + borderColor = value;
1464 1457 $("#imgOpacity").parent().css("border", borderWidth + "px" + " " + "solid" + borderColor);
1465 1458  
1466 1459  
... ... @@ -1469,12 +1462,12 @@
1469 1462 theme: 'bootstrap'
1470 1463 });
1471 1464  
1472   -
  1465 +
1473 1466 });
1474 1467  
1475 1468  
1476 1469 $('.outerBackgroundColor').each(function () {
1477   -
  1470 +
1478 1471 $(this).minicolors({
1479 1472 control: $(this).attr('data-control') || 'hue',
1480 1473 defaultValue: $(this).attr('data-defaultValue') || '',
... ... @@ -1502,7 +1495,7 @@
1502 1495  
1503 1496 });
1504 1497 </script>
1505   -
  1498 +
1506 1499 <script>
1507 1500 $(function () {
1508 1501 $("#slider-range-min-3").slider({
... ... @@ -1534,7 +1527,7 @@
1534 1527 max: 1,
1535 1528 step: .1,
1536 1529 slide: function (event, ui) {
1537   -
  1530 +
1538 1531 $(".marginTopBtm10 .imgopacity").css("opacity", ui.value);
1539 1532 // $("#slider-value").html(ui.value);
1540 1533  
... ... @@ -1554,24 +1547,24 @@
1554 1547  
1555 1548 <script>
1556 1549 $(function () {
1557   -
  1550 +
1558 1551  
1559 1552 $("#OnIdentify").on('mouseover', function () {
1560 1553 $("#identify-block").addClass("custom-tooltip-annotation");
1561 1554 $(".custom-tooltip-annotation").css('display', 'block');
1562 1555 }).on('mouseout', function () {
1563   - // $("#identify-block").removeClass("custom-tooltip-annotation");
  1556 + // $("#identify-block").removeClass("custom-tooltip-annotation");
1564 1557 $(".custom-tooltip-annotation").css('display', 'none');
1565 1558 $("#identify-block").removeClass("custom-tooltip-annotation");
1566 1559 });
1567 1560  
1568   -
  1561 +
1569 1562 $("#DrawMode").on('mouseover', function () {
1570 1563 $("#draw-block").addClass("custom-tooltip-annotation");
1571 1564 $(".custom-tooltip-annotation").css('display', 'block');
1572   -
  1565 +
1573 1566 }).on('mouseout', function () {
1574   -
  1567 +
1575 1568 $(".custom-tooltip-annotation").css('display', 'none');
1576 1569 $("#draw-block").removeClass("custom-tooltip-annotation");
1577 1570 });
... ... @@ -1589,9 +1582,37 @@
1589 1582  
1590 1583 });
1591 1584 </script>
1592   -
1593   -
1594   -
1595   -
  1585 + <!-- ################################### UTKARSH ##############################-->
  1586 + <!--<script>
  1587 + $(function () {
  1588 + $("#anchorPrintActiveViewer").on('click', function () {
  1589 + html2canvas($("#canvasDiv"), {
  1590 + onrendered: function (canvas) {
  1591 + //theCanvas = canvas;
  1592 + //document.body.appendChild(canvas);
  1593 + //window.open(canvas);
  1594 + var dataURL = canvas.toDataURL("image/jpeg");
  1595 + var image = convertCanvasToImage(canvas);
  1596 + //image.src = canvas.toDataURL("image/jpeg");
  1597 + var ctx = canvas.getContext('2d');
  1598 + ctx.beginPath();
  1599 + ctx.arc(100, 100, 50, 1.5 * Math.PI, 0.5 * Math.PI, false);
  1600 + ctx.lineWidth = 10;
  1601 + ctx.stroke();
  1602 + image.src = canvas.toDataURL("image/jpeg");
  1603 + //myImage.src = imgData;
  1604 + ctx.drawImage(image, 0, 0);
  1605 + window.alert(ctx.drawImage(image, 0, 0));
  1606 + // //var printContents = document.getElementById(divName).innerHTML;
  1607 + // //var originalContents = document.body.innerHTML;
  1608 + document.body.innerHTML = image;
  1609 + ;
  1610 + // if($('#canvasDiv').length>0)
  1611 + window.print();
  1612 + }
  1613 + });
  1614 + });
  1615 + });
  1616 + </script>-->
1596 1617 </body>
1597 1618 </html>
1598 1619 \ No newline at end of file
... ...