添加全局 toggle modify with readonly; 发布1.4.1
This commit is contained in:
@ -611,5 +611,5 @@ func (this *ConfigService) HomePageIsAdminsBlog() bool {
|
||||
}
|
||||
|
||||
func (this *ConfigService) GetVersion() string {
|
||||
return "1.4"
|
||||
return "1.4.1"
|
||||
}
|
||||
|
@ -208,13 +208,13 @@ function log(o) {
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="pull-right toggle-editor-mode" style="line-height: 60px; margin-right:10px" id="toggleEditorMode">
|
||||
<div class="pull-right toggle-editor-mode top-nav" id="toggleEditorMode">
|
||||
<a href="#writing"><span>{{msg . "writingMode"}}</span></a>
|
||||
</div>
|
||||
|
||||
{{if eq .userInfo.Email "demo@leanote.com"}}
|
||||
{{if .openRegister}}
|
||||
<div class="pull-right" style="line-height: 60px; margin-right:10px" id="demoRegister">
|
||||
<div class="pull-right top-nav" id="demoRegister">
|
||||
<span>
|
||||
{{msg . "demoRegister"}}
|
||||
</span>
|
||||
@ -423,7 +423,7 @@ function log(o) {
|
||||
|
||||
<div class="noteSplit" id="noteSplitter"></div>
|
||||
|
||||
<div id="note">
|
||||
<div id="note" class="read-only-editor">
|
||||
|
||||
<!-- 遮罩, 为了resize3Columns用 -->
|
||||
<div id="noteMask" class="note-mask"></div>
|
||||
@ -494,8 +494,12 @@ function log(o) {
|
||||
</div>
|
||||
|
||||
<ul class="pull-right" id="editorTool">
|
||||
<li><a class="ios7-a " id="editBtn"
|
||||
data-toggle="dropdown" title="ctrl/cmd+e {{leaMsg . "Toggle Modify with Readonly"}}">
|
||||
<span class="fa"></span></a></li>
|
||||
|
||||
<li><a class="ios7-a " id="saveBtn"
|
||||
data-toggle="dropdown" title="ctrl+s {{msg . "save"}}">
|
||||
data-toggle="dropdown" title="ctrl/cmd+s {{msg . "save"}}">
|
||||
<span class="fa fa-save"></span></a></li>
|
||||
|
||||
<li class="dropdown" id="noteInfoDropdown">
|
||||
@ -572,7 +576,7 @@ function log(o) {
|
||||
</div>
|
||||
<!-- 查看信息 -->
|
||||
<div id="infoToolbar" class="info-toolbar invisible">
|
||||
<a class="toolbar-update" title="{{msg . "modify"}} ctrl/cmd+e"><i class="fa fa-pencil"></i> <span class="lang">{{msg . "modify"}}</span></a>
|
||||
|
||||
<span class="lang">{{msg . "created"}}</span>: <span class="created-time"></span>
|
||||
<span class="lang">{{msg . "updated"}}</span>: <span class="updated-time"></span>
|
||||
</div>
|
||||
@ -607,7 +611,6 @@ function log(o) {
|
||||
<div class="navbar navbar-default">
|
||||
<div class="navbar-inner" id="wmd-button-bar">
|
||||
<div id="mdInfoToolbar" class="info-toolbar invisible">
|
||||
<a class="toolbar-update" title="{{msg . "modify"}} ctrl/cmd+e"><i class="fa fa-pencil"></i> <span class="lang">{{msg . "modify"}}</span></a>
|
||||
<span class="lang">{{msg . "created"}}</span>: <span class="created-time"></span>
|
||||
<span class="lang">{{msg . "updated"}}</span>: <span class="updated-time"></span>
|
||||
</div>
|
||||
|
@ -196,13 +196,13 @@ function log(o) {
|
||||
{{msg . "myBlog"}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="pull-right toggle-editor-mode" style="line-height: 60px; margin-right:10px" id="toggleEditorMode">
|
||||
<div class="pull-right toggle-editor-mode top-nav" id="toggleEditorMode">
|
||||
<a href="#writing"><span>{{msg . "writingMode"}}</span></a>
|
||||
</div>
|
||||
|
||||
{{if eq .userInfo.Email "demo@leanote.com"}}
|
||||
{{if .openRegister}}
|
||||
<div class="pull-right" style="line-height: 60px; margin-right:10px" id="demoRegister">
|
||||
<div class="pull-right top-nav" id="demoRegister">
|
||||
<span>
|
||||
{{msg . "demoRegister"}}
|
||||
</span>
|
||||
@ -405,7 +405,7 @@ function log(o) {
|
||||
|
||||
<div class="noteSplit" id="noteSplitter"></div>
|
||||
|
||||
<div id="note">
|
||||
<div id="note" class="read-only-editor">
|
||||
|
||||
<!-- 遮罩, 为了resize3Columns用 -->
|
||||
<div id="noteMask" class="note-mask"></div>
|
||||
@ -473,8 +473,11 @@ function log(o) {
|
||||
</div>
|
||||
|
||||
<ul class="pull-right" id="editorTool">
|
||||
<li><a class="ios7-a " id="editBtn"
|
||||
data-toggle="dropdown" title="ctrl/cmd+e {{leaMsg . "Toggle Modify with Readonly"}}">
|
||||
<span class="fa"></span></a></li>
|
||||
<li><a class="ios7-a " id="saveBtn"
|
||||
data-toggle="dropdown" title="ctrl+s {{msg . "save"}}">
|
||||
data-toggle="dropdown" title="ctrl/cmd+s {{msg . "save"}}">
|
||||
<span class="fa fa-save"></span></a></li>
|
||||
<li class="dropdown" id="noteInfoDropdown">
|
||||
<a class="ios7-a dropdown-toggle" data-toggle="dropdown" title="{{msg . "Information"}}">
|
||||
@ -547,7 +550,7 @@ function log(o) {
|
||||
</div>
|
||||
<!-- 查看信息 -->
|
||||
<div id="infoToolbar" class="info-toolbar invisible">
|
||||
<a class="toolbar-update" title="{{msg . "modify"}} ctrl/cmd+e"><i class="fa fa-pencil"></i> <span class="lang">{{msg . "modify"}}</span></a>
|
||||
|
||||
<span class="lang">{{msg . "created"}}</span>: <span class="created-time"></span>
|
||||
<span class="lang">{{msg . "updated"}}</span>: <span class="updated-time"></span>
|
||||
</div>
|
||||
@ -582,7 +585,6 @@ function log(o) {
|
||||
<div class="navbar navbar-default">
|
||||
<div class="navbar-inner" id="wmd-button-bar">
|
||||
<div id="mdInfoToolbar" class="info-toolbar invisible">
|
||||
<a class="toolbar-update" title="{{msg . "modify"}} ctrl/cmd+e"><i class="fa fa-pencil"></i> <span class="lang">{{msg . "modify"}}</span></a>
|
||||
<span class="lang">{{msg . "created"}}</span>: <span class="created-time"></span>
|
||||
<span class="lang">{{msg . "updated"}}</span>: <span class="updated-time"></span>
|
||||
</div>
|
||||
|
@ -9,7 +9,7 @@ SP=$(cd "$(dirname "$0")"; pwd)
|
||||
tmp="/Users/life/Desktop/leanote_release"
|
||||
|
||||
# version
|
||||
V="v1.4"
|
||||
V="v1.4.1"
|
||||
|
||||
##=================================
|
||||
# 1. 先build 成 3个平台, 2种bit = 6种
|
||||
|
@ -118,6 +118,8 @@ Choose File=Choose File
|
||||
Download All=Download All
|
||||
Information=Information
|
||||
|
||||
Toggle Modify with Readonly=Toggle Modify with Readonly
|
||||
|
||||
update=Update
|
||||
create=Create
|
||||
|
||||
|
@ -111,6 +111,7 @@ saving=Sauvegarde
|
||||
saveSuccess=Sauvegarde réussie
|
||||
SearchNote=Chercher une note
|
||||
SearchNotebook=Chercher un bloc-note
|
||||
Toggle Modify with Readonly=Toggle Modify with Readonly
|
||||
|
||||
update=Mettre à jour
|
||||
create=Créer
|
||||
|
@ -144,6 +144,7 @@ Insert link into content=将附件链接插入到内容中
|
||||
Download=下载
|
||||
Delete=删除
|
||||
Drop images to here=将图片拖动至此
|
||||
Toggle Modify with Readonly=编辑与只读切换
|
||||
|
||||
update=更新
|
||||
create=创建
|
||||
|
1
public/css/css/default.css
Normal file
1
public/css/css/default.css
Normal file
File diff suppressed because one or more lines are too long
1
public/css/css/simple.css
Normal file
1
public/css/css/simple.css
Normal file
File diff suppressed because one or more lines are too long
1
public/css/css/writting-overwrite.css
Normal file
1
public/css/css/writting-overwrite.css
Normal file
File diff suppressed because one or more lines are too long
1
public/css/css/writting.css
Normal file
1
public/css/css/writting.css
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -286,3 +286,17 @@ a.raw:hover {
|
||||
.modal-footer {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
// 不让选择, 双击
|
||||
#editorTool,
|
||||
#newNoteWrap,
|
||||
#myBlog,
|
||||
.lea-blog,
|
||||
#myProfile,
|
||||
#toggleEditorMode,
|
||||
.folderHeader
|
||||
{
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
user-select: none;
|
||||
}
|
@ -100,3 +100,17 @@
|
||||
color: #666;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
// read-only-editor
|
||||
.read-only-editor #editBtn span {
|
||||
&:before {
|
||||
content: "\f044";
|
||||
}
|
||||
}
|
||||
|
||||
// eye
|
||||
#editBtn span {
|
||||
&:before {
|
||||
content: "\f06e";
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
6
public/js/app.min.js
vendored
6
public/js/app.min.js
vendored
File diff suppressed because one or more lines are too long
@ -416,14 +416,14 @@ Note.curChangedSaveIt = function(force, callback) {
|
||||
// 如果当前没有笔记, 不保存
|
||||
// 或者是共享的只读笔记
|
||||
if(!Note.curNoteId || Note.isReadOnly) {
|
||||
log(!Note.curNoteId ? '无当前笔记' : '共享只读');
|
||||
// log(!Note.curNoteId ? '无当前笔记' : '共享只读');
|
||||
return;
|
||||
}
|
||||
var hasChanged;
|
||||
try {
|
||||
hasChanged = Note.curHasChanged(force);
|
||||
} catch(e) {
|
||||
console.error('获取当前改变的笔记错误!');
|
||||
// console.error('获取当前改变的笔记错误!');
|
||||
callback && callback(false);
|
||||
return;
|
||||
}
|
||||
@ -1560,6 +1560,7 @@ Note.toggleReadOnly = function(needSave) {
|
||||
|
||||
// markdown
|
||||
$('#mdEditor').addClass('read-only');
|
||||
$('#note').addClass('read-only-editor');
|
||||
|
||||
if(!note) {
|
||||
return;
|
||||
@ -1596,6 +1597,7 @@ LEA.toggleWriteable = Note.toggleWriteable = function(isFromNewNote) {
|
||||
|
||||
// $('#infoToolbar').hide();
|
||||
$('#editor').removeClass('read-only');
|
||||
$('#note').removeClass('read-only-editor');
|
||||
$('#editorContent').attr('contenteditable', true);
|
||||
|
||||
// markdown
|
||||
@ -1623,6 +1625,8 @@ LEA.toggleWriteable = Note.toggleWriteable = function(isFromNewNote) {
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// page ctrl+e也会
|
||||
Note.toggleWriteableAndReadOnly = function () {
|
||||
if (LEA.readOnly) {
|
||||
Note.toggleWriteable();
|
||||
@ -2500,6 +2504,9 @@ $(function() {
|
||||
$('.toolbar-update').click(function() {
|
||||
Note.toggleWriteable();
|
||||
});
|
||||
$("#editBtn").click(function() {
|
||||
Note.toggleWriteableAndReadOnly();
|
||||
});
|
||||
|
||||
//
|
||||
// 笔记内容里的链接跳转
|
||||
|
Reference in New Issue
Block a user