Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
website
提交
878780f2
W
website
项目概览
openeuler
/
website
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
W
website
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
878780f2
编写于
1月 04, 2020
作者:
F
freesky-edward
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add gitee login request when signing CLA
上级
94bb5f53
变更
6
展开全部
显示空白变更内容
内联
并排
Showing
6 changed file
with
90 addition
and
2 deletion
+90
-2
content/en/cla.md
content/en/cla.md
+6
-0
content/zh/cla.md
content/zh/cla.md
+7
-1
themes/project/layouts/partials/scripts.html
themes/project/layouts/partials/scripts.html
+3
-1
themes/project/static/js/cla.js
themes/project/static/js/cla.js
+71
-0
themes/project/static/js/dist/jso.js
themes/project/static/js/dist/jso.js
+2
-0
themes/project/static/js/dist/jso.js.map
themes/project/static/js/dist/jso.js.map
+1
-0
未找到文件。
content/en/cla.md
浏览文件 @
878780f2
...
...
@@ -177,6 +177,12 @@ Please select one applicable statement from the following and fill in the blanks
<input
type=
"text"
id=
"legalentity-date"
class =
"require"
maxlength=
"100"
/>
</td>
</tr>
<tr>
<td>
<input
type=
"hidden"
value=
""
id=
"oauth-code"
/>
<input
type=
"hidden"
value=
"en"
id=
"language"
/>
</td>
</tr>
<tr>
<td
colspan=
"2"
>
*
require field. Please make sure the E-Mail is related with your gitee account.
...
...
content/zh/cla.md
浏览文件 @
878780f2
...
...
@@ -186,6 +186,12 @@ title = "签署CLA"
<input
type=
"text"
id=
"legalentity-date"
class =
"require"
maxlength=
"100"
/>
</td>
</tr>
<tr>
<td>
<input
type=
"hidden"
value=
""
id=
"oauth-code"
/>
<input
type=
"hidden"
value=
"zh"
id=
"language"
/>
</td>
</tr>
<tr>
<td
colspan=
"2"
>
*
必填。请确保邮箱与你的gitee账号绑定。
...
...
themes/project/layouts/partials/scripts.html
浏览文件 @
878780f2
...
...
@@ -18,6 +18,8 @@
<!-- used to for mobile -->
<script
src=
"{{ .Site.BaseURL }}js/flexible.js"
></script>
<script
src=
"{{ .Site.BaseURL }}js/common.js"
></script>
<script
src=
"{{ .Site.BaseURL }}js/dist/jso.js"
></script>
<script
src=
"{{ .Site.BaseURL }}js/cla.js?t=20191230"
></script>
<div
id=
"mask"
onclick=
"hideNav()"
></div>
...
...
themes/project/static/js/cla.js
浏览文件 @
878780f2
$
(
function
()
{
getCode
();
initClaPage
();
initCurrentDate
();
})
...
...
@@ -25,6 +26,74 @@ function initCurrentDate() {
}
}
function
getCode
()
{
code
=
getQueryString
(
"
code
"
)
if
(
!
code
||
code
==
""
)
{
oauthLogin
();
}
else
{
$
(
'
#oauth-code
'
).
val
(
code
);
}
}
function
getQueryString
(
name
)
{
var
reg
=
new
RegExp
(
"
(^|&)
"
+
name
+
"
=([^&]*)(&|$)
"
,
"
i
"
);
var
r
=
window
.
location
.
search
.
substr
(
1
).
match
(
reg
);
if
(
r
!=
null
)
return
unescape
(
r
[
2
]);
return
null
;
}
function
getLanguage
()
{
var
url
=
window
.
location
.
href
;
if
(
url
.
indexOf
(
"
/en/
"
)
>=
0
)
{
return
"
en
"
;
}
if
(
url
.
indexOf
(
"
/zh/
"
)
>=
0
)
{
return
"
zh
"
;
}
return
"
en
"
}
function
oauthLogin
()
{
code
=
$
(
'
#oauth-code
'
).
val
();
if
(
!
code
||
code
==
""
)
{
let
config
=
{
providerID
:
"
openeuler_bot
"
,
client_id
:
"
88913556129bdae86458ec266f174b0cc5833198641e0e219891e7eb463bd3bf
"
,
redirect_uri
:
"
https://openeuler.org/en/cla.html
"
,
response_type
:
"
code
"
,
authorization
:
"
https://gitee.com/oauth/authorize
"
,
scopes
:
{
request
:
[
"
user_info
"
,
"
emails
"
]}
}
if
(
getLanguage
()
==
"
zh
"
)
{
config
=
{
providerID
:
"
openeuler_bot
"
,
client_id
:
"
6c298174d665b993c8a4dd56b0976654d3ef6f59af6c88f59b5b0c99f635c893
"
,
redirect_uri
:
"
https://openeuler.org/zh/cla.html
"
,
response_type
:
"
code
"
,
authorization
:
"
https://gitee.com/oauth/authorize
"
,
scopes
:
{
request
:
[
"
user_info
"
,
"
emails
"
]}
}
}
let
client
=
new
jso
.
JSO
(
config
)
client
.
callback
()
let
f
=
new
jso
.
Fetcher
(
client
)
let
url
=
'
https://gitee.com/v5/users/freesky-edward
'
f
.
fetch
(
url
,
{})
.
then
((
data
)
=>
{
return
data
.
json
()
})
.
then
((
data
)
=>
{
console
.
log
(
"
I got protected json data from the API
"
,
data
)
})
.
catch
((
err
)
=>
{
console
.
error
(
"
Error from fetcher
"
,
err
)
})
}
}
// init cla page
function
initClaPage
()
{
if
(
$
(
'
#cla-type-table
'
).
length
)
{
...
...
@@ -167,6 +236,8 @@ function initClaPage() {
"
email
"
:
$
.
trim
(
$
(
'
#legalentity-email
'
).
val
()),
"
telephone
"
:
$
.
trim
(
$
(
'
#legalentity-telephone
'
).
val
()),
"
fax
"
:
$
.
trim
(
$
(
'
#legalentity-fax
'
).
val
()),
"
code
"
:
$
.
trim
(
$
(
'
#oauth-code
'
).
val
()),
"
lang
"
:
$
.
trim
(
$
(
'
#language
'
).
val
()),
};
}
...
...
themes/project/static/js/dist/jso.js
0 → 100644
浏览文件 @
878780f2
此差异已折叠。
点击以展开。
themes/project/static/js/dist/jso.js.map
0 → 100644
浏览文件 @
878780f2
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录