mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-07 01:53:59 +00:00
modified repo-access-switch click
This commit is contained in:
parent
045854195a
commit
56bf442297
@ -45,12 +45,6 @@
|
|||||||
</table>
|
</table>
|
||||||
<a href="{{ SITE_ROOT }}repo/history/{{repo.props.id}}/">查看全部修改</a>
|
<a href="{{ SITE_ROOT }}repo/history/{{repo.props.id}}/">查看全部修改</a>
|
||||||
|
|
||||||
<form id="modify-token-form" action="{{ SITE_ROOT }}repo/token/modify/{{repo.props.id}}/" method="post" class="hide">
|
|
||||||
<h3>新口令:</h3>
|
|
||||||
<input id="id_token" type="text" name="token" /><br/>
|
|
||||||
<input id="id_summit" type="submit" value="提交" />
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<div id="public-access-start-confirm" class="hide">
|
<div id="public-access-start-confirm" class="hide">
|
||||||
<p>确定要开启吗?</p>
|
<p>确定要开启吗?</p>
|
||||||
<button id="public-access-start-btn">确定</button>
|
<button id="public-access-start-btn">确定</button>
|
||||||
@ -60,14 +54,15 @@
|
|||||||
|
|
||||||
{% block extra_script %}
|
{% block extra_script %}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$('#repo-access-switch').click(function() {
|
if ($('#repo-access-switch').attr('checked')) {
|
||||||
if ($(this).attr('checked')) {
|
$('#repo-access-switch').click(function() {
|
||||||
$('#public-access-start-confirm').modal({appendTo:"#main", containerCss:{padding:18}});
|
|
||||||
} else {
|
|
||||||
location.href = "{{ SITE_ROOT }}repo/setap/{{ repo.props.id}}/own/";
|
location.href = "{{ SITE_ROOT }}repo/setap/{{ repo.props.id}}/own/";
|
||||||
}
|
});
|
||||||
});
|
} else {
|
||||||
|
$('#repo-access-switch').click(function() {
|
||||||
|
$('#public-access-start-confirm').modal({appendTo:"#main", containerCss:{padding:18}});
|
||||||
|
});
|
||||||
|
}
|
||||||
$('#public-access-start-btn').click(function() {
|
$('#public-access-start-btn').click(function() {
|
||||||
location.href = "{{ SITE_ROOT }}repo/setap/{{ repo.props.id}}/public/";
|
location.href = "{{ SITE_ROOT }}repo/setap/{{ repo.props.id}}/public/";
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user