Commit 15ed3e6e authored by Rebecca Blundell's avatar Rebecca Blundell Committed by Cecilia Vela Gurovic
Browse files

Bug 1843357: Remove deprecated jquery selectors

These are:
:first -> .first() or css first-child
:last -> .last() or css last-child
:eq -> .eq() or css nth-of-type(n)
:even -> css nth-child(odd) (odd because we're
  going from 0->1 based indexing)
And these which were not found in Mahara:
:odd
:gt
:lt

Change-Id: I512db61de687f9ea3d7a31b1514f4aa962bcb1b0
parent 851f592a
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -336,12 +336,6 @@ var clearPasswords = (function($) {
          jQuery('#accountprefs_password1').val('');
          jQuery('#accountprefs_password2').val('');
      }
      if (data.username) {
          var username = $('#profile-sideblock-username a:first');
          if (username) {
              $(username).empty().append(data.username);
          }
      }
  }
}(jQuery))

+1 −1
Original line number Diff line number Diff line
@@ -171,7 +171,7 @@ var installplugin = (function($) {
              // move the whole thing into the list of installed plugins
              // new parent node
              var bits = name.split('\.');
              $("ul[id='" + bits[0] + ".installed'] li:eq(0)").after($('[id="' + name + '"]'));
              $("ul[id='" + bits[0] + ".installed'] li").eq(0).after($('[id="' + name + '"]'));
              var oldlist = $("ul[id='" + bits[0] + ".notinstalled']").find('li:not(:has(h3))');
              if (oldlist.length == 0) {
                  $("ul[id='" + bits[0] + ".notinstalled']").hide();
+1 −1
Original line number Diff line number Diff line
@@ -159,7 +159,7 @@ EOF;
if ($offset > 0) {
    $js .= <<< EOF
    if ($('#fontlist').length) {
      $('#fontlist a:first').trigger("focus");
      $('#fontlist a').first().trigger("focus");
    }
EOF;
}
+2 −1
Original line number Diff line number Diff line
@@ -39,10 +39,11 @@ jQuery(function() {
    {$pagination['javascript']}
    showmatchall();
EOF;

if ($offset > 0) {
    $js .= <<< EOF
    if ($('#myviews')) {
        $('#myviews a:first').trigger("focus");
        $('#myviews a').first().trigger("focus");
    }
EOF;
}
+1 −1
Original line number Diff line number Diff line
@@ -226,7 +226,7 @@ jQuery(function ($) {
        var filteroptid = filteropt.prop('id');
        sendjsonrequest(config['wwwroot'] + 'json/stats_setting.php', {'setting':filteroptid}, 'POST', function(data) {
            filteropt.parent().hide();
            $('#statistics_table th a:first').trigger('click');
            $('#statistics_table th a').first().trigger('click');
        });
    });

Loading