瀏覽代碼

- collapsible tables on mailbox.php which are collapsed per default if they are long
- changed username field on the login form to the type "text" as "name" is no valid type which causes problems with some extensions (password managers)

tehXor 8 年之前
父節點
當前提交
89aef716b4
共有 2 個文件被更改,包括 13 次插入1 次删除
  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>
 							<label class="sr-only" for="login_user"><?=$lang['login']['username'];?></label>
 							<div class="input-group">
 							<div class="input-group">
 								<div class="input-group-addon"><i class="glyphicon glyphicon-user"></i></div>
 								<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>
 						</div>
 						<div class="form-group">
 						<div class="form-group">

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

@@ -51,4 +51,16 @@ $(document).ready(function() {
 			$panel.find('.panel-body input').focus();
 			$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");
+		}
+	})
 });
 });