nl_tokens: Set up an observer on the context . If the property changes toggle the class name .
pl_tokens: function ( ) { // Get the current value of the property newClass = this . _classStringForProperty ( <mask> ) ; elem = this . $ ( ) ; // If we had previously added a class to the element, remove it. if ( oldClass ) { elem . removeClass ( oldClass ) ; // Also remove from classNames so that if the view gets rerendered, // the class doesn't get added back to the DOM. classNames . removeObject ( oldClass ) ; } // If necessary, add a new class. Make sure we keep track of it so // it can be removed in the future. if ( newClass ) { elem . addClass ( newClass ) ; oldClass = newClass ; } else { oldClass = null ; } }