Browse Source

Merge pull request #744 in VISUAL/fineui from ~NJZY/fineui2.0:master to master

* commit '41f6c97e250c035eb43392f8ec7e6e476c42b28e':
  无JIRA任务 更新
  无JIRA任务 更新
  无JIRA任务, 更新
  BI-34259 弹窗按钮统一调整
es6
windy 6 years ago
parent
commit
701622e472
  1. 59
      dist/bundle.ie.js
  2. 4
      dist/bundle.ie.min.js
  3. 159
      dist/bundle.js
  4. 60
      dist/bundle.min.js
  5. 59
      dist/case.js
  6. 100
      dist/core.js
  7. 25
      dist/demo.js
  8. 59
      dist/fineui.ie.js
  9. 4
      dist/fineui.ie.min.js
  10. 159
      dist/fineui.js
  11. 60
      dist/fineui.min.js
  12. 159
      dist/fineui_without_jquery_polyfill.js
  13. 2
      dist/utils.min.js
  14. 59
      src/case/combo/bubblecombo/popup.bubble.js

59
dist/bundle.ie.js vendored

@ -52394,7 +52394,10 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-bubble-bar-popup-view", extraCls: "bi-bubble-bar-popup-view",
buttons: [{value: BI.i18nText("BI-Basic_Cancel"), ghost: true}, {value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}] buttons: [{
value: BI.i18nText("BI-Basic_Cancel"),
ghost: true
}, {value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}]
}); });
}, },
_init: function () { _init: function () {
@ -52405,9 +52408,9 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
var items = []; var items = [];
BI.each(o.buttons, function (i, buttonOpt) { BI.each(o.buttons, function (i, buttonOpt) {
if(BI.isWidget(buttonOpt)) { if (BI.isWidget(buttonOpt)) {
items.push(buttonOpt); items.push(buttonOpt);
}else{ } else {
items.push(BI.extend({ items.push(BI.extend({
type: "bi.button", type: "bi.button",
height: 30, height: 30,
@ -52437,14 +52440,37 @@ BI.shortcut("bi.bubble_bar_popup_view", BI.BubblePopupBarView);
*/ */
BI.TextBubblePopupBarView = BI.inherit(BI.Widget, { BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
props: { props: function () {
baseCls: "bi-text-bubble-bar-popup-view", return {
text: "", baseCls: "bi-text-bubble-bar-popup-view",
width: 250 text: "",
width: 250,
buttons: [{
level: "ignore",
value: false,
text: BI.i18nText("BI-Basic_Cancel")
}, {
value: true,
text: BI.i18nText("BI-Basic_Sure")
}]
};
}, },
render: function(){ render: function () {
var self = this, o = this.options; var self = this, o = this.options;
var buttons = BI.map(o.buttons, function (index, buttonOpt) {
if (BI.isWidget(buttonOpt)) {
return buttonOpt;
}
return BI.extend({
type: "bi.button",
height: 24,
handler: function (v) {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v);
}
}, buttonOpt);
});
return { return {
type: "bi.bubble_bar_popup_view", type: "bi.bubble_bar_popup_view",
ref: function () { ref: function () {
@ -52465,22 +52491,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
tgap: 25, tgap: 25,
bgap: 10 bgap: 10
}, },
buttons: [{ buttons: buttons
type: "bi.button",
value: BI.i18nText("BI-Basic_Cancel"),
level: "ignore",
height: 24,
handler: function () {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, false);
}
}, {
type: "bi.button",
value: BI.i18nText("BI-Basic_Sure"),
height: 24,
handler: function () {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, true);
}
}]
}; };
}, },

4
dist/bundle.ie.min.js vendored

File diff suppressed because one or more lines are too long

159
dist/bundle.js vendored

@ -30723,106 +30723,6 @@ BI.RightVerticalAdaptLayout = BI.inherit(BI.Layout, {
} }
}); });
BI.shortcut("bi.right_vertical_adapt", BI.RightVerticalAdaptLayout);/** BI.shortcut("bi.right_vertical_adapt", BI.RightVerticalAdaptLayout);/**
* 使用display:table和display:table-cell实现的horizontal布局
* @class BI.TableAdaptLayout
* @extends BI.Layout
*/
BI.TableAdaptLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.TableAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-table-center-adapt-layout",
columnSize: [],
verticalAlign: BI.VerticalAlign.Top,
horizontalAlign: BI.HorizontalAlign.Left,
hgap: 0,
vgap: 0,
lgap: 0,
rgap: 0,
tgap: 0,
bgap: 0
});
},
render: function () {
var o = this.options;
BI.TableAdaptLayout.superclass.render.apply(this, arguments);
this.$table = BI.Widget._renderEngine.createElement("<div>").css({
position: "relative",
display: "table",
height: o.verticalAlign === BI.VerticalAlign.Middle ? "100%" : "auto",
width: o.horizontalAlign === BI.HorizontalAlign.Center ? "100%" : "auto",
"white-space": "nowrap"
});
this.populate(this.options.items);
},
_addElement: function (i, item) {
var o = this.options;
var td;
var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : o.columnSize[i];
if (!this.hasWidget(this._getChildName(i))) {
var w = BI.createWidget(item);
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"});
td = BI.createWidget({
type: "bi.default",
width: width,
items: [w]
});
this.addWidget(this._getChildName(i), td);
} else {
td = this.getWidgetByName(this._getChildName(i));
td.element.width(width);
}
td.element.css({"max-width": o.columnSize[i] + "px"});
if (i === 0) {
td.element.addClass("first-element");
}
td.element.css({
position: "relative",
display: "table-cell",
"vertical-align": "middle",
margin: "0",
padding: "0",
height: "100%"
});
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
});
}
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) + "px"
});
}
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
});
}
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
});
}
return td;
},
appendFragment: function (frag) {
this.$table.append(frag);
this.element.append(this.$table);
},
resize: function () {
// console.log("center_adapt布局不需要resize");
},
populate: function (items) {
BI.TableAdaptLayout.superclass.populate.apply(this, arguments);
this._mount();
}
});
BI.shortcut("bi.table_adapt", BI.TableAdaptLayout);/**
* 垂直方向居中容器 * 垂直方向居中容器
* @class BI.VerticalAdaptLayout * @class BI.VerticalAdaptLayout
* @extends BI.Layout * @extends BI.Layout
@ -52898,7 +52798,10 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-bubble-bar-popup-view", extraCls: "bi-bubble-bar-popup-view",
buttons: [{value: BI.i18nText("BI-Basic_Cancel"), ghost: true}, {value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}] buttons: [{
value: BI.i18nText("BI-Basic_Cancel"),
ghost: true
}, {value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}]
}); });
}, },
_init: function () { _init: function () {
@ -52909,9 +52812,9 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
var items = []; var items = [];
BI.each(o.buttons, function (i, buttonOpt) { BI.each(o.buttons, function (i, buttonOpt) {
if(BI.isWidget(buttonOpt)) { if (BI.isWidget(buttonOpt)) {
items.push(buttonOpt); items.push(buttonOpt);
}else{ } else {
items.push(BI.extend({ items.push(BI.extend({
type: "bi.button", type: "bi.button",
height: 30, height: 30,
@ -52941,14 +52844,37 @@ BI.shortcut("bi.bubble_bar_popup_view", BI.BubblePopupBarView);
*/ */
BI.TextBubblePopupBarView = BI.inherit(BI.Widget, { BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
props: { props: function () {
baseCls: "bi-text-bubble-bar-popup-view", return {
text: "", baseCls: "bi-text-bubble-bar-popup-view",
width: 250 text: "",
width: 250,
buttons: [{
level: "ignore",
value: false,
text: BI.i18nText("BI-Basic_Cancel")
}, {
value: true,
text: BI.i18nText("BI-Basic_Sure")
}]
};
}, },
render: function(){ render: function () {
var self = this, o = this.options; var self = this, o = this.options;
var buttons = BI.map(o.buttons, function (index, buttonOpt) {
if (BI.isWidget(buttonOpt)) {
return buttonOpt;
}
return BI.extend({
type: "bi.button",
height: 24,
handler: function (v) {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v);
}
}, buttonOpt);
});
return { return {
type: "bi.bubble_bar_popup_view", type: "bi.bubble_bar_popup_view",
ref: function () { ref: function () {
@ -52969,22 +52895,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
tgap: 25, tgap: 25,
bgap: 10 bgap: 10
}, },
buttons: [{ buttons: buttons
type: "bi.button",
value: BI.i18nText("BI-Basic_Cancel"),
level: "ignore",
height: 24,
handler: function () {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, false);
}
}, {
type: "bi.button",
value: BI.i18nText("BI-Basic_Sure"),
height: 24,
handler: function () {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, true);
}
}]
}; };
}, },

60
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

59
dist/case.js vendored

@ -4068,7 +4068,10 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-bubble-bar-popup-view", extraCls: "bi-bubble-bar-popup-view",
buttons: [{value: BI.i18nText("BI-Basic_Cancel"), ghost: true}, {value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}] buttons: [{
value: BI.i18nText("BI-Basic_Cancel"),
ghost: true
}, {value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}]
}); });
}, },
_init: function () { _init: function () {
@ -4079,9 +4082,9 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
var items = []; var items = [];
BI.each(o.buttons, function (i, buttonOpt) { BI.each(o.buttons, function (i, buttonOpt) {
if(BI.isWidget(buttonOpt)) { if (BI.isWidget(buttonOpt)) {
items.push(buttonOpt); items.push(buttonOpt);
}else{ } else {
items.push(BI.extend({ items.push(BI.extend({
type: "bi.button", type: "bi.button",
height: 30, height: 30,
@ -4111,14 +4114,37 @@ BI.shortcut("bi.bubble_bar_popup_view", BI.BubblePopupBarView);
*/ */
BI.TextBubblePopupBarView = BI.inherit(BI.Widget, { BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
props: { props: function () {
baseCls: "bi-text-bubble-bar-popup-view", return {
text: "", baseCls: "bi-text-bubble-bar-popup-view",
width: 250 text: "",
width: 250,
buttons: [{
level: "ignore",
value: false,
text: BI.i18nText("BI-Basic_Cancel")
}, {
value: true,
text: BI.i18nText("BI-Basic_Sure")
}]
};
}, },
render: function(){ render: function () {
var self = this, o = this.options; var self = this, o = this.options;
var buttons = BI.map(o.buttons, function (index, buttonOpt) {
if (BI.isWidget(buttonOpt)) {
return buttonOpt;
}
return BI.extend({
type: "bi.button",
height: 24,
handler: function (v) {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v);
}
}, buttonOpt);
});
return { return {
type: "bi.bubble_bar_popup_view", type: "bi.bubble_bar_popup_view",
ref: function () { ref: function () {
@ -4139,22 +4165,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
tgap: 25, tgap: 25,
bgap: 10 bgap: 10
}, },
buttons: [{ buttons: buttons
type: "bi.button",
value: BI.i18nText("BI-Basic_Cancel"),
level: "ignore",
height: 24,
handler: function () {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, false);
}
}, {
type: "bi.button",
value: BI.i18nText("BI-Basic_Sure"),
height: 24,
handler: function () {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, true);
}
}]
}; };
}, },

100
dist/core.js vendored

@ -30723,106 +30723,6 @@ BI.RightVerticalAdaptLayout = BI.inherit(BI.Layout, {
} }
}); });
BI.shortcut("bi.right_vertical_adapt", BI.RightVerticalAdaptLayout);/** BI.shortcut("bi.right_vertical_adapt", BI.RightVerticalAdaptLayout);/**
* 使用display:table和display:table-cell实现的horizontal布局
* @class BI.TableAdaptLayout
* @extends BI.Layout
*/
BI.TableAdaptLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.TableAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-table-center-adapt-layout",
columnSize: [],
verticalAlign: BI.VerticalAlign.Top,
horizontalAlign: BI.HorizontalAlign.Left,
hgap: 0,
vgap: 0,
lgap: 0,
rgap: 0,
tgap: 0,
bgap: 0
});
},
render: function () {
var o = this.options;
BI.TableAdaptLayout.superclass.render.apply(this, arguments);
this.$table = BI.Widget._renderEngine.createElement("<div>").css({
position: "relative",
display: "table",
height: o.verticalAlign === BI.VerticalAlign.Middle ? "100%" : "auto",
width: o.horizontalAlign === BI.HorizontalAlign.Center ? "100%" : "auto",
"white-space": "nowrap"
});
this.populate(this.options.items);
},
_addElement: function (i, item) {
var o = this.options;
var td;
var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : o.columnSize[i];
if (!this.hasWidget(this._getChildName(i))) {
var w = BI.createWidget(item);
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"});
td = BI.createWidget({
type: "bi.default",
width: width,
items: [w]
});
this.addWidget(this._getChildName(i), td);
} else {
td = this.getWidgetByName(this._getChildName(i));
td.element.width(width);
}
td.element.css({"max-width": o.columnSize[i] + "px"});
if (i === 0) {
td.element.addClass("first-element");
}
td.element.css({
position: "relative",
display: "table-cell",
"vertical-align": "middle",
margin: "0",
padding: "0",
height: "100%"
});
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
});
}
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) + "px"
});
}
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
});
}
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
});
}
return td;
},
appendFragment: function (frag) {
this.$table.append(frag);
this.element.append(this.$table);
},
resize: function () {
// console.log("center_adapt布局不需要resize");
},
populate: function (items) {
BI.TableAdaptLayout.superclass.populate.apply(this, arguments);
this._mount();
}
});
BI.shortcut("bi.table_adapt", BI.TableAdaptLayout);/**
* 垂直方向居中容器 * 垂直方向居中容器
* @class BI.VerticalAdaptLayout * @class BI.VerticalAdaptLayout
* @extends BI.Layout * @extends BI.Layout

25
dist/demo.js vendored

@ -6126,30 +6126,7 @@ Demo.HtapeLayout = BI.inherit(BI.Widget, {
}; };
} }
}); });
BI.shortcut("demo.htape", Demo.HtapeLayout);Demo.InlineVerticalLayout = BI.inherit(BI.Widget, { BI.shortcut("demo.htape", Demo.HtapeLayout);/**
props: {
baseCls: "demo-absolute"
},
render: function () {
return {
type: "bi.inline_vertical_adapt",
items: [{
type: "bi.label",
text: "绝对布局",
cls: "layout-bg1",
width: 300,
height: 200
}, {
type: "bi.label",
text: "绝对布局",
cls: "layout-bg1",
width: 300,
height: 100
}]
};
}
});
BI.shortcut("demo.inline_vertical", Demo.InlineVerticalLayout);/**
* Created by User on 2017/3/22. * Created by User on 2017/3/22.
*/ */
Demo.LeftRightVerticalAdaptLayout = BI.inherit(BI.Widget, { Demo.LeftRightVerticalAdaptLayout = BI.inherit(BI.Widget, {

59
dist/fineui.ie.js vendored

@ -52636,7 +52636,10 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-bubble-bar-popup-view", extraCls: "bi-bubble-bar-popup-view",
buttons: [{value: BI.i18nText("BI-Basic_Cancel"), ghost: true}, {value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}] buttons: [{
value: BI.i18nText("BI-Basic_Cancel"),
ghost: true
}, {value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}]
}); });
}, },
_init: function () { _init: function () {
@ -52647,9 +52650,9 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
var items = []; var items = [];
BI.each(o.buttons, function (i, buttonOpt) { BI.each(o.buttons, function (i, buttonOpt) {
if(BI.isWidget(buttonOpt)) { if (BI.isWidget(buttonOpt)) {
items.push(buttonOpt); items.push(buttonOpt);
}else{ } else {
items.push(BI.extend({ items.push(BI.extend({
type: "bi.button", type: "bi.button",
height: 30, height: 30,
@ -52679,14 +52682,37 @@ BI.shortcut("bi.bubble_bar_popup_view", BI.BubblePopupBarView);
*/ */
BI.TextBubblePopupBarView = BI.inherit(BI.Widget, { BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
props: { props: function () {
baseCls: "bi-text-bubble-bar-popup-view", return {
text: "", baseCls: "bi-text-bubble-bar-popup-view",
width: 250 text: "",
width: 250,
buttons: [{
level: "ignore",
value: false,
text: BI.i18nText("BI-Basic_Cancel")
}, {
value: true,
text: BI.i18nText("BI-Basic_Sure")
}]
};
}, },
render: function(){ render: function () {
var self = this, o = this.options; var self = this, o = this.options;
var buttons = BI.map(o.buttons, function (index, buttonOpt) {
if (BI.isWidget(buttonOpt)) {
return buttonOpt;
}
return BI.extend({
type: "bi.button",
height: 24,
handler: function (v) {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v);
}
}, buttonOpt);
});
return { return {
type: "bi.bubble_bar_popup_view", type: "bi.bubble_bar_popup_view",
ref: function () { ref: function () {
@ -52707,22 +52733,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
tgap: 25, tgap: 25,
bgap: 10 bgap: 10
}, },
buttons: [{ buttons: buttons
type: "bi.button",
value: BI.i18nText("BI-Basic_Cancel"),
level: "ignore",
height: 24,
handler: function () {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, false);
}
}, {
type: "bi.button",
value: BI.i18nText("BI-Basic_Sure"),
height: 24,
handler: function () {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, true);
}
}]
}; };
}, },

4
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

159
dist/fineui.js vendored

@ -30965,106 +30965,6 @@ BI.RightVerticalAdaptLayout = BI.inherit(BI.Layout, {
} }
}); });
BI.shortcut("bi.right_vertical_adapt", BI.RightVerticalAdaptLayout);/** BI.shortcut("bi.right_vertical_adapt", BI.RightVerticalAdaptLayout);/**
* 使用display:table和display:table-cell实现的horizontal布局
* @class BI.TableAdaptLayout
* @extends BI.Layout
*/
BI.TableAdaptLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.TableAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-table-center-adapt-layout",
columnSize: [],
verticalAlign: BI.VerticalAlign.Top,
horizontalAlign: BI.HorizontalAlign.Left,
hgap: 0,
vgap: 0,
lgap: 0,
rgap: 0,
tgap: 0,
bgap: 0
});
},
render: function () {
var o = this.options;
BI.TableAdaptLayout.superclass.render.apply(this, arguments);
this.$table = BI.Widget._renderEngine.createElement("<div>").css({
position: "relative",
display: "table",
height: o.verticalAlign === BI.VerticalAlign.Middle ? "100%" : "auto",
width: o.horizontalAlign === BI.HorizontalAlign.Center ? "100%" : "auto",
"white-space": "nowrap"
});
this.populate(this.options.items);
},
_addElement: function (i, item) {
var o = this.options;
var td;
var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : o.columnSize[i];
if (!this.hasWidget(this._getChildName(i))) {
var w = BI.createWidget(item);
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"});
td = BI.createWidget({
type: "bi.default",
width: width,
items: [w]
});
this.addWidget(this._getChildName(i), td);
} else {
td = this.getWidgetByName(this._getChildName(i));
td.element.width(width);
}
td.element.css({"max-width": o.columnSize[i] + "px"});
if (i === 0) {
td.element.addClass("first-element");
}
td.element.css({
position: "relative",
display: "table-cell",
"vertical-align": "middle",
margin: "0",
padding: "0",
height: "100%"
});
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
});
}
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) + "px"
});
}
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
});
}
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
});
}
return td;
},
appendFragment: function (frag) {
this.$table.append(frag);
this.element.append(this.$table);
},
resize: function () {
// console.log("center_adapt布局不需要resize");
},
populate: function (items) {
BI.TableAdaptLayout.superclass.populate.apply(this, arguments);
this._mount();
}
});
BI.shortcut("bi.table_adapt", BI.TableAdaptLayout);/**
* 垂直方向居中容器 * 垂直方向居中容器
* @class BI.VerticalAdaptLayout * @class BI.VerticalAdaptLayout
* @extends BI.Layout * @extends BI.Layout
@ -53140,7 +53040,10 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-bubble-bar-popup-view", extraCls: "bi-bubble-bar-popup-view",
buttons: [{value: BI.i18nText("BI-Basic_Cancel"), ghost: true}, {value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}] buttons: [{
value: BI.i18nText("BI-Basic_Cancel"),
ghost: true
}, {value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}]
}); });
}, },
_init: function () { _init: function () {
@ -53151,9 +53054,9 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
var items = []; var items = [];
BI.each(o.buttons, function (i, buttonOpt) { BI.each(o.buttons, function (i, buttonOpt) {
if(BI.isWidget(buttonOpt)) { if (BI.isWidget(buttonOpt)) {
items.push(buttonOpt); items.push(buttonOpt);
}else{ } else {
items.push(BI.extend({ items.push(BI.extend({
type: "bi.button", type: "bi.button",
height: 30, height: 30,
@ -53183,14 +53086,37 @@ BI.shortcut("bi.bubble_bar_popup_view", BI.BubblePopupBarView);
*/ */
BI.TextBubblePopupBarView = BI.inherit(BI.Widget, { BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
props: { props: function () {
baseCls: "bi-text-bubble-bar-popup-view", return {
text: "", baseCls: "bi-text-bubble-bar-popup-view",
width: 250 text: "",
width: 250,
buttons: [{
level: "ignore",
value: false,
text: BI.i18nText("BI-Basic_Cancel")
}, {
value: true,
text: BI.i18nText("BI-Basic_Sure")
}]
};
}, },
render: function(){ render: function () {
var self = this, o = this.options; var self = this, o = this.options;
var buttons = BI.map(o.buttons, function (index, buttonOpt) {
if (BI.isWidget(buttonOpt)) {
return buttonOpt;
}
return BI.extend({
type: "bi.button",
height: 24,
handler: function (v) {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v);
}
}, buttonOpt);
});
return { return {
type: "bi.bubble_bar_popup_view", type: "bi.bubble_bar_popup_view",
ref: function () { ref: function () {
@ -53211,22 +53137,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
tgap: 25, tgap: 25,
bgap: 10 bgap: 10
}, },
buttons: [{ buttons: buttons
type: "bi.button",
value: BI.i18nText("BI-Basic_Cancel"),
level: "ignore",
height: 24,
handler: function () {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, false);
}
}, {
type: "bi.button",
value: BI.i18nText("BI-Basic_Sure"),
height: 24,
handler: function () {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, true);
}
}]
}; };
}, },

60
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

159
dist/fineui_without_jquery_polyfill.js vendored

@ -19734,106 +19734,6 @@ BI.RightVerticalAdaptLayout = BI.inherit(BI.Layout, {
} }
}); });
BI.shortcut("bi.right_vertical_adapt", BI.RightVerticalAdaptLayout);/** BI.shortcut("bi.right_vertical_adapt", BI.RightVerticalAdaptLayout);/**
* 使用display:table和display:table-cell实现的horizontal布局
* @class BI.TableAdaptLayout
* @extends BI.Layout
*/
BI.TableAdaptLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.TableAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-table-center-adapt-layout",
columnSize: [],
verticalAlign: BI.VerticalAlign.Top,
horizontalAlign: BI.HorizontalAlign.Left,
hgap: 0,
vgap: 0,
lgap: 0,
rgap: 0,
tgap: 0,
bgap: 0
});
},
render: function () {
var o = this.options;
BI.TableAdaptLayout.superclass.render.apply(this, arguments);
this.$table = BI.Widget._renderEngine.createElement("<div>").css({
position: "relative",
display: "table",
height: o.verticalAlign === BI.VerticalAlign.Middle ? "100%" : "auto",
width: o.horizontalAlign === BI.HorizontalAlign.Center ? "100%" : "auto",
"white-space": "nowrap"
});
this.populate(this.options.items);
},
_addElement: function (i, item) {
var o = this.options;
var td;
var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : o.columnSize[i];
if (!this.hasWidget(this._getChildName(i))) {
var w = BI.createWidget(item);
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"});
td = BI.createWidget({
type: "bi.default",
width: width,
items: [w]
});
this.addWidget(this._getChildName(i), td);
} else {
td = this.getWidgetByName(this._getChildName(i));
td.element.width(width);
}
td.element.css({"max-width": o.columnSize[i] + "px"});
if (i === 0) {
td.element.addClass("first-element");
}
td.element.css({
position: "relative",
display: "table-cell",
"vertical-align": "middle",
margin: "0",
padding: "0",
height: "100%"
});
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
});
}
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) + "px"
});
}
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
});
}
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
});
}
return td;
},
appendFragment: function (frag) {
this.$table.append(frag);
this.element.append(this.$table);
},
resize: function () {
// console.log("center_adapt布局不需要resize");
},
populate: function (items) {
BI.TableAdaptLayout.superclass.populate.apply(this, arguments);
this._mount();
}
});
BI.shortcut("bi.table_adapt", BI.TableAdaptLayout);/**
* 垂直方向居中容器 * 垂直方向居中容器
* @class BI.VerticalAdaptLayout * @class BI.VerticalAdaptLayout
* @extends BI.Layout * @extends BI.Layout
@ -36218,7 +36118,10 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-bubble-bar-popup-view", extraCls: "bi-bubble-bar-popup-view",
buttons: [{value: BI.i18nText("BI-Basic_Cancel"), ghost: true}, {value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}] buttons: [{
value: BI.i18nText("BI-Basic_Cancel"),
ghost: true
}, {value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}]
}); });
}, },
_init: function () { _init: function () {
@ -36229,9 +36132,9 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
var items = []; var items = [];
BI.each(o.buttons, function (i, buttonOpt) { BI.each(o.buttons, function (i, buttonOpt) {
if(BI.isWidget(buttonOpt)) { if (BI.isWidget(buttonOpt)) {
items.push(buttonOpt); items.push(buttonOpt);
}else{ } else {
items.push(BI.extend({ items.push(BI.extend({
type: "bi.button", type: "bi.button",
height: 30, height: 30,
@ -36261,14 +36164,37 @@ BI.shortcut("bi.bubble_bar_popup_view", BI.BubblePopupBarView);
*/ */
BI.TextBubblePopupBarView = BI.inherit(BI.Widget, { BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
props: { props: function () {
baseCls: "bi-text-bubble-bar-popup-view", return {
text: "", baseCls: "bi-text-bubble-bar-popup-view",
width: 250 text: "",
width: 250,
buttons: [{
level: "ignore",
value: false,
text: BI.i18nText("BI-Basic_Cancel")
}, {
value: true,
text: BI.i18nText("BI-Basic_Sure")
}]
};
}, },
render: function(){ render: function () {
var self = this, o = this.options; var self = this, o = this.options;
var buttons = BI.map(o.buttons, function (index, buttonOpt) {
if (BI.isWidget(buttonOpt)) {
return buttonOpt;
}
return BI.extend({
type: "bi.button",
height: 24,
handler: function (v) {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v);
}
}, buttonOpt);
});
return { return {
type: "bi.bubble_bar_popup_view", type: "bi.bubble_bar_popup_view",
ref: function () { ref: function () {
@ -36289,22 +36215,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
tgap: 25, tgap: 25,
bgap: 10 bgap: 10
}, },
buttons: [{ buttons: buttons
type: "bi.button",
value: BI.i18nText("BI-Basic_Cancel"),
level: "ignore",
height: 24,
handler: function () {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, false);
}
}, {
type: "bi.button",
value: BI.i18nText("BI-Basic_Sure"),
height: 24,
handler: function () {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, true);
}
}]
}; };
}, },

2
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

59
src/case/combo/bubblecombo/popup.bubble.js

@ -82,7 +82,10 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-bubble-bar-popup-view", extraCls: "bi-bubble-bar-popup-view",
buttons: [{value: BI.i18nText("BI-Basic_Cancel"), ghost: true}, {value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}] buttons: [{
value: BI.i18nText("BI-Basic_Cancel"),
ghost: true
}, {value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}]
}); });
}, },
_init: function () { _init: function () {
@ -93,9 +96,9 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
var items = []; var items = [];
BI.each(o.buttons, function (i, buttonOpt) { BI.each(o.buttons, function (i, buttonOpt) {
if(BI.isWidget(buttonOpt)) { if (BI.isWidget(buttonOpt)) {
items.push(buttonOpt); items.push(buttonOpt);
}else{ } else {
items.push(BI.extend({ items.push(BI.extend({
type: "bi.button", type: "bi.button",
height: 30, height: 30,
@ -125,14 +128,37 @@ BI.shortcut("bi.bubble_bar_popup_view", BI.BubblePopupBarView);
*/ */
BI.TextBubblePopupBarView = BI.inherit(BI.Widget, { BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
props: { props: function () {
baseCls: "bi-text-bubble-bar-popup-view", return {
text: "", baseCls: "bi-text-bubble-bar-popup-view",
width: 250 text: "",
width: 250,
buttons: [{
level: "ignore",
value: false,
text: BI.i18nText("BI-Basic_Cancel")
}, {
value: true,
text: BI.i18nText("BI-Basic_Sure")
}]
};
}, },
render: function(){ render: function () {
var self = this, o = this.options; var self = this, o = this.options;
var buttons = BI.map(o.buttons, function (index, buttonOpt) {
if (BI.isWidget(buttonOpt)) {
return buttonOpt;
}
return BI.extend({
type: "bi.button",
height: 24,
handler: function (v) {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v);
}
}, buttonOpt);
});
return { return {
type: "bi.bubble_bar_popup_view", type: "bi.bubble_bar_popup_view",
ref: function () { ref: function () {
@ -153,22 +179,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
tgap: 25, tgap: 25,
bgap: 10 bgap: 10
}, },
buttons: [{ buttons: buttons
type: "bi.button",
value: BI.i18nText("BI-Basic_Cancel"),
level: "ignore",
height: 24,
handler: function () {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, false);
}
}, {
type: "bi.button",
value: BI.i18nText("BI-Basic_Sure"),
height: 24,
handler: function () {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, true);
}
}]
}; };
}, },

Loading…
Cancel
Save