Files
@ e13a747e9c6a
Branch filter:
Location: kallithea/rhodecode/templates/base/default_perms_box.html - annotation
e13a747e9c6a
3.4 KiB
text/html
Migrate to jQuery 1.10.2 from 1.10.1.
Include the minified version of jQuery 1.10.2 instead of 1.10.1. The 1.10.2
files were download via these commands:
$ wget -N http://code.jquery.com/jquery-1.10.2.min.js
$ wget -N http://code.jquery.com/jquery-1.10.2.min.map
Meanwhile, since the Javascript code is covered by GPLv3, we should always
provide an up-to-date version of the source code. I have included it
here by creating the directory jquery-src. I extracted the correct version
of the source with the following commands:
$ git clone git://github.com/jquery/jquery.git
$ git checkout 1.10.2
which is what the jQuery website instructs to do: http://jquery.com/download/
This repository is mirrorred at https://kallithea-scm.org/repos/mirror/jquery/ .
Include the minified version of jQuery 1.10.2 instead of 1.10.1. The 1.10.2
files were download via these commands:
$ wget -N http://code.jquery.com/jquery-1.10.2.min.js
$ wget -N http://code.jquery.com/jquery-1.10.2.min.map
Meanwhile, since the Javascript code is covered by GPLv3, we should always
provide an up-to-date version of the source code. I have included it
here by creating the directory jquery-src. I extracted the correct version
of the source with the following commands:
$ git clone git://github.com/jquery/jquery.git
$ git checkout 1.10.2
which is what the jQuery website instructs to do: http://jquery.com/download/
This repository is mirrorred at https://kallithea-scm.org/repos/mirror/jquery/ .
87e6960e250b 87e6960e250b 87e6960e250b 87e6960e250b 87e6960e250b 87e6960e250b 87e6960e250b 87e6960e250b 87e6960e250b 87e6960e250b 87e6960e250b 87e6960e250b ffd45b185016 ffd45b185016 87e6960e250b ffd45b185016 ffd45b185016 ffd45b185016 ffd45b185016 ffd45b185016 ffd45b185016 ffd45b185016 87e6960e250b ffd45b185016 87e6960e250b 87e6960e250b ffd45b185016 87e6960e250b 87e6960e250b ffd45b185016 ffd45b185016 ffd45b185016 ffd45b185016 ffd45b185016 ffd45b185016 87e6960e250b ffd45b185016 87e6960e250b ffd45b185016 87e6960e250b 87e6960e250b ffd45b185016 ffd45b185016 ffd45b185016 ffd45b185016 ffd45b185016 ffd45b185016 87e6960e250b ffd45b185016 87e6960e250b ffd45b185016 87e6960e250b 87e6960e250b ffd45b185016 ffd45b185016 ffd45b185016 ffd45b185016 ffd45b185016 ffd45b185016 87e6960e250b ffd45b185016 ffd45b185016 87e6960e250b ffd45b185016 ffd45b185016 87e6960e250b 87e6960e250b 87e6960e250b 87e6960e250b 87e6960e250b 87e6960e250b 87e6960e250b 87e6960e250b 87e6960e250b 87e6960e250b 87e6960e250b 87e6960e250b 87e6960e250b 87e6960e250b 87e6960e250b 87e6960e250b 87e6960e250b 87e6960e250b 87e6960e250b 87e6960e250b 87e6960e250b 87e6960e250b 87e6960e250b 87e6960e250b 87e6960e250b 87e6960e250b 87e6960e250b 87e6960e250b 87e6960e250b 87e6960e250b 87e6960e250b 87e6960e250b | ## snippet for displaying default permission box
## usage:
## <%namespace name="dpb" file="/base/default_perms_box.html"/>
## ${dpb.default_perms_box(<url_to_form>)}
<%def name="default_perms_box(form_url)">
${h.form(form_url, method='put')}
<div class="form">
<!-- fields -->
<div class="fields">
<div class="field">
<div class="label label-checkbox">
<label for="inherit_default_permissions">${_('Inherit from defaults')}:</label>
</div>
<div class="checkboxes">
${h.checkbox('inherit_default_permissions',value=True)}
<span class="help-block">
${h.literal(_('Select to inherit permissions from %s permissions settings, and default IP address whitelist.')
% h.link_to('default global', url('admin_permissions')))}
</span>
</div>
</div>
<div id="inherit_overlay">
<div class="field">
<div class="label label-checkbox">
<label for="create_repo_perm">${_('Create repositories')}:</label>
</div>
<div class="checkboxes">
${h.checkbox('create_repo_perm',value=True)}
<span class="help-block">
${h.literal(_('Select this option to allow repository creation for this user'))}
</span>
</div>
</div>
<div class="field">
<div class="label label-checkbox">
<label for="create_user_group_perm">${_('Create user groups')}:</label>
</div>
<div class="checkboxes">
${h.checkbox('create_user_group_perm',value=True)}
<span class="help-block">
${h.literal(_('Select this option to allow user group creation for this user'))}
</span>
</div>
</div>
<div class="field">
<div class="label label-checkbox">
<label for="fork_repo_perm">${_('Fork repositories')}:</label>
</div>
<div class="checkboxes">
${h.checkbox('fork_repo_perm',value=True)}
<span class="help-block">
${h.literal(_('Select this option to allow repository forking for this user'))}
</span>
</div>
</div>
</div>
<div class="buttons">
${h.submit('save',_('Save'),class_="btn")}
${h.reset('reset',_('Reset'),class_="btn")}
</div>
</div>
</div>
${h.end_form()}
## JS
<script>
YUE.onDOMReady(function(e){
var show_custom_perms = function(inherit_default){
if(inherit_default){
YUD.setStyle('inherit_overlay', 'display', 'none');
}
else{
YUD.setStyle('inherit_overlay', 'display', '');
}
}
var defaults = YUD.get('inherit_default_permissions').checked;
show_custom_perms(defaults);
YUE.on('inherit_default_permissions', 'change', function(e){
if(YUD.get('inherit_default_permissions').checked){
show_custom_perms(true);
}
else{
show_custom_perms(false);
}
})
})
</script>
</%def>
|