Browse Source

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

* commit '84ffa84856e9a1f4a4a485541da1d0320361e50c':
  update
  BI-34242 气泡视觉统一 && 代码整理
master
windy 6 years ago
parent
commit
a21c1660e7
  1. 10
      dist/base.js
  2. 148
      dist/bundle.ie.js
  3. 44
      dist/bundle.ie.min.js
  4. 148
      dist/bundle.js
  5. 50
      dist/bundle.min.js
  6. 124
      dist/case.js
  7. 148
      dist/fineui.ie.js
  8. 44
      dist/fineui.ie.min.js
  9. 148
      dist/fineui.js
  10. 50
      dist/fineui.min.js
  11. 148
      dist/fineui_without_jquery_polyfill.js
  12. 2
      dist/utils.min.js
  13. 14
      dist/widget.js
  14. 10
      src/base/layer/layer.popup.js
  15. 5
      src/case/combo/bubblecombo/combo.bubble.js
  16. 119
      src/case/combo/bubblecombo/popup.bubble.js

10
dist/base.js vendored

@ -5924,7 +5924,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
this.view = this._createView();
this.toolbar = this._createToolBar();
this.button_group.on(BI.Controller.EVENT_CHANGE, function (type) {
this.view.on(BI.Controller.EVENT_CHANGE, function (type) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
if (type === BI.Events.CLICK) {
self.fireEvent(BI.PopupView.EVENT_CHANGE);
@ -5999,11 +5999,11 @@ BI.PopupView = BI.inherit(BI.Widget, {
},
getView: function () {
return this.button_group;
return this.view;
},
populate: function (items) {
this.button_group.populate.apply(this.button_group, arguments);
this.view.populate.apply(this.view, arguments);
},
resetWidth: function (w) {
@ -6022,11 +6022,11 @@ BI.PopupView = BI.inherit(BI.Widget, {
setValue: function (selectedValues) {
this.tab && this.tab.setValue(selectedValues);
this.button_group.setValue(selectedValues);
this.view.setValue(selectedValues);
},
getValue: function () {
return this.button_group.getValue();
return this.view.getValue();
}
});
BI.PopupView.EVENT_CHANGE = "EVENT_CHANGE";

148
dist/bundle.ie.js vendored

@ -40934,7 +40934,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
this.view = this._createView();
this.toolbar = this._createToolBar();
this.button_group.on(BI.Controller.EVENT_CHANGE, function (type) {
this.view.on(BI.Controller.EVENT_CHANGE, function (type) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
if (type === BI.Events.CLICK) {
self.fireEvent(BI.PopupView.EVENT_CHANGE);
@ -41009,11 +41009,11 @@ BI.PopupView = BI.inherit(BI.Widget, {
},
getView: function () {
return this.button_group;
return this.view;
},
populate: function (items) {
this.button_group.populate.apply(this.button_group, arguments);
this.view.populate.apply(this.view, arguments);
},
resetWidth: function (w) {
@ -41032,11 +41032,11 @@ BI.PopupView = BI.inherit(BI.Widget, {
setValue: function (selectedValues) {
this.tab && this.tab.setValue(selectedValues);
this.button_group.setValue(selectedValues);
this.view.setValue(selectedValues);
},
getValue: function () {
return this.button_group.getValue();
return this.view.getValue();
}
});
BI.PopupView.EVENT_CHANGE = "EVENT_CHANGE";
@ -52344,22 +52344,18 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
case "left,top":
case "left,bottom":
this._createLeftTriangle();
//this.combo.getView().showLine("right");
break;
case "right,top":
case "right,bottom":
this._createRightTriangle();
//this.combo.getView().showLine("left");
break;
case "top,left":
case "top,right":
this._createTopTriangle();
//this.combo.getView().showLine("bottom");
break;
case "bottom,left":
case "bottom,right":
this._createBottomTriangle();
//this.combo.getView().showLine("top");
break;
}
},
@ -52367,7 +52363,6 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
_hideTriangle: function () {
this.triangle && this.triangle.destroy();
this.triangle = null;
//this.combo.getView() && this.combo.getView().hideLine();
},
hideView: function () {
@ -52405,65 +52400,14 @@ BI.BubblePopupView = BI.inherit(BI.PopupView, {
_defaultConfig: function () {
var config = BI.BubblePopupView.superclass._defaultConfig.apply(this, arguments);
return BI.extend(config, {
baseCls: config.baseCls + " bi-bubble-popup-view"
baseCls: config.baseCls + " bi-bubble-popup-view",
minWidth: 220,
maxWidth: 300,
minHeight: 90
});
},
_init: function () {
BI.BubblePopupView.superclass._init.apply(this, arguments);
},
showLine: function (direction) {
var pos = {}, op = {};
switch (direction) {
case "left":
pos = {
top: 0,
bottom: 0,
left: -1
};
op = {width: 3};
break;
case "right":
pos = {
top: 0,
bottom: 0,
right: -1
};
op = {width: 3};
break;
case "top":
pos = {
left: 0,
right: 0,
top: -1
};
op = {height: 3};
break;
case "bottom":
pos = {
left: 0,
right: 0,
bottom: -1
};
op = {height: 3};
break;
default:
break;
}
this.line = BI.createWidget(op, {
type: "bi.layout",
cls: "bubble-popup-line bi-high-light-background"
});
pos.el = this.line;
BI.createWidget({
type: "bi.absolute",
element: this,
items: [pos]
});
},
hideLine: function () {
this.line && this.line.destroy();
}
});
@ -52498,7 +52442,7 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
} else {
items.push(BI.extend({
type: "bi.button",
height: 30,
height: 24,
handler: function (v) {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v);
}
@ -52506,12 +52450,33 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
}
});
return BI.createWidget({
type: "bi.right_vertical_adapt",
type: "bi.center",
height: 44,
hgap: 10,
bgap: 10,
items: items
rgap: 15,
items: [{
type: "bi.right_vertical_adapt",
lgap: 10,
items: items
}]
});
},
_createView: function () {
var o = this.options;
var button = BI.createWidget({
type: "bi.button_group",
items: [o.el],
layouts: [{
type: "bi.vertical",
hgap: 15,
tgap: 10
}]
});
button.element.css("min-height", o.minHeight - 44);
return button;
}
});
BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON = "EVENT_CLICK_TOOLBAR_BUTTON";
@ -52529,7 +52494,6 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
return {
baseCls: "bi-text-bubble-bar-popup-view",
text: "",
width: 250,
buttons: [{
level: "ignore",
value: false,
@ -52562,19 +52526,13 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
self.popup = this;
},
el: {
type: "bi.vertical",
items: [{
type: "bi.label",
text: o.text,
whiteSpace: "normal",
textAlign: "left",
ref: function () {
self.text = this;
}
}],
hgap: 10,
tgap: 25,
bgap: 10
type: "bi.label",
text: o.text,
whiteSpace: "normal",
textAlign: "left",
ref: function () {
self.text = this;
}
},
buttons: buttons
};
@ -52582,14 +52540,6 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
populate: function (v) {
this.text.setText(v || this.options.text);
},
showLine: function (direction) {
this.popup.showLine(direction);
},
hideLine: function () {
this.popup.hideLine();
}
});
BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CHANGE";
@ -77488,7 +77438,7 @@ BI.DateInterval = BI.inherit(BI.Single, {
height: 24,
width: 24,
lgap: 15,
offset: -15,
offset: 0,
timeErrorCls: "time-error",
DATE_MIN_VALUE: "1900-01-01",
DATE_MAX_VALUE: "2099-12-31"
@ -77515,14 +77465,13 @@ BI.DateInterval = BI.inherit(BI.Single, {
BI.createWidget({
element: self,
type: "bi.center",
hgap: 10,
height: this.constants.height,
items: [{
type: "bi.absolute",
items: [{
el: self.left,
left: this.constants.offset,
right: 0,
right: this.constants.width / 2,
top: 0,
bottom: 0
}]
@ -77530,7 +77479,7 @@ BI.DateInterval = BI.inherit(BI.Single, {
type: "bi.absolute",
items: [{
el: self.right,
left: 0,
left: this.constants.width / 2,
right: this.constants.offset,
top: 0,
bottom: 0
@ -77668,7 +77617,7 @@ BI.TimeInterval = BI.inherit(BI.Single, {
height: 24,
width: 24,
lgap: 15,
offset: -15,
offset: 0,
timeErrorCls: "time-error",
DATE_MIN_VALUE: "1900-01-01",
DATE_MAX_VALUE: "2099-12-31"
@ -77695,14 +77644,13 @@ BI.TimeInterval = BI.inherit(BI.Single, {
BI.createWidget({
element: self,
type: "bi.center",
hgap: 10,
height: this.constants.height,
items: [{
type: "bi.absolute",
items: [{
el: self.left,
left: this.constants.offset,
right: 0,
right: this.constants.width / 2,
top: 0,
bottom: 0
}]
@ -77710,7 +77658,7 @@ BI.TimeInterval = BI.inherit(BI.Single, {
type: "bi.absolute",
items: [{
el: self.right,
left: 0,
left: this.constants.width / 2,
right: this.constants.offset,
top: 0,
bottom: 0

44
dist/bundle.ie.min.js vendored

File diff suppressed because one or more lines are too long

148
dist/bundle.js vendored

@ -41338,7 +41338,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
this.view = this._createView();
this.toolbar = this._createToolBar();
this.button_group.on(BI.Controller.EVENT_CHANGE, function (type) {
this.view.on(BI.Controller.EVENT_CHANGE, function (type) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
if (type === BI.Events.CLICK) {
self.fireEvent(BI.PopupView.EVENT_CHANGE);
@ -41413,11 +41413,11 @@ BI.PopupView = BI.inherit(BI.Widget, {
},
getView: function () {
return this.button_group;
return this.view;
},
populate: function (items) {
this.button_group.populate.apply(this.button_group, arguments);
this.view.populate.apply(this.view, arguments);
},
resetWidth: function (w) {
@ -41436,11 +41436,11 @@ BI.PopupView = BI.inherit(BI.Widget, {
setValue: function (selectedValues) {
this.tab && this.tab.setValue(selectedValues);
this.button_group.setValue(selectedValues);
this.view.setValue(selectedValues);
},
getValue: function () {
return this.button_group.getValue();
return this.view.getValue();
}
});
BI.PopupView.EVENT_CHANGE = "EVENT_CHANGE";
@ -52748,22 +52748,18 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
case "left,top":
case "left,bottom":
this._createLeftTriangle();
//this.combo.getView().showLine("right");
break;
case "right,top":
case "right,bottom":
this._createRightTriangle();
//this.combo.getView().showLine("left");
break;
case "top,left":
case "top,right":
this._createTopTriangle();
//this.combo.getView().showLine("bottom");
break;
case "bottom,left":
case "bottom,right":
this._createBottomTriangle();
//this.combo.getView().showLine("top");
break;
}
},
@ -52771,7 +52767,6 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
_hideTriangle: function () {
this.triangle && this.triangle.destroy();
this.triangle = null;
//this.combo.getView() && this.combo.getView().hideLine();
},
hideView: function () {
@ -52809,65 +52804,14 @@ BI.BubblePopupView = BI.inherit(BI.PopupView, {
_defaultConfig: function () {
var config = BI.BubblePopupView.superclass._defaultConfig.apply(this, arguments);
return BI.extend(config, {
baseCls: config.baseCls + " bi-bubble-popup-view"
baseCls: config.baseCls + " bi-bubble-popup-view",
minWidth: 220,
maxWidth: 300,
minHeight: 90
});
},
_init: function () {
BI.BubblePopupView.superclass._init.apply(this, arguments);
},
showLine: function (direction) {
var pos = {}, op = {};
switch (direction) {
case "left":
pos = {
top: 0,
bottom: 0,
left: -1
};
op = {width: 3};
break;
case "right":
pos = {
top: 0,
bottom: 0,
right: -1
};
op = {width: 3};
break;
case "top":
pos = {
left: 0,
right: 0,
top: -1
};
op = {height: 3};
break;
case "bottom":
pos = {
left: 0,
right: 0,
bottom: -1
};
op = {height: 3};
break;
default:
break;
}
this.line = BI.createWidget(op, {
type: "bi.layout",
cls: "bubble-popup-line bi-high-light-background"
});
pos.el = this.line;
BI.createWidget({
type: "bi.absolute",
element: this,
items: [pos]
});
},
hideLine: function () {
this.line && this.line.destroy();
}
});
@ -52902,7 +52846,7 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
} else {
items.push(BI.extend({
type: "bi.button",
height: 30,
height: 24,
handler: function (v) {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v);
}
@ -52910,12 +52854,33 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
}
});
return BI.createWidget({
type: "bi.right_vertical_adapt",
type: "bi.center",
height: 44,
hgap: 10,
bgap: 10,
items: items
rgap: 15,
items: [{
type: "bi.right_vertical_adapt",
lgap: 10,
items: items
}]
});
},
_createView: function () {
var o = this.options;
var button = BI.createWidget({
type: "bi.button_group",
items: [o.el],
layouts: [{
type: "bi.vertical",
hgap: 15,
tgap: 10
}]
});
button.element.css("min-height", o.minHeight - 44);
return button;
}
});
BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON = "EVENT_CLICK_TOOLBAR_BUTTON";
@ -52933,7 +52898,6 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
return {
baseCls: "bi-text-bubble-bar-popup-view",
text: "",
width: 250,
buttons: [{
level: "ignore",
value: false,
@ -52966,19 +52930,13 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
self.popup = this;
},
el: {
type: "bi.vertical",
items: [{
type: "bi.label",
text: o.text,
whiteSpace: "normal",
textAlign: "left",
ref: function () {
self.text = this;
}
}],
hgap: 10,
tgap: 25,
bgap: 10
type: "bi.label",
text: o.text,
whiteSpace: "normal",
textAlign: "left",
ref: function () {
self.text = this;
}
},
buttons: buttons
};
@ -52986,14 +52944,6 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
populate: function (v) {
this.text.setText(v || this.options.text);
},
showLine: function (direction) {
this.popup.showLine(direction);
},
hideLine: function () {
this.popup.hideLine();
}
});
BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CHANGE";
@ -77892,7 +77842,7 @@ BI.DateInterval = BI.inherit(BI.Single, {
height: 24,
width: 24,
lgap: 15,
offset: -15,
offset: 0,
timeErrorCls: "time-error",
DATE_MIN_VALUE: "1900-01-01",
DATE_MAX_VALUE: "2099-12-31"
@ -77919,14 +77869,13 @@ BI.DateInterval = BI.inherit(BI.Single, {
BI.createWidget({
element: self,
type: "bi.center",
hgap: 10,
height: this.constants.height,
items: [{
type: "bi.absolute",
items: [{
el: self.left,
left: this.constants.offset,
right: 0,
right: this.constants.width / 2,
top: 0,
bottom: 0
}]
@ -77934,7 +77883,7 @@ BI.DateInterval = BI.inherit(BI.Single, {
type: "bi.absolute",
items: [{
el: self.right,
left: 0,
left: this.constants.width / 2,
right: this.constants.offset,
top: 0,
bottom: 0
@ -78072,7 +78021,7 @@ BI.TimeInterval = BI.inherit(BI.Single, {
height: 24,
width: 24,
lgap: 15,
offset: -15,
offset: 0,
timeErrorCls: "time-error",
DATE_MIN_VALUE: "1900-01-01",
DATE_MAX_VALUE: "2099-12-31"
@ -78099,14 +78048,13 @@ BI.TimeInterval = BI.inherit(BI.Single, {
BI.createWidget({
element: self,
type: "bi.center",
hgap: 10,
height: this.constants.height,
items: [{
type: "bi.absolute",
items: [{
el: self.left,
left: this.constants.offset,
right: 0,
right: this.constants.width / 2,
top: 0,
bottom: 0
}]
@ -78114,7 +78062,7 @@ BI.TimeInterval = BI.inherit(BI.Single, {
type: "bi.absolute",
items: [{
el: self.right,
left: 0,
left: this.constants.width / 2,
right: this.constants.offset,
top: 0,
bottom: 0

50
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

124
dist/case.js vendored

@ -3933,22 +3933,18 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
case "left,top":
case "left,bottom":
this._createLeftTriangle();
//this.combo.getView().showLine("right");
break;
case "right,top":
case "right,bottom":
this._createRightTriangle();
//this.combo.getView().showLine("left");
break;
case "top,left":
case "top,right":
this._createTopTriangle();
//this.combo.getView().showLine("bottom");
break;
case "bottom,left":
case "bottom,right":
this._createBottomTriangle();
//this.combo.getView().showLine("top");
break;
}
},
@ -3956,7 +3952,6 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
_hideTriangle: function () {
this.triangle && this.triangle.destroy();
this.triangle = null;
//this.combo.getView() && this.combo.getView().hideLine();
},
hideView: function () {
@ -3994,65 +3989,14 @@ BI.BubblePopupView = BI.inherit(BI.PopupView, {
_defaultConfig: function () {
var config = BI.BubblePopupView.superclass._defaultConfig.apply(this, arguments);
return BI.extend(config, {
baseCls: config.baseCls + " bi-bubble-popup-view"
baseCls: config.baseCls + " bi-bubble-popup-view",
minWidth: 220,
maxWidth: 300,
minHeight: 90
});
},
_init: function () {
BI.BubblePopupView.superclass._init.apply(this, arguments);
},
showLine: function (direction) {
var pos = {}, op = {};
switch (direction) {
case "left":
pos = {
top: 0,
bottom: 0,
left: -1
};
op = {width: 3};
break;
case "right":
pos = {
top: 0,
bottom: 0,
right: -1
};
op = {width: 3};
break;
case "top":
pos = {
left: 0,
right: 0,
top: -1
};
op = {height: 3};
break;
case "bottom":
pos = {
left: 0,
right: 0,
bottom: -1
};
op = {height: 3};
break;
default:
break;
}
this.line = BI.createWidget(op, {
type: "bi.layout",
cls: "bubble-popup-line bi-high-light-background"
});
pos.el = this.line;
BI.createWidget({
type: "bi.absolute",
element: this,
items: [pos]
});
},
hideLine: function () {
this.line && this.line.destroy();
}
});
@ -4087,7 +4031,7 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
} else {
items.push(BI.extend({
type: "bi.button",
height: 30,
height: 24,
handler: function (v) {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v);
}
@ -4095,12 +4039,33 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
}
});
return BI.createWidget({
type: "bi.right_vertical_adapt",
type: "bi.center",
height: 44,
hgap: 10,
bgap: 10,
items: items
rgap: 15,
items: [{
type: "bi.right_vertical_adapt",
lgap: 10,
items: items
}]
});
},
_createView: function () {
var o = this.options;
var button = BI.createWidget({
type: "bi.button_group",
items: [o.el],
layouts: [{
type: "bi.vertical",
hgap: 15,
tgap: 10
}]
});
button.element.css("min-height", o.minHeight - 44);
return button;
}
});
BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON = "EVENT_CLICK_TOOLBAR_BUTTON";
@ -4118,7 +4083,6 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
return {
baseCls: "bi-text-bubble-bar-popup-view",
text: "",
width: 250,
buttons: [{
level: "ignore",
value: false,
@ -4151,19 +4115,13 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
self.popup = this;
},
el: {
type: "bi.vertical",
items: [{
type: "bi.label",
text: o.text,
whiteSpace: "normal",
textAlign: "left",
ref: function () {
self.text = this;
}
}],
hgap: 10,
tgap: 25,
bgap: 10
type: "bi.label",
text: o.text,
whiteSpace: "normal",
textAlign: "left",
ref: function () {
self.text = this;
}
},
buttons: buttons
};
@ -4171,14 +4129,6 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
populate: function (v) {
this.text.setText(v || this.options.text);
},
showLine: function (direction) {
this.popup.showLine(direction);
},
hideLine: function () {
this.popup.hideLine();
}
});
BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CHANGE";

148
dist/fineui.ie.js vendored

@ -41176,7 +41176,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
this.view = this._createView();
this.toolbar = this._createToolBar();
this.button_group.on(BI.Controller.EVENT_CHANGE, function (type) {
this.view.on(BI.Controller.EVENT_CHANGE, function (type) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
if (type === BI.Events.CLICK) {
self.fireEvent(BI.PopupView.EVENT_CHANGE);
@ -41251,11 +41251,11 @@ BI.PopupView = BI.inherit(BI.Widget, {
},
getView: function () {
return this.button_group;
return this.view;
},
populate: function (items) {
this.button_group.populate.apply(this.button_group, arguments);
this.view.populate.apply(this.view, arguments);
},
resetWidth: function (w) {
@ -41274,11 +41274,11 @@ BI.PopupView = BI.inherit(BI.Widget, {
setValue: function (selectedValues) {
this.tab && this.tab.setValue(selectedValues);
this.button_group.setValue(selectedValues);
this.view.setValue(selectedValues);
},
getValue: function () {
return this.button_group.getValue();
return this.view.getValue();
}
});
BI.PopupView.EVENT_CHANGE = "EVENT_CHANGE";
@ -52586,22 +52586,18 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
case "left,top":
case "left,bottom":
this._createLeftTriangle();
//this.combo.getView().showLine("right");
break;
case "right,top":
case "right,bottom":
this._createRightTriangle();
//this.combo.getView().showLine("left");
break;
case "top,left":
case "top,right":
this._createTopTriangle();
//this.combo.getView().showLine("bottom");
break;
case "bottom,left":
case "bottom,right":
this._createBottomTriangle();
//this.combo.getView().showLine("top");
break;
}
},
@ -52609,7 +52605,6 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
_hideTriangle: function () {
this.triangle && this.triangle.destroy();
this.triangle = null;
//this.combo.getView() && this.combo.getView().hideLine();
},
hideView: function () {
@ -52647,65 +52642,14 @@ BI.BubblePopupView = BI.inherit(BI.PopupView, {
_defaultConfig: function () {
var config = BI.BubblePopupView.superclass._defaultConfig.apply(this, arguments);
return BI.extend(config, {
baseCls: config.baseCls + " bi-bubble-popup-view"
baseCls: config.baseCls + " bi-bubble-popup-view",
minWidth: 220,
maxWidth: 300,
minHeight: 90
});
},
_init: function () {
BI.BubblePopupView.superclass._init.apply(this, arguments);
},
showLine: function (direction) {
var pos = {}, op = {};
switch (direction) {
case "left":
pos = {
top: 0,
bottom: 0,
left: -1
};
op = {width: 3};
break;
case "right":
pos = {
top: 0,
bottom: 0,
right: -1
};
op = {width: 3};
break;
case "top":
pos = {
left: 0,
right: 0,
top: -1
};
op = {height: 3};
break;
case "bottom":
pos = {
left: 0,
right: 0,
bottom: -1
};
op = {height: 3};
break;
default:
break;
}
this.line = BI.createWidget(op, {
type: "bi.layout",
cls: "bubble-popup-line bi-high-light-background"
});
pos.el = this.line;
BI.createWidget({
type: "bi.absolute",
element: this,
items: [pos]
});
},
hideLine: function () {
this.line && this.line.destroy();
}
});
@ -52740,7 +52684,7 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
} else {
items.push(BI.extend({
type: "bi.button",
height: 30,
height: 24,
handler: function (v) {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v);
}
@ -52748,12 +52692,33 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
}
});
return BI.createWidget({
type: "bi.right_vertical_adapt",
type: "bi.center",
height: 44,
hgap: 10,
bgap: 10,
items: items
rgap: 15,
items: [{
type: "bi.right_vertical_adapt",
lgap: 10,
items: items
}]
});
},
_createView: function () {
var o = this.options;
var button = BI.createWidget({
type: "bi.button_group",
items: [o.el],
layouts: [{
type: "bi.vertical",
hgap: 15,
tgap: 10
}]
});
button.element.css("min-height", o.minHeight - 44);
return button;
}
});
BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON = "EVENT_CLICK_TOOLBAR_BUTTON";
@ -52771,7 +52736,6 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
return {
baseCls: "bi-text-bubble-bar-popup-view",
text: "",
width: 250,
buttons: [{
level: "ignore",
value: false,
@ -52804,19 +52768,13 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
self.popup = this;
},
el: {
type: "bi.vertical",
items: [{
type: "bi.label",
text: o.text,
whiteSpace: "normal",
textAlign: "left",
ref: function () {
self.text = this;
}
}],
hgap: 10,
tgap: 25,
bgap: 10
type: "bi.label",
text: o.text,
whiteSpace: "normal",
textAlign: "left",
ref: function () {
self.text = this;
}
},
buttons: buttons
};
@ -52824,14 +52782,6 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
populate: function (v) {
this.text.setText(v || this.options.text);
},
showLine: function (direction) {
this.popup.showLine(direction);
},
hideLine: function () {
this.popup.hideLine();
}
});
BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CHANGE";
@ -77730,7 +77680,7 @@ BI.DateInterval = BI.inherit(BI.Single, {
height: 24,
width: 24,
lgap: 15,
offset: -15,
offset: 0,
timeErrorCls: "time-error",
DATE_MIN_VALUE: "1900-01-01",
DATE_MAX_VALUE: "2099-12-31"
@ -77757,14 +77707,13 @@ BI.DateInterval = BI.inherit(BI.Single, {
BI.createWidget({
element: self,
type: "bi.center",
hgap: 10,
height: this.constants.height,
items: [{
type: "bi.absolute",
items: [{
el: self.left,
left: this.constants.offset,
right: 0,
right: this.constants.width / 2,
top: 0,
bottom: 0
}]
@ -77772,7 +77721,7 @@ BI.DateInterval = BI.inherit(BI.Single, {
type: "bi.absolute",
items: [{
el: self.right,
left: 0,
left: this.constants.width / 2,
right: this.constants.offset,
top: 0,
bottom: 0
@ -77910,7 +77859,7 @@ BI.TimeInterval = BI.inherit(BI.Single, {
height: 24,
width: 24,
lgap: 15,
offset: -15,
offset: 0,
timeErrorCls: "time-error",
DATE_MIN_VALUE: "1900-01-01",
DATE_MAX_VALUE: "2099-12-31"
@ -77937,14 +77886,13 @@ BI.TimeInterval = BI.inherit(BI.Single, {
BI.createWidget({
element: self,
type: "bi.center",
hgap: 10,
height: this.constants.height,
items: [{
type: "bi.absolute",
items: [{
el: self.left,
left: this.constants.offset,
right: 0,
right: this.constants.width / 2,
top: 0,
bottom: 0
}]
@ -77952,7 +77900,7 @@ BI.TimeInterval = BI.inherit(BI.Single, {
type: "bi.absolute",
items: [{
el: self.right,
left: 0,
left: this.constants.width / 2,
right: this.constants.offset,
top: 0,
bottom: 0

44
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

148
dist/fineui.js vendored

@ -41580,7 +41580,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
this.view = this._createView();
this.toolbar = this._createToolBar();
this.button_group.on(BI.Controller.EVENT_CHANGE, function (type) {
this.view.on(BI.Controller.EVENT_CHANGE, function (type) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
if (type === BI.Events.CLICK) {
self.fireEvent(BI.PopupView.EVENT_CHANGE);
@ -41655,11 +41655,11 @@ BI.PopupView = BI.inherit(BI.Widget, {
},
getView: function () {
return this.button_group;
return this.view;
},
populate: function (items) {
this.button_group.populate.apply(this.button_group, arguments);
this.view.populate.apply(this.view, arguments);
},
resetWidth: function (w) {
@ -41678,11 +41678,11 @@ BI.PopupView = BI.inherit(BI.Widget, {
setValue: function (selectedValues) {
this.tab && this.tab.setValue(selectedValues);
this.button_group.setValue(selectedValues);
this.view.setValue(selectedValues);
},
getValue: function () {
return this.button_group.getValue();
return this.view.getValue();
}
});
BI.PopupView.EVENT_CHANGE = "EVENT_CHANGE";
@ -52990,22 +52990,18 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
case "left,top":
case "left,bottom":
this._createLeftTriangle();
//this.combo.getView().showLine("right");
break;
case "right,top":
case "right,bottom":
this._createRightTriangle();
//this.combo.getView().showLine("left");
break;
case "top,left":
case "top,right":
this._createTopTriangle();
//this.combo.getView().showLine("bottom");
break;
case "bottom,left":
case "bottom,right":
this._createBottomTriangle();
//this.combo.getView().showLine("top");
break;
}
},
@ -53013,7 +53009,6 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
_hideTriangle: function () {
this.triangle && this.triangle.destroy();
this.triangle = null;
//this.combo.getView() && this.combo.getView().hideLine();
},
hideView: function () {
@ -53051,65 +53046,14 @@ BI.BubblePopupView = BI.inherit(BI.PopupView, {
_defaultConfig: function () {
var config = BI.BubblePopupView.superclass._defaultConfig.apply(this, arguments);
return BI.extend(config, {
baseCls: config.baseCls + " bi-bubble-popup-view"
baseCls: config.baseCls + " bi-bubble-popup-view",
minWidth: 220,
maxWidth: 300,
minHeight: 90
});
},
_init: function () {
BI.BubblePopupView.superclass._init.apply(this, arguments);
},
showLine: function (direction) {
var pos = {}, op = {};
switch (direction) {
case "left":
pos = {
top: 0,
bottom: 0,
left: -1
};
op = {width: 3};
break;
case "right":
pos = {
top: 0,
bottom: 0,
right: -1
};
op = {width: 3};
break;
case "top":
pos = {
left: 0,
right: 0,
top: -1
};
op = {height: 3};
break;
case "bottom":
pos = {
left: 0,
right: 0,
bottom: -1
};
op = {height: 3};
break;
default:
break;
}
this.line = BI.createWidget(op, {
type: "bi.layout",
cls: "bubble-popup-line bi-high-light-background"
});
pos.el = this.line;
BI.createWidget({
type: "bi.absolute",
element: this,
items: [pos]
});
},
hideLine: function () {
this.line && this.line.destroy();
}
});
@ -53144,7 +53088,7 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
} else {
items.push(BI.extend({
type: "bi.button",
height: 30,
height: 24,
handler: function (v) {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v);
}
@ -53152,12 +53096,33 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
}
});
return BI.createWidget({
type: "bi.right_vertical_adapt",
type: "bi.center",
height: 44,
hgap: 10,
bgap: 10,
items: items
rgap: 15,
items: [{
type: "bi.right_vertical_adapt",
lgap: 10,
items: items
}]
});
},
_createView: function () {
var o = this.options;
var button = BI.createWidget({
type: "bi.button_group",
items: [o.el],
layouts: [{
type: "bi.vertical",
hgap: 15,
tgap: 10
}]
});
button.element.css("min-height", o.minHeight - 44);
return button;
}
});
BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON = "EVENT_CLICK_TOOLBAR_BUTTON";
@ -53175,7 +53140,6 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
return {
baseCls: "bi-text-bubble-bar-popup-view",
text: "",
width: 250,
buttons: [{
level: "ignore",
value: false,
@ -53208,19 +53172,13 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
self.popup = this;
},
el: {
type: "bi.vertical",
items: [{
type: "bi.label",
text: o.text,
whiteSpace: "normal",
textAlign: "left",
ref: function () {
self.text = this;
}
}],
hgap: 10,
tgap: 25,
bgap: 10
type: "bi.label",
text: o.text,
whiteSpace: "normal",
textAlign: "left",
ref: function () {
self.text = this;
}
},
buttons: buttons
};
@ -53228,14 +53186,6 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
populate: function (v) {
this.text.setText(v || this.options.text);
},
showLine: function (direction) {
this.popup.showLine(direction);
},
hideLine: function () {
this.popup.hideLine();
}
});
BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CHANGE";
@ -78134,7 +78084,7 @@ BI.DateInterval = BI.inherit(BI.Single, {
height: 24,
width: 24,
lgap: 15,
offset: -15,
offset: 0,
timeErrorCls: "time-error",
DATE_MIN_VALUE: "1900-01-01",
DATE_MAX_VALUE: "2099-12-31"
@ -78161,14 +78111,13 @@ BI.DateInterval = BI.inherit(BI.Single, {
BI.createWidget({
element: self,
type: "bi.center",
hgap: 10,
height: this.constants.height,
items: [{
type: "bi.absolute",
items: [{
el: self.left,
left: this.constants.offset,
right: 0,
right: this.constants.width / 2,
top: 0,
bottom: 0
}]
@ -78176,7 +78125,7 @@ BI.DateInterval = BI.inherit(BI.Single, {
type: "bi.absolute",
items: [{
el: self.right,
left: 0,
left: this.constants.width / 2,
right: this.constants.offset,
top: 0,
bottom: 0
@ -78314,7 +78263,7 @@ BI.TimeInterval = BI.inherit(BI.Single, {
height: 24,
width: 24,
lgap: 15,
offset: -15,
offset: 0,
timeErrorCls: "time-error",
DATE_MIN_VALUE: "1900-01-01",
DATE_MAX_VALUE: "2099-12-31"
@ -78341,14 +78290,13 @@ BI.TimeInterval = BI.inherit(BI.Single, {
BI.createWidget({
element: self,
type: "bi.center",
hgap: 10,
height: this.constants.height,
items: [{
type: "bi.absolute",
items: [{
el: self.left,
left: this.constants.offset,
right: 0,
right: this.constants.width / 2,
top: 0,
bottom: 0
}]
@ -78356,7 +78304,7 @@ BI.TimeInterval = BI.inherit(BI.Single, {
type: "bi.absolute",
items: [{
el: self.right,
left: 0,
left: this.constants.width / 2,
right: this.constants.offset,
top: 0,
bottom: 0

50
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

148
dist/fineui_without_jquery_polyfill.js vendored

@ -29229,7 +29229,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
this.view = this._createView();
this.toolbar = this._createToolBar();
this.button_group.on(BI.Controller.EVENT_CHANGE, function (type) {
this.view.on(BI.Controller.EVENT_CHANGE, function (type) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
if (type === BI.Events.CLICK) {
self.fireEvent(BI.PopupView.EVENT_CHANGE);
@ -29304,11 +29304,11 @@ BI.PopupView = BI.inherit(BI.Widget, {
},
getView: function () {
return this.button_group;
return this.view;
},
populate: function (items) {
this.button_group.populate.apply(this.button_group, arguments);
this.view.populate.apply(this.view, arguments);
},
resetWidth: function (w) {
@ -29327,11 +29327,11 @@ BI.PopupView = BI.inherit(BI.Widget, {
setValue: function (selectedValues) {
this.tab && this.tab.setValue(selectedValues);
this.button_group.setValue(selectedValues);
this.view.setValue(selectedValues);
},
getValue: function () {
return this.button_group.getValue();
return this.view.getValue();
}
});
BI.PopupView.EVENT_CHANGE = "EVENT_CHANGE";
@ -36050,22 +36050,18 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
case "left,top":
case "left,bottom":
this._createLeftTriangle();
//this.combo.getView().showLine("right");
break;
case "right,top":
case "right,bottom":
this._createRightTriangle();
//this.combo.getView().showLine("left");
break;
case "top,left":
case "top,right":
this._createTopTriangle();
//this.combo.getView().showLine("bottom");
break;
case "bottom,left":
case "bottom,right":
this._createBottomTriangle();
//this.combo.getView().showLine("top");
break;
}
},
@ -36073,7 +36069,6 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
_hideTriangle: function () {
this.triangle && this.triangle.destroy();
this.triangle = null;
//this.combo.getView() && this.combo.getView().hideLine();
},
hideView: function () {
@ -36111,65 +36106,14 @@ BI.BubblePopupView = BI.inherit(BI.PopupView, {
_defaultConfig: function () {
var config = BI.BubblePopupView.superclass._defaultConfig.apply(this, arguments);
return BI.extend(config, {
baseCls: config.baseCls + " bi-bubble-popup-view"
baseCls: config.baseCls + " bi-bubble-popup-view",
minWidth: 220,
maxWidth: 300,
minHeight: 90
});
},
_init: function () {
BI.BubblePopupView.superclass._init.apply(this, arguments);
},
showLine: function (direction) {
var pos = {}, op = {};
switch (direction) {
case "left":
pos = {
top: 0,
bottom: 0,
left: -1
};
op = {width: 3};
break;
case "right":
pos = {
top: 0,
bottom: 0,
right: -1
};
op = {width: 3};
break;
case "top":
pos = {
left: 0,
right: 0,
top: -1
};
op = {height: 3};
break;
case "bottom":
pos = {
left: 0,
right: 0,
bottom: -1
};
op = {height: 3};
break;
default:
break;
}
this.line = BI.createWidget(op, {
type: "bi.layout",
cls: "bubble-popup-line bi-high-light-background"
});
pos.el = this.line;
BI.createWidget({
type: "bi.absolute",
element: this,
items: [pos]
});
},
hideLine: function () {
this.line && this.line.destroy();
}
});
@ -36204,7 +36148,7 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
} else {
items.push(BI.extend({
type: "bi.button",
height: 30,
height: 24,
handler: function (v) {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v);
}
@ -36212,12 +36156,33 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
}
});
return BI.createWidget({
type: "bi.right_vertical_adapt",
type: "bi.center",
height: 44,
hgap: 10,
bgap: 10,
items: items
rgap: 15,
items: [{
type: "bi.right_vertical_adapt",
lgap: 10,
items: items
}]
});
},
_createView: function () {
var o = this.options;
var button = BI.createWidget({
type: "bi.button_group",
items: [o.el],
layouts: [{
type: "bi.vertical",
hgap: 15,
tgap: 10
}]
});
button.element.css("min-height", o.minHeight - 44);
return button;
}
});
BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON = "EVENT_CLICK_TOOLBAR_BUTTON";
@ -36235,7 +36200,6 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
return {
baseCls: "bi-text-bubble-bar-popup-view",
text: "",
width: 250,
buttons: [{
level: "ignore",
value: false,
@ -36268,19 +36232,13 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
self.popup = this;
},
el: {
type: "bi.vertical",
items: [{
type: "bi.label",
text: o.text,
whiteSpace: "normal",
textAlign: "left",
ref: function () {
self.text = this;
}
}],
hgap: 10,
tgap: 25,
bgap: 10
type: "bi.label",
text: o.text,
whiteSpace: "normal",
textAlign: "left",
ref: function () {
self.text = this;
}
},
buttons: buttons
};
@ -36288,14 +36246,6 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
populate: function (v) {
this.text.setText(v || this.options.text);
},
showLine: function (direction) {
this.popup.showLine(direction);
},
hideLine: function () {
this.popup.hideLine();
}
});
BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CHANGE";
@ -60995,7 +60945,7 @@ BI.DateInterval = BI.inherit(BI.Single, {
height: 24,
width: 24,
lgap: 15,
offset: -15,
offset: 0,
timeErrorCls: "time-error",
DATE_MIN_VALUE: "1900-01-01",
DATE_MAX_VALUE: "2099-12-31"
@ -61022,14 +60972,13 @@ BI.DateInterval = BI.inherit(BI.Single, {
BI.createWidget({
element: self,
type: "bi.center",
hgap: 10,
height: this.constants.height,
items: [{
type: "bi.absolute",
items: [{
el: self.left,
left: this.constants.offset,
right: 0,
right: this.constants.width / 2,
top: 0,
bottom: 0
}]
@ -61037,7 +60986,7 @@ BI.DateInterval = BI.inherit(BI.Single, {
type: "bi.absolute",
items: [{
el: self.right,
left: 0,
left: this.constants.width / 2,
right: this.constants.offset,
top: 0,
bottom: 0
@ -61175,7 +61124,7 @@ BI.TimeInterval = BI.inherit(BI.Single, {
height: 24,
width: 24,
lgap: 15,
offset: -15,
offset: 0,
timeErrorCls: "time-error",
DATE_MIN_VALUE: "1900-01-01",
DATE_MAX_VALUE: "2099-12-31"
@ -61202,14 +61151,13 @@ BI.TimeInterval = BI.inherit(BI.Single, {
BI.createWidget({
element: self,
type: "bi.center",
hgap: 10,
height: this.constants.height,
items: [{
type: "bi.absolute",
items: [{
el: self.left,
left: this.constants.offset,
right: 0,
right: this.constants.width / 2,
top: 0,
bottom: 0
}]
@ -61217,7 +61165,7 @@ BI.TimeInterval = BI.inherit(BI.Single, {
type: "bi.absolute",
items: [{
el: self.right,
left: 0,
left: this.constants.width / 2,
right: this.constants.offset,
top: 0,
bottom: 0

2
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

14
dist/widget.js vendored

@ -19235,7 +19235,7 @@ BI.DateInterval = BI.inherit(BI.Single, {
height: 24,
width: 24,
lgap: 15,
offset: -15,
offset: 0,
timeErrorCls: "time-error",
DATE_MIN_VALUE: "1900-01-01",
DATE_MAX_VALUE: "2099-12-31"
@ -19262,14 +19262,13 @@ BI.DateInterval = BI.inherit(BI.Single, {
BI.createWidget({
element: self,
type: "bi.center",
hgap: 10,
height: this.constants.height,
items: [{
type: "bi.absolute",
items: [{
el: self.left,
left: this.constants.offset,
right: 0,
right: this.constants.width / 2,
top: 0,
bottom: 0
}]
@ -19277,7 +19276,7 @@ BI.DateInterval = BI.inherit(BI.Single, {
type: "bi.absolute",
items: [{
el: self.right,
left: 0,
left: this.constants.width / 2,
right: this.constants.offset,
top: 0,
bottom: 0
@ -19415,7 +19414,7 @@ BI.TimeInterval = BI.inherit(BI.Single, {
height: 24,
width: 24,
lgap: 15,
offset: -15,
offset: 0,
timeErrorCls: "time-error",
DATE_MIN_VALUE: "1900-01-01",
DATE_MAX_VALUE: "2099-12-31"
@ -19442,14 +19441,13 @@ BI.TimeInterval = BI.inherit(BI.Single, {
BI.createWidget({
element: self,
type: "bi.center",
hgap: 10,
height: this.constants.height,
items: [{
type: "bi.absolute",
items: [{
el: self.left,
left: this.constants.offset,
right: 0,
right: this.constants.width / 2,
top: 0,
bottom: 0
}]
@ -19457,7 +19455,7 @@ BI.TimeInterval = BI.inherit(BI.Single, {
type: "bi.absolute",
items: [{
el: self.right,
left: 0,
left: this.constants.width / 2,
right: this.constants.offset,
top: 0,
bottom: 0

10
src/base/layer/layer.popup.js

@ -65,7 +65,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
this.view = this._createView();
this.toolbar = this._createToolBar();
this.button_group.on(BI.Controller.EVENT_CHANGE, function (type) {
this.view.on(BI.Controller.EVENT_CHANGE, function (type) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
if (type === BI.Events.CLICK) {
self.fireEvent(BI.PopupView.EVENT_CHANGE);
@ -140,11 +140,11 @@ BI.PopupView = BI.inherit(BI.Widget, {
},
getView: function () {
return this.button_group;
return this.view;
},
populate: function (items) {
this.button_group.populate.apply(this.button_group, arguments);
this.view.populate.apply(this.view, arguments);
},
resetWidth: function (w) {
@ -163,11 +163,11 @@ BI.PopupView = BI.inherit(BI.Widget, {
setValue: function (selectedValues) {
this.tab && this.tab.setValue(selectedValues);
this.button_group.setValue(selectedValues);
this.view.setValue(selectedValues);
},
getValue: function () {
return this.button_group.getValue();
return this.view.getValue();
}
});
BI.PopupView.EVENT_CHANGE = "EVENT_CHANGE";

5
src/case/combo/bubblecombo/combo.bubble.js

@ -169,22 +169,18 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
case "left,top":
case "left,bottom":
this._createLeftTriangle();
//this.combo.getView().showLine("right");
break;
case "right,top":
case "right,bottom":
this._createRightTriangle();
//this.combo.getView().showLine("left");
break;
case "top,left":
case "top,right":
this._createTopTriangle();
//this.combo.getView().showLine("bottom");
break;
case "bottom,left":
case "bottom,right":
this._createBottomTriangle();
//this.combo.getView().showLine("top");
break;
}
},
@ -192,7 +188,6 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
_hideTriangle: function () {
this.triangle && this.triangle.destroy();
this.triangle = null;
//this.combo.getView() && this.combo.getView().hideLine();
},
hideView: function () {

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

@ -8,65 +8,14 @@ BI.BubblePopupView = BI.inherit(BI.PopupView, {
_defaultConfig: function () {
var config = BI.BubblePopupView.superclass._defaultConfig.apply(this, arguments);
return BI.extend(config, {
baseCls: config.baseCls + " bi-bubble-popup-view"
baseCls: config.baseCls + " bi-bubble-popup-view",
minWidth: 220,
maxWidth: 300,
minHeight: 90
});
},
_init: function () {
BI.BubblePopupView.superclass._init.apply(this, arguments);
},
showLine: function (direction) {
var pos = {}, op = {};
switch (direction) {
case "left":
pos = {
top: 0,
bottom: 0,
left: -1
};
op = {width: 3};
break;
case "right":
pos = {
top: 0,
bottom: 0,
right: -1
};
op = {width: 3};
break;
case "top":
pos = {
left: 0,
right: 0,
top: -1
};
op = {height: 3};
break;
case "bottom":
pos = {
left: 0,
right: 0,
bottom: -1
};
op = {height: 3};
break;
default:
break;
}
this.line = BI.createWidget(op, {
type: "bi.layout",
cls: "bubble-popup-line bi-high-light-background"
});
pos.el = this.line;
BI.createWidget({
type: "bi.absolute",
element: this,
items: [pos]
});
},
hideLine: function () {
this.line && this.line.destroy();
}
});
@ -101,7 +50,7 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
} else {
items.push(BI.extend({
type: "bi.button",
height: 30,
height: 24,
handler: function (v) {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v);
}
@ -109,12 +58,33 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
}
});
return BI.createWidget({
type: "bi.right_vertical_adapt",
type: "bi.center",
height: 44,
hgap: 10,
bgap: 10,
items: items
rgap: 15,
items: [{
type: "bi.right_vertical_adapt",
lgap: 10,
items: items
}]
});
},
_createView: function () {
var o = this.options;
var button = BI.createWidget({
type: "bi.button_group",
items: [o.el],
layouts: [{
type: "bi.vertical",
hgap: 15,
tgap: 10
}]
});
button.element.css("min-height", o.minHeight - 44);
return button;
}
});
BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON = "EVENT_CLICK_TOOLBAR_BUTTON";
@ -132,7 +102,6 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
return {
baseCls: "bi-text-bubble-bar-popup-view",
text: "",
width: 250,
buttons: [{
level: "ignore",
value: false,
@ -165,19 +134,13 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
self.popup = this;
},
el: {
type: "bi.vertical",
items: [{
type: "bi.label",
text: o.text,
whiteSpace: "normal",
textAlign: "left",
ref: function () {
self.text = this;
}
}],
hgap: 10,
tgap: 25,
bgap: 10
type: "bi.label",
text: o.text,
whiteSpace: "normal",
textAlign: "left",
ref: function () {
self.text = this;
}
},
buttons: buttons
};
@ -185,14 +148,6 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
populate: function (v) {
this.text.setText(v || this.options.text);
},
showLine: function (direction) {
this.popup.showLine(direction);
},
hideLine: function () {
this.popup.hideLine();
}
});
BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CHANGE";

Loading…
Cancel
Save