smonetti / btbutton

CKEditor4 Bootstrap3 button widget
GNU General Public License v3.0
9 stars 27 forks source link

After changing a button size, can't change size back to normal. #4

Closed cymocp closed 8 years ago

cymocp commented 8 years ago

To reproduce

Create a button, select a size option other than Normal (Extra Small, Small, Large) Click OK The button is sized. Reopen the button properties dialog and switch the button back to size Normal. Click OK The button size doesn't change.

Resolution

This can be resolved by changing plugin.js near line 35 From:

if (this.data.btnsize) {
    $el.removeClass('btn-xs btn-sm btn-lg').addClass(this.data.btnsize);
}

To:

$el.removeClass('btn-xs btn-sm btn-lg');
if (this.data.btnsize) {
   $el.addClass(this.data.btnsize);
}