summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorGuillaume Mazoyer <respawneral@gmail.com>2014-06-10 14:37:04 +0200
committerGuillaume Mazoyer <respawneral@gmail.com>2014-06-10 14:37:04 +0200
commitd45eab0fe59e5a24e0562365d3c314ca7bde99f3 (patch)
treedfc8175e0e682582aa336da884638b57d1c1da1f /includes
parent5f29b7aa41a46e2b791c0dfc1023a07b02972e1f (diff)
New directory js/ for Javascript file.
Use a local jquery instead of an online one.
Diffstat (limited to 'includes')
-rw-r--r--includes/main.js38
1 files changed, 0 insertions, 38 deletions
diff --git a/includes/main.js b/includes/main.js
deleted file mode 100644
index b837e82..0000000
--- a/includes/main.js
+++ /dev/null
@@ -1,38 +0,0 @@
-$(document).ready(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);
- });
- });
-});