Alex Monk has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/371018 )

Change subject: Use .length instead of .size() as it's getting removed in 
jQuery 3.0
......................................................................

Use .length instead of .size() as it's getting removed in jQuery 3.0

Change-Id: Ie2645db7a837e5f08b9b85c09aff9b67ff0c3b63
---
M MwEmbedModules/MwEmbedSupport/jquery.embedMenu/jquery.embedMenu.js
1 file changed, 9 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MwEmbedSupport 
refs/changes/18/371018/1

diff --git a/MwEmbedModules/MwEmbedSupport/jquery.embedMenu/jquery.embedMenu.js 
b/MwEmbedModules/MwEmbedSupport/jquery.embedMenu/jquery.embedMenu.js
index 5b8314a..1821412 100644
--- a/MwEmbedModules/MwEmbedSupport/jquery.embedMenu/jquery.embedMenu.js
+++ b/MwEmbedModules/MwEmbedSupport/jquery.embedMenu/jquery.embedMenu.js
@@ -229,13 +229,13 @@
                                case 37: // left arrow
                                        if (menuType == 'flyout') {
                                                
$(event.target).trigger('mouseout');
-                                               if 
($('.'+options.flyOutOnState).size() > 0) { 
$('.'+options.flyOutOnState).trigger('mouseover'); };
+                                               if 
($('.'+options.flyOutOnState).length > 0) { 
$('.'+options.flyOutOnState).trigger('mouseover'); };
                                        };
 
                                        if (menuType == 'ipod') {
                                                
$(event.target).trigger('mouseout');
-                                               if 
($('.fg-menu-footer').find('a').size() > 0) { 
$('.fg-menu-footer').find('a').trigger('click'); };
-                                               if 
($('.fg-menu-header').find('a').size() > 0) { 
$('.fg-menu-current-crumb').prev().find('a').trigger('click'); };
+                                               if 
($('.fg-menu-footer').find('a').length > 0) { 
$('.fg-menu-footer').find('a').trigger('click'); };
+                                               if 
($('.fg-menu-header').find('a').length > 0) { 
$('.fg-menu-current-crumb').prev().find('a').trigger('click'); };
                                                if 
($('.fg-menu-current').prev().is('.fg-menu-indicator')) {
                                                        
$('.fg-menu-current').prev().trigger('mouseover');
                                                };
@@ -246,7 +246,7 @@
                                case 38: // up arrow
                                        if ($(event.target).is('.' + 
options.linkHover)) {
                                                var prevLink = 
$(event.target).parent().prev().find('a:eq(0)');
-                                               if (prevLink.size() > 0) {
+                                               if (prevLink.length > 0) {
                                                        
$(event.target).trigger('mouseout');
                                                        
prevLink.trigger('mouseover');
                                                };
@@ -273,7 +273,7 @@
                                case 40: // down arrow
                                        if ($(event.target).is('.' + 
options.linkHover)) {
                                                var nextLink = 
$(event.target).parent().next().find('a:eq(0)');
-                                               if (nextLink.size() > 0) {
+                                               if (nextLink.length > 0) {
                                                        
$(event.target).trigger('mouseout');
                                                        
nextLink.trigger('mouseover');
                                                };
@@ -322,7 +322,7 @@
                container.find( 'a' ).attr('tabindex', '-1');
 
                // when there are multiple levels of hierarchy, create flyout 
or drilldown menu
-               if ( container.find( 'ul' ).size() > 1 ) {
+               if ( container.find( 'ul' ).length > 1 ) {
                        if ( options.flyOut ) {
                                mw.log("jquery.embedMenu:: call menu.flyout ");
                                menu.flyout(container, options);
@@ -531,7 +531,7 @@
 
                                        // initialize "back" link
                                        if (options.backLink) {
-                                               if (footer.find('a').size() == 
0) {
+                                               if (footer.find('a').length == 
0) {
                                                        footer.show();
                                                        $('<a href="#"><span 
class="ui-icon ui-icon-triangle-1-w"></span> <span>Back</span></a>')
                                                                
.appendTo(footer)
@@ -547,7 +547,7 @@
                                        }
                                        // or initialize top breadcrumb
                                else {
-                                       if (breadcrumb.find('li').size() == 1) {
+                                               if 
(breadcrumb.find('li').length == 1) {
                                                        
breadcrumb.empty().append(firstCrumb);
                                                        
firstCrumb.find('a').click(function() {
                                                                
menu.resetDrilldownMenu();
@@ -564,7 +564,7 @@
                                                                        
menu.chooseItem(this);
                                                                }
                                                                else {
-                                                                       var 
newLeftVal = - ($('.fg-menu-current').parents('ul').size() - 1) * 180;
+                                                                       var 
newLeftVal = - ($('.fg-menu-current').parents('ul').length - 1) * 180;
                                                                        
topList.animate({ left: newLeftVal }, options.crossSpeed, function() {
                                                                                
setPrevMenu();
                                                                        });

-- 
To view, visit https://gerrit.wikimedia.org/r/371018
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie2645db7a837e5f08b9b85c09aff9b67ff0c3b63
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MwEmbedSupport
Gerrit-Branch: master
Gerrit-Owner: Alex Monk <kren...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to