diff options
author | cash <cash.costello@gmail.com> | 2011-12-01 22:00:40 -0500 |
---|---|---|
committer | cash <cash.costello@gmail.com> | 2011-12-01 22:00:40 -0500 |
commit | 31fe96fa61b1ec489994e8819336fda8746a4386 (patch) | |
tree | 986cd2646902c991991a6d57371472a43d70e641 | |
parent | 55352776b2d8ef72d59c825ec02b19df407d11bb (diff) | |
download | elgg-31fe96fa61b1ec489994e8819336fda8746a4386.tar.gz elgg-31fe96fa61b1ec489994e8819336fda8746a4386.tar.bz2 |
added support for passing classes to ajax loader
-rw-r--r-- | views/default/graphics/ajax_loader.php | 12 |
1 files changed, 8 insertions, 4 deletions
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 -<div class="elgg-ajax-loader $hidden" $id></div> +<div class="$class" $id></div> END; |