Browse Source

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

* commit '943fbac5aa4f65b8376cded9fa7a938bf0a89116':
  update
  update
  update
  BI-22461
es6
guy 7 years ago
parent
commit
f3c65859a9
  1. 1
      demo/js/case/demo.color_chooser_popup.js
  2. 44
      dist/_fineui.min.js
  3. 6
      dist/base.css
  4. 6
      dist/bundle.css
  5. 119
      dist/bundle.js
  6. 2
      dist/bundle.min.css
  7. 32
      dist/bundle.min.js
  8. 119
      dist/case.js
  9. 1
      dist/demo.js
  10. 6
      dist/fineui.css
  11. 119
      dist/fineui.js
  12. 2
      dist/fineui.min.css
  13. 44
      dist/fineui.min.js
  14. 110
      src/case/colorchooser/colorchooser.popup.js
  15. 2
      src/case/editor/editor.state.simple.js
  16. 7
      src/case/richeditor/richeditor.js
  17. 6
      src/css/base/colorchooser/colorchooser.css
  18. 8
      src/less/base/colorchooser/colorchooser.popup.less

1
demo/js/case/demo.color_chooser_popup.js

@ -9,6 +9,7 @@ Demo.Func = BI.inherit(BI.Widget, {
items: [{ items: [{
el: { el: {
type: "bi.color_chooser_popup", type: "bi.color_chooser_popup",
disabled: true,
cls: "bi-card" cls: "bi-card"
}, },
left: 100, left: 100,

44
dist/_fineui.min.js vendored

File diff suppressed because one or more lines are too long

6
dist/base.css vendored

@ -1,3 +1,9 @@
.bi-color-chooser-popup .disable-mask {
opacity: 0.5;
filter: alpha(opacity=50);
background-color: #ffffff;
}
.bi-color-chooser-trigger { .bi-color-chooser-trigger {
-webkit-border-radius: 2px; -webkit-border-radius: 2px;
-moz-border-radius: 2px; -moz-border-radius: 2px;

6
dist/bundle.css vendored

@ -2044,6 +2044,12 @@ textarea {
.bi-theme-dark .bi-input { .bi-theme-dark .bi-input {
color: #ffffff; color: #ffffff;
} }
.bi-color-chooser-popup .disable-mask {
opacity: 0.5;
filter: alpha(opacity=50);
background-color: #ffffff;
}
.bi-color-chooser-trigger { .bi-color-chooser-trigger {
-webkit-border-radius: 2px; -webkit-border-radius: 2px;
-moz-border-radius: 2px; -moz-border-radius: 2px;

119
dist/bundle.js vendored

@ -76188,16 +76188,13 @@ BI.shortcut("bi.color_chooser", BI.ColorChooser);/**
*/ */
BI.ColorChooserPopup = BI.inherit(BI.Widget, { BI.ColorChooserPopup = BI.inherit(BI.Widget, {
_defaultConfig: function () { props: {
return BI.extend(BI.ColorChooserPopup.superclass._defaultConfig.apply(this, arguments), { baseCls: "bi-color-chooser-popup",
baseCls: "bi-color-chooser-popup", width: 200,
width: 200, height: 145
height: 145
});
}, },
_init: function () { render: function () {
BI.ColorChooserPopup.superclass._init.apply(this, arguments);
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",
@ -76304,53 +76301,84 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
} }
}); });
BI.createWidget({ return {
type: "bi.vtape", type: "bi.absolute",
element: this,
items: [{ items: [{
el: { el: {
type: "bi.absolute", type: "bi.vtape",
cls: "bi-background bi-border-bottom",
items: [{
el: this.colorEditor,
left: 0,
right: 0,
top: 5
}]
},
height: 30
}, {
el: {
type: "bi.absolute",
items: [{ items: [{
el: this.storeColors, el: {
left: 5, type: "bi.absolute",
right: 5, cls: "bi-background bi-border-bottom",
top: 5 items: [{
el: this.colorEditor,
left: 0,
right: 0,
top: 5
}]
},
height: 30
}, {
el: {
type: "bi.absolute",
items: [{
el: this.storeColors,
left: 5,
right: 5,
top: 5
}]
},
height: 30
}, {
el: {
type: "bi.absolute",
items: [{
el: this.colorPicker,
left: 5,
right: 5,
top: 5
}]
},
height: 65
}, {
el: this.more,
height: 20
}] }]
}, },
height: 30 left: 0,
right: 0,
top: 0,
bottom: 0
}, { }, {
el: { el: {
type: "bi.absolute", type: "bi.layout",
items: [{ cls: "disable-mask",
el: this.colorPicker, invisible: !o.disabled,
left: 5, ref: function () {
right: 5, self.mask = this;
top: 5 }
}]
}, },
height: 65 left: 0,
}, { right: 0,
el: this.more, top: 0,
height: 20 bottom: 0
}] }]
}); };
},
mounted: function () {
var self = this;
var o = this.options;
if (BI.isNotNull(o.value)) { if (BI.isNotNull(o.value)) {
this.setValue(o.value); this.setValue(o.value);
} }
}, },
_setEnable: function (enable) {
BI.ColorChooserPopup.superclass._setEnable.apply(this, arguments);
this.mask.setVisible(!enable);
},
setStoreColors: function (colors) { setStoreColors: function (colors) {
if (BI.isArray(colors)) { if (BI.isArray(colors)) {
var items = BI.map(colors, function (i, color) { var items = BI.map(colors, function (i, color) {
@ -80709,7 +80737,7 @@ BI.SimpleStateEditor = BI.inherit(BI.Widget, {
}); });
this.text = BI.createWidget({ this.text = BI.createWidget({
type: "bi.text_button", type: "bi.text_button",
cls: "state-editor-infinite-text bi-disabled", cls: "state-editor-infinite-text",
textAlign: "left", textAlign: "left",
height: o.height, height: o.height,
text: BI.i18nText("BI-Basic_Unrestricted"), text: BI.i18nText("BI-Basic_Unrestricted"),
@ -84089,7 +84117,7 @@ BI.shortcut("bi.rich_editor_size_chooser", BI.RichEditorSizeChooser);/**
BI.RichEditor = BI.inherit(BI.Widget, { BI.RichEditor = BI.inherit(BI.Widget, {
props: { props: {
baseCls: "bi-rich-editor", baseCls: "bi-rich-editor bi-textarea",
toolbar: {}, toolbar: {},
readOnly: false readOnly: false
}, },
@ -84160,6 +84188,11 @@ BI.RichEditor = BI.inherit(BI.Widget, {
} }
}, },
_setEnable: function (enable) {
BI.RichEditor.superclass._setEnable.apply(this, arguments);
this.mask.setVisible(!enable);
},
focus: function () { focus: function () {
this.editor.focus(); this.editor.focus();
}, },

2
dist/bundle.min.css vendored

File diff suppressed because one or more lines are too long

32
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

119
dist/case.js vendored

@ -3709,16 +3709,13 @@ BI.shortcut("bi.color_chooser", BI.ColorChooser);/**
*/ */
BI.ColorChooserPopup = BI.inherit(BI.Widget, { BI.ColorChooserPopup = BI.inherit(BI.Widget, {
_defaultConfig: function () { props: {
return BI.extend(BI.ColorChooserPopup.superclass._defaultConfig.apply(this, arguments), { baseCls: "bi-color-chooser-popup",
baseCls: "bi-color-chooser-popup", width: 200,
width: 200, height: 145
height: 145
});
}, },
_init: function () { render: function () {
BI.ColorChooserPopup.superclass._init.apply(this, arguments);
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",
@ -3825,53 +3822,84 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
} }
}); });
BI.createWidget({ return {
type: "bi.vtape", type: "bi.absolute",
element: this,
items: [{ items: [{
el: { el: {
type: "bi.absolute", type: "bi.vtape",
cls: "bi-background bi-border-bottom",
items: [{ items: [{
el: this.colorEditor, el: {
left: 0, type: "bi.absolute",
right: 0, cls: "bi-background bi-border-bottom",
top: 5 items: [{
}] el: this.colorEditor,
}, left: 0,
height: 30 right: 0,
}, { top: 5
el: { }]
type: "bi.absolute", },
items: [{ height: 30
el: this.storeColors, }, {
left: 5, el: {
right: 5, type: "bi.absolute",
top: 5 items: [{
el: this.storeColors,
left: 5,
right: 5,
top: 5
}]
},
height: 30
}, {
el: {
type: "bi.absolute",
items: [{
el: this.colorPicker,
left: 5,
right: 5,
top: 5
}]
},
height: 65
}, {
el: this.more,
height: 20
}] }]
}, },
height: 30 left: 0,
right: 0,
top: 0,
bottom: 0
}, { }, {
el: { el: {
type: "bi.absolute", type: "bi.layout",
items: [{ cls: "disable-mask",
el: this.colorPicker, invisible: !o.disabled,
left: 5, ref: function () {
right: 5, self.mask = this;
top: 5 }
}]
}, },
height: 65 left: 0,
}, { right: 0,
el: this.more, top: 0,
height: 20 bottom: 0
}] }]
}); };
},
mounted: function () {
var self = this;
var o = this.options;
if (BI.isNotNull(o.value)) { if (BI.isNotNull(o.value)) {
this.setValue(o.value); this.setValue(o.value);
} }
}, },
_setEnable: function (enable) {
BI.ColorChooserPopup.superclass._setEnable.apply(this, arguments);
this.mask.setVisible(!enable);
},
setStoreColors: function (colors) { setStoreColors: function (colors) {
if (BI.isArray(colors)) { if (BI.isArray(colors)) {
var items = BI.map(colors, function (i, color) { var items = BI.map(colors, function (i, color) {
@ -8230,7 +8258,7 @@ BI.SimpleStateEditor = BI.inherit(BI.Widget, {
}); });
this.text = BI.createWidget({ this.text = BI.createWidget({
type: "bi.text_button", type: "bi.text_button",
cls: "state-editor-infinite-text bi-disabled", cls: "state-editor-infinite-text",
textAlign: "left", textAlign: "left",
height: o.height, height: o.height,
text: BI.i18nText("BI-Basic_Unrestricted"), text: BI.i18nText("BI-Basic_Unrestricted"),
@ -11610,7 +11638,7 @@ BI.shortcut("bi.rich_editor_size_chooser", BI.RichEditorSizeChooser);/**
BI.RichEditor = BI.inherit(BI.Widget, { BI.RichEditor = BI.inherit(BI.Widget, {
props: { props: {
baseCls: "bi-rich-editor", baseCls: "bi-rich-editor bi-textarea",
toolbar: {}, toolbar: {},
readOnly: false readOnly: false
}, },
@ -11681,6 +11709,11 @@ BI.RichEditor = BI.inherit(BI.Widget, {
} }
}, },
_setEnable: function (enable) {
BI.RichEditor.superclass._setEnable.apply(this, arguments);
this.mask.setVisible(!enable);
},
focus: function () { focus: function () {
this.editor.focus(); this.editor.focus();
}, },

1
dist/demo.js vendored

@ -2406,6 +2406,7 @@ BI.shortcut("demo.clipboard", Demo.Func);Demo.Func = BI.inherit(BI.Widget, {
items: [{ items: [{
el: { el: {
type: "bi.color_chooser_popup", type: "bi.color_chooser_popup",
disabled: true,
cls: "bi-card" cls: "bi-card"
}, },
left: 100, left: 100,

6
dist/fineui.css vendored

@ -2044,6 +2044,12 @@ textarea {
.bi-theme-dark .bi-input { .bi-theme-dark .bi-input {
color: #ffffff; color: #ffffff;
} }
.bi-color-chooser-popup .disable-mask {
opacity: 0.5;
filter: alpha(opacity=50);
background-color: #ffffff;
}
.bi-color-chooser-trigger { .bi-color-chooser-trigger {
-webkit-border-radius: 2px; -webkit-border-radius: 2px;
-moz-border-radius: 2px; -moz-border-radius: 2px;

119
dist/fineui.js vendored

@ -76431,16 +76431,13 @@ BI.shortcut("bi.color_chooser", BI.ColorChooser);/**
*/ */
BI.ColorChooserPopup = BI.inherit(BI.Widget, { BI.ColorChooserPopup = BI.inherit(BI.Widget, {
_defaultConfig: function () { props: {
return BI.extend(BI.ColorChooserPopup.superclass._defaultConfig.apply(this, arguments), { baseCls: "bi-color-chooser-popup",
baseCls: "bi-color-chooser-popup", width: 200,
width: 200, height: 145
height: 145
});
}, },
_init: function () { render: function () {
BI.ColorChooserPopup.superclass._init.apply(this, arguments);
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",
@ -76547,53 +76544,84 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
} }
}); });
BI.createWidget({ return {
type: "bi.vtape", type: "bi.absolute",
element: this,
items: [{ items: [{
el: { el: {
type: "bi.absolute", type: "bi.vtape",
cls: "bi-background bi-border-bottom",
items: [{
el: this.colorEditor,
left: 0,
right: 0,
top: 5
}]
},
height: 30
}, {
el: {
type: "bi.absolute",
items: [{ items: [{
el: this.storeColors, el: {
left: 5, type: "bi.absolute",
right: 5, cls: "bi-background bi-border-bottom",
top: 5 items: [{
el: this.colorEditor,
left: 0,
right: 0,
top: 5
}]
},
height: 30
}, {
el: {
type: "bi.absolute",
items: [{
el: this.storeColors,
left: 5,
right: 5,
top: 5
}]
},
height: 30
}, {
el: {
type: "bi.absolute",
items: [{
el: this.colorPicker,
left: 5,
right: 5,
top: 5
}]
},
height: 65
}, {
el: this.more,
height: 20
}] }]
}, },
height: 30 left: 0,
right: 0,
top: 0,
bottom: 0
}, { }, {
el: { el: {
type: "bi.absolute", type: "bi.layout",
items: [{ cls: "disable-mask",
el: this.colorPicker, invisible: !o.disabled,
left: 5, ref: function () {
right: 5, self.mask = this;
top: 5 }
}]
}, },
height: 65 left: 0,
}, { right: 0,
el: this.more, top: 0,
height: 20 bottom: 0
}] }]
}); };
},
mounted: function () {
var self = this;
var o = this.options;
if (BI.isNotNull(o.value)) { if (BI.isNotNull(o.value)) {
this.setValue(o.value); this.setValue(o.value);
} }
}, },
_setEnable: function (enable) {
BI.ColorChooserPopup.superclass._setEnable.apply(this, arguments);
this.mask.setVisible(!enable);
},
setStoreColors: function (colors) { setStoreColors: function (colors) {
if (BI.isArray(colors)) { if (BI.isArray(colors)) {
var items = BI.map(colors, function (i, color) { var items = BI.map(colors, function (i, color) {
@ -80952,7 +80980,7 @@ BI.SimpleStateEditor = BI.inherit(BI.Widget, {
}); });
this.text = BI.createWidget({ this.text = BI.createWidget({
type: "bi.text_button", type: "bi.text_button",
cls: "state-editor-infinite-text bi-disabled", cls: "state-editor-infinite-text",
textAlign: "left", textAlign: "left",
height: o.height, height: o.height,
text: BI.i18nText("BI-Basic_Unrestricted"), text: BI.i18nText("BI-Basic_Unrestricted"),
@ -84332,7 +84360,7 @@ BI.shortcut("bi.rich_editor_size_chooser", BI.RichEditorSizeChooser);/**
BI.RichEditor = BI.inherit(BI.Widget, { BI.RichEditor = BI.inherit(BI.Widget, {
props: { props: {
baseCls: "bi-rich-editor", baseCls: "bi-rich-editor bi-textarea",
toolbar: {}, toolbar: {},
readOnly: false readOnly: false
}, },
@ -84403,6 +84431,11 @@ BI.RichEditor = BI.inherit(BI.Widget, {
} }
}, },
_setEnable: function (enable) {
BI.RichEditor.superclass._setEnable.apply(this, arguments);
this.mask.setVisible(!enable);
},
focus: function () { focus: function () {
this.editor.focus(); this.editor.focus();
}, },

2
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

44
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

110
src/case/colorchooser/colorchooser.popup.js

@ -7,16 +7,13 @@
*/ */
BI.ColorChooserPopup = BI.inherit(BI.Widget, { BI.ColorChooserPopup = BI.inherit(BI.Widget, {
_defaultConfig: function () { props: {
return BI.extend(BI.ColorChooserPopup.superclass._defaultConfig.apply(this, arguments), { baseCls: "bi-color-chooser-popup",
baseCls: "bi-color-chooser-popup", width: 200,
width: 200, height: 145
height: 145
});
}, },
_init: function () { render: function () {
BI.ColorChooserPopup.superclass._init.apply(this, arguments);
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",
@ -123,53 +120,84 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
} }
}); });
BI.createWidget({ return {
type: "bi.vtape", type: "bi.absolute",
element: this,
items: [{ items: [{
el: { el: {
type: "bi.absolute", type: "bi.vtape",
cls: "bi-background bi-border-bottom",
items: [{ items: [{
el: this.colorEditor, el: {
left: 0, type: "bi.absolute",
right: 0, cls: "bi-background bi-border-bottom",
top: 5 items: [{
el: this.colorEditor,
left: 0,
right: 0,
top: 5
}]
},
height: 30
}, {
el: {
type: "bi.absolute",
items: [{
el: this.storeColors,
left: 5,
right: 5,
top: 5
}]
},
height: 30
}, {
el: {
type: "bi.absolute",
items: [{
el: this.colorPicker,
left: 5,
right: 5,
top: 5
}]
},
height: 65
}, {
el: this.more,
height: 20
}] }]
}, },
height: 30 left: 0,
right: 0,
top: 0,
bottom: 0
}, { }, {
el: { el: {
type: "bi.absolute", type: "bi.layout",
items: [{ cls: "disable-mask",
el: this.storeColors, invisible: !o.disabled,
left: 5, ref: function () {
right: 5, self.mask = this;
top: 5 }
}]
},
height: 30
}, {
el: {
type: "bi.absolute",
items: [{
el: this.colorPicker,
left: 5,
right: 5,
top: 5
}]
}, },
height: 65 left: 0,
}, { right: 0,
el: this.more, top: 0,
height: 20 bottom: 0
}] }]
}); };
},
mounted: function () {
var self = this;
var o = this.options;
if (BI.isNotNull(o.value)) { if (BI.isNotNull(o.value)) {
this.setValue(o.value); this.setValue(o.value);
} }
}, },
_setEnable: function (enable) {
BI.ColorChooserPopup.superclass._setEnable.apply(this, arguments);
this.mask.setVisible(!enable);
},
setStoreColors: function (colors) { setStoreColors: function (colors) {
if (BI.isArray(colors)) { if (BI.isArray(colors)) {
var items = BI.map(colors, function (i, color) { var items = BI.map(colors, function (i, color) {

2
src/case/editor/editor.state.simple.js

@ -46,7 +46,7 @@ BI.SimpleStateEditor = BI.inherit(BI.Widget, {
}); });
this.text = BI.createWidget({ this.text = BI.createWidget({
type: "bi.text_button", type: "bi.text_button",
cls: "state-editor-infinite-text bi-disabled", cls: "state-editor-infinite-text",
textAlign: "left", textAlign: "left",
height: o.height, height: o.height,
text: BI.i18nText("BI-Basic_Unrestricted"), text: BI.i18nText("BI-Basic_Unrestricted"),

7
src/case/richeditor/richeditor.js

@ -8,7 +8,7 @@
BI.RichEditor = BI.inherit(BI.Widget, { BI.RichEditor = BI.inherit(BI.Widget, {
props: { props: {
baseCls: "bi-rich-editor", baseCls: "bi-rich-editor bi-textarea",
toolbar: {}, toolbar: {},
readOnly: false readOnly: false
}, },
@ -79,6 +79,11 @@ BI.RichEditor = BI.inherit(BI.Widget, {
} }
}, },
_setEnable: function (enable) {
BI.RichEditor.superclass._setEnable.apply(this, arguments);
this.mask.setVisible(!enable);
},
focus: function () { focus: function () {
this.editor.focus(); this.editor.focus();
}, },

6
src/css/base/colorchooser/colorchooser.css

@ -1,3 +1,9 @@
.bi-color-chooser-popup .disable-mask {
opacity: 0.5;
filter: alpha(opacity=50);
background-color: #ffffff;
}
.bi-color-chooser-trigger { .bi-color-chooser-trigger {
-webkit-border-radius: 2px; -webkit-border-radius: 2px;
-moz-border-radius: 2px; -moz-border-radius: 2px;

8
src/less/base/colorchooser/colorchooser.popup.less

@ -0,0 +1,8 @@
@import "../../index";
.bi-color-chooser-popup {
& .disable-mask {
.opacity(0.5);
background-color: @color-bi-background-default;
}
}
Loading…
Cancel
Save