jsharmony-cms
Version:
44 lines • 3.29 kB
JSON
{
"Site_Template_Page": {
"layout":"grid",
"table":"{schema}.site_template",
"title": "Page Templates",
"caption":["Page Template","Page 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='PAGE'",
"sqlwhere_disabled_on_insert": true,
"rowlimit":99999,
"breadcrumbs": {
"title": "",
"sql": "select %%%FS_PAGE_TEMPLATE_PATH%%% fs_page_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')%> <%=xejs.iif(((datarow['site_template_name']=='<Raw Text>')||(datarow['site_template_name']=='<Standalone>')),'no_dev_mode')%>",
"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; }",
".xrow_<%=model.class%>.no_dev_mode .site_template_preview_cell .xicon { display:none; }",
],
"fields": [
{"name":"site_id","actions":"BI","foreignkey":1,"control":"hidden"},
{"name":"site_template_type","actions":"I","control":"hidden","default":"PAGE"},
{"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":[
{ "function":"js:if(!_obj.site_template_path && !(_obj.site_template_config||'').toString().trim()) return 'Either URL or Config is required';", "selector": ".site_template_path,.site_template_config" }
]},
{"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"}},
{"control":"html","caption":"Dev Mode","link":"js:_this.previewTemplate(this)","value":"<img src='/images/icon_browse.png' class='xicon' />","cellclass":"site_template_preview_cell"}
]
}
}