fix conflict
This commit is contained in:
@ -374,12 +374,6 @@ func init() {
|
||||
admin.InitService()
|
||||
member.InitService()
|
||||
service.ConfigS.InitGlobalConfigs()
|
||||
<<<<<<< HEAD
|
||||
});
|
||||
}
|
||||
=======
|
||||
api.InitService()
|
||||
})
|
||||
|
||||
}
|
||||
>>>>>>> dev-life
|
||||
}
|
@ -119,10 +119,7 @@ func (this *UserService) GetUserInfo(userId string) info.User {
|
||||
func (this *UserService) GetUserInfoByEmail(email string) info.User {
|
||||
user := info.User{}
|
||||
db.GetByQ(db.Users, bson.M{"Email": email}, &user)
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
// Logo路径问题, 有些有http: 有些没有
|
||||
>>>>>>> dev-life
|
||||
this.setUserLogo(&user)
|
||||
return user
|
||||
}
|
||||
@ -131,10 +128,7 @@ func (this *UserService) GetUserInfoByUsername(username string) info.User {
|
||||
user := info.User{}
|
||||
username = strings.ToLower(username)
|
||||
db.GetByQ(db.Users, bson.M{"Username": username}, &user)
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
// Logo路径问题, 有些有http: 有些没有
|
||||
>>>>>>> dev-life
|
||||
this.setUserLogo(&user)
|
||||
return user
|
||||
}
|
||||
|
@ -713,7 +713,7 @@ function log(o) {
|
||||
|
||||
<!-- 插入图片 -->
|
||||
<div class="modal fade modal-insert-image">
|
||||
<div class="modal-dialog" style="width: 840px">
|
||||
<div class="modal-dialog" style="width: 840px;max-width:100%;">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal"
|
||||
@ -928,4 +928,4 @@ window.require = {
|
||||
<script src="/js/require.js"></script>
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
@ -4,27 +4,16 @@
|
||||
|
||||
http.port=9000
|
||||
|
||||
<<<<<<< HEAD:conf/app.conf
|
||||
site.url=http://localhost:9000
|
||||
=======
|
||||
site.url=http://localhost:9000 # or http://x.com:8080, http://www.xx.com:9000
|
||||
>>>>>>> dev-life:conf/app.conf
|
||||
|
||||
# mongdb
|
||||
db.host=localhost
|
||||
#db.host=leanote
|
||||
db.port=27017
|
||||
<<<<<<< HEAD:conf/app.conf
|
||||
db.dbname=leanote_beta2 # required
|
||||
db.username= # if not exists, please leave it blank
|
||||
db.password= # if not exists, please leave it blank
|
||||
# or you can set the mongdb url
|
||||
=======
|
||||
db.dbname=leanote # required
|
||||
db.username= # if not exists, please leave it blank
|
||||
db.password= # if not exists, please leave it blank
|
||||
# or you can set the mongdb url for more complex needs the format is:
|
||||
>>>>>>> dev-life:conf/app.conf
|
||||
# mongodb://myuser:mypass@localhost:40001,otherhost:40001/mydb
|
||||
# db.url=mongodb://root:root123@localhost:27017/leanote
|
||||
|
||||
|
@ -39,10 +39,6 @@ POST /findPasswordUpdate Auth.FindPasswordUpdate
|
||||
* /note/searchNoteByTags Note.SearchNoteByTags
|
||||
* /note/toImage Note.ToImage
|
||||
* /note/html2Image Note.Html2Image
|
||||
<<<<<<< HEAD:conf/routes
|
||||
=======
|
||||
* /note/exportPdf Note.ExportPDF
|
||||
>>>>>>> dev-life:conf/routes
|
||||
* /note/setNote2Blog Note.SetNote2Blog
|
||||
# pjax
|
||||
GET /note/:noteId Note.Index
|
||||
|
@ -19,10 +19,7 @@
|
||||
*/
|
||||
{
|
||||
"Name": "Leanote default theme",
|
||||
<<<<<<< HEAD
|
||||
"Desc": "",
|
||||
=======
|
||||
>>>>>>> dev-life
|
||||
"Version": "1.0",
|
||||
"Author": "leanote.com",
|
||||
"AuthorUrl": "http://leanote.com",
|
||||
|
@ -19,10 +19,7 @@
|
||||
*/
|
||||
{
|
||||
"Name": "Leanote elegant",
|
||||
<<<<<<< HEAD
|
||||
"Desc": "",
|
||||
=======
|
||||
>>>>>>> dev-life
|
||||
"Version": "1.0",
|
||||
"Author": "leanote.com",
|
||||
"AuthorUrl": "http://leanote.com",
|
||||
|
@ -19,10 +19,7 @@
|
||||
*/
|
||||
{
|
||||
"Name": "Leanote nav fixed",
|
||||
<<<<<<< HEAD
|
||||
"Desc": "",
|
||||
=======
|
||||
>>>>>>> dev-life
|
||||
"Version": "1.0",
|
||||
"Author": "leanote.com",
|
||||
"AuthorUrl": "http://leanote.com",
|
||||
|
File diff suppressed because one or more lines are too long
5
public/js/app/note-min.js
vendored
5
public/js/app/note-min.js
vendored
File diff suppressed because one or more lines are too long
5
public/js/app/notebook-min.js
vendored
5
public/js/app/notebook-min.js
vendored
File diff suppressed because one or more lines are too long
@ -252,17 +252,13 @@ Notebook.renderNotebooks = function(notebooks) {
|
||||
if(!notebooks || typeof notebooks != "object" || notebooks.length < 0) {
|
||||
notebooks = [];
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
|
||||
// title可能有<script>
|
||||
for(var i = 0, len = notebooks.length; i < len; ++i) {
|
||||
var notebook = notebooks[i];
|
||||
notebook.Title = trimTitle(notebook.Title);
|
||||
}
|
||||
|
||||
>>>>>>> dev-life
|
||||
|
||||
notebooks = [{NotebookId: Notebook.allNotebookId, Title: getMsg("all"), drop:false, drag: false}].concat(notebooks);
|
||||
notebooks.push({NotebookId: Notebook.trashNotebookId, Title: getMsg("trash"), drop:false, drag: false});
|
||||
Notebook.notebooks = notebooks; // 缓存之
|
||||
@ -648,16 +644,7 @@ Notebook.changeNotebook = function(notebookId, callback) {
|
||||
// 这里可以缓存起来, note按notebookId缓存
|
||||
// 这里可能点击过快导致前面点击的后来才返回
|
||||
me.showNoteAndEditorLoading();
|
||||
<<<<<<< HEAD
|
||||
ajaxGet(url, param, function(cacheNotes) {
|
||||
if(callback) {
|
||||
callback(cacheNotes);
|
||||
} else {
|
||||
Note.renderNotesAndFirstOneContent(cacheNotes);
|
||||
}
|
||||
me.hideNoteAndEditorLoading();
|
||||
});
|
||||
=======
|
||||
|
||||
me.changeNotebookSeq++;
|
||||
(function(seq) {
|
||||
ajaxGet(url, param, function(cacheNotes) {
|
||||
@ -675,7 +662,6 @@ Notebook.changeNotebook = function(notebookId, callback) {
|
||||
me.hideNoteAndEditorLoading();
|
||||
});
|
||||
})(me.changeNotebookSeq);
|
||||
>>>>>>> dev-life
|
||||
}
|
||||
|
||||
// 笔记列表与编辑器的mask loading
|
||||
|
5
public/js/app/tag-min.js
vendored
5
public/js/app/tag-min.js
vendored
File diff suppressed because one or more lines are too long
@ -50,7 +50,7 @@ Tag.clearTags = function() {
|
||||
// 设置tags
|
||||
// called by Note
|
||||
Tag.renderTags = function(tags) {
|
||||
Tag.clearTags();
|
||||
Tag.t.html("");
|
||||
if(isEmpty(tags)) {
|
||||
return;
|
||||
}
|
||||
@ -88,9 +88,8 @@ Tag.renderReadOnlyTags = function(tags) {
|
||||
$("#noteReadTags").html("");
|
||||
if(isEmpty(tags)) {
|
||||
$("#noteReadTags").html(getMsg("noTag"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
var i = true;
|
||||
function getNextDefaultClasses() {
|
||||
if (i) {
|
||||
@ -101,21 +100,20 @@ Tag.renderReadOnlyTags = function(tags) {
|
||||
return "label label-info";
|
||||
}
|
||||
}
|
||||
|
||||
var html = [], text;
|
||||
|
||||
for(var i = 0, j = tags.length; i<j; i++) {
|
||||
text = tags[i];
|
||||
|
||||
for(var i in tags) {
|
||||
var text = tags[i];
|
||||
text = Tag.mapEn2Cn[text] || text;
|
||||
text = text.replace(/[\r\n]/g, '');
|
||||
|
||||
html.push(tt('<span class="?">?</span>',
|
||||
Tag.classes[text] || getNextDefaultClasses(),
|
||||
Note._toHtmlEntity(text)
|
||||
));
|
||||
|
||||
var classes = Tag.classes[text];
|
||||
if(!classes) {
|
||||
classes = getNextDefaultClasses();
|
||||
}
|
||||
tag = tt('<span class="?">?</span>', classes, Note._toHtmlEntity(text));
|
||||
|
||||
$("#noteReadTags").append(tag);
|
||||
}
|
||||
|
||||
$("#noteReadTags").append(html.join(''));
|
||||
}
|
||||
|
||||
// 添加tag
|
||||
@ -124,7 +122,7 @@ Tag.renderReadOnlyTags = function(tags) {
|
||||
Tag.appendTag = function(tag, save) {
|
||||
var isColor = false;
|
||||
var classes, text;
|
||||
|
||||
|
||||
if (typeof tag == "object") {
|
||||
classes = tag.classes;
|
||||
text = tag.text;
|
||||
@ -144,21 +142,14 @@ Tag.appendTag = function(tag, save) {
|
||||
classes = "label label-default";
|
||||
}
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
var rawText = text;
|
||||
>>>>>>> dev-life
|
||||
if(LEA.locale == "zh") {
|
||||
text = Tag.mapEn2Cn[text] || text;
|
||||
rawText = Tag.mapCn2En[rawText] || rawText;
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
text = text.replace(/[\r\n]/g, '');
|
||||
tag = tt('<span class="?">?<i title="' + getMsg("delete") + '">X</i></span>', classes, Note._toHtmlEntity(text));
|
||||
=======
|
||||
tag = tt('<span class="?" data-tag="?">?<i title="' + getMsg("delete") + '">X</i></span>', classes, text, text);
|
||||
>>>>>>> dev-life
|
||||
|
||||
tag = tt('<span class="?" data-tag="?">?<i title="' + getMsg("delete") + '">X</i></span>', classes, text, Note._toHtmlEntity(text););
|
||||
|
||||
// 避免重复
|
||||
var isExists = false;
|
||||
@ -248,15 +239,9 @@ Tag.renderTagNav = function(tags) {
|
||||
if(LEA.locale == "zh") {
|
||||
var text = Tag.mapEn2Cn[tag] || text;
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
var text = Note._toHtmlEntity(Tag.mapEn2Cn[tag] || tag);
|
||||
text = text.replace(/[\r\n]/g, '');
|
||||
var classes = Tag.classes[tag] || "label label-default";
|
||||
$("#tagNav").append(tt('<li data-tag="?"><a> <span class="?">?</span></li>', text, classes, text));
|
||||
=======
|
||||
var classes = Tag.classes[tag] || "label label-default";
|
||||
$("#tagNav").append(tt('<li data-tag="?"><a> <span class="?">?</span> <span class="tag-delete">X</span></li>', tag, classes, text));
|
||||
>>>>>>> dev-life
|
||||
$("#tagNav").append(tt('<li data-tag="?"><a> <span class="?">?</span> <span class="tag-delete">X</span></li>', tag, classes, Note._toHtmlEntity(text)));
|
||||
}
|
||||
};
|
||||
|
||||
@ -282,11 +267,11 @@ $(function() {
|
||||
$(this).hide();
|
||||
$("#addTagInput").show().focus().val("");
|
||||
});
|
||||
|
||||
|
||||
$("#addTagInput").click(function(event) {
|
||||
showTagList(event);
|
||||
});
|
||||
|
||||
|
||||
$("#addTagInput").blur(function() {
|
||||
var val = $(this).val();
|
||||
if(val) {
|
||||
@ -334,13 +319,10 @@ $(function() {
|
||||
// event.stopPropagation();
|
||||
});
|
||||
*/
|
||||
|
||||
|
||||
$("#tags").on("click", "i", function() {
|
||||
Tag.removeTag($(this).parent());
|
||||
});
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
//----------
|
||||
//
|
||||
function deleteTag() {
|
||||
@ -357,31 +339,25 @@ $(function() {
|
||||
};
|
||||
}
|
||||
|
||||
>>>>>>> dev-life
|
||||
//-------------
|
||||
// nav 标签搜索
|
||||
function searchTag() {
|
||||
var $li = $(this).closest('li');
|
||||
var tag = $.trim($li.data("tag"));
|
||||
// tag = Tag.mapCn2En[tag] || tag;
|
||||
|
||||
|
||||
// 学习changeNotebook
|
||||
|
||||
|
||||
// 1
|
||||
Note.curChangedSaveIt();
|
||||
|
||||
|
||||
// 2 先清空所有
|
||||
// 也会把curNoteId清空
|
||||
Note.clearAll();
|
||||
<<<<<<< HEAD
|
||||
|
||||
$("#tagSearch").html($(this).html()).show();
|
||||
=======
|
||||
|
||||
$("#tagSearch").html($li.html()).show();
|
||||
$("#tagSearch .tag-delete").remove();
|
||||
|
||||
>>>>>>> dev-life
|
||||
showLoading();
|
||||
ajaxGet("/note/searchNoteByTags", {tags: [tag]}, function(notes) {
|
||||
hideLoading();
|
||||
@ -389,7 +365,7 @@ $(function() {
|
||||
// 和note搜索一样
|
||||
// 设空, 防止发生上述情况
|
||||
// Note.curNoteId = "";
|
||||
|
||||
|
||||
Note.renderNotes(notes);
|
||||
if(!isEmpty(notes)) {
|
||||
Note.changeNote(notes[0].NoteId);
|
||||
|
@ -117,8 +117,4 @@
|
||||
writeScripts();
|
||||
})(this);
|
||||
|
||||
<<<<<<< HEAD
|
||||
// $hash: 81dccd126cf777c058d698320fb736ed
|
||||
=======
|
||||
// $hash: eead586884e827fb28480c335ab9d3fc
|
||||
>>>>>>> dev-life
|
||||
// $hash: eead586884e827fb28480c335ab9d3fc
|
File diff suppressed because one or more lines are too long
@ -210,8 +210,4 @@
|
||||
writeScripts();
|
||||
})(this);
|
||||
|
||||
<<<<<<< HEAD
|
||||
// $hash: 74b17a21024745d16a29236bf5163be7
|
||||
=======
|
||||
// $hash: 11a55fa37d4eb591eeccc37e9f5b9d00
|
||||
>>>>>>> dev-life
|
||||
// $hash: 11a55fa37d4eb591eeccc37e9f5b9d00
|
@ -209,8 +209,4 @@
|
||||
writeScripts();
|
||||
})(this);
|
||||
|
||||
<<<<<<< HEAD
|
||||
// $hash: 21077dff9f3a381aae5264038edd67d3
|
||||
=======
|
||||
// $hash: c7c1f3d9261e2b8bbf291b977dfec921
|
||||
>>>>>>> dev-life
|
||||
// $hash: c7c1f3d9261e2b8bbf291b977dfec921
|
Reference in New Issue
Block a user