Skip to content

Commit 4b455b9

Browse files
committed
Updates build files
1 parent 830aa92 commit 4b455b9

2 files changed

Lines changed: 30 additions & 2 deletions

File tree

public/cui.js

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57775,8 +57775,15 @@ CUI.Modal = (function(superClass) {
5777557775
};
5777657776

5777757777
function Modal(opts) {
57778-
var bd, do_cancel, htbn, toggleFillScreenButton;
57778+
var bd, btnOpts, do_cancel, htbn, i, len, ref, toggleFillScreenButton;
5777957779
Modal.__super__.constructor.call(this, opts);
57780+
if (this._header_buttons) {
57781+
ref = this._header_buttons;
57782+
for (i = 0, len = ref.length; i < len; i++) {
57783+
btnOpts = ref[i];
57784+
this.__addCustomHeaderButton(btnOpts);
57785+
}
57786+
}
5778057787
toggleFillScreenButton = CUI.Pane.getToggleFillScreenButton({
5778157788
tooltip: this._fill_screen_button_tooltip
5778257789
});
@@ -57863,6 +57870,9 @@ CUI.Modal = (function(superClass) {
5786357870
},
5786457871
onToggleFillScreen: {
5786557872
check: Function
57873+
},
57874+
header_buttons: {
57875+
check: Array
5786657876
}
5786757877
});
5786857878
return this.mergeOpt("placement", {
@@ -57898,6 +57908,24 @@ CUI.Modal = (function(superClass) {
5789857908
return btn;
5789957909
};
5790057910

57911+
Modal.prototype.__addCustomHeaderButton = function(_btn) {
57912+
var btn;
57913+
if (CUI.util.isPlainObject(_btn)) {
57914+
btn = new CUI.defaults["class"].Button(_btn);
57915+
} else {
57916+
btn = _btn;
57917+
}
57918+
CUI.util.assert(btn instanceof CUI.Button, "Modal.__addCustomHeaderButton", "Button needs to be instance of Button", {
57919+
btn: btn
57920+
});
57921+
CUI.util.assert(this.__pane instanceof CUI.SimplePane, "new " + this.__cls, "opts.header_buttons can only be used if opts.pane is instance of SimplePane.", {
57922+
pane: this.__pane,
57923+
opts: this.opts
57924+
});
57925+
this.append(btn, "header_right");
57926+
return btn;
57927+
};
57928+
5790157929
Modal.prototype.__runOnAllButtons = function(func) {
5790257930
var btn, el, i, len, ref;
5790357931
ref = CUI.dom.matchSelector(this.__layer.DOM, ".cui-button,.cui-data-field");

public/cui.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)