Skip to content

Commit

Permalink
Make login system hide new login pane, not just the form
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Hudson committed Aug 6, 2011
1 parent ad10314 commit cb27f27
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
20 changes: 12 additions & 8 deletions admin/index.html
Expand Up @@ -29,7 +29,8 @@
</head>

<body id="home">
<div id="login-pane" style="display: block;">

<div id="login-pane">
<div id="login-bg-top"></div>
<div id="login-bg-bottom"></div>
<h1 id="login-logo">Bongo</h1>
Expand All @@ -40,24 +41,27 @@ <h4 id="login-form-message">&nbsp;</h4>
<tr>
<th>
<label id="login-user-label">Name:</label>
</th>
<td colspan="2">
</th>
<td colspan="2">
<input id="login-user" class="text-entry" type="text" style="width: 98%;" name="name" >
</td>
</tr>
<tr>
<th>
<label id="login-password-label">Password:</label>
</th>
<td colspan="2">
</th>
<td colspan="2">
<input id="login-password" class="text-entry" type="password" style="width: 98%;" name="password">
</td>
</tr>
<tr>
<td colspan="3">
<input id="login-form-button" type="button" style="float: right; display: block;" value="Login">
</td>
</tr>
<input id="login-form-button" type="button" style="float: right; display: block;" value="Login">
</td>
</tr>
</tbody>
</table>
</form>
</div>

<div id="admin-tool" style="display: none">
Expand Down
8 changes: 4 additions & 4 deletions admin/js/admin.js
Expand Up @@ -15,7 +15,7 @@ Bongo.AdminTool = function(backend) {
});
$('#admin-logout').click(function() {
$.cookie('bongo_admin_cookie', 'unset', { expires: -1, path: '/' });
$('#login-form').show();
$('#login-pane').show();
$('#admin-tool').hide();
});
$('#admin-save').click(function () {
Expand All @@ -26,11 +26,11 @@ Bongo.AdminTool = function(backend) {

var existing_cookie = $.cookie('bongo_admin_cookie');
if (existing_cookie) {
$('#login-form').hide();
$('#login-pane').hide();
// TODO: show some kind of holding thing?
$this.loadData({ command: 'login', cookie: existing_cookie },
function() {
$('#login-form').show();
$('#login-pane').show();
});
}
},
Expand Down Expand Up @@ -59,7 +59,7 @@ Bongo.AdminTool = function(backend) {
$this.model._showAddDomain = ko.observable(false);

ko.applyBindings($this.model);
$('#login-form').hide();
$('#login-pane').hide();
$('#admin-tool').show();
},

Expand Down

0 comments on commit cb27f27

Please sign in to comment.