增加事务配置和js工具类
This commit is contained in:
parent
b1e79bf589
commit
b640d644cd
@ -31,7 +31,7 @@ public class TransactionConfig {
|
|||||||
/**
|
/**
|
||||||
* 默认新增事务
|
* 默认新增事务
|
||||||
*/
|
*/
|
||||||
private static String[] DEFAULT_SAVE_ARRAY = {"add*", "save*", "insert*", "create*"};
|
private static String[] DEFAULT_SAVE_ARRAY = {"add*", "save*", "insert*", "create*", "new*"};
|
||||||
/**
|
/**
|
||||||
* 默认删除事务
|
* 默认删除事务
|
||||||
*/
|
*/
|
||||||
@ -39,7 +39,7 @@ public class TransactionConfig {
|
|||||||
/**
|
/**
|
||||||
* 默认执行事务
|
* 默认执行事务
|
||||||
*/
|
*/
|
||||||
private static String[] DEFAULT_UPDATE_ARRAY = {"update*", "edit*"};
|
private static String[] DEFAULT_UPDATE_ARRAY = {"update*", "edit*", "reset*"};
|
||||||
/**
|
/**
|
||||||
* 默认其它事务
|
* 默认其它事务
|
||||||
*/
|
*/
|
||||||
|
29
common/src/main/resources/static/assets/js/common-util.js
Normal file
29
common/src/main/resources/static/assets/js/common-util.js
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
/**
|
||||||
|
* 通用工具类
|
||||||
|
* @constructor
|
||||||
|
*/
|
||||||
|
function CommonUtil() {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取html文本
|
||||||
|
* @param content
|
||||||
|
* @return {string|*}
|
||||||
|
*/
|
||||||
|
this.getHtmlText = function (content) {
|
||||||
|
if (!content) {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
var str = content;
|
||||||
|
str = str.replace(/<xml>[\s\S]*?<\/xml>/ig, '');
|
||||||
|
str = str.replace('/class=(")?Mso[a-zA-Z]+(")?)/g', '');
|
||||||
|
str = str.replace(/\n|\r/ig, '')
|
||||||
|
var reg = new RegExp('<!--(.*?)-->', 'g')
|
||||||
|
str = str.replace(/<style>[\s\S]*?<\/style>/ig, '')
|
||||||
|
str = str.replace(/<\/?[^>]*>/g, '')
|
||||||
|
str = str.replace(/[ | ]*\n/g, '')
|
||||||
|
str = str.replace(/ /ig, '')
|
||||||
|
str = str.replace(reg, '')
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user