diff options
author | spocky <spocky@ampache> | 2007-09-23 20:06:37 +0000 |
---|---|---|
committer | spocky <spocky@ampache> | 2007-09-23 20:06:37 +0000 |
commit | a3d16d1cd6ec1b2fbba373177468a91a6ab49c99 (patch) | |
tree | 3bbcf6fed6979e22bcccf564a6b4fddfd53fa870 /lib/class/ajax.class.php | |
parent | 1dfdf2afab8da95da8c814e3838b3393d88ae53c (diff) | |
download | ampache-a3d16d1cd6ec1b2fbba373177468a91a6ab49c99.tar.gz ampache-a3d16d1cd6ec1b2fbba373177468a91a6ab49c99.tar.bz2 ampache-a3d16d1cd6ec1b2fbba373177468a91a6ab49c99.zip |
- modified sidebar css
- modified rightbar html/css
- added patch to enabled ie6 :hover pseudo classes
- modified boxes html/css to remove table tags and enable box floating
- added 1st version of 3.4 greysme theme (needs more work, especially on ie6)
Diffstat (limited to 'lib/class/ajax.class.php')
-rw-r--r-- | lib/class/ajax.class.php | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/lib/class/ajax.class.php b/lib/class/ajax.class.php index 213a0e3d..d0bf4eee 100644 --- a/lib/class/ajax.class.php +++ b/lib/class/ajax.class.php @@ -93,16 +93,26 @@ class Ajax { * This prints out an img of the specified icon with the specified alt text * and then sets up the required ajax for it */ - public static function button($action,$icon,$alt,$source='',$post='') { + public static function button($action,$icon,$alt,$source='',$post='',$class='') { // Get the correct action $ajax_string = self::action($action,$source,$post); - $string = get_user_icon($icon,$alt,$source); + // If they passed a span class + if ($class) { + $class_txt = ' class="' . $class . '"'; + } + + + $string = get_user_icon($icon,$alt); + + // Generate a <a> so that it's more compliant with older browsers + // (ie :hover actions) and also to unify linkbuttons (w/o ajax) display + $string = "<a href=\"javascript:void(0);\" id=\"$source\" $class_txt>".$string."</a>\n"; $string .= self::observe($source,'click',$ajax_string); - return $string; + return $string; } // button @@ -111,22 +121,22 @@ 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='',$span_class='') { + public static function text($action,$text,$source,$post='',$class='') { // Format the string we wanna use $ajax_string = self::action($action,$source,$post); - $span_class.= ($span_class?' ':'') . 'link'; + //$class.= ($class?' ':'') . 'link'; // If they passed a span class - if ($span_class) { - $class_txt = ' class="' . $span_class . '"'; + if ($class) { + $class_txt = ' class="' . $class . '"'; } // If we pass a source put it in the ID //$string = "<div id=\"$source\" $class_txt>$text</div>\n"; - $string = "<a href=\"javascript:void(0);\" id=\"$source\" $class_txt>$text</a>\n"; + $string = "<a href=\"javascript:void(0);\" id=\"$source\" $class_txt>$text</a>\n"; $string .= self::observe($source,'click',$ajax_string); |