2 * general document list
5 * @link http://www.open-emr.org
6 * @author Brady Miller
<brady.g.miller@gmail.com
>
7 * @copyright Copyright (c)
2017 Brady Miller
<brady.g.miller@gmail.com
>
8 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License
3
14 <link rel=
"stylesheet" href=
"{$GLOBALS.assets_static_relative}/bootstrap-3-3-4/dist/css/bootstrap.min.css">
15 <link rel=
"stylesheet" href=
"{$GLOBALS.css_header}" type=
"text/css">
16 <link rel=
"stylesheet" href=
"{$GLOBALS.assets_static_relative}/dropzone-4-3-0/dist/dropzone.css">
17 <link href=
"{$GLOBALS.assets_static_relative}/jquery-ui-1-12-1/themes/ui-lightness/jquery-ui.min.css" rel=
"stylesheet" type=
"text/css" />
18 <link rel=
"stylesheet" href=
"{$GLOBALS.assets_static_relative}/jquery-datetimepicker-2-5-4/build/jquery.datetimepicker.min.css">
20 <style type=
"text/css">
22 margin: 10 auto
10 auto
;
23 color: rgb
(255, 0, 0);
44 <script type=
"text/javascript" src=
"{$GLOBALS.assets_static_relative}/jquery-min-3-1-1/index.js"></script>
45 <script type=
"text/javascript" src=
"{$GLOBALS.assets_static_relative}/jquery-ui-1-12-1/jquery-ui.min.js"></script>
46 <script type=
"text/javascript" src=
"{$GLOBALS.webroot}/library/js/DocumentTreeMenu.js"></script>
47 <script type=
"text/javascript" src=
"{$GLOBALS.assets_static_relative}/dropzone-4-3-0/dist/dropzone.js"></script>
48 <script type=
"text/javascript" src=
"library/dialog.js?v={$GLOBALS.v_js_includes}"></script>
49 <script type=
"text/javascript" src=
"library/textformat.js?v={$GLOBALS.v_js_includes}"></script>
50 <script type=
"text/javascript" src=
"{$GLOBALS.assets_static_relative}/jquery-datetimepicker-2-5-4/build/jquery.datetimepicker.full.min.js"></script>
52 <script type=
"text/javascript">
53 // dropzone javascript asset translation(s)
54 Dropzone
.prototype.defaultOptions
.dictDefaultMessage
= "{xl t='Drop files here to upload'}";
58 <!--<body bgcolor="{$STYLE.BGCOLOR2}">-->
59 <!-- ViSolve - Call expandAll function on loading of the page if global value 'expand_document' is set -->
60 {if $GLOBALS.expand_document_tree}
61 <body class=
"body_top" onload=
"javascript:objTreeMenu_1.expandAll();return false;">
63 <body class=
"body_top">
66 <div id=
"documents_list">
67 <div class=
"ui-widget"style=
"float:right;">
68 <button id='pid'
class=
"pBtn" type=
"button" style=
"float:right;">0</button>
69 <input id=
"selectPatient" type=
"text" placeholder=
"{$place_hld|escape:'html'}">
71 <a id=
"list_collapse" href=
"#" onclick=
"javascript:objTreeMenu_1.collapseAll();return false;"> ({xl t='Collapse all'|escape:'html'})
</a>
72 <div class=
"title">{xl t='Documents'|escape:'html'}
</div>
75 <div id=
"documents_actions">
77 <div class='text'
style=
"margin-bottom:-10px; margin-top:-8px"><i>{$message|escape:'html'}
</i></div><br>
80 <div class='text'
style=
"margin-bottom:-10px; margin-top:-8px"><i>{$messages|escape:'html'}
</i></div><br>
84 <script type=
"text/javascript">
85 var curpid
= "{$cur_pid|escape:'html'}";
86 var newVersion
="{$is_new|escape:'html'}";
87 var demoPid
= "{$demo_pid|escape:'html'}";
88 var inUseMsg
= "{$used_msg|escape:'html'}";
90 if(curpid
== demoPid
&& !newVersion
){
91 $(".ui-widget").hide();
94 $("#pid").text(curpid
);
97 $( "#selectPatient" ).autocomplete({
98 source
: "{/literal}{$GLOBALS.webroot}{literal}/library/ajax/document_helpers.php",
99 focus: function(event
, sel
) {
100 event
.preventDefault();
102 select: function(event
, sel
) {
103 event
.preventDefault();
104 if (sel
.item
.value
== '00' && ! sel
.item
.label
.match('{/literal}{xl t="Reset"|escape:"html"}{literal}')){
108 $(this).val(sel
.item
.label
);
109 location
.href
= "{/literal}{$GLOBALS.webroot}{literal}/controller.php?document&list&patient_id="+sel
.item
.value
+"&patient_name=" + sel
.item
.label
;
110 $("#pid").text(sel
.item
.value
);
113 }).autocomplete("widget").addClass("fixed-height");
115 $(".pBtn").click(function(event
) {
116 var $input
= $("#selectPatient");
118 $input
.autocomplete('search'," ");
121 $("#list_collapse").detach().appendTo("#objTreeMenu_1_node_1 nobr");
123 // functions to view and pop out documents as needed.
126 $("img[id^='icon_objTreeMenu_']").tooltip({
127 items
: $("img[src*='file3.png']"),
128 content
: '{/literal}{xl t="Double Click on this icon to pop up document in a new viewer."|escape:"html"}{literal}'
131 $("img[id^='icon_objTreeMenu_']").on('dblclick', function (e
) {
132 let popsrc
= $(this).next("a").attr('href') || '';
133 let diview
= $(this).next("a").text();
135 if (!popsrc
.includes('&view&')) {
137 } else if (diview
.toLowerCase().includes('.dcm') || diview
.toLowerCase().includes('.zip')) {
138 popsrc
= "{/literal}{$GLOBALS.webroot}{literal}/library/dicom_frame.php?web_path=" + popsrc
;
141 popsrc
= popsrc
.replace('&view&', '&retrieve&') + 'as_file=false';
142 let poContentModal = function () {
143 let wname
= '_' + Math
.random().toString(36).substr(2, 6);
144 let opt
= "menubar=no,location=no,resizable=yes,scrollbars=yes,status=no";
145 window
.open(popsrc
, wname
, opt
);
148 let btnText
= '{/literal}{xl t="Full Screen"|escape:"html"}{literal}';
149 let btnClose
= '{/literal}{xl t="Close"|escape:"html"}{literal}';
150 let size
= 'modal-xl';
151 let sizeHeight
= 'full';
155 dlgopen(popsrc
, 'popdoc', size
, 600, '', '', {
157 {text
: btnText
, close
: true, style
: 'primary btn-xs', click
: poContentModal
},
158 {text
: btnClose
, close
: true, style
: 'default btn-xs'}
160 sizeHeight
: sizeHeight
,
170 $(document
).ready(function(){{/literal
}
171 {datetimepickerSupport
}
172 {literal
}});{/literal
}