From 7be9eb4ea1e868fa0725334697057e1b7b994460 Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Thu, 12 Jul 2007 05:30:30 +0000 Subject: re-added ability to delete catalogs, fixed exception error with id3 library --- lib/ui.lib.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'lib/ui.lib.php') diff --git a/lib/ui.lib.php b/lib/ui.lib.php index a1283841..aa407adf 100644 --- a/lib/ui.lib.php +++ b/lib/ui.lib.php @@ -1424,4 +1424,27 @@ function ajax_include($include) { } // ajax_include +/** + * ajax_button + * This is a generic function that generates the on(whateva) URL for ajaxie hotness + * it takes a action url, icon name, alt tag and form_id (option) + */ +function ajax_button($action,$icon,$alt,$post_id='') { + + $url = Config::get('ajax_url') . $action; + $icon_url = Config::get('web_path') . '/images/icons/' . $icon . '.png'; + + if ($post) { + $ajax_string = "ajaxPost('$url','$post');"; + } + else { + $ajax_string = "ajaxPut('$url');"; + } + + $string = "\n\t\"$alt\"\n\n"; + + return $string; + +} // ajax_button + ?> -- cgit