mirror of
https://github.com/leanote/desktop-app.git
synced 2025-10-16 16:04:56 +00:00
只读与可写切换的按钮放到tool中
This commit is contained in:
11
note.html
11
note.html
@@ -267,7 +267,7 @@ function log(o) {
|
|||||||
|
|
||||||
<div class="noteSplit" id="noteSplitter"></div>
|
<div class="noteSplit" id="noteSplitter"></div>
|
||||||
|
|
||||||
<div id="note">
|
<div id="note" class="read-only-editor">
|
||||||
|
|
||||||
<!-- 遮罩, 为了resize3Columns用 -->
|
<!-- 遮罩, 为了resize3Columns用 -->
|
||||||
<div id="noteMask" class="note-mask"></div>
|
<div id="noteMask" class="note-mask"></div>
|
||||||
@@ -307,6 +307,11 @@ function log(o) {
|
|||||||
|
|
||||||
<ul class="pull-right" id="editorTool">
|
<ul class="pull-right" id="editorTool">
|
||||||
|
|
||||||
|
<li><a class="ios7-a lang-title lang-title" id="editBtn"
|
||||||
|
data-toggle="dropdown" title="ctrl/cmd+e Toggle Modify with Readonly">
|
||||||
|
<span class="fa"></span>
|
||||||
|
</a></li>
|
||||||
|
|
||||||
<li class="dropdown" id="attachDropdown">
|
<li class="dropdown" id="attachDropdown">
|
||||||
<a class="ios7-a dropdown-toggle lang-title" data-toggle="dropdown" id="showAttach" title="Attachments">
|
<a class="ios7-a dropdown-toggle lang-title" data-toggle="dropdown" id="showAttach" title="Attachments">
|
||||||
<span class="fa fa-paperclip"></span>
|
<span class="fa fa-paperclip"></span>
|
||||||
@@ -358,7 +363,7 @@ function log(o) {
|
|||||||
|
|
||||||
<!-- 查看信息 -->
|
<!-- 查看信息 -->
|
||||||
<div id="infoToolbar" class="info-toolbar">
|
<div id="infoToolbar" class="info-toolbar">
|
||||||
<a class="toolbar-update" title="ctrl/cmd + e"><i class="fa fa-pencil"></i> <span class="lang">Modify</span></a>
|
|
||||||
<span class="lang">Created</span>: <span class="created-time">2015-04-03</span>
|
<span class="lang">Created</span>: <span class="created-time">2015-04-03</span>
|
||||||
<span class="lang">Updated</span>: <span class="updated-time">2015-05-01</span>
|
<span class="lang">Updated</span>: <span class="updated-time">2015-05-01</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -399,7 +404,7 @@ function log(o) {
|
|||||||
<div class="navbar navbar-default">
|
<div class="navbar navbar-default">
|
||||||
<div class="navbar-inner" id="wmd-button-bar">
|
<div class="navbar-inner" id="wmd-button-bar">
|
||||||
<div id="mdInfoToolbar" class="info-toolbar">
|
<div id="mdInfoToolbar" class="info-toolbar">
|
||||||
<a class="toolbar-update" title="ctrl/cmd + e"><i class="fa fa-pencil"></i> <span class="lang">Modify</span></a>
|
|
||||||
<span class="lang">Created</span>: <span class="created-time">2015-04-03</span>
|
<span class="lang">Created</span>: <span class="created-time">2015-04-03</span>
|
||||||
<span class="lang">Updated</span>: <span class="updated-time">2015-05-01</span>
|
<span class="lang">Updated</span>: <span class="updated-time">2015-05-01</span>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -24,6 +24,6 @@ var Config = {
|
|||||||
"name": "繁体中文"
|
"name": "繁体中文"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"lang": "en-us",
|
"lang": "zh-cn",
|
||||||
"theme": ""
|
"theme": ""
|
||||||
};
|
};
|
@@ -1762,6 +1762,7 @@ Note.toggleReadOnly = function(needSave) {
|
|||||||
|
|
||||||
// markdown
|
// markdown
|
||||||
$('#mdEditor').addClass('read-only');
|
$('#mdEditor').addClass('read-only');
|
||||||
|
$('#note').addClass('read-only-editor');
|
||||||
|
|
||||||
if(!note) {
|
if(!note) {
|
||||||
return;
|
return;
|
||||||
@@ -1798,6 +1799,7 @@ LEA.toggleWriteable = Note.toggleWriteable = function() {
|
|||||||
|
|
||||||
// $('#infoToolbar').hide();
|
// $('#infoToolbar').hide();
|
||||||
$('#editor').removeClass('read-only');
|
$('#editor').removeClass('read-only');
|
||||||
|
$('#note').removeClass('read-only-editor');
|
||||||
$('#editorContent').attr('contenteditable', true);
|
$('#editorContent').attr('contenteditable', true);
|
||||||
|
|
||||||
// markdown
|
// markdown
|
||||||
@@ -3258,8 +3260,11 @@ $(function() {
|
|||||||
|
|
||||||
// readony
|
// readony
|
||||||
// 修改
|
// 修改
|
||||||
$('.toolbar-update').click(function() {
|
// $('.toolbar-update').click(function() {
|
||||||
Note.toggleWriteable();
|
// Note.toggleWriteable();
|
||||||
|
// });
|
||||||
|
$("#editBtn").click(function() {
|
||||||
|
Note.toggleWriteableAndReadOnly();
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@@ -300,5 +300,7 @@
|
|||||||
"Sync error, retry to sync after 3 seconds": "同步失败, 3 秒后自动重新尝试同步",
|
"Sync error, retry to sync after 3 seconds": "同步失败, 3 秒后自动重新尝试同步",
|
||||||
"Network error!": "网络异常",
|
"Network error!": "网络异常",
|
||||||
|
|
||||||
"Load Database Error": "加载数据库出错, 请尝试在帐户管理中优化数据库"
|
"Load Database Error": "加载数据库出错, 请尝试在帐户管理中优化数据库",
|
||||||
|
|
||||||
|
"ctrl/cmd+e Toggle Modify with Readonly": "ctrl/cmd+e 切换编辑与只读"
|
||||||
}
|
}
|
@@ -300,5 +300,6 @@
|
|||||||
"Sync error, retry to sync after 3 seconds": "同步失敗, 3 秒後自動重新嘗試同步",
|
"Sync error, retry to sync after 3 seconds": "同步失敗, 3 秒後自動重新嘗試同步",
|
||||||
"Network error!": "網絡異常",
|
"Network error!": "網絡異常",
|
||||||
|
|
||||||
"Load Database Error": "加載數據庫出錯, 請嘗試在帳戶管理中優化數據庫"
|
"Load Database Error": "加載數據庫出錯, 請嘗試在帳戶管理中優化數據庫",
|
||||||
|
"ctrl/cmd+e Toggle Modify with Readonly": "ctrl/cmd+e 切換編輯與只讀"
|
||||||
}
|
}
|
@@ -2075,5 +2075,12 @@ img::selection {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.read-only-editor #editBtn span:before {
|
||||||
|
content: "\f044";
|
||||||
|
}
|
||||||
|
#editBtn span:before {
|
||||||
|
content: "\f06e";
|
||||||
|
}
|
||||||
|
|
||||||
@import '../css/traffic.less';
|
@import '../css/traffic.less';
|
||||||
@import '../css/ani.less';
|
@import '../css/ani.less';
|
||||||
|
@@ -2014,6 +2014,12 @@ img::selection {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
.read-only-editor #editBtn span:before {
|
||||||
|
content: "\f044";
|
||||||
|
}
|
||||||
|
#editBtn span:before {
|
||||||
|
content: "\f06e";
|
||||||
|
}
|
||||||
.win-tool {
|
.win-tool {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@@ -7,7 +7,8 @@ body.writting.init #pageInner {
|
|||||||
body.writting #mainMask,
|
body.writting #mainMask,
|
||||||
body.writting #leftNotebook,
|
body.writting #leftNotebook,
|
||||||
body.writting .noteSplit,
|
body.writting .noteSplit,
|
||||||
body.writting #noteList {
|
body.writting #noteList,
|
||||||
|
body.writting #editBtn {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
body.writting #noteAndEditor {
|
body.writting #noteAndEditor {
|
||||||
@@ -73,6 +74,12 @@ body.writting #editor.all-tool #mceToolbar {
|
|||||||
body.writting #editor.all-tool #editorContentWrap {
|
body.writting #editor.all-tool #editorContentWrap {
|
||||||
top: 70px;
|
top: 70px;
|
||||||
}
|
}
|
||||||
|
body.writting #popularToolbar {
|
||||||
|
padding-top: 5px;
|
||||||
|
}
|
||||||
|
body.writting #moreBtn {
|
||||||
|
padding-top: 10px;
|
||||||
|
}
|
||||||
#editor .mce-tinymce {
|
#editor .mce-tinymce {
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
@@ -12,7 +12,8 @@ body.writting {
|
|||||||
#mainMask,
|
#mainMask,
|
||||||
#leftNotebook,
|
#leftNotebook,
|
||||||
.noteSplit,
|
.noteSplit,
|
||||||
#noteList
|
#noteList,
|
||||||
|
#editBtn
|
||||||
{
|
{
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@@ -96,6 +97,13 @@ body.writting {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#popularToolbar {
|
||||||
|
padding-top: 5px;
|
||||||
|
}
|
||||||
|
#moreBtn {
|
||||||
|
padding-top: 10px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#editor .mce-tinymce {
|
#editor .mce-tinymce {
|
||||||
|
Reference in New Issue
Block a user