diff --git a/js/bootstrap-markdown.js b/js/bootstrap-markdown.js index 456cbae..c3ea8d4 100644 --- a/js/bootstrap-markdown.js +++ b/js/bootstrap-markdown.js @@ -83,7 +83,7 @@ for (z=0;z'); + buttonContainer.text(' ' + this.__localize(btnText)).addClass('btn-default btn-sm').addClass(btnClass); + if(btnClass.match(/btn\-(primary|success|info|warning|danger|link)/)){ + buttonContainer.removeClass('btn-default'); } + buttonContainer.attr({ + 'type': 'button', + 'title': this.__localize(button.title) + hotkeyCaption, + 'tabindex': tabIndex, + 'data-provider': ns, + 'data-handler': buttonHandler, + 'data-hotkey': hotkey + }); + if (button.toggle == true){ + buttonContainer.attr('data-toggle', 'button'); + } + buttonIconContainer = $(''); + buttonIconContainer.addClass(buttonIcon); + buttonIconContainer.prependTo(buttonContainer); // Attach the button object - btnGroupContainer.append('') + btnGroupContainer.append(buttonContainer); // Register handler and callback - handler.push(buttonHandler) - callback.push(button.callback) + handler.push(buttonHandler); + callback.push(button.callback); } // Attach the button group into container dom - container.append(btnGroupContainer) + container.append(btnGroupContainer); } } - return container + return container; } , __setListener: function() { // Set size and resizable Properties