Skip to content

Commit

Permalink
UI: Undo remove
Browse files Browse the repository at this point in the history
Added 'undo' functionality when removing config items.  Added new
'RemovedConfigStore' to take care of storing these items and added
'UndoRemoveAlert.react' component to take care of display & 'undo link'
interaction.
  • Loading branch information
danesparza committed Apr 5, 2016
1 parent 1d56397 commit 2096002
Show file tree
Hide file tree
Showing 9 changed files with 721 additions and 333 deletions.
9 changes: 9 additions & 0 deletions css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,16 @@ body {
margin-bottom: 20px;
}

/* Alert styles */
.alert-info a{
color: #bddaed;
}

.alert a:hover {
cursor:pointer;
}

/* Ajax progress bar */
/* Make clicks pass-through */
#nprogress {
pointer-events: none;
Expand Down
33 changes: 27 additions & 6 deletions js/actions/ConfigActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,35 @@ import CentralConfigConstants from '../constants/CentralConfigConstants';

class ConfigActions {

recieveConfigData(configData) {
// Updates the 'config items' store
recieveConfigData(configData) {

AppDispatcher.dispatch({
actionType: CentralConfigConstants.RECIEVE_RAW_CONFIGITEMS,
configData: configData
});
AppDispatcher.dispatch({
actionType: CentralConfigConstants.RECIEVE_RAW_CONFIGITEMS,
configData: configData
});

}
}

// Updates the 'removed item' store
recieveRemovedConfigData(configData) {

AppDispatcher.dispatch({
actionType: CentralConfigConstants.RECIEVE_REMOVED_CONFIGITEM,
removedItem: configData
});

}

// Clears the 'removed item' store
clearRemovedConfigData() {

AppDispatcher.dispatch({
actionType: CentralConfigConstants.RECIEVE_REMOVED_CONFIGITEM,
removedItem: null
});

}

}

Expand Down
Loading

0 comments on commit 2096002

Please sign in to comment.