Sprint 1 – cancelListItemChange function

Cancel List Item Change (on-click) event handler

When the user clicks the Cancel button within the Task Details panel the cancelListItemChange function is fired.

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

 if (!!objHighlightedItem) {
   objHighlightedItem.className = objHighlightedItem.className.replace(/highlighted/, "lowLight");
 }

 showFunctions('list');
}

This function is very simple. It clears the Selected Task, by changing the className of the List Item from “hightlighted” to “lowLighted”, and switched the displayed panel back to the Button panel using the showFunctions call.


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

Advertisements

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