version 4.1 release
22
ChangeLog.md
|
@ -1,3 +1,25 @@
|
||||||
|
|
||||||
|
### ver4.1 `2017/9/5`
|
||||||
|
-----
|
||||||
|
#### update:
|
||||||
|
- markdown优化:新增绘图支持;加入流程图、时序图、甘特图、类图
|
||||||
|
- 优化部分服务器rar解压缩,文件名或路径为中文名时解压没有内容情况
|
||||||
|
- php7.1以上中文文件远程上传问题优化;
|
||||||
|
- 搜索内容自动填充到搜索对话框问题优化
|
||||||
|
- 分享页面样式优化,文本分享移动端排版优化
|
||||||
|
|
||||||
|
#### fix bug
|
||||||
|
- 编辑器最大化工具菜单失去焦点问题;编辑器最大化后按钮不可点问题优化
|
||||||
|
- 支持自定义指定host,避免反向代理导致部分主机请求异常问题
|
||||||
|
- 部分https转发的网站,相关插件静态资源引用问题;支持指定网站host
|
||||||
|
- 分享文件夹含有密码移动端问题
|
||||||
|
- chrome 下载文件名含有逗号下载失败问题
|
||||||
|
- 文件api:压缩文件打开问题
|
||||||
|
- markdown预览宽度- 分享文件夹指定了别名,文件打开不存在问题自适应
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### ver4.06 `2017/8/30`
|
### ver4.06 `2017/8/30`
|
||||||
-----
|
-----
|
||||||
#### update:
|
#### update:
|
||||||
|
|
|
@ -26,7 +26,6 @@ class api extends Controller{
|
||||||
$this->setIdentify();
|
$this->setIdentify();
|
||||||
$this->display('view.html');
|
$this->display('view.html');
|
||||||
}
|
}
|
||||||
|
|
||||||
private function setIdentify(){
|
private function setIdentify(){
|
||||||
if(! $_SESSION['accessPlugin'] ){
|
if(! $_SESSION['accessPlugin'] ){
|
||||||
session_start();
|
session_start();
|
||||||
|
@ -34,8 +33,7 @@ class api extends Controller{
|
||||||
session_write_close();
|
session_write_close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public function checkAccessToken(){
|
||||||
private function checkAccessToken(){
|
|
||||||
$model = $this->loadModel('Plugin');
|
$model = $this->loadModel('Plugin');
|
||||||
$config = $model->getConfig('fileView');
|
$config = $model->getConfig('fileView');
|
||||||
if(!$config['apiKey']){
|
if(!$config['apiKey']){
|
||||||
|
|
|
@ -34,6 +34,7 @@ class pluginApp extends Controller{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//权限认证
|
||||||
private function checkAccessPlugin(){
|
private function checkAccessPlugin(){
|
||||||
if( $_SESSION['kodLogin'] == true ||
|
if( $_SESSION['kodLogin'] == true ||
|
||||||
$_SESSION['accessPlugin'] == 'ok' ||
|
$_SESSION['accessPlugin'] == 'ok' ||
|
||||||
|
|
|
@ -220,6 +220,7 @@ class share extends Controller{
|
||||||
'staticPath' => STATIC_PATH,
|
'staticPath' => STATIC_PATH,
|
||||||
'version' => KOD_VERSION,
|
'version' => KOD_VERSION,
|
||||||
'versionDesc' => $versionDesc,
|
'versionDesc' => $versionDesc,
|
||||||
|
'kodID' => md5(BASIC_PATH.$this->config['settingSystem']['systemPassword']),
|
||||||
|
|
||||||
'uploadMax' => file_upload_size(),
|
'uploadMax' => file_upload_size(),
|
||||||
'jsonData' => "",
|
'jsonData' => "",
|
||||||
|
|
|
@ -258,6 +258,7 @@ class user extends Controller{
|
||||||
),
|
),
|
||||||
'phpVersion' => PHP_VERSION,
|
'phpVersion' => PHP_VERSION,
|
||||||
'version' => KOD_VERSION,
|
'version' => KOD_VERSION,
|
||||||
|
'kodID' => md5(BASIC_PATH.$this->config['settingSystem']['systemPassword']),
|
||||||
'jsonData' => "",
|
'jsonData' => "",
|
||||||
'selfShare' => systemMember::userShareList($this->user['userID']),
|
'selfShare' => systemMember::userShareList($this->user['userID']),
|
||||||
'userConfig' => $this->config['user'],
|
'userConfig' => $this->config['user'],
|
||||||
|
|
|
@ -983,28 +983,30 @@ function file_put_out($file,$download=-1,$downFilename=false){
|
||||||
$download = true;
|
$download = true;
|
||||||
}
|
}
|
||||||
$headerName = $filenameOutput;
|
$headerName = $filenameOutput;
|
||||||
|
if(ua_has("Chrome") && !ua_has('Edge')){ //chrome下载
|
||||||
|
$filenameOutput = '"'.$filenameOutput.'"';
|
||||||
|
}
|
||||||
if(!is_wap()){
|
if(!is_wap()){
|
||||||
$headerName.=";filename*=utf-8''".$filenameOutput;
|
$headerName.=";filename*=utf-8''".$filenameOutput;
|
||||||
}
|
}
|
||||||
if( ua_has("Safari") &&
|
if( ua_has("Safari") && !ua_has('Edge')){//safari 中文下载问题
|
||||||
!ua_has('Edge')){//safari 中文下载问题
|
|
||||||
$headerName = rawurldecode($filenameOutput);
|
$headerName = rawurldecode($filenameOutput);
|
||||||
}
|
}
|
||||||
//var_dump($headerName,$_SERVER['USER_AGENT'],$filenameOutput);exit;
|
//var_dump($headerName,$filenameOutput,$_SERVER['HTTP_USER_AGENT']);exit;
|
||||||
if ($download) {
|
if ($download) {
|
||||||
header("Content-Type: application/octet-stream");
|
header('Content-Type: application/octet-stream');
|
||||||
header("Content-Transfer-Encoding: binary");
|
header('Content-Transfer-Encoding: binary');
|
||||||
header("Content-Disposition: attachment;filename=".$headerName);
|
header('Content-Disposition: attachment;filename='.$headerName);
|
||||||
}else{
|
}else{
|
||||||
header("Content-Type: ".$mime);
|
header('Content-Type: '.$mime);
|
||||||
header("Content-Disposition: inline;filename=".$headerName);
|
header('Content-Disposition: inline;filename='.$headerName);
|
||||||
}
|
}
|
||||||
|
|
||||||
//缓存文件
|
//缓存文件
|
||||||
header('Expires: '.gmdate('D, d M Y H:i:s',time()+3600*24*20).' GMT');
|
header('Expires: '.gmdate('D, d M Y H:i:s',time()+3600*24*20).' GMT');
|
||||||
header("Cache-Pragma: public");
|
header('Cache-Pragma: public');
|
||||||
header('Pragma: public');
|
header('Pragma: public');
|
||||||
header("Cache-Control: cache, must-revalidate");
|
header('Cache-Control: cache, must-revalidate');
|
||||||
if (isset($_SERVER['If-Modified-Since']) &&
|
if (isset($_SERVER['If-Modified-Since']) &&
|
||||||
(strtotime($_SERVER['If-Modified-Since']) == filemtime($file))) {
|
(strtotime($_SERVER['If-Modified-Since']) == filemtime($file))) {
|
||||||
header('304 Not Modified', true, 304);
|
header('304 Not Modified', true, 304);
|
||||||
|
|
|
@ -117,6 +117,9 @@ function charset_check(&$str,$check,$tempCharset='utf-8'){
|
||||||
//https://segmentfault.com/a/1190000003020776
|
//https://segmentfault.com/a/1190000003020776
|
||||||
//http://blog.sina.com.cn/s/blog_b97feef301019571.html
|
//http://blog.sina.com.cn/s/blog_b97feef301019571.html
|
||||||
function get_charset(&$str) {
|
function get_charset(&$str) {
|
||||||
|
if($GLOBALS['config']['checkCharsetDefault']){//直接指定编码
|
||||||
|
return $GLOBALS['config']['checkCharsetDefault'];
|
||||||
|
}
|
||||||
if ($str === '' || !function_exists("mb_detect_encoding")){
|
if ($str === '' || !function_exists("mb_detect_encoding")){
|
||||||
return 'utf-8';
|
return 'utf-8';
|
||||||
}
|
}
|
||||||
|
@ -154,9 +157,9 @@ function get_charset(&$str) {
|
||||||
//检测详细编码;value为用什么编码检测;为空则用utf-8
|
//检测详细编码;value为用什么编码检测;为空则用utf-8
|
||||||
$check = array(
|
$check = array(
|
||||||
'utf-8' => $charset,
|
'utf-8' => $charset,
|
||||||
'windows-1252'=> 'utf-8',
|
'utf-16' => 'gbk',
|
||||||
|
'cp1252' => 'utf-8',
|
||||||
'cp1251' => 'utf-8',
|
'cp1251' => 'utf-8',
|
||||||
'utf-16' => 'gbk'
|
|
||||||
);
|
);
|
||||||
foreach($check as $key => $val){
|
foreach($check as $key => $val){
|
||||||
if(charset_check($str,$key,$val)){
|
if(charset_check($str,$key,$val)){
|
||||||
|
|
|
@ -100,8 +100,6 @@ function is_wap(){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function parse_headers($raw_headers){
|
function parse_headers($raw_headers){
|
||||||
$headers = array();
|
$headers = array();
|
||||||
$key = '';
|
$key = '';
|
||||||
|
@ -257,8 +255,10 @@ function curl_progress_get($file,$uuid=''){
|
||||||
return -3;
|
return -3;
|
||||||
}
|
}
|
||||||
|
|
||||||
function url_request($url,$method='GET',$data=false,$headers=false,
|
// https://segmentfault.com/a/1190000000725185
|
||||||
$options=false,$json=false,$timeout=3600){
|
// http://blog.csdn.net/havedream_one/article/details/52585331
|
||||||
|
// php7.1 curl上传中文路径文件失败问题?【暂时通过重命名方式解决】
|
||||||
|
function url_request($url,$method='GET',$data=false,$headers=false,$options=false,$json=false,$timeout=3600){
|
||||||
ignore_timeout();
|
ignore_timeout();
|
||||||
$ch = curl_init();
|
$ch = curl_init();
|
||||||
$upload = false;
|
$upload = false;
|
||||||
|
|
|
@ -24,7 +24,7 @@ class PluginBase{
|
||||||
|
|
||||||
$this->pluginName = str_replace('Plugin','',get_class($this));
|
$this->pluginName = str_replace('Plugin','',get_class($this));
|
||||||
$this->pluginPath = PLUGIN_DIR.$this->pluginName.'/';
|
$this->pluginPath = PLUGIN_DIR.$this->pluginName.'/';
|
||||||
$this->pluginApi = APP_HOST.'?pluginApp/to/'.$this->pluginName.'/';
|
$this->pluginApi = APP_HOST.'index.php?pluginApp/to/'.$this->pluginName.'/';
|
||||||
$this->pluginHost = $this->config['settings']['pluginHost'].$this->pluginName.'/';
|
$this->pluginHost = $this->config['settings']['pluginHost'].$this->pluginName.'/';
|
||||||
$this->pluginHostDefault = PLUGIN_HOST.$this->pluginName.'/';
|
$this->pluginHostDefault = PLUGIN_HOST.$this->pluginName.'/';
|
||||||
$this->pluginLangArr = $this->initLang();
|
$this->pluginLangArr = $this->initLang();
|
||||||
|
@ -73,7 +73,6 @@ class PluginBase{
|
||||||
return $icon;
|
return $icon;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
final function filePath($path){
|
final function filePath($path){
|
||||||
if(substr($path,0,4) == 'http'){
|
if(substr($path,0,4) == 'http'){
|
||||||
$cacheName = md5($path.'kodcloud').'.'.get_path_ext($path);
|
$cacheName = md5($path.'kodcloud').'.'.get_path_ext($path);
|
||||||
|
@ -85,10 +84,21 @@ class PluginBase{
|
||||||
$path = $cacheFile;
|
$path = $cacheFile;
|
||||||
}else{
|
}else{
|
||||||
$path = _DIR($path);
|
$path = _DIR($path);
|
||||||
|
//php7.1,含有中文文件,windows下 curl上传会有问题
|
||||||
|
if( strtoupper(substr(PHP_OS, 0,3)) === 'WIN' &&
|
||||||
|
version_compare(phpversion(), '7.1.0', '>=') &&
|
||||||
|
preg_match("/([\x81-\xfe][\x40-\xfe])/", $path, $match)){
|
||||||
|
|
||||||
|
$name = hash_path($path).'.'.get_path_ext($path);
|
||||||
|
$cacheFile = TEMP_PATH.$this->pluginName.'/files/'.$name;
|
||||||
|
mk_dir(get_path_father($cacheFile));
|
||||||
|
if(!file_exists($cacheFile)){
|
||||||
|
@copy($path,$cacheFile);
|
||||||
|
}
|
||||||
|
$path = $cacheFile;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!file_exists($path)) {
|
if (!file_exists($path)) {
|
||||||
header("HTTP/1.1 404 Not Found");
|
|
||||||
header("Status: 404 Not Found");
|
|
||||||
show_tips(LNG('file').' '.LNG('not_exists'));
|
show_tips(LNG('file').' '.LNG('not_exists'));
|
||||||
}
|
}
|
||||||
return $path;
|
return $path;
|
||||||
|
|
|
@ -38,6 +38,8 @@ class kodRarArchive {
|
||||||
static function run($cmd){
|
static function run($cmd){
|
||||||
if (strtoupper(substr(PHP_OS, 0,3)) != 'WIN') {//linux
|
if (strtoupper(substr(PHP_OS, 0,3)) != 'WIN') {//linux
|
||||||
$cmd = "export LANG='en_US.UTF-8' && ".$cmd;
|
$cmd = "export LANG='en_US.UTF-8' && ".$cmd;
|
||||||
|
@setlocale(LC_ALL,'en_US.UTF-8');
|
||||||
|
@putenv('LC_ALL=en_US.UTF-8');
|
||||||
}
|
}
|
||||||
$result = shell_exec($cmd);
|
$result = shell_exec($cmd);
|
||||||
//debug_out($cmd,$result);
|
//debug_out($cmd,$result);
|
||||||
|
|
|
@ -77,6 +77,7 @@
|
||||||
mtime:0,
|
mtime:0,
|
||||||
size:0
|
size:0
|
||||||
}
|
}
|
||||||
|
G['accessToken'] = "<?php echo access_token_get();?>";
|
||||||
seajs.config({
|
seajs.config({
|
||||||
base: "<?php echo STATIC_PATH;?>js/",
|
base: "<?php echo STATIC_PATH;?>js/",
|
||||||
preload: ["lib/jquery-1.8.0.min",'lib/ace/src-min-noconflict/ace'],
|
preload: ["lib/jquery-1.8.0.min",'lib/ace/src-min-noconflict/ace'],
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
if(is_wap()){
|
if(is_wap()){
|
||||||
echo '<span class="pr-10"><a href="javascript:void(0);" forceWap="1">'.LNG('wap_page_phone').'</a> | '.
|
echo '<span class="pr-10"><a href="javascript:void(0);" forceWap="1">'.LNG('wap_page_phone').'</a> | '.
|
||||||
'<a href="javascript:void(0);" forceWap="0">'.LNG('wap_page_pc').'</a></span> ';
|
'<a href="javascript:void(0);" forceWap="0">'.LNG('wap_page_pc').'</a></span> ';
|
||||||
echo LNG('copyright_pre').' v'.KOD_VERSION;
|
echo LNG('copyright_info').' v'.KOD_VERSION;
|
||||||
}else{
|
}else{
|
||||||
echo '<span class="copyright-content">';
|
echo '<span class="copyright-content">';
|
||||||
if(isset($settings['copyright'])){
|
if(isset($settings['copyright'])){
|
||||||
|
|
|
@ -30,6 +30,11 @@
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
<?php
|
||||||
|
if(defined('INSTALL_CHANNEL')){
|
||||||
|
echo "var installChannel='".INSTALL_CHANNEL."';\n";
|
||||||
|
}
|
||||||
|
?>
|
||||||
seajs.config({
|
seajs.config({
|
||||||
base: "<?php echo STATIC_PATH;?>js/",
|
base: "<?php echo STATIC_PATH;?>js/",
|
||||||
preload: [
|
preload: [
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="init-loading"><div>
|
<div class="init-loading"><div>
|
||||||
<img src="<?php echo STATIC_PATH;?>images/common/loading_simple.gif"/></div>
|
<img src="<?php echo STATIC_PATH;?>images/common/loading_simple.gif"/></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="topbar">
|
<div class="topbar share-page-topbar">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="top-left">
|
<div class="top-left">
|
||||||
<a href="./" class="topbar-menu title">
|
<a href="./" class="topbar-menu title">
|
||||||
|
|
|
@ -34,7 +34,10 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="address"><ul></ul><div style="clear: both"></div></div>
|
<div class="address">
|
||||||
|
<ul class="yarnball"></ul>
|
||||||
|
<div style="clear: both"></div>
|
||||||
|
</div>
|
||||||
<div class='bodymain'>
|
<div class='bodymain'>
|
||||||
<div class="file-continer file-list-list"></div>
|
<div class="file-continer file-list-list"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -17,7 +17,10 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="address"><ul></ul><div style="clear: both"></div></div>
|
<div class="address">
|
||||||
|
<ul class="yarnball"></ul>
|
||||||
|
<div style="clear: both"></div>
|
||||||
|
</div>
|
||||||
<div class='bodymain'>
|
<div class='bodymain'>
|
||||||
<div class="file-continer file-list-list"></div>
|
<div class="file-continer file-list-list"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<?php include(TEMPLATE.'common/navbarShare.html');?>
|
<?php include(TEMPLATE.'common/navbarShare.html');?>
|
||||||
<div class="frame-main">
|
<div class="frame-main share-page-main">
|
||||||
<!-- bindary-box -->
|
<!-- bindary-box -->
|
||||||
<div class="bindary-box hidden">
|
<div class="bindary-box hidden">
|
||||||
<div class="title"><div class="ico"></div></div>
|
<div class="title"><div class="ico"></div></div>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<div class="share-page-passowrd">
|
<div class="share-page-passowrd">
|
||||||
<b><?php echo LNG('share_password');?>:</b>
|
<b><?php echo LNG('share_password');?>:</b>
|
||||||
<input type="password" class="form-control"/>
|
<input type="password" class="form-control"/>
|
||||||
<a href="javascript:void(0);" class="btn btn-primary share_login"><?php echo LNG('button_ok');?></a>
|
<a href="javascript:void(0);" class="btn btn-primary share-login"><?php echo LNG('button_ok');?></a>
|
||||||
</div>
|
</div>
|
||||||
<?php }else{?>
|
<?php }else{?>
|
||||||
<div class="share-page-error"><b>tips:</b><?php echo $msg;?></div>
|
<div class="share-page-error"><b>tips:</b><?php echo $msg;?></div>
|
||||||
|
|
|
@ -70,6 +70,7 @@ function unzipRepeat(){
|
||||||
function updateClear(){
|
function updateClear(){
|
||||||
del_file(THE_DATA_PATH.'system/group.php');
|
del_file(THE_DATA_PATH.'system/group.php');
|
||||||
del_file(THE_DATA_PATH.'system/member.php');
|
del_file(THE_DATA_PATH.'system/member.php');
|
||||||
|
del_file(THE_DATA_PATH.'2.0-4.06.zip');
|
||||||
del_file(THE_DATA_PATH.'2.0-'.UPDATE_VERSION.'.zip');
|
del_file(THE_DATA_PATH.'2.0-'.UPDATE_VERSION.'.zip');
|
||||||
del_file(THE_BASIC_PATH.'readme.txt');
|
del_file(THE_BASIC_PATH.'readme.txt');
|
||||||
|
|
||||||
|
|
|
@ -68,9 +68,12 @@ $config['appStartTime'] = mtime();
|
||||||
$config['appCharset'] = 'utf-8';//该程序整体统一编码
|
$config['appCharset'] = 'utf-8';//该程序整体统一编码
|
||||||
$config['checkCharset'] = 'ASCII,UTF-8,GB2312,GBK,BIG5,UTF-16,UCS-2,'.
|
$config['checkCharset'] = 'ASCII,UTF-8,GB2312,GBK,BIG5,UTF-16,UCS-2,'.
|
||||||
'Unicode,EUC-KR,EUC-JP,SHIFT-JIS,EUCJP-WIN,SJIS-WIN,JIS,LATIN1';//文件打开自动检测编码
|
'Unicode,EUC-KR,EUC-JP,SHIFT-JIS,EUCJP-WIN,SJIS-WIN,JIS,LATIN1';//文件打开自动检测编码
|
||||||
|
$config['checkCharsetDefault'] = '';//if set,not check;
|
||||||
|
|
||||||
define('WEB_ROOT',get_webroot(BASIC_PATH));
|
if(!defined('HOST')){
|
||||||
define('HOST',get_host().'/');
|
define('HOST',get_host().'/');
|
||||||
|
}
|
||||||
|
define('WEB_ROOT',get_webroot(BASIC_PATH));
|
||||||
define('APP_HOST',HOST.str_replace(WEB_ROOT,'',BASIC_PATH)); //程序根目录
|
define('APP_HOST',HOST.str_replace(WEB_ROOT,'',BASIC_PATH)); //程序根目录
|
||||||
define('PLUGIN_HOST',APP_HOST.str_replace(BASIC_PATH,'',PLUGIN_DIR)); //插件目录
|
define('PLUGIN_HOST',APP_HOST.str_replace(BASIC_PATH,'',PLUGIN_DIR)); //插件目录
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
3da99D58Peis1s2dd7GSYD4GrWpjzK9lLbakz2q2VFETxpTNv6CZYpXHg3Vg0W0J
|
|
@ -1 +0,0 @@
|
||||||
0fe1QHRDcUucuUNxKU8XuRjEj1gh_6F3jfE24Fw_0iI0GWeihQ6XRcJyI-tmo4DV
|
|
|
@ -13,7 +13,7 @@ $config['settings'] = array(
|
||||||
'updloadChunkSize' => 1024*1024*0.4,//0.4M;分片上传大小设定;需要小于php.ini上传限制的大小
|
'updloadChunkSize' => 1024*1024*0.4,//0.4M;分片上传大小设定;需要小于php.ini上传限制的大小
|
||||||
'paramRewrite' => false, //开启url 去除? 直接跟参数
|
'paramRewrite' => false, //开启url 去除? 直接跟参数
|
||||||
|
|
||||||
'pluginServer' => "//kodcloud.com/tools/version/",
|
'pluginServer' => "https://api.kodcloud.com/?",
|
||||||
'staticPath' => "./static/", //静态文件目录
|
'staticPath' => "./static/", //静态文件目录
|
||||||
'pluginHost' => PLUGIN_HOST //静态文件目录
|
'pluginHost' => PLUGIN_HOST //静态文件目录
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
<?php
|
<?php
|
||||||
define('KOD_VERSION','4.06');
|
define('KOD_VERSION','4.1');
|
||||||
|
|
|
@ -83,7 +83,7 @@ define(function(require, exports) {
|
||||||
hideAnimationDuration: 300,
|
hideAnimationDuration: 300,
|
||||||
getThumbBoundsFn: function(index) {
|
getThumbBoundsFn: function(index) {
|
||||||
var item = itemsArr[index];
|
var item = itemsArr[index];
|
||||||
if(!item || !item.$dom){//目录切换后没有原图
|
if(!item || !item.$dom || item.$dom.length == 0){//目录切换后没有原图
|
||||||
return {x:$(window).width()/2,y:$(window).height()/2,w:1,h:1};
|
return {x:$(window).width()/2,y:$(window).height()/2,w:1,h:1};
|
||||||
}
|
}
|
||||||
var pageYScroll = window.pageYOffset || document.documentElement.scrollTop;
|
var pageYScroll = window.pageYOffset || document.documentElement.scrollTop;
|
||||||
|
|
|
@ -20,3 +20,15 @@
|
||||||
.mCS-minimal-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
|
.mCS-minimal-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
|
||||||
background-color: rgba(100,100,100,0.3);width:6px;
|
background-color: rgba(100,100,100,0.3);width:6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*ie8兼容性调整*/
|
||||||
|
body div.topbar .content .title.topbar-menu{width:200px\9;}
|
||||||
|
body .file-continer .file .item-select{width:12px;height:12px;}
|
||||||
|
body .file-continer .file .item-select .item-check{font-size:10px;}
|
||||||
|
|
||||||
|
|
||||||
|
body .dialog-no-title .aui-outer{border:1px solid #ddd !important;}
|
||||||
|
body .dialog-no-title .aui-max,
|
||||||
|
body .dialog-no-title .aui-min,
|
||||||
|
body .dialog-no-title .aui-close{filter:none !important;}
|
||||||
|
body .dialog-no-title .aui-title i{display:none;}
|
|
@ -69,10 +69,10 @@ class yzOfficePlugin extends PluginBase{
|
||||||
private function getObj(){
|
private function getObj(){
|
||||||
$path = $this->filePath($this->in['path']);
|
$path = $this->filePath($this->in['path']);
|
||||||
|
|
||||||
// require_once($this->pluginPath.'php/yzOffice.class.php');
|
require_once($this->pluginPath.'php/yzOffice.class.php');//文档分享预览
|
||||||
// return new yzOffice($this,$path);
|
return new yzOffice($this,$path);
|
||||||
require_once($this->pluginPath.'php/yzOffice2.class.php');
|
// require_once($this->pluginPath.'php/yzOffice2.class.php');//官网用户demo
|
||||||
return new yzOffice2($this,$path);
|
// return new yzOffice2($this,$path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"id":"yzOffice",
|
"id":"yzOffice",
|
||||||
"name":"{{LNG.yzOffice.meta.name}}",
|
"name":"{{LNG.yzOffice.meta.name}}",
|
||||||
"title":"{{LNG.yzOffice.meta.title}}",
|
"title":"{{LNG.yzOffice.meta.title}}",
|
||||||
"version":"1.1",
|
"version":"1.2",
|
||||||
"category":"file",
|
"category":"file",
|
||||||
"source":{
|
"source":{
|
||||||
"icon":"{{pluginHost}}static/images/icon.png"
|
"icon":"{{pluginHost}}static/images/icon.png"
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
// 文档分享预览
|
||||||
|
// http://yozodoc.com/
|
||||||
class yzOffice{
|
class yzOffice{
|
||||||
public $cachePath = 'yzOffice/';
|
public $cachePath = 'yzOffice/';
|
||||||
public $plugin;
|
public $plugin;
|
||||||
|
@ -23,7 +25,7 @@ class yzOffice{
|
||||||
$task_has = json_decode(file_get_contents($this->taskFile),true);
|
$task_has = json_decode(file_get_contents($this->taskFile),true);
|
||||||
$this->task = is_array($task_has)?$task_has:false;
|
$this->task = is_array($task_has)?$task_has:false;
|
||||||
}
|
}
|
||||||
//$this->upload();
|
//show_json($this->upload(),false);
|
||||||
}
|
}
|
||||||
public function runTask(){
|
public function runTask(){
|
||||||
$task = array(
|
$task = array(
|
||||||
|
@ -141,8 +143,9 @@ class yzOffice{
|
||||||
$result = url_request($file,'GET');
|
$result = url_request($file,'GET');
|
||||||
if($result['code'] == 200){
|
if($result['code'] == 200){
|
||||||
if($ext == 'svg'){
|
if($ext == 'svg'){
|
||||||
$from = array('永中DCS','xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALsAAADKCAYAAAD97jEOAAABkklEQVR42u3SgQ0A AATAMFzudM');
|
$result['data'] = str_replace('永中DCS','',$result['data']);
|
||||||
$result['data'] = str_replace($from,array('',' sr="'),$result['data']);
|
$from = '/clip-path="url\(#clipPath\d+\)" width="18\d+" xlink:href="/';
|
||||||
|
$result['data'] = preg_replace($from,'sr="',$result['data']);
|
||||||
}
|
}
|
||||||
file_put_contents($cacheFile, $result['data']);
|
file_put_contents($cacheFile, $result['data']);
|
||||||
file_put_out($cacheFile,false);
|
file_put_out($cacheFile,false);
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
//官网用户demo
|
||||||
|
//http://www.yozodcs.com/examples.html
|
||||||
class yzOffice2{
|
class yzOffice2{
|
||||||
public $cachePath = 'yzOffice/';
|
public $cachePath = 'yzOffice/';
|
||||||
public $plugin;
|
public $plugin;
|
||||||
|
@ -23,6 +25,7 @@ class yzOffice2{
|
||||||
$task_has = json_decode(file_get_contents($this->taskFile),true);
|
$task_has = json_decode(file_get_contents($this->taskFile),true);
|
||||||
$this->task = is_array($task_has)?$task_has:false;
|
$this->task = is_array($task_has)?$task_has:false;
|
||||||
}
|
}
|
||||||
|
//show_json($this->upload(),false);
|
||||||
}
|
}
|
||||||
public function runTask(){
|
public function runTask(){
|
||||||
$task = array(
|
$task = array(
|
||||||
|
|
|
@ -9,7 +9,6 @@ class zipViewPlugin extends PluginBase{
|
||||||
'user.commonJs.insert' => 'zipViewPlugin.echoJs',
|
'user.commonJs.insert' => 'zipViewPlugin.echoJs',
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function unzipList(){
|
public function unzipList(){
|
||||||
$path = $this->filePath($this->in['path']);
|
$path = $this->filePath($this->in['path']);
|
||||||
if(isset($this->in['index'])){
|
if(isset($this->in['index'])){
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"id":"zipView",
|
"id":"zipView",
|
||||||
"name":"{{LNG.Plugin.default.zipView}}",
|
"name":"{{LNG.Plugin.default.zipView}}",
|
||||||
"title":"",
|
"title":"",
|
||||||
"version":"1.1",
|
"version":"1.2",
|
||||||
"source":{
|
"source":{
|
||||||
"icon":"{{pluginHost}}static/images/icon.png",
|
"icon":"{{pluginHost}}static/images/icon.png",
|
||||||
"screenshoot":[
|
"screenshoot":[
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
kodReady.push(function(){
|
kodReady.push(function(){
|
||||||
var apiView = function(){
|
var apiView = function(){
|
||||||
var url = '{{pluginApi}}unzipList&accessToken='+G.accessToken
|
var url = '{{pluginApi}}unzipList&accessToken='+G.accessToken
|
||||||
//var url = 'explorer/unzipList&accessToken='+G.accessToken;
|
if (typeof(G.sid) != 'undefined') {
|
||||||
if (typeof(G.sharePage) != 'undefined') {
|
|
||||||
url = '{{pluginApi}}unzipList&user='+G.user+'&sid='+G.sid;
|
url = '{{pluginApi}}unzipList&user='+G.user+'&sid='+G.sid;
|
||||||
}
|
}
|
||||||
return url;
|
return url;
|
||||||
|
|
Before Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
After Width: | Height: | Size: 64 KiB |
After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 14 KiB |
|
@ -0,0 +1 @@
|
||||||
|
.mermaid .label{color:#333}.node circle,.node ellipse,.node polygon,.node rect{fill:#ececff;stroke:#ccf;stroke-width:1px}.arrowheadPath{fill:#333}.edgePath .path{stroke:#333}.edgeLabel{background-color:#e8e8e8}.cluster rect{fill:#ffffde!important;rx:4!important;stroke:#aa3!important;stroke-width:1px!important}.cluster text{fill:#333}.actor{stroke:#ccf;fill:#ececff}text.actor{fill:#000;stroke:none}.actor-line{stroke:grey}.messageLine0{marker-end:"url(#arrowhead)"}.messageLine0,.messageLine1{stroke-width:1.5;stroke-dasharray:"2 2";stroke:#333}#arrowhead{fill:#333}#crosshead path{fill:#333!important;stroke:#333!important}.messageText{fill:#333;stroke:none}.labelBox{stroke:#ccf;fill:#ececff}.labelText,.loopText{fill:#000;stroke:none}.loopLine{stroke-width:2;stroke-dasharray:"2 2";marker-end:"url(#arrowhead)";stroke:#ccf}.note{stroke:#aa3;fill:#fff5ad}.noteText{fill:#000;stroke:none;font-family:trebuchet ms,verdana,arial;font-size:14px}.section{stroke:none;opacity:.2}.section0{fill:rgba(102,102,255,.49)}.section2{fill:#fff400}.section1,.section3{fill:#fff;opacity:.2}.sectionTitle0,.sectionTitle1,.sectionTitle2,.sectionTitle3{fill:#333}.sectionTitle{text-anchor:start;font-size:11px;text-height:14px}.grid .tick{stroke:#d3d3d3;opacity:.3;shape-rendering:crispEdges}.grid path{stroke-width:0}.today{fill:none;stroke:red;stroke-width:2px}.task{stroke-width:2}.taskText{text-anchor:middle;font-size:11px}.taskTextOutsideRight{fill:#000;text-anchor:start;font-size:11px}.taskTextOutsideLeft{fill:#000;text-anchor:end;font-size:11px}.taskText0,.taskText1,.taskText2,.taskText3{fill:#fff}.task0,.task1,.task2,.task3{fill:#8a90dd;stroke:#534fbc}.taskTextOutside0,.taskTextOutside1,.taskTextOutside2,.taskTextOutside3{fill:#000}.active0,.active1,.active2,.active3{fill:#bfc7ff;stroke:#534fbc}.activeText0,.activeText1,.activeText2,.activeText3{fill:#000!important}.done0,.done1,.done2,.done3{stroke:grey;fill:#d3d3d3;stroke-width:2}.doneText0,.doneText1,.doneText2,.doneText3{fill:#000!important}.crit0,.crit1,.crit2,.crit3{stroke:#f88;fill:red;stroke-width:2}.activeCrit0,.activeCrit1,.activeCrit2,.activeCrit3{stroke:#f88;fill:#bfc7ff;stroke-width:2}.doneCrit0,.doneCrit1,.doneCrit2,.doneCrit3{stroke:#f88;fill:#d3d3d3;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}.activeCritText0,.activeCritText1,.activeCritText2,.activeCritText3,.doneCritText0,.doneCritText1,.doneCritText2,.doneCritText3{fill:#000!important}.titleText{text-anchor:middle;font-size:18px;fill:#000}g.classGroup text{fill:#9370db;stroke:none;font-family:trebuchet ms,verdana,arial;font-size:10px}g.classGroup rect{fill:#ececff;stroke:#9370db}g.classGroup line{stroke:#9370db;stroke-width:1}svg .classLabel .box{stroke:none;stroke-width:0;fill:#ececff;opacity:.5}svg .classLabel .label{fill:#9370db;font-size:10px}.relation{stroke:#9370db;stroke-width:1;fill:none}#compositionEnd,#compositionStart,.composition{fill:#9370db;stroke:#9370db;stroke-width:1}#aggregationEnd,#aggregationStart,.aggregation{fill:#ececff;stroke:#9370db;stroke-width:1}#dependencyEnd,#dependencyStart,#extensionEnd,#extensionStart{fill:#9370db;stroke:#9370db;stroke-width:1}.node text{font-size:14px}.node text,div.mermaidTooltip{font-family:trebuchet ms,verdana,arial}div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-size:12px;background:#ffffde;border:1px solid #aa3;border-radius:2px;pointer-events:none;z-index:100}
|
|
@ -1366,9 +1366,12 @@ var MaskView = (function(){
|
||||||
return urlParam.params[name];//unescape
|
return urlParam.params[name];//unescape
|
||||||
};
|
};
|
||||||
$.parseUrl = function(url){
|
$.parseUrl = function(url){
|
||||||
|
if(!url){
|
||||||
|
url = window.location.href;
|
||||||
|
}
|
||||||
var a = document.createElement('a');
|
var a = document.createElement('a');
|
||||||
a.href = url;
|
a.href = url;
|
||||||
return {
|
var result = {
|
||||||
source: url,
|
source: url,
|
||||||
protocol: a.protocol.replace(':', ''),
|
protocol: a.protocol.replace(':', ''),
|
||||||
host: a.hostname,
|
host: a.hostname,
|
||||||
|
@ -1395,6 +1398,8 @@ var MaskView = (function(){
|
||||||
relative: (a.href.match(/tps?:\/\/[^\/]+(.+)/) || [, ''])[1],
|
relative: (a.href.match(/tps?:\/\/[^\/]+(.+)/) || [, ''])[1],
|
||||||
segments: a.pathname.replace(/^\//, '').split('/')
|
segments: a.pathname.replace(/^\//, '').split('/')
|
||||||
};
|
};
|
||||||
|
result.url = result.protocol + '://' + result.host + result.path + result.query;
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
//选择器,目标含有特殊字符的预处理
|
//选择器,目标含有特殊字符的预处理
|
||||||
|
@ -1456,8 +1461,16 @@ var MaskView = (function(){
|
||||||
}
|
}
|
||||||
//是否为ie ie6~11
|
//是否为ie ie6~11
|
||||||
$.isIE = function(){
|
$.isIE = function(){
|
||||||
return window.ActiveXObject || "ActiveXObject" in window;
|
return !!(window.ActiveXObject || "ActiveXObject" in window);
|
||||||
}
|
}
|
||||||
|
$.isIE8 = function(){
|
||||||
|
if($.isIE && parseInt($.browser.version) <=8 ){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$.supportCss3 = function(style){
|
$.supportCss3 = function(style){
|
||||||
if(!style) style = 'box-shadow';
|
if(!style) style = 'box-shadow';
|
||||||
var prefix = ['webkit', 'Moz', 'ms', 'o'],
|
var prefix = ['webkit', 'Moz', 'ms', 'o'],
|
||||||
|
|
|
@ -332,6 +332,21 @@ a.button:focus { outline: none;}
|
||||||
.x-zip {background-image: url("../../images/file_icon/icon_file/zip.png");}
|
.x-zip {background-image: url("../../images/file_icon/icon_file/zip.png");}
|
||||||
|
|
||||||
|
|
||||||
|
/*movie*/
|
||||||
|
.x-avi,.x-rm,.x-rmvb,.x-mpg,.x-mkv,.x-wmv,.x-mov,.x-mp4,
|
||||||
|
.x-evo,.x-divx,.x-3gp,.x-3g2,.x-asf,.x-ogv,.x-webmv,
|
||||||
|
.x-cue,.x-hd,.x-hdmov,.x-mov,.x-mp4v,.x-mpeg,.x-ogm,.x-qt,
|
||||||
|
.x-spx,.x-vob,.x-wmv,.x-xvid,.x-webm,.x-m4v,
|
||||||
|
.x-mts,.x-mpe,.x-m2ts,.x-mpv,.x-cue,{
|
||||||
|
background-image: url("icon_file","../../images/file_icon/icon_file/movie/movie.png");
|
||||||
|
}
|
||||||
|
.x-flv,.x-f4v{background-image: url("../../images/file_icon/icon_file/movie/flv.png");}
|
||||||
|
.x-rmvb{background-image: url("../../images/file_icon/icon_file/movie/rmvb.png");}
|
||||||
|
.x-mkv{background-image: url("../../images/file_icon/icon_file/movie/mkv.png");}
|
||||||
|
.x-mp4,.x-m4v{background-image: url("../../images/file_icon/icon_file/movie/mp4.png");}
|
||||||
|
.x-mov{background-image: url("../../images/file_icon/icon_file/movie/mov.png");}
|
||||||
|
.x-avi{background-image: url("../../images/file_icon/icon_file/movie/avi.png");}
|
||||||
|
|
||||||
|
|
||||||
/* autodesk */
|
/* autodesk */
|
||||||
.x-3dm,.x-3ds,.x-asm,.x-cam360,.x-catpart,.x-catproduct,.x-cgr,.x-collaboration,.x-dae,.x-dgn,.x-dlv3,.x-dwf,.x-dwfx,.x-dwg,.x-dwt,.x-dxf,.x-exp,.x-f3d,.x-fbx,.x-g,.x-gbxml,.x-iam,.x-idw,.x-ifc,.x-ige,.x-iges,.x-igs,.x-ipt,.x-jt,.x-model,.x-neu,.x-nwc,.x-nwd,.x-obj,.x-prt,.x-rvt,.x-sab,.x-sat,.x-session,.x-skp,.x-sldasm,.x-sldprt,.x-smb,.x-smt,.x-ste,.x-step,.x-stl,.x-stla,.x-stlb,.x-stp,.x-wire,.x-x_b,.x-x_t,.x-xas,.x-xpr{
|
.x-3dm,.x-3ds,.x-asm,.x-cam360,.x-catpart,.x-catproduct,.x-cgr,.x-collaboration,.x-dae,.x-dgn,.x-dlv3,.x-dwf,.x-dwfx,.x-dwg,.x-dwt,.x-dxf,.x-exp,.x-f3d,.x-fbx,.x-g,.x-gbxml,.x-iam,.x-idw,.x-ifc,.x-ige,.x-iges,.x-igs,.x-ipt,.x-jt,.x-model,.x-neu,.x-nwc,.x-nwd,.x-obj,.x-prt,.x-rvt,.x-sab,.x-sat,.x-session,.x-skp,.x-sldasm,.x-sldprt,.x-smb,.x-smt,.x-ste,.x-step,.x-stl,.x-stla,.x-stlb,.x-stp,.x-wire,.x-x_b,.x-x_t,.x-xas,.x-xpr{
|
||||||
|
@ -735,7 +750,7 @@ table th, table td, table thead:first-child tr:first-child th {padding:0;border:
|
||||||
.do-search-box .search-header{padding:10px;padding-bottom:0}
|
.do-search-box .search-header{padding:10px;padding-bottom:0}
|
||||||
.do-search-box .search-header input[type=checkbox]{padding-left:0}
|
.do-search-box .search-header input[type=checkbox]{padding-left:0}
|
||||||
.do-search-box .search-header label{font-size:1em}
|
.do-search-box .search-header label{font-size:1em}
|
||||||
.do-search-box .search-header .btn-right{margin:-5px 0 0 -2px;padding:0;width:30px;height:25px;height:28px \9\0}
|
.do-search-box .search-header .btn-right{margin:-4px 0 0 -2px;border-radius:0;padding:0;width:30px;height:25px;height:28px \9\0}
|
||||||
.do-search-box .search-header .s_br{margin-bottom:8px;line-height:25px}
|
.do-search-box .search-header .s_br{margin-bottom:8px;line-height:25px}
|
||||||
.do-search-box .search-header #search-ext,.do-search-box .search-header #search-path,.do-search-box .search-header #search-value{margin-left:5px;padding-right:10px;padding-left:10px;width:65px;height:23px;outline:0;border:1px solid #ddd;background:#fff;box-shadow:inset 0 1px 1px rgba(0,0,0,.08);-webkit-transition:all ease-in-out 168ms;-moz-transition:all ease-in-out 168ms;-o-transition:all ease-in-out 168ms;transition:all ease-in-out 168ms;-ms-transition:all ease-in-out 168ms}
|
.do-search-box .search-header #search-ext,.do-search-box .search-header #search-path,.do-search-box .search-header #search-value{margin-left:5px;padding-right:10px;padding-left:10px;width:65px;height:23px;outline:0;border:1px solid #ddd;background:#fff;box-shadow:inset 0 1px 1px rgba(0,0,0,.08);-webkit-transition:all ease-in-out 168ms;-moz-transition:all ease-in-out 168ms;-o-transition:all ease-in-out 168ms;transition:all ease-in-out 168ms;-ms-transition:all ease-in-out 168ms}
|
||||||
.do-search-box .search-header #search-ext:focus,.do-search-box .search-header #search-path:focus,.do-search-box .search-header #search-value:focus{outline:0;border-color:#75a1f0;box-shadow:0 0 4px #75a1f0}
|
.do-search-box .search-header #search-ext:focus,.do-search-box .search-header #search-path:focus,.do-search-box .search-header #search-value:focus{outline:0;border-color:#75a1f0;box-shadow:0 0 4px #75a1f0}
|
||||||
|
|