mirror of
https://github.com/getrebuild/rebuild.git
synced 2025-11-08 05:03:37 +08:00
Conf new and add page on list (#944)
* Add vertical layout option to form design and rendering * Update login.html * bgcolor of chart * Update charts.css * MARK_WATERMARK_TEXT * be: Save and xxx * _noExtraButton in RbForm
This commit is contained in:
parent
c834c3ce1d
commit
44fca92069
36 changed files with 367 additions and 269 deletions
2
@rbv
2
@rbv
|
|
@ -1 +1 @@
|
|||
Subproject commit b9f7d6a0daa709d813455913980b615c6fe6302e
|
||||
Subproject commit ffe18eeaa8ae3a8acd3de09e1dbed1dbf994e9b4
|
||||
|
|
@ -330,6 +330,7 @@ public class FormsBuilder extends FormsManager {
|
|||
if (StringUtils.isBlank(recordName)) recordName = EasyMetaFactory.getLabel(recordData.getEntity());
|
||||
model.set("recordName", recordName);
|
||||
}
|
||||
|
||||
return model.toJSON();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ import com.rebuild.core.service.query.ParseHelper;
|
|||
import com.rebuild.core.service.query.QueryHelper;
|
||||
import com.rebuild.utils.JSONUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -54,6 +55,7 @@ public class FormsManager extends BaseLayoutManager {
|
|||
* @return
|
||||
*/
|
||||
public ConfigBean getFormLayout(String entity, ID recordOrLayoutId, int applyType) {
|
||||
Assert.notNull(entity, "[entity] cannot be null");
|
||||
final Object[][] allConfs = getAllConfig(entity, TYPE_FORM);
|
||||
|
||||
// TODO `applyType` 暂未用
|
||||
|
|
@ -107,6 +109,14 @@ public class FormsManager extends BaseLayoutManager {
|
|||
}
|
||||
|
||||
if (use != null) {
|
||||
Object shareTo = use.getObject("shareTo");
|
||||
if (shareTo instanceof JSONObject) {
|
||||
JSONObject shareTo4Attr = (JSONObject) shareTo;
|
||||
Object o;
|
||||
if ((o = shareTo4Attr.get("verticalLayout")) != null) use.set("verticalLayout", o);
|
||||
if ((o = shareTo4Attr.get("detailsFromsAttr")) != null) use.set("detailsFromsAttr", o);
|
||||
}
|
||||
|
||||
use.set("entity", entity)
|
||||
.remove("shareTo").remove("name");
|
||||
return use;
|
||||
|
|
@ -177,25 +187,25 @@ public class FormsManager extends BaseLayoutManager {
|
|||
public List<ConfigBean> getAllFormsAttr(String entity, boolean forNew) {
|
||||
final Object[][] alls = getAllConfig(entity, TYPE_FORM);
|
||||
|
||||
List<ConfigBean> flist = new ArrayList<>();
|
||||
List<ConfigBean> faList = new ArrayList<>();
|
||||
for (Object[] o : alls) {
|
||||
ConfigBean cb = findConfigBean(alls, (ID) o[0]).remove("config");
|
||||
cb.remove("elements");
|
||||
if (forNew) {
|
||||
if (new ShareToAttr(cb).isForNew()) flist.add(cb.remove("shareTo"));
|
||||
if (new ShareToAttr(cb).isForNew()) faList.add(cb.remove("shareTo"));
|
||||
} else {
|
||||
flist.add(cb);
|
||||
faList.add(cb);
|
||||
}
|
||||
}
|
||||
|
||||
// A-Z
|
||||
flist.sort((o1, o2) -> {
|
||||
faList.sort((o1, o2) -> {
|
||||
String name1 = Objects.toString(o1.getString("name"), "0");
|
||||
String name2 = Objects.toString(o2.getString("name"), "0");
|
||||
return name1.compareTo(name2);
|
||||
});
|
||||
|
||||
return flist;
|
||||
return faList;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -62,7 +62,8 @@ public abstract class ShareToManager implements ConfigManager {
|
|||
(hasApplyType ? ",applyType" : ""), getConfigEntity());
|
||||
Object[] c = Application.createQueryNoFilter(ql).setParameter(1, cfgid).unique();
|
||||
if (c != null) {
|
||||
Application.getCommonsCache().evict(formatCacheKey((String) c[0], hasApplyType ? (String) c[1] : null));
|
||||
String key = formatCacheKey((String) c[0], hasApplyType ? (String) c[1] : null);
|
||||
Application.getCommonsCache().evict(key);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -55,6 +55,8 @@ public class RecordTransfomer extends SetUser {
|
|||
final protected JSONObject transConfig;
|
||||
final protected boolean skipGuard;
|
||||
|
||||
final private ID transid;
|
||||
|
||||
/**
|
||||
* @param transid
|
||||
*/
|
||||
|
|
@ -63,6 +65,7 @@ public class RecordTransfomer extends SetUser {
|
|||
this.targetEntity = MetadataHelper.getEntity(config.getString("target"));
|
||||
this.transConfig = (JSONObject) config.getJSON("config");
|
||||
this.skipGuard = false;
|
||||
this.transid = transid;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -74,6 +77,7 @@ public class RecordTransfomer extends SetUser {
|
|||
this.targetEntity = targetEntity;
|
||||
this.transConfig = transConfig;
|
||||
this.skipGuard = skipGuard;
|
||||
this.transid = null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -259,7 +263,7 @@ public class RecordTransfomer extends SetUser {
|
|||
List<String> validFields = checkAndWarnFields(sourceEntity, fieldsMapping.values());
|
||||
if (validFields.isEmpty()) {
|
||||
// fix: https://github.com/getrebuild/rebuild/issues/633
|
||||
log.warn("No fields (var) for transform : {}", fieldsMapping);
|
||||
log.debug("No fields (var) for transform : {} in {}", fieldsMapping, this.transid);
|
||||
}
|
||||
|
||||
validFields.add(sourceEntity.getPrimaryField().getName());
|
||||
|
|
|
|||
|
|
@ -160,7 +160,6 @@ public class AviatorUtils {
|
|||
public static Iterator<Object> toIterator(Object value) {
|
||||
if (value instanceof Collection) return ((Collection<Object>) value).iterator();
|
||||
if (value instanceof Sequence) return ((Sequence<Object>) value).iterator();
|
||||
|
||||
throw new UnsupportedOperationException("Unsupport type : " + value);
|
||||
}
|
||||
|
||||
|
|
@ -175,4 +174,28 @@ public class AviatorUtils {
|
|||
if (ret instanceof ID) return new AviatorId((ID) ret);
|
||||
return FunctionUtils.wrapReturn(ret);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
*/
|
||||
public static ID toIdValue(Object o) {
|
||||
if (o instanceof ID) return (ID) o;
|
||||
|
||||
String o2str = o.toString().trim();
|
||||
if (o2str.isEmpty()) return null;
|
||||
if (ID.isId(o2str)) return ID.valueOf(o2str);
|
||||
|
||||
log.warn("Bad id string : {}", o);
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
*/
|
||||
public static String toStringValue(Object o) {
|
||||
if (o == null) return null;
|
||||
return o.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,6 +53,8 @@ public enum ConfigurationItem {
|
|||
|
||||
// 启用页面水印
|
||||
MarkWatermark(false),
|
||||
// 水印内容
|
||||
MarkWatermarkFormat,
|
||||
|
||||
// 密码策略,1-3
|
||||
PasswordPolicy(1),
|
||||
|
|
|
|||
|
|
@ -10,9 +10,11 @@ package com.rebuild.utils;
|
|||
import cn.devezhao.commons.web.ServletUtils;
|
||||
import cn.devezhao.commons.web.WebUtils;
|
||||
import cn.devezhao.persist4j.engine.ID;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.rebuild.api.user.AuthTokenManager;
|
||||
import com.rebuild.core.Application;
|
||||
import com.rebuild.core.BootApplication;
|
||||
import com.rebuild.core.privileges.bizz.User;
|
||||
import com.rebuild.core.support.ConfigurationItem;
|
||||
import com.rebuild.core.support.RebuildConfiguration;
|
||||
import com.rebuild.core.support.i18n.LanguageBundle;
|
||||
|
|
@ -21,6 +23,8 @@ import lombok.extern.slf4j.Slf4j;
|
|||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 封裝一些有用的工具方法
|
||||
|
|
@ -182,4 +186,42 @@ public class AppUtils {
|
|||
String ua = request.getHeader("user-agent");
|
||||
return ua != null && (ua.contains("Mobile") || ua.contains("iPhone") || ua.contains("Android"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 水印内容
|
||||
*
|
||||
* @param user
|
||||
* @return
|
||||
*/
|
||||
public static String getWatermarkText(ID user) {
|
||||
String wt = RebuildConfiguration.get(ConfigurationItem.MarkWatermarkFormat);
|
||||
if (StringUtils.isBlank(wt)) return null;
|
||||
|
||||
List<String> t = new ArrayList<>();
|
||||
User u = user == null ? null : Application.getUserStore().getUser(user);
|
||||
for (String item : wt.split(" ")) {
|
||||
// 用户ID
|
||||
if (item.contains("{USER}")) {
|
||||
item = item.replace("{USER}", u == null ? "" : ("***" + user.toLiteral().substring(7)));
|
||||
}
|
||||
// 姓名
|
||||
if (item.contains("{NAME}")) {
|
||||
item = item.replace("{NAME}", u == null ? "" : u.getFullName());
|
||||
}
|
||||
// 邮箱
|
||||
if (item.contains("{EMAIL}")) {
|
||||
item = item.replace("{EMAIL}", u == null ? "" : StringUtils.defaultIfBlank(u.getEmail(), ""));
|
||||
}
|
||||
// 电话
|
||||
if (item.contains("{PHONE}")) {
|
||||
item = item.replace("{PHONE}", u == null ? "" : StringUtils.defaultIfBlank(u.getWorkphone(), ""));
|
||||
}
|
||||
// 系统名称
|
||||
if (item.contains("{SYS}")) {
|
||||
item = item.replace("{SYS}", RebuildConfiguration.get(ConfigurationItem.AppName));
|
||||
}
|
||||
t.add(item);
|
||||
}
|
||||
return JSON.toJSONString(t);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,6 +107,11 @@ public class RebuildWebInterceptor implements AsyncHandlerInterceptor, InstallSt
|
|||
theme = THEMES_COLORS.get(theme);
|
||||
if (theme != null) request.setAttribute(WebConstants.THEME_COLOR, theme);
|
||||
}
|
||||
// v4.2 watermark
|
||||
if (RebuildConfiguration.getBool(ConfigurationItem.MarkWatermark)) {
|
||||
String wt = AppUtils.getWatermarkText(requestEntry.getRequestUser());
|
||||
if (wt != null) request.setAttribute("markWatermarkText", wt);
|
||||
}
|
||||
|
||||
final String requestUri = requestEntry.getRequestUri();
|
||||
|
||||
|
|
|
|||
|
|
@ -54,6 +54,10 @@ public class WebConstants {
|
|||
* 是否开启页面水印
|
||||
*/
|
||||
public static final String MARK_WATERMARK = "markWatermark";
|
||||
/**
|
||||
* 页面水印内容
|
||||
*/
|
||||
public static final String MARK_WATERMARK_TEXT = "markWatermarkText";
|
||||
|
||||
/**
|
||||
* 页脚
|
||||
|
|
|
|||
|
|
@ -60,9 +60,7 @@ public class FormDesignController extends BaseController {
|
|||
request.setAttribute("FormsAttr", JSON.toJSONString(attrs));
|
||||
|
||||
// v4.1
|
||||
if (easyEntity.getRawMeta().getMainEntity() != null) {
|
||||
mv.getModel().put("mainEntityName", easyEntity.getRawMeta().getMainEntity().getName());
|
||||
}
|
||||
mv.getModel().put("isMainEntity", easyEntity.getRawMeta().getDetailEntity() != null);
|
||||
|
||||
return mv;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ import static com.rebuild.core.support.ConfigurationItem.OnlyofficeServer;
|
|||
@Controller
|
||||
public class FilePreviewer extends BaseController {
|
||||
|
||||
// https://api.onlyoffice.com/docs/docs-api/usage-api/config/
|
||||
@GetMapping("/commons/file-preview")
|
||||
public ModelAndView ooPreview(HttpServletRequest request, HttpServletResponse response) throws IOException {
|
||||
return ooPreviewOrEditor(request, response, false);
|
||||
|
|
@ -100,6 +99,7 @@ public class FilePreviewer extends BaseController {
|
|||
return null;
|
||||
}
|
||||
|
||||
// https://api.onlyoffice.com/docs/docs-api/usage-api/config/
|
||||
JSONObject editorConfig = JSONUtils.toJSONObject(
|
||||
new String[]{"mode", "lang", "toolbar", "menu"},
|
||||
new Object[]{"view", AppUtils.getReuqestLocale(request), false, false});
|
||||
|
|
@ -110,6 +110,9 @@ public class FilePreviewer extends BaseController {
|
|||
}
|
||||
editorConfig.put("user", JSONUtils.toJSONObject(new String[]{"id", "name"}, user));
|
||||
|
||||
JSONObject customization = new JSONObject();
|
||||
customization.put("uiTheme", "theme-dark");
|
||||
|
||||
// 编辑模式
|
||||
if (editor) {
|
||||
String callbackUrl = RebuildConfiguration.getHomeUrl("/commons/file-editor-forcesave");
|
||||
|
|
@ -122,8 +125,9 @@ public class FilePreviewer extends BaseController {
|
|||
editorConfig.put("mode", "edit");
|
||||
editorConfig.put("toolbar", true);
|
||||
editorConfig.put("menu", true);
|
||||
editorConfig.put("customization", JSONUtils.toJSONObject("forcesave", true));
|
||||
customization.put("forcesave", true);
|
||||
}
|
||||
editorConfig.put("customization", customization);
|
||||
|
||||
Object[] ps = OnlyOffice.buildPreviewParams(src, editorConfig);
|
||||
|
||||
|
|
@ -140,10 +144,11 @@ public class FilePreviewer extends BaseController {
|
|||
ooConfig.put("type", "desktop");
|
||||
mv.getModel().put("title", Language.L("文档编辑"));
|
||||
} else {
|
||||
ooConfig.put("type", "embedded");
|
||||
// https://api.onlyoffice.com/docs/docs-api/usage-api/config/#type
|
||||
String view = StringUtils.defaultIfBlank(getParameter(request, "view"), "embedded");
|
||||
ooConfig.put("type", view);
|
||||
mv.getModel().put("title", Language.L("文档预览"));
|
||||
}
|
||||
|
||||
if (Application.devMode()) System.out.println("[dev] " + JSONUtils.prettyPrint(ooConfig));
|
||||
mv.getModel().put("_DocEditorConfig", ooConfig);
|
||||
return mv;
|
||||
|
|
|
|||
|
|
@ -143,14 +143,11 @@ public class GeneralModelController extends EntityController {
|
|||
FormsBuilderContextHolder.setFromProTable();
|
||||
// 明细绑定主实体布局
|
||||
if (specLayout == null) {
|
||||
ConfigBean cb = FormsBuilder.instance.getLayoutById(followMainLayout);
|
||||
Object attrs = cb.getObject("shareTo");
|
||||
if (attrs instanceof JSONObject) {
|
||||
JSONObject detailsFromsAttr = (JSONObject) ((JSONObject) attrs).get("detailsFromsAttr");
|
||||
Object specLayout41 = detailsFromsAttr == null ? null : detailsFromsAttr.get(entity);
|
||||
if (ID.isId(specLayout41)) {
|
||||
specLayout = ID.valueOf((String) specLayout41);
|
||||
}
|
||||
ConfigBean cb = FormsBuilder.instance.getFormLayout(modelEntity.getMainEntity().getName(), followMainLayout, 0);
|
||||
JSONObject detailsFromsAttr = (JSONObject) cb.getJSON("detailsFromsAttr");
|
||||
Object specLayout41 = detailsFromsAttr == null ? null : detailsFromsAttr.get(entity);
|
||||
if (ID.isId(specLayout41)) {
|
||||
specLayout = ID.valueOf((String) specLayout41);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ import java.text.MessageFormat;
|
|||
public class ListAndViewRedirection extends BaseController {
|
||||
|
||||
// compatible: v3.1 "/app/list-and-view"
|
||||
@GetMapping({ "/app/list-and-view", "/app/redirect" })
|
||||
@GetMapping({"/app/list-and-view", "/app/redirect"})
|
||||
public void redirect(@IdParam ID anyId, HttpServletRequest request, HttpServletResponse response) throws IOException {
|
||||
String url = null;
|
||||
|
||||
|
|
@ -109,8 +109,8 @@ public class ListAndViewRedirection extends BaseController {
|
|||
public ModelAndView dockView(@IdParam ID recordId) {
|
||||
Entity entity = MetadataHelper.getEntity(recordId.getEntityCode());
|
||||
String viewUrl = String.format("../%s/view/%s", entity.getName(), recordId);
|
||||
ModelAndView mv = createModelAndView("/general/dock-view");
|
||||
|
||||
ModelAndView mv = createModelAndView("/general/dock-view");
|
||||
mv.getModel().put("entityName", entity.getName());
|
||||
mv.getModel().put("entityLabel", EasyMetaFactory.getLabel(entity));
|
||||
mv.getModel().put("id", recordId);
|
||||
|
|
|
|||
|
|
@ -185,6 +185,7 @@ public class ReportsController extends BaseController {
|
|||
|
||||
String previewUrl = OnlyOffice.getBestPreviewUrl();
|
||||
previewUrl += CodecUtils.urlEncode(fileUrl);
|
||||
if (previewUrl.contains(OnlyOffice.OO_PREVIEW_URL)) previewUrl += "&view=desktop";
|
||||
response.sendRedirect(previewUrl);
|
||||
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@
|
|||
<meta name="rb._officePreviewUrl" th:content="${PortalOfficePreviewUrl}" />
|
||||
<meta name="rb._uploadMaxSize" th:content="${PortalUploadMaxSize}" />
|
||||
<meta name="rb._rbTempAuth" content="true" th:if="${session.rbTempAuth != null}" />
|
||||
<meta name="rb._markWatermarkText" th:content="${markWatermarkText}" th:if="${markWatermarkText != null}" />
|
||||
<!--[if lt IE 10]><script>location.href = '[[${baseUrl}]]/error/unsupported-browser'</script><![endif]-->
|
||||
<script th:if="${T(com.rebuild.utils.AppUtils).isIE11(#request)}" th:src="@{/assets/lib/react/polyfill.min.js?v=7.6.0}"></script>
|
||||
<script th:if="${markWatermark == 'true' || session.rbTempAuth != null}" th:src="@{/assets/lib/watermark.js?v=310}"></script>
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@
|
|||
window.__PageConfig = {
|
||||
formConfig: [(${FormConfig ?:'null'})],
|
||||
entityName: '[[${entityName}]]',
|
||||
mainEntityName: '[[${mainEntityName}]]',
|
||||
isMainEntity: [(${isMainEntity ?:'false'})],
|
||||
isSuperAdmin: '[[${isSuperAdmin}]]' === 'true',
|
||||
formsAttr: [(${FormsAttr ?:'null'})],
|
||||
}
|
||||
|
|
|
|||
|
|
@ -169,6 +169,10 @@
|
|||
<td width="40%">[[${bundle.L('显示页面水印')}]]</td>
|
||||
<td th:data-id="MarkWatermark" th:data-value="${MarkWatermark}">[[${MarkWatermark ? bundle.L('是') : bundle.L('否')}]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40%">[[${bundle.L('页面水印内容')}]] <sup class="rbv"></sup></td>
|
||||
<td th:data-id="${commercial > 0 ? 'MarkWatermarkFormat' : ''}" th:data-value="${MarkWatermarkFormat}" data-optional="true">[[${MarkWatermarkFormat ?:bundle.L('默认')}]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[${bundle.L('允许分享文件')}]]</td>
|
||||
<td data-id="FileSharable" th:data-value="${FileSharable}">[[${FileSharable ? bundle.L('是') : bundle.L('否')}]]</td>
|
||||
|
|
|
|||
|
|
@ -535,3 +535,19 @@ a.ui-draggable.ui-draggable-dragging {
|
|||
box-shadow: rgba(0, 0, 0, 0.2) 0 2px 6px;
|
||||
width: 199px;
|
||||
}
|
||||
|
||||
.gradient-bg-list {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.gradient-bg-list > a {
|
||||
display: inline-block;
|
||||
width: 50px;
|
||||
height: 20px;
|
||||
margin: 0 3px;
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
.gradient-bg-list > a:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -98,6 +98,10 @@ See LICENSE and COMMERCIAL in the project root for license information.
|
|||
text-align: center;
|
||||
}
|
||||
|
||||
.chart-body.rb-loading-active::after {
|
||||
opacity: unset;
|
||||
}
|
||||
|
||||
.chart-body .chart {
|
||||
line-height: normal;
|
||||
height: 100%;
|
||||
|
|
@ -743,401 +747,302 @@ See LICENSE and COMMERCIAL in the project root for license information.
|
|||
/* gradient-backgrounds.css */
|
||||
|
||||
.gradient-bg-1 {
|
||||
background: linear-gradient(135deg, #0fd540, #1784cd);
|
||||
background: linear-gradient(126deg, #c471f5, #fa71cd);
|
||||
}
|
||||
|
||||
.gradient-bg-2 {
|
||||
background: linear-gradient(135deg, #ba4e15, #baf36d);
|
||||
background: linear-gradient(123deg, #283c86, #45a247);
|
||||
}
|
||||
|
||||
.gradient-bg-3 {
|
||||
background: linear-gradient(135deg, #c733c7, #d14b90);
|
||||
background: linear-gradient(120deg, #84fab0, #8fd3f4);
|
||||
}
|
||||
|
||||
.gradient-bg-4 {
|
||||
background: linear-gradient(135deg, #18e18f, #3bb3c9);
|
||||
background: linear-gradient(144deg, #00c3ff, #ffff1c);
|
||||
}
|
||||
|
||||
.gradient-bg-5 {
|
||||
background: linear-gradient(135deg, #53d4b2, #1a43b9);
|
||||
background: linear-gradient(143deg, #ee9ca7, #ffdde1);
|
||||
}
|
||||
|
||||
.gradient-bg-6 {
|
||||
background: linear-gradient(135deg, #86a4da, #5d4bfd);
|
||||
background: linear-gradient(77deg, #f46b45, #eea849);
|
||||
}
|
||||
|
||||
.gradient-bg-7 {
|
||||
background: linear-gradient(135deg, #32cd12, #39df5d);
|
||||
background: linear-gradient(125deg, #84fab0, #8fd3f4);
|
||||
}
|
||||
|
||||
.gradient-bg-8 {
|
||||
background: linear-gradient(135deg, #cd4f2f, #afec30);
|
||||
background: linear-gradient(50deg, #834d9b, #d04ed6);
|
||||
}
|
||||
|
||||
.gradient-bg-9 {
|
||||
background: linear-gradient(135deg, #5ed1fe, #5f85f5);
|
||||
background: linear-gradient(41deg, #eecda3, #ef629f);
|
||||
}
|
||||
|
||||
.gradient-bg-10 {
|
||||
background: linear-gradient(135deg, #305fa3, #a033cb);
|
||||
background: linear-gradient(89deg, #ff6a00, #ee0979);
|
||||
}
|
||||
|
||||
.gradient-bg-11 {
|
||||
background: linear-gradient(135deg, #0bec56, #44dbc8);
|
||||
background: linear-gradient(36deg, #ffecd2, #fcb69f);
|
||||
}
|
||||
|
||||
.gradient-bg-12 {
|
||||
background: linear-gradient(135deg, #d4c46f, #20ea01);
|
||||
background: linear-gradient(43deg, #f77062, #fe5196);
|
||||
}
|
||||
|
||||
.gradient-bg-13 {
|
||||
background: linear-gradient(135deg, #f15651, #bcc90f);
|
||||
background: linear-gradient(119deg, #12c2e9, #c471ed);
|
||||
}
|
||||
|
||||
.gradient-bg-14 {
|
||||
background: linear-gradient(135deg, #09f62c, #14c274);
|
||||
background: linear-gradient(47deg, #667eea, #764ba2);
|
||||
}
|
||||
|
||||
.gradient-bg-15 {
|
||||
background: linear-gradient(135deg, #74f360, #2aea82);
|
||||
background: linear-gradient(53deg, #614385, #516395);
|
||||
}
|
||||
|
||||
.gradient-bg-16 {
|
||||
background: linear-gradient(135deg, #f4c54e, #6fe632);
|
||||
background: linear-gradient(102deg, #12c2e9, #c471ed);
|
||||
}
|
||||
|
||||
.gradient-bg-17 {
|
||||
background: linear-gradient(135deg, #338f9e, #5d72d0);
|
||||
background: linear-gradient(148deg, #f46b45, #eea849);
|
||||
}
|
||||
|
||||
.gradient-bg-18 {
|
||||
background: linear-gradient(135deg, #2cf911, #64dbb1);
|
||||
background: linear-gradient(74deg, #d38312, #a83279);
|
||||
}
|
||||
|
||||
.gradient-bg-19 {
|
||||
background: linear-gradient(135deg, #bbe278, #8ad96f);
|
||||
background: linear-gradient(97deg, #a18cd1, #fbc2eb);
|
||||
}
|
||||
|
||||
.gradient-bg-20 {
|
||||
background: linear-gradient(135deg, #5e7cf7, #c24dd2);
|
||||
background: linear-gradient(46deg, #f6d365, #fda085);
|
||||
}
|
||||
|
||||
.gradient-bg-21 {
|
||||
background: linear-gradient(135deg, #ae29c6, #c9444a);
|
||||
background: linear-gradient(95deg, #84fab0, #8fd3f4);
|
||||
}
|
||||
|
||||
.gradient-bg-22 {
|
||||
background: linear-gradient(135deg, #b849c3, #d11d20);
|
||||
background: linear-gradient(102deg, #cc2b5e, #753a88);
|
||||
}
|
||||
|
||||
.gradient-bg-23 {
|
||||
background: linear-gradient(135deg, #fcbe20, #b3dd5a);
|
||||
background: linear-gradient(72deg, #f46b45, #eea849);
|
||||
}
|
||||
|
||||
.gradient-bg-24 {
|
||||
background: linear-gradient(135deg, #1bfd44, #2f93cb);
|
||||
background: linear-gradient(87deg, #d38312, #a83279);
|
||||
}
|
||||
|
||||
.gradient-bg-25 {
|
||||
background: linear-gradient(135deg, #46bf15, #1fd826);
|
||||
background: linear-gradient(43deg, #2193b0, #6dd5ed);
|
||||
}
|
||||
|
||||
.gradient-bg-26 {
|
||||
background: linear-gradient(135deg, #de85b6, #d21f25);
|
||||
background: linear-gradient(76deg, #f857a6, #ff5858);
|
||||
}
|
||||
|
||||
.gradient-bg-27 {
|
||||
background: linear-gradient(135deg, #3a35cf, #f13ced);
|
||||
background: linear-gradient(60deg, #f46b45, #eea849);
|
||||
}
|
||||
|
||||
.gradient-bg-28 {
|
||||
background: linear-gradient(135deg, #3a55c4, #860adf);
|
||||
background: linear-gradient(107deg, #ff9a9e, #fad0c4);
|
||||
}
|
||||
|
||||
.gradient-bg-29 {
|
||||
background: linear-gradient(135deg, #ed5c2e, #abb43b);
|
||||
background: linear-gradient(92deg, #f857a6, #ff5858);
|
||||
}
|
||||
|
||||
.gradient-bg-30 {
|
||||
background: linear-gradient(135deg, #697bf2, #5623bf);
|
||||
background: linear-gradient(82deg, #f77062, #fe5196);
|
||||
}
|
||||
|
||||
.gradient-bg-31 {
|
||||
background: linear-gradient(135deg, #05ef0f, #38f98f);
|
||||
background: linear-gradient(125deg, #ff6a00, #ee0979);
|
||||
}
|
||||
|
||||
.gradient-bg-32 {
|
||||
background: linear-gradient(135deg, #b01ac1, #df7695);
|
||||
background: linear-gradient(111deg, #f093fb, #f5576c);
|
||||
}
|
||||
|
||||
.gradient-bg-33 {
|
||||
background: linear-gradient(135deg, #df5caa, #e49172);
|
||||
background: linear-gradient(50deg, #a1c4fd, #c2e9fb);
|
||||
}
|
||||
|
||||
.gradient-bg-34 {
|
||||
background: linear-gradient(135deg, #d01494, #d89b7d);
|
||||
background: linear-gradient(142deg, #d38312, #a83279);
|
||||
}
|
||||
|
||||
.gradient-bg-35 {
|
||||
background: linear-gradient(135deg, #2e579f, #131dd1);
|
||||
background: linear-gradient(94deg, #ee9ca7, #ffdde1);
|
||||
}
|
||||
|
||||
.gradient-bg-36 {
|
||||
background: linear-gradient(135deg, #4bbeee, #4e2fc2);
|
||||
background: linear-gradient(100deg, #7b4397, #dc2430);
|
||||
}
|
||||
|
||||
.gradient-bg-37 {
|
||||
background: linear-gradient(135deg, #4ced44, #2cf7e7);
|
||||
background: linear-gradient(99deg, #ff4e50, #f9d423);
|
||||
}
|
||||
|
||||
.gradient-bg-38 {
|
||||
background: linear-gradient(135deg, #e2b77f, #b3d138);
|
||||
background: linear-gradient(143deg, #eecda3, #ef629f);
|
||||
}
|
||||
|
||||
.gradient-bg-39 {
|
||||
background: linear-gradient(135deg, #f430af, #e25b35);
|
||||
background: linear-gradient(94deg, #eecda3, #ef629f);
|
||||
}
|
||||
|
||||
.gradient-bg-40 {
|
||||
background: linear-gradient(135deg, #c3da55, #38af47);
|
||||
background: linear-gradient(132deg, #de6161, #2657eb);
|
||||
}
|
||||
|
||||
.gradient-bg-41 {
|
||||
background: linear-gradient(135deg, #ca044b, #e5cf75);
|
||||
background: linear-gradient(65deg, #ff6a00, #ee0979);
|
||||
}
|
||||
|
||||
.gradient-bg-42 {
|
||||
background: linear-gradient(135deg, #02f78d, #114df6);
|
||||
background: linear-gradient(111deg, #00c3ff, #ffff1c);
|
||||
}
|
||||
|
||||
.gradient-bg-43 {
|
||||
background: linear-gradient(135deg, #dd7ed3, #e94e7d);
|
||||
background: linear-gradient(107deg, #89f7fe, #66a6ff);
|
||||
}
|
||||
|
||||
.gradient-bg-44 {
|
||||
background: linear-gradient(135deg, #167fcc, #1d48fe);
|
||||
background: linear-gradient(41deg, #f093fb, #f5576c);
|
||||
}
|
||||
|
||||
.gradient-bg-45 {
|
||||
background: linear-gradient(135deg, #ec17b4, #e64313);
|
||||
background: linear-gradient(146deg, #ffecd2, #fcb69f);
|
||||
}
|
||||
|
||||
.gradient-bg-46 {
|
||||
background: linear-gradient(135deg, #d923f7, #fa1f38);
|
||||
background: linear-gradient(54deg, #283c86, #45a247);
|
||||
}
|
||||
|
||||
.gradient-bg-47 {
|
||||
background: linear-gradient(135deg, #d462f2, #f20e58);
|
||||
background: linear-gradient(138deg, #2193b0, #6dd5ed);
|
||||
}
|
||||
|
||||
.gradient-bg-48 {
|
||||
background: linear-gradient(135deg, #2de65c, #56c99f);
|
||||
background: linear-gradient(74deg, #f857a6, #ff5858);
|
||||
}
|
||||
|
||||
.gradient-bg-49 {
|
||||
background: linear-gradient(135deg, #91d377, #40c388);
|
||||
background: linear-gradient(37deg, #ff9a9e, #fad0c4);
|
||||
}
|
||||
|
||||
.gradient-bg-50 {
|
||||
background: linear-gradient(135deg, #f3c738, #68af2b);
|
||||
background: linear-gradient(98deg, #614385, #516395);
|
||||
}
|
||||
|
||||
.gradient-bg-51 {
|
||||
background: linear-gradient(135deg, #e98152, #e5f171);
|
||||
background: linear-gradient(32deg, #d38312, #a83279);
|
||||
}
|
||||
|
||||
.gradient-bg-52 {
|
||||
background: linear-gradient(135deg, #1cdef3, #2752b1);
|
||||
background: linear-gradient(68deg, #d38312, #a83279);
|
||||
}
|
||||
|
||||
.gradient-bg-53 {
|
||||
background: linear-gradient(135deg, #f53816, #97d512);
|
||||
background: linear-gradient(85deg, #2193b0, #6dd5ed);
|
||||
}
|
||||
|
||||
.gradient-bg-54 {
|
||||
background: linear-gradient(135deg, #e8de49, #83e512);
|
||||
background: linear-gradient(143deg, #ee9ca7, #ffdde1);
|
||||
}
|
||||
|
||||
.gradient-bg-55 {
|
||||
background: linear-gradient(135deg, #e4285b, #da9f17);
|
||||
background: linear-gradient(145deg, #ff6a00, #ee0979);
|
||||
}
|
||||
|
||||
.gradient-bg-56 {
|
||||
background: linear-gradient(135deg, #349f43, #2e96a4);
|
||||
background: linear-gradient(33deg, #a18cd1, #fbc2eb);
|
||||
}
|
||||
|
||||
.gradient-bg-57 {
|
||||
background: linear-gradient(135deg, #e137ca, #ca534a);
|
||||
background: linear-gradient(101deg, #eecda3, #ef629f);
|
||||
}
|
||||
|
||||
.gradient-bg-58 {
|
||||
background: linear-gradient(135deg, #dae04e, #42bf14);
|
||||
background: linear-gradient(143deg, #12c2e9, #c471ed);
|
||||
}
|
||||
|
||||
.gradient-bg-59 {
|
||||
background: linear-gradient(135deg, #4be671, #08c5dd);
|
||||
background: linear-gradient(35deg, #d38312, #a83279);
|
||||
}
|
||||
|
||||
.gradient-bg-60 {
|
||||
background: linear-gradient(135deg, #d8a884, #b4e83c);
|
||||
background: linear-gradient(121deg, #cc2b5e, #753a88);
|
||||
}
|
||||
|
||||
.gradient-bg-61 {
|
||||
background: linear-gradient(135deg, #73e99a, #24bbe3);
|
||||
background: linear-gradient(125deg, #a1c4fd, #c2e9fb);
|
||||
}
|
||||
|
||||
.gradient-bg-62 {
|
||||
background: linear-gradient(135deg, #af2c4b, #9f9230);
|
||||
background: linear-gradient(80deg, #2bc0e4, #eaecc6);
|
||||
}
|
||||
|
||||
.gradient-bg-63 {
|
||||
background: linear-gradient(135deg, #d6ad77, #6aac23);
|
||||
background: linear-gradient(128deg, #a18cd1, #fbc2eb);
|
||||
}
|
||||
|
||||
.gradient-bg-64 {
|
||||
background: linear-gradient(135deg, #c35bd1, #f260b2);
|
||||
background: linear-gradient(37deg, #ee9ca7, #ffdde1);
|
||||
}
|
||||
|
||||
.gradient-bg-65 {
|
||||
background: linear-gradient(135deg, #9462dd, #d96eab);
|
||||
background: linear-gradient(67deg, #2193b0, #6dd5ed);
|
||||
}
|
||||
|
||||
.gradient-bg-66 {
|
||||
background: linear-gradient(135deg, #d72933, #f6be65);
|
||||
background: linear-gradient(30deg, #c471f5, #fa71cd);
|
||||
}
|
||||
|
||||
.gradient-bg-67 {
|
||||
background: linear-gradient(135deg, #ce0eb1, #f56179);
|
||||
background: linear-gradient(30deg, #f093fb, #f5576c);
|
||||
}
|
||||
|
||||
.gradient-bg-68 {
|
||||
background: linear-gradient(135deg, #32d0d5, #1405c8);
|
||||
background: linear-gradient(95deg, #f77062, #fe5196);
|
||||
}
|
||||
|
||||
.gradient-bg-69 {
|
||||
background: linear-gradient(135deg, #e47ab6, #fc274f);
|
||||
background: linear-gradient(58deg, #283c86, #45a247);
|
||||
}
|
||||
|
||||
.gradient-bg-70 {
|
||||
background: linear-gradient(135deg, #5873db, #9f60df);
|
||||
background: linear-gradient(86deg, #a1c4fd, #c2e9fb);
|
||||
}
|
||||
|
||||
.gradient-bg-71 {
|
||||
background: linear-gradient(135deg, #8730a4, #e33d65);
|
||||
background: linear-gradient(148deg, #614385, #516395);
|
||||
}
|
||||
|
||||
.gradient-bg-72 {
|
||||
background: linear-gradient(135deg, #25bd88, #6b86d5);
|
||||
background: linear-gradient(71deg, #ff4e50, #f9d423);
|
||||
}
|
||||
|
||||
.gradient-bg-73 {
|
||||
background: linear-gradient(135deg, #3153a6, #6858f2);
|
||||
background: linear-gradient(71deg, #a1c4fd, #c2e9fb);
|
||||
}
|
||||
|
||||
.gradient-bg-74 {
|
||||
background: linear-gradient(135deg, #5f3fc6, #9e07fe);
|
||||
background: linear-gradient(125deg, #f857a6, #ff5858);
|
||||
}
|
||||
|
||||
.gradient-bg-75 {
|
||||
background: linear-gradient(135deg, #e007fe, #cb130d);
|
||||
background: linear-gradient(96deg, #a1c4fd, #c2e9fb);
|
||||
}
|
||||
|
||||
.gradient-bg-76 {
|
||||
background: linear-gradient(135deg, #8820bd, #fa1e93);
|
||||
background: linear-gradient(128deg, #f2994a, #f2c94c);
|
||||
}
|
||||
|
||||
.gradient-bg-77 {
|
||||
background: linear-gradient(135deg, #aa3c34, #d1b95e);
|
||||
background: linear-gradient(130deg, #ff6a00, #ee0979);
|
||||
}
|
||||
|
||||
.gradient-bg-78 {
|
||||
background: linear-gradient(135deg, #7602f5, #e46dc0);
|
||||
background: linear-gradient(95deg, #de6161, #2657eb);
|
||||
}
|
||||
|
||||
.gradient-bg-79 {
|
||||
background: linear-gradient(135deg, #7a9f34, #57feac);
|
||||
background: linear-gradient(76deg, #ff4e50, #f9d423);
|
||||
}
|
||||
|
||||
.gradient-bg-80 {
|
||||
background: linear-gradient(135deg, #86ccda, #7536e6);
|
||||
background: linear-gradient(34deg, #a1c4fd, #c2e9fb);
|
||||
}
|
||||
|
||||
.gradient-bg-81 {
|
||||
background: linear-gradient(135deg, #4467e1, #c767ef);
|
||||
background: linear-gradient(134deg, #f6d365, #fda085);
|
||||
}
|
||||
|
||||
.gradient-bg-82 {
|
||||
background: linear-gradient(135deg, #fc5416, #f9d632);
|
||||
background: linear-gradient(87deg, #eecda3, #ef629f);
|
||||
}
|
||||
|
||||
.gradient-bg-83 {
|
||||
background: linear-gradient(135deg, #79e243, #23b536);
|
||||
background: linear-gradient(144deg, #ff9a9e, #fad0c4);
|
||||
}
|
||||
|
||||
.gradient-bg-84 {
|
||||
background: linear-gradient(135deg, #e81334, #e5ea5f);
|
||||
background: linear-gradient(148deg, #f77062, #fe5196);
|
||||
}
|
||||
|
||||
.gradient-bg-85 {
|
||||
background: linear-gradient(135deg, #7362fb, #a745f6);
|
||||
background: linear-gradient(55deg, #00c3ff, #ffff1c);
|
||||
}
|
||||
|
||||
.gradient-bg-86 {
|
||||
background: linear-gradient(135deg, #0445cf, #4c07c9);
|
||||
background: linear-gradient(42deg, #a18cd1, #fbc2eb);
|
||||
}
|
||||
|
||||
.gradient-bg-87 {
|
||||
background: linear-gradient(135deg, #29fe60, #3ca1ca);
|
||||
background: linear-gradient(65deg, #ff6a00, #ee0979);
|
||||
}
|
||||
|
||||
.gradient-bg-88 {
|
||||
background: linear-gradient(135deg, #f5163f, #d5bf21);
|
||||
background: linear-gradient(33deg, #ee9ca7, #ffdde1);
|
||||
}
|
||||
|
||||
.gradient-bg-89 {
|
||||
background: linear-gradient(135deg, #f89c6d, #a3ff22);
|
||||
background: linear-gradient(79deg, #a1c4fd, #c2e9fb);
|
||||
}
|
||||
|
||||
.gradient-bg-90 {
|
||||
background: linear-gradient(135deg, #a11bf6, #b62a4b);
|
||||
background: linear-gradient(110deg, #00c3ff, #ffff1c);
|
||||
}
|
||||
|
||||
.gradient-bg-91 {
|
||||
background: linear-gradient(135deg, #d65478, #ea9018);
|
||||
background: linear-gradient(106deg, #f093fb, #f5576c);
|
||||
}
|
||||
|
||||
.gradient-bg-92 {
|
||||
background: linear-gradient(135deg, #e4ad38, #9af559);
|
||||
background: linear-gradient(91deg, #ee9ca7, #ffdde1);
|
||||
}
|
||||
|
||||
.gradient-bg-93 {
|
||||
background: linear-gradient(135deg, #0798da, #301fb1);
|
||||
background: linear-gradient(82deg, #cc2b5e, #753a88);
|
||||
}
|
||||
|
||||
.gradient-bg-94 {
|
||||
background: linear-gradient(135deg, #7611d0, #a62975);
|
||||
background: linear-gradient(89deg, #d38312, #a83279);
|
||||
}
|
||||
|
||||
.gradient-bg-95 {
|
||||
background: linear-gradient(135deg, #71e67d, #26dbd0);
|
||||
background: linear-gradient(76deg, #614385, #516395);
|
||||
}
|
||||
|
||||
.gradient-bg-96 {
|
||||
background: linear-gradient(135deg, #6bdbe5, #796df0);
|
||||
background: linear-gradient(87deg, #f6d365, #fda085);
|
||||
}
|
||||
|
||||
.gradient-bg-97 {
|
||||
background: linear-gradient(135deg, #e1cc31, #80e281);
|
||||
background: linear-gradient(121deg, #84fab0, #8fd3f4);
|
||||
}
|
||||
|
||||
.gradient-bg-98 {
|
||||
background: linear-gradient(135deg, #14c4bc, #2a69b5);
|
||||
background: linear-gradient(107deg, #f6d365, #fda085);
|
||||
}
|
||||
|
||||
.gradient-bg-99 {
|
||||
background: linear-gradient(135deg, #b69732, #bee819);
|
||||
background: linear-gradient(88deg, #f6d365, #fda085);
|
||||
}
|
||||
|
||||
.gradient-bg-100 {
|
||||
background: linear-gradient(135deg, #d6138c, #a7392c);
|
||||
background: linear-gradient(56deg, #ff4e50, #f9d423);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1788,6 +1788,8 @@ i.dividing.ui-draggable-dragging {
|
|||
.column-multi span.badge {
|
||||
background-color: #f2f2f2;
|
||||
border-color: #f2f2f2;
|
||||
background-color: rgba(0, 0, 0, 0.04);
|
||||
border-color: transparent;
|
||||
}
|
||||
|
||||
.column-fixed {
|
||||
|
|
|
|||
|
|
@ -387,6 +387,7 @@ body {
|
|||
|
||||
.view-user .user-show {
|
||||
line-height: 1;
|
||||
cursor: pointer !important;
|
||||
}
|
||||
|
||||
.shares-list {
|
||||
|
|
@ -493,20 +494,20 @@ body {
|
|||
background-color: transparent;
|
||||
}
|
||||
|
||||
.rbview-form.inside {
|
||||
.rbview-form-inside {
|
||||
display: none;
|
||||
padding: 10px 15px;
|
||||
}
|
||||
|
||||
.rbview-form.inside > .rb-loading {
|
||||
.rbview-form-inside > .rb-loading {
|
||||
height: 60px;
|
||||
}
|
||||
|
||||
.rbview-form.inside > .alert {
|
||||
.rbview-form-inside > .alert {
|
||||
margin: 10px auto !important;
|
||||
}
|
||||
|
||||
.card.active .rbview-form.inside {
|
||||
.card.active .rbview-form-inside {
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ $(document).ready(() => {
|
|||
|
||||
$('.J_add').on('click', () => renderRbcomp(<ApprovalEdit />))
|
||||
$('.J_referral').on('click', () => renderRbcomp(<ApprovalReferral />))
|
||||
if ($urlp('new')) setTimeout(() => $('.J_add').trigger('click'), 500)
|
||||
})
|
||||
|
||||
class ApprovalList extends ConfigList {
|
||||
|
|
@ -153,6 +154,7 @@ class ApprovalEdit extends ConfigFormDlg {
|
|||
|
||||
let e = $('.aside-tree li.active>a').attr('href')
|
||||
e = e ? e.split('=')[1] : null
|
||||
if ($urlp('new')) e = $urlp('new')
|
||||
if (e) {
|
||||
setTimeout(() => $(this._entity).val(e).trigger('change'), 300)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,8 +7,10 @@ See LICENSE and COMMERCIAL in the project root for license information.
|
|||
/* global dlgActionAfter ShowEnable taggedTitle */
|
||||
|
||||
$(document).ready(() => {
|
||||
$('.J_add').on('click', () => renderRbcomp(<ReportEditor />))
|
||||
renderRbcomp(<ReportList />, 'dataList')
|
||||
|
||||
$('.J_add').on('click', () => renderRbcomp(<ReportEditor />))
|
||||
if ($urlp('new')) setTimeout(() => $('.J_add').trigger('click'), 500)
|
||||
})
|
||||
|
||||
class ReportList extends ConfigList {
|
||||
|
|
@ -285,6 +287,7 @@ class ReportEditor extends ConfigFormDlg {
|
|||
|
||||
let e = $('.aside-tree li.active>a').attr('href')
|
||||
e = e ? e.split('=')[1] : null
|
||||
if ($urlp('new')) e = $urlp('new')
|
||||
if (e) {
|
||||
setTimeout(() => $(this._entity).val(e).trigger('change'), 300)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -187,16 +187,35 @@ $(document).ready(() => {
|
|||
$cs.find('>a .zmdi').remove()
|
||||
render_preview()
|
||||
})
|
||||
// 背景
|
||||
|
||||
// 背景色
|
||||
function _removeClass($el) {
|
||||
$el.removeClass(function (index, className) {
|
||||
return (className.match(/\bgradient-bg-\S+/g) || []).join(' ')
|
||||
})
|
||||
return $el
|
||||
}
|
||||
const $bs = $('#useBgcolor')
|
||||
$bs.find('>a').on('click', function () {
|
||||
let idx = Math.floor(Math.random() * 100) + 1
|
||||
$('#chart-preview >.chart-box')
|
||||
.removeClass(function (index, className) {
|
||||
return (className.match(/\bgradient-bg-\S+/g) || []).join(' ')
|
||||
})
|
||||
.addClass(`gradient-bg-${idx}`)
|
||||
$(this).attr('data-bgcolor', idx)
|
||||
$bs.find('>a:eq(0)').on('click', function () {
|
||||
_removeClass($('#chart-preview >.chart-box'))
|
||||
$bs.find('>a:eq(0)').attr('data-bgcolor', '')
|
||||
// check
|
||||
$bs.find('>a>i').remove()
|
||||
$('<i class="zmdi zmdi-check"></i>').appendTo($bs.find('a:eq(0)'))
|
||||
})
|
||||
$bs.find('>a:eq(1)').on('click', function () {
|
||||
renderRbcomp(
|
||||
<DlgBgcolor
|
||||
onConfirm={(colorIndex) => {
|
||||
_removeClass($('#chart-preview >.chart-box')).addClass(`gradient-bg-${colorIndex}`)
|
||||
_removeClass($bs.find('>a:eq(1)')).addClass(`gradient-bg-${colorIndex}`)
|
||||
$bs.find('>a:eq(0)').attr('data-bgcolor', colorIndex)
|
||||
// check
|
||||
$bs.find('>a>i').remove()
|
||||
$('<i class="zmdi zmdi-check"></i>').appendTo($bs.find('a:eq(1)'))
|
||||
}}
|
||||
/>
|
||||
)
|
||||
})
|
||||
|
||||
// init
|
||||
|
|
@ -229,7 +248,9 @@ $(document).ready(() => {
|
|||
$('#useColor >input').val(option[k])
|
||||
}
|
||||
if (k === 'useBgcolor' && option[k]) {
|
||||
$bs.find('a').attr('data-bgcolor', option[k])
|
||||
$bs.find('a:eq(0)').attr('data-bgcolor', option[k])
|
||||
$bs.find('a:eq(1)').removeClass('gradient-bg-100').addClass(`gradient-bg-${option[k]}`)
|
||||
$('<i class="zmdi zmdi-check"></i>').appendTo($bs.find('a:eq(1)'))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -535,7 +556,7 @@ function build_config() {
|
|||
option.useColor = color === '#000000' ? null : color
|
||||
cfg.option = option
|
||||
// v4.2
|
||||
let bgcolor = $('#useBgcolor >a')
|
||||
let bgcolor = $('#useBgcolor >a:eq(0)')
|
||||
if (bgcolor[0]) option.useBgcolor = bgcolor.attr('data-bgcolor')
|
||||
else option.useBgcolor = null
|
||||
|
||||
|
|
@ -632,3 +653,23 @@ class DlgAxisProps extends RbFormHandler {
|
|||
this.hide()
|
||||
}
|
||||
}
|
||||
|
||||
class DlgBgcolor extends RbAlert {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state = { ...props }
|
||||
}
|
||||
|
||||
renderContent() {
|
||||
let c = []
|
||||
for (let i = 1; i < 100; i++) {
|
||||
c.push(<a key={i} className={`gradient-bg-${i}`} onClick={() => this._onConfirm(i)}></a>)
|
||||
}
|
||||
return <div className="gradient-bg-list">{c}</div>
|
||||
}
|
||||
|
||||
_onConfirm(i) {
|
||||
typeof this.props.onConfirm === 'function' && this.props.onConfirm(i)
|
||||
this.hide()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -404,8 +404,8 @@ class ApprovalSubmitForm extends ApprovalUsersForm {
|
|||
<p className="text-muted">
|
||||
{$L('无适用流程')}
|
||||
{rb.isAdminUser && (
|
||||
<a className="icon-link ml-1" target="_blank" href={`${rb.baseUrl}/admin/robot/approvals`}>
|
||||
<i className="zmdi zmdi-settings" /> {$L('点击配置')}
|
||||
<a className="icon-link ml-1" target="_blank" href={`${rb.baseUrl}/admin/robot/approvals?new=${(window.__PageConfig || {}).entity[0] || ''}`}>
|
||||
<i className="zmdi zmdi-settings" /> {$L('点击添加')}
|
||||
</a>
|
||||
)}
|
||||
</p>
|
||||
|
|
|
|||
|
|
@ -298,11 +298,12 @@ class RbForm extends React.Component {
|
|||
this._postAfter = props.postAfter || $$$props.postAfter
|
||||
this._onProTableLineUpdated = props.onProTableLineUpdated || $$$props.onProTableLineUpdated
|
||||
this._dividerRefs = []
|
||||
this._verticalLayout42 = window.__LAB_VERTICALLAYOUT || props.rawModel.verticalLayout === 1 || props.rawModel.verticalLayout === 3
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className={`rbform form-layout ${window.__LAB_VERTICALLAYOUT && 'vertical38'}`}>
|
||||
<div className={`rbform form-layout ${this._verticalLayout42 && 'vertical38'}`}>
|
||||
<div className="form row" ref={(c) => (this._$form = c)}>
|
||||
{this.props.children.map((fieldComp) => {
|
||||
const ref = fieldComp.props.field === TYPE_DIVIDER ? $random('divider-') : `fieldcomp-${fieldComp.props.field}`
|
||||
|
|
@ -566,9 +567,10 @@ class RbForm extends React.Component {
|
|||
)
|
||||
}
|
||||
} else {
|
||||
// 列表页保存并...
|
||||
const inList = window.RbViewModal && window.__PageConfig.type === 'RecordList'
|
||||
if (inList) {
|
||||
if (parentProps._noExtraButton) {
|
||||
// 无扩展按钮
|
||||
} else {
|
||||
// 保存并...
|
||||
if (props.rawModel.hadApproval && window.ApprovalSubmitForm) {
|
||||
moreActions.push(
|
||||
<a key="Action103" className="dropdown-item" onClick={() => this.post(RbForm.NEXT_SUBMIT37)}>
|
||||
|
|
@ -581,9 +583,6 @@ class RbForm extends React.Component {
|
|||
{$L('保存并新建')}
|
||||
</a>
|
||||
)
|
||||
}
|
||||
|
||||
if (inList || parentProps._nextOpenView) {
|
||||
moreActions.push(
|
||||
<a key="Action104" className="dropdown-item" onClick={() => this.post(RbForm.NEXT_VIEW)}>
|
||||
{$L('保存并打开')}
|
||||
|
|
@ -3533,8 +3532,10 @@ class RbFormRefform extends React.Component {
|
|||
|
||||
render() {
|
||||
if (!this.props.refvalue) return null
|
||||
|
||||
const verticalLayout42 = window.__LAB_VERTICALLAYOUT || this.state.verticalLayout === 1 || this.state.verticalLayout === 3
|
||||
return (
|
||||
<div className={`rbview-form form-layout refform ${window.__LAB_VERTICALLAYOUT && 'vertical38'}`} ref={(c) => (this._viewForm = c)}>
|
||||
<div className={`rbview-form form-layout refform ${verticalLayout42 && 'vertical38'}`} ref={(c) => (this._viewForm = c)}>
|
||||
{this.state.formComponent || 'LOADING'}
|
||||
</div>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ rebuild is dual-licensed under commercial and open source licenses (GPLv3).
|
|||
See LICENSE and COMMERCIAL in the project root for license information.
|
||||
*/
|
||||
/* global RelatedList, FeedsList */
|
||||
/* eslint-disable react/no-unknown-property */
|
||||
|
||||
const wpc = window.__PageConfig || {}
|
||||
|
||||
|
|
@ -463,8 +464,8 @@ class SelectReport extends React.Component {
|
|||
<p className="text-muted">
|
||||
{$L('暂无报表')}
|
||||
{rb.isAdminUser && (
|
||||
<a className="icon-link ml-2" target="_blank" href={`${rb.baseUrl}/admin/data/report-templates`}>
|
||||
<i className="zmdi zmdi-settings" /> {$L('点击配置')}
|
||||
<a className="icon-link ml-2" target="_blank" href={`${rb.baseUrl}/admin/data/report-templates?new=${wpc.entity[0]}`}>
|
||||
<i className="zmdi zmdi-settings" /> {$L('点击添加')}
|
||||
</a>
|
||||
)}
|
||||
</p>
|
||||
|
|
|
|||
|
|
@ -22,13 +22,14 @@ class RbViewForm extends React.Component {
|
|||
if (window.__LAB_VIEWEDITABLE === false) this.onViewEditable = false
|
||||
// temp for `saveSingleFieldValue`
|
||||
this.__FormData = {}
|
||||
this._verticalLayout42 = window.__LAB_VERTICALLAYOUT
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<RF>
|
||||
{this.state.fjsAlertMessage}
|
||||
<div className={`rbview-form form-layout ${window.__LAB_VERTICALLAYOUT && 'vertical38'}`} ref={(c) => (this._viewForm = c)}>
|
||||
<div className={`rbview-form form-layout ${this._verticalLayout42 && 'vertical38'}`} ref={(c) => (this._viewForm = c)}>
|
||||
{this.state.formComponent}
|
||||
</div>
|
||||
</RF>
|
||||
|
|
@ -60,6 +61,7 @@ class RbViewForm extends React.Component {
|
|||
this.__ViewData = {}
|
||||
this.__lastModified = res.data.lastModified || 0
|
||||
if (res.data.onViewEditable === false) this.onViewEditable = false
|
||||
this._verticalLayout42 = this._verticalLayout42 || res.data.verticalLayout === 1 || res.data.verticalLayout === 3
|
||||
|
||||
let _dividerRefs = []
|
||||
const VFORM = (
|
||||
|
|
@ -436,7 +438,8 @@ class EntityRelatedList extends RelatedList {
|
|||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div className={`rbview-form form-layout inside ${window.__LAB_VERTICALLAYOUT && 'vertical38'}`}>{this.state.viewComponents[item[0]] || <RbSpinner fully={true} />}</div>
|
||||
|
||||
<div className="rbview-form-inside">{this.state.viewComponents[item[0]] || <RbSpinner fully={true} />}</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
@ -523,12 +526,15 @@ class EntityRelatedList extends RelatedList {
|
|||
if (res.error_code > 0 || !!res.data.error) {
|
||||
viewComponents[id] = _renderError(res.data.error || res.error_msg)
|
||||
} else {
|
||||
const _verticalLayout42 = window.__LAB_VERTICALLAYOUT || res.data.verticalLayout === 1 || res.data.verticalLayout === 3
|
||||
viewComponents[id] = (
|
||||
<div className="row">
|
||||
{res.data.elements.map((item) => {
|
||||
item.$$$parent = this
|
||||
return detectViewElement(item)
|
||||
})}
|
||||
<div className={`rbview-form form-layout ${_verticalLayout42 && 'vertical38'}`}>
|
||||
<div className="row">
|
||||
{res.data.elements.map((item) => {
|
||||
item.$$$parent = this
|
||||
return detectViewElement(item)
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
@ -922,7 +928,7 @@ const RbViewPage = {
|
|||
if (entity.length > 1) iv[entity[1]] = that.__id
|
||||
else iv[`&${that.__entity[0]}`] = that.__id
|
||||
|
||||
RbFormModal.create({ title: $L('新建%s', item._entityLabel || item.entityLabel), entity: entity[0], icon: item.icon, initialValue: iv, _nextOpenView: true })
|
||||
RbFormModal.create({ title: $L('新建%s', item._entityLabel || item.entityLabel), entity: entity[0], icon: item.icon, initialValue: iv, _noExtraButton: true })
|
||||
}
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -795,6 +795,7 @@ class DlgNForm extends RbModalHandler {
|
|||
this.state.fallback = props.attrs.fallback
|
||||
this.state.fornew = props.attrs.fornew
|
||||
this.state.useFilter = props.attrs.filter || null
|
||||
this.state.verticalLayout = props.attrs.verticalLayout || null
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -840,6 +841,21 @@ class DlgNForm extends RbModalHandler {
|
|||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div className="form-group row">
|
||||
<label className="col-sm-3 col-form-label text-sm-right">{$L('显示样式')}</label>
|
||||
<div className="col-sm-7">
|
||||
<select className="form-control form-control-sm" ref={(c) => (this._$verticalLayout = c)} defaultValue={this.state.verticalLayout}>
|
||||
<option value="0">{$L('默认')}</option>
|
||||
<option value="3">{$L('垂直')}</option>
|
||||
<option value="1">
|
||||
{$L('垂直')} ({$L('仅 PC')})
|
||||
</option>
|
||||
<option value="2">
|
||||
{$L('垂直')} ({$L('仅手机')})
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{this.state.detailsFromsAttr && (
|
||||
<div className="form-group row">
|
||||
|
|
@ -896,7 +912,8 @@ class DlgNForm extends RbModalHandler {
|
|||
componentDidMount() {
|
||||
// super.componentDidMount()
|
||||
|
||||
if (!wpc.mainEntityName) {
|
||||
// 明细绑定
|
||||
if (wpc.isMainEntity) {
|
||||
$.get(`/admin/entity/${wpc.entityName}/get-details-forms-attr`, (res) => {
|
||||
this.setState({ detailsFromsAttr: res.data || {} }, () => {
|
||||
const detailsFromsAttr = (this.props.attrs || {}).detailsFromsAttr
|
||||
|
|
@ -952,6 +969,7 @@ class DlgNForm extends RbModalHandler {
|
|||
fallback: $val(this._$fallback),
|
||||
fornew: $val(this._$fornew),
|
||||
detailsFromsAttr: Object.keys(detailsFromsAttr).length === 0 ? null : detailsFromsAttr,
|
||||
verticalLayout: ~~$val(this._$verticalLayout),
|
||||
}
|
||||
if (!ps.name) {
|
||||
return RbHighbar.createl('请输入名称')
|
||||
|
|
|
|||
|
|
@ -133,8 +133,13 @@ See LICENSE and COMMERCIAL in the project root for license information.
|
|||
|
||||
// for `watermark`
|
||||
if (window.watermark && self === top) {
|
||||
var wt = rb._markWatermarkText
|
||||
if (wt) wt = JSON.parse(wt)
|
||||
if (!wt) wt = [rb.currentUser ? '***' + rb.currentUser.substr(7) : null, rb.appName]
|
||||
wt.push(rb._rbTempAuth ? 'TEMP.AUTH 临时授权' : null)
|
||||
|
||||
window.watermark.init({
|
||||
watermark_txt: [rb.currentUser ? '***' + rb.currentUser.substr(7) : null, rb.appName, rb._rbTempAuth ? 'TEMP.AUTH 临时授权' : null],
|
||||
watermark_txt: wt,
|
||||
watermark_angle: 30,
|
||||
watermark_width: 200,
|
||||
watermark_font: 'arial',
|
||||
|
|
|
|||
|
|
@ -610,7 +610,7 @@ var _initGlobalCreate = function () {
|
|||
var $item = $('<a class="dropdown-item"><i class="icon zmdi zmdi-' + this.icon + '"></i>' + this.entityLabel + '</a>').appendTo($gc)
|
||||
var _this = this
|
||||
$item.on('click', function () {
|
||||
RbFormModal.create({ title: $L('新建%s', _this.entityLabel), entity: _this.entity, icon: _this.icon, _nextOpenView: true })
|
||||
RbFormModal.create({ title: $L('新建%s', _this.entityLabel), entity: _this.entity, icon: _this.icon })
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -215,6 +215,7 @@
|
|||
<label style="color: #444; margin-bottom: 8px">[[${bundle.L('背景色')}]]</label>
|
||||
<div id="useBgcolor" class="rbcolors">
|
||||
<a class="default" th:title="${bundle.L('默认')}"></a>
|
||||
<a class="custom gradient-bg-100" th:title="${bundle.L('点击选择')}"></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -9,9 +9,8 @@
|
|||
position: relative;
|
||||
display: block;
|
||||
z-index: 1;
|
||||
border-radius: 0 0 3px 3px;
|
||||
border-radius: 4px;
|
||||
margin-top: 44px;
|
||||
border: 1px solid #ddd;
|
||||
border-top: 2px solid var(--rb-theme-color);
|
||||
}
|
||||
.form-wrap .modal .modal-dialog,
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@
|
|||
margin-top: 44px;
|
||||
overflow: hidden;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 18px 30px -16px rgba(157, 160, 170, 0.31);
|
||||
}
|
||||
.iframe-wrap iframe {
|
||||
position: relative;
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@
|
|||
<div class="splash-footer">
|
||||
<div class="copyright link">
|
||||
©
|
||||
<th:block th:utext="${commercial > 10 ? appName : bundle.L('[REBUILD](https://getrebuild.com/) 技术支持')}" />
|
||||
<th:block th:utext="${commercial >= 10 ? appName : bundle.L('[REBUILD](https://getrebuild.com/) 技术支持')}" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue