vitalets / x-editable

In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery
http://vitalets.github.io/x-editable
MIT License
6.51k stars 1.72k forks source link

Support font awesome v4 fonts #606

Open jperkelens opened 10 years ago

jperkelens commented 10 years ago

Have you considered adding classes to your editableform buttons to support Font Awesome v4? Adding the classes to the s would be a really minor change. I'm happy ro submit a pull request for it.

ajfranzoia commented 9 years ago

You can currently make use of FontAwesome icons by setting $.fn.editableform.buttons property. This works for me:

$.fn.editableform.buttons =
  '<button type="submit" class="btn btn-primary btn-sm editable-submit">'+
    '<i class="fa fa-fw fa-check"></i>'+
  '</button>'+
  '<button type="button" class="btn btn-default btn-sm editable-cancel">'+
    '<i class="fa fa-fw fa-times"></i>'+
  '</button>';
JasonDonner commented 9 years ago

I replaced the icon- with fa fa- in the .js file. Note that icon-ok becomes fa fa-icon-check, and icon-remove becomes fa fa-times.

sucotronic commented 8 years ago

@ajfranzoia tip worked great ;)

antonisgr commented 8 years ago

+1

weballianz commented 8 years ago

Thanks!

azhararmar commented 8 years ago

@ajfranzoia it worked for me, thank you.