Browse Source

Merge pull request #377 in FUI/fineui from ~WINDY/fui:master to master

* commit 'f79e531dcc7cda436443a41b39e08affe81ae6c5':
  update
  update
  BI-18963
  BI-18672
es6
guy 7 years ago
parent
commit
7b9e432862
  1. 2
      demo/js/base/editor/demo.editor.js
  2. 62
      dist/_fineui.min.js
  3. 4
      dist/base.css
  4. 1
      dist/base.js
  5. 16
      dist/bundle.css
  6. 48
      dist/bundle.js
  7. 2
      dist/bundle.min.css
  8. 34
      dist/bundle.min.js
  9. 2
      dist/case.js
  10. 10
      dist/core.css
  11. 10
      dist/core_without_normalize.css
  12. 2
      dist/demo.js
  13. 16
      dist/fineui.css
  14. 48
      dist/fineui.js
  15. 2
      dist/fineui.min.css
  16. 62
      dist/fineui.min.js
  17. 2
      dist/widget.css
  18. 45
      dist/widget.js
  19. 1
      src/base/single/editor/editor.js
  20. 2
      src/case/richeditor/richeditor.js
  21. 4
      src/css/base/single/button/button.css
  22. 10
      src/css/core/utils/common.css
  23. 2
      src/css/widget/filter/abstractitem/filter.css
  24. 6
      src/less/core/utils/common.less
  25. 2
      src/less/lib/constant.less
  26. 4
      src/widget/singleslider/button/editor.sign.text.js
  27. 33
      src/widget/yearmonth/trigger.yearmonth.js
  28. 8
      src/widget/yearmonthinterval/yearmonthinterval.js

2
demo/js/base/editor/demo.editor.js

@ -5,7 +5,7 @@ Demo.Editor = BI.inherit(BI.Widget, {
render: function () { render: function () {
var editor1 = BI.createWidget({ var editor1 = BI.createWidget({
type: "bi.editor", type: "bi.editor",
cls: "mvc-border", cls: "bi-border",
watermark: "alert信息显示在下面", watermark: "alert信息显示在下面",
errorText: "字段不可重名!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!", errorText: "字段不可重名!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!",
width: 200, width: 200,

62
dist/_fineui.min.js vendored

File diff suppressed because one or more lines are too long

4
dist/base.css vendored

@ -1003,7 +1003,7 @@ body .bi-button,
-webkit-border-radius: 2px; -webkit-border-radius: 2px;
-moz-border-radius: 2px; -moz-border-radius: 2px;
border-radius: 2px; border-radius: 2px;
border: 1px solid #178cdf; border: 1px solid #3685f2;
background-color: #3f8ce8; background-color: #3f8ce8;
text-align: center; text-align: center;
vertical-align: middle; vertical-align: middle;
@ -1069,7 +1069,7 @@ body .bi-button.button-common.ghost:active,
body .bi-button.button-ignore, body .bi-button.button-ignore,
#body .bi-button.button-ignore { #body .bi-button.button-ignore {
background-color: #ffffff; background-color: #ffffff;
border-color: #178cdf; border-color: #3685f2;
} }
body .bi-button.button-ignore, body .bi-button.button-ignore,
#body .bi-button.button-ignore, #body .bi-button.button-ignore,

1
dist/base.js vendored

@ -18398,6 +18398,7 @@ BI.Editor = BI.inherit(BI.Single, {
element: this, element: this,
items: items items: items
}); });
this.element[0].tabIndex = -1;
this.editor.on(BI.Controller.EVENT_CHANGE, function () { this.editor.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
}); });

16
dist/bundle.css vendored

@ -394,6 +394,12 @@ textarea {
.bi-border { .bi-border {
border: 1px solid #d4dadd; border: 1px solid #d4dadd;
} }
.bi-border.bi-editor-focus {
border: 1px solid #3685f2;
}
.bi-border.niceditor-focus {
border: 1px solid #3685f2;
}
.bi-theme-dark .bi-border { .bi-theme-dark .bi-border {
border: 1px solid #525466; border: 1px solid #525466;
} }
@ -450,7 +456,7 @@ textarea {
color: #ffffff; color: #ffffff;
} }
.bi-high-light-border { .bi-high-light-border {
border-color: #178cdf; border-color: #3685f2;
} }
.bi-water-mark { .bi-water-mark {
color: #cccccc; color: #cccccc;
@ -578,7 +584,7 @@ textarea {
} }
.bi-list-item-border:active, .bi-list-item-border:active,
.bi-list-item-border.active { .bi-list-item-border.active {
border: 1px solid #178cdf; border: 1px solid #3685f2;
} }
.bi-list-item-simple:hover, .bi-list-item-simple:hover,
.bi-list-item-simple.hover { .bi-list-item-simple.hover {
@ -3049,7 +3055,7 @@ body .bi-button,
-webkit-border-radius: 2px; -webkit-border-radius: 2px;
-moz-border-radius: 2px; -moz-border-radius: 2px;
border-radius: 2px; border-radius: 2px;
border: 1px solid #178cdf; border: 1px solid #3685f2;
background-color: #3f8ce8; background-color: #3f8ce8;
text-align: center; text-align: center;
vertical-align: middle; vertical-align: middle;
@ -3115,7 +3121,7 @@ body .bi-button.button-common.ghost:active,
body .bi-button.button-ignore, body .bi-button.button-ignore,
#body .bi-button.button-ignore { #body .bi-button.button-ignore {
background-color: #ffffff; background-color: #ffffff;
border-color: #178cdf; border-color: #3685f2;
} }
body .bi-button.button-ignore, body .bi-button.button-ignore,
#body .bi-button.button-ignore, #body .bi-button.button-ignore,
@ -4597,7 +4603,7 @@ ul.ztree.zTreeDragUL {
color: #999999; color: #999999;
} }
.bi-filter-item .filter-item-empty-item .empty-filter-item-leaf { .bi-filter-item .filter-item-empty-item .empty-filter-item-leaf {
border: 1px dashed #178cdf; border: 1px dashed #3685f2;
background: #eaf2fd; background: #eaf2fd;
} }
.bi-filter-expander { .bi-filter-expander {

48
dist/bundle.js vendored

@ -54164,6 +54164,7 @@ BI.Editor = BI.inherit(BI.Single, {
element: this, element: this,
items: items items: items
}); });
this.element[0].tabIndex = -1;
this.editor.on(BI.Controller.EVENT_CHANGE, function () { this.editor.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
}); });
@ -83997,11 +83998,13 @@ BI.RichEditor = BI.inherit(BI.Widget, {
listeners: [{ listeners: [{
eventName: BI.NicEditor.EVENT_BLUR, eventName: BI.NicEditor.EVENT_BLUR,
action: function () { action: function () {
self.element.removeClass("bi-editor-focus");
self.fireEvent(BI.RichEditor.EVENT_CONFIRM); self.fireEvent(BI.RichEditor.EVENT_CONFIRM);
} }
}, { }, {
eventName: BI.NicEditor.EVENT_FOCUS, eventName: BI.NicEditor.EVENT_FOCUS,
action: function () { action: function () {
self.element.addClass("bi-editor-focus");
if (!o.readOnly && !self.combo.isViewVisible()) { if (!o.readOnly && !self.combo.isViewVisible()) {
self.combo.showView(); self.combo.showView();
} }
@ -106222,7 +106225,9 @@ BI.SignTextEditor = BI.inherit(BI.Widget, {
this.text = BI.createWidget({ this.text = BI.createWidget({
type: "bi.text_button", type: "bi.text_button",
cls: "sign-editor-text", cls: "sign-editor-text",
title: o.title, title: function () {
return self.getValue();
},
warningTitle: o.warningTitle, warningTitle: o.warningTitle,
tipType: o.tipType, tipType: o.tipType,
textAlign: "left", textAlign: "left",
@ -109309,6 +109314,12 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
height: 24 height: 24
}, },
beforeInit: function (callback) {
var o = this.options;
o.title = BI.bind(this._titleCreator, this);
callback();
},
_init: function () { _init: function () {
BI.DynamicYearMonthTrigger.superclass._init.apply(this, arguments); BI.DynamicYearMonthTrigger.superclass._init.apply(this, arguments);
var o = this.options; var o = this.options;
@ -109416,6 +109427,27 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
return editor; return editor;
}, },
_titleCreator: function () {
var storeValue = this.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
if(!this.monthEditor.isValid() || !this.yearEditor.isValid()) {
return "";
}
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = this._getText(value);
var date = BI.getDate();
date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = date.print("%Y-%x");
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
value = value || {};
return this._getStaticTitle(value);
}
},
_doEditorConfirm: function (editor) { _doEditorConfirm: function (editor) {
var value = editor.getValue(); var value = editor.getValue();
if (BI.isNotNull(value)) { if (BI.isNotNull(value)) {
@ -109429,7 +109461,6 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
month: BI.isEmptyString(this.monthEditor.getValue()) ? "" : monthValue month: BI.isEmptyString(this.monthEditor.getValue()) ? "" : monthValue
} }
}; };
this.setTitle(this._getStaticTitle(this.storeValue.value));
}, },
_yearCheck: function (v) { _yearCheck: function (v) {
@ -109460,10 +109491,8 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
}, },
_setInnerValue: function (date, text) { _setInnerValue: function (date, text) {
var dateStr = date.print("%Y-%x");
this.yearEditor.setValue(date.getFullYear()); this.yearEditor.setValue(date.getFullYear());
this.monthEditor.setValue(date.getMonth() + 1); this.monthEditor.setValue(date.getMonth() + 1);
this.setTitle(BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr));
}, },
_getStaticTitle: function (value) { _getStaticTitle: function (value) {
@ -109492,10 +109521,7 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
value = value || {}; value = value || {};
var month = BI.isNull(value.month) ? null : value.month; var month = BI.isNull(value.month) ? null : value.month;
this.yearEditor.setValue(value.year); this.yearEditor.setValue(value.year);
this.yearEditor.setTitle(value.year);
this.monthEditor.setValue(month); this.monthEditor.setValue(month);
this.monthEditor.setTitle(month);
this.setTitle(this._getStaticTitle(value));
break; break;
} }
}, },
@ -109685,14 +109711,10 @@ BI.shortcut("bi.dynamic_year_month_trigger", BI.DynamicYearMonthTrigger);BI.Year
return BI.isNotNull(smallDate) && BI.isNotNull(bigDate) && smallDate > bigDate; return BI.isNotNull(smallDate) && BI.isNotNull(bigDate) && smallDate > bigDate;
}, },
_setTitle: function (v) { _setTitle: function (v) {
this.left.setTitle(v); this.setTitle(v);
this.right.setTitle(v);
this.label.setTitle(v);
}, },
_clearTitle: function () { _clearTitle: function () {
this.left.setTitle(""); this.setTitle("");
this.right.setTitle("");
this.label.setTitle("");
}, },
setValue: function (date) { setValue: function (date) {
date = date || {}; date = date || {};

2
dist/bundle.min.css vendored

File diff suppressed because one or more lines are too long

34
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/case.js vendored

@ -11542,11 +11542,13 @@ BI.RichEditor = BI.inherit(BI.Widget, {
listeners: [{ listeners: [{
eventName: BI.NicEditor.EVENT_BLUR, eventName: BI.NicEditor.EVENT_BLUR,
action: function () { action: function () {
self.element.removeClass("bi-editor-focus");
self.fireEvent(BI.RichEditor.EVENT_CONFIRM); self.fireEvent(BI.RichEditor.EVENT_CONFIRM);
} }
}, { }, {
eventName: BI.NicEditor.EVENT_FOCUS, eventName: BI.NicEditor.EVENT_FOCUS,
action: function () { action: function () {
self.element.addClass("bi-editor-focus");
if (!o.readOnly && !self.combo.isViewVisible()) { if (!o.readOnly && !self.combo.isViewVisible()) {
self.combo.showView(); self.combo.showView();
} }

10
dist/core.css vendored

@ -394,6 +394,12 @@ textarea {
.bi-border { .bi-border {
border: 1px solid #d4dadd; border: 1px solid #d4dadd;
} }
.bi-border.bi-editor-focus {
border: 1px solid #3685f2;
}
.bi-border.niceditor-focus {
border: 1px solid #3685f2;
}
.bi-theme-dark .bi-border { .bi-theme-dark .bi-border {
border: 1px solid #525466; border: 1px solid #525466;
} }
@ -450,7 +456,7 @@ textarea {
color: #ffffff; color: #ffffff;
} }
.bi-high-light-border { .bi-high-light-border {
border-color: #178cdf; border-color: #3685f2;
} }
.bi-water-mark { .bi-water-mark {
color: #cccccc; color: #cccccc;
@ -578,7 +584,7 @@ textarea {
} }
.bi-list-item-border:active, .bi-list-item-border:active,
.bi-list-item-border.active { .bi-list-item-border.active {
border: 1px solid #178cdf; border: 1px solid #3685f2;
} }
.bi-list-item-simple:hover, .bi-list-item-simple:hover,
.bi-list-item-simple.hover { .bi-list-item-simple.hover {

10
dist/core_without_normalize.css vendored

@ -116,6 +116,12 @@ textarea {
.bi-border { .bi-border {
border: 1px solid #d4dadd; border: 1px solid #d4dadd;
} }
.bi-border.bi-editor-focus {
border: 1px solid #3685f2;
}
.bi-border.niceditor-focus {
border: 1px solid #3685f2;
}
.bi-theme-dark .bi-border { .bi-theme-dark .bi-border {
border: 1px solid #525466; border: 1px solid #525466;
} }
@ -172,7 +178,7 @@ textarea {
color: #ffffff; color: #ffffff;
} }
.bi-high-light-border { .bi-high-light-border {
border-color: #178cdf; border-color: #3685f2;
} }
.bi-water-mark { .bi-water-mark {
color: #cccccc; color: #cccccc;
@ -300,7 +306,7 @@ textarea {
} }
.bi-list-item-border:active, .bi-list-item-border:active,
.bi-list-item-border.active { .bi-list-item-border.active {
border: 1px solid #178cdf; border: 1px solid #3685f2;
} }
.bi-list-item-simple:hover, .bi-list-item-simple:hover,
.bi-list-item-simple.hover { .bi-list-item-simple.hover {

2
dist/demo.js vendored

@ -717,7 +717,7 @@ BI.shortcut("demo.code_editor", Demo.CodeEditor);Demo.Editor = BI.inherit(BI.Wid
render: function () { render: function () {
var editor1 = BI.createWidget({ var editor1 = BI.createWidget({
type: "bi.editor", type: "bi.editor",
cls: "mvc-border", cls: "bi-border",
watermark: "alert信息显示在下面", watermark: "alert信息显示在下面",
errorText: "字段不可重名!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!", errorText: "字段不可重名!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!",
width: 200, width: 200,

16
dist/fineui.css vendored

@ -394,6 +394,12 @@ textarea {
.bi-border { .bi-border {
border: 1px solid #d4dadd; border: 1px solid #d4dadd;
} }
.bi-border.bi-editor-focus {
border: 1px solid #3685f2;
}
.bi-border.niceditor-focus {
border: 1px solid #3685f2;
}
.bi-theme-dark .bi-border { .bi-theme-dark .bi-border {
border: 1px solid #525466; border: 1px solid #525466;
} }
@ -450,7 +456,7 @@ textarea {
color: #ffffff; color: #ffffff;
} }
.bi-high-light-border { .bi-high-light-border {
border-color: #178cdf; border-color: #3685f2;
} }
.bi-water-mark { .bi-water-mark {
color: #cccccc; color: #cccccc;
@ -578,7 +584,7 @@ textarea {
} }
.bi-list-item-border:active, .bi-list-item-border:active,
.bi-list-item-border.active { .bi-list-item-border.active {
border: 1px solid #178cdf; border: 1px solid #3685f2;
} }
.bi-list-item-simple:hover, .bi-list-item-simple:hover,
.bi-list-item-simple.hover { .bi-list-item-simple.hover {
@ -3049,7 +3055,7 @@ body .bi-button,
-webkit-border-radius: 2px; -webkit-border-radius: 2px;
-moz-border-radius: 2px; -moz-border-radius: 2px;
border-radius: 2px; border-radius: 2px;
border: 1px solid #178cdf; border: 1px solid #3685f2;
background-color: #3f8ce8; background-color: #3f8ce8;
text-align: center; text-align: center;
vertical-align: middle; vertical-align: middle;
@ -3115,7 +3121,7 @@ body .bi-button.button-common.ghost:active,
body .bi-button.button-ignore, body .bi-button.button-ignore,
#body .bi-button.button-ignore { #body .bi-button.button-ignore {
background-color: #ffffff; background-color: #ffffff;
border-color: #178cdf; border-color: #3685f2;
} }
body .bi-button.button-ignore, body .bi-button.button-ignore,
#body .bi-button.button-ignore, #body .bi-button.button-ignore,
@ -4597,7 +4603,7 @@ ul.ztree.zTreeDragUL {
color: #999999; color: #999999;
} }
.bi-filter-item .filter-item-empty-item .empty-filter-item-leaf { .bi-filter-item .filter-item-empty-item .empty-filter-item-leaf {
border: 1px dashed #178cdf; border: 1px dashed #3685f2;
background: #eaf2fd; background: #eaf2fd;
} }
.bi-filter-expander { .bi-filter-expander {

48
dist/fineui.js vendored

@ -54407,6 +54407,7 @@ BI.Editor = BI.inherit(BI.Single, {
element: this, element: this,
items: items items: items
}); });
this.element[0].tabIndex = -1;
this.editor.on(BI.Controller.EVENT_CHANGE, function () { this.editor.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
}); });
@ -84240,11 +84241,13 @@ BI.RichEditor = BI.inherit(BI.Widget, {
listeners: [{ listeners: [{
eventName: BI.NicEditor.EVENT_BLUR, eventName: BI.NicEditor.EVENT_BLUR,
action: function () { action: function () {
self.element.removeClass("bi-editor-focus");
self.fireEvent(BI.RichEditor.EVENT_CONFIRM); self.fireEvent(BI.RichEditor.EVENT_CONFIRM);
} }
}, { }, {
eventName: BI.NicEditor.EVENT_FOCUS, eventName: BI.NicEditor.EVENT_FOCUS,
action: function () { action: function () {
self.element.addClass("bi-editor-focus");
if (!o.readOnly && !self.combo.isViewVisible()) { if (!o.readOnly && !self.combo.isViewVisible()) {
self.combo.showView(); self.combo.showView();
} }
@ -106465,7 +106468,9 @@ BI.SignTextEditor = BI.inherit(BI.Widget, {
this.text = BI.createWidget({ this.text = BI.createWidget({
type: "bi.text_button", type: "bi.text_button",
cls: "sign-editor-text", cls: "sign-editor-text",
title: o.title, title: function () {
return self.getValue();
},
warningTitle: o.warningTitle, warningTitle: o.warningTitle,
tipType: o.tipType, tipType: o.tipType,
textAlign: "left", textAlign: "left",
@ -109552,6 +109557,12 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
height: 24 height: 24
}, },
beforeInit: function (callback) {
var o = this.options;
o.title = BI.bind(this._titleCreator, this);
callback();
},
_init: function () { _init: function () {
BI.DynamicYearMonthTrigger.superclass._init.apply(this, arguments); BI.DynamicYearMonthTrigger.superclass._init.apply(this, arguments);
var o = this.options; var o = this.options;
@ -109659,6 +109670,27 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
return editor; return editor;
}, },
_titleCreator: function () {
var storeValue = this.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
if(!this.monthEditor.isValid() || !this.yearEditor.isValid()) {
return "";
}
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = this._getText(value);
var date = BI.getDate();
date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = date.print("%Y-%x");
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
value = value || {};
return this._getStaticTitle(value);
}
},
_doEditorConfirm: function (editor) { _doEditorConfirm: function (editor) {
var value = editor.getValue(); var value = editor.getValue();
if (BI.isNotNull(value)) { if (BI.isNotNull(value)) {
@ -109672,7 +109704,6 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
month: BI.isEmptyString(this.monthEditor.getValue()) ? "" : monthValue month: BI.isEmptyString(this.monthEditor.getValue()) ? "" : monthValue
} }
}; };
this.setTitle(this._getStaticTitle(this.storeValue.value));
}, },
_yearCheck: function (v) { _yearCheck: function (v) {
@ -109703,10 +109734,8 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
}, },
_setInnerValue: function (date, text) { _setInnerValue: function (date, text) {
var dateStr = date.print("%Y-%x");
this.yearEditor.setValue(date.getFullYear()); this.yearEditor.setValue(date.getFullYear());
this.monthEditor.setValue(date.getMonth() + 1); this.monthEditor.setValue(date.getMonth() + 1);
this.setTitle(BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr));
}, },
_getStaticTitle: function (value) { _getStaticTitle: function (value) {
@ -109735,10 +109764,7 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
value = value || {}; value = value || {};
var month = BI.isNull(value.month) ? null : value.month; var month = BI.isNull(value.month) ? null : value.month;
this.yearEditor.setValue(value.year); this.yearEditor.setValue(value.year);
this.yearEditor.setTitle(value.year);
this.monthEditor.setValue(month); this.monthEditor.setValue(month);
this.monthEditor.setTitle(month);
this.setTitle(this._getStaticTitle(value));
break; break;
} }
}, },
@ -109928,14 +109954,10 @@ BI.shortcut("bi.dynamic_year_month_trigger", BI.DynamicYearMonthTrigger);BI.Year
return BI.isNotNull(smallDate) && BI.isNotNull(bigDate) && smallDate > bigDate; return BI.isNotNull(smallDate) && BI.isNotNull(bigDate) && smallDate > bigDate;
}, },
_setTitle: function (v) { _setTitle: function (v) {
this.left.setTitle(v); this.setTitle(v);
this.right.setTitle(v);
this.label.setTitle(v);
}, },
_clearTitle: function () { _clearTitle: function () {
this.left.setTitle(""); this.setTitle("");
this.right.setTitle("");
this.label.setTitle("");
}, },
setValue: function (date) { setValue: function (date) {
date = date || {}; date = date || {};

2
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

62
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/widget.css vendored

@ -108,7 +108,7 @@
color: #999999; color: #999999;
} }
.bi-filter-item .filter-item-empty-item .empty-filter-item-leaf { .bi-filter-item .filter-item-empty-item .empty-filter-item-leaf {
border: 1px dashed #178cdf; border: 1px dashed #3685f2;
background: #eaf2fd; background: #eaf2fd;
} }
.bi-filter-expander { .bi-filter-expander {

45
dist/widget.js vendored

@ -18754,7 +18754,9 @@ BI.SignTextEditor = BI.inherit(BI.Widget, {
this.text = BI.createWidget({ this.text = BI.createWidget({
type: "bi.text_button", type: "bi.text_button",
cls: "sign-editor-text", cls: "sign-editor-text",
title: o.title, title: function () {
return self.getValue();
},
warningTitle: o.warningTitle, warningTitle: o.warningTitle,
tipType: o.tipType, tipType: o.tipType,
textAlign: "left", textAlign: "left",
@ -21841,6 +21843,12 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
height: 24 height: 24
}, },
beforeInit: function (callback) {
var o = this.options;
o.title = BI.bind(this._titleCreator, this);
callback();
},
_init: function () { _init: function () {
BI.DynamicYearMonthTrigger.superclass._init.apply(this, arguments); BI.DynamicYearMonthTrigger.superclass._init.apply(this, arguments);
var o = this.options; var o = this.options;
@ -21948,6 +21956,27 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
return editor; return editor;
}, },
_titleCreator: function () {
var storeValue = this.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
if(!this.monthEditor.isValid() || !this.yearEditor.isValid()) {
return "";
}
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = this._getText(value);
var date = BI.getDate();
date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = date.print("%Y-%x");
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
value = value || {};
return this._getStaticTitle(value);
}
},
_doEditorConfirm: function (editor) { _doEditorConfirm: function (editor) {
var value = editor.getValue(); var value = editor.getValue();
if (BI.isNotNull(value)) { if (BI.isNotNull(value)) {
@ -21961,7 +21990,6 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
month: BI.isEmptyString(this.monthEditor.getValue()) ? "" : monthValue month: BI.isEmptyString(this.monthEditor.getValue()) ? "" : monthValue
} }
}; };
this.setTitle(this._getStaticTitle(this.storeValue.value));
}, },
_yearCheck: function (v) { _yearCheck: function (v) {
@ -21992,10 +22020,8 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
}, },
_setInnerValue: function (date, text) { _setInnerValue: function (date, text) {
var dateStr = date.print("%Y-%x");
this.yearEditor.setValue(date.getFullYear()); this.yearEditor.setValue(date.getFullYear());
this.monthEditor.setValue(date.getMonth() + 1); this.monthEditor.setValue(date.getMonth() + 1);
this.setTitle(BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr));
}, },
_getStaticTitle: function (value) { _getStaticTitle: function (value) {
@ -22024,10 +22050,7 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
value = value || {}; value = value || {};
var month = BI.isNull(value.month) ? null : value.month; var month = BI.isNull(value.month) ? null : value.month;
this.yearEditor.setValue(value.year); this.yearEditor.setValue(value.year);
this.yearEditor.setTitle(value.year);
this.monthEditor.setValue(month); this.monthEditor.setValue(month);
this.monthEditor.setTitle(month);
this.setTitle(this._getStaticTitle(value));
break; break;
} }
}, },
@ -22217,14 +22240,10 @@ BI.shortcut("bi.dynamic_year_month_trigger", BI.DynamicYearMonthTrigger);BI.Year
return BI.isNotNull(smallDate) && BI.isNotNull(bigDate) && smallDate > bigDate; return BI.isNotNull(smallDate) && BI.isNotNull(bigDate) && smallDate > bigDate;
}, },
_setTitle: function (v) { _setTitle: function (v) {
this.left.setTitle(v); this.setTitle(v);
this.right.setTitle(v);
this.label.setTitle(v);
}, },
_clearTitle: function () { _clearTitle: function () {
this.left.setTitle(""); this.setTitle("");
this.right.setTitle("");
this.label.setTitle("");
}, },
setValue: function (date) { setValue: function (date) {
date = date || {}; date = date || {};

1
src/base/single/editor/editor.js

@ -98,6 +98,7 @@ BI.Editor = BI.inherit(BI.Single, {
element: this, element: this,
items: items items: items
}); });
this.element[0].tabIndex = -1;
this.editor.on(BI.Controller.EVENT_CHANGE, function () { this.editor.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
}); });

2
src/case/richeditor/richeditor.js

@ -26,11 +26,13 @@ BI.RichEditor = BI.inherit(BI.Widget, {
listeners: [{ listeners: [{
eventName: BI.NicEditor.EVENT_BLUR, eventName: BI.NicEditor.EVENT_BLUR,
action: function () { action: function () {
self.element.removeClass("bi-editor-focus");
self.fireEvent(BI.RichEditor.EVENT_CONFIRM); self.fireEvent(BI.RichEditor.EVENT_CONFIRM);
} }
}, { }, {
eventName: BI.NicEditor.EVENT_FOCUS, eventName: BI.NicEditor.EVENT_FOCUS,
action: function () { action: function () {
self.element.addClass("bi-editor-focus");
if (!o.readOnly && !self.combo.isViewVisible()) { if (!o.readOnly && !self.combo.isViewVisible()) {
self.combo.showView(); self.combo.showView();
} }

4
src/css/base/single/button/button.css

@ -3,7 +3,7 @@ body .bi-button,
-webkit-border-radius: 2px; -webkit-border-radius: 2px;
-moz-border-radius: 2px; -moz-border-radius: 2px;
border-radius: 2px; border-radius: 2px;
border: 1px solid #178cdf; border: 1px solid #3685f2;
background-color: #3f8ce8; background-color: #3f8ce8;
text-align: center; text-align: center;
vertical-align: middle; vertical-align: middle;
@ -69,7 +69,7 @@ body .bi-button.button-common.ghost:active,
body .bi-button.button-ignore, body .bi-button.button-ignore,
#body .bi-button.button-ignore { #body .bi-button.button-ignore {
background-color: #ffffff; background-color: #ffffff;
border-color: #178cdf; border-color: #3685f2;
} }
body .bi-button.button-ignore, body .bi-button.button-ignore,
#body .bi-button.button-ignore, #body .bi-button.button-ignore,

10
src/css/core/utils/common.css

@ -116,6 +116,12 @@ textarea {
.bi-border { .bi-border {
border: 1px solid #d4dadd; border: 1px solid #d4dadd;
} }
.bi-border.bi-editor-focus {
border: 1px solid #3685f2;
}
.bi-border.niceditor-focus {
border: 1px solid #3685f2;
}
.bi-theme-dark .bi-border { .bi-theme-dark .bi-border {
border: 1px solid #525466; border: 1px solid #525466;
} }
@ -172,7 +178,7 @@ textarea {
color: #ffffff; color: #ffffff;
} }
.bi-high-light-border { .bi-high-light-border {
border-color: #178cdf; border-color: #3685f2;
} }
.bi-water-mark { .bi-water-mark {
color: #cccccc; color: #cccccc;
@ -300,7 +306,7 @@ textarea {
} }
.bi-list-item-border:active, .bi-list-item-border:active,
.bi-list-item-border.active { .bi-list-item-border.active {
border: 1px solid #178cdf; border: 1px solid #3685f2;
} }
.bi-list-item-simple:hover, .bi-list-item-simple:hover,
.bi-list-item-simple.hover { .bi-list-item-simple.hover {

2
src/css/widget/filter/abstractitem/filter.css

@ -1,4 +1,4 @@
.bi-filter-item .filter-item-empty-item .empty-filter-item-leaf { .bi-filter-item .filter-item-empty-item .empty-filter-item-leaf {
border: 1px dashed #178cdf; border: 1px dashed #3685f2;
background: #eaf2fd; background: #eaf2fd;
} }

6
src/less/core/utils/common.less

@ -135,6 +135,12 @@ textarea {
//边框 //边框
.bi-border { .bi-border {
border: 1px solid @color-bi-border-line; border: 1px solid @color-bi-border-line;
&.bi-editor-focus {
border: 1px solid @color-bi-border-highlight;
}
&.niceditor-focus {
border: 1px solid @color-bi-border-highlight;
}
} }
.bi-theme-dark { .bi-theme-dark {

2
src/less/lib/constant.less

@ -56,7 +56,7 @@
@border-color-black: #1a1a1a; @border-color-black: #1a1a1a;
@border-color-line: #d4dadd; @border-color-line: #d4dadd;
@border-color-line-theme-dark: #525466; @border-color-line-theme-dark: #525466;
@border-color-highlight: #178cdf; @border-color-highlight: #3685f2;
@border-color-warning: #fbb03b; @border-color-warning: #fbb03b;
@border-color-negative: #e85050; @border-color-negative: #e85050;

4
src/widget/singleslider/button/editor.sign.text.js

@ -44,7 +44,9 @@ BI.SignTextEditor = BI.inherit(BI.Widget, {
this.text = BI.createWidget({ this.text = BI.createWidget({
type: "bi.text_button", type: "bi.text_button",
cls: "sign-editor-text", cls: "sign-editor-text",
title: o.title, title: function () {
return self.getValue();
},
warningTitle: o.warningTitle, warningTitle: o.warningTitle,
tipType: o.tipType, tipType: o.tipType,
textAlign: "left", textAlign: "left",

33
src/widget/yearmonth/trigger.yearmonth.js

@ -11,6 +11,12 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {
height: 24 height: 24
}, },
beforeInit: function (callback) {
var o = this.options;
o.title = BI.bind(this._titleCreator, this);
callback();
},
_init: function () { _init: function () {
BI.DynamicYearMonthTrigger.superclass._init.apply(this, arguments); BI.DynamicYearMonthTrigger.superclass._init.apply(this, arguments);
var o = this.options; var o = this.options;
@ -118,6 +124,27 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {
return editor; return editor;
}, },
_titleCreator: function () {
var storeValue = this.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
if(!this.monthEditor.isValid() || !this.yearEditor.isValid()) {
return "";
}
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = this._getText(value);
var date = BI.getDate();
date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = date.print("%Y-%x");
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
value = value || {};
return this._getStaticTitle(value);
}
},
_doEditorConfirm: function (editor) { _doEditorConfirm: function (editor) {
var value = editor.getValue(); var value = editor.getValue();
if (BI.isNotNull(value)) { if (BI.isNotNull(value)) {
@ -131,7 +158,6 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {
month: BI.isEmptyString(this.monthEditor.getValue()) ? "" : monthValue month: BI.isEmptyString(this.monthEditor.getValue()) ? "" : monthValue
} }
}; };
this.setTitle(this._getStaticTitle(this.storeValue.value));
}, },
_yearCheck: function (v) { _yearCheck: function (v) {
@ -162,10 +188,8 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {
}, },
_setInnerValue: function (date, text) { _setInnerValue: function (date, text) {
var dateStr = date.print("%Y-%x");
this.yearEditor.setValue(date.getFullYear()); this.yearEditor.setValue(date.getFullYear());
this.monthEditor.setValue(date.getMonth() + 1); this.monthEditor.setValue(date.getMonth() + 1);
this.setTitle(BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr));
}, },
_getStaticTitle: function (value) { _getStaticTitle: function (value) {
@ -194,10 +218,7 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {
value = value || {}; value = value || {};
var month = BI.isNull(value.month) ? null : value.month; var month = BI.isNull(value.month) ? null : value.month;
this.yearEditor.setValue(value.year); this.yearEditor.setValue(value.year);
this.yearEditor.setTitle(value.year);
this.monthEditor.setValue(month); this.monthEditor.setValue(month);
this.monthEditor.setTitle(month);
this.setTitle(this._getStaticTitle(value));
break; break;
} }
}, },

8
src/widget/yearmonthinterval/yearmonthinterval.js

@ -164,14 +164,10 @@ BI.YearMonthInterval = BI.inherit(BI.Single, {
return BI.isNotNull(smallDate) && BI.isNotNull(bigDate) && smallDate > bigDate; return BI.isNotNull(smallDate) && BI.isNotNull(bigDate) && smallDate > bigDate;
}, },
_setTitle: function (v) { _setTitle: function (v) {
this.left.setTitle(v); this.setTitle(v);
this.right.setTitle(v);
this.label.setTitle(v);
}, },
_clearTitle: function () { _clearTitle: function () {
this.left.setTitle(""); this.setTitle("");
this.right.setTitle("");
this.label.setTitle("");
}, },
setValue: function (date) { setValue: function (date) {
date = date || {}; date = date || {};

Loading…
Cancel
Save