From 84eca6a3d59fc591a7e28b3d7e0c11746dc837fc Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Mon, 23 Jul 2007 02:10:27 +0000 Subject: sync french translation, fixed ratings --- lib/class/ajax.class.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'lib/class/ajax.class.php') diff --git a/lib/class/ajax.class.php b/lib/class/ajax.class.php index 8f68da98..cb734edf 100644 --- a/lib/class/ajax.class.php +++ b/lib/class/ajax.class.php @@ -80,19 +80,25 @@ class Ajax { * This prints out the specified text as a link and setups the required * ajax for the link so it works correctly */ - public static function text($action,$text,$source,$post='') { + public static function text($action,$text,$source,$post='',$span_class='') { $url = Config::get('ajax_url') . $action; + // Use ajaxPost() if we are doing a post if ($post) { $ajax_string = "ajaxPost('$url','$post','$source')"; } else { - $ajax_string = "ajaxPut('$url','$post','$source')"; + $ajax_string = "ajaxPut('$url','$source')"; + } + + // If they passed a span class + if ($span_class) { + $class_txt = ' class="' . $span_class . '"'; } // If we pass a source put it in the ID - $string = "$text\n"; + $string = "$text\n"; $string .= self::observe($source,'click',$ajax_string); -- cgit