Browse Source

Merge pull request #126 from tehXor/feat-friendly-web-gui

GUI improvements: collapsible tables & password manager compatible login form
André Peters 8 years ago
parent
commit
d82b26af4d
2 changed files with 13 additions and 1 deletions
  1. 1 1
      data/web/index.php
  2. 12 0
      data/web/js/mailbox.js

+ 1 - 1
data/web/index.php

@@ -29,7 +29,7 @@ $_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
 							<label class="sr-only" for="login_user"><?=$lang['login']['username'];?></label>
 							<div class="input-group">
 								<div class="input-group-addon"><i class="glyphicon glyphicon-user"></i></div>
-								<input name="login_user" autocorrect="off" autocapitalize="none" type="name" id="login_user" class="form-control" placeholder="<?=$lang['login']['username'];?>" required="" autofocus="">
+								<input name="login_user" autocorrect="off" autocapitalize="none" type="text" id="login_user" class="form-control" placeholder="<?=$lang['login']['username'];?>" required="" autofocus="">
 							</div>
 						</div>
 						<div class="form-group">

+ 12 - 0
data/web/js/mailbox.js

@@ -51,4 +51,16 @@ $(document).ready(function() {
 			$panel.find('.panel-body input').focus();
 		}
 	});
+	$('.container').on('click', '.panel-heading .panel-title', function(e){
+		var $this = $(this),
+			$panel = $this.parents('.panel');
+		$panel.find('.table-responsive').slideToggle("fast");
+	});
+	$('.panel-heading .panel-title').addClass('clickable');
+	$('.panel .table-responsive').each(function() {
+		if ($(this).height() > 550) {
+			// If one is too large initially hide all
+			$('.panel .table-responsive').slideUp("fast");
+		}
+	})
 });