dump db version
[openemr.git] / interface / help_modal.php
blob85b8e8044fa6f6adc5797f4582241d90f15cd066
1 <?php
2 /**
3 * Help modal.
5 * @package OpenEMR
6 * @link http://www.open-emr.org
7 * @author Ranganath Pathak <pathak@scrs1.org>
8 * @author Brady Miller <brady.g.miller@gmail.com>
9 * @copyright Copyright (c) 2018 Ranganath Pathak <pathak@scrs1.org>
10 * @copyright Copyright (c) 2018 Brady Miller <brady.g.miller@gmail.com>
11 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
14 require_once('globals.php');
16 use OpenEMR\Core\Header;
18 Header::setupHeader(['jquery-ui', 'jquery-ui-base', 'no_jquery', 'no_bootstrap', 'no_fontawesome', 'no_main-theme', 'no_textformat', 'no_dialog' ]);
20 <br>
21 <?php
22 $close = xla("Close");
23 $print = xla("Print");
25 $help_modal = <<<HELP
26 <div class="row">
27 <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
28 <div class="modal-dialog modal-lg">
29 <div class="modal-content oe-modal-content" style="height:700px">
30 <div class="modal-header clearfix">
31 <button type="button" class="close" data-dismiss="modal" aria-label=$close>
32 <span aria-hidden="true" style="color:#000000; font-size:1.5em;">×</span></button>
33 </div>
34 <div class="modal-body" style="height:80%;">
35 <iframe src="" id="targetiframe" style="height:100%; width:100%; overflow-x: hidden; border:none"
36 allowtransparency="true"></iframe>
37 </div>
38 <div class="modal-footer" style="margin-top:0px;">
39 <button class="btn btn-link btn-cancel oe-pull-away" data-dismiss="modal" type="button">$close</button>
40 <!--<button class="btn btn-default btn-print oe-pull-away" data-dismiss="modal" id="print-help-href" type="button">$print</button>-->
41 </div>
42 </div>
43 </div>
44 </div>
45 </div>
46 HELP;
48 echo $help_modal;
50 <script>
51 var helpFilePath = '<?php echo "$webroot/Documentation/help_files/"?>';
52 $(document).ready(function() {
53 $('#help-href').click (function(){
54 document.getElementById('targetiframe').src = helpFilePath + helpFile;
56 });
57 <?php //print needs work on ie, edge browsers?>
58 $(document).ready(function() {
59 $('#print-help-href').click (function(){
60 $("#targetiframe").get(0).contentWindow.print();
62 });
63 // Jquery draggable
64 $('.modal-dialog').draggable({
65 handle: ".modal-header, .modal-footer"
66 });
67 $( ".modal-content" ).resizable({
68 aspectRatio: true,
69 minHeight: 300,
70 minWidth: 300
71 });
72 </script>