Save and Copy - Ordering Question

Hi J. 

I've tried looking into this issue locally, but couldn't recreate the problem, as the items I created always appeared at the top of the list. It might be that you need to change the order items are listed from ascending to descending. You can do that by going to the following page:

Section Editors -> [Section Name] modify link -> Click the sorting tab at the top of the page. This is where you'll find the MySQL order by statement that is used to order the items. 

You might find that your records are currently sorted by:

dragSortOrder ASC

Instead of:

dragSortOrder DESC

Note: Doing this will cause the current order for ALL records to be swapped.

Cheers,

Greg

Greg Thomas







PHP Programmer - interactivetools.com

Hey J. 

Thanks for sending me more details on the issue. The records were being ordered in ascending order in that section, instead of the default descending order. It's possible to make a small change to the plugin to get around this issue.

On line 43 of saveAndCopy.js.php, add the following code highlighted in green:

  $('#num').val('');
  $('#preSaveTempId').val( pseudoRandomNumber );
  $("input[name='dragSortOrder']").val( '0' );

  // Copy uploads from
  //alert("Debug: Copy uploads from " +recordNum+ " to " +pseudoRandomNumber );
  var copyUploadsUrl = '?_plugin=saveAsCopy&_pluginAction=copy&menu=' +escape

Let me know if you have any questions. 

Cheers,

Greg

Greg Thomas







PHP Programmer - interactivetools.com