Index: admin/js/_comments.js
===================================================================
--- admin/js/_comments.js	(revision 2527)
+++ admin/js/_comments.js	(revision 2531)
@@ -1,52 +1,8 @@
-dotclear.commentExpander = function(line) {
-	$('<a href="#"><img src="'+dotclear.img_plus_src+'" alt="'+dotclear.img_plus_alt+'"/></a>')
-		.click(function(e) {
-			dotclear.toggleArrow(this);
-			dotclear.viewCommentContent(line);
-			e.preventDefault();
-		})
-		.prependTo($(line).children().get(0)); // first td
-};
-
-dotclear.commentsExpander = function(line,lines) {
-	$('<a href="#"><img src="'+dotclear.img_plus_src+'" alt="'+dotclear.img_plus_alt+'"/></a>')
-		.click(function(e) {
-			dotclear.toggleArrow(this);
-			lines.each(function() {
-				var action = dotclear.toggleArrow(this.firstChild.firstChild);
-				dotclear.viewCommentContent(this,action);
-			});
-			e.preventDefault();
-		})
-		.prependTo($(line).children().get(0)); // first td
-};
-
-dotclear.toggleArrow = function(link,action) {
-	action = action || '';
-	var img = $(link).children().get(0);
-	if (action=='') {
-		if (img.alt==dotclear.img_plus_alt) {
-			action = 'open';
-		} else {
-			action = 'close';
-		}
-	}
-
-	if (action=='open') {
-		img.src = dotclear.img_minus_src;
-		img.alt = dotclear.img_minus_alt;
-	} else {
-		img.src = dotclear.img_plus_src;
-		img.alt = dotclear.img_plus_alt;
-	}
-
-	return action;
-}
-
 dotclear.viewCommentContent = function(line,action) {
+	var action = action || 'toggle';
 	var commentId = $(line).attr('id').substr(1);	
 	var tr = document.getElementById('ce'+commentId);
-	
-	if (!tr) {
+
+	if ( !tr && ( action == 'toggle' || action == 'open' ) ) {
 		tr = document.createElement('tr');
 		tr.id = 'ce'+commentId;
@@ -85,22 +41,21 @@
 		line.parentNode.insertBefore(tr,line.nextSibling);
 	}
-	else if (tr.style.display == 'none')
+	else if (tr && tr.style.display == 'none' && ( action == 'toggle' || action == 'open' ) )
 	{
-		$(tr).toggle();
-		$(line).toggleClass('expand');
+		$(tr).css('display', 'table-row');
+		$(line).addClass('expand');
 	}
-	else
+	else if (tr && tr.style.display != 'none' && ( action == 'toggle' || action == 'close' ) )
 	{
-		$(tr).toggle();
-		$(line).toggleClass('expand');
+		$(tr).css('display', 'none');
+		$(line).removeClass('expand');
 	}
 };
 
 $(function() {
-	$('#form-comments tr:not(.line)').each(function() {
-		dotclear.commentsExpander(this,$('#form-comments tr.line'));
-	});
-	$('#form-comments tr.line').each(function() {
-		dotclear.commentExpander(this);
+	$.expandContent({
+		line:$('#form-comments tr:not(.line)'),
+		lines:$('#form-comments tr.line'),
+		callback:dotclear.viewCommentContent
 	});
 	$('.checkboxes-helpers').each(function() {
Index: admin/js/_post.js
===================================================================
--- admin/js/_post.js	(revision 2527)
+++ admin/js/_post.js	(revision 2531)
@@ -1,34 +1,2 @@
-dotclear.commentExpander = function(line) {
-	$('<a href="#"><img src="'+dotclear.img_plus_src+'" alt="'+dotclear.img_plus_alt+'"/></a>')
-		.click(function(e) {
-			dotclear.toggleArrow(this);
-			dotclear.viewCommentContent(line);
-			e.preventDefault();
-		})
-		.prependTo($(line).children().get(0)); // first td
-};
-
-dotclear.toggleArrow = function(link,action) {
-	action = action || '';
-	var img = $(link).children().get(0);
-	if (action=='') {
-		if (img.alt==dotclear.img_plus_alt) {
-			action = 'open';
-		} else {
-			action = 'close';
-		}
-	}
-
-	if (action=='open') {
-		img.src = dotclear.img_minus_src;
-		img.alt = dotclear.img_minus_alt;
-	} else {
-		img.src = dotclear.img_plus_src;
-		img.alt = dotclear.img_plus_alt;
-	}
-
-	return action;
-}
-
 dotclear.viewCommentContent = function(line,action) {
 	var commentId = $(line).attr('id').substr(1);
@@ -140,5 +108,5 @@
 			
 			excerpt_content = $('#post_excerpt').css('display') != 'none' ? $('#post_excerpt').val() : $('#excerpt-area iframe').contents().find('body').html();
-			post_content    = $('#post_content').css('display') != 'none' ? $('#post_content').val() : $('#content-area iframe').contents().find('body').html();
+			post_content	= $('#post_content').css('display') != 'none' ? $('#post_content').val() : $('#content-area iframe').contents().find('body').html();
 			
 			var params = {
@@ -276,6 +244,7 @@
 
 	$('#comments').onetabload(function() {
-		$('#form-comments .comments-list tr.line').each(function() {
-			dotclear.commentExpander(this);
+		$.expandContent({
+			lines:$('#form-comments .comments-list tr.line'),
+			callback:dotclear.viewCommentContent
 		});
 		$('#form-comments .checkboxes-helpers').each(function() {
@@ -287,6 +256,7 @@
 
 	$('#trackbacks').onetabload(function() {
-		$('#form-trackbacks .comments-list tr.line').each(function() {
-			dotclear.commentExpander(this);
+		$.expandContent({
+			lines:$('#form-trackbacks .comments-list tr.line'),
+			callback:dotclear.viewCommentContent
 		});
 		$('#form-trackbacks .checkboxes-helpers').each(function() {
Index: admin/js/_posts_list.js
===================================================================
--- admin/js/_posts_list.js	(revision 2527)
+++ admin/js/_posts_list.js	(revision 2531)
@@ -1,48 +1,2 @@
-dotclear.postExpander = function(line) {
-	$('<a href="#"><img src="'+dotclear.img_plus_src+'" alt="'+dotclear.img_plus_alt+'"/></a>')
-		.click(function(e) {
-			dotclear.toggleArrow(this);
-			dotclear.viewPostContent(line);
-			e.preventDefault();
-		})
-		.prependTo($(line).children().get(0)); // first td
-};
-
-dotclear.postsExpander = function(line,lines) {
-	$('<a href="#"><img src="'+dotclear.img_plus_src+'" alt="'+dotclear.img_plus_alt+'"/></a>')
-		.click(function(e) {
-			dotclear.toggleArrow(this);
-			lines.each(function() {
-				var action = dotclear.toggleArrow(this.firstChild.firstChild);
-				dotclear.viewPostContent(this,action);
-			});
-			e.preventDefault();
-		})
-		.prependTo($(line).children().get(0)); // first td
-};
-
-dotclear.toggleArrow = function(link,action) {
-	action = action || '';
-	var img = $(link).children().get(0);
-	if (action=='') {
-		if (img.alt==dotclear.img_plus_alt) {
-			action = 'open';
-		} else {
-			action = 'close';
-		}
-	}
-
-	if (action=='open') {
-		img.src = dotclear.img_minus_src;
-		img.alt = dotclear.img_minus_alt;
-	} else {
-		img.src = dotclear.img_plus_src;
-		img.alt = dotclear.img_plus_alt;
-	}
-
-	return action;
-}
-
-
 dotclear.viewPostContent = function(line,action) {
 	var action = action || 'toggle';
@@ -92,13 +46,4 @@
 		$(line).removeClass('expand');
 	}
-	
-	parentTable = $(line).parents('table');
-	if( parentTable.find('tr.expand').length == parentTable.find('tr.line').length ) {
-		img = parentTable.find('tr:not(.line) th:first img');
-	}
-	
-	if( parentTable.find('tr.expand').length == 0 ) {
-		img = parentTable.find('tr:not(.line) th:first img');
-	}	
 };
 
@@ -109,9 +54,8 @@
 	});
 
-	$('#form-entries tr:not(.line)').each(function() {
-		dotclear.postsExpander(this,$('#form-entries tr.line'));
-	});
-	$('#form-entries tr.line').each(function() {
-		dotclear.postExpander(this);
+	$.expandContent({
+		line:$('#form-entries tr:not(.line)'),
+		lines:$('#form-entries tr.line'),
+		callback:dotclear.viewPostContent
 	});
 	$('.checkboxes-helpers').each(function() {
Index: admin/js/common.js
===================================================================
--- admin/js/common.js	(revision 2486)
+++ admin/js/common.js	(revision 2531)
@@ -150,4 +150,69 @@
 	});
 };
+
+(function($) {
+	'use strict';
+
+	$.expandContent = function(opts) {
+		var defaults = {};
+		$.expandContent.options = $.extend({},defaults,opts);
+
+		if (opts==undefined || opts.callback==undefined || !$.isFunction(opts.callback)) {
+			return;
+		}
+		if (opts.line!=undefined) {
+			multipleExpander(opts.line,opts.lines);
+		}
+		opts.lines.each(function() {
+			singleExpander(this);
+		});
+	}
+	
+	var singleExpander = function singleExpander(line) {
+		$('<input type="image" src="'+dotclear.img_plus_src+'" alt="'+dotclear.img_plus_alt+'"/>')
+			.click(function(e) {
+				toggleArrow(this);
+				$.expandContent.options.callback.call(this,line);
+				e.preventDefault();
+			})
+			.prependTo($(line).children().get(0)); // first td
+	};
+	
+	var multipleExpander = function multipleExpander(line,lines) {
+		$('<input type="image" src="'+dotclear.img_plus_src+'" alt="'+dotclear.img_plus_alt+'"/>')
+			.click(function(e) {
+				var that = this;
+				var action = toggleArrow(this);
+				lines.each(function() {
+					toggleArrow(this.firstChild.firstChild,action);
+					$.expandContent.options.callback.call(that,this,action);
+
+				});
+				e.preventDefault();
+			})
+			.prependTo($(line).children().get(0)); // first td
+	};
+
+	var toggleArrow = function toggleArrow(button,action) {
+		action = action || '';
+		if (action=='') {
+			if (button.alt==dotclear.img_plus_alt) {
+				action = 'open';
+			} else {
+				action = 'close';
+			}
+		}
+		
+		if (action=='open') {
+			button.src = dotclear.img_minus_src;
+			button.alt = dotclear.img_minus_alt;
+		} else {
+			button.src = dotclear.img_plus_src;
+			button.alt = dotclear.img_plus_alt;
+		}
+		
+		return action;
+	}
+})(jQuery);
 
 jQuery.fn.helpViewer = function() {
Index: admin/style/default.css
===================================================================
--- admin/style/default.css	(revision 2530)
+++ admin/style/default.css	(revision 2531)
@@ -1292,5 +1292,5 @@
 	padding-right: 1.5em;
 	}
-th.first img {
+th.first input {
 	padding-right: 34px;
 	}
Index: plugins/pages/list.js
===================================================================
--- plugins/pages/list.js	(revision 2527)
+++ plugins/pages/list.js	(revision 2531)
@@ -1,47 +1,2 @@
-dotclear.postExpander = function(line) {
-	$('<a href="#"><img src="'+dotclear.img_plus_src+'" alt="'+dotclear.img_plus_alt+'"/></a>')
-		.click(function(e) {
-			dotclear.toggleArrow(this);
-			dotclear.viewPostContent(line);
-			e.preventDefault();
-		})
-		.prependTo($(line).children().get(0)); // first td
-};
-
-dotclear.postsExpander = function(line,lines) {
-	$('<a href="#"><img src="'+dotclear.img_plus_src+'" alt="'+dotclear.img_plus_alt+'"/></a>')
-		.click(function(e) {
-			dotclear.toggleArrow(this);
-			lines.each(function() {
-				var action = dotclear.toggleArrow(this.firstChild.firstChild);
-				dotclear.viewPostContent(this,action);
-			});
-			e.preventDefault();
-		})
-		.prependTo($(line).children().get(0)); // first td
-};
-
-dotclear.toggleArrow = function(link,action) {
-	action = action || '';
-	var img = $(link).children().get(0);
-	if (action=='') {
-		if (img.alt==dotclear.img_plus_alt) {
-			action = 'open';
-		} else {
-			action = 'close';
-		}
-	}
-
-	if (action=='open') {
-		img.src = dotclear.img_minus_src;
-		img.alt = dotclear.img_minus_alt;
-	} else {
-		img.src = dotclear.img_plus_src;
-		img.alt = dotclear.img_plus_alt;
-	}
-
-	return action;
-}
-
 dotclear.viewPostContent = function(line,action) {
 	var action = action || 'toggle';
@@ -91,25 +46,13 @@
 		$(line).removeClass('expand');
 	}
-	
-	parentTable = $(line).parents('table');
-	if( parentTable.find('tr.expand').length == parentTable.find('tr.line').length ) {
-		img = parentTable.find('tr:not(.line) th:first img');
-	}
-	
-	if( parentTable.find('tr.expand').length == 0 ) {
-		img = parentTable.find('tr:not(.line) th:first img');
-	}
-	
 };
 
 $(function() {
-
 	$('#pageslist tr.line').prepend('<td class="expander"></td>');
 	$('#form-entries tr:not(.line) th:first').attr('colspan',4);
-	$('#form-entries tr:not(.line)').each(function() {
-		dotclear.postsExpander(this,$('#form-entries tr.line'));
-	});
-	$('#pageslist tr.line').each(function() {
-		dotclear.postExpander(this);
+	$.expandContent({
+		line:$('#form-entries tr:not(.line)'),
+		lines:$('#form-entries tr.line'),
+		callback:dotclear.viewPostContent
 	});
 	$('.checkboxes-helpers').each(function() {
