Merge pull request #814 from robertdown/add-update-icon
[openemr.git] / interface / main / calendar / modules / PostCalendar / pntemplates / default / views / global / fancy_navigation.html
blobebe4fd83b252745bbff50262579219816b8c532f
1 <style>
2 a {
3 text-decoration:none;
5 td {
6 font-family: Arial, Helvetica, sans-serif;
8 .tacell {
9 font-size:10pt;
10 background-color:#e8eef7;
11 text-align:right;
13 .tucell {
14 font-size:10pt;
15 background-color:#f6c6c6;
16 text-align:right;
18 .eacell {
19 font-size:10pt;
20 background-color:#ffffff;
22 .eucell {
23 font-size:10pt;
24 background-color:#ebebeb;
26 .bordyy {
28 .bordyn {
29 border-top-width:0px;
30 padding-top:0px;
32 .bordny {
33 border-bottom-width:0px;
34 padding-bottom:0px;
36 .bordnn {
37 border-top-width:0px;
38 border-bottom-width:0px;
39 padding-top:0px;
40 padding-bottom:0px;
42 div.tiny { width:1px; height:1px; font-size:1px; }
44 /* (CHEMED) */
46 .selectors_container {
47 position: absolute;
48 top: 25px;
49 left: 0px;
50 z-index: 3;
51 float: right;
52 width: 600px;
53 height: 180px;
54 visibility: hidden;
55 background-color: #B0C4DE;
56 border-top: solid 2px #E8EEF7;
57 border-left: solid 2px #E8EEF7;
58 border-bottom: solid 2px #000000;
59 border-right: solid 2px #000000;
62 .selectors_lists_container {
63 float: left;
64 padding: 5px;
67 .selectors_cal_container {
68 float: left;
69 padding: 5px;
72 .selector_buttons {
73 position: absolute;
74 top: 0px;
75 left: 0px;
76 height: 30;
79 .navigation_buttons {
80 position: absolute;
81 top: 0px;
82 left: 40%;
83 height: 30;
86 .service_buttons {
87 position: absolute;
88 top: 0px;
89 right: 20px;
90 height: 30;
93 .viewtype_selected {
94 border: #000000 solid 1px;
97 .viewtype {
100 .apptstatus {
101 font-family: Verdana, Arial, Helvetica, sans-serif;
102 font-size: 9pt;
103 color: #000000;
104 font-weight: bold;
105 margin: 0px 2px 0px 2px;
108 .appttime {
109 font-family: Verdana, Arial, Helvetica, sans-serif;
110 font-size: 9pt;
111 margin-left: 2px;
112 border-left: solid 1px #000000;
115 .apptname {
116 font-family: Verdana, Arial, Helvetica, sans-serif;
117 font-size: 9pt;
118 margin-right: 2px;
119 border-right: solid 1px #000000;
121 .cal_date_range {
122 padding: 0px;
123 margin-top: 35px;
127 /*END (CHEMED) */
129 </style>
131 <style type="text/css">@import url(../../../library/dynarch_calendar.css);</style>
132 <script type="text/javascript" src="../../../library/dialog.js?v=[-php-] echo $v_js_includes; [-/php-]"></script>
133 <script type="text/javascript" src="../../../library/textformat.js"></script>
134 <script type="text/javascript" src="../../../library/dynarch_calendar.js"></script>
135 [-php-] include_once("{$GLOBALS['srcdir']}/dynarch_calendar_en.inc.php"); [-/php-]
136 <script type="text/javascript" src="../../../library/dynarch_calendar_setup.js"></script>
138 <script language='JavaScript'>
140 var mypcc = '[-php-] echo $GLOBALS['phone_country_code'] [-/php-]';
142 // This is called from the event editor popup.
143 function refreshme() {
144 top.restoreSession();
145 document.forms[0].submit();
148 function newEvt(startampm, starttimeh, starttimem, eventdate, providerid, catid) {
149 dlgopen('add_edit_event.php?startampm=' + startampm +
150 '&starttimeh=' + starttimeh + '&starttimem=' + starttimem +
151 '&date=' + eventdate + '&userid=' + providerid + '&catid=' + catid,
152 '_blank', 775, 500);
155 function oldEvt(eventdate, eventid) {
156 dlgopen('add_edit_event.php?date='+eventdate+'&eid=' + eventid, '_blank', 775, 500);
159 function goPid(pid) {
160 top.restoreSession();
161 [-php-]
162 echo " top.RTop.location = '../../patient_file/summary/demographics.php' " .
163 "+ '?set_pid=' + pid;\n";
164 [-/php-]
167 function GoToToday(theForm){
168 var todays_date = new Date();
169 var theMonth = todays_date.getMonth() + 1;
170 theMonth = theMonth < 10 ? "0" + theMonth : theMonth;
171 theForm.jumpdate.value = todays_date.getFullYear() + "-" + theMonth + "-" + todays_date.getDate();
172 top.restoreSession();
173 theForm.submit();
176 //(CHEMED)
177 function ShowFacility() {
178 var sel = document.getElementById('all_users');
179 if (sel) {sel.value = '__PC_ALL__';} //Show all the users in the facility when switching facilities
180 document.getElementById('cal_navigator').submit();
183 function ChangeViewType(viewtype) {
184 document.getElementById('viewtype').value = viewtype;
185 document.getElementById('cal_navigator').submit();
187 //END (CHEMED)
189 </script>
191 <!-- Required for the popup date selectors -->
192 <div id="overDiv" style="position:absolute; visibility:hidden; z-index:1;">&nbsp;</div>
194 [-php-]
196 // A_CATEGORY is an ordered array of associative-array categories.
197 // Keys of interest are: id, name, color, desc, event_duration.
199 // echo "<!-- A_CATEGORY = "; print_r($this->_tpl_vars['A_CATEGORY']); echo " -->\n"; // debugging
200 // echo "<!-- A_EVENTS = "; print_r($this->_tpl_vars['A_EVENTS']); echo " -->\n"; // debugging
202 $A_CATEGORY =& $this->_tpl_vars['A_CATEGORY'];
204 $A_EVENTS =& $this->_tpl_vars['A_EVENTS'];
205 // $S_EVENTS =& $this->_tpl_vars['S_EVENTS']; // Deleted by Rod
206 $providers =& $this->_tpl_vars['providers'];
207 $times =& $this->_tpl_vars['times'];
208 $interval = $this->_tpl_vars['interval'];
209 $viewtype = $this->_tpl_vars['VIEW_TYPE'];
210 $PREV_WEEK_URL = $this->_tpl_vars['PREV_WEEK_URL'];
211 $NEXT_WEEK_URL = $this->_tpl_vars['NEXT_WEEK_URL'];
212 $PREV_DAY_URL = $this->_tpl_vars['PREV_DAY_URL'];
213 $NEXT_DAY_URL = $this->_tpl_vars['NEXT_DAY_URL'];
215 $Date = postcalendar_getDate();
216 if (!isset($y)) $y = substr($Date, 0, 4);
217 if (!isset($m)) $m = substr($Date, 4, 2);
218 if (!isset($d)) $d = substr($Date, 6, 2);
220 // echo "<!-- There are " . count($A_EVENTS) . " A_EVENTS days -->\n";
222 // $MULTIDAY = count($A_EVENTS) > 1; // (CHEMED) not needed after week_view template changes
224 $provinfo = getProviderInfo('%', true, $_SESSION['pc_facility']); //(CHEMED)
226 [-/php-]
228 <form name='theform' id='cal_navigator' action='index.php?module=PostCalendar&func=view&tplview=default&pc_category=&pc_topic='
229 method='post' onsubmit='return top.restoreSession()'>
231 <div class='selector_buttons'>
233 <img src='../../pic/show_calendar.gif' id='img_jumpdate' align='absbottom'
234 width='24' height='22' border='0' alt='[?]' style='cursor:pointer'
235 title='[-php-] echo xl ("Click here to choose a date");[-/php-]'>
237 <input type='text' size='10' name='jumpdate' id='jumpdate'
238 value='[-php-] echo "$y-$m-$d";[-/php-]' title='yyyy-mm-dd date to go to'
239 onkeyup='datekeyup(this,mypcc)' onblur='dateblur(this,mypcc)' />
241 <input type='submit' name='bnsubmit' value='[-php-] echo xl("Go"); [-/php-]' />
243 <input type='submit' name='bnsubmit' value='[-php-] echo xl("Today"); [-/php-]' onClick='GoToToday(theform);' />
245 </div>
247 <div class='navigation_buttons'>
248 <input name='viewtype' id='viewtype' type='hidden' value='[-php-] echo $viewtype[-/php-]' />
249 [-php-]
250 foreach ( array ('day' => xl("Day"), 'week' => xl("Week"), 'month' => xl("Month"), 'year' => xl("Year"))
251 as $key => $value) {
252 echo " <input type='button' onClick='javascript:ChangeViewType(\"$key\");' class='viewtype' value='$value' />";
254 [-/php-]
255 </div>
257 <div class='service_buttons'>
258 <input type='button' value='[-php-] echo xl("Add"); [-/php-]' onclick='newEvt(1, 9, 00, [-php-] echo $Date;[-/php-], 0, 0)' />
259 <input type='button' value='[-php-] echo xl("Search"); [-/php-]' onclick='top.restoreSession();location="index.php?module=PostCalendar&func=search"' />
261 <a href="[-pc_url action=$VIEW_TYPE print="true"-]">[-php-] echo xlt("View Printable Version"); [-/php-]</a>
263 </div>
265 <div class='selectors_container' id='selectors_container'>
266 <div class='selectors_cal_container' id='selectors_cal_container'>
267 </div>
269 <div class='selectors_lists_container'>
270 <input type='hidden' name='all_users' id='all_users' value='' />
271 <select multiple size='10' name='pc_username[]' >
272 <option value='__PC_ALL__'>[-php-] echo xl ("All Users"); [-/php-]</option>
273 [-php-]
274 foreach ($provinfo as $doc) {
275 $username = $doc['username'];
276 echo " <option value='$username'";
277 foreach ($providers as $provider)
278 if ($provider['username'] == $username) echo " selected";
279 echo ">" . $doc['fname'] . " " . $doc['lname'] . "</option>\n";
281 [-/php-]
282 </select>
284 [-php-]
285 // ==============================
286 // FACILITY FILTERING (lemonsoftware)(CHEMED)
287 // $facilities = getFacilities(); // (CHEMED) commented this out
288 // We only want to see facilities that are a 'service location',
289 // as 'billing location' facilities should not have any patient appointments
290 // TODO: Is the above statement true?
291 $facilities = getServiceFacilities();
292 [-/php-]
294 <select name='pc_facility' size='10' onchange='ShowFacility()'>
295 [-php-]
296 if ( !$_SESSION['pc_facility'] ) $selected = "selected='selected'";
297 echo " <option value='0' $selected>" .xl('All Facilities'). "</option>\n";
298 foreach ($facilities as $fa) {
299 $selected = ( $_SESSION['pc_facility'] == $fa['id']) ? "selected='selected'" : "" ;
300 echo " <option value='" .$fa['id']. "' $selected>" .$fa['name']. "</option>\n";
302 [-/php-]
303 </select>
305 </div>
307 </div>
309 </form>
311 <p align="center" class='cal_date_range'>
312 [-php-]
313 // Show the date/range and its previous- and next-day/week selectors.
314 $atmp = array_keys($A_EVENTS);
316 if ($MULTIDAY) {
317 echo "<a href='$PREV_WEEK_URL' onclick='top.restoreSession()'>&lt;&lt;</a>&nbsp;\n";
318 echo dateformat(strtotime($atmp[0]));
319 echo " - ";
320 echo dateformat(strtotime($atmp[count($atmp)-1]));
321 echo "&nbsp;<a href='$NEXT_WEEK_URL' onclick='top.restoreSession()'>&gt;&gt;</a>\n";
322 } else {
323 echo "<a href='$PREV_DAY_URL' onclick='top.restoreSession()'>&lt;&lt;</a>&nbsp;\n";
324 echo dateformat(strtotime($atmp[0]), true);
325 echo "&nbsp;<a href='$NEXT_DAY_URL' onclick='top.restoreSession()'>&gt;&gt;</a>\n";
328 [-/php-]
329 </p>
331 <script language='JavaScript'>
333 //(CHEMED) popup calendar
334 function dateChanged(calendar) {
335 // Beware that this function is called even if the end-user only
336 // changed the month/year. In order to determine if a date was
337 // clicked you can use the dateClicked property of the calendar:
338 if (calendar.dateClicked) {
339 // OK, a date was clicked, redirect to /yyyy/mm/dd/index.php
340 var y = calendar.date.getFullYear();
341 var m = calendar.date.getMonth() + 1; // integer, 1..12
342 if (m < 10) {m = '0'+m;}
343 var d = calendar.date.getDate(); // integer, 1..31
344 if (d < 10) {d = '0'+d;}
345 // redirect...
346 document.getElementById("jumpdate").value = y + "-" + m + "-" + d;
350 var cal = Calendar.setup({flat: "selectors_cal_container", flatCallback: dateChanged});
351 var trig = document.getElementById("img_jumpdate");
352 document.getElementById("selectors_container").style.visibility = 'hidden';
353 cal.hide();
354 trig.onmouseover = function() {
355 if (document.getElementById("selectors_container").style.visibility == 'hidden') {
356 cal.show();
357 document.getElementById("selectors_container").style.visibility = 'visible';
358 } else {
359 document.getElementById("selectors_container").style.visibility = 'hidden';
360 cal.hide();
363 //END (CHEMED)
364 </script>