Changeset 1214299
- Timestamp:
- 08/06/2015 06:25:19 PM (11 years ago)
- File:
-
- 1 edited
-
penci-slider/trunk/js/reorder.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
penci-slider/trunk/js/reorder.js
r1214295 r1214299 1 jQuery( function($) {2 3 $('tr.type-penci_slider').parent().sortable({4 axis: 'y',5 placeholder: 'ui-state-highlight',6 forcePlaceholderSize: true,7 update: function(event, ui) {8 var theOrder = $(this).sortable('toArray');9 var nonce = $(this).closest('form#posts-filter').children('#_wpnonce').attr('value');10 var data = {11 action: 'penci_update_slide_order',12 postType: 'penci_slider',13 order: theOrder,14 penci_meta_box_nonce: nonce15 };16 17 $.post(ajaxurl, data);18 }19 }).disableSelection();20 21 //shifty fix for the title column header in the home slider section22 if($('td.post-title').parent().hasClass('type-penci_slider')) {23 $('th#title, th.column-title').html('<span>Actions</span>');24 }25 26 } );1 jQuery( function ( $ ) { 2 3 $( 'tr.type-penci_slider' ).parent().sortable( { 4 axis : 'y', 5 placeholder : 'ui-state-highlight', 6 forcePlaceholderSize: true, 7 update : function ( event, ui ) { 8 var theOrder = $( this ).sortable( 'toArray' ); 9 var nonce = $( this ).closest( 'form#posts-filter' ).children( '#_wpnonce' ).attr( 'value' ); 10 var data = { 11 action : 'penci_update_slide_order', 12 postType : 'penci_slider', 13 order : theOrder, 14 penci_meta_box_nonce: nonce 15 }; 16 17 $.post( ajaxurl, data ); 18 } 19 } ).disableSelection(); 20 21 //shifty fix for the title column header in the home slider section 22 if ( $( 'td.post-title' ).parent().hasClass( 'type-penci_slider' ) ) { 23 $( 'th#title, th.column-title' ).html( '<span>Actions</span>' ); 24 } 25 26 } );
Note: See TracChangeset
for help on using the changeset viewer.