Browse Source

Merge pull request #455 in VISUAL/fineui from ~WINDY/fineui:master to master

* commit '22c2661d7d383f2f55f90f03ffd6b2de15cde3bb':
  BI-24611
  BI-24689 color_chooser视觉规范
  BI-24836 && BI-24802
es6
guy 7 years ago
parent
commit
644e7ced73
  1. 46
      dist/_fineui.min.js
  2. 3
      dist/base.css
  3. 5
      dist/base.js
  4. 9
      dist/bundle.css
  5. 173
      dist/bundle.js
  6. 2
      dist/bundle.min.css
  7. 40
      dist/bundle.min.js
  8. 154
      dist/case.js
  9. 9
      dist/fineui.css
  10. 173
      dist/fineui.js
  11. 2
      dist/fineui.min.css
  12. 50
      dist/fineui.min.js
  13. 6
      dist/widget.css
  14. 14
      dist/widget.js
  15. 4
      src/base/formula/formulaeditor.js
  16. 1
      src/base/single/button/buttons/button.icon.js
  17. 2
      src/case/colorchooser/colorchooser.js
  18. 45
      src/case/colorchooser/colorchooser.popup.js
  19. 83
      src/case/colorchooser/colorpicker/editor.colorpicker.js
  20. 24
      src/case/colorchooser/colorpicker/editor.colorpicker.simple.js
  21. 3
      src/css/base/colorchooser/colorpicker/editor.css
  22. 6
      src/css/widget/multiselect/trigger/button.css
  23. 1
      src/less/base/colorchooser/colorpicker/editor.colorpicker.less
  24. 4
      src/less/widget/multiselect/trigger/button.checkselected.less
  25. 4
      src/widget/dynamicdate/dynamicdate.trigger.js
  26. 4
      src/widget/dynamicdatetime/dynamicdatetime.trigger.js
  27. 1
      src/widget/multiselect/multiselect.loader.js
  28. 5
      src/widget/multiselect/trigger/button.checkselected.js

46
dist/_fineui.min.js vendored

File diff suppressed because one or more lines are too long

3
dist/base.css vendored

@ -22,9 +22,6 @@
-webkit-border-radius: 2px; -webkit-border-radius: 2px;
-moz-border-radius: 2px; -moz-border-radius: 2px;
border-radius: 2px; border-radius: 2px;
box-shadow: 0px 0px 2px 1px #d4dadd inset;
-webkit-box-shadow: 0px 0px 2px 1px #d4dadd inset;
-moz-box-shadow: 0px 0px 2px 1px #d4dadd inset;
} }
.farbtastic { .farbtastic {
position: relative; position: relative;

5
dist/base.js vendored

@ -14725,7 +14725,7 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
getValue: function () { getValue: function () {
var fieldMap = this.options.fieldTextValueMap; var fieldMap = this.options.fieldTextValueMap;
return this.editor.getValue("\n", function (line) { var v = this.editor.getValue("\n", function (line) {
var rawText = line.text, value = line.text, num = 0; var rawText = line.text, value = line.text, num = 0;
value.text = rawText; value.text = rawText;
_.forEach(line.markedSpans, function (i, ms) { _.forEach(line.markedSpans, function (i, ms) {
@ -14740,7 +14740,7 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
break; break;
} }
}); });
return value; return v.replaceAll("(\\$\\{.*?\\})\\s", "$1");
}); });
}, },
@ -16574,6 +16574,7 @@ BI.IconButton = BI.inherit(BI.BasicButton, {
items: [this.icon] items: [this.icon]
}); });
} else { } else {
this.element.css("lineHeight", "1");
BI.createWidget({ BI.createWidget({
element: this, element: this,
type: "bi.center_adapt", type: "bi.center_adapt",

9
dist/bundle.css vendored

@ -1719,9 +1719,6 @@ textarea {
-webkit-border-radius: 2px; -webkit-border-radius: 2px;
-moz-border-radius: 2px; -moz-border-radius: 2px;
border-radius: 2px; border-radius: 2px;
box-shadow: 0px 0px 2px 1px #d4dadd inset;
-webkit-box-shadow: 0px 0px 2px 1px #d4dadd inset;
-moz-box-shadow: 0px 0px 2px 1px #d4dadd inset;
} }
.farbtastic { .farbtastic {
position: relative; position: relative;
@ -3826,6 +3823,12 @@ ul.ztree.zTreeDragUL {
} }
.bi-multi-select-check-selected-button { .bi-multi-select-check-selected-button {
z-index: 1; z-index: 1;
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
border-radius: 8px;
}
.bi-multi-select-check-selected-button .count-tip {
min-width: 16px;
} }
.bi-multi-tree-check-pane .multi-tree-check-selected { .bi-multi-tree-check-pane .multi-tree-check-selected {
color: #3685f2; color: #3685f2;

173
dist/bundle.js vendored

@ -50495,7 +50495,7 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
getValue: function () { getValue: function () {
var fieldMap = this.options.fieldTextValueMap; var fieldMap = this.options.fieldTextValueMap;
return this.editor.getValue("\n", function (line) { var v = this.editor.getValue("\n", function (line) {
var rawText = line.text, value = line.text, num = 0; var rawText = line.text, value = line.text, num = 0;
value.text = rawText; value.text = rawText;
_.forEach(line.markedSpans, function (i, ms) { _.forEach(line.markedSpans, function (i, ms) {
@ -50510,7 +50510,7 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
break; break;
} }
}); });
return value; return v.replaceAll("(\\$\\{.*?\\})\\s", "$1");
}); });
}, },
@ -52344,6 +52344,7 @@ BI.IconButton = BI.inherit(BI.BasicButton, {
items: [this.icon] items: [this.icon]
}); });
} else { } else {
this.element.css("lineHeight", "1");
BI.createWidget({ BI.createWidget({
element: this, element: this,
type: "bi.center_adapt", type: "bi.center_adapt",
@ -76137,7 +76138,7 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
}] }]
}, o.popup), }, o.popup),
stopPropagation: false, stopPropagation: false,
width: 202 width: 230
}, },
value: o.value value: o.value
}); });
@ -76193,7 +76194,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
props: { props: {
baseCls: "bi-color-chooser-popup", baseCls: "bi-color-chooser-popup",
width: 200, width: 230,
height: 145 height: 145
}, },
@ -76201,7 +76202,9 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
var self = this, o = this.options; var self = this, o = this.options;
this.colorEditor = BI.createWidget(o.editor, { this.colorEditor = BI.createWidget(o.editor, {
type: "bi.color_picker_editor", type: "bi.color_picker_editor",
value: o.value value: o.value,
cls: "bi-background bi-border-bottom",
height: 30
}); });
this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE, function () { this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE, function () {
@ -76236,8 +76239,8 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
value: "", value: "",
disabled: true disabled: true
}]], }]],
width: 190, width: 210,
height: 25, height: 24,
value: o.value value: o.value
}); });
this.storeColors.on(BI.ColorPicker.EVENT_CHANGE, function () { this.storeColors.on(BI.ColorPicker.EVENT_CHANGE, function () {
@ -76247,7 +76250,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.colorPicker = BI.createWidget({ this.colorPicker = BI.createWidget({
type: "bi.color_picker", type: "bi.color_picker",
width: 190, width: 210,
height: 50, height: 50,
value: o.value value: o.value
}); });
@ -76282,7 +76285,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
type: "bi.text_item", type: "bi.text_item",
cls: "color-chooser-popup-more bi-list-item", cls: "color-chooser-popup-more bi-list-item",
textAlign: "center", textAlign: "center",
height: 20, height: 24,
text: BI.i18nText("BI-Basic_More") + "..." text: BI.i18nText("BI-Basic_More") + "..."
}, },
popup: panel popup: panel
@ -76309,43 +76312,32 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
items: [{ items: [{
el: { el: {
type: "bi.vtape", type: "bi.vtape",
items: [{ items: [this.colorEditor, {
el: {
type: "bi.absolute",
cls: "bi-background bi-border-bottom",
items: [{
el: this.colorEditor,
left: 0,
right: 0,
top: 5
}]
},
height: 30
}, {
el: { el: {
type: "bi.absolute", type: "bi.absolute",
items: [{ items: [{
el: this.storeColors, el: this.storeColors,
left: 5, left: 10,
right: 5, right: 10,
top: 5 top: 5
}] }]
}, },
height: 30 height: 29
}, { }, {
el: { el: {
type: "bi.absolute", type: "bi.absolute",
items: [{ items: [{
el: this.colorPicker, el: this.colorPicker,
left: 5, left: 10,
right: 5, right: 10,
top: 5 top: 5,
bottom: 5
}] }]
}, },
height: 65 height: 60
}, { }, {
el: this.more, el: this.more,
height: 20 height: 24
}] }]
}, },
left: 0, left: 0,
@ -76934,7 +76926,7 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
return BI.extend(BI.ColorPickerEditor.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.ColorPickerEditor.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-color-picker-editor", baseCls: "bi-color-picker-editor",
// width: 200, // width: 200,
height: 20 height: 30
}); });
}, },
@ -76945,12 +76937,13 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
this.colorShow = BI.createWidget({ this.colorShow = BI.createWidget({
type: "bi.layout", type: "bi.layout",
cls: "color-picker-editor-display bi-card", cls: "color-picker-editor-display bi-card",
height: 20 height: 16,
width: 16
}); });
var RGB = BI.createWidgets(BI.createItems([{text: "R"}, {text: "G"}, {text: "B"}], { var RGB = BI.createWidgets(BI.createItems([{text: "R"}, {text: "G"}, {text: "B"}], {
type: "bi.label", type: "bi.label",
cls: "color-picker-editor-label", cls: "color-picker-editor-label",
width: 10, width: 20,
height: 20 height: 20
})); }));
@ -76983,8 +76976,8 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
this.none = BI.createWidget({ this.none = BI.createWidget({
type: "bi.icon_button", type: "bi.icon_button",
cls: "auto-color-icon", cls: "auto-color-icon",
width: 16, width: 24,
height: 16, height: 24,
iconWidth: 16, iconWidth: 16,
iconHeight: 16, iconHeight: 16,
title: BI.i18nText("BI-Basic_Auto") title: BI.i18nText("BI-Basic_Auto")
@ -77005,8 +76998,8 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
this.transparent = BI.createWidget({ this.transparent = BI.createWidget({
type: "bi.icon_button", type: "bi.icon_button",
cls: "trans-color-icon", cls: "trans-color-icon",
width: 16, width: 24,
height: 16, height: 24,
iconWidth: 16, iconWidth: 16,
iconHeight: 16, iconHeight: 16,
title: BI.i18nText("BI-Transparent_Color") title: BI.i18nText("BI-Transparent_Color")
@ -77029,44 +77022,44 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
}); });
BI.createWidget({ BI.createWidget({
type: "bi.htape", type: "bi.absolute",
element: this, element: this,
items: [{ items: [{
el: this.colorShow,
width: "fill"
}, {
el: RGB[0],
lgap: 10,
width: 16
}, {
el: this.R,
width: 32
}, {
el: RGB[1],
lgap: 10,
width: 16
}, {
el: this.G,
width: 32
}, {
el: RGB[2],
lgap: 10,
width: 16
}, {
el: this.B,
width: 32
}, {
el: { el: {
type: "bi.center_adapt", type: "bi.vertical_adapt",
items: [this.none] items: [{
}, el: this.colorShow,
width: 18 width: 16
}, { }, {
el: { el: RGB[0],
type: "bi.center_adapt", width: 20
items: [this.transparent] }, {
el: this.R,
width: 30
}, {
el: RGB[1],
width: 20
}, {
el: this.G,
width: 30
}, {
el: RGB[2],
width: 20
}, {
el: this.B,
width: 30
}, {
el: this.transparent,
width: 24
}, {
el: this.none,
width: 24
}]
}, },
width: 18 left: 10,
right: 20,
top: 0,
bottom: 0
}] }]
}); });
}, },
@ -77171,12 +77164,13 @@ BI.SimpleColorPickerEditor = BI.inherit(BI.Widget, {
this.colorShow = BI.createWidget({ this.colorShow = BI.createWidget({
type: "bi.layout", type: "bi.layout",
cls: "color-picker-editor-display bi-card", cls: "color-picker-editor-display bi-card",
height: 20 height: 20,
width: 40
}); });
var RGB = BI.createWidgets(BI.createItems([{text: "R"}, {text: "G"}, {text: "B"}], { var RGB = BI.createWidgets(BI.createItems([{text: "R"}, {text: "G"}, {text: "B"}], {
type: "bi.label", type: "bi.label",
cls: "color-picker-editor-label", cls: "color-picker-editor-label",
width: 10, width: 20,
height: 20 height: 20
})); }));
@ -77206,34 +77200,31 @@ BI.SimpleColorPickerEditor = BI.inherit(BI.Widget, {
this.B = Ws[2]; this.B = Ws[2];
BI.createWidget({ BI.createWidget({
type: "bi.htape", type: "bi.vertical_adapt",
element: this, element: this,
items: [{ items: [{
el: this.colorShow, el: this.colorShow,
width: 40,
lgap: 5, lgap: 5,
rgap: 5 rgap: 5
}, { }, {
el: RGB[0], el: RGB[0],
lgap: 10, width: 20
width: 16
}, { }, {
el: this.R, el: this.R,
width: 36 width: 30
}, { }, {
el: RGB[1], el: RGB[1],
lgap: 10, width: 20
width: 16
}, { }, {
el: this.G, el: this.G,
width: 36 width: 30
}, { }, {
el: RGB[2], el: RGB[2],
lgap: 10, width: 20
width: 16
}, { }, {
el: this.B, el: this.B,
width: 36, width: 30
rgap: 10
}] }]
}); });
}, },
@ -91398,6 +91389,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
_init: function () { _init: function () {
BI.DynamicDateTrigger.superclass._init.apply(this, arguments); BI.DynamicDateTrigger.superclass._init.apply(this, arguments);
var self = this, o = this.options, c = this._const; var self = this, o = this.options, c = this._const;
this.storeTriggerValue = "";
this.editor = BI.createWidget({ this.editor = BI.createWidget({
type: "bi.sign_editor", type: "bi.sign_editor",
height: o.height, height: o.height,
@ -91447,6 +91439,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
self.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN); self.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN);
}); });
this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {
self.storeTriggerValue = self.getKey();
self.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS); self.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS);
}); });
this.editor.on(BI.SignEditor.EVENT_STOP, function () { this.editor.on(BI.SignEditor.EVENT_STOP, function () {
@ -91464,7 +91457,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
self.editor.setState(value); self.editor.setState(value);
} }
if (BI.isNotEmptyString(value)) { if (BI.isNotEmptyString(value) && !BI.isEqual(self.storeTriggerValue, self.getKey())) {
var date = value.split("-"); var date = value.split("-");
self.storeValue = { self.storeValue = {
type: BI.DynamicDateCombo.Static, type: BI.DynamicDateCombo.Static,
@ -92379,6 +92372,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
_init: function () { _init: function () {
BI.DynamicDateTimeTrigger.superclass._init.apply(this, arguments); BI.DynamicDateTimeTrigger.superclass._init.apply(this, arguments);
var self = this, o = this.options, c = this._const; var self = this, o = this.options, c = this._const;
this.storeTriggerValue = "";
this.editor = BI.createWidget({ this.editor = BI.createWidget({
type: "bi.sign_editor", type: "bi.sign_editor",
height: o.height, height: o.height,
@ -92428,6 +92422,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN); self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN);
}); });
this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {
self.storeTriggerValue = self.getKey();
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS); self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS);
}); });
this.editor.on(BI.SignEditor.EVENT_STOP, function () { this.editor.on(BI.SignEditor.EVENT_STOP, function () {
@ -92445,7 +92440,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
self.editor.setState(value); self.editor.setState(value);
} }
if (BI.isNotEmptyString(value)) { if (BI.isNotEmptyString(value) && !BI.isEqual(self.storeTriggerValue, self.getKey())) {
var date = value.split(/-|\s|:/); var date = value.split(/-|\s|:/);
self.storeValue = { self.storeValue = {
type: BI.DynamicDateCombo.Static, type: BI.DynamicDateCombo.Static,
@ -98724,6 +98719,7 @@ BI.MultiSelectLoader = BI.inherit(BI.Widget, {
return BI.createItems(items, { return BI.createItems(items, {
type: "bi.multi_select_item", type: "bi.multi_select_item",
logic: this.options.logic, logic: this.options.logic,
cls: "bi-list-item-active",
height: 24, height: 24,
selected: this.isAllSelected() selected: this.isAllSelected()
}); });
@ -99551,7 +99547,7 @@ BI.MultiSelectCheckSelectedButton = BI.inherit(BI.Single, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.MultiSelectCheckSelectedButton.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.MultiSelectCheckSelectedButton.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-select-check-selected-button bi-high-light", baseCls: "bi-multi-select-check-selected-button",
itemsCreator: BI.emptyFn itemsCreator: BI.emptyFn
}); });
}, },
@ -99565,7 +99561,8 @@ BI.MultiSelectCheckSelectedButton = BI.inherit(BI.Single, {
hgap: 4, hgap: 4,
text: "0", text: "0",
textAlign: "center", textAlign: "center",
textHeight: 15 textHeight: 16,
cls: "bi-high-light-background count-tip"
}); });
this.numberCounter.on(BI.Controller.EVENT_CHANGE, function () { this.numberCounter.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);

2
dist/bundle.min.css vendored

File diff suppressed because one or more lines are too long

40
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

154
dist/case.js vendored

@ -3668,7 +3668,7 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
}] }]
}, o.popup), }, o.popup),
stopPropagation: false, stopPropagation: false,
width: 202 width: 230
}, },
value: o.value value: o.value
}); });
@ -3724,7 +3724,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
props: { props: {
baseCls: "bi-color-chooser-popup", baseCls: "bi-color-chooser-popup",
width: 200, width: 230,
height: 145 height: 145
}, },
@ -3732,7 +3732,9 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
var self = this, o = this.options; var self = this, o = this.options;
this.colorEditor = BI.createWidget(o.editor, { this.colorEditor = BI.createWidget(o.editor, {
type: "bi.color_picker_editor", type: "bi.color_picker_editor",
value: o.value value: o.value,
cls: "bi-background bi-border-bottom",
height: 30
}); });
this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE, function () { this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE, function () {
@ -3767,8 +3769,8 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
value: "", value: "",
disabled: true disabled: true
}]], }]],
width: 190, width: 210,
height: 25, height: 24,
value: o.value value: o.value
}); });
this.storeColors.on(BI.ColorPicker.EVENT_CHANGE, function () { this.storeColors.on(BI.ColorPicker.EVENT_CHANGE, function () {
@ -3778,7 +3780,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.colorPicker = BI.createWidget({ this.colorPicker = BI.createWidget({
type: "bi.color_picker", type: "bi.color_picker",
width: 190, width: 210,
height: 50, height: 50,
value: o.value value: o.value
}); });
@ -3813,7 +3815,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
type: "bi.text_item", type: "bi.text_item",
cls: "color-chooser-popup-more bi-list-item", cls: "color-chooser-popup-more bi-list-item",
textAlign: "center", textAlign: "center",
height: 20, height: 24,
text: BI.i18nText("BI-Basic_More") + "..." text: BI.i18nText("BI-Basic_More") + "..."
}, },
popup: panel popup: panel
@ -3840,43 +3842,32 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
items: [{ items: [{
el: { el: {
type: "bi.vtape", type: "bi.vtape",
items: [{ items: [this.colorEditor, {
el: {
type: "bi.absolute",
cls: "bi-background bi-border-bottom",
items: [{
el: this.colorEditor,
left: 0,
right: 0,
top: 5
}]
},
height: 30
}, {
el: { el: {
type: "bi.absolute", type: "bi.absolute",
items: [{ items: [{
el: this.storeColors, el: this.storeColors,
left: 5, left: 10,
right: 5, right: 10,
top: 5 top: 5
}] }]
}, },
height: 30 height: 29
}, { }, {
el: { el: {
type: "bi.absolute", type: "bi.absolute",
items: [{ items: [{
el: this.colorPicker, el: this.colorPicker,
left: 5, left: 10,
right: 5, right: 10,
top: 5 top: 5,
bottom: 5
}] }]
}, },
height: 65 height: 60
}, { }, {
el: this.more, el: this.more,
height: 20 height: 24
}] }]
}, },
left: 0, left: 0,
@ -4465,7 +4456,7 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
return BI.extend(BI.ColorPickerEditor.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.ColorPickerEditor.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-color-picker-editor", baseCls: "bi-color-picker-editor",
// width: 200, // width: 200,
height: 20 height: 30
}); });
}, },
@ -4476,12 +4467,13 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
this.colorShow = BI.createWidget({ this.colorShow = BI.createWidget({
type: "bi.layout", type: "bi.layout",
cls: "color-picker-editor-display bi-card", cls: "color-picker-editor-display bi-card",
height: 20 height: 16,
width: 16
}); });
var RGB = BI.createWidgets(BI.createItems([{text: "R"}, {text: "G"}, {text: "B"}], { var RGB = BI.createWidgets(BI.createItems([{text: "R"}, {text: "G"}, {text: "B"}], {
type: "bi.label", type: "bi.label",
cls: "color-picker-editor-label", cls: "color-picker-editor-label",
width: 10, width: 20,
height: 20 height: 20
})); }));
@ -4514,8 +4506,8 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
this.none = BI.createWidget({ this.none = BI.createWidget({
type: "bi.icon_button", type: "bi.icon_button",
cls: "auto-color-icon", cls: "auto-color-icon",
width: 16, width: 24,
height: 16, height: 24,
iconWidth: 16, iconWidth: 16,
iconHeight: 16, iconHeight: 16,
title: BI.i18nText("BI-Basic_Auto") title: BI.i18nText("BI-Basic_Auto")
@ -4536,8 +4528,8 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
this.transparent = BI.createWidget({ this.transparent = BI.createWidget({
type: "bi.icon_button", type: "bi.icon_button",
cls: "trans-color-icon", cls: "trans-color-icon",
width: 16, width: 24,
height: 16, height: 24,
iconWidth: 16, iconWidth: 16,
iconHeight: 16, iconHeight: 16,
title: BI.i18nText("BI-Transparent_Color") title: BI.i18nText("BI-Transparent_Color")
@ -4560,44 +4552,44 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
}); });
BI.createWidget({ BI.createWidget({
type: "bi.htape", type: "bi.absolute",
element: this, element: this,
items: [{ items: [{
el: this.colorShow,
width: "fill"
}, {
el: RGB[0],
lgap: 10,
width: 16
}, {
el: this.R,
width: 32
}, {
el: RGB[1],
lgap: 10,
width: 16
}, {
el: this.G,
width: 32
}, {
el: RGB[2],
lgap: 10,
width: 16
}, {
el: this.B,
width: 32
}, {
el: { el: {
type: "bi.center_adapt", type: "bi.vertical_adapt",
items: [this.none] items: [{
}, el: this.colorShow,
width: 18 width: 16
}, { }, {
el: { el: RGB[0],
type: "bi.center_adapt", width: 20
items: [this.transparent] }, {
el: this.R,
width: 30
}, {
el: RGB[1],
width: 20
}, {
el: this.G,
width: 30
}, {
el: RGB[2],
width: 20
}, {
el: this.B,
width: 30
}, {
el: this.transparent,
width: 24
}, {
el: this.none,
width: 24
}]
}, },
width: 18 left: 10,
right: 20,
top: 0,
bottom: 0
}] }]
}); });
}, },
@ -4702,12 +4694,13 @@ BI.SimpleColorPickerEditor = BI.inherit(BI.Widget, {
this.colorShow = BI.createWidget({ this.colorShow = BI.createWidget({
type: "bi.layout", type: "bi.layout",
cls: "color-picker-editor-display bi-card", cls: "color-picker-editor-display bi-card",
height: 20 height: 20,
width: 40
}); });
var RGB = BI.createWidgets(BI.createItems([{text: "R"}, {text: "G"}, {text: "B"}], { var RGB = BI.createWidgets(BI.createItems([{text: "R"}, {text: "G"}, {text: "B"}], {
type: "bi.label", type: "bi.label",
cls: "color-picker-editor-label", cls: "color-picker-editor-label",
width: 10, width: 20,
height: 20 height: 20
})); }));
@ -4737,34 +4730,31 @@ BI.SimpleColorPickerEditor = BI.inherit(BI.Widget, {
this.B = Ws[2]; this.B = Ws[2];
BI.createWidget({ BI.createWidget({
type: "bi.htape", type: "bi.vertical_adapt",
element: this, element: this,
items: [{ items: [{
el: this.colorShow, el: this.colorShow,
width: 40,
lgap: 5, lgap: 5,
rgap: 5 rgap: 5
}, { }, {
el: RGB[0], el: RGB[0],
lgap: 10, width: 20
width: 16
}, { }, {
el: this.R, el: this.R,
width: 36 width: 30
}, { }, {
el: RGB[1], el: RGB[1],
lgap: 10, width: 20
width: 16
}, { }, {
el: this.G, el: this.G,
width: 36 width: 30
}, { }, {
el: RGB[2], el: RGB[2],
lgap: 10, width: 20
width: 16
}, { }, {
el: this.B, el: this.B,
width: 36, width: 30
rgap: 10
}] }]
}); });
}, },

9
dist/fineui.css vendored

@ -1719,9 +1719,6 @@ textarea {
-webkit-border-radius: 2px; -webkit-border-radius: 2px;
-moz-border-radius: 2px; -moz-border-radius: 2px;
border-radius: 2px; border-radius: 2px;
box-shadow: 0px 0px 2px 1px #d4dadd inset;
-webkit-box-shadow: 0px 0px 2px 1px #d4dadd inset;
-moz-box-shadow: 0px 0px 2px 1px #d4dadd inset;
} }
.farbtastic { .farbtastic {
position: relative; position: relative;
@ -3826,6 +3823,12 @@ ul.ztree.zTreeDragUL {
} }
.bi-multi-select-check-selected-button { .bi-multi-select-check-selected-button {
z-index: 1; z-index: 1;
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
border-radius: 8px;
}
.bi-multi-select-check-selected-button .count-tip {
min-width: 16px;
} }
.bi-multi-tree-check-pane .multi-tree-check-selected { .bi-multi-tree-check-pane .multi-tree-check-selected {
color: #3685f2; color: #3685f2;

173
dist/fineui.js vendored

@ -50738,7 +50738,7 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
getValue: function () { getValue: function () {
var fieldMap = this.options.fieldTextValueMap; var fieldMap = this.options.fieldTextValueMap;
return this.editor.getValue("\n", function (line) { var v = this.editor.getValue("\n", function (line) {
var rawText = line.text, value = line.text, num = 0; var rawText = line.text, value = line.text, num = 0;
value.text = rawText; value.text = rawText;
_.forEach(line.markedSpans, function (i, ms) { _.forEach(line.markedSpans, function (i, ms) {
@ -50753,7 +50753,7 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
break; break;
} }
}); });
return value; return v.replaceAll("(\\$\\{.*?\\})\\s", "$1");
}); });
}, },
@ -52587,6 +52587,7 @@ BI.IconButton = BI.inherit(BI.BasicButton, {
items: [this.icon] items: [this.icon]
}); });
} else { } else {
this.element.css("lineHeight", "1");
BI.createWidget({ BI.createWidget({
element: this, element: this,
type: "bi.center_adapt", type: "bi.center_adapt",
@ -76380,7 +76381,7 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
}] }]
}, o.popup), }, o.popup),
stopPropagation: false, stopPropagation: false,
width: 202 width: 230
}, },
value: o.value value: o.value
}); });
@ -76436,7 +76437,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
props: { props: {
baseCls: "bi-color-chooser-popup", baseCls: "bi-color-chooser-popup",
width: 200, width: 230,
height: 145 height: 145
}, },
@ -76444,7 +76445,9 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
var self = this, o = this.options; var self = this, o = this.options;
this.colorEditor = BI.createWidget(o.editor, { this.colorEditor = BI.createWidget(o.editor, {
type: "bi.color_picker_editor", type: "bi.color_picker_editor",
value: o.value value: o.value,
cls: "bi-background bi-border-bottom",
height: 30
}); });
this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE, function () { this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE, function () {
@ -76479,8 +76482,8 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
value: "", value: "",
disabled: true disabled: true
}]], }]],
width: 190, width: 210,
height: 25, height: 24,
value: o.value value: o.value
}); });
this.storeColors.on(BI.ColorPicker.EVENT_CHANGE, function () { this.storeColors.on(BI.ColorPicker.EVENT_CHANGE, function () {
@ -76490,7 +76493,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.colorPicker = BI.createWidget({ this.colorPicker = BI.createWidget({
type: "bi.color_picker", type: "bi.color_picker",
width: 190, width: 210,
height: 50, height: 50,
value: o.value value: o.value
}); });
@ -76525,7 +76528,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
type: "bi.text_item", type: "bi.text_item",
cls: "color-chooser-popup-more bi-list-item", cls: "color-chooser-popup-more bi-list-item",
textAlign: "center", textAlign: "center",
height: 20, height: 24,
text: BI.i18nText("BI-Basic_More") + "..." text: BI.i18nText("BI-Basic_More") + "..."
}, },
popup: panel popup: panel
@ -76552,43 +76555,32 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
items: [{ items: [{
el: { el: {
type: "bi.vtape", type: "bi.vtape",
items: [{ items: [this.colorEditor, {
el: {
type: "bi.absolute",
cls: "bi-background bi-border-bottom",
items: [{
el: this.colorEditor,
left: 0,
right: 0,
top: 5
}]
},
height: 30
}, {
el: { el: {
type: "bi.absolute", type: "bi.absolute",
items: [{ items: [{
el: this.storeColors, el: this.storeColors,
left: 5, left: 10,
right: 5, right: 10,
top: 5 top: 5
}] }]
}, },
height: 30 height: 29
}, { }, {
el: { el: {
type: "bi.absolute", type: "bi.absolute",
items: [{ items: [{
el: this.colorPicker, el: this.colorPicker,
left: 5, left: 10,
right: 5, right: 10,
top: 5 top: 5,
bottom: 5
}] }]
}, },
height: 65 height: 60
}, { }, {
el: this.more, el: this.more,
height: 20 height: 24
}] }]
}, },
left: 0, left: 0,
@ -77177,7 +77169,7 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
return BI.extend(BI.ColorPickerEditor.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.ColorPickerEditor.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-color-picker-editor", baseCls: "bi-color-picker-editor",
// width: 200, // width: 200,
height: 20 height: 30
}); });
}, },
@ -77188,12 +77180,13 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
this.colorShow = BI.createWidget({ this.colorShow = BI.createWidget({
type: "bi.layout", type: "bi.layout",
cls: "color-picker-editor-display bi-card", cls: "color-picker-editor-display bi-card",
height: 20 height: 16,
width: 16
}); });
var RGB = BI.createWidgets(BI.createItems([{text: "R"}, {text: "G"}, {text: "B"}], { var RGB = BI.createWidgets(BI.createItems([{text: "R"}, {text: "G"}, {text: "B"}], {
type: "bi.label", type: "bi.label",
cls: "color-picker-editor-label", cls: "color-picker-editor-label",
width: 10, width: 20,
height: 20 height: 20
})); }));
@ -77226,8 +77219,8 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
this.none = BI.createWidget({ this.none = BI.createWidget({
type: "bi.icon_button", type: "bi.icon_button",
cls: "auto-color-icon", cls: "auto-color-icon",
width: 16, width: 24,
height: 16, height: 24,
iconWidth: 16, iconWidth: 16,
iconHeight: 16, iconHeight: 16,
title: BI.i18nText("BI-Basic_Auto") title: BI.i18nText("BI-Basic_Auto")
@ -77248,8 +77241,8 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
this.transparent = BI.createWidget({ this.transparent = BI.createWidget({
type: "bi.icon_button", type: "bi.icon_button",
cls: "trans-color-icon", cls: "trans-color-icon",
width: 16, width: 24,
height: 16, height: 24,
iconWidth: 16, iconWidth: 16,
iconHeight: 16, iconHeight: 16,
title: BI.i18nText("BI-Transparent_Color") title: BI.i18nText("BI-Transparent_Color")
@ -77272,44 +77265,44 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
}); });
BI.createWidget({ BI.createWidget({
type: "bi.htape", type: "bi.absolute",
element: this, element: this,
items: [{ items: [{
el: this.colorShow,
width: "fill"
}, {
el: RGB[0],
lgap: 10,
width: 16
}, {
el: this.R,
width: 32
}, {
el: RGB[1],
lgap: 10,
width: 16
}, {
el: this.G,
width: 32
}, {
el: RGB[2],
lgap: 10,
width: 16
}, {
el: this.B,
width: 32
}, {
el: { el: {
type: "bi.center_adapt", type: "bi.vertical_adapt",
items: [this.none] items: [{
}, el: this.colorShow,
width: 18 width: 16
}, { }, {
el: { el: RGB[0],
type: "bi.center_adapt", width: 20
items: [this.transparent] }, {
el: this.R,
width: 30
}, {
el: RGB[1],
width: 20
}, {
el: this.G,
width: 30
}, {
el: RGB[2],
width: 20
}, {
el: this.B,
width: 30
}, {
el: this.transparent,
width: 24
}, {
el: this.none,
width: 24
}]
}, },
width: 18 left: 10,
right: 20,
top: 0,
bottom: 0
}] }]
}); });
}, },
@ -77414,12 +77407,13 @@ BI.SimpleColorPickerEditor = BI.inherit(BI.Widget, {
this.colorShow = BI.createWidget({ this.colorShow = BI.createWidget({
type: "bi.layout", type: "bi.layout",
cls: "color-picker-editor-display bi-card", cls: "color-picker-editor-display bi-card",
height: 20 height: 20,
width: 40
}); });
var RGB = BI.createWidgets(BI.createItems([{text: "R"}, {text: "G"}, {text: "B"}], { var RGB = BI.createWidgets(BI.createItems([{text: "R"}, {text: "G"}, {text: "B"}], {
type: "bi.label", type: "bi.label",
cls: "color-picker-editor-label", cls: "color-picker-editor-label",
width: 10, width: 20,
height: 20 height: 20
})); }));
@ -77449,34 +77443,31 @@ BI.SimpleColorPickerEditor = BI.inherit(BI.Widget, {
this.B = Ws[2]; this.B = Ws[2];
BI.createWidget({ BI.createWidget({
type: "bi.htape", type: "bi.vertical_adapt",
element: this, element: this,
items: [{ items: [{
el: this.colorShow, el: this.colorShow,
width: 40,
lgap: 5, lgap: 5,
rgap: 5 rgap: 5
}, { }, {
el: RGB[0], el: RGB[0],
lgap: 10, width: 20
width: 16
}, { }, {
el: this.R, el: this.R,
width: 36 width: 30
}, { }, {
el: RGB[1], el: RGB[1],
lgap: 10, width: 20
width: 16
}, { }, {
el: this.G, el: this.G,
width: 36 width: 30
}, { }, {
el: RGB[2], el: RGB[2],
lgap: 10, width: 20
width: 16
}, { }, {
el: this.B, el: this.B,
width: 36, width: 30
rgap: 10
}] }]
}); });
}, },
@ -91641,6 +91632,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
_init: function () { _init: function () {
BI.DynamicDateTrigger.superclass._init.apply(this, arguments); BI.DynamicDateTrigger.superclass._init.apply(this, arguments);
var self = this, o = this.options, c = this._const; var self = this, o = this.options, c = this._const;
this.storeTriggerValue = "";
this.editor = BI.createWidget({ this.editor = BI.createWidget({
type: "bi.sign_editor", type: "bi.sign_editor",
height: o.height, height: o.height,
@ -91690,6 +91682,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
self.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN); self.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN);
}); });
this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {
self.storeTriggerValue = self.getKey();
self.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS); self.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS);
}); });
this.editor.on(BI.SignEditor.EVENT_STOP, function () { this.editor.on(BI.SignEditor.EVENT_STOP, function () {
@ -91707,7 +91700,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
self.editor.setState(value); self.editor.setState(value);
} }
if (BI.isNotEmptyString(value)) { if (BI.isNotEmptyString(value) && !BI.isEqual(self.storeTriggerValue, self.getKey())) {
var date = value.split("-"); var date = value.split("-");
self.storeValue = { self.storeValue = {
type: BI.DynamicDateCombo.Static, type: BI.DynamicDateCombo.Static,
@ -92622,6 +92615,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
_init: function () { _init: function () {
BI.DynamicDateTimeTrigger.superclass._init.apply(this, arguments); BI.DynamicDateTimeTrigger.superclass._init.apply(this, arguments);
var self = this, o = this.options, c = this._const; var self = this, o = this.options, c = this._const;
this.storeTriggerValue = "";
this.editor = BI.createWidget({ this.editor = BI.createWidget({
type: "bi.sign_editor", type: "bi.sign_editor",
height: o.height, height: o.height,
@ -92671,6 +92665,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN); self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN);
}); });
this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {
self.storeTriggerValue = self.getKey();
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS); self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS);
}); });
this.editor.on(BI.SignEditor.EVENT_STOP, function () { this.editor.on(BI.SignEditor.EVENT_STOP, function () {
@ -92688,7 +92683,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
self.editor.setState(value); self.editor.setState(value);
} }
if (BI.isNotEmptyString(value)) { if (BI.isNotEmptyString(value) && !BI.isEqual(self.storeTriggerValue, self.getKey())) {
var date = value.split(/-|\s|:/); var date = value.split(/-|\s|:/);
self.storeValue = { self.storeValue = {
type: BI.DynamicDateCombo.Static, type: BI.DynamicDateCombo.Static,
@ -98967,6 +98962,7 @@ BI.MultiSelectLoader = BI.inherit(BI.Widget, {
return BI.createItems(items, { return BI.createItems(items, {
type: "bi.multi_select_item", type: "bi.multi_select_item",
logic: this.options.logic, logic: this.options.logic,
cls: "bi-list-item-active",
height: 24, height: 24,
selected: this.isAllSelected() selected: this.isAllSelected()
}); });
@ -99794,7 +99790,7 @@ BI.MultiSelectCheckSelectedButton = BI.inherit(BI.Single, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.MultiSelectCheckSelectedButton.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.MultiSelectCheckSelectedButton.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-select-check-selected-button bi-high-light", baseCls: "bi-multi-select-check-selected-button",
itemsCreator: BI.emptyFn itemsCreator: BI.emptyFn
}); });
}, },
@ -99808,7 +99804,8 @@ BI.MultiSelectCheckSelectedButton = BI.inherit(BI.Single, {
hgap: 4, hgap: 4,
text: "0", text: "0",
textAlign: "center", textAlign: "center",
textHeight: 15 textHeight: 16,
cls: "bi-high-light-background count-tip"
}); });
this.numberCounter.on(BI.Controller.EVENT_CHANGE, function () { this.numberCounter.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);

2
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

50
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

6
dist/widget.css vendored

@ -181,6 +181,12 @@
} }
.bi-multi-select-check-selected-button { .bi-multi-select-check-selected-button {
z-index: 1; z-index: 1;
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
border-radius: 8px;
}
.bi-multi-select-check-selected-button .count-tip {
min-width: 16px;
} }
.bi-multi-tree-check-pane .multi-tree-check-selected { .bi-multi-tree-check-pane .multi-tree-check-selected {
color: #3685f2; color: #3685f2;

14
dist/widget.js vendored

@ -3776,6 +3776,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
_init: function () { _init: function () {
BI.DynamicDateTrigger.superclass._init.apply(this, arguments); BI.DynamicDateTrigger.superclass._init.apply(this, arguments);
var self = this, o = this.options, c = this._const; var self = this, o = this.options, c = this._const;
this.storeTriggerValue = "";
this.editor = BI.createWidget({ this.editor = BI.createWidget({
type: "bi.sign_editor", type: "bi.sign_editor",
height: o.height, height: o.height,
@ -3825,6 +3826,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
self.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN); self.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN);
}); });
this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {
self.storeTriggerValue = self.getKey();
self.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS); self.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS);
}); });
this.editor.on(BI.SignEditor.EVENT_STOP, function () { this.editor.on(BI.SignEditor.EVENT_STOP, function () {
@ -3842,7 +3844,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
self.editor.setState(value); self.editor.setState(value);
} }
if (BI.isNotEmptyString(value)) { if (BI.isNotEmptyString(value) && !BI.isEqual(self.storeTriggerValue, self.getKey())) {
var date = value.split("-"); var date = value.split("-");
self.storeValue = { self.storeValue = {
type: BI.DynamicDateCombo.Static, type: BI.DynamicDateCombo.Static,
@ -4757,6 +4759,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
_init: function () { _init: function () {
BI.DynamicDateTimeTrigger.superclass._init.apply(this, arguments); BI.DynamicDateTimeTrigger.superclass._init.apply(this, arguments);
var self = this, o = this.options, c = this._const; var self = this, o = this.options, c = this._const;
this.storeTriggerValue = "";
this.editor = BI.createWidget({ this.editor = BI.createWidget({
type: "bi.sign_editor", type: "bi.sign_editor",
height: o.height, height: o.height,
@ -4806,6 +4809,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN); self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN);
}); });
this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {
self.storeTriggerValue = self.getKey();
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS); self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS);
}); });
this.editor.on(BI.SignEditor.EVENT_STOP, function () { this.editor.on(BI.SignEditor.EVENT_STOP, function () {
@ -4823,7 +4827,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
self.editor.setState(value); self.editor.setState(value);
} }
if (BI.isNotEmptyString(value)) { if (BI.isNotEmptyString(value) && !BI.isEqual(self.storeTriggerValue, self.getKey())) {
var date = value.split(/-|\s|:/); var date = value.split(/-|\s|:/);
self.storeValue = { self.storeValue = {
type: BI.DynamicDateCombo.Static, type: BI.DynamicDateCombo.Static,
@ -11102,6 +11106,7 @@ BI.MultiSelectLoader = BI.inherit(BI.Widget, {
return BI.createItems(items, { return BI.createItems(items, {
type: "bi.multi_select_item", type: "bi.multi_select_item",
logic: this.options.logic, logic: this.options.logic,
cls: "bi-list-item-active",
height: 24, height: 24,
selected: this.isAllSelected() selected: this.isAllSelected()
}); });
@ -11929,7 +11934,7 @@ BI.MultiSelectCheckSelectedButton = BI.inherit(BI.Single, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.MultiSelectCheckSelectedButton.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.MultiSelectCheckSelectedButton.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-select-check-selected-button bi-high-light", baseCls: "bi-multi-select-check-selected-button",
itemsCreator: BI.emptyFn itemsCreator: BI.emptyFn
}); });
}, },
@ -11943,7 +11948,8 @@ BI.MultiSelectCheckSelectedButton = BI.inherit(BI.Single, {
hgap: 4, hgap: 4,
text: "0", text: "0",
textAlign: "center", textAlign: "center",
textHeight: 15 textHeight: 16,
cls: "bi-high-light-background count-tip"
}); });
this.numberCounter.on(BI.Controller.EVENT_CHANGE, function () { this.numberCounter.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);

4
src/base/formula/formulaeditor.js

@ -202,7 +202,7 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
getValue: function () { getValue: function () {
var fieldMap = this.options.fieldTextValueMap; var fieldMap = this.options.fieldTextValueMap;
return this.editor.getValue("\n", function (line) { var v = this.editor.getValue("\n", function (line) {
var rawText = line.text, value = line.text, num = 0; var rawText = line.text, value = line.text, num = 0;
value.text = rawText; value.text = rawText;
_.forEach(line.markedSpans, function (i, ms) { _.forEach(line.markedSpans, function (i, ms) {
@ -217,7 +217,7 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
break; break;
} }
}); });
return value; return v.replaceAll("(\\$\\{.*?\\})\\s", "$1");
}); });
}, },

1
src/base/single/button/buttons/button.icon.js

@ -32,6 +32,7 @@ BI.IconButton = BI.inherit(BI.BasicButton, {
items: [this.icon] items: [this.icon]
}); });
} else { } else {
this.element.css("lineHeight", "1");
BI.createWidget({ BI.createWidget({
element: this, element: this,
type: "bi.center_adapt", type: "bi.center_adapt",

2
src/case/colorchooser/colorchooser.js

@ -52,7 +52,7 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
}] }]
}, o.popup), }, o.popup),
stopPropagation: false, stopPropagation: false,
width: 202 width: 230
}, },
value: o.value value: o.value
}); });

45
src/case/colorchooser/colorchooser.popup.js

@ -9,7 +9,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
props: { props: {
baseCls: "bi-color-chooser-popup", baseCls: "bi-color-chooser-popup",
width: 200, width: 230,
height: 145 height: 145
}, },
@ -17,7 +17,9 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
var self = this, o = this.options; var self = this, o = this.options;
this.colorEditor = BI.createWidget(o.editor, { this.colorEditor = BI.createWidget(o.editor, {
type: "bi.color_picker_editor", type: "bi.color_picker_editor",
value: o.value value: o.value,
cls: "bi-background bi-border-bottom",
height: 30
}); });
this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE, function () { this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE, function () {
@ -52,8 +54,8 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
value: "", value: "",
disabled: true disabled: true
}]], }]],
width: 190, width: 210,
height: 25, height: 24,
value: o.value value: o.value
}); });
this.storeColors.on(BI.ColorPicker.EVENT_CHANGE, function () { this.storeColors.on(BI.ColorPicker.EVENT_CHANGE, function () {
@ -63,7 +65,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.colorPicker = BI.createWidget({ this.colorPicker = BI.createWidget({
type: "bi.color_picker", type: "bi.color_picker",
width: 190, width: 210,
height: 50, height: 50,
value: o.value value: o.value
}); });
@ -98,7 +100,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
type: "bi.text_item", type: "bi.text_item",
cls: "color-chooser-popup-more bi-list-item", cls: "color-chooser-popup-more bi-list-item",
textAlign: "center", textAlign: "center",
height: 20, height: 24,
text: BI.i18nText("BI-Basic_More") + "..." text: BI.i18nText("BI-Basic_More") + "..."
}, },
popup: panel popup: panel
@ -125,43 +127,32 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
items: [{ items: [{
el: { el: {
type: "bi.vtape", type: "bi.vtape",
items: [{ items: [this.colorEditor, {
el: {
type: "bi.absolute",
cls: "bi-background bi-border-bottom",
items: [{
el: this.colorEditor,
left: 0,
right: 0,
top: 5
}]
},
height: 30
}, {
el: { el: {
type: "bi.absolute", type: "bi.absolute",
items: [{ items: [{
el: this.storeColors, el: this.storeColors,
left: 5, left: 10,
right: 5, right: 10,
top: 5 top: 5
}] }]
}, },
height: 30 height: 29
}, { }, {
el: { el: {
type: "bi.absolute", type: "bi.absolute",
items: [{ items: [{
el: this.colorPicker, el: this.colorPicker,
left: 5, left: 10,
right: 5, right: 10,
top: 5 top: 5,
bottom: 5
}] }]
}, },
height: 65 height: 60
}, { }, {
el: this.more, el: this.more,
height: 20 height: 24
}] }]
}, },
left: 0, left: 0,

83
src/case/colorchooser/colorpicker/editor.colorpicker.js

@ -11,7 +11,7 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
return BI.extend(BI.ColorPickerEditor.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.ColorPickerEditor.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-color-picker-editor", baseCls: "bi-color-picker-editor",
// width: 200, // width: 200,
height: 20 height: 30
}); });
}, },
@ -22,12 +22,13 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
this.colorShow = BI.createWidget({ this.colorShow = BI.createWidget({
type: "bi.layout", type: "bi.layout",
cls: "color-picker-editor-display bi-card", cls: "color-picker-editor-display bi-card",
height: 20 height: 16,
width: 16
}); });
var RGB = BI.createWidgets(BI.createItems([{text: "R"}, {text: "G"}, {text: "B"}], { var RGB = BI.createWidgets(BI.createItems([{text: "R"}, {text: "G"}, {text: "B"}], {
type: "bi.label", type: "bi.label",
cls: "color-picker-editor-label", cls: "color-picker-editor-label",
width: 10, width: 20,
height: 20 height: 20
})); }));
@ -60,8 +61,8 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
this.none = BI.createWidget({ this.none = BI.createWidget({
type: "bi.icon_button", type: "bi.icon_button",
cls: "auto-color-icon", cls: "auto-color-icon",
width: 16, width: 24,
height: 16, height: 24,
iconWidth: 16, iconWidth: 16,
iconHeight: 16, iconHeight: 16,
title: BI.i18nText("BI-Basic_Auto") title: BI.i18nText("BI-Basic_Auto")
@ -82,8 +83,8 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
this.transparent = BI.createWidget({ this.transparent = BI.createWidget({
type: "bi.icon_button", type: "bi.icon_button",
cls: "trans-color-icon", cls: "trans-color-icon",
width: 16, width: 24,
height: 16, height: 24,
iconWidth: 16, iconWidth: 16,
iconHeight: 16, iconHeight: 16,
title: BI.i18nText("BI-Transparent_Color") title: BI.i18nText("BI-Transparent_Color")
@ -106,44 +107,44 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
}); });
BI.createWidget({ BI.createWidget({
type: "bi.htape", type: "bi.absolute",
element: this, element: this,
items: [{ items: [{
el: this.colorShow,
width: "fill"
}, {
el: RGB[0],
lgap: 10,
width: 16
}, {
el: this.R,
width: 32
}, {
el: RGB[1],
lgap: 10,
width: 16
}, {
el: this.G,
width: 32
}, {
el: RGB[2],
lgap: 10,
width: 16
}, {
el: this.B,
width: 32
}, {
el: {
type: "bi.center_adapt",
items: [this.none]
},
width: 18
}, {
el: { el: {
type: "bi.center_adapt", type: "bi.vertical_adapt",
items: [this.transparent] items: [{
el: this.colorShow,
width: 16
}, {
el: RGB[0],
width: 20
}, {
el: this.R,
width: 30
}, {
el: RGB[1],
width: 20
}, {
el: this.G,
width: 30
}, {
el: RGB[2],
width: 20
}, {
el: this.B,
width: 30
}, {
el: this.transparent,
width: 24
}, {
el: this.none,
width: 24
}]
}, },
width: 18 left: 10,
right: 20,
top: 0,
bottom: 0
}] }]
}); });
}, },

24
src/case/colorchooser/colorpicker/editor.colorpicker.simple.js

@ -21,12 +21,13 @@ BI.SimpleColorPickerEditor = BI.inherit(BI.Widget, {
this.colorShow = BI.createWidget({ this.colorShow = BI.createWidget({
type: "bi.layout", type: "bi.layout",
cls: "color-picker-editor-display bi-card", cls: "color-picker-editor-display bi-card",
height: 20 height: 20,
width: 40
}); });
var RGB = BI.createWidgets(BI.createItems([{text: "R"}, {text: "G"}, {text: "B"}], { var RGB = BI.createWidgets(BI.createItems([{text: "R"}, {text: "G"}, {text: "B"}], {
type: "bi.label", type: "bi.label",
cls: "color-picker-editor-label", cls: "color-picker-editor-label",
width: 10, width: 20,
height: 20 height: 20
})); }));
@ -56,34 +57,31 @@ BI.SimpleColorPickerEditor = BI.inherit(BI.Widget, {
this.B = Ws[2]; this.B = Ws[2];
BI.createWidget({ BI.createWidget({
type: "bi.htape", type: "bi.vertical_adapt",
element: this, element: this,
items: [{ items: [{
el: this.colorShow, el: this.colorShow,
width: 40,
lgap: 5, lgap: 5,
rgap: 5 rgap: 5
}, { }, {
el: RGB[0], el: RGB[0],
lgap: 10, width: 20
width: 16
}, { }, {
el: this.R, el: this.R,
width: 36 width: 30
}, { }, {
el: RGB[1], el: RGB[1],
lgap: 10, width: 20
width: 16
}, { }, {
el: this.G, el: this.G,
width: 36 width: 30
}, { }, {
el: RGB[2], el: RGB[2],
lgap: 10, width: 20
width: 16
}, { }, {
el: this.B, el: this.B,
width: 36, width: 30
rgap: 10
}] }]
}); });
}, },

3
src/css/base/colorchooser/colorpicker/editor.css

@ -2,7 +2,4 @@
-webkit-border-radius: 2px; -webkit-border-radius: 2px;
-moz-border-radius: 2px; -moz-border-radius: 2px;
border-radius: 2px; border-radius: 2px;
box-shadow: 0px 0px 2px 1px #d4dadd inset;
-webkit-box-shadow: 0px 0px 2px 1px #d4dadd inset;
-moz-box-shadow: 0px 0px 2px 1px #d4dadd inset;
} }

6
src/css/widget/multiselect/trigger/button.css

@ -1,3 +1,9 @@
.bi-multi-select-check-selected-button { .bi-multi-select-check-selected-button {
z-index: 1; z-index: 1;
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
border-radius: 8px;
}
.bi-multi-select-check-selected-button .count-tip {
min-width: 16px;
} }

1
src/less/base/colorchooser/colorpicker/editor.colorpicker.less

@ -3,6 +3,5 @@
.bi-color-picker-editor { .bi-color-picker-editor {
& .color-picker-editor-display { & .color-picker-editor-display {
.border-radius(2px); .border-radius(2px);
.box-shadow(0px, 0px, 2px, 1px, @color-bi-background-dark, inset);
} }
} }

4
src/less/widget/multiselect/trigger/button.checkselected.less

@ -2,4 +2,8 @@
.bi-multi-select-check-selected-button { .bi-multi-select-check-selected-button {
z-index: 1; z-index: 1;
.border-radius(8px);
& .count-tip{
min-width: 16px;
}
} }

4
src/widget/dynamicdate/dynamicdate.trigger.js

@ -17,6 +17,7 @@ BI.DynamicDateTrigger = BI.inherit(BI.Trigger, {
_init: function () { _init: function () {
BI.DynamicDateTrigger.superclass._init.apply(this, arguments); BI.DynamicDateTrigger.superclass._init.apply(this, arguments);
var self = this, o = this.options, c = this._const; var self = this, o = this.options, c = this._const;
this.storeTriggerValue = "";
this.editor = BI.createWidget({ this.editor = BI.createWidget({
type: "bi.sign_editor", type: "bi.sign_editor",
height: o.height, height: o.height,
@ -66,6 +67,7 @@ BI.DynamicDateTrigger = BI.inherit(BI.Trigger, {
self.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN); self.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN);
}); });
this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {
self.storeTriggerValue = self.getKey();
self.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS); self.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS);
}); });
this.editor.on(BI.SignEditor.EVENT_STOP, function () { this.editor.on(BI.SignEditor.EVENT_STOP, function () {
@ -83,7 +85,7 @@ BI.DynamicDateTrigger = BI.inherit(BI.Trigger, {
self.editor.setState(value); self.editor.setState(value);
} }
if (BI.isNotEmptyString(value)) { if (BI.isNotEmptyString(value) && !BI.isEqual(self.storeTriggerValue, self.getKey())) {
var date = value.split("-"); var date = value.split("-");
self.storeValue = { self.storeValue = {
type: BI.DynamicDateCombo.Static, type: BI.DynamicDateCombo.Static,

4
src/widget/dynamicdatetime/dynamicdatetime.trigger.js

@ -17,6 +17,7 @@ BI.DynamicDateTimeTrigger = BI.inherit(BI.Trigger, {
_init: function () { _init: function () {
BI.DynamicDateTimeTrigger.superclass._init.apply(this, arguments); BI.DynamicDateTimeTrigger.superclass._init.apply(this, arguments);
var self = this, o = this.options, c = this._const; var self = this, o = this.options, c = this._const;
this.storeTriggerValue = "";
this.editor = BI.createWidget({ this.editor = BI.createWidget({
type: "bi.sign_editor", type: "bi.sign_editor",
height: o.height, height: o.height,
@ -66,6 +67,7 @@ BI.DynamicDateTimeTrigger = BI.inherit(BI.Trigger, {
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN); self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN);
}); });
this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {
self.storeTriggerValue = self.getKey();
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS); self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS);
}); });
this.editor.on(BI.SignEditor.EVENT_STOP, function () { this.editor.on(BI.SignEditor.EVENT_STOP, function () {
@ -83,7 +85,7 @@ BI.DynamicDateTimeTrigger = BI.inherit(BI.Trigger, {
self.editor.setState(value); self.editor.setState(value);
} }
if (BI.isNotEmptyString(value)) { if (BI.isNotEmptyString(value) && !BI.isEqual(self.storeTriggerValue, self.getKey())) {
var date = value.split(/-|\s|:/); var date = value.split(/-|\s|:/);
self.storeValue = { self.storeValue = {
type: BI.DynamicDateCombo.Static, type: BI.DynamicDateCombo.Static,

1
src/widget/multiselect/multiselect.loader.js

@ -111,6 +111,7 @@ BI.MultiSelectLoader = BI.inherit(BI.Widget, {
return BI.createItems(items, { return BI.createItems(items, {
type: "bi.multi_select_item", type: "bi.multi_select_item",
logic: this.options.logic, logic: this.options.logic,
cls: "bi-list-item-active",
height: 24, height: 24,
selected: this.isAllSelected() selected: this.isAllSelected()
}); });

5
src/widget/multiselect/trigger/button.checkselected.js

@ -8,7 +8,7 @@ BI.MultiSelectCheckSelectedButton = BI.inherit(BI.Single, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.MultiSelectCheckSelectedButton.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.MultiSelectCheckSelectedButton.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-select-check-selected-button bi-high-light", baseCls: "bi-multi-select-check-selected-button",
itemsCreator: BI.emptyFn itemsCreator: BI.emptyFn
}); });
}, },
@ -22,7 +22,8 @@ BI.MultiSelectCheckSelectedButton = BI.inherit(BI.Single, {
hgap: 4, hgap: 4,
text: "0", text: "0",
textAlign: "center", textAlign: "center",
textHeight: 15 textHeight: 16,
cls: "bi-high-light-background count-tip"
}); });
this.numberCounter.on(BI.Controller.EVENT_CHANGE, function () { this.numberCounter.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);

Loading…
Cancel
Save