mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 21:57:51 +02:00
Default loading icon added to form->button() method when font-awesome is present.
This commit is contained in:
@@ -741,7 +741,31 @@ $(document).ready(function()
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
$('button[type=submit]').on('click', function()
|
||||
{
|
||||
var caption = $(this).text();
|
||||
var type = $(this).attr('data-loading-icon');
|
||||
|
||||
if(type === undefined)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
caption = "<i class='fa fa-spin " + type + " fa-fw'></i><span>" + caption + "</span>";
|
||||
|
||||
$(this).html(caption);
|
||||
|
||||
if($(this).attr('data-disable') == 'true')
|
||||
{
|
||||
$(this).addClass('disabled');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
|
||||
// Dates --------------------------------------------------
|
||||
|
||||
|
Reference in New Issue
Block a user