[Libreoffice-commits] .: bug/bug
Loic Dachary
loic at kemper.freedesktop.org
Wed Oct 19 14:03:35 PDT 2011
bug/bug/bug.js | 4 +---
bug/bug/skin.js | 1 +
bug/bug/test.js | 3 +--
3 files changed, 3 insertions(+), 5 deletions(-)
New commits:
commit 70ac5ff7ba049773b7a965e3b399df0b3c64a34a
Author: Loic Dachary <loic at dachary.org>
Date: Wed Oct 19 23:03:18 2011 +0200
Do not use scrollTop to ensure the feedback is visible. Replace the submit button with the feedback instead because the submit button has to be visible to the user otherwise it would not be able to click it.
diff --git a/bug/bug/bug.js b/bug/bug/bug.js
index ad3f3d5..2acf8c6 100644
--- a/bug/bug/bug.js
+++ b/bug/bug/bug.js
@@ -224,8 +224,6 @@
var short_desc = $('.state_subcomponent .active_subcomponent .chosen').attr('data') + ': ' + $('.state_description .short').val();
var comment = $('.state_description .long').val();
$("body").css("cursor", "progress");
- // http://stackoverflow.com/questions/1852518/how-to-get-scrolltop-of-an-iframe
- $('html, body').animate({scrollTop: '0px'}, 300);
$('input[name="component"]', form).val(component);
$('input[name="version"]', form).val(version);
$('input[name="short_desc"]', form).val(short_desc);
@@ -250,7 +248,7 @@
},
state_success: function() {
- $('.submission').hide();
+ $('.state_submit').hide();
var element = $('.state_success');
var bug = $('.state_submit .bug').text();
$('.bug', element).attr('href', $.bug.url + '/show_bug.cgi?id=' + bug);
diff --git a/bug/bug/skin.js b/bug/bug/skin.js
index 5de87ab..8a51ea1 100644
--- a/bug/bug/skin.js
+++ b/bug/bug/skin.js
@@ -60,6 +60,7 @@
} else if(location.search.indexOf('skin=submit') >= 0) {
submit();
} else if(location.search.indexOf('skin=complete') >= 0) {
+ submit();
$.bug.state_success();
}
};
diff --git a/bug/bug/test.js b/bug/bug/test.js
index b470292..83e4af5 100644
--- a/bug/bug/test.js
+++ b/bug/bug/test.js
@@ -297,7 +297,7 @@ test("state_submit", function() {
});
test("state_success", function() {
- expect(5);
+ expect(4);
var bug = '4242';
var element = $('.state_success');
@@ -306,7 +306,6 @@ test("state_success", function() {
$('.state_submit .bug').text(bug);
$.bug.state_success();
equal(element.css('display'), 'block');
- equal($('.submission').css('display'), 'none');
ok($('.bug', element).attr('href').indexOf(bug) > 0, 'bug found');
});
More information about the Libreoffice-commits
mailing list