Commit 0672b0cd authored by Liang Ding's avatar Liang Ding

🐛 Fix #12824

parent 5ac9b731
......@@ -15,11 +15,13 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.b3log.solo.plugin.list;
package org.b3log.solo.plugin;
import org.apache.commons.lang.StringUtils;
import org.b3log.latke.event.AbstractEventListener;
import org.b3log.latke.event.Event;
import org.b3log.latke.plugin.NotInteractivePlugin;
import org.b3log.latke.servlet.RequestContext;
import org.b3log.solo.event.EventTypes;
import org.b3log.solo.model.Article;
import org.json.JSONObject;
......@@ -31,17 +33,43 @@ import org.jsoup.select.Elements;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* List (table of contents of an article) handler.
* ToC event handler.
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 2.0.0.0, Jul 29, 2019
* @since 0.6.7
*/
public class ToCPlugin extends NotInteractivePlugin {
/**
* Public constructor.
*/
public ToCPlugin() {
addEventListener(new ToCEventHandler());
}
@Override
public void prePlug(RequestContext context) {
}
@Override
public void postPlug(Map<String, Object> dataModel, RequestContext context) {
}
}
/**
* ToC event handler.
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @author <a href="http://www.annpeter.cn">Ann Peter</a>
* @author <a href="http://vanessa.b3log.org">Vanessa</a>
* @version 1.0.2.2, Mar 19, 2019
* @version 2.0.0.0, Jul 29, 2019
* @since 0.6.7
*/
public class ListHandler extends AbstractEventListener<JSONObject> {
class ToCEventHandler extends AbstractEventListener<JSONObject> {
@Override
public String getEventType() {
......
......@@ -18,7 +18,7 @@
#
# Description: Description of plugin kanbanniang.
# Version: 1.0.0.0, Jul 5, 2018
# Version: 1.0.0.1, Jul 29, 2019
# Author: Liyuan Li
#
rendererId=footer.ftl
......@@ -26,8 +26,4 @@ author=<a href="http://vanessa.b3log.org">Vanessa</a>
name=\u770B\u677F\u5A18
version=0.0.1
types=PUBLIC
classesDirPath=/WEB-INF/classes/
pluginClass=
eventListenerClasses=
\ No newline at end of file
pluginClass=org.b3log.latke.plugin.NotInteractivePlugin
......@@ -18,7 +18,7 @@
#
# Description: Table of contents generator.
# Version: 1.0.0.1, Mar 19, 2019
# Version: 1.0.0.2, Jul 29, 2019
# Author: Liang Ding
#
rendererId=footer.ftl
......@@ -26,8 +26,4 @@ author=<a href="http://88250.b3log.org">88250</a>
name=Table of Contents Generator
version=1.0.1
types=PUBLIC
classesDirPath=/WEB-INF/classes/
pluginClass=
eventListenerClasses=org.b3log.solo.plugin.list.ListHandler
\ No newline at end of file
pluginClass=org.b3log.solo.plugin.ToCPlugin
......@@ -18,7 +18,7 @@
#
# Description: Description of plugin symphony-interest.
# Version: 1.0.0.0, Dec 17, 2015
# Version: 1.0.0.1, Jul 29, 2019
# Author: Liang Ding
#
rendererId=admin-main.ftl
......@@ -26,8 +26,4 @@ author=<a href="http://88250.b3log.org">88250</a>
name=Symphony Interest
version=0.0.1
types=ADMIN
classesDirPath=/WEB-INF/classes/
pluginClass=
eventListenerClasses=
\ No newline at end of file
pluginClass=org.b3log.latke.plugin.NotInteractivePlugin
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