From ba808050d09a3db53e228646bf604e6e46b64c1e Mon Sep 17 00:00:00 2001 From: dave Date: Fri, 6 Nov 2009 08:24:54 +0000 Subject: [PATCH] - Use the report generator dialog all the time --- admin/reports.php | 23 ++++++++++++----------- admin/reports_gen.php | 39 ++++++++++++++++----------------------- js/sfiab.js | 6 ++++++ 3 files changed, 34 insertions(+), 34 deletions(-) diff --git a/admin/reports.php b/admin/reports.php index 5524e95..00f19d4 100644 --- a/admin/reports.php +++ b/admin/reports.php @@ -175,8 +175,12 @@ function save_report() function add_report() { - var reports_id = $('#report').val(); - edit_report(-1, reports_id); + edit_report(-1, $('#report').val()); +} + +function gen_report() +{ + report_gen($('#report').val()); } var edit=false; @@ -255,14 +259,12 @@ $(document).ready(function() { } if($i->reports_id > 0) { - $name = $i->name; - $url = "admin/reports_gen.php?id={$i->reports_id}&show_options=1"; +// $url = "admin/reports_gen.php?id={$i->reports_id}&show_options=1"; + $name = "reports_id}); return false\">{$i->name}"; } else { - $name = $report_custom[-$i->reports_id]['name']; - $url = $report_custom[-$i->reports_id]['custom_url']; + $name = "reports_id]['custom_url']}\"> + {$report_custom[-$i->reports_id]['name']}"; } - $name = "$name"; - ?> @@ -315,8 +317,7 @@ $(document).ready(function() {

-
- +
-"> +"> ">

diff --git a/admin/reports_gen.php b/admin/reports_gen.php index c41bc91..d6a689c 100644 --- a/admin/reports_gen.php +++ b/admin/reports_gen.php @@ -121,38 +121,31 @@ case 'dialog_gen': echo ""; ?> -
-
-
- - - -
diff --git a/js/sfiab.js b/js/sfiab.js index cd9e3fc..69badd3 100644 --- a/js/sfiab.js +++ b/js/sfiab.js @@ -62,6 +62,12 @@ function notice_(str) notice_create('notice',str,-1); } +function report_gen(id) +{ + var args="id="+id+"&action=dialog_gen"; + $("#debug").load("reports_gen.php?"+args); +} + /* Stuff to do after the document loads */ $(document).ready(function() {