Skip to content

Commit

Permalink
ThinkCMF X2.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
simplewindorg committed Nov 29, 2016
1 parent b1759b4 commit fed8f4a
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 14 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ ThinkCMF是一款基于PHP+MYSQL开发的中文内容管理框架。ThinkCMF提
文档:http://www.thinkcmf.com/document

## UPDATE
### X2.2.2
* 优化chrome 上传文件时,打开文件选择框慢
* 修复后台文件添加编辑相册图片移除浏览器不兼容问题
* 修复文件上传在遨游下不能上传文件问题
* 修复后台登录错误时提示无样式

### X2.2.1
[Core]
* 优化前后台表单验证
Expand Down
11 changes: 7 additions & 4 deletions admin/themes/simplebootx/Asset/plupload.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,11 @@
<div class="tab-pane active" id="upload-file-tab">
<div class="file-upload-btn-wrapper">
<!--选择按钮-->
<div id="container" style="display: inline-block;">
<a class="btn btn-primary" id="select-files">
选择文件
</a>
</div>
<span class="num">
<empty name="multi">
最多上传<em>1</em>个附件,
Expand Down Expand Up @@ -144,12 +146,12 @@

Wind.use('plupload',function(){
var uploader = new plupload.Uploader({
runtimes : 'html5,flash,silverlight,html4',
runtimes : 'flash,html5,silverlight,html4',
browse_button : 'select-files', // you can pass an id...
container: document.getElementById('files-container'), // ... or DOM Element itself
container: document.getElementById('container'), // ... or DOM Element itself
url : "{:U('asset/asset/plupload')}",
flash_swf_url : '../js/Moxie.swf',
silverlight_xap_url : '../js/Moxie.xap',
flash_swf_url : '__PUBLIC__/js/plupload/Moxie.swf',
silverlight_xap_url : '__PUBLIC__/js/plupload/Moxie.xap',
filters : {
max_file_size : '{$upload_max_filesize_mb}mb'/* ,
mime_types: [{$mime_type}] */
Expand Down Expand Up @@ -188,6 +190,7 @@
if(data.status==1){
if(!multi) {
$('#select-files').css('visibility','hidden');
$('#container').css('visibility','hidden');
}
var $file=$('#'+file.id);
$file.addClass('uploaded')
Expand Down
2 changes: 1 addition & 1 deletion application/Asset/Controller/UeditorController.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function imageManager(){
// 百度编辑器文件上传
public function upload(){
error_reporting(E_ERROR);
header("Content-Type: text/html; charset=utf-8");
header("Content-Type: application/json; charset=utf-8");

$action = $_GET['action'];

Expand Down
15 changes: 10 additions & 5 deletions application/Common/Common/function.php
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ function sp_verifycode_img($imgparam='length=4&font_size=20&width=238&height=50&
</ul>
*/

function sp_get_menu($id="main",$effected_id="mainmenu",$filetpl="<span class='file'>\$label</span>",$foldertpl="<span class='folder'>\$label</span>",$ul_class="" ,$li_class="" ,$style="filetree",$showlevel=6,$dropdown='hasChild'){
function sp_get_menu($id="main",$menu_root_ul_id="mainmenu",$filetpl="<span class='file'>\$label</span>",$foldertpl="<span class='folder'>\$label</span>",$ul_class="" ,$li_class="" ,$menu_root_ul_class="filetree",$showlevel=6,$dropdown='hasChild'){
$navs=F("site_nav_".$id);
if(empty($navs)){
$navs=_sp_get_menu_datas($id);
Expand All @@ -608,7 +608,7 @@ function sp_get_menu($id="main",$effected_id="mainmenu",$filetpl="<span class='f
import("Tree");
$tree = new \Tree();
$tree->init($navs);
return $tree->get_treeview_menu(0,$effected_id, $filetpl, $foldertpl, $showlevel,$ul_class,$li_class, $style, 1, FALSE, $dropdown);
return $tree->get_treeview_menu(0,$menu_root_ul_id, $filetpl, $foldertpl, $showlevel,$ul_class,$li_class, $menu_root_ul_class, 1, FALSE, $dropdown);
}


Expand Down Expand Up @@ -1086,6 +1086,11 @@ function sp_file_read($file){
}

/*修复缩略图使用网络地址时,会出现的错误。5iymt 2015年7月10日*/
/**
* 获取文件相对路径
* @param string $asset_url 文件的URL
* @return string
*/
function sp_asset_relative_url($asset_url){
if(strpos($asset_url,"http")===0){
return $asset_url;
Expand Down Expand Up @@ -1113,12 +1118,12 @@ function sp_content_page($content,$pagetpl='{first}{prev}{liststart}{list}{liste

/**
* 根据广告名称获取广告内容
* @param string $ad
* @param string $ad_name
* @return 广告内容
*/
function sp_getad($ad){
function sp_getad($ad_name){
$ad_obj= M("Ad");
$ad=$ad_obj->field("ad_content")->where("ad_name='$ad' and status=1")->find();
$ad=$ad_obj->field("ad_content")->where(array('ad_name'=>$ad_name,'status'=>1))->find();
return htmlspecialchars_decode($ad['ad_content']);
}

Expand Down
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function stripslashesRecursive(array $array){
//静态缓存目录
define("HTML_PATH", SITE_PATH . "data/runtime/Html/");
//版本号
define("THINKCMF_VERSION", 'X2.2.1');
define("THINKCMF_VERSION", 'X2.2.2');

define("THINKCMF_CORE_TAGLIBS", 'cx,Common\Lib\Taglib\TagLibSpadmin,Common\Lib\Taglib\TagLibHome');

Expand Down
2 changes: 1 addition & 1 deletion public/js/ueditor/dialogs/image/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@
accept: {
title: 'Images',
extensions: acceptExtensions,
mimeTypes: 'image/*'
mimeTypes: 'image/gif,image/jpeg,image/png,image/jpg,image/bmp'
},
swf: '../../third-party/webuploader/Uploader.swf',
server: actionUrl,
Expand Down
2 changes: 1 addition & 1 deletion public/js/ueditor/ueditor.all.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion themes/simplebootx/Public/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
$filetpl="<a href='\$href' target='\$target'>\$label</a>";
$foldertpl="<a href='\$href' target='\$target' class='dropdown-toggle' data-toggle='dropdown'>\$label <b class='caret'></b></a>";
$ul_class="dropdown-menu" ;
$li_class="" ;
$li_class="li-class" ;
$style="nav";
$showlevel=6;
$dropdown='dropdown';
Expand Down

1 comment on commit fed8f4a

@sunyang3721
Copy link

@sunyang3721 sunyang3721 commented on fed8f4a Dec 10, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

360浏览器 极速模式 添加文章 单击右上角上传图片 没有反应,总提示请上传图片。兼容模式是没问题的
admin/themes/simplebootx/Asset/plupload.html
第149行 必须改成这样顺序 runtimes : 'html5,flash,silverlight,html4',

Please sign in to comment.