This commit is contained in:
life
2015-03-31 14:27:26 +08:00
parent 9515f1e58f
commit decf580ed3
585 changed files with 8128 additions and 9023 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -53,7 +53,7 @@ function getShareUrl() {
return location.href;
}
function getShareTitle(title) {
return encodeURI(title + " (来自leanote.com)");
return encodeURI(title + " (from https://leanote.com)");
}
function shareSinaWeibo(noteId, title, pic) {
var url = "http://service.weibo.com/share/share.php?title=" + getShareTitle(title) + "&url=" + getShareUrl(noteId);
@ -135,17 +135,17 @@ function getDateDiff(dateTimeStamp) {
var hourC = diffValue / diff.hour;
var minC = parseInt(diffValue / diff.minute);
if (monthC >= 1) {
result = parseInt(monthC) + "个月前";
result = parseInt(monthC) + " month ago";
} else if (weekC >= 1) {
result = parseInt(weekC) + "周前";
result = parseInt(weekC) + " weeks ago";
} else if (dayC >= 1) {
result = parseInt(dayC) + "天前";
result = parseInt(dayC) + " days ago";
} else if (hourC >= 1) {
result = parseInt(hourC) + "小时前";
result = parseInt(hourC) + " hours ago";
} else if (minC > 1) {
result = minC + "分钟前";
result = minC + " minutes ago";
} else {
result = "刚刚";
result = "Just now";
}
return result;
}
@ -328,8 +328,8 @@ function needLogin() {
var registerUrl = siteUrl + '/register?from=' + encodeURI(location.href);
try {
var modal = BootstrapDialog.show({
title: "你还未登录",
message: '<div class="needLogin" style="border:none"><a href="' + loginUrl + '">立即登录</a>, 发表评论.<br />没有帐号? <a href="' + registerUrl +'">立即注册</a>',
title: "Please sign in first",
message: '<div class="needLogin" style="border:none"><a href="' + loginUrl + '">Sign in</a> to to leave a comment.<br />No Leanote account? <a href="' + registerUrl +'">Sign up now</a>',
nl2br: false
});
} catch(e) {}

View File

@ -26,13 +26,10 @@ var C = {
}
self.initEvent();
self.incReadNum();
//
},
// 博客的统计信息
getPostStat: function() {
},
// 增加阅读量
incReadNum: function() {
@ -292,7 +289,7 @@ var C = {
var commentId = $(this).parent().data("comment-id");
var t = this;
try {
BootstrapDialog.confirm("确定删除该评论?", function(yes) {
BootstrapDialog.confirm("Are you sure?", function(yes) {
if(yes) {
deleteComment(noteId, commentId, function(ret) {
if(ret.Ok) {
@ -325,20 +322,23 @@ var C = {
$(t).parent().find(".like-num-i").text(ret.Num)
}
if(ret.IsILikeIt) {
$(t).find(".like-text").text("取消赞");
var ever = $(t).find(".like-text").text();
if(ever == "赞") {
$(t).find(".like-text").text("取消赞");
} else {
$(t).find(".like-text").text("Unlike");
}
} else {
$(t).find(".like-text").text("赞");
var ever = $(t).find(".like-text").text();
if(ever == "取消赞") {
$(t).find(".like-text").text("赞");
} else {
$(t).find(".like-text").text("Like");
}
}
}
});
});
$(".comment-box").on("click", ".comment-report", function() {
if(needLogin()) {
return;
}
var commentId = $(this).parent().data("comment-id");
report(commentId, self.noteId, "举报评论?");
});
self.initShare();
},
weixinQRCodeO: $("#weixinQRCode"),
@ -349,7 +349,7 @@ var C = {
self.weixinQRCodeO.qrcode(location.href);
}
BootstrapDialog.show({
title: "打开微信扫一扫二维码",
title: "Open Wechat to scan the code",
message: self.weixinQRCodeO
});
});