Commit 698d8c3a055d75029605c7e0df12a067c8817c70

Authored by Amrita Vishnoi
2 parents a966bef7 27108e20

Against merge request: #287

400-SOURCECODE/AIAHTML5.Web/AIAHTML5.Web.csproj
... ... @@ -65,6 +65,7 @@
65 65 <Content Include="app\views\ca\clinical-animations-detail.html" />
66 66 <Content Include="app\views\ci\clinical-illustrations-detail.html" />
67 67 <Content Include="app\views\da\da-view.html" />
  68 + <Content Include="app\views\Home\printPreview.html" />
68 69 <Content Include="app\views\LabExerc\lab-exercises-detail.html" />
69 70 <Content Include="app\views\Link\Link-view.html" />
70 71 <Content Include="app\views\AnatTest\AnatTest-view.html" />
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... ... @@ -117,6 +117,8 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
117 117 var lastOpenMoudle = $rootScope.openViews[openViews.length - 1];
118 118 }
119 119 $('#daImagePanel').remove();
  120 + if ($('#jsPanel-1').length > 0)
  121 + $('#jsPanel-1').remove();
120 122 $location.url('/' + slug);
121 123  
122 124 $rootScope.$broadcast('jsPanelCloseEvent', true);
... ... @@ -154,6 +156,8 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
154 156 $rootScope.ClearIframe = function () {
155 157 if ($('#daImagePanel') != null)
156 158 $('#daImagePanel').remove();
  159 + if ($('#jsPanel-1').length > 0)
  160 + $('#jsPanel-1').remove();
157 161  
158 162 $rootScope.hideScrollbar();
159 163 }
... ... @@ -2501,6 +2505,178 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
2501 2505 console.log('close')
2502 2506 $(".export-image").css("display", "none");
2503 2507 };
  2508 +
  2509 + $rootScope.ShowPrintWindow = function () { // Print Active Viewer
  2510 + html2canvas($("#canvasDiv"), {
  2511 + onrendered: function (canvas) {
  2512 + var dataURL = canvas.toDataURL("image/jpeg");
  2513 + var imageToPrint = new Image();
  2514 + imageToPrint.src = dataURL;
  2515 + $('#snipImage').attr('src', dataURL);
  2516 +
  2517 + $('#spnModule').text($rootScope.currentActiveModuleTitle);
  2518 + $('#spnPosture').text(localStorage.getItem('currentViewTitle'));
  2519 +
  2520 + PrintDIVContent('printBox'); // Open Print Window
  2521 + }
  2522 + });
  2523 + };
  2524 +
  2525 + $rootScope.ShowPrintPreviewWindow = function (event) { // Print Preview
  2526 + $('#dvPrintPreview').css('display', 'block');
  2527 + html2canvas($("#canvasDiv"), {
  2528 + onrendered: function (canvas) {
  2529 + var dataURL = canvas.toDataURL("image/jpeg");
  2530 + var imageToPrint = new Image();
  2531 + imageToPrint.src = dataURL;
  2532 +
  2533 + OpenJSPanel(); // open jsPanel here
  2534 + if ($('#jsPanel-1').length > 0) {
  2535 + $('.jsPanel-btn-min').attr('style', 'display: none');
  2536 + $('.jsPanel-btn-max').attr('style', 'display: none');
  2537 + $('.jsPanel-btn-norm').attr('style', 'display: none');
  2538 + }
  2539 +
  2540 + console.log('jsPanel loaded exist= ' + document.getElementById('jsPanel-1')); // document.getElementsByClassName('ppImagePanel'));
  2541 +
  2542 + var curModule = $rootScope.currentActiveModuleTitle;
  2543 + var curPosture = localStorage.getItem('currentViewTitle');
  2544 +
  2545 + if (document.getElementById('jsPanel-1')) { //document.getElementsByClassName('ppImagePanel')) {
  2546 + setTimeout(function () {
  2547 + document.getElementById('imgPortrait').setAttribute('src', dataURL);
  2548 + document.getElementById('imgLandscape').setAttribute('src', dataURL);
  2549 + document.getElementById('spnModulePor').innerHTML = curModule;
  2550 + document.getElementById('spnBodyViewTitlePor').innerHTML = curPosture;
  2551 + document.getElementById('spnModuleLan').innerHTML = curModule;
  2552 + document.getElementById('spnBodyViewTitleLan').innerHTML = curPosture;
  2553 + }, 100);
  2554 + }
  2555 +
  2556 + $('#fileMenuAnchor').addClass('disableMenuannotation');
  2557 + if ($('#daImagePanel').length > 0) {
  2558 + console.log('close')
  2559 + //$('#daImagePanel').css('display', 'none');
  2560 + $('#daImagePanel').remove();
  2561 + }
  2562 + }
  2563 + });
  2564 + };
  2565 +
  2566 + function OpenJSPanel() {
  2567 + $.jsPanel({
  2568 + id: 'jsPanel-1',
  2569 + selector: '#dvPrintPreview',
  2570 + theme: 'success',
  2571 + currentController: 'HomeController',
  2572 + parentSlug: 'da-view-list', //After closing panel, control moves to here
  2573 + ajax: {
  2574 + url: 'app/views/home/printPreview.html'
  2575 + },
  2576 + title: localStorage.getItem("currentViewTitle"),
  2577 + position: {
  2578 + top: 70,
  2579 + left: 1,
  2580 + },
  2581 + size: { width: $(window).outerWidth() - 10, height: $(window).outerHeight() - 110 },
  2582 + });
  2583 + }
  2584 +
  2585 + // $(<parent>).on('<event>', '<child>', callback);
  2586 + $(document).on('change', 'input[name=inlineRadioOptions]', function () {
  2587 + if ($(this).attr("value") == "Portrait") {
  2588 + $(".print-box").not(".portrait-box").hide();
  2589 + $(".portrait-box").show();
  2590 + }
  2591 + if ($(this).attr("value") == "Landscape") {
  2592 + $(".print-box").not(".landscape-box").hide();
  2593 + $(".landscape-box").show();
  2594 + }
  2595 + });
  2596 +
  2597 + $(document).on('change', '#printPSOptions', function () {
  2598 + var option = $('#printPSOptions').find(":selected").text();
  2599 + switch (option) {
  2600 + case (option = "10%"):
  2601 + ResizeImage(0.1);
  2602 + break;
  2603 + case (option = "25%"):
  2604 + ResizeImage(0.25);
  2605 + break;
  2606 + case (option = "50%"):
  2607 + ResizeImage(0.5);
  2608 + break;
  2609 + case (option = "75%"):
  2610 + ResizeImage(.75);
  2611 + break;
  2612 + case (option = "65%"):
  2613 + ResizeImage(0.65);
  2614 + break;
  2615 + case (option = "100%"):
  2616 + ResizeImage(1);
  2617 + break;
  2618 + case (option = "150%"):
  2619 + ResizeImage(1.5);
  2620 + break;
  2621 + case (option = "200%"):
  2622 + ResizeImage(2);
  2623 + break;
  2624 + case (option = "500%"):
  2625 + ResizeImage(5);
  2626 + break;
  2627 + case (option = "Auto"):
  2628 + ResizeImage(0);
  2629 + break;
  2630 + default:
  2631 + ResizeImage(0);
  2632 + }
  2633 + });
  2634 +
  2635 + $(document).on('click', '#btnPrint', function () {
  2636 + PrintDivContentByID('printBoxPor');
  2637 + });
  2638 +
  2639 + function PrintDivContentByID(id) {
  2640 + if (id == 'printBoxPor') {
  2641 + $("#printPSOptions").val("100%");
  2642 + ResizeImage(1);
  2643 + }
  2644 + var contents = document.getElementById(id).innerHTML;
  2645 +
  2646 + var frame1 = $('<iframe />');
  2647 + frame1[0].name = "frame1";
  2648 + frame1.css({ "position": "absolute", "top": "-1000000px" });
  2649 + $("body").append(frame1);
  2650 +
  2651 + var frameDoc = frame1[0].contentWindow ? frame1[0].contentWindow : frame1[0].contentDocument.document ? frame1[0].contentDocument.document : frame1[0].contentDocument;
  2652 +
  2653 + frameDoc.document.open();
  2654 + //Create a new HTML document.
  2655 + frameDoc.document.write('<html><head><title></title>');//Print Preview
  2656 + frameDoc.document.write('</head><body>');
  2657 + //Append the external CSS file.
  2658 + frameDoc.document.write('<link href="content/css/print-Portrait.css" rel="stylesheet" type="text/css" />');
  2659 + frameDoc.document.write('<link href="content/css/print-main.css" rel="stylesheet" type="text/css" />');
  2660 + //Append the DIV contents.
  2661 + frameDoc.document.write(contents);
  2662 + frameDoc.document.write('</body></html>');
  2663 + frameDoc.document.close();
  2664 +
  2665 + setTimeout(function () {
  2666 + window.frames["frame1"].focus();
  2667 + window.frames["frame1"].print();
  2668 + frame1.remove();
  2669 + }, 250);
  2670 +
  2671 + console.log('close')
  2672 + }
  2673 +
  2674 + $(document).on('click', '.jsglyph-remove', function () {
  2675 + $('#fileMenuAnchor').removeClass('disableMenuannotation');
  2676 + if ($('#jsPanel-1').length > 0)
  2677 + $('#jsPanel-1').remove();
  2678 + console.log('close')
  2679 + });
2504 2680  
2505 2681 $rootScope.ShowPrintWindow = function () { // Print Active Viewer
2506 2682 html2canvas($("#canvasDiv"), {
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/Home/printPreview.html 0 โ†’ 100644
  1 +๏ปฟ<div>
  2 + <div ng-include="aap/widget/MainMenu.html"></div>
  3 + <div ng-init="ShowPrintPreviewWindow()" id="jsPanel-1" class="ppImagePanel" ng-controller="HomeController">
  4 + <div class=" " id="ppView" ng-controller="HomeController">
  5 + <div class="col-sm-12">
  6 + <div class="container-fluid main-full">
  7 + <div class="row">
  8 + <div class="well padd5 marginbtm10">
  9 + <div class="col-sm-2 col-lg-1 padd-right0 marginR0 width-auto padd-left0">
  10 + <button class="btn btn-primary btn-sm" id="btnPrint">
  11 + <i class="fa fa-print"></i> Print
  12 + </button>
  13 + </div>
  14 + <div class="col-sm-2 col-lg-1">
  15 + <select id="printPSOptions" class="form-control input-sm">
  16 + <option>Auto</option>
  17 + <option>500%</option>
  18 + <option>200%</option>
  19 + <option>150%</option>
  20 + <option>100%</option>
  21 + <option>75%</option>
  22 + <option>50%</option>
  23 + <option>25%</option>
  24 + <option>10%</option>
  25 + </select>
  26 + </div>
  27 + <div class="col-sm-4 paddTop5">
  28 + <label class="radio-inline"><input type="radio" name="inlineRadioOptions" id="inlineRadio1" value="Portrait" checked=""> Portrait</label>
  29 + <label class="radio-inline"><input type="radio" name="inlineRadioOptions" id="inlineRadio2" value="Landscape"> Landscape</label>
  30 + </div>
  31 + <div class="clearfix"></div>
  32 + </div>
  33 + <div class="col-sm-12 well" align="center" style="overflow-y: auto; width: 100%; height: 490px;">
  34 + <div class="print-paper" id="dvPP">
  35 + <div class="print-box portrait-box" id="printBoxPor">
  36 + <div id="printDivContent">
  37 + <div class="">
  38 + <div class="col-sm-6" style="top: 10px; position: absolute; left: 10px;">
  39 + <span class="pull-left font12 span-font" id="spnModulePor"></span>
  40 + </div>
  41 + <div class="col-sm-6" style="top: 10px; position: absolute; right: 10px;">
  42 + <span class="pull-right font12 span-font" id="spnBodyViewTitlePor"></span>
  43 + </div>
  44 + </div>
  45 + <div class=" mar-top-25" align="center" id="dvPortrait" style="text-align: center;">
  46 + <img src="" alt="" class="logo-image" id="imgPortrait" style="width: 100%; " />
  47 + </div>
  48 + <div>
  49 + <div class="col-sm-8" style="position: absolute; bottom: 20px;">
  50 + <span class="pull-left marginTop10 font12 span-font" id="spPorCopyright">Copyright 2016 A.D.A.M., Inc. All Rights Reserved</span>
  51 + </div>
  52 + <div class="col-sm-4" style="position: absolute; bottom: 20px; right: 10px;">
  53 + <span class="pull-right marginTop10 bgnone no-margin" id="spPorLogo">
  54 + <img class="logo-image" src="content/images/adam-logo-small.png" alt="">
  55 + </span>
  56 + </div>
  57 + </div>
  58 + <div class="clearfix"></div>
  59 + </div>
  60 + </div>
  61 + <div class="print-box landscape-box" id="printBoxLan" style="display: none;">
  62 + <div class="">
  63 + <div class="col-sm-6" style="position: absolute; top: 20px; left: 10px;">
  64 + <span class="pull-left font12 span-font" id="spnModuleLan"></span>
  65 + </div>
  66 + <div class="col-sm-6" style="position: absolute; top: 20px; right: 10px;">
  67 + <span class="pull-right font12 span-font" id="spnBodyViewTitleLan"></span>
  68 + </div>
  69 + </div>
  70 + <div class="" id="dvLandscape" align="center" style="position: absolute; margin-top: 13%;">
  71 + <img src="" alt="" class="logo-image" id="imgLandscape" style="width: 100%;" />
  72 + </div>
  73 + <div class="print-footer-land">
  74 + <div class="col-sm-8" style="position: absolute; bottom: 20px; left: 10px;">
  75 + <span class="pull-left marginTop10 font12 span-font" id="spLanCopyright">Copyright 2016 A.D.A.M., Inc. All Rights Reserved</span>
  76 + </div>
  77 + <div class="col-sm-4" style="position: absolute; bottom: 20px; right: 10px;">
  78 + <span class="pull-right marginTop10 bgnone no-margin" id="spLanLogo">
  79 + <img class="logo-image" src="content/images/adam-logo-small.png" alt="">
  80 + </span>
  81 + </div>
  82 + </div>
  83 + <div class="clearfix"></div>
  84 + </div>
  85 + </div>
  86 + </div>
  87 + </div>
  88 + </div>
  89 + </div>
  90 + </div>
  91 + </div>
  92 +</div>
0 93 \ No newline at end of file
... ...
400-SOURCECODE/AIAHTML5.Web/app/widget/TopMenu.html
1 1 ๏ปฟ<div class="collapse navbar-collapse" id="topFixedNavbar1">
2 2 <ul class="nav navbar-nav toperMenu-spaceleft">
3 3 <li class="dropdown">
4   - <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">File<span class="caret"></span></a>
  4 + <a href="#" class="dropdown-toggle" data-toggle="dropdown" id="fileMenuAnchor" role="button" aria-haspopup="true" aria-expanded="false">File<span class="caret"></span></a>
5 5 <ul class="dropdown-menu">
6 6 <li><a href="#">Open Resources</a></li>
7 7 <li><a href="#">Open My Pictures</a></li>
... ... @@ -19,7 +19,7 @@
19 19 <li role="separator" class="divider"></li>
20 20 <li><a href="" id="printAVAnchor" data-toggle="modal" ng-click="ShowPrintWindow()">Print Active Viewer</a></li>
21 21 <li><a href="#">Print All Open Viewers</a></li>
22   - <li><a href="#">Print Priview</a></li>
  22 + <li><a href="" id="printPreviewAnchor" data-toggle="modal" ng-click="ShowPrintPreviewWindow()">Print Preview</a></li>
23 23 </ul>
24 24 </li>
25 25 <!--#7904-->
... ...
400-SOURCECODE/AIAHTML5.Web/index.html
... ... @@ -48,9 +48,8 @@
48 48  
49 49  
50 50 #termList option:hover {
51   - background-color: #3399FF !important;
52   - color: #fff !important;
53   -
  51 + background-color: #3399FF !important;
  52 + color: #fff !important;
54 53 }
55 54  
56 55  
... ... @@ -537,31 +536,31 @@
537 536 <div>
538 537 <a href="#canvasPaint" data-size="1" data-color="#fff" id="annotationpaintbrushsize" ng-mouseover="mouseMoveToolTip(270, 50, 120, 'Paint')" ng-mouseleave="mouseOutToolTip()" class="btn btn-black-annotation btn-xs pull-left btn-annotation btn-annotation-brush" role="button" data-placement="top" style="margin-right:1%;" ng-click="paintBrush()"><i class="fa fa-paint-brush"></i></a>
539 538 <button type="button" class="btn btn-black-annotation btn-xs pull-left btn-annotation btn-annotation-erase" data-placement="top" ng-click="EraseDrawing()" ng-mouseover="mouseMoveToolTip(270, 70, 120, 'Erase')" ng-mouseleave="mouseOutToolTip()"><i class="fa fa-eraser"></i></button>&nbsp;
540   - <div style="width: 80px; margin: 0px 0px 0px 4px; display: inline-block;float:left;">
541   - <div style="width: 58px; float: left;" ng-mouseover="mouseMoveToolTip(270, 100, 120, 'Brush Size')" ng-mouseleave="mouseOutToolTip()">
542   - <input type="text" id="btnBrushSize" class="form-control" value="1" style="height:32px;border-radius:0;" oninput="Brushsize(this)">
543   - </div>
544   - <div style="width: 22px; float: left;">
545   - <div style="width: 100%; float: left; height: 16px;">
546   - <button type="button" id="btnBrushSizeIncrement" ng-mouseover="mouseMoveToolTip(270, 100, 120, 'Brush Size')" ng-mouseleave="mouseOutToolTip()" class="btn btn-default" style="padding:0 5px;border-radius:0;font-size: 10px;vertical-align:top;">
  539 + <div style="width: 80px; margin: 0px 0px 0px 4px; display: inline-block;float:left;">
  540 + <div style="width: 58px; float: left;" ng-mouseover="mouseMoveToolTip(270, 100, 120, 'Brush Size')" ng-mouseleave="mouseOutToolTip()">
  541 + <input type="text" id="btnBrushSize" class="form-control" value="1" style="height:32px;border-radius:0;" oninput="Brushsize(this)">
  542 + </div>
  543 + <div style="width: 22px; float: left;">
  544 + <div style="width: 100%; float: left; height: 16px;">
  545 + <button type="button" id="btnBrushSizeIncrement" ng-mouseover="mouseMoveToolTip(270, 100, 120, 'Brush Size')" ng-mouseleave="mouseOutToolTip()" class="btn btn-default" style="padding:0 5px;border-radius:0;font-size: 10px;vertical-align:top;">
547 546  
548   - <img style="width:10px;height:10px;" src="~/../content/images/DA/angle-up.png">
549   - </button>
550   - </div>
551   - <div style="width: 100%; float: left; height: 16px;">
552   - <button type="button" id="btnBrushSizeDecrease" ng-mouseover="mouseMoveToolTip(270, 100, 120, 'Brush Size')" ng-mouseleave="mouseOutToolTip()" class="btn btn-default" style="padding:0 5px;border-radius:0;font-size: 10px;vertical-align:top;">
553   - <img style="width:10px;height:10px;" src="~/../content/images/DA/angle-down.png">
554   - </button>
555   - </div>
  547 + <img style="width:10px;height:10px;" src="~/../content/images/DA/angle-up.png">
  548 + </button>
  549 + </div>
  550 + <div style="width: 100%; float: left; height: 16px;">
  551 + <button type="button" id="btnBrushSizeDecrease" ng-mouseover="mouseMoveToolTip(270, 100, 120, 'Brush Size')" ng-mouseleave="mouseOutToolTip()" class="btn btn-default" style="padding:0 5px;border-radius:0;font-size: 10px;vertical-align:top;">
  552 + <img style="width:10px;height:10px;" src="~/../content/images/DA/angle-down.png">
  553 + </button>
556 554 </div>
557   -
558 555 </div>
559 556  
560   - <div class="pull-left" style="width:45%; margin-left:2%;margin-top:5px;">
561   - <div id="slider-range-min-2" ng-mouseover="mouseMoveToolTip(270, 170, 120, 'Brush Size')" ng-mouseleave="mouseOutToolTip()"></div>
562   - </div>
563   - <div class="clearfix"></div>
564   -</div>
  557 + </div>
  558 +
  559 + <div class="pull-left" style="width:45%; margin-left:2%;margin-top:5px;">
  560 + <div id="slider-range-min-2" ng-mouseover="mouseMoveToolTip(270, 170, 120, 'Brush Size')" ng-mouseleave="mouseOutToolTip()"></div>
  561 + </div>
  562 + <div class="clearfix"></div>
  563 + </div>
565 564  
566 565 </div>
567 566  
... ... @@ -734,7 +733,7 @@
734 733 <select class="form-control" disabled>
735 734 <option value="1" selected="">Entire View</option>
736 735 </select>
737   - </div>
  736 + </div>
738 737 </div>
739 738 </div>
740 739 </div>
... ... @@ -957,6 +956,9 @@
957 956 </div>
958 957 </div>
959 958  
  959 + <!--Print Preview Modal-->
  960 + <div id="dvPrintPreview" style="display: none;"></div>
  961 +
960 962 <!--<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;">
961 963 <div class="modal-dialog modal-sm" role="document">
962 964 <div class="modal-content">
... ... @@ -1081,7 +1083,7 @@
1081 1083 </div>-->
1082 1084  
1083 1085 <script>
1084   -
  1086 +
1085 1087 function enableDisableFillOption() {
1086 1088 //debugger;
1087 1089 if (document.getElementById('fill-option').checked) {
... ... @@ -1089,7 +1091,7 @@
1089 1091 //$('#imgOpacity').css({"background-color"})
1090 1092 //$("#filloption1").css({ "pointer-events": "auto" });
1091 1093 //$("#filloption12").css({ "pointer-events": "auto" });
1092   -
  1094 +
1093 1095 var x = $("#editstylebackgroundcolor span.minicolors-swatch-color").css('background-color');
1094 1096 $("#imgOpacity").css("background-color", x);
1095 1097 $("#edit-slider-3").css({ "pointer-events": "auto" });
... ... @@ -1107,7 +1109,7 @@
1107 1109  
1108 1110 }
1109 1111 else {
1110   - $('#imgOpacity').css("background-color","transparent");
  1112 + $('#imgOpacity').css("background-color", "transparent");
1111 1113 //$("#filloption1").css({ "pointer-events": "none" });
1112 1114 //$("#filloption2").css({ "pointer-events": "none" });
1113 1115 $("#edit-slider-3").css({ "pointer-events": "none" });
... ... @@ -1131,8 +1133,8 @@
1131 1133 if (document.getElementById('Outline-Option').checked) {
1132 1134 var x = $("#outlineColor span.minicolors-swatch-color").css('background-color');
1133 1135 $(".marginTopBtm10 div.outlinediv").css("border-color", x);
1134   - // var borderWidth = $("#outlineColor span.minicolors-swatch-color").css('border-width');
1135   - // $("#imgOpacity").css("border-width", borderWidth);
  1136 + // var borderWidth = $("#outlineColor span.minicolors-swatch-color").css('border-width');
  1137 + // $("#imgOpacity").css("border-width", borderWidth);
1136 1138  
1137 1139 $("#borderWidthCanvasElement").css({ "pointer-events": "auto" });
1138 1140 $("#outlineColor").css({ "pointer-events": "auto" });
... ... @@ -1502,13 +1504,13 @@
1502 1504 $("#borderWidthCanvasElement").change(function () {
1503 1505 borderWidth = $(this).val();
1504 1506 borderColor = $('#outlineColor .minicolors >.minicolors-swatch > .minicolors-swatch-color').css("background-color");
1505   -
  1507 +
1506 1508 if (borderColor != null) {
1507 1509 document.getElementById("imgOpacity").parentNode.style.border = borderWidth + "px" + " " + "solid" + " " + borderColor;
1508 1510 //$("#imgOpacity").parent().css("border", borderWidth + "px" + " " + "solid" + borderColor);
1509 1511 } else {
1510 1512  
1511   - // $("#imgOpacity").parent().css("border", borderWidth + "px" + " " + "solid");
  1513 + // $("#imgOpacity").parent().css("border", borderWidth + "px" + " " + "solid");
1512 1514 document.getElementById("imgOpacity").parentNode.style.border = borderWidth + "px" + " " + "solid" + " " + borderColor;
1513 1515  
1514 1516 }
... ... @@ -1536,7 +1538,7 @@
1536 1538  
1537 1539 borderColor = value;
1538 1540 //$("#imgOpacity").parent().css("border", borderWidth + "px" + " " + "solid" + borderColor);
1539   - document.getElementById("imgOpacity").parentNode.style.border = borderWidth + "px" + " " + "solid" + " " + borderColor;
  1541 + document.getElementById("imgOpacity").parentNode.style.border = borderWidth + "px" + " " + "solid" + " " + borderColor;
1540 1542  
1541 1543  
1542 1544 }
... ... @@ -1692,5 +1694,48 @@
1692 1694 return new Blob([ab], { type: 'image/jpeg' });
1693 1695 }
1694 1696 </script>
  1697 + <script>
  1698 + function ResizeImage(sizePercent) {
  1699 + var autoWidth = 427;
  1700 + var autoHeight = 547;
  1701 + var dvAutoSpnFontSize = 12;
  1702 + var imgLogoW = 77;
  1703 + var fullWidth = 620; //$('#canvasDiv').width();
  1704 + var fullHeight = 876; //$('#canvasDiv').height();
  1705 +
  1706 + if (sizePercent == 0) {
  1707 + $('#printBoxPor').width(autoWidth).height(autoHeight);//.height(dvPrintBoxPorH * sizePercent);
  1708 + $('#printBoxLan').width(autoHeight).height(autoWidth);
  1709 + $('#dvPortrait').width(autoWidth);
  1710 + $('#dvLandscape').width(autoHeight);
  1711 + $('.span-font').attr('style', 'font-size: ' + (dvAutoSpnFontSize * .65).toFixed() + 'px');
  1712 + $(".logo-image").attr('width', imgLogoW * .65);
  1713 + }
  1714 +
  1715 + else if (sizePercent == 1) {
  1716 + $('#dvPortrait').width(fullWidth * sizePercent);
  1717 + $('#dvLandscape').width(fullHeight * sizePercent);
  1718 + $('#printBoxPor').width(fullWidth * sizePercent).height(fullHeight * sizePercent);
  1719 + $('#printBoxLan').width(fullHeight * sizePercent).height(fullWidth * sizePercent);
  1720 + $('.span-font').attr('style', 'font-size: ' + dvAutoSpnFontSize + 'px');
  1721 + $(".logo-image").attr('width', imgLogoW);
  1722 + }
  1723 +
  1724 + else {
  1725 + $('#dvPortrait').width(fullWidth * sizePercent);
  1726 + $('#dvLandscape').width(fullHeight * sizePercent);
  1727 + $('.span-font').attr('style', 'font-size: ' + (dvAutoSpnFontSize * sizePercent).toFixed() + 'px !important');
  1728 + $(".logo-image").attr('width', (imgLogoW * sizePercent).toFixed());
  1729 + if (sizePercent > 1) {
  1730 + $('#printBoxPor').width(fullWidth * sizePercent).height(fullHeight * sizePercent);
  1731 + $('#printBoxLan').width(fullHeight * sizePercent).height(fullWidth * sizePercent);
  1732 + }
  1733 + else {
  1734 + $('#printBoxPor').width(fullWidth * sizePercent).height(fullHeight * sizePercent);
  1735 + $('#printBoxLan').width(fullHeight * sizePercent).height(fullWidth * sizePercent);
  1736 + }
  1737 + }
  1738 + }
  1739 + </script>
1695 1740 </body>
1696 1741 </html>
1697 1742 \ No newline at end of file
... ...