diff options
author | Guillaume Mazoyer <respawneral@gmail.com> | 2014-06-03 10:29:30 +0200 |
---|---|---|
committer | Guillaume Mazoyer <respawneral@gmail.com> | 2014-06-03 10:29:30 +0200 |
commit | ae8e479c1a8ae55c5cfbc56788da7954243e5164 (patch) | |
tree | 1f1b275790e3ba58a37f8d7fbc8aaadd1f4307d3 /includes/utils.js | |
parent | 1508b3780dff32ac878d20ebb1d41ebfc27c5909 (diff) |
Rename main JS file.
Diffstat (limited to 'includes/utils.js')
-rw-r--r-- | includes/utils.js | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/includes/utils.js b/includes/utils.js deleted file mode 100644 index e2b0a6f..0000000 --- a/includes/utils.js +++ /dev/null @@ -1,38 +0,0 @@ -$(function() { - // hide the optional parameters field - $('.result').hide(); - $('.loading').hide(); - - // show and hide loading bar - $(document).ajaxStart(function() { - $('#command_properties').attr('disabled', ''); - $('.loading').show(); - }); - $(document).ajaxStop(function() { - $('#command_properties').removeAttr('disabled'); - $('.loading').hide(); - }); - - // reset the view to the default one - $('#backhome').click(function() { - $('.content').slideDown(); - $('.result').slideUp(); - }); - - // send an ajax request that will get the info on the router - $('form').on('submit', function(e) { - e.preventDefault(); - - $.ajax({ - type: 'post', - url: 'execute.php', - data: $('form').serialize() - }).done(function(response, state, xhr) { - $('#output').text(response); - $('.content').slideUp(); - $('.result').slideDown(); - }).fail(function(xhr, state, error) { - alert('The following error occured: ' + state, error); - }); - }); -}); |