Update date/time picker to latest version, restoring functionality.
This commit is contained in:
@@ -158,17 +158,6 @@
|
||||
//show the header
|
||||
require_once "resources/header.php";
|
||||
|
||||
//add the calendar
|
||||
echo "<script language='JavaScript' type='text/javascript'>\n";
|
||||
echo " $(document).ready(function() {\n";
|
||||
echo " apply_datetimepicker();\n";
|
||||
echo " });\n";
|
||||
echo " function apply_datetimepicker() {\n";
|
||||
echo " $('.datetimepicker').datetimepicker({ format: 'YYYY-MM-DD HH:mm', showTodayButton: true, showClear: true, showClose: true });\n";
|
||||
echo " $('.datepicker').datetimepicker({ format: 'YYYY-MM-DD', showClear: true, showClose: true });\n";
|
||||
echo " }\n";
|
||||
echo "</script>\n";
|
||||
|
||||
//show the content
|
||||
echo "<form name='frm' id='frm' method='post' action=''>\n";
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
@@ -219,7 +208,7 @@
|
||||
echo " ".$text['label-call_recording_date']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' style='position: relative;' align='left'>\n";
|
||||
echo " <input class='formfld datetimepicker' type='text' name='call_recording_date' maxlength='16' value=\"".escape($call_recording_date)."\">\n";
|
||||
echo " <input class='formfld datetimesecpicker' data-toggle='datetimepicker' data-target='#call_recording_date' onblur=\"$(this).datetimepicker('hide');\" type='text' name='call_recording_date' id='call_recording_date' maxlength='16' value=\"".escape($call_recording_date)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-call_recording_date']."\n";
|
||||
echo "</td>\n";
|
||||
|
||||
@@ -703,8 +703,8 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' nowrap='nowrap' width='30%'>".$text['label-schedule']."</td>\n";
|
||||
echo "<td class='vtable' width='70%' align='left' style='position: relative; min-width: 275px;'>\n";
|
||||
echo " <input type='text' class='formfld datetimepicker' style='min-width: 115px; width: 115px; max-width: 115px;' name='start_datetime' id='start_datetime' placeholder='".$text['label-from']."' value='".escape($start_datetime)."'>\n";
|
||||
echo " <input type='text' class='formfld datetimepicker' style='min-width: 115px; width: 115px; max-width: 115px;' name='stop_datetime' id='stop_datetime' placeholder='".$text['label-to']."' value='".escape($stop_datetime)."'>\n";
|
||||
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#start_datetime' onblur=\"$(this).datetimepicker('hide');\" style='min-width: 115px; width: 115px; max-width: 115px;' name='start_datetime' id='start_datetime' placeholder='".$text['label-from']."' value='".escape($start_datetime)."'>\n";
|
||||
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#stop_datetime' onblur=\"$(this).datetimepicker('hide');\" style='min-width: 115px; width: 115px; max-width: 115px;' name='stop_datetime' id='stop_datetime' placeholder='".$text['label-to']."' value='".escape($stop_datetime)."'>\n";
|
||||
echo " <br>".$text['description-schedule'];
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
@@ -194,7 +194,7 @@ else {
|
||||
echo " ".$text['label-time_start']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td width='70%' class='vtable' style='position: relative;' align='left'>\n";
|
||||
echo " <input class='formfld datetimesecondspicker' type='text' name='time_start' id='time_start' style='min-width: 135px; width: 135px;' value='".escape($time_start)."'>\n";
|
||||
echo " <input class='formfld datetimesecpicker' data-toggle='datetimepicker' data-target='#time_start' type='text' name='time_start' id='time_start' style='min-width: 135px; width: 135px;' value='".$time_start."' onblur=\"$(this).datetimepicker('hide');\">\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
@@ -203,7 +203,7 @@ else {
|
||||
echo " ".$text['label-time_stop']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' style='position: relative;' align='left'>\n";
|
||||
echo " <input class='formfld datetimesecondspicker' type='text' name='time_stop' id='time_stop' style='min-width: 135px; width: 135px;' value='".escape($time_stop)."'>\n";
|
||||
echo " <input class='formfld datetimesecpicker' data-toggle='datetimepicker' data-target='#time_stop' type='text' name='time_stop' id='time_stop' style='min-width: 135px; width: 135px;' value='".$time_stop."' onblur=\"$(this).datetimepicker('hide');\">\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
@@ -230,17 +230,7 @@ else {
|
||||
echo "<br><br>";
|
||||
echo "</form>";
|
||||
|
||||
//apply bootstrap-datetimepicker WITH seconds
|
||||
echo "<script language='JavaScript' type='text/javascript'>";
|
||||
echo " $(document).ready(function() {\n";
|
||||
echo " $(function() {\n";
|
||||
echo " $('.datetimepicker').datetimepicker({\n";
|
||||
echo " format: 'YYYY-MM-DD HH:mm:ss',\n";
|
||||
echo " });\n";
|
||||
echo " });\n";
|
||||
echo " });\n";
|
||||
echo "</script>\n";
|
||||
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
?>
|
||||
|
||||
?>
|
||||
@@ -773,10 +773,13 @@
|
||||
tb_id = obj.id;
|
||||
tb.className = 'formfld datetimepicker';
|
||||
tb.setAttribute('style', 'position: relative; width: 120px; min-width: 120px; max-width: 120px; text-align: center;');
|
||||
tb.setAttribute('data-toggle', 'datetimepicker');
|
||||
tb.setAttribute('data-target', '#' + tb.id);
|
||||
tb.setAttribute('onblur', "$(this).datetimepicker('hide');");
|
||||
obj.parentNode.insertBefore(tb, obj);
|
||||
obj.parentNode.removeChild(obj);
|
||||
$('#'+tb_id).wrap("<div style='position: relative; display: inline;'></div>"); //add parent div
|
||||
$('#'+tb_id).datetimepicker({ format: 'YYYY-MM-DD HH:mm', showTodayButton: true, showClear: true, showClose: true, });
|
||||
$('#'+tb_id).datetimepicker({ format: 'YYYY-MM-DD HH:mm', });
|
||||
}
|
||||
|
||||
function change_to_select(obj) {
|
||||
|
||||
@@ -253,8 +253,8 @@
|
||||
echo " ".$text['label-start_range']."\n";
|
||||
echo " </td>\n";
|
||||
echo " <td class='vtable' align='left' style='position: relative; min-width: 250px;'>\n";
|
||||
echo " <input type='text' class='formfld datetimepicker' style='min-width: 115px; width: 115px;' name='start_stamp_begin' placeholder='".$text['label-from']."' value='".escape($start_stamp_begin)."'>\n";
|
||||
echo " <input type='text' class='formfld datetimepicker' style='min-width: 115px; width: 115px;' name='start_stamp_end' placeholder='".$text['label-to']."' value='".escape($start_stamp_end)."'>\n";
|
||||
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#start_stamp_begin' onblur=\"$(this).datetimepicker('hide');\" style='min-width: 115px; width: 115px;' name='start_stamp_begin' id='start_stamp_begin' placeholder='".$text['label-from']."' value='".escape($start_stamp_begin)."'>\n";
|
||||
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#start_stamp_end' onblur=\"$(this).datetimepicker('hide');\" style='min-width: 115px; width: 115px;' name='start_stamp_end' id='start_stamp_end' placeholder='".$text['label-to']."' value='".escape($start_stamp_end)."'>\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo " <tr>\n";
|
||||
|
||||
@@ -250,8 +250,8 @@
|
||||
echo " ".$text['label-start_range']."\n";
|
||||
echo " </td>\n";
|
||||
echo " <td class='vtable' align='left' style='position: relative; min-width: 250px;'>\n";
|
||||
echo " <input type='text' class='formfld datetimepicker' style='min-width: 115px; width: 115px;' name='start_stamp_begin' placeholder='".$text['label-from']."' value='".escape($start_stamp_begin)."'>\n";
|
||||
echo " <input type='text' class='formfld datetimepicker' style='min-width: 115px; width: 115px;' name='start_stamp_end' placeholder='".$text['label-to']."' value='".escape($start_stamp_end)."'>\n";
|
||||
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#start_stamp_begin' onblur=\"$(this).datetimepicker('hide');\" style='min-width: 115px; width: 115px;' name='start_stamp_begin' id='start_stamp_begin' placeholder='".$text['label-from']."' value='".escape($start_stamp_begin)."'>\n";
|
||||
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#start_stamp_end' onblur=\"$(this).datetimepicker('hide');\" style='min-width: 115px; width: 115px;' name='start_stamp_end' id='start_stamp_end' placeholder='".$text['label-to']."' value='".escape($start_stamp_end)."'>\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo " <tr>\n";
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
echo " ".$text['label-start_date_time']."\n";
|
||||
echo " </td>\n";
|
||||
echo " <td class='vtable' width='70%' align='left' style='position: relative; min-width: 135px;'>\n";
|
||||
echo " <input type='text' class='formfld datetimepicker' style='min-width: 115px; width: 115px; max-width: 115px;' name='start_stamp_begin' id='start_stamp_begin' placeholder='".$text['label-from']."' value='$start_stamp_begin'>\n";
|
||||
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#start_stamp_begin' onblur=\"$(this).datetimepicker('hide');\" style='min-width: 115px; width: 115px; max-width: 115px;' name='start_stamp_begin' id='start_stamp_begin' placeholder='".$text['label-from']."' value='".escape($start_stamp_begin)."'>\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo " </table>\n";
|
||||
@@ -172,7 +172,7 @@
|
||||
echo " ".$text['label-end_date_time']."\n";
|
||||
echo " </td>\n";
|
||||
echo " <td class='vtable' width='70%' align='left' style='position: relative; min-width: 135px;'>\n";
|
||||
echo " <input type='text' class='formfld datetimepicker' style='min-width: 115px; width: 115px; max-width: 115px;' name='start_stamp_end' id='start_stamp_end' placeholder='".$text['label-to']."' value='$start_stamp_end'>\n";
|
||||
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#start_stamp_end' onblur=\"$(this).datetimepicker('hide');\" style='min-width: 115px; width: 115px; max-width: 115px;' name='start_stamp_end' id='start_stamp_end' placeholder='".$text['label-to']."' value='".escape($start_stamp_end)."'>\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo " </table>\n";
|
||||
|
||||
@@ -159,8 +159,8 @@
|
||||
echo " <td class='vtable'>";
|
||||
echo " <div class='row'>\n";
|
||||
echo " <div class='col-sm-12'>";
|
||||
echo " <input type='text' class='formfld datetimepicker' style='min-width: 115px; width: 115px;' name='start_stamp_begin' placeholder='".$text['label-from']."' value='".escape($start_stamp_begin)."'>";
|
||||
echo " <input type='text' class='formfld datetimepicker' style='min-width: 115px; width: 115px;' name='start_stamp_end' placeholder='".$text['label-to']."' value='".escape($start_stamp_end)."'>";
|
||||
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#start_stamp_begin' onblur=\"$(this).datetimepicker('hide');\" style='min-width: 115px; width: 115px;' name='start_stamp_begin' id='start_stamp_begin' placeholder='".$text['label-from']."' value='".escape($start_stamp_begin)."'>";
|
||||
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#start_stamp_end' onblur=\"$(this).datetimepicker('hide');\" style='min-width: 115px; width: 115px;' name='start_stamp_end' id='start_stamp_end' placeholder='".$text['label-to']."' value='".escape($start_stamp_end)."'>";
|
||||
echo " </div>\n";
|
||||
echo " </div>\n";
|
||||
echo " </td>";
|
||||
@@ -170,8 +170,8 @@
|
||||
echo " <td class='vtable'>";
|
||||
echo " <div class='row'>\n";
|
||||
echo " <div class='col-sm-12'>";
|
||||
echo " <input type='text' class='formfld datetimepicker' style='min-width: 115px; width: 115px;' name='answer_stamp_begin' placeholder='".$text['label-from']."' value='".escape($answer_stamp_begin)."'>";
|
||||
echo " <input type='text' class='formfld datetimepicker' style='min-width: 115px; width: 115px;' name='answer_stamp_end' placeholder='".$text['label-to']."' value='".escape($answer_stamp_end)."'>";
|
||||
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#answer_stamp_begin' onblur=\"$(this).datetimepicker('hide');\" style='min-width: 115px; width: 115px;' name='answer_stamp_begin' id='answer_stamp_begin' placeholder='".$text['label-from']."' value='".escape($answer_stamp_begin)."'>";
|
||||
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#answer_stamp_end' onblur=\"$(this).datetimepicker('hide');\" style='min-width: 115px; width: 115px;' name='answer_stamp_end' id='answer_stamp_end' placeholder='".$text['label-to']."' value='".escape($answer_stamp_end)."'>";
|
||||
echo " </div>\n";
|
||||
echo " </div>\n";
|
||||
echo " </td>";
|
||||
@@ -181,8 +181,8 @@
|
||||
echo " <td class='vtable'>";
|
||||
echo " <div class='row'>\n";
|
||||
echo " <div class='col-sm-12'>";
|
||||
echo " <input type='text' class='formfld datetimepicker' style='min-width: 115px; width: 115px;' name='end_stamp_begin' placeholder='".$text['label-from']."' value='".escape($end_stamp_begin)."'>";
|
||||
echo " <input type='text' class='formfld datetimepicker' style='min-width: 115px; width: 115px;' name='end_stamp_end' placeholder='".$text['label-to']."' value='".escape($end_stamp_end)."'>";
|
||||
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#end_stamp_begin' onblur=\"$(this).datetimepicker('hide');\" style='min-width: 115px; width: 115px;' name='end_stamp_begin' id='end_stamp_begin' placeholder='".$text['label-from']."' value='".escape($end_stamp_begin)."'>";
|
||||
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#end_stamp_end' onblur=\"$(this).datetimepicker('hide');\" style='min-width: 115px; width: 115px;' name='end_stamp_end' id='end_stamp_end' placeholder='".$text['label-to']."' value='".escape($end_stamp_end)."'>";
|
||||
echo " </div>\n";
|
||||
echo " </div>\n";
|
||||
echo " </td>";
|
||||
|
||||
Reference in New Issue
Block a user