jsharmony-cms
Version:
40 lines • 2.7 kB
JSON
{
"Site_Template_Component": {
"layout":"grid",
"table":"{schema}.site_template",
"title": "Component Templates",
"caption":["Component Template","Component Templates"],
"popup": [960, 600],
"roles": { "WEBMASTER": "BIUD" },
"commitlevel":"row",
"rowstyle":"background-color:#fff;border-bottom:1px solid #ddd;",
"sqlselect":"select site_template_id,site_id,site_template_type,site_template_name,site_template_title,site_template_location,site_template_path,site_template_config from %%%SITE_TEMPLATE%%% %%%SQLSUFFIX%%%",
"sqlwhere":"site_template_type='COMPONENT'",
"sqlwhere_disabled_on_insert": true,
"rowlimit":99999,
"breadcrumbs": {
"title": "",
"sql": "select %%%FS_COMPONENT_TEMPLATE_PATH%%% fs_component_template_path, %%%SFTP_URL%%% sftp_url,@site_id site_id,(select site_name from {schema}.site where site_id=@site_id) site_name"
},
"sort":["^site_template_title"],
"onload": "jsh.App[modelid].onload(xmodel);",
"tablestyle":"min-width:900px;",
"rowclass":"<%=xejs.iif((datarow['site_template_location']!='REMOTE'),'readonly')%>",
"css":[
".xrow_<%=model.class%>.readonly .site_template_config_cell .xform_ctrl_textzoom_container { display:none; }",
".xrow_<%=model.class%> .site_template_config_cell .xform_ctrl_textzoom_container { padding-bottom:3px;margin-top:1px;display:block; }",
".xrow_<%=model.class%> .site_template_config_cell .xform_ctrl_textzoom_container .icon { top:2px; }",
".<%=model.class%>_Templates_Location label { font-weight:bold; display:block; }",
".<%=model.class%>_Templates_Location label div { font-weight:normal; display:inline-block; margin-left:5px; }",
],
"fields": [
{"name":"site_id","actions":"BI","foreignkey":1,"control":"hidden"},
{"name":"site_template_type","actions":"I","control":"hidden","default":"COMPONENT"},
{"name":"site_template_name","caption":"Name","control":"textbox_S","validate":["Required"]},
{"name":"site_template_title","caption":"Title","validate":["Required"],"control":"textbox_M"},
{"name":"site_template_location","caption":"Location","actions":"B","sqlselect":"'REMOTE'","default":"REMOTE"},
{"name":"site_template_path","caption":"URL","control":"textbox_L","validate":["Required"]},
{"name":"site_template_config","caption":"Config","control":"textzoom","controlstyle":"display:none;","cellstyle":"text-align:center;","cellclass":"site_template_config_cell","validate":[{ "function": "IsJSON", "selector": ".site_template_config_cell .xform_ctrl_textzoom_container" }],"controlparams":{"icon":"edit"}}
]
}
}