InlineEdit

Page history last edited by Ca-Phun Ung 3 mos ago

 

type: widget

release: 0.0

priority: very low

status: in planning

documentation: N/A

demo: http://jquery-ui.googlecode.com/svn/branches/labs/inlineedit/demo.html

 


 

1 - Description:

 

This plugin allows for a common web 2.0 interaction pattern where a user clicks (multiple other variations exist; double click, presses buttonor double clicks or pressed a link/button) on a title or block of text and the content is transformed into an editable form element. The changes can be saved via AJAX on a range of events: keyUp, change, Blur, or when a save button is pressed. A cancel button or link is also an optional element to undo the changes.

 

Stuart Loxton created a simple edit in place demo with a few typical options:

http://stuartloxton.com/demos/uiEdit (link is broken!)

 

Jeditable looks really good and full featured:

http://www.appelsiini.net/projects/jeditable

 

 


 

2 - Visual Design:

 

(Initial wireframe mockup, followed by more detailed designs of the various configurations, options and states.)

 


 

 

3 - Functional Specifications/Requirements:

 

(Detailed description of how the script will be structured: defaults, options, architecture, extensibility, etc.)

 


 

4 - Markup & Style:

 

     4.1 Initial markup examples

 

     (Pre-enhanced HTML markup structure that will be transformed into the final widget. There may be multiple possible HTML markup options per widget: for example, for a slider, radiobuttons, inputs or selects could all be used. )

 

     4.2 Recommended transformed HTML markup

 

     (The HTML markup structure and classes that will be used by the scripts in the enhanced version) 

 

     4.3 Accessibility recommendation

 

    (Detailed recommendations for ARIA, HTML markup, CSS and javascript that will contribute to universal access and full section 508 accessibility for screen readers, mobile devices and any other devices) 

 

     4.4 CSS & Theme

 

    (Description of the CSS classes to be used for all states, how custom theming and Themeroller support will work.) 

 


 

5 - Latest version of plugin:

 

(Link to the latest version in the jQuery UI trunk here)

 


 

6 - Open issues being discussed

 

(Use this area to place things that we're hashing out like features and options we're not sure we should include, questions about how this fits into UI and relates to other widgets and utilities, known problems, whether features should be broken across multiple releases, etc.)

 


 

 

 

 

Comments (4)

profile picture

Stuart Loxton said

at 4:37 pm on Apr 8, 2009

One thing that stands out about writing this plugin is who handles the saving of the data. Should the plugin handle it via synced input fields (which it can handle already), AJAX posts to another page OR should the user handle the saving of a field via actions such as editSave, editStop, etc. I would go for the user handling it as better as it allows for more customisation in situations that need it. E.g, field may not need to be saved on external site but instead set in a cookie. Handling all situations is a possibility but might lead to a large vague bloated plugin.

profile picture

Scott González said

at 6:05 pm on Apr 8, 2009

I agree that just exposing events that the user can react to however they want is the way to go. If there is enough interest in a specific method for saving data, we can add that in later.

profile picture

ajpiano said

at 12:43 am on Apr 9, 2009

i've gotten a lot of mileage out of greg weber's ui table edit plugin
http://gregweber.info/projects/uitableedit
which exposes 3 callbacks
mousedown, dataVerify, editDone and i added a 4th, "activated," which is called after the input elements have been created (for binding autocomplete, etc)
these would seem to be the critical moments in the interction.

profile picture

Stuart Loxton said

at 6:56 am on Apr 14, 2009

Just uploaded a slightly newer version, the validation option now accepts either a regular expression or a function. Also I've quickly added 3 events editCancel, editFinish and editStart. For cancelled inputs, whenever an editing session is finished and when one is activated. The demos don't have any of these in however you can test by using firebug by just typing: $('li').bind('editFinish', function() { console.log(this, 'finished editing'); });

Any extra events on the input (e.g. keyDown, keyUp, mouseDown can be binded inside of the editStart event), events such as mouseDown can be binded to the editable target as per normal fashion.

You don't have permission to comment on this page.