bug/bug.xhtml | 4 ++-- bug/bug/bug.js | 2 ++ bug/bug/test.html | 2 ++ bug/bug/test.js | 5 ++++- 4 files changed, 10 insertions(+), 3 deletions(-)
New commits: commit 5c51c26990b27e262fbe8768d82ee66d1f5028b0 Author: Loic Dachary <l...@dachary.org> Date: Mon Oct 24 18:20:23 2011 +0200 https://bugs.freedesktop.org/show_bug.cgi?id=42156 The href in the signin page are created using the $.bug.url prefix, which may be different from / It was previously assumed that the bug submission assistant runs as a standalone server and / was bugzilla. All references have been made relative to the $.bug.url but these being hardcoded in the bugt.xhtml file were overlooked. diff --git a/bug/bug.xhtml b/bug/bug.xhtml index 415f2eb..ff75ae1 100644 --- a/bug/bug.xhtml +++ b/bug/bug.xhtml @@ -98,7 +98,7 @@ <div class="state signin"> <div class="signin-invite"> - Please login using your <a href="/">bugzilla account</a>. + Please login using your <a class="login-link" target="_blank">bugzilla account</a>. </div> <div class="signin-container"> <div class="input-label">User:</div> @@ -107,7 +107,7 @@ <div class="signin-input"><input class='password' type="password" name="password"></input></div> <div class="go">Sign in</div> <div class="signin-create"> - or <a href="/enter_bug.cgi" target="_blank">create an account</a> + or <a class="create-account-link" target="_blank">create an account</a> </div> </div> </div> diff --git a/bug/bug/bug.js b/bug/bug/bug.js index 751414f..555cb07 100644 --- a/bug/bug/bug.js +++ b/bug/bug/bug.js @@ -101,6 +101,8 @@ $.bug.state_component(); }); }); + $('.login-link', element).attr('href', $.bug.url + '/'); + $('.create-account-link', element).attr('href', $.bug.url + '/enter_bug.cgi'); $.bug.current_step('signin'); element.show(); }, diff --git a/bug/bug/test.html b/bug/bug/test.html index 40cc326..8014e52 100644 --- a/bug/bug/test.html +++ b/bug/bug/test.html @@ -46,6 +46,8 @@ <div class="signin"> <input class='user' type="text" name="user"></input> <input class='password' type="password" name="password"></input> + <a class="login-link"></a> + <a class="create-account-link"></a> <div class="go">Sign in</div> </div> diff --git a/bug/bug/test.js b/bug/bug/test.js index 83e4af5..5ea1f8a 100644 --- a/bug/bug/test.js +++ b/bug/bug/test.js @@ -31,6 +31,7 @@ test("frame", function() { equal($.bug.url, ''); $.bug.frame(); equal($.bug.url, bugzilla_url); + $.bug.url = ''; }); test("ajax", function() { @@ -95,7 +96,7 @@ test("lookup_result", function() { }); test("state_signin", function() { - expect(9); + expect(11); equal($('.signin').css('display'), 'none'); var user = 'gooduser'; @@ -113,6 +114,8 @@ test("state_signin", function() { var state_component = $.bug.state_component; $.bug.state_component = function() { ok(true, 'state_component'); }; $.bug.state_signin(); + equal($('.login-link').attr('href'), '/'); + equal($('.create-account-link').attr('href'), '/enter_bug.cgi'); equal($('.signin').css('display'), 'block'); // fail to login, shows error equal($('.error-container').css('display'), 'none', 'no error'); _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits