slim scroll

This commit is contained in:
life
2014-06-14 17:29:29 +08:00
parent 8d4a757ee9
commit cf4accc110
4 changed files with 29 additions and 17 deletions

View File

@ -950,6 +950,9 @@ Note.setNoteCache(noteContentJson);
Note.renderNoteContent(noteContentJson)
Tag.renderTagNav(tagsJson);
// init notebook后才调用
initSlimScroll();
</script>
<!-- mdEditor -->

View File

@ -950,6 +950,9 @@ Note.setNoteCache(noteContentJson);
Note.renderNoteContent(noteContentJson)
Tag.renderTagNav(tagsJson);
// init notebook后才调用
initSlimScroll();
</script>
<!-- mdEditor -->

File diff suppressed because one or more lines are too long

View File

@ -666,29 +666,35 @@ $(function() {
// slimScroll
//---
/*
setTimeout(function() {
$("#notebook").slimScroll({
height: "100%", // $("#leftNotebook").height()+"px"
});
$("#noteItemList").slimScroll({
height: "100%", // ($("#leftNotebook").height()-42)+"px"
});
$("#wmd-input").slimScroll({
height: "100%", // $("#wmd-input").height()+"px"
});
$("#wmd-input").css("width", "100%");
$("#wmd-panel-preview").slimScroll({
height: "100%", // $("#wmd-panel-preview").height()+"px"
});
$("#wmd-panel-preview").css("width", "100%");
initSlimScroll();
}, 10);
*/
// 编辑器模式
em.init();
});
function initSlimScroll() {
$("#notebook").slimScroll({
height: "100%", // $("#leftNotebook").height()+"px"
});
$("#noteItemList").slimScroll({
height: "100%", // ($("#leftNotebook").height()-42)+"px"
});
$("#wmd-input").slimScroll({
height: "100%", // $("#wmd-input").height()+"px"
});
$("#wmd-input").css("width", "100%");
$("#wmd-panel-preview").slimScroll({
height: "100%", // $("#wmd-panel-preview").height()+"px"
});
$("#wmd-panel-preview").css("width", "100%");
}
// 编辑器模式
function editorMode() {
this.writingHash = "#writing";