mirror of
https://github.com/leanote/desktop-app.git
synced 2025-10-14 23:22:40 +00:00
写作模式切到可写状态, markdown切到可写时Md.onResize #13
This commit is contained in:
@@ -342,11 +342,9 @@ function log(o) {
|
||||
<div id="mceToolbarContainer">
|
||||
<div id="popularToolbar"
|
||||
style="position: absolute; right: 30px; left: 0"></div>
|
||||
<a
|
||||
style="dispaly: block; position: absolute; cursor: pointer; right: 10px; padding: 3px 10px"
|
||||
id="moreBtn">
|
||||
<i class="more-fa fa fa-angle-down"></i>
|
||||
</a>
|
||||
<a id="moreBtn">
|
||||
<i class="more-fa fa fa-angle-down"></i>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- 查看信息 -->
|
||||
|
@@ -1793,7 +1793,8 @@ Note.toggleReadOnly = function() {
|
||||
|
||||
// console.log('(((((((((((((((((((((((');
|
||||
// tinymce
|
||||
$('#editor').addClass('read-only');
|
||||
var $editor = $('#editor');
|
||||
$editor.addClass('read-only').removeClass('all-tool'); // 不要全部的
|
||||
|
||||
// 不可写
|
||||
$('#editorContent').attr('contenteditable', false);
|
||||
@@ -1847,6 +1848,11 @@ Note.toggleWriteable = function() {
|
||||
LeaAce.setAceReadOnly($(this), false);
|
||||
});
|
||||
}
|
||||
else {
|
||||
if(MD) {
|
||||
MD.onResize();
|
||||
}
|
||||
}
|
||||
|
||||
note.readOnly = false;
|
||||
Note.readOnly = false;
|
||||
|
@@ -30,6 +30,9 @@ var Writting = {
|
||||
Resize.setMdColumnWidth(width);
|
||||
// $("#mceToolbar").css("height", "40px");
|
||||
resizeEditor();
|
||||
|
||||
// 切换到写模式
|
||||
Note.toggleWriteable();
|
||||
},
|
||||
initNormal: function() {
|
||||
Resize.setMdColumnWidth(UserInfo.MdEditorWidth);
|
||||
@@ -193,7 +196,7 @@ var Resize = {
|
||||
UserInfo.NotebookWidth = notebookWidth;
|
||||
UserInfo.NoteListWidth = noteListWidth;
|
||||
|
||||
console.log("??????????");
|
||||
// console.log("??????????");
|
||||
self.setTopDragWidth();
|
||||
},
|
||||
resize3Columns: function(event, isFromeIfr) {
|
||||
@@ -397,9 +400,9 @@ function initEditor() {
|
||||
// desk下有问题
|
||||
// ed.on('keydown', Note.saveNote);
|
||||
ed.on('keydown', function(e) {
|
||||
// 如果是readony, 则不能做任何操作
|
||||
if(Note.readOnly) {
|
||||
console.log('readonly');
|
||||
var num = e.which ? e.which : e.keyCode;
|
||||
// 如果是readony, 则不能做任何操作, 除了复制
|
||||
if(Note.readOnly && !((e.ctrlKey || e.metaKey) && num == 67)) {
|
||||
e.preventDefault();
|
||||
return;
|
||||
}
|
||||
|
@@ -1819,6 +1819,13 @@ img::selection {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.mce-btn-small .mce-caret {
|
||||
margin-top: 8px;
|
||||
}
|
||||
.mce-listbox.mce-btn-small .mce-caret {
|
||||
margin-top: -2px;
|
||||
}
|
||||
|
||||
/*
|
||||
#starNotes li a,
|
||||
.ztree li a,
|
||||
@@ -1830,6 +1837,12 @@ img::selection {
|
||||
}
|
||||
*/
|
||||
|
||||
#moreBtn {
|
||||
dispaly: block; position: absolute;
|
||||
cursor: pointer;
|
||||
right: 5px;
|
||||
padding: 3px 10px;
|
||||
}
|
||||
|
||||
// readonly
|
||||
.info-toolbar {
|
||||
|
@@ -1607,6 +1607,12 @@ img::selection {
|
||||
line-height: 11px;
|
||||
text-align: center;
|
||||
}
|
||||
.mce-btn-small .mce-caret {
|
||||
margin-top: 8px;
|
||||
}
|
||||
.mce-listbox.mce-btn-small .mce-caret {
|
||||
margin-top: -2px;
|
||||
}
|
||||
/*
|
||||
#starNotes li a,
|
||||
.ztree li a,
|
||||
@@ -1617,6 +1623,13 @@ img::selection {
|
||||
cursor: default !important;
|
||||
}
|
||||
*/
|
||||
#moreBtn {
|
||||
dispaly: block;
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
right: 5px;
|
||||
padding: 3px 10px;
|
||||
}
|
||||
.info-toolbar {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
Reference in New Issue
Block a user