4.39 update.
parent
59cd53a5b5
commit
eeadf4aeab
File diff suppressed because one or more lines are too long
|
@ -292,6 +292,35 @@ function array_sort_by($records, $field, $reverse=false){
|
|||
return $records;
|
||||
}
|
||||
|
||||
if (!function_exists('array_column')) {
|
||||
function array_column($array, $column_key, $index_key = null) {
|
||||
$column_key_isNumber = (is_numeric($column_key)) ? true : false;
|
||||
$index_key_isNumber = (is_numeric($index_key)) ? true : false;
|
||||
$index_key_isNull = (is_null($index_key)) ? true : false;
|
||||
|
||||
$result = array();
|
||||
foreach((array)$array as $key=>$val){
|
||||
if($column_key_isNumber){
|
||||
$tmp = array_slice($val, $column_key, 1);
|
||||
$tmp = (is_array($tmp) && !empty($tmp)) ? current($tmp) : null;
|
||||
} else {
|
||||
$tmp = isset($val[$column_key]) ? $val[$column_key] : null;
|
||||
}
|
||||
if(!$index_key_isNull){
|
||||
if($index_key_isNumber){
|
||||
$key = array_slice($val, $index_key, 1);
|
||||
$key = (is_array($key) && !empty($key)) ? current($key) : null;
|
||||
$key = is_null($key) ? 0 : $key;
|
||||
}else{
|
||||
$key = isset($val[$index_key]) ? $val[$index_key] : 0;
|
||||
}
|
||||
}
|
||||
$result[$key] = $tmp;
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 遍历数组,对每个元素调用 $callback,假如返回值不为假值,则直接返回该返回值;
|
||||
* 假如每次 $callback 都返回假值,最终返回 false
|
||||
|
@ -416,7 +445,7 @@ function fatalErrorHandler(){
|
|||
}
|
||||
}
|
||||
|
||||
function show_tips($message,$url= '', $time = 3,$title = ''){
|
||||
function show_tips($message,$url= '', $time = 3,$title = '',$exit = true){
|
||||
ob_get_clean();
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
$goto = "content='$time;url=$url'";
|
||||
|
@ -443,7 +472,7 @@ function show_tips($message,$url= '', $time = 3,$title = ''){
|
|||
}
|
||||
if(file_exists(TEMPLATE.'common/showTips.html')){
|
||||
include(TEMPLATE.'common/showTips.html');
|
||||
exit;
|
||||
if($exit){exit;}
|
||||
}
|
||||
echo<<<END
|
||||
<html>
|
||||
|
@ -468,7 +497,7 @@ function show_tips($message,$url= '', $time = 3,$title = ''){
|
|||
</body>
|
||||
</html>
|
||||
END;
|
||||
exit;
|
||||
if($exit){exit;}
|
||||
}
|
||||
function get_caller_info() {
|
||||
$trace = debug_backtrace();
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -656,38 +656,40 @@ var pathTools = (function(){
|
|||
* ['1.595','1.52e7','1.58e3']
|
||||
* 参考
|
||||
* https://github.com/overset/javascript-natural-sort/blob/master/naturalSort.js
|
||||
*
|
||||
* 耗时:暂不加入如下排序支持
|
||||
* 时间戳排序;耗时操作 为兼容国外时间 ['10-12-2008','10-11-2008','10-11-2007','10-12-2007']
|
||||
* var aDate = (new Date(a)).getTime(),bDate = aDate ? (new Date(b)).getTime() : null;
|
||||
* if (bDate){return aDate==bDate?0:(aDate>bDate?1:-1);}
|
||||
*/
|
||||
var isNumeric = function(string){
|
||||
return !isNaN(parseFloat(string)) && isFinite(string)
|
||||
}
|
||||
var substrNumber = function(str,from){
|
||||
res = '';
|
||||
for (var i = from; i < str.length; i++) {
|
||||
var char = str.charAt(i);
|
||||
if(isNumeric(char) || char == '.'){
|
||||
res += char+'';
|
||||
}else{
|
||||
break;
|
||||
}
|
||||
}
|
||||
return parseFloat(res);
|
||||
}
|
||||
var strSort = function(a,b){
|
||||
if(a == undefined ) return 1;
|
||||
if(b == undefined ) return -1;
|
||||
if($.isNumeric(a) && $.isNumeric(b)){
|
||||
a = parseFloat(a);b = parseFloat(b);
|
||||
if(isNumeric(a) && isNumeric(b)){
|
||||
a = parseFloat(a);
|
||||
b = parseFloat(b);
|
||||
return a==b?0:(a>b?1:-1);
|
||||
}
|
||||
/*
|
||||
//时间戳排序;耗时操作 为兼容国外时间 ['10-12-2008','10-11-2008','10-11-2007','10-12-2007']
|
||||
var aDate = (new Date(a)).getTime(),bDate = aDate ? (new Date(b)).getTime() : null;
|
||||
if (bDate){
|
||||
return aDate==bDate?0:(aDate>bDate?1:-1);
|
||||
}
|
||||
*/
|
||||
var substrNumber = function(str,from){
|
||||
res = '';
|
||||
for (var i = from; i < str.length; i++) {
|
||||
var char = str.charAt(i);
|
||||
if($.isNumeric(char) || char == '.'){
|
||||
res += char+'';
|
||||
}else{
|
||||
break;
|
||||
}
|
||||
}
|
||||
return parseFloat(res);
|
||||
}
|
||||
if(a == undefined || b == undefined) return 0;
|
||||
var arr = '零一二三四五六七八九十百千万壹贰叁肆伍陆柒捌玖拾佰仟万';//
|
||||
for (var i=0;i<Math.max(a.length,b.length);i++){
|
||||
var aChar = a.charAt(i),bChar = b.charAt(i);
|
||||
if(aChar == bChar) continue;
|
||||
//连续数字时比较数值;
|
||||
if($.isNumeric(aChar) && $.isNumeric(bChar)){
|
||||
if(isNumeric(aChar) && isNumeric(bChar)){
|
||||
var aNum = substrNumber(a,i),bNum = substrNumber(b,i);
|
||||
if(aNum==bNum){
|
||||
i += aNum.toString().length-1;
|
||||
|
@ -707,7 +709,7 @@ var pathTools = (function(){
|
|||
}else{
|
||||
//英文字符排在中文字符前
|
||||
if( aChar.charCodeAt() < 255 || bChar.charCodeAt() < 255){
|
||||
if(aChar==bChar) continue;
|
||||
if(aChar == bChar) continue;
|
||||
return aChar>bChar?1:-1;
|
||||
}
|
||||
//中文数字排在所有汉字前
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,5 @@
|
|||
/* power by kodexplorer ver 4.39(2019-03-04) [build 1551692904.0277] */
|
||||
/* power by kodexplorer ver 4.39(2019-03-06) [build 1551873230.6625] */
|
||||
@import url('./fileIcon.css');
|
||||
@import url('./common.css');
|
||||
.frame-main{position:absolute;top:40px;width:100%;bottom:0px;}.frame-main .tools-left{background:#f8f8f8 url("../../../images/common/bg.gif") 0 0px;position:fixed;line-height:30px;padding-left:20px;height:28px;border-bottom:1px solid #ddd;left:0;width:100%;}.frame-main .tools-left a{font-size:1.25em;font-weight:800;text-decoration:none;color:#999;text-shadow:0 0 3px;display:inline-block;padding:2px 6px;margin-top:0;height:20px;line-height:20px;}.frame-main .tools-left a:hover{background:url("../../../images/common/buttons_40.png") 0 0px repeat-x;-webkit-box-shadow:0 2px 8px rgba(0,0,0,0.8);-moz-box-shadow:0 2px 8px rgba(0,0,0,0.8);box-shadow:0 2px 8px rgba(0,0,0,0.8);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}.frame-main .frame-left{position:absolute;left:0;top:30px;bottom:0;width:200px;background:#fff;background-attachment:fixed;overflow:auto;}.frame-main .frame-left .ztree{margin-top:0;}.frame-main .frame-left .ztree li.level0{margin-bottom:5px;}.frame-main .frame-resize{width:10px;cursor:col-resize;z-index:100;position:absolute;left:195px;top:0;bottom:0;overflow:hidden;background:url("../../../images/common/resize.png") 0px 50% no-repeat;}.frame-main .frame-resize.active{background:#000;opacity:0.2;filter:alpha(opacity=20);}.frame-main .frame-right{left:200px;right:0;position:absolute;top:0;bottom:0;overflow:auto;}.frame-main .frame-right .frame-right-main .resize-mask{z-index:999;position:absolute;left:0;top:0;bottom:0;right:0;display:none;}.frame-main .frame-right .frame-right-main .frame{height:100%;border-left:1px solid #ddd;overflow:hidden;}
|
||||
/* ver 4.39(2019-03-04) [build 1551692904.0277] */
|
||||
/* ver 4.39(2019-03-06) [build 1551873230.6625] */
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue