1 /* Blerg is (C) 2011 The Dominion of Awesome, and is distributed under a
2 * BSD-style license. Please see the COPYING file for details.
5 LoginStatus.prototype.post = function(msg) {
7 alert("You are not logged in!");
11 new Ajax.Request(baseURL + '/put', {
13 username: this.username,
16 onSuccess: function(r) {
17 var j = r.responseText.evalJSON();
18 if (j && j.status == 'success') {
19 $('post.content').value = '';
20 if (location.hash != '#' + this.username) {
23 currentPager.itemCount++;
24 currentPager.reload();
27 alert('Post failed!');
30 onFailure: function(r) {
31 alert('Post failed!');
37 var old_password = $('passwd.old_password').value;
38 var new_password = $('passwd.new_password').value;
40 new Ajax.Request(baseURL + '/passwd', {
42 username: loginStatus.username,
43 password: old_password,
44 new_password: new_password
46 onSuccess: function(r) {
47 if (r.responseJSON.status == 'success') {
48 alert('Password changed');
51 alert('Password change failed. Your password has NOT been changed.');
54 onFailure: function(r) {
55 alert('Password change error');
60 function passwd_cancel() {
62 $('navigation').show();