Browse Source

Merge pull request #65 in FUI/fineui from ~GUY/fineui:master to master

* commit '61d380d6bb24e20b929a2445b8caead8dd67951f':
  add
  update
  update
  update
  sign_initial_editor
  样式&sign inital editor title
master
guy 7 years ago
parent
commit
5ed6c2b68a
  1. 70670
      bi/base.js
  2. 25027
      bi/case.js
  3. 2
      bi/widget.js
  4. 0
      demo/js/case/editor/demo.shelter_editor.js
  5. 0
      demo/js/case/editor/demo.sign_editor.js
  6. 17
      demo/js/case/editor/demo.sign_initial_editor.js
  7. 7
      demo/js/case/editor/demo.state_editor.js
  8. 8
      demo/js/config/case.js
  9. 549
      demo/js/config/widget.js
  10. 22
      demo/js/widget/editor/demo.record_editor.js
  11. 22
      demo/js/widget/editor/demo.sign_style_editor.js
  12. BIN
      docs/background/auto-color.png
  13. BIN
      docs/background/trans-color.png
  14. 70670
      docs/base.js
  15. 25027
      docs/case.js
  16. 18515
      docs/demo.js
  17. 46
      docs/resource.css
  18. 2
      docs/widget.js
  19. 191
      src/case/editor/editor.sign.initial.js
  20. 46
      src/css/resource/font.css
  21. 6
      src/less/resource/font.less
  22. 2
      src/widget/filemanager/nav/button/button.nav.filemanager.js

70670
bi/base.js

File diff suppressed because it is too large Load Diff

25027
bi/case.js

File diff suppressed because it is too large Load Diff

2
bi/widget.js

@ -5306,7 +5306,7 @@ BI.FileManagerNavButton = BI.inherit(BI.Widget, {
_const: {
normal_color: "#ffffff",
select_color: "#f4f4f4"
select_color: "#eff1f4"
},
_defaultConfig: function () {
return BI.extend(BI.FileManagerNavButton.superclass._defaultConfig.apply(this, arguments), {

0
demo/js/widget/editor/demo.shelter_editor.js → demo/js/case/editor/demo.shelter_editor.js

0
demo/js/widget/editor/demo.sign_editor.js → demo/js/case/editor/demo.sign_editor.js

17
demo/js/widget/editor/demo.sign_initial_editor.js → demo/js/case/editor/demo.sign_initial_editor.js

@ -5,17 +5,26 @@ Demo.SignInitialEditor = BI.inherit(BI.Widget, {
props: {
baseCls: ""
},
mounted: function () {
this.editor.setValue({
value: "123",
text: "sdga"
})
},
render: function () {
var self = this;
return {
type: "bi.horizontal_adapt",
items: [{
type: "bi.sign_initial_editor",
cls:"layout-bg5",
value:"123",
text:"456",
ref: function () {
self.editor = this;
},
cls: "layout-bg5",
text: "原始值",
width: 300
}],
vgap:20
vgap: 20
}
}

7
demo/js/widget/editor/demo.state_editor.js → demo/js/case/editor/demo.state_editor.js

@ -10,12 +10,11 @@ Demo.StateEditor = BI.inherit(BI.Widget, {
type: "bi.horizontal_adapt",
items: [{
type: "bi.state_editor",
cls:"bi-border",
value:"123",
text:"456",
value: "123",
text: "456",
width: 300
}],
vgap:20
vgap: 20
}
}

8
demo/js/config/case.js

@ -6,10 +6,6 @@ Demo.CASE_CONFIG = [{
pId: 3,
id: 301,
text: "editors"
}, {
pId: 301,
text: "bi.record_editor",
value: "demo.record_editor"
}, {
pId: 301,
text: "bi.shelter_editor",
@ -18,6 +14,10 @@ Demo.CASE_CONFIG = [{
pId: 301,
text: "bi.sign_editor",
value: "demo.sign_editor"
}, {
pId: 301,
text: "bi.sign_initial_editor",
value: "demo.sign_initial_editor"
}, {
pId: 301,
text: "bi.state_editor",

549
demo/js/config/widget.js

@ -1,297 +1,256 @@
Demo.WIDGET_CONFIG = [{
id: 4,
text: "详细控件",
open: true
}, {
pId: 4,
id: 420,
text: '各种小控件',
}, {
pId: 420,
text: "各种通用按钮",
value: "demo.buttons"
}, {
pId: 420,
text: "各种提示性信息",
value: "demo.tips"
}, {
pId: 420,
text: "各种items",
value: "demo.items"
}, {
pId: 420,
text: "各种节点node",
value: "demo.nodes"
}, {
pId: 420,
text: "各种segment",
value: "demo.segments"
}, {
pId: 420,
text: "可以切换的树",
value: "demo.switch_tree"
}, {
id: 400,
pId: 4,
text: "tree"
}, {
pId: 400,
text: "bi.multi_tree_combo",
value: "demo.multi_tree_combo"
}, {
pId: 400,
text: "bi.switch_tree",
value: "demo.switch_tree"
}, {
id: 401,
pId: 4,
text: "table"
}, {
pId: 401,
text: "bi.preview_table",
value: "demo.preview_table"
}, {
pId: 401,
text: "bi.responsive_table",
value: "demo.responsive_table"
}, {
pId: 401,
text: "bi.excel_table",
value: "demo.excel_table"
}, {
pId: 4,
id: 402,
text: "年份控件",
open: false
}, {
pId: 402,
text: "bi.year_combo",
value: "demo.year"
}, {
pId: 4,
id: 403,
text: "月份控件",
open: false
}, {
pId: 403,
text: "bi.month_combo",
value: "demo.month"
}, {
pId: 4,
id: 404,
text: "季度控件",
open: false
}, {
pId: 404,
text: "bi.quarter_combo",
value: "demo.quarter"
}, {
pId: 4,
id: 405,
text: "下拉列表",
open: false
}, {
pId: 405,
text: "bi.down_list_combo",
value: "demo.down_list"
}, {
pId: 4,
id: 406,
text: "文本框控件",
open: false
}, {
pId: 406,
text: "bi.text_editor",
value: "demo.text_editor"
}, {
pId: 406,
text: "bi.search_editor",
value: "demo.search_editor"
}, {
pId: 406,
text: "bi.sign_editor",
value: "demo.sign_editor"
}, {
pId: 406,
text: "bi.sign_initial_editor",
value: "demo.sign_initial_editor"
}, {
pId: 406,
text: "bi.sign_style_editor",
value: "demo.sign_style_editor"
}, {
pId: 406,
text: "bi.state_editor",
value: "demo.state_editor"
}, {
pId: 406,
text: "bi.clear_editor",
value: "demo.clear_editor"
}, {
pId: 406,
text: "bi.record_editor",
value: "demo.record_editor"
}, {
pId: 406,
text: "bi.shelter_editor",
value: "demo.shelter_editor"
},
{
pId: 4,
id: 407,
text: "下拉框控件",
open: false
}, {
pId: 407,
text: "bi.text_value_combo",
value: "demo.text_value_combo"
}, {
pId: 407,
text: "bi.text_value_check_combo",
value: "demo.text_value_check_combo"
}, {
pId: 407,
text: "bi.text_value_down_list_combo",
value: "demo.text_value_down_list_combo"
}, {
pId: 407,
text: "bi.static_combo",
value: "demo.static_combo"
}, {
pId: 407,
text: "bi.icon_combo",
value: "demo.icon_combo"
}, {
pId: 407,
text: "bi.formula_combo",
value: "demo.formula_combo"
}, {
pId: 4,
id: 408,
text: "选择字段列表",
open: false
}, {
pId: 408,
text: "bi.placeholder"
}, {
pId: 4,
id: 409,
text: "公式编辑器",
open: false
}, {
pId: 409,
text: "bi.placeholder"
}, {
pId: 4,
id: 410,
text: "数值区间控件"
}, {
pId: 410,
text: "bi.numerical_interval",
value: "demo.numberical_interval"
}, {
pId: 4,
id: 411,
text: "下拉复选框有确定按钮"
}, {
pId: 411,
text: "bi.multi_select_combo",
value: "demo.multi_select_combo"
}, {
pId: 4,
id: 412,
text: "简单日期控件"
}, {
pId: 412,
text: "bi.date_combo",
value: "demo.date"
}, {
pId: 412,
text: "bi.date_pane_widget",
value: "demo.date_pane_widget"
}, {
pId: 412,
text: "bi.year_month_combo",
value: "demo.year_month_combo"
}, {
pId: 412,
text: "bi.year_quarter_combo",
value: "demo.year_quarter_combo"
}, {
pId: 412,
text: "bi.custom_date_time",
value: "demo.custom_date_time"
}, {
pId: 4,
id: 413,
text: "简单下拉树"
}, {
pId: 413,
text: "bi.single_tree_combo",
value: "demo.single_tree_combo"
}, {
pId: 413,
text: "bi.multilayer_single_tree_combo",
value: "demo.multilayer_single_tree_combo"
}, {
pId: 4,
id: 414,
text: "可选下拉树"
}, {
pId: 414,
text: "bi.select_tree_combo",
value: "demo.select_tree_combo"
}, {
pId: 414,
text: "bi.multilayer_select_tree_combo",
value: "demo.multilayer_select_tree_combo"
}, {
pId: 4,
id: 415,
text: "路径选择"
}, {
pId: 415,
text: "bi.path_chooser",
value: "demo.path_chooser"
}, {
pId: 415,
text: "bi.direction_path_chooser",
value: "demo.direction_path_chooser"
}, {
pId: 4,
id: 416,
text: "关联视图"
}, {
pId: 416,
text: "bi.relation_view",
value: "demo.relation_view"
}, {
pId: 4,
id: 417,
text: "布局"
}, {
pId: 417,
text: "bi.adaptive_arrangement",
value: "demo.adaptive_arrangement"
}, {
pId: 417,
text: "bi.interactive_arrangement",
value: "demo.interactive_arrangement"
}, {
pId: 4,
id: 418,
text: "提示对话框"
}, {
pId: 418,
text: "bi.dialog",
value: "demo.dialog"
}, {
pId: 4,
id: 419,
text: "文件管理"
}, {
pId: 419,
text: "demo.file_manager",
value: "demo.file_manager"
}
id: 4,
text: "详细控件",
open: true
}, {
pId: 4,
id: 420,
text: '各种小控件',
}, {
pId: 420,
text: "各种通用按钮",
value: "demo.buttons"
}, {
pId: 420,
text: "各种提示性信息",
value: "demo.tips"
}, {
pId: 420,
text: "各种items",
value: "demo.items"
}, {
pId: 420,
text: "各种节点node",
value: "demo.nodes"
}, {
pId: 420,
text: "各种segment",
value: "demo.segments"
}, {
pId: 420,
text: "可以切换的树",
value: "demo.switch_tree"
}, {
id: 400,
pId: 4,
text: "tree"
}, {
pId: 400,
text: "bi.multi_tree_combo",
value: "demo.multi_tree_combo"
}, {
pId: 400,
text: "bi.switch_tree",
value: "demo.switch_tree"
}, {
id: 401,
pId: 4,
text: "table"
}, {
pId: 401,
text: "bi.preview_table",
value: "demo.preview_table"
}, {
pId: 401,
text: "bi.responsive_table",
value: "demo.responsive_table"
}, {
pId: 401,
text: "bi.excel_table",
value: "demo.excel_table"
}, {
pId: 4,
id: 402,
text: "年份控件",
open: false
}, {
pId: 402,
text: "bi.year_combo",
value: "demo.year"
}, {
pId: 4,
id: 403,
text: "月份控件",
open: false
}, {
pId: 403,
text: "bi.month_combo",
value: "demo.month"
}, {
pId: 4,
id: 404,
text: "季度控件",
open: false
}, {
pId: 404,
text: "bi.quarter_combo",
value: "demo.quarter"
}, {
pId: 4,
id: 405,
text: "下拉列表",
open: false
}, {
pId: 405,
text: "bi.down_list_combo",
value: "demo.down_list"
}, {
pId: 4,
id: 406,
text: "文本框控件",
open: false
}, {
pId: 406,
text: "bi.text_editor",
value: "demo.text_editor"
}, {
pId: 406,
text: "bi.search_editor",
value: "demo.search_editor"
}, {
pId: 406,
text: "bi.clear_editor",
value: "demo.clear_editor"
}, {
pId: 4,
id: 407,
text: "下拉框控件",
open: false
}, {
pId: 407,
text: "bi.text_value_combo",
value: "demo.text_value_combo"
}, {
pId: 407,
text: "bi.text_value_check_combo",
value: "demo.text_value_check_combo"
}, {
pId: 407,
text: "bi.text_value_down_list_combo",
value: "demo.text_value_down_list_combo"
}, {
pId: 407,
text: "bi.static_combo",
value: "demo.static_combo"
}, {
pId: 407,
text: "bi.icon_combo",
value: "demo.icon_combo"
}, {
pId: 407,
text: "bi.formula_combo",
value: "demo.formula_combo"
}, {
pId: 4,
id: 410,
text: "数值区间控件"
}, {
pId: 410,
text: "bi.numerical_interval",
value: "demo.numberical_interval"
}, {
pId: 4,
id: 411,
text: "下拉复选框有确定按钮"
}, {
pId: 411,
text: "bi.multi_select_combo",
value: "demo.multi_select_combo"
}, {
pId: 4,
id: 412,
text: "简单日期控件"
}, {
pId: 412,
text: "bi.date_combo",
value: "demo.date"
}, {
pId: 412,
text: "bi.date_pane_widget",
value: "demo.date_pane_widget"
}, {
pId: 412,
text: "bi.year_month_combo",
value: "demo.year_month_combo"
}, {
pId: 412,
text: "bi.year_quarter_combo",
value: "demo.year_quarter_combo"
}, {
pId: 412,
text: "bi.custom_date_time",
value: "demo.custom_date_time"
}, {
pId: 4,
id: 413,
text: "简单下拉树"
}, {
pId: 413,
text: "bi.single_tree_combo",
value: "demo.single_tree_combo"
}, {
pId: 413,
text: "bi.multilayer_single_tree_combo",
value: "demo.multilayer_single_tree_combo"
}, {
pId: 4,
id: 414,
text: "可选下拉树"
}, {
pId: 414,
text: "bi.select_tree_combo",
value: "demo.select_tree_combo"
}, {
pId: 414,
text: "bi.multilayer_select_tree_combo",
value: "demo.multilayer_select_tree_combo"
}, {
pId: 4,
id: 415,
text: "路径选择"
}, {
pId: 415,
text: "bi.path_chooser",
value: "demo.path_chooser"
}, {
pId: 415,
text: "bi.direction_path_chooser",
value: "demo.direction_path_chooser"
}, {
pId: 4,
id: 416,
text: "关联视图"
}, {
pId: 416,
text: "bi.relation_view",
value: "demo.relation_view"
}, {
pId: 4,
id: 417,
text: "布局"
}, {
pId: 417,
text: "bi.adaptive_arrangement",
value: "demo.adaptive_arrangement"
}, {
pId: 417,
text: "bi.interactive_arrangement",
value: "demo.interactive_arrangement"
}, {
pId: 4,
id: 418,
text: "提示对话框"
}, {
pId: 418,
text: "bi.dialog",
value: "demo.dialog"
}, {
pId: 4,
id: 419,
text: "文件管理"
}, {
pId: 419,
text: "bi.file_manager",
value: "demo.file_manager"
}
];

22
demo/js/widget/editor/demo.record_editor.js

@ -1,22 +0,0 @@
/**
* Created by Dailer on 2017/7/11.
*/
Demo.RecordEditor = BI.inherit(BI.Widget, {
props: {
baseCls: ""
},
render: function () {
return {
type: "bi.horizontal_auto",
items: [{
type: "bi.record_editor",
cls: "bi-border",
width: 300,
watermark: "这个是可以记录输入的"
}],
vgap: 20
}
}
})
BI.shortcut("demo.record_editor", Demo.RecordEditor);

22
demo/js/widget/editor/demo.sign_style_editor.js

@ -1,22 +0,0 @@
/**
* Created by Dailer on 2017/7/11.
*/
Demo.SignStyleEditor = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-exceltable"
},
render: function () {
return {
type: "bi.horizontal_adapt",
items: [{
type: "bi.sign_style_editor",
cls:"layout-bg5",
value:"12313",
width: 300
}],
vgap:20
}
}
})
BI.shortcut("demo.sign_style_editor", Demo.SignStyleEditor);

BIN
docs/background/auto-color.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 461 B

BIN
docs/background/trans-color.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 B

70670
docs/base.js

File diff suppressed because it is too large Load Diff

25027
docs/case.js

File diff suppressed because it is too large Load Diff

18515
docs/demo.js

File diff suppressed because one or more lines are too long

46
docs/resource.css

@ -818,6 +818,52 @@ textarea::-webkit-scrollbar-thumb:hover {
content: "\e600";
color: #f07d0a;
}
.less-font .b-font {
*zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
}
.less-font .b-font:before {
content: "\e633";
color: inherit;
}
.less-font:hover .b-font:before,
.less-font:focus .b-font:before,
.less-font.hover .b-font:before {
content: "\e633";
color: inherit;
}
.less-font:active .b-font:before,
.less-font.active .b-font:before {
content: "\e633";
color: #3f8ce8;
}
.less-font.native .b-font:before,
.less-font.disabled .b-font:before {
content: "\e633";
color: inherit;
}
.less-equal-font .b-font {
*zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
}
.less-equal-font .b-font:before {
content: "\e636";
color: inherit;
}
.less-equal-font:hover .b-font:before,
.less-equal-font:focus .b-font:before,
.less-equal-font.hover .b-font:before {
content: "\e636";
color: inherit;
}
.less-equal-font:active .b-font:before,
.less-equal-font.active .b-font:before {
content: "\e636";
color: #3f8ce8;
}
.less-equal-font.native .b-font:before,
.less-equal-font.disabled .b-font:before {
content: "\e636";
color: inherit;
}
.tree-collapse-icon-type1 .x-icon,
.tree-collapse-icon-type1:hover .x-icon,
.tree-collapse-icon-type1:active .x-icon {

2
docs/widget.js

@ -5306,7 +5306,7 @@ BI.FileManagerNavButton = BI.inherit(BI.Widget, {
_const: {
normal_color: "#ffffff",
select_color: "#f4f4f4"
select_color: "#eff1f4"
},
_defaultConfig: function () {
return BI.extend(BI.FileManagerNavButton.superclass._defaultConfig.apply(this, arguments), {

191
src/case/editor/editor.sign.initial.js

@ -1,7 +1,5 @@
/**
* sign是新值初始value值形式的自适应宽度的输入框
* @class BI.SignInitialEditor
* @extends BI.Single
* Created by User on 2017/7/28.
*/
BI.SignInitialEditor = BI.inherit(BI.Widget, {
_defaultConfig: function () {
@ -30,8 +28,7 @@ BI.SignInitialEditor = BI.inherit(BI.Widget, {
BI.SignInitialEditor.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.editor = BI.createWidget({
type: "bi.sign_editor",
element: this,
type: "bi.editor",
height: o.height,
hgap: o.hgap,
vgap: o.vgap,
@ -39,7 +36,7 @@ BI.SignInitialEditor = BI.inherit(BI.Widget, {
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
value: o.value || o.text,
value: o.value,
validationChecker: o.validationChecker,
quitChecker: o.quitChecker,
mouseOut: o.mouseOut,
@ -47,67 +44,163 @@ BI.SignInitialEditor = BI.inherit(BI.Widget, {
watermark: o.watermark,
errorText: o.errorText
});
if(BI.isNotNull(o.value)){
this.setState(o.value);
}
this.text = BI.createWidget({
type: "bi.text_button",
cls: "sign-editor-text",
title: o.title,
warningTitle: o.warningTitle,
tipType: o.tipType,
textAlign: "left",
height: o.height,
hgap: 4,
handler: function () {
self._showInput();
self.editor.focus();
self.editor.selectAll();
}
});
this.text.on(BI.TextButton.EVENT_CHANGE, function () {
BI.nextTick(function () {
self.fireEvent(BI.SignInitialEditor.EVENT_CLICK_LABEL)
});
});
BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: this.text,
left: 0,
right: 0,
top: 0,
bottom: 0
}]
});
this.editor.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
});
this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {
self.fireEvent(BI.SignInitialEditor.EVENT_FOCUS);
this.editor.on(BI.Editor.EVENT_FOCUS, function () {
self.fireEvent(BI.SignInitialEditor.EVENT_FOCUS, arguments);
});
this.editor.on(BI.SignEditor.EVENT_BLUR, function () {
self.fireEvent(BI.SignInitialEditor.EVENT_BLUR);
this.editor.on(BI.Editor.EVENT_BLUR, function () {
self.fireEvent(BI.SignInitialEditor.EVENT_BLUR, arguments);
});
this.editor.on(BI.SignEditor.EVENT_CLICK, function () {
self.fireEvent(BI.SignInitialEditor.EVENT_CLICK);
this.editor.on(BI.Editor.EVENT_CLICK, function () {
self.fireEvent(BI.SignInitialEditor.EVENT_CLICK, arguments);
});
this.editor.on(BI.SignEditor.EVENT_CHANGE, function () {
self.fireEvent(BI.SignInitialEditor.EVENT_CHANGE);
this.editor.on(BI.Editor.EVENT_CHANGE, function () {
self.fireEvent(BI.SignInitialEditor.EVENT_CHANGE, arguments);
});
this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function (v) {
self.fireEvent(BI.SignInitialEditor.EVENT_KEY_DOWN);
this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) {
self.fireEvent(BI.SignInitialEditor.EVENT_KEY_DOWN, arguments);
});
this.editor.on(BI.SignEditor.EVENT_VALID, function () {
self.fireEvent(BI.SignInitialEditor.EVENT_VALID);
this.editor.on(BI.Editor.EVENT_VALID, function () {
self.fireEvent(BI.SignInitialEditor.EVENT_VALID, arguments);
});
this.editor.on(BI.SignEditor.EVENT_CONFIRM, function () {
self.setState(self.editor.getValue());
self.fireEvent(BI.SignInitialEditor.EVENT_CONFIRM);
this.editor.on(BI.Editor.EVENT_CONFIRM, function () {
self._showHint();
self._checkText();
self.fireEvent(BI.SignInitialEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.SignEditor.EVENT_START, function () {
self.fireEvent(BI.SignInitialEditor.EVENT_START);
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.SignInitialEditor.EVENT_START, arguments);
});
this.editor.on(BI.SignEditor.EVENT_PAUSE, function () {
self.fireEvent(BI.SignInitialEditor.EVENT_PAUSE);
this.editor.on(BI.Editor.EVENT_PAUSE, function () {
self.fireEvent(BI.SignInitialEditor.EVENT_PAUSE, arguments);
});
this.editor.on(BI.SignEditor.EVENT_STOP, function () {
self.fireEvent(BI.SignInitialEditor.EVENT_STOP);
this.editor.on(BI.Editor.EVENT_STOP, function () {
self.fireEvent(BI.SignInitialEditor.EVENT_STOP, arguments);
});
this.editor.on(BI.SignEditor.EVENT_SPACE, function () {
self.fireEvent(BI.SignInitialEditor.EVENT_SPACE);
this.editor.on(BI.Editor.EVENT_SPACE, function () {
self.fireEvent(BI.SignInitialEditor.EVENT_SPACE, arguments);
});
this.editor.on(BI.SignEditor.EVENT_ERROR, function () {
self.fireEvent(BI.SignInitialEditor.EVENT_ERROR);
this.editor.on(BI.Editor.EVENT_ERROR, function () {
self._checkText();
self.fireEvent(BI.SignInitialEditor.EVENT_ERROR, arguments);
});
this.editor.on(BI.SignEditor.EVENT_ENTER, function () {
self.fireEvent(BI.SignInitialEditor.EVENT_ENTER);
this.editor.on(BI.Editor.EVENT_ENTER, function () {
self.fireEvent(BI.SignInitialEditor.EVENT_ENTER, arguments);
});
this.editor.on(BI.SignEditor.EVENT_RESTRICT, function () {
self.fireEvent(BI.SignInitialEditor.EVENT_RESTRICT);
this.editor.on(BI.Editor.EVENT_RESTRICT, function () {
self.fireEvent(BI.SignInitialEditor.EVENT_RESTRICT, arguments);
});
this.editor.on(BI.SignEditor.EVENT_EMPTY, function () {
self.fireEvent(BI.SignInitialEditor.EVENT_EMPTY);
this.editor.on(BI.Editor.EVENT_EMPTY, function () {
self.fireEvent(BI.SignInitialEditor.EVENT_EMPTY, arguments);
});
BI.createWidget({
type: "bi.vertical",
scrolly: false,
element: this,
items: [this.editor]
});
this._showHint();
self._checkText();
},
_checkText: function () {
var o = this.options;
BI.nextTick(BI.bind(function () {
if (this.editor.getValue() === "") {
this.text.setValue(o.watermark || "");
this.text.element.addClass("bi-water-mark");
} else {
var v = this.editor.getValue();
v = (BI.isEmpty(v) || v == o.text) ? o.text : v + "(" + o.text + ")";
this.text.setValue(v);
this.text.element.removeClass("bi-water-mark");
}
}, this));
},
_showInput: function () {
this.editor.visible();
this.text.invisible();
},
_showHint: function () {
this.editor.invisible();
this.text.visible();
},
setTitle: function (title) {
this.text.setTitle(title);
},
setWarningTitle: function (title) {
this.text.setWarningTitle(title);
},
focus: function () {
this._showInput();
this.editor.focus();
},
blur: function () {
this.editor.blur();
this._showHint();
this._checkText();
},
doRedMark: function () {
if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) {
return;
}
this.text.doRedMark.apply(this.text, arguments);
},
unRedMark: function () {
this.text.unRedMark.apply(this.text, arguments);
},
doHighLight: function () {
if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) {
return;
}
this.text.doHighLight.apply(this.text, arguments);
},
unHighLight: function () {
this.text.unHighLight.apply(this.text, arguments);
},
isValid: function () {
@ -122,9 +215,19 @@ BI.SignInitialEditor = BI.inherit(BI.Widget, {
return this.editor.getErrorText();
},
isEditing: function () {
return this.editor.isEditing();
},
getLastValidValue: function () {
return this.editor.getLastValidValue();
},
setValue: function (v) {
var o = this.options;
this.editor.setValue(v.value);
this.setState(v.value);
o.text = v.text || o.text;
this._checkText();
},
getValue: function () {
@ -135,13 +238,13 @@ BI.SignInitialEditor = BI.inherit(BI.Widget, {
},
getState: function () {
return this.editor.getState();
return this.text.getValue();
},
setState: function (v) {
var o = this.options;
this._showHint();
v = (BI.isEmpty(v) || v == o.text) ? o.text : v + "(" + o.text + ")";
this.editor.setState(v);
this.text.setValue(v);
}
});
BI.SignInitialEditor.EVENT_CHANGE = "EVENT_CHANGE";

46
src/css/resource/font.css

@ -684,3 +684,49 @@
content: "\e600";
color: #f07d0a;
}
.less-font .b-font {
*zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
}
.less-font .b-font:before {
content: "\e633";
color: inherit;
}
.less-font:hover .b-font:before,
.less-font:focus .b-font:before,
.less-font.hover .b-font:before {
content: "\e633";
color: inherit;
}
.less-font:active .b-font:before,
.less-font.active .b-font:before {
content: "\e633";
color: #3f8ce8;
}
.less-font.native .b-font:before,
.less-font.disabled .b-font:before {
content: "\e633";
color: inherit;
}
.less-equal-font .b-font {
*zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
}
.less-equal-font .b-font:before {
content: "\e636";
color: inherit;
}
.less-equal-font:hover .b-font:before,
.less-equal-font:focus .b-font:before,
.less-equal-font.hover .b-font:before {
content: "\e636";
color: inherit;
}
.less-equal-font:active .b-font:before,
.less-equal-font.active .b-font:before {
content: "\e636";
color: #3f8ce8;
}
.less-equal-font.native .b-font:before,
.less-equal-font.disabled .b-font:before {
content: "\e636";
color: inherit;
}

6
src/less/resource/font.less

@ -79,4 +79,8 @@
.font-hover(primary-key-font, @font-key);
.font(drag-tag-font, @font-cross, @color-bi-text-redmark);
.font(drag-tag-font, @font-cross, @color-bi-text-redmark);
//数值区间
.font-hover-active(less-font, @font-less);
.font-hover-active(less-equal-font, @font-less-equal);

2
src/widget/filemanager/nav/button/button.nav.filemanager.js

@ -9,7 +9,7 @@ BI.FileManagerNavButton = BI.inherit(BI.Widget, {
_const: {
normal_color: "#ffffff",
select_color: "#f4f4f4"
select_color: "#eff1f4"
},
_defaultConfig: function () {
return BI.extend(BI.FileManagerNavButton.superclass._defaultConfig.apply(this, arguments), {

Loading…
Cancel
Save