diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-07-23 02:10:27 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-07-23 02:10:27 +0000 |
commit | 84eca6a3d59fc591a7e28b3d7e0c11746dc837fc (patch) | |
tree | 837dd1a9051e787ff9bca6a7f928ac710ea639cd /lib/class/ajax.class.php | |
parent | b62f10549d421dfee1d9f4268522946f665ae11f (diff) | |
download | ampache-84eca6a3d59fc591a7e28b3d7e0c11746dc837fc.tar.gz ampache-84eca6a3d59fc591a7e28b3d7e0c11746dc837fc.tar.bz2 ampache-84eca6a3d59fc591a7e28b3d7e0c11746dc837fc.zip |
sync french translation, fixed ratings
Diffstat (limited to 'lib/class/ajax.class.php')
-rw-r--r-- | lib/class/ajax.class.php | 12 |
1 files changed, 9 insertions, 3 deletions
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 = "<span id=\"$source\">$text</span>\n"; + $string = "<span id=\"$source\" $class_txt>$text</span>\n"; $string .= self::observe($source,'click',$ajax_string); |