first commit
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 921 B |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 43 B |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 538 B |
|
After Width: | Height: | Size: 738 B |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 8.2 KiB |
|
After Width: | Height: | Size: 8.2 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 361 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 19 KiB |
@@ -0,0 +1,662 @@
|
||||
<?php
|
||||
include 'connect/cms-config.php' ;
|
||||
include 'requires/function.php' ;
|
||||
include 'requires/session.php' ;
|
||||
|
||||
// check permission
|
||||
if ( !permissionCheck($row_user, 'attendance-list-view') ){
|
||||
header('Location: index.php') ;
|
||||
exit ;
|
||||
}
|
||||
|
||||
// keep parameter in value
|
||||
$edit = escapeString($_GET['edit']) ;
|
||||
$page = escapeString($_GET['page']) ;
|
||||
$page_mode = escapeString($_GET['page_mode']) ;
|
||||
$type = escapeString($_GET['type']) ;
|
||||
|
||||
|
||||
// get all branch
|
||||
$branch = [] ;
|
||||
$get_branch = $mysqli->query("SELECT * FROM branch
|
||||
WHERE deleted_at IS NULL".$user_branch_permission_sql) ;
|
||||
if ( $get_branch->num_rows > 0 ){
|
||||
while ( $row_branch = $get_branch->fetch_assoc() ){
|
||||
$branch[$row_branch['branch_id']] = $row_branch['branch_name'] ;
|
||||
}
|
||||
}
|
||||
include 'HR/hr-attendance-format-2-update.php' ;
|
||||
include 'HR/hr-attendance-format-2-data.php' ;
|
||||
|
||||
$boolean_role = false ;
|
||||
$boolean_edit = false ;
|
||||
if ( permissionCheck($row_user,"attendance-list-edit") ){
|
||||
$boolean_role = true ;
|
||||
if ( $edit == 'yes' ){
|
||||
$boolean_edit = true ;
|
||||
}
|
||||
}
|
||||
|
||||
// active page
|
||||
$active_main_menu = 'hr' ;
|
||||
$active_sub_menu = 'hr-attendance' ;
|
||||
$active_menu = 'hr-attendance-list' ;
|
||||
|
||||
// start header here
|
||||
include 'requires/page_header.php' ;
|
||||
include 'requires/page_top.php' ;
|
||||
|
||||
// reset sort by type
|
||||
$sort_by_type = ( $sort_by_type == 'DESC' ? 'ASC' : 'DESC' ) ;
|
||||
|
||||
// get all attendance list
|
||||
$array_list = [] ;
|
||||
$get_attendaces = $mysqli->query("SELECT list_id, list_work_day, list_ot_day, list_late, list_early_out, list_time_off, list_type_remark, staff_id, list_date, list_attendance_remark FROM staff_attendance_list
|
||||
WHERE deleted_at IS NULL AND list_date LIKE '".$date_time."%'") ;
|
||||
if ( $get_attendaces->num_rows > 0 ){
|
||||
while ( $row_list = $get_attendaces->fetch_assoc() ){
|
||||
$array_list[$row_list['staff_id']][$row_list['list_date']] = $row_list ;
|
||||
}
|
||||
}
|
||||
|
||||
// get all requires
|
||||
$tier_list = [] ;
|
||||
$mysqli_tier = $mysqli->query("SELECT a.tier_id, b.title FROM profile_tier a
|
||||
LEFT JOIN profile_tier_translation b ON ( a.tier_id = b.tier_id )
|
||||
WHERE a.deleted_at IS NULL AND b.lang = 'en' ORDER BY a.sortable ASC") ;
|
||||
if ( $mysqli_tier->num_rows > 0 ){
|
||||
while ( $row_tier = $mysqli_tier->fetch_assoc() ){
|
||||
$tier_list[] = $row_tier ;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<style>
|
||||
.check_in_out_warning{
|
||||
background:#f7a6a6;
|
||||
}
|
||||
.select_datepicker{
|
||||
text-align: center;
|
||||
}
|
||||
.datepicker_box{
|
||||
display: inline-block;
|
||||
}
|
||||
.datepicker_submit{
|
||||
border: 0;
|
||||
padding: 7px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- Header Ends -->
|
||||
<div class="warper container-fluid">
|
||||
<div class="page-header">
|
||||
<h1><?= $lang['attendance']?> <small><?= $lang['list']?></small></h1>
|
||||
<div class="clearfix">
|
||||
<div style="float: right;">
|
||||
<?php if ( permissionCheck($row_user, 'attendance-attendance-reprocessing') ){ ?>
|
||||
[ <a href="hr-attendance.php?page_mode=reprocessing" target="_blank"><?= $lang['Reprocessing'] ?></a> ]
|
||||
<br />
|
||||
<?php } ?>
|
||||
[ <a href="<?= ( PATHEXPORT != 'PATHEXPORT' ? PATHEXPORT : '' ) ?>hr-attendance-format-2.php?<?= $search_url ?>&export=yes" target="_blank"><?= $lang['export_as']?> Excel</a> ]
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if ( $boolean_role ){
|
||||
if ( $edit == 'yes' ){
|
||||
echo '<a href="?'.$search_url.'&edit=" class="btn btn-purple" style="margin-bottom:10px;">'.$lang['Normal Mode'].'</a>' ;
|
||||
}else{
|
||||
echo '<a href="?'.$search_url.'&edit=yes" class="btn btn-purple" style="margin-bottom:10px;">'.$lang['Edit Mode'].'</a>' ;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
if ($_SESSION['system_result'] != ''){
|
||||
echo $_SESSION['system_result'] ;
|
||||
unset($_SESSION['system_result']) ;
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="panel panel-default" id="basic-table-title">
|
||||
<div class="panel-heading"></div>
|
||||
<div class="panel-body">
|
||||
<form method="get" class="form-horizontal" style="max-width:600px;">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label"><?= $lang['Name']?></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" name="search_name" value="<?= $search_name ?>" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label"><?= $lang['ID No']?></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" name="search_idno" value="<?= $search_idno ?>" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label"><?= $lang['Mobile'] ?></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" name="search_mobile" value="<?= $search_mobile ?>" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label"><?= $lang['email'] ?></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" name="search_mail" value="<?= $search_mail ?>" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="display: none;">
|
||||
<label class="col-sm-2 control-label"><?= $lang['Tier'] ?></label>
|
||||
<div class="col-sm-9">
|
||||
<select name="search_tier" class="form-control">
|
||||
<option value=""><?= $lang['All'] ?></option>
|
||||
<?php foreach( $tier_list as $k => $v ){ ?>
|
||||
<option value="<?= $v['tier_id'] ?>" <?= ( $search_tier == $v['tier_id'] ? 'selected' : '' ) ?> ><?= $v['title'] ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="display: none;">
|
||||
<label class="col-sm-2 control-label"><?= $lang['Department']?></label>
|
||||
<div class="col-sm-9">
|
||||
<select name="search_department[]" class="chosen-select select2-basic-single form-control" multiple >
|
||||
<?php
|
||||
// department check list
|
||||
$department = [] ;
|
||||
$get_department = $mysqli->query("SELECT a.department_id, b.department_desc FROM setting_department a
|
||||
LEFT JOIN setting_department_translation b ON ( a.department_id = b.department_id )
|
||||
WHERE a.deleted_at IS NULL AND b.lang = 'en'") ;
|
||||
if ( $get_department->num_rows > 0 ){
|
||||
while ( $row_department = $get_department->fetch_assoc() ){
|
||||
|
||||
$department[$row_department['department_id']] = $row_department['department_desc'] ;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ( $department as $kk => $vv ){
|
||||
$selected = '';
|
||||
|
||||
if(arrayCheck($_GET['search_department'])){
|
||||
if(in_array("$kk", $_GET['search_department'], TRUE)){
|
||||
$selected = 'selected';
|
||||
}
|
||||
}
|
||||
echo '<option value="'.$kk.'" '.$selected.'>'.$vv.'</option>' ;
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="display: none;">
|
||||
<label class="col-sm-2 control-label"><?= $lang['L_F']?></label>
|
||||
<div class="col-sm-9">
|
||||
<select name="search_country" class="form-control">
|
||||
<option value=""><?= $lang['All']?></option>
|
||||
<option value="local" <?= $search_country == 'local' ? 'selected' : '' ?> ><?= $lang['Local']?></option>
|
||||
<option value="foreigner" <?= $search_country == 'foreigner' ? 'selected' : '' ?> ><?= $lang['Foreigner']?></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="display: none;">
|
||||
<label class="col-sm-2 control-label"><?= $lang['branch']?></label>
|
||||
<div class="col-sm-9">
|
||||
<select name="search_branch" class="form-control">
|
||||
<option value=""><?= $lang['All']?></option>
|
||||
<?php
|
||||
foreach ( $branch as $kk => $vv ){
|
||||
echo '<option value="'.$kk.'" '.( $search_branch == $kk ? 'selected' : '' ).' >'.$vv.'</option>' ;
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label"><?= $lang['Day From'] ?></label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control" name="search_day_from">
|
||||
<option value="">Select</option>
|
||||
<?php
|
||||
for ($i=1; $i < date("t", strtotime($date_time)) ; $i++) {
|
||||
echo ' <option value="'.$i.'" '.($search_day_from == $i ? "selected" : '').'>'.$i.'</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label"><?= $lang['Day To'] ?></label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control" name="search_day_to">
|
||||
<option value="">Select</option>
|
||||
<?php
|
||||
for ($i=1; $i < date("t", strtotime($date_time)) ; $i++) {
|
||||
echo ' <option value="'.$i.'" '.($search_day_to == $i ? "selected" : '').'>'.$i.'</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-2 control-label"><?= $lang['Date Resigned'] ?></label>
|
||||
<div class="col-sm-9">
|
||||
<input class="form-control" name="search_resigned" type="date" value="<?= ($search_resigned!= '' ? $search_resigned : date('Y-m-d',time()) ) ?>" placeholder="Date Resigned">
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label"><?= $lang['Resign List'] ?></label>
|
||||
<div class="col-sm-9">
|
||||
<input name="search_resigned" type="checkbox" value="1" <?= ($search_resigned!= '' ? "checked" : "") ?> placeholder="Resign List">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">View Type</label>
|
||||
<div class="col-sm-9">
|
||||
<select name="export" class="form-control">
|
||||
<option value="">Search</option>
|
||||
<option value="yes">View as Excel </option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-11">
|
||||
<input type="hidden" name="page_mode" value="<?= $page_mode ?>" />
|
||||
<input type="hidden" name="edit" value="<?= $edit ?>" />
|
||||
<input type="hidden" name="date_time" value="<?= $date_time ?>" />
|
||||
<input type="hidden" name="sort_by" value="<?= $sort_by ?>" />
|
||||
<input type="hidden" name="sort_by_type" value="<?= $sort_by_type ?>" />
|
||||
<button type="submit" class="btn btn-purple" style="float:right"><?= $lang['submit']?></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default" id="basic-table-title">
|
||||
<div class="panel-heading"></div>
|
||||
<div class="panel-body">
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12">
|
||||
|
||||
<div class="box-tools col-sm-12 col-md-12 col-lg-12" style="text-align: center; margin: 20px;">
|
||||
<a href="?<?= $search_url ?>&page=1&date_time=<?= date('Y-m', strtotime($date_time.' -1 month')) ?>" class="width_auto"><?= $lang['Prev Month']?></a>
|
||||
|
||||
<div class="datepicker_box">
|
||||
<span style="margin-left:10px; margin-right:10px;">
|
||||
<input type="text" readonly name="date_time" class="select_datepicker" value="<?= $date_time ?>">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if ( $date_time >= date('Y-m', strtotime(TODAYDAY)) ){}else{
|
||||
?>
|
||||
<a href="?<?= $search_url ?>&page=1&date_time=<?= date('Y-m', strtotime($date_time.' +1 month')) ?>" class="width_auto"><?= $lang['Next Month']?></a>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12">
|
||||
|
||||
<table class="ui-table table table-striped jambo_table bulk_action table-bordered stripe row-border order-column" id="basic-datatable-column">
|
||||
<thead>
|
||||
<tr class="headings">
|
||||
<th class="column-title text-center" width="8%">
|
||||
<div class="custom_dropdown_title">
|
||||
<div class="dataTable_width_image"><?= $lang['Image']?></div>
|
||||
</div>
|
||||
</th>
|
||||
<th class="column-title text-center" width="8%">
|
||||
<div class="custom_dropdown_title">
|
||||
<div class="dataTable_width_id">
|
||||
<a href="?<?= $search_url ?>&sort_by=staff_idno&sort_by_type=<?= ($sort_by == 'staff_idno' ? $sort_by_type : 'ASC') ?>">
|
||||
ID<?= ( $sort_by == 'staff_idno' ? '<i class="fa fa-sort-alpha-'.( $sort_by_type == 'DESC' ? 'asc' : 'desc' ).'"></i>' : '' ) ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</th>
|
||||
<th class="custom_dropdown_th" >
|
||||
<div class="custom_dropdown_title">
|
||||
<a href="?<?= $search_url ?>&sort_by=staff_name&sort_by_type=<?= ($sort_by == 'staff_name' ? $sort_by_type : 'ASC') ?>">
|
||||
<?= $lang['Name']?><?= ( $sort_by == 'staff_name' ? '<i class="fa fa-sort-alpha-'.( $sort_by_type == 'DESC' ? 'desc' : 'asc' ).'"></i>' : '' ) ?>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
<th>
|
||||
<div class="custom_dropdown_title">
|
||||
<a href="?<?= $search_url ?>&sort_by=department_desc&sort_by_type=<?= ($sort_by == 'department_desc' ? $sort_by_type : 'ASC') ?>">
|
||||
<?= $lang['Department']?><?= ( $sort_by == 'department_desc' ? '<i class="fa fa-sort-alpha-'.( $sort_by_type == 'DESC' ? 'desc' : 'asc' ).'"></i>' : '' ) ?>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
<th>
|
||||
<div class="custom_dropdown_title">
|
||||
<a href="?<?= $search_url ?>&sort_by=job_position_id&sort_by_type=<?= ($sort_by == 'job_position_id' ? $sort_by_type : 'ASC') ?>">
|
||||
<?= $lang['Designation']?><?= ( $sort_by == 'job_position_id' ? '<i class="fa fa-sort-alpha-'.( $sort_by_type == 'DESC' ? 'desc' : 'asc' ).'"></i>' : '' ) ?>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
|
||||
<?php
|
||||
for ( $a = $start_day ; $a <= $day_of_month ; $a++ ){
|
||||
echo '<th class="column-title text-center"><div class="dataTable_width" style="margin: auto;">'.$a.'</div></th>' ;
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?php
|
||||
if ( count($attendances) > 0 ){
|
||||
foreach ( $attendances as $k_staff => $v_staff ){
|
||||
|
||||
$date_group = $v_staff['group'] ;
|
||||
$staff_id = $v_staff['staff_id'] ;
|
||||
$staff_idno = ucwords($v_staff['staff_idno']) ;
|
||||
$staff_tier = $v_staff['staff_tier'] ;
|
||||
$departments = explode( ',', $v_staff['staff_department'] ) ;
|
||||
|
||||
$check_permission = false ;
|
||||
if ( $get_user_tier['check'] ){
|
||||
if ( in_array( $staff_tier, $get_user_tier['tiers'] ) ){
|
||||
$check_permission = true ;
|
||||
}
|
||||
}else{
|
||||
$check_permission = true ;
|
||||
}
|
||||
|
||||
echo '
|
||||
<tr staff_id="'.$v_staff['staff_id'].'">
|
||||
<td class="text-center">
|
||||
<div class="dataTable_width_image"><image src="'.$v_staff['staff_image'].'" /></div>
|
||||
</td>
|
||||
<td class="text-center" title="'.$v_staff['staff_idno'].'">
|
||||
<div class="dataTable_width_id">'.$staff_idno.' </div>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<div class="dataTable_width_name"><a href="hr-attendance.php?page_mode=reprocessing-list&date_time='.$date_time.'&staff_id='.$v_staff['staff_id'].'" target="_blank">'.ucwords($v_staff['staff_name']).'</div>
|
||||
</td>
|
||||
<td>'.implode( '<br />', $departments ).'</td>
|
||||
<td class="text-center">'.ucwords($v_staff['staff_positionname']).'</td>' ;
|
||||
for ( $a = $start_day ; $a <= $day_of_month ; $a++ ){
|
||||
|
||||
$new_day = $date_time.'-'.str_pad($a, 2, '0', STR_PAD_LEFT) ;
|
||||
$list_date = $new_day ;
|
||||
$row_report = $array_list[$v_staff['staff_id']][$list_date] ;
|
||||
$report_day = 0 ;
|
||||
$report_min = '00:00:00' ;
|
||||
$report_ot = 0 ;
|
||||
$report_wt = '' ;
|
||||
$report_remark = '' ;
|
||||
$report_health = ( $array_health[$staff_id][$list_date] != '' ? $array_health[$staff_id][$list_date] : '' ) ;
|
||||
if ( $row_report != undefined && arrayCheck($row_report) ){
|
||||
$report_day = ( $row_report['list_work_day'] != '00:00:00' ? $row_report['list_work_day'] : 0 ) ;
|
||||
$report_ot = ( $row_report['list_ot_day'] != '00:00:00' ? $row_report['list_ot_day'] : 0 ) ;
|
||||
$list_late = ( $row_report['list_late'] != '00:00:00' ? $row_report['list_late'] : 0 ) ;
|
||||
$list_early_out = ( $row_report['list_early_out'] != '00:00:00' ? $row_report['list_early_out'] : 0 ) ;
|
||||
|
||||
if ( $row_report['list_late'] != '00:00:00' ){
|
||||
$report_min = commonAddTime($row_report['list_late'], '00:00:01') ;
|
||||
}
|
||||
if ( $row_report['list_early_out'] != '00:00:00' ){
|
||||
$report_min = commonAddTime($row_report['list_early_out'], $report_min) ;
|
||||
}
|
||||
if ( $row_report['list_time_off'] != '00:00:00' && $row_report['list_time_off'] != '' ){
|
||||
$report_min = commonAddTime($row_report['list_time_off'], $report_min) ;
|
||||
}
|
||||
|
||||
// $report_min = ( $row_report['list_late'] != '00:00:00' ? $row_report['list_late'] : '00:00' ) ;
|
||||
$report_wt = ( $row_report['list_type_remark'] != '' ? $row_report['list_type_remark'] : '' ) ;
|
||||
$report_remark = ( $row_report['list_attendance_remark'] != '' ? $row_report['list_attendance_remark'] : '' ) ;
|
||||
}
|
||||
$report_min = substr($report_min, 0, -3) ;
|
||||
|
||||
$array_group = [] ;
|
||||
if ( !empty($date_group[$new_day]) ){
|
||||
$get_group = $date_group[$new_day] ;
|
||||
foreach ( $get_group as $k_group => $v_group ){
|
||||
|
||||
$coordinates = '' ;
|
||||
if ( $v_group['latitude'] != '' && $v_group['longitude'] != '' ){
|
||||
$coordinates = '<a target="_blank" href="https://maps.google.com/?q='.$v_group['latitude'].','.$v_group['longitude'].'" style="margin-left:5px;"><i class="fa fa-location-arrow"></i></a>' ;
|
||||
}
|
||||
|
||||
$array_group[] = ( $v_group['created_at'] != $v_group['updated_at'] ? '<span>*</span>' : '' ) . '<span '.( $v_group['abnormal'] == 'yes' ? 'class="red"' : '' ).' title="'.ucwords($v_group['record_from']).( $v_group['code'] != '' ? ' : ' . $v_group['code'] : '' ).'" >'.date('H:i:s', strtotime($v_group['created_at'])).'</span>' . $coordinates ;
|
||||
}
|
||||
}
|
||||
|
||||
echo '
|
||||
<td class="text-center">
|
||||
<div class="dataTable_width2">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="dataTable_width_time">' ;
|
||||
if ( $boolean_edit && $new_day <= TODAYDAY ){
|
||||
if ( $check_permission ){
|
||||
echo '<a data-toggle="tooltip" title="Edit" data-staffid="'.$staff_id.'" data-check_group="'.$new_day.'" class="allinfodata attendance_format2_edit"><i class="fa fa-edit"></i></a><br />' ;
|
||||
}
|
||||
}
|
||||
echo implode('<br />', $array_group) ;
|
||||
if(arrayCheck($array_group)){
|
||||
|
||||
}else{
|
||||
echo '--:--:--:--';
|
||||
}
|
||||
echo '
|
||||
</div>
|
||||
</td>';
|
||||
if (EXCELDETAIL == "YES"){
|
||||
echo '
|
||||
<td style="border-left: 1px solid #ddd; vertical-align: top;">
|
||||
';
|
||||
|
||||
if ( $boolean_edit && $new_day <= TODAYDAY ){
|
||||
$list_id = $row_report['list_id'] ;
|
||||
echo '
|
||||
<form method="post" class="dataTable_form_edit">
|
||||
<div class="dataTable_form_edit_title">Work Day : </div>
|
||||
<input type="text" name="list_work_day" class="list_work_day" value="'.$report_day.'" /><br />
|
||||
<div class="dataTable_form_edit_title">OT Day : </div>
|
||||
<input type="text" name="list_ot_day" class="list_ot_day" value="'.$report_ot.'" /><br />
|
||||
|
||||
<div class="dataTable_form_edit_title">Min : </div>
|
||||
<input type="text" name="list_min" class="list_min" value="'.$report_min.'" /><br />
|
||||
<div class="dataTable_form_edit_title">Working Type : </div>
|
||||
<select name="list_wt" class="list_wt">
|
||||
<option value="">-- CHOOSE --</option>
|
||||
<option value="WD" '.($report_wt == 'WD' ? 'selected' : '').'>WORK DAY</option>
|
||||
<option value="AL" '.($report_wt == 'AL' ? 'selected' : '').'>ANNUAL LEAVE</option>
|
||||
<option value="UL" '.($report_wt == 'UL' ? 'selected' : '').'>UNPAID LEAVE</option>
|
||||
<option value="MC" '.($report_wt == 'MC' ? 'selected' : '').'>SICK LEAVE</option>
|
||||
<option value="AS" '.($report_wt == 'AS' ? 'selected' : '').'>ABSENT</option>
|
||||
<option value="HL" '.($report_wt == 'HL' ? 'selected' : '').'>HOLIDAY LIST</option>
|
||||
<option value="OD" '.($report_wt == 'OD' ? 'selected' : '').'>OFF DAY</option>
|
||||
<option value="CL" '.($report_wt == 'CL' ? 'selected' : '').'>COMPANY LEAVE</option>
|
||||
<option value="SP" '.($report_wt == 'SP' ? 'selected' : '').'>SUSPEND LEAVE</option>
|
||||
</select><br />
|
||||
<div class="dataTable_form_edit_title">Remark : </div>
|
||||
<input type="text" class="list_remark" value="'.$report_remark.'" /><br />
|
||||
|
||||
<input type="hidden" name="list_id" class="list_id" value="'.$list_id.'" />
|
||||
'.( $list_id != '' ? '<button type="submit"><i class="fa fa-pencil"></i></button>' : '' ).'
|
||||
</form>
|
||||
|
||||
'.( arrayCheck($array_group) ? '
|
||||
<form method="post" class="dataTable_form_edit_health">
|
||||
<div class="dataTable_form_edit_title">Health : </div>
|
||||
<input type="text" class="list_health" class="list_health" value="'.$report_health.'" />
|
||||
|
||||
<input type="hidden" name="list_staff_id" class="list_staff_id" value="'.$staff_id.'" />
|
||||
<input type="hidden" name="list_date" class="list_date" value="'.$list_date.'" />
|
||||
<button type="submit"><i class="fa fa-pencil"></i></button>
|
||||
</form>' : '' ) ;
|
||||
}else{
|
||||
echo '
|
||||
<div>
|
||||
|
||||
W : '.$report_day.'<br />
|
||||
O : '.( $report_ot != 0 ? $report_ot : '-' ).'<br />
|
||||
Min : '.( $report_min != '00:00' ? numberFormat(convertMinutes($report_min)) : '-' ).'<br />'.'
|
||||
WT : ';
|
||||
switch ($report_wt) {
|
||||
case 'WD': echo 'WORK DAY'; break;
|
||||
case 'AL': echo 'ANNUAL LEAVE'; break;
|
||||
case 'UL': echo 'UNPAID LEAVE'; break;
|
||||
case 'MC': echo 'SICK LEAVE'; break;
|
||||
case 'AS': echo 'ABSENT'; break;
|
||||
case 'HL': echo 'HOLIDAY LIST'; break;
|
||||
case 'OD': echo 'OFF DAY'; break;
|
||||
case 'CL': echo 'COMPANY LEAVE'; break;
|
||||
case 'SP': echo 'SUSPEND LEAVE'; break;
|
||||
}
|
||||
echo '<br/>
|
||||
RK : '.( $report_remark != '' ? $report_remark : '-' ).'<br />
|
||||
HL : '.$report_health.'
|
||||
</div>' ;
|
||||
}
|
||||
|
||||
|
||||
echo '
|
||||
</td>';
|
||||
}
|
||||
echo '
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>' ;
|
||||
}
|
||||
echo '
|
||||
</tr>' ;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<?= $page_pagination['page_pagination'] ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$('.allinfodata').live('click', function(){
|
||||
|
||||
$('.modaldata').val('');
|
||||
$('.modal2title').empty();
|
||||
$('.modal2title').append('Update');
|
||||
var staffid = $(this).data('staffid');
|
||||
var check_group = $(this).data('check_group');
|
||||
$('#modal_staff_id').val(staffid);
|
||||
$('#modal_check_group').val(check_group);
|
||||
|
||||
// if ( confirm('Confirm update attendance?') ) {
|
||||
|
||||
$.ajax({
|
||||
url : 'hr-attendance.php?page_mode=admend-format-2&staff_id='+staffid+'&check_group='+check_group,
|
||||
type: 'get',
|
||||
dataType: 'json',
|
||||
success:function(data) {
|
||||
|
||||
if ( data['result'] == 'success' ){
|
||||
|
||||
var content = '' ;
|
||||
|
||||
// loop all date time
|
||||
$.each( data['data'], function(k, v) {
|
||||
|
||||
content += '<div class="form-group clearfix">' ;
|
||||
content += '<label class="control-label col-md-2 col-sm-2 col-xs-12">Time ( '+(k+1)+' )</label>' ;
|
||||
content += '<div class="col-md-10 col-sm-10 col-xs-12">' ;
|
||||
content += '<div class="form-group">' ;
|
||||
content += '<div class="col-md-4 col-sm-4 col-xs-4">' ;
|
||||
content += '<input type="hidden" class="form-control modaldata" name="attendance_id_'+k+'" value="'+v['id']+'" placeholder="<?= $lang['attendance'] ?> ID">' ;
|
||||
content += '<input type="hidden" class="form-control modaldata" name="attendance_date_'+k+'" value="'+v['date']+'" placeholder="<?= $lang['date'] ?>">' ;
|
||||
content += '<input type="time" class="form-control modaldata" name="attendance_time_'+k+'" value="'+v['time']+'" placeholder="<?= $lang['Time'] ?>">' ;
|
||||
content += '</div>' ;
|
||||
content += '<div class="col-md-8 col-sm-8 col-xs-8">' ;
|
||||
content += '<input type="text" class="form-control modaldata" style="padding: 8px; font-size: 13px;" name="attendance_remark_'+k+'" value="'+v['remark']+'" placeholder="<?= $lang['remark'] ?>">' ;
|
||||
content += '</div>' ;
|
||||
content += '</div>' ;
|
||||
content += '</div>' ;
|
||||
content += '</div>' ;
|
||||
|
||||
}) ;
|
||||
|
||||
// show_all_datetime
|
||||
$(".show_all_datetime").html( content ) ;
|
||||
|
||||
}else{
|
||||
alert("Failed to get attendance") ;
|
||||
location.reload() ;
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
$('#modal-2').modal('show');
|
||||
|
||||
// }
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<div class="modal modal-default fade" id="modal-2">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title modal2title"></h4>
|
||||
</div>
|
||||
|
||||
<form method="post" action="?<?= $search_url ?>">
|
||||
|
||||
<input type="hidden" name="modal_staff_id" id="modal_staff_id" class="modaldata" />
|
||||
<input type="hidden" name="modal_check_group" id="modal_check_group" class="modaldata" />
|
||||
<div class="modal-body">
|
||||
<div class="show_all_datetime clearfix"></div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<div class="form-group clearfix">
|
||||
<div class="col-md-12 col-sm-12 col-xs-12">
|
||||
<div class="form-group">
|
||||
<div class="col-md-12 col-sm-12 col-xs-12">
|
||||
<button type="submit" class="btn btn-purple addbtn2"><i class="fa fa-check-circle"></i> <?= $lang['Save']?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
// footer
|
||||
include 'requires/page_footer.php' ;
|
||||
?>
|
||||
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 9.3 KiB |
|
After Width: | Height: | Size: 9.4 KiB |
|
After Width: | Height: | Size: 329 KiB |
|
After Width: | Height: | Size: 472 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
@@ -0,0 +1,327 @@
|
||||
Version: ImageMagick 6.9.7-4 Q16 x86_64 20170114 http://www.imagemagick.org
|
||||
Copyright: © 1999-2017 ImageMagick Studio LLC
|
||||
License: http://www.imagemagick.org/script/license.php
|
||||
Features: Cipher DPC Modules OpenMP
|
||||
Delegates (built-in): bzlib djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png tiff wmf x xml zlib
|
||||
Usage: convert [options ...] file [ [options ...] file ...] [options ...] file
|
||||
|
||||
Image Settings:
|
||||
-adjoin join images into a single multi-image file
|
||||
-affine matrix affine transform matrix
|
||||
-alpha option activate, deactivate, reset, or set the alpha channel
|
||||
-antialias remove pixel-aliasing
|
||||
-authenticate password
|
||||
decipher image with this password
|
||||
-attenuate value lessen (or intensify) when adding noise to an image
|
||||
-background color background color
|
||||
-bias value add bias when convolving an image
|
||||
-black-point-compensation
|
||||
use black point compensation
|
||||
-blue-primary point chromaticity blue primary point
|
||||
-bordercolor color border color
|
||||
-caption string assign a caption to an image
|
||||
-channel type apply option to select image channels
|
||||
-clip-mask filename associate a clip mask with the image
|
||||
-colors value preferred number of colors in the image
|
||||
-colorspace type alternate image colorspace
|
||||
-comment string annotate image with comment
|
||||
-compose operator set image composite operator
|
||||
-compress type type of pixel compression when writing the image
|
||||
-define format:option
|
||||
define one or more image format options
|
||||
-delay value display the next image after pausing
|
||||
-density geometry horizontal and vertical density of the image
|
||||
-depth value image depth
|
||||
-direction type render text right-to-left or left-to-right
|
||||
-display server get image or font from this X server
|
||||
-dispose method layer disposal method
|
||||
-dither method apply error diffusion to image
|
||||
-encoding type text encoding type
|
||||
-endian type endianness (MSB or LSB) of the image
|
||||
-family name render text with this font family
|
||||
-fill color color to use when filling a graphic primitive
|
||||
-filter type use this filter when resizing an image
|
||||
-font name render text with this font
|
||||
-format "string" output formatted image characteristics
|
||||
-fuzz distance colors within this distance are considered equal
|
||||
-gravity type horizontal and vertical text placement
|
||||
-green-primary point chromaticity green primary point
|
||||
-intensity method method to generate intensity value from pixel
|
||||
-intent type type of rendering intent when managing the image color
|
||||
-interlace type type of image interlacing scheme
|
||||
-interline-spacing value
|
||||
set the space between two text lines
|
||||
-interpolate method pixel color interpolation method
|
||||
-interword-spacing value
|
||||
set the space between two words
|
||||
-kerning value set the space between two letters
|
||||
-label string assign a label to an image
|
||||
-limit type value pixel cache resource limit
|
||||
-loop iterations add Netscape loop extension to your GIF animation
|
||||
-mask filename associate a mask with the image
|
||||
-matte store matte channel if the image has one
|
||||
-mattecolor color frame color
|
||||
-moments report image moments
|
||||
-monitor monitor progress
|
||||
-orient type image orientation
|
||||
-page geometry size and location of an image canvas (setting)
|
||||
-ping efficiently determine image attributes
|
||||
-pointsize value font point size
|
||||
-precision value maximum number of significant digits to print
|
||||
-preview type image preview type
|
||||
-quality value JPEG/MIFF/PNG compression level
|
||||
-quiet suppress all warning messages
|
||||
-red-primary point chromaticity red primary point
|
||||
-regard-warnings pay attention to warning messages
|
||||
-remap filename transform image colors to match this set of colors
|
||||
-respect-parentheses settings remain in effect until parenthesis boundary
|
||||
-sampling-factor geometry
|
||||
horizontal and vertical sampling factor
|
||||
-scene value image scene number
|
||||
-seed value seed a new sequence of pseudo-random numbers
|
||||
-size geometry width and height of image
|
||||
-stretch type render text with this font stretch
|
||||
-stroke color graphic primitive stroke color
|
||||
-strokewidth value graphic primitive stroke width
|
||||
-style type render text with this font style
|
||||
-support factor resize support: > 1.0 is blurry, < 1.0 is sharp
|
||||
-synchronize synchronize image to storage device
|
||||
-taint declare the image as modified
|
||||
-texture filename name of texture to tile onto the image background
|
||||
-tile-offset geometry
|
||||
tile offset
|
||||
-treedepth value color tree depth
|
||||
-transparent-color color
|
||||
transparent color
|
||||
-undercolor color annotation bounding box color
|
||||
-units type the units of image resolution
|
||||
-verbose print detailed information about the image
|
||||
-view FlashPix viewing transforms
|
||||
-virtual-pixel method
|
||||
virtual pixel access method
|
||||
-weight type render text with this font weight
|
||||
-white-point point chromaticity white point
|
||||
|
||||
Image Operators:
|
||||
-adaptive-blur geometry
|
||||
adaptively blur pixels; decrease effect near edges
|
||||
-adaptive-resize geometry
|
||||
adaptively resize image using 'mesh' interpolation
|
||||
-adaptive-sharpen geometry
|
||||
adaptively sharpen pixels; increase effect near edges
|
||||
-alpha option on, activate, off, deactivate, set, opaque, copy
|
||||
transparent, extract, background, or shape
|
||||
-annotate geometry text
|
||||
annotate the image with text
|
||||
-auto-gamma automagically adjust gamma level of image
|
||||
-auto-level automagically adjust color levels of image
|
||||
-auto-orient automagically orient (rotate) image
|
||||
-bench iterations measure performance
|
||||
-black-threshold value
|
||||
force all pixels below the threshold into black
|
||||
-blue-shift factor simulate a scene at nighttime in the moonlight
|
||||
-blur geometry reduce image noise and reduce detail levels
|
||||
-border geometry surround image with a border of color
|
||||
-bordercolor color border color
|
||||
-brightness-contrast geometry
|
||||
improve brightness / contrast of the image
|
||||
-canny geometry detect edges in the image
|
||||
-cdl filename color correct with a color decision list
|
||||
-charcoal radius simulate a charcoal drawing
|
||||
-chop geometry remove pixels from the image interior
|
||||
-clamp keep pixel values in range (0-QuantumRange)
|
||||
-clip clip along the first path from the 8BIM profile
|
||||
-clip-path id clip along a named path from the 8BIM profile
|
||||
-colorize value colorize the image with the fill color
|
||||
-color-matrix matrix apply color correction to the image
|
||||
-connected-components connectivity
|
||||
connected-components uniquely labeled
|
||||
-contrast enhance or reduce the image contrast
|
||||
-contrast-stretch geometry
|
||||
improve contrast by `stretching' the intensity range
|
||||
-convolve coefficients
|
||||
apply a convolution kernel to the image
|
||||
-cycle amount cycle the image colormap
|
||||
-decipher filename convert cipher pixels to plain pixels
|
||||
-deskew threshold straighten an image
|
||||
-despeckle reduce the speckles within an image
|
||||
-distort method args
|
||||
distort images according to given method ad args
|
||||
-draw string annotate the image with a graphic primitive
|
||||
-edge radius apply a filter to detect edges in the image
|
||||
-encipher filename convert plain pixels to cipher pixels
|
||||
-emboss radius emboss an image
|
||||
-enhance apply a digital filter to enhance a noisy image
|
||||
-equalize perform histogram equalization to an image
|
||||
-evaluate operator value
|
||||
evaluate an arithmetic, relational, or logical expression
|
||||
-extent geometry set the image size
|
||||
-extract geometry extract area from image
|
||||
-features distance analyze image features (e.g. contrast, correlation)
|
||||
-fft implements the discrete Fourier transform (DFT)
|
||||
-flip flip image vertically
|
||||
-floodfill geometry color
|
||||
floodfill the image with color
|
||||
-flop flop image horizontally
|
||||
-frame geometry surround image with an ornamental border
|
||||
-function name parameters
|
||||
apply function over image values
|
||||
-gamma value level of gamma correction
|
||||
-gaussian-blur geometry
|
||||
reduce image noise and reduce detail levels
|
||||
-geometry geometry preferred size or location of the image
|
||||
-grayscale method convert image to grayscale
|
||||
-hough-lines geometry
|
||||
identify lines in the image
|
||||
-identify identify the format and characteristics of the image
|
||||
-ift implements the inverse discrete Fourier transform (DFT)
|
||||
-implode amount implode image pixels about the center
|
||||
-interpolative-resize geometry
|
||||
resize image using 'point sampled' interpolation
|
||||
-kuwahara geometry edge preserving noise reduction filter
|
||||
-lat geometry local adaptive thresholding
|
||||
-level value adjust the level of image contrast
|
||||
-level-colors color,color
|
||||
level image with the given colors
|
||||
-linear-stretch geometry
|
||||
improve contrast by `stretching with saturation'
|
||||
-liquid-rescale geometry
|
||||
rescale image with seam-carving
|
||||
-local-contrast geometry
|
||||
enhance local contrast
|
||||
-magnify double the size of the image with pixel art scaling
|
||||
-mean-shift geometry delineate arbitrarily shaped clusters in the image
|
||||
-median geometry apply a median filter to the image
|
||||
-mode geometry make each pixel the 'predominant color' of the
|
||||
neighborhood
|
||||
-modulate value vary the brightness, saturation, and hue
|
||||
-monochrome transform image to black and white
|
||||
-morphology method kernel
|
||||
apply a morphology method to the image
|
||||
-motion-blur geometry
|
||||
simulate motion blur
|
||||
-negate replace every pixel with its complementary color
|
||||
-noise geometry add or reduce noise in an image
|
||||
-normalize transform image to span the full range of colors
|
||||
-opaque color change this color to the fill color
|
||||
-ordered-dither NxN
|
||||
add a noise pattern to the image with specific
|
||||
amplitudes
|
||||
-paint radius simulate an oil painting
|
||||
-perceptible epsilon
|
||||
pixel value less than |epsilon| become epsilon or
|
||||
-epsilon
|
||||
-polaroid angle simulate a Polaroid picture
|
||||
-posterize levels reduce the image to a limited number of color levels
|
||||
-profile filename add, delete, or apply an image profile
|
||||
-quantize colorspace reduce colors in this colorspace
|
||||
-radial-blur angle radial blur the image (deprecated use -rotational-blur
|
||||
-raise value lighten/darken image edges to create a 3-D effect
|
||||
-random-threshold low,high
|
||||
random threshold the image
|
||||
-region geometry apply options to a portion of the image
|
||||
-render render vector graphics
|
||||
-repage geometry size and location of an image canvas
|
||||
-resample geometry change the resolution of an image
|
||||
-resize geometry resize the image
|
||||
-roll geometry roll an image vertically or horizontally
|
||||
-rotate degrees apply Paeth rotation to the image
|
||||
-rotational-blur angle
|
||||
rotational blur the image
|
||||
-sample geometry scale image with pixel sampling
|
||||
-scale geometry scale the image
|
||||
-segment values segment an image
|
||||
-selective-blur geometry
|
||||
selectively blur pixels within a contrast threshold
|
||||
-sepia-tone threshold
|
||||
simulate a sepia-toned photo
|
||||
-set property value set an image property
|
||||
-shade degrees shade the image using a distant light source
|
||||
-shadow geometry simulate an image shadow
|
||||
-sharpen geometry sharpen the image
|
||||
-shave geometry shave pixels from the image edges
|
||||
-shear geometry slide one edge of the image along the X or Y axis
|
||||
-sigmoidal-contrast geometry
|
||||
increase the contrast without saturating highlights or
|
||||
shadows
|
||||
-sketch geometry simulate a pencil sketch
|
||||
-solarize threshold negate all pixels above the threshold level
|
||||
-sparse-color method args
|
||||
fill in a image based on a few color points
|
||||
-splice geometry splice the background color into the image
|
||||
-spread radius displace image pixels by a random amount
|
||||
-statistic type geometry
|
||||
replace each pixel with corresponding statistic from the
|
||||
neighborhood
|
||||
-strip strip image of all profiles and comments
|
||||
-swirl degrees swirl image pixels about the center
|
||||
-threshold value threshold the image
|
||||
-thumbnail geometry create a thumbnail of the image
|
||||
-tile filename tile image when filling a graphic primitive
|
||||
-tint value tint the image with the fill color
|
||||
-transform affine transform image
|
||||
-transparent color make this color transparent within the image
|
||||
-transpose flip image vertically and rotate 90 degrees
|
||||
-transverse flop image horizontally and rotate 270 degrees
|
||||
-trim trim image edges
|
||||
-type type image type
|
||||
-unique-colors discard all but one of any pixel color
|
||||
-unsharp geometry sharpen the image
|
||||
-vignette geometry soften the edges of the image in vignette style
|
||||
-wave geometry alter an image along a sine wave
|
||||
-wavelet-denoise threshold
|
||||
removes noise from the image using a wavelet transform
|
||||
-white-threshold value
|
||||
force all pixels above the threshold into white
|
||||
|
||||
Image Sequence Operators:
|
||||
-append append an image sequence
|
||||
-clut apply a color lookup table to the image
|
||||
-coalesce merge a sequence of images
|
||||
-combine combine a sequence of images
|
||||
-compare mathematically and visually annotate the difference between an image and its reconstruction
|
||||
-complex operator perform complex mathematics on an image sequence
|
||||
-composite composite image
|
||||
-copy geometry offset
|
||||
copy pixels from one area of an image to another
|
||||
-crop geometry cut out a rectangular region of the image
|
||||
-deconstruct break down an image sequence into constituent parts
|
||||
-evaluate-sequence operator
|
||||
evaluate an arithmetic, relational, or logical expression
|
||||
-flatten flatten a sequence of images
|
||||
-fx expression apply mathematical expression to an image channel(s)
|
||||
-hald-clut apply a Hald color lookup table to the image
|
||||
-layers method optimize, merge, or compare image layers
|
||||
-morph value morph an image sequence
|
||||
-mosaic create a mosaic from an image sequence
|
||||
-poly terms build a polynomial from the image sequence and the corresponding
|
||||
terms (coefficients and degree pairs).
|
||||
-print string interpret string and print to console
|
||||
-process arguments process the image with a custom image filter
|
||||
-separate separate an image channel into a grayscale image
|
||||
-smush geometry smush an image sequence together
|
||||
-write filename write images to this file
|
||||
|
||||
Image Stack Operators:
|
||||
-clone indexes clone an image
|
||||
-delete indexes delete the image from the image sequence
|
||||
-duplicate count,indexes
|
||||
duplicate an image one or more times
|
||||
-insert index insert last image into the image sequence
|
||||
-reverse reverse image sequence
|
||||
-swap indexes swap two images in the image sequence
|
||||
|
||||
Miscellaneous Options:
|
||||
-debug events display copious debugging information
|
||||
-distribute-cache port
|
||||
distributed pixel cache spanning one or more servers
|
||||
-help print program options
|
||||
-list type print a list of supported option arguments
|
||||
-log format format of debugging information
|
||||
-version print version information
|
||||
|
||||
By default, the image format of `file' is determined by its magic
|
||||
number. To specify a particular image format, precede the filename
|
||||
with an image format name and a colon (i.e. ps:image) or specify the
|
||||
image type as the filename suffix (i.e. image.ps). Specify 'file' as
|
||||
'-' for standard input or output.
|
||||
|
After Width: | Height: | Size: 67 KiB |
|
After Width: | Height: | Size: 67 KiB |
|
After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 6.4 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 1003 B |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 6.4 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 50 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,97 @@
|
||||
#fancybox-buttons {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
z-index: 8050;
|
||||
}
|
||||
|
||||
#fancybox-buttons.top {
|
||||
top: 10px;
|
||||
}
|
||||
|
||||
#fancybox-buttons.bottom {
|
||||
bottom: 10px;
|
||||
}
|
||||
|
||||
#fancybox-buttons ul {
|
||||
display: block;
|
||||
width: 166px;
|
||||
height: 30px;
|
||||
margin: 0 auto;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
border: 1px solid #111;
|
||||
border-radius: 3px;
|
||||
-webkit-box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
|
||||
-moz-box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
|
||||
box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
|
||||
background: rgb(50,50,50);
|
||||
background: -moz-linear-gradient(top, rgb(68,68,68) 0%, rgb(52,52,52) 50%, rgb(41,41,41) 50%, rgb(51,51,51) 100%);
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgb(68,68,68)), color-stop(50%,rgb(52,52,52)), color-stop(50%,rgb(41,41,41)), color-stop(100%,rgb(51,51,51)));
|
||||
background: -webkit-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%);
|
||||
background: -o-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%);
|
||||
background: -ms-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%);
|
||||
background: linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#444444', endColorstr='#222222',GradientType=0 );
|
||||
}
|
||||
|
||||
#fancybox-buttons ul li {
|
||||
float: left;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#fancybox-buttons a {
|
||||
display: block;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
text-indent: -9999px;
|
||||
background-color: transparent;
|
||||
background-image: url('fancybox_buttons.png');
|
||||
background-repeat: no-repeat;
|
||||
outline: none;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
#fancybox-buttons a:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
#fancybox-buttons a.btnPrev {
|
||||
background-position: 5px 0;
|
||||
}
|
||||
|
||||
#fancybox-buttons a.btnNext {
|
||||
background-position: -33px 0;
|
||||
border-right: 1px solid #3e3e3e;
|
||||
}
|
||||
|
||||
#fancybox-buttons a.btnPlay {
|
||||
background-position: 0 -30px;
|
||||
}
|
||||
|
||||
#fancybox-buttons a.btnPlayOn {
|
||||
background-position: -30px -30px;
|
||||
}
|
||||
|
||||
#fancybox-buttons a.btnToggle {
|
||||
background-position: 3px -60px;
|
||||
border-left: 1px solid #111;
|
||||
border-right: 1px solid #3e3e3e;
|
||||
width: 35px
|
||||
}
|
||||
|
||||
#fancybox-buttons a.btnToggleOn {
|
||||
background-position: -27px -60px;
|
||||
}
|
||||
|
||||
#fancybox-buttons a.btnClose {
|
||||
border-left: 1px solid #111;
|
||||
width: 35px;
|
||||
background-position: -56px 0px;
|
||||
}
|
||||
|
||||
#fancybox-buttons a.btnDisabled {
|
||||
opacity : 0.4;
|
||||
cursor: default;
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
/*!
|
||||
* Buttons helper for fancyBox
|
||||
* version: 1.0.5 (Mon, 15 Oct 2012)
|
||||
* @requires fancyBox v2.0 or later
|
||||
*
|
||||
* Usage:
|
||||
* $(".fancybox").fancybox({
|
||||
* helpers : {
|
||||
* buttons: {
|
||||
* position : 'top'
|
||||
* }
|
||||
* }
|
||||
* });
|
||||
*
|
||||
*/
|
||||
(function ($) {
|
||||
//Shortcut for fancyBox object
|
||||
var F = $.fancybox;
|
||||
|
||||
//Add helper object
|
||||
F.helpers.buttons = {
|
||||
defaults : {
|
||||
skipSingle : false, // disables if gallery contains single image
|
||||
position : 'top', // 'top' or 'bottom'
|
||||
tpl : '<div id="fancybox-buttons"><ul><li><a class="btnPrev" title="Previous" href="javascript:;"></a></li><li><a class="btnPlay" title="Start slideshow" href="javascript:;"></a></li><li><a class="btnNext" title="Next" href="javascript:;"></a></li><li><a class="btnToggle" title="Toggle size" href="javascript:;"></a></li><li><a class="btnClose" title="Close" href="javascript:;"></a></li></ul></div>'
|
||||
},
|
||||
|
||||
list : null,
|
||||
buttons: null,
|
||||
|
||||
beforeLoad: function (opts, obj) {
|
||||
//Remove self if gallery do not have at least two items
|
||||
|
||||
if (opts.skipSingle && obj.group.length < 2) {
|
||||
obj.helpers.buttons = false;
|
||||
obj.closeBtn = true;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//Increase top margin to give space for buttons
|
||||
obj.margin[ opts.position === 'bottom' ? 2 : 0 ] += 30;
|
||||
},
|
||||
|
||||
onPlayStart: function () {
|
||||
if (this.buttons) {
|
||||
this.buttons.play.attr('title', 'Pause slideshow').addClass('btnPlayOn');
|
||||
}
|
||||
},
|
||||
|
||||
onPlayEnd: function () {
|
||||
if (this.buttons) {
|
||||
this.buttons.play.attr('title', 'Start slideshow').removeClass('btnPlayOn');
|
||||
}
|
||||
},
|
||||
|
||||
afterShow: function (opts, obj) {
|
||||
var buttons = this.buttons;
|
||||
|
||||
if (!buttons) {
|
||||
this.list = $(opts.tpl).addClass(opts.position).appendTo('body');
|
||||
|
||||
buttons = {
|
||||
prev : this.list.find('.btnPrev').click( F.prev ),
|
||||
next : this.list.find('.btnNext').click( F.next ),
|
||||
play : this.list.find('.btnPlay').click( F.play ),
|
||||
toggle : this.list.find('.btnToggle').click( F.toggle ),
|
||||
close : this.list.find('.btnClose').click( F.close )
|
||||
}
|
||||
}
|
||||
|
||||
//Prev
|
||||
if (obj.index > 0 || obj.loop) {
|
||||
buttons.prev.removeClass('btnDisabled');
|
||||
} else {
|
||||
buttons.prev.addClass('btnDisabled');
|
||||
}
|
||||
|
||||
//Next / Play
|
||||
if (obj.loop || obj.index < obj.group.length - 1) {
|
||||
buttons.next.removeClass('btnDisabled');
|
||||
buttons.play.removeClass('btnDisabled');
|
||||
|
||||
} else {
|
||||
buttons.next.addClass('btnDisabled');
|
||||
buttons.play.addClass('btnDisabled');
|
||||
}
|
||||
|
||||
this.buttons = buttons;
|
||||
|
||||
this.onUpdate(opts, obj);
|
||||
},
|
||||
|
||||
onUpdate: function (opts, obj) {
|
||||
var toggle;
|
||||
|
||||
if (!this.buttons) {
|
||||
return;
|
||||
}
|
||||
|
||||
toggle = this.buttons.toggle.removeClass('btnDisabled btnToggleOn');
|
||||
|
||||
//Size toggle button
|
||||
if (obj.canShrink) {
|
||||
toggle.addClass('btnToggleOn');
|
||||
|
||||
} else if (!obj.canExpand) {
|
||||
toggle.addClass('btnDisabled');
|
||||
}
|
||||
},
|
||||
|
||||
beforeClose: function () {
|
||||
if (this.list) {
|
||||
this.list.remove();
|
||||
}
|
||||
|
||||
this.list = null;
|
||||
this.buttons = null;
|
||||
}
|
||||
};
|
||||
|
||||
}(jQuery));
|
||||
@@ -0,0 +1,199 @@
|
||||
/*!
|
||||
* Media helper for fancyBox
|
||||
* version: 1.0.6 (Fri, 14 Jun 2013)
|
||||
* @requires fancyBox v2.0 or later
|
||||
*
|
||||
* Usage:
|
||||
* $(".fancybox").fancybox({
|
||||
* helpers : {
|
||||
* media: true
|
||||
* }
|
||||
* });
|
||||
*
|
||||
* Set custom URL parameters:
|
||||
* $(".fancybox").fancybox({
|
||||
* helpers : {
|
||||
* media: {
|
||||
* youtube : {
|
||||
* params : {
|
||||
* autoplay : 0
|
||||
* }
|
||||
* }
|
||||
* }
|
||||
* }
|
||||
* });
|
||||
*
|
||||
* Or:
|
||||
* $(".fancybox").fancybox({,
|
||||
* helpers : {
|
||||
* media: true
|
||||
* },
|
||||
* youtube : {
|
||||
* autoplay: 0
|
||||
* }
|
||||
* });
|
||||
*
|
||||
* Supports:
|
||||
*
|
||||
* Youtube
|
||||
* http://www.youtube.com/watch?v=opj24KnzrWo
|
||||
* http://www.youtube.com/embed/opj24KnzrWo
|
||||
* http://youtu.be/opj24KnzrWo
|
||||
* http://www.youtube-nocookie.com/embed/opj24KnzrWo
|
||||
* Vimeo
|
||||
* http://vimeo.com/40648169
|
||||
* http://vimeo.com/channels/staffpicks/38843628
|
||||
* http://vimeo.com/groups/surrealism/videos/36516384
|
||||
* http://player.vimeo.com/video/45074303
|
||||
* Metacafe
|
||||
* http://www.metacafe.com/watch/7635964/dr_seuss_the_lorax_movie_trailer/
|
||||
* http://www.metacafe.com/watch/7635964/
|
||||
* Dailymotion
|
||||
* http://www.dailymotion.com/video/xoytqh_dr-seuss-the-lorax-premiere_people
|
||||
* Twitvid
|
||||
* http://twitvid.com/QY7MD
|
||||
* Twitpic
|
||||
* http://twitpic.com/7p93st
|
||||
* Instagram
|
||||
* http://instagr.am/p/IejkuUGxQn/
|
||||
* http://instagram.com/p/IejkuUGxQn/
|
||||
* Google maps
|
||||
* http://maps.google.com/maps?q=Eiffel+Tower,+Avenue+Gustave+Eiffel,+Paris,+France&t=h&z=17
|
||||
* http://maps.google.com/?ll=48.857995,2.294297&spn=0.007666,0.021136&t=m&z=16
|
||||
* http://maps.google.com/?ll=48.859463,2.292626&spn=0.000965,0.002642&t=m&z=19&layer=c&cbll=48.859524,2.292532&panoid=YJ0lq28OOy3VT2IqIuVY0g&cbp=12,151.58,,0,-15.56
|
||||
*/
|
||||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
//Shortcut for fancyBox object
|
||||
var F = $.fancybox,
|
||||
format = function( url, rez, params ) {
|
||||
params = params || '';
|
||||
|
||||
if ( $.type( params ) === "object" ) {
|
||||
params = $.param(params, true);
|
||||
}
|
||||
|
||||
$.each(rez, function(key, value) {
|
||||
url = url.replace( '$' + key, value || '' );
|
||||
});
|
||||
|
||||
if (params.length) {
|
||||
url += ( url.indexOf('?') > 0 ? '&' : '?' ) + params;
|
||||
}
|
||||
|
||||
return url;
|
||||
};
|
||||
|
||||
//Add helper object
|
||||
F.helpers.media = {
|
||||
defaults : {
|
||||
youtube : {
|
||||
matcher : /(youtube\.com|youtu\.be|youtube-nocookie\.com)\/(watch\?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*)).*/i,
|
||||
params : {
|
||||
autoplay : 1,
|
||||
autohide : 1,
|
||||
fs : 1,
|
||||
rel : 0,
|
||||
hd : 1,
|
||||
wmode : 'opaque',
|
||||
enablejsapi : 1
|
||||
},
|
||||
type : 'iframe',
|
||||
url : '//www.youtube.com/embed/$3'
|
||||
},
|
||||
vimeo : {
|
||||
matcher : /(?:vimeo(?:pro)?.com)\/(?:[^\d]+)?(\d+)(?:.*)/,
|
||||
params : {
|
||||
autoplay : 1,
|
||||
hd : 1,
|
||||
show_title : 1,
|
||||
show_byline : 1,
|
||||
show_portrait : 0,
|
||||
fullscreen : 1
|
||||
},
|
||||
type : 'iframe',
|
||||
url : '//player.vimeo.com/video/$1'
|
||||
},
|
||||
metacafe : {
|
||||
matcher : /metacafe.com\/(?:watch|fplayer)\/([\w\-]{1,10})/,
|
||||
params : {
|
||||
autoPlay : 'yes'
|
||||
},
|
||||
type : 'swf',
|
||||
url : function( rez, params, obj ) {
|
||||
obj.swf.flashVars = 'playerVars=' + $.param( params, true );
|
||||
|
||||
return '//www.metacafe.com/fplayer/' + rez[1] + '/.swf';
|
||||
}
|
||||
},
|
||||
dailymotion : {
|
||||
matcher : /dailymotion.com\/video\/(.*)\/?(.*)/,
|
||||
params : {
|
||||
additionalInfos : 0,
|
||||
autoStart : 1
|
||||
},
|
||||
type : 'swf',
|
||||
url : '//www.dailymotion.com/swf/video/$1'
|
||||
},
|
||||
twitvid : {
|
||||
matcher : /twitvid\.com\/([a-zA-Z0-9_\-\?\=]+)/i,
|
||||
params : {
|
||||
autoplay : 0
|
||||
},
|
||||
type : 'iframe',
|
||||
url : '//www.twitvid.com/embed.php?guid=$1'
|
||||
},
|
||||
twitpic : {
|
||||
matcher : /twitpic\.com\/(?!(?:place|photos|events)\/)([a-zA-Z0-9\?\=\-]+)/i,
|
||||
type : 'image',
|
||||
url : '//twitpic.com/show/full/$1/'
|
||||
},
|
||||
instagram : {
|
||||
matcher : /(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,
|
||||
type : 'image',
|
||||
url : '//$1/p/$2/media/?size=l'
|
||||
},
|
||||
google_maps : {
|
||||
matcher : /maps\.google\.([a-z]{2,3}(\.[a-z]{2})?)\/(\?ll=|maps\?)(.*)/i,
|
||||
type : 'iframe',
|
||||
url : function( rez ) {
|
||||
return '//maps.google.' + rez[1] + '/' + rez[3] + '' + rez[4] + '&output=' + (rez[4].indexOf('layer=c') > 0 ? 'svembed' : 'embed');
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
beforeLoad : function(opts, obj) {
|
||||
var url = obj.href || '',
|
||||
type = false,
|
||||
what,
|
||||
item,
|
||||
rez,
|
||||
params;
|
||||
|
||||
for (what in opts) {
|
||||
if (opts.hasOwnProperty(what)) {
|
||||
item = opts[ what ];
|
||||
rez = url.match( item.matcher );
|
||||
|
||||
if (rez) {
|
||||
type = item.type;
|
||||
params = $.extend(true, {}, item.params, obj[ what ] || ($.isPlainObject(opts[ what ]) ? opts[ what ].params : null));
|
||||
|
||||
url = $.type( item.url ) === "function" ? item.url.call( this, rez, params, obj ) : format( item.url, rez, params );
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (type) {
|
||||
obj.href = url;
|
||||
obj.type = type;
|
||||
|
||||
obj.autoHeight = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}(jQuery));
|
||||
@@ -0,0 +1,55 @@
|
||||
#fancybox-thumbs {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
z-index: 8050;
|
||||
}
|
||||
|
||||
#fancybox-thumbs.bottom {
|
||||
bottom: 2px;
|
||||
}
|
||||
|
||||
#fancybox-thumbs.top {
|
||||
top: 2px;
|
||||
}
|
||||
|
||||
#fancybox-thumbs ul {
|
||||
position: relative;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#fancybox-thumbs ul li {
|
||||
float: left;
|
||||
padding: 1px;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
#fancybox-thumbs ul li.active {
|
||||
opacity: 0.75;
|
||||
padding: 0;
|
||||
border: 1px solid #fff;
|
||||
}
|
||||
|
||||
#fancybox-thumbs ul li:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
#fancybox-thumbs ul li a {
|
||||
display: block;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
border: 1px solid #222;
|
||||
background: #111;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
#fancybox-thumbs ul li img {
|
||||
display: block;
|
||||
position: relative;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
max-width: none;
|
||||
}
|
||||
@@ -0,0 +1,162 @@
|
||||
/*!
|
||||
* Thumbnail helper for fancyBox
|
||||
* version: 1.0.7 (Mon, 01 Oct 2012)
|
||||
* @requires fancyBox v2.0 or later
|
||||
*
|
||||
* Usage:
|
||||
* $(".fancybox").fancybox({
|
||||
* helpers : {
|
||||
* thumbs: {
|
||||
* width : 50,
|
||||
* height : 50
|
||||
* }
|
||||
* }
|
||||
* });
|
||||
*
|
||||
*/
|
||||
(function ($) {
|
||||
//Shortcut for fancyBox object
|
||||
var F = $.fancybox;
|
||||
|
||||
//Add helper object
|
||||
F.helpers.thumbs = {
|
||||
defaults : {
|
||||
width : 50, // thumbnail width
|
||||
height : 50, // thumbnail height
|
||||
position : 'bottom', // 'top' or 'bottom'
|
||||
source : function ( item ) { // function to obtain the URL of the thumbnail image
|
||||
var href;
|
||||
|
||||
if (item.element) {
|
||||
href = $(item.element).find('img').attr('src');
|
||||
}
|
||||
|
||||
if (!href && item.type === 'image' && item.href) {
|
||||
href = item.href;
|
||||
}
|
||||
|
||||
return href;
|
||||
}
|
||||
},
|
||||
|
||||
wrap : null,
|
||||
list : null,
|
||||
width : 0,
|
||||
|
||||
init: function (opts, obj) {
|
||||
var that = this,
|
||||
list,
|
||||
thumbWidth = opts.width,
|
||||
thumbHeight = opts.height,
|
||||
thumbSource = opts.source;
|
||||
|
||||
//Build list structure
|
||||
list = '';
|
||||
|
||||
for (var n = 0; n < obj.group.length; n++) {
|
||||
list += '<li><a style="width:' + thumbWidth + 'px;height:' + thumbHeight + 'px;" href="javascript:jQuery.fancybox.jumpto(' + n + ');"></a></li>';
|
||||
}
|
||||
|
||||
this.wrap = $('<div id="fancybox-thumbs"></div>').addClass(opts.position).appendTo('body');
|
||||
this.list = $('<ul>' + list + '</ul>').appendTo(this.wrap);
|
||||
|
||||
//Load each thumbnail
|
||||
$.each(obj.group, function (i) {
|
||||
var href = thumbSource( obj.group[ i ] );
|
||||
|
||||
if (!href) {
|
||||
return;
|
||||
}
|
||||
|
||||
$("<img />").load(function () {
|
||||
var width = this.width,
|
||||
height = this.height,
|
||||
widthRatio, heightRatio, parent;
|
||||
|
||||
if (!that.list || !width || !height) {
|
||||
return;
|
||||
}
|
||||
|
||||
//Calculate thumbnail width/height and center it
|
||||
widthRatio = width / thumbWidth;
|
||||
heightRatio = height / thumbHeight;
|
||||
|
||||
parent = that.list.children().eq(i).find('a');
|
||||
|
||||
if (widthRatio >= 1 && heightRatio >= 1) {
|
||||
if (widthRatio > heightRatio) {
|
||||
width = Math.floor(width / heightRatio);
|
||||
height = thumbHeight;
|
||||
|
||||
} else {
|
||||
width = thumbWidth;
|
||||
height = Math.floor(height / widthRatio);
|
||||
}
|
||||
}
|
||||
|
||||
$(this).css({
|
||||
width : width,
|
||||
height : height,
|
||||
top : Math.floor(thumbHeight / 2 - height / 2),
|
||||
left : Math.floor(thumbWidth / 2 - width / 2)
|
||||
});
|
||||
|
||||
parent.width(thumbWidth).height(thumbHeight);
|
||||
|
||||
$(this).hide().appendTo(parent).fadeIn(300);
|
||||
|
||||
}).attr('src', href);
|
||||
});
|
||||
|
||||
//Set initial width
|
||||
this.width = this.list.children().eq(0).outerWidth(true);
|
||||
|
||||
this.list.width(this.width * (obj.group.length + 1)).css('left', Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5)));
|
||||
},
|
||||
|
||||
beforeLoad: function (opts, obj) {
|
||||
//Remove self if gallery do not have at least two items
|
||||
if (obj.group.length < 2) {
|
||||
obj.helpers.thumbs = false;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//Increase bottom margin to give space for thumbs
|
||||
obj.margin[ opts.position === 'top' ? 0 : 2 ] += ((opts.height) + 15);
|
||||
},
|
||||
|
||||
afterShow: function (opts, obj) {
|
||||
//Check if exists and create or update list
|
||||
if (this.list) {
|
||||
this.onUpdate(opts, obj);
|
||||
|
||||
} else {
|
||||
this.init(opts, obj);
|
||||
}
|
||||
|
||||
//Set active element
|
||||
this.list.children().removeClass('active').eq(obj.index).addClass('active');
|
||||
},
|
||||
|
||||
//Center list
|
||||
onUpdate: function (opts, obj) {
|
||||
if (this.list) {
|
||||
this.list.stop(true).animate({
|
||||
'left': Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5))
|
||||
}, 150);
|
||||
}
|
||||
},
|
||||
|
||||
beforeClose: function () {
|
||||
if (this.wrap) {
|
||||
this.wrap.remove();
|
||||
}
|
||||
|
||||
this.wrap = null;
|
||||
this.list = null;
|
||||
this.width = 0;
|
||||
}
|
||||
}
|
||||
|
||||
}(jQuery));
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 991 B |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 847 B |
|
After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 899 B |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 62 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 51 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 90 B |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 7.5 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 2.9 KiB |