v1.0 beta init
This commit is contained in:
app
controllers
AuthController.goBaseController.goBlogController.goCaptchaController.goFileController.goIndexController.goNoteController.goUserController.go
admin
AdminBaseController.goAdminController.goAdminData.goAdminEmailController.goAdminSettingController.goAdminUpgradeController.goinit.go
init.godb
i18n
info
init.golea
release
service
AuthService.goBlogService.goConfigService.goEmailService.goNoteService.goNotebookService.goPwdService.goSessionService.goTrashService.goUpgradeService.goUserService.goinit.go
test
views
Admin
Blog
Errors
Home
Html2Image
Note
Oauth
Share
User
messages
public
admin
css
blog
basic.lessblog_daqi.cssblog_daqi.lessblog_default.cssblog_default.lessblog_left_fixed.cssblog_left_fixed.lesscomment.csscomment.lessmobile.lessp.cssp.less
bootstrap.cssconfig.codekiteditor
font-awesome-4.2.0
css
fonts
FontAwesome.otffontawesome-webfont.eotfontawesome-webfont.svgfontawesome-webfont.ttffontawesome-webfont.woff
less
bordered-pulled.lesscore.lessfixed-width.lessfont-awesome.lessicons.lesslarger.lesslist.lessmixins.lesspath.lessrotated-flipped.lessspinning.lessstacked.lessvariables.less
scss
theme
basic.lessdefault.cssdefault.lessmobile.lesssimple.csssimple.lesswritting-overwrite.csswritting-overwrite.lesswritting.css
toImage.csstoImage.lessimages
js
all.js
app
attachment_upload.js
bootstrap-dialog.min.jsbootstrap-hover-dropdown.jscommon-min.jscommon.jsblog
note-min.jsnote.jsnotebook-min.jsnotebook.jspage-min.jspage.jsshare-min.jsshare.jstag-min.jstag.jscontextmenu
fastclick.jsi18n
jquery-cookie-min.jsjquery-cookie.jsjquery.mobile-1.4.4.min.jsjquery.qrcode.min.jsjsrender.jsmain-min.jsmain.jsmdeditor
editor
tinymce
plugins
codemirror
leaui_image
paste
@ -21,6 +21,30 @@ Notebook.getCurNotebookId = function() {
|
||||
return Notebook.curNotebookId;
|
||||
};
|
||||
|
||||
// 笔记本的笔记数量更新
|
||||
Notebook._updateNotebookNumberNotes = function(notebookId, n) {
|
||||
var self = this;
|
||||
var notebook = self.getNotebook(notebookId);
|
||||
if(!notebook) {
|
||||
return;
|
||||
}
|
||||
notebook.NumberNotes += n;
|
||||
if(notebook.NumberNotes < 0) {
|
||||
notebook.NumberNotes = 0;
|
||||
}
|
||||
$("#numberNotes_" + notebookId).html(notebook.NumberNotes);
|
||||
};
|
||||
// addNote, copyNote, moveNote
|
||||
Notebook.incrNotebookNumberNotes = function(notebookId) {
|
||||
var self = this;
|
||||
self._updateNotebookNumberNotes(notebookId, 1);
|
||||
};
|
||||
// moteNote, deleteNote
|
||||
Notebook.minusNotebookNumberNotes = function(notebookId) {
|
||||
var self = this;
|
||||
self._updateNotebookNumberNotes(notebookId, -1);
|
||||
};
|
||||
|
||||
// 得到notebook标题, 给note显示其notebook标题用
|
||||
// called by Note
|
||||
Notebook.getNotebook = function(notebookId) {
|
||||
@ -58,6 +82,7 @@ Notebook.getTreeSetting = function(isSearch, isShare){
|
||||
icoObj.before(switchObj);
|
||||
if(!isShare) {
|
||||
if(!Notebook.isAllNotebookId(treeNode.NotebookId) && !Notebook.isTrashNotebookId(treeNode.NotebookId)) {
|
||||
icoObj.after($('<span class="notebook-number-notes" id="numberNotes_' + treeNode.NotebookId + '">' + (treeNode.NumberNotes || 0) + '</span>'));
|
||||
icoObj.after($('<span class="fa notebook-setting" title="setting"></span>'));
|
||||
}
|
||||
} else {
|
||||
@ -772,16 +797,16 @@ $(function() {
|
||||
//-------------------
|
||||
// 右键菜单
|
||||
var notebookListMenu = {
|
||||
width: 150,
|
||||
width: 180,
|
||||
items: [
|
||||
{ text: "分享给好友", alias: 'shareToFriends', icon: "", faIcon: "fa-share-square-o", action: Notebook.listNotebookShareUserInfo},
|
||||
{ text: getMsg("shareToFriends"), alias: 'shareToFriends', icon: "", faIcon: "fa-share-square-o", action: Notebook.listNotebookShareUserInfo},
|
||||
{ type: "splitLine" },
|
||||
{ text: "公开为博客", alias: 'set2Blog', icon: "", action: Notebook.setNotebook2Blog },
|
||||
{ text: "取消公开为博客", alias: 'unset2Blog', icon: "", action: Notebook.setNotebook2Blog }, // Unset
|
||||
{ text: getMsg("publicAsBlog"), alias: 'set2Blog', faIcon: "fa-bold", action: Notebook.setNotebook2Blog },
|
||||
{ text: getMsg("cancelPublic"), alias: 'unset2Blog',faIcon: "fa-undo", action: Notebook.setNotebook2Blog }, // Unset
|
||||
{ type: "splitLine" },
|
||||
{ text: "添加子笔记本", icon: "", action: Notebook.addChildNotebook },
|
||||
{ text: "重命名", icon: "", action: Notebook.updateNotebookTitle },
|
||||
{ text: "删除", icon: "", alias: 'delete', faIcon: "fa-trash-o", action: Notebook.deleteNotebook }
|
||||
{ text: getMsg("addChildNotebook"), faIcon: "fa-sitemap", action: Notebook.addChildNotebook },
|
||||
{ text: getMsg("rename"), faIcon: "fa-pencil", action: Notebook.updateNotebookTitle },
|
||||
{ text: getMsg("delete"), icon: "", alias: 'delete', faIcon: "fa-trash-o", action: Notebook.deleteNotebook }
|
||||
],
|
||||
onShow: applyrule,
|
||||
onContextMenu: beforeContextMenu,
|
||||
@ -789,16 +814,17 @@ $(function() {
|
||||
children: "li a"
|
||||
}
|
||||
|
||||
// for search
|
||||
var notebookListMenu2 = {
|
||||
width: 150,
|
||||
width: 180,
|
||||
items: [
|
||||
{ text: "分享给好友", alias: 'shareToFriends', icon: "", faIcon: "fa-share-square-o", action: Notebook.listNotebookShareUserInfo},
|
||||
{ text: getMsg("shareToFriends"), alias: 'shareToFriends', icon: "", faIcon: "fa-share-square-o", action: Notebook.listNotebookShareUserInfo},
|
||||
{ type: "splitLine" },
|
||||
{ text: "公开为博客", alias: 'set2Blog', icon: "", action: Notebook.setNotebook2Blog },
|
||||
{ text: "取消公开为博客", alias: 'unset2Blog', icon: "", action: Notebook.setNotebook2Blog }, // Unset
|
||||
{ text: getMsg("publicAsBlog"), alias: 'set2Blog', faIcon: "fa-bold", action: Notebook.setNotebook2Blog },
|
||||
{ text: getMsg("cancelPublic"), alias: 'unset2Blog',faIcon: "fa-undo", action: Notebook.setNotebook2Blog }, // Unset
|
||||
{ type: "splitLine" },
|
||||
{ text: "重命名", icon: "", action: Notebook.updateNotebookTitle },
|
||||
{ text: "删除", icon: "", alias: 'delete', faIcon: "fa-trash-o", action: Notebook.deleteNotebook }
|
||||
{ text: getMsg("rename"), icon: "", action: Notebook.updateNotebookTitle },
|
||||
{ text: getMsg("delete"), icon: "", alias: 'delete', faIcon: "fa-trash-o", action: Notebook.deleteNotebook }
|
||||
],
|
||||
onShow: applyrule,
|
||||
onContextMenu: beforeContextMenu,
|
||||
|
Reference in New Issue
Block a user