inpage_edit
v1.0.4
Published
In page edit utility
Readme
IN-PAGE EDIT
example usage new @InpageEdit on : node focus_element : 'input.title' success : (response, textStatus, jqXhr)-> id = response.id source = $("table.document[data-id='"+id+"']").closest('.template-download') new_template = _.template($('#template-download').html()) source.replaceWith(new_template({file:response})) error : -> console.log "Changes were not saved, for some reason"
options: on: the root element of the editable content, a jquery node reference NOT the id, but the actual jquery object focus_element : selector of element on which to apply focus when switching to edit mode success : callback when save was successful error : callback when save failed
requirements: Needs an element with selector '.editable_container' with data attribute for save_url
