Created
December 10, 2009 16:46
-
-
Save JohnB/253446 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// Example markup for user edit dialog. Simple tags, with no specified class or id | |
// just contain an array holding their nested markup. More complex ones hold a hash | |
// with tag fields and a "ui" field holding their nested markup. This data would be | |
// recursed over to generate the expected HTML markup. | |
var markup = { | |
div: {id: 'user_dialog', ui: { | |
table: [ | |
{tr: [ | |
{td: {_class:'field_name', value:'Name'}}, | |
{td: [ | |
{input: {type:'text', id:'name', size:40}}, | |
{span: {id: 'err_msg_for_name', _class:'err_msg'}} | |
]} | |
]}, | |
{tr: [ | |
{td: {_class:'field_name', value:'Password'}}, | |
{td: [ | |
{input: {type:'password', id:'password', size:40}}, | |
{span: {id: 'err_msg_for_password', _class:'err_msg'}} | |
]} | |
]}, | |
{tr: [ | |
{td: {_class:'field_name', value:'Confirm Password'}}, | |
{td: [ | |
{input: {type:'password', id:'confirm_password', size:40}}, | |
{span: {id: 'err_msg_for_confirm_password', _class:'err_msg'}} | |
]} | |
]} | |
] | |
}} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment