代码提交--标签相关
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
package com.yaoyuan.jiscuss.common;
|
||||
|
||||
import com.yaoyuan.jiscuss.entity.custom.PostCustom;
|
||||
import lombok.Data;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
@@ -7,6 +8,7 @@ import javax.persistence.Column;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author yaoyuan2.chu
|
||||
* @Title:
|
||||
|
||||
@@ -30,22 +30,34 @@ public class PostCommonUtil {
|
||||
}
|
||||
String content = "";
|
||||
if (mapObj.get("content") != null) {
|
||||
if (mapObj.get("content") instanceof Clob) {
|
||||
Clob clob = (Clob) mapObj.get("content");
|
||||
content = PostCommonUtil.clobToString(clob);
|
||||
} else if (mapObj.get("content") instanceof String) {
|
||||
content = String.valueOf(mapObj.get("content"));
|
||||
}
|
||||
}
|
||||
postCustom.setContent(content);
|
||||
String avatar = "";
|
||||
if (mapObj.get("create_avatar") != null) {
|
||||
if (mapObj.get("create_avatar") instanceof Clob) {
|
||||
Clob clob = (Clob) mapObj.get("create_avatar");
|
||||
avatar = PostCommonUtil.clobToString(clob);
|
||||
} else if (mapObj.get("create_avatar") instanceof String) {
|
||||
avatar = String.valueOf(mapObj.get("create_avatar"));
|
||||
}
|
||||
}
|
||||
postCustom.setAvatar(avatar);
|
||||
postCustom.setUsername(mapObj.get("create_username") != null ? String.valueOf(mapObj.get("create_username")) : null);
|
||||
postCustom.setRealname(mapObj.get("create_realname") != null ? String.valueOf(mapObj.get("create_realname")) : null);
|
||||
String avatarReply = "";
|
||||
if (mapObj.get("user_avatar") != null) {
|
||||
if (mapObj.get("user_avatar") instanceof Clob) {
|
||||
Clob clob = (Clob) mapObj.get("user_avatar");
|
||||
avatarReply = PostCommonUtil.clobToString(clob);
|
||||
} else if (mapObj.get("user_avatar") instanceof String) {
|
||||
avatarReply = String.valueOf(mapObj.get("user_avatar"));
|
||||
}
|
||||
}
|
||||
postCustom.setAvatarReply(avatarReply);
|
||||
postCustom.setUsernameReply(mapObj.get("user_username") != null ? String.valueOf(mapObj.get("user_username")) : null);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package com.yaoyuan.jiscuss.config;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
@@ -15,9 +15,9 @@ import org.springframework.security.core.userdetails.UserDetailsService;
|
||||
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
||||
|
||||
/**
|
||||
prePostEnabled :决定Spring Security的前注解是否可用 [@PreAuthorize,@PostAuthorize,..]
|
||||
secureEnabled : 决定是否Spring Security的保障注解 [@Secured] 是否可用
|
||||
jsr250Enabled :决定 JSR-250 annotations 注解[@RolesAllowed..] 是否可用.
|
||||
* prePostEnabled :决定Spring Security的前注解是否可用 [@PreAuthorize,@PostAuthorize,..]
|
||||
* secureEnabled : 决定是否Spring Security的保障注解 [@Secured] 是否可用
|
||||
* jsr250Enabled :决定 JSR-250 annotations 注解[@RolesAllowed..] 是否可用.
|
||||
*/
|
||||
@Configurable
|
||||
@EnableWebSecurity
|
||||
@@ -44,9 +44,11 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter{
|
||||
"/images/**",
|
||||
"/static/**",
|
||||
"/h2-console/**",
|
||||
"/test/**",
|
||||
"/druid/**"
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* http请求设置
|
||||
*/
|
||||
@@ -79,6 +81,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter{
|
||||
.logoutSuccessUrl("/login?logout"); //退出登录成功URL
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 自定义获取用户信息接口
|
||||
*/
|
||||
@@ -89,6 +92,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter{
|
||||
|
||||
/**
|
||||
* 密码加密算法
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Bean
|
||||
|
||||
@@ -20,6 +20,7 @@ public class BaseController {
|
||||
|
||||
/**
|
||||
* 获取当前用户
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
protected UserInfo getUserInfo(HttpServletRequest request) {
|
||||
|
||||
@@ -10,9 +10,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
public class TestController {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 登录页面跳转
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("loginpage")
|
||||
|
||||
@@ -7,8 +7,7 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import com.yaoyuan.jiscuss.entity.*;
|
||||
import com.yaoyuan.jiscuss.entity.custom.DiscussionCustom;
|
||||
import com.yaoyuan.jiscuss.entity.custom.PostCustom;
|
||||
import com.yaoyuan.jiscuss.service.IPostsService;
|
||||
import com.yaoyuan.jiscuss.service.IUsersService;
|
||||
import com.yaoyuan.jiscuss.service.*;
|
||||
import org.json.JSONObject;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -24,9 +23,6 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
import com.yaoyuan.jiscuss.service.IDiscussionsService;
|
||||
import com.yaoyuan.jiscuss.service.ITagsService;
|
||||
|
||||
/**
|
||||
* 主题帖子评论控制器
|
||||
*/
|
||||
@@ -42,6 +38,9 @@ public class UserPostController extends BaseController {
|
||||
@Autowired
|
||||
private ITagsService tagsService;
|
||||
|
||||
@Autowired
|
||||
private IDiscussionsTagsService iDiscussionsTagsService;
|
||||
|
||||
@Autowired
|
||||
private IPostsService postsService;
|
||||
|
||||
@@ -52,7 +51,6 @@ public class UserPostController extends BaseController {
|
||||
//首页查看主题列表(各种条件筛选,最热最新标签等)
|
||||
|
||||
|
||||
|
||||
//查看主题详情
|
||||
@RequestMapping("/getdiscussionsbyid")
|
||||
public String getDiscussionsById(HttpServletRequest request, ModelMap map, @RequestParam("id") Integer id) {
|
||||
@@ -94,23 +92,39 @@ public class UserPostController extends BaseController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
//新建主题
|
||||
@PostMapping(value = "/newdiscussions")
|
||||
@ResponseBody
|
||||
public String newDiscussions(@RequestBody Discussion discussion) {
|
||||
public String newDiscussions(@RequestBody DiscussionCustom discussion) {
|
||||
logger.info(">>> newPost" + discussion);
|
||||
|
||||
ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
|
||||
HttpServletRequest request = servletRequestAttributes.getRequest();
|
||||
UserInfo user = getUserInfo(request);
|
||||
if (user != null) {
|
||||
discussion.setStartUserId(user.getId());
|
||||
discussion.setLastUserId(user.getId());
|
||||
discussion.setCreateId(user.getId());
|
||||
}
|
||||
|
||||
|
||||
discussion.setCreateTime(new Date());
|
||||
discussion.setStartTime(new Date());
|
||||
discussion.setLastTime(new Date());
|
||||
|
||||
Discussion saveDiscussion = discussionsService.insert(discussion);
|
||||
|
||||
if (null != discussion.getTag()) {
|
||||
//执行组装标签
|
||||
String[] strArray = discussion.getTag().split(",");
|
||||
for(String str : strArray){
|
||||
DiscussionTag dtag= new DiscussionTag();
|
||||
dtag.setDiscussionId(saveDiscussion.getId());
|
||||
dtag.setTagId(Integer.parseInt(str));
|
||||
iDiscussionsTagsService.insert(dtag);
|
||||
}
|
||||
}
|
||||
|
||||
JSONObject resultobj = new JSONObject();
|
||||
|
||||
logger.info(">>>{}", saveDiscussion);
|
||||
|
||||
@@ -130,6 +130,12 @@ public class UserSystemController extends BaseController {
|
||||
return pageNumList;
|
||||
}
|
||||
|
||||
//登录页
|
||||
@GetMapping("/test")
|
||||
public String test() {
|
||||
return "test";
|
||||
}
|
||||
|
||||
|
||||
//登录页
|
||||
@GetMapping("/login")
|
||||
|
||||
@@ -2,10 +2,7 @@ package com.yaoyuan.jiscuss.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.*;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@@ -19,9 +16,12 @@ public class Setting implements Serializable{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@Column(name="key")
|
||||
private String key;
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Integer id;
|
||||
|
||||
@Column(name="value")
|
||||
private String value;
|
||||
@Column(name="setting_key")
|
||||
private String settingKey;
|
||||
|
||||
@Column(name="setting_value")
|
||||
private String settingValue;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
package com.yaoyuan.jiscuss.entity.custom;
|
||||
|
||||
import com.yaoyuan.jiscuss.entity.Discussion;
|
||||
import com.yaoyuan.jiscuss.entity.Tag;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author yaoyuan2.chu
|
||||
* @Title:
|
||||
@@ -26,4 +29,9 @@ public class DiscussionCustom extends Discussion {
|
||||
|
||||
private String realnameLast;
|
||||
|
||||
private String tag;
|
||||
|
||||
private List<Tag> tagList;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -66,7 +66,6 @@ public class PostsServiceImpl implements IPostsService {
|
||||
// List<PostCustom> thenpostCustomListNew = PostCommonUtil.getNewPostsObjCustom(thenpostCustomList);
|
||||
|
||||
|
||||
|
||||
//新建一个Node集合。
|
||||
ArrayList<Node> nodes = new ArrayList<>();
|
||||
//将第一层评论都添加都Node集合中
|
||||
@@ -82,8 +81,6 @@ public class PostsServiceImpl implements IPostsService {
|
||||
Node.show(list);
|
||||
|
||||
|
||||
|
||||
|
||||
// List<Map<String, Object>> posts = postsRepository.findPostCustomById(id);
|
||||
//
|
||||
// List<PostCustom> postCustomList = PostCommonUtil.getNewPostsObjMap(posts);
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
#h2 配置
|
||||
spring:
|
||||
cache:
|
||||
type: ehcache
|
||||
ehcache:
|
||||
config: classpath:ehcache.xml
|
||||
jpa:
|
||||
generate-ddl: false
|
||||
show-sql: true
|
||||
hibernate:
|
||||
ddl-auto: none
|
||||
h2:
|
||||
console:
|
||||
path: /h2-console
|
||||
enabled: true
|
||||
settings:
|
||||
web-allow-others: true
|
||||
datasource:
|
||||
platform: h2
|
||||
url: jdbc:h2:~/testjiscuss
|
||||
username: sa
|
||||
password:
|
||||
schema: classpath:schema.sql
|
||||
data: classpath:data.sql
|
||||
driver-class-name: org.h2.Driver
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
druid:
|
||||
min-idle: 2
|
||||
initial-size: 5
|
||||
max-active: 10
|
||||
max-wait: 5000
|
||||
validation-query: select 1SS
|
||||
# 状态监控
|
||||
filter:
|
||||
stat:
|
||||
enabled: true
|
||||
db-type: h2
|
||||
log-slow-sql: true
|
||||
slow-sql-millis: 2000
|
||||
# 监控过滤器
|
||||
web-stat-filter:
|
||||
enabled: true
|
||||
exclusions:
|
||||
- "*.js"
|
||||
- "*.gif"
|
||||
- "*.jpg"
|
||||
- "*.png"
|
||||
- "*.css"
|
||||
- "*.ico"
|
||||
- "/druid/*"
|
||||
# druid 监控页面
|
||||
stat-view-servlet:
|
||||
enabled: true
|
||||
url-pattern: /druid/*
|
||||
# reset-enable: false
|
||||
# login-username: root
|
||||
# login-password: root
|
||||
freemarker:
|
||||
# 设置模板后缀名
|
||||
suffix: .ftl
|
||||
# 设置文档类型
|
||||
content-type: text/html
|
||||
# 设置页面编码格式
|
||||
charset: UTF-8
|
||||
# 设置页面缓存
|
||||
cache: false
|
||||
# 设置ftl文件路径
|
||||
template-loader-path:
|
||||
- classpath:/templates
|
||||
settings:
|
||||
classic_compatible: true
|
||||
# 设置静态文件路径,js,css等
|
||||
mvc:
|
||||
static-path-pattern: /static/**
|
||||
server:
|
||||
port: 80
|
||||
@@ -0,0 +1,69 @@
|
||||
#mysql 配置
|
||||
spring:
|
||||
cache:
|
||||
type: ehcache
|
||||
ehcache:
|
||||
config: classpath:ehcache.xml
|
||||
jpa:
|
||||
database: MYSQL
|
||||
show-sql: true
|
||||
hibernate:
|
||||
ddl-auto: update
|
||||
datasource:
|
||||
url: jdbc:mysql://127.0.0.1:3306/jiscuss?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&useSSL=false
|
||||
username: root
|
||||
password: 123456
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
tomcat:
|
||||
init-s-q-l: SET NAMES utf8mb4
|
||||
druid:
|
||||
min-idle: 2
|
||||
initial-size: 5
|
||||
max-active: 10
|
||||
max-wait: 5000
|
||||
validation-query: select 1SS
|
||||
# 状态监控
|
||||
filter:
|
||||
stat:
|
||||
enabled: true
|
||||
db-type: mysql
|
||||
log-slow-sql: true
|
||||
slow-sql-millis: 2000
|
||||
# 监控过滤器
|
||||
web-stat-filter:
|
||||
enabled: true
|
||||
exclusions:
|
||||
- "*.js"
|
||||
- "*.gif"
|
||||
- "*.jpg"
|
||||
- "*.png"
|
||||
- "*.css"
|
||||
- "*.ico"
|
||||
- "/druid/*"
|
||||
# druid 监控页面
|
||||
stat-view-servlet:
|
||||
enabled: true
|
||||
url-pattern: /druid/*
|
||||
# reset-enable: false
|
||||
# login-username: root
|
||||
# login-password: root
|
||||
freemarker:
|
||||
# 设置模板后缀名
|
||||
suffix: .ftl
|
||||
# 设置文档类型
|
||||
content-type: text/html
|
||||
# 设置页面编码格式
|
||||
charset: UTF-8
|
||||
# 设置页面缓存
|
||||
cache: false
|
||||
# 设置ftl文件路径
|
||||
template-loader-path:
|
||||
- classpath:/templates
|
||||
settings:
|
||||
classic_compatible: true
|
||||
# 设置静态文件路径,js,css等
|
||||
mvc:
|
||||
static-path-pattern: /static/**
|
||||
server:
|
||||
port: 80
|
||||
@@ -1,28 +1,22 @@
|
||||
#mysql 配置
|
||||
spring:
|
||||
cache:
|
||||
type: ehcache
|
||||
ehcache:
|
||||
config: classpath:ehcache.xml
|
||||
jpa:
|
||||
generate-ddl: false
|
||||
database: MYSQL
|
||||
show-sql: true
|
||||
hibernate:
|
||||
ddl-auto: none
|
||||
h2:
|
||||
console:
|
||||
path: /h2-console
|
||||
enabled: true
|
||||
settings:
|
||||
web-allow-others: true
|
||||
ddl-auto: update
|
||||
datasource:
|
||||
platform: h2
|
||||
url: jdbc:h2:~/testjiscuss
|
||||
username: sa
|
||||
password:
|
||||
schema: classpath:schema.sql
|
||||
data: classpath:data.sql
|
||||
driver-class-name: org.h2.Driver
|
||||
url: jdbc:mysql://127.0.0.1:3306/jiscuss?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&autoReconnect=true&useSSL=false
|
||||
username: root
|
||||
password: 123456
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
tomcat:
|
||||
init-s-q-l: SET NAMES utf8mb4
|
||||
druid:
|
||||
min-idle: 2
|
||||
initial-size: 5
|
||||
@@ -33,7 +27,7 @@ spring:
|
||||
filter:
|
||||
stat:
|
||||
enabled: true
|
||||
db-type: h2
|
||||
db-type: mysql
|
||||
log-slow-sql: true
|
||||
slow-sql-millis: 2000
|
||||
# 监控过滤器
|
||||
|
||||
@@ -67,8 +67,9 @@ create_time datetime
|
||||
-- 设置表5
|
||||
drop table if exists setting;
|
||||
CREATE TABLE setting(
|
||||
key varchar(20) primary key,
|
||||
value text
|
||||
id INTEGER not null primary key auto_increment ,
|
||||
setting_key varchar(20) ,
|
||||
setting_value text
|
||||
);
|
||||
-- 标签表6
|
||||
drop table if exists tag;
|
||||
|
||||
@@ -63,6 +63,7 @@ $("#newdiscussions").click(function(){
|
||||
console.warn(header)
|
||||
console.warn(token)
|
||||
var title = $("#discussionstitle").val();
|
||||
var tag = $("#selectTag").val();
|
||||
// $("#discussionscontent").val();
|
||||
console.log(tinyMCE.editors[0].getContent());
|
||||
var content =tinyMCE.editors[0].getContent();
|
||||
@@ -107,7 +108,16 @@ $("#commitnewtags").click(function(){
|
||||
var header = $("meta[name='_csrf_header']").attr("content");
|
||||
var token =$("meta[name='_csrf']").attr("content");
|
||||
|
||||
|
||||
|
||||
var name = $("#tagsname").val();
|
||||
|
||||
var tagColor = $("#tagColor").val();
|
||||
var tagIcon = $("#tagIcon").val();
|
||||
var parentTag = $("#parentTag").val();
|
||||
console.log(tagColor);
|
||||
console.log(tagIcon);
|
||||
console.log(parentTag);
|
||||
console.log(name);
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
@@ -124,10 +134,9 @@ $("#commitnewtags").click(function(){
|
||||
console.log(data);
|
||||
if(data.flag){
|
||||
massage(name+',添加成功!','');
|
||||
return false;
|
||||
$("#selectTag").html("");
|
||||
}else{
|
||||
massage(name+',添加失败!','');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="JavaDoc" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="TOP_LEVEL_CLASS_OPTIONS">
|
||||
<value>
|
||||
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
|
||||
<option name="REQUIRED_TAGS" value="" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="INNER_CLASS_OPTIONS">
|
||||
<value>
|
||||
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
|
||||
<option name="REQUIRED_TAGS" value="" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="METHOD_OPTIONS">
|
||||
<value>
|
||||
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
|
||||
<option name="REQUIRED_TAGS" value="@return@param@throws or @exception" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="FIELD_OPTIONS">
|
||||
<value>
|
||||
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
|
||||
<option name="REQUIRED_TAGS" value="" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="IGNORE_DEPRECATED" value="false" />
|
||||
<option name="IGNORE_JAVADOC_PERIOD" value="true" />
|
||||
<option name="IGNORE_DUPLICATED_THROWS" value="false" />
|
||||
<option name="IGNORE_POINT_TO_ITSELF" value="false" />
|
||||
<option name="myAdditionalJavadocTags" value="date" />
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
</component>
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="JavaScriptSettings">
|
||||
<option name="languageLevel" value="ES6" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/templates.iml" filepath="$PROJECT_DIR$/.idea/templates.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/../../../.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="755544fc-90a1-4d60-9093-335fc4c5e923" name="Default Changelist" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/../../java/com/yaoyuan/jiscuss/config/WebSecurityConfig.java" beforeDir="false" afterPath="$PROJECT_DIR$/../../java/com/yaoyuan/jiscuss/config/WebSecurityConfig.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../java/com/yaoyuan/jiscuss/controller/UserSystemController.java" beforeDir="false" afterPath="$PROJECT_DIR$/../../java/com/yaoyuan/jiscuss/controller/UserSystemController.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/comm/footer.ftl" beforeDir="false" afterPath="$PROJECT_DIR$/comm/footer.ftl" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/index.ftl" beforeDir="false" afterPath="$PROJECT_DIR$/index.ftl" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/../../../.." />
|
||||
</component>
|
||||
<component name="ProjectId" id="1hzVfIl0oebNSYJlVoYCSm1cyrz" />
|
||||
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
|
||||
<component name="ProjectViewState">
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent">
|
||||
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
|
||||
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
|
||||
<property name="WebServerToolWindowFactoryState" value="false" />
|
||||
<property name="aspect.path.notification.shown" value="true" />
|
||||
<property name="last_opened_file_path" value="$PROJECT_DIR$/../../../../../../other_project/h2&mysql/spb-jpa-mysql-master" />
|
||||
</component>
|
||||
<component name="SvnConfiguration">
|
||||
<configuration>C:\Users\A11200321050045\AppData\Roaming\Subversion</configuration>
|
||||
</component>
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="Default task">
|
||||
<changelist id="755544fc-90a1-4d60-9093-335fc4c5e923" name="Default Changelist" comment="" />
|
||||
<created>1601014009683</created>
|
||||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1601014009683</updated>
|
||||
<workItem from="1601014011056" duration="15000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
<option name="version" value="2" />
|
||||
</component>
|
||||
<component name="WindowStateProjectService">
|
||||
<state x="740" y="274" key="FileChooserDialogImpl" timestamp="1601014023451">
|
||||
<screen x="0" y="0" width="1920" height="1040" />
|
||||
</state>
|
||||
<state x="740" y="274" key="FileChooserDialogImpl/1920.137.1366.728/0.0.1920.1040@0.0.1920.1040" timestamp="1601014023451" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -1,7 +1,8 @@
|
||||
<div class="ui section divider"></div>
|
||||
<#--<div class="ui section divider"></div>-->
|
||||
|
||||
<div class="ui vertical footer segment">
|
||||
<div class="ui center aligned container">
|
||||
<div class="ui section divider"></div>
|
||||
<div class="ui stackable divided grid">
|
||||
<div class="three wide column">
|
||||
<h4 class="ui header">关于遥远</h4>
|
||||
|
||||
@@ -50,6 +50,15 @@
|
||||
${discussions.content}
|
||||
</div>
|
||||
|
||||
<div class="ui labeled button" tabindex="0">
|
||||
<div class="ui red button">
|
||||
<i class="heart icon"></i> 赞这个主题
|
||||
</div>
|
||||
<a class="ui basic red left pointing label">
|
||||
1,048
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="ui feed">
|
||||
<div class="event">
|
||||
@@ -71,7 +80,7 @@
|
||||
</div>
|
||||
<div class="meta">
|
||||
<a class="like">
|
||||
<i class="like icon"></i> 0 喜欢
|
||||
<i class="like icon"></i> 0 喜欢作者
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -56,12 +56,10 @@
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>选择标签</label>
|
||||
<select multiple="" class="ui dropdown">
|
||||
<select multiple="" class="ui dropdown" id="selectTag">
|
||||
<option value="">选择标签</option>
|
||||
|
||||
<#list allTags as tags>
|
||||
<option value=${tags.id}>${tags.name}</option>
|
||||
|
||||
</#list>
|
||||
</select>
|
||||
</div>
|
||||
@@ -74,15 +72,65 @@
|
||||
<label>标签名</label>
|
||||
<input type="text" placeholder="标签名" id="tagsname">
|
||||
</div>
|
||||
<div class="field" id="createNewtagsDiv" style="display:none">
|
||||
<label>父标签</label>
|
||||
<select class="ui fluid dropdown" id="parentTag">
|
||||
<#list allTags as tag>
|
||||
<option value="{tag.id}">{tag.name}</option>
|
||||
</#list>
|
||||
</select>
|
||||
</div>
|
||||
<div class="two fields">
|
||||
<div class="field">
|
||||
<label>选择颜色</label>
|
||||
<div class="ui fluid search selection dropdown">
|
||||
<input type="hidden" id="tagColor">
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="default text">选择颜色</div>
|
||||
<div class="menu">
|
||||
<div class="item" data-value="red"><div class="ui red empty circular label"></div>红色</div>
|
||||
<div class="item" data-value="orange"><div class="ui orange empty circular label"></div>橙色</div>
|
||||
<div class="item" data-value="yellow"><div class="ui yellow empty circular label"></div>黄色</div>
|
||||
<div class="item" data-value="olive"><div class="ui olive empty circular label"></div>橄榄绿</div>
|
||||
<div class="item" data-value="green"><div class="ui green empty circular label"></div>纯绿</div>
|
||||
<div class="item" data-value="teal"><div class="ui teal empty circular label"></div>水鸭蓝</div>
|
||||
<div class="item" data-value="blue"><div class="ui blue empty circular label"></div>纯蓝</div>
|
||||
<div class="item" data-value="violet"><div class="ui violet empty circular label"></div>紫罗兰</div>
|
||||
<div class="item" data-value="purple"><div class="ui purple empty circular label"></div>纯紫</div>
|
||||
<div class="item" data-value="pink"><div class="ui pink empty circular label"></div>粉红</div>
|
||||
<div class="item" data-value="brown"><div class="ui brown empty circular label"></div>棕色</div>
|
||||
<div class="item" data-value="grey"><div class="ui grey empty circular label"></div>灰色</div>
|
||||
<div class="item" data-value="black"><div class="ui black empty circular label"></div>黑色</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>选择图标</label>
|
||||
<div class="ui fluid search selection dropdown">
|
||||
<input type="hidden" id="tagIcon">
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="default text">选择图标</div>
|
||||
<div class="menu">
|
||||
<div class="item" data-value="bullhorn"><i class="bullhorn"></i>bullhorn</div>
|
||||
<div class="item" data-value="coffee"><i class="coffee"></i>coffee</div>
|
||||
<div class="item" data-value="edit"><i class="edit"></i>edit</div>
|
||||
<div class="item" data-value="fax"><i class="fax"></i>fax</div>
|
||||
<div class="item" data-value="bug"><i class="bug"></i>bug</div>
|
||||
<div class="item" data-value="keyboard"><i class="keyboard"></i>keyboard</div>
|
||||
<div class="item" data-value="folder open outline"><i class="folder open outline"></i>folder open outline</div>
|
||||
<div class="item" data-value="comment outline"><i class="comment outline"></i>comment outline</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field" id="createNewtagsBtn" style="display:none">
|
||||
<button class="ui teal button" id="commitnewtags">保存</button>
|
||||
<button class="ui grey button" id="cancelnewtags">取消</button>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label>内容</label>
|
||||
<textarea id="discussionscontent"></textarea>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="ui fluid large blue button" id="newdiscussions">提交内容</div>
|
||||
@@ -90,72 +138,90 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="ui list">
|
||||
<div class="item">下面这个按钮可以过滤帖子呦</div>
|
||||
</div>
|
||||
|
||||
<div class="fluid ui floating dropdown labeled icon orange button">
|
||||
<i class="filter icon"></i> <span class="text">过滤帖子标签</span>
|
||||
<div class="menu">
|
||||
<div class="ui icon search input">
|
||||
<i class="search icon"></i> <input type="text"
|
||||
placeholder="搜索标签...">
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
<div class="header">
|
||||
<i class="tags icon"></i> 标签
|
||||
</div>
|
||||
<div class="scrolling menu">
|
||||
<div class="item">
|
||||
<div class="ui red empty circular label"></div>
|
||||
重要
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="ui blue empty circular label"></div>
|
||||
通知
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="ui black empty circular label"></div>
|
||||
无法修复
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="ui purple empty circular label"></div>
|
||||
新闻
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="ui orange empty circular label"></div>
|
||||
交换
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="ui empty circular label"></div>
|
||||
改变下降
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="ui yellow empty circular label"></div>
|
||||
题外话
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="ui pink empty circular label"></div>
|
||||
有趣
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="ui green empty circular label"></div>
|
||||
讨论
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui section divider"></div>
|
||||
|
||||
<div class="ui fluid action input">
|
||||
<input type="text" placeholder="搜索...">
|
||||
<div class="ui button">搜索</div>
|
||||
<div class="ui card red ">
|
||||
<div class="content">
|
||||
<div class="header">全部标签</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="ui ordered list">
|
||||
<div class="item">
|
||||
<i class="folder icon"></i>
|
||||
<div class="content">
|
||||
<div class="header">src</div>
|
||||
<div class="description">Source files for project</div>
|
||||
<div class="list">
|
||||
<div class="item">
|
||||
<i class="folder icon"></i>
|
||||
<div class="content">
|
||||
<div class="header">site</div>
|
||||
<div class="description">Your site's theme</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<i class="blue folder icon"></i>
|
||||
<div class="content">
|
||||
<div class="header">themes</div>
|
||||
<div class="description">Packaged theme files</div>
|
||||
<div class="list">
|
||||
<div class="item">
|
||||
<i class="folder icon"></i>
|
||||
<div class="content">
|
||||
<div class="header">default</div>
|
||||
<div class="description">Default packaged theme</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<i class="folder icon"></i>
|
||||
<div class="content">
|
||||
<div class="header">my_theme</div>
|
||||
<div class="description">Packaged themes are also available in
|
||||
this folder
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<i class="file icon"></i>
|
||||
<div class="content">
|
||||
<a class="header">theme.config</a>
|
||||
<div class="description">Config file for setting packaged themes</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<i class="red folder icon"></i>
|
||||
<div class="content">
|
||||
<a class="header">dist</a>
|
||||
<div class="description">Compiled CSS and JS files</div>
|
||||
<div class="list">
|
||||
<div class="item">
|
||||
<i class="folder icon"></i>
|
||||
<div class="content">
|
||||
<a class="header">components</a>
|
||||
<div class="description">Individual component CSS and JS</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<i class="file icon red"></i>
|
||||
<div class="content">
|
||||
<div class="header">semantic.json</div>
|
||||
<div class="description">Contains build settings for gulp</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="ui card">
|
||||
<div class="ui card black ">
|
||||
<div class="content">
|
||||
<div class="header">预留功能</div>
|
||||
</div>
|
||||
@@ -185,7 +251,7 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div class="ui card">
|
||||
<div class="ui card violet ">
|
||||
<div class="content">
|
||||
<img class="right floated mini ui image"
|
||||
src="static/assets/images/logo.png">
|
||||
@@ -430,13 +496,11 @@
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="ui button" data-tooltip="预留" data-position="top center">
|
||||
预留
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<#include "comm/footer.ftl"/>
|
||||
<script type="text/javascript">
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<title>Jiscuss Demo</title>
|
||||
<head>
|
||||
<!-- <link rel="stylesheet" type="text/css" href="static/semanticui/semantic.css"> -->
|
||||
<!-- <script src="static/jquery/jquery-3.4.1.min.js"></script> -->
|
||||
<!-- <script src="static/semanticui/semantic.min.js"></script> -->
|
||||
|
||||
<!-- default header name is X-CSRF-TOKEN -->
|
||||
<meta name="_csrf" content="${_csrf.token}"/>
|
||||
<meta name="_csrf_header" content="${_csrf.headerName}"/>
|
||||
|
||||
<#include "comm/commjs.ftl"/>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<div class="ui fixed inverted menu">
|
||||
<div class="ui container">
|
||||
<a href="fixed.php#" class="header item">
|
||||
<img class="logo" src="assets/images/logo.png">
|
||||
项目名
|
||||
</a>
|
||||
<a href="fixed.php#" class="item">主页</a>
|
||||
<div class="ui simple dropdown item">
|
||||
Dropdown <i class="dropdown icon"></i>
|
||||
<div class="menu">
|
||||
<a class="item" href="fixed.php#">链接选项</a>
|
||||
<a class="item" href="fixed.php#">链接选项</a>
|
||||
<div class="divider"></div>
|
||||
<div class="header">标题项</div>
|
||||
<div class="item">
|
||||
<i class="dropdown icon"></i>
|
||||
子菜单
|
||||
<div class="menu">
|
||||
<a class="item" href="fixed.php#">链接选项</a>
|
||||
<a class="item" href="fixed.php#">链接选项</a>
|
||||
</div>
|
||||
</div>
|
||||
<a class="item" href="fixed.php#">链接选项</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui main text container">
|
||||
<h1 class="ui header">Semantic UI Fixed Template</h1>
|
||||
<p>This is a basic fixed menu template using fixed size containers.</p>
|
||||
<p>A text container is used for the main container, which is useful for single column layouts</p>
|
||||
<img class="wireframe" src="assets/images/wireframe/media-paragraph.png">
|
||||
<img class="wireframe" src="assets/images/wireframe/paragraph.png">
|
||||
<img class="wireframe" src="assets/images/wireframe/paragraph.png">
|
||||
<img class="wireframe" src="assets/images/wireframe/paragraph.png">
|
||||
<img class="wireframe" src="assets/images/wireframe/paragraph.png">
|
||||
<img class="wireframe" src="assets/images/wireframe/paragraph.png">
|
||||
<img class="wireframe" src="assets/images/wireframe/paragraph.png">
|
||||
</div>
|
||||
|
||||
<div class="ui inverted vertical footer segment">
|
||||
<div class="ui center aligned container">
|
||||
<div class="ui stackable inverted divided grid">
|
||||
<div class="three wide column">
|
||||
<h4 class="ui inverted header">Group 1</h4>
|
||||
<div class="ui inverted link list">
|
||||
<a href="fixed.php#" class="item">Link One</a>
|
||||
<a href="fixed.php#" class="item">Link Two</a>
|
||||
<a href="fixed.php#" class="item">Link Three</a>
|
||||
<a href="fixed.php#" class="item">Link Four</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="three wide column">
|
||||
<h4 class="ui inverted header">Group 2</h4>
|
||||
<div class="ui inverted link list">
|
||||
<a href="fixed.php#" class="item">Link One</a>
|
||||
<a href="fixed.php#" class="item">Link Two</a>
|
||||
<a href="fixed.php#" class="item">Link Three</a>
|
||||
<a href="fixed.php#" class="item">Link Four</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="three wide column">
|
||||
<h4 class="ui inverted header">Group 3</h4>
|
||||
<div class="ui inverted link list">
|
||||
<a href="fixed.php#" class="item">Link One</a>
|
||||
<a href="fixed.php#" class="item">Link Two</a>
|
||||
<a href="fixed.php#" class="item">Link Three</a>
|
||||
<a href="fixed.php#" class="item">Link Four</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="seven wide column">
|
||||
<h4 class="ui inverted header">Footer Header</h4>
|
||||
<p>Extra space for a call to action inside the footer that could help re-engage users.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui inverted section divider"></div>
|
||||
<img src="assets/images/logo.png" class="ui centered mini image">
|
||||
<div class="ui horizontal inverted small divided link list">
|
||||
<a class="item" href="fixed.php#">Site Map</a>
|
||||
<a class="item" href="fixed.php#">Contact Us</a>
|
||||
<a class="item" href="fixed.php#">Terms and Conditions</a>
|
||||
<a class="item" href="fixed.php#">Privacy Policy</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user