From 3bb7ee521f38e1ab1fc7cd160dc3d0ae77f0433e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= <jfd@butonic.de>
Date: Mon, 7 Jan 2013 12:23:29 +0100
Subject: [PATCH] attach max upload tipsy to div instead of a to fix tooltip
 not showing due to new z-index

---
 apps/files/js/files.js         | 4 ++++
 apps/files/templates/index.php | 6 +++---
 core/js/js.js                  | 2 +-
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index 6d19a341e9..038660e6e4 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -322,6 +322,7 @@ $(document).ready(function() {
 											if ($.assocArraySize(uploadingFiles[dirName]) == 0) {
 												delete uploadingFiles[dirName];
 											}
+											//TODO update file upload size limit
 
 											var uploadtext = $('tr').filterAttr('data-type', 'dir').filterAttr('data-file', dirName).find('.uploadtext')
 											var currentUploads = parseInt(uploadtext.attr('currentUploads'));
@@ -375,6 +376,7 @@ $(document).ready(function() {
 												if(size==t('files','Pending')){
 													$('tr').filterAttr('data-file',file.name).find('td.filesize').text(file.size);
 												}
+												//TODO update file upload size limit
 												FileList.loadingDone(file.name, file.id);
 											} else {
 												Files.cancelUpload(this.files[0].name);
@@ -407,8 +409,10 @@ $(document).ready(function() {
 								if(size==t('files','Pending')){
 									$('tr').filterAttr('data-file',file.name).find('td.filesize').text(file.size);
 								}
+								//TODO update file upload size limit
 								FileList.loadingDone(file.name, file.id);
 							} else {
+								//TODO Files.cancelUpload(/*where do we get the filename*/);
 								$('#notification').text(t('files', response.data.message));
 								$('#notification').fadeIn();
 								$('#fileList > tr').not('[data-mime]').fadeOut();
diff --git a/apps/files/templates/index.php b/apps/files/templates/index.php
index 3bcb865ccd..2e0772443f 100644
--- a/apps/files/templates/index.php
+++ b/apps/files/templates/index.php
@@ -14,7 +14,8 @@
 						data-type='web'><p><?php echo $l->t('From link');?></p></li>
 				</ul>
 			</div>
-			<div id="upload" class="button">
+			<div id="upload" class="button"
+				 title="<?php echo $l->t('Upload') . ' max. '.$_['uploadMaxHumanFilesize'] ?>">
 				<form data-upload-id='1'
 					  id="data-upload-form"
 					  class="file_upload_form"
@@ -31,8 +32,7 @@
 						   value="(max <?php echo $_['uploadMaxHumanFilesize']; ?>)">
 					<input type="hidden" name="dir" value="<?php echo $_['dir'] ?>" id="dir">
 					<input type="file" id="file_upload_start" name='files[]'/>
-					<a href="#" class="svg" onclick="return false;"
-					   title="<?php echo $l->t('Upload') . ' max. '.$_['uploadMaxHumanFilesize'] ?>"></a>
+					<a href="#" class="svg" onclick="return false;"></a>
 				</form>
 			</div>
 			<div id="uploadprogresswrapper">
diff --git a/core/js/js.js b/core/js/js.js
index 9f3e8f9210..95889ac8a2 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -622,7 +622,7 @@ $(document).ready(function(){
 	$('.jp-controls .jp-previous').tipsy({gravity:'nw', fade:true, live:true});
 	$('.jp-controls .jp-next').tipsy({gravity:'n', fade:true, live:true});
 	$('.password .action').tipsy({gravity:'se', fade:true, live:true});
-	$('#upload a').tipsy({gravity:'w', fade:true});
+	$('#upload').tipsy({gravity:'w', fade:true});
 	$('.selectedActions a').tipsy({gravity:'s', fade:true, live:true});
 	$('a.delete').tipsy({gravity: 'e', fade:true, live:true});
 	$('a.action').tipsy({gravity:'s', fade:true, live:true});
-- 
GitLab