From c556ab59b5d014d6d82226fe534ee5d22fcae5f9 Mon Sep 17 00:00:00 2001 From: life <lifephp@gmail.com> Date: Sun, 21 Sep 2014 22:05:04 +0800 Subject: [PATCH] attachment feature #10 --- app/controllers/AttachController.go | 212 ++++++++++++++++++ app/controllers/FileController.go | 17 +- app/controllers/init.go | 1 + app/db/Mgo.go | 2 + app/info/AttachInfo.go | 21 ++ app/info/NoteInfo.go | 2 +- app/service/AttachService.go | 175 +++++++++++++++ app/service/FileService.go | 1 - app/service/NoteService.go | 3 + app/service/ShareService.go | 73 +++++- app/service/TrashService.go | 10 +- app/service/init.go | 2 + app/views/Note/note-dev.html | 46 +++- messages/msg.en | 3 + messages/msg.zh | 3 + public/css/theme/basic.less | 104 ++++++++- public/css/theme/default.css | 132 ++++++++--- public/css/theme/default.less | 39 ---- public/css/theme/simple.css | 2 +- public/css/theme/simple.less | 37 --- public/css/theme/writting-overwrite.css | 2 +- public/css/theme/writting.css | 2 +- public/js/app/attachment_upload.js | 134 +++++++++++ public/js/app/note.js | 210 +++++++++++++++++ public/js/common.js | 5 + .../editor/pagedown/Markdown.Editor.js | 94 ++++++++ 26 files changed, 1197 insertions(+), 135 deletions(-) create mode 100644 app/controllers/AttachController.go create mode 100644 app/info/AttachInfo.go create mode 100644 app/service/AttachService.go create mode 100644 public/js/app/attachment_upload.js diff --git a/app/controllers/AttachController.go b/app/controllers/AttachController.go new file mode 100644 index 0000000..d238c98 --- /dev/null +++ b/app/controllers/AttachController.go @@ -0,0 +1,212 @@ +package controllers + +import ( + "github.com/revel/revel" +// "encoding/json" + "gopkg.in/mgo.v2/bson" + . "github.com/leanote/leanote/app/lea" + "github.com/leanote/leanote/app/info" + "io/ioutil" + "os" + "strings" + "time" + "io" + "archive/tar" + "compress/gzip" +) + +// 附件 +type Attach struct { + BaseController +} + +// 上传附件 +func (c Attach) UploadAttach(noteId string) revel.Result { + re := c.uploadAttach(noteId) + return c.RenderJson(re) +} +func (c Attach) uploadAttach(noteId string) (re info.Re) { + var fileId = "" + var resultMsg = "error" // 错误信息 + var Ok = false + var fileInfo info.Attach + + re = info.NewRe() + + defer func() { + re.Id = fileId // 只是id, 没有其它信息 + re.Msg = resultMsg + re.Ok = Ok + re.Item = fileInfo + }() + + // 判断是否有权限为笔记添加附件 + if !shareService.HasUpdateNotePerm(noteId, c.GetUserId()) { + return re + } + + file, handel, err := c.Request.FormFile("file") + if err != nil { + return re + } + defer file.Close() + + data, err := ioutil.ReadAll(file) + if err != nil { + return re + } + // > 5M? + if(len(data) > 5 * 1024 * 1024) { + resultMsg = "File is bigger than 5M" + return re + } + + // 生成上传路径 + filePath := "files/" + c.GetUserId() + "/attachs" + dir := revel.BasePath + "/" + filePath + err = os.MkdirAll(dir, 0755) + if err != nil { + return re + } + // 生成新的文件名 + filename := handel.Filename + _, ext := SplitFilename(filename) // .doc + filename = NewGuid() + ext + toPath := dir + "/" + filename; + err = ioutil.WriteFile(toPath, data, 0777) + if err != nil { + return re + } + + // add File to db + fileType := "" + if ext != "" { + fileType = strings.ToLower(ext[1:]) + } + filesize := GetFilesize(toPath) + fileInfo = info.Attach{Name: filename, + Title: handel.Filename, + NoteId: bson.ObjectIdHex(noteId), + UploadUserId: c.GetObjectUserId(), + Path: filePath + "/" + filename, + Type: fileType, + Size: filesize} + + id := bson.NewObjectId(); + fileInfo.AttachId = id + fileId = id.Hex() + Ok = attachService.AddAttach(fileInfo) + + fileInfo.Path = ""; // 不要返回 + resultMsg = "success" + + return re +} + +// 删除附件 +func (c Attach) DeleteAttach(attachId string) revel.Result { + re := info.NewRe() + re.Ok, re.Msg = attachService.DeleteAttach(attachId, c.GetUserId()) + return c.RenderJson(re) +} + +// get all attachs by noteId +func (c Attach) GetAttachs(noteId string) revel.Result { + re := info.NewRe() + re.Ok = true + re.List = attachService.ListAttachs(noteId, c.GetUserId()) + return c.RenderJson(re) +} + +// 下载附件 +// 权限判断 +func (c Attach) Download(attachId string) revel.Result { + attach := attachService.GetAttach(attachId, c.GetUserId()); // 得到路径 + path := attach.Path + if path == "" { + return c.RenderText("") + } + fn := revel.BasePath + "/" + strings.TrimLeft(path, "/") + file, _ := os.Open(fn) + return c.RenderBinary(file, attach.Title, revel.Attachment, time.Now()) // revel.Attachment + // return c.RenderFile(file, revel.Attachment) // revel.Attachment +} + +func (c Attach) DownloadAll(noteId string) revel.Result { + note := noteService.GetNoteById(noteId) + if note.NoteId == "" { + return c.RenderText("") + } + // 得到文件列表 + attachs := attachService.ListAttachs(noteId, c.GetUserId()) + if attachs == nil || len(attachs) == 0 { + return c.RenderText("") + } + + /* + dir := revel.BasePath + "/files/tmp" + err := os.MkdirAll(dir, 0755) + if err != nil { + return c.RenderText("") + } + */ + + filename := note.Title + ".tar.gz" + if note.Title == "" { + filename = "all.tar.gz" + } + + // file write + fw, err := os.Create(revel.BasePath + "/files/" + filename) + if err != nil { + return c.RenderText("") + } + // defer fw.Close() // 不需要关闭, 还要读取给用户下载 + + // gzip write + gw := gzip.NewWriter(fw) + defer gw.Close() + + // tar write + tw := tar.NewWriter(gw) + defer tw.Close() + + // 遍历文件列表 + for _, attach := range attachs { + fn := revel.BasePath + "/" + strings.TrimLeft(attach.Path, "/") + fr, err := os.Open(fn) + fileInfo, _ := fr.Stat() + if err != nil { + return c.RenderText("") + } + defer fr.Close() + + // 信息头 + h := new(tar.Header) + h.Name = attach.Title + h.Size = fileInfo.Size() + h.Mode = int64(fileInfo.Mode()) + h.ModTime = fileInfo.ModTime() + + // 写信息头 + err = tw.WriteHeader(h) + if err != nil { + panic(err) + } + + // 写文件 + _, err = io.Copy(tw, fr) + if err != nil { + panic(err) + } + } // for + +// tw.Close() +// gw.Close() +// fw.Close() +// file, _ := os.Open(dir + "/" + filename) + // fw.Seek(0, 0) + return c.RenderBinary(fw, filename, revel.Attachment, time.Now()) // revel.Attachment +} + + diff --git a/app/controllers/FileController.go b/app/controllers/FileController.go index 3d172b6..91cdb6b 100644 --- a/app/controllers/FileController.go +++ b/app/controllers/FileController.go @@ -17,7 +17,6 @@ type File struct { BaseController } -// 上传图片 editor // 过时 已弃用! func (c File) UploadImage(renderHtml string) revel.Result { if renderHtml == "" { @@ -33,18 +32,19 @@ func (c File) UploadImage(renderHtml string) revel.Result { return c.RenderTemplate(renderHtml) } +// 已弃用 +func (c File) UploadImageJson(from, noteId string) revel.Result { + re := c.uploadImage(from, ""); + return c.RenderJson(re) +} + + // 上传的是博客logo // TODO logo不要设置权限, 另外的目录 func (c File) UploadBlogLogo() revel.Result { return c.UploadImage("file/blog_logo.html"); } -// 弃用 -func (c File) UploadImageJson(from, noteId string) revel.Result { - re := c.uploadImage(from, ""); - return c.RenderJson(re) -} - // 拖拉上传, pasteImage // noteId 是为了判断是否是协作的note, 如果是则需要复制一份到note owner中 func (c File) PasteImage(noteId string) revel.Result { @@ -69,13 +69,14 @@ func (c File) PasteImage(noteId string) revel.Result { return c.RenderJson(re) } -// leaui image plugin +// leaui image plugin upload image func (c File) UploadImageLeaui(albumId string) revel.Result { re := c.uploadImage("", albumId); return c.RenderJson(re) } // 上传图片, 公用方法 +// upload image common func func (c File) uploadImage(from, albumId string) (re info.Re) { var fileUrlPath = "" var fileId = "" diff --git a/app/controllers/init.go b/app/controllers/init.go index 9e99661..56fb798 100644 --- a/app/controllers/init.go +++ b/app/controllers/init.go @@ -25,6 +25,7 @@ var suggestionService *service.SuggestionService var albumService *service.AlbumService var fileService *service.FileService +var attachService *service.AttachService var pageSize = 1000 var defaultSortField = "UpdatedTime" diff --git a/app/db/Mgo.go b/app/db/Mgo.go index e68ca3a..6f91f8b 100644 --- a/app/db/Mgo.go +++ b/app/db/Mgo.go @@ -36,6 +36,7 @@ var Suggestions *mgo.Collection // Album & file(image) var Albums *mgo.Collection var Files *mgo.Collection +var Attachs *mgo.Collection var NoteImages *mgo.Collection @@ -106,6 +107,7 @@ func Init() { // Album & file Albums = Session.DB(dbname).C("albums") Files = Session.DB(dbname).C("files") + Attachs = Session.DB(dbname).C("attachs") NoteImages = Session.DB(dbname).C("note_images") } diff --git a/app/info/AttachInfo.go b/app/info/AttachInfo.go new file mode 100644 index 0000000..4dc39ef --- /dev/null +++ b/app/info/AttachInfo.go @@ -0,0 +1,21 @@ +package info + +import ( + "gopkg.in/mgo.v2/bson" + "time" +) + +// Attach belongs to note +type Attach struct { + AttachId bson.ObjectId `bson:"_id,omitempty"` // + NoteId bson.ObjectId `bson:"NoteId"` // + UploadUserId bson.ObjectId `bson:"UploadUserId"` // 可以不是note owner, 协作者userId + Name string `Name` // file name, md5, such as 13232312.doc + Title string `Title` // raw file name + Size int64 `Size` // file size (byte) + Type string `Type` // file type, "doc" = word + Path string `Path` // the file path such as: files/userId/attachs/adfadf.doc + CreatedTime time.Time `CreatedTime` + + // FromFileId bson.ObjectId `bson:"FromFileId,omitempty"` // copy from fileId, for collaboration +} diff --git a/app/info/NoteInfo.go b/app/info/NoteInfo.go index 103e2df..9ba45fd 100644 --- a/app/info/NoteInfo.go +++ b/app/info/NoteInfo.go @@ -24,7 +24,7 @@ type Note struct { IsMarkdown bool `IsMarkdown` // 是否是markdown笔记, 默认是false - AttachIds []string `FileIds,omitempty` // 2014/9/18, attachments + AttachNum int `AttachNum` // 2014/9/21, attachments num CreatedTime time.Time `CreatedTime` UpdatedTime time.Time `UpdatedTime` diff --git a/app/service/AttachService.go b/app/service/AttachService.go new file mode 100644 index 0000000..521558d --- /dev/null +++ b/app/service/AttachService.go @@ -0,0 +1,175 @@ +package service + +import ( + . "github.com/leanote/leanote/app/lea" + "github.com/revel/revel" + "github.com/leanote/leanote/app/info" + "github.com/leanote/leanote/app/db" + "gopkg.in/mgo.v2/bson" + "time" + "os" + "strings" +) + +type AttachService struct { +} + +// add attach +func (this *AttachService) AddAttach(attach info.Attach) bool { + attach.CreatedTime = time.Now() + ok := db.Insert(db.Attachs, attach) + + if ok { + // 更新笔记的attachs num + this.updateNoteAttachNum(attach.NoteId, 1) + } + + return ok +} + +// 更新笔记的附件个数 +// addNum 1或-1 +func (this *AttachService) updateNoteAttachNum(noteId bson.ObjectId, addNum int) bool { + num := db.Count(db.Attachs, bson.M{"NoteId": noteId}) + /* + note := info.Note{} + note = noteService.GetNoteById(noteId.Hex()) + note.AttachNum += addNum + if note.AttachNum < 0 { + note.AttachNum = 0 + } + Log(note.AttachNum) + */ + return db.UpdateByQField(db.Notes, bson.M{"_id": noteId}, "AttachNum", num) +} + +// list attachs +func (this *AttachService) ListAttachs(noteId, userId string) []info.Attach { + attachs := []info.Attach{} + // 判断是否有权限为笔记添加附件 + if !shareService.HasUpdateNotePerm(noteId, userId) { + return attachs + } + + db.ListByQ(db.Attachs, bson.M{"NoteId": bson.ObjectIdHex(noteId)}, &attachs) + + return attachs +} + +func (this *AttachService) UpdateImageTitle(userId, fileId, title string) bool { + return db.UpdateByIdAndUserIdField(db.Files, fileId, userId, "Title", title) +} + + +// Delete note to delete attas firstly +func (this *AttachService) DeleteAllAttachs(noteId, userId string) bool { + note := noteService.GetNoteById(noteId) + if note.UserId.Hex() == userId { + attachs := []info.Attach{} + db.ListByQ(db.Attachs, bson.M{"NoteId": bson.ObjectIdHex(noteId)}, &attachs) + for _, attach := range attachs { + attach.Path = strings.TrimLeft(attach.Path, "/") + os.Remove(revel.BasePath + "/" + attach.Path) + } + return true + } + + return false +} + +// delete attach +func (this *AttachService) DeleteAttach(attachId, userId string) (bool, string) { + attach := info.Attach{} + db.Get(db.Attachs, attachId, &attach) + + if(attach.AttachId != "") { + // 判断是否有权限为笔记添加附件 + if !shareService.HasUpdateNotePerm(attach.NoteId.Hex(), userId) { + return false, "No Perm" + } + + if db.Delete(db.Attachs, bson.M{"_id": bson.ObjectIdHex(attachId)}) { + this.updateNoteAttachNum(attach.NoteId, -1) + attach.Path = strings.TrimLeft(attach.Path, "/") + err := os.Remove(revel.BasePath + "/" + attach.Path) + if err == nil { + return true, "delete file error" + } + return false, "delete file error" + } + return false, "db error" + } + return false, "no such item" +} + +// 获取文件路径 +// 要判断是否具有权限 +// userId是否具有attach的访问权限 +func (this *AttachService) GetAttach(attachId, userId string) (attach info.Attach) { + if attachId == "" { + return + } + + attach = info.Attach{} + db.Get(db.Attachs, attachId, &attach) + path := attach.Path + if path == "" { + return + } + + note := noteService.GetNoteById(attach.NoteId.Hex()) + + // 判断权限 + + // 笔记是否是公开的 + if note.IsBlog { + return + } + + // 笔记是否是我的 + if note.UserId.Hex() == userId { + return + } + + // 我是否有权限查看或协作 + if shareService.HasReadNotePerm(attach.NoteId.Hex(), userId) { + return + } + + attach = info.Attach{} + return +} + +// 复制笔记时需要复制附件 +// noteService调用, 权限已判断 +func (this *AttachService) CopyAttachs(noteId, toNoteId, toUserId string) bool { + attachs := []info.Attach{} + db.ListByQ(db.Attachs, bson.M{"NoteId": bson.ObjectIdHex(noteId)}, &attachs) + + // 复制之 + toNoteIdO := bson.ObjectIdHex(toNoteId) + for _, attach := range attachs { + attach.AttachId = "" + attach.NoteId = toNoteIdO + + // 文件复制一份 + _, ext := SplitFilename(attach.Name) + newFilename := NewGuid() + ext + dir := "files/" + toUserId + "/attachs" + filePath := dir + "/" + newFilename + err := os.MkdirAll(revel.BasePath + "/" + dir, 0755) + if err != nil { + return false + } + _, err = CopyFile(revel.BasePath + "/" + attach.Path, revel.BasePath + "/" + filePath) + if err != nil { + return false + } + attach.Name = newFilename + attach.Path = filePath + + this.AddAttach(attach) + } + + return true +} \ No newline at end of file diff --git a/app/service/FileService.go b/app/service/FileService.go index 37bd4f9..8a8cfc3 100644 --- a/app/service/FileService.go +++ b/app/service/FileService.go @@ -189,7 +189,6 @@ func (this *FileService) CopyImage(userId, fileId, toUserId string) (bool, strin if file.FileId == "" || file.UserId.Hex() != userId { return false, "" } - Log(file) _, ext := SplitFilename(file.Name) newFilename := NewGuid() + ext diff --git a/app/service/NoteService.go b/app/service/NoteService.go index 8f25aad..7fc2504 100644 --- a/app/service/NoteService.go +++ b/app/service/NoteService.go @@ -366,6 +366,9 @@ func (this *NoteService) CopySharedNote(noteId, notebookId, fromUserId, myUserId // 复制图片, 把note的图片都copy给我, 且修改noteContent图片路径 noteContent.Content = noteImageService.CopyNoteImages(noteId, fromUserId, note.NoteId.Hex(), noteContent.Content, myUserId) + // 复制附件 + attachService.CopyAttachs(noteId, note.NoteId.Hex(), myUserId) + // 添加之 note = this.AddNoteAndContent(note, noteContent, note.UserId); diff --git a/app/service/ShareService.go b/app/service/ShareService.go index 1e13c35..ebad5b0 100644 --- a/app/service/ShareService.go +++ b/app/service/ShareService.go @@ -3,7 +3,7 @@ package service import ( "github.com/leanote/leanote/app/info" "github.com/leanote/leanote/app/db" - . "github.com/leanote/leanote/app/lea" + . "github.com/leanote/leanote/app/lea" "gopkg.in/mgo.v2/bson" "time" "sort" @@ -286,6 +286,28 @@ func (this *ShareService) AddShareNote(noteId string, perm int, userId, email st return db.Insert(db.ShareNotes, shareNote), "", toUserId } +// updatedUserId是否有查看userId noteId的权限? +func (this *ShareService) HasReadPerm(userId, updatedUserId, noteId string) bool { + if !db.Has(db.ShareNotes, + bson.M{"UserId": bson.ObjectIdHex(userId), "ToUserId": bson.ObjectIdHex(updatedUserId), "NoteId": bson.ObjectIdHex(noteId)}) { + // noteId的notebookId是否被共享了? + notebookId := noteService.GetNotebookId(noteId) + if notebookId.Hex() == "" { + return false + } + + // 判断notebook是否被共享 + if !db.Has(db.ShareNotebooks, + bson.M{"UserId": bson.ObjectIdHex(userId), "ToUserId": bson.ObjectIdHex(updatedUserId), "NotebookId": notebookId}) { + return false + } else { + return true + } + } else { + return true + } +} + // updatedUserId是否有修改userId noteId的权限? func (this *ShareService) HasUpdatePerm(userId, updatedUserId, noteId string) bool { // 1. noteId是否被共享了? @@ -340,8 +362,6 @@ func (this *ShareService) HasSharedNote(noteId, myUserId string) bool { // noteId的notebook是否共享了给我 func (this *ShareService) HasSharedNotebook(noteId, myUserId, sharedUserId string) bool { notebookId := noteService.GetNotebookId(noteId) - Log(noteId) - Log(notebookId) if notebookId != "" { return db.Has(db.ShareNotebooks, bson.M{"NotebookId": notebookId, "UserId": bson.ObjectIdHex(sharedUserId), @@ -509,4 +529,51 @@ func (this *ShareService) DeleteUserShareNoteAndNotebook(userId, toUserId string db.DeleteAll(db.HasShareNotes, query); return true +} + +// 用户userId是否有修改noteId的权限 +func (this *ShareService) HasUpdateNotePerm(noteId, userId string) bool { + if noteId == "" || userId == "" { + return false; + } + note := noteService.GetNoteById(noteId) + LogJ(note); + if note.UserId != "" { + noteUserId := note.UserId.Hex() + if noteUserId != userId { + // 是否是有权限协作的 + if this.HasUpdatePerm(noteUserId, userId, noteId) { + return true + } else { + return false; + } + } else { + return true + } + } else { + return false; + } +} + +// 用户userId是否有修改noteId的权限 +func (this *ShareService) HasReadNotePerm(noteId, userId string) bool { + if noteId == "" || userId == "" { + return false; + } + note := noteService.GetNoteById(noteId) + if note.UserId != "" { + noteUserId := note.UserId.Hex() + if noteUserId != userId { + // 是否是有权限协作的 + if this.HasReadPerm(noteUserId, userId, noteId) { + return true + } else { + return false; + } + } else { + return true + } + } else { + return false; + } } \ No newline at end of file diff --git a/app/service/TrashService.go b/app/service/TrashService.go index 23b972a..014e6ac 100644 --- a/app/service/TrashService.go +++ b/app/service/TrashService.go @@ -53,7 +53,15 @@ func (this *TrashService) recoverNote(noteId, notebookId, userId string) bool { // 删除trash func (this *TrashService) DeleteTrash(noteId, userId string) bool { - return db.DeleteByIdAndUserId(db.Notes, noteId, userId) + // delete note's attachs + ok := attachService.DeleteAllAttachs(noteId, userId) + + // delete note + ok = db.DeleteByIdAndUserId(db.Notes, noteId, userId) + // delete content + ok = db.DeleteByIdAndUserId(db.NoteContents, noteId, userId) + + return ok } // 列出note, 排序规则, 还有分页 diff --git a/app/service/init.go b/app/service/init.go index 985e938..d8bf943 100644 --- a/app/service/init.go +++ b/app/service/init.go @@ -19,6 +19,7 @@ var blogService *BlogService var tokenService *TokenService var noteImageService *NoteImageService var fileService *FileService +var attachService *AttachService func init() { notebookService = &NotebookService{} @@ -31,5 +32,6 @@ func init() { blogService = &BlogService{} tokenService = &TokenService{} fileService = &FileService{} + attachService = &AttachService{} noteImageService = &NoteImageService{} } \ No newline at end of file diff --git a/app/views/Note/note-dev.html b/app/views/Note/note-dev.html index 520221f..171a4a1 100644 --- a/app/views/Note/note-dev.html +++ b/app/views/Note/note-dev.html @@ -353,6 +353,7 @@ function log(o) { </i>Sort <i class="fa fa-angle-down"></i> --> </a> + <!-- <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1" style="right: 3px; ! important; left: -100px; min-width: 100px;"> @@ -366,6 +367,7 @@ function log(o) { <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated </a></li> </ul> + --> </div> </div> @@ -466,6 +468,38 @@ function log(o) { <ul class="pull-right" id="editorTool"> <li><a class="ios7-a " id="saveBtn" title="ctrl+s" data-toggle="dropdown">{{msg . "save"}}</a></li> + + <li class="dropdown" id="attachDropdown"> + <a class="ios7-a dropdown-toggle" data-toggle="dropdown" id="showAttach"> + <!-- + <span class="fa fa-upload"></span> + --> + {{msg . "attachments"}}<span id="attachNum"></span> + </a> + <div class="dropdown-menu" id="attachMenu"> + <ul id="attachList"> + </ul> + <form id="uploadAttach" method="post" action="/attach/UploadAttach" enctype="multipart/form-data"> + <div id="dropAttach"> + <a class="btn btn-success btn-choose-file"> + Choose File to Upload + </a> + <a class="btn btn-default" id="downloadAllBtn"> + <i class="fa fa-download"></i> + Download All + </a> + <a class="btn btn-default" id="linkAllBtn"> + <i class="fa fa-link"></i> + Link All + </a> + <input type="file" name="file" multiple/> + </div> + <div id="attachUploadMsg"> + </div> + </form> + </div> + </li> + <li><a class="ios7-a " id="tipsBtn" data-toggle="dropdown">{{msg . "editorTips"}}</a></li> <li><a class="ios7-a " id="contentHistory" @@ -498,7 +532,7 @@ function log(o) { </div> </div> - <!-- leaui image --> + <!-- leaui image drop image to editor--> <form id="upload" method="post" action="/file/uploadImageLeaui" enctype="multipart/form-data" style="margin-top: 5px;"> <div id="drop"> Drop images to here @@ -982,19 +1016,17 @@ initSlimScroll(); <link href="/public/mdeditor/editor/editor.css" rel="stylesheet"> <script src="/public/mdeditor/editor/pagedown/Markdown.Converter-min.js"></script> <script src="/public/mdeditor/editor/pagedown/Markdown.Sanitizer-min.js"></script> -<script src="/public/mdeditor/editor/pagedown/Markdown.Editor-min.js"></script> +<script src="/public/mdeditor/editor/pagedown/Markdown.Editor.js"></script> <script src="/public/mdeditor/editor/pagedown/local/Markdown.local.zh-min.js"></script> <script src="/public/mdeditor/editor/Markdown.Extra-min.js"></script> <script src="/public/mdeditor/editor/underscore-min.js"></script> <script src="/public/mdeditor/editor/scrollLink.js"></script> <!--mathjax--> -<!-- <script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [['$','$'], ["\\(","\\)"]], processEscapes: true }, messageStyle: "none"}); </script> <script src="/public/mdeditor/editor/mathJax-min.js"></script> <script src="//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> ---> <script src="/public/mdeditor/editor/jquery.waitforimages-min.js"></script> <script src="/public/mdeditor/editor/google-code-prettify/prettify.js"></script> <script src="/public/mdeditor/editor/editor.js"></script> @@ -1003,7 +1035,7 @@ initSlimScroll(); <!-- context-menu --> <link rel="stylesheet" href="/js/contextmenu/css/contextmenu.css" type="text/css" /> -<!-- version 2.0 --> +<!-- js version 2.0 use require.js --> <script src="/js/require.js"></script> <script> require.config({ @@ -1011,14 +1043,18 @@ require.config({ paths: { // 'jquery': 'js/jquery-1.9.0.min', 'leaui_image': 'tinymce/plugins/leaui_image/public/js/for_editor', + 'attachment_upload': 'js/app/attachment_upload', 'jquery.ui.widget': 'tinymce/plugins/leaui_image/public/js/jquery.ui.widget', 'fileupload': '/tinymce/plugins/leaui_image/public/js/jquery.fileupload' }, shim: { + 'fileupload': {deps: ['jquery.ui.widget']} } }); require(['leaui_image'], function(leaui_image) { }); +require(['attachment_upload'], function(attachment_upload) { +}); </script> </body> </html> \ No newline at end of file diff --git a/messages/msg.en b/messages/msg.en index 92fb393..15059da 100644 --- a/messages/msg.en +++ b/messages/msg.en @@ -132,5 +132,8 @@ discussion=Discussion download=Download howToInstallLeanote=How to install leanote +# +attachments = Attachments + # error notFound=This page cann't found. diff --git a/messages/msg.zh b/messages/msg.zh index d925cea..b68bf78 100644 --- a/messages/msg.zh +++ b/messages/msg.zh @@ -136,6 +136,9 @@ discussion=社区讨论 download=下载 howToInstallLeanote=leanote安装步骤 +# +attachments = 附件 + # 必须要加这个, 奇怪 [CN] \ No newline at end of file diff --git a/public/css/theme/basic.less b/public/css/theme/basic.less index 9e86224..9fc45c6 100644 --- a/public/css/theme/basic.less +++ b/public/css/theme/basic.less @@ -38,6 +38,13 @@ /*"HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue", Helvetica, "Microsoft Yahei", Verdana, Simsun, "Segoe UI", "Segoe UI Web Regular", "Segoe UI Symbol", "BBAlpha Sans", "S60 Sans", Arial, sans-serif;*/ +.btn { + border-radius: 2px; +} +.alert { + margin-bottom: 10px; +} + #logo { font-family: "leanoteregular"; font-size: 36px; @@ -319,4 +326,99 @@ } .ztree { padding: 0px; -} \ No newline at end of file +} + +// leaui image drop drag +#upload { + position: absolute; + z-index: 0; + bottom: 0; + right: 0; + left: 0px; + padding: 0; + background-color: #fff; + text-align: center; + display: none; +} +#upload #drop { + width: 100%; + height: 100%; + padding-top: 100px; +} +#drop.in { + border: 1px solid #000000; +} +#drop.hover { + border: 2px solid #000000; +} +#uploadMsg { + position: absolute; + top: 3px; + right: 3px; + bottom: 10px; + overflow: scroll; + list-style: none; +} + +// upload attach +#uploadAttach { + position: relative; + margin-top: 5px; +} +#dropAttach { + text-align: center; + input { + display: none; + } +} +#dropAttach.in { + border: 1px solid #000000; +} +#dropAttach.hover { + border: 2px solid #000000; +} + +#attachUploadMsg{ + list-style-type: none; + margin: 0; + padding: 0; + max-height: 240px; + overflow: scroll; + z-index: 3; + .alert { + margin: 0; + padding: 0 3px; + margin-top: 10px; + } +} +#attachMenu { + width: 400px; + padding: 10px 5px; + +} +#attachList { + margin: 0; + padding: 0; + max-height: 450px; + overflow-y: scroll; + li { + display: block; + margin: 0; + padding: 0 3px; + border-radius: 3px; + border-bottom: 1px dashed #eee; + height: 45px; + line-height: 45px; + div { + float: left; + } + .attach-title { + width: 200px; + white-space: nowrap;text-overflow:ellipsis; overflow:hidden; + } + .attach-process { + float: right; + } + } +} + diff --git a/public/css/theme/default.css b/public/css/theme/default.css index 7eb4481..20ccfbd 100644 --- a/public/css/theme/default.css +++ b/public/css/theme/default.css @@ -31,6 +31,12 @@ font-style: normal; } /*"HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue", Helvetica, "Microsoft Yahei", Verdana, Simsun, "Segoe UI", "Segoe UI Web Regular", "Segoe UI Symbol", "BBAlpha Sans", "S60 Sans", Arial, sans-serif;*/ +.btn { + border-radius: 2px; +} +.alert { + margin-bottom: 10px; +} #logo { font-family: "leanoteregular"; font-size: 36px; @@ -285,6 +291,96 @@ .ztree { padding: 0px; } +#upload { + position: absolute; + z-index: 0; + bottom: 0; + right: 0; + left: 0px; + padding: 0; + background-color: #fff; + text-align: center; + display: none; +} +#upload #drop { + width: 100%; + height: 100%; + padding-top: 100px; +} +#drop.in { + border: 1px solid #000000; +} +#drop.hover { + border: 2px solid #000000; +} +#uploadMsg { + position: absolute; + top: 3px; + right: 3px; + bottom: 10px; + overflow: scroll; + list-style: none; +} +#uploadAttach { + position: relative; + margin-top: 5px; +} +#dropAttach { + text-align: center; +} +#dropAttach input { + display: none; +} +#dropAttach.in { + border: 1px solid #000000; +} +#dropAttach.hover { + border: 2px solid #000000; +} +#attachUploadMsg { + list-style-type: none; + margin: 0; + padding: 0; + max-height: 240px; + overflow: scroll; + z-index: 3; +} +#attachUploadMsg .alert { + margin: 0; + padding: 0 3px; + margin-top: 10px; +} +#attachMenu { + width: 400px; + padding: 10px 5px; +} +#attachList { + margin: 0; + padding: 0; + max-height: 450px; + overflow-y: scroll; +} +#attachList li { + display: block; + margin: 0; + padding: 0 3px; + border-radius: 3px; + border-bottom: 1px dashed #eee; + height: 45px; + line-height: 45px; +} +#attachList li div { + float: left; +} +#attachList li .attach-title { + width: 200px; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} +#attachList li .attach-process { + float: right; +} ::selection { background: #000000; color: #ffffff; @@ -1265,12 +1361,6 @@ background-position:-1px -670px .tab-pane { padding: 5px 0 0 0; } -.alert { - margin-bottom: 10px; -} -.btn { - border-radius: 0 !important; -} #notebookNavForNewNote li, #notebookNavForNewSharedNote > li { padding-left: 0; @@ -1313,36 +1403,6 @@ background-position:-1px -670px #toggleEditorMode { margin: 0 10px !important; } -#upload { - position: absolute; - z-index: 0; - bottom: 0; - right: 0; - left: 0px; - padding: 0; - background-color: #fff; - text-align: center; - display: none; -} -#upload #drop { - width: 100%; - height: 100%; - padding-top: 100px; -} -#drop.in { - border: 1px solid #000000; -} -#drop.hover { - border: 2px solid #000000; -} -#uploadMsg { - position: absolute; - top: 3px; - right: 3px; - bottom: 10px; - overflow: scroll; - list-style: none; -} #searchNotebookForList { color: #ccc; border: 1px solid rgba(255, 255, 255, 0.1); diff --git a/public/css/theme/default.less b/public/css/theme/default.less index 0784909..aef7f8c 100644 --- a/public/css/theme/default.less +++ b/public/css/theme/default.less @@ -1075,13 +1075,6 @@ background-position:-1px -670px .tab-pane { padding: 5px 0 0 0; } -.alert { - margin-bottom: 10px; -} - -.btn { - border-radius: 0 !important; -} .mce-container-body iframe { //overflow-x: hidden; // firefox 不能要 @@ -1137,38 +1130,6 @@ background-position:-1px -670px margin: 0 10px !important; } -// leaui image drop drag -#upload { - position: absolute; - z-index: 0; - bottom: 0; - right: 0; - left: 0px; - padding: 0; - background-color: #fff; - text-align: center; - display: none; -} -#upload #drop { - width: 100%; - height: 100%; - padding-top: 100px; -} -#drop.in { - border: 1px solid #000000; -} -#drop.hover { - border: 2px solid #000000; -} -#uploadMsg { - position: absolute; - top: 3px; - right: 3px; - bottom: 10px; - overflow: scroll; - list-style: none; -} - //---------------------- #searchNotebookForList { color: #ccc; diff --git a/public/css/theme/simple.css b/public/css/theme/simple.css index 3d95620..9a501e9 100644 --- a/public/css/theme/simple.css +++ b/public/css/theme/simple.css @@ -1 +1 @@ -@font-face{font-family:'Open Sans';font-style:normal;font-weight:300;src:local('Open Sans Light'),local('OpenSans-Light'),url(../../fonts/open-sans2/DXI1ORHCpsQm3Vp6mXoaTXhCUOGz7vYGh680lGh-uXM.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;src:local('Open Sans'),local('OpenSans'),url(../../fonts/open-sans2/cJZKeOuBrn4kERxqtaUH3T8E0i7KZn-EPnyo3HZu7kw.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;src:local('Open Sans Bold'),local('OpenSans-Bold'),url(../../fonts/open-sans2/k3k702ZOKiLJc3WVjuplzHhCUOGz7vYGh680lGh-uXM.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:italic;font-weight:400;src:local('Open Sans Italic'),local('OpenSans-Italic'),url(../../fonts/open-sans2/xjAJXh38I15wypJXxuGMBobN6UDyHWBl620a-IRfuBk.woff) format('woff')}@font-face{font-family:leanoteregular;src:url(../../fonts/leanote/leanote-regular-webfont.eot);src:url(../../fonts/leanote/leanote-regular-webfont.eot?#iefix) format('embedded-opentype'),url(../../fonts/leanote/leanote-regular-webfont.woff) format('woff'),url(../../fonts/leanote/leanote-regular-webfont.ttf) format('truetype'),url(../../fonts/leanote/leanote-regular-webfont.svg#leanoteregular) format('svg');font-weight:400;font-style:normal}#logo{font-family:leanoteregular;font-size:36px}#logo:before{content:"a"}#switcher span{font-family:leanoteregular;border-radius:5px;display:inline-block;cursor:pointer;font-size:18px;height:34px;line-height:34px;margin-top:8px;padding:0 5px}#switcher span:before{content:"b"}.dropdown-menu{border-radius:3px;margin:0;border:1px solid #0fb264;box-shadow:rgba(0,0,0,.172549)0 6px 12px 0}.dropdown-menu li{list-style:none;padding-left:10px;width:100%;height:30px;line-height:30px}.dropdown-menu li>a{color:#000;display:block;padding-right:20px}.dropdown-menu>li>a{padding:3px 20px 3px 0}#notebookNavForNewNote li:hover{background:0 0}#noteList{position:absolute;bottom:0;top:0}.dropdown-submenu{position:relative}.dropdown-submenu>ul.dropdown-menu{top:0;left:100%;margin-left:-3px!important;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;padding-top:10px!important}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropdown-submenu:after{display:block;content:" ";position:absolute;right:0;top:10px;width:0;height:0;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;border-left-color:#666}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown-submenu.pull-left{float:none}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.open>.dropdown-menu,.dropdown-submenu:hover>.dropdown-menu{opacity:1;transform:scale(1,1);-webkit-transform:scale(1,1);-moz-transform:scale(1,1);-o-transform:scale(1,1)}.dropdown-menu{opacity:0;display:block;-webkit-transform:scale(0,0);-webkit-transform-origin:top;-webkit-animation-fill-mode:forwards;-webkit-transition:all .2s cubic-bezier(0.34,1.21,.4,1);-o-transform:scale(0,0);-o-transform-origin:top;-o-animation-fill-mode:forwards;-o-transition:all .2s cubic-bezier(0.34,1.21,.4,1);-moz-transform:scale(0,0);-moz-transform-origin:top;-moz-animation-fill-mode:forwards;-moz-transition:all .2s cubic-bezier(0.34,1.21,.4,1);transform:scale(0,0);transform-origin:top;animation-fill-mode:forwards;transition:all .2s cubic-bezier(0.34,1.21,.4,1)}.dropdown-list{width:530px;border-radius:3px}.dropdown-list ul{margin:0;padding:0}.dropdown-list ul li{float:left;width:120px;margin-left:10px;margin-bottom:10px;border:1px dashed #ccc}.new-note-right{padding:0 5px;padding-left:3px}#leanoteMsg{line-height:40px;margin-top:10px;margin-left:10px}#newNoteWrap{line-height:40px;margin-top:10px}#searchNotebookForAddDropdownList{left:-200px}#searchNotebookForAdd{line-height:normal;width:200px;margin:0 10px;margin-bottom:10px;height:30px;border-color:#ebeff2;box-shadow:none}#myNotebooks .folderBody{padding-top:3px}#searchNotebookForList{height:30px;width:90%;margin:3px auto;margin-top:0;border-color:#ebeff2;box-shadow:none}#noteItemList .item-setting,#noteItemList .item-blog{position:absolute;right:1px;font-size:10px;z-index:2;padding:3px;border-radius:5px;cursor:pointer;width:20px;text-align:center;opacity:.5;background-color:#464C5E}#noteItemList .item-setting .fa,#noteItemList .item-blog .fa{color:#fff!important}#noteItemList .item-setting:hover,#noteItemList .item-blog:hover{opacity:.8}#noteItemList .item-blog{top:1px}#noteItemList .item-setting{bottom:0;display:none}#noteItemList .item:hover .item-setting{display:block}.friend-header{position:relative}.friend-header .notebook-setting{display:none}.friend-header:hover .notebook-setting{display:block}.each-user{margin-bottom:5px;margin-left:5px;margin-right:5px;margin-top:3px;border:1px solid #eee;border-radius:3px}.notebook-setting{display:none;position:absolute;right:3px;top:0;bottom:0;line-height:30px}.notebook-setting:before{content:"\f013"}.ztree li a:hover .notebook-setting{display:block}#myTag .folderBody{padding:0 3px;padding-bottom:3px}#myTag .folderBody li{float:left;padding:3px;line-height:normal}#notebookList{border-top:1px solid rgba(255,255,255,.05)}.ztree{padding:0}::selection{background:#000;color:#fff}::-moz-selection{background:#000;color:#fff}::-webkit-selection{background:#000;color:#fff}*,body{font-family:'Open Sans','Helvetica Neue',Arial,'Hiragino Sans GB','Microsoft YaHei','WenQuanYi Micro Hei',sans-serif;font-weight:300;font-size:14px}h1,h2,h3{font-family:'Open Sans','Helvetica Neue',Arial,'Hiragino Sans GB','Microsoft YaHei','WenQuanYi Micro Hei',sans-serif;font-weight:300!important}a{color:#000;cursor:pointer}a:hover{text-decoration:none!important;color:#000}a.raw{color:#428bca}a.raw:hover{color:#2a6496}#header{height:60px;background-color:#fff;color:#fff;border-bottom:1px solid #ebeff2;webkit-user-select:none;-webkit-app-region:drag}#header{color:#000}#logo,#logo span{line-height:50px}#logo{width:140px;height:60px;padding-left:10px;padding-top:0;border-bottom:1px solid transparent;border-color:rgba(255,255,255,.1)}#logo span{background-color:#000;color:#fff;border-radius:10px;display:inline-block;padding:4px 0;line-height:1}#switcher{line-height:50px;padding-top:6px;padding-right:5px;width:30px;text-align:center}#switcher i{font-size:16px;cursor:pointer}#switcher i:hover{color:#0fb264}#switcher span{border-radius:5px;cursor:pointer;font-size:18px}#switcher span:hover{color:#0fb264}#searchNote{padding-left:0;line-height:60px;margin:0}#searchNote input{background-size:18px 13px;border-color:#ebeff2;padding-left:14px;height:30px;width:250px;line-height:20px;box-shadow:none}#searchNote input:focus{outline:0!important;border-color:#0fb264;box-shadow:none}#header ul{margin:0;padding:0;list-style:none}#header ul li.dropdown{display:inline-block;height:60px}#header ul>li>a.dropdown-toggle{display:block;padding:15px 5px 0 0;position:relative}#header span.icon{display:inline-block;font-size:28px;color:#999}.dropdown-menu{border:1px solid #0fb264}.dropdown-menu li>a{color:#000}.dropdown-menu li:hover,.dropdown-menu li:focus{background-color:#ebeff2}.dropdown-menu li>a:hover,.dropdown-menu li>a:focus{background-color:#ebeff2}.ios7-a{display:inline-block;padding:0 10px 0 5px;height:40px;vertical-align:middle;line-height:38px;cursor:pointer}#page{overflow:auto;position:absolute;top:0;left:0;bottom:0;right:0}#pageInner{position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden}#mainContainer{position:absolute;top:60px;left:0;right:0;bottom:0;overflow:auto;zoom:1}#mainMask{position:absolute;left:0;right:0;bottom:0;top:0;background-color:#fff;text-align:center;padding-top:100px;z-index:1000}.noteSplit{position:absolute;top:0;width:5px;height:100%;overflow:hidden;z-index:5;cursor:col-resize}#notebookSplitter{left:170px}#noteSplitter{left:250px}#leftNotebook{position:absolute;left:0;top:0;bottom:0;width:170px}#notebook,#notebookMin{position:absolute;left:0;bottom:0;top:0;right:0;background-color:#fff;overflow-y:auto;overflow-x:auto;z-index:2}#notebookMin{z-index:1;overflow-y:visible;overflow-x:visible;background-color:#eee}#notebookMin div.minContainer{border-bottom:1px solid #ccc;padding:5px;position:relative;cursor:pointer}#notebookMin div.minContainer i{font-size:20px;color:#000}#notebookMin div.minContainer:hover i{color:#0fb264}#notebookMin div.minContainer ul{background-color:#fff;opacity:.8;display:none;list-style:none;margin:0;margin-left:20px;padding:5px 0;border:1px solid #0fb264;position:absolute;z-index:1000;top:0;left:10px;width:150px}#notebookMin div.minContainer ul li{padding:0 5px;cursor:pointer}#notebookMin div.minContainer ul li span{cursor:pointer}#notebookMin div.minContainer ul li a{cursor:pointer}#notebookBottom{position:absolute;bottom:0;height:30px;right:0;left:0;line-height:30px;text-align:right;padding-right:5px;background-color:#eee}#notebookBottom #leftSwitcher{border:1px solid #ccc;padding:3px 8px;cursor:pointer}#noteAndEditor{position:absolute;bottom:0;top:0;right:0;left:170px}#noteList{width:250px;border-right:1px solid #ebeff2;border-left:1px solid #ebeff2}#note{position:absolute;bottom:0;top:0;left:250px;right:0;padding-left:5px;overflow-y:hidden;overflow-x:auto;background-color:#fff}.folderHeader{min-height:35px;line-height:35px;cursor:pointer;border-bottom:1px solid transparent;border-color:rgba(0,0,0,.05)}.folderHeader span{display:inline-block;line-height:35px;color:#000;font-size:16px}.folderHeader .fa-left,.friend-header i.fa{display:inline-block;line-height:35px;font-size:16px;width:35px;border-right:1px solid rgba(0,0,0,.05);text-align:center;color:#000}.each-user div{cursor:pointer;border-bottom:1px solid transparent;border-color:rgba(0,0,0,.05)}.each-user div span{display:inline-block;line-height:35px;color:#000;padding-left:3px;font-size:14px}.each-user div .fa{width:20px;border-right:none}#addNotebookPlus{padding-right:10px;color:#666}#addNotebookPlus .fa{font-size:16px}.closed .folder-icon{width:9px;height:11px;background-position:-108px -149px}.closed .folderBody{display:none}.folderBody{list-style:none;margin:0;padding:0}.folderBody li{line-height:30px}.folderBody a.active{background-color:#fff;color:#0fb264}.folderBody a:hover,.folderBody .contextmenu-hover{background-color:#ebeff2!important}#notebookList input,#notebookListForSearch input{width:90%;border:none;box-shadow:none;padding-left:3px;background:0 0}#notebookList input:focus,#notebookListForSearch input:focus{outline:0!important;border:none}#myTag .folderBody li{position:relative}#myTag .folderBody li .badge{width:40px;position:absolute;right:3px;top:7px;font-weight:400;background-color:#fff;color:#000;border:1px solid #ebeff2}#search{border:#bababa 1px solid;background-color:#fff;white-space:nowrap;position:absolute;height:30px;left:3px;right:60px;margin-top:3px}#search label{display:none}#searchButton{border:0 none;width:16px;height:16px;overflow:hidden;cursor:pointer;position:absolute;right:3px;top:5px}#searchInput{border:0 none;overflow:hidden;position:absolute;right:20px;left:0;padding-left:10px;height:28px}#searchInput:focus{border:none;outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}#notesAndSort{background-color:#fff;border-bottom:1px solid #ebeff2}#sortType{float:right}#noteItemList{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;overflow-y:hidden;padding:0 5px}#noteItemList .item{position:relative;height:110px;overflow:hidden;cursor:pointer;padding:5px;border:1px solid #ebeff2;border-radius:3px;margin-top:5px;background-color:#fff}#noteItemList .item:hover,#noteItemList .contextmenu-hover{background-color:#ddd!important}.item-active,#noteItemList .item-active:hover{background-color:#65bd77!important;color:#fff}.item-active .fa,#noteItemList .item-active:hover .fa{color:#eee!important}.item-active .item-title,#noteItemList .item-active:hover .item-title{color:#fff}#noteItemList .item-thumb{width:100px;overflow:hidden;position:absolute;z-index:1;right:0;height:100px;background-color:#fff;margin-right:5px;line-height:100px;text-align:center}.item-thumb img{max-width:100px}#noteItemList .item-desc{position:absolute;left:0;right:100px;margin-left:4px}#noteItemList .item-desc .fa{color:#666}.item-title{font-size:16px;height:22px;line-height:20px;overflow:hidden;margin-bottom:0;color:#000;border-bottom:dashed 1px #ebeff2}#editorTool{margin:0;padding:0;list-style:none}#editorTool li{display:inline-block}#noteTitleDiv{height:30px;border-bottom:1px solid #ddd}#noteTitle{height:100%;padding:0 3px;width:100%;border:none;background-color:#fff;min-width:300px}#noteTitle:focus{outline:0!important}#editorMask{position:absolute;top:0;bottom:0;right:0;left:0;background-color:#fff;z-index:-10;padding-top:50px;text-align:center}#editorMask .fa,#editorMask a{font-size:24px}#editorMask a{display:inline-block;border-radius:3px;border:1px solid #ebeff2;padding:10px}#editorMask a:hover{background-color:#65bd77;color:#fff}#editor,#mdEditor{position:absolute;z-index:2;top:71px;bottom:0;right:0;left:5px;padding:0;display:none}#mdEditor{z-index:1;background-color:#fff;bottom:10px}#mdEditor #md-section-helper,#mdEditor #wmd-input{font-size:14px;line-height:22px}#editorContent{position:absolute;top:30px;bottom:10px;right:0;left:0;overflow:auto}#editor .mce-ifr{border:none;overflow:hidden!important}#editor .mce-tinymce{border:none}#mceToolbar,#wmd-button-bar{position:relative;height:30px;overflow:hidden;border-bottom:1px solid #ccc;background-color:#f0f0f0}.mce-btn-small button{padding:5px 5px!important;line-height:20px!important}.mce-menubtn.mce-btn-small span{line-height:20px!important}.mce-btn span{font-family:'Open Sans','Helvetica Neue',Arial,'Hiragino Sans GB','Microsoft YaHei','WenQuanYi Micro Hei',sans-serif!important}.mce-primary button,.mce-primary button i{text-shadow:none}.mce-primary{background-color:#47a447!important;border-color:#398439!important}.mce-menu-item:hover,.mce-menu-item.mce-selected,.mce-menu-item:focus{background-color:#ebeff2}.mce-menu-item:hover span,.mce-menu-item.mce-selected span,.mce-menu-item:focus span{color:#000!important}.mce-menu-item-normal.mce-active{background-color:#ebeff2}.tool-split{display:inline-block;line-height:25px;color:#ddd}#tool{border-bottom:1px solid #ddd}#tag{height:40px;line-height:38px}#tag .dropdown{line-height:30px}#addTagInput{line-height:25px;display:none;padding:0;border:none;background-color:#fff}#addTagInput:focus{outline:0}.label-default{background-color:#464C5E}.label-red{background-color:#d9534f}.label-yellow{background-color:#f0ad4e}.label-blue{background-color:#428bca}.label-green{background-color:#5cb85c}.label{border-radius:0;font-weight:400}.label i{width:10px;cursor:pointer;font-style:normal;display:inline-block;padding-left:3px;opacity:0}.label i:hover{opacity:1}#leanoteNav{position:absolute;right:5px;border:1px solid #ccc;border-radius:3px;background-color:#fff;opacity:.5;z-index:11;margin-right:2px}#leanoteNav h1{margin:0;font-size:18px;padding:3px;cursor:pointer}#leanoteNav i{padding:3px}#leanoteNav span{display:none}#leanoteNav #leanoteNavContent{display:none;overflow:auto}#leanoteNav.unfolder{min-width:200px;max-width:300px;opacity:.8}#leanoteNav.unfolder h1{border-bottom:1px dashed #ebeff2}#leanoteNav.unfolder span{display:inline}#leanoteNav.unfolder #leanoteNavContent{display:block;min-height:30px}#leanoteNav ul{margin:0;padding-left:23px}#leanoteNav ul li{list-style-type:disc}#leanoteNav ul li a:hover{color:#0fb264}#leanoteNav ul .nav-h2{margin-left:20px}#leanoteNav ul .nav-h3{margin-left:30px}#leanoteNav ul .nav-h4{margin-left:40px}#leanoteNav ul .nav-h5{margin-left:50px}.scrollTo-a{cursor:pointer!important}#noteRead{position:absolute;left:0;right:0;top:0;bottom:0;display:none;z-index:100;background-color:#fff}#noteReadContainer{position:relative;width:100%;height:100%}#noteReadTop{position:absolute;height:60px;left:0;right:0;border-bottom:1px solid #ebeff2}#noteReadTitle{margin:3px 0}#noteReadContent{position:absolute;top:60px;bottom:0;right:0;left:0;overflow:auto;padding:3px}.fa-calendar{color:#666}.dropdown-menu .fa{width:15px}.dropdown-menu span,.dropdown-menu a,.dropdown-menu li{cursor:default}#topNav a{display:inline-block;line-height:60px}.tab-pane{padding:5px 0 0}.alert{margin-bottom:10px}.btn{border-radius:0!important}#notebookNavForNewNote li,#notebookNavForNewSharedNote>li{padding-left:0;border-bottom:1px solid #ebeff2}#notebookNavForNewNote>li:hover,#notebookNavForNewNote>li:focus,#notebookNavForNewSharedNote>li:hover,#notebookNavForNewSharedNote>li:focus{background:0 0}.new-note-left{padding:0 5px;width:95px;overflow:hidden;white-space:nowrap;border-right:1px dashed #ebeff2}.new-note-left:hover{background-color:#ebeff2}.new-note-right:hover{background-color:#ebeff2}#historyList table{width:100%}#historyList .btns{border-top:1px dashed #eee;padding:5px 0}#loading{display:inline-block;width:20px;height:20px;content:url(../../images/loading-a-20-black.gif);vertical-align:middle;visibility:hidden}#toggleEditorMode{margin:0 10px!important}#upload{position:absolute;z-index:0;bottom:0;right:0;left:0;padding:0;background-color:#fff;text-align:center;display:none}#upload #drop{width:100%;height:100%;padding-top:100px}#drop.in{border:1px solid #000}#drop.hover{border:2px solid #000}#uploadMsg{position:absolute;top:3px;right:3px;bottom:10px;overflow:scroll;list-style:none}#notebookList{border-top:1px dashed #eee} \ No newline at end of file +@font-face{font-family:'Open Sans';font-style:normal;font-weight:300;src:local('Open Sans Light'),local('OpenSans-Light'),url(../../fonts/open-sans2/DXI1ORHCpsQm3Vp6mXoaTXhCUOGz7vYGh680lGh-uXM.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;src:local('Open Sans'),local('OpenSans'),url(../../fonts/open-sans2/cJZKeOuBrn4kERxqtaUH3T8E0i7KZn-EPnyo3HZu7kw.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;src:local('Open Sans Bold'),local('OpenSans-Bold'),url(../../fonts/open-sans2/k3k702ZOKiLJc3WVjuplzHhCUOGz7vYGh680lGh-uXM.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:italic;font-weight:400;src:local('Open Sans Italic'),local('OpenSans-Italic'),url(../../fonts/open-sans2/xjAJXh38I15wypJXxuGMBobN6UDyHWBl620a-IRfuBk.woff) format('woff')}@font-face{font-family:leanoteregular;src:url(../../fonts/leanote/leanote-regular-webfont.eot);src:url(../../fonts/leanote/leanote-regular-webfont.eot?#iefix) format('embedded-opentype'),url(../../fonts/leanote/leanote-regular-webfont.woff) format('woff'),url(../../fonts/leanote/leanote-regular-webfont.ttf) format('truetype'),url(../../fonts/leanote/leanote-regular-webfont.svg#leanoteregular) format('svg');font-weight:400;font-style:normal}.btn{border-radius:2px}.alert{margin-bottom:10px}#logo{font-family:leanoteregular;font-size:36px}#logo:before{content:"a"}#switcher span{font-family:leanoteregular;border-radius:5px;display:inline-block;cursor:pointer;font-size:18px;height:34px;line-height:34px;margin-top:8px;padding:0 5px}#switcher span:before{content:"b"}.dropdown-menu{border-radius:3px;margin:0;border:1px solid #0fb264;box-shadow:rgba(0,0,0,.172549)0 6px 12px 0}.dropdown-menu li{list-style:none;padding-left:10px;width:100%;height:30px;line-height:30px}.dropdown-menu li>a{color:#000;display:block;padding-right:20px}.dropdown-menu>li>a{padding:3px 20px 3px 0}#notebookNavForNewNote li:hover{background:0 0}#noteList{position:absolute;bottom:0;top:0}.dropdown-submenu{position:relative}.dropdown-submenu>ul.dropdown-menu{top:0;left:100%;margin-left:-3px!important;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;padding-top:10px!important}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropdown-submenu:after{display:block;content:" ";position:absolute;right:0;top:10px;width:0;height:0;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;border-left-color:#666}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown-submenu.pull-left{float:none}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.open>.dropdown-menu,.dropdown-submenu:hover>.dropdown-menu{opacity:1;transform:scale(1,1);-webkit-transform:scale(1,1);-moz-transform:scale(1,1);-o-transform:scale(1,1)}.dropdown-menu{opacity:0;display:block;-webkit-transform:scale(0,0);-webkit-transform-origin:top;-webkit-animation-fill-mode:forwards;-webkit-transition:all .2s cubic-bezier(0.34,1.21,.4,1);-o-transform:scale(0,0);-o-transform-origin:top;-o-animation-fill-mode:forwards;-o-transition:all .2s cubic-bezier(0.34,1.21,.4,1);-moz-transform:scale(0,0);-moz-transform-origin:top;-moz-animation-fill-mode:forwards;-moz-transition:all .2s cubic-bezier(0.34,1.21,.4,1);transform:scale(0,0);transform-origin:top;animation-fill-mode:forwards;transition:all .2s cubic-bezier(0.34,1.21,.4,1)}.dropdown-list{width:530px;border-radius:3px}.dropdown-list ul{margin:0;padding:0}.dropdown-list ul li{float:left;width:120px;margin-left:10px;margin-bottom:10px;border:1px dashed #ccc}.new-note-right{padding:0 5px;padding-left:3px}#leanoteMsg{line-height:40px;margin-top:10px;margin-left:10px}#newNoteWrap{line-height:40px;margin-top:10px}#searchNotebookForAddDropdownList{left:-200px}#searchNotebookForAdd{line-height:normal;width:200px;margin:0 10px;margin-bottom:10px;height:30px;border-color:#ebeff2;box-shadow:none}#myNotebooks .folderBody{padding-top:3px}#searchNotebookForList{height:30px;width:90%;margin:3px auto;margin-top:0;border-color:#ebeff2;box-shadow:none}#noteItemList .item-setting,#noteItemList .item-blog{position:absolute;right:1px;font-size:10px;z-index:2;padding:3px;border-radius:5px;cursor:pointer;width:20px;text-align:center;opacity:.5;background-color:#464C5E}#noteItemList .item-setting .fa,#noteItemList .item-blog .fa{color:#fff!important}#noteItemList .item-setting:hover,#noteItemList .item-blog:hover{opacity:.8}#noteItemList .item-blog{top:1px}#noteItemList .item-setting{bottom:0;display:none}#noteItemList .item:hover .item-setting{display:block}.friend-header{position:relative}.friend-header .notebook-setting{display:none}.friend-header:hover .notebook-setting{display:block}.each-user{margin-bottom:5px;margin-left:5px;margin-right:5px;margin-top:3px;border:1px solid #eee;border-radius:3px}.notebook-setting{display:none;position:absolute;right:3px;top:0;bottom:0;line-height:30px}.notebook-setting:before{content:"\f013"}.ztree li a:hover .notebook-setting{display:block}#myTag .folderBody{padding:0 3px;padding-bottom:3px}#myTag .folderBody li{float:left;padding:3px;line-height:normal}#notebookList{border-top:1px solid rgba(255,255,255,.05)}.ztree{padding:0}#upload{position:absolute;z-index:0;bottom:0;right:0;left:0;padding:0;background-color:#fff;text-align:center;display:none}#upload #drop{width:100%;height:100%;padding-top:100px}#drop.in{border:1px solid #000}#drop.hover{border:2px solid #000}#uploadMsg{position:absolute;top:3px;right:3px;bottom:10px;overflow:scroll;list-style:none}#uploadAttach{position:relative;margin-top:5px}#dropAttach{text-align:center}#dropAttach input{display:none}#dropAttach.in{border:1px solid #000}#dropAttach.hover{border:2px solid #000}#attachUploadMsg{list-style-type:none;margin:0;padding:0;max-height:240px;overflow:scroll;z-index:3}#attachUploadMsg .alert{margin:0;padding:0 3px;margin-top:10px}#attachMenu{width:400px;padding:10px 5px}#attachList{margin:0;padding:0;max-height:450px;overflow-y:scroll}#attachList li{display:block;margin:0;padding:0 3px;border-radius:3px;border-bottom:1px dashed #eee;height:45px;line-height:45px}#attachList li div{float:left}#attachList li .attach-title{width:200px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}#attachList li .attach-process{float:right}::selection{background:#000;color:#fff}::-moz-selection{background:#000;color:#fff}::-webkit-selection{background:#000;color:#fff}*,body{font-family:'Open Sans','Helvetica Neue',Arial,'Hiragino Sans GB','Microsoft YaHei','WenQuanYi Micro Hei',sans-serif;font-weight:300;font-size:14px}h1,h2,h3{font-family:'Open Sans','Helvetica Neue',Arial,'Hiragino Sans GB','Microsoft YaHei','WenQuanYi Micro Hei',sans-serif;font-weight:300!important}a{color:#000;cursor:pointer}a:hover{text-decoration:none!important;color:#000}a.raw{color:#428bca}a.raw:hover{color:#2a6496}#header{height:60px;background-color:#fff;color:#fff;border-bottom:1px solid #ebeff2;webkit-user-select:none;-webkit-app-region:drag}#header{color:#000}#logo,#logo span{line-height:50px}#logo{width:140px;height:60px;padding-left:10px;padding-top:0;border-bottom:1px solid transparent;border-color:rgba(255,255,255,.1)}#logo span{background-color:#000;color:#fff;border-radius:10px;display:inline-block;padding:4px 0;line-height:1}#switcher{line-height:50px;padding-top:6px;padding-right:5px;width:30px;text-align:center}#switcher i{font-size:16px;cursor:pointer}#switcher i:hover{color:#0fb264}#switcher span{border-radius:5px;cursor:pointer;font-size:18px}#switcher span:hover{color:#0fb264}#searchNote{padding-left:0;line-height:60px;margin:0}#searchNote input{background-size:18px 13px;border-color:#ebeff2;padding-left:14px;height:30px;width:250px;line-height:20px;box-shadow:none}#searchNote input:focus{outline:0!important;border-color:#0fb264;box-shadow:none}#header ul{margin:0;padding:0;list-style:none}#header ul li.dropdown{display:inline-block;height:60px}#header ul>li>a.dropdown-toggle{display:block;padding:15px 5px 0 0;position:relative}#header span.icon{display:inline-block;font-size:28px;color:#999}.dropdown-menu{border:1px solid #0fb264}.dropdown-menu li>a{color:#000}.dropdown-menu li:hover,.dropdown-menu li:focus{background-color:#ebeff2}.dropdown-menu li>a:hover,.dropdown-menu li>a:focus{background-color:#ebeff2}.ios7-a{display:inline-block;padding:0 10px 0 5px;height:40px;vertical-align:middle;line-height:38px;cursor:pointer}#page{overflow:auto;position:absolute;top:0;left:0;bottom:0;right:0}#pageInner{position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden}#mainContainer{position:absolute;top:60px;left:0;right:0;bottom:0;overflow:auto;zoom:1}#mainMask{position:absolute;left:0;right:0;bottom:0;top:0;background-color:#fff;text-align:center;padding-top:100px;z-index:1000}.noteSplit{position:absolute;top:0;width:5px;height:100%;overflow:hidden;z-index:5;cursor:col-resize}#notebookSplitter{left:170px}#noteSplitter{left:250px}#leftNotebook{position:absolute;left:0;top:0;bottom:0;width:170px}#notebook,#notebookMin{position:absolute;left:0;bottom:0;top:0;right:0;background-color:#fff;overflow-y:auto;overflow-x:auto;z-index:2}#notebookMin{z-index:1;overflow-y:visible;overflow-x:visible;background-color:#eee}#notebookMin div.minContainer{border-bottom:1px solid #ccc;padding:5px;position:relative;cursor:pointer}#notebookMin div.minContainer i{font-size:20px;color:#000}#notebookMin div.minContainer:hover i{color:#0fb264}#notebookMin div.minContainer ul{background-color:#fff;opacity:.8;display:none;list-style:none;margin:0;margin-left:20px;padding:5px 0;border:1px solid #0fb264;position:absolute;z-index:1000;top:0;left:10px;width:150px}#notebookMin div.minContainer ul li{padding:0 5px;cursor:pointer}#notebookMin div.minContainer ul li span{cursor:pointer}#notebookMin div.minContainer ul li a{cursor:pointer}#notebookBottom{position:absolute;bottom:0;height:30px;right:0;left:0;line-height:30px;text-align:right;padding-right:5px;background-color:#eee}#notebookBottom #leftSwitcher{border:1px solid #ccc;padding:3px 8px;cursor:pointer}#noteAndEditor{position:absolute;bottom:0;top:0;right:0;left:170px}#noteList{width:250px;border-right:1px solid #ebeff2;border-left:1px solid #ebeff2}#note{position:absolute;bottom:0;top:0;left:250px;right:0;padding-left:5px;overflow-y:hidden;overflow-x:auto;background-color:#fff}.folderHeader{min-height:35px;line-height:35px;cursor:pointer;border-bottom:1px solid transparent;border-color:rgba(0,0,0,.05)}.folderHeader span{display:inline-block;line-height:35px;color:#000;font-size:16px}.folderHeader .fa-left,.friend-header i.fa{display:inline-block;line-height:35px;font-size:16px;width:35px;border-right:1px solid rgba(0,0,0,.05);text-align:center;color:#000}.each-user div{cursor:pointer;border-bottom:1px solid transparent;border-color:rgba(0,0,0,.05)}.each-user div span{display:inline-block;line-height:35px;color:#000;padding-left:3px;font-size:14px}.each-user div .fa{width:20px;border-right:none}#addNotebookPlus{padding-right:10px;color:#666}#addNotebookPlus .fa{font-size:16px}.closed .folder-icon{width:9px;height:11px;background-position:-108px -149px}.closed .folderBody{display:none}.folderBody{list-style:none;margin:0;padding:0}.folderBody li{line-height:30px}.folderBody a.active{background-color:#fff;color:#0fb264}.folderBody a:hover,.folderBody .contextmenu-hover{background-color:#ebeff2!important}#notebookList input,#notebookListForSearch input{width:90%;border:none;box-shadow:none;padding-left:3px;background:0 0}#notebookList input:focus,#notebookListForSearch input:focus{outline:0!important;border:none}#myTag .folderBody li{position:relative}#myTag .folderBody li .badge{width:40px;position:absolute;right:3px;top:7px;font-weight:400;background-color:#fff;color:#000;border:1px solid #ebeff2}#search{border:#bababa 1px solid;background-color:#fff;white-space:nowrap;position:absolute;height:30px;left:3px;right:60px;margin-top:3px}#search label{display:none}#searchButton{border:0 none;width:16px;height:16px;overflow:hidden;cursor:pointer;position:absolute;right:3px;top:5px}#searchInput{border:0 none;overflow:hidden;position:absolute;right:20px;left:0;padding-left:10px;height:28px}#searchInput:focus{border:none;outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}#notesAndSort{background-color:#fff;border-bottom:1px solid #ebeff2}#sortType{float:right}#noteItemList{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;overflow-y:hidden;padding:0 5px}#noteItemList .item{position:relative;height:110px;overflow:hidden;cursor:pointer;padding:5px;border:1px solid #ebeff2;border-radius:3px;margin-top:5px;background-color:#fff}#noteItemList .item:hover,#noteItemList .contextmenu-hover{background-color:#ddd!important}.item-active,#noteItemList .item-active:hover{background-color:#65bd77!important;color:#fff}.item-active .fa,#noteItemList .item-active:hover .fa{color:#eee!important}.item-active .item-title,#noteItemList .item-active:hover .item-title{color:#fff}#noteItemList .item-thumb{width:100px;overflow:hidden;position:absolute;z-index:1;right:0;height:100px;background-color:#fff;margin-right:5px;line-height:100px;text-align:center}.item-thumb img{max-width:100px}#noteItemList .item-desc{position:absolute;left:0;right:100px;margin-left:4px}#noteItemList .item-desc .fa{color:#666}.item-title{font-size:16px;height:22px;line-height:20px;overflow:hidden;margin-bottom:0;color:#000;border-bottom:dashed 1px #ebeff2}#editorTool{margin:0;padding:0;list-style:none}#editorTool li{display:inline-block}#noteTitleDiv{height:30px;border-bottom:1px solid #ddd}#noteTitle{height:100%;padding:0 3px;width:100%;border:none;background-color:#fff;min-width:300px}#noteTitle:focus{outline:0!important}#editorMask{position:absolute;top:0;bottom:0;right:0;left:0;background-color:#fff;z-index:-10;padding-top:50px;text-align:center}#editorMask .fa,#editorMask a{font-size:24px}#editorMask a{display:inline-block;border-radius:3px;border:1px solid #ebeff2;padding:10px}#editorMask a:hover{background-color:#65bd77;color:#fff}#editor,#mdEditor{position:absolute;z-index:2;top:71px;bottom:0;right:0;left:5px;padding:0;display:none}#mdEditor{z-index:1;background-color:#fff;bottom:10px}#mdEditor #md-section-helper,#mdEditor #wmd-input{font-size:14px;line-height:22px}#editorContent{position:absolute;top:30px;bottom:10px;right:0;left:0;overflow:auto}#editor .mce-ifr{border:none;overflow:hidden!important}#editor .mce-tinymce{border:none}#mceToolbar,#wmd-button-bar{position:relative;height:30px;overflow:hidden;border-bottom:1px solid #ccc;background-color:#f0f0f0}.mce-btn-small button{padding:5px 5px!important;line-height:20px!important}.mce-menubtn.mce-btn-small span{line-height:20px!important}.mce-btn span{font-family:'Open Sans','Helvetica Neue',Arial,'Hiragino Sans GB','Microsoft YaHei','WenQuanYi Micro Hei',sans-serif!important}.mce-primary button,.mce-primary button i{text-shadow:none}.mce-primary{background-color:#47a447!important;border-color:#398439!important}.mce-menu-item:hover,.mce-menu-item.mce-selected,.mce-menu-item:focus{background-color:#ebeff2}.mce-menu-item:hover span,.mce-menu-item.mce-selected span,.mce-menu-item:focus span{color:#000!important}.mce-menu-item-normal.mce-active{background-color:#ebeff2}.tool-split{display:inline-block;line-height:25px;color:#ddd}#tool{border-bottom:1px solid #ddd}#tag{height:40px;line-height:38px}#tag .dropdown{line-height:30px}#addTagInput{line-height:25px;display:none;padding:0;border:none;background-color:#fff}#addTagInput:focus{outline:0}.label-default{background-color:#464C5E}.label-red{background-color:#d9534f}.label-yellow{background-color:#f0ad4e}.label-blue{background-color:#428bca}.label-green{background-color:#5cb85c}.label{border-radius:0;font-weight:400}.label i{width:10px;cursor:pointer;font-style:normal;display:inline-block;padding-left:3px;opacity:0}.label i:hover{opacity:1}#leanoteNav{position:absolute;right:5px;border:1px solid #ccc;border-radius:3px;background-color:#fff;opacity:.5;z-index:11;margin-right:2px}#leanoteNav h1{margin:0;font-size:18px;padding:3px;cursor:pointer}#leanoteNav i{padding:3px}#leanoteNav span{display:none}#leanoteNav #leanoteNavContent{display:none;overflow:auto}#leanoteNav.unfolder{min-width:200px;max-width:300px;opacity:.8}#leanoteNav.unfolder h1{border-bottom:1px dashed #ebeff2}#leanoteNav.unfolder span{display:inline}#leanoteNav.unfolder #leanoteNavContent{display:block;min-height:30px}#leanoteNav ul{margin:0;padding-left:23px}#leanoteNav ul li{list-style-type:disc}#leanoteNav ul li a:hover{color:#0fb264}#leanoteNav ul .nav-h2{margin-left:20px}#leanoteNav ul .nav-h3{margin-left:30px}#leanoteNav ul .nav-h4{margin-left:40px}#leanoteNav ul .nav-h5{margin-left:50px}.scrollTo-a{cursor:pointer!important}#noteRead{position:absolute;left:0;right:0;top:0;bottom:0;display:none;z-index:100;background-color:#fff}#noteReadContainer{position:relative;width:100%;height:100%}#noteReadTop{position:absolute;height:60px;left:0;right:0;border-bottom:1px solid #ebeff2}#noteReadTitle{margin:3px 0}#noteReadContent{position:absolute;top:60px;bottom:0;right:0;left:0;overflow:auto;padding:3px}.fa-calendar{color:#666}.dropdown-menu .fa{width:15px}.dropdown-menu span,.dropdown-menu a,.dropdown-menu li{cursor:default}#topNav a{display:inline-block;line-height:60px}.tab-pane{padding:5px 0 0}#notebookNavForNewNote li,#notebookNavForNewSharedNote>li{padding-left:0;border-bottom:1px solid #ebeff2}#notebookNavForNewNote>li:hover,#notebookNavForNewNote>li:focus,#notebookNavForNewSharedNote>li:hover,#notebookNavForNewSharedNote>li:focus{background:0 0}.new-note-left{padding:0 5px;width:95px;overflow:hidden;white-space:nowrap;border-right:1px dashed #ebeff2}.new-note-left:hover{background-color:#ebeff2}.new-note-right:hover{background-color:#ebeff2}#historyList table{width:100%}#historyList .btns{border-top:1px dashed #eee;padding:5px 0}#loading{display:inline-block;width:20px;height:20px;content:url(../../images/loading-a-20-black.gif);vertical-align:middle;visibility:hidden}#toggleEditorMode{margin:0 10px!important}#notebookList{border-top:1px dashed #eee} \ No newline at end of file diff --git a/public/css/theme/simple.less b/public/css/theme/simple.less index abf6842..04176d1 100644 --- a/public/css/theme/simple.less +++ b/public/css/theme/simple.less @@ -1024,13 +1024,7 @@ background-position:-1px -670px .tab-pane { padding: 5px 0 0 0; } -.alert { - margin-bottom: 10px; -} -.btn { - border-radius: 0 !important; -} .mce-container-body iframe { //overflow-x: hidden; @@ -1087,37 +1081,6 @@ background-position:-1px -670px } -// leaui image drop drag -#upload { - position: absolute; - z-index: 0; - bottom: 0; - right: 0; - left: 0px; - padding: 0; - background-color: #fff; - text-align: center; - display: none; -} -#upload #drop { - width: 100%; - height: 100%; - padding-top: 100px; -} -#drop.in { - border: 1px solid #000000; -} -#drop.hover { - border: 2px solid #000000; -} -#uploadMsg { - position: absolute; - top: 3px; - right: 3px; - bottom: 10px; - overflow: scroll; - list-style: none; -} #notebookList { border-top: 1px dashed #eee; } \ No newline at end of file diff --git a/public/css/theme/writting-overwrite.css b/public/css/theme/writting-overwrite.css index 164c587..017dd4a 100644 --- a/public/css/theme/writting-overwrite.css +++ b/public/css/theme/writting-overwrite.css @@ -1 +1 @@ -@font-face{font-family:'Open Sans';font-style:normal;font-weight:300;src:local('Open Sans Light'),local('OpenSans-Light'),url(../../fonts/open-sans2/DXI1ORHCpsQm3Vp6mXoaTXhCUOGz7vYGh680lGh-uXM.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;src:local('Open Sans'),local('OpenSans'),url(../../fonts/open-sans2/cJZKeOuBrn4kERxqtaUH3T8E0i7KZn-EPnyo3HZu7kw.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;src:local('Open Sans Bold'),local('OpenSans-Bold'),url(../../fonts/open-sans2/k3k702ZOKiLJc3WVjuplzHhCUOGz7vYGh680lGh-uXM.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:italic;font-weight:400;src:local('Open Sans Italic'),local('OpenSans-Italic'),url(../../fonts/open-sans2/xjAJXh38I15wypJXxuGMBobN6UDyHWBl620a-IRfuBk.woff) format('woff')}@font-face{font-family:leanoteregular;src:url(../../fonts/leanote/leanote-regular-webfont.eot);src:url(../../fonts/leanote/leanote-regular-webfont.eot?#iefix) format('embedded-opentype'),url(../../fonts/leanote/leanote-regular-webfont.woff) format('woff'),url(../../fonts/leanote/leanote-regular-webfont.ttf) format('truetype'),url(../../fonts/leanote/leanote-regular-webfont.svg#leanoteregular) format('svg');font-weight:400;font-style:normal}#logo{font-family:leanoteregular;font-size:36px}#logo:before{content:"a"}#switcher span{font-family:leanoteregular;border-radius:5px;display:inline-block;cursor:pointer;font-size:18px;height:34px;line-height:34px;margin-top:8px;padding:0 5px}#switcher span:before{content:"b"}.dropdown-menu{border-radius:3px;margin:0;border:1px solid #0fb264;box-shadow:rgba(0,0,0,.172549)0 6px 12px 0}.dropdown-menu li{list-style:none;padding-left:10px;width:100%;height:30px;line-height:30px}.dropdown-menu li>a{color:#000;display:block;padding-right:20px}.dropdown-menu>li>a{padding:3px 20px 3px 0}#notebookNavForNewNote li:hover{background:0 0}#noteList{position:absolute;bottom:0;top:0}.dropdown-submenu{position:relative}.dropdown-submenu>ul.dropdown-menu{top:0;left:100%;margin-left:-3px!important;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;padding-top:10px!important}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropdown-submenu:after{display:block;content:" ";position:absolute;right:0;top:10px;width:0;height:0;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;border-left-color:#666}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown-submenu.pull-left{float:none}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.open>.dropdown-menu,.dropdown-submenu:hover>.dropdown-menu{opacity:1;transform:scale(1,1);-webkit-transform:scale(1,1);-moz-transform:scale(1,1);-o-transform:scale(1,1)}.dropdown-menu{opacity:0;display:block;-webkit-transform:scale(0,0);-webkit-transform-origin:top;-webkit-animation-fill-mode:forwards;-webkit-transition:all .2s cubic-bezier(0.34,1.21,.4,1);-o-transform:scale(0,0);-o-transform-origin:top;-o-animation-fill-mode:forwards;-o-transition:all .2s cubic-bezier(0.34,1.21,.4,1);-moz-transform:scale(0,0);-moz-transform-origin:top;-moz-animation-fill-mode:forwards;-moz-transition:all .2s cubic-bezier(0.34,1.21,.4,1);transform:scale(0,0);transform-origin:top;animation-fill-mode:forwards;transition:all .2s cubic-bezier(0.34,1.21,.4,1)}.dropdown-list{width:530px;border-radius:3px}.dropdown-list ul{margin:0;padding:0}.dropdown-list ul li{float:left;width:120px;margin-left:10px;margin-bottom:10px;border:1px dashed #ccc}.new-note-right{padding:0 5px;padding-left:3px}#leanoteMsg{line-height:40px;margin-top:10px;margin-left:10px}#newNoteWrap{line-height:40px;margin-top:10px}#searchNotebookForAddDropdownList{left:-200px}#searchNotebookForAdd{line-height:normal;width:200px;margin:0 10px;margin-bottom:10px;height:30px;border-color:#ebeff2;box-shadow:none}#myNotebooks .folderBody{padding-top:3px}#searchNotebookForList{height:30px;width:90%;margin:3px auto;margin-top:0;border-color:#ebeff2;box-shadow:none}#noteItemList .item-setting,#noteItemList .item-blog{position:absolute;right:1px;font-size:10px;z-index:2;padding:3px;border-radius:5px;cursor:pointer;width:20px;text-align:center;opacity:.5;background-color:#464C5E}#noteItemList .item-setting .fa,#noteItemList .item-blog .fa{color:#fff!important}#noteItemList .item-setting:hover,#noteItemList .item-blog:hover{opacity:.8}#noteItemList .item-blog{top:1px}#noteItemList .item-setting{bottom:0;display:none}#noteItemList .item:hover .item-setting{display:block}.friend-header{position:relative}.friend-header .notebook-setting{display:none}.friend-header:hover .notebook-setting{display:block}.each-user{margin-bottom:5px;margin-left:5px;margin-right:5px;margin-top:3px;border:1px solid #eee;border-radius:3px}.notebook-setting{display:none;position:absolute;right:3px;top:0;bottom:0;line-height:30px}.notebook-setting:before{content:"\f013"}.ztree li a:hover .notebook-setting{display:block}#myTag .folderBody{padding:0 3px;padding-bottom:3px}#myTag .folderBody li{float:left;padding:3px;line-height:normal}#notebookList{border-top:1px solid rgba(255,255,255,.05)}.ztree{padding:0}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300;src:local('Open Sans Light'),local('OpenSans-Light'),url(../../fonts/open-sans2/DXI1ORHCpsQm3Vp6mXoaTXhCUOGz7vYGh680lGh-uXM.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;src:local('Open Sans'),local('OpenSans'),url(../../fonts/open-sans2/cJZKeOuBrn4kERxqtaUH3T8E0i7KZn-EPnyo3HZu7kw.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;src:local('Open Sans Bold'),local('OpenSans-Bold'),url(../../fonts/open-sans2/k3k702ZOKiLJc3WVjuplzHhCUOGz7vYGh680lGh-uXM.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:italic;font-weight:400;src:local('Open Sans Italic'),local('OpenSans-Italic'),url(../../fonts/open-sans2/xjAJXh38I15wypJXxuGMBobN6UDyHWBl620a-IRfuBk.woff) format('woff')}::selection{background:#000;color:#fff}::-moz-selection{background:#000;color:#fff}::-webkit-selection{background:#000;color:#fff}html,body{background-color:#fbfcf7}*,body{font-family:'Open Sans','Helvetica Neue',Arial,'Hiragino Sans GB','Microsoft YaHei','WenQuanYi Micro Hei',sans-serif;font-weight:300;font-size:16px}h1,h2,h3{font-family:'Open Sans','Helvetica Neue',Arial,'Hiragino Sans GB','Microsoft YaHei','WenQuanYi Micro Hei',sans-serif;font-weight:300!important}a{color:#000;cursor:pointer}a:hover{text-decoration:none!important;color:#000}a.raw{color:#428bca}a.raw:hover{color:#2a6496}#header{height:60px;background-color:#fbfcf7;color:#fff;border-bottom:1px solid #ebeff2;webkit-user-select:none;-webkit-app-region:drag}#header a{color:#ccc}#header li{color:#000}#header li a{color:#000}#searchWrap,#logo,#switcher,#leftNotebook,.noteSplit{display:none}#header ul{margin:0;padding:0;list-style:none}#header ul li.dropdown{display:inline-block;height:60px}#header ul>li>a.dropdown-toggle{display:block;padding:15px 5px 0 0;position:relative}#header span.icon{display:inline-block;font-size:28px;color:#999}.dropdown-menu{border-radius:0;margin:0;-webkit-box-shadow:none;box-shadow:none;border:1px solid #0fb264;overflow:visible}.dropdown-menu li{padding-left:10px;width:100%;height:30px;line-height:30px}.dropdown-menu>li>a{color:#000;display:inline-block;padding:3px}.dropdown-menu>li:hover,.dropdown-menu>li:focus{background-color:#ebeff2}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{background-color:#ebeff2}.ios7-a{display:inline-block;padding:0 10px 0 5px;height:40px;vertical-align:middle;line-height:38px;cursor:pointer}#page{overflow:auto;position:absolute;top:0;left:0;bottom:0;right:0}#pageInner{position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden}#mainContainer{position:absolute;top:0;left:0;right:0;bottom:0;overflow:auto;zoom:1}#search{border:#bababa 1px solid;background-color:#fff;white-space:nowrap;position:absolute;height:30px;left:3px;right:60px;margin-top:3px}#search label{display:none}#searchButton{border:0 none;width:16px;height:16px;overflow:hidden;cursor:pointer;position:absolute;right:3px;top:5px}#searchInput{border:0 none;overflow:hidden;position:absolute;right:20px;left:0;padding-left:10px;height:28px}#searchInput:focus{border:none;outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}#notesAndSort{background-color:#eee;border-bottom:1px solid #ebeff2}#noteItemList{position:absolute;left:0;right:0;bottom:0;top:0;width:100%;overflow-y:hidden;background-color:#f7f7f7;padding:0 5px}#noteItemList .item{position:relative;height:110px;overflow:hidden;cursor:pointer;padding:5px;border:1px solid #ebeff2;border-radius:3px;margin-top:5px;background-color:#fff}#noteItemList .item:hover,#noteItemList .contextmenu-hover{background-color:#ddd!important;color:#000}#noteItemList .item-thumb{padding-left:10px;width:100px;overflow:hidden;position:absolute;right:0;height:100px;background-color:#fff;margin-right:5px}.item-thumb img{width:100px}#noteItemList .item-desc{position:absolute;left:0;right:100px;margin-left:4px}#noteItemList .item-desc .fa{color:#666}#noteItemList .item-blog{position:absolute;right:1px;font-size:10px;z-index:2;top:1px;padding:3px;cursor:pointer;width:20px;text-align:center;opacity:.5;background-color:#464C5E}#noteItemList .item-blog .fa{color:#fff!important}#noteItemList .item-blog:hover{opacity:.8}.item-title{font-size:16px;height:22px;line-height:20px;overflow:hidden;margin-bottom:0;color:#000;border-bottom:dashed 1px #ebeff2}#editorTool{margin:0;padding:0;list-style:none}#editorTool li{display:inline-block}#noteTitle:focus{outline:0!important}#editor,#mdEditor{z-index:2;top:71px;bottom:0;right:0;left:0;padding:0;display:none}#mdEditor{z-index:1;background-color:#fff;bottom:10px}#mdEditor #md-section-helper,#mdEditor #wmd-input{font-size:14px;line-height:22px}#editorContent{position:absolute;top:30px;bottom:10px;right:0;left:0;overflow:auto}#editor .mce-ifr{border:none;overflow:hidden!important}#editor .mce-tinymce{border:none}#mceToolbar,#wmd-button-bar{position:relative;height:30px;overflow:hidden;background-color:#fbfcf7}.mce-btn-small button{padding:5px 5px!important;line-height:20px!important}.mce-btn{background-color:#fbfcf7!important}.mce-menubtn.mce-btn-small span{line-height:20px!important}.mce-btn span{font-family:'Open Sans','Helvetica Neue',Arial,'Hiragino Sans GB','Microsoft YaHei','WenQuanYi Micro Hei',sans-serif!important}.mce-primary button,.mce-primary button i{text-shadow:none}.mce-primary{background-color:#47a447!important;border-color:#398439!important}.mce-menu-item:hover,.mce-menu-item.mce-selected,.mce-menu-item:focus{background-color:#ebeff2}.mce-menu-item:hover span,.mce-menu-item.mce-selected span,.mce-menu-item:focus span{color:#000!important}.mce-menu-item-normal.mce-active{background-color:#ebeff2}.tool-split{display:inline-block;line-height:25px;color:#ddd}#tool{display:none;border-bottom:1px solid #ddd}#tag{height:40px;line-height:38px}#tag .dropdown{line-height:30px}#addTagInput{line-height:25px;display:none;padding:0;border:none;background-color:#fbfcf7}#addTagInput:focus{outline:0}.label-default{background-color:#464C5E}.label-red{background-color:#d9534f}.label-yellow{background-color:#f0ad4e}.label-blue{background-color:#428bca}.label-green{background-color:#5cb85c}.label{border-radius:0;font-weight:400}.label i{width:10px;cursor:pointer;font-style:normal;display:inline-block;padding-left:3px;opacity:0}.label i:hover{opacity:1}#leanoteNav{position:absolute;right:5px;border:1px solid #ccc;border-radius:3px;background-color:#fff;opacity:.5;z-index:11;margin-right:2px}#leanoteNav h1{margin:0;font-size:18px;padding:3px;cursor:pointer}#leanoteNav i{padding:3px}#leanoteNav span{display:none}#leanoteNav #leanoteNavContent{display:none;overflow:auto}#leanoteNav.unfolder{min-width:200px;max-width:300px;opacity:.8}#leanoteNav.unfolder h1{border-bottom:1px dashed #ebeff2}#leanoteNav.unfolder span{display:inline}#leanoteNav.unfolder #leanoteNavContent{display:block;min-height:30px}#leanoteNav ul{margin:0;padding-left:23px}#leanoteNav ul li{list-style-type:disc}#leanoteNav ul li a:hover{color:#0fb264}#leanoteNav ul .nav-h2{margin-left:20px}#leanoteNav ul .nav-h3{margin-left:30px}#leanoteNav ul .nav-h4{margin-left:40px}#leanoteNav ul .nav-h5{margin-left:50px}.scrollTo-a{cursor:pointer!important}#noteRead{position:absolute;left:0;right:0;top:0;bottom:0;display:none;z-index:100;padding-left:5px;background-color:#fff}#noteReadContainer{position:relative;width:100%;height:100%}#noteReadTop{position:absolute;height:60px;left:0;right:0;border-bottom:1px solid #ebeff2}#noteReadTitle{margin:3px 0}#noteReadContent{position:absolute;top:60px;bottom:0;right:0;left:0;overflow:auto;padding:3px}.fa-calendar{color:#666}.dropdown-menu .fa{width:15px}.dropdown-menu span,.dropdown-menu a,.dropdown-menu li{cursor:default}#topNav a{display:inline-block;line-height:60px}.tab-pane{padding:5px 0 0}.alert{margin-bottom:10px}.btn{border-radius:0!important}#notebookNavForNewNote li,#notebookNavForNewSharedNote>li{padding-left:0;border-bottom:1px solid #ebeff2}#notebookNavForNewNote>li:hover,#notebookNavForNewNote>li:focus,#notebookNavForNewSharedNote>li:hover,#notebookNavForNewSharedNote>li:focus{background:0 0}.new-note-left{padding:0 5px;width:95px;overflow:hidden;white-space:nowrap;border-right:1px dashed #ebeff2}.new-note-left:hover{background-color:#ebeff2}.new-note-right{padding:0 5px}.new-note-right:hover{background-color:#ebeff2}#historyList table{width:100%}#historyList .btns{border-top:1px dashed #eee;padding:5px 0}#left-column{width:100%!important}#editorMask{position:absolute;top:0;bottom:0;right:0;left:0;background-color:#fff;z-index:-10;padding-top:50px;text-align:center}#editorMask .fa,#editorMask a{font-size:24px}#editorMask a{display:inline-block;border-radius:3px;border:1px solid #ebeff2;padding:10px}#editorMask a:hover{background-color:#65bd77;color:#fff}html,body{background-color:#fbfcf7;overflow:hidden}#right-column,#newNoteMarkdownBtn,#newShareNoteMarkdownBtn,.new-split,#editorMask,#sortType,#myProfile,#demoRegister{display:none}#mainMask{position:absolute;left:0;right:0;bottom:0;top:0;background-color:#fbfcf7;text-align:center;padding-top:100px;z-index:1000}#header{position:absolute;left:0;right:0;z-index:333;color:#ccc}#header #leanoteMsg{position:absolute;width:700px;left:0;right:0;text-align:right;line-height:60px;margin:auto}#newNoteWrap{line-height:40px;margin-top:10px;margin-left:10px}#newNoteWrap,#topNav{opacity:0}#newNoteWrap:hover,#topNav:hover{opacity:1}#mainContainer{overflow-y:hidden}#newMyNote,#newSharedNote{position:relative}#newMyNote .dropdown,#newSharedNote .dropdown{position:static}.dropdown-menu{border:1px solid #ccc;background-color:#fbfcf7}#note{position:absolute;width:700px;margin:auto;height:100%;left:0;right:0}#editor,#mdEditor{position:absolute;top:60px;z-index:2}#wmd-input{border:none;background-color:#fbfcf7;font-size:16px!important}#md-section-helper{display:none}#mdEditorPreview{top:43px!important}#mceToolbar,#wmd-button-bar{height:40px;padding:5px 0}.editorBg{height:3px;background:url(/images/editor/editor-shadow.png) no-repeat center bottom #f9faf4}.mce-btn-small i,.mce-menubtn.mce-btn-small span,.wmd-button>span{opacity:.85}.mce-ico{font-size:18px;line-height:18px;width:18px;height:18px}.tool-split{line-height:30px}.mce-menubtn.mce-fixed-width.mce-btn-small span{width:80px}.mce-menubtn.mce-btn-small span{font-size:16px}#editorContent_ifr html{border:none!important}#noteTop{position:absolute;z-index:999;left:0;right:150px;padding:15px 0;height:59px}#noteTitleDiv{height:30px}#noteTitle{height:100%;padding:0 3px;width:100%;border:none;background-color:#fbfcf7}#noteList{position:fixed;top:0;bottom:0;left:10px;margin-top:60px;width:200px;z-index:0;opacity:.8;overflow-x:hidden;overflow-y:hidden}#noteList #notesAndSort{display:none}#noteList #noteItemListWrap{display:none}#notesAndSort{background:0 0}#noteItemList{background:0 0}#noteItemList .item{background:0 0}.item-active,#noteItemList .item-active:hover{background-color:#F5F8EA!important;color:#000}.item-active .item-desc .fa,#noteItemList .item-active:hover .item-desc .fa{color:#666!important}.item-active .item-title,#noteItemList .item-active:hover .item-title{color:#000}#leanoteNav{background-color:#fbfcf7;opacity:.3;right:-30px}.new-note-right{padding:0 2px}#loading{display:inline-block;width:20px;height:20px;content:url(../../images/loading-a-20-black.gif);margin-top:10px;visibility:hidden}#moreBtn{right:0!important}#toggleEditorMode{margin:0 10px!important}#upload{position:absolute;z-index:0;bottom:0;right:0;left:0;padding:0;background-color:#fff;text-align:center;display:none}#upload #drop{width:100%;height:100%;padding-top:100px}#drop.in{border:1px solid #000}#drop.hover{border:2px solid #000}#uploadMsg{position:absolute;top:3px;right:3px;bottom:10px;overflow:scroll;list-style:none}#searchNotebookForAddDropdownList{left:0}#searchNotebookForAdd{background:0 0} \ No newline at end of file +@font-face{font-family:'Open Sans';font-style:normal;font-weight:300;src:local('Open Sans Light'),local('OpenSans-Light'),url(../../fonts/open-sans2/DXI1ORHCpsQm3Vp6mXoaTXhCUOGz7vYGh680lGh-uXM.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;src:local('Open Sans'),local('OpenSans'),url(../../fonts/open-sans2/cJZKeOuBrn4kERxqtaUH3T8E0i7KZn-EPnyo3HZu7kw.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;src:local('Open Sans Bold'),local('OpenSans-Bold'),url(../../fonts/open-sans2/k3k702ZOKiLJc3WVjuplzHhCUOGz7vYGh680lGh-uXM.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:italic;font-weight:400;src:local('Open Sans Italic'),local('OpenSans-Italic'),url(../../fonts/open-sans2/xjAJXh38I15wypJXxuGMBobN6UDyHWBl620a-IRfuBk.woff) format('woff')}@font-face{font-family:leanoteregular;src:url(../../fonts/leanote/leanote-regular-webfont.eot);src:url(../../fonts/leanote/leanote-regular-webfont.eot?#iefix) format('embedded-opentype'),url(../../fonts/leanote/leanote-regular-webfont.woff) format('woff'),url(../../fonts/leanote/leanote-regular-webfont.ttf) format('truetype'),url(../../fonts/leanote/leanote-regular-webfont.svg#leanoteregular) format('svg');font-weight:400;font-style:normal}.btn{border-radius:2px}.alert{margin-bottom:10px}#logo{font-family:leanoteregular;font-size:36px}#logo:before{content:"a"}#switcher span{font-family:leanoteregular;border-radius:5px;display:inline-block;cursor:pointer;font-size:18px;height:34px;line-height:34px;margin-top:8px;padding:0 5px}#switcher span:before{content:"b"}.dropdown-menu{border-radius:3px;margin:0;border:1px solid #0fb264;box-shadow:rgba(0,0,0,.172549)0 6px 12px 0}.dropdown-menu li{list-style:none;padding-left:10px;width:100%;height:30px;line-height:30px}.dropdown-menu li>a{color:#000;display:block;padding-right:20px}.dropdown-menu>li>a{padding:3px 20px 3px 0}#notebookNavForNewNote li:hover{background:0 0}#noteList{position:absolute;bottom:0;top:0}.dropdown-submenu{position:relative}.dropdown-submenu>ul.dropdown-menu{top:0;left:100%;margin-left:-3px!important;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;padding-top:10px!important}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropdown-submenu:after{display:block;content:" ";position:absolute;right:0;top:10px;width:0;height:0;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;border-left-color:#666}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown-submenu.pull-left{float:none}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.open>.dropdown-menu,.dropdown-submenu:hover>.dropdown-menu{opacity:1;transform:scale(1,1);-webkit-transform:scale(1,1);-moz-transform:scale(1,1);-o-transform:scale(1,1)}.dropdown-menu{opacity:0;display:block;-webkit-transform:scale(0,0);-webkit-transform-origin:top;-webkit-animation-fill-mode:forwards;-webkit-transition:all .2s cubic-bezier(0.34,1.21,.4,1);-o-transform:scale(0,0);-o-transform-origin:top;-o-animation-fill-mode:forwards;-o-transition:all .2s cubic-bezier(0.34,1.21,.4,1);-moz-transform:scale(0,0);-moz-transform-origin:top;-moz-animation-fill-mode:forwards;-moz-transition:all .2s cubic-bezier(0.34,1.21,.4,1);transform:scale(0,0);transform-origin:top;animation-fill-mode:forwards;transition:all .2s cubic-bezier(0.34,1.21,.4,1)}.dropdown-list{width:530px;border-radius:3px}.dropdown-list ul{margin:0;padding:0}.dropdown-list ul li{float:left;width:120px;margin-left:10px;margin-bottom:10px;border:1px dashed #ccc}.new-note-right{padding:0 5px;padding-left:3px}#leanoteMsg{line-height:40px;margin-top:10px;margin-left:10px}#newNoteWrap{line-height:40px;margin-top:10px}#searchNotebookForAddDropdownList{left:-200px}#searchNotebookForAdd{line-height:normal;width:200px;margin:0 10px;margin-bottom:10px;height:30px;border-color:#ebeff2;box-shadow:none}#myNotebooks .folderBody{padding-top:3px}#searchNotebookForList{height:30px;width:90%;margin:3px auto;margin-top:0;border-color:#ebeff2;box-shadow:none}#noteItemList .item-setting,#noteItemList .item-blog{position:absolute;right:1px;font-size:10px;z-index:2;padding:3px;border-radius:5px;cursor:pointer;width:20px;text-align:center;opacity:.5;background-color:#464C5E}#noteItemList .item-setting .fa,#noteItemList .item-blog .fa{color:#fff!important}#noteItemList .item-setting:hover,#noteItemList .item-blog:hover{opacity:.8}#noteItemList .item-blog{top:1px}#noteItemList .item-setting{bottom:0;display:none}#noteItemList .item:hover .item-setting{display:block}.friend-header{position:relative}.friend-header .notebook-setting{display:none}.friend-header:hover .notebook-setting{display:block}.each-user{margin-bottom:5px;margin-left:5px;margin-right:5px;margin-top:3px;border:1px solid #eee;border-radius:3px}.notebook-setting{display:none;position:absolute;right:3px;top:0;bottom:0;line-height:30px}.notebook-setting:before{content:"\f013"}.ztree li a:hover .notebook-setting{display:block}#myTag .folderBody{padding:0 3px;padding-bottom:3px}#myTag .folderBody li{float:left;padding:3px;line-height:normal}#notebookList{border-top:1px solid rgba(255,255,255,.05)}.ztree{padding:0}#upload{position:absolute;z-index:0;bottom:0;right:0;left:0;padding:0;background-color:#fff;text-align:center;display:none}#upload #drop{width:100%;height:100%;padding-top:100px}#drop.in{border:1px solid #000}#drop.hover{border:2px solid #000}#uploadMsg{position:absolute;top:3px;right:3px;bottom:10px;overflow:scroll;list-style:none}#uploadAttach{position:relative;margin-top:5px}#dropAttach{text-align:center}#dropAttach input{display:none}#dropAttach.in{border:1px solid #000}#dropAttach.hover{border:2px solid #000}#attachUploadMsg{list-style-type:none;margin:0;padding:0;max-height:240px;overflow:scroll;z-index:3}#attachUploadMsg .alert{margin:0;padding:0 3px;margin-top:10px}#attachMenu{width:400px;padding:10px 5px}#attachList{margin:0;padding:0;max-height:450px;overflow-y:scroll}#attachList li{display:block;margin:0;padding:0 3px;border-radius:3px;border-bottom:1px dashed #eee;height:45px;line-height:45px}#attachList li div{float:left}#attachList li .attach-title{width:200px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}#attachList li .attach-process{float:right}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300;src:local('Open Sans Light'),local('OpenSans-Light'),url(../../fonts/open-sans2/DXI1ORHCpsQm3Vp6mXoaTXhCUOGz7vYGh680lGh-uXM.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;src:local('Open Sans'),local('OpenSans'),url(../../fonts/open-sans2/cJZKeOuBrn4kERxqtaUH3T8E0i7KZn-EPnyo3HZu7kw.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;src:local('Open Sans Bold'),local('OpenSans-Bold'),url(../../fonts/open-sans2/k3k702ZOKiLJc3WVjuplzHhCUOGz7vYGh680lGh-uXM.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:italic;font-weight:400;src:local('Open Sans Italic'),local('OpenSans-Italic'),url(../../fonts/open-sans2/xjAJXh38I15wypJXxuGMBobN6UDyHWBl620a-IRfuBk.woff) format('woff')}::selection{background:#000;color:#fff}::-moz-selection{background:#000;color:#fff}::-webkit-selection{background:#000;color:#fff}html,body{background-color:#fbfcf7}*,body{font-family:'Open Sans','Helvetica Neue',Arial,'Hiragino Sans GB','Microsoft YaHei','WenQuanYi Micro Hei',sans-serif;font-weight:300;font-size:16px}h1,h2,h3{font-family:'Open Sans','Helvetica Neue',Arial,'Hiragino Sans GB','Microsoft YaHei','WenQuanYi Micro Hei',sans-serif;font-weight:300!important}a{color:#000;cursor:pointer}a:hover{text-decoration:none!important;color:#000}a.raw{color:#428bca}a.raw:hover{color:#2a6496}#header{height:60px;background-color:#fbfcf7;color:#fff;border-bottom:1px solid #ebeff2;webkit-user-select:none;-webkit-app-region:drag}#header a{color:#ccc}#header li{color:#000}#header li a{color:#000}#searchWrap,#logo,#switcher,#leftNotebook,.noteSplit{display:none}#header ul{margin:0;padding:0;list-style:none}#header ul li.dropdown{display:inline-block;height:60px}#header ul>li>a.dropdown-toggle{display:block;padding:15px 5px 0 0;position:relative}#header span.icon{display:inline-block;font-size:28px;color:#999}.dropdown-menu{border-radius:0;margin:0;-webkit-box-shadow:none;box-shadow:none;border:1px solid #0fb264;overflow:visible}.dropdown-menu li{padding-left:10px;width:100%;height:30px;line-height:30px}.dropdown-menu>li>a{color:#000;display:inline-block;padding:3px}.dropdown-menu>li:hover,.dropdown-menu>li:focus{background-color:#ebeff2}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{background-color:#ebeff2}.ios7-a{display:inline-block;padding:0 10px 0 5px;height:40px;vertical-align:middle;line-height:38px;cursor:pointer}#page{overflow:auto;position:absolute;top:0;left:0;bottom:0;right:0}#pageInner{position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden}#mainContainer{position:absolute;top:0;left:0;right:0;bottom:0;overflow:auto;zoom:1}#search{border:#bababa 1px solid;background-color:#fff;white-space:nowrap;position:absolute;height:30px;left:3px;right:60px;margin-top:3px}#search label{display:none}#searchButton{border:0 none;width:16px;height:16px;overflow:hidden;cursor:pointer;position:absolute;right:3px;top:5px}#searchInput{border:0 none;overflow:hidden;position:absolute;right:20px;left:0;padding-left:10px;height:28px}#searchInput:focus{border:none;outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}#notesAndSort{background-color:#eee;border-bottom:1px solid #ebeff2}#noteItemList{position:absolute;left:0;right:0;bottom:0;top:0;width:100%;overflow-y:hidden;background-color:#f7f7f7;padding:0 5px}#noteItemList .item{position:relative;height:110px;overflow:hidden;cursor:pointer;padding:5px;border:1px solid #ebeff2;border-radius:3px;margin-top:5px;background-color:#fff}#noteItemList .item:hover,#noteItemList .contextmenu-hover{background-color:#ddd!important;color:#000}#noteItemList .item-thumb{padding-left:10px;width:100px;overflow:hidden;position:absolute;right:0;height:100px;background-color:#fff;margin-right:5px}.item-thumb img{width:100px}#noteItemList .item-desc{position:absolute;left:0;right:100px;margin-left:4px}#noteItemList .item-desc .fa{color:#666}#noteItemList .item-blog{position:absolute;right:1px;font-size:10px;z-index:2;top:1px;padding:3px;cursor:pointer;width:20px;text-align:center;opacity:.5;background-color:#464C5E}#noteItemList .item-blog .fa{color:#fff!important}#noteItemList .item-blog:hover{opacity:.8}.item-title{font-size:16px;height:22px;line-height:20px;overflow:hidden;margin-bottom:0;color:#000;border-bottom:dashed 1px #ebeff2}#editorTool{margin:0;padding:0;list-style:none}#editorTool li{display:inline-block}#noteTitle:focus{outline:0!important}#editor,#mdEditor{z-index:2;top:71px;bottom:0;right:0;left:0;padding:0;display:none}#mdEditor{z-index:1;background-color:#fff;bottom:10px}#mdEditor #md-section-helper,#mdEditor #wmd-input{font-size:14px;line-height:22px}#editorContent{position:absolute;top:30px;bottom:10px;right:0;left:0;overflow:auto}#editor .mce-ifr{border:none;overflow:hidden!important}#editor .mce-tinymce{border:none}#mceToolbar,#wmd-button-bar{position:relative;height:30px;overflow:hidden;background-color:#fbfcf7}.mce-btn-small button{padding:5px 5px!important;line-height:20px!important}.mce-btn{background-color:#fbfcf7!important}.mce-menubtn.mce-btn-small span{line-height:20px!important}.mce-btn span{font-family:'Open Sans','Helvetica Neue',Arial,'Hiragino Sans GB','Microsoft YaHei','WenQuanYi Micro Hei',sans-serif!important}.mce-primary button,.mce-primary button i{text-shadow:none}.mce-primary{background-color:#47a447!important;border-color:#398439!important}.mce-menu-item:hover,.mce-menu-item.mce-selected,.mce-menu-item:focus{background-color:#ebeff2}.mce-menu-item:hover span,.mce-menu-item.mce-selected span,.mce-menu-item:focus span{color:#000!important}.mce-menu-item-normal.mce-active{background-color:#ebeff2}.tool-split{display:inline-block;line-height:25px;color:#ddd}#tool{display:none;border-bottom:1px solid #ddd}#tag{height:40px;line-height:38px}#tag .dropdown{line-height:30px}#addTagInput{line-height:25px;display:none;padding:0;border:none;background-color:#fbfcf7}#addTagInput:focus{outline:0}.label-default{background-color:#464C5E}.label-red{background-color:#d9534f}.label-yellow{background-color:#f0ad4e}.label-blue{background-color:#428bca}.label-green{background-color:#5cb85c}.label{border-radius:0;font-weight:400}.label i{width:10px;cursor:pointer;font-style:normal;display:inline-block;padding-left:3px;opacity:0}.label i:hover{opacity:1}#leanoteNav{position:absolute;right:5px;border:1px solid #ccc;border-radius:3px;background-color:#fff;opacity:.5;z-index:11;margin-right:2px}#leanoteNav h1{margin:0;font-size:18px;padding:3px;cursor:pointer}#leanoteNav i{padding:3px}#leanoteNav span{display:none}#leanoteNav #leanoteNavContent{display:none;overflow:auto}#leanoteNav.unfolder{min-width:200px;max-width:300px;opacity:.8}#leanoteNav.unfolder h1{border-bottom:1px dashed #ebeff2}#leanoteNav.unfolder span{display:inline}#leanoteNav.unfolder #leanoteNavContent{display:block;min-height:30px}#leanoteNav ul{margin:0;padding-left:23px}#leanoteNav ul li{list-style-type:disc}#leanoteNav ul li a:hover{color:#0fb264}#leanoteNav ul .nav-h2{margin-left:20px}#leanoteNav ul .nav-h3{margin-left:30px}#leanoteNav ul .nav-h4{margin-left:40px}#leanoteNav ul .nav-h5{margin-left:50px}.scrollTo-a{cursor:pointer!important}#noteRead{position:absolute;left:0;right:0;top:0;bottom:0;display:none;z-index:100;padding-left:5px;background-color:#fff}#noteReadContainer{position:relative;width:100%;height:100%}#noteReadTop{position:absolute;height:60px;left:0;right:0;border-bottom:1px solid #ebeff2}#noteReadTitle{margin:3px 0}#noteReadContent{position:absolute;top:60px;bottom:0;right:0;left:0;overflow:auto;padding:3px}.fa-calendar{color:#666}.dropdown-menu .fa{width:15px}.dropdown-menu span,.dropdown-menu a,.dropdown-menu li{cursor:default}#topNav a{display:inline-block;line-height:60px}.tab-pane{padding:5px 0 0}.alert{margin-bottom:10px}.btn{border-radius:0!important}#notebookNavForNewNote li,#notebookNavForNewSharedNote>li{padding-left:0;border-bottom:1px solid #ebeff2}#notebookNavForNewNote>li:hover,#notebookNavForNewNote>li:focus,#notebookNavForNewSharedNote>li:hover,#notebookNavForNewSharedNote>li:focus{background:0 0}.new-note-left{padding:0 5px;width:95px;overflow:hidden;white-space:nowrap;border-right:1px dashed #ebeff2}.new-note-left:hover{background-color:#ebeff2}.new-note-right{padding:0 5px}.new-note-right:hover{background-color:#ebeff2}#historyList table{width:100%}#historyList .btns{border-top:1px dashed #eee;padding:5px 0}#left-column{width:100%!important}#editorMask{position:absolute;top:0;bottom:0;right:0;left:0;background-color:#fff;z-index:-10;padding-top:50px;text-align:center}#editorMask .fa,#editorMask a{font-size:24px}#editorMask a{display:inline-block;border-radius:3px;border:1px solid #ebeff2;padding:10px}#editorMask a:hover{background-color:#65bd77;color:#fff}html,body{background-color:#fbfcf7;overflow:hidden}#right-column,#newNoteMarkdownBtn,#newShareNoteMarkdownBtn,.new-split,#editorMask,#sortType,#myProfile,#demoRegister{display:none}#mainMask{position:absolute;left:0;right:0;bottom:0;top:0;background-color:#fbfcf7;text-align:center;padding-top:100px;z-index:1000}#header{position:absolute;left:0;right:0;z-index:333;color:#ccc}#header #leanoteMsg{position:absolute;width:700px;left:0;right:0;text-align:right;line-height:60px;margin:auto}#newNoteWrap{line-height:40px;margin-top:10px;margin-left:10px}#newNoteWrap,#topNav{opacity:0}#newNoteWrap:hover,#topNav:hover{opacity:1}#mainContainer{overflow-y:hidden}#newMyNote,#newSharedNote{position:relative}#newMyNote .dropdown,#newSharedNote .dropdown{position:static}.dropdown-menu{border:1px solid #ccc;background-color:#fbfcf7}#note{position:absolute;width:700px;margin:auto;height:100%;left:0;right:0}#editor,#mdEditor{position:absolute;top:60px;z-index:2}#wmd-input{border:none;background-color:#fbfcf7;font-size:16px!important}#md-section-helper{display:none}#mdEditorPreview{top:43px!important}#mceToolbar,#wmd-button-bar{height:40px;padding:5px 0}.editorBg{height:3px;background:url(/images/editor/editor-shadow.png) no-repeat center bottom #f9faf4}.mce-btn-small i,.mce-menubtn.mce-btn-small span,.wmd-button>span{opacity:.85}.mce-ico{font-size:18px;line-height:18px;width:18px;height:18px}.tool-split{line-height:30px}.mce-menubtn.mce-fixed-width.mce-btn-small span{width:80px}.mce-menubtn.mce-btn-small span{font-size:16px}#editorContent_ifr html{border:none!important}#noteTop{position:absolute;z-index:999;left:0;right:150px;padding:15px 0;height:59px}#noteTitleDiv{height:30px}#noteTitle{height:100%;padding:0 3px;width:100%;border:none;background-color:#fbfcf7}#noteList{position:fixed;top:0;bottom:0;left:10px;margin-top:60px;width:200px;z-index:0;opacity:.8;overflow-x:hidden;overflow-y:hidden}#noteList #notesAndSort{display:none}#noteList #noteItemListWrap{display:none}#notesAndSort{background:0 0}#noteItemList{background:0 0}#noteItemList .item{background:0 0}.item-active,#noteItemList .item-active:hover{background-color:#F5F8EA!important;color:#000}.item-active .item-desc .fa,#noteItemList .item-active:hover .item-desc .fa{color:#666!important}.item-active .item-title,#noteItemList .item-active:hover .item-title{color:#000}#leanoteNav{background-color:#fbfcf7;opacity:.3;right:-30px}.new-note-right{padding:0 2px}#loading{display:inline-block;width:20px;height:20px;content:url(../../images/loading-a-20-black.gif);margin-top:10px;visibility:hidden}#moreBtn{right:0!important}#toggleEditorMode{margin:0 10px!important}#upload{position:absolute;z-index:0;bottom:0;right:0;left:0;padding:0;background-color:#fff;text-align:center;display:none}#upload #drop{width:100%;height:100%;padding-top:100px}#drop.in{border:1px solid #000}#drop.hover{border:2px solid #000}#uploadMsg{position:absolute;top:3px;right:3px;bottom:10px;overflow:scroll;list-style:none}#searchNotebookForAddDropdownList{left:0}#searchNotebookForAdd{background:0 0} \ No newline at end of file diff --git a/public/css/theme/writting.css b/public/css/theme/writting.css index 7d13858..0bc797d 100644 --- a/public/css/theme/writting.css +++ b/public/css/theme/writting.css @@ -1 +1 @@ -@font-face{font-family:'Open Sans';font-style:normal;font-weight:300;src:local('Open Sans Light'),local('OpenSans-Light'),url(../../fonts/open-sans2/DXI1ORHCpsQm3Vp6mXoaTXhCUOGz7vYGh680lGh-uXM.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;src:local('Open Sans'),local('OpenSans'),url(../../fonts/open-sans2/cJZKeOuBrn4kERxqtaUH3T8E0i7KZn-EPnyo3HZu7kw.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;src:local('Open Sans Bold'),local('OpenSans-Bold'),url(../../fonts/open-sans2/k3k702ZOKiLJc3WVjuplzHhCUOGz7vYGh680lGh-uXM.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:italic;font-weight:400;src:local('Open Sans Italic'),local('OpenSans-Italic'),url(../../fonts/open-sans2/xjAJXh38I15wypJXxuGMBobN6UDyHWBl620a-IRfuBk.woff) format('woff')}@font-face{font-family:leanoteregular;src:url(../../fonts/leanote/leanote-regular-webfont.eot);src:url(../../fonts/leanote/leanote-regular-webfont.eot?#iefix) format('embedded-opentype'),url(../../fonts/leanote/leanote-regular-webfont.woff) format('woff'),url(../../fonts/leanote/leanote-regular-webfont.ttf) format('truetype'),url(../../fonts/leanote/leanote-regular-webfont.svg#leanoteregular) format('svg');font-weight:400;font-style:normal}#logo{font-family:leanoteregular;font-size:36px}#logo:before{content:"a"}#switcher span{font-family:leanoteregular;border-radius:5px;display:inline-block;cursor:pointer;font-size:18px;height:34px;line-height:34px;margin-top:8px;padding:0 5px}#switcher span:before{content:"b"}.dropdown-menu{border-radius:3px;margin:0;border:1px solid #0fb264;box-shadow:rgba(0,0,0,.172549)0 6px 12px 0}.dropdown-menu li{list-style:none;padding-left:10px;width:100%;height:30px;line-height:30px}.dropdown-menu li>a{color:#000;display:block;padding-right:20px}.dropdown-menu>li>a{padding:3px 20px 3px 0}#notebookNavForNewNote li:hover{background:0 0}#noteList{position:absolute;bottom:0;top:0}.dropdown-submenu{position:relative}.dropdown-submenu>ul.dropdown-menu{top:0;left:100%;margin-left:-3px!important;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;padding-top:10px!important}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropdown-submenu:after{display:block;content:" ";position:absolute;right:0;top:10px;width:0;height:0;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;border-left-color:#666}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown-submenu.pull-left{float:none}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.open>.dropdown-menu,.dropdown-submenu:hover>.dropdown-menu{opacity:1;transform:scale(1,1);-webkit-transform:scale(1,1);-moz-transform:scale(1,1);-o-transform:scale(1,1)}.dropdown-menu{opacity:0;display:block;-webkit-transform:scale(0,0);-webkit-transform-origin:top;-webkit-animation-fill-mode:forwards;-webkit-transition:all .2s cubic-bezier(0.34,1.21,.4,1);-o-transform:scale(0,0);-o-transform-origin:top;-o-animation-fill-mode:forwards;-o-transition:all .2s cubic-bezier(0.34,1.21,.4,1);-moz-transform:scale(0,0);-moz-transform-origin:top;-moz-animation-fill-mode:forwards;-moz-transition:all .2s cubic-bezier(0.34,1.21,.4,1);transform:scale(0,0);transform-origin:top;animation-fill-mode:forwards;transition:all .2s cubic-bezier(0.34,1.21,.4,1)}.dropdown-list{width:530px;border-radius:3px}.dropdown-list ul{margin:0;padding:0}.dropdown-list ul li{float:left;width:120px;margin-left:10px;margin-bottom:10px;border:1px dashed #ccc}.new-note-right{padding:0 5px;padding-left:3px}#leanoteMsg{line-height:40px;margin-top:10px;margin-left:10px}#newNoteWrap{line-height:40px;margin-top:10px}#searchNotebookForAddDropdownList{left:-200px}#searchNotebookForAdd{line-height:normal;width:200px;margin:0 10px;margin-bottom:10px;height:30px;border-color:#ebeff2;box-shadow:none}#myNotebooks .folderBody{padding-top:3px}#searchNotebookForList{height:30px;width:90%;margin:3px auto;margin-top:0;border-color:#ebeff2;box-shadow:none}#noteItemList .item-setting,#noteItemList .item-blog{position:absolute;right:1px;font-size:10px;z-index:2;padding:3px;border-radius:5px;cursor:pointer;width:20px;text-align:center;opacity:.5;background-color:#464C5E}#noteItemList .item-setting .fa,#noteItemList .item-blog .fa{color:#fff!important}#noteItemList .item-setting:hover,#noteItemList .item-blog:hover{opacity:.8}#noteItemList .item-blog{top:1px}#noteItemList .item-setting{bottom:0;display:none}#noteItemList .item:hover .item-setting{display:block}.friend-header{position:relative}.friend-header .notebook-setting{display:none}.friend-header:hover .notebook-setting{display:block}.each-user{margin-bottom:5px;margin-left:5px;margin-right:5px;margin-top:3px;border:1px solid #eee;border-radius:3px}.notebook-setting{display:none;position:absolute;right:3px;top:0;bottom:0;line-height:30px}.notebook-setting:before{content:"\f013"}.ztree li a:hover .notebook-setting{display:block}#myTag .folderBody{padding:0 3px;padding-bottom:3px}#myTag .folderBody li{float:left;padding:3px;line-height:normal}#notebookList{border-top:1px solid rgba(255,255,255,.05)}.ztree{padding:0}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300;src:local('Open Sans Light'),local('OpenSans-Light'),url(../../fonts/open-sans2/DXI1ORHCpsQm3Vp6mXoaTXhCUOGz7vYGh680lGh-uXM.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;src:local('Open Sans'),local('OpenSans'),url(../../fonts/open-sans2/cJZKeOuBrn4kERxqtaUH3T8E0i7KZn-EPnyo3HZu7kw.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;src:local('Open Sans Bold'),local('OpenSans-Bold'),url(../../fonts/open-sans2/k3k702ZOKiLJc3WVjuplzHhCUOGz7vYGh680lGh-uXM.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:italic;font-weight:400;src:local('Open Sans Italic'),local('OpenSans-Italic'),url(../../fonts/open-sans2/xjAJXh38I15wypJXxuGMBobN6UDyHWBl620a-IRfuBk.woff) format('woff')}::selection{background:#000;color:#fff}::-moz-selection{background:#000;color:#fff}::-webkit-selection{background:#000;color:#fff}html,body{background-color:#fbfcf7}*,body{font-family:'Open Sans','Helvetica Neue',Arial,'Hiragino Sans GB','Microsoft YaHei','WenQuanYi Micro Hei',sans-serif;font-weight:300;font-size:16px}h1,h2,h3{font-family:'Open Sans','Helvetica Neue',Arial,'Hiragino Sans GB','Microsoft YaHei','WenQuanYi Micro Hei',sans-serif;font-weight:300!important}a{color:#000;cursor:pointer}a:hover{text-decoration:none!important;color:#000}a.raw{color:#428bca}a.raw:hover{color:#2a6496}#header{height:60px;background-color:#fbfcf7;color:#fff;border-bottom:1px solid #ebeff2;webkit-user-select:none;-webkit-app-region:drag}#header a{color:#ccc}#header li{color:#000}#header li a{color:#000}#searchWrap,#logo,#switcher,#leftNotebook,.noteSplit{display:none}#header ul{margin:0;padding:0;list-style:none}#header ul li.dropdown{display:inline-block;height:60px}#header ul>li>a.dropdown-toggle{display:block;padding:15px 5px 0 0;position:relative}#header span.icon{display:inline-block;font-size:28px;color:#999}.dropdown-menu{border-radius:0;margin:0;-webkit-box-shadow:none;box-shadow:none;border:1px solid #0fb264;overflow-x:hidden;overflow-y:auto}.dropdown-menu li{padding-left:10px;width:100%;height:30px;line-height:30px}.dropdown-menu>li>a{color:#000;display:inline-block;padding:3px}.dropdown-menu>li:hover,.dropdown-menu>li:focus{background-color:#ebeff2}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{background-color:#ebeff2}.ios7-a{display:inline-block;padding:0 10px 0 5px;height:40px;vertical-align:middle;line-height:38px;cursor:pointer}#page{overflow:auto;position:absolute;top:0;left:0;bottom:0;right:0}#pageInner{position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden}#mainContainer{position:absolute;top:0;left:0;right:0;bottom:0;overflow:auto;zoom:1}#search{border:#bababa 1px solid;background-color:#fff;white-space:nowrap;position:absolute;height:30px;left:3px;right:60px;margin-top:3px}#search label{display:none}#searchButton{border:0 none;width:16px;height:16px;overflow:hidden;cursor:pointer;position:absolute;right:3px;top:5px}#searchInput{border:0 none;overflow:hidden;position:absolute;right:20px;left:0;padding-left:10px;height:28px}#searchInput:focus{border:none;outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}#notesAndSort{background-color:#eee;border-bottom:1px solid #ebeff2}#noteItemList{position:absolute;left:0;right:0;bottom:0;top:0;width:100%;overflow-y:hidden;background-color:#f7f7f7;padding:0 5px}#noteItemList .item{position:relative;height:110px;overflow:hidden;cursor:pointer;padding:5px;border:1px solid #ebeff2;border-radius:3px;margin-top:5px;background-color:#fff}#noteItemList .item:hover,#noteItemList .contextmenu-hover{background-color:#ddd!important;color:#000}#noteItemList .item-thumb{padding-left:10px;width:100px;overflow:hidden;position:absolute;right:0;height:100px;background-color:#fff;margin-right:5px}.item-thumb img{width:100px}#noteItemList .item-desc{position:absolute;left:0;right:100px;margin-left:4px}#noteItemList .item-desc .fa{color:#666}#noteItemList .item-blog{position:absolute;right:1px;font-size:10px;z-index:2;top:1px;padding:3px;cursor:pointer;width:20px;text-align:center;opacity:.5;background-color:#464C5E}#noteItemList .item-blog .fa{color:#fff!important}#noteItemList .item-blog:hover{opacity:.8}.item-title{font-size:16px;height:22px;line-height:20px;overflow:hidden;margin-bottom:0;color:#000;border-bottom:dashed 1px #ebeff2}#editorTool{margin:0;padding:0;list-style:none}#editorTool li{display:inline-block}#noteTitle:focus{outline:0!important}#editor,#mdEditor{z-index:2;top:71px;bottom:0;right:0;left:0;padding:0;display:none}#mdEditor{z-index:1;background-color:#fff;bottom:10px}#mdEditor #md-section-helper,#mdEditor #wmd-input{font-size:14px;line-height:22px}#editorContent{position:absolute;top:30px;bottom:10px;right:0;left:0;overflow:auto}#editor .mce-ifr{border:none;overflow:hidden!important}#editor .mce-tinymce{border:none}#mceToolbar,#wmd-button-bar{position:relative;height:30px;overflow:hidden;background-color:#fbfcf7}.mce-btn-small button{padding:5px 5px!important;line-height:20px!important}.mce-btn{background-color:#fbfcf7!important}.mce-menubtn.mce-btn-small span{line-height:20px!important}.mce-btn span{font-family:'Open Sans','Helvetica Neue',Arial,'Hiragino Sans GB','Microsoft YaHei','WenQuanYi Micro Hei',sans-serif!important}.mce-primary button,.mce-primary button i{text-shadow:none}.mce-primary{background-color:#47a447!important;border-color:#398439!important}.mce-menu-item:hover,.mce-menu-item.mce-selected,.mce-menu-item:focus{background-color:#ebeff2}.mce-menu-item:hover span,.mce-menu-item.mce-selected span,.mce-menu-item:focus span{color:#000!important}.mce-menu-item-normal.mce-active{background-color:#ebeff2}.tool-split{display:inline-block;line-height:25px;color:#ddd}#tool{display:none;border-bottom:1px solid #ddd}#tag{height:40px;line-height:38px}#tag .dropdown{line-height:30px}#addTagInput{line-height:25px;display:none;padding:0;border:none;background-color:#fbfcf7}#addTagInput:focus{outline:0}.label-default{background-color:#464C5E}.label-red{background-color:#d9534f}.label-yellow{background-color:#f0ad4e}.label-blue{background-color:#428bca}.label-green{background-color:#5cb85c}.label{border-radius:0;font-weight:400}.label i{width:10px;cursor:pointer;font-style:normal;display:inline-block;padding-left:3px;opacity:0}.label i:hover{opacity:1}#leanoteNav{position:absolute;right:5px;border:1px solid #ccc;border-radius:3px;background-color:#fff;opacity:.5;z-index:11;margin-right:2px}#leanoteNav h1{margin:0;font-size:18px;padding:3px;cursor:pointer}#leanoteNav i{padding:3px}#leanoteNav span{display:none}#leanoteNav #leanoteNavContent{display:none;overflow:auto}#leanoteNav.unfolder{min-width:200px;max-width:300px;opacity:.8}#leanoteNav.unfolder h1{border-bottom:1px dashed #ebeff2}#leanoteNav.unfolder span{display:inline}#leanoteNav.unfolder #leanoteNavContent{display:block;min-height:30px}#leanoteNav ul{margin:0;padding-left:23px}#leanoteNav ul li{list-style-type:disc}#leanoteNav ul li a:hover{color:#0fb264}#leanoteNav ul .nav-h2{margin-left:20px}#leanoteNav ul .nav-h3{margin-left:30px}#leanoteNav ul .nav-h4{margin-left:40px}#leanoteNav ul .nav-h5{margin-left:50px}.scrollTo-a{cursor:pointer!important}#noteRead{position:absolute;left:0;right:0;top:0;bottom:0;display:none;z-index:100;padding-left:5px;background-color:#fff}#noteReadContainer{position:relative;width:100%;height:100%}#noteReadTop{position:absolute;height:60px;left:0;right:0;border-bottom:1px solid #ebeff2}#noteReadTitle{margin:3px 0}#noteReadContent{position:absolute;top:60px;bottom:0;right:0;left:0;overflow:auto;padding:3px}.fa-calendar{color:#666}.dropdown-menu .fa{width:15px}.dropdown-menu span,.dropdown-menu a,.dropdown-menu li{cursor:default}#topNav a{display:inline-block;line-height:60px}.tab-pane{padding:5px 0 0}.alert{margin-bottom:10px}.btn{border-radius:0!important}#notebookNavForNewNote li,#notebookNavForNewSharedNote>li{padding-left:0;border-bottom:1px solid #ebeff2}#notebookNavForNewNote>li:hover,#notebookNavForNewNote>li:focus,#notebookNavForNewSharedNote>li:hover,#notebookNavForNewSharedNote>li:focus{background:0 0}.new-note-left{padding:0 5px;width:95px;overflow:hidden;white-space:nowrap;border-right:1px dashed #ebeff2}.new-note-left:hover{background-color:#ebeff2}.new-note-right{padding:0 5px}.new-note-right:hover{background-color:#ebeff2}#historyList table{width:100%}#historyList .btns{border-top:1px dashed #eee;padding:5px 0}#left-column{width:100%!important}#editorMask{position:absolute;top:0;bottom:0;right:0;left:0;background-color:#fff;z-index:-10;padding-top:50px;text-align:center}#editorMask .fa,#editorMask a{font-size:24px}#editorMask a{display:inline-block;border-radius:3px;border:1px solid #ebeff2;padding:10px}#editorMask a:hover{background-color:#65bd77;color:#fff} \ No newline at end of file +@font-face{font-family:'Open Sans';font-style:normal;font-weight:300;src:local('Open Sans Light'),local('OpenSans-Light'),url(../../fonts/open-sans2/DXI1ORHCpsQm3Vp6mXoaTXhCUOGz7vYGh680lGh-uXM.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;src:local('Open Sans'),local('OpenSans'),url(../../fonts/open-sans2/cJZKeOuBrn4kERxqtaUH3T8E0i7KZn-EPnyo3HZu7kw.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;src:local('Open Sans Bold'),local('OpenSans-Bold'),url(../../fonts/open-sans2/k3k702ZOKiLJc3WVjuplzHhCUOGz7vYGh680lGh-uXM.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:italic;font-weight:400;src:local('Open Sans Italic'),local('OpenSans-Italic'),url(../../fonts/open-sans2/xjAJXh38I15wypJXxuGMBobN6UDyHWBl620a-IRfuBk.woff) format('woff')}@font-face{font-family:leanoteregular;src:url(../../fonts/leanote/leanote-regular-webfont.eot);src:url(../../fonts/leanote/leanote-regular-webfont.eot?#iefix) format('embedded-opentype'),url(../../fonts/leanote/leanote-regular-webfont.woff) format('woff'),url(../../fonts/leanote/leanote-regular-webfont.ttf) format('truetype'),url(../../fonts/leanote/leanote-regular-webfont.svg#leanoteregular) format('svg');font-weight:400;font-style:normal}.btn{border-radius:2px}.alert{margin-bottom:10px}#logo{font-family:leanoteregular;font-size:36px}#logo:before{content:"a"}#switcher span{font-family:leanoteregular;border-radius:5px;display:inline-block;cursor:pointer;font-size:18px;height:34px;line-height:34px;margin-top:8px;padding:0 5px}#switcher span:before{content:"b"}.dropdown-menu{border-radius:3px;margin:0;border:1px solid #0fb264;box-shadow:rgba(0,0,0,.172549)0 6px 12px 0}.dropdown-menu li{list-style:none;padding-left:10px;width:100%;height:30px;line-height:30px}.dropdown-menu li>a{color:#000;display:block;padding-right:20px}.dropdown-menu>li>a{padding:3px 20px 3px 0}#notebookNavForNewNote li:hover{background:0 0}#noteList{position:absolute;bottom:0;top:0}.dropdown-submenu{position:relative}.dropdown-submenu>ul.dropdown-menu{top:0;left:100%;margin-left:-3px!important;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;padding-top:10px!important}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropdown-submenu:after{display:block;content:" ";position:absolute;right:0;top:10px;width:0;height:0;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;border-left-color:#666}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown-submenu.pull-left{float:none}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.open>.dropdown-menu,.dropdown-submenu:hover>.dropdown-menu{opacity:1;transform:scale(1,1);-webkit-transform:scale(1,1);-moz-transform:scale(1,1);-o-transform:scale(1,1)}.dropdown-menu{opacity:0;display:block;-webkit-transform:scale(0,0);-webkit-transform-origin:top;-webkit-animation-fill-mode:forwards;-webkit-transition:all .2s cubic-bezier(0.34,1.21,.4,1);-o-transform:scale(0,0);-o-transform-origin:top;-o-animation-fill-mode:forwards;-o-transition:all .2s cubic-bezier(0.34,1.21,.4,1);-moz-transform:scale(0,0);-moz-transform-origin:top;-moz-animation-fill-mode:forwards;-moz-transition:all .2s cubic-bezier(0.34,1.21,.4,1);transform:scale(0,0);transform-origin:top;animation-fill-mode:forwards;transition:all .2s cubic-bezier(0.34,1.21,.4,1)}.dropdown-list{width:530px;border-radius:3px}.dropdown-list ul{margin:0;padding:0}.dropdown-list ul li{float:left;width:120px;margin-left:10px;margin-bottom:10px;border:1px dashed #ccc}.new-note-right{padding:0 5px;padding-left:3px}#leanoteMsg{line-height:40px;margin-top:10px;margin-left:10px}#newNoteWrap{line-height:40px;margin-top:10px}#searchNotebookForAddDropdownList{left:-200px}#searchNotebookForAdd{line-height:normal;width:200px;margin:0 10px;margin-bottom:10px;height:30px;border-color:#ebeff2;box-shadow:none}#myNotebooks .folderBody{padding-top:3px}#searchNotebookForList{height:30px;width:90%;margin:3px auto;margin-top:0;border-color:#ebeff2;box-shadow:none}#noteItemList .item-setting,#noteItemList .item-blog{position:absolute;right:1px;font-size:10px;z-index:2;padding:3px;border-radius:5px;cursor:pointer;width:20px;text-align:center;opacity:.5;background-color:#464C5E}#noteItemList .item-setting .fa,#noteItemList .item-blog .fa{color:#fff!important}#noteItemList .item-setting:hover,#noteItemList .item-blog:hover{opacity:.8}#noteItemList .item-blog{top:1px}#noteItemList .item-setting{bottom:0;display:none}#noteItemList .item:hover .item-setting{display:block}.friend-header{position:relative}.friend-header .notebook-setting{display:none}.friend-header:hover .notebook-setting{display:block}.each-user{margin-bottom:5px;margin-left:5px;margin-right:5px;margin-top:3px;border:1px solid #eee;border-radius:3px}.notebook-setting{display:none;position:absolute;right:3px;top:0;bottom:0;line-height:30px}.notebook-setting:before{content:"\f013"}.ztree li a:hover .notebook-setting{display:block}#myTag .folderBody{padding:0 3px;padding-bottom:3px}#myTag .folderBody li{float:left;padding:3px;line-height:normal}#notebookList{border-top:1px solid rgba(255,255,255,.05)}.ztree{padding:0}#upload{position:absolute;z-index:0;bottom:0;right:0;left:0;padding:0;background-color:#fff;text-align:center;display:none}#upload #drop{width:100%;height:100%;padding-top:100px}#drop.in{border:1px solid #000}#drop.hover{border:2px solid #000}#uploadMsg{position:absolute;top:3px;right:3px;bottom:10px;overflow:scroll;list-style:none}#uploadAttach{position:relative;margin-top:5px}#dropAttach{text-align:center}#dropAttach input{display:none}#dropAttach.in{border:1px solid #000}#dropAttach.hover{border:2px solid #000}#attachUploadMsg{list-style-type:none;margin:0;padding:0;max-height:240px;overflow:scroll;z-index:3}#attachUploadMsg .alert{margin:0;padding:0 3px;margin-top:10px}#attachMenu{width:400px;padding:10px 5px}#attachList{margin:0;padding:0;max-height:450px;overflow-y:scroll}#attachList li{display:block;margin:0;padding:0 3px;border-radius:3px;border-bottom:1px dashed #eee;height:45px;line-height:45px}#attachList li div{float:left}#attachList li .attach-title{width:200px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}#attachList li .attach-process{float:right}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300;src:local('Open Sans Light'),local('OpenSans-Light'),url(../../fonts/open-sans2/DXI1ORHCpsQm3Vp6mXoaTXhCUOGz7vYGh680lGh-uXM.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;src:local('Open Sans'),local('OpenSans'),url(../../fonts/open-sans2/cJZKeOuBrn4kERxqtaUH3T8E0i7KZn-EPnyo3HZu7kw.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;src:local('Open Sans Bold'),local('OpenSans-Bold'),url(../../fonts/open-sans2/k3k702ZOKiLJc3WVjuplzHhCUOGz7vYGh680lGh-uXM.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:italic;font-weight:400;src:local('Open Sans Italic'),local('OpenSans-Italic'),url(../../fonts/open-sans2/xjAJXh38I15wypJXxuGMBobN6UDyHWBl620a-IRfuBk.woff) format('woff')}::selection{background:#000;color:#fff}::-moz-selection{background:#000;color:#fff}::-webkit-selection{background:#000;color:#fff}html,body{background-color:#fbfcf7}*,body{font-family:'Open Sans','Helvetica Neue',Arial,'Hiragino Sans GB','Microsoft YaHei','WenQuanYi Micro Hei',sans-serif;font-weight:300;font-size:16px}h1,h2,h3{font-family:'Open Sans','Helvetica Neue',Arial,'Hiragino Sans GB','Microsoft YaHei','WenQuanYi Micro Hei',sans-serif;font-weight:300!important}a{color:#000;cursor:pointer}a:hover{text-decoration:none!important;color:#000}a.raw{color:#428bca}a.raw:hover{color:#2a6496}#header{height:60px;background-color:#fbfcf7;color:#fff;border-bottom:1px solid #ebeff2;webkit-user-select:none;-webkit-app-region:drag}#header a{color:#ccc}#header li{color:#000}#header li a{color:#000}#searchWrap,#logo,#switcher,#leftNotebook,.noteSplit{display:none}#header ul{margin:0;padding:0;list-style:none}#header ul li.dropdown{display:inline-block;height:60px}#header ul>li>a.dropdown-toggle{display:block;padding:15px 5px 0 0;position:relative}#header span.icon{display:inline-block;font-size:28px;color:#999}.dropdown-menu{border-radius:0;margin:0;-webkit-box-shadow:none;box-shadow:none;border:1px solid #0fb264;overflow-x:hidden;overflow-y:auto}.dropdown-menu li{padding-left:10px;width:100%;height:30px;line-height:30px}.dropdown-menu>li>a{color:#000;display:inline-block;padding:3px}.dropdown-menu>li:hover,.dropdown-menu>li:focus{background-color:#ebeff2}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{background-color:#ebeff2}.ios7-a{display:inline-block;padding:0 10px 0 5px;height:40px;vertical-align:middle;line-height:38px;cursor:pointer}#page{overflow:auto;position:absolute;top:0;left:0;bottom:0;right:0}#pageInner{position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden}#mainContainer{position:absolute;top:0;left:0;right:0;bottom:0;overflow:auto;zoom:1}#search{border:#bababa 1px solid;background-color:#fff;white-space:nowrap;position:absolute;height:30px;left:3px;right:60px;margin-top:3px}#search label{display:none}#searchButton{border:0 none;width:16px;height:16px;overflow:hidden;cursor:pointer;position:absolute;right:3px;top:5px}#searchInput{border:0 none;overflow:hidden;position:absolute;right:20px;left:0;padding-left:10px;height:28px}#searchInput:focus{border:none;outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}#notesAndSort{background-color:#eee;border-bottom:1px solid #ebeff2}#noteItemList{position:absolute;left:0;right:0;bottom:0;top:0;width:100%;overflow-y:hidden;background-color:#f7f7f7;padding:0 5px}#noteItemList .item{position:relative;height:110px;overflow:hidden;cursor:pointer;padding:5px;border:1px solid #ebeff2;border-radius:3px;margin-top:5px;background-color:#fff}#noteItemList .item:hover,#noteItemList .contextmenu-hover{background-color:#ddd!important;color:#000}#noteItemList .item-thumb{padding-left:10px;width:100px;overflow:hidden;position:absolute;right:0;height:100px;background-color:#fff;margin-right:5px}.item-thumb img{width:100px}#noteItemList .item-desc{position:absolute;left:0;right:100px;margin-left:4px}#noteItemList .item-desc .fa{color:#666}#noteItemList .item-blog{position:absolute;right:1px;font-size:10px;z-index:2;top:1px;padding:3px;cursor:pointer;width:20px;text-align:center;opacity:.5;background-color:#464C5E}#noteItemList .item-blog .fa{color:#fff!important}#noteItemList .item-blog:hover{opacity:.8}.item-title{font-size:16px;height:22px;line-height:20px;overflow:hidden;margin-bottom:0;color:#000;border-bottom:dashed 1px #ebeff2}#editorTool{margin:0;padding:0;list-style:none}#editorTool li{display:inline-block}#noteTitle:focus{outline:0!important}#editor,#mdEditor{z-index:2;top:71px;bottom:0;right:0;left:0;padding:0;display:none}#mdEditor{z-index:1;background-color:#fff;bottom:10px}#mdEditor #md-section-helper,#mdEditor #wmd-input{font-size:14px;line-height:22px}#editorContent{position:absolute;top:30px;bottom:10px;right:0;left:0;overflow:auto}#editor .mce-ifr{border:none;overflow:hidden!important}#editor .mce-tinymce{border:none}#mceToolbar,#wmd-button-bar{position:relative;height:30px;overflow:hidden;background-color:#fbfcf7}.mce-btn-small button{padding:5px 5px!important;line-height:20px!important}.mce-btn{background-color:#fbfcf7!important}.mce-menubtn.mce-btn-small span{line-height:20px!important}.mce-btn span{font-family:'Open Sans','Helvetica Neue',Arial,'Hiragino Sans GB','Microsoft YaHei','WenQuanYi Micro Hei',sans-serif!important}.mce-primary button,.mce-primary button i{text-shadow:none}.mce-primary{background-color:#47a447!important;border-color:#398439!important}.mce-menu-item:hover,.mce-menu-item.mce-selected,.mce-menu-item:focus{background-color:#ebeff2}.mce-menu-item:hover span,.mce-menu-item.mce-selected span,.mce-menu-item:focus span{color:#000!important}.mce-menu-item-normal.mce-active{background-color:#ebeff2}.tool-split{display:inline-block;line-height:25px;color:#ddd}#tool{display:none;border-bottom:1px solid #ddd}#tag{height:40px;line-height:38px}#tag .dropdown{line-height:30px}#addTagInput{line-height:25px;display:none;padding:0;border:none;background-color:#fbfcf7}#addTagInput:focus{outline:0}.label-default{background-color:#464C5E}.label-red{background-color:#d9534f}.label-yellow{background-color:#f0ad4e}.label-blue{background-color:#428bca}.label-green{background-color:#5cb85c}.label{border-radius:0;font-weight:400}.label i{width:10px;cursor:pointer;font-style:normal;display:inline-block;padding-left:3px;opacity:0}.label i:hover{opacity:1}#leanoteNav{position:absolute;right:5px;border:1px solid #ccc;border-radius:3px;background-color:#fff;opacity:.5;z-index:11;margin-right:2px}#leanoteNav h1{margin:0;font-size:18px;padding:3px;cursor:pointer}#leanoteNav i{padding:3px}#leanoteNav span{display:none}#leanoteNav #leanoteNavContent{display:none;overflow:auto}#leanoteNav.unfolder{min-width:200px;max-width:300px;opacity:.8}#leanoteNav.unfolder h1{border-bottom:1px dashed #ebeff2}#leanoteNav.unfolder span{display:inline}#leanoteNav.unfolder #leanoteNavContent{display:block;min-height:30px}#leanoteNav ul{margin:0;padding-left:23px}#leanoteNav ul li{list-style-type:disc}#leanoteNav ul li a:hover{color:#0fb264}#leanoteNav ul .nav-h2{margin-left:20px}#leanoteNav ul .nav-h3{margin-left:30px}#leanoteNav ul .nav-h4{margin-left:40px}#leanoteNav ul .nav-h5{margin-left:50px}.scrollTo-a{cursor:pointer!important}#noteRead{position:absolute;left:0;right:0;top:0;bottom:0;display:none;z-index:100;padding-left:5px;background-color:#fff}#noteReadContainer{position:relative;width:100%;height:100%}#noteReadTop{position:absolute;height:60px;left:0;right:0;border-bottom:1px solid #ebeff2}#noteReadTitle{margin:3px 0}#noteReadContent{position:absolute;top:60px;bottom:0;right:0;left:0;overflow:auto;padding:3px}.fa-calendar{color:#666}.dropdown-menu .fa{width:15px}.dropdown-menu span,.dropdown-menu a,.dropdown-menu li{cursor:default}#topNav a{display:inline-block;line-height:60px}.tab-pane{padding:5px 0 0}.alert{margin-bottom:10px}.btn{border-radius:0!important}#notebookNavForNewNote li,#notebookNavForNewSharedNote>li{padding-left:0;border-bottom:1px solid #ebeff2}#notebookNavForNewNote>li:hover,#notebookNavForNewNote>li:focus,#notebookNavForNewSharedNote>li:hover,#notebookNavForNewSharedNote>li:focus{background:0 0}.new-note-left{padding:0 5px;width:95px;overflow:hidden;white-space:nowrap;border-right:1px dashed #ebeff2}.new-note-left:hover{background-color:#ebeff2}.new-note-right{padding:0 5px}.new-note-right:hover{background-color:#ebeff2}#historyList table{width:100%}#historyList .btns{border-top:1px dashed #eee;padding:5px 0}#left-column{width:100%!important}#editorMask{position:absolute;top:0;bottom:0;right:0;left:0;background-color:#fff;z-index:-10;padding-top:50px;text-align:center}#editorMask .fa,#editorMask a{font-size:24px}#editorMask a{display:inline-block;border-radius:3px;border:1px solid #ebeff2;padding:10px}#editorMask a:hover{background-color:#65bd77;color:#fff} \ No newline at end of file diff --git a/public/js/app/attachment_upload.js b/public/js/app/attachment_upload.js new file mode 100644 index 0000000..5c44e92 --- /dev/null +++ b/public/js/app/attachment_upload.js @@ -0,0 +1,134 @@ +// upload attachment +// 依赖note +var urlPrefix = window.location.protocol + "//" + window.location.host; +define('attachment_upload', ['jquery.ui.widget', 'fileupload'], function(){ + // var editor = tinymce.activeEditor; + // var dom = editor.dom; + + var initUploader = function() { + var $msg = $('#attachUploadMsg'); + + $('#dropAttach .btn-choose-file').click(function() { + // trigger to show file select + $(this).parent().find('input').click(); + }); + + // Initialize the jQuery File Upload plugin + $('#uploadAttach').fileupload({ + dataType: 'json', + maxFileSize: 210000, + // This element will accept file drag/drop uploading + dropZone: $('#dropAttach'), + formData: function(form) { + return [{name: 'noteId', value: Note.curNoteId}] // 传递笔记本过去 + }, + // This function is called when a file is added to the queue; + // either via the browse button, or via drag/drop: + add: function(e, data) { + var note = Note.getCurNote(); + if(!note || note.IsNew) { + alert("This note hasn't saved, please save it firstly!") + return; + } + var tpl = $('<div class="alert alert-info"><img class="loader" src="/tinymce/plugins/leaui_image/public/images/ajax-loader.gif"> <a class="close" data-dismiss="alert">×</a></div>'); + + // Append the file name and file size + tpl.append(data.files[0].name + ' <small>[<i>' + formatFileSize(data.files[0].size) + '</i>]</small>'); + + // Add the HTML to the UL element + tpl.appendTo($msg); + data.context = $msg; + + // Automatically upload the file once it is added to the queue + var jqXHR; + setTimeout(function() { + jqXHR = data.submit(); + }, 0); + }, + + done: function(e, data) { + if (data.result.Ok == true) { + data.context.remove(); + Attach.addAttach(data.result.Item); + } else { + var re = data.result; + data.context.empty(); + var tpl = $('<div class="alert alert-danger"><a class="close" data-dismiss="alert">×</a></div>'); + tpl.append('<b>Error:</b> ' + data.files[0].name + ' <small>[<i>' + formatFileSize(data.files[0].size) + '</i>]</small> ' + data.result.Msg); + data.context.html(tpl); + setTimeout((function(tpl) { + return function() { + tpl.remove(); + } + })(tpl), 3000); + } + $("#uploadAttachMsg").scrollTop(1000); + }, + fail: function(e, data) { + data.context.empty(); + var tpl = $('<div class="alert alert-danger"><a class="close" data-dismiss="alert">×</a></div>'); + tpl.append('<b>Error:</b> ' + data.files[0].name + ' <small>[<i>' + formatFileSize(data.files[0].size) + '</i>]</small> ' + data.errorThrown); + data.context.html(tpl); + setTimeout((function(tpl) { + return function() { + tpl.remove(); + } + })(tpl), 3000); + + $("#uploadAttachMsg").scrollTop(1000); + } + }); + + // Prevent the default action when a file is dropped on the window + $(document).on('drop dragover', function(e) { + e.preventDefault(); + }); + + // Helper function that formats the file sizes + function formatFileSize(bytes) { + if (typeof bytes !== 'number') { + return ''; + } + if (bytes >= 1000000000) { + return (bytes / 1000000000).toFixed(2) + ' GB'; + } + if (bytes >= 1000000) { + return (bytes / 1000000).toFixed(2) + ' MB'; + } + return (bytes / 1000).toFixed(2) + ' KB'; + } + + // drag css + $(document).bind('dragover', function (e) { + var dropZone = $('#dropAttach'), + timeout = window.dropZoneTimeout; + if (!timeout) { + dropZone.addClass('in'); + showUpload(); + } else { + clearTimeout(timeout); + } + var found = false, + node = e.target; + do { + if (node === dropZone[0]) { + found = true; + break; + } + node = node.parentNode; + } while (node != null); + if (found) { + dropZone.addClass('hover'); + } else { + dropZone.removeClass('hover'); + } + window.dropZoneTimeout = setTimeout(function () { + window.dropZoneTimeout = null; + dropZone.removeClass('in hover'); + hideUpload(); + }, 100); + }); + } + + initUploader(); +}); \ No newline at end of file diff --git a/public/js/app/note.js b/public/js/app/note.js index c891305..2cd7c5e 100644 --- a/public/js/app/note.js +++ b/public/js/app/note.js @@ -79,6 +79,10 @@ Note.getCurNote = function() { } return self.cache[self.curNoteId]; } +Note.getNote = function(noteId) { + var self = this; + return self.cache[noteId]; +} // 每当有notebookId相应的note改变时都要重新清空之 // 并设置该notebookId有值 @@ -441,6 +445,8 @@ Note.changeNote = function(selectNoteId, isShare, needSaveChanged) { Note.renderNoteReadOnly(cacheNote); } + Attach.renderNoteAttachNum(selectNoteId, true); + function setContent(ret) { Note.setNoteCache(ret, false); // 把其它信息也带上 @@ -704,6 +710,9 @@ Note.newNote = function(notebookId, isShare, fromUserId, isMarkdown) { // 添加到缓存中 Note.addNoteCache(note); + // 清空附件数 + Attach.clearNoteAttachNum(); + // 是否是为共享的notebook添加笔记, 如果是, 则还要记录fromUserId var newItem = ""; @@ -1287,8 +1296,209 @@ Note.initContextmenu = function() { Note.contextmenu = $("#noteItemList .item-my").contextmenu(noteListMenu); } +// 附件 +// 笔记的附件需要ajax获取 +// 建一张附件表? attachId, noteId, 其它信息 +// note里有attach_nums字段记录个数 +// [ok] +var Attach = { + loadedNoteAttachs: {}, // noteId => [attch1Info, attach2Info...] // 按笔记 + attachsMap: {}, // attachId => attachInfo + init: function() { + var self = this; + // 显示attachs + $("#showAttach").click(function(){ + self.renderAttachs(Note.curNoteId); + }); + // 防止点击隐藏 + self.attachListO.click(function(e) { + e.stopPropagation(); + }); + // 删除 + self.attachListO.on("click", ".delete-attach", function(e) { + e.stopPropagation(); + var attachId = $(this).closest('li').data("id"); + var t = this; + if(confirm("Are you sure to delete it ?")) { + $(t).button("loading"); + ajaxPost("/attach/deleteAttach", {attachId: attachId}, function(re) { + $(t).button("reset"); + if(reIsOk(re)) { + self.deleteAttach(attachId); + } else { + alert(re.Msg); + } + }); + } + }); + // 下载 + self.attachListO.on("click", ".download-attach", function(e) { + e.stopPropagation(); + var attachId = $(this).closest('li').data("id"); + window.open("/attach/download?attachId=" + attachId); + // location.href = "/attach/download?attachId=" + attachId; + }); + // 下载全部 + self.downloadAllBtnO.click(function() { + window.open("/attach/downloadAll?noteId=" + Note.curNoteId); + // location.href = "/attach/downloadAll?noteId=" + Note.curNoteId; + }); + + // make link + self.attachListO.on("click", ".link-attach", function(e) { + e.stopPropagation(); + var attachId = $(this).closest('li').data("id"); + var attach = self.attachsMap[attachId]; + var src = "/attach/download?attachId=" + attachId; + + if(LEA.isMarkdownEditor() && MarkdownEditor) { + MarkdownEditor.insertLink(src, attach.Title); + } else { + tinymce.activeEditor.insertContent('<a target="_blank" href="' + src + '">' + attach.Title + '</a>'); + } + }); + + // make all link + self.linkAllBtnO.on("click",function(e) { + e.stopPropagation(); + var note = Note.getCurNote(); + if(!note) { + return; + } + var src = "/attach/downloadAll?noteId=" + Note.curNoteId + var title = note.Title ? note.Title + ".tar.gz" : "all.tar.gz"; + + if(LEA.isMarkdownEditor() && MarkdownEditor) { + MarkdownEditor.insertLink(src, title); + } else { + tinymce.activeEditor.insertContent('<a target="_blank" href="' + src + '">' + title + '</a>'); + } + }); + }, + attachListO: $("#attachList"), + attachNumO: $("#attachNum"), + attachDropdownO: $("#attachDropdown"), + downloadAllBtnO: $("#downloadAllBtn"), + linkAllBtnO: $("#linkAllBtn"), + // 添加笔记时 + clearNoteAttachNum: function() { + var self = this; + self.attachNumO.html("").hide(); + }, + renderNoteAttachNum: function(noteId, needHide) { + var self = this; + var note = Note.getNote(noteId); + if(note.AttachNum) { + self.attachNumO.html("(" + note.AttachNum + ")").show(); + self.downloadAllBtnO.show(); + self.linkAllBtnO.show(); + } else { + self.attachNumO.hide(); + self.downloadAllBtnO.hide(); + self.linkAllBtnO.hide(); + } + + // 隐藏掉 + if(needHide) { + self.attachDropdownO.removeClass("open"); + } + }, + _renderAttachs: function(attachs) { + var self = this; + // foreach 循环之 + /* + <li class="clearfix"> + <div class="attach-title">leanote官abcefedafadfadfadfadfad方文档.doc</div> + <div class="attach-process"> + <button class="btn btn-sm btn-warning">Delete</button> + <button class="btn btn-sm btn-deafult">Download</button> + </div> + </li> + */ + var html = ""; + var attachNum = attachs.length; + for(var i = 0; i < attachNum; ++i) { + var each = attachs[i]; + html += '<li class="clearfix" data-id="' + each.AttachId + '">' + + '<div class="attach-title">' + each.Title + '</div>' + + '<div class="attach-process"> ' + + ' <button class="btn btn-sm btn-warning delete-attach"><i class="fa fa-trash-o"></i></button> ' + + ' <button type="button" class="btn btn-sm btn-primary download-attach"><i class="fa fa-download"></i></button> ' + + ' <button type="button" class="btn btn-sm btn-deafult link-attach" title="Insert link into content"><i class="fa fa-link"></i></button> ' + + '</div>' + + '</li>'; + self.attachsMap[each.AttachId] = each; + } + self.attachListO.html(html); + + // 设置数量 + var note = Note.getCurNote(); + if(note) { + note.AttachNum = attachNum; + self.renderNoteAttachNum(note.NoteId, false); + } + }, + // 渲染noteId的附件 + // 当点击"附件"时加载, + // TODO 判断是否已loaded + renderAttachs: function(noteId) { + var self = this; + if(self.loadedNoteAttachs[noteId]) { + self._renderAttachs(self.loadedNoteAttachs[noteId]); + return; + } + // ajax获取noteAttachs + ajaxGet("/attach/getAttachs", {noteId: noteId}, function(ret) { + var list = []; + if(ret.Ok) { + list = ret.List; + if(!list) { + list = []; + } + } + // 添加到缓存中 + self.loadedNoteAttachs[noteId] = list; + self._renderAttachs(list); + }); + }, + // 添加附件, attachment_upload上传调用 + addAttach: function(attachInfo) { + var self = this; + if(!self.loadedNoteAttachs[attachInfo.NoteId]) { + self.loadedNoteAttachs[attachInfo.NoteId] = []; + } + self.loadedNoteAttachs[attachInfo.NoteId].push(attachInfo); + self.renderAttachs(attachInfo.NoteId); + }, + // 删除 + deleteAttach: function(attachId) { + var self = this; + var noteId = Note.curNoteId; + var attachs = self.loadedNoteAttachs[noteId]; + for(var i = 0; i < attachs.length; ++i) { + if(attachs[i].AttachId == attachId) { + // 删除之, 并render之 + attachs.splice(i, 1); + break; + } + } + // self.loadedNoteAttachs[noteId] = attachs; + self.renderAttachs(noteId); + }, + + // 下载 + downloadAttach: function(fileId) { + var self = this; + }, + downloadAll: function() { + } +} + //------------------- 事件 $(function() { + // 附件初始化 + Attach.init(); + //----------------- // for list nav $("#noteItemList").on("click", ".item", function(event) { diff --git a/public/js/common.js b/public/js/common.js index e83f3de..9bff46f 100644 --- a/public/js/common.js +++ b/public/js/common.js @@ -288,7 +288,12 @@ function editorIframeTabindex(index) { } } //切换编辑器 +LEA.isM = false; +LEA.isMarkdownEditor = function() { + return LEA.isM; +} function switchEditor(isMarkdown) { + LEA.isM = isMarkdown; // 富文本永远是2 if(!isMarkdown) { $("#editor").show(); diff --git a/public/mdeditor/editor/pagedown/Markdown.Editor.js b/public/mdeditor/editor/pagedown/Markdown.Editor.js index e39e18e..6c5b80b 100644 --- a/public/mdeditor/editor/pagedown/Markdown.Editor.js +++ b/public/mdeditor/editor/pagedown/Markdown.Editor.js @@ -1317,7 +1317,37 @@ } }); } + + // life 新添加函数 + // life + function insertLinkLife(link, text) { + inputBox.focus(); + if (undoManager) { + undoManager.setCommandMode(); + } + var state = new TextareaState(panels); + + if (!state) { + return; + } + + var chunks = state.getChunks(); // 得到chunk + var fixupInputArea = function () { + inputBox.focus(); + + if (chunks) { + state.setChunks(chunks); + } + + state.restore(); + previewManager.refresh(); + }; + + var a = commandProto.insertLink(chunks, fixupInputArea, link, text); + if(!a) fixupInputArea(); + } + MarkdownEditor.insertLink = insertLinkLife; // Perform the button's action. function doClick(button) { @@ -1369,6 +1399,7 @@ var noCleanup = button.textOp(chunks, fixupInputArea); + // 这里生成 if (!noCleanup) { fixupInputArea(); } @@ -1378,6 +1409,7 @@ if (button.execute) { button.execute(undoManager); } + }; function setupButton(button, isEnabled) { @@ -1707,6 +1739,68 @@ return title ? link + ' "' + title + '"' : link; }); } + + // life 添加 + commandProto.insertLink = function (chunk, postProcessing, link, text) { + isImage = false; + chunk.trimWhitespace(); + chunk.findTags(/\s*!?\[/, /\][ ]?(?:\n[ ]*)?(\[.*?\])?/); + var background; + + if (chunk.endTag.length > 1 && chunk.startTag.length > 0) { + + chunk.startTag = chunk.startTag.replace(/!?\[/, ""); + chunk.endTag = ""; + this.addLinkDef(chunk, null); + + } + else { + + // We're moving start and end tag back into the selection, since (as we're in the else block) we're not + // *removing* a link, but *adding* one, so whatever findTags() found is now back to being part of the + // link text. linkEnteredCallback takes care of escaping any brackets. + chunk.selection = chunk.startTag + chunk.selection + chunk.endTag; + chunk.startTag = chunk.endTag = ""; + + if (/\n\n/.test(chunk.selection)) { + this.addLinkDef(chunk, null); + return; + } + var that = this; + // The function to be executed when you enter a link and press OK or Cancel. + // Marks up the link and adds the ref. + var linkEnteredCallback = function (link) { + + background.parentNode.removeChild(background); + + if (link !== null) { + chunk.selection = (" " + chunk.selection).replace(/([^\\](?:\\\\)*)(?=[[\]])/g, "$1\\").substr(1); + + var linkDef = " [999]: " + properlyEncoded(link); + + var num = that.addLinkDef(chunk, linkDef); + chunk.startTag = isImage ? "![" : "["; + chunk.endTag = "][" + num + "]"; + chunk.selection = text; + } + postProcessing(); + }; + + background = ui.createBackground(); + linkEnteredCallback(link); + /* + if (isImage) { + if (!this.hooks.insertImageDialog(linkEnteredCallback)) + ui.prompt(this.getString("imagedialog"), imageDefaultText, linkEnteredCallback); + } + else { + if (!this.hooks.insertLinkDialog(linkEnteredCallback)) // jiawzhang + ui.prompt(this.getString("linkdialog"), linkDefaultText, linkEnteredCallback); + } + */ + return true; + } + }; commandProto.doLinkOrImage = function (chunk, postProcessing, isImage) {