0.7.6
This commit is contained in:
52
Yuba.php
52
Yuba.php
@@ -3,11 +3,10 @@
|
|||||||
// Yuba
|
// Yuba
|
||||||
// //
|
// //
|
||||||
//////////////////////////////////////////
|
//////////////////////////////////////////
|
||||||
$version = "0.7.5";
|
$version = "0.7.6";
|
||||||
|
|
||||||
ini_set('memory_limit', '4096M');
|
ini_set('memory_limit', '4096M');
|
||||||
date_default_timezone_set("America/Los_Angeles");
|
date_default_timezone_set("America/Los_Angeles");
|
||||||
$time_start = microtime(true);
|
|
||||||
|
|
||||||
// Includes & Prefs
|
// Includes & Prefs
|
||||||
//////////////////////////////////////////
|
//////////////////////////////////////////
|
||||||
@@ -16,6 +15,8 @@ require("functions.php");
|
|||||||
require("filetypes.php");
|
require("filetypes.php");
|
||||||
|
|
||||||
$wopt_noprofile = 1;
|
$wopt_noprofile = 1;
|
||||||
|
$wopt_steps = 9;
|
||||||
|
$wopt_currstep = 1;
|
||||||
|
|
||||||
$p = unserialize(file_get_contents("prefs.php"));
|
$p = unserialize(file_get_contents("prefs.php"));
|
||||||
|
|
||||||
@@ -97,9 +98,9 @@ echo "Gathering system info...\n";
|
|||||||
$host = gethostname();
|
$host = gethostname();
|
||||||
$disks = shell_exec("diskutil list 2>&1");
|
$disks = shell_exec("diskutil list 2>&1");
|
||||||
$df = shell_exec("df 2>&1");
|
$df = shell_exec("df 2>&1");
|
||||||
$df_volume = shell_exec("df ".$zpath." | tail -n 1 | rev | cut -d' ' -f1 | rev");
|
$df_volume = shell_exec("df ".escapeshellarg($zpath)." | tail -n 1 | rev | cut -d' ' -f1 | rev");
|
||||||
$df_device = shell_exec("df ".$zpath." | tail -n 1 | cut -d' ' -f1");
|
$df_device = shell_exec("df ".escapeshellarg($zpath)." | tail -n 1 | cut -d' ' -f1");
|
||||||
$mdutil = shell_exec("mdutil -s ".$df_volume);
|
$mdutil = shell_exec("mdutil -s ".escapeshellarg($df_volume));
|
||||||
if (strpos($mdutil,"disabled")) {
|
if (strpos($mdutil,"disabled")) {
|
||||||
echo "Warning: spotlight indexing is disabled\n";
|
echo "Warning: spotlight indexing is disabled\n";
|
||||||
$p['spotlight'] = false;
|
$p['spotlight'] = false;
|
||||||
@@ -343,7 +344,7 @@ $family = array();
|
|||||||
$fids = array();
|
$fids = array();
|
||||||
$noread = array();
|
$noread = array();
|
||||||
|
|
||||||
echo ProgressBar::start($passed_total,"Prescan");
|
echo ProgressBar::start($passed_total,"Prescan (".stepString().")");
|
||||||
|
|
||||||
foreach ($files as $splFileInfo) {
|
foreach ($files as $splFileInfo) {
|
||||||
|
|
||||||
@@ -397,7 +398,7 @@ foreach ($files as $splFileInfo) {
|
|||||||
//$family[$pkey]['children'][] = $key;
|
//$family[$pkey]['children'][] = $key;
|
||||||
$family[$pkey]['children'][] = $i+1;
|
$family[$pkey]['children'][] = $i+1;
|
||||||
|
|
||||||
echo ProgressBar::next();
|
echo ProgressBar::next(true);
|
||||||
$i++;
|
$i++;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -407,7 +408,7 @@ echo ProgressBar::finish();
|
|||||||
// Thow permissions error
|
// Thow permissions error
|
||||||
|
|
||||||
if (count($noread)) {
|
if (count($noread)) {
|
||||||
"Current user (".posix_getuid().") does not have read access to the following files:";
|
echo "Current user (".posix_getuid().") does not have read access to the following files:\n";
|
||||||
foreach ($noread as $file) {
|
foreach ($noread as $file) {
|
||||||
echo $file."\n";
|
echo $file."\n";
|
||||||
}
|
}
|
||||||
@@ -471,15 +472,17 @@ $stmt .= "ignored=".$ignored.", ";
|
|||||||
$stmt .= "dupes=".($dupecount ? $dupecount : 0);
|
$stmt .= "dupes=".($dupecount ? $dupecount : 0);
|
||||||
$dbo->exec($stmt);
|
$dbo->exec($stmt);
|
||||||
|
|
||||||
|
$wopt_currstep++;
|
||||||
|
|
||||||
// Contents
|
// Contents
|
||||||
//////////////////////////////////////////
|
//////////////////////////////////////////
|
||||||
|
|
||||||
if ($p['contents']) {
|
if ($p['contents']) {
|
||||||
|
|
||||||
echo "DO CONTENTS HERE\n";
|
echo "DO CONTENTS HERE\n";
|
||||||
// make a dir in the bundle called contents (similar to db)
|
// make a dir in the bundle called contents (similar to thumbs)
|
||||||
// match files smaller than x and with file extension of txt etc
|
// match files smaller than x and with file extension of txt etc
|
||||||
// copy files to hash dirs in bundle (like db dir)
|
// copy files to hash dirs in bundle (like thumbs dir)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -488,7 +491,7 @@ if ($p['contents']) {
|
|||||||
|
|
||||||
if ($p['thumbs']) {
|
if ($p['thumbs']) {
|
||||||
|
|
||||||
echo ProgressBar::start(count($fx),"Generating thumbnails");
|
echo ProgressBar::start(count($fx),"Generating thumbnails (".stepString().")");
|
||||||
|
|
||||||
foreach ($fx as $array) {
|
foreach ($fx as $array) {
|
||||||
|
|
||||||
@@ -566,7 +569,7 @@ if ($p['thumbs']) {
|
|||||||
|
|
||||||
if ($p['meta']) {
|
if ($p['meta']) {
|
||||||
|
|
||||||
echo ProgressBar::start(count($fx),"Collecting external metadata...");
|
echo ProgressBar::start(count($fx),"Collecting external metadata (".stepString().")");
|
||||||
|
|
||||||
foreach ($fx as $array) {
|
foreach ($fx as $array) {
|
||||||
|
|
||||||
@@ -584,7 +587,11 @@ if ($p['meta']) {
|
|||||||
if (in_array($ext, $e_files)) {
|
if (in_array($ext, $e_files)) {
|
||||||
$check = $dbp->query("SELECT EXISTS(SELECT 1 FROM exiftool WHERE fid='".$fid."')")->fetch()[0];
|
$check = $dbp->query("SELECT EXISTS(SELECT 1 FROM exiftool WHERE fid='".$fid."')")->fetch()[0];
|
||||||
if (!$check) {
|
if (!$check) {
|
||||||
$rawexif = eval("return ".`$bin_exiftool -php $shellpath`);
|
$arrstring = shell_exec($bin_exiftool." -php ".$shellpath);
|
||||||
|
// $rawexif = eval("return ".`$bin_exiftool -php $shellpath`);
|
||||||
|
// do an addtl check below to prevent "PHP Parse error: syntax error, unexpected end of file, expecting ';'"
|
||||||
|
if (substr($arrstring,0,5) == "Array") {
|
||||||
|
$rawexif = eval("return ".$arrstring);
|
||||||
$stmt = $dbp->prepare("INSERT INTO exiftool VALUES (:fid, :tags)");
|
$stmt = $dbp->prepare("INSERT INTO exiftool VALUES (:fid, :tags)");
|
||||||
$stmt->BindValue(":fid",$fid);
|
$stmt->BindValue(":fid",$fid);
|
||||||
$stmt->BindValue(":tags",serialize($rawexif[0]));
|
$stmt->BindValue(":tags",serialize($rawexif[0]));
|
||||||
@@ -592,6 +599,7 @@ if ($p['meta']) {
|
|||||||
$found = 0;
|
$found = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (in_array($ext, $m_files)) {
|
if (in_array($ext, $m_files)) {
|
||||||
$check = $dbp->query("SELECT EXISTS(SELECT 1 FROM mediainfo WHERE fid='".$fid."')")->fetch()[0];
|
$check = $dbp->query("SELECT EXISTS(SELECT 1 FROM mediainfo WHERE fid='".$fid."')")->fetch()[0];
|
||||||
@@ -628,7 +636,7 @@ if ($p['hash']) {
|
|||||||
$message = "Generating hashes for all files";
|
$message = "Generating hashes for all files";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo ProgressBar::start(count($fx),$message);
|
echo ProgressBar::start(count($fx),$message." (".stepString().")");
|
||||||
|
|
||||||
foreach ($fx as $array) {
|
foreach ($fx as $array) {
|
||||||
$fid = $array[0];
|
$fid = $array[0];
|
||||||
@@ -698,14 +706,15 @@ $p['spotlight'] = 1;
|
|||||||
|
|
||||||
if ($p['spotlight']) {
|
if ($p['spotlight']) {
|
||||||
|
|
||||||
echo ProgressBar::start($passed_total,"Spotlight");
|
echo ProgressBar::start($passed_total,"Spotlight (".stepString().")");
|
||||||
|
|
||||||
$dbo->exec("CREATE TABLE mdls (".implode(",",$cbuild).")");
|
$dbo->exec("CREATE TABLE mdls (".implode(",",$cbuild).")");
|
||||||
|
|
||||||
foreach ($files as $splFileInfo) {
|
foreach ($files as $splFileInfo) {
|
||||||
|
|
||||||
$pid = md5($splFileInfo->getPathname());
|
$path = $splFileInfo->getPathname();
|
||||||
$shellpath = escapeshellarg($splFileInfo->getPathname());
|
$pid = md5($path);
|
||||||
|
$shellpath = escapeshellarg($path);
|
||||||
$mdls = shell_exec("mdls -plist - ".$shellpath." 2>&1");
|
$mdls = shell_exec("mdls -plist - ".$shellpath." 2>&1");
|
||||||
if (substr_count(@$mdls,"\n") < 2) { continue; }
|
if (substr_count(@$mdls,"\n") < 2) { continue; }
|
||||||
|
|
||||||
@@ -737,7 +746,7 @@ if ($p['spotlight']) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
echo ProgressBar::next();
|
echo ProgressBar::next(true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -802,8 +811,6 @@ echo ProgressBar::start($passed_total,"Skimming");
|
|||||||
|
|
||||||
foreach ($files as $splFileInfo) {
|
foreach ($files as $splFileInfo) {
|
||||||
|
|
||||||
echo "\n";
|
|
||||||
|
|
||||||
// DB
|
// DB
|
||||||
|
|
||||||
$stmt = $dbo->prepare("INSERT INTO files VALUES (:pid, :fid, :Pathname, :Path, :Filename, :Extension, :Type, :Size, :Inode, :Perms, :Owner, :ATime, :CTime, :MTime, :LinkTarget, :RealPath, :stat, :items, :newest, :gfi_type, :gfi_attr, :gfi_created, :has_exif, :has_mediainfo, :has_hash, :thumb_filename, :thumb_width, :thumb_height, :has_contents, :contents_filename)");
|
$stmt = $dbo->prepare("INSERT INTO files VALUES (:pid, :fid, :Pathname, :Path, :Filename, :Extension, :Type, :Size, :Inode, :Perms, :Owner, :ATime, :CTime, :MTime, :LinkTarget, :RealPath, :stat, :items, :newest, :gfi_type, :gfi_attr, :gfi_created, :has_exif, :has_mediainfo, :has_hash, :thumb_filename, :thumb_width, :thumb_height, :has_contents, :contents_filename)");
|
||||||
@@ -853,8 +860,6 @@ foreach ($files as $splFileInfo) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
echo shortlabel($pathname,50);
|
|
||||||
|
|
||||||
// ------------------------------------------------ //
|
// ------------------------------------------------ //
|
||||||
|
|
||||||
// Generate PID and FID
|
// Generate PID and FID
|
||||||
@@ -1005,8 +1010,7 @@ foreach ($files as $splFileInfo) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "\n";
|
echo ProgressBar::next($filename);
|
||||||
echo ProgressBar::next();
|
|
||||||
$j++;
|
$j++;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,11 +5,31 @@
|
|||||||
|
|
||||||
class ProgressBar {
|
class ProgressBar {
|
||||||
|
|
||||||
protected static $done = 0;
|
protected static $time_start;
|
||||||
protected static $total = 0;
|
protected static $time_remain;
|
||||||
|
protected static $time_update;
|
||||||
|
protected static $total;
|
||||||
|
protected static $done;
|
||||||
|
protected static $message;
|
||||||
|
|
||||||
public static function display($message = null) {
|
public static function display($message = null) {
|
||||||
$string = "PROGRESS:".floor((self::$done/self::$total)*100);
|
|
||||||
|
$progress = self::$done/self::$total;
|
||||||
|
$string = "PROGRESS:".round($progress*100,2);
|
||||||
|
|
||||||
|
if ($message === true) {
|
||||||
|
$message = self::$message;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($message) {
|
||||||
|
if (time()-self::$time_update) { // only update the remaining time every 1 seconds
|
||||||
|
$seconds = time() - self::$time_start;
|
||||||
|
self::$time_remain = floor($seconds/$progress)-$seconds;
|
||||||
|
self::$time_update = time();
|
||||||
|
}
|
||||||
|
$message = gmdate("H:i:s",self::$time_remain)." | ".$message;
|
||||||
|
}
|
||||||
|
|
||||||
if ($message) {
|
if ($message) {
|
||||||
return "\n".$string."\n".$message;
|
return "\n".$string."\n".$message;
|
||||||
} elseif (!strpos(__FILE__,".app")) {
|
} elseif (!strpos(__FILE__,".app")) {
|
||||||
@@ -17,10 +37,14 @@ class ProgressBar {
|
|||||||
} else {
|
} else {
|
||||||
return "\n".$string;
|
return "\n".$string;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function start($total, $message = null) {
|
public static function start($total, $message = null) {
|
||||||
|
self::$done = 0;
|
||||||
self::$total = $total;
|
self::$total = $total;
|
||||||
|
self::$time_start = time();
|
||||||
|
self::$message = $message;
|
||||||
return $message."\n".self::display();
|
return $message."\n".self::display();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -30,6 +54,8 @@ class ProgressBar {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static function finish() {
|
public static function finish() {
|
||||||
|
global $wopt_currstep;
|
||||||
|
$wopt_currstep++;
|
||||||
self::$done = 0;
|
self::$done = 0;
|
||||||
return "\n";
|
return "\n";
|
||||||
}
|
}
|
||||||
@@ -50,11 +76,14 @@ function getParents($zpath, $pathname) {
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function stringPrint($string) {
|
function stepString() {
|
||||||
echo $string.@str_repeat(" ", (10-strlen($string)));
|
global $wopt_steps;
|
||||||
|
global $wopt_currstep;
|
||||||
|
return "Step ".$wopt_currstep." of ".$wopt_steps;
|
||||||
}
|
}
|
||||||
|
|
||||||
function shortlabel($pathname, $max = 99, $pad = false) {
|
|
||||||
|
function shortlabel($pathname, $max = 99) {
|
||||||
$basename = basename($pathname);
|
$basename = basename($pathname);
|
||||||
$suffix = "(...).".pathinfo($basename,PATHINFO_EXTENSION);
|
$suffix = "(...).".pathinfo($basename,PATHINFO_EXTENSION);
|
||||||
if (strlen($basename) > $max) {
|
if (strlen($basename) > $max) {
|
||||||
@@ -62,9 +91,6 @@ function shortlabel($pathname, $max = 99, $pad = false) {
|
|||||||
} else {
|
} else {
|
||||||
$return = $basename;
|
$return = $basename;
|
||||||
}
|
}
|
||||||
if ($pad) {
|
|
||||||
$return = $return.@str_repeat(" ", ($max-strlen($return)));
|
|
||||||
}
|
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -185,7 +185,7 @@
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$collapse = !($level+1<=1 || $title===true || (is_string($title) && substr($title,0,1)=='*'));
|
$collapse = !($level+1<=1 || $title===true || (is_string($title) && substr($title,0,1)=='*'));
|
||||||
$collapse = false;
|
$collapse = false; // hack
|
||||||
$result .= "\n<div style='".($collapse?'height:12px':'').";margin-top:2px;margin-bottom:2px;border:1px solid grey;padding:3px;margin-left:15px;background-color:rgb(".(255-($level*10)).",".(255-($level*10)).",".(255-($level*10)).");overflow:hidden;'>\n<div id='tree' style='background-color:silver;font-size:9px;cursor:pointer;float:right;border:1px solid black;width:10px;height:10px;text-align:center;padding:0px;overflow:hidden;' onclick=\"if(this.parentNode.style.height=='12px'){this.parentNode.style.height='';this.innerHTML='-'}else{this.parentNode.style.height='12px';this.innerHTML='+'}\">".($collapse?'+':'-')."</div>";
|
$result .= "\n<div style='".($collapse?'height:12px':'').";margin-top:2px;margin-bottom:2px;border:1px solid grey;padding:3px;margin-left:15px;background-color:rgb(".(255-($level*10)).",".(255-($level*10)).",".(255-($level*10)).");overflow:hidden;'>\n<div id='tree' style='background-color:silver;font-size:9px;cursor:pointer;float:right;border:1px solid black;width:10px;height:10px;text-align:center;padding:0px;overflow:hidden;' onclick=\"if(this.parentNode.style.height=='12px'){this.parentNode.style.height='';this.innerHTML='-'}else{this.parentNode.style.height='12px';this.innerHTML='+'}\">".($collapse?'+':'-')."</div>";
|
||||||
}
|
}
|
||||||
$result .= debug ($value, $title, $plain, $limit, $level+1);
|
$result .= debug ($value, $title, $plain, $limit, $level+1);
|
||||||
|
|||||||
119
web/lib/powerange/powerange.css
Normal file
119
web/lib/powerange/powerange.css
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* Main stylesheet for Powerange.
|
||||||
|
* http://abpetkov.github.io/powerange/
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Horizontal slider style (default).
|
||||||
|
*/
|
||||||
|
|
||||||
|
.range-bar {
|
||||||
|
background-color: #a9acb1;
|
||||||
|
border-radius: 15px;
|
||||||
|
display: block;
|
||||||
|
height: 4px;
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.range-quantity {
|
||||||
|
background-color: #017afd;
|
||||||
|
border-radius: 15px;
|
||||||
|
display: block;
|
||||||
|
height: 100%;
|
||||||
|
width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.range-handle {
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 100%;
|
||||||
|
cursor: move;
|
||||||
|
height: 30px;
|
||||||
|
left: 0;
|
||||||
|
top: -13px;
|
||||||
|
position: absolute;
|
||||||
|
width: 30px;
|
||||||
|
|
||||||
|
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
|
||||||
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.range-min,
|
||||||
|
.range-max {
|
||||||
|
color: #181819;
|
||||||
|
font-size: 12px;
|
||||||
|
height: 20px;
|
||||||
|
padding-top: 4px;
|
||||||
|
position: absolute;
|
||||||
|
text-align: center;
|
||||||
|
top: -9px;
|
||||||
|
width: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.range-min {
|
||||||
|
left: -30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.range-max {
|
||||||
|
right: -30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Vertical slider style.
|
||||||
|
*/
|
||||||
|
|
||||||
|
.vertical {
|
||||||
|
height: 100%;
|
||||||
|
width: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vertical .range-quantity {
|
||||||
|
bottom: 0;
|
||||||
|
height: 0;
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vertical .range-handle {
|
||||||
|
bottom: 0;
|
||||||
|
left: -13px;
|
||||||
|
top: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vertical .range-min,
|
||||||
|
.vertical .range-max {
|
||||||
|
left: -10px;
|
||||||
|
right: auto;
|
||||||
|
top: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vertical .range-min {
|
||||||
|
bottom: -30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vertical .range-max {
|
||||||
|
top: -30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Style for disabling text selection on handle move.
|
||||||
|
*/
|
||||||
|
|
||||||
|
.unselectable {
|
||||||
|
-webkit-touch-callout: none;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-khtml-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Style for handle cursor on disabled slider.
|
||||||
|
*/
|
||||||
|
|
||||||
|
.range-disabled {
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
1869
web/lib/powerange/powerange.js
Normal file
1869
web/lib/powerange/powerange.js
Normal file
File diff suppressed because it is too large
Load Diff
1
web/lib/powerange/powerange.min.css
vendored
Normal file
1
web/lib/powerange/powerange.min.css
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.range-bar{background-color:#a9acb1;border-radius:15px;display:block;height:4px;position:relative;width:100%}.range-quantity{background-color:#017afd;border-radius:15px;display:block;height:100%;width:0}.range-handle{background-color:#fff;border-radius:100%;cursor:move;height:30px;left:0;top:-13px;position:absolute;width:30px;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.4);box-shadow:0 1px 3px rgba(0,0,0,.4)}.range-min,.range-max{color:#181819;font-size:12px;height:20px;padding-top:4px;position:absolute;text-align:center;top:-9px;width:24px}.range-min{left:-30px}.range-max{right:-30px}.vertical{height:100%;width:4px}.vertical .range-quantity{bottom:0;height:0;position:absolute;width:100%}.vertical .range-handle{bottom:0;left:-13px;top:auto}.vertical .range-min,.vertical .range-max{left:-10px;right:auto;top:auto}.vertical .range-min{bottom:-30px}.vertical .range-max{top:-30px}.unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.range-disabled{cursor:default}
|
||||||
1
web/lib/powerange/powerange.min.js
vendored
Normal file
1
web/lib/powerange/powerange.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
511
web/lib/ref/ref.css
Normal file
511
web/lib/ref/ref.css
Normal file
@@ -0,0 +1,511 @@
|
|||||||
|
.ref{
|
||||||
|
font: normal normal 12px/18px Consolas, "Liberation Mono", Menlo, "Courier New", Courier, monospace;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* reset default styles for these elements */
|
||||||
|
.ref i,
|
||||||
|
.ref span,
|
||||||
|
.ref r,
|
||||||
|
.ref a{
|
||||||
|
font-style: inherit;
|
||||||
|
font-weight: inherit;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
text-align: left;
|
||||||
|
display: inline;
|
||||||
|
text-decoration: inherit;
|
||||||
|
white-space: normal;
|
||||||
|
background: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* meta content (used to generate tooltips) */
|
||||||
|
.ref > div,
|
||||||
|
.ref > t{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* show help cursor when mouse is over an entity with a tooltip */
|
||||||
|
.ref [data-tip],
|
||||||
|
.ref [h]{
|
||||||
|
cursor: help;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* pointer if inside a link */
|
||||||
|
.ref a > [data-tip],
|
||||||
|
.ref a > [h]{
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* links */
|
||||||
|
.ref a{
|
||||||
|
color: inherit;
|
||||||
|
border-bottom: 1px dotted transparent;
|
||||||
|
border-color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* tooltip; note that the js overrides top/left properties, this is why we use margin */
|
||||||
|
#rTip{
|
||||||
|
display: none;
|
||||||
|
position: absolute;
|
||||||
|
z-index: 99999;
|
||||||
|
font-size: 12px;
|
||||||
|
white-space: pre;
|
||||||
|
text-align: left;
|
||||||
|
text-shadow: 0 -1px 0 #191919;
|
||||||
|
line-height: 16px;
|
||||||
|
background: #222;
|
||||||
|
color: #888;
|
||||||
|
border: 0;
|
||||||
|
border-radius: 4px;
|
||||||
|
opacity: 0.90;
|
||||||
|
box-shadow:0 0 4px rgba(0,0,0, 0.25);
|
||||||
|
-webkit-transition: opacity .25s, margin .25s;
|
||||||
|
transition: opacity .25s, margin .25s;
|
||||||
|
}
|
||||||
|
|
||||||
|
#rTip.visible{
|
||||||
|
display: table;
|
||||||
|
margin: 10px 0 0 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#rTip.visible.fadingOut{
|
||||||
|
opacity: 0;
|
||||||
|
margin: 20px 0 0 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#rTip [data-cell],
|
||||||
|
#rTip [c]{
|
||||||
|
padding: 2px 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#rTip [data-title], #rTip [data-desc]{
|
||||||
|
padding: 8px;
|
||||||
|
display: block;
|
||||||
|
color: #ccc;
|
||||||
|
}
|
||||||
|
|
||||||
|
#rTip [data-desc]{
|
||||||
|
padding-top: 0px;
|
||||||
|
color: #777;
|
||||||
|
}
|
||||||
|
|
||||||
|
#rTip [data-cell][data-varType],
|
||||||
|
#rTip [c][data-varType]{
|
||||||
|
padding: 10px;
|
||||||
|
background: #333;
|
||||||
|
box-shadow: inset -1px 0 0 #444;
|
||||||
|
border-right:1px solid #111;
|
||||||
|
border-top-left-radius: 4px;
|
||||||
|
border-bottom-left-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#rTip [data-cell][data-sub],
|
||||||
|
#rTip [c][data-sub]{
|
||||||
|
padding: 8px 10px 10px 10px;
|
||||||
|
background: #333;
|
||||||
|
box-shadow: inset 0 1px 0 #444;
|
||||||
|
border-top:1px solid #111;
|
||||||
|
border-bottom-right-radius: 4px;
|
||||||
|
border-bottom-left-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#rTip [data-table] [data-cell]:first-child,
|
||||||
|
#rTip [t] [c]:first-child{
|
||||||
|
font: bold 11px Helvetica, Arial;
|
||||||
|
color: #888;
|
||||||
|
}
|
||||||
|
|
||||||
|
#rTip [data-table] [data-cell]:nth-child(2),
|
||||||
|
#rTip [t] [c]:nth-child(2){
|
||||||
|
color: #edd078;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* base entity - can be nested */
|
||||||
|
.ref span, .ref r{
|
||||||
|
white-space: pre;
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* key-value dividers, property & method modifiers etc. */
|
||||||
|
.ref i{
|
||||||
|
white-space: pre;
|
||||||
|
color: #aaa;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* source expression (input) */
|
||||||
|
.ref [data-input]{
|
||||||
|
margin: 2px 0 0;
|
||||||
|
padding: 2px 7px 3px 4px;
|
||||||
|
display: block;
|
||||||
|
color: #ccc;
|
||||||
|
background-color: #333;
|
||||||
|
background-image: -webkit-linear-gradient(top, #444, #333);
|
||||||
|
background-image: linear-gradient(top, #444, #333);
|
||||||
|
border-radius: 4px 4px 0 0;
|
||||||
|
border-bottom: 1px solid #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ref [data-backtrace]{
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ref [data-output]{
|
||||||
|
background: #f9f9f9;
|
||||||
|
border: 1px solid #eee;
|
||||||
|
border-top: 0;
|
||||||
|
border-radius: 0 0 4px 4px;
|
||||||
|
box-shadow: inset 0px 4px 4px #f3f3f3, inset 0px -8px 8px #fff;
|
||||||
|
padding: 2px 5px;
|
||||||
|
margin: 0 0 4px;
|
||||||
|
text-shadow: 0 1px 0 #fff;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* expand/collapse toggle link for groups */
|
||||||
|
.ref [data-toggle]{
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: -3px;
|
||||||
|
margin-left: 2px;
|
||||||
|
width: 0px;
|
||||||
|
height: 0px;
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 7px 0 7px 10px;
|
||||||
|
border-color: transparent transparent transparent #CC0033;
|
||||||
|
cursor: pointer;
|
||||||
|
-webkit-transition: all ease-in .15s;
|
||||||
|
transition: all ease-in .15s;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* collapse graphic */
|
||||||
|
.ref [data-toggle][data-exp]{
|
||||||
|
-webkit-transform: rotate(90deg);
|
||||||
|
-ms-transform: rotate(90deg);
|
||||||
|
transform: rotate(90deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ref [data-group],
|
||||||
|
.ref [g]{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ref [data-toggle][data-exp] ~ [data-group],
|
||||||
|
.ref [data-toggle][data-exp] ~ [g]{
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* group sections */
|
||||||
|
.ref [data-table],
|
||||||
|
.ref [t]{
|
||||||
|
display: table;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* section titles */
|
||||||
|
.ref [data-tHead]{
|
||||||
|
font: bold 11px Helvetica, Arial;
|
||||||
|
color: #bcbcbc;
|
||||||
|
text-transform: lowercase;
|
||||||
|
margin: 12px 0 2px 10px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* emulate a table for displaying array & object members */
|
||||||
|
/* section row */
|
||||||
|
.ref [data-row],
|
||||||
|
.ref [r]{
|
||||||
|
display: table-row;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* zebra-like rows */
|
||||||
|
.ref [data-output] [data-row]:nth-child(odd){background: #f4f4f4;}
|
||||||
|
.ref [data-output] [data-row]:nth-child(even){background: #f9f9f9;}
|
||||||
|
.ref [data-output] [r]:nth-child(odd){background: #f4f4f4;}
|
||||||
|
.ref [data-output] [r]:nth-child(even){background: #f9f9f9;}
|
||||||
|
|
||||||
|
/* section cells */
|
||||||
|
.ref [data-cell],
|
||||||
|
.ref [c]{
|
||||||
|
display: table-cell;
|
||||||
|
width: auto;
|
||||||
|
vertical-align: top;
|
||||||
|
padding: 1px 0 1px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* last cell of a row (forces table to adjust width like we want to) */
|
||||||
|
.ref [data-output] [data-table],
|
||||||
|
.ref [data-output] [t],
|
||||||
|
.ref [data-output] [data-cell]:last-child,
|
||||||
|
.ref [data-output] [c]:last-child{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* tag-like appearance for boolean, null and resource types */
|
||||||
|
.ref [data-true],
|
||||||
|
.ref [data-false],
|
||||||
|
.ref [data-null],
|
||||||
|
.ref [data-unknown],
|
||||||
|
.ref [data-resource],
|
||||||
|
.ref [data-match],
|
||||||
|
.ref [m]{
|
||||||
|
font: bold 11px Helvetica, Arial;
|
||||||
|
color: #fff;
|
||||||
|
padding: 1px 3px;
|
||||||
|
text-transform: lowercase;
|
||||||
|
text-shadow: none;
|
||||||
|
border-radius: 2px;
|
||||||
|
margin-right: 5px;
|
||||||
|
background-color: #eee;
|
||||||
|
background-image: -webkit-linear-gradient(top, rgba(255,255,255,0.1) 40%,rgba(0,0,0,0.1) 100%);
|
||||||
|
background-image: linear-gradient(to bottom, rgba(255,255,255,0.1) 40%,rgba(0,0,0,0.1) 100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* string matches */
|
||||||
|
.ref [data-match],
|
||||||
|
.ref [m]{
|
||||||
|
background-color: #d78035;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* boolean true */
|
||||||
|
.ref [data-true]{
|
||||||
|
background-color: #339900;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* boolean false */
|
||||||
|
.ref [data-false]{
|
||||||
|
background-color: #CC0033;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* null value */
|
||||||
|
.ref [data-null],
|
||||||
|
.ref [data-unknown]{
|
||||||
|
background-color: #eee;
|
||||||
|
color: #999;
|
||||||
|
text-shadow: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* resources */
|
||||||
|
.ref [data-resource]{
|
||||||
|
background-color: #0057ae;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ref [data-resourceProp]{
|
||||||
|
font: bold 11px Helvetica, Arial;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* integer or double values */
|
||||||
|
.ref [data-integer],
|
||||||
|
.ref [data-double]{
|
||||||
|
color: #0099CC;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* string values */
|
||||||
|
.ref [data-string]{
|
||||||
|
background: #e8f0e1;
|
||||||
|
color: #669933;
|
||||||
|
padding: 3px 1px;
|
||||||
|
|
||||||
|
/* prevent long strings from breaking the page layout */
|
||||||
|
white-space: -moz-pre-wrap; /* Mozilla */
|
||||||
|
white-space: -hp-pre-wrap; /* HP printers */
|
||||||
|
white-space: -o-pre-wrap; /* Opera 7 */
|
||||||
|
white-space: -pre-wrap; /* Opera 4-6 */
|
||||||
|
white-space: pre-wrap; /* CSS 2.1 */
|
||||||
|
white-space: pre-line; /* CSS 3 (and 2.1 as well, actually) */
|
||||||
|
word-wrap: break-word; /* IE */
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ref [data-string][data-special]{
|
||||||
|
background: none;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ref [data-string][data-special] i{
|
||||||
|
background: #faf3dc;
|
||||||
|
color: #d78035;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* arrays & objects */
|
||||||
|
.ref [data-array],
|
||||||
|
.ref [data-array] ~ i,
|
||||||
|
.ref [data-object],
|
||||||
|
.ref [data-object] ~ i,
|
||||||
|
.ref [data-resource] ~ i{
|
||||||
|
color:#CC0033;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ref [data-method]{
|
||||||
|
font-weight: bold;
|
||||||
|
color: #0057ae;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ref [data-const][data-inherited],
|
||||||
|
.ref [data-prop][data-inherited]{
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ref [data-prop][data-private],
|
||||||
|
.ref [data-method][data-private]{
|
||||||
|
color: #CC0033;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* inherited methods */
|
||||||
|
.ref [data-method][data-inherited]{
|
||||||
|
font-weight: bold;
|
||||||
|
color: #6da5de;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* method arguments */
|
||||||
|
.ref [data-param]{
|
||||||
|
font-weight: normal;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* optional method arguments */
|
||||||
|
.ref [data-param][data-optional]{
|
||||||
|
font-style: italic;
|
||||||
|
font-weight: normal;
|
||||||
|
color: #aaa;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* group info prefix */
|
||||||
|
.ref [data-gLabel],
|
||||||
|
.ref [gl]{
|
||||||
|
font: bold 11px Helvetica, Arial;
|
||||||
|
padding: 0 3px;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* tiny bubbles that indicate visibility info or class features */
|
||||||
|
.ref [data-mod]{
|
||||||
|
font: bold 11px Helvetica, Arial;
|
||||||
|
text-shadow: none;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ref [data-input] [data-mod]{
|
||||||
|
color: #444;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ref [data-mod] span,
|
||||||
|
.ref [data-mod] r{
|
||||||
|
display: inline-block;
|
||||||
|
margin: 0 2px;
|
||||||
|
width: 14px;
|
||||||
|
height: 14px;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 30px;
|
||||||
|
line-height: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ref [data-mod-interface],
|
||||||
|
.ref [data-mod-abstract]{
|
||||||
|
background: #baed78;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ref [data-mod-anonymous]{
|
||||||
|
background: #444;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ref [data-mod-protected]{
|
||||||
|
background: #edd078;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ref [data-mod-private]{
|
||||||
|
background: #eea8b9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ref [data-mod-iterateable]{
|
||||||
|
background: #d5dea5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ref [data-mod-cloneable]{
|
||||||
|
background: #bdd7d1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ref [data-mod-final]{
|
||||||
|
background: #78bded;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* regular expression (colors partially match RegexBuddy and RegexPal) */
|
||||||
|
.ref [data-regex]{
|
||||||
|
font-weight: bold;
|
||||||
|
text-shadow: none;
|
||||||
|
padding: 1px 0;
|
||||||
|
background: #e6e6e6;
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* char class */
|
||||||
|
.ref [data-regex-chr]{
|
||||||
|
background: #ffc080;
|
||||||
|
color: #694c07;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ref [data-regex-chr-meta]{background: #e0a060;} /* char class: metasequence */
|
||||||
|
.ref [data-regex-chr-range]{background: #ffcf9b;} /* char class: range-hyphen */
|
||||||
|
|
||||||
|
/* metasequence */
|
||||||
|
.ref [data-regex-meta]{
|
||||||
|
background: #80c0ff;
|
||||||
|
color: #105f8c;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* group: depth 1 */
|
||||||
|
.ref [data-regex-g1]{
|
||||||
|
background: #00c000;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* group: depth 2 */
|
||||||
|
.ref [data-regex-g2]{
|
||||||
|
background: #c3e86c;
|
||||||
|
color: #648c1c;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* group: depth 3 */
|
||||||
|
.ref [data-regex-g3]{
|
||||||
|
background: #008000;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* group: depth 4 */
|
||||||
|
.ref [data-regex-g4]{
|
||||||
|
background: #6dcb99;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* group: depth 5 */
|
||||||
|
.ref [data-regex-g5]{
|
||||||
|
background: #00ff00;
|
||||||
|
color: #2c8e24;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ref [data-error]{
|
||||||
|
background: #CC0033;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 0 0 4px 4px;
|
||||||
|
padding: 2px 5px;
|
||||||
|
margin: 0 0 4px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* make labels and less-relevant text non-selectable */
|
||||||
|
.ref [data-match],
|
||||||
|
.ref [m],
|
||||||
|
.ref [data-tHead],
|
||||||
|
.ref [data-gLabel],
|
||||||
|
.ref [gl],
|
||||||
|
.ref [data-mod]{
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
73
web/lib/ref/ref.js
Normal file
73
web/lib/ref/ref.js
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
window.addEventListener('load', function(){
|
||||||
|
|
||||||
|
var tip = document.createElement('div'),
|
||||||
|
refs = document.querySelectorAll('.ref');
|
||||||
|
|
||||||
|
for(var i = 0, m = refs.length; i < m; i++){
|
||||||
|
var kbds = refs[i].querySelectorAll('[data-toggle]'),
|
||||||
|
tippable = refs[i].querySelectorAll('[data-tip],[h]'),
|
||||||
|
tips = refs[i].querySelectorAll('div, t');
|
||||||
|
|
||||||
|
for(var j = 0, n = kbds.length; j < n; j++){
|
||||||
|
if(kbds[j].parentNode !== refs[i])
|
||||||
|
kbds[j].onclick = function(e){
|
||||||
|
('exp' in this.dataset) ? delete this.dataset.exp : this.dataset.exp = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[].filter.call(tips, function(node){
|
||||||
|
return node.parentNode == refs[i];
|
||||||
|
});
|
||||||
|
|
||||||
|
for(var j = 0, n = tippable.length; j < n; j++){
|
||||||
|
tippable[j].tipRef = tips[tippable[j].dataset.tip] || tips[tippable[j].getAttribute('h')];
|
||||||
|
tippable[j].onmouseover = function(){
|
||||||
|
tip.className = 'ref visible';
|
||||||
|
tip.innerHTML = this.tipRef.innerHTML;
|
||||||
|
window.clearTimeout(tip.fadeOut);
|
||||||
|
};
|
||||||
|
tippable[j].onmouseout = function(){
|
||||||
|
tip.className = 'ref visible fadingOut';
|
||||||
|
tip.fadeOut = window.setTimeout(function(){
|
||||||
|
tip.innerHTML = '';
|
||||||
|
tip.className = '';
|
||||||
|
}, 250);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
refs[i].onmousemove = function(e){
|
||||||
|
if(tip.className.indexOf('visible') < 0)
|
||||||
|
return;
|
||||||
|
tip.style.top = ((document.documentElement.clientHeight - e.clientY) < tip.offsetHeight + 20 ? Math.max(e.pageY - tip.offsetHeight, 0) : e.pageY) + 'px';
|
||||||
|
tip.style.left = ((document.documentElement.clientWidth - e.clientX) < tip.offsetWidth + 20 ? Math.max(e.pageX - tip.offsetWidth, 0) : e.pageX) + 'px';
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
tip.id = 'rTip';
|
||||||
|
document.body.appendChild(tip);
|
||||||
|
|
||||||
|
window.addEventListener('keydown', function(e){
|
||||||
|
if((e.keyCode != 88) || (['input', 'textarea', 'select'].indexOf(e.target.tagName.toLowerCase()) > -1))
|
||||||
|
return;
|
||||||
|
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
|
if(e.ctrlKey && e.keyCode == 88){
|
||||||
|
var d = refs[0].style.display !== 'none' ? 'none' : 'block';
|
||||||
|
for(var i = 0, n = refs.length; i < n; i++)
|
||||||
|
refs[i].style.display = d;
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var kbds = document.querySelectorAll('.ref [data-toggle]'),
|
||||||
|
m = kbds.length,
|
||||||
|
partlyExp = document.querySelectorAll('.ref [data-toggle][data-exp]').length !== m;
|
||||||
|
|
||||||
|
for(var i = 0; i < m; i++)
|
||||||
|
partlyExp ? (kbds[i].dataset.exp = 1) : (delete kbds[i].dataset.exp);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
2961
web/lib/ref/ref.php
Normal file
2961
web/lib/ref/ref.php
Normal file
File diff suppressed because it is too large
Load Diff
@@ -282,7 +282,7 @@ if ($db_file) {
|
|||||||
echo "<div class='size'>".human_filesize($row_a['Size'])."</div>";
|
echo "<div class='size'>".human_filesize($row_a['Size'])."</div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($row_a['type'] == "dir" && $row_a['items']) {
|
if ($row_a['Type'] == "dir" && $row_a['items']) {
|
||||||
echo "<div class='size'>".$row_a['items']." items</div>";
|
echo "<div class='size'>".$row_a['items']." items</div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user