Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MaxKey单点登录官方(MaxKeyTop)
MaxKey
提交
7567c195
MaxKey
项目概览
MaxKey单点登录官方(MaxKeyTop)
/
MaxKey
9 个月 前同步成功
通知
75
Star
3
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
MaxKey
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
7567c195
编写于
5月 09, 2021
作者:
M
MaxKey
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
synchronizers
上级
28ef8c9d
变更
27
隐藏空白更改
内联
并排
Showing
27 changed file
with
240 addition
and
607 deletion
+240
-607
maxkey-identitys/maxkey-synchronizers/src/main/java/org/maxkey/synchronizer/ISynchronizerService.java
...in/java/org/maxkey/synchronizer/ISynchronizerService.java
+4
-0
maxkey-identitys/maxkey-synchronizers/src/main/java/org/maxkey/synchronizer/activedirectory/ActiveDirectoryOrganizationService.java
...r/activedirectory/ActiveDirectoryOrganizationService.java
+7
-0
maxkey-identitys/maxkey-synchronizers/src/main/java/org/maxkey/synchronizer/activedirectory/ActiveDirectorySynchronizerService.java
...r/activedirectory/ActiveDirectorySynchronizerService.java
+8
-0
maxkey-identitys/maxkey-synchronizers/src/main/java/org/maxkey/synchronizer/activedirectory/ActiveDirectoryUsersService.java
...hronizer/activedirectory/ActiveDirectoryUsersService.java
+7
-0
maxkey-identitys/maxkey-synchronizers/src/main/java/org/maxkey/synchronizer/dingding/DingdingAccessTokenService.java
...key/synchronizer/dingding/DingdingAccessTokenService.java
+3
-1
maxkey-identitys/maxkey-synchronizers/src/main/java/org/maxkey/synchronizer/dingding/DingdingOrganizationService.java
...ey/synchronizer/dingding/DingdingOrganizationService.java
+7
-1
maxkey-identitys/maxkey-synchronizers/src/main/java/org/maxkey/synchronizer/dingding/DingdingSynchronizerService.java
...ey/synchronizer/dingding/DingdingSynchronizerService.java
+11
-1
maxkey-identitys/maxkey-synchronizers/src/main/java/org/maxkey/synchronizer/dingding/DingdingUsersService.java
...rg/maxkey/synchronizer/dingding/DingdingUsersService.java
+7
-0
maxkey-identitys/maxkey-synchronizers/src/main/java/org/maxkey/synchronizer/ldap/LdapOrganizationService.java
...org/maxkey/synchronizer/ldap/LdapOrganizationService.java
+7
-0
maxkey-identitys/maxkey-synchronizers/src/main/java/org/maxkey/synchronizer/ldap/LdapSynchronizerService.java
...org/maxkey/synchronizer/ldap/LdapSynchronizerService.java
+9
-0
maxkey-identitys/maxkey-synchronizers/src/main/java/org/maxkey/synchronizer/ldap/LdapUsersService.java
...n/java/org/maxkey/synchronizer/ldap/LdapUsersService.java
+7
-0
maxkey-identitys/maxkey-synchronizers/src/main/java/org/maxkey/synchronizer/workweixin/WorkweixinAccessTokenService.java
...synchronizer/workweixin/WorkweixinAccessTokenService.java
+3
-1
maxkey-identitys/maxkey-synchronizers/src/main/java/org/maxkey/synchronizer/workweixin/WorkweixinOrganizationService.java
...ynchronizer/workweixin/WorkweixinOrganizationService.java
+7
-0
maxkey-identitys/maxkey-synchronizers/src/main/java/org/maxkey/synchronizer/workweixin/WorkweixinSynchronizerService.java
...ynchronizer/workweixin/WorkweixinSynchronizerService.java
+11
-4
maxkey-identitys/maxkey-synchronizers/src/main/java/org/maxkey/synchronizer/workweixin/WorkweixinUsersService.java
...axkey/synchronizer/workweixin/WorkweixinUsersService.java
+7
-0
maxkey-web-manage/src/main/java/org/maxkey/MaxKeyMgtApplication.java
...manage/src/main/java/org/maxkey/MaxKeyMgtApplication.java
+2
-1
maxkey-web-manage/src/main/java/org/maxkey/web/contorller/SynchronizersController.java
...va/org/maxkey/web/contorller/SynchronizersController.java
+39
-1
maxkey-web-manage/src/main/resources/messages/message.properties
...web-manage/src/main/resources/messages/message.properties
+13
-21
maxkey-web-manage/src/main/resources/messages/message_en.properties
...-manage/src/main/resources/messages/message_en.properties
+1
-0
maxkey-web-manage/src/main/resources/messages/message_zh_CN.properties
...nage/src/main/resources/messages/message_zh_CN.properties
+1
-0
maxkey-web-manage/src/main/resources/static/jquery/json2form/json2form.js
...e/src/main/resources/static/jquery/json2form/json2form.js
+0
-147
maxkey-web-manage/src/main/resources/static/jquery/json2form/json2formDemo.htm
.../main/resources/static/jquery/json2form/json2formDemo.htm
+0
-149
maxkey-web-manage/src/main/resources/static/jquery/json2form/readme.txt
...age/src/main/resources/static/jquery/json2form/readme.txt
+0
-168
maxkey-web-manage/src/main/resources/static/jquery/platform.common.js
...anage/src/main/resources/static/jquery/platform.common.js
+71
-85
maxkey-web-manage/src/main/resources/templates/views/layout/common.cssjs.ftl
...rc/main/resources/templates/views/layout/common.cssjs.ftl
+0
-1
maxkey-web-manage/src/main/resources/templates/views/synchronizers/synchronizersList.ftl
...urces/templates/views/synchronizers/synchronizersList.ftl
+3
-0
maxkey-web-manage/src/main/resources/templates/views/userinfo/usersList.ftl
...src/main/resources/templates/views/userinfo/usersList.ftl
+5
-26
未找到文件。
maxkey-identitys/maxkey-synchronizers/src/main/java/org/maxkey/synchronizer/ISynchronizerService.java
浏览文件 @
7567c195
...
...
@@ -17,7 +17,11 @@
package
org.maxkey.synchronizer
;
import
org.maxkey.entity.Synchronizers
;
public
interface
ISynchronizerService
{
public
void
sync
()
throws
Exception
;
public
void
setSynchronizer
(
Synchronizers
synchronizer
);
}
maxkey-identitys/maxkey-synchronizers/src/main/java/org/maxkey/synchronizer/activedirectory/ActiveDirectoryOrganizationService.java
浏览文件 @
7567c195
...
...
@@ -25,6 +25,7 @@ import javax.naming.directory.SearchControls;
import
javax.naming.directory.SearchResult
;
import
org.maxkey.constants.ldap.OrganizationalUnit
;
import
org.maxkey.entity.Organizations
;
import
org.maxkey.entity.Synchronizers
;
import
org.maxkey.persistence.ldap.ActiveDirectoryUtils
;
import
org.maxkey.persistence.ldap.LdapUtils
;
import
org.maxkey.persistence.service.OrganizationsService
;
...
...
@@ -119,4 +120,10 @@ public class ActiveDirectoryOrganizationService implements ISynchronizerServic
this
.
organizationsService
=
organizationsService
;
}
@Override
public
void
setSynchronizer
(
Synchronizers
Synchronizer
)
{
// TODO Auto-generated method stub
}
}
maxkey-identitys/maxkey-synchronizers/src/main/java/org/maxkey/synchronizer/activedirectory/ActiveDirectorySynchronizerService.java
浏览文件 @
7567c195
...
...
@@ -17,6 +17,7 @@
package
org.maxkey.synchronizer.activedirectory
;
import
org.maxkey.entity.Synchronizers
;
import
org.maxkey.synchronizer.ISynchronizerService
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -27,6 +28,8 @@ import org.springframework.stereotype.Service;
public
class
ActiveDirectorySynchronizerService
implements
ISynchronizerService
{
final
static
Logger
_logger
=
LoggerFactory
.
getLogger
(
ActiveDirectorySynchronizerService
.
class
);
Synchronizers
synchronizer
;
@Autowired
ActiveDirectoryUsersService
activeDirectoryUsersService
;
...
...
@@ -63,6 +66,11 @@ public class ActiveDirectorySynchronizerService implements ISynchronizerServic
this
.
activeDirectoryOrganizationService
=
activeDirectoryOrganizationService
;
}
@Override
public
void
setSynchronizer
(
Synchronizers
synchronizer
)
{
this
.
synchronizer
=
synchronizer
;
}
}
maxkey-identitys/maxkey-synchronizers/src/main/java/org/maxkey/synchronizer/activedirectory/ActiveDirectoryUsersService.java
浏览文件 @
7567c195
...
...
@@ -24,6 +24,7 @@ import javax.naming.directory.Attribute;
import
javax.naming.directory.SearchControls
;
import
javax.naming.directory.SearchResult
;
import
org.maxkey.constants.ldap.ActiveDirectoryUser
;
import
org.maxkey.entity.Synchronizers
;
import
org.maxkey.entity.UserInfo
;
import
org.maxkey.persistence.ldap.ActiveDirectoryUtils
;
import
org.maxkey.persistence.ldap.LdapUtils
;
...
...
@@ -147,6 +148,12 @@ public class ActiveDirectoryUsersService implements ISynchronizerService{
public
void
setUserInfoService
(
UserInfoService
userInfoService
)
{
this
.
userInfoService
=
userInfoService
;
}
@Override
public
void
setSynchronizer
(
Synchronizers
Synchronizer
)
{
// TODO Auto-generated method stub
}
}
maxkey-identitys/maxkey-synchronizers/src/main/java/org/maxkey/synchronizer/dingding/DingdingAccessTokenService.java
浏览文件 @
7567c195
...
...
@@ -33,7 +33,9 @@ public class DingdingAccessTokenService {
String
appsecret
;
public
DingdingAccessTokenService
()
{
}
public
DingdingAccessTokenService
(
String
appkey
,
String
appsecret
)
{
super
();
this
.
appkey
=
appkey
;
...
...
maxkey-identitys/maxkey-synchronizers/src/main/java/org/maxkey/synchronizer/dingding/DingdingOrganizationService.java
浏览文件 @
7567c195
...
...
@@ -18,7 +18,7 @@
package
org.maxkey.synchronizer.dingding
;
import
org.maxkey.entity.Organizations
;
import
org.maxkey.
persistence.ldap.ActiveDirectoryUtil
s
;
import
org.maxkey.
entity.Synchronizer
s
;
import
org.maxkey.persistence.service.OrganizationsService
;
import
org.maxkey.synchronizer.ISynchronizerService
;
import
org.slf4j.Logger
;
...
...
@@ -104,6 +104,12 @@ public class DingdingOrganizationService implements ISynchronizerService{
public
void
setOrganizationsService
(
OrganizationsService
organizationsService
)
{
this
.
organizationsService
=
organizationsService
;
}
@Override
public
void
setSynchronizer
(
Synchronizers
Synchronizer
)
{
// TODO Auto-generated method stub
}
}
maxkey-identitys/maxkey-synchronizers/src/main/java/org/maxkey/synchronizer/dingding/DingdingSynchronizerService.java
浏览文件 @
7567c195
...
...
@@ -17,6 +17,7 @@
package
org.maxkey.synchronizer.dingding
;
import
org.maxkey.entity.Synchronizers
;
import
org.maxkey.synchronizer.ISynchronizerService
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -28,6 +29,7 @@ import com.taobao.api.ApiException;
@Service
public
class
DingdingSynchronizerService
implements
ISynchronizerService
{
final
static
Logger
_logger
=
LoggerFactory
.
getLogger
(
DingdingSynchronizerService
.
class
);
Synchronizers
synchronizer
;
@Autowired
DingdingUsersService
dingdingUsersService
;
...
...
@@ -36,7 +38,7 @@ public class DingdingSynchronizerService implements ISynchronizerService{
DingdingOrganizationService
dingdingOrganizationService
;
DingdingAccessTokenService
dingdingAccessTokenService
;
DingdingAccessTokenService
dingdingAccessTokenService
=
new
DingdingAccessTokenService
()
;
public
DingdingSynchronizerService
()
{
super
();
...
...
@@ -44,6 +46,8 @@ public class DingdingSynchronizerService implements ISynchronizerService{
public
void
sync
()
throws
ApiException
{
_logger
.
info
(
"Sync ..."
);
dingdingAccessTokenService
.
setAppkey
(
synchronizer
.
getPrincipal
());
dingdingAccessTokenService
.
setAppsecret
(
synchronizer
.
getCredentials
());
String
access_token
=
dingdingAccessTokenService
.
requestToken
();
...
...
@@ -78,4 +82,10 @@ public class DingdingSynchronizerService implements ISynchronizerService{
this
.
dingdingAccessTokenService
=
dingdingAccessTokenService
;
}
@Override
public
void
setSynchronizer
(
Synchronizers
synchronizer
)
{
this
.
synchronizer
=
synchronizer
;
}
}
maxkey-identitys/maxkey-synchronizers/src/main/java/org/maxkey/synchronizer/dingding/DingdingUsersService.java
浏览文件 @
7567c195
...
...
@@ -19,6 +19,7 @@ package org.maxkey.synchronizer.dingding;
import
org.joda.time.DateTime
;
import
org.joda.time.format.DateTimeFormat
;
import
org.maxkey.entity.Synchronizers
;
import
org.maxkey.entity.UserInfo
;
import
org.maxkey.persistence.service.UserInfoService
;
import
org.maxkey.synchronizer.ISynchronizerService
;
...
...
@@ -124,6 +125,12 @@ public class DingdingUsersService implements ISynchronizerService{
return
organizationService
;
}
@Override
public
void
setSynchronizer
(
Synchronizers
Synchronizer
)
{
// TODO Auto-generated method stub
}
}
maxkey-identitys/maxkey-synchronizers/src/main/java/org/maxkey/synchronizer/ldap/LdapOrganizationService.java
浏览文件 @
7567c195
...
...
@@ -26,6 +26,7 @@ import javax.naming.directory.SearchControls;
import
javax.naming.directory.SearchResult
;
import
org.maxkey.constants.ldap.OrganizationalUnit
;
import
org.maxkey.entity.Organizations
;
import
org.maxkey.entity.Synchronizers
;
import
org.maxkey.persistence.ldap.LdapUtils
;
import
org.maxkey.persistence.service.OrganizationsService
;
import
org.maxkey.synchronizer.ISynchronizerService
;
...
...
@@ -122,6 +123,12 @@ public class LdapOrganizationService implements ISynchronizerService{
public
void
setOrganizationsService
(
OrganizationsService
organizationsService
)
{
this
.
organizationsService
=
organizationsService
;
}
@Override
public
void
setSynchronizer
(
Synchronizers
Synchronizer
)
{
// TODO Auto-generated method stub
}
}
maxkey-identitys/maxkey-synchronizers/src/main/java/org/maxkey/synchronizer/ldap/LdapSynchronizerService.java
浏览文件 @
7567c195
...
...
@@ -17,6 +17,7 @@
package
org.maxkey.synchronizer.ldap
;
import
org.maxkey.entity.Synchronizers
;
import
org.maxkey.synchronizer.ISynchronizerService
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -27,6 +28,8 @@ import org.springframework.stereotype.Service;
public
class
LdapSynchronizerService
implements
ISynchronizerService
{
final
static
Logger
_logger
=
LoggerFactory
.
getLogger
(
LdapSynchronizerService
.
class
);
Synchronizers
synchronizer
;
@Autowired
LdapUsersService
ldapUsersService
;
...
...
@@ -59,5 +62,11 @@ public class LdapSynchronizerService implements ISynchronizerService{
this
.
ldapOrganizationService
=
ldapOrganizationService
;
}
@Override
public
void
setSynchronizer
(
Synchronizers
synchronizer
)
{
this
.
synchronizer
=
synchronizer
;
}
}
maxkey-identitys/maxkey-synchronizers/src/main/java/org/maxkey/synchronizer/ldap/LdapUsersService.java
浏览文件 @
7567c195
...
...
@@ -24,6 +24,7 @@ import javax.naming.directory.Attribute;
import
javax.naming.directory.SearchControls
;
import
javax.naming.directory.SearchResult
;
import
org.maxkey.constants.ldap.InetOrgPerson
;
import
org.maxkey.entity.Synchronizers
;
import
org.maxkey.entity.UserInfo
;
import
org.maxkey.persistence.ldap.LdapUtils
;
import
org.maxkey.persistence.service.UserInfoService
;
...
...
@@ -139,6 +140,12 @@ public class LdapUsersService implements ISynchronizerService{
public
void
setUserInfoService
(
UserInfoService
userInfoService
)
{
this
.
userInfoService
=
userInfoService
;
}
@Override
public
void
setSynchronizer
(
Synchronizers
Synchronizer
)
{
// TODO Auto-generated method stub
}
}
maxkey-identitys/maxkey-synchronizers/src/main/java/org/maxkey/synchronizer/workweixin/WorkweixinAccessTokenService.java
浏览文件 @
7567c195
...
...
@@ -33,7 +33,9 @@ public class WorkweixinAccessTokenService {
public
static
String
TOKEN_URL
=
"https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=%s&corpsecret=%s"
;
public
WorkweixinAccessTokenService
()
{}
public
WorkweixinAccessTokenService
(
String
corpid
,
String
corpsecret
)
{
super
();
this
.
corpid
=
corpid
;
...
...
maxkey-identitys/maxkey-synchronizers/src/main/java/org/maxkey/synchronizer/workweixin/WorkweixinOrganizationService.java
浏览文件 @
7567c195
...
...
@@ -18,6 +18,7 @@
package
org.maxkey.synchronizer.workweixin
;
import
org.maxkey.entity.Organizations
;
import
org.maxkey.entity.Synchronizers
;
import
org.maxkey.persistence.service.OrganizationsService
;
import
org.maxkey.synchronizer.ISynchronizerService
;
import
org.maxkey.synchronizer.workweixin.entity.WorkWeixinDepts
;
...
...
@@ -103,4 +104,10 @@ public class WorkweixinOrganizationService implements ISynchronizerService{
this
.
organizationsService
=
organizationsService
;
}
@Override
public
void
setSynchronizer
(
Synchronizers
synchronizer
)
{
}
}
maxkey-identitys/maxkey-synchronizers/src/main/java/org/maxkey/synchronizer/workweixin/WorkweixinSynchronizerService.java
浏览文件 @
7567c195
...
...
@@ -17,17 +17,17 @@
package
org.maxkey.synchronizer.workweixin
;
import
org.maxkey.entity.Synchronizers
;
import
org.maxkey.synchronizer.ISynchronizerService
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.taobao.api.ApiException
;
@Service
public
class
WorkweixinSynchronizerService
implements
ISynchronizerService
{
final
static
Logger
_logger
=
LoggerFactory
.
getLogger
(
WorkweixinSynchronizerService
.
class
);
Synchronizers
synchronizer
;
@Autowired
WorkweixinUsersService
workweixinUsersService
;
...
...
@@ -36,7 +36,7 @@ public class WorkweixinSynchronizerService implements ISynchronizerService{
WorkweixinOrganizationService
workweixinOrganizationService
;
WorkweixinAccessTokenService
workweixinAccessTokenService
;
WorkweixinAccessTokenService
workweixinAccessTokenService
=
new
WorkweixinAccessTokenService
()
;
public
WorkweixinSynchronizerService
()
{
super
();
...
...
@@ -44,7 +44,8 @@ public class WorkweixinSynchronizerService implements ISynchronizerService{
public
void
sync
()
throws
Exception
{
_logger
.
info
(
"Sync ..."
);
workweixinAccessTokenService
.
setCorpid
(
synchronizer
.
getPrincipal
());
workweixinAccessTokenService
.
setCorpsecret
(
synchronizer
.
getCredentials
());
String
access_token
=
workweixinAccessTokenService
.
requestToken
();
workweixinOrganizationService
.
setAccess_token
(
access_token
);
...
...
@@ -78,4 +79,10 @@ public class WorkweixinSynchronizerService implements ISynchronizerService{
this
.
workweixinAccessTokenService
=
workweixinAccessTokenService
;
}
@Override
public
void
setSynchronizer
(
Synchronizers
synchronizer
)
{
this
.
synchronizer
=
synchronizer
;
}
}
maxkey-identitys/maxkey-synchronizers/src/main/java/org/maxkey/synchronizer/workweixin/WorkweixinUsersService.java
浏览文件 @
7567c195
...
...
@@ -17,6 +17,7 @@
package
org.maxkey.synchronizer.workweixin
;
import
org.maxkey.entity.Synchronizers
;
import
org.maxkey.entity.UserInfo
;
import
org.maxkey.persistence.service.UserInfoService
;
import
org.maxkey.synchronizer.ISynchronizerService
;
...
...
@@ -111,6 +112,12 @@ public class WorkweixinUsersService implements ISynchronizerService{
return
organizationService
;
}
@Override
public
void
setSynchronizer
(
Synchronizers
Synchronizer
)
{
// TODO Auto-generated method stub
}
}
maxkey-web-manage/src/main/java/org/maxkey/MaxKeyMgtApplication.java
浏览文件 @
7567c195
...
...
@@ -50,7 +50,8 @@ import org.springframework.context.annotation.ComponentScan;
"org.maxkey.web.tag"
,
"org.maxkey.identity.kafka"
,
"org.maxkey.identity.scim.controller"
,
"org.maxkey.identity.rest"
"org.maxkey.identity.rest"
,
"org.maxkey.synchronizer"
})
@MapperScan
(
"org.maxkey.persistence.mapper,"
)
@SpringBootApplication
...
...
maxkey-web-manage/src/main/java/org/maxkey/web/contorller/SynchronizersController.java
浏览文件 @
7567c195
...
...
@@ -17,10 +17,14 @@
package
org.maxkey.web.contorller
;
import
java.util.HashMap
;
import
java.util.List
;
import
org.apache.mybatis.jpa.persistence.JpaPageResults
;
import
org.maxkey.constants.ConstantsOperateMessage
;
import
org.maxkey.entity.Synchronizers
;
import
org.maxkey.persistence.service.SynchronizersService
;
import
org.maxkey.synchronizer.ISynchronizerService
;
import
org.maxkey.util.StringUtils
;
import
org.maxkey.web.WebContext
;
import
org.maxkey.web.message.Message
;
import
org.maxkey.web.message.MessageType
;
...
...
@@ -32,6 +36,7 @@ import org.springframework.stereotype.Controller;
import
org.springframework.web.bind.annotation.ModelAttribute
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.servlet.ModelAndView
;
...
...
@@ -44,8 +49,15 @@ public class SynchronizersController {
@Autowired
@Qualifier
(
"synchronizersService"
)
SynchronizersService
synchronizerssService
;
private
static
HashMap
<
String
,
String
>
synchronizerMap
=
new
HashMap
<
String
,
String
>();
static
{
synchronizerMap
.
put
(
"1"
,
"ldapSynchronizerService"
);
synchronizerMap
.
put
(
"2"
,
"activeDirectorySynchronizerService"
);
synchronizerMap
.
put
(
"3"
,
"dingdingSynchronizerService"
);
synchronizerMap
.
put
(
"4"
,
"workweixinSynchronizerService"
);
}
@RequestMapping
(
value
={
"/list"
})
public
ModelAndView
groupsList
(){
...
...
@@ -92,5 +104,31 @@ public class SynchronizersController {
}
}
/**
* 修改
* @param group
* @return
*/
@ResponseBody
@RequestMapping
(
value
={
"/sync"
})
public
Message
sync
(
@RequestParam
(
"id"
)
String
id
)
{
_logger
.
debug
(
"-update synchronizers ids :"
+
id
);
List
<
String
>
ids
=
StringUtils
.
string2List
(
id
,
","
);
try
{
for
(
String
sysId
:
ids
)
{
Synchronizers
synchronizer
=
synchronizerssService
.
get
(
sysId
);
_logger
.
debug
(
"synchronizer "
+
synchronizer
);
ISynchronizerService
synchronizerService
=
(
ISynchronizerService
)
WebContext
.
getBean
(
synchronizerMap
.
get
(
sysId
));
synchronizerService
.
setSynchronizer
(
synchronizer
);
synchronizerService
.
sync
();
}
}
catch
(
Exception
e
)
{
_logger
.
error
(
"synchronizer Exception "
,
e
);
return
new
Message
(
WebContext
.
getI18nValue
(
ConstantsOperateMessage
.
UPDATE_ERROR
),
MessageType
.
error
);
}
return
new
Message
(
WebContext
.
getI18nValue
(
ConstantsOperateMessage
.
UPDATE_SUCCESS
),
MessageType
.
success
);
}
}
maxkey-web-manage/src/main/resources/messages/message.properties
浏览文件 @
7567c195
...
...
@@ -92,7 +92,7 @@ login.password.confirmPassword=\u786e\u8ba4\u65b0\u5bc6\u7801
login.password.initial.change.tip
=
\u9996\u
6b21
\u
767b
\u
5f55
\u
ff0c
\u
8bf7
\u
4fee
\u6539\u
521d
\u
59cb
\u5316\u
5bc6
\u7801
login.password.changepassword
=
\u
5bc6
\u7801\u
4fee
\u6539
login.password.applogin.changepassword
=
\u
5e94
\u7528\u
767b
\u
5f55
\u
5bc6
\u7801\u
8bbe
\u
7f6e
#passwordpolicy
login.passwordpolicy
=
\u
5bc6
\u7801\u
7b56
\u7565
login.passwordpolicy.minlength
=
\u6700\u
5c0f
\u
957f
\u
5ea6
login.passwordpolicy.maxlength
=
\u6700\u5927\u
957f
\u
5ea6
...
...
@@ -111,13 +111,12 @@ login.passwordpolicy.numerical=\u6570\u5b57\u5e8f\u5217\u7b56\u7565
login.passwordpolicy.qwerty
=
\u
952e
\u
76d8
\u
7b56
\u7565
login.passwordpolicy.occurances
=
\u
5b57
\u
7b26
\u
91cd
\u
590d
\u
6b21
\u6570
#social
login.social.link
=
\u
7ed1
\u
5b9a
login.social.unlink
=
\u
89e3
\u9664
login.social.icon
=
\u
56fe
\u6807
login.social.provider
=
\u
4f9b
\u
5e94
\u5546
#
#userinfo
userinfo.id
=
\u7528\u6237\u
7f16
\u
53f7
userinfo.tab.basic
=
\u
57fa
\u
672c
\u
4fe1
\u
606f
userinfo.tab.business
=
\u
673a
\u6784\u
4fe1
\u
606f
...
...
@@ -218,7 +217,7 @@ userinfo.authnType.authnType.7=HOTP\u4ee4\u724c
userinfo.authnType.authnType.8
=
RSA
\u
4ee4
\u
724c
userinfo.authnType.authnType.9
=
\u6570\u
5b57
\u
8bc1
\u
4e66
userinfo.authnType.authnType.10
=
USB Key
#org
org.tab.basic
=
\u
57fa
\u
672c
\u
4fe1
\u
606f
org.tab.extra
=
\u6269\u
5c55
\u
4fe1
\u
606f
org.id
=
\u
673a
\u6784\u
7f16
\u
53f7
...
...
@@ -242,7 +241,6 @@ org.address=\u5730\u5740
org.postalcode
=
\u
90ae
\u
7f16
org.sortorder
=
\u6392\u
5e8f
org.description
=
\u
63cf
\u
8ff0
#opt totp
login.totp.sharedSecret
=
\u5171\u
4eab
\u
5bc6
\u7801
login.totp.period
=
\u5468\u
671f
...
...
@@ -313,12 +311,10 @@ apps.extendAttr.parameter.type=\u7c7b\u578b
apps.extendAttr.parameter.value
=
\u
503c
apps.principal
=
\u
51ed
\u
8bc1
apps.credentials
=
\u
79d8
\u
94a5
#adapter
apps.adapter.name
=
\u
540D
\u
79F0
apps.adapter.adapter
=
\u9002\u
914D
\u5668
apps.adapter.protocol
=
\u
534F
\u
8BAE
#formbased
apps.formbased.info
=
\u8868\u5355\u
8ba4
\u
8bc1
apps.formbased.redirectUri
=
\u
8ba4
\u
8bc1
\u5730\u5740
...
...
@@ -410,7 +406,6 @@ apps.oauth.connect.idTokenEncryptedAlgorithm=idToken\u52a0\u5bc6\u7b97\u6cd5
apps.oauth.connect.userInfoEncryptedAlgorithm
=
\u7528\u6237\u
52a0
\u
5bc6
\u
7b97
\u
6cd5
apps.oauth.connect.idTokenEncryptionMethod
=
idToken
\u
52a0
\u
5bc6
\u
65b9
\u
6cd5
apps.oauth.connect.userInfoEncryptionMethod
=
\u7528\u6237\u
52a0
\u
5bc6
\u
65b9
\u
6cd5
#group
group.id
=
\u
7ec4
\u
7f16
\u7801
group.name
=
\u7528\u6237\u
7ec4
...
...
@@ -419,14 +414,13 @@ group.filters=\u8fc7\u6ee4\u5668
group.orgidslist
=
\u
673a
\u6784\u5217\u8868
group.resumeTime
=
\u
52a8
\u6001\u
65f6
\u
95f4
group.suspendTime
=
\u6302\u
8d77
\u
65f6
\u
95f4
#role
role.id
=
\u
89d2
\u8272\u
7f16
\u7801
role.name
=
\u
89d2
\u8272
role.dynamic
=
\u
52a8
\u6001\u
7ec4
role.filters
=
\u
8fc7
\u
6ee4
\u5668
role.orgidslist
=
\u
673a
\u6784\u5217\u8868
#resource
resource.id
=
\u
8d44
\u
6e90
\u
7f16
\u7801
resource.name
=
\u
8d44
\u
6e90
\u
540d
\u
79f0
resource.parentId
=
\u7236\u
7ea7
\u
7f16
\u7801
...
...
@@ -443,7 +437,6 @@ resource.resourceIcon=\u56fe\u6807
resource.resourceUrl
=
\u
8d44
\u
6e90
\u5730\u5740
resource.resourceAction
=
\u
52a8
\u
4f5c
resource.resourceStyle
=
\u6837\u
5f0f
#account
account.username
=
\u7528\u6237\u
540d
account.displayName
=
\u7528\u6237\u
59d3
\u
540d
...
...
@@ -451,7 +444,6 @@ account.appId=\u5e94\u7528\u7f16\u53f7
account.appName
=
\u
5e94
\u7528\u
540d
\u
79f0
account.relatedUsername
=
\u7528\u6237\u
8d26
\u
53f7
account.relatedPassword
=
\u
8d26
\u
53f7
\u
5bc6
\u7801
#synchronizers
synchronizers.id
=
\u
7F16
\u
53F7
synchronizers.name
=
\u
540C
\u
6B65
\u5668\u
540D
\u
79F0
...
...
@@ -469,7 +461,7 @@ synchronizers.trustStore=\u8BC1\u4E66\u8DEF\u5F84
synchronizers.trustStorePassword
=
\u
8BC1
\u
4E66
\u
5BC6
\u
94A5
synchronizers.resumeTime
=
\u6062\u
590D
\u
65F6
\u
95F4
synchronizers.suspendTime
=
\u6302\u
8D77
\u
65F6
\u
95F4
#button
button.text.action
=
\u
8bbf
\u
95ee
button.text.visit
=
\u
8bbf
\u
95ee
button.text.save
=
\u
4fdd
\u
5b58
...
...
@@ -489,7 +481,8 @@ button.text.view=\u67e5\u770b
button.text.hidden
=
\u9690\u
85cf
button.text.import
=
\u
5bfc
\u5165
button.text.adjunct
=
\u
517c
\u
4efb
\u
673a
\u6784
button.text.sync
=
\u
540C
\u
6B65
#loginhistory
log.loginhistory.id
=
\u
7f16
\u
53f7
log.loginhistory.sessionId
=
\u
4f1a
\u
8bdd
log.loginhistory.username
=
\u
767b
\u
5f55
\u
540d
...
...
@@ -506,7 +499,7 @@ log.loginhistory.application=\u5e94\u7528
log.loginhistory.loginUrl
=
\u
767b
\u
5f55
\u5730\u5740
log.loginhistory.code
=
\u
4ee3
\u7801
log.loginhistory.rpUserInfo
=
\u
7b2c
\u
4e09
\u
65b9
#loginappshistory
log.loginappshistory.id
=
\u
7f16
\u
53f7
log.loginappshistory.sessionId
=
\u
4f1a
\u
8bdd
log.loginappshistory.uid
=
\u7528\u6237\u
7f16
\u
53f7
...
...
@@ -515,14 +508,14 @@ log.loginappshistory.displayName=\u7528\u6237\u540d
log.loginappshistory.appId
=
\u
5e94
\u7528\u
7f16
\u
53f7
log.loginappshistory.appName
=
\u
5e94
\u7528\u
540d
\u
79f0
log.loginappshistory.loginTime
=
\u
767b
\u
5f55
\u
65f6
\u
95f4
#operate
log.operate.servicename
=
\u
670d
\u
52a1
log.operate.message
=
\u
6d88
\u
606f
log.operate.content
=
\u5185\u
5bb9
log.operate.messageType
=
\u
6d88
\u
606f
\u
7c7b
\u
578b
log.operate.operateType
=
\u
64cd
\u
4f5c
\u
7c7b
\u
578b
log.operate.username
=
\u
64cd
\u
4f5c
\u
4eba
#message
message.action.insert.success
=
\u
65b0
\u
589e
\u
64cd
\u
4f5c
\u6210\u
529f
message.action.insert.error
=
\u
65b0
\u
589e
\u
64cd
\u
4f5c
\u5931\u
8d25
message.action.update.success
=
\u
66f4
\u
65b0
\u
64cd
\u
4f5c
\u6210\u
529f
...
...
@@ -531,17 +524,16 @@ message.action.delete.success=\u5220\u9664\u64cd\u4f5c\u6210\u529f
message.action.delete.error
=
\u5220\u9664\u
64cd
\u
4f5c
\u5931\u
8d25
message.action.import.success
=
\u6279\u
91cf
\u
5bfc
\u5165\u6210\u
529f
message.action.import.error
=
\u6279\u
91cf
\u
5bfc
\u5165\u5931\u
8d25
#import
import.title
=
\u6279\u
91cf
\u
5bfc
\u5165\u6570\u
636e
import.file.select
=
\u9009\u
62e9
\u
5bfc
\u5165\u6587\u
4ef6
import.template.download
=
\u
4e0b
\u
8f7d
\u
6a21
\u
677f
import.update.exist
=
\u
66f4
\u
65b0
\u
5b58
\u5728\u6570\u
636e
import.tip
=
\u
63d0
\u
793a
\u
ff1a
\u
4ec5
\u5141\u
8bb8
\u
5bfc
\u5165\u
201cxls
\u
201d
\u6216\u8005\u
201cxlsx
\u
201d
\u
683c
\u
5f0f
\u7684\u6587\u
4ef6
#Notices
notices.title
=
\u6807\u9898
notices.content
=
\u5185\u
5BB9
#navs
navs.system
=
\u
7cfb
\u
7edf
navs.home
=
\u9996\u9875
navs.orgs
=
\u
673a
\u6784\u
7ba1
\u7406
...
...
maxkey-web-manage/src/main/resources/messages/message_en.properties
浏览文件 @
7567c195
...
...
@@ -491,6 +491,7 @@ button.text.view=View
button.text.hidden
=
Hidden
button.text.import
=
Import
button.text.adjunct
=
Adjoint Depts
button.text.sync
=
Sync
log.loginhistory.id
=
id
log.loginhistory.sessionId
=
sessionId
...
...
maxkey-web-manage/src/main/resources/messages/message_zh_CN.properties
浏览文件 @
7567c195
...
...
@@ -489,6 +489,7 @@ button.text.view=\u67e5\u770b
button.text.hidden
=
\u9690\u
85cf
button.text.import
=
\u
5bfc
\u5165
button.text.adjunct
=
\u
517c
\u
4efb
\u
673a
\u6784
button.text.sync
=
\u
540C
\u
6B65
log.loginhistory.id
=
\u
7f16
\u
53f7
log.loginhistory.sessionId
=
\u
4f1a
\u
8bdd
...
...
maxkey-web-manage/src/main/resources/static/jquery/json2form/json2form.js
已删除
100644 → 0
浏览文件 @
28ef8c9d
/* jQuery json2form Plugin
* version: 1.0 (2011-03-01)
*
* Copyright (c) 2011, Crystal, shimingxy@163.com
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
* Date: 2011-03-01 rev 1
*/
;(
function
(
$
)
{
$
.
json2form
=
$
.
json2form
||
{};
$
.
fn
.
json2form
=
function
(
config
)
{
var
config
=
$
.
extend
({
url
:
null
,
elem
:
this
.
attr
(
"
id
"
),
type
:
'
POST
'
},
config
||
{});
if
(
config
.
url
){
$
.
ajax
({
type
:
config
.
type
,
url
:
config
.
url
,
data
:
$
.
extend
({
json2form
:
config
.
elem
},
config
.
data
||
{}),
dataType
:
"
json
"
,
async
:
false
,
success
:
function
(
data
){
config
.
data
=
data
;
}
});
}
if
(
!
$
(
"
#
"
+
config
.
elem
).
attr
(
"
loadedInit
"
)){
//init checkbox radio and select element ,label
if
(
config
.
data
.
init
){
for
(
var
elem
in
config
.
data
.
init
){
var
arrayData
=
config
.
data
.
init
[
elem
];
if
(
$
(
"
#
"
+
config
.
elem
+
"
input[name='
"
+
elem
+
"
']
"
)){
var
elemType
=
$
(
"
#
"
+
config
.
elem
+
"
input[name='
"
+
elem
+
"
']
"
).
attr
(
"
type
"
);
var
elemName
=
$
(
"
#
"
+
config
.
elem
+
"
input[name='
"
+
elem
+
"
']
"
).
attr
(
"
name
"
);
var
initElem
=
$
(
"
#
"
+
config
.
elem
+
"
input[name='
"
+
elem
+
"
']
"
);
switch
(
elemType
){
case
"
checkbox
"
:
case
"
radio
"
:
for
(
var
initelem
in
arrayData
){
initElem
.
after
(
'
<input type="
'
+
elemType
+
'
" name="
'
+
elemName
+
'
" value="
'
+
arrayData
[
initelem
].
value
+
'
" />
'
+
arrayData
[
initelem
].
display
);
}
initElem
.
remove
();
break
;
}
}
if
(
$
(
"
#
"
+
config
.
elem
+
"
select[name='
"
+
elem
+
"
']
"
)){
for
(
var
initelem
in
arrayData
){
$
(
"
#
"
+
config
.
elem
+
"
select[name='
"
+
elem
+
"
']
"
).
append
(
"
<option value='
"
+
arrayData
[
initelem
].
value
+
"
'>
"
+
arrayData
[
initelem
].
display
+
"
</option>
"
);
}
}
}
}
if
(
config
.
data
.
label
){
//label
$
(
"
#
"
+
config
.
elem
+
"
label
"
).
each
(
function
(){
var
labelFor
=
$
(
this
).
attr
(
"
for
"
);
if
(
config
.
data
.
label
[
labelFor
]){
$
(
this
).
html
(
config
.
data
.
label
[
labelFor
]);
}
});
}
}
if
(
config
.
data
){
//input text password hidden button reset submit checkbox radio select textarea
$
(
"
#
"
+
config
.
elem
+
"
input,select,textarea
"
).
each
(
function
(){
var
elemType
=
$
(
this
).
attr
(
"
type
"
)
==
undefined
?
this
.
type
:
$
(
this
).
attr
(
"
type
"
);
var
elemName
=
$
(
this
).
attr
(
"
name
"
);
var
elemData
=
config
.
data
[
elemName
];
if
(
!
$
(
"
#
"
+
config
.
elem
).
attr
(
"
loadedInit
"
)
&&
$
(
this
).
attr
(
"
loadurl
"
)){
switch
(
elemType
){
case
"
checkbox
"
:
case
"
radio
"
:
case
"
select
"
:
case
"
select-one
"
:
case
"
select-multiple
"
:{
var
_this
=
this
;
$
.
ajax
({
type
:
config
.
type
,
url
:
$
(
this
).
attr
(
"
loadurl
"
),
dataType
:
"
json
"
,
async
:
false
,
success
:
function
(
data
){
if
(
elemType
==
"
select
"
||
elemType
==
"
select-one
"
||
elemType
==
"
select-multiple
"
){
$
(
_this
).
empty
();
}
for
(
var
elem
in
data
){
if
(
elemType
==
"
select
"
||
elemType
==
"
select-one
"
||
elemType
==
"
select-multiple
"
){
$
(
_this
).
append
(
"
<option value='
"
+
data
[
elem
].
value
+
"
'>
"
+
data
[
elem
].
display
+
"
</option>
"
);
}
else
{
$
(
_this
).
after
(
'
<input type="
'
+
elemType
+
'
" name="
'
+
elemName
+
'
" value="
'
+
data
[
elem
].
value
+
'
" />
'
+
data
[
elem
].
display
);
}
}
if
(
elemType
==
"
checkbox
"
||
elemType
==
"
radio
"
)
$
(
_this
).
remove
();
}
});
break
;
}
}
}
if
(
elemData
){
switch
(
elemType
){
case
undefined
:
case
"
text
"
:
case
"
password
"
:
case
"
hidden
"
:
case
"
button
"
:
case
"
reset
"
:
case
"
textarea
"
:
case
"
submit
"
:{
if
(
typeof
(
elemData
)
==
"
string
"
){
$
(
this
).
val
(
elemData
.
toUpperCase
()
==
"
NULL
"
?
""
:
elemData
);
}
else
{
$
(
this
).
val
(
elemData
+
""
);
}
break
;
}
case
"
checkbox
"
:
case
"
radio
"
:{
$
(
this
).
attr
(
"
checked
"
,
false
);
if
(
elemData
.
constructor
==
Array
){
//checkbox multiple value is Array
for
(
var
elem
in
elemData
){
if
(
elemData
[
elem
]
==
$
(
this
).
val
()){
$
(
this
).
attr
(
"
checked
"
,
true
);
}
}
}
else
{
//radio or checkbox is a string single value
if
(
elemData
==
$
(
this
).
val
()){
$
(
this
).
attr
(
"
checked
"
,
true
);
}
}
break
;
}
case
"
select
"
:
case
"
select-one
"
:
case
"
select-multiple
"
:{
$
(
this
).
find
(
"
option:selected
"
).
attr
(
"
selected
"
,
false
);
if
(
elemData
.
constructor
==
Array
){
for
(
var
elem
in
elemData
){
$
(
this
).
find
(
"
option[value='
"
+
elemData
[
elem
]
+
"
']
"
).
attr
(
"
selected
"
,
true
);
}
}
else
{
$
(
this
).
find
(
"
option[value='
"
+
elemData
+
"
']
"
).
attr
(
"
selected
"
,
true
);
}
break
;
}
}
}
});
}
$
(
"
#
"
+
config
.
elem
).
attr
(
"
loadedInit
"
,
"
true
"
);
//loadedInit is true,next invoke not need init checkbox radio and select element ,label
};
})(
jQuery
);
\ No newline at end of file
maxkey-web-manage/src/main/resources/static/jquery/json2form/json2formDemo.htm
已删除
100644 → 0
浏览文件 @
28ef8c9d
<html>
<head>
<title>
Json2form Demo
</title>
<script
src=
"jquery-1.4.4.min.js"
type=
"text/javascript"
></script>
<script
src=
"json2form.js"
type=
"text/javascript"
></script>
<script
type=
"text/javascript"
>
jQuery
(
document
).
ready
(
function
(){
var
objdata
=
{
txt
:
'
文字输入
'
,
pwd
:
'
密码输入
'
,
hd
:
'
隐藏
'
,
are
:
'
多行文字json2form
'
,
btn
:
'
按钮
'
,
rt
:
'
重置按钮
'
,
sb
:
'
提交按钮
'
,
rad
:
'
男
'
,
chk
:
'
chk1
'
,
chk
:[
'
美国
'
,
'
中国
'
],
sl
:[
'
法国
'
,
'
日本
'
],
label
:{
txt
:
'
自定义文本框标签
'
,
sl
:
'
自定义下拉列表标签
'
},
init
:{
chk444
:[{
"
value
"
:
"
comm
"
,
"
display
"
:
"
一般资源
"
},{
"
value
"
:
"
system
"
,
"
display
"
:
"
系统
"
},{
"
value
"
:
"
page
"
,
"
display
"
:
"
页面
"
},{
"
value
"
:
"
url
"
,
"
display
"
:
"
链接
"
},{
"
value
"
:
"
model
"
,
"
display
"
:
"
模块
"
},{
"
value
"
:
"
data
"
,
"
display
"
:
"
数据
"
}],
chk555
:[{
"
value
"
:
"
comm
"
,
"
display
"
:
"
一般资源
"
},{
"
value
"
:
"
system
"
,
"
display
"
:
"
系统
"
},{
"
value
"
:
"
page
"
,
"
display
"
:
"
页面
"
},{
"
value
"
:
"
url
"
,
"
display
"
:
"
链接
"
},{
"
value
"
:
"
model
"
,
"
display
"
:
"
模块
"
},{
"
value
"
:
"
data
"
,
"
display
"
:
"
数据
"
}],
slinit
:[{
"
value
"
:
"
comm
"
,
"
display
"
:
"
一般资源
"
},{
"
value
"
:
"
system
"
,
"
display
"
:
"
系统
"
},{
"
value
"
:
"
page
"
,
"
display
"
:
"
页面
"
},{
"
value
"
:
"
url
"
,
"
display
"
:
"
链接
"
},{
"
value
"
:
"
model
"
,
"
display
"
:
"
模块
"
},{
"
value
"
:
"
data
"
,
"
display
"
:
"
数据
"
}]
}
};
$
(
"
#json2form
"
).
json2form
({
data
:
objdata
});
$
(
"
#json2form
"
).
json2form
({
data
:
objdata
});
});
</script>
<style
type=
"text/css"
>
table
,
td
{
border
:
1px
solid
#cccccc
;
border-collapse
:
collapse
;
}
</style>
</head>
<body>
<div
align=
"center"
>
<form
id=
"json2form"
name=
"json2form"
>
<table>
<tr>
<td
colspan=
"2"
bgcolor=
"#FFFFFF"
><div
align=
"center"
><strong>
Aduby json2formDemo
</strong></div></td>
</tr>
<tr>
<td>
1. text(文本框)
</td>
<td>
<label
for=
"txt"
>
1 text(文本框)
</label>
<input
type=
"text"
id=
"txt"
name=
"txt"
value=
"输入内容"
/>
</td>
</tr>
<tr>
<td>
2. password(密码框)
</td>
<td>
<input
type=
"password"
id=
"pwd"
name=
"pwd"
value=
"值"
/>
</td>
</tr>
<tr>
<td>
3. hidden(隐藏域)
</td>
<td>
<input
type=
"hidden"
id=
"hd"
name=
"hd"
value=
"值"
/>
</td>
</tr>
<tr>
<td>
4. checkbox(复选框)
</td>
<td>
<input
type=
"checkbox"
id=
"chk1"
name=
"chk"
value=
"中国"
checked=
"checked"
/>
中国
<label
for=
"chk1"
></label>
<input
type=
"checkbox"
id=
"chk2"
name=
"chk"
value=
"美国"
/>
美国
<label
for=
"chk2"
></label>
</td>
</tr>
<tr>
<td>
5. checkbox(动态复选框)
</td>
<td>
<input
type=
"checkbox"
id=
"chk444"
name=
"chk444"
value=
"动态复选框"
/>
</td>
</tr>
<tr>
<td>
6. radion(单选按钮)
</td>
<td>
<input
type=
"radio"
id=
"rd1"
name=
"rad"
value=
"男"
checked=
"checked"
/>
男
<input
type=
"radio"
id=
"rd2"
name=
"rad"
value=
"女"
/>
女
</td>
</tr>
<tr>
<td>
7. radion(动态单选按钮)
</td>
<td>
<input
type=
"radio"
id=
"chk555"
name=
"chk555"
value=
"动态单选按钮"
/>
</td>
</tr>
<tr>
<td>
8. file(文件)
</td>
<td>
<input
type=
"file"
id=
"fl"
name=
"file"
value=
"呵呵"
size=
"20"
/>
</td>
</tr>
<tr>
<td>
9. textare(文本域)
</td>
<td>
多行文本输入框。
<br>
<textarea
id=
"are"
name=
"are"
cols=
"10"
rows=
"10"
></textarea>
</td>
</tr>
<tr>
<td>
10. select(下拉列表框)
</td>
<td>
用户选择的下拉列表。
<br>
<label
for=
"sl"
>
下拉列表
</label><br>
<select
id=
"sl"
name=
"sl"
multiple=
"multiple"
>
<option
id=
"op1"
value=
"美国"
selected=
"selected"
>
美国
</option>
<option
id=
"op2"
value=
"中国"
>
中国
</option>
<option
id=
"op3"
value=
"日本"
>
日本
</option>
<option
id=
"op4"
value=
"法国"
>
法国
</option>
</select>
</td>
</tr>
<tr>
<td>
11. select(动态下拉列表框)
</td>
<td>
<select
id=
"slinit"
name=
"slinit"
><option
value=
"null"
>
动态下拉列表框
</option>
</select>
</td>
</tr>
<tr>
<td>
12. button(普通按钮)
</td>
<td>
<input
type=
"button"
id=
"btn"
name=
"btn"
value=
"普通按钮"
>
</td>
</tr>
<tr>
<td>
13. reset(重置按钮)
</td>
<td>
<input
type=
"reset"
id=
"rt"
name=
"rt"
value=
"重置按钮"
/>
</td>
</tr>
<tr>
<td>
14. submit(提交按钮)
</td>
<td>
<input
type=
"submit"
id=
"sb"
name=
"sb"
value=
"提交按钮"
/>
</td>
</tr>
</table>
</form>
</div>
</body>
</html>
\ No newline at end of file
maxkey-web-manage/src/main/resources/static/jquery/json2form/readme.txt
已删除
100644 → 0
浏览文件 @
28ef8c9d
/* jQuery json2form Plugin
* version: 1.0 (2011-3-01)
*
* Copyright (c) 2011, Crystal, shimingxy@163.com
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
* Date: 2011-3-01 rev 1
*/
;(function ($) {
$.json2form = $.json2form||{};
$.fn.json2form = function(config ) {
var config=$.extend({
url : null,//remote url for ajax data
elem : this.attr("id"),//id
type : "POST",//remote data method type ,GET or POST default is POST
}, config || {});
if(config.url){
$.ajax({type: config.type,url: config.url,dataType: "json",async: false,
success: function(data){
config.data=data;
}
});
}
alert();
if(config.init){
//init
for (var elem in config.init){
if(typeof(elem) != 'function'){
var arrayObject=config.init[elem];
if($("#"+config.elem+" input[name='"+elem+"']")){
var elemtype=$("#"+config.elem+" input[name='"+elem+"']").attr("type");
var elemName=$("#"+config.elem+" input[name='"+elem+"']").attr("name");
var initElem=$("#"+config.elem+" input[name='"+elem+"']");
switch(elemtype){
case "checkbox":
for (var initelem in arrayObject){
initElem.after('<input type="checkbox" name="'+elemName+'" value="'+arrayObject[initelem].value+'" />'+arrayObject[initelem].display);
}
initElem.remove();
break;
case "radio":
for (var initelem in arrayObject){
initElem.after('<input type="radio" name="'+elemName+'" value="'+arrayObject[initelem].value+'" />'+arrayObject[initelem].display);
}
initElem.remove();
break;
}
}
if($("#"+config.elem+" select[name='"+elem+"']")){
for (var initelem in arrayObject){
$("#"+config.elem+" select[name='"+elem+"']").append("<option value='"+arrayObject[initelem].value+"'>"+arrayObject[initelem].display+"</option>");
}
}
}
}
}
if(config.data){
//input text password hidden button reset submit checkbox radio
$("#"+config.elem+" input").each(function(){
var elemtype=$(this).attr("type");
if($(this).attr("action")){
var elemName=$(this).attr("name");
switch(elemtype){
case "checkbox":
var checkbox =this;
$.ajax({type: "POST",url: $(this).attr("action"),dataType: "json",async: false,success: function(data){
for (var elem in data){
$(checkbox).after('<input type="checkbox" name="'+elemName+'" value="'+data[elem].value+'" />'+data[elem].display);
}
$(checkbox).remove();
}
});
break;
case "radio":
var radio =this;
$.ajax({type: "POST",url: $(this).attr("action"),dataType: "json",async: false,success: function(data){
for (var elem in data){
$(radio).after('<input type="radio" name="'+elemName+'" value="'+data[elem].value+'" />'+data[elem].display);
}
$(radio).remove();
}
});
break;
}
}
switch(elemtype){
case "text":
case "password":
case "hidden":
case "button":
case "reset":
case "submit":{
for (var elem in config.data){
if(typeof(elem) != 'function'){
if(($(this).attr("name"))==elem){
$(this).val(config.data[elem]);
}
}
}
break;
}
case "checkbox":
case "radio":{
for (var elem in config.data){
if(typeof(elem) != 'function'){
if(($(this).attr("name"))==elem&&($(this).val())==$(this).val()){
$(this).attr("checked",true);
}
}
}
break;
}
}
});
//select
$("#"+config.elem+" select").each(function(){
var select =this;
if($(this).attr("action")){
$.ajax({type: "POST",url: $(this).attr("action"),dataType: "json",async: false,success: function(data){
for (var elem in data){
$(select).append("<option value='"+data[elem].value+"'>"+data[elem].display+"</option>");
}
}
});
}
for (var elem in config.data){
if(typeof(elem) != 'function'){
if(($(this).attr("name"))==elem){
$(this).val(config.data[elem]);
}
}
}
});
//textarea
$("#"+config.elem+" textarea").each(function(){
for (var elem in config.data){
if(typeof(elem) != 'function'){
if(($(this).attr("name"))==elem){
$(this).val(config.data[elem]);
}
}
}
});
}
if(config.label){
//label
$("#"+config.elem+" label").each(function(){
for (var elem in config.label){
if(typeof(elem) != 'function'){
if(($(this).attr("for"))==elem){
$(this).html(config.label[elem]);
}
}
}
});
}
};
})(jQuery);
\ No newline at end of file
maxkey-web-manage/src/main/resources/static/jquery/platform.common.js
浏览文件 @
7567c195
...
...
@@ -224,6 +224,29 @@ $(function(){
$
(
"
.d-footer
"
).
show
();
};
//get Selections Rows Data
$
.
dataGridSelRowsData
=
function
(
dataGridElement
){
return
$
(
dataGridElement
).
bootstrapTable
(
'
getSelections
'
);
};
//get Selections Rows Data
$
.
gridSelectedData
=
function
(
dataGridElement
){
return
$
(
dataGridElement
).
bootstrapTable
(
'
getSelections
'
);
};
//get Selections Rows Ids
$
.
gridSelectedIds
=
function
(
dataGridElement
){
var
selectIds
=
""
;
if
(
$
(
dataGridElement
).
length
>
0
){
//get grid list selected ids
var
selRows
=
$
(
dataGridElement
).
bootstrapTable
(
'
getSelections
'
);
for
(
var
i
=
0
;
i
<
selRows
.
length
;
i
++
){
selectIds
=
selectIds
+
"
,
"
+
selRows
[
i
].
id
;
}
selectIds
=
selectIds
.
substring
(
1
);
}
return
selectIds
;
};
// Fetch all the forms we want to apply custom Bootstrap validation styles to
// For actionForm use ajax submit
var
forms
=
$
(
"
.needs-validation
"
);
...
...
@@ -305,28 +328,61 @@ $(function(){
//window open by element is window style
$
(
"
.window
"
).
on
(
"
click
"
,
function
(){
//before open action
if
(
typeof
(
beforeWindow
)
==
"
function
"
){
beforeWindow
();
///before open action
beforeWindow
();
}
var
url
=
$
(
this
).
attr
(
"
wurl
"
);
var
refObject
=
$
(
this
).
attr
(
"
ref
"
);
var
refData
=
""
;
if
(
refObject
){
if
(
refObject
==
"
datagrid
"
&&
$
.
gridSelectedData
(
"
#datagrid
"
).
length
>
0
){
refData
=
$
.
gridSelectedData
(
"
#datagrid
"
)[
0
].
id
;
}
else
if
(
$
(
"
#
"
+
refObject
).
val
()
!=
""
){
refData
=
$
(
"
#
"
+
refObject
).
val
();
}
if
(
refData
==
null
||
refData
==
""
){
$
.
alert
({
content
:
$
.
platform
.
messages
.
select
.
alertText
});
return
;
}
url
=
url
+
"
/
"
+
refData
;
}
$
.
window
({
url
:
url
,
//window url
title
:
$
(
this
).
attr
(
"
wtitle
"
),
//title
width
:
$
(
this
).
attr
(
"
wwidth
"
),
//width
height
:
$
(
this
).
attr
(
"
wheight
"
)
//height
});
//open window
});
//click Btn Submit data to server
$
(
"
.sendBtn
"
).
on
(
"
click
"
,
function
(){
var
url
=
$
(
this
).
attr
(
"
wurl
"
);
var
refObject
=
$
(
this
).
attr
(
"
ref
"
);
if
(
$
(
this
).
attr
(
"
ref
"
)){
if
(
$
(
"
#
"
+
$
(
this
).
attr
(
"
ref
"
)).
val
()
==
""
){
if
(
refObject
){
if
(
refObject
==
"
datagrid
"
){
var
selectIds
=
$
.
gridSelectedIds
(
"
#datagrid
"
);
if
(
selectIds
==
null
||
selectIds
==
""
)
{
return
;
}
url
=
url
+
"
?id=
"
+
selectIds
;
}
else
if
(
$
(
"
#
"
+
refObject
).
val
()
!=
""
){
url
=
url
+
"
/
"
+
$
(
"
#
"
+
refObject
).
val
();
}
else
{
$
.
alert
({
content
:
$
.
platform
.
messages
.
select
.
alertText
});
return
;
}
url
=
url
+
"
/
"
+
$
(
"
#
"
+
$
(
this
).
attr
(
"
ref
"
)).
val
();
}
var
settings
=
{
url
:
url
,
//window url
title
:
$
(
this
).
attr
(
"
wtitle
"
),
//title
width
:
$
(
this
).
attr
(
"
wwidth
"
),
//width
height
:
$
(
this
).
attr
(
"
wheight
"
)
//height
};
$
.
window
(
settings
);
//open window
$
.
post
(
url
,
{
currTime
:(
new
Date
()).
getTime
()},
function
(
data
)
{
//alert result
$
.
alert
({
content
:
data
.
message
,
type
:
$
.
platform
.
messages
.
messageType
[
data
.
messageType
]});
//refresh grid list
if
(
$
(
"
#datagrid
"
)[
0
]){
$
(
"
#datagrid
"
).
bootstrapTable
(
"
refresh
"
);
}
});
});
//forward to url, by forward style
...
...
@@ -420,23 +476,12 @@ $(function(){
if
(
typeof
(
beforeUpdate
)
==
"
function
"
){
beforeUpdate
(
this
);
}
var
selectId
=
""
;
if
(
$
(
"
#datagrid
"
).
length
>
0
){
//get grid list selected ids
var
selRows
=
$
(
'
#datagrid
'
).
bootstrapTable
(
'
getSelections
'
);
for
(
var
i
=
0
;
i
<
selRows
.
length
;
i
++
){
selectId
=
selectId
+
"
,
"
+
selRows
[
i
].
id
;
break
;
}
selectId
=
selectId
.
substring
(
1
);
}
var
selectId
=
$
.
gridSelectedIds
(
"
#datagrid
"
);
if
(
selectId
==
null
||
selectId
==
""
)
{
$
.
alert
({
content
:
$
.
platform
.
messages
.
select
.
alertText
});
return
;
}
if
(
$
(
this
).
attr
(
"
target
"
)
&&
$
(
this
).
attr
(
"
target
"
)
==
"
forward
"
){
$
.
forward
(
$
(
this
).
attr
(
"
wurl
"
)
+
"
/
"
+
selectId
);
}
if
(
$
(
this
).
attr
(
"
target
"
)
&&
$
(
this
).
attr
(
"
target
"
)
==
"
_blank
"
){
...
...
@@ -454,59 +499,12 @@ $(function(){
});
//view button
$
(
"
#viewBtn
"
).
click
(
function
(){
if
(
typeof
(
viewAction
)
==
"
function
"
){
document
.
location
.
href
=
viewAction
(
this
);
//自定义跳转
}
else
{
if
(
typeof
(
beforeView
)
==
"
function
"
){
beforeView
(
this
);
//自定义跳转
}
var
selectId
=
""
;
if
(
$
(
"
#list2
"
).
length
>
0
){
//get grid list selected ids
selectId
=
$
(
"
#list2
"
).
jqGrid
(
"
getGridParam
"
,
"
selrow
"
);
if
(
selectId
==
null
||
selectId
==
""
){
$
.
alert
({
content
:
$
.
platform
.
messages
.
select
.
alertText
});
return
;
}
var
rowData
=
$
(
"
#list2
"
).
jqGrid
(
"
getRowData
"
,
selectId
);
selectId
=
rowData
.
id
;
}
else
if
(
$
(
"
#list
"
).
length
>
0
){
//get grid list selected ids
selectId
=
$
(
"
#list
"
).
jqGrid
(
"
getGridParam
"
,
"
selrow
"
);
if
(
selectId
==
null
||
selectId
==
""
){
$
.
alert
({
content
:
$
.
platform
.
messages
.
select
.
alertText
});
return
;
}
var
rowData
=
$
(
"
#list
"
).
jqGrid
(
"
getRowData
"
,
selectId
);
selectId
=
rowData
.
id
;
}
if
(
$
(
this
).
attr
(
"
target
"
)
&&
$
(
this
).
attr
(
"
target
"
)
==
"
forward
"
){
$
.
forward
(
$
(
this
).
attr
(
"
wurl
"
)
+
"
/
"
+
selectId
);
}
else
{
var
settings
=
{
url
:
$
(
this
).
attr
(
"
wurl
"
)
+
"
/
"
+
selectId
,
//window url
title
:
$
(
this
).
attr
(
"
wtitle
"
),
//title
width
:
$
(
this
).
attr
(
"
wwidth
"
),
//width
height
:
$
(
this
).
attr
(
"
wheight
"
)
//height
};
$
.
window
(
settings
);
//open window
}
}
});
//delete and batch delete button
$
(
"
#deleteBtn
"
).
click
(
function
(){
if
(
typeof
(
beforeDelete
)
==
"
function
"
){
beforeDelete
(
this
);
//before function
}
var
selectIds
=
""
;
if
(
$
(
"
#datagrid
"
).
length
>
0
){
//get grid list selected ids
var
selRows
=
$
(
'
#datagrid
'
).
bootstrapTable
(
'
getSelections
'
);
for
(
var
i
=
0
;
i
<
selRows
.
length
;
i
++
){
selectIds
=
selectIds
+
"
,
"
+
selRows
[
i
].
id
;
}
selectIds
=
selectIds
.
substring
(
1
);
}
var
selectIds
=
$
.
gridSelectedIds
(
"
#datagrid
"
);
if
(
selectIds
==
null
||
selectIds
==
""
)
{
$
.
alert
({
content
:
$
.
platform
.
messages
.
select
.
alertText
});
return
;
...
...
@@ -563,18 +561,6 @@ $(function(){
});
//form json url init all ways not used
if
(
$
(
"
#actionForm
"
)){
//actionForm exist
if
(
$
(
"
#actionForm
"
).
attr
(
"
loadaction
"
)){
//init form
$
(
"
#actionForm
"
).
json2form
({
url
:
$
(
"
#actionForm
"
).
attr
(
"
loadaction
"
)});
//init #actionForm with loadaction url
$
(
"
#actionForm
"
).
removeAttr
(
'
loadaction
'
);
//is need init
}
};
$
.
dataGridSelRowsData
=
function
(
dataGridElement
){
return
$
(
dataGridElement
).
bootstrapTable
(
'
getSelections
'
);
};
var
curExpandNode
=
null
;
$
.
tree
=
function
(
treeSettings
){
...
...
maxkey-web-manage/src/main/resources/templates/views/layout/common.cssjs.ftl
浏览文件 @
7567c195
...
...
@@ -27,7 +27,6 @@
<script src ="<@base />/static/jquery/jquery.cookie.js" type="text/javascript" ></script>
<#-- form -->
<script src ="<@base />/static/jquery/jquery.form.js" type="text/javascript" ></script>
<script src ="<@base />/static/jquery/json2form/json2form.js" type="text/javascript" ></script>
<#-- blockUI -->
<script src ="<@base />/static/jquery/jquery.blockUI.js" type="text/javascript" ></script>
<#-- serializeObject -->
...
...
maxkey-web-manage/src/main/resources/templates/views/synchronizers/synchronizersList.ftl
浏览文件 @
7567c195
...
...
@@ -55,6 +55,9 @@
</td>
<td
colspan=
"2"
>
<div
id=
"tool_box_right"
>
<input
class=
"button btn btn-success mr-3 sendBtn"
id=
"syncBtn"
type=
"button"
value=
"<@locale code="
button.text.sync
"
/>
"
wurl="
<
@
base
/>
/synchronizers/sync" ref="datagrid"
/>
<input
class=
"button btn btn-info mr-3 "
id=
"modifyBtn"
type=
"button"
value=
"<@locale code="
button.text.edit
"
/>
"
wurl="
<
@
base
/>
/synchronizers/forwardUpdate"
wwidth="550"
...
...
maxkey-web-manage/src/main/resources/templates/views/userinfo/usersList.ftl
浏览文件 @
7567c195
...
...
@@ -11,6 +11,7 @@
return
'
<@locale code="userinfo.gender.male" />
'
;
}
};
function
statusFormatter
(
value
,
row
,
index
){
if
(
value
==
1
){
return
'
<@locale code="userinfo.status.active" />
'
;
...
...
@@ -24,8 +25,6 @@
return
'
<@locale code="userinfo.status.inactive" />
'
;
}
};
function
onClick
(
event
,
treeId
,
treeNode
)
{
$
(
"
#departmentId
"
).
val
(
treeNode
.
data
.
id
)
...
...
@@ -34,15 +33,6 @@ function onClick (event, treeId, treeNode) {
$
(
"
#searchBtn
"
).
click
();
}
//adjunctUserIdRef
function
beforeWindow
(
){
var
selData
=
$
(
'
#datagrid
'
).
bootstrapTable
(
'
getSelections
'
);
if
(
selData
&&
selData
[
0
]
!=
null
){
$
(
"
#adjunctUserIdRef
"
).
val
(
selData
[
0
].
id
);
}
}
$
(
function
()
{
...
...
@@ -158,17 +148,7 @@ $(function () {
}
}
}
);
//end tree
$
(
"
#changepwdBtn
"
).
on
(
"
click
"
,
function
(){
if
(
$
.
dataGridSelRowsData
(
"
#datagrid
"
)[
0
]
==
null
){
$
.
alert
({
content
:
$
.
platform
.
messages
.
select
.
alertText
});
return
;
}
$
(
"
#changepwdBtnHidden
"
).
attr
(
"
wurl
"
,
"
<@base/>/userinfo/forwardChangePassword/
"
+
$
.
dataGridSelRowsData
(
"
#datagrid
"
)[
0
].
id
);
$
(
"
#changepwdBtnHidden
"
).
click
();
});
);
//end tree
$
(
"
#moreBtn
"
).
on
(
"
click
"
,
function
(){
var
node
=
$
(
"
#tool_box_right_more
"
);
...
...
@@ -250,13 +230,12 @@ $(function () {
<input
class=
"button btn btn-secondary"
id=
"moreBtn"
type=
"button"
size=
"50"
value=
"<@locale code="
button.text.expandsearch
"
/>
" expandValue="
<
@
locale
code=
"button.text.expandsearch"
/>
" collapseValue="
<
@
locale
code=
"button.text.collapsesearch"
/>
">
</div>
<div
id=
"tool_box_right_more"
style=
"display:none;"
>
<input
class=
"button btn btn-warning mr-3"
id=
"changepwdBtn"
type=
"button"
value=
"<@locale code="
login.password.changepassword
"
/>
" />
<input
class=
"button btn btn-warning mr-3 window"
id=
"changepwdBtnHidden"
type=
"hidden"
<input
class=
"button btn btn-warning mr-3 window"
id=
"changepwdBtn"
type=
"button"
value=
"<@locale code="
login.password.changepassword
"
/>
"
wurl="
<
@
base
/>
/userinfo/forwardChangePassword
" wwidth="600px" wheight="250px"
/>
wurl="
<
@
base
/>
/userinfo/forwardChangePassword
/" wwidth="600px" wheight="250px" ref="datagrid"
/>
<input
class=
"button btn btn-info mr-3 window"
id=
"userAdjointBtn"
type=
"button"
value=
"<@locale code="
button.text.adjunct
"
/>
" ref="
adjunctUserIdRef
"
value=
"<@locale code="
button.text.adjunct
"
/>
" ref="
datagrid
"
wurl="
<
@
base
/>
/useradjoint/list" wwidth="900px" wheight="600px" />
<input
id=
"adjunctUserIdRef"
type=
"hidden"
/>
<input
class=
"button btn btn-success mr-3 window"
id=
"usersImportBtn"
type=
"button"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录