diff options
author | Brett Profitt <brett.profitt@gmail.com> | 2012-02-07 19:04:35 -0800 |
---|---|---|
committer | Brett Profitt <brett.profitt@gmail.com> | 2012-02-07 19:04:35 -0800 |
commit | 4e593af0c167b0ec48799f569dced56058e5e8aa (patch) | |
tree | 0c9f7d3230f46bcfe12a776eb1523764385c1b6f /views/default/admin/administer_utilities | |
parent | 1c0b514cd009d66544aba2902abc2000f5cb5f43 (diff) | |
download | elgg-4e593af0c167b0ec48799f569dced56058e5e8aa.tar.gz elgg-4e593af0c167b0ec48799f569dced56058e5e8aa.tar.bz2 |
Refs #16. Added image lib tester to utilities.
Diffstat (limited to 'views/default/admin/administer_utilities')
-rw-r--r-- | views/default/admin/administer_utilities/tidypics_tools.php (renamed from views/default/admin/administer_utilities/tidypics_server_info.php) | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/views/default/admin/administer_utilities/tidypics_server_info.php b/views/default/admin/administer_utilities/tidypics_tools.php index 6a034a561..1df664be8 100644 --- a/views/default/admin/administer_utilities/tidypics_server_info.php +++ b/views/default/admin/administer_utilities/tidypics_tools.php @@ -3,8 +3,9 @@ * Tidypics server analysis */ -$title = elgg_echo('admin:administer_utilities:tidypics_server_info'); +$title = elgg_echo('admin:administer_utilities:tidypics_tools'); +// server info function tp_readable_size($bytes) { if (strpos($bytes, 'M')) { return $bytes . 'B'; @@ -127,4 +128,39 @@ ob_start(); $content = ob_get_clean(); -echo elgg_view_module('inline', elgg_echo('admin:administer_utilities:tidypics_server_info'), $content); +echo elgg_view_module('inline', elgg_echo('tidypics:server_info'), $content); + +// image library tools +$content = '<p>' . elgg_echo('tidypics:lib_tools:overview') . '</p>'; +$content .= '<p>' . elgg_echo('tidypics:lib_tools:testing') . '</p>'; +$content .= '<p><label>' . elgg_echo('tidypics:settings:im_path'); +$content .= elgg_view('input/text', array( + 'name' => 'im_location' +)); +$content .= elgg_view('input/submit', array( + 'value' => elgg_echo('submit'), + 'id' => 'tidypics-im-test' +)); +$content .= '</p>'; +$content .= '<p id="tidypics-im-results"></p>'; + +echo elgg_view_module('inline', elgg_echo('tidypics:lib_tools'), $content); + +?> +<script type="text/javascript"> + $(function() { + $('#tidypics-im-test').click(function() { + var loc = $('input[name=im_location]').val(); + $("#tidypics-im-results").html(""); + $.ajax({ + type: "GET", + url: elgg.normalize_url('mod/tidypics/actions/admin/imtest.php'), + data: {location: loc}, + cache: false, + success: function(html){ + $("#tidypics-im-results").html(html); + } + }); + }); + }); +</script> |