Changeset - 03a04775c931
[Not reviewed]
default
0 1 0
Takumi IINO - 11 years ago 2014-07-05 18:34:30
trot.thunder@gmail.com
replace YUI with jquery in templates/base/default_perms_box.html
1 file changed with 3 insertions and 4 deletions:
0 comments (0 inline, 0 general)
kallithea/templates/base/default_perms_box.html
Show inline comments
 
@@ -52,45 +52,44 @@ ${h.form(form_url, method='put')}
 
                    <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>
 
$(document).ready(function(e){
 
    var show_custom_perms = function(inherit_default){
 
        if(inherit_default){
 
            YUD.setStyle('inherit_overlay', 'display', 'none');
 
        }
 
        else{
 
            YUD.setStyle('inherit_overlay', 'display', '');
 
            $('#inherit_overlay').hide();
 
        }else{
 
            $('#inherit_overlay').show();
 
        }
 
    }
 

	
 
    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>
0 comments (0 inline, 0 general)