25f258c7fdfbdf417a917fcd00fff78d698def9b
chmalee
  Fri Aug 30 12:01:24 2024 -0700
Big run through of changes to accomodate jquery 3.7.1 upgrade. Most of the changes are replacing the event methods with a change to .on(event, function(..)). A couple more changes are removing calls to jquery.type(). Also fixes various plugins and styles

diff --git src/hg/js/jquery.contextmenu.js src/hg/js/jquery.contextmenu.js
index 6d62579..fc68580 100644
--- src/hg/js/jquery.contextmenu.js
+++ src/hg/js/jquery.contextmenu.js
@@ -83,31 +83,31 @@
 			}
 			// Otherwise parse the Array passed in
 			else {
 				cmenu.menu = cmenu.createMenu(menu,cmenu);
 			}
 			if (cmenu.menu) {
 				cmenu.menu.css({display:'none'});
 				$(cmenu.appendTo).append(cmenu.menu);
 			}
 			
 			// Create the shadow object if shadow is enabled
 			if (cmenu.shadow) {
 				cmenu.createShadow(cmenu); // Extracted to method for extensibility
 				if (cmenu.shadowOffset) { cmenu.shadowOffsetX = cmenu.shadowOffsetY = cmenu.shadowOffset; }
 			}
-			$('body').bind('contextmenu',function(){cmenu.hide();}); // If right-clicked somewhere else in the document, hide this menu
+			$('body').on('contextmenu',function(){cmenu.hide();}); // If right-clicked somewhere else in the document, hide this menu
 			return cmenu;
 		},
 		
 		// Create an iframe object to go behind the menu
 		createIframe: function() {
 		    return $('<iframe frameborder="0" tabindex="-1" src="#" style="display:block;position:absolute;z-index:-1;filter:Alpha(Opacity=0);"/>');
 		},
 		
 		// Accept an Array representing a menu structure and turn it into HTML
 		createMenu: function(menu,cmenu) {
 			var className = cmenu.className;
 			$.each(cmenu.theme.split(","),function(i,n){className+=' '+cmenu.themePrefix+n});
 			var $t = $('<table cellspacing=0 cellpadding=0></table>').click(function(){cmenu.hide(); return false;}); // We wrap a table around it so width can be flexible
 			var $tr = $('<tr></tr>');
 			var $td = $('<td></td>');
@@ -273,20 +273,20 @@
 				if (cmenu.menu) { cmenu.menu[cmenu.hideTransition](cmenu.hideSpeed,((cmenu.hideCallback)?function(){cmenu.hideCallback.call(cmenu);}:null)); }
 				if (cmenu.shadow) { cmenu.shadowObj[cmenu.hideTransition](cmenu.hideSpeed); }
 			}
 			cmenu.shown = false;
             // re-enable tooltips on contextmenu close
             if (typeof showMouseovers !== 'undefined' && showMouseovers) {
                 canShowNewMouseover = true;
             }
 		}
 	};
 	
 	// This actually adds the .contextMenu() function to the jQuery namespace
 	$.fn.contextMenu = function(menu,options) {
 		var cmenu = $.contextMenu.create(menu,options);
 		this.each(function(){
-			$(this).bind('contextmenu',function(e){cmenu.show(this,e);return false;});
+			$(this).on('contextmenu',function(e){cmenu.show(this,e);return false;});
 		});
 		return cmenu;
 	};
 })(jQuery);