summaryrefslogtreecommitdiffstats
path: root/lib/class/ajax.class.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-07-23 02:10:27 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-07-23 02:10:27 +0000
commit84eca6a3d59fc591a7e28b3d7e0c11746dc837fc (patch)
tree837dd1a9051e787ff9bca6a7f928ac710ea639cd /lib/class/ajax.class.php
parentb62f10549d421dfee1d9f4268522946f665ae11f (diff)
downloadampache-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.php12
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);