mirror of
https://github.com/getrebuild/rebuild.git
synced 2024-11-10 08:55:31 +08:00
Compare commits
3 commits
3165a5ec48
...
03a2405964
Author | SHA1 | Date | |
---|---|---|---|
|
03a2405964 | ||
|
7b3569d895 | ||
|
d78863212a |
7 changed files with 31 additions and 10 deletions
2
@rbv
2
@rbv
|
@ -1 +1 @@
|
|||
Subproject commit 734c2297f22409c82bd1f70228362c245c4db246
|
||||
Subproject commit f7cd2def480c19edbf2cc36aca2e1811b027decc
|
|
@ -105,8 +105,10 @@ public class DataExporter extends SetUser {
|
|||
final List<String> head = this.buildHead(builder);
|
||||
|
||||
// Excel
|
||||
if ("xls".equalsIgnoreCase(csvOrExcel)) {
|
||||
File file = RebuildConfiguration.getFileOfTemp(String.format("RBEXPORT-%d.xls", System.currentTimeMillis()));
|
||||
// xlsx: 无 65535 行数限制
|
||||
if ("xls".equalsIgnoreCase(csvOrExcel) || "xlsx".equalsIgnoreCase(csvOrExcel)) {
|
||||
File file = RebuildConfiguration.getFileOfTemp(
|
||||
String.format("RBEXPORT-%d.%s", System.currentTimeMillis(), csvOrExcel.toLowerCase()));
|
||||
|
||||
List<List<String>> head4Excel = new ArrayList<>();
|
||||
for (String h : head) {
|
||||
|
|
|
@ -177,7 +177,8 @@ public class LoginAction extends BaseController {
|
|||
uaSimple = "UNKNOW";
|
||||
}
|
||||
|
||||
String ipAddr = StringUtils.defaultString(ServletUtils.getRemoteAddr(request), "127.0.0.1");
|
||||
final String ipAddr = StringUtils.defaultString(ServletUtils.getRemoteAddr(request), "127.0.0.1");
|
||||
final String reqUrl = request.getRequestURL() == null ? "" : request.getRequestURL().toString();
|
||||
|
||||
final Record llog = EntityHelper.forNew(EntityHelper.LoginLog, UserService.SYSTEM_USER);
|
||||
llog.setID("user", user);
|
||||
|
@ -194,7 +195,7 @@ public class LoginAction extends BaseController {
|
|||
|
||||
String uaUrl = String.format("api/authority/user/echo?user=%s&ip=%s&ua=%s&source=%s",
|
||||
CodecUtils.base64UrlEncode(uid), ipAddr, CodecUtils.urlEncode(userAgent),
|
||||
CodecUtils.base64UrlEncode(request.getRequestURL().toString()));
|
||||
CodecUtils.base64UrlEncode(reqUrl));
|
||||
License.siteApiNoCache(uaUrl);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -190,6 +190,7 @@ See LICENSE and COMMERCIAL in the project root for license information.
|
|||
|
||||
.dataTables_oper.invisible2 > .btn.J_view {
|
||||
display: inline-block;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.record-merge-table {
|
||||
|
|
|
@ -5,9 +5,10 @@ rebuild is dual-licensed under commercial and open source licenses (GPLv3).
|
|||
See LICENSE and COMMERCIAL in the project root for license information.
|
||||
*/
|
||||
|
||||
const userId = window.__PageConfig.recordId
|
||||
const wpc = window.__PageConfig || {}
|
||||
const userId = wpc.recordId
|
||||
|
||||
$(document).ready(function () {
|
||||
$(document).ready(() => {
|
||||
$('.J_delete')
|
||||
.off('click')
|
||||
.on('click', () => {
|
||||
|
@ -154,6 +155,22 @@ $(document).ready(function () {
|
|||
}
|
||||
})
|
||||
}
|
||||
|
||||
// v3.8
|
||||
if (userId === '001-0000000000000001') {
|
||||
const RbForm_renderAfter = RbForm.renderAfter
|
||||
RbForm.renderAfter = function (formObject) {
|
||||
typeof RbForm_renderAfter === 'function' && RbForm_renderAfter()
|
||||
|
||||
formObject.onFieldValueChange((nv) => {
|
||||
if (nv.name === 'isDisabled') {
|
||||
let c = formObject.getFieldComp('isDisabled') || {}
|
||||
if (nv.value === 'T') c.setTip(<span className="text-warning">{$L('禁用将导致超级管理员无法登录')}</span>)
|
||||
else c.setTip(null)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
// 启用/禁用
|
||||
|
|
|
@ -76,7 +76,7 @@ const RbListPage = {
|
|||
|
||||
// Privileges
|
||||
if (ep) {
|
||||
if (ep.C === false) $('.J_new').remove()
|
||||
if (ep.C === false) $('.J_new, .J_new_group').remove()
|
||||
if (ep.D === false) $('.J_delete').remove()
|
||||
if (ep.U === false) $('.J_edit, .J_batch-update').remove()
|
||||
if (ep.A !== true) $('.J_assign').remove()
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
<div class="dataTables_oper invisible2">
|
||||
<button class="btn btn-space btn-secondary J_view" type="button" disabled="disabled"><i class="icon mdi mdi-folder-open"></i> [[${bundle.L('打开')}]]</button>
|
||||
<button class="btn btn-space btn-secondary J_edit" type="button" disabled="disabled"><i class="icon zmdi zmdi-edit"></i> [[${bundle.L('编辑')}]]</button>
|
||||
<div class="btn-group btn-space">
|
||||
<div class="btn-group btn-space J_new_group">
|
||||
<button class="btn btn-primary J_new" type="button"><i class="icon zmdi zmdi-plus"></i> [[${bundle.L('新建')}]]</button>
|
||||
<button class="btn btn-primary dropdown-toggle w-auto hide" type="button" data-toggle="dropdown"><span class="icon zmdi zmdi-chevron-down"></span></button>
|
||||
<div class="dropdown-menu dropdown-menu-primary dropdown-menu-right"></div>
|
||||
|
|
Loading…
Reference in a new issue