mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #40992
[Bug 1651911] Re: jQuery alter .bind()/.unbind() to .on()/.off()
** Summary changed:
- jQuery things deprecated in 3.0
+ jQuery alter .bind()/.unbind() to .on()/.off()
** Changed in: mahara
Status: Confirmed => Fix Committed
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1651911
Title:
jQuery alter .bind()/.unbind() to .on()/.off()
Status in Mahara:
Fix Committed
Bug description:
There are a few things to be deprecated in jQuery 3.0
http://api.jquery.com/category/deprecated/deprecated-3.0/
The main one for us is the .bind() / .unbind() they should be changed
to .on() / .off()
See these lines that need fixing up
htdocs/js/formchangechecker.js:148: jQuery('form#' + self.id + ' :input').bind('change.changechecker', function() {
htdocs/js/formchangechecker.js:158: jQuery('form#' + self.id + ' :input[type="radio"]').bind('click.changechecker', function() {
htdocs/js/formchangechecker.js:161: jQuery('form#' + self.id + ' :input.cancel').bind('click.changechecker', function() {
htdocs/js/formchangechecker.js:164: jQuery('form#' + self.id + ' :input.submit').bind('click.changechecker', function() {
htdocs/js/formchangechecker.js:167: jQuery('form#' + self.id + ' :input[type="file"]').bind('change.changechecker', function() {
htdocs/js/formchangechecker.js:170: jQuery('form#' + self.id).bind('submit.changechecker', function() {
htdocs/js/formchangechecker.js:178: jQuery('form#' + self.id + ' :input').unbind('change.changechecker');
htdocs/js/formchangechecker.js:179: jQuery('form#' + self.id + ' :input[type="radio"]').unbind('click.changechecker');
htdocs/js/formchangechecker.js:180: jQuery('form#' + self.id + ' :input.cancel').unbind('click.changechecker');
htdocs/js/formchangechecker.js:181: jQuery('form#' + self.id).unbind('submit.changechecker');
htdocs/js/adminadduser.js:93: $(this).on('focus', move_step.bind(null, this));
htdocs/js/adminadduser.js:94: $(this).on('click', move_step.bind(null, this));
htdocs/js/adminadduser.js:99: $(select).on('change', change_quota.bind(null, select));
htdocs/lib/form/elements/authlist.php:85: jQuery('form[name=' +
form.data.name +
']').find('select#dummySelect').unbind('change.changechecker');
htdocs/lib/pieforms/pieform/elements/calendar.php:289: prevYrBtn.unbind("click").bind("click", function() {
htdocs/lib/pieforms/pieform/elements/calendar.php:294: nextYrBtn.unbind("click").bind("click", function() {
There are a bunch of thirdparty plugins using .bind() / .unbind() such as:
-TinyMCE
-Select2
-jQuery-ui
-Mochikit (which we are removing)
-filezone
-videojs
-pdfjs
-slimbox2
we should see if they have an updated version that use .on/.off rather than .bind/.unbind etc rather than fixing them locally.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1651911/+subscriptions
References