r9466 - in apps/gobi/trunk/code: Comment Page/skins
[email protected] Mon, 22 Dec 2008 17:25:08 +0100
Newsgroups
gmane.comp.java.helma.cvs
Message-ID
<[email protected] >
Author: hannes
Date: 2008-12-22 17:25:08 +0100 (Mon, 22 Dec 2008)
New Revision: 9466
Modified:
apps/gobi/trunk/code/Comment/edit.skin
apps/gobi/trunk/code/Page/skins/javascript.skin
Log:
Reduce animations for inline comment editing.
Details at http://dev.helma.org/trac/helma/changeset/9466
Modified: apps/gobi/trunk/code/Comment/edit.skin
===================================================================
--- apps/gobi/trunk/code/Comment/edit.skin 2008-12-22 16:13:35 UTC (rev 9465)
+++ apps/gobi/trunk/code/Comment/edit.skin 2008-12-22 16:25:08 UTC (rev 9466)
@@ -3,7 +3,7 @@
<% this.formEditor %>
<p style="clear: both;">
-<% this.textArea name="body" rows="18" class="horizontalFill" id="commentInput" %></p>
+<% this.textArea name="body" rows="20" class="horizontalFill" id="commentInput" %></p>
<p>
<input type="submit" value="<% msg name='comment_preview' %>" name="preview"
Modified: apps/gobi/trunk/code/Page/skins/javascript.skin
===================================================================
--- apps/gobi/trunk/code/Page/skins/javascript.skin 2008-12-22 16:13:35 UTC (rev 9465)
+++ apps/gobi/trunk/code/Page/skins/javascript.skin 2008-12-22 16:25:08 UTC (rev 9466)
@@ -168,10 +168,9 @@
function deleteCommentShow(link) {
var scratchpad = $(link).nextAll('.commentScratchpad:first');
+ scratchpad.next().show();
scratchpad.html('').hide().load(link.href, { ajax: true }, function() {
- scratchpad.show('normal', function() {
- scratchpad.next().show();
- });
+ scratchpad.show('normal');
});
return false;
}
@@ -189,14 +188,12 @@
function editCommentShow(link) {
var scratchpad = $(link).nextAll('.commentScratchpad:first');
- var toggle = scratchpad.next().add(scratchpad);
- scratchpad.html('').hide().load(link.href, { ajaxedit: true }, function() {
- toggle.toggle('normal', function() {
- $('html,body').animate({
- scrollTop: $(link).offset().top
- });
- scratchpad.find('textarea').focus();
+ scratchpad.load(link.href, { ajaxedit: true }, function() {
+ $('html,body').animate({
+ scrollTop: $(link).offset().top
});
+ scratchpad.show().find('textarea').focus();
+ scratchpad.next().hide();
});
return false;
}
@@ -204,8 +201,7 @@
function editCommentCancel(link) {
var parent = $(link).parents('.commentScratchpad');
if (parent.length > 0) {
- parent.next().show();
- parent.hide('normal');
+ parent.hide().next().show();
return false;
}
return true;