Commit 434ef607 authored by Julia Radzhabova's avatar Julia Radzhabova

[Common] Window: добавлена возможность задания нескольких кастомных кнопок в алерты.

parent 091c0c7a
......@@ -301,9 +301,14 @@ define([
options.primary = 'ok';
var newBtns = {};
_.each(options.buttons, function(b){
newBtns[b] = {text: (b=='custom') ? options.customButtonText : arrBtns[b], cls: (options.primary==b) ? 'primary' : ''};
if (b=='custom')
newBtns[b].cls += ' custom';
if (typeof(b) == 'object') {
if (b.value !== undefined)
newBtns[b.value] = {text: b.caption, cls: 'custom' + ((b.primary || options.primary==b.value) ? ' primary' : '')};
} else {
newBtns[b] = {text: (b=='custom') ? options.customButtonText : arrBtns[b], cls: (options.primary==b) ? 'primary' : ''};
if (b=='custom')
newBtns[b].cls += ' custom';
}
});
options.buttons = newBtns;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment