1 // +-----------------------------------------------------------------------------+
2 // Copyright (C) 2011 IntegralEMR LLC <kevin.y@integralemr.com>
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
17 // A copy of the GNU General Public License is included along with this program:
18 // openemr/interface/login/GnuGPL.html
19 // For more information write to the Free Software
20 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 // Author: Kevin Yeh <kevin.y@integralemr.com>
23 // Author: Jerry Padgett <sjpadgett@gmail.com>
25 // +------------------------------------------------------------------------------+
26 function updateApptTime(marker, index, y, date, provider) {
27 let row = $("#times table tr").eq(index);
28 let timeSlot = row.find("td a");
29 if (typeof timeSlot.attr("href") !== 'undefined') {
31 let params = timeSlot.attr("href").split("(")[1].split(",");
32 let newEvtParam = params[0] + "," + params[1] + "," + params[2] + "," + date + "," + provider + "," + "0";
33 let onClk = "javascript:newEvt(" + newEvtParam + ")";
34 marker.html(timeSlot.html());
35 marker.attr("href", onClk);
40 function displayApptTime(evt) {
41 let marker = $(this).find("a.apptMarker");
42 if (marker.length == 0) {
43 style = "style='height:" + tsHeight + ";'";
44 $(this).find("div.calendar_day").append("<a class='apptMarker event event_appointment'" + style + "></a>");
45 marker = $(this).find("a.apptMarker");
46 marker.css("z-index", 1);
48 y = evt.pageY - $(this).offset().top;
49 rem = y % tsHeightNum;
51 let ph = $(this).find("div.providerheader");
52 let index = y / tsHeightNum;
61 date = $(this).attr("date");
62 updateApptTime(marker, index, y, date, $(this).attr("provider"));
66 function hideApptTime(evt) {
67 let marker = $(this).find("a.apptMarker");
71 function setupDirectTime() {
72 $("td.schedule").mousemove(displayApptTime);
73 $("td.schedule").mouseleave(hideApptTime);