Add API function to get and update main results

This commit is contained in:
Brian Miyaji
2015-03-11 18:26:52 +11:00
parent ca48c7afa7
commit 2531e1a77e
4 changed files with 106 additions and 90 deletions

View File

@@ -588,13 +588,11 @@ jQuery(document).ready(function($){
// Save inline results
$("#the-list").on("click", ".sp-inline-edit-save .save", function(){
$column = $(this).closest(".column-sp_team");
results = [];
results = {};
$column.find(".sp-edit-result").each(function() {
team = {};
team.id = $(this).data("team");
team.key = $(this).data("key");
team.result = $(this).val();
results.push( team );
id = $(this).data("team");
result = $(this).val();
results[id] = result;
});
$.post( ajaxurl, {
action: "sp-save-inline-results",