batch ok
This commit is contained in:
@ -259,28 +259,59 @@ func (c Note) UpdateNoteOrContent(noteOrContent NoteOrContent) revel.Result {
|
||||
|
||||
// 删除note/ 删除别人共享给我的笔记
|
||||
// userId 是note.UserId
|
||||
func (c Note) DeleteNote(noteId, userId string, isShared bool) revel.Result {
|
||||
if(!isShared) {
|
||||
return c.RenderJson(trashService.DeleteNote(noteId, c.GetUserId()));
|
||||
func (c Note) DeleteNote(noteIds []string, isShared bool) revel.Result {
|
||||
if !isShared {
|
||||
for _, noteId := range noteIds {
|
||||
trashService.DeleteNote(noteId, c.GetUserId())
|
||||
}
|
||||
return c.RenderJson(true)
|
||||
}
|
||||
|
||||
return c.RenderJson(trashService.DeleteSharedNote(noteId, userId, c.GetUserId()));
|
||||
|
||||
for _, noteId := range noteIds {
|
||||
trashService.DeleteSharedNote(noteId, c.GetUserId())
|
||||
}
|
||||
|
||||
return c.RenderJson(true)
|
||||
}
|
||||
// 删除trash
|
||||
|
||||
// 删除trash, 已弃用, 用DeleteNote
|
||||
func (c Note) DeleteTrash(noteId string) revel.Result {
|
||||
return c.RenderJson(trashService.DeleteTrash(noteId, c.GetUserId()));
|
||||
return c.RenderJson(trashService.DeleteTrash(noteId, c.GetUserId()))
|
||||
}
|
||||
|
||||
// 移动note
|
||||
func (c Note) MoveNote(noteId, notebookId string) revel.Result {
|
||||
return c.RenderJson(noteService.MoveNote(noteId, notebookId, c.GetUserId()));
|
||||
func (c Note) MoveNote(noteIds []string, notebookId string) revel.Result {
|
||||
userId := c.GetUserId()
|
||||
for _, noteId := range noteIds {
|
||||
noteService.MoveNote(noteId, notebookId, userId)
|
||||
}
|
||||
return c.RenderJson(true)
|
||||
}
|
||||
|
||||
// 复制note
|
||||
func (c Note) CopyNote(noteId, notebookId string) revel.Result {
|
||||
return c.RenderJson(noteService.CopyNote(noteId, notebookId, c.GetUserId()));
|
||||
func (c Note) CopyNote(noteIds []string, notebookId string) revel.Result {
|
||||
copyNotes := make([]info.Note, len(noteIds))
|
||||
userId := c.GetUserId()
|
||||
for i, noteId := range noteIds {
|
||||
copyNotes[i] = noteService.CopyNote(noteId, notebookId, userId)
|
||||
}
|
||||
re := info.NewRe()
|
||||
re.Ok = true
|
||||
re.Item = copyNotes
|
||||
return c.RenderJson(re)
|
||||
}
|
||||
|
||||
// 复制别人共享的笔记给我
|
||||
func (c Note) CopySharedNote(noteId, notebookId, fromUserId string) revel.Result {
|
||||
return c.RenderJson(noteService.CopySharedNote(noteId, notebookId, fromUserId, c.GetUserId()));
|
||||
func (c Note) CopySharedNote(noteIds []string, notebookId, fromUserId string) revel.Result {
|
||||
copyNotes := make([]info.Note, len(noteIds))
|
||||
userId := c.GetUserId()
|
||||
for i, noteId := range noteIds {
|
||||
copyNotes[i] = noteService.CopySharedNote(noteId, notebookId, fromUserId, userId)
|
||||
}
|
||||
re := info.NewRe()
|
||||
re.Ok = true
|
||||
re.Item = copyNotes
|
||||
return c.RenderJson(re)
|
||||
}
|
||||
|
||||
//------------
|
||||
@ -290,6 +321,7 @@ func (c Note) SearchNote(key string) revel.Result {
|
||||
_, blogs := noteService.SearchNote(key, c.GetUserId(), c.GetPage(), pageSize, "UpdatedTime", false, false)
|
||||
return c.RenderJson(blogs)
|
||||
}
|
||||
|
||||
// 通过tags搜索
|
||||
func (c Note) SearchNoteByTags(tags []string) revel.Result {
|
||||
_, blogs := noteService.SearchNoteByTags(tags, c.GetUserId(), c.GetPage(), pageSize, "UpdatedTime", false)
|
||||
@ -456,7 +488,9 @@ func (c Note) ExportPdf(noteId string) revel.Result {
|
||||
}
|
||||
|
||||
// 设置/取消Blog; 置顶
|
||||
func (c Note) SetNote2Blog(noteId string, isBlog, isTop bool) revel.Result {
|
||||
re := noteService.ToBlog(c.GetUserId(), noteId, isBlog, isTop)
|
||||
return c.RenderJson(re)
|
||||
func (c Note) SetNote2Blog(noteIds []string, isBlog, isTop bool) revel.Result {
|
||||
for _, noteId := range noteIds {
|
||||
noteService.ToBlog(c.GetUserId(), noteId, isBlog, isTop)
|
||||
}
|
||||
return c.RenderJson(true)
|
||||
}
|
||||
|
@ -73,17 +73,13 @@ func (this *NoteImageService) UpdateNoteImages(userId, noteId, imgSrc, content s
|
||||
|
||||
// 复制图片, 把note的图片都copy给我, 且修改noteContent图片路径
|
||||
func (this *NoteImageService) CopyNoteImages(fromNoteId, fromUserId, newNoteId, content, toUserId string) string {
|
||||
/* 弃用之
|
||||
// 得到fromNoteId的noteImages, 如果为空, 则直接返回content
|
||||
noteImages := []info.NoteImage{}
|
||||
db.ListByQWithFields(db.NoteImages, bson.M{"NoteId": bson.ObjectIdHex(fromNoteId)}, []string{"ImageId"}, ¬eImages)
|
||||
|
||||
if len(noteImages) == 0 {
|
||||
return content;
|
||||
}
|
||||
|
||||
// <img src="/file/outputImage?fileId=12323232" />
|
||||
// 把fileId=1232替换成新的
|
||||
replaceMap := map[string]string{}
|
||||
for _, noteImage := range noteImages {
|
||||
imageId := noteImage.ImageId.Hex()
|
||||
ok, newImageId := fileService.CopyImage(fromUserId, imageId, toUserId)
|
||||
@ -91,20 +87,44 @@ func (this *NoteImageService) CopyNoteImages(fromNoteId, fromUserId, newNoteId,
|
||||
replaceMap[imageId] = newImageId
|
||||
}
|
||||
}
|
||||
|
||||
if len(replaceMap) > 0 {
|
||||
// 替换之
|
||||
reg, _ := regexp.Compile("outputImage\\?fileId=([a-z0-9A-Z]{24})")
|
||||
content = reg.ReplaceAllStringFunc(content, func(each string) string {
|
||||
// each=outputImage?fileId=541bd2f599c37b4f3r000003
|
||||
fileId := each[len(each)-24:] // 得到后24位, 也即id
|
||||
if replaceFileId, ok := replaceMap[fileId]; ok {
|
||||
*/
|
||||
|
||||
// 因为很多图片上传就会删除, 所以直接从内容中查看图片id进行复制
|
||||
|
||||
// <img src="/file/outputImage?fileId=12323232" />
|
||||
// 把fileId=1232替换成新的
|
||||
replaceMap := map[string]string{}
|
||||
|
||||
reg, _ := regexp.Compile("(outputImage|getImage)\\?fileId=([a-z0-9A-Z]{24})")
|
||||
content = reg.ReplaceAllStringFunc(content, func(each string) string {
|
||||
// each = outputImage?fileId=541bd2f599c37b4f3r000003
|
||||
// each = getImage?fileId=541bd2f599c37b4f3r000003
|
||||
|
||||
fileId := each[len(each)-24:] // 得到后24位, 也即id
|
||||
|
||||
if _, ok := replaceMap[fileId]; !ok {
|
||||
if bson.IsObjectIdHex(fileId) {
|
||||
ok2, newImageId := fileService.CopyImage(fromUserId, fileId, toUserId)
|
||||
if ok2 {
|
||||
replaceMap[fileId] = newImageId
|
||||
} else {
|
||||
replaceMap[fileId] = ""
|
||||
}
|
||||
} else {
|
||||
replaceMap[fileId] = ""
|
||||
}
|
||||
}
|
||||
|
||||
replaceFileId := replaceMap[fileId]
|
||||
if replaceFileId != "" {
|
||||
if each[0] == 'o' {
|
||||
return "outputImage?fileId=" + replaceFileId
|
||||
}
|
||||
return each
|
||||
});
|
||||
}
|
||||
|
||||
return "getImage?fileId=" + replaceFileId
|
||||
}
|
||||
return each
|
||||
});
|
||||
|
||||
return content;
|
||||
}
|
||||
|
||||
|
@ -664,11 +664,11 @@ func (this *NoteService) CopyNote(noteId, notebookId, userId string) info.Note {
|
||||
note.NotebookId = bson.ObjectIdHex(notebookId)
|
||||
|
||||
noteContent.NoteId = note.NoteId
|
||||
this.AddNoteAndContent(note, noteContent, note.UserId);
|
||||
|
||||
note = this.AddNoteAndContent(note, noteContent, note.UserId);
|
||||
|
||||
// 更新blog状态
|
||||
isBlog := this.updateToNotebookBlog(note.NoteId.Hex(), notebookId, userId)
|
||||
|
||||
|
||||
// recount
|
||||
notebookService.ReCountNotebookNumberNotes(notebookId)
|
||||
|
||||
@ -683,16 +683,15 @@ func (this *NoteService) CopyNote(noteId, notebookId, userId string) info.Note {
|
||||
// 复制别人的共享笔记给我
|
||||
// 将别人可用的图片转为我的图片, 复制图片
|
||||
func (this *NoteService) CopySharedNote(noteId, notebookId, fromUserId, myUserId string) info.Note {
|
||||
// Log(shareService.HasSharedNote(noteId, myUserId) || shareService.HasSharedNotebook(noteId, myUserId, fromUserId))
|
||||
// 判断是否共享了给我
|
||||
if notebookService.IsMyNotebook(notebookId, myUserId) &&
|
||||
(shareService.HasSharedNote(noteId, myUserId) || shareService.HasSharedNotebook(noteId, myUserId, fromUserId)) {
|
||||
// Log(notebookService.IsMyNotebook(notebookId, myUserId))
|
||||
if notebookService.IsMyNotebook(notebookId, myUserId) && shareService.HasReadPerm(fromUserId, myUserId, noteId) {
|
||||
note := this.GetNote(noteId, fromUserId)
|
||||
if note.NoteId == "" {
|
||||
return info.Note{}
|
||||
}
|
||||
noteContent := this.GetNoteContent(noteId, fromUserId)
|
||||
|
||||
|
||||
// 重新生成noteId
|
||||
note.NoteId = bson.NewObjectId();
|
||||
note.NotebookId = bson.ObjectIdHex(notebookId)
|
||||
|
@ -25,6 +25,12 @@ type TrashService struct {
|
||||
// 应该放在回收站里
|
||||
// 有trashService
|
||||
func (this *TrashService) DeleteNote(noteId, userId string) bool {
|
||||
note := noteService.GetNote(noteId, userId);
|
||||
// 如果是垃圾, 则彻底删除
|
||||
if (note.IsTrash) {
|
||||
return this.DeleteTrash(noteId, userId)
|
||||
}
|
||||
|
||||
// 首先删除其共享
|
||||
if shareService.DeleteShareNoteAll(noteId, userId) {
|
||||
// 更新note isTrash = true
|
||||
@ -36,13 +42,15 @@ func (this *TrashService) DeleteNote(noteId, userId string) bool {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// 删除别人共享给我的笔记
|
||||
// 先判断我是否有权限, 笔记是否是我创建的
|
||||
func (this *TrashService) DeleteSharedNote(noteId, userId, myUserId string) bool {
|
||||
note := noteService.GetNote(noteId, userId)
|
||||
func (this *TrashService) DeleteSharedNote(noteId, myUserId string) bool {
|
||||
note := noteService.GetNoteById(noteId)
|
||||
userId := note.UserId.Hex()
|
||||
if shareService.HasUpdatePerm(userId, myUserId, noteId) && note.CreatedUserId.Hex() == myUserId {
|
||||
return db.UpdateByIdAndUserId(db.Notes, noteId, userId, bson.M{"$set": bson.M{"IsTrash": true, "Usn": userService.IncrUsn(userId)}})
|
||||
}
|
||||
@ -116,4 +124,4 @@ func (this *TrashService) ListNotes(userId string,
|
||||
pageNumber, pageSize int, sortField string, isAsc bool) (notes []info.Note) {
|
||||
_, notes = noteService.ListNotes(userId, "", true, pageNumber, pageSize, sortField, isAsc, false)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
@ -83,6 +83,8 @@ function log(o) {
|
||||
</a>
|
||||
<span class="for-split"> - </span>
|
||||
<span id="curNotebookForNewNote" notebookId=""></span>
|
||||
|
||||
<!--
|
||||
<div class="dropdown" style="display: inline-block">
|
||||
<a class="ios7-a dropdown-toggle"
|
||||
id="listNotebookDropdownMenu" data-toggle="dropdown">
|
||||
@ -94,6 +96,8 @@ function log(o) {
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- 只为新建别人的笔记 -->
|
||||
@ -104,12 +108,14 @@ function log(o) {
|
||||
<span class="new-note-text-abbr">{{msg . "new"}}</span>
|
||||
</a>
|
||||
<span class="new-split">|</span>
|
||||
<a id="newShareNoteMarkdownBtn" class="new-note" title="{{msg . "newMarkdown"}}">
|
||||
<a id="newShareNoteMarkdownBtn" class="new-note new-markdown" title="{{msg . "newMarkdown"}}">
|
||||
<span class="new-markdown-text">{{msg . "newMarkdown"}}</span>
|
||||
<span class="new-markdown-text-abbr">Md</span>
|
||||
</a>
|
||||
<span class="for-split"> - </span>
|
||||
<span id="curNotebookForNewSharedNote" notebookId="" userId=""></span>
|
||||
|
||||
<!--
|
||||
<div class="dropdown" style="display: inline-block">
|
||||
<a id="listShareNotebookDropdownMenu" class="ios7-a dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-angle-down"></i>
|
||||
@ -118,6 +124,7 @@ function log(o) {
|
||||
<ul id="notebookNavForNewSharedNote"></ul>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -420,12 +427,13 @@ function log(o) {
|
||||
|
||||
<!-- 遮罩, 为了resize3Columns用 -->
|
||||
<div id="noteMask" class="note-mask"></div>
|
||||
<div id="noteMaskForLoading" class="note-mask">
|
||||
<div id="noteMaskForLoading" class="note-mask"> <!-- z-index: 11 -->
|
||||
<img src="/images/loading-24.gif"/>
|
||||
<br />
|
||||
loading...
|
||||
</div>
|
||||
<div id="editorMask">
|
||||
<!-- for tips -->
|
||||
<div id="editorMask"> <!-- z-index: 10 -->
|
||||
{{msg . "noNoteNewNoteTips"}}
|
||||
<br />
|
||||
<br />
|
||||
@ -437,6 +445,16 @@ function log(o) {
|
||||
{{msg . "canntNewNoteTips"}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="batchMask" class="note-mask"> <!-- z-index: 99 -->
|
||||
<div class="batch-ctn" id="batchCtn"></div>
|
||||
<div class="batch-info">
|
||||
{{leaMsg . "<span></span> notes selected"}}
|
||||
<p><i class="fa fa-cog"></i></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="noteTop">
|
||||
<!-- 左侧放tag, 右侧放按钮, 比如save, info, move, delete -->
|
||||
<div id="tool" class="clearfix">
|
||||
@ -842,7 +860,6 @@ function log(o) {
|
||||
|
||||
<script>
|
||||
var LEA = {};
|
||||
LEA.s1 = new Date();
|
||||
LEA.locale = "{{.locale}}";
|
||||
var UrlPrefix = '{{.siteUrl}}';
|
||||
var UserInfo = {{.userInfo|jsonJs}};
|
||||
@ -887,7 +904,6 @@ var GlobalConfigs = {{.globalConfigs|jsonJs}};
|
||||
<!-- /dev -->
|
||||
|
||||
<!-- pro_app_js -->
|
||||
|
||||
<script>
|
||||
initPage();
|
||||
// 当tinymce.dev.js时, 请注释require
|
||||
@ -904,6 +920,5 @@ window.require = {
|
||||
<!-- /dev -->
|
||||
|
||||
<script src="/public/js/plugins/main.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
@ -230,7 +230,7 @@ unVerified=未验证
|
||||
verifiedNow=现在去验证
|
||||
resendVerifiedEmail=重新发送验证邮件
|
||||
# 分享
|
||||
defaulthhare=默认共享
|
||||
defaultShare=默认分享
|
||||
addShare=添加分享
|
||||
friendEmail=好友邮箱
|
||||
permission=权限
|
||||
@ -246,6 +246,7 @@ emailBodyRequired=邮件内容不能为空
|
||||
clickToCopy=点击复制
|
||||
sendSuccess=发送成功
|
||||
inviteEmailBody=Hi, 你好, 我是%s, %s非常好用, 快来注册吧!
|
||||
<span></span> notes selected=当前选中了 <span></span> 篇笔记
|
||||
|
||||
# 历史记录
|
||||
historiesNum=leanote会保存笔记的最近<b>10</b>份历史记录
|
||||
|
@ -456,6 +456,9 @@ h1, h2, h3 {
|
||||
|
||||
// blog
|
||||
#noteItemList {
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
.item-setting, .item-blog {
|
||||
position: absolute;
|
||||
right: 1px;
|
||||
@ -485,10 +488,28 @@ h1, h2, h3 {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#noteItemList .item:hover {
|
||||
.item-setting {
|
||||
display: block;
|
||||
}
|
||||
.item-setting {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
// 当是批量操作时, 隐藏之
|
||||
.batch {
|
||||
#noteItemList {
|
||||
.item-active,
|
||||
.item-active:hover {
|
||||
// .item-blog,
|
||||
.item-setting {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
#toggleEditorMode {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
// share
|
||||
@ -1092,7 +1113,9 @@ top: 4px;
|
||||
}
|
||||
}
|
||||
.note-mask {
|
||||
position: absolute; top: 0px; bottom: 0px; right: 0; left: 3px; z-index: -1;
|
||||
position: absolute; top: 0px; bottom: 0px; right: 0;
|
||||
left: 0px;
|
||||
z-index: -1;
|
||||
}
|
||||
#noteMaskForLoading {
|
||||
padding-top: 60px;
|
||||
@ -1644,4 +1667,56 @@ top: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//---------
|
||||
// batch
|
||||
#batchMask {
|
||||
background: #fff;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
}
|
||||
.batch-ctn {
|
||||
position: relative;
|
||||
padding: 50px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.batch-note {
|
||||
display: inline-block;
|
||||
width: 160px;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
// margin-left: -80px;
|
||||
border: 1px solid #ccc;
|
||||
height: 200px;
|
||||
padding: 5px;
|
||||
border-radius: 5px;
|
||||
background: #eee;
|
||||
// transform: rotate(-30deg);
|
||||
overflow: hidden;
|
||||
transition: margin 0.5s;
|
||||
margin-left: -1000px;
|
||||
.title {
|
||||
font-size: 16px;
|
||||
margin-bottom: 5px;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
.batch-info {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
text-align: center;
|
||||
margin-top: 300px;
|
||||
// 设置
|
||||
p {
|
||||
margin-top: 8px;
|
||||
}
|
||||
.fa {
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
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
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@ -297,7 +297,7 @@ Notebook.cacheAllNotebooks = function(notebooks) {
|
||||
self.cacheAllNotebooks(notebook.Subs);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// 展开到笔记本
|
||||
Notebook.expandNotebookTo = function(notebookId, userId) {
|
||||
@ -332,8 +332,7 @@ Notebook.expandNotebookTo = function(notebookId, userId) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// RenderNotebooks调用,
|
||||
// nav 为了新建, 快速选择, 移动笔记
|
||||
@ -341,7 +340,7 @@ Notebook.expandNotebookTo = function(notebookId, userId) {
|
||||
Notebook.renderNav = function(nav) {
|
||||
var self = this;
|
||||
self.changeNav();
|
||||
}
|
||||
};
|
||||
|
||||
// 搜索notebook
|
||||
Notebook.searchNotebookForAddNote = function(key) {
|
||||
@ -365,7 +364,7 @@ Notebook.searchNotebookForAddNote = function(key) {
|
||||
} else {
|
||||
$("#notebookNavForNewNote").html(self.everNavForNewNote);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// 搜索notebook
|
||||
Notebook.searchNotebookForList = function(key) {
|
||||
@ -391,8 +390,7 @@ Notebook.searchNotebookForList = function(key) {
|
||||
$notebookList.show();
|
||||
$("#notebookNavForNewNote").html(self.everNavForNewNote);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// 修改,添加,删除notebook后调用
|
||||
// 改变nav
|
||||
@ -422,7 +420,7 @@ Notebook.getChangedNotebooks = function(notebooks) {
|
||||
navForNewNote += eachForNew;
|
||||
}
|
||||
return navForNewNote;
|
||||
}
|
||||
};
|
||||
|
||||
Notebook.everNavForNewNote = "";
|
||||
Notebook.everNotebooks = [];
|
||||
@ -438,13 +436,9 @@ Notebook.changeNav = function() {
|
||||
$("#notebookNavForNewNote").html(html);
|
||||
|
||||
// 移动, 复制重新来, 因为nav变了, 移动至-----的notebook导航也变了
|
||||
// 这里速度很慢
|
||||
var t1 = (new Date()).getTime();
|
||||
Note.initContextmenu();
|
||||
Share.initContextmenu(Note.notebooksCopy);
|
||||
var t2 = (new Date()).getTime();
|
||||
log(t2-t1);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 我的共享notebooks
|
||||
@ -573,15 +567,18 @@ Notebook.changeNotebookNav = function(notebookId) {
|
||||
|
||||
Notebook.isAllNotebookId = function(notebookId) {
|
||||
return notebookId == Notebook.allNotebookId;
|
||||
}
|
||||
};
|
||||
Notebook.isTrashNotebookId = function(notebookId) {
|
||||
return notebookId == Notebook.trashNotebookId;
|
||||
}
|
||||
};
|
||||
// 当前选中的笔记本是否是"所有"
|
||||
// called by Note
|
||||
Notebook.curActiveNotebookIsAll = function() {
|
||||
return Notebook.isAllNotebookId($("#notebookList .active").attr("notebookId"));
|
||||
}
|
||||
return Notebook.isAllNotebookId($("#notebookList .curSelectedNode").attr("notebookId"));
|
||||
};
|
||||
Notebook.curActiveNotebookIsTrash = function() {
|
||||
return Notebook.isTrashNotebookId($("#notebookList .curSelectedNode").attr("notebookId"));
|
||||
};
|
||||
|
||||
// 改变笔记本
|
||||
// 0. 改变样式
|
||||
|
@ -58,7 +58,7 @@ editorMode.prototype.changeMode = function(isWritingMode) {
|
||||
} else {
|
||||
this.normalMode();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
editorMode.prototype.resizeEditor = function() {
|
||||
// css还没渲染完
|
||||
@ -93,13 +93,18 @@ editorMode.prototype.normalMode = function() {
|
||||
|
||||
$("#noteList").width(UserInfo.NoteListWidth);
|
||||
$("#note").css("left", UserInfo.NoteListWidth);
|
||||
}
|
||||
|
||||
this.isWritingMode = false;
|
||||
};
|
||||
|
||||
editorMode.prototype.writtingMode = function() {
|
||||
if (Note.inBatch) {
|
||||
return;
|
||||
}
|
||||
if(this.$themeLink.attr('href').indexOf('writting-overwrite.css') == -1) {
|
||||
this.$themeLink.attr("href", "/css/theme/writting-overwrite.css");
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
setTimeout(function() {
|
||||
var $c = $("#editorContent_ifr").contents();
|
||||
@ -126,7 +131,9 @@ editorMode.prototype.writtingMode = function() {
|
||||
|
||||
// 切换到写模式
|
||||
Note.toggleWriteable();
|
||||
}
|
||||
|
||||
this.isWritingMode = true;
|
||||
};
|
||||
|
||||
editorMode.prototype.getWritingCss = function() {
|
||||
if(this.isWritingMode) {
|
||||
@ -681,8 +688,13 @@ function scrollTo(self, tagName, text) {
|
||||
// 主题
|
||||
$("#themeForm").on("click", "input", function(e) {
|
||||
var val = $(this).val();
|
||||
$("#themeLink").attr("href", "/css/theme/" + val + ".css");
|
||||
|
||||
var preHref = $("#themeLink").attr("href"); // default.css?id=7
|
||||
var arr = preHref.split('=');
|
||||
var id = 1;
|
||||
if (arr.length == 2) {
|
||||
id = arr[1];
|
||||
}
|
||||
$("#themeLink").attr("href", "/css/theme/" + val + ".css?id=" + id);
|
||||
ajaxPost("/user/updateTheme", {theme: val}, function(re) {
|
||||
if(reIsOk(re)) {
|
||||
UserInfo.Theme = val
|
||||
@ -800,6 +812,9 @@ function scrollTo(self, tagName, text) {
|
||||
if (UserInfo.LeftIsMin) {
|
||||
minLeft(false);
|
||||
}
|
||||
else {
|
||||
maxLeft(false);
|
||||
}
|
||||
|
||||
// end
|
||||
// 开始时显示loading......
|
||||
@ -1104,7 +1119,6 @@ LeaAce = {
|
||||
return function() {
|
||||
pre.find('.toggle-raw').remove();
|
||||
var value = pre.html();
|
||||
log(value);
|
||||
value = value.replace(/ /g, " ").replace(/\<br *\/*\>/gi,"\n").replace(/</g, '<').replace(/>/g, '>');
|
||||
pre.html(value);
|
||||
var id = pre.attr('id');
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
// 默认共享notebook id
|
||||
Share.defaultNotebookId = "share0";
|
||||
Share.defaultNotebookTitle = getMsg("defaulthhare");
|
||||
Share.defaultNotebookTitle = getMsg("defaultShare");
|
||||
Share.sharedUserInfos = {}; // userId => {}
|
||||
|
||||
// 在render时就创建, 以后复用之
|
||||
@ -19,12 +19,13 @@ Share.cache = {}; // note的cache
|
||||
Share.dialogIsNote = true;
|
||||
|
||||
// 设置缓存 note
|
||||
// 弃用
|
||||
Share.setCache = function(note) {
|
||||
if(!note || !note.NoteId) {
|
||||
return;
|
||||
}
|
||||
Share.cache[note.NoteId] = note;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 我的共享notebooks
|
||||
@ -296,7 +297,6 @@ Share.changeNotebook = function(userId, notebookId, callback) {
|
||||
//
|
||||
// 如果是特定笔记本下的notes, 那么传过来的没有权限信息, 此时权限由notebookId决定
|
||||
if(param.notebookId) {
|
||||
|
||||
}
|
||||
if(callback) {
|
||||
callback(ret);
|
||||
@ -381,10 +381,10 @@ Share.changeNotebookForNewNote = function(notebookId) {
|
||||
// 删除笔记, 我有权限, 且是我创建的笔记
|
||||
Share.deleteSharedNote = function(target, contextmenuItem) {
|
||||
Note.deleteNote(target, contextmenuItem, true);
|
||||
}
|
||||
};
|
||||
Share.copySharedNote = function(target, contextmenuItem) {
|
||||
Note.copyNote(target, contextmenuItem, true);
|
||||
}
|
||||
};
|
||||
|
||||
Share.contextmenu = null;
|
||||
Share.initContextmenu = function(notebooksCopy) {
|
||||
@ -412,12 +412,13 @@ Share.initContextmenu = function(notebooksCopy) {
|
||||
}
|
||||
function applyrule(menu) {
|
||||
var noteId = $(this).attr("noteId");
|
||||
var note = Share.cache[noteId];
|
||||
if(!note) {
|
||||
return;
|
||||
}
|
||||
var note = Note.getNote(noteId);
|
||||
var items = [];
|
||||
if(!(note.Perm && note.CreatedUserId == UserInfo.UserId)) {
|
||||
if(Note.inBatch || !note) {
|
||||
items.push("delete");
|
||||
}
|
||||
// 批量操作时, 不让删除
|
||||
if(note && !(note.Perm && note.CreatedUserId == UserInfo.UserId)) {
|
||||
items.push("delete");
|
||||
}
|
||||
// 不是自己的创建的不能删除
|
||||
@ -426,7 +427,6 @@ Share.initContextmenu = function(notebooksCopy) {
|
||||
disable: true,
|
||||
items: items
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
Share.contextmenu = $("#noteItemList .item-shared").contextmenu(noteListMenu);
|
||||
|
@ -1 +1 @@
|
||||
.b-m-mpanel{background:url(images/contextmenu/menu_bg.gif) left repeat-y #fff;border:1px solid #ccc;position:absolute;padding:2px 0;z-index:99997;left:0;top:0;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175);background-clip:padding-box;overflow:auto}.b-m-split{height:6px;background:url(images/contextmenu/m_splitLine.gif) center repeat-x;font-size:0;margin:0 2px}.b-m-idisable,.b-m-ifocus,.b-m-item{padding:4px 10px 4px 4px;cursor:default;line-height:100%}.b-m-idisable{color:grey}.b-m-arrow,.b-m-ibody{overflow:hidden;text-overflow:ellipsis}.b-m-arrow{background:url(images/contextmenu/m_arrow.gif) right no-repeat}.b-m-idisable .b-m-arrow{background:0 0}.b-m-idisable img,.b-m-ifocus img,.b-m-item img{margin-right:8px;width:16px}.b-m-ifocus{background-color:#CDE3F6}.b-m-idisable img{visibility:hidden}.c-text{display:inline-block;padding-left:3px}.b-m-icon{width:23px;padding-left:3px}
|
||||
.b-m-mpanel{background:url(images/contextmenu/menu_bg.gif) left repeat-y #fff;border:1px solid #ccc;position:absolute;padding:2px 0;z-index:99997;left:0;top:0;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175);background-clip:padding-box;overflow:auto}.b-m-split{height:6px;background:url(images/contextmenu/m_splitLine.gif) center repeat-x;font-size:0;margin:0 2px}.b-m-idisable,.b-m-ifocus,.b-m-item{padding:4px 10px 4px 4px;cursor:default;line-height:1.2}.b-m-idisable{color:grey}.b-m-arrow,.b-m-ibody{overflow:hidden;text-overflow:ellipsis}.b-m-arrow{background:url(images/contextmenu/m_arrow.gif) right no-repeat}.b-m-idisable .b-m-arrow{background:0 0}.b-m-idisable img,.b-m-ifocus img,.b-m-item img{margin-right:8px;width:16px}.b-m-ifocus{background-color:#CDE3F6}.b-m-idisable img{visibility:hidden}.c-text{display:inline-block;padding-left:3px}.b-m-icon{width:23px;padding-left:3px}
|
@ -22,7 +22,7 @@
|
||||
{
|
||||
padding: 4px 10px 4px 4px;
|
||||
cursor: default;
|
||||
line-height:100%;
|
||||
line-height:1.2;
|
||||
}
|
||||
.b-m-idisable
|
||||
{
|
||||
|
@ -180,20 +180,22 @@ LEA.cmroot = 1;
|
||||
pos.left = (pos.left + width + mwidth > bwidth) ? (pos.left - mwidth < 0 ? 0 : pos.left - mwidth) : pos.left + width;
|
||||
pos.top = (pos.top + mheight > bheight) ? (pos.top - mheight + (width > 0 ? 25 : 0) < 0 ? 0 : pos.top - mheight + (width > 0 ? 25 : 0)) : pos.top;
|
||||
$(this).css(pos).show().css("max-height", bheight);
|
||||
|
||||
showGroups.push(this.gidx);
|
||||
};
|
||||
|
||||
//to hide menu
|
||||
var hideMenuPane = function() {
|
||||
var alias = null;
|
||||
|
||||
// console.log('showGroups: ' + showGroups.length)
|
||||
for (var i = showGroups.length - 1; i >= 0; i--) {
|
||||
if (showGroups[i] == this.gidx)
|
||||
break;
|
||||
alias = showGroups.pop();
|
||||
groups[alias].style.display = "none";
|
||||
mitems[alias] && (mitems[alias].className = "b-m-item");
|
||||
|
||||
} //Endfor
|
||||
//CollectGarbage();
|
||||
}
|
||||
};
|
||||
function applyRule(rule) {
|
||||
/*
|
||||
@ -216,19 +218,17 @@ LEA.cmroot = 1;
|
||||
|
||||
/* to show menu */
|
||||
function showMenu(e, menutarget) {
|
||||
// 先隐藏之前的
|
||||
hideMenuPane();
|
||||
removeContextmenuClass();
|
||||
|
||||
target = menutarget;
|
||||
showMenuGroup.call(groups[cmroot], { left: e.pageX, top: e.pageY }, 0);
|
||||
// life
|
||||
if(!$(target).hasClass("item-active")) {
|
||||
$(target).addClass("contextmenu-hover");
|
||||
|
||||
// 在该target上添加contextmenu-hover
|
||||
if(target && !$(target).hasClass("item-active")) {
|
||||
$(target).addClass("contextmenu-hover");
|
||||
}
|
||||
|
||||
// life , 之前是mousedown
|
||||
$(document).one('click', function() {
|
||||
hideMenuPane();
|
||||
// life
|
||||
$(target).removeClass("contextmenu-hover");
|
||||
})
|
||||
}
|
||||
|
||||
// 初始化
|
||||
@ -263,7 +263,17 @@ LEA.cmroot = 1;
|
||||
var me = $(option.parent).on('contextmenu', option.children, function(e){
|
||||
onShowMenu.call(this, e);
|
||||
});
|
||||
|
||||
|
||||
function removeContextmenuClass() {
|
||||
Note.$itemList.find('li').removeClass('contextmenu-hover');
|
||||
}
|
||||
|
||||
// life , 之前是document, 绑定document即使stopPro也会执行到这里
|
||||
$('body').on('click', function(e) {
|
||||
removeContextmenuClass();
|
||||
hideMenuPane();
|
||||
});
|
||||
|
||||
//to apply rule
|
||||
if (option.rule) {
|
||||
applyRule(option.rule);
|
||||
|
@ -1 +1 @@
|
||||
var MSG={"app":"Leanote","share":"Share","noTag":"No Tags","inputEmail":"Email is required","history":"Histories","editorTips":"Tips","editorTipsInfo":"<h4>1. Short cuts</h4>ctrl+shift+c Toggle code<h4>2. shift+enter Get out of current block</h4> eg. <img src=\"/images/outofcode.png\" style=\"width: 90px\"/> in this situation you can use shift+enter to get out of current code block.","all":"Newest","trash":"Trash","delete":"Delete","unTitled":"UnTitled","writingMode":"Writing Mode","normalMode":"Normal Mode","saving":"Saving","saveSuccess":"Save success","update":"Update","close":"Close","cancel":"Cancel","send":"Send","shareToFriends":"Share to friends","publicAsBlog":"Public as blog","cancelPublic":"Cancel public","move":"Move","copy":"Copy","rename":"Rename","exportPdf":"Export PDF","addChildNotebook":"Add child notebook","deleteAllShared":"Delete shared user","deleteSharedNotebook":"Delete shared notebook","copyToMyNotebook":"Copy to my notebook","defaulthhare":"Default","friendEmail":"Friend email","readOnly":"Read only","writable":"Writable","inputFriendEmail":"Friend email is required","clickToChangePermission":"Click to change permission","sendInviteEmailToYourFriend":"Send invite email to your friend","friendNotExits":"Your friend hasn't %s's account, invite register link: %s","emailBodyRequired":"Email body is required","sendSuccess":"success","inviteEmailBody":"Hi,I am %s, %s is awesome, come on!","historiesNum":"We have saved at most <b>10</b> latest histories with each note","noHistories":"No histories","datetime":"Datetime","restoreFromThisVersion":"Restore from this version","confirmBackup":"Are you sure to restore from this version? We will backup the current note.","errorEmail":"Please input the right email"};function getMsg(key, data) {var msg = MSG[key];if(msg) {if(data) {if(!isArray(data)) {data = [data];}for(var i = 0; i < data.length; ++i) {msg = msg.replace("%s", data[i]);}}return msg;}return key;}
|
||||
var MSG={"app":"Leanote","share":"Share","noTag":"No Tags","inputEmail":"Email is required","history":"Histories","editorTips":"Tips","editorTipsInfo":"<h4>1. Short cuts</h4>ctrl+shift+c Toggle code<h4>2. shift+enter Get out of current block</h4> eg. <img src=\"/images/outofcode.png\" style=\"width: 90px\"/> in this situation you can use shift+enter to get out of current code block.","all":"Newest","trash":"Trash","delete":"Delete","unTitled":"UnTitled","defaultShare":"Default sharing","writingMode":"Writing Mode","normalMode":"Normal Mode","saving":"Saving","saveSuccess":"Save success","update":"Update","close":"Close","cancel":"Cancel","send":"Send","shareToFriends":"Share to friends","publicAsBlog":"Public as blog","cancelPublic":"Cancel public","move":"Move","copy":"Copy","rename":"Rename","exportPdf":"Export PDF","addChildNotebook":"Add child notebook","deleteAllShared":"Delete shared user","deleteSharedNotebook":"Delete shared notebook","copyToMyNotebook":"Copy to my notebook","defaulthhare":"Default","friendEmail":"Friend email","readOnly":"Read only","writable":"Writable","inputFriendEmail":"Friend email is required","clickToChangePermission":"Click to change permission","sendInviteEmailToYourFriend":"Send invite email to your friend","friendNotExits":"Your friend hasn't %s's account, invite register link: %s","emailBodyRequired":"Email body is required","sendSuccess":"success","inviteEmailBody":"Hi,I am %s, %s is awesome, come on!","historiesNum":"We have saved at most <b>10</b> latest histories with each note","noHistories":"No histories","datetime":"Datetime","restoreFromThisVersion":"Restore from this version","confirmBackup":"Are you sure to restore from this version? We will backup the current note.","errorEmail":"Please input the right email"};function getMsg(key, data) {var msg = MSG[key];if(msg) {if(data) {if(!isArray(data)) {data = [data];}for(var i = 0; i < data.length; ++i) {msg = msg.replace("%s", data[i]);}}return msg;}return key;}
|
@ -1 +1 @@
|
||||
var MSG={"app":"Leanote","share":"Partager","noTag":"No Tags","inputEmail":"L'adresse courriel est requis","history":"Historique","editorTips":"Astuces","editorTipsInfo":"<h4>1. Raccourcis</h4>ctrl+maj+c Active/désactive le code<h4>2. maj+entrée Sortir du bloc courant</h4> ex. <img src=\"/images/outofcode.png\" style=\"width: 90px\"/> dans cette situation vous pouvez utiliser maj+entrée pour sortir du bloc de code courant.","all":"Le plus récent","trash":"Corbeille","delete":"Effacer","unTitled":"Sans titre","writingMode":"Mode écriture","normalMode":"Mode normal","saving":"Sauvegarde","saveSuccess":"Sauvegarde réussie","update":"Mettre à jour","close":"Fermer","cancel":"Annuler","send":"Envoyer","shareToFriends":"Partage avec ses amis","publicAsBlog":"Publier en tant que blog","cancelPublic":"Annuler la publication","move":"Déplacer","copy":"Copier","rename":"Renommer","addChildNotebook":"Ajouer un bloc-note enfant","deleteAllShared":"Effacer l'utilisateur partagé","deleteSharedNotebook":"Effacer le bloc-notes partagé","copyToMyNotebook":"Copier vers mon bloc-notes","defaulthhare":"Par défaut","friendEmail":"Courriel de l'ami","readOnly":"Lecture seule","writable":"Editable","inputFriendEmail":"Le courriel de votre ami est requis/","clickToChangePermission":"Cliquez pour changer l'autorisation.","sendInviteEmailToYourFriend":"Envoyer un courriel d'invitation à votre ami.","friendNotExits":"Votre ami n'a pas de compte %s, lien d'invitation à s'enregistrer: %s","emailBodyRequired":"Corps du message requis","sendSuccess":"succès","inviteEmailBody":"Coucou, je suis %s, %s est génial, viens!","historiesNum":"Nous avons enregistré au maximum <b>10</b> historiques récents de chaque note.","noHistories":"Pas d'historique.","fold":"Plier","unfold":"Déplier","datetime":"Date & Heure","restoreFromThisVersion":"Restaurer depuis cette version","confirmBackup":"Êtes-vous sûr de vouloir restaurer depuis cette version? Nous allons réaliser une copie de sauvegarde de la note actuelle.","errorEmail":"Veuillez renseigner le courriel correct"};function getMsg(key, data) {var msg = MSG[key];if(msg) {if(data) {if(!isArray(data)) {data = [data];}for(var i = 0; i < data.length; ++i) {msg = msg.replace("%s", data[i]);}}return msg;}return key;}
|
||||
var MSG={"app":"Leanote","share":"Partager","noTag":"No Tags","inputEmail":"L'adresse courriel est requis","history":"Historique","editorTips":"Astuces","editorTipsInfo":"<h4>1. Raccourcis</h4>ctrl+maj+c Active/désactive le code<h4>2. maj+entrée Sortir du bloc courant</h4> ex. <img src=\"/images/outofcode.png\" style=\"width: 90px\"/> dans cette situation vous pouvez utiliser maj+entrée pour sortir du bloc de code courant.","all":"Le plus récent","trash":"Corbeille","delete":"Effacer","unTitled":"Sans titre","defaultShare":"Partage par défaut","writingMode":"Mode écriture","normalMode":"Mode normal","saving":"Sauvegarde","saveSuccess":"Sauvegarde réussie","update":"Mettre à jour","close":"Fermer","cancel":"Annuler","send":"Envoyer","shareToFriends":"Partage avec ses amis","publicAsBlog":"Publier en tant que blog","cancelPublic":"Annuler la publication","move":"Déplacer","copy":"Copier","rename":"Renommer","addChildNotebook":"Ajouer un bloc-note enfant","deleteAllShared":"Effacer l'utilisateur partagé","deleteSharedNotebook":"Effacer le bloc-notes partagé","copyToMyNotebook":"Copier vers mon bloc-notes","defaulthhare":"Par défaut","friendEmail":"Courriel de l'ami","readOnly":"Lecture seule","writable":"Editable","inputFriendEmail":"Le courriel de votre ami est requis/","clickToChangePermission":"Cliquez pour changer l'autorisation.","sendInviteEmailToYourFriend":"Envoyer un courriel d'invitation à votre ami.","friendNotExits":"Votre ami n'a pas de compte %s, lien d'invitation à s'enregistrer: %s","emailBodyRequired":"Corps du message requis","sendSuccess":"succès","inviteEmailBody":"Coucou, je suis %s, %s est génial, viens!","historiesNum":"Nous avons enregistré au maximum <b>10</b> historiques récents de chaque note.","noHistories":"Pas d'historique.","fold":"Plier","unfold":"Déplier","datetime":"Date & Heure","restoreFromThisVersion":"Restaurer depuis cette version","confirmBackup":"Êtes-vous sûr de vouloir restaurer depuis cette version? Nous allons réaliser une copie de sauvegarde de la note actuelle.","errorEmail":"Veuillez renseigner le courriel correct"};function getMsg(key, data) {var msg = MSG[key];if(msg) {if(data) {if(!isArray(data)) {data = [data];}for(var i = 0; i < data.length; ++i) {msg = msg.replace("%s", data[i]);}}return msg;}return key;}
|
@ -1 +1 @@
|
||||
var MSG={"app":"Leanote","share":"分享","noTag":"无标签","inputEmail":"请输入Email","history":"历史记录","editorTips":"帮助","editorTipsInfo":"<h4>1. 快捷键</h4>ctrl+shift+c 代码块切换 <h4>2. shift+enter 跳出当前区域</h4>比如在代码块中<img src=\"/images/outofcode.png\" style=\"width: 90px\"/>按shift+enter可跳出当前代码块.","all":"最新","trash":"废纸篓","delete":"删除","unTitled":"无标题","writingMode":"写作模式","normalMode":"普通模式","saving":"正在保存","saveSuccess":"保存成功","Are you sure to delete it ?":"确认删除?","Insert link into content":"将附件链接插入到内容中","Download":"下载","Delete":"删除","update":"更新","Update Time":"更新时间","Create Time":"创建时间","Post Url":"博文链接","close":"关闭","cancel":"取消","send":"发送","shareToFriends":"分享给好友","publicAsBlog":"公开为博客","cancelPublic":"取消公开为博客","move":"移动","copy":"复制","rename":"重命名","exportPdf":"导出PDF","addChildNotebook":"添加子笔记本","deleteAllShared":"删除所有共享","deleteSharedNotebook":"删除共享笔记本","copyToMyNotebook":"复制到我的笔记本","sendSuccess":"发送成功","defaulthhare":"默认共享","friendEmail":"好友邮箱","readOnly":"只读","writable":"可写","inputFriendEmail":"请输入好友邮箱","clickToChangePermission":"点击改变权限","sendInviteEmailToYourFriend":"发送邀请email给Ta","friendNotExits":"该用户还没有注册%s, 复制邀请链接发送给Ta, 邀请链接: %s","emailBodyRequired":"邮件内容不能为空","inviteEmailBody":"Hi, 你好, 我是%s, %s非常好用, 快来注册吧!","historiesNum":"leanote会保存笔记的最近<b>10</b>份历史记录","noHistories":"无历史记录","datetime":"日期","restoreFromThisVersion":"从该版本还原","confirmBackup":"确定要从该版还原? 还原前leanote会备份当前版本到历史记录中.","errorEmail":"请输入正确的email","Hyperlink":"超链接","Please provide the link URL and an optional title":"请填写链接和一个可选的标题","optional title":"可选标题","Cancel":"取消","Strong":"粗体","strong text":"粗体","Emphasis":"斜体","emphasized text":"斜体","Blockquote":"引用","Code Sample":"代码","enter code here":"代码","Image":"图片","Heading":"标题","Numbered List":"有序列表","Bulleted List":"无序列表","List item":"项目","Horizontal Rule":"水平线","Undo":"撤销","Redo":"重做","enter image description here":"图片标题","enter link description here":"链接标题","Add Album":"添加相册","Cannot delete default album":"不能删除默认相册","Cannot rename default album":"不能重命名默认相册","Rename Album":"重命名","Add Success!":"添加成功!","Rename Success!":"重命名成功!","Delete Success!":"删除成功","Are you sure to delete this image ?":"确定删除该图片?","click to remove this image":"删除图片","error":"错误","Error":"错误","Prev":"上一页","Next":"下一页"};function getMsg(key, data) {var msg = MSG[key];if(msg) {if(data) {if(!isArray(data)) {data = [data];}for(var i = 0; i < data.length; ++i) {msg = msg.replace("%s", data[i]);}}return msg;}return key;}
|
||||
var MSG={"app":"Leanote","share":"分享","noTag":"无标签","inputEmail":"请输入Email","history":"历史记录","editorTips":"帮助","editorTipsInfo":"<h4>1. 快捷键</h4>ctrl+shift+c 代码块切换 <h4>2. shift+enter 跳出当前区域</h4>比如在代码块中<img src=\"/images/outofcode.png\" style=\"width: 90px\"/>按shift+enter可跳出当前代码块.","all":"最新","trash":"废纸篓","delete":"删除","unTitled":"无标题","defaultShare":"默认分享","writingMode":"写作模式","normalMode":"普通模式","saving":"正在保存","saveSuccess":"保存成功","Are you sure to delete it ?":"确认删除?","Insert link into content":"将附件链接插入到内容中","Download":"下载","Delete":"删除","update":"更新","Update Time":"更新时间","Create Time":"创建时间","Post Url":"博文链接","close":"关闭","cancel":"取消","send":"发送","shareToFriends":"分享给好友","publicAsBlog":"公开为博客","cancelPublic":"取消公开为博客","move":"移动","copy":"复制","rename":"重命名","exportPdf":"导出PDF","addChildNotebook":"添加子笔记本","deleteAllShared":"删除所有共享","deleteSharedNotebook":"删除共享笔记本","copyToMyNotebook":"复制到我的笔记本","sendSuccess":"发送成功","friendEmail":"好友邮箱","readOnly":"只读","writable":"可写","inputFriendEmail":"请输入好友邮箱","clickToChangePermission":"点击改变权限","sendInviteEmailToYourFriend":"发送邀请email给Ta","friendNotExits":"该用户还没有注册%s, 复制邀请链接发送给Ta, 邀请链接: %s","emailBodyRequired":"邮件内容不能为空","inviteEmailBody":"Hi, 你好, 我是%s, %s非常好用, 快来注册吧!","historiesNum":"leanote会保存笔记的最近<b>10</b>份历史记录","noHistories":"无历史记录","datetime":"日期","restoreFromThisVersion":"从该版本还原","confirmBackup":"确定要从该版还原? 还原前leanote会备份当前版本到历史记录中.","errorEmail":"请输入正确的email","Hyperlink":"超链接","Please provide the link URL and an optional title":"请填写链接和一个可选的标题","optional title":"可选标题","Cancel":"取消","Strong":"粗体","strong text":"粗体","Emphasis":"斜体","emphasized text":"斜体","Blockquote":"引用","Code Sample":"代码","enter code here":"代码","Image":"图片","Heading":"标题","Numbered List":"有序列表","Bulleted List":"无序列表","List item":"项目","Horizontal Rule":"水平线","Undo":"撤销","Redo":"重做","enter image description here":"图片标题","enter link description here":"链接标题","Add Album":"添加相册","Cannot delete default album":"不能删除默认相册","Cannot rename default album":"不能重命名默认相册","Rename Album":"重命名","Add Success!":"添加成功!","Rename Success!":"重命名成功!","Delete Success!":"删除成功","Are you sure to delete this image ?":"确定删除该图片?","click to remove this image":"删除图片","error":"错误","Error":"错误","Prev":"上一页","Next":"下一页"};function getMsg(key, data) {var msg = MSG[key];if(msg) {if(data) {if(!isArray(data)) {data = [data];}for(var i = 0; i < data.length; ++i) {msg = msg.replace("%s", data[i]);}}return msg;}return key;}
|
Reference in New Issue
Block a user