examples/todo/js/modules/list.js
function(name, data) {

			switch(name) {
				case 'todoadded':
				case 'todoremoved':
					this.renderList();
					this.updateSelectAllCheckbox();
					break;

				case 'todostatuschange':
					this.updateSelectAllCheckbox();
					break;

				case 'statechanged':
					setFilterByUrl(data.url);
					this.renderList();
					break;
			}

		}
function(name, data) {

			switch(name) {
				case 'todoadded':
				case 'todoremoved':
					this.renderList();
					this.updateSelectAllCheckbox();
					break;

				case 'todostatuschange':
					this.updateSelectAllCheckbox();
					break;

				case 'statechanged':
					setFilterByUrl(data.url);
					this.renderList();
					break;
			}

		}
function ( name , data ) { switch ( name ) { case 'todoadded' : case 'todoremoved' : this . renderList ( ) ; this . updateSelectAllCheckbox ( ) ; break ; case 'todostatuschange' : this . updateSelectAllCheckbox ( ) ; break ; case 'statechanged' : setFilterByUrl ( data . url ) ; this . renderList ( ) ; break ; } }
Handles all messages received for the module.
@param {string} name The name of the message received.
@param {*} [data] Additional data sent along with the message.
@returns {void}
Handles all messages received for the module .