Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function saveOrder() {
- var post = "action[save-component]=submit";
- // loop through each component and build post array
- $(domContainer).find("div.component").each(function(i) {
- // parse entry ID number from id attribute
- var id = $(this).attr("id").match(/[0-9]+/);
- post += "&fields[" + i +"][order]=" + (i + 1);
- post += "&id[" + i + "]=" + id;
- });
- post += "&column=" + thisColumn;
- // send post array to a Symphony page with the save event attached
- $.ajax({ type: "post", url: "/save-components/", data: post });
- };
- });
Add Comment
Please, Sign In to add comment