Fix buttons in plugins dialog

This commit is contained in:
Julia Radzhabova 2019-10-08 10:50:22 +03:00
parent edb33ef4ef
commit e20dd48374
2 changed files with 2 additions and 7 deletions

View file

@ -367,14 +367,14 @@ define([
var me = this,
isCustomWindow = variation.get_CustomWindow(),
arrBtns = variation.get_Buttons(),
newBtns = {},
newBtns = [],
size = variation.get_Size();
if (!size || size.length<2) size = [800, 600];
if (_.isArray(arrBtns)) {
_.each(arrBtns, function(b, index){
if (b.visible)
newBtns[index] = {text: b.text, cls: 'custom' + ((b.primary) ? ' primary' : '')};
newBtns[index] = {caption: b.text, value: index, primary: b.primary};
});
}

View file

@ -366,11 +366,6 @@ define([
'</div>',
'<% if ((typeof buttons !== "undefined") && _.size(buttons) > 0) { %>',
'<div class="separator horizontal"/>',
'<div class="footer" style="text-align: center;">',
'<% for(var bt in buttons) { %>',
'<button class="btn normal dlg-btn <%= buttons[bt].cls %>" result="<%= bt %>"><%= buttons[bt].text %></button>',
'<% } %>',
'</div>',
'<% } %>'
].join('');