summaryrefslogtreecommitdiffstats
path: root/lib/class/ajax.class.php
diff options
context:
space:
mode:
authorPaul 'flowerysong' Arthur <flowerysong00@yahoo.com>2010-03-14 06:10:27 +0000
committerPaul 'flowerysong' Arthur <flowerysong00@yahoo.com>2010-03-14 06:10:27 +0000
commitd78c207f76c8ae57744300611519f4c85c2c34c4 (patch)
tree7a29bf59f4c3c9fc5f9f654ba86e6cd3f065a74f /lib/class/ajax.class.php
parent98c5c04643228731b1dcf0eb48fa3dbc77815ad6 (diff)
downloadampache-d78c207f76c8ae57744300611519f4c85c2c34c4.tar.gz
ampache-d78c207f76c8ae57744300611519f4c85c2c34c4.tar.bz2
ampache-d78c207f76c8ae57744300611519f4c85c2c34c4.zip
Cosmetics: use tabs for indentation, tweak some indentation/coding style.
Diffstat (limited to 'lib/class/ajax.class.php')
-rw-r--r--lib/class/ajax.class.php42
1 files changed, 21 insertions, 21 deletions
diff --git a/lib/class/ajax.class.php b/lib/class/ajax.class.php
index 254bc6bf..5381f529 100644
--- a/lib/class/ajax.class.php
+++ b/lib/class/ajax.class.php
@@ -45,23 +45,23 @@ class Ajax {
*/
public static function observe($source,$method,$action,$post='') {
- $non_quoted = array('document','window');
+ $non_quoted = array('document','window');
- if (in_array($source,$non_quoted)) {
- $source_txt = $source;
- }
- else {
- $source_txt = "'$source'";
- }
+ if (in_array($source,$non_quoted)) {
+ $source_txt = $source;
+ }
+ else {
+ $source_txt = "'$source'";
+ }
// If it's a post then we need to stop events
if ($post) {
$action = 'Event.stop(e); ' . $action;
}
- $observe = "<script type=\"text/javascript\">";
- $observe .= "Event.observe($source_txt,'$method',function(e){" . $action . ";});";
- $observe .= "</script>";
+ $observe = "<script type=\"text/javascript\">";
+ $observe .= "Event.observe($source_txt,'$method',function(e){" . $action . ";});";
+ $observe .= "</script>";
return $observe;
@@ -76,15 +76,15 @@ class Ajax {
$url = Config::get('ajax_url') . $action;
- $non_quoted = array('document','window');
+ $non_quoted = array('document','window');
+
+ if (in_array($source,$non_quoted)) {
+ $source_txt = $source;
+ }
+ else {
+ $source_txt = "'$source'";
+ }
- if (in_array($source,$non_quoted)) {
- $source_txt = $source;
- }
- else {
- $source_txt = "'$source'";
- }
-
if ($post) {
$ajax_string = "ajaxPost('$url','$post',$source_txt)";
}
@@ -106,7 +106,7 @@ class Ajax {
// Get the correct action
$ajax_string = self::action($action,$source,$post);
- // If they passed a span class
+ // If they passed a span class
if ($class) {
$class_txt = ' class="' . $class . '"';
}
@@ -114,7 +114,7 @@ class Ajax {
$string = get_user_icon($icon,$alt);
- // Generate a <a> so that it's more compliant with older browsers
+ // 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";
@@ -140,7 +140,7 @@ class Ajax {
}
// If we pass a source put it in the ID
- $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);