mirror of
https://github.com/getrebuild/rebuild.git
synced 2025-03-13 15:44:26 +08:00
commit
f389c2269d
18 changed files with 6481 additions and 64 deletions
|
@ -17,15 +17,16 @@ import cn.devezhao.persist4j.query.compiler.QueryCompiler;
|
|||
import com.rebuild.core.Application;
|
||||
import com.rebuild.core.metadata.easymeta.EasyMetaFactory;
|
||||
import com.rebuild.core.metadata.impl.DynamicMetadataFactory;
|
||||
import com.rebuild.core.metadata.impl.EasyEntityConfigProps;
|
||||
import com.rebuild.core.metadata.impl.GhostEntity;
|
||||
import com.rebuild.core.support.i18n.Language;
|
||||
import com.rebuild.utils.CommonsUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 实体元数据
|
||||
|
@ -381,4 +382,21 @@ public class MetadataHelper {
|
|||
}
|
||||
return checkAndWarnField(getEntity(entityName), fieldName);
|
||||
}
|
||||
|
||||
/**
|
||||
* 实体分类标签
|
||||
* TODO 性能
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static Set<String> getEntityTags() {
|
||||
Set<String> set = new TreeSet<>();
|
||||
for (Entity entity : getEntities()) {
|
||||
String tags = EasyMetaFactory.valueOf(entity).getExtraAttr(EasyEntityConfigProps.TAGS);
|
||||
if (StringUtils.isNotBlank(tags)) {
|
||||
Collections.addAll(set, tags.split(","));
|
||||
}
|
||||
}
|
||||
return set;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,8 +12,10 @@ import cn.devezhao.persist4j.Field;
|
|||
import cn.devezhao.persist4j.dialect.FieldType;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.rebuild.core.metadata.MetadataHelper;
|
||||
import com.rebuild.core.metadata.impl.EasyFieldConfigProps;
|
||||
import com.rebuild.utils.JSONUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.BooleanUtils;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
|
@ -154,4 +156,14 @@ public abstract class EasyField extends BaseEasyMeta<Field> {
|
|||
// * @return
|
||||
// */
|
||||
// abstract T checkoutValue(Object rawValue);
|
||||
|
||||
/**
|
||||
* 信息脱敏
|
||||
*
|
||||
* @return
|
||||
* @see com.rebuild.core.support.general.FieldValueHelper#desensitized(EasyField, Object)
|
||||
*/
|
||||
public boolean isDesensitized() {
|
||||
return BooleanUtils.toBoolean(getExtraAttr(EasyFieldConfigProps.ADV_DESENSITIZED));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,6 @@ import cn.devezhao.persist4j.Field;
|
|||
import com.rebuild.core.metadata.impl.EasyFieldConfigProps;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.BooleanUtils;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.regex.PatternSyntaxException;
|
||||
|
@ -44,13 +43,4 @@ public class EasyText extends EasyField {
|
|||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 信息脱敏
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean isDesensitized() {
|
||||
return BooleanUtils.toBoolean(getExtraAttr(EasyFieldConfigProps.ADV_DESENSITIZED));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,6 +17,10 @@ public class EasyEntityConfigProps {
|
|||
* 快速查询字段
|
||||
*/
|
||||
public static final String QUICK_FIELDS = "quickFields";
|
||||
/**
|
||||
* 实体分类
|
||||
*/
|
||||
public static final String TAGS = "tags";
|
||||
|
||||
/**
|
||||
* 隐藏常用查询面板
|
||||
|
|
|
@ -79,7 +79,7 @@ public class RevisionHistoryObserver extends OperatingObserver {
|
|||
|
||||
@Override
|
||||
public void onShare(OperatingContext context) {
|
||||
Record revision = newRevision(context, false);
|
||||
Record revision = newRevision(context, true);
|
||||
ID recordId = context.getAfterRecord().getID("recordId");
|
||||
revision.setID("recordId", recordId);
|
||||
revision.setString("belongEntity", MetadataHelper.getEntityName(recordId));
|
||||
|
@ -88,18 +88,13 @@ public class RevisionHistoryObserver extends OperatingObserver {
|
|||
|
||||
@Override
|
||||
public void onUnshare(OperatingContext context) {
|
||||
Record revision = newRevision(context, false);
|
||||
Record revision = newRevision(context, true);
|
||||
ID recordId = context.getBeforeRecord().getID("recordId");
|
||||
revision.setID("recordId", recordId);
|
||||
revision.setString("belongEntity", MetadataHelper.getEntityName(recordId));
|
||||
Application.getCommonsService().create(revision);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param context
|
||||
* @param mergeChange
|
||||
* @return
|
||||
*/
|
||||
private Record newRevision(OperatingContext context, boolean mergeChange) {
|
||||
ID recordId = context.getAnyRecord().getPrimary();
|
||||
Record record = EntityHelper.forNew(EntityHelper.RevisionHistory, UserService.SYSTEM_USER);
|
||||
|
@ -112,6 +107,19 @@ public class RevisionHistoryObserver extends OperatingObserver {
|
|||
if (mergeChange) {
|
||||
Record before = context.getBeforeRecord();
|
||||
Record after = context.getAfterRecord();
|
||||
|
||||
// 共享特殊处理
|
||||
if (context.getAnyRecord().getEntity().getEntityCode() == EntityHelper.ShareAccess) {
|
||||
final ID shareTo = context.getAnyRecord().getID("shareTo");
|
||||
if (before != null) {
|
||||
before = EntityHelper.forNew(EntityHelper.ShareAccess, before.getPrimary(), false);
|
||||
before.setID("SHARETO", shareTo);
|
||||
} else if (after != null) {
|
||||
after = EntityHelper.forNew(EntityHelper.ShareAccess, after.getEditor(), false);
|
||||
after.setID("SHARETO", shareTo);
|
||||
}
|
||||
}
|
||||
|
||||
JSON revisionContent = new RecordDifference(before).diffMerge(after);
|
||||
record.setString("revisionContent", revisionContent.toJSONString());
|
||||
} else {
|
||||
|
|
|
@ -17,7 +17,6 @@ import com.rebuild.core.Application;
|
|||
import com.rebuild.core.metadata.easymeta.DisplayType;
|
||||
import com.rebuild.core.metadata.easymeta.EasyField;
|
||||
import com.rebuild.core.metadata.easymeta.EasyMetaFactory;
|
||||
import com.rebuild.core.metadata.easymeta.EasyText;
|
||||
import com.rebuild.core.privileges.UserHelper;
|
||||
import com.rebuild.core.privileges.bizz.ZeroEntry;
|
||||
import com.rebuild.utils.JSONUtils;
|
||||
|
@ -169,8 +168,7 @@ public class DataListWrapper {
|
|||
* @see FieldValueHelper#isUseDesensitized(EasyField, ID)
|
||||
*/
|
||||
private boolean isUseDesensitized(EasyField easyField) {
|
||||
return this.useDesensitized
|
||||
&& easyField instanceof EasyText && ((EasyText) easyField).isDesensitized();
|
||||
return this.useDesensitized && easyField.isDesensitized();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -20,7 +20,10 @@ import com.rebuild.core.configuration.general.ClassificationManager;
|
|||
import com.rebuild.core.configuration.general.PickListManager;
|
||||
import com.rebuild.core.metadata.EntityHelper;
|
||||
import com.rebuild.core.metadata.MetadataHelper;
|
||||
import com.rebuild.core.metadata.easymeta.*;
|
||||
import com.rebuild.core.metadata.easymeta.DisplayType;
|
||||
import com.rebuild.core.metadata.easymeta.EasyField;
|
||||
import com.rebuild.core.metadata.easymeta.EasyMetaFactory;
|
||||
import com.rebuild.core.metadata.easymeta.MixValue;
|
||||
import com.rebuild.core.privileges.bizz.ZeroEntry;
|
||||
import com.rebuild.core.service.NoRecordFoundException;
|
||||
import com.rebuild.core.service.approval.ApprovalState;
|
||||
|
@ -259,18 +262,17 @@ public class FieldValueHelper {
|
|||
* @return
|
||||
*/
|
||||
public static boolean isUseDesensitized(EasyField field, ID user) {
|
||||
if (!(field instanceof EasyText)) return false;
|
||||
if (user == null) {
|
||||
log.warn("No [user] spec! Cannot check desensitized");
|
||||
return false;
|
||||
}
|
||||
|
||||
return ((EasyText) field).isDesensitized()
|
||||
|
||||
return field.isDesensitized()
|
||||
&& !Application.getPrivilegesManager().allow(user, ZeroEntry.AllowNoDesensitized);
|
||||
}
|
||||
|
||||
/**
|
||||
* 字段值脱敏。仅适用文本、邮箱、电话字段
|
||||
* 字段值脱敏。仅适用文本/邮箱/电话/数字字段
|
||||
*
|
||||
* @param field
|
||||
* @param value
|
||||
|
@ -286,6 +288,8 @@ public class FieldValueHelper {
|
|||
return DataDesensitized.phone((String) value);
|
||||
} else if (dt == DisplayType.TEXT) {
|
||||
return DataDesensitized.any((String) value);
|
||||
} else if (dt == DisplayType.DECIMAL || dt == DisplayType.NUMBER) {
|
||||
return DataDesensitized.SECURE_TEXT;
|
||||
} else {
|
||||
return value;
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ import com.rebuild.core.Application;
|
|||
import com.rebuild.core.metadata.MetadataHelper;
|
||||
import com.rebuild.core.metadata.easymeta.EasyField;
|
||||
import com.rebuild.core.metadata.easymeta.EasyMetaFactory;
|
||||
import com.rebuild.core.support.i18n.Language;
|
||||
import com.rebuild.web.EntityController;
|
||||
import com.rebuild.web.IdParam;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
@ -39,10 +40,10 @@ public class RevisionHistoryController extends EntityController {
|
|||
}
|
||||
|
||||
@RequestMapping("revision-history/details")
|
||||
public JSON details(@IdParam ID revId) {
|
||||
public JSON details(@IdParam ID revisionId) {
|
||||
Object[] rev = Application.createQueryNoFilter(
|
||||
"select revisionContent,belongEntity from RevisionHistory where revisionId = ?")
|
||||
.setParameter(1, revId)
|
||||
.setParameter(1, revisionId)
|
||||
.unique();
|
||||
JSONArray contents = JSON.parseArray((String) rev[0]);
|
||||
|
||||
|
@ -63,9 +64,12 @@ public class RevisionHistoryController extends EntityController {
|
|||
}
|
||||
|
||||
fieldName = easyField.getLabel();
|
||||
|
||||
} else {
|
||||
fieldName = "[" + fieldName.toUpperCase() + "]";
|
||||
if ("SHARETO".equalsIgnoreCase(fieldName)) {
|
||||
fieldName = Language.L("共享用户");
|
||||
} else {
|
||||
fieldName = "[" + fieldName.toUpperCase() + "]";
|
||||
}
|
||||
}
|
||||
item.put("field", fieldName);
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ import com.rebuild.core.metadata.MetadataSorter;
|
|||
import com.rebuild.core.metadata.easymeta.EasyEntity;
|
||||
import com.rebuild.core.metadata.easymeta.EasyMetaFactory;
|
||||
import com.rebuild.core.metadata.impl.CopyEntity;
|
||||
import com.rebuild.core.metadata.impl.EasyEntityConfigProps;
|
||||
import com.rebuild.core.metadata.impl.Entity2Schema;
|
||||
import com.rebuild.core.metadata.impl.MetaEntityService;
|
||||
import com.rebuild.core.privileges.UserHelper;
|
||||
|
@ -127,6 +128,7 @@ public class MetaEntityController extends BaseController {
|
|||
if (entity.getMainEntity() != null) {
|
||||
map.put("mainEntity", entity.getMainEntity().getName());
|
||||
}
|
||||
map.put("tags", easyMeta.getExtraAttr(EasyEntityConfigProps.TAGS));
|
||||
data.add(map);
|
||||
}
|
||||
return RespBody.ok(data);
|
||||
|
@ -270,4 +272,9 @@ public class MetaEntityController extends BaseController {
|
|||
return RespBody.error(ex.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@GetMapping("entity/entity-tags")
|
||||
public RespBody entityTags() {
|
||||
return RespBody.ok(MetadataHelper.getEntityTags());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<script th:src="@{/assets/lib/widget/bootstrap-datetimepicker.min.js?v=2.4.4}"></script>
|
||||
<script th:src="@{/assets/lib/jquery.html5uploader.js}"></script>
|
||||
<script th:src="@{/assets/lib/qiniu.min.js}"></script>
|
||||
<script th:src="@{/assets/lib/widget/select2.min.js?v=4.0.13}"></script>
|
||||
<script th:src="@{/assets/lib/widget/select2.js?v=4.0.13.fix2}"></script>
|
||||
<script th:src="@{/assets/lib/jquery-ui.min.js?v=1.13.1}"></script>
|
||||
<script th:src="@{/assets/lib/widget/simplemde.min.js}"></script>
|
||||
<script th:src="@{/assets/lib/jquery.textarea.js}"></script>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<th:block th:replace="~{/_include/header}" />
|
||||
<meta name="page-help" content="https://getrebuild.com/docs/admin/meta-entity" />
|
||||
<title>[[${bundle.L('实体管理')}]]</title>
|
||||
<style type="text/css">
|
||||
<style>
|
||||
.card.entity {
|
||||
position: relative;
|
||||
margin-bottom: 20px;
|
||||
|
@ -46,6 +46,17 @@
|
|||
margin-left: 10px;
|
||||
margin-top: 0;
|
||||
}
|
||||
#entityList > div.tag {
|
||||
width: 100%;
|
||||
}
|
||||
#entityList > div.tag > h3 {
|
||||
margin: 0 0 20px;
|
||||
font-weight: normal;
|
||||
line-height: 1;
|
||||
font-size: 16px;
|
||||
padding: 0;
|
||||
color: #777;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -91,12 +102,26 @@
|
|||
</script>
|
||||
<script type="text/babel">
|
||||
$(document).ready(function () {
|
||||
const NO_TAG = '__'
|
||||
$.get('/admin/entity/entity-list?bizz=true', function (res) {
|
||||
$('#entityList').empty()
|
||||
|
||||
const groups = { [NO_TAG]: [] }
|
||||
$(res.data).each(function () {
|
||||
;(this.tags || NO_TAG).split(',').forEach((tag) => {
|
||||
let g = groups[tag]
|
||||
if (!g) {
|
||||
g = []
|
||||
groups[tag] = g
|
||||
}
|
||||
g.push(this)
|
||||
})
|
||||
})
|
||||
|
||||
$(groups[NO_TAG]).each(function () {
|
||||
if (this.builtin) render_entity(this)
|
||||
})
|
||||
$(res.data).each(function () {
|
||||
$(groups[NO_TAG]).each(function () {
|
||||
if (!this.builtin) render_entity(this)
|
||||
})
|
||||
|
||||
|
@ -112,6 +137,16 @@
|
|||
if (window.__PageConfig.isSuperAdmin) RbModal.create('/p/admin/metadata/entity-new', $L('添加实体'))
|
||||
else RbHighbar.error('仅超级管理员可添加实体')
|
||||
})
|
||||
|
||||
delete groups[NO_TAG]
|
||||
|
||||
const keys = Object.keys(groups).sort()
|
||||
keys.forEach((tag) => {
|
||||
$(`<div class="tag"><h3><i class="icon zmdi zmdi-widgets text-primary mr-2"></i>${tag}</h3></div>`).appendTo('#entityList')
|
||||
$(groups[tag]).each(function () {
|
||||
render_entity(this)
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
|
|
|
@ -80,6 +80,12 @@
|
|||
<textarea class="form-control form-control-sm row2x" id="comments" th:data-o="${comments}" th:placeholder="${bundle.L('(选填)')}">[[${comments}]]</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-12 col-xl-3 col-lg-4 col-form-label text-lg-right">[[${bundle.L('标签')}]]</label>
|
||||
<div class="col-md-12 col-xl-6 col-lg-8">
|
||||
<select class="form-control form-control-sm" id="tags"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row footer">
|
||||
<div class="col-md-12 col-xl-6 col-lg-8 offset-xl-3 offset-lg-4">
|
||||
<div class="J_action hide">
|
||||
|
|
|
@ -338,7 +338,7 @@
|
|||
</span>
|
||||
</label>
|
||||
<div>
|
||||
<input type="text" class="form-control form-control-sm" id="advPattern" th:placeholder="${bundle.L('正则表达式')}" data-toggle="dropdown" autocomplete="off" />
|
||||
<input type="text" class="form-control form-control-sm" id="advPattern" th:placeholder="${bundle.L('格式验证 (支持 Java 正则表达式)')}" data-toggle="dropdown" autocomplete="off" />
|
||||
<div class="dropdown-menu common-patt">
|
||||
<h5>[[${bundle.L('常用')}]]</h5>
|
||||
<a class="badge" data-patt="^([0-9A-Z]{15}|[0-9A-Z]{17}|[0-9A-Z]{18}|[0-9A-Z]{20})$">[[${bundle.L('税号')}]]</a>
|
||||
|
|
|
@ -34,6 +34,7 @@ $(document).ready(function () {
|
|||
|
||||
let extConfig = {
|
||||
quickFields: $('#quickFields').val().join(','),
|
||||
tags: $('#tags').val().join(','),
|
||||
}
|
||||
extConfig = wpc.extConfig ? { ...wpc.extConfig, ...extConfig } : extConfig
|
||||
if (!$same(extConfig, wpc.extConfig)) data.extConfig = extConfig
|
||||
|
@ -137,9 +138,32 @@ $(document).ready(function () {
|
|||
multiple: true,
|
||||
maximumSelectionLength: 5,
|
||||
})
|
||||
|
||||
if (wpc.extConfig.quickFields) {
|
||||
$('#quickFields').val(wpc.extConfig.quickFields.split(',')).trigger('change')
|
||||
}
|
||||
})
|
||||
|
||||
$.get('/admin/entity/entity-tags', (res) => {
|
||||
let data = res.data || []
|
||||
data = data.sort().map((item) => {
|
||||
return { id: item, text: item }
|
||||
})
|
||||
|
||||
$('#tags').select2({
|
||||
placeholder: $L('无'),
|
||||
data: data,
|
||||
multiple: true,
|
||||
maximumSelectionLength: 5,
|
||||
language: {
|
||||
noResults: function () {
|
||||
return $L('输入标签')
|
||||
},
|
||||
},
|
||||
tags: true,
|
||||
})
|
||||
|
||||
if (wpc.extConfig.tags) {
|
||||
$('#tags').val(wpc.extConfig.tags.split(',')).trigger('change')
|
||||
}
|
||||
})
|
||||
})
|
||||
|
|
|
@ -11,8 +11,8 @@ const __gExtConfig = {}
|
|||
|
||||
const SHOW_REPEATABLE = ['TEXT', 'DATE', 'EMAIL', 'URL', 'PHONE', 'REFERENCE', 'CLASSIFICATION']
|
||||
const SHOW_DEFAULTVALUE = ['TEXT', 'NTEXT', 'EMAIL', 'PHONE', 'URL', 'NUMBER', 'DECIMAL', 'DATE', 'DATETIME', 'BOOL', 'CLASSIFICATION', 'REFERENCE', 'N2NREFERENCE']
|
||||
const SHOW_ADVDESENSITIZED = ['TEXT', 'PHONE', 'EMAIL']
|
||||
const SHOW_ADVPATTERN = ['TEXT']
|
||||
const SHOW_ADVDESENSITIZED = ['TEXT', 'PHONE', 'EMAIL', 'NUMBER', 'DECIMAL']
|
||||
const SHOW_ADVPATTERN = ['TEXT', 'PHONE', 'EMAIL']
|
||||
|
||||
$(document).ready(function () {
|
||||
const dt = wpc.fieldType
|
||||
|
|
481
src/main/resources/web/assets/lib/widget/select2.css
Normal file
481
src/main/resources/web/assets/lib/widget/select2.css
Normal file
|
@ -0,0 +1,481 @@
|
|||
.select2-container {
|
||||
box-sizing: border-box;
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
position: relative;
|
||||
vertical-align: middle; }
|
||||
.select2-container .select2-selection--single {
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
height: 28px;
|
||||
user-select: none;
|
||||
-webkit-user-select: none; }
|
||||
.select2-container .select2-selection--single .select2-selection__rendered {
|
||||
display: block;
|
||||
padding-left: 8px;
|
||||
padding-right: 20px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap; }
|
||||
.select2-container .select2-selection--single .select2-selection__clear {
|
||||
position: relative; }
|
||||
.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered {
|
||||
padding-right: 8px;
|
||||
padding-left: 20px; }
|
||||
.select2-container .select2-selection--multiple {
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
min-height: 32px;
|
||||
user-select: none;
|
||||
-webkit-user-select: none; }
|
||||
.select2-container .select2-selection--multiple .select2-selection__rendered {
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
padding-left: 8px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap; }
|
||||
.select2-container .select2-search--inline {
|
||||
float: left; }
|
||||
.select2-container .select2-search--inline .select2-search__field {
|
||||
box-sizing: border-box;
|
||||
border: none;
|
||||
font-size: 100%;
|
||||
margin-top: 5px;
|
||||
padding: 0; }
|
||||
.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button {
|
||||
-webkit-appearance: none; }
|
||||
|
||||
.select2-dropdown {
|
||||
background-color: white;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: -100000px;
|
||||
width: 100%;
|
||||
z-index: 1051; }
|
||||
|
||||
.select2-results {
|
||||
display: block; }
|
||||
|
||||
.select2-results__options {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0; }
|
||||
|
||||
.select2-results__option {
|
||||
padding: 6px;
|
||||
user-select: none;
|
||||
-webkit-user-select: none; }
|
||||
.select2-results__option[aria-selected] {
|
||||
cursor: pointer; }
|
||||
|
||||
.select2-container--open .select2-dropdown {
|
||||
left: 0; }
|
||||
|
||||
.select2-container--open .select2-dropdown--above {
|
||||
border-bottom: none;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0; }
|
||||
|
||||
.select2-container--open .select2-dropdown--below {
|
||||
border-top: none;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0; }
|
||||
|
||||
.select2-search--dropdown {
|
||||
display: block;
|
||||
padding: 4px; }
|
||||
.select2-search--dropdown .select2-search__field {
|
||||
padding: 4px;
|
||||
width: 100%;
|
||||
box-sizing: border-box; }
|
||||
.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button {
|
||||
-webkit-appearance: none; }
|
||||
.select2-search--dropdown.select2-search--hide {
|
||||
display: none; }
|
||||
|
||||
.select2-close-mask {
|
||||
border: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: block;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
min-height: 100%;
|
||||
min-width: 100%;
|
||||
height: auto;
|
||||
width: auto;
|
||||
opacity: 0;
|
||||
z-index: 99;
|
||||
background-color: #fff;
|
||||
filter: alpha(opacity=0); }
|
||||
|
||||
.select2-hidden-accessible {
|
||||
border: 0 !important;
|
||||
clip: rect(0 0 0 0) !important;
|
||||
-webkit-clip-path: inset(50%) !important;
|
||||
clip-path: inset(50%) !important;
|
||||
height: 1px !important;
|
||||
overflow: hidden !important;
|
||||
padding: 0 !important;
|
||||
position: absolute !important;
|
||||
width: 1px !important;
|
||||
white-space: nowrap !important; }
|
||||
|
||||
.select2-container--default .select2-selection--single {
|
||||
background-color: #fff;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px; }
|
||||
.select2-container--default .select2-selection--single .select2-selection__rendered {
|
||||
color: #444;
|
||||
line-height: 28px; }
|
||||
.select2-container--default .select2-selection--single .select2-selection__clear {
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
font-weight: bold; }
|
||||
.select2-container--default .select2-selection--single .select2-selection__placeholder {
|
||||
color: #999; }
|
||||
.select2-container--default .select2-selection--single .select2-selection__arrow {
|
||||
height: 26px;
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
right: 1px;
|
||||
width: 20px; }
|
||||
.select2-container--default .select2-selection--single .select2-selection__arrow b {
|
||||
border-color: #888 transparent transparent transparent;
|
||||
border-style: solid;
|
||||
border-width: 5px 4px 0 4px;
|
||||
height: 0;
|
||||
left: 50%;
|
||||
margin-left: -4px;
|
||||
margin-top: -2px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: 0; }
|
||||
|
||||
.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear {
|
||||
float: left; }
|
||||
|
||||
.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow {
|
||||
left: 1px;
|
||||
right: auto; }
|
||||
|
||||
.select2-container--default.select2-container--disabled .select2-selection--single {
|
||||
background-color: #eee;
|
||||
cursor: default; }
|
||||
.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear {
|
||||
display: none; }
|
||||
|
||||
.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
|
||||
border-color: transparent transparent #888 transparent;
|
||||
border-width: 0 4px 5px 4px; }
|
||||
|
||||
.select2-container--default .select2-selection--multiple {
|
||||
background-color: white;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
cursor: text; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
|
||||
box-sizing: border-box;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0 5px;
|
||||
width: 100%; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__rendered li {
|
||||
list-style: none; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__clear {
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
font-weight: bold;
|
||||
margin-top: 5px;
|
||||
margin-right: 10px;
|
||||
padding: 1px; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
||||
background-color: #e4e4e4;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
cursor: default;
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
margin-top: 5px;
|
||||
padding: 0 5px; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
|
||||
color: #999;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
font-weight: bold;
|
||||
margin-right: 2px; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
|
||||
color: #333; }
|
||||
|
||||
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline {
|
||||
float: right; }
|
||||
|
||||
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
||||
margin-left: 5px;
|
||||
margin-right: auto; }
|
||||
|
||||
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
|
||||
margin-left: 2px;
|
||||
margin-right: auto; }
|
||||
|
||||
.select2-container--default.select2-container--focus .select2-selection--multiple {
|
||||
border: solid black 1px;
|
||||
outline: 0; }
|
||||
|
||||
.select2-container--default.select2-container--disabled .select2-selection--multiple {
|
||||
background-color: #eee;
|
||||
cursor: default; }
|
||||
|
||||
.select2-container--default.select2-container--disabled .select2-selection__choice__remove {
|
||||
display: none; }
|
||||
|
||||
.select2-container--default.select2-container--open.select2-container--above .select2-selection--single, .select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple {
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0; }
|
||||
|
||||
.select2-container--default.select2-container--open.select2-container--below .select2-selection--single, .select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple {
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0; }
|
||||
|
||||
.select2-container--default .select2-search--dropdown .select2-search__field {
|
||||
border: 1px solid #aaa; }
|
||||
|
||||
.select2-container--default .select2-search--inline .select2-search__field {
|
||||
background: transparent;
|
||||
border: none;
|
||||
outline: 0;
|
||||
box-shadow: none;
|
||||
-webkit-appearance: textfield; }
|
||||
|
||||
.select2-container--default .select2-results > .select2-results__options {
|
||||
max-height: 200px;
|
||||
overflow-y: auto; }
|
||||
|
||||
.select2-container--default .select2-results__option[role=group] {
|
||||
padding: 0; }
|
||||
|
||||
.select2-container--default .select2-results__option[aria-disabled=true] {
|
||||
color: #999; }
|
||||
|
||||
.select2-container--default .select2-results__option[aria-selected=true] {
|
||||
background-color: #ddd; }
|
||||
|
||||
.select2-container--default .select2-results__option .select2-results__option {
|
||||
padding-left: 1em; }
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__group {
|
||||
padding-left: 0; }
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -1em;
|
||||
padding-left: 2em; }
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -2em;
|
||||
padding-left: 3em; }
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -3em;
|
||||
padding-left: 4em; }
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -4em;
|
||||
padding-left: 5em; }
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -5em;
|
||||
padding-left: 6em; }
|
||||
|
||||
.select2-container--default .select2-results__option--highlighted[aria-selected] {
|
||||
background-color: #5897fb;
|
||||
color: white; }
|
||||
|
||||
.select2-container--default .select2-results__group {
|
||||
cursor: default;
|
||||
display: block;
|
||||
padding: 6px; }
|
||||
|
||||
.select2-container--classic .select2-selection--single {
|
||||
background-color: #f7f7f7;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
outline: 0;
|
||||
background-image: -webkit-linear-gradient(top, white 50%, #eeeeee 100%);
|
||||
background-image: -o-linear-gradient(top, white 50%, #eeeeee 100%);
|
||||
background-image: linear-gradient(to bottom, white 50%, #eeeeee 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
|
||||
.select2-container--classic .select2-selection--single:focus {
|
||||
border: 1px solid #5897fb; }
|
||||
.select2-container--classic .select2-selection--single .select2-selection__rendered {
|
||||
color: #444;
|
||||
line-height: 28px; }
|
||||
.select2-container--classic .select2-selection--single .select2-selection__clear {
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
font-weight: bold;
|
||||
margin-right: 10px; }
|
||||
.select2-container--classic .select2-selection--single .select2-selection__placeholder {
|
||||
color: #999; }
|
||||
.select2-container--classic .select2-selection--single .select2-selection__arrow {
|
||||
background-color: #ddd;
|
||||
border: none;
|
||||
border-left: 1px solid #aaa;
|
||||
border-top-right-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
height: 26px;
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
right: 1px;
|
||||
width: 20px;
|
||||
background-image: -webkit-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
|
||||
background-image: -o-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
|
||||
background-image: linear-gradient(to bottom, #eeeeee 50%, #cccccc 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0); }
|
||||
.select2-container--classic .select2-selection--single .select2-selection__arrow b {
|
||||
border-color: #888 transparent transparent transparent;
|
||||
border-style: solid;
|
||||
border-width: 5px 4px 0 4px;
|
||||
height: 0;
|
||||
left: 50%;
|
||||
margin-left: -4px;
|
||||
margin-top: -2px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: 0; }
|
||||
|
||||
.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear {
|
||||
float: left; }
|
||||
|
||||
.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow {
|
||||
border: none;
|
||||
border-right: 1px solid #aaa;
|
||||
border-radius: 0;
|
||||
border-top-left-radius: 4px;
|
||||
border-bottom-left-radius: 4px;
|
||||
left: 1px;
|
||||
right: auto; }
|
||||
|
||||
.select2-container--classic.select2-container--open .select2-selection--single {
|
||||
border: 1px solid #5897fb; }
|
||||
.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow {
|
||||
background: transparent;
|
||||
border: none; }
|
||||
.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b {
|
||||
border-color: transparent transparent #888 transparent;
|
||||
border-width: 0 4px 5px 4px; }
|
||||
|
||||
.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single {
|
||||
border-top: none;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
background-image: -webkit-linear-gradient(top, white 0%, #eeeeee 50%);
|
||||
background-image: -o-linear-gradient(top, white 0%, #eeeeee 50%);
|
||||
background-image: linear-gradient(to bottom, white 0%, #eeeeee 50%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
|
||||
|
||||
.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single {
|
||||
border-bottom: none;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
background-image: -webkit-linear-gradient(top, #eeeeee 50%, white 100%);
|
||||
background-image: -o-linear-gradient(top, #eeeeee 50%, white 100%);
|
||||
background-image: linear-gradient(to bottom, #eeeeee 50%, white 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0); }
|
||||
|
||||
.select2-container--classic .select2-selection--multiple {
|
||||
background-color: white;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
cursor: text;
|
||||
outline: 0; }
|
||||
.select2-container--classic .select2-selection--multiple:focus {
|
||||
border: 1px solid #5897fb; }
|
||||
.select2-container--classic .select2-selection--multiple .select2-selection__rendered {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0 5px; }
|
||||
.select2-container--classic .select2-selection--multiple .select2-selection__clear {
|
||||
display: none; }
|
||||
.select2-container--classic .select2-selection--multiple .select2-selection__choice {
|
||||
background-color: #e4e4e4;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
cursor: default;
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
margin-top: 5px;
|
||||
padding: 0 5px; }
|
||||
.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove {
|
||||
color: #888;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
font-weight: bold;
|
||||
margin-right: 2px; }
|
||||
.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover {
|
||||
color: #555; }
|
||||
|
||||
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
||||
float: right;
|
||||
margin-left: 5px;
|
||||
margin-right: auto; }
|
||||
|
||||
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
|
||||
margin-left: 2px;
|
||||
margin-right: auto; }
|
||||
|
||||
.select2-container--classic.select2-container--open .select2-selection--multiple {
|
||||
border: 1px solid #5897fb; }
|
||||
|
||||
.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple {
|
||||
border-top: none;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0; }
|
||||
|
||||
.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple {
|
||||
border-bottom: none;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0; }
|
||||
|
||||
.select2-container--classic .select2-search--dropdown .select2-search__field {
|
||||
border: 1px solid #aaa;
|
||||
outline: 0; }
|
||||
|
||||
.select2-container--classic .select2-search--inline .select2-search__field {
|
||||
outline: 0;
|
||||
box-shadow: none; }
|
||||
|
||||
.select2-container--classic .select2-dropdown {
|
||||
background-color: white;
|
||||
border: 1px solid transparent; }
|
||||
|
||||
.select2-container--classic .select2-dropdown--above {
|
||||
border-bottom: none; }
|
||||
|
||||
.select2-container--classic .select2-dropdown--below {
|
||||
border-top: none; }
|
||||
|
||||
.select2-container--classic .select2-results > .select2-results__options {
|
||||
max-height: 200px;
|
||||
overflow-y: auto; }
|
||||
|
||||
.select2-container--classic .select2-results__option[role=group] {
|
||||
padding: 0; }
|
||||
|
||||
.select2-container--classic .select2-results__option[aria-disabled=true] {
|
||||
color: grey; }
|
||||
|
||||
.select2-container--classic .select2-results__option--highlighted[aria-selected] {
|
||||
background-color: #3875d7;
|
||||
color: white; }
|
||||
|
||||
.select2-container--classic .select2-results__group {
|
||||
cursor: default;
|
||||
display: block;
|
||||
padding: 6px; }
|
||||
|
||||
.select2-container--classic.select2-container--open .select2-dropdown {
|
||||
border-color: #5897fb; }
|
5850
src/main/resources/web/assets/lib/widget/select2.js
Normal file
5850
src/main/resources/web/assets/lib/widget/select2.js
Normal file
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue