mirror of
https://github.com/getrebuild/rebuild.git
synced 2024-09-20 15:35:55 +08:00
Compare commits
3 commits
3165a5ec48
...
03a2405964
Author | SHA1 | Date | |
---|---|---|---|
03a2405964 | |||
7b3569d895 | |||
d78863212a |
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);
|
final List<String> head = this.buildHead(builder);
|
||||||
|
|
||||||
// Excel
|
// Excel
|
||||||
if ("xls".equalsIgnoreCase(csvOrExcel)) {
|
// xlsx: 无 65535 行数限制
|
||||||
File file = RebuildConfiguration.getFileOfTemp(String.format("RBEXPORT-%d.xls", System.currentTimeMillis()));
|
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<>();
|
List<List<String>> head4Excel = new ArrayList<>();
|
||||||
for (String h : head) {
|
for (String h : head) {
|
||||||
|
|
|
@ -177,7 +177,8 @@ public class LoginAction extends BaseController {
|
||||||
uaSimple = "UNKNOW";
|
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);
|
final Record llog = EntityHelper.forNew(EntityHelper.LoginLog, UserService.SYSTEM_USER);
|
||||||
llog.setID("user", user);
|
llog.setID("user", user);
|
||||||
|
@ -191,10 +192,10 @@ public class LoginAction extends BaseController {
|
||||||
User u = Application.getUserStore().getUser(user);
|
User u = Application.getUserStore().getUser(user);
|
||||||
String uid = StringUtils.defaultString(u.getEmail(), u.getName());
|
String uid = StringUtils.defaultString(u.getEmail(), u.getName());
|
||||||
if (uid == null) uid = user.toLiteral();
|
if (uid == null) uid = user.toLiteral();
|
||||||
|
|
||||||
String uaUrl = String.format("api/authority/user/echo?user=%s&ip=%s&ua=%s&source=%s",
|
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(uid), ipAddr, CodecUtils.urlEncode(userAgent),
|
||||||
CodecUtils.base64UrlEncode(request.getRequestURL().toString()));
|
CodecUtils.base64UrlEncode(reqUrl));
|
||||||
License.siteApiNoCache(uaUrl);
|
License.siteApiNoCache(uaUrl);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -190,6 +190,7 @@ See LICENSE and COMMERCIAL in the project root for license information.
|
||||||
|
|
||||||
.dataTables_oper.invisible2 > .btn.J_view {
|
.dataTables_oper.invisible2 > .btn.J_view {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.record-merge-table {
|
.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.
|
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')
|
$('.J_delete')
|
||||||
.off('click')
|
.off('click')
|
||||||
.on('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
|
// Privileges
|
||||||
if (ep) {
|
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.D === false) $('.J_delete').remove()
|
||||||
if (ep.U === false) $('.J_edit, .J_batch-update').remove()
|
if (ep.U === false) $('.J_edit, .J_batch-update').remove()
|
||||||
if (ep.A !== true) $('.J_assign').remove()
|
if (ep.A !== true) $('.J_assign').remove()
|
||||||
|
|
|
@ -93,7 +93,7 @@
|
||||||
<div class="dataTables_oper invisible2">
|
<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_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>
|
<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 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>
|
<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>
|
<div class="dropdown-menu dropdown-menu-primary dropdown-menu-right"></div>
|
||||||
|
|
Loading…
Reference in a new issue