diff --git a/dist/bundle.ie.js b/dist/bundle.ie.js index fdf1c0a0a9..0446ffef1d 100644 --- a/dist/bundle.ie.js +++ b/dist/bundle.ie.js @@ -52494,7 +52494,10 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, { _defaultConfig: function () { return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), { 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 () { @@ -52505,9 +52508,9 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, { var items = []; BI.each(o.buttons, function (i, buttonOpt) { - if(BI.isWidget(buttonOpt)) { + if (BI.isWidget(buttonOpt)) { items.push(buttonOpt); - }else{ + } else { items.push(BI.extend({ type: "bi.button", height: 30, @@ -52537,14 +52540,37 @@ BI.shortcut("bi.bubble_bar_popup_view", BI.BubblePopupBarView); */ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, { - props: { - baseCls: "bi-text-bubble-bar-popup-view", - text: "", - width: 250 + props: function () { + return { + baseCls: "bi-text-bubble-bar-popup-view", + 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 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 { type: "bi.bubble_bar_popup_view", ref: function () { @@ -52565,22 +52591,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, { tgap: 25, bgap: 10 }, - 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); - } - }] + buttons: buttons }; }, diff --git a/dist/bundle.js b/dist/bundle.js index ed87b07ac2..837a474d84 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -52898,7 +52898,10 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, { _defaultConfig: function () { return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), { 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 () { @@ -52909,9 +52912,9 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, { var items = []; BI.each(o.buttons, function (i, buttonOpt) { - if(BI.isWidget(buttonOpt)) { + if (BI.isWidget(buttonOpt)) { items.push(buttonOpt); - }else{ + } else { items.push(BI.extend({ type: "bi.button", height: 30, @@ -52941,14 +52944,37 @@ BI.shortcut("bi.bubble_bar_popup_view", BI.BubblePopupBarView); */ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, { - props: { - baseCls: "bi-text-bubble-bar-popup-view", - text: "", - width: 250 + props: function () { + return { + baseCls: "bi-text-bubble-bar-popup-view", + 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 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 { type: "bi.bubble_bar_popup_view", ref: function () { @@ -52969,22 +52995,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, { tgap: 25, bgap: 10 }, - 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); - } - }] + buttons: buttons }; }, diff --git a/dist/case.js b/dist/case.js index 38ad8e337e..1973743cdd 100644 --- a/dist/case.js +++ b/dist/case.js @@ -4068,7 +4068,10 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, { _defaultConfig: function () { return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), { 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 () { @@ -4079,9 +4082,9 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, { var items = []; BI.each(o.buttons, function (i, buttonOpt) { - if(BI.isWidget(buttonOpt)) { + if (BI.isWidget(buttonOpt)) { items.push(buttonOpt); - }else{ + } else { items.push(BI.extend({ type: "bi.button", height: 30, @@ -4111,14 +4114,37 @@ BI.shortcut("bi.bubble_bar_popup_view", BI.BubblePopupBarView); */ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, { - props: { - baseCls: "bi-text-bubble-bar-popup-view", - text: "", - width: 250 + props: function () { + return { + baseCls: "bi-text-bubble-bar-popup-view", + 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 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 { type: "bi.bubble_bar_popup_view", ref: function () { @@ -4139,22 +4165,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, { tgap: 25, bgap: 10 }, - 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); - } - }] + buttons: buttons }; }, diff --git a/dist/fineui.ie.js b/dist/fineui.ie.js index af81c195f0..a6fd01a069 100644 --- a/dist/fineui.ie.js +++ b/dist/fineui.ie.js @@ -52736,7 +52736,10 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, { _defaultConfig: function () { return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), { 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 () { @@ -52747,9 +52750,9 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, { var items = []; BI.each(o.buttons, function (i, buttonOpt) { - if(BI.isWidget(buttonOpt)) { + if (BI.isWidget(buttonOpt)) { items.push(buttonOpt); - }else{ + } else { items.push(BI.extend({ type: "bi.button", height: 30, @@ -52779,14 +52782,37 @@ BI.shortcut("bi.bubble_bar_popup_view", BI.BubblePopupBarView); */ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, { - props: { - baseCls: "bi-text-bubble-bar-popup-view", - text: "", - width: 250 + props: function () { + return { + baseCls: "bi-text-bubble-bar-popup-view", + 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 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 { type: "bi.bubble_bar_popup_view", ref: function () { @@ -52807,22 +52833,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, { tgap: 25, bgap: 10 }, - 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); - } - }] + buttons: buttons }; }, diff --git a/dist/fineui.js b/dist/fineui.js index f7e1849b38..76d89d6381 100644 --- a/dist/fineui.js +++ b/dist/fineui.js @@ -53140,7 +53140,10 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, { _defaultConfig: function () { return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), { 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 () { @@ -53151,9 +53154,9 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, { var items = []; BI.each(o.buttons, function (i, buttonOpt) { - if(BI.isWidget(buttonOpt)) { + if (BI.isWidget(buttonOpt)) { items.push(buttonOpt); - }else{ + } else { items.push(BI.extend({ type: "bi.button", height: 30, @@ -53183,14 +53186,37 @@ BI.shortcut("bi.bubble_bar_popup_view", BI.BubblePopupBarView); */ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, { - props: { - baseCls: "bi-text-bubble-bar-popup-view", - text: "", - width: 250 + props: function () { + return { + baseCls: "bi-text-bubble-bar-popup-view", + 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 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 { type: "bi.bubble_bar_popup_view", ref: function () { @@ -53211,22 +53237,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, { tgap: 25, bgap: 10 }, - 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); - } - }] + buttons: buttons }; }, diff --git a/dist/fineui_without_jquery_polyfill.js b/dist/fineui_without_jquery_polyfill.js index 6759e5407d..9c33ce837b 100644 --- a/dist/fineui_without_jquery_polyfill.js +++ b/dist/fineui_without_jquery_polyfill.js @@ -36218,7 +36218,10 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, { _defaultConfig: function () { return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), { 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 () { @@ -36229,9 +36232,9 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, { var items = []; BI.each(o.buttons, function (i, buttonOpt) { - if(BI.isWidget(buttonOpt)) { + if (BI.isWidget(buttonOpt)) { items.push(buttonOpt); - }else{ + } else { items.push(BI.extend({ type: "bi.button", height: 30, @@ -36261,14 +36264,37 @@ BI.shortcut("bi.bubble_bar_popup_view", BI.BubblePopupBarView); */ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, { - props: { - baseCls: "bi-text-bubble-bar-popup-view", - text: "", - width: 250 + props: function () { + return { + baseCls: "bi-text-bubble-bar-popup-view", + 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 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 { type: "bi.bubble_bar_popup_view", ref: function () { @@ -36289,22 +36315,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, { tgap: 25, bgap: 10 }, - 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); - } - }] + buttons: buttons }; }, diff --git a/src/case/combo/bubblecombo/popup.bubble.js b/src/case/combo/bubblecombo/popup.bubble.js index 388a9d9849..cd30a2b784 100644 --- a/src/case/combo/bubblecombo/popup.bubble.js +++ b/src/case/combo/bubblecombo/popup.bubble.js @@ -82,7 +82,10 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, { _defaultConfig: function () { return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), { 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 () { @@ -93,9 +96,9 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, { var items = []; BI.each(o.buttons, function (i, buttonOpt) { - if(BI.isWidget(buttonOpt)) { + if (BI.isWidget(buttonOpt)) { items.push(buttonOpt); - }else{ + } else { items.push(BI.extend({ type: "bi.button", height: 30, @@ -125,14 +128,37 @@ BI.shortcut("bi.bubble_bar_popup_view", BI.BubblePopupBarView); */ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, { - props: { - baseCls: "bi-text-bubble-bar-popup-view", - text: "", - width: 250 + props: function () { + return { + baseCls: "bi-text-bubble-bar-popup-view", + 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 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 { type: "bi.bubble_bar_popup_view", ref: function () { @@ -153,22 +179,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, { tgap: 25, bgap: 10 }, - 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); - } - }] + buttons: buttons }; },