aboutsummaryrefslogtreecommitdiff
path: root/views/default/tidypics/forms/upload.php
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2009-06-16 11:40:49 +0000
committerCash Costello <cash.costello@gmail.com>2009-06-16 11:40:49 +0000
commit4e4f91f83a3cbdfc240059bebadf852c1e5901cf (patch)
treee452589d83ff1c9ef008218c1dca35f3290eefe7 /views/default/tidypics/forms/upload.php
parente1b554d703d6a41006009392afcfe66f64f9b769 (diff)
downloadelgg-4e4f91f83a3cbdfc240059bebadf852c1e5901cf.tar.gz
elgg-4e4f91f83a3cbdfc240059bebadf852c1e5901cf.tar.bz2
made some improvements to image uploading
Diffstat (limited to 'views/default/tidypics/forms/upload.php')
-rw-r--r--views/default/tidypics/forms/upload.php92
1 files changed, 45 insertions, 47 deletions
diff --git a/views/default/tidypics/forms/upload.php b/views/default/tidypics/forms/upload.php
index ec33ca933..1d83cf311 100644
--- a/views/default/tidypics/forms/upload.php
+++ b/views/default/tidypics/forms/upload.php
@@ -11,58 +11,35 @@
$maxfilesize = 5;
?>
-<script language="javascript">
-<!--
-
-var state = 'none';
-
-function showhide(layer_ref) {
- if (state == 'block') {
- state = 'none';
- }
- else {
- state = 'block';
- }
- if (document.all) { //IS IE 4 or 5 (or 6 beta)
- eval( "document.all." + layer_ref + ".style.display = state");
- }
- if (document.layers) { //IS NETSCAPE 4 or below
- document.layers[layer_ref].display = state;
- }
- if (document.getElementById &&!document.all) {
- hza = document.getElementById(layer_ref);
- hza.style.display = state;
- }
- return false;
-}
-//-->
-</script>
+<div id="tidypics_ref"></div>
<div class="contentWrapper">
<?php
ob_start();
?>
- <p style="line-height:1.6em;">
- <label><?php echo elgg_echo("images:upload"); ?></label><br />
- <i><?php echo elgg_echo("tidypics:settings:maxfilesize") . ' ' . $maxfilesize; ?></i><br />
- <div align="center" class="tidypics_loader" id="tidypics_loader" name="tidypics_loader" style="display:none;"><center><img alt="..." border="0" src="<?php echo $vars['url'].'mod/tidypics/graphics/loader.gif' ?>" /></center></div>
- <ol id="tidypics_image_upload_list">
+<p style="line-height:1.6em;">
+ <label><?php echo elgg_echo("images:upload"); ?></label><br />
+ <i><?php echo elgg_echo("tidypics:settings:maxfilesize") . ' ' . $maxfilesize; ?></i><br />
+ <div id="delete_tag_menu">
+ Uploading images<br />
+ <div style="margin:20px 0px 20px 80px;"><img alt="..." border="0" src="<?php echo $vars['url'].'mod/tidypics/graphics/loader.gif' ?>" /></div>
+ </div>
+ <ol id="tidypics_image_upload_list">
<?php
- for($x = 0; $x < 10; $x++){
- echo '<li>' . elgg_view("input/file",array('internalname' => "upload_$x")) . "</li>\n";
- }
+ for ($x = 0; $x < 10; $x++) {
+ echo '<li>' . elgg_view("input/file",array('internalname' => "upload_$x")) . '</li>';
+ }
?>
- </ol>
- </p>
-
- <p>
- <?php
- if ($container_guid)
- echo '<input type="hidden" name="container_guid" value="' . $container_guid . '" />';
- if ($access_id)
- echo '<input type="hidden" name="access_id" value="' . $access_id . '" />';
- ?>
- <input type="submit" value="<?php echo elgg_echo("save"); ?>" onclick="showhide('tidypics_loader');" />
- </p>
+ </ol>
+</p>
+<p>
+<?php
+ if ($container_guid)
+ echo '<input type="hidden" name="container_guid" value="' . $container_guid . '" />';
+ if ($access_id)
+ echo '<input type="hidden" name="access_id" value="' . $access_id . '" />';
+?>
+ <input type="submit" value="<?php echo elgg_echo("save"); ?>" onclick="displayProgress();" />
+</p>
<?php
$form_body = ob_get_clean();
@@ -72,4 +49,25 @@ function showhide(layer_ref) {
'enctype' => 'multipart/form-data',
'method' => 'post',));
?>
-</div> \ No newline at end of file
+</div>
+<script type="text/javascript">
+
+ function displayProgress()
+ {
+ offsetY = 60;
+ offsetX = 120;
+
+ divWidth = $('#tidypics_ref').width();
+ imgOffset = $('#tidypics_ref').offset();
+ imgWidth = $('#tidypics_ref').width();
+
+ _top = imgOffset.top + offsetY;
+ _left = imgOffset.left + offsetX;
+
+ $('#delete_tag_menu').show().css({
+ "top": _top + "px",
+ "left": _left + "px"
+ });
+
+ }
+</script> \ No newline at end of file