mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
updated questionnairelist.php and new.php
TOTAL NEW look, crosslinks, modified input types, added restrictions, collapse CKeditor textarea, "delete" protection switched to bs-toggle updated js/custom.js
This commit is contained in:
609
admin/new.php
609
admin/new.php
@@ -1,231 +1,378 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
|
||||||
* Create a queXS questionnaire and link it to a LimeSurvey questionnaire
|
|
||||||
*
|
/**
|
||||||
*
|
* Configuration file
|
||||||
* This file is part of queXS
|
*/
|
||||||
*
|
include ("../config.inc.php");
|
||||||
* queXS is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
/**
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* Database file
|
||||||
* (at your option) any later version.
|
*/
|
||||||
*
|
include ("../db.inc.php");
|
||||||
* queXS is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
/**
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* XHTML functions
|
||||||
* GNU General Public License for more details.
|
*/
|
||||||
*
|
include ("../functions/functions.xhtml.php");
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with queXS; if not, write to the Free Software
|
/**
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
* Input functions
|
||||||
*
|
*/
|
||||||
*
|
include("../functions/functions.input.php");
|
||||||
* @author Adam Zammit <adam.zammit@deakin.edu.au>
|
|
||||||
* @copyright Deakin University 2007,2008
|
$css = array(
|
||||||
* @package queXS
|
"../include/bootstrap-3.3.2/css/bootstrap.min.css",
|
||||||
* @subpackage admin
|
"../include/bootstrap-3.3.2/css/bootstrap-theme.min.css",
|
||||||
* @link http://www.deakin.edu.au/dcarf/ queXS was writen for DCARF - Deakin Computer Assisted Research Facility
|
"../include/font-awesome-4.3.0/css/font-awesome.css",
|
||||||
* @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) Version 2
|
"../include/bootstrap-toggle/css/bootstrap-toggle.min.css",
|
||||||
*
|
"../css/custom.css"
|
||||||
*/
|
);
|
||||||
|
$js_head = array(
|
||||||
/**
|
"../js/jquery-2.1.3.min.js",
|
||||||
* Configuration file
|
"../include/bootstrap-3.3.2/js/bootstrap.min.js",
|
||||||
*/
|
"../include/bootstrap-toggle/js/bootstrap-toggle.min.js",
|
||||||
include ("../config.inc.php");
|
);
|
||||||
|
$js_foot = array(
|
||||||
/**
|
"../js/new.js",
|
||||||
* Database file
|
"../js/custom.js"
|
||||||
*/
|
);
|
||||||
include ("../db.inc.php");
|
global $db;
|
||||||
|
|
||||||
/**
|
xhtml_head(T_("Create a new questionnaire"),true,$css,$js_head);
|
||||||
* XHTML functions
|
|
||||||
*/
|
if (isset($_POST['import_file']))
|
||||||
include ("../functions/functions.xhtml.php");
|
{
|
||||||
|
//file has been submitted
|
||||||
/**
|
$ras =0;
|
||||||
* Input functions
|
$rws = 0;
|
||||||
*/
|
$testing = 0;
|
||||||
include("../functions/functions.input.php");
|
$referral = 0;
|
||||||
|
$rs = 0;
|
||||||
/**
|
$lime_sid = 0;
|
||||||
* CKEditor
|
$respsc = 0;
|
||||||
*/
|
$lime_rs_sid = "NULL";
|
||||||
include("../include/ckeditor/ckeditor.php");
|
if (isset($_POST['ras'])) $ras = 1;
|
||||||
|
if (isset($_POST['rws'])) $rws = 1;
|
||||||
global $db;
|
if (isset($_POST['testing'])) $testing = 1;
|
||||||
|
if (isset($_POST['respsc'])) $respsc = 1;
|
||||||
xhtml_head(T_("New: Create new questionnaire"),true,false,array("../js/new.js"));
|
if (isset($_POST['referral'])) $respsc = 1;
|
||||||
|
if ($_POST['selectrs'] != "none") $rs = 1;
|
||||||
if (isset($_POST['import_file']))
|
|
||||||
{
|
$name = $db->qstr($_POST['description']);
|
||||||
//file has been submitted
|
$rs_intro = $db->qstr(html_entity_decode($_POST['rs_intro'],ENT_QUOTES,'UTF-8'));
|
||||||
global $db;
|
$rs_project_intro = $db->qstr(html_entity_decode($_POST['rs_project_intro'],ENT_QUOTES,'UTF-8'));
|
||||||
|
$rs_project_end = $db->qstr(html_entity_decode($_POST['rs_project_end'],ENT_QUOTES,'UTF-8'));
|
||||||
$ras =0;
|
$rs_callback = $db->qstr(html_entity_decode($_POST['rs_callback'],ENT_QUOTES,'UTF-8'));
|
||||||
$rws = 0;
|
$rs_answeringmachine = $db->qstr(html_entity_decode($_POST['rs_answeringmachine'],ENT_QUOTES,'UTF-8'));
|
||||||
$testing = 0;
|
$info = $db->qstr(html_entity_decode($_POST['info'],ENT_QUOTES,'UTF-8'));
|
||||||
$referral = 0;
|
|
||||||
$rs = 0;
|
//use existing lime instrument
|
||||||
$lime_sid = 0;
|
$lime_sid = bigintval($_POST['select']);
|
||||||
$respsc = 0;
|
|
||||||
$lime_rs_sid = "NULL";
|
|
||||||
if (isset($_POST['ras'])) $ras = 1;
|
if (is_numeric($_POST['selectrs']))
|
||||||
if (isset($_POST['rws'])) $rws = 1;
|
{
|
||||||
if (isset($_POST['testing'])) $testing = 1;
|
$lime_rs_sid = bigintval($_POST['selectrs']);
|
||||||
if (isset($_POST['respsc'])) $respsc = 1;
|
}
|
||||||
if (isset($_POST['referral'])) $respsc = 1;
|
|
||||||
if ($_POST['selectrs'] != "none") $rs = 1;
|
$sql = "INSERT INTO questionnaire (questionnaire_id,description,lime_sid,restrict_appointments_shifts,restrict_work_shifts,respondent_selection,rs_intro,rs_project_intro,rs_project_end,rs_callback,rs_answeringmachine,testing,lime_rs_sid,info,self_complete,referral)
|
||||||
|
VALUES (NULL,$name,'$lime_sid','$ras','$rws','$rs',$rs_intro,$rs_project_intro,$rs_project_end,$rs_callback,$rs_answeringmachine,'$testing',$lime_rs_sid,$info,$respsc,$referral)";
|
||||||
$name = $db->qstr($_POST['description']);
|
|
||||||
$rs_intro = $db->qstr(html_entity_decode($_POST['rs_intro'],ENT_QUOTES,'UTF-8'));
|
$rs = $db->Execute($sql);
|
||||||
$rs_project_intro = $db->qstr(html_entity_decode($_POST['rs_project_intro'],ENT_QUOTES,'UTF-8'));
|
|
||||||
$rs_project_end = $db->qstr(html_entity_decode($_POST['rs_project_end'],ENT_QUOTES,'UTF-8'));
|
if ($rs)
|
||||||
$rs_callback = $db->qstr(html_entity_decode($_POST['rs_callback'],ENT_QUOTES,'UTF-8'));
|
{
|
||||||
$rs_answeringmachine = $db->qstr(html_entity_decode($_POST['rs_answeringmachine'],ENT_QUOTES,'UTF-8'));
|
$qid = $db->Insert_ID();
|
||||||
$info = $db->qstr(html_entity_decode($_POST['info'],ENT_QUOTES,'UTF-8'));
|
if ($respsc == 1)
|
||||||
|
{
|
||||||
//use existing lime instrument
|
$lime_mode = $db->qstr($_POST['lime_mode']);
|
||||||
$lime_sid = bigintval($_POST['select']);
|
$lime_template = $db->qstr($_POST['lime_template']);
|
||||||
|
$lime_endurl = $db->qstr($_POST['lime_endurl']);
|
||||||
|
|
||||||
if (is_numeric($_POST['selectrs']))
|
$sql = "UPDATE questionnaire
|
||||||
{
|
SET lime_mode = $lime_mode, lime_template = $lime_template, lime_endurl = $lime_endurl
|
||||||
$lime_rs_sid = bigintval($_POST['selectrs']);
|
WHERE questionnaire_id = $qid";
|
||||||
}
|
|
||||||
|
$db->Execute($sql);
|
||||||
$sql = "INSERT INTO questionnaire (questionnaire_id,description,lime_sid,restrict_appointments_shifts,restrict_work_shifts,respondent_selection,rs_intro,rs_project_intro,rs_project_end,rs_callback,rs_answeringmachine,testing,lime_rs_sid,info,self_complete,referral)
|
}
|
||||||
VALUES (NULL,$name,'$lime_sid','$ras','$rws','$rs',$rs_intro,$rs_project_intro,$rs_project_end,$rs_callback,$rs_answeringmachine,'$testing',$lime_rs_sid,$info,$respsc,$referral)";
|
$cl = info;
|
||||||
|
$message = T_("Successfully inserted") . " " . T_("with ID") . "  $qid, </h4><h4>" . T_("linked to survey") . "  $lime_sid ";
|
||||||
$rs = $db->Execute($sql);
|
|
||||||
|
}
|
||||||
if ($rs)
|
else{
|
||||||
{
|
$cl = danger;
|
||||||
$qid = $db->Insert_ID();
|
$message = T_("Error: Failed to insert questionnaire");
|
||||||
if ($respsc == 1)
|
}
|
||||||
{
|
|
||||||
$lime_mode = $db->qstr($_POST['lime_mode']);
|
|
||||||
$lime_template = $db->qstr($_POST['lime_template']);
|
?>
|
||||||
$lime_endurl = $db->qstr($_POST['lime_endurl']);
|
<script type="text/javascript" >
|
||||||
|
$(function() {
|
||||||
$sql = "UPDATE questionnaire
|
$('#modal-confirm').modal('show');
|
||||||
SET lime_mode = $lime_mode, lime_template = $lime_template, lime_endurl = $lime_endurl
|
});
|
||||||
WHERE questionnaire_id = $qid";
|
</script>
|
||||||
|
|
||||||
$db->Execute($sql);
|
<?php
|
||||||
}
|
$_POST['import_file'] = false;
|
||||||
print "<p>" . T_("Successfully inserted") . " $name " . T_("as questionnaire") . " $qid, " . T_("linked to") . " $lime_sid</p>";
|
}
|
||||||
}else
|
?>
|
||||||
{
|
|
||||||
print "<p>" . T_("Error: Failed to insert questionnaire") . "</p>";
|
<!-- Modal window confirmation start -->
|
||||||
}
|
<div class="modal fade " id="modal-confirm">
|
||||||
|
<div class="modal-dialog ">
|
||||||
|
<div class="modal-content ">
|
||||||
}
|
<div class="modal-header" style="border-bottom:none;">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||||
|
<h4 class="modal-header"><?php echo T_("Questionnaire");?>  <strong class="text-<?php echo $cl;?>"> <?php echo $name; ?></strong></h4>
|
||||||
//create new questionnaire
|
</div>
|
||||||
?>
|
<div class="modal-body ">
|
||||||
<form enctype="multipart/form-data" action="" method="post">
|
<div class="alert alert-<?php echo $cl;?> text-center" role="alert">
|
||||||
<p><input type="hidden" name="MAX_FILE_SIZE" value="1000000000" /></p>
|
<h4> <?php print $message ;?></h4>
|
||||||
<p><?php echo T_("Name for questionnaire:"); ?> <input type="text" name="description"/></p>
|
</div>
|
||||||
<p><?php echo T_("Select limesurvey instrument:");
|
</div>
|
||||||
$sql = "SELECT s.sid as sid, sl.surveyls_title AS title
|
<div class="modal-footer" style="borfer-top:none">
|
||||||
FROM " . LIME_PREFIX . "surveys AS s
|
<button class="btn btn-default pull-left" data-dismiss="modal" style="width: 250px;" ><i class="fa fa-check fa-2x pull-right text-<?php echo $cl;?>"></i> <?php echo T_("Create another ?");?><br><?php echo T_("Questionnaire");?></button>  
|
||||||
LEFT JOIN " . LIME_PREFIX . "surveys_languagesettings AS sl ON ( s.sid = sl.surveyls_survey_id)
|
<a href="questionnairelist.php" class="btn btn-default pull-right" style="width: 250px;" ><i class="fa fa-list text-<?php echo $cl;?> fa-2x pull-left"></i><?php echo T_("No, Thank you, go to");?> <br><?php echo T_("Questionnaire management");?></a>
|
||||||
WHERE s.active = 'Y'
|
</div>
|
||||||
GROUP BY s.sid";
|
</div>
|
||||||
|
</div>
|
||||||
$surveys = $db->GetAll($sql);
|
</div><!-- /modal end -->
|
||||||
|
|
||||||
if (!empty($surveys))
|
<!-- create new questionnaire -->
|
||||||
{
|
<body>
|
||||||
print "<select name='select'>";
|
|
||||||
foreach($surveys as $s)
|
|
||||||
{
|
<a href="questionnairelist.php" class="btn btn-default pull-left" ><i class="fa fa-list text-primary"></i> <?php echo T_("Go to");?> <?php echo T_("Questionnaire management");?> </a>
|
||||||
print "<option value=\"{$s['sid']}\">" . T_("Existing instrument:") . " {$s['title']}</option>";
|
|
||||||
}
|
|
||||||
print "</select>";
|
|
||||||
}
|
<form enctype="multipart/form-data" action="" method="post" class="form-horizontal col-lg-12" >
|
||||||
else
|
|
||||||
{
|
<input type="hidden" name="MAX_FILE_SIZE" value="1000000000" />
|
||||||
print "<a href='" . LIME_URL ."admin/admin.php?action=newsurvey'>" . T_("Create an instrument in Limesurvey") ."</a>";
|
<div class="form-group">
|
||||||
}
|
<label class="col-lg-4 control-label" ><?php echo T_("Name for questionnaire:"); ?> </label>
|
||||||
?></p>
|
<div class="col-lg-4">
|
||||||
<p><?php echo T_("Respondent selection type:"); ?>
|
<input type="text" name="description" class="form-control" required placeholder="<?php echo T_("Enter New questionnaire name..");?>" title="<?php echo T_("Name for questionnaire:") ; ?>" />
|
||||||
<select name="selectrs" onchange="if(this.value=='old') show(this,'rstext'); else hide(this,'rstext');"><option value="none"><?php echo T_("No respondent selection (go straight to questionnaire)"); ?></option><option value="old"><?php echo T_("Use basic respondent selection text (below)"); ?></option>
|
</div>
|
||||||
<?php
|
</div>
|
||||||
$sql = "SELECT s.sid as sid, sl.surveyls_title AS title
|
|
||||||
FROM " . LIME_PREFIX . "surveys AS s
|
<?php
|
||||||
LEFT JOIN " . LIME_PREFIX . "surveys_languagesettings AS sl ON ( s.sid = sl.surveyls_survey_id)
|
$sql = "SELECT s.sid as sid, sl.surveyls_title AS title
|
||||||
WHERE s.active = 'Y'";
|
FROM " . LIME_PREFIX . "surveys AS s
|
||||||
|
LEFT JOIN " . LIME_PREFIX . "surveys_languagesettings AS sl ON ( s.sid = sl.surveyls_survey_id)
|
||||||
$surveys = $db->GetAll($sql);
|
WHERE s.active = 'Y'
|
||||||
|
GROUP BY s.sid";
|
||||||
if (!empty($surveys))
|
$surveys = $db->GetAll($sql);
|
||||||
{
|
?>
|
||||||
foreach($surveys as $s)
|
<div class="form-group row">
|
||||||
{
|
<label class="col-sm-4 control-label" ><?php echo T_("Select limesurvey instrument:");?> </label>
|
||||||
print "<option value=\"{$s['sid']}\">" . T_("Existing instrument:") . " {$s['title']}</option>";
|
<div class='col-sm-4'>
|
||||||
}
|
<?php if (!empty($surveys)){?>
|
||||||
}
|
<select name="select" class="form-control">
|
||||||
|
<?php foreach($surveys as $s){?>
|
||||||
$CKEditor = new CKEditor();
|
<option value="<?php echo $s['sid'];?>"><?php echo T_("Existing instrument:"), " ", $s['title'] ;?></option><?php } ?>
|
||||||
$CKEditor->basePath = "../include/ckeditor/";
|
</select>
|
||||||
|
<?php } else { ?>
|
||||||
$ckeditorConfig = array("toolbar" => array(array("tokens","-","Source"),
|
<a class="btn btn-lime" href="<?php echo LIME_URL ;?>admin/admin.php?action=newsurvey"><i class="fa fa-lemon-o text-danger"></i> <?php echo T_("Create an instrument in Limesurvey") ;?></a> <?php } ?>
|
||||||
array("Cut","Copy","Paste","PasteText","PasteFromWord","-","Print","SpellChecker"),
|
</div>
|
||||||
array("Undo","Redo","-","Find","Replace","-","SelectAll","RemoveFormat"),
|
<div class='col-sm-4'>
|
||||||
"/",
|
<strong><?php echo T_("or") ;?> </strong>
|
||||||
array("Bold","Italic","Underline","Strike","-","Subscript","Superscript"),
|
<a class="btn btn-lime" href="<?php echo LIME_URL ;?>admin/admin.php?action=newsurvey"><i class="fa fa-lemon-o text-danger"></i> <?php echo T_("Create an instrument in Limesurvey") ;?></a>
|
||||||
array("NumberedList","BulletedList","-","Outdent","Indent","Blockquote"),
|
</div>
|
||||||
array('JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'),
|
</div>
|
||||||
array('BidiLtr', 'BidiRtl'),
|
|
||||||
array('Link','Unlink','Anchor'),
|
<div class="form-group">
|
||||||
array('Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'),
|
<label class="col-sm-4 control-label" ><?php echo T_("Respondent selection type:"); ?> </label>
|
||||||
"/",
|
<div class="col-sm-4">
|
||||||
array('Styles','Format','Font','FontSize'),
|
<select class="form-control" name="selectrs" id="selectrs" onchange="if(this.value == 'old') show(this,'rstext'); else hide(this,'rstext')">
|
||||||
array('TextColor','BGColor'),
|
<option value="none"><?php echo T_("No respondent selection (go straight to questionnaire)"); ?></option>
|
||||||
array('About')),
|
<option value="old" ><?php echo T_("Use basic respondent selection text (below)"); ?></option>
|
||||||
"extraPlugins" => "tokens");
|
<?php
|
||||||
|
$sql = "SELECT s.sid as sid, sl.surveyls_title AS title
|
||||||
|
FROM " . LIME_PREFIX . "surveys AS s
|
||||||
?></select></p>
|
LEFT JOIN " . LIME_PREFIX . "surveys_languagesettings AS sl ON ( s.sid = sl.surveyls_survey_id)
|
||||||
<p><?php echo T_("Restrict appointments to shifts?"); ?> <input name="ras" type="checkbox" checked="checked"/></p>
|
WHERE s.active = 'Y'";
|
||||||
<p><?php echo T_("Restrict work to shifts?"); ?> <input name="rws" type="checkbox" checked="checked"/></p>
|
$surveys = $db->GetAll($sql);
|
||||||
<p><?php echo T_("Questionnaire for testing only?"); ?> <input name="testing" type="checkbox"/></p>
|
|
||||||
<p><?php echo T_("Allow operators to generate referrals?"); ?> <input name="referral" type="checkbox"/></p>
|
if (!empty($surveys)){ foreach($surveys as $s){ ?>
|
||||||
<p><?php echo T_("Allow for respondent self completion via email invitation?"); ?> <input name="respsc" type="checkbox" onchange="if(this.checked==true) show(this,'limesc'); else hide(this,'limesc');" /></p>
|
<option value="<?php echo $s['sid'];?>"><?php echo T_("Existing instrument:") ," ", $s['title'] ;?></option>
|
||||||
<div id='limesc' style='display:none;'>
|
<?php } } ?>
|
||||||
<p><?php echo T_("Questionnaire display mode for respondent");?>: <select name="lime_mode"><option value="survey"><?php echo T_("All in one"); ?></option><option value="question"><?php echo T_("Question by question"); ?></option><option value="group"><?php echo T_("Group at a time"); ?></option></select></p>
|
</select>
|
||||||
<p><?php echo T_("Limesurvey template for respondent");?>: <select name="lime_template">
|
</div>
|
||||||
<?php
|
</div>
|
||||||
if ($handle = opendir(dirname(__FILE__)."/../include/limesurvey/templates")) {
|
|
||||||
while (false !== ($entry = readdir($handle))) {
|
<div class="form-group">
|
||||||
if ($entry != "." && $entry != ".." && is_dir(dirname(__FILE__)."/../include/limesurvey/templates/" . $entry)){
|
<label class="col-sm-4 control-label" ><?php echo T_("Restrict appointments to shifts?"); ?></label>
|
||||||
echo "<option value=\"$entry\">$entry</option>";
|
<div class="col-sm-4" style="height: 30px;">
|
||||||
}
|
<input name="ras" type="checkbox" checked="checked" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" data-width="80" />
|
||||||
}
|
</div>
|
||||||
closedir($handle);
|
</div>
|
||||||
}
|
|
||||||
?>
|
<div class="form-group">
|
||||||
</select></p>
|
<label class="col-sm-4 control-label" ><?php echo T_("Restrict work to shifts?"); ?></label>
|
||||||
<p><?php echo T_("URL to forward respondents on self completion (required)");?>: <input name="lime_endurl" type="text" value="http://www.acspri.org.au/"/></p>
|
<div class="col-sm-4"style="height: 30px;">
|
||||||
</div>
|
<input name="rws" type="checkbox" checked="checked" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" data-width="80"/>
|
||||||
<div id='rstext' style='display:none;'>
|
</div>
|
||||||
<p><?php echo T_("Respondent selection introduction:"); echo $CKEditor->editor("rs_intro","",$ckeditorConfig);?></p>
|
</div>
|
||||||
<p><?php echo T_("Respondent selection project introduction:"); echo $CKEditor->editor("rs_project_intro","",$ckeditorConfig);?></p>
|
|
||||||
<p><?php echo T_("Respondent selection callback (already started questionnaire):"); echo $CKEditor->editor("rs_callback","",$ckeditorConfig);?> </p>
|
<div class="form-group">
|
||||||
<p><?php echo T_("Message to leave on an answering machine:"); echo $CKEditor->editor("rs_answeringmachine","",$ckeditorConfig);?> </p>
|
<label class="col-sm-4 control-label" ><?php echo T_("Questionnaire for testing only?"); ?></label>
|
||||||
</div>
|
<div class="col-sm-4"style="height: 30px;">
|
||||||
<p><?php echo T_("Project end text (thank you screen):");echo $CKEditor->editor("rs_project_end","",$ckeditorConfig); ?></p>
|
<input name="testing" type="checkbox" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" data-onstyle="danger" data-width="80" />
|
||||||
<p><?php echo T_("Project information for interviewers/operators:");echo $CKEditor->editor("info","",$ckeditorConfig);?></p>
|
</div>
|
||||||
<p><input type="submit" name="import_file" value="<?php echo T_("Create Questionnaire"); ?>"/></p>
|
</div>
|
||||||
</form>
|
|
||||||
<?php
|
<div class="form-group">
|
||||||
xhtml_foot();
|
<label class="col-sm-4 control-label" ><?php echo T_("Allow operators to generate referrals?"); ?></label>
|
||||||
|
<div class="col-sm-4"style="height: 30px;">
|
||||||
|
<input name="referral" type="checkbox" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" data-width="80"/>
|
||||||
|
</div>
|
||||||
?>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-4 control-label" ><?php echo T_("Allow for respondent self completion via email invitation?"); ?> </label>
|
||||||
|
<div class="col-sm-4"style="height: 30px;">
|
||||||
|
<input name="respsc" type="checkbox" onchange="if(this.checked==true) show(this,'limesc'); else hide(this,'limesc');" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" data-width="80"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="limesc" style="display:none" >
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-4 control-label" ><?php echo T_("Questionnaire display mode for respondent");?>: </label>
|
||||||
|
<div class="col-sm-4">
|
||||||
|
<select class="form-control" name="lime_mode">
|
||||||
|
<option value="survey"><?php echo T_("All in one"); ?></option>
|
||||||
|
<option value="question"><?php echo T_("Question by question"); ?></option>
|
||||||
|
<option value="group"><?php echo T_("Group at a time"); ?></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-4 control-label" ><?php echo T_("Limesurvey template for respondent");?>: </label>
|
||||||
|
<div class="col-sm-4">
|
||||||
|
<select class="form-control" name="lime_template">
|
||||||
|
<?php
|
||||||
|
if ($handle = opendir(dirname(__FILE__)."/../include/limesurvey/templates")) {
|
||||||
|
while (false !== ($entry = readdir($handle))) {
|
||||||
|
if ($entry != "." && $entry != ".." && is_dir(dirname(__FILE__)."/../include/limesurvey/templates/" . $entry)){
|
||||||
|
echo "<option value=\"$entry\">$entry</option>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closedir($handle);
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-4 control-label text-danger" ><?php echo T_("URL to forward respondents on self completion (required)");?>: </label>
|
||||||
|
<div class="col-sm-4">
|
||||||
|
<input class="form-control" name="lime_endurl" type="url" value="<?php print SITE_URL ;?>" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<?php
|
||||||
|
/* CKEditor */
|
||||||
|
|
||||||
|
include("../include/ckeditor/ckeditor.php");
|
||||||
|
|
||||||
|
$CKEditor = new CKEditor();
|
||||||
|
$CKEditor->basePath = "../include/ckeditor/";
|
||||||
|
|
||||||
|
$ckeditorConfig = array("toolbar" => array(array("tokens","-","Source"),
|
||||||
|
array("Cut","Copy","Paste","PasteText","PasteFromWord","-","Print","SpellChecker"),
|
||||||
|
array("Undo","Redo","-","Find","Replace","-","SelectAll","RemoveFormat"),
|
||||||
|
array('Link','Unlink','Anchor'),
|
||||||
|
array('Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'),
|
||||||
|
array('About'),
|
||||||
|
"/",
|
||||||
|
array("Bold","Italic","Underline","Strike","-","Subscript","Superscript"),
|
||||||
|
array("NumberedList","BulletedList","-","Outdent","Indent","Blockquote"),
|
||||||
|
array('JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'),
|
||||||
|
array('BidiLtr', 'BidiRtl'),
|
||||||
|
array('Styles','Format','Font','FontSize'),
|
||||||
|
array('TextColor','BGColor')),
|
||||||
|
"extraPlugins" => "tokens");
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="rstext" class=" " style="display:none ">
|
||||||
|
|
||||||
|
<div class="panel panel-default" >
|
||||||
|
<div class="panel-heading">
|
||||||
|
<i class="fa fa-fw fa-2x wminimize fa-chevron-circle-up text-primary pull-left" data-toggle="tooltip" title="<?php echo T_("Expand/Collapse");?>" style="margin-top: -5px;"></i>
|
||||||
|
<h3 class="panel-title text-primary "><?php echo T_("Respondent selection introduction:");?></h3>
|
||||||
|
</div>
|
||||||
|
<div class="content">
|
||||||
|
<?php echo $CKEditor->editor("rs_intro","",$ckeditorConfig);?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="panel panel-default" >
|
||||||
|
<div class="panel-heading">
|
||||||
|
<i class="fa fa-fw fa-2x wminimize fa-chevron-circle-up text-primary pull-left" data-toggle="tooltip" title="<?php echo T_("Expand/Collapse");?>" style="margin-top: -5px;"></i>
|
||||||
|
<h3 class="panel-title text-primary "><?php echo T_("Respondent selection project introduction:");?></h3>
|
||||||
|
</div>
|
||||||
|
<div class="content">
|
||||||
|
<?php echo $CKEditor->editor("rs_project_intro","",$ckeditorConfig);?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<i class="fa fa-fw fa-2x wminimize fa-chevron-circle-up text-primary pull-left" data-toggle="tooltip" title="<?php echo T_("Expand/Collapse");?>" style="margin-top: -5px;"></i>
|
||||||
|
<h3 class="panel-title text-primary"><?php echo T_("Respondent selection callback (already started questionnaire):");?></h3>
|
||||||
|
</div>
|
||||||
|
<div class="content">
|
||||||
|
<?php echo $CKEditor->editor("rs_callback","",$ckeditorConfig);?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<i class="fa fa-fw fa-2x wminimize fa-chevron-circle-up text-primary pull-left" data-toggle="tooltip" title="<?php echo T_("Expand/Collapse");?>" style="margin-top: -5px;"></i>
|
||||||
|
<h3 class="panel-title "><?php echo T_("Message to leave on an answering machine:");?></h3>
|
||||||
|
</div>
|
||||||
|
<div class="content">
|
||||||
|
<?php echo $CKEditor->editor("rs_answeringmachine","",$ckeditorConfig);?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<i class="fa fa-fw fa-2x wminimize fa-chevron-circle-up text-primary pull-left" data-toggle="tooltip" title="<?php echo T_("Expand/Collapse");?>" style="margin-top: -5px;"></i>
|
||||||
|
<h3 class="panel-title "><?php echo T_("Project end text (thank you screen):");?></h3>
|
||||||
|
</div>
|
||||||
|
<div class="content" >
|
||||||
|
<?php echo $CKEditor->editor("rs_project_end","",$ckeditorConfig); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="panel panel-default ">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<i class="fa fa-fw fa-2x wminimize fa-chevron-circle-up text-primary pull-left" data-toggle="tooltip" title="<?php echo T_("Expand/Collapse");?>" style="margin-top: -5px;"></i>
|
||||||
|
<h3 class="panel-title"><?php echo T_("Project information for interviewers/operators:");?></h3>
|
||||||
|
</div>
|
||||||
|
<div class="content">
|
||||||
|
<?php echo $CKEditor->editor("info","",$ckeditorConfig);?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row form-group">
|
||||||
|
<div class="col-sm-4 ">
|
||||||
|
<a href="questionnairelist.php" class="btn btn-default pull-right" ><i class="fa fa-list text-primary"></i> <?php echo T_("Go to");?> <?php echo T_("Questionnaire management");?></a>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-4 ">
|
||||||
|
<button type="submit" class="btn btn-default pull-right" name="import_file" ><i class="fa fa-check-square-o fa-lg text-primary"></i> <?php echo T_("Create Questionnaire"); ?></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
xhtml_foot($js_foot);//
|
||||||
|
?>
|
||||||
@@ -339,29 +339,29 @@ if (isset($_GET['modify']))
|
|||||||
<div class="col-sm-2"><?php echo "<a class='btn btn-default btn-lime pull-right' href='" . LIME_URL . "admin/admin.php?sid={$rs['lime_sid']}'><i class='fa fa-edit' style='color:blue;'></i> " . T_("Edit instrument in Limesurvey") . " </a>"; ?> </div>
|
<div class="col-sm-2"><?php echo "<a class='btn btn-default btn-lime pull-right' href='" . LIME_URL . "admin/admin.php?sid={$rs['lime_sid']}'><i class='fa fa-edit' style='color:blue;'></i> " . T_("Edit instrument in Limesurvey") . " </a>"; ?> </div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form action="?modify=<?php echo $questionnaire_id; ?>" method="post" class="form-horizontal col-sm-12">
|
<form action="?modify=<?php echo $questionnaire_id; ?>" method="post" class="form-horizontal col-sm-12 form-group ">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-4 control-label" ><?php echo T_("Edit")," ", T_("Name for questionnaire:"); ?> </label>
|
<label class="col-sm-4 control-label" ><?php echo T_("Edit")," ", T_("Name for questionnaire:"); ?> </label>
|
||||||
<div class="col-sm-4"><input type="text" name="description" class="form-control" value="<?php echo $rs['description']; ?>" label="<?php echo T_("Name for questionnaire:") ; ?> "/></div>
|
<div class="col-sm-4"><input type="text" name="description" class="form-control" required value="<?php echo $rs['description']; ?>" label="<?php echo T_("Name for questionnaire:") ; ?> "/></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-4 control-label" ><?php echo T_("Restrict appointments to shifts?"); ?> </label>
|
<label class="col-sm-4 control-label" ><?php echo T_("Restrict appointments to shifts?"); ?> </label>
|
||||||
<div class="col-sm-4" style="height: 30px;"><input name="ras" type="checkbox" <?php echo $ras; ?> data-toggle="toggle" data-on="<?php echo T_("YES"); ?>" data-off="<?php echo T_("NO"); ?>"/> </div>
|
<div class="col-sm-4" style="height: 30px;"><input name="ras" type="checkbox" <?php echo $ras; ?> data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" data-width="80"/> </div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group"><label class="col-sm-4 control-label" ><?php echo T_("Restrict work to shifts?"); ?> </label>
|
<div class="form-group"><label class="col-sm-4 control-label" ><?php echo T_("Restrict work to shifts?"); ?> </label>
|
||||||
<div class="col-sm-4" style="height: 30px;" ><input name="rws" type="checkbox" <?php echo $rws; ?> data-toggle="toggle" data-on="<?php echo T_("YES"); ?>" data-off="<?php echo T_("NO"); ?>"/></div>
|
<div class="col-sm-4" style="height: 30px;" ><input name="rws" type="checkbox" <?php echo $rws; ?> data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" data-width="80"/></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-4 control-label" ><?php echo T_("Questionnaire for testing only?"); ?> </label>
|
<label class="col-sm-4 control-label" ><?php echo T_("Questionnaire for testing only?"); ?> </label>
|
||||||
<div class="col-sm-4" style="height: 30px;" ><input name="testing" type="checkbox" disabled="true" data-toggle="toggle" data-on="<?php echo T_("YES"); ?>" data-off="<?php echo T_("NO"); ?>" <?php echo $testing; ?> data-onstyle="danger" /></div>
|
<div class="col-sm-4" style="height: 30px;" ><input name="testing" type="checkbox" disabled="true" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" <?php echo $testing; ?> data-onstyle="danger" data-width="80"/></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-4 control-label" ><?php echo T_("Allow operators to generate referrals?"); ?></label>
|
<label class="col-sm-4 control-label" ><?php echo T_("Allow operators to generate referrals?"); ?></label>
|
||||||
<div class="col-sm-4" style="height: 30px;"> <input name="referral" type="checkbox" <?php echo $referral; ?> data-toggle="toggle" data-on="<?php echo T_("YES"); ?>" data-off="<?php echo T_("NO"); ?>"/></div>
|
<div class="col-sm-4" style="height: 30px;"> <input name="referral" type="checkbox" <?php echo $referral; ?> data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" data-width="80"/></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-4 control-label" ><?php echo T_("Allow for respondent self completion via email invitation?"); ?> </label>
|
<label class="col-sm-4 control-label" ><?php echo T_("Allow for respondent self completion via email invitation?"); ?> </label>
|
||||||
<div class="col-sm-4" style="height: 30px;"><input name="respsc" id="respsc" type="checkbox" <?php echo $rsc ?> onchange="if(this.checked==true) show(this,'limesc'); else hide(this,'limesc');" data-toggle="toggle" data-on="<?php echo T_("YES"); ?>" data-off="<?php echo T_("NO"); ?>"/></div>
|
<div class="col-sm-4" style="height: 30px;"><input name="respsc" id="respsc" type="checkbox" <?php echo $rsc ?> onchange="if(this.checked==true) show(this,'limesc'); else hide(this,'limesc');" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" data-width="80"/></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="limesc" <?php echo $rscd; ?> >
|
<div id="limesc" <?php echo $rscd; ?> >
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -396,23 +396,82 @@ if (isset($_GET['modify']))
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-4 control-label text-danger" ><?php echo T_("URL to forward respondents on self completion (required)");?>: </label>
|
<label class="col-sm-4 control-label text-danger" ><?php echo T_("URL to forward respondents on self completion (required)");?>: </label>
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
<input class="form-control" name="lime_endurl" type="text" value="<?php echo $rs['lime_endurl']; ?>"/>
|
<input class="form-control" name="lime_endurl" type="url" required placeholder="<?php print SITE_URL ;?>" value="<?php echo $rs['lime_endurl']; ?>"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
if ($rs['respondent_selection'] == 1 && empty($rs['lime_rs_sid'])) {
|
if ($rs['respondent_selection'] == 1 && empty($rs['lime_rs_sid'])) { ?>
|
||||||
echo "<p><h4 style='text-align:center;' >" . T_("Respondent selection introduction:") . "</h4>"; echo $CKEditor->editor("rs_intro",$rs['rs_intro'],$ckeditorConfig);
|
|
||||||
echo "</p><p><h4 style='text-align:center;' >" . T_("Respondent selection project introduction:") . "</h4>"; echo $CKEditor->editor("rs_project_intro",$rs['rs_project_intro'],$ckeditorConfig);
|
<div class="panel panel-default" >
|
||||||
echo "</p><p><h4 style='text-align:center;' >" . T_("Respondent selection callback (already started questionnaire):") . "</h4>"; echo $CKEditor->editor("rs_callback",$rs['rs_callback'],$ckeditorConfig);
|
<div class="panel-heading">
|
||||||
echo "</p><p><h4 style='text-align:center;' >" . T_("Message to leave on an answering machine:") . "</h4>"; echo $CKEditor->editor("rs_answeringmachine",$rs['rs_answeringmachine'],$ckeditorConfig);
|
<i class="fa fa-fw fa-2x wminimize fa-chevron-circle-up text-primary pull-left" data-toggle="tooltip" title="<?php echo T_("Expand/Collapse");?>" style="margin-top: -5px;"></i>
|
||||||
echo "</p>"; }
|
<h3 class="panel-title text-primary "><?php echo T_("Respondent selection introduction:");?></h3>
|
||||||
else if (!empty($rs['lime_rs_sid'])) { echo "<p><a href='" . LIME_URL . "admin/admin.php?sid={$rs['lime_rs_sid']}'>" . T_("Edit respondent selection instrument in Limesurvey") . "</a></p>"; }
|
</div>
|
||||||
echo "<p><h4 style='text-align:center;' >" . T_("Project end text (thank you screen):") . "</h4>"; echo $CKEditor->editor("rs_project_end",$rs['rs_project_end'],$ckeditorConfig);
|
<div class="content">
|
||||||
echo "</p><p><h4 style='text-align:center;' >" . T_("Project information for interviewers/operators:") . "</h4>"; echo $CKEditor->editor("info",$rs['info'],$ckeditorConfig);
|
<?php echo $CKEditor->editor("rs_intro",$rs['rs_intro'],$ckeditorConfig);?>
|
||||||
echo "</p>";
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="panel panel-default" >
|
||||||
|
<div class="panel-heading">
|
||||||
|
<i class="fa fa-fw fa-2x wminimize fa-chevron-circle-up text-primary pull-left" data-toggle="tooltip" title="<?php echo T_("Expand/Collapse");?>" style="margin-top: -5px;"></i>
|
||||||
|
<h3 class="panel-title text-primary "><?php echo T_("Respondent selection project introduction:");?></h3>
|
||||||
|
</div>
|
||||||
|
<div class="content">
|
||||||
|
<?php echo $CKEditor->editor("rs_project_intro",$rs['rs_project_intro'],$ckeditorConfig);?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<i class="fa fa-fw fa-2x wminimize fa-chevron-circle-up text-primary pull-left" data-toggle="tooltip" title="<?php echo T_("Expand/Collapse");?>" style="margin-top: -5px;"></i>
|
||||||
|
<h3 class="panel-title text-primary"><?php echo T_("Respondent selection callback (already started questionnaire):");?></h3>
|
||||||
|
</div>
|
||||||
|
<div class="content">
|
||||||
|
<?php echo $CKEditor->editor("rs_callback",$rs['rs_callback'],$ckeditorConfig);?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<i class="fa fa-fw fa-2x wminimize fa-chevron-circle-up text-primary pull-left" data-toggle="tooltip" title="<?php echo T_("Expand/Collapse");?>" style="margin-top: -5px;"></i>
|
||||||
|
<h3 class="panel-title "><?php echo T_("Message to leave on an answering machine:");?></h3>
|
||||||
|
</div>
|
||||||
|
<div class="content">
|
||||||
|
<?php echo $CKEditor->editor("rs_answeringmachine",$rs['rs_answeringmachine'],$ckeditorConfig);?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
else if (!empty($rs['lime_rs_sid'])) {
|
||||||
|
echo "<div class='well text-center'><a href='" . LIME_URL . "admin/admin.php?sid={$rs['lime_rs_sid']}'>" . T_("Edit respondent selection instrument in Limesurvey") . "</a></div>"; }
|
||||||
?>
|
?>
|
||||||
<p><a href="questionnairelist.php" class="btn btn-default"><i class="fa fa-chevron-left fa-lg" style="color:blue;"></i> <?php echo T_("Go back") ; ?></a><input type="submit" class="btn btn-primary col-sm-offset-4" name="update" value="<?php echo T_("Update Questionnaire"); ?>"/></p>
|
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<i class="fa fa-fw fa-2x wminimize fa-chevron-circle-up text-primary pull-left" data-toggle="tooltip" title="<?php echo T_("Expand/Collapse");?>" style="margin-top: -5px;"></i>
|
||||||
|
<h3 class="panel-title "><?php echo T_("Project end text (thank you screen):");?></h3>
|
||||||
|
</div>
|
||||||
|
<div class="content" >
|
||||||
|
<?php echo $CKEditor->editor("rs_project_end",$rs['rs_project_end'],$ckeditorConfig);?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="panel panel-default ">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<i class="fa fa-fw fa-2x wminimize fa-chevron-circle-up text-primary pull-left" data-toggle="tooltip" title="<?php echo T_("Expand/Collapse");?>" style="margin-top: -5px;"></i>
|
||||||
|
<h3 class="panel-title"><?php echo T_("Project information for interviewers/operators:");?></h3>
|
||||||
|
</div>
|
||||||
|
<div class="content">
|
||||||
|
<?php echo $CKEditor->editor("info",$rs['info'],$ckeditorConfig);?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<a href="questionnairelist.php" class="btn btn-default"><i class="fa fa-chevron-left fa-lg" style="color:blue;"></i> <?php echo T_("Go back") ; ?></a>
|
||||||
|
<input type="submit" class="btn btn-primary col-sm-offset-4" name="update" value="<?php echo T_("Update Questionnaire"); ?>"/>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|||||||
14
js/custom.js
14
js/custom.js
@@ -1,7 +1,7 @@
|
|||||||
/* Widget minimize */
|
/* Widget minimize */
|
||||||
$('.wminimize').click(function(e){
|
$('.wminimize').click(function(e){
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var $wcontent = $(this).parent().parent().next('.content');
|
var $wcontent = $(this).parent().next('.content');
|
||||||
if($wcontent.is(':visible'))
|
if($wcontent.is(':visible'))
|
||||||
{
|
{
|
||||||
$(this).removeClass('fa-chevron-circle-up text-primary').addClass('fa-chevron-circle-down text-danger');
|
$(this).removeClass('fa-chevron-circle-up text-primary').addClass('fa-chevron-circle-down text-danger');
|
||||||
@@ -35,7 +35,7 @@ $('body,html').animate({scrollTop: 0}, 500);
|
|||||||
/* panel close
|
/* panel close
|
||||||
$('.pclose').click(function(e){
|
$('.pclose').click(function(e){
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var $pbox = $(this).parent().parent().parent();
|
var $pbox = $(this).parent().parent();
|
||||||
$pbox.hide(100);
|
$pbox.hide(100);
|
||||||
});*/
|
});*/
|
||||||
|
|
||||||
@@ -54,12 +54,4 @@ pickDate: false
|
|||||||
/* Modal fix
|
/* Modal fix
|
||||||
$('.modal').appendTo($('body'));*/
|
$('.modal').appendTo($('body'));*/
|
||||||
|
|
||||||
/*Bootstrap Data table, tooltip and bs switch init */
|
$('[data-toggle="tooltip"]').tooltip();
|
||||||
|
|
||||||
$('[data-toggle="tooltip"]').tooltip();
|
|
||||||
/*
|
|
||||||
$('[switch="yes"]').bootstrapSwitch();
|
|
||||||
|
|
||||||
$('#bs-table').bdt();*/
|
|
||||||
|
|
||||||
//alert ("custom js OK"); //test js
|
|
||||||
Reference in New Issue
Block a user