Browse Source

规范带text的bubble_popup_view

es6
windy 7 years ago
parent
commit
67e8d96f4d
  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 () { render: function () {
var self = this; var self = this, count = 1;
var combo1 = BI.createWidget({ var combo1 = BI.createWidget({
type: "bi.bubble_combo", type: "bi.bubble_combo",
trigger: "click,hover", trigger: "click,hover",
@ -36,21 +36,18 @@ Demo.Func = BI.inherit(BI.Widget, {
height: 25 height: 25
}, },
popup: { popup: {
type: "bi.bubble_bar_popup_view", type: "bi.text_bubble_bar_popup_view",
el: { text: "我有很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字",
type: "bi.button_group", ref: function () {
items: BI.makeArray(100, { self.popup = this;
type: "bi.text_item", }
height: 25, },
text: "item" listeners: [{
}), eventName: BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW,
layouts: [{ action: function () {
type: "bi.vertical" self.popup.populate((count++) % 2 === 1 ? "我的文字变少了" : "我有很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字");
}] }
}, }]
maxHeight: 200,
minWidth: 600
}
}); });
BI.createWidget({ BI.createWidget({
type: "bi.absolute", 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.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. * Created by Young's on 2016/4/28.
*/ */
BI.EditorIconCheckCombo = BI.inherit(BI.Widget, { 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.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. * Created by Young's on 2016/4/28.
*/ */
BI.EditorIconCheckCombo = BI.inherit(BI.Widget, { 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 () { render: function () {
var self = this; var self = this, count = 1;
var combo1 = BI.createWidget({ var combo1 = BI.createWidget({
type: "bi.bubble_combo", type: "bi.bubble_combo",
trigger: "click,hover", trigger: "click,hover",
@ -1798,21 +1798,18 @@ BI.shortcut("demo.tree_view", Demo.Func);Demo.Func = BI.inherit(BI.Widget, {
height: 25 height: 25
}, },
popup: { popup: {
type: "bi.bubble_bar_popup_view", type: "bi.text_bubble_bar_popup_view",
el: { text: "我有很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字",
type: "bi.button_group", ref: function () {
items: BI.makeArray(100, { self.popup = this;
type: "bi.text_item", }
height: 25, },
text: "item" listeners: [{
}), eventName: BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW,
layouts: [{ action: function () {
type: "bi.vertical" self.popup.populate((count++) % 2 === 1 ? "我的文字变少了" : "我有很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字很多文字");
}] }
}, }]
maxHeight: 200,
minWidth: 600
}
}); });
BI.createWidget({ BI.createWidget({
type: "bi.absolute", 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.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. * Created by Young's on 2016/4/28.
*/ */
BI.EditorIconCheckCombo = BI.inherit(BI.Widget, { 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.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