fix conflict

This commit is contained in:
life
2015-03-31 16:56:26 +08:00
parent 5fae5dd10e
commit f959694b0f
18 changed files with 34 additions and 139 deletions

View File

@ -374,12 +374,6 @@ func init() {
admin.InitService() admin.InitService()
member.InitService() member.InitService()
service.ConfigS.InitGlobalConfigs() service.ConfigS.InitGlobalConfigs()
<<<<<<< HEAD
});
}
=======
api.InitService() api.InitService()
}) })
}
}
>>>>>>> dev-life

View File

@ -119,10 +119,7 @@ func (this *UserService) GetUserInfo(userId string) info.User {
func (this *UserService) GetUserInfoByEmail(email string) info.User { func (this *UserService) GetUserInfoByEmail(email string) info.User {
user := info.User{} user := info.User{}
db.GetByQ(db.Users, bson.M{"Email": email}, &user) db.GetByQ(db.Users, bson.M{"Email": email}, &user)
<<<<<<< HEAD
=======
// Logo路径问题, 有些有http: 有些没有 // Logo路径问题, 有些有http: 有些没有
>>>>>>> dev-life
this.setUserLogo(&user) this.setUserLogo(&user)
return user return user
} }
@ -131,10 +128,7 @@ func (this *UserService) GetUserInfoByUsername(username string) info.User {
user := info.User{} user := info.User{}
username = strings.ToLower(username) username = strings.ToLower(username)
db.GetByQ(db.Users, bson.M{"Username": username}, &user) db.GetByQ(db.Users, bson.M{"Username": username}, &user)
<<<<<<< HEAD
=======
// Logo路径问题, 有些有http: 有些没有 // Logo路径问题, 有些有http: 有些没有
>>>>>>> dev-life
this.setUserLogo(&user) this.setUserLogo(&user)
return user return user
} }

View File

@ -713,7 +713,7 @@ function log(o) {
<!-- 插入图片 --> <!-- 插入图片 -->
<div class="modal fade modal-insert-image"> <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-content">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" <button type="button" class="close" data-dismiss="modal"
@ -928,4 +928,4 @@ window.require = {
<script src="/js/require.js"></script> <script src="/js/require.js"></script>
</script> </script>
</body> </body>
</html> </html>

View File

@ -4,27 +4,16 @@
http.port=9000 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 site.url=http://localhost:9000 # or http://x.com:8080, http://www.xx.com:9000
>>>>>>> dev-life:conf/app.conf
# mongdb # mongdb
db.host=localhost db.host=localhost
#db.host=leanote #db.host=leanote
db.port=27017 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.dbname=leanote # required
db.username= # if not exists, please leave it blank db.username= # if not exists, please leave it blank
db.password= # 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: # 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 # mongodb://myuser:mypass@localhost:40001,otherhost:40001/mydb
# db.url=mongodb://root:root123@localhost:27017/leanote # db.url=mongodb://root:root123@localhost:27017/leanote

View File

@ -39,10 +39,6 @@ POST /findPasswordUpdate Auth.FindPasswordUpdate
* /note/searchNoteByTags Note.SearchNoteByTags * /note/searchNoteByTags Note.SearchNoteByTags
* /note/toImage Note.ToImage * /note/toImage Note.ToImage
* /note/html2Image Note.Html2Image * /note/html2Image Note.Html2Image
<<<<<<< HEAD:conf/routes
=======
* /note/exportPdf Note.ExportPDF
>>>>>>> dev-life:conf/routes
* /note/setNote2Blog Note.SetNote2Blog * /note/setNote2Blog Note.SetNote2Blog
# pjax # pjax
GET /note/:noteId Note.Index GET /note/:noteId Note.Index

View File

@ -19,10 +19,7 @@
*/ */
{ {
"Name": "Leanote default theme", "Name": "Leanote default theme",
<<<<<<< HEAD
"Desc": "", "Desc": "",
=======
>>>>>>> dev-life
"Version": "1.0", "Version": "1.0",
"Author": "leanote.com", "Author": "leanote.com",
"AuthorUrl": "http://leanote.com", "AuthorUrl": "http://leanote.com",

View File

@ -19,10 +19,7 @@
*/ */
{ {
"Name": "Leanote elegant", "Name": "Leanote elegant",
<<<<<<< HEAD
"Desc": "", "Desc": "",
=======
>>>>>>> dev-life
"Version": "1.0", "Version": "1.0",
"Author": "leanote.com", "Author": "leanote.com",
"AuthorUrl": "http://leanote.com", "AuthorUrl": "http://leanote.com",

View File

@ -19,10 +19,7 @@
*/ */
{ {
"Name": "Leanote nav fixed", "Name": "Leanote nav fixed",
<<<<<<< HEAD
"Desc": "", "Desc": "",
=======
>>>>>>> dev-life
"Version": "1.0", "Version": "1.0",
"Author": "leanote.com", "Author": "leanote.com",
"AuthorUrl": "http://leanote.com", "AuthorUrl": "http://leanote.com",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -252,17 +252,13 @@ Notebook.renderNotebooks = function(notebooks) {
if(!notebooks || typeof notebooks != "object" || notebooks.length < 0) { if(!notebooks || typeof notebooks != "object" || notebooks.length < 0) {
notebooks = []; notebooks = [];
} }
<<<<<<< HEAD
=======
// title可能有<script> // title可能有<script>
for(var i = 0, len = notebooks.length; i < len; ++i) { for(var i = 0, len = notebooks.length; i < len; ++i) {
var notebook = notebooks[i]; var notebook = notebooks[i];
notebook.Title = trimTitle(notebook.Title); notebook.Title = trimTitle(notebook.Title);
} }
>>>>>>> dev-life
notebooks = [{NotebookId: Notebook.allNotebookId, Title: getMsg("all"), drop:false, drag: false}].concat(notebooks); 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}); notebooks.push({NotebookId: Notebook.trashNotebookId, Title: getMsg("trash"), drop:false, drag: false});
Notebook.notebooks = notebooks; // 缓存之 Notebook.notebooks = notebooks; // 缓存之
@ -648,16 +644,7 @@ Notebook.changeNotebook = function(notebookId, callback) {
// 这里可以缓存起来, note按notebookId缓存 // 这里可以缓存起来, note按notebookId缓存
// 这里可能点击过快导致前面点击的后来才返回 // 这里可能点击过快导致前面点击的后来才返回
me.showNoteAndEditorLoading(); me.showNoteAndEditorLoading();
<<<<<<< HEAD
ajaxGet(url, param, function(cacheNotes) {
if(callback) {
callback(cacheNotes);
} else {
Note.renderNotesAndFirstOneContent(cacheNotes);
}
me.hideNoteAndEditorLoading();
});
=======
me.changeNotebookSeq++; me.changeNotebookSeq++;
(function(seq) { (function(seq) {
ajaxGet(url, param, function(cacheNotes) { ajaxGet(url, param, function(cacheNotes) {
@ -675,7 +662,6 @@ Notebook.changeNotebook = function(notebookId, callback) {
me.hideNoteAndEditorLoading(); me.hideNoteAndEditorLoading();
}); });
})(me.changeNotebookSeq); })(me.changeNotebookSeq);
>>>>>>> dev-life
} }
// 笔记列表与编辑器的mask loading // 笔记列表与编辑器的mask loading

File diff suppressed because one or more lines are too long

View File

@ -50,7 +50,7 @@ Tag.clearTags = function() {
// 设置tags // 设置tags
// called by Note // called by Note
Tag.renderTags = function(tags) { Tag.renderTags = function(tags) {
Tag.clearTags(); Tag.t.html("");
if(isEmpty(tags)) { if(isEmpty(tags)) {
return; return;
} }
@ -88,9 +88,8 @@ Tag.renderReadOnlyTags = function(tags) {
$("#noteReadTags").html(""); $("#noteReadTags").html("");
if(isEmpty(tags)) { if(isEmpty(tags)) {
$("#noteReadTags").html(getMsg("noTag")); $("#noteReadTags").html(getMsg("noTag"));
return;
} }
var i = true; var i = true;
function getNextDefaultClasses() { function getNextDefaultClasses() {
if (i) { if (i) {
@ -101,21 +100,20 @@ Tag.renderReadOnlyTags = function(tags) {
return "label label-info"; return "label label-info";
} }
} }
var html = [], text; for(var i in tags) {
var text = tags[i];
for(var i = 0, j = tags.length; i<j; i++) {
text = tags[i];
text = Tag.mapEn2Cn[text] || text; text = Tag.mapEn2Cn[text] || text;
text = text.replace(/[\r\n]/g, ''); text = text.replace(/[\r\n]/g, '');
html.push(tt('<span class="?">?</span>', var classes = Tag.classes[text];
Tag.classes[text] || getNextDefaultClasses(), if(!classes) {
Note._toHtmlEntity(text) classes = getNextDefaultClasses();
)); }
tag = tt('<span class="?">?</span>', classes, Note._toHtmlEntity(text));
$("#noteReadTags").append(tag);
} }
$("#noteReadTags").append(html.join(''));
} }
// 添加tag // 添加tag
@ -124,7 +122,7 @@ Tag.renderReadOnlyTags = function(tags) {
Tag.appendTag = function(tag, save) { Tag.appendTag = function(tag, save) {
var isColor = false; var isColor = false;
var classes, text; var classes, text;
if (typeof tag == "object") { if (typeof tag == "object") {
classes = tag.classes; classes = tag.classes;
text = tag.text; text = tag.text;
@ -144,21 +142,14 @@ Tag.appendTag = function(tag, save) {
classes = "label label-default"; classes = "label label-default";
} }
} }
<<<<<<< HEAD
=======
var rawText = text; var rawText = text;
>>>>>>> dev-life
if(LEA.locale == "zh") { if(LEA.locale == "zh") {
text = Tag.mapEn2Cn[text] || text; text = Tag.mapEn2Cn[text] || text;
rawText = Tag.mapCn2En[rawText] || rawText; rawText = Tag.mapCn2En[rawText] || rawText;
} }
<<<<<<< HEAD
text = text.replace(/[\r\n]/g, ''); 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, Note._toHtmlEntity(text););
tag = tt('<span class="?" data-tag="?">?<i title="' + getMsg("delete") + '">X</i></span>', classes, text, text);
>>>>>>> dev-life
// 避免重复 // 避免重复
var isExists = false; var isExists = false;
@ -248,15 +239,9 @@ Tag.renderTagNav = function(tags) {
if(LEA.locale == "zh") { if(LEA.locale == "zh") {
var text = Tag.mapEn2Cn[tag] || text; var text = Tag.mapEn2Cn[tag] || text;
} }
<<<<<<< HEAD
var text = Note._toHtmlEntity(Tag.mapEn2Cn[tag] || tag);
text = text.replace(/[\r\n]/g, ''); text = text.replace(/[\r\n]/g, '');
var classes = Tag.classes[tag] || "label label-default"; var classes = Tag.classes[tag] || "label label-default";
$("#tagNav").append(tt('<li data-tag="?"><a> <span class="?">?</span></li>', text, classes, text)); $("#tagNav").append(tt('<li data-tag="?"><a> <span class="?">?</span> <span class="tag-delete">X</span></li>', tag, classes, Note._toHtmlEntity(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
} }
}; };
@ -282,11 +267,11 @@ $(function() {
$(this).hide(); $(this).hide();
$("#addTagInput").show().focus().val(""); $("#addTagInput").show().focus().val("");
}); });
$("#addTagInput").click(function(event) { $("#addTagInput").click(function(event) {
showTagList(event); showTagList(event);
}); });
$("#addTagInput").blur(function() { $("#addTagInput").blur(function() {
var val = $(this).val(); var val = $(this).val();
if(val) { if(val) {
@ -334,13 +319,10 @@ $(function() {
// event.stopPropagation(); // event.stopPropagation();
}); });
*/ */
$("#tags").on("click", "i", function() { $("#tags").on("click", "i", function() {
Tag.removeTag($(this).parent()); Tag.removeTag($(this).parent());
}); });
<<<<<<< HEAD
=======
//---------- //----------
// //
function deleteTag() { function deleteTag() {
@ -357,31 +339,25 @@ $(function() {
}; };
} }
>>>>>>> dev-life
//------------- //-------------
// nav 标签搜索 // nav 标签搜索
function searchTag() { function searchTag() {
var $li = $(this).closest('li'); var $li = $(this).closest('li');
var tag = $.trim($li.data("tag")); var tag = $.trim($li.data("tag"));
// tag = Tag.mapCn2En[tag] || tag; // tag = Tag.mapCn2En[tag] || tag;
// 学习changeNotebook // 学习changeNotebook
// 1 // 1
Note.curChangedSaveIt(); Note.curChangedSaveIt();
// 2 先清空所有 // 2 先清空所有
// 也会把curNoteId清空 // 也会把curNoteId清空
Note.clearAll(); Note.clearAll();
<<<<<<< HEAD
$("#tagSearch").html($(this).html()).show();
=======
$("#tagSearch").html($li.html()).show(); $("#tagSearch").html($li.html()).show();
$("#tagSearch .tag-delete").remove(); $("#tagSearch .tag-delete").remove();
>>>>>>> dev-life
showLoading(); showLoading();
ajaxGet("/note/searchNoteByTags", {tags: [tag]}, function(notes) { ajaxGet("/note/searchNoteByTags", {tags: [tag]}, function(notes) {
hideLoading(); hideLoading();
@ -389,7 +365,7 @@ $(function() {
// 和note搜索一样 // 和note搜索一样
// 设空, 防止发生上述情况 // 设空, 防止发生上述情况
// Note.curNoteId = ""; // Note.curNoteId = "";
Note.renderNotes(notes); Note.renderNotes(notes);
if(!isEmpty(notes)) { if(!isEmpty(notes)) {
Note.changeNote(notes[0].NoteId); Note.changeNote(notes[0].NoteId);

View File

@ -117,8 +117,4 @@
writeScripts(); writeScripts();
})(this); })(this);
<<<<<<< HEAD // $hash: eead586884e827fb28480c335ab9d3fc
// $hash: 81dccd126cf777c058d698320fb736ed
=======
// $hash: eead586884e827fb28480c335ab9d3fc
>>>>>>> dev-life

File diff suppressed because one or more lines are too long

View File

@ -210,8 +210,4 @@
writeScripts(); writeScripts();
})(this); })(this);
<<<<<<< HEAD // $hash: 11a55fa37d4eb591eeccc37e9f5b9d00
// $hash: 74b17a21024745d16a29236bf5163be7
=======
// $hash: 11a55fa37d4eb591eeccc37e9f5b9d00
>>>>>>> dev-life

View File

@ -209,8 +209,4 @@
writeScripts(); writeScripts();
})(this); })(this);
<<<<<<< HEAD // $hash: c7c1f3d9261e2b8bbf291b977dfec921
// $hash: 21077dff9f3a381aae5264038edd67d3
=======
// $hash: c7c1f3d9261e2b8bbf291b977dfec921
>>>>>>> dev-life