Browse Source

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

* commit '67e8d96f4de25a9929809c732135c48b67dc99cb':
  规范带text的bubble_popup_view
es6
guy 7 years ago
parent
commit
6b6e8b7f28
  1. 29
      demo/js/case/combo/demo.bubble_combo.js
  2. 72
      dist/bundle.js
  3. 72
      dist/case.js
  4. 29
      dist/demo.js
  5. 72
      dist/fineui.js
  6. 72
      src/case/combo/bubblecombo/popup.bubble.js

29
demo/js/case/combo/demo.bubble_combo.js

@ -4,7 +4,7 @@ Demo.Func = BI.inherit(BI.Widget, {
},
render: function () {
var self = this;
var self = this, count = 1;
var combo1 = BI.createWidget({
type: "bi.bubble_combo",
trigger: "click,hover",
@ -36,21 +36,18 @@ Demo.Func = BI.inherit(BI.Widget, {
height: 25
},
popup: {
type: "bi.bubble_bar_popup_view",
el: {
type: "bi.button_group",
items: BI.makeArray(100, {
type: "bi.text_item",
height: 25,
text: "item"
}),
layouts: [{
type: "bi.vertical"
}]
},
maxHeight: 200,
minWidth: 600
}
type: "bi.text_bubble_bar_popup_view",
text: "我有很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字",
ref: function () {
self.popup = this;
}
},
listeners: [{
eventName: BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW,
action: function () {
self.popup.populate((count++) % 2 === 1 ? "我的文字变少了" : "我有很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字");
}
}]
});
BI.createWidget({
type: "bi.absolute",

72
dist/bundle.js vendored

@ -67645,7 +67645,77 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
}
});
BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON = "EVENT_CLICK_TOOLBAR_BUTTON";
BI.shortcut("bi.bubble_bar_popup_view", BI.BubblePopupBarView);/**
BI.shortcut("bi.bubble_bar_popup_view", BI.BubblePopupBarView);
/**
* Created by Windy on 2018/2/2.
*
* @class BI.TextBubblePopupBarView
* @extends BI.BubblePopupView
*/
BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
props: {
baseCls: "bi-text-bubble-bar-popup-view",
text: "",
width: 250
},
render: function(){
var self = this, o = this.options;
return {
type: "bi.bubble_bar_popup_view",
ref: function () {
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
},
buttons: [{
type: "bi.button",
value: BI.i18nText("BI-Basic_Sure"),
height: 24,
handler: function () {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, true);
}
}, {
type: "bi.button",
value: BI.i18nText("BI-Basic_Cancel"),
level: "ignore",
height: 24,
handler: function () {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, false);
}
}]
}
},
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";
BI.shortcut("bi.text_bubble_bar_popup_view", BI.TextBubblePopupBarView);/**
* Created by Young's on 2016/4/28.
*/
BI.EditorIconCheckCombo = BI.inherit(BI.Widget, {

72
dist/case.js vendored

@ -5076,7 +5076,77 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
}
});
BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON = "EVENT_CLICK_TOOLBAR_BUTTON";
BI.shortcut("bi.bubble_bar_popup_view", BI.BubblePopupBarView);/**
BI.shortcut("bi.bubble_bar_popup_view", BI.BubblePopupBarView);
/**
* Created by Windy on 2018/2/2.
*
* @class BI.TextBubblePopupBarView
* @extends BI.BubblePopupView
*/
BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
props: {
baseCls: "bi-text-bubble-bar-popup-view",
text: "",
width: 250
},
render: function(){
var self = this, o = this.options;
return {
type: "bi.bubble_bar_popup_view",
ref: function () {
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
},
buttons: [{
type: "bi.button",
value: BI.i18nText("BI-Basic_Sure"),
height: 24,
handler: function () {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, true);
}
}, {
type: "bi.button",
value: BI.i18nText("BI-Basic_Cancel"),
level: "ignore",
height: 24,
handler: function () {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, false);
}
}]
}
},
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";
BI.shortcut("bi.text_bubble_bar_popup_view", BI.TextBubblePopupBarView);/**
* Created by Young's on 2016/4/28.
*/
BI.EditorIconCheckCombo = BI.inherit(BI.Widget, {

29
dist/demo.js vendored

@ -1766,7 +1766,7 @@ BI.shortcut("demo.tree_view", Demo.Func);Demo.Func = BI.inherit(BI.Widget, {
},
render: function () {
var self = this;
var self = this, count = 1;
var combo1 = BI.createWidget({
type: "bi.bubble_combo",
trigger: "click,hover",
@ -1798,21 +1798,18 @@ BI.shortcut("demo.tree_view", Demo.Func);Demo.Func = BI.inherit(BI.Widget, {
height: 25
},
popup: {
type: "bi.bubble_bar_popup_view",
el: {
type: "bi.button_group",
items: BI.makeArray(100, {
type: "bi.text_item",
height: 25,
text: "item"
}),
layouts: [{
type: "bi.vertical"
}]
},
maxHeight: 200,
minWidth: 600
}
type: "bi.text_bubble_bar_popup_view",
text: "我有很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字",
ref: function () {
self.popup = this;
}
},
listeners: [{
eventName: BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW,
action: function () {
self.popup.populate((count++) % 2 === 1 ? "我的文字变少了" : "我有很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字");
}
}]
});
BI.createWidget({
type: "bi.absolute",

72
dist/fineui.js vendored

@ -69409,7 +69409,77 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
}
});
BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON = "EVENT_CLICK_TOOLBAR_BUTTON";
BI.shortcut("bi.bubble_bar_popup_view", BI.BubblePopupBarView);/**
BI.shortcut("bi.bubble_bar_popup_view", BI.BubblePopupBarView);
/**
* Created by Windy on 2018/2/2.
*
* @class BI.TextBubblePopupBarView
* @extends BI.BubblePopupView
*/
BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
props: {
baseCls: "bi-text-bubble-bar-popup-view",
text: "",
width: 250
},
render: function(){
var self = this, o = this.options;
return {
type: "bi.bubble_bar_popup_view",
ref: function () {
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
},
buttons: [{
type: "bi.button",
value: BI.i18nText("BI-Basic_Sure"),
height: 24,
handler: function () {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, true);
}
}, {
type: "bi.button",
value: BI.i18nText("BI-Basic_Cancel"),
level: "ignore",
height: 24,
handler: function () {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, false);
}
}]
}
},
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";
BI.shortcut("bi.text_bubble_bar_popup_view", BI.TextBubblePopupBarView);/**
* Created by Young's on 2016/4/28.
*/
BI.EditorIconCheckCombo = BI.inherit(BI.Widget, {

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

@ -115,4 +115,74 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
}
});
BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON = "EVENT_CLICK_TOOLBAR_BUTTON";
BI.shortcut("bi.bubble_bar_popup_view", BI.BubblePopupBarView);
BI.shortcut("bi.bubble_bar_popup_view", BI.BubblePopupBarView);
/**
* Created by Windy on 2018/2/2.
*
* @class BI.TextBubblePopupBarView
* @extends BI.BubblePopupView
*/
BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
props: {
baseCls: "bi-text-bubble-bar-popup-view",
text: "",
width: 250
},
render: function(){
var self = this, o = this.options;
return {
type: "bi.bubble_bar_popup_view",
ref: function () {
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
},
buttons: [{
type: "bi.button",
value: BI.i18nText("BI-Basic_Sure"),
height: 24,
handler: function () {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, true);
}
}, {
type: "bi.button",
value: BI.i18nText("BI-Basic_Cancel"),
level: "ignore",
height: 24,
handler: function () {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, false);
}
}]
}
},
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";
BI.shortcut("bi.text_bubble_bar_popup_view", BI.TextBubblePopupBarView);
Loading…
Cancel
Save