瀏覽代碼

HUE-62. Allow HtmlTable context menu for multiple rows

picking up -more; errant console.log statement removed
updating HtmlTableMultiSelectMenu per review feedback
Aaron Newton 15 年之前
父節點
當前提交
d8bfcf7bf5

+ 12 - 12
desktop/core/static/js/Source/BehaviorFilters/Behavior.HtmlTableMultiSelectMenu.js

@@ -26,38 +26,38 @@ Behavior.addGlobalPlugin('HtmlTable', 'HtmlTableMutiSelect', function(element, m
 	if (table.options.allowMultiSelect && element.hasDataFilter('ContextMenu')) {
 		//wait for a short period to get the table's context menu; we have no guarantee
 		//that its been created before this filter runs
-		var menu;
+		var tableMenu;
 		(function(){
-			menu = element.retrieve('ContextMenu');
-			if (menu) menu.disable();
+			tableMenu = element.retrieve('ContextMenu');
+			if (tableMenu) tableMenu.disable();
 		}).delay(10);
 		//when the user selects a row
 		table.addEvent('rowFocus', function(row, selectedRows){
 			//if there is no context menu on the table, then exit
-			if (!menu) return;
+			if (!tableMenu) return;
 			var action;
-			//if there were a previously selected group of menus, re-enable them.
+			//if there was a previously selected group of menus, re-enable them.
 			if (previousSelected) {
-				previousSelected.each(function(menu){
-					menu.enable();
+				previousSelected.each(function(trMenu){
+					trMenu.enable();
 				});
 				previousSelected.empty();
 			}
 			//if the user has selected more than one row
 			if (selectedRows.length > 1) {
 				//enable the table's menu
-				menu.enable();
+				tableMenu.enable();
 				//loop through the selected rows and disable their menus
 				//this allows the right click event to travel past the table row level and up to the table
 				//so the bulk action menu is displayed
 				previousSelected = selectedRows.map(function(tr){
-					var menu = tr.retrieve('ContextMenu');
-					if (menu) menu.disable();
-					return menu;
+					var trMenu = tr.retrieve('ContextMenu');
+					if (trMenu) trMenu.disable();
+					return trMenu;
 				}).clean();
 			} else {
 				//otherwise, if there aren't multiple rows selected, disable the table's menu
-				menu.disable();
+				tableMenu.disable();
 			}
 		});
 	}

+ 1 - 1
ext/thirdparty/js/mootools-more.hash

@@ -1 +1 @@
-a89b413b51aaaf425514c8ec7e77596a787cbede
+179d53cac60f27eb3543d4b2982e3a57e2de32bb