Ticket #13220: 13220.js.warnings.begone.1.patch
File 13220.js.warnings.begone.1.patch, 2.7 KB (added by , 14 years ago) |
---|
-
wp-admin/js/nav-menu.dev.js
8 8 * @subpackage Administration 9 9 */ 10 10 11 var WPNavMenuHandler = function ($) {11 var wpNavMenu, WPNavMenuHandler = function ($) { 12 12 var autoCompleteData = {}, 13 13 14 14 menuItemDepthPerLevel = 30, // Do not use directly. Use depthToPx and pxToDepth instead. … … 56 56 itemData = {}, 57 57 inputs = parentEl.getElementsByTagName('input'), 58 58 i = inputs.length, 59 j, 60 menuID = document.getElementById('nav-menu-meta-object-id').value; 59 j; 61 60 62 61 while ( i-- ) { 63 62 j = fields.length; … … 263 262 handle: '.menu-item-handle', 264 263 placeholder: 'sortable-placeholder', 265 264 start: function(e, ui) { 266 var next,height, width, parent, children, maxChildDepth;265 var height, width, parent, children, maxChildDepth; 267 266 268 267 transport = ui.item.children('.menu-item-transport'); 269 268 // Check if the item is in the menu, or new … … 601 600 602 601 attachTabsPanelListeners : function() { 603 602 $('#menu-settings-column').bind('click', function(e) { 603 var selectAreaMatch, activePanel, panelIdMatch, wrapper, inputs, i; 604 604 605 if ( e.target && e.target.className && -1 != e.target.className.indexOf('nav-tab-link') ) { 605 var activePanel, 606 panelIdMatch = /#(.*)$/.exec(e.target.href), 607 tabPanels, 608 wrapper = $(e.target).parents('.inside').first()[0], 609 inputs = wrapper ? wrapper.getElementsByTagName('input') : [], 606 panelIdMatch = /#(.*)$/.exec(e.target.href); 607 wrapper = $(e.target).parents('.inside').first()[0]; 608 inputs = wrapper ? wrapper.getElementsByTagName('input') : []; 610 609 i = inputs.length; 611 610 612 611 // upon changing tabs, we want to uncheck all checkboxes … … 633 632 634 633 return false; 635 634 } else if ( e.target && e.target.className && -1 != e.target.className.indexOf('select-all') ) { 636 varselectAreaMatch = /#(.*)$/.exec(e.target.href), items;635 selectAreaMatch = /#(.*)$/.exec(e.target.href), items; 637 636 if ( selectAreaMatch && selectAreaMatch[1] ) { 638 637 items = $('#' + selectAreaMatch[1] + ' .tabs-panel-active .potential-menu-item'); 639 638 if( items.length === items.filter('.selected-menu-item').length ) … … 907 906 908 907 removeMenuItem : function(el) { 909 908 el = $(el) 910 var children = el.childMenuItems() ;911 varthat = this;909 var children = el.childMenuItems(), 910 that = this; 912 911 913 912 el.addClass('deleting').fadeOut( 350 , function() { 914 913 el.remove(); … … 927 926 } 928 927 } 929 928 930 varwpNavMenu = new WPNavMenuHandler(jQuery);929 wpNavMenu = new WPNavMenuHandler(jQuery); 931 930 932 931 jQuery(function() { 933 932 wpNavMenu.init();