Skip to content

Commit f6a9f7e

Browse files
committed
Thr sign out button is now a link. Initial try to notify user of logging out and not redirecting user when bug is submitted.
1 parent ef33ea4 commit f6a9f7e

File tree

3 files changed

+26
-8
lines changed

3 files changed

+26
-8
lines changed

bug/bug.css

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,13 @@ body {
564564
border: 0;
565565
}
566566

567-
/* Common */
567+
/* logout */
568+
a.logout {
569+
color: /* green */;
570+
}
571+
.logout_success {
572+
display: none;
573+
}
568574
button.logout {
569575
margin: 10px 15px 10px auto;
570576
/*background: url('images/signin.png') no-repeat;*/

bug/bug.js

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
state_signin_success_regexp: /LOG&NBSP;OUT<\/A>([^<]*)/i,
123123

124124
state_signin: function() {
125-
$('button.logout').hide();
125+
$('a.logout').hide();
126126
var element = $('.signin');
127127
$('.go', element).click(function() {
128128
$("body").css("cursor", "progress");
@@ -160,7 +160,7 @@
160160
},
161161

162162
state_component: function() {
163-
$('button.logout').show();
163+
$('a.logout').show();
164164
var element = $('.state_component');
165165
$.bug.current_step('component');
166166
element.show();
@@ -549,10 +549,16 @@
549549
},
550550

551551
logout: function() {
552-
$('button.logout').click(function(){
553-
$.ajax($bug.url + '/index.cgi?logout=1');
554-
$('button.logout').show();
555-
$.bug.current_step('signin');
552+
$('a.logout').click(function(){
553+
//$.ajax($bug.url + '/index.cgi?logout=1');
554+
$('a.logout').hide();
555+
var request = $.ajax($bug.url + '/index.cgi?logout=1');
556+
request.success(function() { $('.logout_success').show(); });
557+
request.error(function() { $.bug.error_set(messageStrings("ERROR_LOGOUT")); });
558+
//$.bug.current_step('signin');
559+
if(!$.bug.current_step('success')) {
560+
$.bug.state_signin();
561+
}
556562
});
557563
}
558564
};

en/bug.xhtml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Thank you for using LibreOffice and for helping us improve our software. This as
7171
<div class="step step_details"><div class="count">3</div><div class="label">Details</div></div>
7272
<div class="step step_description"><div class="count">4</div><div class="label">Description</div></div>
7373
<div class="step step_submit"><div class="count">5</div><div class="label">Submit</div></div>
74-
<button name="logout" class="logout">Sign out</button>
74+
<a name="logout" class="logout">Sign out</a>
7575
</div>
7676
<div class="legal">
7777
All your contributions will be public in WWW! By clicking the 'Submit' button you irrevocably agree to release your contribution under the CC-BY-SA 3.0 License and the GFDL. If you can't agree to these terms for documents you planned to attach you can state in this report that such a document exists. QA team will discuss with you further proceeding in the bug.
@@ -99,6 +99,10 @@ Thank you for using LibreOffice and for helping us improve our software. This as
9999
</div>
100100
</div>
101101

102+
<div class="logout_success">
103+
<p>You have been logged out of Bugzilla</p>
104+
</div>
105+
102106
<div class="state_failure">
103107
<p>The bug couldn't be submitted. Please try again later or use <a href="https://bugs.freedesktop.org/">bugzilla</a>.</p>
104108
</div>
@@ -317,6 +321,8 @@ Expected behavior:
317321
case "ERROR_TOKEN": return "Data not yet loaded. Please press submit again in a few seconds.";
318322
case "ERROR_SUBCOMPONENT": return "No subcomponent selected. Please select one";
319323
case "ERROR_ATTACHMENT": return "Please describe the attachtment";
324+
case "ERROR_LOGOUT": return "Bugzilla could not log you out";
325+
case "SUCCESS_LOGOUT": return "You have been logged out";
320326
case "Operating System: ": return "Operating System: ";
321327
case "Version: ": return "Version: ";
322328
case "Last worked in: ": return "Last worked in: ";

0 commit comments

Comments
 (0)