[5116] trunk/htdocs/system/admin/js/media.js: A much more elegent method of resolving #1403.

1 view
Skip to first unread message

s...@habariproject.org

unread,
May 8, 2011, 6:54:06 AM5/8/11
to habar...@googlegroups.com
Revision
5116
Author
lildude
Date
2011-05-08 10:53:57 +0000 (Sun, 08 May 2011)

Log Message

A much more elegent method of resolving #1403. Still does the same thing as the previous fix, just more elegently.

Modified Paths

Diff

Modified: trunk/htdocs/system/admin/js/media.js (5115 => 5116)


--- trunk/htdocs/system/admin/js/media.js	2011-05-08 01:51:50 UTC (rev 5115)
+++ trunk/htdocs/system/admin/js/media.js	2011-05-08 10:53:57 UTC (rev 5116)
@@ -113,10 +113,8 @@
 	},
 	
 	resize_media_row: function() {
-		// Obtain the silo id we're working in so we can resize the correct silo's media_row
-		var silo_id = $('.mediasplitter:not(".ui-tabs-hide")').attr('id');
 		var dirswidth = 0;
-		$('#' + silo_id +' .media_dirlevel').each(function(){
+		$('.mediasplitter:visible .media_dirlevel').each(function(){
 			var maxw = 0;
 			$(this).find('.directory').each(function(){
 				maxw = Math.max(maxw, $(this).outerWidth());
@@ -124,7 +122,7 @@
 			$(this).width(maxw);
 			dirswidth += maxw;
 		});
-		$('#' + silo_id +' .media_row').width(dirswidth + $('#' + silo_id +' .mediaphotos').outerWidth() + 33);
+		$('.mediasplitter:visible .media_row').width(dirswidth + $('.mediasplitter:visible .mediaphotos').outerWidth() + 33);
 	},
 
 	clickdir: function(el, path) {
Reply all
Reply to author
Forward
0 new messages