inpage_edit v1.0.4
IN-PAGE EDIT
example usage new @InpageEdit on : node focuselement : 'input.title' success : (response, textStatus, jqXhr)-> id = response.id source = $("table.documentdata-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