browse.ui.js 513 B

1234567891011121314151617181920
  1. window.renderCell = function(result, info)
  2. {
  3. if(info.col.name == 'sort')
  4. {
  5. result[0] = {html: "<i class='icon-move'></i>", className: 'text-gray cursor-move move-stage'};
  6. }
  7. return result;
  8. }
  9. window.onSortEnd = function(from, to, type)
  10. {
  11. if(!from || !to) return false;
  12. const url = $.createLink('stage', 'updateOrder');
  13. const form = new FormData();
  14. form.append('sortedIdList', JSON.stringify(this.state.rowOrders));
  15. $.ajaxSubmit({url, data: form});
  16. return true;
  17. }