Ticket #26015: 26015.patch
File 26015.patch, 1.9 KB (added by , 11 years ago) |
---|
-
src/wp-includes/js/jquery/jquery.table-hotkeys.js
8 8 p = p.parent(); 9 9 } 10 10 return true; 11 } 11 }; 12 12 return this.filter(is_visible); 13 13 }; 14 14 $.table_hotkeys = function(table, keys, opts) { … … 16 16 var selected_class, destructive_class, set_current_row, adjacent_row_callback, get_adjacent_row, adjacent_row, prev_row, next_row, check, get_first_row, get_last_row, make_key_callback, first_row; 17 17 18 18 selected_class = opts.class_prefix + opts.selected_suffix; 19 destructive_class = opts.class_prefix + opts.destructive_suffix 19 destructive_class = opts.class_prefix + opts.destructive_suffix; 20 20 set_current_row = function (tr) { 21 21 if ($.table_hotkeys.current_row) $.table_hotkeys.current_row.removeClass(selected_class); 22 22 tr.addClass(selected_class); … … 66 66 if (!clickable.length) return false; 67 67 if (clickable.is('.'+destructive_class)) next_row() || prev_row(); 68 68 clickable.click(); 69 } 69 }; 70 70 }; 71 71 first_row = get_first_row(); 72 72 if (!first_row.length) return; … … 74 74 set_current_row(first_row); 75 75 else if (opts.highlight_last) 76 76 set_current_row(get_last_row()); 77 $.hotkeys.add(opts.prev_key, opts.hotkeys_opts, function() {return adjacent_row_callback('prev') });78 $.hotkeys.add(opts.next_key, opts.hotkeys_opts, function() {return adjacent_row_callback('next') });77 $.hotkeys.add(opts.prev_key, opts.hotkeys_opts, function() {return adjacent_row_callback('prev');}); 78 $.hotkeys.add(opts.next_key, opts.hotkeys_opts, function() {return adjacent_row_callback('next');}); 79 79 $.hotkeys.add(opts.mark_key, opts.hotkeys_opts, check); 80 80 $.each(keys, function() { 81 81 var callback, key;