From 31fe96fa61b1ec489994e8819336fda8746a4386 Mon Sep 17 00:00:00 2001 From: cash Date: Thu, 1 Dec 2011 22:00:40 -0500 Subject: added support for passing classes to ajax loader --- views/default/graphics/ajax_loader.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'views/default/graphics') diff --git a/views/default/graphics/ajax_loader.php b/views/default/graphics/ajax_loader.php index 1a9046178..d5ce87ea9 100644 --- a/views/default/graphics/ajax_loader.php +++ b/views/default/graphics/ajax_loader.php @@ -6,6 +6,7 @@ * @subpackage Core * * @uses $vars['id'] CSS id + * @uses $vars['class'] Optional additional CSS class * @uses $vars['hidden'] Begin hidden? (true) */ @@ -13,15 +14,18 @@ if (isset($vars['id'])) { $id = "id=\"{$vars['id']}\""; } +$class = 'elgg-ajax-loader'; +if (isset($vars['class'])) { + $class = "$class {$vars['class']}"; +} + if (elgg_extract('hidden', $vars, true)) { - $hidden = 'hidden'; -} else { - $hidden = ''; + $class = "$class hidden"; } $loader = <<< END -
+
END; -- cgit v1.2.3