From 2b18301e57b9f1a12d8958de7c2f3e6f74419d90 Mon Sep 17 00:00:00 2001 From: Terence Miller Date: Fri, 6 Sep 2013 11:22:38 +0200 Subject: [PATCH] reload paged conetn in ajax request in div - fix #178 fix #186 fixes #178 fixes #186 made a "work around fix. I insert js script which binds the page clicks events and fires a ajax call to reload the div content with the paged content and overrdide the href so no onw view request is made. --- assets/javascripts/test_case_tree.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/assets/javascripts/test_case_tree.js b/assets/javascripts/test_case_tree.js index 29407af..3a9884b 100644 --- a/assets/javascripts/test_case_tree.js +++ b/assets/javascripts/test_case_tree.js @@ -464,6 +464,29 @@ jQuery(document).ready(function ($) { }); }); + $("#button-requirement-issues").bind("click", function(e) { + $.ajax({ + url: IMPASSE.url.requirementIssues, + data: { }, + success: function(html) { + $("#requirements-view").html(html).show(); + $("a.page").live("click", function(e) { + var oldurl = $(this).attr("href"); + $("a.page").attr("href","#"); + $.ajax({ + url: oldurl, + data: { }, + success: function(html) { + $("#requirements-view").html(html).show(); + }, + error: ajax_error_handler + }); + }); + }, + error: ajax_error_handler + }); + }); + $("#button-close-requirements").live("click", function(e) { $("#requirements-view").hide(); e.preventDefault();