Skip to content

Commit

Permalink
Ver7.0Prod_update
Browse files Browse the repository at this point in the history
  • Loading branch information
openSISAdmin committed Sep 27, 2018
1 parent 2b37afe commit 28717bc
Show file tree
Hide file tree
Showing 39 changed files with 563 additions and 288 deletions.
3 changes: 3 additions & 0 deletions CalendarModal.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,13 @@
// if (AllowEdit())
if (User('PROFILE') == 'admin')
{
if($_REQUEST['event_id']!='new')
{
if($RET[1]['CALENDAR_ID']==0)
$RET[1]['CALENDAR_ID']=1;
else
$RET[1]['CALENDAR_ID']=0;
}
echo '<div class="form-group">' . CheckboxInputSwitchModal($RET[1]['CALENDAR_ID'], 'new', 'Show Events System Wide', '', false, 'Yes', 'No', '', 'switch-success') . '</div>';
}
//else
Expand Down
2 changes: 1 addition & 1 deletion ChooseCP.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

if ($_REQUEST['table_name'] != '' && $_REQUEST['table_name'] == 'courses') {

$sql = "SELECT COURSE_ID,c.TITLE, CONCAT_WS(' - ',c.title,sg.title) AS GRADE_COURSE FROM courses c LEFT JOIN school_gradelevels sg ON c.grade_level=sg.id WHERE SUBJECT_ID='$_REQUEST[id]' ORDER BY c.TITLE";
$sql = "SELECT COURSE_ID,c.TITLE, CONCAT_WS(' - ',c.short_name,c.title) AS GRADE_COURSE FROM courses c LEFT JOIN school_gradelevels sg ON c.grade_level=sg.id WHERE SUBJECT_ID='$_REQUEST[id]' ORDER BY c.TITLE";
$QI = DBQuery($sql);
$courses_RET = DBGet($QI);
$html = 'course_modal_cp||';
Expand Down
2 changes: 1 addition & 1 deletion ChooseCPModal.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
if( $_REQUEST['table_name']!='' && $_REQUEST['table_name']=='courses')
{

$sql="SELECT COURSE_ID,c.TITLE, CONCAT_WS(' - ',c.title,sg.title) AS GRADE_COURSE FROM courses c LEFT JOIN school_gradelevels sg ON c.grade_level=sg.id WHERE SUBJECT_ID='$_REQUEST[id]' ORDER BY c.TITLE";
$sql="SELECT COURSE_ID,c.TITLE, CONCAT_WS(' - ',c.short_name,c.title) AS GRADE_COURSE FROM courses c LEFT JOIN school_gradelevels sg ON c.grade_level=sg.id WHERE SUBJECT_ID='$_REQUEST[id]' ORDER BY c.TITLE";
$QI = DBQuery($sql);
$courses_RET = DBGet($QI);
$html='course_modal||';
Expand Down
2 changes: 1 addition & 1 deletion ChooseCpSearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

if ($_REQUEST['table_name'] != '' && $_REQUEST['table_name'] == 'courses') {

$sql = "SELECT COURSE_ID,c.TITLE, CONCAT_WS(' - ',c.title,sg.title) AS GRADE_COURSE FROM courses c LEFT JOIN school_gradelevels sg ON c.grade_level=sg.id WHERE SUBJECT_ID='$_REQUEST[id]' ORDER BY c.TITLE";
$sql = "SELECT COURSE_ID,c.TITLE, CONCAT_WS(' - ',c.short_name,c.title) AS GRADE_COURSE FROM courses c LEFT JOIN school_gradelevels sg ON c.grade_level=sg.id WHERE SUBJECT_ID='$_REQUEST[id]' ORDER BY c.TITLE";
$QI = DBQuery($sql);
$courses_RET = DBGet($QI);
$html = 'course_modal||';
Expand Down
2 changes: 1 addition & 1 deletion ChooseRequestSearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

if ($_REQUEST['table_name'] != '' && $_REQUEST['table_name'] == 'courses') {

$sql = "SELECT COURSE_ID,c.TITLE, CONCAT_WS(' - ',c.title,sg.title) AS GRADE_COURSE FROM courses c LEFT JOIN school_gradelevels sg ON c.grade_level=sg.id WHERE SUBJECT_ID='$_REQUEST[id]' ORDER BY c.TITLE";
$sql = "SELECT COURSE_ID,c.TITLE, CONCAT_WS(' - ',c.short_name,c.title) AS GRADE_COURSE FROM courses c LEFT JOIN school_gradelevels sg ON c.grade_level=sg.id WHERE SUBJECT_ID='$_REQUEST[id]' ORDER BY c.TITLE";
$QI = DBQuery($sql);
$courses_RET = DBGet($QI);
$html = 'course_modal_request||';
Expand Down
2 changes: 1 addition & 1 deletion MassDropModal.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

if ($_REQUEST['table_name'] != '' && $_REQUEST['table_name'] == 'courses') {

$sql = "SELECT COURSE_ID,c.TITLE, CONCAT_WS(' - ',c.title,sg.title) AS GRADE_COURSE FROM courses c LEFT JOIN school_gradelevels sg ON c.grade_level=sg.id WHERE SUBJECT_ID='$_REQUEST[id]' ORDER BY c.TITLE";
$sql = "SELECT COURSE_ID,c.TITLE, CONCAT_WS(' - ',c.short_name,c.title) AS GRADE_COURSE FROM courses c LEFT JOIN school_gradelevels sg ON c.grade_level=sg.id WHERE SUBJECT_ID='$_REQUEST[id]' ORDER BY c.TITLE";
$QI = DBQuery($sql);
$courses_RET = DBGet($QI);
$html = 'course_modal||';
Expand Down
4 changes: 2 additions & 2 deletions MassScheduleModal.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

if ($_REQUEST['table_name'] != '' && $_REQUEST['table_name'] == 'courses') {

$sql = "SELECT COURSE_ID,c.TITLE, CONCAT_WS(' - ',c.title,sg.title) AS GRADE_COURSE FROM courses c LEFT JOIN school_gradelevels sg ON c.grade_level=sg.id WHERE SUBJECT_ID='$_REQUEST[id]' ORDER BY c.TITLE";
$sql = "SELECT COURSE_ID,c.TITLE, CONCAT_WS(' - ',c.short_name,c.title) AS GRADE_COURSE FROM courses c LEFT JOIN school_gradelevels sg ON c.grade_level=sg.id WHERE SUBJECT_ID='$_REQUEST[id]' ORDER BY c.TITLE";
$QI = DBQuery($sql);
$courses_RET = DBGet($QI);
$html = 'course_modal||';
Expand All @@ -65,7 +65,7 @@
$html.='<tbody>';
foreach ($courses_RET as $val) {

$html.= '<tr><td><a href=javascript:void(0); onclick="MassScheduleModal(' . $val['COURSE_ID'] . ',\'course_periods\')">' . $val['TITLE'] . '</a></td></tr>';
$html.= '<tr><td><a href=javascript:void(0); onclick="MassScheduleModal(' . $val['COURSE_ID'] . ',\'course_periods\')">' . $val['GRADE_COURSE'] . '</a></td></tr>';
}
$html.='</tbody>';
$html.='</table>';
Expand Down
17 changes: 12 additions & 5 deletions assets/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ div.form-control {
word-wrap: break-word;
}
.clockpicker input.form-control {
min-width: 90px;
min-width: 60px;
}
/* Bootstrap Overwrite End */

Expand All @@ -55,14 +55,13 @@ div.form-control {

#loading-image {
position: fixed;
top: 54px;
right: 0;
top: 48%;
right: 42%;
z-index: 999;
color: #fff;
background: #d81c37;
padding: 8px 15px 9px 11px;
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
border-radius: 4px;
box-shadow: 0 0 10px rgba(0,0,0,0.6);
}
.version-info {
Expand Down Expand Up @@ -165,6 +164,14 @@ ul[id*="select2-period-"] {
width: 100%;
}

.image-holder {
background: #eee;
border: 4px solid #fff;
border-radius: 3px;
box-shadow: 0 0 5px rgba(0,0,0,0.2);
padding: 10px;
}


.video-container iframe {
position: absolute;
Expand Down
Binary file added assets/images/error-icon-animated.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/info-icon-animated.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 7 additions & 4 deletions assets/js/core/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,17 @@ $(function () {
$('body').addClass('no-transitions');

$('.navigation-main li a').click(function () {
$('.navigation-main li.active').removeClass('active');
$(this).closest('li').addClass('active');
var that = $(this);
that.closest('ul').children('li').each(function(){
$(this).removeClass('active');
});
that.parents('li').addClass('active');
});

if ($('.current-submenu').length > 0) {
/*if ($('.current-submenu').length > 0) {
$('.current-submenu').closest('li').addClass('active');
$('.current-submenu').closest('ul').show();
}
}*/


if ($(".switch-fake-title").length > 0) {
Expand Down
39 changes: 36 additions & 3 deletions assets/js/pages/picker_date.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,51 @@ $(function () {
$(this).children('.daterange-single').trigger('focus');
});

$('.datepicker-group-month').click(function(){
$(this).children('.daterange-single').trigger('focus');
});

$('.fake_datepicker').click(function(){
$(this).next('.input-group').children('.daterange-single').trigger('focus');
});
$('.daterange-single').datepicker({
$('.datepicker-group .daterange-single').datepicker({
selectYears: true,
selectMonths: true,
autoclose: true,
//format: 'dd-M-yyyy',
format: 'yyyy-mm-dd'
});

$('.datepicker-group-month .daterange-single').datepicker({
selectYears: true,
selectMonths: true,
autoclose: true,
format: "mm/yyyy",
minViewMode: 1,
maxViewMode: 2
})
.change(function(){

var calid2 = $(this).attr('id');
var selectedDate2 = $(this).val();
var newDate2 = selectedDate2.split("/");
$('#monthSelect_' + calid2).val(newDate2[0]);
$('#yearSelect_' + calid2).val(newDate2[1]);
//$(this).closest('form').submit();
});
/*.on('changeDate', function(){
var calid = $(this).attr('id');
var selectedDate = $(this).val();
var newDate = selectedDate.split("/");
$('#monthSelect_' + calid).val(newDate[0]);
$('#yearSelect_' + calid).val(newDate[1]);
//$(this).closest('form').submit();
});*/

//datepickerMonthYear.changeDate

$('.daterange-single').change(function (e) {
$('.datepicker-group .daterange-single').change(function (e) {
$('input[type=submit], button[type=submit]').attr('disabled',true);
var calid = $(this).attr('id');
var selectedDate = $(this).val();
Expand Down Expand Up @@ -694,4 +727,4 @@ $(function () {
});
*/

});
});
86 changes: 43 additions & 43 deletions functions/InputsFnc.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,49 +60,49 @@ function DateInput2($value, $name, $selectid, $title = '', $div = true, $allow_n
function SearchDateInput($day, $month, $year, $allow_day, $allow_month, $allow_year) {
$dt = '';

$dt.= '<div class="input-group datepicker-group" id="original_date_'.$day.'" value="" style="">';
$dt.= '<div class="input-group datepicker-group" id="original_date_' . $day . '" value="" style="">';
$dt.= '<span class="input-group-addon"><i class="icon-calendar22"></i></span>';
$dt.= '<input id="date_'.$day.'" placeholder="Select Date" value="" class="form-control daterange-single" type="text">';
$dt.= '<input id="date_' . $day . '" placeholder="Select Date" value="" class="form-control daterange-single" type="text">';
$dt.= '</div>';

$dt.= '<input value="" id="monthSelect_date_' . $day . '" name="' . $day . '" type="hidden">';
$dt.= '<input value="" id="daySelect_date_' . $day . '" name="' . $month . '" type="hidden">';
$dt.= '<input value="" id="yearSelect_date_' . $day . '" name="' . $year . '" type="hidden">';

/*if ($allow_day == 'Y') {
$dt.='<div class="col-xs-3">';
$dt.='<select class="form-control" name="' . $day . '" id="' . $day . '">';
$dt.='<option value="">Day</option>';
for ($i = 1; $i <= 31; $i++) {
if ($i < 10)
$i = '0' . $i;
$dt.='<option value="' . $i . '">' . $i . '</option>';
}
$dt.='</select>';
$dt.='</div>';
}

if ($allow_month == 'Y') {
$dt.='<div class="col-xs-3">';
$dt.='<select class="form-control" name="' . $month . '" id="' . $month . '">';
$dt.='<option value="">Month</option><option value="01">January</option><option value="02">February</option><option value="03">March</option><option value="04">April</option><option value="05">May</option><option value="06">June</option><option value="07">July</option><option value="08">August</option><option value="09">September</option><option value="10">October</option><option value="11">November</option><option value="12">December</option>';
$dt.='</select>';
$dt.='</div>';
}
if ($allow_year == 'Y') {
$dt.='<div class="col-xs-3">';
$dt.='<select class="form-control" name="' . $year . '" id="' . $year . '">';
$dt.='<option value="">Year</option>';
for ($i = 1930; $i <= 2030; $i++) {
$dt.='<option value="' . $i . '">' . $i . '</option>';
}
$dt.='</select>';
$dt.='</div>';
}*/
/* if ($allow_day == 'Y') {
$dt.='<div class="col-xs-3">';
$dt.='<select class="form-control" name="' . $day . '" id="' . $day . '">';
$dt.='<option value="">Day</option>';
for ($i = 1; $i <= 31; $i++) {
if ($i < 10)
$i = '0' . $i;
$dt.='<option value="' . $i . '">' . $i . '</option>';
}
$dt.='</select>';
$dt.='</div>';
}
if ($allow_month == 'Y') {
$dt.='<div class="col-xs-3">';
$dt.='<select class="form-control" name="' . $month . '" id="' . $month . '">';
$dt.='<option value="">Month</option><option value="01">January</option><option value="02">February</option><option value="03">March</option><option value="04">April</option><option value="05">May</option><option value="06">June</option><option value="07">July</option><option value="08">August</option><option value="09">September</option><option value="10">October</option><option value="11">November</option><option value="12">December</option>';
$dt.='</select>';
$dt.='</div>';
}
if ($allow_year == 'Y') {
$dt.='<div class="col-xs-3">';
$dt.='<select class="form-control" name="' . $year . '" id="' . $year . '">';
$dt.='<option value="">Year</option>';
for ($i = 1930; $i <= 2030; $i++) {
$dt.='<option value="' . $i . '">' . $i . '</option>';
}
$dt.='</select>';
$dt.='</div>';
} */

return $dt;
}
Expand Down Expand Up @@ -157,7 +157,7 @@ function TextInput($value, $name, $title = '', $options = '', $div = true, $divO
return (($title != '') ? '<label for="' . $name . '" class="control-label text-right col-lg-4">' . str_replace('*', '<span class="text-danger">*</span>', $original_title) . '</label><div class="col-lg-8">' : '') . "<INPUT class=\"form-control\" type=text id=$name name=$name " . (($value || $value === '0') ? "value=\"$value\"" : '') . " $options>" . (($title != '') ? '</div>' : '');
else {

return (($title != '') ? '<label for="' . $name . '" class="control-label text-right col-lg-4">' . str_replace('*', '<span class="text-danger">*</span>', $original_title) . '</label><div class="col-lg-8">' : '') . "<DIV id='div$name'><div ".$divOptions." onclick='javascript:addHTML(\"<INPUT type=text class=form-control id=input$name name=$name " . (($value || $value === '0') ? "value=\\\"" . str_replace('"', '&rdquo;', $value) . "\\\"" : '') . " $options>\",\"div$name\",true); document.getElementById(\"input$name\").focus();' readonly=\"readonly\" class=\"form-control\">" . $value . '</div></DIV>' . (($title != '') ? '</div>' : '');
return (($title != '') ? '<label for="' . $name . '" class="control-label text-right col-lg-4">' . str_replace('*', '<span class="text-danger">*</span>', $original_title) . '</label><div class="col-lg-8">' : '') . "<DIV id='div$name'><div " . $divOptions . " onclick='javascript:addHTML(\"<INPUT type=text class=form-control id=input$name name=$name " . (($value || $value === '0') ? "value=\\\"" . str_replace('"', '&rdquo;', $value) . "\\\"" : '') . " $options>\",\"div$name\",true); document.getElementById(\"input$name\").focus();' readonly=\"readonly\" class=\"form-control\">" . $value . '</div></DIV>' . (($title != '') ? '</div>' : '');
}
} else {
$value = str_replace("'", '&#39;', str_replace('"', '&rdquo;', $value));
Expand All @@ -180,16 +180,16 @@ function TextInput_time($value, $name, $title = '', $options = '', $div = true,
if (strpos($options, 'size') === false && $value != '')
$options .= ' size=' . strlen($value);
elseif (strpos($options, 'size') === false)
$options .= ' size=10';
$options .= ' size=7';

if (strstr($value, '\\') != '')
$div = false;
if ((trim($value) == '' || $div == false))
// return (($title != '') ? '<label for="' . $name . '" class="control-label text-right col-lg-4">' . $title . '</label><div class="col-lg-8">' : '') . "<INPUT class=\"form-control\" type=text id=$name name=$name " . (($value || $value === '0') ? "value=\"$value\"" : '') . " $options>" . (($title != '') ? '</div>' : '');
return (($title != '') ? '<label for="' . $name . '" class="control-label text-right col-lg-4">' . str_replace('*', '<span class="text-danger">*</span>', $original_title) . '</label><div class="col-lg-8">' : '') . "<div class=\"input-group clockpicker\"><INPUT class=\"form-control\" type=text id=$name name=$name " . (($value || $value === '0') ? "value=\"$value\"" : '') . " $options><span class=\"input-group-addon\"><span class=\"glyphicon glyphicon-time\"></span></span></div>" . (($title != '') ? '</div>' : '');
return (($title != '') ? '<label for="' . $name . '" class="control-label text-right col-lg-4">' . str_replace('*', '<span class="text-danger">*</span>', $original_title) . '</label><div class="col-lg-8">' : '') . "<div class=\"input-group clockpicker\"><INPUT class=\"form-control\" type=text id=$name name=$name " . (($value || $value === '0') ? "value=\"$value\"" : '') . " $options></div>" . (($title != '') ? '</div>' : '');
else {
$tempId = rand(0000,9999);
return (($title != '') ? '<label for="' . $name . '" class="control-label text-right col-lg-4">' . str_replace('*', '<span class="text-danger">*</span>', $original_title) . '</label><div class="col-lg-8">' : '') . "<DIV id='div".$tempId."' onclick=\"$('#div".$tempId."').hide(); $('#div".$tempId."picker').show();\"><div ".$divOptions." document.getElementById(\"input$name\").focus();' readonly=\"readonly\" class=\"form-control\">" . $value . "</div></DIV><div class=\"input-group clockpicker\" id=\"div".$tempId."picker\" style=\"display:none;\"><INPUT type=text class=form-control id=\"input$name\" name=\"$name\" " . (($value || $value === '0') ? 'value="' . str_replace('"', '&rdquo;', $value) . '"' : '') . $options . "><span class=\"input-group-addon\"><span class=\"glyphicon glyphicon-time\"></span></span></div>" . (($title != '') ? "</div>" : "");
$tempId = rand(0000, 9999);
return (($title != '') ? '<label for="' . $name . '" class="control-label text-right col-lg-4">' . str_replace('*', '<span class="text-danger">*</span>', $original_title) . '</label><div class="col-lg-8">' : '') . "<DIV id='div" . $tempId . "' onclick=\"$('#div" . $tempId . "').hide(); $('#div" . $tempId . "picker').show();\"><div " . $divOptions . " document.getElementById(\"input$name\").focus();' readonly=\"readonly\" class=\"form-control\">" . $value . "</div></DIV><div class=\"input-group clockpicker\" id=\"div" . $tempId . "picker\" style=\"display:none;\"><INPUT type=text class=form-control id=\"input$name\" name=\"$name\" " . (($value || $value === '0') ? 'value="' . str_replace('"', '&rdquo;', $value) . '"' : '') . $options . "></div>" . (($title != '') ? "</div>" : "");
}
} else {
$value = str_replace("'", '&#39;', str_replace('"', '&rdquo;', $value));
Expand Down Expand Up @@ -290,7 +290,7 @@ function TextInput_mod_a($value, $name, $title = '', $options = '', $div = true)
if ((trim($value) == '' || $div == false))
return (($title != '') ? '<label for="' . $name . '" class="control-label col-lg-4">' . $title . '</label><div class="col-lg-8">' : '') . "<INPUT class='form-control' placeholder='" . $title . "' type=\"text\" name=$name " . (($value || $value === '0') ? "value=\"$value\"" : '') . " id=$name " . (($value || $value === '0') ? "value=\"$value\"" : '') . " $options>" . (($title != '') ? '</div>' : '');
else
return "<DIV id='div$name'><div onclick='javascript:addHTML(\"<INPUT type=text placeholder=\\\"" . $title . "\\\" class=form-control id=input$name name=$name " . (($value || $value === '0') ? "value=\\\"" . str_replace('"', '&rdquo;', $value) . "\\\"" : '') . " $options>" . ($title != '' ? $title : '') . "\",\"div$name\",true); document.getElementById(\"input$name\").focus();'><input type=\"text\" readonly=\"readonly\" class=\"form-control\" value=\"" . (($value != '') ? str_replace('"', '&rdquo;', $value1) : '-') . ($title != '' ? $title : '') . '" /></div></DIV>';
return "<DIV id='div$name'><div onclick='javascript:addHTML(\"<INPUT type=text placeholder=\\\"" . $title . "\\\" class=form-control id=input$name name=$name " . (($value || $value === '0') ? "value=\\\"" . str_replace('"', '&rdquo;', $value) . "\\\"" : '') . " $options>" . ($title != '' ? $title : '') . "\",\"div$name\",true); document.getElementById(\"input$name\").focus();'>" . (($value != '') ? str_replace('"', '&rdquo;', $value1) : '-') . ($title != '' ? $title : '') . "</div></DIV>";
} else
return (((is_array($value) ? $value[1] : $value) != '') ? (is_array($value) ? $value[1] : $value) : '-') . ($title != '' ? '<BR><small>' . (strpos(strtolower($title), '<font ') === false ? '<FONT color=' . Preferences('TITLES') . '>' : '') . $title . (strpos(strtolower($title), '<font ') === false ? '</FONT>' : '') . '</small>' : '');
}
Expand Down
Loading

0 comments on commit 28717bc

Please sign in to comment.