优化编辑器展示

This commit is contained in:
fen 2013-11-26 17:24:57 +08:00
parent 95090003ee
commit ce63d7b8c3
3 changed files with 22 additions and 5 deletions

View File

@ -1217,6 +1217,9 @@ a.operate-reply {
.wmd-hidetab {
display: none; }
.wmd-visualhide {
visibility: hidden; }
/* 对话框 */
.wmd-prompt-background {
background-color: #000; }
@ -1246,9 +1249,8 @@ a.operate-reply {
background: #FFF;
margin: 1em 0;
padding: 0 15px;
border: 1px solid #D9D9D6;
word-wrap: break-word;
overflow: scroll;
overflow: auto;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
-ms-border-radius: 2px;
@ -1339,6 +1341,8 @@ a.operate-reply {
display: none; }
.fullscreen .wmd-hidetab {
display: block; }
.fullscreen .wmd-visualhide {
visibility: visible; }
/**
* Jquery Timepicker

View File

@ -210,6 +210,13 @@ $(document).ready(function () {
var selected_tab = $(this).attr("href"),
selected_el = $(selected_tab).removeClass("wmd-hidetab");
// 预览时隐藏编辑器按钮
if (selected_tab == "#wmd-preview") {
$("#wmd-button-row").addClass("wmd-visualhide");
} else {
$("#wmd-button-row").removeClass("wmd-visualhide");
}
// 预览和编辑窗口高度一致
$("#wmd-preview").outerHeight($("#wmd-editarea").innerHeight());

View File

@ -63,7 +63,11 @@
// 控制被隐藏的 tab全屏时显示
.wmd-hidetab {
display: none;
}
}
// 隐藏编辑器但占位
.wmd-visualhide {
visibility: hidden;
}
/* 对话框 */
.wmd-prompt-background {
@ -94,9 +98,8 @@
background: #FFF;
margin: 1em 0;
padding: 0 15px;
border: 1px solid #D9D9D6;
word-wrap: break-word;
overflow: scroll;
overflow: auto;
@include border-radius(2px);
img { max-width: 100%; }
code, pre {
@ -188,4 +191,7 @@
.message,
#upload-panel { display: none; }
.wmd-hidetab { display: block; }
.wmd-visualhide {
visibility: visible;
}
}