2 <span id="login_button_html_div" style="white-space:nowrap;width:200;float:right"><button class="btn btn-primary disabled" type="button" style="margin: 7px 7px 0px 0px">Login</button></span>
8 function update_login_button() {
11 url: '/ajax/user/login_button_html',
12 error: function(r) { alert('An error occurred'); },
13 success: function(r) {
14 if (r.error) { alert(r.error); }
16 jQuery('#login_button_html_div').html(r.html);
23 var answer = confirm("Are you sure you want to log out?");
25 if (answer === true) {
27 url: '/ajax/user/logout',
28 error: function(r) { alert('An error occurred'); },
29 success: function(r) {
30 if (r.error) { alert(r.error); }
39 jQuery(document).ready(function () {
41 update_login_button();
43 jQuery(document).on('click', 'button[name="site_login_button"]', function(event)
45 jQuery('#site_login_dialog').modal("show");