Guest User

Untitled

a guest
Jun 18th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. function saveOrder() {
  2. var post = "action[save-component]=submit";
  3. // loop through each component and build post array
  4. $(domContainer).find("div.component").each(function(i) {
  5. // parse entry ID number from id attribute
  6. var id = $(this).attr("id").match(/[0-9]+/);
  7. post += "&fields[" + i +"][order]=" + (i + 1);
  8. post += "&id[" + i + "]=" + id;
  9. });
  10. post += "&column=" + thisColumn;
  11. // send post array to a Symphony page with the save event attached
  12. $.ajax({ type: "post", url: "/save-components/", data: post });
  13. };
  14. });
Add Comment
Please, Sign In to add comment