mirror of
https://github.com/getrebuild/rebuild.git
synced 2024-09-20 15:35:55 +08:00
some fix
This commit is contained in:
parent
a2e5480c8a
commit
601bd30893
|
@ -112,17 +112,18 @@ public class TableBuilder {
|
|||
}
|
||||
|
||||
// --
|
||||
// HTML Table structure
|
||||
|
||||
static class TBODY {
|
||||
String tag = "tbody";
|
||||
List<TR> children = new ArrayList<>();
|
||||
TBODY() {
|
||||
// <tbody> or <thead>
|
||||
private static class TBODY {
|
||||
private String tag = "tbody";
|
||||
private List<TR> children = new ArrayList<>();
|
||||
private TBODY() {
|
||||
}
|
||||
TBODY(String tag) {
|
||||
private TBODY(String tag) {
|
||||
this.tag = tag;
|
||||
}
|
||||
TBODY addChild(TR c) {
|
||||
c.parent = this;
|
||||
private TBODY addChild(TR c) {
|
||||
children.add(c);
|
||||
return this;
|
||||
}
|
||||
|
@ -136,11 +137,10 @@ public class TableBuilder {
|
|||
}
|
||||
}
|
||||
|
||||
static class TR {
|
||||
TBODY parent = null;
|
||||
List<TD> children = new ArrayList<>();
|
||||
TR addChild(TD c) {
|
||||
c.parent = this;
|
||||
// <tr>
|
||||
private static class TR {
|
||||
private List<TD> children = new ArrayList<>();
|
||||
private TR addChild(TD c) {
|
||||
children.add(c);
|
||||
return this;
|
||||
}
|
||||
|
@ -154,17 +154,17 @@ public class TableBuilder {
|
|||
}
|
||||
}
|
||||
|
||||
static class TD {
|
||||
String tag = null;
|
||||
TR parent = null;
|
||||
String content;
|
||||
int rowspan = 1;
|
||||
TD(String content) {
|
||||
this(content, "td");
|
||||
// <td> or <th>
|
||||
private static class TD {
|
||||
private String tag = null;
|
||||
private String content;
|
||||
private int rowspan = 1;
|
||||
private TD(String content) {
|
||||
this(content, null);
|
||||
}
|
||||
TD(String content, String tag) {
|
||||
private TD(String content, String tag) {
|
||||
this.content = StringUtils.defaultIfBlank(content, "");
|
||||
this.tag = tag;
|
||||
this.tag = StringUtils.defaultIfBlank(tag, "td");
|
||||
}
|
||||
@Override
|
||||
public String toString() {
|
||||
|
|
|
@ -32,13 +32,12 @@ public class Message {
|
|||
|
||||
private ID fromUser;
|
||||
private ID toUser;
|
||||
private String message;
|
||||
|
||||
private ID relatedRecord;
|
||||
|
||||
private String message;
|
||||
|
||||
public Message(ID toUser, String message, ID relatedRecord) {
|
||||
this(UserService.SYSTEM_USER, toUser, message, null);
|
||||
this(UserService.SYSTEM_USER, toUser, message, relatedRecord);
|
||||
}
|
||||
|
||||
public Message(ID fromUser, ID toUser, String message, ID relatedRecord) {
|
||||
|
|
|
@ -1,83 +1,7 @@
|
|||
/* eslint-disable no-unused-vars */
|
||||
/*! jQuery Cookie Plugin v1.4.1 - https://github.com/carhartl/jquery-cookie */
|
||||
// eslint-disable-next-line
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define(['jquery'], factory)
|
||||
} else {
|
||||
if (typeof exports === 'object') {
|
||||
factory(require('jquery'))
|
||||
} else {
|
||||
factory(jQuery)
|
||||
}
|
||||
}
|
||||
}(function ($) {
|
||||
var pluses = /\+/g
|
||||
|
||||
function encode(s) {
|
||||
return config.raw ? s : encodeURIComponent(s)
|
||||
}
|
||||
|
||||
function decode(s) {
|
||||
return config.raw ? s : decodeURIComponent(s)
|
||||
}
|
||||
|
||||
function stringifyCookieValue(value) {
|
||||
return encode(config.json ? JSON.stringify(value) : String(value))
|
||||
}
|
||||
|
||||
function parseCookieValue(s) {
|
||||
if (s.indexOf('"') === 0) {
|
||||
s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\')
|
||||
}
|
||||
try {
|
||||
s = decodeURIComponent(s.replace(pluses, ' '))
|
||||
return config.json ? JSON.parse(s) : s
|
||||
// eslint-disable-next-line no-empty
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
function read(s, converter) {
|
||||
var value = config.raw ? s : parseCookieValue(s)
|
||||
return $.isFunction(converter) ? converter(value) : value
|
||||
}
|
||||
var config = $.cookie = function (key, value, options) {
|
||||
if (value !== undefined && !$.isFunction(value)) {
|
||||
options = $.extend({}, config.defaults, options)
|
||||
if (typeof options.expires === 'number') {
|
||||
var days = options.expires,
|
||||
t = options.expires = new Date()
|
||||
t.setTime(+t + days * 86400000)
|
||||
}
|
||||
return (document.cookie = [encode(key), '=', stringifyCookieValue(value), options.expires ? '; expires=' + options.expires.toUTCString() : '', options.path ? '; path=' + options.path : '', options.domain ? '; domain=' + options.domain : '', options.secure ? '; secure' : ''].join(''))
|
||||
}
|
||||
var result = key ? undefined : {}
|
||||
var cookies = document.cookie ? document.cookie.split('; ') : []
|
||||
for (var i = 0, l = cookies.length; i < l; i++) {
|
||||
var parts = cookies[i].split('=')
|
||||
var name = decode(parts.shift())
|
||||
var cookie = parts.join('=')
|
||||
if (key && key === name) {
|
||||
result = read(cookie, value)
|
||||
break
|
||||
}
|
||||
if (!key && (cookie = read(cookie)) !== undefined) {
|
||||
result[name] = cookie
|
||||
}
|
||||
}
|
||||
return result
|
||||
}
|
||||
config.defaults = {}
|
||||
$.removeCookie = function (key, options) {
|
||||
if ($.cookie(key) === undefined) {
|
||||
return false
|
||||
}
|
||||
$.cookie(key, '', $.extend({}, options, {
|
||||
expires: -1
|
||||
}))
|
||||
return !$.cookie(key)
|
||||
}
|
||||
}));
|
||||
// eslint-disable-next-line quotes
|
||||
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery"],factory)}else{if(typeof exports==="object"){factory(require("jquery"))}else{factory(jQuery)}}}(function($){var pluses=/\+/g;function encode(s){return config.raw?s:encodeURIComponent(s)}function decode(s){return config.raw?s:decodeURIComponent(s)}function stringifyCookieValue(value){return encode(config.json?JSON.stringify(value):String(value))}function parseCookieValue(s){if(s.indexOf('"')===0){s=s.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\")}try{s=decodeURIComponent(s.replace(pluses," "));return config.json?JSON.parse(s):s}catch(e){}}function read(s,converter){var value=config.raw?s:parseCookieValue(s);return $.isFunction(converter)?converter(value):value}var config=$.cookie=function(key,value,options){if(value!==undefined&&!$.isFunction(value)){options=$.extend({},config.defaults,options);if(typeof options.expires==="number"){var days=options.expires,t=options.expires=new Date();t.setTime(+t+days*86400000)}return(document.cookie=[encode(key),"=",stringifyCookieValue(value),options.expires?"; expires="+options.expires.toUTCString():"",options.path?"; path="+options.path:"",options.domain?"; domain="+options.domain:"",options.secure?"; secure":""].join(""))}var result=key?undefined:{};var cookies=document.cookie?document.cookie.split("; "):[];for(var i=0,l=cookies.length;i<l;i++){var parts=cookies[i].split("=");var name=decode(parts.shift());var cookie=parts.join("=");if(key&&key===name){result=read(cookie,value);break}if(!key&&(cookie=read(cookie))!==undefined){result[name]=cookie}}return result};config.defaults={};$.removeCookie=function(key,options){if($.cookie(key)===undefined){return false}$.cookie(key,"",$.extend({},options,{expires:-1}));return !$.cookie(key)}}));
|
||||
// extends jQuery
|
||||
(function ($) {
|
||||
$.fn.extend({
|
||||
|
|
Loading…
Reference in a new issue