function suggestionRemove(e) {

        var project = gpostmile.project;

        // delete in UI
        var liTarget = e.currentTarget.ancestor("li", true); // true == scans/tests self
        var suggestionId = liTarget.getAttribute('suggestion');
        var suggestion = project.suggestions[suggestionId];

        function confirmRemovedSuggestion(response, myarg) { // response has id, rev, status
            // todo: put back suggestion in UI
        }

        // delete on server
        deleteJson("/project/" + project.id + '/suggestion/' + suggestion.id, null, confirmRemovedSuggestion);

        // local delete in data
        suggestionDelete(e);
    }
// click on x - local delete then remove via API
click on x - local delete then remove via API
click on x - local delete then remove via API
function suggestionRemove(e) {
        var project = gpostmile.project;
        var liTarget = e.currentTarget.ancestor("li", true); 
        var suggestionId = liTarget.getAttribute('suggestion');
        var suggestion = project.suggestions[suggestionId];
        function confirmRemovedSuggestion(response, myarg) { 
        }
        deleteJson("/project/" + project.id + '/suggestion/' + suggestion.id, null, confirmRemovedSuggestion);
        suggestionDelete(e);
    }
function suggestionRemove ( e ) { var project = gpostmile . project ; var liTarget = e . currentTarget . ancestor ( "li" , true ) ; var suggestionId = liTarget . getAttribute ( 'suggestion' ) ; var suggestion = project . suggestions [ suggestionId ] ; function confirmRemovedSuggestion ( response , myarg ) { } deleteJson ( "/project/" + project . id + '/suggestion/' + suggestion . id , null , confirmRemovedSuggestion ) ; suggestionDelete ( e ) ; }
click on x - local delete then remove via API
click on x - local delete then remove via API
// delete in UI // true == scans/tests self // response has id, rev, status // todo: put back suggestion in UI // delete on server // local delete in data