Commit fac1d239 authored by Cecilia Vela Gurovic's avatar Cecilia Vela Gurovic Committed by Robert Lyon
Browse files

Bug 1741987: Update jquery - Attributes

Attributes
  Breaking change: .removeAttr() no longer sets properties to false
    - replace removeAttr with checked, selected,  readonly or disabled -migration tool also complained about this last one- and replace with .prop("attr", false)
  Breaking change: select-multiple with nothing selected returns an empty array
    - could not find any select multiple elements
  Deprecated: .toggleClass() with no arguments and .toggleClass( Boolean )
    - there are no .toggleClass() or toggleClass( Boolean ) in core

behatnotneeded

Change-Id: I20c941b1bcd9b1be3ae22907ab83b59b157fbd88
parent 3d1abcc2
......@@ -572,51 +572,51 @@ $js = '
jQuery(function($) {
$("#editgroup_controlled").on("click", function() {
if (this.checked) {
$("#editgroup_request").removeAttr("disabled");
$("#editgroup_open").removeAttr("checked");
$("#editgroup_request").prop("disabled", false);
$("#editgroup_open").prop("checked", false);
if (!$("#editgroup_request").attr("checked")) {
$("#editgroup_suggestfriends").removeAttr("checked");
$("#editgroup_suggestfriends").attr("disabled", true);
$("#editgroup_suggestfriends").prop("checked", false);
$("#editgroup_suggestfriends").prop("disabled", true);
}
}
});
$("#editgroup_open").on("click", function() {
if (this.checked) {
$("#editgroup_controlled").removeAttr("checked");
$("#editgroup_request").removeAttr("checked");
$("#editgroup_request").attr("disabled", true);
$("#editgroup_suggestfriends").removeAttr("disabled");
$("#editgroup_controlled").prop("checked", false);
$("#editgroup_request").prop("checked", false);
$("#editgroup_request").prop("disabled", true);
$("#editgroup_suggestfriends").prop("disabled", false);
}
else {
$("#editgroup_request").removeAttr("disabled");
$("#editgroup_request").prop("disabled", false);
if (!$("#editgroup_request").attr("checked")) {
$("#editgroup_suggestfriends").removeAttr("checked");
$("#editgroup_suggestfriends").attr("disabled", true);
$("#editgroup_suggestfriends").prop("checked", false);
$("#editgroup_suggestfriends").prop("disabled", true);
}
}
});
$("#editgroup_request").on("click", function() {
if (this.checked) {
$("#editgroup_suggestfriends").removeAttr("disabled");
$("#editgroup_suggestfriends").prop("disabled", false);
}
else {
if (!$("#editgroup_open").attr("checked")) {
$("#editgroup_suggestfriends").removeAttr("checked");
$("#editgroup_suggestfriends").attr("disabled", true);
$("#editgroup_suggestfriends").prop("checked", false);
$("#editgroup_suggestfriends").prop("disabled", true);
}
}
});
$("#editgroup_invitefriends").on("click", function() {
if (this.checked) {
if ($("#editgroup_request").attr("checked") || $("#editgroup_open").attr("checked")) {
$("#editgroup_suggestfriends").removeAttr("disabled");
$("#editgroup_suggestfriends").prop("disabled", false);
}
$("#editgroup_suggestfriends").removeAttr("checked");
$("#editgroup_suggestfriends").prop("checked", false);
}
});
$("#editgroup_suggestfriends").on("click", function() {
if (this.checked) {
$("#editgroup_invitefriends").removeAttr("checked");
$("#editgroup_invitefriends").prop("checked", false);
}
});
$("#editgroup_hidemembersfrommembers").on("change", function() {
......@@ -630,11 +630,11 @@ jQuery(function($) {
});
$("#editgroup_submittableto").on("click", function() {
if (this.checked) {
$("#editgroup_allowarchives").attr("disabled", false);
$("#editgroup_allowarchives").prop("disabled", false);
}
else {
$("#editgroup_allowarchives").removeAttr("checked");
$("#editgroup_allowarchives").attr("disabled", true);
$("#editgroup_allowarchives").prop("checked", false);
$("#editgroup_allowarchives").prop("disabled", true);
}
});
});
......
......@@ -70,7 +70,7 @@ var checkReload = (function($) {
$('#siteoptions_allowpublicprofiles').prop('disabled', 'disabled');
}
else {
$('#siteoptions_allowpublicprofiles').removeAttr('disabled');
$('#siteoptions_allowpublicprofiles').prop('disabled', false);
}
}
......
......@@ -58,7 +58,7 @@
customlayout_change_layout(pieformname);
if (parseInt($('#' + pieformname + '_customlayoutnumrows').val(), 10) < get_max_custom_rows()) {
$('#addrow').removeAttr('disabled');
$('#addrow').prop('disabled', false);
}
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment