Changeset 35809
- Timestamp:
- 12/06/2015 10:22:44 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/postbox.js
r34977 r35809 110 110 tolerance: 'pointer', 111 111 forcePlaceholderSize: true, 112 helper: 'clone', 112 helper: function( event, element ) { 113 // `helper: 'clone'` is equilavalent to `return element.clone();` 114 // Cloning a checked radio and then inserting that clone next to the original 115 // radio unchecks the original radio (since only one of the two can be checked). 116 // We get around this by renaming the helper's inputs' name attributes so that, 117 // when the helper is inserted into the DOM for the sortable, no radios are 118 // duplicated, and no original radio gets unchecked. 119 return element.clone() 120 .find( ':input' ) 121 .attr( 'name', function( i, currentName ) { 122 return 'sort_' + parseInt( Math.random() * 100000, 10 ).toString() + '_' + currentName; 123 } ) 124 .end(); 125 }, 113 126 opacity: 0.65, 114 127 stop: function() {
Note: See TracChangeset
for help on using the changeset viewer.