Commit 3289cc3a authored by Van's avatar Van

fixed #265

parent f1d9b3d0
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
# #
# Description: B3log Solo language configurations(en_US). # Description: B3log Solo language configurations(en_US).
# Version: 2.1.1.0, Jun 28, 2013 # Version: 2.1.1.1, Aug 20, 2013
# Author: Liang Ding # Author: Liang Ding
# Author: Liyuan Li # Author: Liyuan Li
# Author: Dongxu Wang # Author: Dongxu Wang
...@@ -269,6 +269,8 @@ Welcome to the <a href="http://symphony.b3log.org" target="_blank">B3log Symphon ...@@ -269,6 +269,8 @@ Welcome to the <a href="http://symphony.b3log.org" target="_blank">B3log Symphon
<span style="font-size:12px"><span style="color:red">Note</span>: Only to ensure Email is the same and <a href="/article/1353772377257" target="_blank">synchronization configured</a> is correctly,\ <span style="font-size:12px"><span style="color:red">Note</span>: Only to ensure Email is the same and <a href="/article/1353772377257" target="_blank">synchronization configured</a> is correctly,\
Your posts and comments can <i>maintain bisynchronous</i> in the community and the B3log Solo.</p> Your posts and comments can <i>maintain bisynchronous</i> in the community and the B3log Solo.</p>
killBrowserLabel=<h2>Let's kill outdated and insecure browser!</h2><p>Let's kill outdated and insecure browser for browser evolution, human progress and better experience.</p><p>You can download</p><ul><li><a href="http://www.mozilla.com/" target="_blank">Firefox</a></li><li><a href="http://www.google.com/chrome" target="_blank">Chrome</a></li><li><a href="http://windows.microsoft.com/en-US/internet-explorer/downloads/ie" target="_blank">IE8 / IE9</a></li><li><a href="http://www.maxthon.com/" target="_blank">Maxthon</a> and <a href="http://www.google.com" target="_blank">so on</a>.</li></ul><span style="font-size: 10px">Tip: Remove "Util.killIE();" in /js/common.js can support all browser.</span> killBrowserLabel=<h2>Let's kill outdated and insecure browser!</h2><p>Let's kill outdated and insecure browser for browser evolution, human progress and better experience.</p><p>You can download</p><ul><li><a href="http://www.mozilla.com/" target="_blank">Firefox</a></li><li><a href="http://www.google.com/chrome" target="_blank">Chrome</a></li><li><a href="http://windows.microsoft.com/en-US/internet-explorer/downloads/ie" target="_blank">IE8 / IE9</a></li><li><a href="http://www.maxthon.com/" target="_blank">Maxthon</a> and <a href="http://www.google.com" target="_blank">so on</a>.</li></ul><span style="font-size: 10px">Tip: Remove "Util.killIE();" in /js/common.js can support all browser.</span>
closeLabel=Close
closeForeverLabel=Close Forever
readmoreLabel=Read more\u00bb readmoreLabel=Read more\u00bb
readmore2Label=Read more readmore2Label=Read more
replyLabel=Reply\u00bb replyLabel=Reply\u00bb
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
# #
# Description: B3log Solo default language configurations(zh_CN). # Description: B3log Solo default language configurations(zh_CN).
# Version: 2.1.1.7, Jun 28, 2013 # Version: 2.1.1.8, Aug 20, 2013
# Author: Liang Ding # Author: Liang Ding
# Author: Liyuan Li # Author: Liyuan Li
# Author: Dongxu Wang # Author: Dongxu Wang
...@@ -260,15 +260,17 @@ welcomeToSoloLabel=\u6b22\u8fce\u4f7f\u7528 ...@@ -260,15 +260,17 @@ welcomeToSoloLabel=\u6b22\u8fce\u4f7f\u7528
forgotLabel=\u5fd8\u8bb0\u5bc6\u7801 forgotLabel=\u5fd8\u8bb0\u5bc6\u7801
sendLabel=\u53d1\u9001 sendLabel=\u53d1\u9001
userEmailNotFoundMsg=\u90ae\u7bb1\u5730\u5740\u6709\u8bef\uff0c\u8bf7\u91cd\u8bd5 userEmailNotFoundMsg=\u90ae\u7bb1\u5730\u5740\u6709\u8bef\uff0c\u8bf7\u91cd\u8bd5
resetPwdSuccessMsg=\u5BC6\u7801\u4FEE\u6539\u6210\u529F resetPwdSuccessMsg=\u5bc6\u7801\u4fee\u6539\u6210\u529f
resetPwdSuccessSend=\u66F4\u6539\u5BC6\u7801\u7684\u786E\u8BA4\u94FE\u63A5\u5DF2\u53D1\u9001\u81F3\u6307\u5B9A\u90AE\u7BB1 resetPwdSuccessSend=\u66f4\u6539\u5bc6\u7801\u7684\u786e\u8ba4\u94fe\u63a5\u5df2\u53d1\u9001\u81f3\u6307\u5b9a\u90ae\u7bb1
resetPwdMailSubject=[B3log Solo]\u91CD\u7F6E\u5BC6\u7801 resetPwdMailSubject=[B3log Solo]\u91cd\u7f6e\u5bc6\u7801
resetPwdMailBody=\u60F3\u66F4\u6539\u5BC6\u7801\uFF0C\u8BF7\u6253\u5F00\u4E0B\u9762\u94FE\u63A5\uFF1B\u82E5\u4E0D\u60F3\u4FEE\u6539\uFF0C\u53EA\u8981\u5FFD\u7565\u6B64\u6B21\u90AE\u4EF6\uFF0C\u7CFB\u7EDF\u5E76\u4E0D\u4F1A\u81EA\u52A8\u4FEE\u6539\u60A8\u7684\u5BC6\u7801\u3002<p> resetPwdMailBody=\u60f3\u66f4\u6539\u5bc6\u7801\uff0c\u8bf7\u6253\u5f00\u4e0b\u9762\u94fe\u63a5\uff1b\u82e5\u4e0d\u60f3\u4fee\u6539\uff0c\u53ea\u8981\u5ffd\u7565\u6b64\u6b21\u90ae\u4ef6\uff0c\u7cfb\u7edf\u5e76\u4e0d\u4f1a\u81ea\u52a8\u4fee\u6539\u60a8\u7684\u5bc6\u7801\u3002<p>
initIntroLabel=<p>\u8bf7\u70b9\u51fb\u4e0b\u9762\u7684\u201c\u521d\u59cb\u5316\u201d\u6309\u94ae\u8fdb\u884c\u521d\u59cb\u5316\uff0c\u7136\u540e\u7a0d\u7b49\u7247\u523b ;-)</br></br></br></br>\ initIntroLabel=<p>\u8bf7\u70b9\u51fb\u4e0b\u9762\u7684\u201c\u521d\u59cb\u5316\u201d\u6309\u94ae\u8fdb\u884c\u521d\u59cb\u5316\uff0c\u7136\u540e\u7a0d\u7b49\u7247\u523b ;-)</br></br></br></br>\
\u540c\u65f6\uff0c\u6b22\u8fce\u60a8\u52a0\u5165<b>\u5e73\u7b49\u2022\u81ea\u7531\u2022\u5954\u653e</b>\u7684 <a href="http://symphony.b3log.org" target="_blank">B3log Symphony \u793e\u533a</a>\u3002</br></br>\ \u540c\u65f6\uff0c\u6b22\u8fce\u60a8\u52a0\u5165<b>\u5e73\u7b49\u2022\u81ea\u7531\u2022\u5954\u653e</b>\u7684 <a href="http://symphony.b3log.org" target="_blank">B3log Symphony \u793e\u533a</a>\u3002</br></br>\
<span style="font-size:12px"><span style="color:red">\u6ce8</span>\uff1a\u5f53\u6ce8\u518c Email \u4e0e B3log Solo \u4fdd\u6301\u4e00\u81f4\uff0c\u5e76\u4e14\u793e\u533a\u4e2d\u7684<a href="http://symphony.b3log.org/article/1353772377257" target="_blank">\u540c\u6b65\u8bbe\u7f6e</a>\u914d\u7f6e\u6b63\u786e\u65f6\uff0c\ <span style="font-size:12px"><span style="color:red">\u6ce8</span>\uff1a\u5f53\u6ce8\u518c Email \u4e0e B3log Solo \u4fdd\u6301\u4e00\u81f4\uff0c\u5e76\u4e14\u793e\u533a\u4e2d\u7684<a href="http://symphony.b3log.org/article/1353772377257" target="_blank">\u540c\u6b65\u8bbe\u7f6e</a>\u914d\u7f6e\u6b63\u786e\u65f6\uff0c\
\u60a8\u7684\u6587\u7ae0\u548c\u8bc4\u8bba\u5c31\u53ef\u5728\u793e\u533a\u548c\u4e2a\u4eba\u535a\u5ba2\u4e2d\u4fdd\u6301<i>\u53cc\u5411\u540c\u6b65</i>\u3002</span></p> \u60a8\u7684\u6587\u7ae0\u548c\u8bc4\u8bba\u5c31\u53ef\u5728\u793e\u533a\u548c\u4e2a\u4eba\u535a\u5ba2\u4e2d\u4fdd\u6301<i>\u53cc\u5411\u540c\u6b65</i>\u3002</span></p>
killBrowserLabel=<h2>\u8ba9\u6211\u4eec\u653e\u5f03\u4f7f\u7528\u90a3\u4e9b\u8fc7\u65f6\u3001\u4e0d\u5b89\u5168\u7684\u6d4f\u89c8\u5668\u5427\uff01</h2><p>\u4e3a\u4e86\u8ba9\u6d4f\u89c8\u5668\u66f4\u597d\u7684\u53d1\u5c55\uff0c\u4eba\u7c7b\u66f4\u52a0\u7684\u8fdb\u6b65\uff0c\u62e5\u6709\u66f4\u597d\u7684\u4f53\u9a8c\uff0c\u8ba9\u6211\u4eec\u653e\u5f03\u4f7f\u7528\u90a3\u4e9b\u8fc7\u65f6\u3001\u4e0d\u5b89\u5168\u7684\u6d4f\u89c8\u5668\u3002</p>\u60a8\u53ef\u4ee5\u4e0b\u8f7d<ul><li><a href="http://www.mozilla.com/" target="_blank">\u706b\u72d0</a></li><li><a href="http://www.google.com/chrome" target="_blank">\u8c37\u6b4c\u6d4f\u89c8\u5668</a></li><li><a href="http://windows.microsoft.com/en-US/internet-explorer/downloads/ie" target="_blank">IE8 / IE9</a></li><li><a href="http://www.maxthon.com/" target="_blank">\u9068\u6e38</a>\u6216\u8005<a href="http://www.google.com" target="_blank">\u5176\u5b83\u6d4f\u89c8\u5668</a>.</li></ul><span style="font-size: 10px">\u6ce8\uff1a\u5220\u9664 /js/common.js \u4e2d\u7684 Util.killIE(); \u53ef\u5bf9\u6240\u6709\u6d4f\u89c8\u5668\u8fdb\u884c\u652f\u6301\u3002</span> killBrowserLabel=<h2>\u8ba9\u6211\u4eec\u653e\u5f03\u4f7f\u7528\u90a3\u4e9b\u8fc7\u65f6\u3001\u4e0d\u5b89\u5168\u7684\u6d4f\u89c8\u5668\u5427\uff01</h2><p>\u4e3a\u4e86\u8ba9\u6d4f\u89c8\u5668\u66f4\u597d\u7684\u53d1\u5c55\uff0c\u4eba\u7c7b\u66f4\u52a0\u7684\u8fdb\u6b65\uff0c\u62e5\u6709\u66f4\u597d\u7684\u4f53\u9a8c\uff0c\u8ba9\u6211\u4eec\u653e\u5f03\u4f7f\u7528\u90a3\u4e9b\u8fc7\u65f6\u3001\u4e0d\u5b89\u5168\u7684\u6d4f\u89c8\u5668\u3002</p>\u60a8\u53ef\u4ee5\u4e0b\u8f7d<ul><li><a href="http://www.mozilla.com/" target="_blank">\u706b\u72d0</a></li><li><a href="http://www.google.com/chrome" target="_blank">\u8c37\u6b4c\u6d4f\u89c8\u5668</a></li><li><a href="http://windows.microsoft.com/en-US/internet-explorer/downloads/ie" target="_blank">IE8 / IE9</a></li><li><a href="http://www.maxthon.com/" target="_blank">\u9068\u6e38</a>\u6216\u8005<a href="http://www.google.com" target="_blank">\u5176\u5b83\u6d4f\u89c8\u5668</a>.</li></ul><span style="font-size: 10px">\u6ce8\uff1a\u5220\u9664 /js/common.js \u4e2d\u7684 Util.killIE(); \u53ef\u5bf9\u6240\u6709\u6d4f\u89c8\u5668\u8fdb\u884c\u652f\u6301\u3002</span>
closeLabel=\u5173\u95ed
closeForeverLabel=\u6c38\u4e45\u5173\u95ed
readmoreLabel=\u9605\u8bfb\u66f4\u591a\u00bb readmoreLabel=\u9605\u8bfb\u66f4\u591a\u00bb
readmore2Label=\u9605\u8bfb\u66f4\u591a readmore2Label=\u9605\u8bfb\u66f4\u591a
replyLabel=\u56de\u590d\u00bb replyLabel=\u56de\u590d\u00bb
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
* *
* @author <a href="mailto:LLY219@gmail.com">Liyuan Li</a> * @author <a href="mailto:LLY219@gmail.com">Liyuan Li</a>
* @author <a href="mailto:DL88250@gmail.com">Liang Ding</a> * @author <a href="mailto:DL88250@gmail.com">Liang Ding</a>
* @version 1.0.2.4, Nov 13, 2012 * @version 1.0.2.5, Aug 20, 2013
*/ */
/** /**
...@@ -39,10 +39,19 @@ var Util = { ...@@ -39,10 +39,19 @@ var Util = {
* @description 非 IE6/7 的浏览器,跳转到 kill-browser 页面 * @description 非 IE6/7 的浏览器,跳转到 kill-browser 页面
*/ */
killIE: function() { killIE: function() {
var addKillPanel = function() {
if (Cookie.readCookie("showKill") === "") {
var left = ($(window).width() - 701) / 2,
top = ($(window).height() - 420) / 2;
$("body").append("<div style='display: block; height: 100%; width: 100%; position: fixed; background-color: rgb(0, 0, 0); opacity: 0.6; top: 0px;z-index:11'></div>"
+ "<iframe style='left:" + left + "px;z-index:20;top: " + top + "px; position: fixed; border: 0px none; width: 701px; height: 420px;' src='" + latkeConfig.servePath + "/kill-browser.html'></iframe>");
}
};
if ($.browser.msie) { if ($.browser.msie) {
// kill IE6 and IE7 // kill IE6 and IE7
if ($.browser.version === "6.0" || $.browser.version === "7.0") { if ($.browser.version === "6.0" || $.browser.version === "7.0") {
window.location = latkeConfig.servePath + "/kill-browser.html"; addKillPanel();
return; return;
} }
...@@ -51,7 +60,7 @@ var Util = { ...@@ -51,7 +60,7 @@ var Util = {
var path = external.twGetRunPath(); var path = external.twGetRunPath();
if (path && path.toLowerCase().indexOf("360se") > -1 && if (path && path.toLowerCase().indexOf("360se") > -1 &&
window.location.href.indexOf("admin-index") > -1) { window.location.href.indexOf("admin-index") > -1) {
window.location = latkeConfig.servePath + "/kill-browser.html"; addKillPanel();
return; return;
} }
} }
...@@ -106,12 +115,10 @@ var Util = { ...@@ -106,12 +115,10 @@ var Util = {
var $top = $("#top"); var $top = $("#top");
if ($top.length === 1) { if ($top.length === 1) {
var $showTop = $("#showTop"); var $showTop = $("#showTop");
$showTop.click(function() { $showTop.click(function() {
$top.slideDown(); $top.slideDown();
$showTop.hide(); $showTop.hide();
}); });
$("#hideTop").click(function() { $("#hideTop").click(function() {
$top.slideUp(); $top.slideUp();
$showTop.show(); $showTop.show();
...@@ -123,11 +130,9 @@ var Util = { ...@@ -123,11 +130,9 @@ var Util = {
*/ */
goTop: function() { goTop: function() {
var acceleration = acceleration || 0.1; var acceleration = acceleration || 0.1;
var y = $(window).scrollTop(); var y = $(window).scrollTop();
var speed = 1 + acceleration; var speed = 1 + acceleration;
window.scrollTo(0, Math.floor(y / speed)); window.scrollTo(0, Math.floor(y / speed));
if (y > 0) { if (y > 0) {
var invokeFunction = "Util.goTop(" + acceleration + ")"; var invokeFunction = "Util.goTop(" + acceleration + ")";
window.setTimeout(invokeFunction, 16); window.setTimeout(invokeFunction, 16);
...@@ -146,7 +151,7 @@ var Util = { ...@@ -146,7 +151,7 @@ var Util = {
* @description 页面初始化执行的函数 * @description 页面初始化执行的函数
*/ */
init: function() { init: function() {
//window.onerror = Util.error; //window.onerror = Util.error;
Util.killIE(); Util.killIE();
Util.setTopBar(); Util.setTopBar();
}, },
...@@ -188,13 +193,11 @@ var Util = { ...@@ -188,13 +193,11 @@ var Util = {
*/ */
buildTags: function(id) { buildTags: function(id) {
id = id || "tags"; id = id || "tags";
// 根据引用次数添加样式,产生云效果 // 根据引用次数添加样式,产生云效果
var classes = ["tags1", "tags2", "tags3", "tags4", "tags5"], var classes = ["tags1", "tags2", "tags3", "tags4", "tags5"],
bList = $("#" + id + " b").get(); bList = $("#" + id + " b").get();
var max = parseInt($("#" + id + " b").last().text()); var max = parseInt($("#" + id + " b").last().text());
var distance = Math.ceil(max / classes.length); var distance = Math.ceil(max / classes.length);
for (var i = 0; i < bList.length; i++) { for (var i = 0; i < bList.length; i++) {
var num = parseInt(bList[i].innerHTML); var num = parseInt(bList[i].innerHTML);
// 算出当前 tag 数目所在的区间,加上 class // 算出当前 tag 数目所在的区间,加上 class
...@@ -206,7 +209,7 @@ var Util = { ...@@ -206,7 +209,7 @@ var Util = {
} }
} }
// 按字母或者中文拼音进行排序 // 按字母或者中文拼音进行排序
$("#" + id).html($("#" + id + " li").get().sort(function(a, b) { $("#" + id).html($("#" + id + " li").get().sort(function(a, b) {
var valA = $(a).find("span").text().toLowerCase(); var valA = $(a).find("span").text().toLowerCase();
var valB = $(b).find("span").text().toLowerCase(); var valB = $(b).find("span").text().toLowerCase();
...@@ -257,7 +260,6 @@ var Util = { ...@@ -257,7 +260,6 @@ var Util = {
return window.document.body.clientHeight; return window.document.body.clientHeight;
} }
}; };
if (!Cookie) { if (!Cookie) {
/** /**
* @description Cookie 相关操作 * @description Cookie 相关操作
......
...@@ -13,4 +13,4 @@ ...@@ -13,4 +13,4 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
var Util={error:function(){$("#tipMsg").text("Error: "+arguments[0]+" File: "+arguments[1]+"\nLine: "+arguments[2]+" please report this issue on https://github.com/b3log/b3log-solo/issues/new");$("#loadMsg").text("")},killIE:function(){if($.browser.msie){if($.browser.version==="6.0"||$.browser.version==="7.0"){window.location=latkeConfig.servePath+"/kill-browser.html";return}if(window.external&&window.external.twGetRunPath){var path=external.twGetRunPath();if(path&&path.toLowerCase().indexOf("360se")>-1&&window.location.href.indexOf("admin-index")>-1){window.location=latkeConfig.servePath+"/kill-browser.html";return}}}},replaceEmString:function(str){var commentSplited=str.split("[em");if(commentSplited.length===1){return str}str=commentSplited[0];for(var j=1;j<commentSplited.length;j++){var key=commentSplited[j].substr(0,2);str+="<img src='"+latkeConfig.staticServePath+"/skins/"+Label.skinDirName+"/images/emotions/em"+key+".png' alt='"+Label["em"+key+"Label"]+"' title='"+Label["em"+key+"Label"]+"'/>"+commentSplited[j].substr(3)}return str},proessURL:function(url){if(!/^\w+:\/\//.test(url)){url="http://"+url}return url},switchMobile:function(skin){Cookie.createCookie("btouch_switch_toggle",skin,365);setTimeout(function(){location.reload()},1250)},setTopBar:function(){var $top=$("#top");if($top.length===1){var $showTop=$("#showTop");$showTop.click(function(){$top.slideDown();$showTop.hide()});$("#hideTop").click(function(){$top.slideUp();$showTop.show()})}},goTop:function(){var acceleration=acceleration||0.1;var y=$(window).scrollTop();var speed=1+acceleration;window.scrollTo(0,Math.floor(y/speed));if(y>0){var invokeFunction="Util.goTop("+acceleration+")";window.setTimeout(invokeFunction,16)}},goBottom:function(bottom){if(!bottom){bottom=0}window.scrollTo(0,$("body").height()-$(window).height()-bottom)},init:function(){Util.killIE();Util.setTopBar()},clearCache:function(all){var data="";if(all==="all"){data='{"all": "all", "URI": ""}'}else{data='{"all": "all", "URI": "'+window.location.pathname+'"}'}$.ajax({type:"POST",url:latkeConfig.servePath+"/clear-cache.do",cache:false,contentType:"application/json",data:data,success:function(result){window.location.reload()}})},replaceSideEm:function(comments){for(var i=0;i<comments.length;i++){var $comment=$(comments[i]);$comment.html(Util.replaceEmString($comment.html()))}},buildTags:function(id){id=id||"tags";var classes=["tags1","tags2","tags3","tags4","tags5"],bList=$("#"+id+" b").get();var max=parseInt($("#"+id+" b").last().text());var distance=Math.ceil(max/classes.length);for(var i=0;i<bList.length;i++){var num=parseInt(bList[i].innerHTML);for(var j=0;j<classes.length;j++){if(num>j*distance&&num<=(j+1)*distance){bList[i].parentNode.className=classes[j];break}}}$("#"+id).html($("#"+id+" li").get().sort(function(a,b){var valA=$(a).find("span").text().toLowerCase();var valB=$(b).find("span").text().toLowerCase();return valA.localeCompare(valB)}))},toDate:function(time,format){var dateTime=new Date(time);var o={"M+":dateTime.getMonth()+1,"d+":dateTime.getDate(),"H+":dateTime.getHours(),"m+":dateTime.getMinutes(),"s+":dateTime.getSeconds(),"q+":Math.floor((dateTime.getMonth()+3)/3),S:dateTime.getMilliseconds()};if(/(y+)/.test(format)){format=format.replace(RegExp.$1,(dateTime.getFullYear()+"").substr(4-RegExp.$1.length))}for(var k in o){if(new RegExp("("+k+")").test(format)){format=format.replace(RegExp.$1,RegExp.$1.length==1?o[k]:("00"+o[k]).substr((""+o[k]).length))}}return format},getWinHeight:function(){if(window.innerHeight){return window.innerHeight}if(document.compatMode==="CSS1Compat"){return window.document.documentElement.clientHeight}return window.document.body.clientHeight}};if(!Cookie){var Cookie={readCookie:function(name){var nameEQ=name+"=";var ca=document.cookie.split(";");for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==" "){c=c.substring(1,c.length)}if(c.indexOf(nameEQ)==0){return decodeURIComponent(c.substring(nameEQ.length,c.length))}}return""},eraseCookie:function(name){this.createCookie(name,"",-1)},createCookie:function(name,value,days){var expires="";if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));expires="; expires="+date.toGMTString()}document.cookie=name+"="+encodeURIComponent(value)+expires+"; path=/"}}}; var Util={error:function(){$("#tipMsg").text("Error: "+arguments[0]+" File: "+arguments[1]+"\nLine: "+arguments[2]+" please report this issue on https://github.com/b3log/b3log-solo/issues/new");$("#loadMsg").text("")},killIE:function(){var addKillPanel=function(){if(Cookie.readCookie("showKill")===""){var left=($(window).width()-701)/2,top=($(window).height()-420)/2;$("body").append("<div style='display: block; height: 100%; width: 100%; position: fixed; background-color: rgb(0, 0, 0); opacity: 0.6; top: 0px;z-index:11'></div><iframe style='left:"+left+"px;z-index:20;top: "+top+"px; position: fixed; border: 0px none; width: 701px; height: 420px;' src='"+latkeConfig.servePath+"/kill-browser.html'></iframe>")}};if($.browser.msie){if($.browser.version==="6.0"||$.browser.version==="7.0"){addKillPanel();return}if(window.external&&window.external.twGetRunPath){var path=external.twGetRunPath();if(path&&path.toLowerCase().indexOf("360se")>-1&&window.location.href.indexOf("admin-index")>-1){addKillPanel();return}}}},replaceEmString:function(str){var commentSplited=str.split("[em");if(commentSplited.length===1){return str}str=commentSplited[0];for(var j=1;j<commentSplited.length;j++){var key=commentSplited[j].substr(0,2);str+="<img src='"+latkeConfig.staticServePath+"/skins/"+Label.skinDirName+"/images/emotions/em"+key+".png' alt='"+Label["em"+key+"Label"]+"' title='"+Label["em"+key+"Label"]+"'/>"+commentSplited[j].substr(3)}return str},proessURL:function(url){if(!/^\w+:\/\//.test(url)){url="http://"+url}return url},switchMobile:function(skin){Cookie.createCookie("btouch_switch_toggle",skin,365);setTimeout(function(){location.reload()},1250)},setTopBar:function(){var $top=$("#top");if($top.length===1){var $showTop=$("#showTop");$showTop.click(function(){$top.slideDown();$showTop.hide()});$("#hideTop").click(function(){$top.slideUp();$showTop.show()})}},goTop:function(){var acceleration=acceleration||0.1;var y=$(window).scrollTop();var speed=1+acceleration;window.scrollTo(0,Math.floor(y/speed));if(y>0){var invokeFunction="Util.goTop("+acceleration+")";window.setTimeout(invokeFunction,16)}},goBottom:function(bottom){if(!bottom){bottom=0}window.scrollTo(0,$("body").height()-$(window).height()-bottom)},init:function(){Util.killIE();Util.setTopBar()},clearCache:function(all){var data="";if(all==="all"){data='{"all": "all", "URI": ""}'}else{data='{"all": "all", "URI": "'+window.location.pathname+'"}'}$.ajax({type:"POST",url:latkeConfig.servePath+"/clear-cache.do",cache:false,contentType:"application/json",data:data,success:function(result){window.location.reload()}})},replaceSideEm:function(comments){for(var i=0;i<comments.length;i++){var $comment=$(comments[i]);$comment.html(Util.replaceEmString($comment.html()))}},buildTags:function(id){id=id||"tags";var classes=["tags1","tags2","tags3","tags4","tags5"],bList=$("#"+id+" b").get();var max=parseInt($("#"+id+" b").last().text());var distance=Math.ceil(max/classes.length);for(var i=0;i<bList.length;i++){var num=parseInt(bList[i].innerHTML);for(var j=0;j<classes.length;j++){if(num>j*distance&&num<=(j+1)*distance){bList[i].parentNode.className=classes[j];break}}}$("#"+id).html($("#"+id+" li").get().sort(function(a,b){var valA=$(a).find("span").text().toLowerCase();var valB=$(b).find("span").text().toLowerCase();return valA.localeCompare(valB)}))},toDate:function(time,format){var dateTime=new Date(time);var o={"M+":dateTime.getMonth()+1,"d+":dateTime.getDate(),"H+":dateTime.getHours(),"m+":dateTime.getMinutes(),"s+":dateTime.getSeconds(),"q+":Math.floor((dateTime.getMonth()+3)/3),S:dateTime.getMilliseconds()};if(/(y+)/.test(format)){format=format.replace(RegExp.$1,(dateTime.getFullYear()+"").substr(4-RegExp.$1.length))}for(var k in o){if(new RegExp("("+k+")").test(format)){format=format.replace(RegExp.$1,RegExp.$1.length==1?o[k]:("00"+o[k]).substr((""+o[k]).length))}}return format},getWinHeight:function(){if(window.innerHeight){return window.innerHeight}if(document.compatMode==="CSS1Compat"){return window.document.documentElement.clientHeight}return window.document.body.clientHeight}};if(!Cookie){var Cookie={readCookie:function(name){var nameEQ=name+"=";var ca=document.cookie.split(";");for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==" "){c=c.substring(1,c.length)}if(c.indexOf(nameEQ)==0){return decodeURIComponent(c.substring(nameEQ.length,c.length))}}return""},eraseCookie:function(name){this.createCookie(name,"",-1)},createCookie:function(name,value,days){var expires="";if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));expires="; expires="+date.toGMTString()}document.cookie=name+"="+encodeURIComponent(value)+expires+"; path=/"}}};
\ No newline at end of file \ No newline at end of file
...@@ -17,14 +17,17 @@ ...@@ -17,14 +17,17 @@
<body> <body>
<div class="wrapper"> <div class="wrapper">
<div class="wrap"> <div class="wrap">
<div class="content"> <div class="content" style="top:-6px">
<div class="logo"> <div class="logo">
<a href="http://b3log.org" target="_blank"> <a href="http://b3log.org" target="_blank">
<img border="0" width="153" height="56" alt="B3log" title="B3log" src="${staticServePath}/images/logo.jpg"/> <img border="0" width="153" height="56" alt="B3log" title="B3log" src="${staticServePath}/images/logo.jpg"/>
</a> </a>
</div> </div>
<div class="main kill"> <div class="main kill" style="height: 385px;">
${killBrowserLabel} ${killBrowserLabel}
<br/>
&nbsp; &nbsp;&nbsp; <button onclick="closeIframe();">${closeLabel}</button> &nbsp; &nbsp;
<button onclick="closeIframeForever();">${closeForeverLabel}</button>
<img src='${staticServePath}/images/kill-browser.png' title='Kill IE6' alt='Kill IE6'/> <img src='${staticServePath}/images/kill-browser.png' title='Kill IE6' alt='Kill IE6'/>
<a href="http://b3log.org" target="_blank"> <a href="http://b3log.org" target="_blank">
<img border="0" class="icon" alt="B3log" title="B3log" src="${staticServePath}/favicon.png"/> <img border="0" class="icon" alt="B3log" title="B3log" src="${staticServePath}/favicon.png"/>
...@@ -33,17 +36,17 @@ ...@@ -33,17 +36,17 @@
<span class="clear"></span> <span class="clear"></span>
</div> </div>
</div> </div>
<div class="footerWrapper">
<div class="footer">
&copy; ${year} - <a href="${servePath}">${blogTitle}</a><br/>
Powered by
<a href="http://b3log.org" target="_blank">
${b3logLabel}&nbsp;
<span class="solo">Solo</span></a>,
ver ${version}
</div>
</div>
</div> </div>
<script>
var closeIframe = function () {
window.parent.$("iframe").prev().remove();
window.parent.$("iframe").remove();
};
var closeIframeForever = function () {
window.parent.Cookie.createCookie("showKill", true, 365);
closeIframe();
};
</script>
</body> </body>
</html> </html>
...@@ -296,6 +296,7 @@ var MetroHot = { ...@@ -296,6 +296,7 @@ var MetroHot = {
(function() { (function() {
MetroHot.init(); MetroHot.init();
Util.killIE();
if ($(".article-header").length > 0) { if ($(".article-header").length > 0) {
MetroHot.share(); MetroHot.share();
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment