diff options
Diffstat (limited to 'public/javascripts')
| -rw-r--r-- | public/javascripts/admin_interface.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/public/javascripts/admin_interface.js b/public/javascripts/admin_interface.js index 5b51dfc..12a3ba6 100644 --- a/public/javascripts/admin_interface.js +++ b/public/javascripts/admin_interface.js | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | $(document).ready(function () { | 1 | $(document).ready(function () { |
| 2 | $("#metadata").attr("style", "display: none;") | 2 | $("#metadata").attr("style", "display: none;"); |
| 3 | 3 | ||
| 4 | $("#button").click(function () { | 4 | $("#button").click(function () { |
| 5 | $("#metadata").slideToggle("slow"); | 5 | $("#metadata").slideToggle("slow"); |
| @@ -11,4 +11,16 @@ $(document).ready(function () { | |||
| 11 | $("#button").attr("class", "unselected"); | 11 | $("#button").attr("class", "unselected"); |
| 12 | } | 12 | } |
| 13 | }); | 13 | }); |
| 14 | |||
| 15 | jQuery.ajaxSetup({ | ||
| 16 | 'beforeSend': function(xhr) {xhr.setRequestHeader("Accept", "text/javascript")} | ||
| 17 | }) | ||
| 18 | |||
| 19 | jQuery.fn.submitWithAjax = function() { | ||
| 20 | $("#flash").append("<img src='/images/ajax-loader.gif' alt='' />"); | ||
| 21 | $.post(this.attr("action"), $(this).serialize(), null, "script"); | ||
| 22 | }; | ||
| 23 | |||
| 24 | |||
| 25 | |||
| 14 | }); \ No newline at end of file | 26 | }); \ No newline at end of file |
