jsharmony-factory
Version:
Enterprise framework for jsHarmony
89 lines • 4.97 kB
JSON
{
"Base/Doc": {
"title":"Document",
"table":"{schema}.v_doc_ext",
"actions":"BIUD",
"layout":"form",
"caption": [ "", "Document", "Documents" ],
"popup":[900,350],
"fields":[
{"name":"doc_id","type":"bigint","key": 1,"datalock":{"cust_id":"doc_id"},"control":"hidden"},
{"name":"doc_scope_id","type":"bigint","actions":"BI",
"control": "hidden","default": "js:_GET['doc_scope_id']","caption": "","datalock": {"cust_id": "doc_scope_id"}},
{"control":"html","value":"<div style=\"font-size:18px;padding-bottom:12px;\">"},
{"name":"title_detail","type":"varchar","length":"255","control":"hidden","actions":"","caption":""},
{"control":"html","value":"</div>"},
{"name":"doc_scope","type":"varchar","length":32,"actions":"BI","datalock": {"cust_id": "doc_scope"},"nl":1,
"control":"dropdown_S","controlstyle":"width:95px;",
"lov": { "sql":"select code_val, code_txt from {schema}.code_doc_scope order by code_seq,code_txt", "blank": 1, "nodatalock":["cust_id"] },
"default": "js:_GET['doc_scope']","readonly": 1,
"validate":["Required"],
"caption":"Scope","captionstyle":"width:120px;text-align:right;"},
{"name":"doc_ctgr","type":"varchar","length":50,"actions":"BI",
"lov":{"sql2":"select code_val1 as %%%jsh.map.{{code_parent}}%%%, code_val2 as %%%jsh.map.{{code_val}}%%%, code_txt as %%%jsh.map.{{code_txt}}%%% from {schema}.code2_doc_scope_doc_ctgr order by code_txt",
"blank":1, "parent":"doc_scope","nodatalock":["cust_id"]},
"control":"dropdown_L","validate":["Required"],
"caption":"Type","captionstyle":"width:105px;text-align:right;"},
{"name":"cust_name_ext","type":"varchar","length":255,"actions":"","control":"hidden","nl":1},
{"name":"item_name","type":"varchar","length":255,"actions":"","control":"hidden","nl":1},
{"name":"doc_desc","type":"varchar","length":255,"actions":"BIU","nl":1,
"control":"textarea","controlstyle":"width:608px;height:35px;",
"caption":"Description","captionstyle":"width:120px;height:35px;vertical-align:top;padding-top:3px;text-align:right;"},
{"name": "doc_preview","control": "html",
"value": "<table cellspacing=0 cellpadding=0 border=0 class='doc_img_viewer_container' style='display:none;'><tr><td valign='top'><div class='xform_caption' style='width:120px;text-align:right;vertical-align:top;padding-top:3px;'>Preview:</div></td><td><img class='doc_img_viewer' style='max-width:100%;margin-left:auto;margin-right:auto;' /></td></tr></table>",
"caption": ""},
{"name":"doc_etstmp","type":"datetime","length":7,"actions":"B","nl":1,
"control":"textbox_tstmp",
"caption":"Entered"},
{"name":"doc_euser_fmt","type":"varchar","length":20,"actions":"B",
"sqlselect":"({schema}.my_db_user_fmt(doc_euser))",
"control":"textbox","controlstyle":"width:158px;","caption":""},
{"name":"doc_mtstmp","type":"datetime","length":7,"actions":"B","nl":1,
"control":"textbox_tstmp",
"caption":"Last Updated"},
{"name":"doc_muser_fmt","type":"varchar","length":20,"actions":"B",
"sqlselect":"({schema}.my_db_user_fmt(doc_muser))",
"control":"textbox","controlstyle":"width:158px;","caption":""},
{"name":"doc_uptstmp","type":"datetime","length":7,"actions":"B","nl":1,
"control":"textbox_tstmp",
"caption":"Uploaded"},
{"name": "doc_upuser","type":"varchar","length": 20,"actions":""},
{"name":"doc_upuser_fmt","type":"varchar","length":20,"actions":"B",
"sqlselect":"({schema}.my_db_user_fmt(doc_upuser))",
"control":"textbox","controlstyle":"width:158px;","caption":""},
{"name":"doc_ext","type":"varchar","length":16,"actions":"B",
"control":"label_VS",
"caption":"Extension","captionstyle":"width:72px;text-align:right;"},
{"name":"doc_size","type":"bigint","actions":"B",
"control":"label_S",
"caption":"Bytes"},
{"name":"doc_filename", "sqlselect":"{schema}.doc_filename(doc_id, doc_ext)",
"type":"varchar","length":67,"actions":"B","control":"hidden"},
{"name":"doc_file","type":"file","actions":"BIU","nl":1,
"control":"file_upload","caption":"Document",
"controlparams": {
"sqlparams": {"file_size": "doc_size",
"file_extension": "doc_ext",
"file_upload_timestamp": "doc_uptstmp",
"file_upload_user": "doc_upuser",
"file_name": "doc_filename"
},
"download_button": "Download Document",
"upload_button": "Upload New File",
"delete_button": "Delete File",
"data_folder": "doc__tbl"
},
"validate": [ "Required" ]}
],
"dberrors": [
[ "Record not found", "You have no access to the document." ]
]
},
"Doc__model": {
"inherits":"Base/Doc"
},
"Doc_Browse": {
"inherits": "Doc__model",
"actions":"B"
}
}