1445 lines
61 KiB
PHP
1445 lines
61 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');
|
|
$user = $_SESSION['user_id'];
|
|
?>
|
|
|
|
<!--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="#">Summary Statistics Register</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">
|
|
|
|
<input type="hidden" name="run_date" value="<?= date("Y-m-d") ?>">
|
|
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<table id="myTable1" class="table table-bordered order-list">
|
|
<thead>
|
|
<tr>
|
|
<th>Running SHIFT</th>
|
|
|
|
</tr>
|
|
</thead>
|
|
|
|
<?php $sql1 = "select * from shift_status_details where current_status='R' and ohc_location_id='" . $_SESSION['current_ohcttype'] . "'";
|
|
$result1 = @mysqli_query($conn, $sql1);
|
|
$total = mysqli_num_rows($result1);
|
|
error_log("asfasfasfaf" . $sql1);
|
|
error_log("total shift:" . $total);
|
|
?>
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
<center> <select class="form-control select2" id="shift_id" name="shift_id" <?php if ($total != 0) {
|
|
echo "disabled";
|
|
} ?>>
|
|
<option disabled selected><?php if ($total == 0) {
|
|
echo "Please
|
|
select SHIFT";
|
|
} else {
|
|
echo "Shift is Running";
|
|
} ?></option>
|
|
|
|
|
|
<?php
|
|
$generate_option_sql = "select status_name,shift_status_id from shift_status where status_name !='G' and ohc_location_id='" . $_SESSION['current_ohcttype'] . "' and is_shift='Y'";
|
|
|
|
$result_generate_option_sql = mysqli_query($conn, $generate_option_sql);
|
|
|
|
while ($row_generate_option_sql = mysqli_fetch_assoc($result_generate_option_sql)) {
|
|
?>
|
|
<option value="<?= $row_generate_option_sql['shift_status_id'] ?>">
|
|
<?= $row_generate_option_sql['status_name'] ?></option>
|
|
|
|
<?php
|
|
}
|
|
?>
|
|
</select>
|
|
</center>
|
|
|
|
<td>
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</tbody>
|
|
|
|
|
|
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<!-- End box-body-->
|
|
<!--box-footer-->
|
|
<div class="box-footer" style="text-align: center;">
|
|
|
|
<!-- <button class="btn btn-success new_button" id="start_button" type="reset" onclick="start_shift();" <?php if ($total != 0) {
|
|
echo "disabled";
|
|
} ?>>
|
|
START SHIFT
|
|
</button>
|
|
|
|
|
|
<button class="btn btn-info save_button" id="end_button" type="reset" onclick="end_shift();" <?php if ($total == 0) {
|
|
echo "disabled";
|
|
} ?>>
|
|
|
|
END SHIFT
|
|
</button>
|
|
|
|
-->
|
|
<!-- <button class="btn btn-info save_button" id="summ_button" type="reset" onclick="curr_shift_summary();" <?php if ($total == 0) {
|
|
echo "disabled";
|
|
} ?> >
|
|
|
|
CURRENT SHIFT SUMMARY
|
|
</button>
|
|
|
|
|
|
<button class="btn btn-info save_button" id="summ_button" type="reset" onclick="prev_shift_summary();" >
|
|
|
|
PREVIOUS SHIFT SUMMARY
|
|
</button> -->
|
|
|
|
|
|
</div>
|
|
<!--End box-footer-->
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="box box-primary">
|
|
<form id="communication_form" method="post">
|
|
|
|
|
|
|
|
|
|
<br>
|
|
<div class="">
|
|
<input type="hidden" name="run_date" id="run_date" value="<?= date("Y-m-d") ?>">
|
|
<input type="hidden" name="shift_name" id="shift_name" value="">
|
|
<input type="hidden" name="comm_date" id="comm_date" value="<?= date("d-m-Y") ?>" />
|
|
<label style=" padding-right: 20px; margin-left: 15px;" for="comm_date">Summary Statistics
|
|
Date</label> <?= date("d-m-Y") ?>
|
|
|
|
|
|
|
|
<!-- <label style=" padding-right: 20px; margin-left: 15px;" for="comm_date">Staff Name</label>
|
|
<?= getTableFieldValue('patient_master', 'patient_name', 'id', getTableFieldValue('tbl_users', 'emp_id', 'user_id', $user)) ?> -->
|
|
</div>
|
|
<!-- box-body-->
|
|
<div class="box-body">
|
|
|
|
|
|
|
|
|
|
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<table id="myTable" class="table table-bordered order-list">
|
|
<thead>
|
|
<tr>
|
|
<th>#</th>
|
|
<th>Summary Statistics Name</th>
|
|
<th>Details</th>
|
|
|
|
<!-- <th>Remarks</th> -->
|
|
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
|
|
<?php
|
|
|
|
$sql_running_shift = "select shift_details_id, shift_id as id from shift_status_details where ohc_location_id='" . $_SESSION['current_ohcttype'] . "' and current_status='R' ";
|
|
$result_running_shift = mysqli_query($conn, $sql_running_shift);
|
|
$row_running_shift = mysqli_fetch_assoc($result_running_shift);
|
|
error_log("Running shift" . $sql_running_shift);
|
|
|
|
$prev_shift = "select ssd.*,ss.* from shift_status_details ssd left join shift_status ss on ssd.shift_id = ss.shift_status_id where ssd.shift_id='" . $row_running_shift['id'] . "' and ssd.shift_details_id = '" . $row_running_shift['shift_details_id'] . "'";
|
|
|
|
$result_prev_shift = @mysqli_query($conn, $prev_shift);
|
|
|
|
|
|
$row_prev_shift = @mysqli_fetch_assoc($result_prev_shift);
|
|
|
|
error_log("prev_shift_sql: " . $prev_shift);
|
|
|
|
$start_date_time = $row_prev_shift['start_date_time'];
|
|
$end_date_time = $row_prev_shift['end_date_time'];
|
|
|
|
$i = 0;
|
|
$row = null;
|
|
|
|
$sql = "select * from communication";
|
|
$result = @mysqli_query($conn, $sql);
|
|
$num_rows = @mysqli_num_rows($result);
|
|
$row = @mysqli_fetch_array($result);
|
|
|
|
do {
|
|
?>
|
|
|
|
|
|
<tr>
|
|
|
|
<td style="width:5%"> <?= $i + 1; ?></td>
|
|
|
|
<td width="15%">
|
|
|
|
<input type="hidden" name="communication_id<?= $i ?>" id="communication_id<?= $i ?>" value="<?= $row['communication_id'] ?>" />
|
|
|
|
<input type="hidden" name="communication_name<?= $i ?>" value="<?= $row['com_item'] ?>" id="communication_name<?= $i ?>" class="form-control" readonly />
|
|
|
|
<label><strong><?= $row['com_item'] ?></strong></label>
|
|
|
|
<input type="hidden" name="shift_details_id<?= $i ?>" id="shift_details_id<?= $i ?>" value="<?= $row_prev_shift['shift_details_id'] ?>">
|
|
|
|
</td>
|
|
|
|
|
|
<td width="15%">
|
|
|
|
<?php if ($row['com_item'] == 'Any AOD case') {
|
|
|
|
$sql_injury = "select count(*) as total from employee_appointment where appointment_type = 'I' and date(appointment_date)>= date('$start_date_time') and time(appointment_date) >= time('$start_date_time') and ohc_type_id='" . $_SESSION['current_ohcttype'] . "'";
|
|
|
|
$result_sql_injury = @mysqli_query($conn, $sql_injury);
|
|
|
|
error_log("sql_injury : " . $sql_injury);
|
|
$row_injury = @mysqli_fetch_assoc($result_sql_injury);
|
|
|
|
?>
|
|
<input style="" name="details<?= $i ?>" id="details<?= $i ?>" value="<?= $row_injury['total'] ?>" class="form-control" readonly />
|
|
<?php } ?>
|
|
|
|
<?php if ($row['com_item'] == 'Any OPD Case') {
|
|
$sql_not_injury = "select count(*) as total from employee_appointment where appointment_type = 'O' and date(appointment_date)>= date('$start_date_time') and time(appointment_date) >= time('$start_date_time') and ohc_type_id='" . $_SESSION['current_ohcttype'] . "'";
|
|
|
|
$result_sql_not_injury = @mysqli_query($conn, $sql_not_injury);
|
|
|
|
error_log("sql_not_injury: " . $sql_not_injury);
|
|
$row_not_injury = @mysqli_fetch_assoc($result_sql_not_injury);
|
|
?>
|
|
|
|
<input style="" name="details<?= $i ?>" id="details<?= $i ?>" value="<?= $row_not_injury['total'] ?>" class="form-control" readonly />
|
|
|
|
<?php } ?>
|
|
|
|
<?php if ($row['com_item'] == 'Detention Case') {
|
|
|
|
$sql_serious = "select count(*) as total from employee_appointment where is_detention = 'Y' and date(appointment_date)>= date('$start_date_time') and time(appointment_date) >= time('$start_date_time') and ohc_type_id='" . $_SESSION['current_ohcttype'] . "'";
|
|
|
|
error_log("emergency_query:" . $sql_serious);
|
|
$result_serious = mysqli_query($conn, $sql_serious);
|
|
$row_serious = mysqli_fetch_array($result_serious);
|
|
?>
|
|
|
|
<input name="details<?= $i ?>" id="details<?= $i ?>" value="<?= $row_serious['total'] ?>" class="form-control" readonly />
|
|
|
|
<?php } ?>
|
|
|
|
<?php if ($row['com_item'] == 'Any Referral Cases') {
|
|
$sql_referral = "select count(*) as total from employee_appointment where (referral!= '' and referral IS NOT NULL) and date(appointment_date)>= date('$start_date_time') and time(appointment_date) >= time('$start_date_time') and ohc_type_id='" . $_SESSION['current_ohcttype'] . "'";
|
|
$result_referral = mysqli_query($conn, $sql_referral);
|
|
$row_referral = mysqli_fetch_array($result_referral);
|
|
error_log("sql_referral" . $sql_referral);
|
|
?>
|
|
|
|
<input name="details<?= $i ?>" id="details<?= $i ?>" value="<?= $row_referral['total'] ?>" class="form-control" readonly />
|
|
|
|
<?php } ?>
|
|
|
|
<?php if ($row['com_item'] == 'Follow-up of serious/referred cases') {
|
|
$sql_followup = "select count(*) as total from employee_appointment where IsEmergency= '1' and date(appointment_date)>= date('$start_date_time') and time(appointment_date) >= time('$start_date_time') and ohc_type_id='" . $_SESSION['current_ohcttype'] . "'";
|
|
$result_followup = mysqli_query($conn, $sql_followup);
|
|
$row_followup = mysqli_fetch_array($result_followup);
|
|
|
|
error_log("serious : " . $sql_followup);
|
|
|
|
?>
|
|
|
|
<input name="details<?= $i ?>" id="details<?= $i ?>" value="<?= $row_followup['total'] ?>" class="form-control" readonly />
|
|
|
|
<?php } ?>
|
|
|
|
<?php if ($row['com_item'] == 'Fitness Certificate') {
|
|
$sql_sickness1 = "select count(*) as total from sickness where fitness_status = 'APPROVED' and date(sickness_date)>= date('$start_date_time') and time(sickness_date) >= time('$start_date_time') and ohc_type_id='" . $_SESSION['current_ohcttype'] . "'";
|
|
$result_sickness1 = mysqli_query($conn, $sql_sickness1);
|
|
$row_sickness1 = mysqli_fetch_array($result_sickness1);
|
|
error_log("sql_sickness1: " . $sql_sickness1);
|
|
?>
|
|
<input name="details<?= $i ?>" id="details<?= $i ?>" value="<?= $row_sickness1['total'] ?>" class="form-control" readonly />
|
|
<?php } ?>
|
|
|
|
<?php if ($row['com_item'] == 'Health Surveillance') {
|
|
|
|
$sql_ime_long = "select count(*) as total from checkup_form where date(checkup_date)>= date('$start_date_time') and time(checkup_date) >= time('$start_date_time') and ohc_type_id='" . $_SESSION['current_ohcttype'] . "'";
|
|
$result_ime_long = mysqli_query($conn, $sql_ime_long);
|
|
$row_ime_long = mysqli_fetch_array($result_ime_long);
|
|
|
|
error_log("sql_ime_long" . $sql_ime_long);
|
|
?>
|
|
|
|
|
|
|
|
<input name="details<?= $i ?>" id="details<?= $i ?>" value="<?= $row_ime_long['total'] ?>" class="form-control" readonly />
|
|
<?php } ?>
|
|
|
|
<?php if ($row['com_item'] == 'Food Handler') {
|
|
|
|
$sql_ime_short = "select count(*) as total from questionaire_master_response where date(screen_date)>= date('$start_date_time') and ohc_type_id='" . $_SESSION['current_ohcttype'] . "' and form_type='chs'";
|
|
$result_ime_short = mysqli_query($conn, $sql_ime_short);
|
|
$row_ime_short = mysqli_fetch_array($result_ime_short);
|
|
|
|
error_log("sql_ime_short" . $sql_ime_short);
|
|
?>
|
|
|
|
<input name="details<?= $i ?>" id="details<?= $i ?>" value="<?= $row_ime_short['total'] ?>" class="form-control" readonly />
|
|
<?php } ?>
|
|
|
|
<?php if ($row['com_item'] == 'Kitchen Hygiene') {
|
|
|
|
$sql_pme = "select count(*) as total from questionaire_master_response where date(screen_date)>= date('$start_date_time') and ohc_type_id='" . $_SESSION['current_ohcttype'] . "' and form_type='khs'";
|
|
$result_pme = mysqli_query($conn, $sql_pme);
|
|
$row_pme = mysqli_fetch_array($result_pme);
|
|
|
|
error_log("sql_pme" . $sql_pme);
|
|
?>
|
|
|
|
<input name="details<?= $i ?>" id="details<?= $i ?>" value="<?= $row_pme['total'] ?>" class="form-control" readonly />
|
|
<?php } ?>
|
|
|
|
<?php if ($row['com_item'] == 'Indent') {
|
|
|
|
$sql_pme = "select count(*) as total from indent_master where date(indent_date)>= date('$start_date_time')";
|
|
$result_pme = mysqli_query($conn, $sql_pme);
|
|
$row_pme = mysqli_fetch_array($result_pme);
|
|
|
|
error_log("sql_pme" . $sql_pme);
|
|
?>
|
|
|
|
<input name="details<?= $i ?>" id="details<?= $i ?>" value="<?= $row_pme['total'] ?>" class="form-control" readonly />
|
|
<?php } ?>
|
|
|
|
|
|
<?php if ($row['com_item'] == 'Any Unfit cases') {
|
|
$sql_sickness = "select count(*) as total from sickness where fitness_status != 'APPROVED' and date(sickness_date)>= date('$start_date_time') and time(sickness_date) >= time('$start_date_time') and ohc_type_id='" . $_SESSION['current_ohcttype'] . "'";
|
|
$result_sickness = mysqli_query($conn, $sql_sickness);
|
|
$row_sickness = mysqli_fetch_array($result_sickness);
|
|
|
|
error_log("sql_sickness: " . $sql_sickness);
|
|
?>
|
|
<input name="details<?= $i ?>" id="details<?= $i ?>" value="<?= $row_sickness['total'] ?>" class="form-control" readonly />
|
|
<?php } ?>
|
|
|
|
<!-- <?php if ($row['com_item'] == 'Work At Height Test') {
|
|
$sql_wah = "select count(*) as total from work_at_height_details where date(screen_date)>= date('$start_date_time') and time(screen_date) >= time('$start_date_time');";
|
|
$result_wah = mysqli_query($conn, $sql_wah);
|
|
$row_wah = mysqli_fetch_array($result_wah);
|
|
|
|
error_log("wah sql: " . $sql_wah);
|
|
?>
|
|
<input name="details<?= $i ?>" id="details<?= $i ?>"
|
|
value="<?= $row_wah['total'] ?>" class="form-control"
|
|
readonly />
|
|
<?php } ?> -->
|
|
|
|
<?php if ($row['com_item'] == 'Covid 19 Screening') {
|
|
$sql_covid = "select count(*) as total from covid_screening_details where date(test_date)>= date('$start_date_time') and time(last_modified) >= time('$start_date_time')";
|
|
$result_covid = mysqli_query($conn, $sql_covid);
|
|
$row_covid = mysqli_fetch_array($result_covid);
|
|
|
|
error_log("covid sql: " . $sql_covid);
|
|
?>
|
|
<input name="details<?= $i ?>" id="details<?= $i ?>" value="<?= $row_covid['total'] ?>" class="form-control" readonly />
|
|
<?php } ?>
|
|
|
|
<!-- <?php if ($row['com_item'] == 'Total RAT Test') {
|
|
$sql_rat = "select count(*) as total from answer_covid where rac_test = 'DONE' and date(last_modified)>= date('$start_date_time') and time(last_modified) >= time('$start_date_time')";
|
|
$result_rat = mysqli_query($conn, $sql_rat);
|
|
$row_rat = mysqli_fetch_array($result_rat);
|
|
|
|
error_log("rat sql: " . $sql_rat);
|
|
?>
|
|
<input name="details<?= $i ?>" id="details<?= $i ?>"
|
|
value="<?= $row_rat['total'] ?>" class="form-control"
|
|
readonly />
|
|
<?php } ?> -->
|
|
|
|
<!-- <?php if ($row['com_item'] == 'Any items given/received') { ?>
|
|
<a type="button" target="_blank" onclick="curr_shift_summary1()"><i style="font-size: 15px" class="fa fa-file-pdf-o"></i></a>
|
|
<?php } ?> -->
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<!-- <td style="width:15%">
|
|
<input type="text" name="remarks<?= $i ?>" value="<?= $row['remarks'] ?>" id="remarks<?= $i ?>" class="form-control" />
|
|
|
|
</td> -->
|
|
|
|
</tr>
|
|
<?php
|
|
$i++;
|
|
} while ($row = @mysqli_fetch_array($result)) //end of while
|
|
?>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
<input type="hidden" name="count_items" id="count_items" value="<?= $i ?>" />
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
<!-- End box-body-->
|
|
<!--box-footer-->
|
|
<?php
|
|
$hasWriteAccess = isAccessible($_SESSION['RoleId'], $menu_key, 'W');
|
|
?>
|
|
<?php if ($hasWriteAccess) { ?>
|
|
<div class="box-footer" style="text-align: center;">
|
|
|
|
<!-- <button class="btn btn-info save_button" id="save_button" type="button" onclick="validate();" <?php if ($total == 0) {
|
|
echo "disabled";
|
|
} ?>>
|
|
<i class="ace-icon fa fa-floppy-o bigger-110"></i>
|
|
Save
|
|
</button>
|
|
|
|
|
|
<button class="btn btn-warning" type="reset">
|
|
<i class="ace-icon fa fa-undo bigger-110"></i>
|
|
Reset
|
|
</button> -->
|
|
|
|
|
|
</div>
|
|
<?php } ?>
|
|
<!--End box-footer-->
|
|
|
|
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<br>
|
|
|
|
<!-- 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="flex_appointment_form" action="bio_medical_waste_generation_excel.php">
|
|
<div id="flex1" style="width:100%">
|
|
<input type="hidden" name="flex_ambulance_id" id="flex_ambulance_id" />
|
|
</div>
|
|
|
|
</form>
|
|
|
|
<form name="export_form" method="post" id="export_form" action="">
|
|
|
|
<input type="hidden" name="pdf_actions" id="pdf_actions" value="bio_medical_waste_generation_pdf.php" />
|
|
<input type="hidden" name="excel_actions" id="excel_actions" value="bio_medical_waste_generation_excel.php" />
|
|
<input type="hidden" name="pdf_action" id="pdf_action" value="biowaste_pdf.php" />
|
|
<input type="hidden" name="excel_action" id="excel_action" value="excel_ambulance.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())) * .75;
|
|
$("#flex1").flexigrid({
|
|
url: 'communication_details_script.php',
|
|
dataType: 'json',
|
|
colModel: [{
|
|
display: 'shift summary',
|
|
name: 'link',
|
|
width: w * .10,
|
|
sortable: false,
|
|
align: 'left'
|
|
},
|
|
{
|
|
display: 'Sr',
|
|
name: 'count',
|
|
width: w * .03,
|
|
sortable: false,
|
|
align: 'left'
|
|
},
|
|
{
|
|
display: 'Shift',
|
|
name: 'shift',
|
|
width: w * .03,
|
|
sortable: false,
|
|
align: 'left'
|
|
},
|
|
{
|
|
display: 'Shift start time',
|
|
name: 'shift',
|
|
width: w * .09,
|
|
sortable: false,
|
|
align: 'left'
|
|
},
|
|
{
|
|
display: 'Shift end time',
|
|
name: 'shift',
|
|
width: w * .09,
|
|
sortable: false,
|
|
align: 'left'
|
|
},
|
|
{
|
|
display: 'Summary Statistics Date',
|
|
name: 'comm_date',
|
|
width: w * .12,
|
|
sortable: true,
|
|
align: 'left'
|
|
},
|
|
// {
|
|
// display: 'Staff Name',
|
|
// name: 'staff_name',
|
|
// width: w * .12,
|
|
// sortable: true,
|
|
// align: 'left'
|
|
// },
|
|
{
|
|
display: 'Summary Statistics Details',
|
|
name: 'details',
|
|
width: w * .22,
|
|
sortable: true,
|
|
align: 'left'
|
|
}
|
|
// {
|
|
// display: 'Remarks',
|
|
// name: 'remarks',
|
|
// width: w * .22,
|
|
// 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: 'Appointment Id', name : 'appointment_id',isdefault: true},
|
|
{
|
|
display: '',
|
|
name: '',
|
|
isdefault: true
|
|
},
|
|
{
|
|
display: 'Comm Date (dd/mm/yyyy)',
|
|
name: 'comm_date',
|
|
|
|
},
|
|
{
|
|
display: 'Comm Date Between (dd/mm/yyyy-dd/mm/yyyy)',
|
|
name: 'comm_date_between',
|
|
|
|
},
|
|
|
|
|
|
|
|
],
|
|
sortname: "comm_date",
|
|
sortorder: "desc",
|
|
usepager: true, //pagination
|
|
//title:"Employee OPD",
|
|
useRp: true,
|
|
rp: 50, //records per page
|
|
showTableToggleBtn: false, //toggle button for the whole table
|
|
resizable: true,
|
|
// width: w,
|
|
height: h,
|
|
singleSelect: true
|
|
});
|
|
});
|
|
|
|
// function open_frequency(flex_ambulance_id,action){
|
|
// if(action=="V"){
|
|
// //$(".save_button").hide()
|
|
// location.href="ambulance_details.php?flex_ambulance_id="+flex_ambulance_id+"";
|
|
// $(".save_button").hide()
|
|
// }else{
|
|
// location.href="ambulance_details.php?flex_ambulance_id="+flex_ambulance_id+"";
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
function delete_communication(user, date) {
|
|
|
|
$.ajax({
|
|
url: 'delete_communication.php',
|
|
data: {
|
|
modified_by: user,
|
|
comm_date: date
|
|
},
|
|
type: 'POST',
|
|
dataType: 'json',
|
|
success: function(data) {
|
|
|
|
if (data == 'SUCCESS') {
|
|
|
|
BootstrapDialog.alert('Deleted Communication Details Successfully');
|
|
$("#flex1").flexReload();
|
|
return;
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
error: function(data) {
|
|
BootstrapDialog.alert('Error Communication Details Successfully');
|
|
return;
|
|
}
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
function show_save_button() {
|
|
$("#save_button").show()
|
|
}
|
|
|
|
|
|
function open_communication(user, date, access) {
|
|
// alert(user);
|
|
if (access == 'V') {
|
|
$("#save_button").hide()
|
|
} else if (access == 'E')
|
|
$("#save_button").show()
|
|
|
|
$.ajax({
|
|
url: 'select_communication_details.php',
|
|
data: {
|
|
modified_by: user,
|
|
comm_date: date
|
|
},
|
|
type: 'POST',
|
|
dataType: 'json',
|
|
success: function(data) {
|
|
var content = "";
|
|
for (i = 0; i < data.length; i++) {
|
|
|
|
content += '<tr><tr><td style="width:2%">' + (i + 1) +
|
|
'</td><td style="width:6%">'
|
|
content += '<input type="hidden" name="shift_details_id' + i +
|
|
'" id="shift_details_id"' + i + '" value="' + data[i].shift_details_id +
|
|
'"><input type="hidden" name="communication_id' + i +
|
|
'" id="communication_id"' + i + '" value="' + data[i].communication_id +
|
|
'">'
|
|
content += '<input name="communication_name' + i +
|
|
'" id=""communication_name' + i + '" value="' + data[i].com_item +
|
|
'"class="form-control"/>'
|
|
content += '</td>'
|
|
content += '<td style="width:5%">'
|
|
content += '<input name="details' + i + '" id=""details' + i + '" value="' +
|
|
data[i].details + '"class="form-control"/></td>'
|
|
|
|
content += '<td style="width:15%"><input type="text" name="remarks' + i +
|
|
'" value="' + data[i].remarks + '" id="remarks' + i +
|
|
'" class="form-control"></td></tr>'
|
|
|
|
}
|
|
$("#myTable tbody").html(content);
|
|
},
|
|
error: function(data) {
|
|
// alert(data.length);
|
|
BootstrapDialog.alert('Error Populating Communication Details');
|
|
return;
|
|
}
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
function pdf() {
|
|
window.open('communication_details_pdf.php');
|
|
}
|
|
|
|
function excel() {
|
|
window.open('communication_details_excel.php');
|
|
}
|
|
|
|
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;
|
|
|
|
|
|
}
|
|
</script>
|
|
|
|
<?php include('techsyn_footer.php'); ?>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<!-- End of page-content -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
function validate() {
|
|
|
|
// var details = $('#details').val();
|
|
|
|
// if(details == '' || details == undefined){
|
|
|
|
// BootstrapDialog.alert('Please Enter Communication details.!!!');
|
|
|
|
// return false;
|
|
|
|
// }
|
|
|
|
|
|
|
|
save();
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
#modal-add-ailment {
|
|
overflow-y: scroll;
|
|
}
|
|
</style>
|
|
|
|
|
|
|
|
<?php include('techsyn_footer.php'); ?>
|
|
<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_communication.php ',
|
|
type: "POST",
|
|
data: $("#communication_form").serialize(),
|
|
success: function(data) {
|
|
// alert(data);
|
|
BootstrapDialog.alert('Communication Saved Successfully.');
|
|
$("#flex1").flexReload();
|
|
return;
|
|
},
|
|
error: function(data) {
|
|
BootstrapDialog.alert('Error Saving Communication Register');
|
|
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>
|
|
|
|
<script>
|
|
function validate() {
|
|
|
|
|
|
|
|
var frequency_name = $('#frequency_name0').val();
|
|
|
|
if (frequency_name == '') {
|
|
|
|
BootstrapDialog.alert('Please Enter Frequency Name.!!!');
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
var frequency_code = $('#frequency_code0').val();
|
|
|
|
if (frequency_code == '') {
|
|
|
|
BootstrapDialog.alert('Please Enter Frequency Code.!!!');
|
|
|
|
return false;
|
|
|
|
}
|
|
save();
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
#modal-add-ailment {
|
|
overflow-y: scroll;
|
|
}
|
|
</style>
|
|
|
|
|
|
|
|
<?php include('techsyn_footer.php'); ?>
|
|
<script type="text/javascript">
|
|
$('.select2').select2()
|
|
|
|
function start_shift() {
|
|
|
|
var shift_id = $('#shift_id').val();
|
|
if (shift_id == null) {
|
|
BootstrapDialog.alert('Please Select the shift.!!!');
|
|
return false;
|
|
}
|
|
|
|
$.ajax({
|
|
url: 'save_shift_status.php ',
|
|
type: "POST",
|
|
data: $("#task_form").serialize(),
|
|
dataType: 'json',
|
|
success: function(data) {
|
|
console.log(data);
|
|
|
|
// alert(data);
|
|
BootstrapDialog.alert('Shift started successfully.');
|
|
document.getElementById("shift_id").disabled = true;
|
|
document.getElementById("end_button").disabled = false;
|
|
document.getElementById("save_button").disabled = false;
|
|
document.getElementById("summ_button").disabled = false;
|
|
document.getElementById("start_button").disabled = true;
|
|
|
|
$("#flex1").flexReload();
|
|
return;
|
|
},
|
|
error: function(data) {
|
|
BootstrapDialog.alert('Error Starting Shift');
|
|
return;
|
|
}
|
|
});
|
|
$('.close').click();
|
|
|
|
location.reload();
|
|
|
|
}
|
|
|
|
function end_shift() {
|
|
|
|
validate();
|
|
|
|
$.ajax({
|
|
url: 'save_shift_status.php ',
|
|
type: "POST",
|
|
data: $("#task_form").serialize(),
|
|
dataType: 'json',
|
|
success: function(data) {
|
|
console.log(data);
|
|
|
|
|
|
BootstrapDialog.alert('Shift ended Successfully.');
|
|
|
|
|
|
document.getElementById("shift_id").disabled = false;
|
|
document.getElementById("end_button").disabled = true;
|
|
document.getElementById("summ_button").disabled = true;
|
|
document.getElementById("start_button").disabled = false;
|
|
|
|
|
|
$("#flex1").flexReload();
|
|
return;
|
|
},
|
|
error: function(data) {
|
|
BootstrapDialog.alert('Error Ending Shift');
|
|
return;
|
|
}
|
|
});
|
|
$('.close').click();
|
|
|
|
location.reload();
|
|
|
|
}
|
|
$('.date-picker').datepicker({
|
|
autoclose: true,
|
|
format: 'dd/mm/yyyy'
|
|
}).next().on(ace.click_event, function() {
|
|
$(this).prev().focus();
|
|
});
|
|
|
|
|
|
function curr_shift_summary() {
|
|
|
|
|
|
document.forms['task_form'].action = "item_stock_shift.php";
|
|
document.forms['task_form'].method = "post";
|
|
document.forms['task_form'].submit();
|
|
}
|
|
|
|
function curr_shift_summary1() {
|
|
|
|
|
|
document.forms['communication_form'].action = "item_stock_shift.php";
|
|
document.forms['communication_form'].method = "post";
|
|
document.forms['communication_form'].submit();
|
|
}
|
|
|
|
function shift_summ(date, shift_name) {
|
|
|
|
$("#run_date").val(date);
|
|
$("#shift_name").val(shift_name);
|
|
document.forms['communication_form'].action = "item_stock_shift_prev.php";
|
|
document.forms['communication_form'].method = "post";
|
|
document.forms['communication_form'].submit();
|
|
}
|
|
|
|
// function prev_shift_summary(){
|
|
|
|
|
|
// document.forms['task_form'].action="item_stock_shift_prev.php";
|
|
// document.forms['task_form'].method="post";
|
|
// document.forms['task_form'].submit();
|
|
// }
|
|
</script>
|
|
|
|
<!-- bootstrap & fontawesome -->
|
|
<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 type="text/javascript">
|
|
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>
|