1384 lines
48 KiB
PHP
1384 lines
48 KiB
PHP
|
<?php include('techsyn_header.php');?>
|
|||
|
|
|||
|
<!-- Main Content Container for side bar and body-->
|
|||
|
<div class="main-container ace-save-state" id="main-container">
|
|||
|
|
|||
|
<script type="text/javascript">
|
|||
|
try {
|
|||
|
ace.settings.loadState('main-container')
|
|||
|
} catch (e) {}
|
|||
|
|
|||
|
</script>
|
|||
|
|
|||
|
|
|||
|
<?php include('techsyn_sidebar.php'); ?>
|
|||
|
|
|||
|
<!--breadcrumb-->
|
|||
|
<div class="main-content">
|
|||
|
<div class="main-content-inner">
|
|||
|
<div class="breadcrumbs ace-save-state" id="breadcrumbs">
|
|||
|
<ul class="breadcrumb">
|
|||
|
<li><i class="ace-icon fa fa-home home-icon"></i> <a href="#">Home</a>
|
|||
|
</li>
|
|||
|
<li class="#">Mockdril</li>
|
|||
|
</ul>
|
|||
|
</div>
|
|||
|
<!-- End of breadcrumb -->
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<div class="page-content">
|
|||
|
<div class="box box-primary"
|
|||
|
style="padding: 10px; margin: 2px 0px 50px 5px; width: 99.5%;">
|
|||
|
<form id="task_form" method="post">
|
|||
|
<!-- box-body-->
|
|||
|
<div class="box-body">
|
|||
|
|
|||
|
<div class="col-sm-1"></div>
|
|||
|
<div class="col-sm-10">
|
|||
|
|
|||
|
<div class="row">
|
|||
|
<div class="col-sm-6">
|
|||
|
|
|||
|
<div class="form-group">
|
|||
|
<label for="form-field-comment">Date<span style="color: red">*</span></label>
|
|||
|
<div class="input-group col-sm-12 no-padding">
|
|||
|
<input class="input-medium date-picker"
|
|||
|
id="date_of_mockdrill" name="date_of_mockdrill" type="text"
|
|||
|
style="height: 34px; width: 100%;"
|
|||
|
data-date-format="dd/mm/yyyy"
|
|||
|
value=<?php echo date('d-m-Y'); ?>> <span
|
|||
|
class="input-group-addon"> <i
|
|||
|
class="ace-icon fa fa-calendar"></i>
|
|||
|
</span>
|
|||
|
</div>
|
|||
|
|
|||
|
</div>
|
|||
|
|
|||
|
|
|||
|
<!-- date-of-birth -->
|
|||
|
<!-- <div class="form-group"> -->
|
|||
|
<!-- <label for="form-field-comment">EMP.CODE/ CL NO.</label> -->
|
|||
|
<!-- <select class="form-control select2" name="emp_cod" id="emp_cod" "> -->
|
|||
|
<!-- <option disabled selected>EMP.CODE/ CL NO. </option> -->
|
|||
|
<!-- <option value="0">General</option> -->
|
|||
|
|
|||
|
<!-- </select> -->
|
|||
|
<!-- </div> -->
|
|||
|
<!-- <div class="form-group new-select">
|
|||
|
<label for="role">COMPANY/ CONTRACTOR </label>
|
|||
|
|
|||
|
<select class="form-control chosen-select" name="company" style="width: 100%" id="company" style="height: 31.14px;">
|
|||
|
<option disabled selected>COMPANY/ CONTRACTOR </option>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
</select>
|
|||
|
|
|||
|
</div> -->
|
|||
|
|
|||
|
<div class="form-group">
|
|||
|
<label for="form-field-comment">Age</label> <input
|
|||
|
class="form-control col-sm-2" id="dob" name="dob"
|
|||
|
type="text" value="" readonly placeholder="Age">
|
|||
|
|
|||
|
|
|||
|
</div>
|
|||
|
<div class="form-group" style="margin-top: 4%">
|
|||
|
<label class="control-label"
|
|||
|
for="patient_attending_staff_name">Patients Attending Staff Name:</label>
|
|||
|
<?php
|
|||
|
$sql = "select patient_master.patient_name from patient_master INNER JOIN tbl_users ON patient_master.id=tbl_users.emp_id AND patient_master.is_ohc_staff=1";
|
|||
|
$result = mysqli_query($conn,$sql);
|
|||
|
|
|||
|
echo "<select name='patient_attending_staff_name' id='patient_attending_staff_name' style='width:460px;'>";
|
|||
|
while ($row3 = mysqli_fetch_array($result)) {
|
|||
|
echo "<option value='" . $row3['patient_name'] . "'>" . $row3['patient_name'] . "</option>";
|
|||
|
}
|
|||
|
echo "</select>";
|
|||
|
?>
|
|||
|
|
|||
|
</div>
|
|||
|
|
|||
|
<div class="form-group" style="margin-%">
|
|||
|
|
|||
|
<label class="control-label" for="form-field-comment">Location</label>
|
|||
|
|
|||
|
|
|||
|
<!-- <input type="text" class="form-control" id="email_id" name="email_id" placeholder="Location" maxlength="130" onkeydown="emailCheck()" /> -->
|
|||
|
<input type="text" class="form-control" id="location"
|
|||
|
name="location" placeholder="Location" maxlength="130" />
|
|||
|
<!-- vikas checks onchange="emailCheck()" -->
|
|||
|
|
|||
|
|
|||
|
</div>
|
|||
|
|
|||
|
<div class="form-group">
|
|||
|
<label for="form-field-comment">Information By</label>
|
|||
|
|
|||
|
<div class="input-group col-sm-12 no-padding">
|
|||
|
<input class="input-medium" id="info" name="info"
|
|||
|
type="text" style="height: 34px; width: 100%;"
|
|||
|
placeholder="INFORMATION BY">
|
|||
|
</div>
|
|||
|
|
|||
|
<!-- <input readonly class="col-xs-12 form-control" type="number" id="emp_age" name="emp_age" placeholder='Age'> -->
|
|||
|
</div>
|
|||
|
|
|||
|
<div class="form-group">
|
|||
|
<label class="d-block" for="form-field-comment">Information Receving Time:</label> <input type="time" id="inf_rec_time"
|
|||
|
name="inf_rec_time" class="w-100">
|
|||
|
|
|||
|
</div>
|
|||
|
|
|||
|
<div class="form-group">
|
|||
|
|
|||
|
<label class="control-label" for="form-field-comment">Complaint Of Patient</label>
|
|||
|
|
|||
|
|
|||
|
<!-- <input type="text" class="form-control" id="email_id" name="email_id" placeholder="Location" maxlength="130" onkeydown="emailCheck()" /> -->
|
|||
|
<input type="text" class="form-control"
|
|||
|
id="complt_of_patient" name="complt_of_patient"
|
|||
|
placeholder="Complaint" maxlength="130" />
|
|||
|
<!-- vikas checks onchange="emailCheck()" -->
|
|||
|
|
|||
|
|
|||
|
</div>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<!-- end-of-first-row -->
|
|||
|
</div>
|
|||
|
|
|||
|
<div class="col-sm-6">
|
|||
|
|
|||
|
<div class="form-group">
|
|||
|
<!-- <input type="hidden" class="id" id="id"> -->
|
|||
|
|
|||
|
<label for="form-field-comment">Name </label> <select
|
|||
|
class="form-control select2" id="id" name="id"
|
|||
|
onchange="GetDetail(this.value)">
|
|||
|
<option value="" disabled selected>Please select option</option>
|
|||
|
<?php echo getEmployeeOptions(); ?>
|
|||
|
</select> <input type="hidden" name="mockdril_id"
|
|||
|
id="mockdril_id" />
|
|||
|
|
|||
|
</div>
|
|||
|
<div class="form-group" style="margin-top: 4%">
|
|||
|
<label for="form-field-comment">Employer/Contractor</label> <input
|
|||
|
class="form-control col-sm-2"
|
|||
|
name="employer_contractor_name"
|
|||
|
id="employer_contractor_name"
|
|||
|
placeholder="employer/contractor" type="text" value=""
|
|||
|
readonly>
|
|||
|
</div>
|
|||
|
|
|||
|
<br>
|
|||
|
<div class="form-group" style="margin-top: 4%">
|
|||
|
<label class="d-block" for="patient_attending_doctor_name">Patient Attending Doctor Name:</label>
|
|||
|
<?php
|
|||
|
$sql3 = "select patient_master.patient_name from patient_master INNER JOIN tbl_users ON patient_master.id=tbl_users.emp_id INNER JOIN role_master on tbl_users.role_id=role_master.role_id AND role_master.role_code='DOC'";
|
|||
|
$result = mysqli_query($conn,$sql3);
|
|||
|
// $row3=mysqli_fetch_assoc($result);
|
|||
|
|
|||
|
echo "<select name='patient_attending_doctor_name' id='patient_attending_doctor_name' style='width:460px;'>";
|
|||
|
while ($row3 = mysqli_fetch_array($result)) {
|
|||
|
echo "<option value='" . $row3['patient_name'] . "'>" . $row3['patient_name'] . "</option>";
|
|||
|
}
|
|||
|
echo "</select>";
|
|||
|
?>
|
|||
|
</div>
|
|||
|
|
|||
|
|
|||
|
<div class="form-group">
|
|||
|
<label class="control-label d-block" for="form-field-comment">Ambulance Sending Time:<span style="color: red"></span>
|
|||
|
</label> <input type="time" id="amb_sen_t" class="w-100"
|
|||
|
name="amb_sen_t">
|
|||
|
|
|||
|
</div>
|
|||
|
|
|||
|
<div class="form-group" style="margin-top: 4%">
|
|||
|
<label class="d-block" for="patients_in_hospital">Patients In Time (Hospital): </label> <input type="time"
|
|||
|
id="patients_in_hospital" name="patients_in_hospital"
|
|||
|
class="w-100">
|
|||
|
</div>
|
|||
|
|
|||
|
<div class="form-group">
|
|||
|
<label class="control-label d-block" for="form-field-comment">Examine Of Patient's/diagnosis: </label> <input type="text"
|
|||
|
id="patient_diagnosis" name="patient_diagnosis"
|
|||
|
class="w-100" placeholder="EXAMINE OF PATIENT'S/DIAGNOSIS">
|
|||
|
</div>
|
|||
|
|
|||
|
|
|||
|
</div>
|
|||
|
|
|||
|
|
|||
|
</div>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<div class="row">
|
|||
|
<div class="col-sm-12">
|
|||
|
|
|||
|
<div class="form-group d-flex" style="margin-top: 30px">
|
|||
|
<label class="col-sm-2 control-label no-padding-left"
|
|||
|
for="gender" style="vertical-align: top; width: 85px">VITAL
|
|||
|
SIGN:<span style="color: red">*</span>
|
|||
|
</label> <label class="inline"> <span class="lbl middle"> BP</span>
|
|||
|
<input name="bp" id="bp" type="number" class="ace"> <span
|
|||
|
class="lbl middle"> mmHg,</span>
|
|||
|
</label> <label class="inline"> <span
|
|||
|
class="lbl middle"> Pulse</span> <input name="pulse"
|
|||
|
id="pulse" type="number" class="ace"> <span
|
|||
|
class="lbl middle"> P/M,</span>
|
|||
|
</label> <label class="inline"> <span
|
|||
|
class="lbl middle"> Spo2</span> <input name="Spo2" id="Spo2"
|
|||
|
type="number" class="ace"> <span class="lbl middle"> %,</span>
|
|||
|
|
|||
|
</label> <label class="inline"> <span class="lbl middle"> RBS</span>
|
|||
|
<input name="RBS" id="RBS" type="number" class="ace"> <span
|
|||
|
class="lbl middle"> mg/dl,</span></label> <label
|
|||
|
class="inline"> <span class="lbl middle"> TEMP</span> <input
|
|||
|
name="temp" id="temp" type="number" class="ace"> <span
|
|||
|
class="lbl middle"> <EFBFBD>F</span></label>
|
|||
|
|
|||
|
</div>
|
|||
|
<label class=" control-label no-padding" for="address"><strong>Given Treatment:</strong></label>
|
|||
|
|
|||
|
<textarea id="given_treatment" name="given_treatment"
|
|||
|
placeholder="address" rows="4" cols="8"
|
|||
|
class="autosize-transition form-control"></textarea>
|
|||
|
|
|||
|
<!-- <div class="col-sm-1 input-group-addon" style=" border:0px; background-color:#fff"> -->
|
|||
|
|
|||
|
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
|
|||
|
<br>
|
|||
|
|
|||
|
<div class="row">
|
|||
|
<div class="col-sm-6">
|
|||
|
<div class="form-group">
|
|||
|
<label class="control-label d-block" for="form-field-comment">Discharge Time:<span style="color: red"></span>
|
|||
|
</label> <input type="time" class="w-100" id="dis_time"
|
|||
|
name="dis_time">
|
|||
|
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div class="col-sm-6">
|
|||
|
<div class="form-group">
|
|||
|
<label class="d-block"
|
|||
|
for="patient_condition_on_discharge_time">Patients Condition On Discharge Time </label> <input type="text"
|
|||
|
id="patient_condition_on_discharge_time"
|
|||
|
name="patient_condition_on_discharge_time" class="w-100"
|
|||
|
placeholder="PATIENTS CONDITION ON DISCHARGE TIME">
|
|||
|
</div>
|
|||
|
|
|||
|
</div>
|
|||
|
|
|||
|
</div>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<br>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
</div>
|
|||
|
<div class="col-sm-1"></div>
|
|||
|
|
|||
|
|
|||
|
<div class="row"></div>
|
|||
|
|
|||
|
|
|||
|
</div>
|
|||
|
<!-- End box-body-->
|
|||
|
|
|||
|
<!--box-footer-->
|
|||
|
|
|||
|
<div class="box-footer" style="text-align: center;">
|
|||
|
|
|||
|
<button class="btn btn-info save_button" id="save_button"
|
|||
|
type="button" onclick="validate();">
|
|||
|
<i class="ace-icon fa fa-floppy-o bigger-110"></i> Save
|
|||
|
</button>
|
|||
|
|
|||
|
<button class="btn btn-success new_button" id="new_button"
|
|||
|
type="reset" onclick="show_save_button();">
|
|||
|
<i class="ace-icon fa fa-plus-square-o bigger-110"></i> New
|
|||
|
</button>
|
|||
|
|
|||
|
</div>
|
|||
|
<!--End box-footer-->
|
|||
|
|
|||
|
</form>
|
|||
|
|
|||
|
<form id="verify_otp_form" style="display: none;" action="">
|
|||
|
|
|||
|
|
|||
|
<div class="row">
|
|||
|
<div class="form-group">
|
|||
|
<div class="col-sm-5"></div>
|
|||
|
<label class="col-sm-1 control-label no-padding"
|
|||
|
for="form-field-comment">OTP</label>
|
|||
|
|
|||
|
<div class="col-sm-1">
|
|||
|
<input type="text" class="form-control" id="otp" name="otp"
|
|||
|
placeholder="OTP" style="display: inline;">
|
|||
|
|
|||
|
</div>
|
|||
|
<div class="col-sm-5"></div>
|
|||
|
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
|
|||
|
<br>
|
|||
|
<br>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<!--box-footer-->
|
|||
|
<div class="box-footer" style="text-align: center;">
|
|||
|
|
|||
|
|
|||
|
<button class="btn btn-info save_button" id="save_button"
|
|||
|
type="button" onclick="resend_otp();">
|
|||
|
<i class="ace-icon fa fa-floppy-o bigger-110"></i> Resend OTP
|
|||
|
</button>
|
|||
|
|
|||
|
<button class="btn btn-warning" type="button"
|
|||
|
onclick="verify_otp()">
|
|||
|
<i class="ace-icon fa fa-floppy-o bigger-110"></i> Save
|
|||
|
</button>
|
|||
|
|
|||
|
</div>
|
|||
|
<!--End box-footer-->
|
|||
|
|
|||
|
|
|||
|
</form>
|
|||
|
</div>
|
|||
|
<!--box box-primary-->
|
|||
|
|
|||
|
|
|||
|
<!-- Main Content Container for side bar and body-->
|
|||
|
<div class="main-container ace-save-state" id="main-container">
|
|||
|
<script type="text/javascript">
|
|||
|
try {
|
|||
|
ace.settings.loadState('main-container')
|
|||
|
} catch (e) {}
|
|||
|
</script>
|
|||
|
|
|||
|
<!--breadcrumb-->
|
|||
|
<div class="main-content">
|
|||
|
<div class="main-content-inner">
|
|||
|
|
|||
|
<!-- End of breadcrumb -->
|
|||
|
<div class="page-content" style="margin-top: -47px;">
|
|||
|
<div id="flexigridDiv" class="table-responsive">
|
|||
|
<form name="f1" method="post" id="flex1">
|
|||
|
|
|||
|
<div id="flex1" style="width: 100%">
|
|||
|
<input type="hidden" name="flex_patient_id"
|
|||
|
id="flex_patient_id" />
|
|||
|
</div>
|
|||
|
|
|||
|
|
|||
|
</form>
|
|||
|
<form name="export_form" method="post" id="export_form"
|
|||
|
action="">
|
|||
|
|
|||
|
|
|||
|
<input type="hidden" name="pdf_action" id="pdf_action"
|
|||
|
value="pdf_mock_drill.php" /> <input type="hidden"
|
|||
|
name="excel_action" id="excel_action"
|
|||
|
value="excel_mock_drill.php" />
|
|||
|
</form>
|
|||
|
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
|
|||
|
</div>
|
|||
|
<!-- /.page-content -->
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<!-- /.main-content -->
|
|||
|
|
|||
|
|
|||
|
<script type="text/javascript">
|
|||
|
|
|||
|
$(function() {
|
|||
|
var w = screen.width * .90;
|
|||
|
var h = 0;
|
|||
|
h = (window.innerHeight - ($("#navbar").height() + $(".breadcrumbs").height())) * .55;
|
|||
|
$("#flex1").flexigrid({
|
|||
|
url: 'mock_drill_script.php',
|
|||
|
dataType: 'json',
|
|||
|
colModel: [{
|
|||
|
display: 'Sr',
|
|||
|
name: 'count',
|
|||
|
width: w * .04,
|
|||
|
sortable: false,
|
|||
|
align: 'left'
|
|||
|
},
|
|||
|
{
|
|||
|
display: '',
|
|||
|
name: 'links',
|
|||
|
width: w * .08,
|
|||
|
sortable: true,
|
|||
|
align: 'center'
|
|||
|
},
|
|||
|
{
|
|||
|
display: 'Name',
|
|||
|
name: 'patient_name',
|
|||
|
width: w * .15,
|
|||
|
sortable: true,
|
|||
|
align: 'left'
|
|||
|
},
|
|||
|
{
|
|||
|
display: 'Age',
|
|||
|
name: 'age',
|
|||
|
width: w * .07,
|
|||
|
sortable: true,
|
|||
|
align: 'left'
|
|||
|
},
|
|||
|
{
|
|||
|
display: 'Employee/Contractor',
|
|||
|
name: 'age',
|
|||
|
width: w * .15,
|
|||
|
sortable: true,
|
|||
|
align: 'left'
|
|||
|
},
|
|||
|
{
|
|||
|
display: 'Location',
|
|||
|
name: 'location',
|
|||
|
width: w * .10,
|
|||
|
sortable: true,
|
|||
|
align: 'left'
|
|||
|
},
|
|||
|
{
|
|||
|
display: 'Date',
|
|||
|
name: 'date_of_mockdrill',
|
|||
|
width: w * .10,
|
|||
|
sortable: true,
|
|||
|
align: 'left'
|
|||
|
},
|
|||
|
{
|
|||
|
display: 'Patient Attending Doctor Name',
|
|||
|
name: 'patient_attending_doctor_name',
|
|||
|
width: w * .18,
|
|||
|
sortable: true,
|
|||
|
align: 'left'
|
|||
|
},
|
|||
|
{
|
|||
|
display: 'Patients Attending Staff Name',
|
|||
|
name: 'patient_attending_staff_name',
|
|||
|
width: w * .18,
|
|||
|
sortable: true,
|
|||
|
align: 'left'
|
|||
|
},
|
|||
|
{
|
|||
|
display: 'Ambulance Sending Time',
|
|||
|
name: 'amb_sen_t',
|
|||
|
width: w * .15,
|
|||
|
sortable: true,
|
|||
|
align: 'left'
|
|||
|
},
|
|||
|
{
|
|||
|
display: 'Information Receiving Time',
|
|||
|
name: 'inf_rec_time',
|
|||
|
width: w * .15,
|
|||
|
sortable: true,
|
|||
|
align: 'left'
|
|||
|
},
|
|||
|
|
|||
|
{
|
|||
|
display: 'Patients In Time (Hospital)',
|
|||
|
name: 'patients_in_hospital',
|
|||
|
width: w * .15,
|
|||
|
sortable: true,
|
|||
|
align: 'left'
|
|||
|
},
|
|||
|
{
|
|||
|
display: 'Given Treatment',
|
|||
|
name: 'given_treatment',
|
|||
|
width: w * .20,
|
|||
|
sortable: true,
|
|||
|
align: 'left'
|
|||
|
},
|
|||
|
{
|
|||
|
display: 'Patient Condition On Discharge Time',
|
|||
|
name: 'patient_condition_on_discharge_time',
|
|||
|
width: w * .20,
|
|||
|
sortable: true,
|
|||
|
align: 'left'
|
|||
|
},
|
|||
|
{
|
|||
|
display: 'Discharge Time',
|
|||
|
name: 'dis_time',
|
|||
|
width: w * .15,
|
|||
|
sortable: true,
|
|||
|
align: 'left'
|
|||
|
},
|
|||
|
{
|
|||
|
display: 'BP',
|
|||
|
name: 'bp',
|
|||
|
width: w * .10,
|
|||
|
sortable: true,
|
|||
|
align: 'left'
|
|||
|
},
|
|||
|
{
|
|||
|
display: 'Pulse',
|
|||
|
name: 'pulse',
|
|||
|
width: w * .10,
|
|||
|
sortable: true,
|
|||
|
align: 'left'
|
|||
|
},
|
|||
|
{
|
|||
|
display: 'SPO2',
|
|||
|
name: 'Spo2',
|
|||
|
width: w * .10,
|
|||
|
sortable: true,
|
|||
|
align: 'left'
|
|||
|
},
|
|||
|
{
|
|||
|
display: 'RBS',
|
|||
|
name: 'RBS',
|
|||
|
width: w * .10,
|
|||
|
sortable: true,
|
|||
|
align: 'left'
|
|||
|
},
|
|||
|
{
|
|||
|
display: 'Temperature',
|
|||
|
name: 'temp',
|
|||
|
width: w * .10,
|
|||
|
sortable: true,
|
|||
|
align: 'left'
|
|||
|
},
|
|||
|
|
|||
|
|
|||
|
],
|
|||
|
buttons: [
|
|||
|
|
|||
|
// {
|
|||
|
// name: 'Add',
|
|||
|
// bclass: 'add',
|
|||
|
// onpress: add
|
|||
|
// },
|
|||
|
// {
|
|||
|
// separator: true
|
|||
|
// },
|
|||
|
//{name: 'PDFReport', bclass: 'print', onpress : pdfReport},
|
|||
|
// {separator: true},
|
|||
|
{
|
|||
|
name: 'PDF',
|
|||
|
bclass: 'print',
|
|||
|
onpress: pdf
|
|||
|
},
|
|||
|
{
|
|||
|
separator: true
|
|||
|
},
|
|||
|
{
|
|||
|
name: 'Excel',
|
|||
|
bclass: 'print_excel',
|
|||
|
onpress: excel
|
|||
|
},
|
|||
|
{
|
|||
|
separator: true
|
|||
|
}
|
|||
|
],
|
|||
|
searchitems: [
|
|||
|
{
|
|||
|
display: 'LOCATION',
|
|||
|
name:'location'
|
|||
|
},
|
|||
|
{
|
|||
|
display: 'GIVEN TREATMENT',
|
|||
|
name:'given_treatment'
|
|||
|
}
|
|||
|
|
|||
|
],
|
|||
|
sortname: "mockdril_id",
|
|||
|
sortorder: "desc",
|
|||
|
usepager: true, //pagination
|
|||
|
//title:"Employee OPD",
|
|||
|
useRp: true,
|
|||
|
rp: 20, //records per page
|
|||
|
showTableToggleBtn: false, //toggle button for the whole table
|
|||
|
resizable: true,
|
|||
|
// width: w,
|
|||
|
height: h,
|
|||
|
singleSelect: true
|
|||
|
});
|
|||
|
});
|
|||
|
|
|||
|
|
|||
|
function delete_client_appointment(user_id) {
|
|||
|
$.ajax({
|
|||
|
url: 'delete_mock_drill_list.php',
|
|||
|
data: {
|
|||
|
user_id: user_id
|
|||
|
},
|
|||
|
type: 'POST',
|
|||
|
dataType: 'json',
|
|||
|
success: function(data) {
|
|||
|
if (data == 'SUCCESS') {
|
|||
|
BootstrapDialog.alert('User Deleted Successfully');
|
|||
|
$("#flex1").flexReload();
|
|||
|
return;
|
|||
|
}
|
|||
|
},
|
|||
|
error: function(data) {
|
|||
|
BootstrapDialog.alert('Error Deleting User');
|
|||
|
return;
|
|||
|
}
|
|||
|
});
|
|||
|
}
|
|||
|
|
|||
|
function dateFormat(date) {
|
|||
|
var arr = date.split('-');
|
|||
|
return arr[2] + '/' + arr[1] + '/' + arr[0];
|
|||
|
};
|
|||
|
|
|||
|
function show_save_button() {
|
|||
|
$("#save_button").show();
|
|||
|
$("#mockdril_id").val("");
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
function open_client_appointment(mockdril_id, access) {
|
|||
|
if (access == 'V') {
|
|||
|
$("#save_button").hide();
|
|||
|
}else if(access=='E')
|
|||
|
$("#save_button").show()
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
$.ajax({
|
|||
|
url: 'select_register_user_list.php',
|
|||
|
data: {
|
|||
|
mockdril_id: mockdril_id
|
|||
|
},
|
|||
|
type: 'POST',
|
|||
|
dataType: 'json',
|
|||
|
success: function(data) {
|
|||
|
$("#id").val(data.id);
|
|||
|
$("#location").val(data.location);
|
|||
|
$("#date_of_mockdrill").val(data.date_of_mockdrill);
|
|||
|
$("#bp").val(data.bp);
|
|||
|
$("#pulse").val(data.pulse);
|
|||
|
$("#Spo2").val(data.Spo2);
|
|||
|
$("#RBS").val(data.RBS);
|
|||
|
$("#temp").val(data.temp);
|
|||
|
$("#given_treatment").val(data.given_treatment);
|
|||
|
$("#patient_attending_doctor_name").val(data.patient_attending_doctor_name);
|
|||
|
$("#patient_attending_staff_name").val(data.patient_attending_staff_name);
|
|||
|
$("#patients_in_hospital").val(data.patients_in_hospital);
|
|||
|
$("#patient_condition_on_discharge_time").val(data.patient_condition_on_discharge_time);
|
|||
|
|
|||
|
$("#inf_rec_time").val(data.inf_rec_time);
|
|||
|
$("#dis_time").val(data.dis_time);
|
|||
|
$("#amb_sen_t").val(data.amb_sen_t);
|
|||
|
$("#info").val(data.info);
|
|||
|
$("#complt_of_patient").val(data.complt_of_patient);
|
|||
|
$("#patient_diagnosis").val(data.patient_diagnosis);
|
|||
|
|
|||
|
|
|||
|
},
|
|||
|
error: function(data) {
|
|||
|
BootstrapDialog.alert('Error Populating Appointment Details');
|
|||
|
return;
|
|||
|
}
|
|||
|
});
|
|||
|
}
|
|||
|
|
|||
|
function GetDetail(id){
|
|||
|
$.ajax({
|
|||
|
url: "mock.php",
|
|||
|
type: "POST",
|
|||
|
dataType: 'json',
|
|||
|
async: false,
|
|||
|
data: {id: id},
|
|||
|
success: function(data) {
|
|||
|
$("#employer_contractor_name").val(data.employer_contractor_name);
|
|||
|
var age=calAge(data.dob)
|
|||
|
$("#dob").val(age);
|
|||
|
|
|||
|
}
|
|||
|
});
|
|||
|
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
function pdf(){
|
|||
|
window.open('ajax_pdf.php','Mockdrill');
|
|||
|
}
|
|||
|
function excel(){
|
|||
|
window.open('ajax_excel.php','Mockdrill');
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
function myDateFormat(date) {
|
|||
|
var d=new Date(date);
|
|||
|
var day=d.getDate();
|
|||
|
var m=d.getMonth()+1;
|
|||
|
var y=d.getFullYear();
|
|||
|
|
|||
|
|
|||
|
return day+"-"+m+"-"+y;
|
|||
|
}
|
|||
|
|
|||
|
function calAge(date){
|
|||
|
|
|||
|
var dob = new Date(date);
|
|||
|
var month_diff = Date.now() - dob.getTime();
|
|||
|
var age_dt = new Date(month_diff);
|
|||
|
var year = age_dt.getUTCFullYear();
|
|||
|
var age = Math.abs(year - 1970);
|
|||
|
return age;
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
function validate() {
|
|||
|
|
|||
|
|
|||
|
save();
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
</script>
|
|||
|
|
|||
|
<?php include('techsyn_footer.php'); ?>
|
|||
|
|
|||
|
</div>
|
|||
|
<!-- End of page-content -->
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
|
|||
|
<style>
|
|||
|
#modal-add-ailment {
|
|||
|
overflow-y: scroll;
|
|||
|
}
|
|||
|
|
|||
|
.d-block {
|
|||
|
display: block;
|
|||
|
}
|
|||
|
|
|||
|
.w-100 {
|
|||
|
width: 100%;
|
|||
|
}
|
|||
|
|
|||
|
.d-flex {
|
|||
|
display: flex;
|
|||
|
}
|
|||
|
|
|||
|
.d-flex .inline {
|
|||
|
display: flex !important;
|
|||
|
vertical-align: middle;
|
|||
|
align-items: baseline;
|
|||
|
}
|
|||
|
|
|||
|
.d-flex .lbl.middle {
|
|||
|
padding-right: 5px;
|
|||
|
padding-left: 5px;
|
|||
|
}
|
|||
|
|
|||
|
.d-flex .inline input {
|
|||
|
border: unset;
|
|||
|
border-bottom: 1px solid #D5D5D5;
|
|||
|
}
|
|||
|
|
|||
|
.d-none {
|
|||
|
display: none;
|
|||
|
}
|
|||
|
</style>
|
|||
|
<?php include('common_ace.php'); ?>
|
|||
|
<script>
|
|||
|
|
|||
|
</script>
|
|||
|
|
|||
|
<script type="text/javascript">
|
|||
|
$('.select2').select2();
|
|||
|
jQuery(function($) {
|
|||
|
|
|||
|
var myTable =
|
|||
|
$('#dynamic-table')
|
|||
|
|
|||
|
.DataTable({
|
|||
|
bAutoWidth: false,
|
|||
|
"aoColumns": [{
|
|||
|
"bSortable": false
|
|||
|
},
|
|||
|
null, null, null, null, null,
|
|||
|
{
|
|||
|
"bSortable": false
|
|||
|
}
|
|||
|
],
|
|||
|
"aaSorting": [],
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
select: {
|
|||
|
style: 'multi'
|
|||
|
}
|
|||
|
});
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
var defaultCopyAction = myTable.button(1).action();
|
|||
|
myTable.button(1).action(function(e, dt, button, config) {
|
|||
|
defaultCopyAction(e, dt, button, config);
|
|||
|
$('.dt-button-info').addClass('gritter-item-wrapper gritter-info gritter-center white');
|
|||
|
});
|
|||
|
|
|||
|
|
|||
|
var defaultColvisAction = myTable.button(0).action();
|
|||
|
myTable.button(0).action(function(e, dt, button, config) {
|
|||
|
|
|||
|
defaultColvisAction(e, dt, button, config);
|
|||
|
|
|||
|
|
|||
|
if ($('.dt-button-collection > .dropdown-menu').length == 0) {
|
|||
|
$('.dt-button-collection')
|
|||
|
.wrapInner('<ul class="dropdown-menu dropdown-light dropdown-caret dropdown-caret" />')
|
|||
|
.find('a').attr('href', '#').wrap("<li />")
|
|||
|
}
|
|||
|
$('.dt-button-collection').appendTo('.tableTools-container .dt-buttons')
|
|||
|
});
|
|||
|
|
|||
|
|
|||
|
|
|||
|
setTimeout(function() {
|
|||
|
$($('.tableTools-container')).find('a.dt-button').each(function() {
|
|||
|
var div = $(this).find(' > div').first();
|
|||
|
if (div.length == 1) div.tooltip({
|
|||
|
container: 'body',
|
|||
|
title: div.parent().text()
|
|||
|
});
|
|||
|
else $(this).tooltip({
|
|||
|
container: 'body',
|
|||
|
title: $(this).text()
|
|||
|
});
|
|||
|
});
|
|||
|
}, 500);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
myTable.on('select', function(e, dt, type, index) {
|
|||
|
if (type === 'row') {
|
|||
|
$(myTable.row(index).node()).find('input:checkbox').prop('checked', true);
|
|||
|
}
|
|||
|
});
|
|||
|
myTable.on('deselect', function(e, dt, type, index) {
|
|||
|
if (type === 'row') {
|
|||
|
$(myTable.row(index).node()).find('input:checkbox').prop('checked', false);
|
|||
|
}
|
|||
|
});
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
$('th input[type=checkbox], td input[type=checkbox]').prop('checked', false);
|
|||
|
|
|||
|
|
|||
|
$('#dynamic-table > thead > tr > th input[type=checkbox], #dynamic-table_wrapper input[type=checkbox]').eq(0).on('click', function() {
|
|||
|
var th_checked = this.checked;
|
|||
|
|
|||
|
$('#dynamic-table').find('tbody > tr').each(function() {
|
|||
|
var row = this;
|
|||
|
if (th_checked) myTable.row(row).select();
|
|||
|
else myTable.row(row).deselect();
|
|||
|
});
|
|||
|
});
|
|||
|
|
|||
|
|
|||
|
$('#dynamic-table').on('click', 'td input[type=checkbox]', function() {
|
|||
|
var row = $(this).closest('tr').get(0);
|
|||
|
if (this.checked) myTable.row(row).deselect();
|
|||
|
else myTable.row(row).select();
|
|||
|
});
|
|||
|
|
|||
|
|
|||
|
|
|||
|
$(document).on('click', '#dynamic-table .dropdown-toggle', function(e) {
|
|||
|
e.stopImmediatePropagation();
|
|||
|
e.stopPropagation();
|
|||
|
e.preventDefault();
|
|||
|
});
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
var active_class = 'active';
|
|||
|
$('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on('click', function() {
|
|||
|
var th_checked = this.checked;
|
|||
|
|
|||
|
$(this).closest('table').find('tbody > tr').each(function() {
|
|||
|
var row = this;
|
|||
|
if (th_checked) $(row).addClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', true);
|
|||
|
else $(row).removeClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', false);
|
|||
|
});
|
|||
|
});
|
|||
|
|
|||
|
$('#simple-table').on('click', 'td input[type=checkbox]', function() {
|
|||
|
var $row = $(this).closest('tr');
|
|||
|
if ($row.is('.detail-row ')) return;
|
|||
|
if (this.checked) $row.addClass(active_class);
|
|||
|
else $row.removeClass(active_class);
|
|||
|
});
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
$('[data-rel="tooltip"]').tooltip({
|
|||
|
placement: tooltip_placement
|
|||
|
});
|
|||
|
|
|||
|
|
|||
|
function tooltip_placement(context, source) {
|
|||
|
var $source = $(source);
|
|||
|
var $parent = $source.closest('table')
|
|||
|
var off1 = $parent.offset();
|
|||
|
var w1 = $parent.width();
|
|||
|
|
|||
|
var off2 = $source.offset();
|
|||
|
|
|||
|
|
|||
|
if (parseInt(off2.left) < parseInt(off1.left) + parseInt(w1 / 2)) return 'right';
|
|||
|
return 'left';
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
/***************/
|
|||
|
$('.show-details-btn').on('click', function(e) {
|
|||
|
e.preventDefault();
|
|||
|
$(this).closest('tr').next().toggleClass('open');
|
|||
|
$(this).find(ace.vars['.icon']).toggleClass('fa-angle-double-down').toggleClass('fa-angle-double-up');
|
|||
|
});
|
|||
|
/***************/
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
function save() {
|
|||
|
|
|||
|
$.ajax({
|
|||
|
url: 'save_mockdrill_user.php',
|
|||
|
type: "POST",
|
|||
|
data: $("#task_form").serialize(),
|
|||
|
success: function(data) {
|
|||
|
BootstrapDialog.alert('Details Saved Successfully.');
|
|||
|
$("#flex1").flexReload();
|
|||
|
|
|||
|
},
|
|||
|
error: function(data) {
|
|||
|
BootstrapDialog.alert('Error Saving Registration Details');
|
|||
|
return;
|
|||
|
}
|
|||
|
});
|
|||
|
$('.close').click();
|
|||
|
}
|
|||
|
|
|||
|
function resend_otp() {
|
|||
|
// console.log($("#task_form").serialize());
|
|||
|
$.ajax({
|
|||
|
// url: 'save_register_user.php',
|
|||
|
type: "POST",
|
|||
|
data: $("#task_form").serialize(),
|
|||
|
success: function(data) {
|
|||
|
//alert(data);
|
|||
|
BootstrapDialog.alert('OTP sent to mail. Please Verify');
|
|||
|
$("#flex1").flexReload();
|
|||
|
// changeForm()
|
|||
|
return;
|
|||
|
},
|
|||
|
error: function(data) {
|
|||
|
BootstrapDialog.alert('Error Saving Registration Details');
|
|||
|
return;
|
|||
|
}
|
|||
|
});
|
|||
|
$('.close').click();
|
|||
|
// location.href="procurement_list.php";
|
|||
|
}
|
|||
|
|
|||
|
function update() {
|
|||
|
console.log($("#task_form").serialize());
|
|||
|
$.ajax({
|
|||
|
// url: 'update_register_user.php',
|
|||
|
type: "POST",
|
|||
|
data: $("#task_form").serialize(),
|
|||
|
success: function(data) {
|
|||
|
// alert(data.parseJSON());
|
|||
|
|
|||
|
var data = $.parseJSON(data);
|
|||
|
|
|||
|
console.log(data);
|
|||
|
|
|||
|
if (data.status == 'success') {
|
|||
|
BootstrapDialog.alert('details successfully updated');
|
|||
|
$("#flex1").flexReload();
|
|||
|
// changeForm()
|
|||
|
return;
|
|||
|
} else if (data.status == 'failure') {
|
|||
|
BootstrapDialog.alert('Error Saving Registration Details');
|
|||
|
$("#flex1").flexReload();
|
|||
|
} else if (data.status == 'duplicate_mail') {
|
|||
|
|
|||
|
BootstrapDialog.alert('Email ID already Registered in System try Different one.');
|
|||
|
return false;
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
},
|
|||
|
error: function(data) {
|
|||
|
BootstrapDialog.alert('Error Saving Registration Details');
|
|||
|
return;
|
|||
|
}
|
|||
|
});
|
|||
|
$('.close').click();
|
|||
|
// location.href="procurement_list.php";
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
$('.date-picker').datepicker({
|
|||
|
autoclose: true,
|
|||
|
format: 'dd/mm/yyyy'
|
|||
|
}).next().on(ace.click_event, function() {
|
|||
|
$(this).prev().focus();
|
|||
|
});
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
</script>
|
|||
|
|
|||
|
<link rel="stylesheet"
|
|||
|
href="assets/font-awesome/4.5.0/css/font-awesome.min.css" />
|
|||
|
|
|||
|
<!-- page specific plugin styles -->
|
|||
|
<link rel="stylesheet" href="assets/css/jquery-ui.custom.min.css" />
|
|||
|
<link rel="stylesheet" href="assets/css/chosen.min.css" />
|
|||
|
<link rel="stylesheet" href="assets/css/bootstrap-datepicker3.min.css" />
|
|||
|
<link rel="stylesheet" href="assets/css/bootstrap-timepicker.min.css" />
|
|||
|
<link rel="stylesheet" href="assets/css/daterangepicker.min.css" />
|
|||
|
<link rel="stylesheet"
|
|||
|
href="assets/css/bootstrap-datetimepicker.min.css" />
|
|||
|
<link rel="stylesheet" href="assets/css/bootstrap-colorpicker.min.css" />
|
|||
|
<script type="text/javascript" src="js/typeahead.bundle.js"></script>
|
|||
|
<script src="assets/js/jquery-ui.custom.min.js"></script>
|
|||
|
<script src="assets/js/jquery.ui.touch-punch.min.js"></script>
|
|||
|
<script src="assets/js/chosen.jquery.min.js"></script>
|
|||
|
<script src="assets/js/spinbox.min.js"></script>
|
|||
|
<script src="assets/js/bootstrap-datepicker.min.js"></script>
|
|||
|
<script src="assets/js/bootstrap-timepicker.min.js"></script>
|
|||
|
<script src="assets/js/jquery.dataTables.min.js"></script>
|
|||
|
<script src="assets/js/jquery.dataTables.bootstrap.min.js"></script>
|
|||
|
<script src="assets/js/dataTables.buttons.min.js"></script>
|
|||
|
<script src="assets/js/buttons.flash.min.js"></script>
|
|||
|
<script src="assets/js/buttons.html5.min.js"></script>
|
|||
|
<script src="assets/js/buttons.print.min.js"></script>
|
|||
|
<script src="assets/js/buttons.colVis.min.js"></script>
|
|||
|
<script src="assets/js/dataTables.select.min.js"></script>
|
|||
|
|
|||
|
|
|||
|
<script src="assets/js/moment.min.js"></script>
|
|||
|
<script src="assets/js/daterangepicker.min.js"></script>
|
|||
|
<script src="assets/js/bootstrap-datetimepicker.min.js"></script>
|
|||
|
<script src="assets/js/bootstrap-colorpicker.min.js"></script>
|
|||
|
<script src="assets/js/jquery.knob.min.js"></script>
|
|||
|
<script src="assets/js/autosize.min.js"></script>
|
|||
|
<script src="assets/js/jquery.inputlimiter.min.js"></script>
|
|||
|
<script src="assets/js/jquery.maskedinput.min.js"></script>
|
|||
|
<script src="assets/js/bootstrap-tag.min.js"></script>
|
|||
|
<script src="assets/js/ace-elements.min.js"></script>
|
|||
|
|
|||
|
<script type="text/javascript">
|
|||
|
$(document).ready(function() {
|
|||
|
var counter = $("#count_items").val();
|
|||
|
//alert (counter);
|
|||
|
$("#addrow").on("click", function() {
|
|||
|
var newRow = $("<tr>");
|
|||
|
var task_frequency_option = $("#task_frequency0").html();
|
|||
|
var ohc_type_option = $("#ohc_type0").html();
|
|||
|
// console.log("task_frequency_option" + task_frequency_option);
|
|||
|
var cols = "";
|
|||
|
|
|||
|
|
|||
|
cols += '<td><input type="text" class="form-control" id="frequency_name' + counter + '" name="frequency_name' + counter + '"/></td>';
|
|||
|
cols += '<td><input type="text" class="form-control" id="frequency_code' + counter + '" name="frequency_code' + counter + '"/></td>';
|
|||
|
cols += '<td align="center"><a href="#" class="btn-lg" data-toggle="tooltip" id="deletebtn" title="Delete"><span class="glyphicon glyphicon-trash"></span></a></td>';
|
|||
|
|
|||
|
newRow.append(cols);
|
|||
|
$("#myTable").append(newRow);
|
|||
|
/*$('#item_id'+counter).chosen({allow_single_deselect:true});
|
|||
|
$('#item_id'+counter).next().css({'width': $('#item_id'+counter).parent().width()});*/
|
|||
|
counter++;
|
|||
|
$('.select2').select2()
|
|||
|
$("#count_items").val(counter);
|
|||
|
$('.date-picker').datepicker({
|
|||
|
autoclose: true,
|
|||
|
todayHighlight: true
|
|||
|
})
|
|||
|
});
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
$("#myTable").on("click", "#deletebtn", function(event) {
|
|||
|
$(this).closest("tr").remove();
|
|||
|
counter -= 1
|
|||
|
$("#count_items").val(counter);
|
|||
|
});
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
</script>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js"></script> -->
|
|||
|
<!-- <script src="js\moment.min.js"></script> -->
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<script type="text/javascript">
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
jQuery(function($) {
|
|||
|
// $('#dob').on('change', function() {
|
|||
|
|
|||
|
// });
|
|||
|
|
|||
|
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
function getAge(){
|
|||
|
var dob = document.getElementById('dob').value;
|
|||
|
dob = new Date(dob);
|
|||
|
var today = new Date();
|
|||
|
var age = Math.floor((today-dob) / (365.25 * 24 * 60 * 60 * 1000));
|
|||
|
document.getElementById("dob").value=age;
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
// }
|
|||
|
jQuery(function($) {
|
|||
|
$('#id-disable-check').on('click', function() {
|
|||
|
var inp = $('#form-input-readonly').get(0);
|
|||
|
if (inp.hasAttribute('disabled')) {
|
|||
|
inp.setAttribute('readonly', 'true');
|
|||
|
inp.removeAttribute('disabled');
|
|||
|
inp.value = "This text field is readonly!";
|
|||
|
} else {
|
|||
|
inp.setAttribute('disabled', 'disabled');
|
|||
|
inp.removeAttribute('readonly');
|
|||
|
inp.value = "This text field is disabled!";
|
|||
|
}
|
|||
|
});
|
|||
|
|
|||
|
|
|||
|
if (!ace.vars['touch']) {
|
|||
|
$('.chosen-select').chosen({
|
|||
|
allow_single_deselect: true
|
|||
|
});
|
|||
|
|
|||
|
|
|||
|
$(window)
|
|||
|
.off('resize.chosen')
|
|||
|
.on('resize.chosen', function() {
|
|||
|
$('.chosen-select').each(function() {
|
|||
|
var $this = $(this);
|
|||
|
$this.next().css({
|
|||
|
'width': $this.parent().width()
|
|||
|
});
|
|||
|
})
|
|||
|
}).trigger('resize.chosen');
|
|||
|
//resize chosen on sidebar collapse/expand
|
|||
|
$(document).on('settings.ace.chosen', function(e, event_name, event_val) {
|
|||
|
if (event_name != 'sidebar_collapsed') return;
|
|||
|
$('.chosen-select').each(function() {
|
|||
|
var $this = $(this);
|
|||
|
$this.next().css({
|
|||
|
'width': $this.parent().width()
|
|||
|
});
|
|||
|
})
|
|||
|
});
|
|||
|
|
|||
|
|
|||
|
$('#chosen-multiple-style .btn').on('click', function(e) {
|
|||
|
var target = $(this).find('input[type=radio]');
|
|||
|
var which = parseInt(target.val());
|
|||
|
if (which == 2) $('#form-field-select-4').addClass('tag-input-style');
|
|||
|
else $('#form-field-select-4').removeClass('tag-input-style');
|
|||
|
});
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
$('[data-rel=tooltip]').tooltip({
|
|||
|
container: 'body'
|
|||
|
});
|
|||
|
$('[data-rel=popover]').popover({
|
|||
|
container: 'body'
|
|||
|
});
|
|||
|
|
|||
|
autosize($('textarea[class*=autosize]'));
|
|||
|
|
|||
|
$('textarea.limited').inputlimiter({
|
|||
|
remText: '%n character%s remaining...',
|
|||
|
limitText: 'max allowed : %n.'
|
|||
|
});
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
//"jQuery UI Slider"
|
|||
|
//range slider tooltip example
|
|||
|
$("#slider-range").css('height', '200px').slider({
|
|||
|
orientation: "vertical",
|
|||
|
range: true,
|
|||
|
min: 0,
|
|||
|
max: 100,
|
|||
|
values: [17, 67],
|
|||
|
slide: function(event, ui) {
|
|||
|
var val = ui.values[$(ui.handle).index() - 1] + "";
|
|||
|
|
|||
|
if (!ui.handle.firstChild) {
|
|||
|
$("<div class='tooltip right in' style='display:none;left:16px;top:-6px;'><div class='tooltip-arrow'></div><div class='tooltip-inner'></div></div>")
|
|||
|
.prependTo(ui.handle);
|
|||
|
}
|
|||
|
$(ui.handle.firstChild).show().children().eq(1).text(val);
|
|||
|
}
|
|||
|
}).find('span.ui-slider-handle').on('blur', function() {
|
|||
|
$(this.firstChild).hide();
|
|||
|
});
|
|||
|
|
|||
|
|
|||
|
$("#slider-range-max").slider({
|
|||
|
range: "max",
|
|||
|
min: 1,
|
|||
|
max: 10,
|
|||
|
value: 2
|
|||
|
});
|
|||
|
|
|||
|
$("#slider-eq > span").css({
|
|||
|
width: '90%',
|
|||
|
'float': 'left',
|
|||
|
margin: '15px'
|
|||
|
}).each(function() {
|
|||
|
// read initial values from markup and remove that
|
|||
|
var value = parseInt($(this).text(), 10);
|
|||
|
$(this).empty().slider({
|
|||
|
value: value,
|
|||
|
range: "min",
|
|||
|
animate: true
|
|||
|
|
|||
|
});
|
|||
|
});
|
|||
|
|
|||
|
$("#slider-eq > span.ui-slider-purple").slider('disable'); //disable third item
|
|||
|
|
|||
|
|
|||
|
$('#id-input-file-1 , #id-input-file-2').ace_file_input({
|
|||
|
no_file: 'No File ...',
|
|||
|
btn_choose: 'Choose',
|
|||
|
btn_change: 'Change',
|
|||
|
droppable: false,
|
|||
|
onchange: null,
|
|||
|
thumbnail: false //| true | large
|
|||
|
//whitelist:'gif|png|jpg|jpeg'
|
|||
|
//blacklist:'exe|php'
|
|||
|
//onchange:''
|
|||
|
//
|
|||
|
});
|
|||
|
//pre-show a file name, for example a previously selected file
|
|||
|
//$('#id-input-file-1').ace_file_input('show_file_list', ['myfile.txt'])
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
//datepicker plugin
|
|||
|
//link
|
|||
|
$('.date-picker').datepicker({
|
|||
|
autoclose: true,
|
|||
|
todayHighlight: true
|
|||
|
})
|
|||
|
//show datepicker when clicking on the icon
|
|||
|
.next().on(ace.click_event, function() {
|
|||
|
$(this).prev().focus();
|
|||
|
});
|
|||
|
|
|||
|
|
|||
|
|
|||
|
//chosen plugin inside a modal will have a zero width because the select element is originally hidden
|
|||
|
//and its width cannot be determined.
|
|||
|
//so we set the width after modal is show
|
|||
|
$('#modal-form').on('shown.bs.modal', function() {
|
|||
|
if (!ace.vars['touch']) {
|
|||
|
$(this).find('.chosen-container').each(function() {
|
|||
|
$(this).find('a:first-child').css('width', '210px');
|
|||
|
$(this).find('.chosen-drop').css('width', '210px');
|
|||
|
$(this).find('.chosen-search input').css('width', '200px');
|
|||
|
});
|
|||
|
}
|
|||
|
})
|
|||
|
/**
|
|||
|
//or you can activate the chosen plugin after modal is shown
|
|||
|
//this way select element becomes visible with dimensions and chosen works as expected
|
|||
|
$('#modal-form').on('shown', function () {
|
|||
|
$(this).find('.modal-chosen').chosen();
|
|||
|
})
|
|||
|
*/
|
|||
|
|
|||
|
|
|||
|
|
|||
|
$(document).one('ajaxloadstart.page', function(e) {
|
|||
|
autosize.destroy('textarea[class*=autosize]')
|
|||
|
|
|||
|
$('.limiterBox,.autosizejs').remove();
|
|||
|
$('.daterangepicker.dropdown-menu,.colorpicker.dropdown-menu,.bootstrap-datetimepicker-widget.dropdown-menu').remove();
|
|||
|
});
|
|||
|
|
|||
|
});
|
|||
|
</script>
|