generated from root/miduo_server
gm优化
parent
20e2365bb3
commit
79912def01
|
|
@ -43,16 +43,28 @@ public class ChatInfoController {
|
|||
|
||||
}
|
||||
@RequestMapping(value = "/chatInfoShowByServerAndChannel",method = RequestMethod.GET)
|
||||
public String chatInfoShowByServerAndChannel(@RequestParam int serverId,@RequestParam int channelId, ModelMap map){
|
||||
public String chatInfoShowByServerAndChannel(@RequestParam int serverId,@RequestParam int channelId,
|
||||
long datemin, long datemax, ModelMap map){
|
||||
RedisUtil redisUtil = RedisUtil.getInstence();
|
||||
|
||||
String key = RedisUserKey.getKey(RedisUserKey.CHAT_INFO_CACHE, String.valueOf(channelId), serverId);
|
||||
List<String> list = redisUtil.lGet(key, 0, -1);
|
||||
|
||||
ServerInfo serverinfo = null;
|
||||
try {
|
||||
serverinfo = serverInfoDao.getServerinfo(serverId);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
String serverName = serverinfo.getName();
|
||||
|
||||
List<ChatRedisEntity> chatInfoList = new ArrayList<>(list.size());
|
||||
for(String str:list){
|
||||
ChatRedisEntity chatRedisEntity = gson.fromJson(str, ChatRedisEntity.class);
|
||||
chatInfoList.add(chatRedisEntity);
|
||||
chatRedisEntity.setServerName(serverName);
|
||||
if (chatRedisEntity.getTime() > datemin && chatRedisEntity.getTime() < datemax) {
|
||||
chatInfoList.add(chatRedisEntity);
|
||||
}
|
||||
}
|
||||
map.addAttribute("chatInfoList",chatInfoList);
|
||||
|
||||
|
|
|
|||
|
|
@ -114,9 +114,6 @@ public class MailController {
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value = "/toSendSysMail", method = {RequestMethod.POST, RequestMethod.GET})
|
||||
public @ResponseBody
|
||||
int sendSysMail(HttpServletRequest request) throws Exception {
|
||||
|
|
@ -154,7 +151,7 @@ public class MailController {
|
|||
|
||||
@PostMapping(value = "/sendSysMailWithBack")
|
||||
public @ResponseBody
|
||||
int sendSysMailWithBack(@RequestBody ServerMail mail,HttpSession session) throws Exception{
|
||||
int sendSysMailWithBack(@RequestBody ServerMail mail,HttpSession session) throws Exception{
|
||||
String useName = (String) session.getAttribute(WebSecurityConfig.SESSION_KEY);
|
||||
if(null!= useName){
|
||||
mail.setCreateUser(useName);
|
||||
|
|
|
|||
|
|
@ -27,13 +27,11 @@ public class MailDaoImpl implements MailDao {
|
|||
@Resource
|
||||
private Connect connect;
|
||||
public static final String colon = ":";
|
||||
public static final String comma = ",";
|
||||
@Override
|
||||
public void sendSysMail(ServerMail mail) throws Exception {
|
||||
String mongoKey = "systemMailManager.systemMailMap."+mail.getVersion();
|
||||
String dbName = MongoName.getMongoDBName(mail.getServerId());
|
||||
MongoTemplate mongoTemplate = connect.getMongoTemplete(dbName);
|
||||
|
||||
Query query = new Query();
|
||||
SystemMail sysMail = new SystemMail();
|
||||
sysMail.setId(mail.getVersion());
|
||||
sysMail.setContent(mail.getMailContent());
|
||||
|
|
@ -52,11 +50,19 @@ public class MailDaoImpl implements MailDao {
|
|||
}
|
||||
sysMail.setReward(sb.toString());
|
||||
LOGGER.info("sendSysMail serverId=>{},id=>{},reward=>{}",mail.getServerId(),mail.getVersion(),sb.toString());
|
||||
query.addCriteria(Criteria.where("_id").is(mail.getServerId())); //_id区分引号 "1"和1
|
||||
Update update = Update.update(mongoKey, sysMail);
|
||||
WriteResult upsert = mongoTemplate.upsert(query, update, "mailingSystem"); //有则更新,没有则新增
|
||||
RedisUtil.getInstence().putObject(String.valueOf(mail.getServerId()),RedisUserKey.MAIL_RED_POINT+":","",1000);
|
||||
System.out.println(upsert.getN());
|
||||
|
||||
String[] split = mail.getServerId().split(comma);
|
||||
for (String serverId:split) {
|
||||
Query query = new Query();
|
||||
query.addCriteria(Criteria.where("_id").is(Integer.parseInt(serverId))); //_id区分引号 "1"和1
|
||||
String dbName = MongoName.getMongoDBName(Integer.valueOf(serverId));
|
||||
MongoTemplate mongoTemplate = connect.getMongoTemplete(dbName);
|
||||
WriteResult upsert = mongoTemplate.upsert(query, update, "mailingSystem"); //有则更新,没有则新增
|
||||
RedisUtil.getInstence().putObject(serverId,RedisUserKey.MAIL_RED_POINT+":","",1000);
|
||||
System.out.println("mail=====" + serverId + "==========" + upsert.getN());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ public class ServerMail {
|
|||
private int id;
|
||||
|
||||
@Field(value = "serverId")
|
||||
private int serverId;
|
||||
private String serverId;
|
||||
|
||||
@Field(value = "mailTitle")
|
||||
private String mailTitle;
|
||||
|
|
@ -61,11 +61,11 @@ public class ServerMail {
|
|||
// "playerRTime": playerRTime,
|
||||
// "effectTime": effectTime,
|
||||
// "version": version
|
||||
public int getServerId() {
|
||||
public String getServerId() {
|
||||
return serverId;
|
||||
}
|
||||
|
||||
public void setServerId(int serverId) {
|
||||
public void setServerId(String serverId) {
|
||||
this.serverId = serverId;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,15 +19,18 @@ public class ChatRedisEntity {
|
|||
|
||||
private int status;
|
||||
|
||||
private String serverName;
|
||||
|
||||
public ChatRedisEntity(){};
|
||||
|
||||
public ChatRedisEntity(int uid, String name, int type, String message, Long time, int status) {
|
||||
public ChatRedisEntity(int uid, String name, int type, String message, Long time, int status, String serverName) {
|
||||
this.uid = uid;
|
||||
this.name = name;
|
||||
this.type = type;
|
||||
this.message = message;
|
||||
this.time = time;
|
||||
this.status = status;
|
||||
this.serverName = serverName;
|
||||
}
|
||||
|
||||
public int getUid() {
|
||||
|
|
@ -77,4 +80,12 @@ public class ChatRedisEntity {
|
|||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getServerName() {
|
||||
return serverName;
|
||||
}
|
||||
|
||||
public void setServerName(String serverName) {
|
||||
this.serverName = serverName;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,10 @@
|
|||
package com.jmfy.model.vo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ServerMailVo {
|
||||
|
||||
private int id;
|
||||
|
||||
private int serverId;
|
||||
private String serverId;
|
||||
|
||||
private String mailTitle;
|
||||
|
||||
|
|
@ -17,11 +15,11 @@ public class ServerMailVo {
|
|||
private int state;
|
||||
private String createUser;
|
||||
|
||||
public int getServerId() {
|
||||
public String getServerId() {
|
||||
return serverId;
|
||||
}
|
||||
|
||||
public void setServerId(int serverId) {
|
||||
public void setServerId(String serverId) {
|
||||
this.serverId = serverId;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,392 @@
|
|||
/*!
|
||||
* Bootstrap-select v1.13.2 (https://developer.snapappointments.com/bootstrap-select)
|
||||
*
|
||||
* Copyright 2012-2018 SnapAppointments, LLC
|
||||
* Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
|
||||
select.bs-select-hidden,
|
||||
.bootstrap-select > select.bs-select-hidden,
|
||||
select.selectpicker {
|
||||
display: none !important;
|
||||
}
|
||||
.bootstrap-select {
|
||||
width: 220px \0;
|
||||
/*IE9 and below*/
|
||||
}
|
||||
.bootstrap-select > .dropdown-toggle {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
z-index: 1;
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.bootstrap-select > .dropdown-toggle.bs-placeholder,
|
||||
.bootstrap-select > .dropdown-toggle.bs-placeholder:hover,
|
||||
.bootstrap-select > .dropdown-toggle.bs-placeholder:focus,
|
||||
.bootstrap-select > .dropdown-toggle.bs-placeholder:active {
|
||||
color: #999;
|
||||
}
|
||||
.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-primary,
|
||||
.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-secondary,
|
||||
.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-success,
|
||||
.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-danger,
|
||||
.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-info,
|
||||
.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-dark,
|
||||
.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-primary:hover,
|
||||
.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-secondary:hover,
|
||||
.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-success:hover,
|
||||
.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-danger:hover,
|
||||
.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-info:hover,
|
||||
.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-dark:hover,
|
||||
.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-primary:focus,
|
||||
.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-secondary:focus,
|
||||
.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-success:focus,
|
||||
.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-danger:focus,
|
||||
.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-info:focus,
|
||||
.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-dark:focus,
|
||||
.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-primary:active,
|
||||
.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-secondary:active,
|
||||
.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-success:active,
|
||||
.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-danger:active,
|
||||
.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-info:active,
|
||||
.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-dark:active {
|
||||
color: rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
.bootstrap-select > select {
|
||||
position: absolute !important;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
display: block !important;
|
||||
width: 0.5px !important;
|
||||
height: 100% !important;
|
||||
padding: 0 !important;
|
||||
opacity: 0 !important;
|
||||
border: none;
|
||||
}
|
||||
.bootstrap-select > select.mobile-device {
|
||||
top: 0;
|
||||
left: 0;
|
||||
display: block !important;
|
||||
width: 100% !important;
|
||||
z-index: 2;
|
||||
}
|
||||
.has-error .bootstrap-select .dropdown-toggle,
|
||||
.error .bootstrap-select .dropdown-toggle,
|
||||
.bootstrap-select.is-invalid .dropdown-toggle,
|
||||
.was-validated .bootstrap-select .selectpicker:invalid + .dropdown-toggle {
|
||||
border-color: #b94a48;
|
||||
}
|
||||
.bootstrap-select.is-valid .dropdown-toggle,
|
||||
.was-validated .bootstrap-select .selectpicker:valid + .dropdown-toggle {
|
||||
border-color: #28a745;
|
||||
}
|
||||
.bootstrap-select.fit-width {
|
||||
width: auto !important;
|
||||
}
|
||||
.bootstrap-select:not([class*="col-"]):not([class*="form-control"]):not(.input-group-btn) {
|
||||
width: 220px;
|
||||
}
|
||||
.bootstrap-select .dropdown-toggle:focus {
|
||||
outline: thin dotted #333333 !important;
|
||||
outline: 5px auto -webkit-focus-ring-color !important;
|
||||
outline-offset: -2px;
|
||||
}
|
||||
.bootstrap-select.form-control {
|
||||
margin-bottom: 0;
|
||||
padding: 0;
|
||||
border: none;
|
||||
}
|
||||
:not(.input-group) > .bootstrap-select.form-control:not([class*="col-"]) {
|
||||
width: 100%;
|
||||
}
|
||||
.bootstrap-select.form-control.input-group-btn {
|
||||
z-index: auto;
|
||||
}
|
||||
.bootstrap-select.form-control.input-group-btn:not(:first-child):not(:last-child) > .btn {
|
||||
border-radius: 0;
|
||||
}
|
||||
.bootstrap-select:not(.input-group-btn),
|
||||
.bootstrap-select[class*="col-"] {
|
||||
float: none;
|
||||
display: inline-block;
|
||||
margin-left: 0;
|
||||
}
|
||||
.bootstrap-select.dropdown-menu-right,
|
||||
.bootstrap-select[class*="col-"].dropdown-menu-right,
|
||||
.row .bootstrap-select[class*="col-"].dropdown-menu-right {
|
||||
float: right;
|
||||
}
|
||||
.form-inline .bootstrap-select,
|
||||
.form-horizontal .bootstrap-select,
|
||||
.form-group .bootstrap-select {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.form-group-lg .bootstrap-select.form-control,
|
||||
.form-group-sm .bootstrap-select.form-control {
|
||||
padding: 0;
|
||||
}
|
||||
.form-group-lg .bootstrap-select.form-control .dropdown-toggle,
|
||||
.form-group-sm .bootstrap-select.form-control .dropdown-toggle {
|
||||
height: 100%;
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
border-radius: inherit;
|
||||
}
|
||||
.bootstrap-select.form-control-sm .dropdown-toggle,
|
||||
.bootstrap-select.form-control-lg .dropdown-toggle {
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
border-radius: inherit;
|
||||
}
|
||||
.bootstrap-select.form-control-sm .dropdown-toggle {
|
||||
padding: 0.25rem 0.5rem;
|
||||
}
|
||||
.bootstrap-select.form-control-lg .dropdown-toggle {
|
||||
padding: 0.5rem 1rem;
|
||||
}
|
||||
.form-inline .bootstrap-select .form-control {
|
||||
width: 100%;
|
||||
}
|
||||
.bootstrap-select.disabled,
|
||||
.bootstrap-select > .disabled {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.bootstrap-select.disabled:focus,
|
||||
.bootstrap-select > .disabled:focus {
|
||||
outline: none !important;
|
||||
}
|
||||
.bootstrap-select.bs-container {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 0 !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
.bootstrap-select.bs-container .dropdown-menu {
|
||||
z-index: 1060;
|
||||
}
|
||||
.bootstrap-select .dropdown-toggle:before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
}
|
||||
.bootstrap-select .dropdown-toggle .filter-option {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
padding-top: inherit;
|
||||
padding-right: inherit;
|
||||
padding-bottom: inherit;
|
||||
padding-left: inherit;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
}
|
||||
.bootstrap-select .dropdown-toggle .filter-option-inner {
|
||||
padding-right: inherit;
|
||||
}
|
||||
.bootstrap-select .dropdown-toggle .filter-option-inner-inner {
|
||||
overflow: hidden;
|
||||
}
|
||||
.bootstrap-select .dropdown-toggle .caret {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 12px;
|
||||
margin-top: -2px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.input-group .bootstrap-select.form-control .dropdown-toggle {
|
||||
border-radius: inherit;
|
||||
}
|
||||
.bootstrap-select[class*="col-"] .dropdown-toggle {
|
||||
width: 100%;
|
||||
}
|
||||
.bootstrap-select .dropdown-menu {
|
||||
min-width: 100%;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.bootstrap-select .dropdown-menu > .inner:focus {
|
||||
outline: none !important;
|
||||
}
|
||||
.bootstrap-select .dropdown-menu.inner {
|
||||
position: static;
|
||||
float: none;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border-radius: 0;
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
.bootstrap-select .dropdown-menu li {
|
||||
position: relative;
|
||||
}
|
||||
.bootstrap-select .dropdown-menu li.active small {
|
||||
color: rgba(255, 255, 255, 0.5) !important;
|
||||
}
|
||||
.bootstrap-select .dropdown-menu li.disabled a {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.bootstrap-select .dropdown-menu li a {
|
||||
cursor: pointer;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
.bootstrap-select .dropdown-menu li a.opt {
|
||||
position: relative;
|
||||
padding-left: 2.25em;
|
||||
}
|
||||
.bootstrap-select .dropdown-menu li a span.check-mark {
|
||||
display: none;
|
||||
}
|
||||
.bootstrap-select .dropdown-menu li a span.text {
|
||||
display: inline-block;
|
||||
}
|
||||
.bootstrap-select .dropdown-menu li small {
|
||||
padding-left: 0.5em;
|
||||
}
|
||||
.bootstrap-select .dropdown-menu .notify {
|
||||
position: absolute;
|
||||
bottom: 5px;
|
||||
width: 96%;
|
||||
margin: 0 2%;
|
||||
min-height: 26px;
|
||||
padding: 3px 5px;
|
||||
background: #f5f5f5;
|
||||
border: 1px solid #e3e3e3;
|
||||
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
|
||||
pointer-events: none;
|
||||
opacity: 0.9;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.bootstrap-select .no-results {
|
||||
padding: 3px;
|
||||
background: #f5f5f5;
|
||||
margin: 0 5px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.bootstrap-select.fit-width .dropdown-toggle .filter-option {
|
||||
position: static;
|
||||
display: inline;
|
||||
padding: 0;
|
||||
}
|
||||
.bootstrap-select.fit-width .dropdown-toggle .filter-option-inner,
|
||||
.bootstrap-select.fit-width .dropdown-toggle .filter-option-inner-inner {
|
||||
display: inline;
|
||||
}
|
||||
.bootstrap-select.fit-width .dropdown-toggle .caret {
|
||||
position: static;
|
||||
top: auto;
|
||||
margin-top: -1px;
|
||||
}
|
||||
.bootstrap-select.show-tick .dropdown-menu .selected span.check-mark {
|
||||
position: absolute;
|
||||
display: inline-block;
|
||||
right: 15px;
|
||||
top: 5px;
|
||||
}
|
||||
.bootstrap-select.show-tick .dropdown-menu li a span.text {
|
||||
margin-right: 34px;
|
||||
}
|
||||
.bootstrap-select .bs-ok-default:after {
|
||||
content: '';
|
||||
display: block;
|
||||
width: 0.5em;
|
||||
height: 1em;
|
||||
border-style: solid;
|
||||
border-width: 0 0.26em 0.26em 0;
|
||||
-webkit-transform: rotate(45deg);
|
||||
-ms-transform: rotate(45deg);
|
||||
-o-transform: rotate(45deg);
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
.bootstrap-select.show-menu-arrow.open > .dropdown-toggle,
|
||||
.bootstrap-select.show-menu-arrow.show > .dropdown-toggle {
|
||||
z-index: 1061;
|
||||
}
|
||||
.bootstrap-select.show-menu-arrow .dropdown-toggle .filter-option:before {
|
||||
content: '';
|
||||
border-left: 7px solid transparent;
|
||||
border-right: 7px solid transparent;
|
||||
border-bottom: 7px solid rgba(204, 204, 204, 0.2);
|
||||
position: absolute;
|
||||
bottom: -4px;
|
||||
left: 9px;
|
||||
display: none;
|
||||
}
|
||||
.bootstrap-select.show-menu-arrow .dropdown-toggle .filter-option:after {
|
||||
content: '';
|
||||
border-left: 6px solid transparent;
|
||||
border-right: 6px solid transparent;
|
||||
border-bottom: 6px solid white;
|
||||
position: absolute;
|
||||
bottom: -4px;
|
||||
left: 10px;
|
||||
display: none;
|
||||
}
|
||||
.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle .filter-option:before {
|
||||
bottom: auto;
|
||||
top: -4px;
|
||||
border-top: 7px solid rgba(204, 204, 204, 0.2);
|
||||
border-bottom: 0;
|
||||
}
|
||||
.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle .filter-option:after {
|
||||
bottom: auto;
|
||||
top: -4px;
|
||||
border-top: 6px solid white;
|
||||
border-bottom: 0;
|
||||
}
|
||||
.bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle .filter-option:before {
|
||||
right: 12px;
|
||||
left: auto;
|
||||
}
|
||||
.bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle .filter-option:after {
|
||||
right: 13px;
|
||||
left: auto;
|
||||
}
|
||||
.bootstrap-select.show-menu-arrow.open > .dropdown-toggle .filter-option:before,
|
||||
.bootstrap-select.show-menu-arrow.show > .dropdown-toggle .filter-option:before,
|
||||
.bootstrap-select.show-menu-arrow.open > .dropdown-toggle .filter-option:after,
|
||||
.bootstrap-select.show-menu-arrow.show > .dropdown-toggle .filter-option:after {
|
||||
display: block;
|
||||
}
|
||||
.bs-searchbox,
|
||||
.bs-actionsbox,
|
||||
.bs-donebutton {
|
||||
padding: 4px 8px;
|
||||
}
|
||||
.bs-actionsbox {
|
||||
width: 100%;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.bs-actionsbox .btn-group button {
|
||||
width: 50%;
|
||||
}
|
||||
.bs-donebutton {
|
||||
float: left;
|
||||
width: 100%;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.bs-donebutton .btn-group button {
|
||||
width: 100%;
|
||||
}
|
||||
.bs-searchbox + .bs-actionsbox {
|
||||
padding: 0 8px 4px;
|
||||
}
|
||||
.bs-searchbox .form-control {
|
||||
margin-bottom: 0;
|
||||
width: 100%;
|
||||
float: none;
|
||||
}
|
||||
/*# sourceMappingURL=bootstrap-select.css.map */
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,145 @@
|
|||
/*
|
||||
Author: David Qin
|
||||
E-mail: david@hereapp.cn
|
||||
Date: 2014-11-05
|
||||
*/
|
||||
|
||||
.searchable-select-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.searchable-select {
|
||||
display: inline-block;
|
||||
min-width: 200px;
|
||||
font-size: 14px;
|
||||
line-height: 1.428571429;
|
||||
color: #555;
|
||||
vertical-align: middle;
|
||||
position: relative;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.searchable-select-holder{
|
||||
padding: 6px;
|
||||
background-color: #fff;
|
||||
background-image: none;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
min-height: 30px;
|
||||
box-sizing: border-box;
|
||||
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
|
||||
box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
|
||||
-webkit-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
|
||||
transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
|
||||
}
|
||||
|
||||
.searchable-select-caret {
|
||||
position: absolute;
|
||||
width: 0;
|
||||
height: 0;
|
||||
box-sizing: border-box;
|
||||
border-color: black transparent transparent transparent;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
border-style: solid;
|
||||
border-width: 5px;
|
||||
margin: auto;
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
.searchable-select-dropdown {
|
||||
position: absolute;
|
||||
background-color: #fff;
|
||||
border: 1px solid #ccc;
|
||||
border-bottom-left-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
padding: 4px;
|
||||
border-top: none;
|
||||
top: 28px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.searchable-select-input {
|
||||
margin-top: 5px;
|
||||
border: 1px solid #ccc;
|
||||
outline: none;
|
||||
padding: 4px;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
z-index:1000;
|
||||
}
|
||||
|
||||
.searchable-scroll {
|
||||
margin-top: 4px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.searchable-scroll.has-privious {
|
||||
padding-top: 16px;
|
||||
}
|
||||
|
||||
.searchable-scroll.has-next {
|
||||
padding-bottom: 16px;
|
||||
}
|
||||
|
||||
.searchable-has-privious {
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.searchable-has-next {
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.searchable-has-privious, .searchable-has-next {
|
||||
height: 16px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
z-index: 10;
|
||||
background-color: white;
|
||||
line-height: 8px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.searchable-select-items {
|
||||
max-height: 400px;
|
||||
overflow-y: scroll;
|
||||
position: relative;
|
||||
color: whitesmoke;
|
||||
background-color: black;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.searchable-select-items::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.searchable-select-item {
|
||||
padding: 5px 5px;
|
||||
cursor: pointer;
|
||||
min-height: 30px;
|
||||
box-sizing: border-box;
|
||||
transition: all 1s ease 0s;
|
||||
}
|
||||
|
||||
.searchable-select-item.hover {
|
||||
|
||||
background: #555;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.searchable-select-item.selected {
|
||||
background: #28a4c9;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.input_bg{
|
||||
min-width: 200px;
|
||||
min-height: 30px;
|
||||
font-size: 14px;
|
||||
color: #555;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
|
@ -0,0 +1,275 @@
|
|||
// Author: David Qin
|
||||
// E-mail: david@hereapp.cn
|
||||
// Date: 2014-11-05
|
||||
|
||||
(function($){
|
||||
|
||||
// a case insensitive jQuery :contains selector
|
||||
$.expr[":"].searchableSelectContains = $.expr.createPseudo(function(arg) {
|
||||
return function( elem ) {
|
||||
return $(elem).text().toUpperCase().indexOf(arg.toUpperCase()) >= 0;
|
||||
};
|
||||
});
|
||||
|
||||
$.searchableSelect = function(element, options) {
|
||||
this.element = element;
|
||||
this.options = options || {};
|
||||
this.init();
|
||||
|
||||
var _this = this;
|
||||
|
||||
this.searchableElement.click(function(event){
|
||||
// event.stopPropagation();
|
||||
_this.show();
|
||||
}).on('keydown', function(event){
|
||||
if (event.which === 13 || event.which === 40 || event.which == 38){
|
||||
event.preventDefault();
|
||||
_this.show();
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', null, function(event){
|
||||
if(_this.searchableElement.has($(event.target)).length === 0)
|
||||
_this.hide();
|
||||
});
|
||||
|
||||
this.input.on('keydown', function(event){
|
||||
event.stopPropagation();
|
||||
if(event.which === 13){ //enter
|
||||
event.preventDefault();
|
||||
_this.selectCurrentHoverItem();
|
||||
_this.hide();
|
||||
} else if (event.which == 27) { //ese
|
||||
_this.hide();
|
||||
} else if (event.which == 40) { //down
|
||||
_this.hoverNextItem();
|
||||
} else if (event.which == 38) { //up
|
||||
_this.hoverPreviousItem();
|
||||
}
|
||||
}).on('keyup', function(event){
|
||||
if(event.which != 13 && event.which != 27 && event.which != 38 && event.which != 40)
|
||||
_this.filter();
|
||||
})
|
||||
}
|
||||
|
||||
var $sS = $.searchableSelect;
|
||||
|
||||
$sS.fn = $sS.prototype = {
|
||||
version: '0.0.1'
|
||||
};
|
||||
|
||||
$sS.fn.extend = $sS.extend = $.extend;
|
||||
|
||||
$sS.fn.extend({
|
||||
init: function(){
|
||||
var _this = this;
|
||||
this.element.hide();
|
||||
|
||||
this.searchableElement = $('<div tabindex="0" class="searchable-select"></div>');
|
||||
this.holder = $('<div class="searchable-select-holder"></div>');
|
||||
this.dropdown = $('<div class="searchable-select-dropdown searchable-select-hide"></div>');
|
||||
this.input = $('<input type="text" class="searchable-select-input" />');
|
||||
this.items = $('<div class="searchable-select-items"></div>');
|
||||
this.caret = $('<span class="searchable-select-caret"></span>');
|
||||
|
||||
this.scrollPart = $('<div class="searchable-scroll"></div>');
|
||||
this.hasPrivious = $('<div class="searchable-has-privious">...</div>');
|
||||
this.hasNext = $('<div class="searchable-has-next">...</div>');
|
||||
|
||||
this.hasNext.on('mouseenter', function(){
|
||||
_this.hasNextTimer = null;
|
||||
|
||||
var f = function(){
|
||||
var scrollTop = _this.items.scrollTop();
|
||||
_this.items.scrollTop(scrollTop + 20);
|
||||
_this.hasNextTimer = setTimeout(f, 50);
|
||||
}
|
||||
|
||||
f();
|
||||
}).on('mouseleave', function(event) {
|
||||
clearTimeout(_this.hasNextTimer);
|
||||
});
|
||||
|
||||
this.hasPrivious.on('mouseenter', function(){
|
||||
_this.hasPriviousTimer = null;
|
||||
|
||||
var f = function(){
|
||||
var scrollTop = _this.items.scrollTop();
|
||||
_this.items.scrollTop(scrollTop - 20);
|
||||
_this.hasPriviousTimer = setTimeout(f, 50);
|
||||
}
|
||||
|
||||
f();
|
||||
}).on('mouseleave', function(event) {
|
||||
clearTimeout(_this.hasPriviousTimer);
|
||||
});
|
||||
|
||||
this.dropdown.append(this.input);
|
||||
this.dropdown.append(this.scrollPart);
|
||||
|
||||
this.scrollPart.append(this.hasPrivious);
|
||||
this.scrollPart.append(this.items);
|
||||
this.scrollPart.append(this.hasNext);
|
||||
|
||||
this.searchableElement.append(this.caret);
|
||||
this.searchableElement.append(this.holder);
|
||||
this.searchableElement.append(this.dropdown);
|
||||
this.element.after(this.searchableElement);
|
||||
|
||||
this.buildItems();
|
||||
this.setPriviousAndNextVisibility();
|
||||
},
|
||||
|
||||
filter: function(){
|
||||
var text = this.input.val();
|
||||
this.items.find('.searchable-select-item').addClass('searchable-select-hide');
|
||||
this.items.find('.searchable-select-item:searchableSelectContains('+text+')').removeClass('searchable-select-hide');
|
||||
if(this.currentSelectedItem.hasClass('searchable-select-hide') && this.items.find('.searchable-select-item:not(.searchable-select-hide)').length > 0){
|
||||
this.hoverFirstNotHideItem();
|
||||
}
|
||||
|
||||
this.setPriviousAndNextVisibility();
|
||||
},
|
||||
|
||||
hoverFirstNotHideItem: function(){
|
||||
this.hoverItem(this.items.find('.searchable-select-item:not(.searchable-select-hide)').first());
|
||||
},
|
||||
|
||||
selectCurrentHoverItem: function(){
|
||||
if(!this.currentHoverItem.hasClass('searchable-select-hide'))
|
||||
this.selectItem(this.currentHoverItem);
|
||||
},
|
||||
|
||||
hoverPreviousItem: function(){
|
||||
if(!this.hasCurrentHoverItem())
|
||||
this.hoverFirstNotHideItem();
|
||||
else{
|
||||
var prevItem = this.currentHoverItem.prevAll('.searchable-select-item:not(.searchable-select-hide):first')
|
||||
if(prevItem.length > 0)
|
||||
this.hoverItem(prevItem);
|
||||
}
|
||||
},
|
||||
|
||||
hoverNextItem: function(){
|
||||
if(!this.hasCurrentHoverItem())
|
||||
this.hoverFirstNotHideItem();
|
||||
else{
|
||||
var nextItem = this.currentHoverItem.nextAll('.searchable-select-item:not(.searchable-select-hide):first')
|
||||
if(nextItem.length > 0)
|
||||
this.hoverItem(nextItem);
|
||||
}
|
||||
},
|
||||
|
||||
buildItems: function(){
|
||||
var _this = this;
|
||||
this.element.find('option').each(function(){
|
||||
var item = $('<div class="searchable-select-item" data-value="'+$(this).attr('value')+'">'+$(this).text()+'</div>');
|
||||
|
||||
if(this.selected){
|
||||
_this.selectItem(item);
|
||||
_this.hoverItem(item);
|
||||
}
|
||||
|
||||
item.on('mouseenter', function(){
|
||||
$(this).addClass('hover');
|
||||
}).on('mouseleave', function(){
|
||||
$(this).removeClass('hover');
|
||||
}).click(function(event){
|
||||
event.stopPropagation();
|
||||
_this.selectItem($(this));
|
||||
_this.hide();
|
||||
});
|
||||
|
||||
_this.items.append(item);
|
||||
});
|
||||
|
||||
this.items.on('scroll', function(){
|
||||
_this.setPriviousAndNextVisibility();
|
||||
})
|
||||
},
|
||||
show: function(){
|
||||
this.dropdown.removeClass('searchable-select-hide');
|
||||
this.input.focus();
|
||||
this.status = 'show';
|
||||
this.setPriviousAndNextVisibility();
|
||||
},
|
||||
|
||||
hide: function(){
|
||||
if(!(this.status === 'show'))
|
||||
return;
|
||||
|
||||
if(this.items.find(':not(.searchable-select-hide)').length === 0)
|
||||
this.input.val('');
|
||||
this.dropdown.addClass('searchable-select-hide');
|
||||
this.searchableElement.trigger('focus');
|
||||
this.status = 'hide';
|
||||
},
|
||||
|
||||
hasCurrentSelectedItem: function(){
|
||||
return this.currentSelectedItem && this.currentSelectedItem.length > 0;
|
||||
},
|
||||
|
||||
selectItem: function(item){
|
||||
if(this.hasCurrentSelectedItem())
|
||||
this.currentSelectedItem.removeClass('selected');
|
||||
|
||||
this.currentSelectedItem = item;
|
||||
item.addClass('selected');
|
||||
|
||||
this.hoverItem(item);
|
||||
|
||||
this.holder.text(item.text());
|
||||
var value = item.data('value');
|
||||
this.holder.data('value', value);
|
||||
this.element.val(value);
|
||||
|
||||
if(this.options.afterSelectItem){
|
||||
this.options.afterSelectItem.apply(this);
|
||||
}
|
||||
},
|
||||
|
||||
hasCurrentHoverItem: function(){
|
||||
return this.currentHoverItem && this.currentHoverItem.length > 0;
|
||||
},
|
||||
|
||||
hoverItem: function(item){
|
||||
if(this.hasCurrentHoverItem())
|
||||
this.currentHoverItem.removeClass('hover');
|
||||
|
||||
if(item.outerHeight() + item.position().top > this.items.height())
|
||||
this.items.scrollTop(this.items.scrollTop() + item.outerHeight() + item.position().top - this.items.height());
|
||||
else if(item.position().top < 0)
|
||||
this.items.scrollTop(this.items.scrollTop() + item.position().top);
|
||||
|
||||
this.currentHoverItem = item;
|
||||
item.addClass('hover');
|
||||
},
|
||||
|
||||
setPriviousAndNextVisibility: function(){
|
||||
if(this.items.scrollTop() === 0){
|
||||
this.hasPrivious.addClass('searchable-select-hide');
|
||||
this.scrollPart.removeClass('has-privious');
|
||||
} else {
|
||||
this.hasPrivious.removeClass('searchable-select-hide');
|
||||
this.scrollPart.addClass('has-privious');
|
||||
}
|
||||
|
||||
if(this.items.scrollTop() + this.items.innerHeight() >= this.items[0].scrollHeight){
|
||||
this.hasNext.addClass('searchable-select-hide');
|
||||
this.scrollPart.removeClass('has-next');
|
||||
} else {
|
||||
this.hasNext.removeClass('searchable-select-hide');
|
||||
this.scrollPart.addClass('has-next');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$.fn.searchableSelect = function(options){
|
||||
this.each(function(){
|
||||
var sS = new $sS($(this), options);
|
||||
});
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
|
|
@ -27,26 +27,35 @@
|
|||
</nav>
|
||||
<div class="page-container" style="text-align: center">
|
||||
<h2><span style="color:red;">聊天信息查询</span></h2>
|
||||
<div style="width: 800px;height: 50px">
|
||||
<div style="width: 1600px;height: 50px">
|
||||
<div style="width: 200px; float: left">
|
||||
<span style="float: left;line-height: 200%">服务器id:</span> <select class="select-default" id="serverId" >
|
||||
<option th:each="server:${serverInfo}" th:value="${server.server_id}" th:text="${server.name}"></option>
|
||||
<span style="line-height: 200%">服务器id:</span>
|
||||
<select id="serverId" style="background-color:#fff;border:solid 1px #d0d0d0;height:34px;line-height:34px;">
|
||||
<option th:each="server:${serverInfo}" th:value="${server.server_id}" th:text="${server.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div style="width: 200px;float: left">
|
||||
<span style="float: left;line-height: 200%">频道:</span><select class="select-default" id="channel" >
|
||||
<option value="1">大厅</option>
|
||||
<option value="2">公会</option>
|
||||
<option value="3">私聊</option>
|
||||
</select>
|
||||
<div style="width: 120px;float: left">
|
||||
<span style="line-height: 200%">频道:</span>
|
||||
<select id="channel" style="background-color:#fff;border:solid 1px #d0d0d0;height:34px;line-height:34px;" >
|
||||
<option value="1">大厅</option>
|
||||
<option value="2">公会</option>
|
||||
<option value="3">私聊</option>
|
||||
</select>
|
||||
</div>
|
||||
<div style="float: left;">
|
||||
|
||||
<div style="float: left;margin-left: 25px;padding-top: 5px;">
|
||||
<span style="line-height: 200%">开始时间:</span>
|
||||
<input type="text" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss'})" id="datemin" class="input-text Wdate" style="width:180px;" name="startTime">
|
||||
<span style="line-height: 200%;margin-left: 8px;">结束时间:</span>
|
||||
<input type="text" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss'})" id="datemax" class="input-text Wdate" style="width:180px;" name="endTime">
|
||||
</div>
|
||||
|
||||
<div style="float: left;margin-left: 30px;">
|
||||
<button id="getChatInfo" class="btn btn-success radius r">查找</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="text-c" id="chatInfo" th:fragment="chatInfo">
|
||||
<div class="mt-20">
|
||||
<table class="table table-border table-bordered table-bg table-hover table-sort table-responsive">
|
||||
|
|
@ -55,11 +64,12 @@
|
|||
<!--<th width="25"><input type="checkbox" name="" value=""/></th>-->
|
||||
<th width="40">玩家角色id</th>
|
||||
<th width="60">玩家名称</th>
|
||||
<th width="60">聊天类型</th>
|
||||
<th width="40">服务器</th>
|
||||
<th width="20">聊天类型</th>
|
||||
<th width="100">聊天内容</th>
|
||||
<th width="80">发送时间</th>
|
||||
<th width="25">发送时间</th>
|
||||
<th width="20">状态</th>
|
||||
|
||||
<th width="30">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
@ -67,18 +77,28 @@
|
|||
<!--<td><input type="checkbox" value="" name=""/></td>-->
|
||||
<td th:text="${obj.uid}" style="text-align: center;"></td>
|
||||
<td th:text="${obj.name}" style="text-align: center;"></td>
|
||||
<td th:text="${obj.serverName}" style="text-align: center;"></td>
|
||||
<td th:text="${obj.type}" style="text-align: center;"></td>
|
||||
<td th:text="${obj.message}" style="text-align: center;"></td>
|
||||
<td th:text="${#dates.format(obj.time,'yyyy-MM-dd HH:mm:ss')}" style="text-align: center;"></td>
|
||||
<th th:switch="${obj.status}" style="text-align: center;">
|
||||
<span th:case="0" >可发言</span>
|
||||
<span th:case="1" >被禁言</span>
|
||||
<span th:case="0" >可发言</span>
|
||||
<span th:case="1" >被禁言</span>
|
||||
</th>
|
||||
<td class="cat-not" style="text-align: center;">
|
||||
<button style="margin-left: 5px;padding: 3px 5px 3px 5px;" type="button" onclick="jinyan()">删除</button>
|
||||
<button style="margin-left: 5px;padding: 3px 5px 3px 5px;" type="button" onclick="jinyan()">禁言</button>
|
||||
<button style="margin-left: 5px;padding: 3px 5px 3px 5px;" type="button" onclick="jinyan()">封禁</button>
|
||||
<button style="margin-left: 5px;padding: 3px 5px 3px 5px;" type="button" onclick="jinyan()">设备封禁</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!--_footer 作为公共模版分离出去-->
|
||||
<script type="text/javascript" src="../static/lib/jquery/1.9.1/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="lib/layer/2.4/layer.js"></script>
|
||||
|
|
@ -89,10 +109,30 @@
|
|||
<script type="text/javascript" src="lib/My97DatePicker/4.8/WdatePicker.js"></script>
|
||||
<script type="text/javascript" src="lib/laypage/1.2/laypage.js"></script>
|
||||
<script type="text/javascript">
|
||||
$("#getChatInfo").click(function () {
|
||||
var url = "/chatInfoShowByServerAndChannel?serverId=" + $('#serverId').val()+"&channelId="+$("#channel").val();
|
||||
$('#chatInfo').load(url);
|
||||
function jinyan(){
|
||||
alert("暂未开发,尽情期待!")
|
||||
}
|
||||
|
||||
$("#getChatInfo").click(function () {
|
||||
// 默认开始时间1970-01-01 00:00:00
|
||||
var datemin = new Date("1970-01-01 00:00:00").getTime();
|
||||
if ($("#datemin").val() != null && $("#datemin").val() != ""){
|
||||
var start = new Date($("#datemin").val());
|
||||
datemin = start.getTime();
|
||||
}
|
||||
// 默认结束时间为当前时间
|
||||
var datemax = new Date().getTime();
|
||||
if ($("#datemax").val() != null && $("#datemax").val() != ""){
|
||||
var end = new Date($("#datemax").val());
|
||||
datemax = end.getTime();
|
||||
}
|
||||
|
||||
var url = "/chatInfoShowByServerAndChannel?" +
|
||||
"serverId=" + $('#serverId').val() +
|
||||
"&channelId=" + $("#channel").val() +
|
||||
"&datemin=" + datemin +
|
||||
"&datemax=" + datemax;
|
||||
$('#chatInfo').load(url);
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="../static/lib/Hui-iconfont/1.0.8/iconfont.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/skin/default/skin.css" id="skin" />
|
||||
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/css/style.css" />
|
||||
<link href="../static/searchableSelect/css/jquery.searchableSelect.css" rel="stylesheet" type="text/css">
|
||||
<!--[if IE 6]>
|
||||
<script type="text/javascript" src="../static/lib/DD_belatedPNG_0.0.8a-min.js"></script>
|
||||
<script>DD_belatedPNG.fix('*');</script>
|
||||
|
|
@ -110,7 +111,7 @@
|
|||
<option th:each="item:${itemNameMap}" th:value="${item.key}" th:text="${item.key}+.+${item.value}"></option>
|
||||
</select>
|
||||
<!--<input type="text" name="itemIds[]" id="itemId_1" style="width: 150px" />-->
|
||||
物品数量:<input type="text" name="itemNum" th:id="itemNum_+(${i})" style="width: 150px" />
|
||||
物品数量:<input type="text" name="itemNum" th:id="itemNum_+(${i})" class="input_bg" />
|
||||
<a href="#" th:if="${i} ne 1" class="removeclass">×</a>
|
||||
<a href="#" th:if="${i} eq 1" id="AddMoreFileBox" class="btn btn-info">+</a>
|
||||
<span class="REWARD"></span>
|
||||
|
|
@ -164,6 +165,7 @@
|
|||
<script type="text/javascript" src="../static/lib/jquery.validation/1.14.0/jquery.validate.js"></script>
|
||||
<script type="text/javascript" src="../static/lib/jquery.validation/1.14.0/validate-methods.js"></script>
|
||||
<script type="text/javascript" src="../static/lib/jquery.validation/1.14.0/messages_zh.js"></script>
|
||||
<script type="text/javascript" src="../static/searchableSelect/js/jquery.searchableSelect.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$('.skin-minimal input').iCheck({
|
||||
|
|
@ -174,10 +176,12 @@
|
|||
$("#tab-system").Huitab({
|
||||
index:0
|
||||
});
|
||||
// 模糊搜素
|
||||
$('#InputsWrapper select').searchableSelect();
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
var MaxInputs = 5; //maximum input boxes allowed
|
||||
var MaxInputs = 20; //maximum input boxes allowed
|
||||
var AddButton = $("#AddMoreFileBox"); //Add button ID
|
||||
|
||||
var item = "#item_";
|
||||
|
|
|
|||
|
|
@ -18,6 +18,10 @@
|
|||
<link rel="stylesheet" type="text/css" href="../static/lib/Hui-iconfont/1.0.8/iconfont.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/skin/default/skin.css" id="skin" />
|
||||
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/css/style.css" />
|
||||
<link href="../static/searchableSelect/css/jquery.searchableSelect.css" rel="stylesheet" type="text/css">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="http://www.jq22.com/jquery/bootstrap-3.3.4.css">
|
||||
<link href="../static/bootstrap/css/bootstrap-select.css" rel="stylesheet">
|
||||
<!--[if IE 6]>
|
||||
<script type="text/javascript" src="../static/lib/DD_belatedPNG_0.0.8a-min.js"></script>
|
||||
<script>DD_belatedPNG.fix('*');</script>
|
||||
|
|
@ -46,7 +50,12 @@
|
|||
<span class="c-red">*</span>
|
||||
区服id:</label>
|
||||
<div class="formControls col-xs-8 col-sm-9">
|
||||
<select name="serverId" class="input-text" id="serverId"><!--下拉列表-->
|
||||
<!-- 多选服务器-->
|
||||
<select name="serverId" class="selectpicker" id="serverId" multiple
|
||||
data-live-search="true"
|
||||
data-width="300px"
|
||||
data-actions-box="true">
|
||||
<!-- <select name="serverId" id="serverId" class="input-text"><!–下拉列表–>-->
|
||||
<option th:each="server:${serverInfo}" th:value="${server.server_id}" th:text="${server.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
|
|
@ -101,7 +110,7 @@
|
|||
<option th:each="item:${itemNameMap}" th:value="${item.key}" th:text="${item.key}+.+${item.value}"></option>
|
||||
</select>
|
||||
<!--<input type="text" name="itemIds[]" id="itemId_1" style="width: 150px" />-->
|
||||
物品数量:<input type="text" name="itemNum" th:id="itemNum_+(${i})" style="width: 150px" />
|
||||
物品数量:<input type="text" name="itemNum" th:id="itemNum_+(${i})" class="input_bg" />
|
||||
<a href="#" th:if="${i} ne 1" class="removeclass">×</a>
|
||||
<a href="#" th:if="${i} eq 1" id="AddMoreFileBox" class="btn btn-info">+</a>
|
||||
<span class="REWARD"></span>
|
||||
|
|
@ -135,13 +144,13 @@
|
|||
<span class="EFFECTTIME"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row cl">
|
||||
<label class="form-label col-xs-4 col-sm-2">版本号:</label>
|
||||
<div class="formControls col-xs-8 col-sm-9">
|
||||
<input type="text" name="version" placeholder="0:所有版本号, 其他客户端版本号" value="" class="input-text"/>
|
||||
<span class="VERSION"></span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="row cl">-->
|
||||
<!-- <label class="form-label col-xs-4 col-sm-2">版本号:</label>-->
|
||||
<!-- <div class="formControls col-xs-8 col-sm-9">-->
|
||||
<!-- <input type="text" name="version" placeholder="0:所有版本号, 其他客户端版本号" value="" class="input-text"/>-->
|
||||
<!-- <span class="VERSION"></span>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="row cl">
|
||||
|
|
@ -164,6 +173,10 @@
|
|||
<script type="text/javascript" src="../static/lib/jquery.validation/1.14.0/jquery.validate.js"></script>
|
||||
<script type="text/javascript" src="../static/lib/jquery.validation/1.14.0/validate-methods.js"></script>
|
||||
<script type="text/javascript" src="../static/lib/jquery.validation/1.14.0/messages_zh.js"></script>
|
||||
<script type="text/javascript" src="../static/searchableSelect/js/jquery.searchableSelect.js"></script>
|
||||
|
||||
<script src="../static/bootstrap/js/bootstrap-select.js"></script>
|
||||
<!--<script src="../static/bootstrap/js/bootstrap.min.js"></script>-->
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$('.skin-minimal input').iCheck({
|
||||
|
|
@ -174,10 +187,37 @@ $(function(){
|
|||
$("#tab-system").Huitab({
|
||||
index:0
|
||||
});
|
||||
// 模糊搜素
|
||||
$('#InputsWrapper select').searchableSelect();
|
||||
});
|
||||
|
||||
// 下拉框多选
|
||||
init();
|
||||
|
||||
function init() {
|
||||
initInfo();
|
||||
}
|
||||
|
||||
function initInfo() {
|
||||
$(window).on('load', function () {
|
||||
|
||||
$('.selectpicker').selectpicker({
|
||||
// 'selectedText': 'cat',
|
||||
noneSelectedText: '请选择',
|
||||
noneResultsText: '没有找到匹配的组织 {0}'
|
||||
});
|
||||
|
||||
$('.selectpicker').selectpicker('refresh');
|
||||
|
||||
// 检测浏览器的方法由用户自行决定
|
||||
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)) {
|
||||
$('.selectpicker').selectpicker('mobile');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
var MaxInputs = 5; //maximum input boxes allowed
|
||||
var MaxInputs = 20; //maximum input boxes allowed
|
||||
var AddButton = $("#AddMoreFileBox"); //Add button ID
|
||||
|
||||
var item = "#item_";
|
||||
|
|
@ -205,7 +245,7 @@ $(document).ready(function() {
|
|||
});
|
||||
function sendSysMail() {
|
||||
var erroCode = $('.SERVERID');
|
||||
var serverId = $("#serverId").val();
|
||||
var serverId = $("#serverId").val().toString();
|
||||
var mailTitle = $("input[name='mailTitle']").val();
|
||||
var mailContent = $("textarea[name='mailContent']").val();
|
||||
var attach = $("input[name='attach']").val();
|
||||
|
|
@ -213,7 +253,7 @@ function sendSysMail() {
|
|||
var sendTime = $("input[name='sendTime']").val();
|
||||
var playerRTime = $("#PlayerRTime").val();
|
||||
var effectTime = $("input[name='effectTime']").val();
|
||||
var version = $("input[name='version']").val();
|
||||
var version = new Date().getTime()/1000;
|
||||
var itemIds = [];
|
||||
$("select[name='itemId']").each(function () {
|
||||
if($(this).val()!=='0'){
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="../static/lib/Hui-iconfont/1.0.8/iconfont.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/skin/default/skin.css" id="skin" />
|
||||
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/css/style.css" />
|
||||
<link href="../static/searchableSelect/css/jquery.searchableSelect.css" rel="stylesheet" type="text/css">
|
||||
<!--[if IE 6]>
|
||||
<script type="text/javascript" src="../static/lib/DD_belatedPNG_0.0.8a-min.js"></script>
|
||||
<script>DD_belatedPNG.fix('*');</script>
|
||||
|
|
@ -135,12 +136,15 @@
|
|||
<div id="InputsWrapper">
|
||||
<div th:each="i:${#numbers.sequence(1,20)}">
|
||||
<div th:style="${i} ne 1?'display:none':''" th:id="item_+(${i})">
|
||||
物品id:
|
||||
<select name="itemIds[]" style="width: 150px" th:id="itemId_+(${i})"><!--下拉列表-->
|
||||
<option th:each="item:${itemNameMap}" th:value="${item.key}" th:text="${item.key}+.+${item.value}"></option>
|
||||
物品ID:
|
||||
<select name="itemIds[]" style="width: 150px" th:id="itemId_+(${i})">
|
||||
<!--下拉列表-->
|
||||
<option th:each="item:${itemNameMap}" th:value="${item.key}"
|
||||
th:text="${item.key}+.+${item.value}"></option>
|
||||
</select>
|
||||
<!--<input type="text" name="itemIds[]" id="itemId_1" style="width: 150px" />-->
|
||||
物品数量:<input type="text" name="itemNums[]" th:id="itemNum_+(${i})" style="width: 150px" />
|
||||
物品数量:
|
||||
<input type="text" name="itemNums[]" th:id="itemNum_+(${i})" class="input_bg"/>
|
||||
<a href="#" th:if="${i} ne 1" class="removeclass">×</a>
|
||||
<a href="#" th:if="${i} eq 1" id="AddMoreFileBox" class="btn btn-info">+</a>
|
||||
<span class="REWARD"></span>
|
||||
|
|
@ -174,6 +178,7 @@
|
|||
<script type="text/javascript" src="../static/lib/jquery.validation/1.14.0/jquery.validate.js"></script>
|
||||
<script type="text/javascript" src="../static/lib/jquery.validation/1.14.0/validate-methods.js"></script>
|
||||
<script type="text/javascript" src="../static/lib/jquery.validation/1.14.0/messages_zh.js"></script>
|
||||
<script type="text/javascript" src="../static/searchableSelect/js/jquery.searchableSelect.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$('.skin-minimal input').iCheck({
|
||||
|
|
@ -184,7 +189,10 @@ $(function(){
|
|||
$("#tab-system").Huitab({
|
||||
index:0
|
||||
});
|
||||
// 模糊搜素
|
||||
$('#InputsWrapper select').searchableSelect();
|
||||
});
|
||||
|
||||
$('#sendNotice').load(function () {
|
||||
// 根据后台返回值处理结果
|
||||
var j=$.parseJSON(text);
|
||||
|
|
@ -194,10 +202,14 @@ $('#sendNotice').load(function () {
|
|||
alert('导入成功');
|
||||
//location.href='BookResourceList.jsp'
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
/* 下拉框模糊搜索 */
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
var MaxInputs = 5; //maximum input boxes allowed
|
||||
var AddButton = $("#AddMoreFileBox"); //Add button ID
|
||||
var MaxInputs = 20; //maximum input boxes allowed
|
||||
var AddButton = $("#AddMoreFileBox"); //Add button ID
|
||||
|
||||
var item = "#item_";
|
||||
var x = 2; //initlal text box count
|
||||
|
|
|
|||
Loading…
Reference in New Issue