NIHVIVO-2232: Worked on cleaning template markup, adding role tags, styling template for adding and editing a menu item. Also, created js file for revealing/ unveiling custom template input field and check/unckeck all account for deletion.

This commit is contained in:
manolobevia 2011-07-13 18:16:38 +00:00
parent 359271ba04
commit d4323b5c30
3 changed files with 81 additions and 40 deletions

View file

@ -0,0 +1,47 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
// menu management util tools
$(document).ready(function(){
// reveal/unveil custom template field
$('input.default-template').click(function(){
if ( this.checked ) {
// If checked, hide this input element
$('#custom-template').addClass('hidden');
}
else {
// if not checked, display them
$('#custom-template').removeClass('hidden');
}
});
$('input.custom-template').click(function(){
if ( this.checked ) {
// If checked, hide this input element
$('#custom-template').removeClass('hidden');
// And clear any values entered in the password fields
//$('input[name=confirmPassword]').val("");
}
//else {
// if not checked, display them
// $('#custom-template').removeClass('hidden');
//}
});
// Check/unckeck all account for deletion
$('input:checkbox[name=allSelected]').click(function(){
if ( this.checked ) {
// if checked, select all the checkboxes
$('input:checkbox[name=classInClassGroup]').attr('checked','checked');
} else {
// if not checked, deselect all the checkboxes
$('input:checkbox[name=classInClassGroup]').removeAttr('checked');
}
});
$('input:checkbox[name=classInClassGroup]').click(function(){
$('input:checkbox[name=allSelected]').removeAttr('checked');
});
});