Sprint 1 – editListItem function

Edit List Item (on-click) event handler

When the user clicks the Edit button the editListItem function is invoked.

function editListItem(){
 var objHighlightedItem = document.querySelector('.highlighted');

 if (!!objHighlightedItem) {
   var objTextArea = document.getElementById('listItemTextArea');
   showFunctions('listItems');
   objTextArea.focus();
 }
}

This function commences by locating the highlighted Task in the list and, if found, copies the value of the selected Task to the TextArea.
The Task Details panel is then shown using the showFunctions call with the ‘listItems’ parameter.
Finally focus is set to the TextArea to aid usability.


Return to the Sprint One section.
Return to the main article.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s