Minor - Code spacing

1.10.x
Yannick Warnier 9 years ago
parent 3b216b356f
commit ac890a71f7
  1. 142
      main/attendance/index.php

@ -93,79 +93,79 @@ if (!empty($attendance_id)) {
$htmlHeadXtra[] = '<script> $htmlHeadXtra[] = '<script>
$(function() { $(function() {
$("table th img").click(function() { $("table th img").click(function() {
var col_id = this.id; var col_id = this.id;
var col_split = col_id.split("_"); var col_split = col_id.split("_");
var calendar_id = col_split[2]; var calendar_id = col_split[2];
var class_img = $(this).attr("class"); var class_img = $(this).attr("class");
if (class_img == "img_unlock") { if (class_img == "img_unlock") {
//lock //lock
$(".checkbox_head_"+calendar_id).attr("disabled", true); $(".checkbox_head_"+calendar_id).attr("disabled", true);
$(".row_odd td.checkboxes_col_"+calendar_id).css({"opacity":"1","background-color":"#F9F9F9", "border-left":"none","border-right":"none"}); $(".row_odd td.checkboxes_col_"+calendar_id).css({"opacity":"1","background-color":"#F9F9F9", "border-left":"none","border-right":"none"});
$(".row_even td.checkboxes_col_"+calendar_id).css({"opacity":"1","background-color":"#FFF", "border-left":"none","border-right":"none"}); $(".row_even td.checkboxes_col_"+calendar_id).css({"opacity":"1","background-color":"#FFF", "border-left":"none","border-right":"none"});
$(".checkboxes_col_"+calendar_id+" input:checkbox").attr("disabled",true); $(".checkboxes_col_"+calendar_id+" input:checkbox").attr("disabled",true);
$(this).attr("src","'.api_get_path(WEB_CODE_PATH).'img/icons/22/lock-closed.png"); $(this).attr("src","'.api_get_path(WEB_CODE_PATH).'img/icons/22/lock-closed.png");
$(this).attr("title","'.get_lang('DateUnLock').'"); $(this).attr("title","'.get_lang('DateUnLock').'");
$(this).attr("alt","'.get_lang('DateUnLock').'"); $(this).attr("alt","'.get_lang('DateUnLock').'");
$(this).attr("class","img_lock"); $(this).attr("class","img_lock");
$("#hidden_input_"+calendar_id).attr("value",""); $("#hidden_input_"+calendar_id).attr("value","");
$("#hidden_input_"+calendar_id).attr("disabled",true); $("#hidden_input_"+calendar_id).attr("disabled",true);
return false; return false;
} else { } else {
//Unlock //Unlock
$(".checkbox_head_"+calendar_id).attr("disabled", false); $(".checkbox_head_"+calendar_id).attr("disabled", false);
$(".checkbox_head_"+calendar_id).removeAttr("disabled"); $(".checkbox_head_"+calendar_id).removeAttr("disabled");
$(".row_odd td.checkboxes_col_"+calendar_id).css({"opacity":"1","background-color":"#dcdcdc", "border-left":"1px #bbb solid", "border-right":"1px #bbb solid", "z-index":"1" }); $(".row_odd td.checkboxes_col_"+calendar_id).css({"opacity":"1","background-color":"#dcdcdc", "border-left":"1px #bbb solid", "border-right":"1px #bbb solid", "z-index":"1" });
$(".row_even td.checkboxes_col_"+calendar_id).css({"opacity":"1","background-color":"#eee", "border-left":"1px #bbb solid", "border-right":"1px #bbb solid", "z-index":"1" }); $(".row_even td.checkboxes_col_"+calendar_id).css({"opacity":"1","background-color":"#eee", "border-left":"1px #bbb solid", "border-right":"1px #bbb solid", "z-index":"1" });
$(".checkboxes_col_"+calendar_id).mouseover(function() { $(".checkboxes_col_"+calendar_id).mouseover(function() {
//$(".checkbox_head_"+calendar_id).removeAttr("opacity"); //$(".checkbox_head_"+calendar_id).removeAttr("opacity");
//$("row_even td.checkboxes_col_"+calendar_id).css({"opacity":"1","background-color":"red", "border-left":"1px #EEEE00 solid", "border-right":"1px #EEEE00 solid" , "border-bottom":"1px #ccc solid" }); //$("row_even td.checkboxes_col_"+calendar_id).css({"opacity":"1","background-color":"red", "border-left":"1px #EEEE00 solid", "border-right":"1px #EEEE00 solid" , "border-bottom":"1px #ccc solid" });
//$("row_odd td.checkboxes_col_"+calendar_id).css({"opacity":"1","background-color":"#FFF", "border-left":"1px #EEEE00 solid", "border-right":"1px #EEEE00 solid" , "border-bottom":"1px #ccc solid" }); //$("row_odd td.checkboxes_col_"+calendar_id).css({"opacity":"1","background-color":"#FFF", "border-left":"1px #EEEE00 solid", "border-right":"1px #EEEE00 solid" , "border-bottom":"1px #ccc solid" });
}); });
$(".checkboxes_col_"+calendar_id).mouseout(function() { $(".checkboxes_col_"+calendar_id).mouseout(function() {
// $("row_even td.checkboxes_col_"+calendar_id).css({"opacity":"1","background-color":"#F9F9F9", "border-left":"1px #EEEE00 solid", "border-right":"1px #EEEE00 solid" , "border-bottom":"1px #ccc solid" }); // $("row_even td.checkboxes_col_"+calendar_id).css({"opacity":"1","background-color":"#F9F9F9", "border-left":"1px #EEEE00 solid", "border-right":"1px #EEEE00 solid" , "border-bottom":"1px #ccc solid" });
// $("row_odd td.checkboxes_col_"+calendar_id).css({"opacity":"1","background-color":"#FFF", "border-left":"1px #EEEE00 solid", "border-right":"1px #EEEE00 solid" , "border-bottom":"1px #ccc solid" }); // $("row_odd td.checkboxes_col_"+calendar_id).css({"opacity":"1","background-color":"#FFF", "border-left":"1px #EEEE00 solid", "border-right":"1px #EEEE00 solid" , "border-bottom":"1px #ccc solid" });
}); });
$(".checkboxes_col_"+calendar_id+" input:checkbox").attr("disabled",false); $(".checkboxes_col_"+calendar_id+" input:checkbox").attr("disabled",false);
$(this).attr("src","'.api_get_path(WEB_CODE_PATH).'img/icons/22/lock-open.png"); $(this).attr("src","'.api_get_path(WEB_CODE_PATH).'img/icons/22/lock-open.png");
$(this).attr("title","'.get_lang('DateLock').'"); $(this).attr("title","'.get_lang('DateLock').'");
$(this).attr("alt","'.get_lang('DateLock').'"); $(this).attr("alt","'.get_lang('DateLock').'");
$(this).attr("class","img_unlock"); $(this).attr("class","img_unlock");
$("#hidden_input_"+calendar_id).attr("disabled",false); $("#hidden_input_"+calendar_id).attr("disabled",false);
$("#hidden_input_"+calendar_id).attr("value",calendar_id); $("#hidden_input_"+calendar_id).attr("value",calendar_id);
return false; return false;
} }
}); });
$("table th input:checkbox").click(function() { $("table th input:checkbox").click(function() {
var col_id = this.id; var col_id = this.id;
var col_split = col_id.split("_"); var col_split = col_id.split("_");
var calendar_id = col_split[2]; var calendar_id = col_split[2];
if (this.checked) { if (this.checked) {
$(".checkboxes_col_"+calendar_id+" input:checkbox").prop("checked",true); $(".checkboxes_col_"+calendar_id+" input:checkbox").prop("checked",true);
$(".checkboxes_col_"+calendar_id+"").addClass("row_selected"); $(".checkboxes_col_"+calendar_id+"").addClass("row_selected");
} else { } else {
$(".checkboxes_col_"+calendar_id+" input:checkbox").prop("checked",false); $(".checkboxes_col_"+calendar_id+" input:checkbox").prop("checked",false);
$(".checkboxes_col_"+calendar_id+"").removeClass("row_selected"); $(".checkboxes_col_"+calendar_id+"").removeClass("row_selected");
} }
}); });
$(".attendance-sheet-content .row_odd, .attendance-sheet-content .row_even").mouseover(function() { $(".attendance-sheet-content .row_odd, .attendance-sheet-content .row_even").mouseover(function() {
$(".row_odd").css({"background-color":"#F9F9F9"}); $(".row_odd").css({"background-color":"#F9F9F9"});
$(".row_even").css({"background-color":"#FFF"}); $(".row_even").css({"background-color":"#FFF"});
}); });
$(".attendance-sheet-content .row_odd, .attendance-sheet-content .row_even").mouseout(function() { $(".attendance-sheet-content .row_odd, .attendance-sheet-content .row_even").mouseout(function() {
$(".row_odd").css({"background-color":"#F9F9F9"}); $(".row_odd").css({"background-color":"#F9F9F9"});
$(".row_even").css({"background-color":"#FFF"}); $(".row_even").css({"background-color":"#FFF"});
}); });
}); });
</script>'; </script>';

Loading…
Cancel
Save