Some JavaScript cleanups.

Adding some missing and remove some unnecessary semicolons.
Change some comparing operators.
Changed access to objects with dot operator.
This commit is contained in:
Klaus Weidenbach
2015-03-15 22:18:59 +01:00
parent fdcbb61bcb
commit 792e475a78
13 changed files with 1229 additions and 1315 deletions

View File

@@ -1,11 +1,12 @@
/**
* JavaScript used by mod/mitem.
*/
$(document).ready(function() {
$("a#settings-default-perms-menu").colorbox({
'inline' : true,
'transition' : 'elastic'
$("a#settings-default-perms-menu").colorbox({
'inline' : true,
'transition' : 'elastic'
});
$('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() {
var selstr;
$('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() {
@@ -13,10 +14,9 @@ $(document).ready(function() {
$('#jot-perms-icon').removeClass('icon-unlock').addClass('icon-lock');
$('#jot-public').hide();
});
if(selstr == null) {
if(selstr === null) {
$('#jot-perms-icon').removeClass('icon-lock').addClass('icon-unlock');
$('#jot-public').show();
}
}).trigger('change');
});
});