1
0
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:
Cameron
2016-04-10 17:52:30 -07:00
parent 12a6367fdf
commit 8ff02d9aa9
4 changed files with 133 additions and 102 deletions

View File

@@ -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 --------------------------------------------------