Compare commits

...

6 Commits

Author SHA1 Message Date
Karson b0d295bd67 Merge branch 'develop' of gitee.com:karson/fastadmin into develop 2024-07-25 15:26:14 +08:00
Karson 3ee684875f 新增选择文件后回调
优化选择文件回调参数
2024-07-25 15:25:37 +08:00
Karson b6ae55ef1e 修复插件安装时发现冲突文件时无法提示的问题 2024-07-25 14:53:55 +08:00
Karson 38969376c9 优化冗余参数 2024-07-25 14:53:18 +08:00
Karson 1496698d46 优化API资源URL 2024-07-25 14:52:39 +08:00
Karson 25c0490285 优化安装脚本资源加载 2024-07-25 14:51:18 +08:00
10 changed files with 39 additions and 15 deletions

View File

@ -8,15 +8,15 @@
<title>{$config.title}</title>
<!-- Bootstrap Core CSS -->
<link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<link href="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/twitter-bootstrap/3.4.1/css/bootstrap.min.css" rel="stylesheet">
<!-- Plugin CSS -->
<link href="https://cdn.staticfile.org/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link href="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://cdn.staticfile.org/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
<script src="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<style type="text/css">
@ -401,10 +401,10 @@
</div> <!-- /container -->
<!-- jQuery -->
<script src="https://cdn.staticfile.org/jquery/2.1.4/jquery.min.js"></script>
<script src="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/jquery/3.6.0/jquery.min.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/twitter-bootstrap/3.4.1/js/bootstrap.min.js"></script>
<script type="text/javascript">
function syntaxHighlight(json) {

View File

@ -93,7 +93,7 @@ class Install extends Command
*/
public function index()
{
$this->view = View::instance(Config::get('template'), Config::get('view_replace_str'));
$this->view = View::instance(array_merge(Config::get('template'), ['tpl_cache' => false]));
$this->request = Request::instance();
define('INSTALL_PATH', APP_PATH . 'admin' . DS . 'command' . DS . 'Install' . DS);

View File

@ -254,7 +254,7 @@
</form>
<!-- jQuery -->
<script src="https://cdn.staticfile.org/jquery/2.1.4/jquery.min.js"></script>
<script src="__ROOT__/assets/libs/jquery/dist/jquery.min.js"></script>
<script>
$(function () {

View File

@ -20,7 +20,7 @@ return [
'Dashboard' => '进入后台',
'Go back' => '返回上一页',
'Install Successed' => '安装成功!',
'Security tips' => '温馨提示:请将以下后台登录入口添加到你的收藏夹,为了你的安全,不要泄漏或发送给他人!如有泄漏请及时修改!',
'Security tips' => '温馨提示:请将以下后台登录入口添加到你的收藏夹,为了你的站点安全,不要泄漏或发送给他人!如有泄漏请及时修改!',
'Please input correct database' => '请输入正确的数据库名',
'Please input correct username' => '用户名只能由3-30位数字、字母、下划线组合',
'Please input correct password' => '密码长度必须在6-30位之间不能包含空格',

View File

@ -241,6 +241,27 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template', 'cookie']
Layer.close(index);
});
return false;
} else if (ret && ret.code === -3) {
//插件目录发现影响全局的文件
Layer.open({
content: Template("conflicttpl", ret.data),
shade: 0.8,
area: area,
title: __('Warning'),
btn: [__('Continue install'), __('Cancel')],
end: function () {
},
yes: function (index) {
up.removeFile(file);
file.force = true;
up.uploadFile(file);
Layer.close(index);
}
});
} else {
Layer.alert(ret.msg, {title: __('Warning'), icon: 0});
}
});

View File

@ -167,7 +167,7 @@ define(['jquery', 'bootstrap', 'backend', 'form', 'table'], function ($, undefin
{
field: 'operate', title: __('Operate'), width: 85, events: {
'click .btn-chooseone': function (e, value, row, index) {
Fast.api.close({url: row.url, multiple: multiple});
Fast.api.close($.extend({multiple: multiple}, row));
},
}, formatter: function () {
return '<a href="javascript:;" class="btn btn-danger btn-chooseone btn-xs"><i class="fa fa-check"></i> ' + __('Choose') + '</a>';

View File

@ -138,7 +138,7 @@ require(['jquery', 'bootstrap'], function ($, undefined) {
window.Config = Config;
// 配置语言包的路径
var paths = {};
paths['lang'] = Config.moduleurl + '/ajax/lang?callback=define&controllername=' + Config.controllername + '&lang=' + Config.language + '&v=' + Config.site.version;
paths['lang'] = Config.moduleurl + '/ajax/lang?callback=define&controllername=' + Config.controllername + '&lang=' + Config.language;
// 避免目录冲突
paths['backend/'] = 'backend/';
// 如果是英文,则移除默认的定义

View File

@ -295,6 +295,9 @@ define(['jquery', 'bootstrap', 'upload', 'validator', 'validator-lang'], functio
var url = Config.upload.fullmode ? Fast.api.cdnurl(data.url) : data.url;
$("#" + input_id).val(url).trigger("change").trigger("validate");
}
// 触发选择文件自定义事件
button.trigger("fa.event.selectedfile", data);
}
});
return false;

View File

@ -138,7 +138,7 @@ require(['jquery', 'bootstrap'], function ($, undefined) {
window.Config = Config;
// 配置语言包的路径
var paths = {};
paths['lang'] = Config.moduleurl + '/ajax/lang?callback=define&controllername=' + Config.controllername + '&lang=' + Config.language + '&v=' + Config.site.version;
paths['lang'] = Config.moduleurl + '/ajax/lang?callback=define&controllername=' + Config.controllername + '&lang=' + Config.language;
// 避免目录冲突
paths['frontend/'] = 'frontend/';
// 如果是英文,则移除默认的定义

View File

@ -929,15 +929,15 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table
buttons.push(tempButton[item.name]);
}
existBtn.push(item.name);
}
}
} else {
buttons.push(item);
}
}
});
defaultBtn.forEach(function (value, index) {
if (existBtn.indexOf(value) === -1) {
buttons.push(tempButton[value]);
}
}
});
return Table.api.buttonlink(this, buttons, value, row, index, 'operate');
}