Created
February 19, 2013 22:49
-
-
Save jbest84/4990928 to your computer and use it in GitHub Desktop.
Contact/Edit cuisine preferences textRenderer and formatValue function; fixed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
formatCuisinePrefs: function(selections) { | |
if (typeof selections === 'string') { | |
return selections; | |
} | |
var values = []; | |
for (var key in selections) { | |
var data = selections[key].data; | |
if (data && data.text) { | |
values.push(data.text); | |
} else if (typeof data === 'string') { | |
values.push(data); | |
} | |
} | |
return values.join(', '); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment