231 lines
7.0 KiB
PHP
231 lines
7.0 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 class="active">Master</li><li class="active">Questionnaier Categories</li>
|
|
</ul>
|
|
</div>
|
|
<!-- End of breadcrumb -->
|
|
|
|
|
|
<div id="flexigridDiv" class="well-sm table-responsive" style="margin-right: 5px;margin-left: 5px;height:auto; width:100%">
|
|
|
|
<form name="f1" method="post" id="flex_questionnaire_section_form" action="">
|
|
<div id="flex1" style="width: 100%"></div>
|
|
<input type="hidden" name="flex_section_id" id="flex_section_id" />
|
|
</form>
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
<!-- /.page-content -->
|
|
</div>
|
|
</div>
|
|
<!-- /.main-content -->
|
|
|
|
|
|
<script type="text/javascript">
|
|
//alert("screen.height:"+screen.height+",navbar.heigh:"+$("#navbar").height()+",breadcrumbs.height:"+$(".breadcrumbs").height());
|
|
$(function() {
|
|
|
|
var w=screen.width*.90;
|
|
|
|
var h =0;
|
|
h =(window.innerHeight-($("#navbar").height()+$(".breadcrumbs").height()))*.75;
|
|
//alert(h);
|
|
|
|
$("#flex1").flexigrid({
|
|
url: 'questionnaire_section_script.php',
|
|
dataType: 'json',
|
|
colModel : [
|
|
{display: 'Sr', name : 'count', width : w*.05, sortable : false, align: 'left'},
|
|
|
|
{display: 'Category Name', name : 'section_name', width : w*.15, sortable : true, align: 'left'},
|
|
{display: 'Category Description ', name : 'section_section ', width : w*.15, sortable : true, align: 'left'},
|
|
|
|
{display: '', name : 'link', width : w*.15, sortable : false, align: 'left'}
|
|
],
|
|
buttons : [
|
|
|
|
|
|
|
|
{name: 'Add', bclass: 'add', onpress : add},
|
|
{separator: true},
|
|
|
|
{name: 'PDF', bclass: 'print', onpress : pdf},
|
|
{separator: true},
|
|
{name: 'Excel', bclass: 'print_excel', onpress : excel},
|
|
{separator: true}
|
|
],
|
|
searchitems : [
|
|
{display: 'Section Name', name : 'section_name' ,isdefault: true},
|
|
{display: 'Section Description', name : 'section_description'}
|
|
|
|
],
|
|
sortname: "section_id",
|
|
sortorder: "asc",
|
|
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 pdf(){
|
|
window.open('pdf_questionnaire_section.php');
|
|
}
|
|
function excel(){
|
|
window.location = 'excel_questionnaire_section.php';
|
|
}
|
|
|
|
function add(){
|
|
|
|
|
|
$(".save_button").show();
|
|
|
|
$("#section_id").val("");
|
|
$("#section_name").val("");
|
|
$("#section_description").val("");
|
|
|
|
|
|
|
|
$('#modal-add-questionnaire-categories').modal("show");
|
|
|
|
}
|
|
|
|
|
|
|
|
function delete_questionnaire_section(sectionId){
|
|
$("#flex_section_id").val(sectionId);
|
|
|
|
BootstrapDialog.confirm('Are you sure to delete the Questionnaire Category?', function(result){
|
|
if(result) {
|
|
$.ajax({
|
|
url : 'delete_questionnaire_section.php',
|
|
type : "POST",
|
|
data : $("#flex_questionnaire_section_form").serialize(),
|
|
success : function(data) {
|
|
if(data.indexOf("SUCCESS")!=-1){
|
|
BootstrapDialog.alert('Questionnaire Category Deleted Successfully.');
|
|
$("#flex1").flexReload();
|
|
|
|
}else{
|
|
BootstrapDialog.alert('Error Deleting Questionnaire Category');
|
|
}
|
|
return;
|
|
},
|
|
error : function(data) {
|
|
BootstrapDialog.alert('Error Deleting Employee Level Questionnaire Category');
|
|
return;
|
|
}
|
|
});
|
|
}
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var sectionId = "";
|
|
function open_questionnaire_section(sectionId, action) {
|
|
var id = "";
|
|
if(action=="V"){
|
|
$(".save_button").hide();
|
|
|
|
}else{
|
|
$(".save_button").show();
|
|
}
|
|
$.ajax({
|
|
url : 'select_questionnaire_section.php?sectionId='+sectionId+' ',
|
|
type : 'POST',
|
|
|
|
success : function(data) {
|
|
data = $.parseJSON(data);
|
|
//alert(data);
|
|
|
|
|
|
|
|
$("#section_id").val(data.section_id);
|
|
$("#section_name").val(data.section_name);
|
|
$("#section_description").val(data.section_description);
|
|
|
|
$('#modal-add-questionnaire-categories').modal("show");
|
|
},
|
|
error : function(data) {
|
|
BootstrapDialog.alert('Error Populating Hygiene');
|
|
return;
|
|
}
|
|
});
|
|
}
|
|
|
|
$('#CheckupDate').datepicker({
|
|
autoclose:true,
|
|
format: 'dd/mm/yyyy',
|
|
startDate: '1d/1m/1970y',
|
|
|
|
}).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>
|
|
<?php include('techsyn_footer.php'); ?>
|
|
<?php include('form/add_questionnaire_section.php');?>
|