Fix buttons in plugins dialog
This commit is contained in:
		
							parent
							
								
									edb33ef4ef
								
							
						
					
					
						commit
						e20dd48374
					
				| 
						 | 
					@ -367,14 +367,14 @@ define([
 | 
				
			||||||
                    var me = this,
 | 
					                    var me = this,
 | 
				
			||||||
                        isCustomWindow = variation.get_CustomWindow(),
 | 
					                        isCustomWindow = variation.get_CustomWindow(),
 | 
				
			||||||
                        arrBtns = variation.get_Buttons(),
 | 
					                        arrBtns = variation.get_Buttons(),
 | 
				
			||||||
                        newBtns = {},
 | 
					                        newBtns = [],
 | 
				
			||||||
                        size = variation.get_Size();
 | 
					                        size = variation.get_Size();
 | 
				
			||||||
                        if (!size || size.length<2) size = [800, 600];
 | 
					                        if (!size || size.length<2) size = [800, 600];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    if (_.isArray(arrBtns)) {
 | 
					                    if (_.isArray(arrBtns)) {
 | 
				
			||||||
                        _.each(arrBtns, function(b, index){
 | 
					                        _.each(arrBtns, function(b, index){
 | 
				
			||||||
                            if (b.visible)
 | 
					                            if (b.visible)
 | 
				
			||||||
                                newBtns[index] = {text: b.text, cls: 'custom' + ((b.primary) ? ' primary' : '')};
 | 
					                                newBtns[index] = {caption: b.text, value: index, primary: b.primary};
 | 
				
			||||||
                        });
 | 
					                        });
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -366,11 +366,6 @@ define([
 | 
				
			||||||
                '</div>',
 | 
					                '</div>',
 | 
				
			||||||
                '<% if ((typeof buttons !== "undefined") && _.size(buttons) > 0) { %>',
 | 
					                '<% if ((typeof buttons !== "undefined") && _.size(buttons) > 0) { %>',
 | 
				
			||||||
                    '<div class="separator horizontal"/>',
 | 
					                    '<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('');
 | 
					            ].join('');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue