diff options
Diffstat (limited to 'ishtar_common/static/js/ishtar.js')
-rw-r--r-- | ishtar_common/static/js/ishtar.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/ishtar_common/static/js/ishtar.js b/ishtar_common/static/js/ishtar.js index 9af5cf2b0..f469fc546 100644 --- a/ishtar_common/static/js/ishtar.js +++ b/ishtar_common/static/js/ishtar.js @@ -23,6 +23,15 @@ beforeSend: function(xhr, settings) { } }}); +function manage_async_link(event){ + event.preventDefault(); + var url = $(this).attr('href'); + var target = $(this).attr('data-target'); + $.get(url, function(data) { + $(target).html(data); + }); +} + /* default function to prevent undefined */ function get_next_table_id(){} function get_previous_table_id(){} @@ -63,7 +72,8 @@ $(document).ready(function(){ } $('#current_items select').change(function(){ $(this).attr('class', $(this).children("option:selected").attr('class')); - }) + }); + $("a.async-link").click(manage_async_link); }); $(document).on("click", '#to_bottom_arrow', function(){ |