Commit bb579d46 authored by Liang Ding's avatar Liang Ding

Merge remote-tracking branch 'refs/remotes/origin/2.2.0-dev'

parents 12fb9e78 d1bd1eb2
...@@ -61,7 +61,7 @@ import java.util.List; ...@@ -61,7 +61,7 @@ import java.util.List;
* *
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @author <a href="https://github.com/feroozkhanchintu">feroozkhanchintu</a> * @author <a href="https://github.com/feroozkhanchintu">feroozkhanchintu</a>
* @version 1.1.0.6, Sep 28, 2016 * @version 1.1.0.6, Jun 11, 2017
* @since 0.3.1 * @since 0.3.1
*/ */
@RequestProcessor @RequestProcessor
...@@ -70,7 +70,7 @@ public class FeedProcessor { ...@@ -70,7 +70,7 @@ public class FeedProcessor {
/** /**
* Logger. * Logger.
*/ */
private static final Logger LOGGER = Logger.getLogger(FeedProcessor.class.getName()); private static final Logger LOGGER = Logger.getLogger(FeedProcessor.class);
/** /**
* Article query service. * Article query service.
...@@ -172,7 +172,7 @@ public class FeedProcessor { ...@@ -172,7 +172,7 @@ public class FeedProcessor {
} }
private Entry getEntry(final boolean hasMultipleUsers, String authorName, final JSONArray articles, private Entry getEntry(final boolean hasMultipleUsers, String authorName, final JSONArray articles,
final boolean isFullContent, int i) final boolean isFullContent, int i)
throws org.json.JSONException, org.b3log.latke.service.ServiceException { throws org.json.JSONException, org.b3log.latke.service.ServiceException {
final JSONObject article = articles.getJSONObject(i); final JSONObject article = articles.getJSONObject(i);
final Entry ret = new Entry(); final Entry ret = new Entry();
...@@ -211,27 +211,22 @@ public class FeedProcessor { ...@@ -211,27 +211,22 @@ public class FeedProcessor {
@RequestProcessing(value = {"/tag-articles-feed.do"}, method = {HTTPRequestMethod.GET, HTTPRequestMethod.HEAD}) @RequestProcessing(value = {"/tag-articles-feed.do"}, method = {HTTPRequestMethod.GET, HTTPRequestMethod.HEAD})
public void tagArticlesAtom(final HTTPRequestContext context) throws IOException { public void tagArticlesAtom(final HTTPRequestContext context) throws IOException {
final AtomRenderer renderer = new AtomRenderer(); final AtomRenderer renderer = new AtomRenderer();
context.setRenderer(renderer); context.setRenderer(renderer);
final HttpServletRequest request = context.getRequest(); final HttpServletRequest request = context.getRequest();
final HttpServletResponse response = context.getResponse(); final HttpServletResponse response = context.getResponse();
final String queryString = request.getQueryString(); final String tagId = request.getParameter(Keys.OBJECT_ID);
if (Strings.isEmptyOrNull(tagId)) {
response.sendError(HttpServletResponse.SC_NOT_FOUND);
if (Strings.isEmptyOrNull(queryString)) {
response.sendError(HttpServletResponse.SC_BAD_REQUEST);
return; return;
} }
final String oIdMap = queryString.split("&")[0];
final String tagId = oIdMap.split("=")[1];
final Feed feed = new Feed(); final Feed feed = new Feed();
try { try {
final JSONObject tag = tagRepository.get(tagId); final JSONObject tag = tagRepository.get(tagId);
if (null == tag) { if (null == tag) {
response.sendError(HttpServletResponse.SC_NOT_FOUND); response.sendError(HttpServletResponse.SC_NOT_FOUND);
return; return;
...@@ -305,7 +300,7 @@ public class FeedProcessor { ...@@ -305,7 +300,7 @@ public class FeedProcessor {
} }
private Entry getEntryForArticle(final List<JSONObject> articles, final boolean hasMultipleUsers, String authorName, private Entry getEntryForArticle(final List<JSONObject> articles, final boolean hasMultipleUsers, String authorName,
final boolean isFullContent, int i) final boolean isFullContent, int i)
throws org.json.JSONException, org.b3log.latke.service.ServiceException { throws org.json.JSONException, org.b3log.latke.service.ServiceException {
final JSONObject article = articles.get(i); final JSONObject article = articles.get(i);
final Entry ret = new Entry(); final Entry ret = new Entry();
...@@ -343,14 +338,12 @@ public class FeedProcessor { ...@@ -343,14 +338,12 @@ public class FeedProcessor {
public void blogArticlesRSS(final HTTPRequestContext context) { public void blogArticlesRSS(final HTTPRequestContext context) {
final HttpServletResponse response = context.getResponse(); final HttpServletResponse response = context.getResponse();
final RssRenderer renderer = new RssRenderer(); final RssRenderer renderer = new RssRenderer();
context.setRenderer(renderer); context.setRenderer(renderer);
final Channel channel = new Channel(); final Channel channel = new Channel();
try { try {
final JSONObject preference = preferenceQueryService.getPreference(); final JSONObject preference = preferenceQueryService.getPreference();
if (null == preference) { if (null == preference) {
response.sendError(HttpServletResponse.SC_NOT_FOUND); response.sendError(HttpServletResponse.SC_NOT_FOUND);
return; return;
...@@ -409,7 +402,7 @@ public class FeedProcessor { ...@@ -409,7 +402,7 @@ public class FeedProcessor {
} }
private Item getItem(final JSONArray articles, final boolean hasMultipleUsers, String authorName, private Item getItem(final JSONArray articles, final boolean hasMultipleUsers, String authorName,
final boolean isFullContent, int i) final boolean isFullContent, int i)
throws org.json.JSONException, org.b3log.latke.service.ServiceException { throws org.json.JSONException, org.b3log.latke.service.ServiceException {
final JSONObject article = articles.getJSONObject(i); final JSONObject article = articles.getJSONObject(i);
final Item ret = new Item(); final Item ret = new Item();
...@@ -453,24 +446,19 @@ public class FeedProcessor { ...@@ -453,24 +446,19 @@ public class FeedProcessor {
final HttpServletRequest request = context.getRequest(); final HttpServletRequest request = context.getRequest();
final RssRenderer renderer = new RssRenderer(); final RssRenderer renderer = new RssRenderer();
context.setRenderer(renderer); context.setRenderer(renderer);
final String queryString = request.getQueryString(); final String tagId = request.getParameter(Keys.OBJECT_ID);
if (Strings.isEmptyOrNull(tagId)) {
response.sendError(HttpServletResponse.SC_NOT_FOUND);
if (Strings.isEmptyOrNull(queryString)) {
response.sendError(HttpServletResponse.SC_BAD_REQUEST);
return; return;
} }
final String oIdMap = queryString.split("&")[0];
final String tagId = oIdMap.split("=")[1];
final Channel channel = new Channel(); final Channel channel = new Channel();
try { try {
final JSONObject tag = tagRepository.get(tagId); final JSONObject tag = tagRepository.get(tagId);
if (null == tag) { if (null == tag) {
response.sendError(HttpServletResponse.SC_NOT_FOUND); response.sendError(HttpServletResponse.SC_NOT_FOUND);
return; return;
...@@ -549,7 +537,7 @@ public class FeedProcessor { ...@@ -549,7 +537,7 @@ public class FeedProcessor {
} }
private Item getItemForArticles(final List<JSONObject> articles, final boolean hasMultipleUsers, String authorName, private Item getItemForArticles(final List<JSONObject> articles, final boolean hasMultipleUsers, String authorName,
final boolean isFullContent, int i) final boolean isFullContent, int i)
throws org.json.JSONException, org.b3log.latke.service.ServiceException { throws org.json.JSONException, org.b3log.latke.service.ServiceException {
final JSONObject article = articles.get(i); final JSONObject article = articles.get(i);
final Item ret = new Item(); final Item ret = new Item();
......
This diff is collapsed.
/**
* Copyright (c) 2010-2017, b3log.org & hacpai.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
html,body,div,ul,li,h1,h2,h3,h4,h5,h6,p,dd,dl,ol{margin:0;padding:0}body{background-color:#FFF;color:#000;font-family:elvetica,Arial,'sans-serif','\5fae\8f6f\96c5\9ed1';font-size:small}img{border:medium none;margin:0;padding:0;vertical-align:middle}h1{font-size:160%}h2{font-size:140%}h3{font-size:120%}h4{font-size:110%}textarea{overflow:auto}button,.button{background:url(../images/icon.png) repeat center bottom;border:1px solid;border-color:#CCC #bbb #a0a0a0;border-radius:4px;height:28px;margin:0;padding:0 6px;vertical-align:top}button:hover,.button:hover{border-color:#BBB}.padding12{padding:12px}.paddingBottom12{padding-bottom:12px !important}.paddingTop12{padding-top:12px !important}.margin12{margin:12px}.marginTop12{margin-top:12px !important}.marginBottom12{margin-bottom:12px !important}.marginLeft12{margin-left:12px !important}.marginLeft6{margin-left:6px !important}.marginRight12{margin-right:12px !important}.f-bold{font-weight:bold !important}.nowrap{white-space:nowrap}.left{float:left}.right{float:right}.clear{background-color:transparent;border:0;clear:both;display:block;font-size:0;height:0;line-height:0;overflow:hidden}.fn-clear:before,.fn-clear:after{display:table;content:""}.fn-clear:after{clear:both}.none{display:none}.pointer{cursor:pointer}.no-underline{text-decoration:none !important}.red{color:red}.contentBody{margin-bottom:12px;padding:3px 12px}.form th{text-align:right;white-space:nowrap}.form input[type='text'],.form input[type='password'],.form textarea{border-color:#c0c0c0 #d9d9d9 #d9d9d9;border-right:1px solid #d9d9d9;border-style:solid;border-width:1px;font-family:Helvetica,Arial,sans-serif;font-size:12px;outline:medium none;width:99%;padding:0 3px}.form input{height:24px}.form input[type='checkbox']{border:0;vertical-align:middle}.form input.normalInput{width:auto}.form input[type='checkbox']:focus{border:0}.form input:focus,.form textarea:focus{box-shadow:0 1px 2px rgba(0,0,0,0.3) inset}.form textarea{padding:3px;overflow:auto;resize:vertical}.logo{padding:0 5px;text-decoration:none;text-shadow:0 0 1px #eee}.putTopIcon,.notPutTopIcon,.deleteIcon,.updateIcon,.commentIcon,.homeIcon,.adminIcon,.loginIcon,.logoutIcon,.calendarIcon,.browserIcon,.postIcon,.articlesIcon,.draftsIcon,.usersIcon,.linkIcon,.preferenceIcon,.pageIcon,.trueIcon,.falseIcon,.fileIcon,.othersIcon,.goTopIcon,.goBottomIcon,.cacheIcon,.aboutIcon{background-image:url("../images/icon.png");cursor:pointer;height:16px;width:16px}.adminIcon,.loginIcon,.logoutIcon,.homeIcon{margin-top:3px}.pageIcon{background-position:-144px 0}.postIcon{background-position:-16px 0}.linkIcon{background-position:-32px 0}.preferenceIcon{background-position:-48px 0}.articlesIcon{background-position:-64px 0}.trueIcon{background-position:-80px 0;cursor:auto}.falseIcon{background-position:-96px 0;cursor:auto}.fileIcon{background-position:-112px 0}.deleteIcon{background-position:0 -16px}.updateIcon{background-position:-16px -16px}.commentIcon{background-position:-32px -16px}.homeIcon{background-position:-64px -16px}.adminIcon{background-position:-80px -16px}.logoutIcon{background-position:-96px -16px}.loginIcon{background-position:-112px -16px}.browserIcon{background-position:-128px -16px}.calendarIcon{background-position:-144px -16px}.putTopIcon{background-position:-16px -32px;float:left}.notPutTopIcon{background-position:-32px -32px;float:left}.othersIcon{background-position:-48px -32px}.cacheIcon{background-position:-96px -32px}.draftsIcon{background-position:-96px -32px}.usersIcon{background-position:-112px -32px}.goTopIcon{background-position:-64px -32px;position:fixed;right:20px;top:45%}.goBottomIcon{background-position:-80px -32px;bottom:40%;position:fixed;right:20px}.article-body{overflow:hidden;line-height:145%;word-wrap:break-word}.article-body blockquote{border:1px dotted #98a47f;font-style:italic;margin:12px;padding:12px}.article-body h1{font-size:2em;margin:.67em 0}.article-body h2{font-size:1.5em;margin:.75em 0}.article-body h3{font-size:1.17em;margin:.83em 0}.article-body h4,.article-body p,.article-body blockquote,.article-body ul,.article-body fieldset,.article-body form,.article-body ol,.article-body dl,.article-body dir,.article-body menu{margin:1.12em 0}.article-body h5{font-size:.83em;margin:1.5em 0}.article-body h6{font-size:.75em;margin:1.67em 0}.article-body blockquote{margin-left:40px;margin-right:40px}.article-body ol,.article-body ul,.article-body dir,.article-body menu,.article-body dd{margin-left:40px}.em00,.em01,.em02,.em03,.em04,.em05,.em06,.em07,.em08,.em09,.em10,.em11,.em12,.em13,.em14{background-image:url("../images/emotions/emotions.png");background-size:120px;float:left;height:24px;margin-right:5px;width:24px}#emotions span{cursor:pointer}.em01{background-position:-24px 0}.em02{background-position:-48px 0}.em03{background-position:-72px 0}.em04{background-position:-96px 0}.em05{background-position:0 -24px}.em06{background-position:-24px -24px}.em07{background-position:-48px -24px}.em08{background-position:-72px -24px}.em09{background-position:-96px -24px}.em10{background-position:0 -48px}.em11{background-position:-24px -48px}.em12{background-position:-48px -48px}.em13{background-position:-72px -48px}.em14{background-position:-96px -48px}#tags{list-style:none}#tags li{float:left;list-style:none;height:38px}#tags a:hover{text-shadow:0 0 2px #555}#tags a{border-radius:3px 3px 3px 3px;box-shadow:1px 1px 3px #555;float:left;margin:3px 6px;padding:3px 12px;text-decoration:none}#tags .tags1{font-size:12px;font-weight:normal}#tags .tags2{font-size:14px;font-weight:normal}#tags .tags3{font-size:16px;font-weight:normal}#tags .tags4{font-size:18px;font-weight:bold}#tags .tags5{font-size:20px;font-weight:bold}#captcha,#captchaReply{cursor:pointer} html,body,div,ul,li,h1,h2,h3,h4,h5,h6,p,dd,dl,ol{margin:0;padding:0}body{background-color:#FFF;color:#000;font-family:elvetica,Arial,'sans-serif','\5fae\8f6f\96c5\9ed1';font-size:small}img{border:medium none;margin:0;padding:0;vertical-align:middle}h1{font-size:160%}h2{font-size:140%}h3{font-size:120%}h4{font-size:110%}textarea{overflow:auto}button,.button{background:url(../images/icon.png) repeat center bottom;border:1px solid;border-color:#CCC #bbb #a0a0a0;border-radius:4px;height:28px;margin:0;padding:0 6px;vertical-align:top}button:hover,.button:hover{border-color:#BBB}.padding12{padding:12px}.paddingBottom12{padding-bottom:12px !important}.paddingTop12{padding-top:12px !important}.margin12{margin:12px}.marginTop12{margin-top:12px !important}.marginBottom12{margin-bottom:12px !important}.marginLeft12{margin-left:12px !important}.marginLeft6{margin-left:6px !important}.marginRight12{margin-right:12px !important}.f-bold{font-weight:bold !important}.nowrap{white-space:nowrap}.left{float:left}.right{float:right}.clear{background-color:transparent;border:0;clear:both;display:block;font-size:0;height:0;line-height:0;overflow:hidden}.fn-clear:before,.fn-clear:after{display:table;content:""}.fn-clear:after{clear:both}.none{display:none}.pointer{cursor:pointer}.no-underline{text-decoration:none !important}.red{color:red}.contentBody{margin-bottom:12px;padding:3px 12px}.form th{text-align:right;white-space:nowrap}.form input[type='text'],.form input[type='password'],.form textarea{border-color:#c0c0c0 #d9d9d9 #d9d9d9;border-right:1px solid #d9d9d9;border-style:solid;border-width:1px;font-family:Helvetica,Arial,sans-serif;font-size:12px;outline:medium none;width:99%;padding:0 3px}.form input{height:24px}.form input[type='checkbox']{border:0;vertical-align:middle}.form input.normalInput{width:auto}.form input[type='checkbox']:focus{border:0}.form input:focus,.form textarea:focus{box-shadow:0 1px 2px rgba(0,0,0,0.3) inset}.form textarea{padding:3px;overflow:auto;resize:vertical}.logo{padding:0 5px;text-decoration:none;text-shadow:0 0 1px #eee}.putTopIcon,.notPutTopIcon,.deleteIcon,.updateIcon,.commentIcon,.homeIcon,.adminIcon,.loginIcon,.logoutIcon,.calendarIcon,.browserIcon,.postIcon,.articlesIcon,.draftsIcon,.usersIcon,.linkIcon,.preferenceIcon,.pageIcon,.trueIcon,.falseIcon,.fileIcon,.othersIcon,.goTopIcon,.goBottomIcon,.cacheIcon,.aboutIcon{background-image:url("../images/icon.png");cursor:pointer;height:16px;width:16px}.adminIcon,.loginIcon,.logoutIcon,.homeIcon{margin-top:3px}.pageIcon{background-position:-144px 0}.postIcon{background-position:-16px 0}.linkIcon{background-position:-32px 0}.preferenceIcon{background-position:-48px 0}.articlesIcon{background-position:-64px 0}.trueIcon{background-position:-80px 0;cursor:auto}.falseIcon{background-position:-96px 0;cursor:auto}.fileIcon{background-position:-112px 0}.deleteIcon{background-position:0 -16px}.updateIcon{background-position:-16px -16px}.commentIcon{background-position:-32px -16px}.homeIcon{background-position:-64px -16px}.adminIcon{background-position:-80px -16px}.logoutIcon{background-position:-96px -16px}.loginIcon{background-position:-112px -16px}.browserIcon{background-position:-128px -16px}.calendarIcon{background-position:-144px -16px}.putTopIcon{background-position:-16px -32px;float:left}.notPutTopIcon{background-position:-32px -32px;float:left}.othersIcon{background-position:-48px -32px}.cacheIcon{background-position:-96px -32px}.draftsIcon{background-position:-96px -32px}.usersIcon{background-position:-112px -32px}.goTopIcon{background-position:-64px -32px;position:fixed;right:20px;top:45%}.goBottomIcon{background-position:-80px -32px;bottom:40%;position:fixed;right:20px}.article-body{overflow:hidden;line-height:145%;word-wrap:break-word}.article-body blockquote{border:1px dotted #98a47f;font-style:italic;margin:12px;padding:12px}.article-body h1{font-size:2em;margin:.67em 0}.article-body h2{font-size:1.5em;margin:.75em 0}.article-body h3{font-size:1.17em;margin:.83em 0}.article-body h4,.article-body p,.article-body blockquote,.article-body ul,.article-body fieldset,.article-body form,.article-body ol,.article-body dl,.article-body dir,.article-body menu{margin:1.12em 0}.article-body h5{font-size:.83em;margin:1.5em 0}.article-body h6{font-size:.75em;margin:1.67em 0}.article-body blockquote{margin-left:40px;margin-right:40px}.article-body ol,.article-body ul,.article-body dir,.article-body menu,.article-body dd{margin-left:40px}.em00,.em01,.em02,.em03,.em04,.em05,.em06,.em07,.em08,.em09,.em10,.em11,.em12,.em13,.em14{background-image:url("../images/emotions/emotions.png");background-size:120px;float:left;height:24px;margin-right:5px;width:24px}#emotions span{cursor:pointer}.em01{background-position:-24px 0}.em02{background-position:-48px 0}.em03{background-position:-72px 0}.em04{background-position:-96px 0}.em05{background-position:0 -24px}.em06{background-position:-24px -24px}.em07{background-position:-48px -24px}.em08{background-position:-72px -24px}.em09{background-position:-96px -24px}.em10{background-position:0 -48px}.em11{background-position:-24px -48px}.em12{background-position:-48px -48px}.em13{background-position:-72px -48px}.em14{background-position:-96px -48px}#tags{list-style:none}#tags li{float:left;list-style:none;height:38px}#tags a:hover{text-shadow:0 0 2px #555}#tags a{border-radius:3px 3px 3px 3px;box-shadow:1px 1px 3px #555;float:left;margin:3px 6px;padding:3px 12px;text-decoration:none}#tags .tags1{font-size:12px;font-weight:normal}#tags .tags2{font-size:14px;font-weight:normal}#tags .tags3{font-size:16px;font-weight:normal}#tags .tags4{font-size:18px;font-weight:bold}#tags .tags5{font-size:20px;font-weight:bold}#captcha,#captchaReply{cursor:pointer}
\ No newline at end of file
/**
* Copyright (c) 2010-2017, b3log.org & hacpai.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
html{height:100%}html,body{margin:0;padding:0}body{background-color:#fff;color:#333;font-family:\5fae\8f6f\96c5\9ed1;font-size:small;height:100%}h2{background-color:#f3f1e5;border-radius:4px 4px 0 0;font-size:16px;margin:0;padding:10px 20px;text-shadow:0 -1px 0 rgba(255,255,255,0.5)}input{border:1px solid #ccc;border-radius:3px 3px 3px 3px;box-shadow:0 1px 2px rgba(0,0,0,0.075) inset;font-size:13px;margin:15px 0;padding:7px 8px;vertical-align:middle;width:410px;font-family:\5fae\8f6f\96c5\9ed1;font-size:small}input:focus{box-shadow:0 1px 2px rgba(0,0,0,0.075) inset,0 0 5px rgbargba(200,200,200,0.9);border:1px solid #e6e5d9}.form{padding:20px}label{font-size:13px}button{position:relative;display:inline-block;font-size:13px;font-weight:700;color:#333;text-shadow:0 1px 0 rgba(255,255,255,0.9);white-space:nowrap;background-color:#eaeaea;background-image:linear-gradient(#fafafa,#eaeaea);background-repeat:repeat-x;border-radius:3px;border:1px solid #ddd;border-bottom-color:#c5c5c5;box-shadow:0 1px 3px rgba(0,0,0,0.075);vertical-align:baseline;cursor:pointer;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-appearance:none;outline:0;padding:7px 15px;margin-top:10px}button:hover,button:active{color:#fff;text-decoration:none;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#3072b3;background-image:linear-gradient(#599bcd,#3072b3);background-repeat:repeat-x}.clear{background-color:transparent;border:0;clear:both;display:block;font-size:0;height:0;line-height:0;overflow:hidden}.none{display:none}.solo{color:orangered;font-weight:bold}.logo{float:left;padding:142px 12px 0;width:217px;text-align:center}.wrap{border-top:5px solid #e6e5d9;padding:110px 0;background-color:#f3f1e5}.content{background-color:#fff;margin:0 auto;width:760px}.main{border-left:1px solid #e6e5d9;float:right;font-size:15px;padding:20px;width:470px;min-height:360px}.main a{text-decoration:none}.main li{margin:6px 0 6px 16px}.footerWrapper{background-color:#fff;border-top:1px solid #e6e5d9;padding:12px 0;text-align:center}.footerWrapper a{text-decoration:none}.article-pwd>div,.article-pwd>form{margin:0 20px}.article-pwd>div{margin-bottom:10px;max-height:264px;overflow:auto;word-wrap:break-word}.a-403,.a-500,.a-404{margin:20px 50px 0 0;text-align:right}.a-403{margin:10px 75px 0 0}.img-500,.img-403,.img-404{max-width:100%;margin:20px 0;padding:0}.a-500{margin:25px 35px 0 0}.a-404{margin:42px 35px 0 0}.kill img{position:absolute;right:40px;top:200px}.kill ul{margin-bottom:50px}.kill p{margin:12px 20px}.kill span{margin-left:20px}#init{position:absolute;width:470px}#init input,.register input{margin:5px 0;padding:5px 8px}.register{height:400px}#sys p{height:206px}#sys{padding:0 20px}#initButton{margin-right:10px}#tip{color:#21759b;font-weight:bold;margin-left:10px}@media(max-width:780px){.wrap{padding:40px 0}.content{width:auto}.logo{display:none}.main{border:0;float:none;width:auto}input{width:100%;box-sizing:border-box;display:block}.a-500,.a-403,.a-404{margin:0 20px 0 0}#init{width:100%;padding:0 20px;box-sizing:border-box;left:0}} html{height:100%}html,body{margin:0;padding:0}body{background-color:#fff;color:#333;font-family:\5fae\8f6f\96c5\9ed1;font-size:small;height:100%}h2{background-color:#f3f1e5;border-radius:4px 4px 0 0;font-size:16px;margin:0;padding:10px 20px;text-shadow:0 -1px 0 rgba(255,255,255,0.5)}input{border:1px solid #ccc;border-radius:3px 3px 3px 3px;box-shadow:0 1px 2px rgba(0,0,0,0.075) inset;font-size:13px;margin:15px 0;padding:7px 8px;vertical-align:middle;width:410px;font-family:\5fae\8f6f\96c5\9ed1;font-size:small}input:focus{box-shadow:0 1px 2px rgba(0,0,0,0.075) inset,0 0 5px rgbargba(200,200,200,0.9);border:1px solid #e6e5d9}.form{padding:20px}label{font-size:13px}button{position:relative;display:inline-block;font-size:13px;font-weight:700;color:#333;text-shadow:0 1px 0 rgba(255,255,255,0.9);white-space:nowrap;background-color:#eaeaea;background-image:linear-gradient(#fafafa,#eaeaea);background-repeat:repeat-x;border-radius:3px;border:1px solid #ddd;border-bottom-color:#c5c5c5;box-shadow:0 1px 3px rgba(0,0,0,0.075);vertical-align:baseline;cursor:pointer;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-appearance:none;outline:0;padding:7px 15px;margin-top:10px}button:hover,button:active{color:#fff;text-decoration:none;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#3072b3;background-image:linear-gradient(#599bcd,#3072b3);background-repeat:repeat-x}.clear{background-color:transparent;border:0;clear:both;display:block;font-size:0;height:0;line-height:0;overflow:hidden}.none{display:none}.solo{color:orangered;font-weight:bold}.logo{float:left;padding:142px 12px 0;width:217px;text-align:center}.wrap{border-top:5px solid #e6e5d9;padding:110px 0;background-color:#f3f1e5}.content{background-color:#fff;margin:0 auto;width:760px}.main{border-left:1px solid #e6e5d9;float:right;font-size:15px;padding:20px;width:470px;min-height:360px}.main a{text-decoration:none}.main li{margin:6px 0 6px 16px}.footerWrapper{background-color:#fff;border-top:1px solid #e6e5d9;padding:12px 0;text-align:center}.footerWrapper a{text-decoration:none}.article-pwd>div,.article-pwd>form{margin:0 20px}.article-pwd>div{margin-bottom:10px;max-height:264px;overflow:auto;word-wrap:break-word}.a-403,.a-500,.a-404{margin:20px 50px 0 0;text-align:right}.a-403{margin:10px 75px 0 0}.img-500,.img-403,.img-404{max-width:100%;margin:20px 0;padding:0}.a-500{margin:25px 35px 0 0}.a-404{margin:42px 35px 0 0}.kill img{position:absolute;right:40px;top:200px}.kill ul{margin-bottom:50px}.kill p{margin:12px 20px}.kill span{margin-left:20px}#init{position:absolute;width:470px}#init input,.register input{margin:5px 0;padding:5px 8px}.register{height:400px}#sys p{height:206px}#sys{padding:0 20px}#initButton{margin-right:10px}#tip{color:#21759b;font-weight:bold;margin-left:10px}@media(max-width:780px){.wrap{padding:40px 0}.content{width:auto}.logo{display:none}.main{border:0;float:none;width:auto}input{width:100%;box-sizing:border-box;display:block}.a-500,.a-403,.a-404{margin:0 20px 0 0}#init{width:100%;padding:0 20px;box-sizing:border-box;left:0}}
\ No newline at end of file
...@@ -1049,7 +1049,7 @@ $.extend(TablePaginate.prototype, { ...@@ -1049,7 +1049,7 @@ $.extend(TablePaginate.prototype, {
* *
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a> * @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.4.6.7, May 21, 2017 * @version 1.4.5.7, May 21, 2017
*/ */
admin.article = { admin.article = {
currentEditorType: '', currentEditorType: '',
......
This diff is collapsed.
/*
* Copyright (c) 2010-2017, b3log.org & hacpai.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var Util={isLoggedIn:function(){if(($("#admin").length===1&&$("#admin").data("login"))||latkeConfig.isLoggedIn==="true"){return true}else{return false}},getUserName:function(){if($("#adminName").length===1){return $("#adminName").text()}else{return latkeConfig.userName}},error:function(){$("#tipMsg").text("Error: "+arguments[0]+" File: "+arguments[1]+"\nLine: "+arguments[2]+" please report this issue on https://github.com/b3log/solo/issues/new");$("#loadMsg").text("")},killIE:function(){var addKillPanel=function(){if(Cookie.readCookie("showKill")===""){var left=($(window).width()-701)/2,top1=($(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: "+top1+"px; position: fixed; border: 0px none; width: 701px; height: 420px;' src='"+latkeConfig.servePath+"/kill-browser'></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 width='20' src='"+latkeConfig.staticServePath+"/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(){$("html, body").animate({scrollTop:0},800)},goBottom:function(bottom){if(!bottom){bottom=0}var wHeight=$("body").height()>$(document).height()?$("body").height():$(document).height();window.scrollTo(0,wHeight-$(window).height()-bottom)},init:function(){Util.killIE();Util.setTopBar()},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={isLoggedIn:function(){if(($("#admin").length===1&&$("#admin").data("login"))||latkeConfig.isLoggedIn==="true"){return true}else{return false}},getUserName:function(){if($("#adminName").length===1){return $("#adminName").text()}else{return latkeConfig.userName}},error:function(){$("#tipMsg").text("Error: "+arguments[0]+" File: "+arguments[1]+"\nLine: "+arguments[2]+" please report this issue on https://github.com/b3log/solo/issues/new");$("#loadMsg").text("")},killIE:function(){var addKillPanel=function(){if(Cookie.readCookie("showKill")===""){var left=($(window).width()-701)/2,top1=($(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: "+top1+"px; position: fixed; border: 0px none; width: 701px; height: 420px;' src='"+latkeConfig.servePath+"/kill-browser'></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 width='20' src='"+latkeConfig.staticServePath+"/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(){$("html, body").animate({scrollTop:0},800)},goBottom:function(bottom){if(!bottom){bottom=0}var wHeight=$("body").height()>$(document).height()?$("body").height():$(document).height();window.scrollTo(0,wHeight-$(window).height()-bottom)},init:function(){Util.killIE();Util.setTopBar()},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
...@@ -377,7 +377,8 @@ $.extend(Page.prototype, { ...@@ -377,7 +377,8 @@ $.extend(Page.prototype, {
dataType: "script", dataType: "script",
cache: true, cache: true,
success: function () { success: function () {
hljs.initHighlightingOnLoad(); hljs.initHighlighting.called = false;
hljs.initHighlighting();
} }
}); });
......
This diff is collapsed.
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