{
	"ns": "webr.ns",
	"propertyRules": "rules.xpd",
	"idProperty": "__cid__",
	"defaultLanguage": "da",
	"labelWidth": 160,
	"iconPath": "/system/images/icons/extjs5/16x16",
	"properties": {
		"text": {
			"title": "property_text_title",
			"type": "i18n",
			"dbType": "varchar(256)",
			"length": 256,
			"isTitle": true,
			"groups": [
				"generel"
			],
			"sequence": 100
		},
		"seq": {
			"title": "property_sequence_title",
			"type": "number",
			"hidden": true,
			"dbType": "dec(8 , 2)",
			"length": 11,
			"groups": [
				"generel"
			]
		}
	},
	"collections": {
		"root": {
			"id": 1,
			"title": "collection_root_title",
			"allowedparents": [],
			"allowedchilds": [
				2
			]
		},
		"group": {
			"id": 2,
			"title": "collection_group_title",
			"allowedparents": [
				1
			],
			"allowedchilds": [
				2,
				3,
				5
			]
		},
		"question": {
			"id": 3,
			"allowedparents": [
				2
			],
			"allowedchilds": [
				4
			],
			"title": "collection_question_title",
			"icon": "question.png",
			"properties": {
				"answertype": {
					"title": "property_answertype_title",
					"type": "picker",
					"enum": "questionanswertype",
					"preprocess": [
						{
							"regexp": "^",
							"replace": "webr~questionanswertype~"
						}
					],
					"postprocess": [
						{
							"search": "webr~questionanswertype~",
							"replace": ""
						}
					],
					"groups": [
						"generel"
					],
					"sequence": 200
				},
				"pubtitle": {
					"type": "htmlfield",
					"dbType": "varchar(256)",
					"length": 256,
					"title": "property_pubtitle_title",
					"isFormField": false,
					"groups": [
						"publication"
					],
					"borrow": {
						"sanitizeFn": "ip2.setPublicationTitle",
						"and": true,
						"initialize": true,
						"fields": [
							{
								"from": "pubdate",
								"trigger": "change",
								"conditionFn": "ip2.trueFn"
							},
							{
								"from": "expiredate",
								"trigger": "change",
								"conditionFn": "ip2.trueFn"
							},
							{
								"from": "pubstatus",
								"trigger": "change",
								"conditionFn": "ip2.trueFn"
							},
							{
								"from": "removed",
								"trigger": "change",
								"conditionFn": "ip2.trueFn"
							},
							{
								"from": "siteclude",
								"trigger": "change",
								"conditionFn": "ip2.trueFn"
							}
						]
					},
					"sequence": 300
				},
				"pubstatus": {
					"title": "property_pubstatus_title",
					"type": "picker",
					"dbType": "integer",
					"length": 5,
					"i18n": true,
					"enum": "pubstatus",
					"preprocess": [
						{
							"regexp": "^",
							"replace": "webr~pubstatus~"
						}
					],
					"postprocess": [
						{
							"search": "webr~pubstatus~",
							"replace": ""
						}
					],
					"groups": [
						"publication"
					],
					"sequence": 310
				},
				"pubdate": {
					"title": "property_pubdate_title",
					"placeholder": "property_pubdate_placeholder",
					"type": "date",
					"dbType": "varchar(26)",
					"length": 26,
					"format": "Y-m-d",
					"allowedchoice": true,
					"groups": [
						"publication"
					],
					"sequence": 320
				},
				"expiredate": {
					"title": "property_expiredate_title",
					"placeholder": "property_expiredate_placeholder",
					"type": "date",
					"dbType": "varchar(26)",
					"length": 26,
					"allowedchoice": true,
					"mindatebind": "pubdate",
					"format": "Y-m-d",
					"groups": [
						"publication"
					],
					"sequence": 330
				},
				"siteclude": {
					"title": "property_siteclude_title",
					"type": "includepicker",
					"dbType": "varchar(512)",
					"length": 512,
					"typeConfig": {
						"includeText": "property_siteclude_typeconfig_includetext",
						"excludeText": "property_siteclude_typeconfig_excludetext",
						"allText": "property_siteclude_typeconfig_alltext"
					},
					"listConfig": {
						"dmd": "webshop.dmd",
						"entity": "WSHSITET00",
						"uiName": "portfolio",
						"displayField": "SITPROP_NAME",
						"valueField": "SITSITTKN",
						"anchor": "50%",
						"minWidth": 300,
						"emptyText": "property_siteclude_listconfig_emptytext"
					},
					"groups": [
						"publication"
					],
					"sequence": 340
				},
				"removed": {
					"title": "property_removed_title",
					"boxlabel": "property_removed_boxlabel",
					"type": "boolean",
					"dbType": "char(5)",
					"length": 5,
					"i18n": true,
					"groups": [
						"publication"
					],
					"sequence": 350
				}
			}
		},
		"answer": {
			"id": 4,
			"title": "collection_answer_title",
			"icon": "message.png",
			"allowedparents": [
				3
			],
			"allowedchilds": [],
			"properties": {
				"correct": {
					"title": "property_correct_title",
					"boxlabel": "property_correct_boxlabel",
					"type": "boolean",
					"dbType": "char(5)",
					"length": 5,
					"i18n": true,
					"groups": [
						"generel"
					],
					"sequence": 400
				}
			}
		},
		"item": {
			"id": 5,
			"allowedparents": [
				2
			],
			"allowedchilds": [],
			"disallowedit": true,
			"title": "collection_item_title",
			"dmd": "webshop.dmd",
			"entity": "WSHITMET00",
			"propertyFieldName": "ILGPROP",
			"uiName": "portfolio",
			"materializedTable": "WSHITMET00_GRID_PORTFOLIO_MATERIALIZED",
			"titleColumns": "ILGPROP_ITEMNUMBER, ILGPROP_NAME",
			"properties": {
				"itemnumber": {
					"databasebind": "ITMITMTKN",
					"title": "property_itemnumber_title",
					"type": "number",
					"dbType": "integer",
					"length": 5,
					"isKey": true
				}
			}
		}
	},
	"groups": {
		"generel": {
			"title": "group_generel_title",
			"renderIn": {
				"editor": {
					"layout": {
						"sequence": 100
					}
				}
			}
		},
		"publication": {
			"title": "group_publication_title",
			"renderIn": {
				"editor": {
					"collapsed": false,
					"sequence": 200,
					"collasible": false,
					"collapsible": true
				}
			}
		}
	},
	"environments": {
		"editor": {
			"title": "environment_editor_title"
		},
		"folderorganizer": {
			"title": "environment_folderorganizer_title"
		}
	},
	"layout": {
		"editor": {
			"__default__": {
				"width": 600
			}
		},
		"folderorganizer": {
			"__default__": {
				"width": "100%",
				"minWidth": 300
			}
		}
	},
	"language": {
		"da": {
			"text": {
				"environment_editor_title": "Editor",
				"environment_folderorganizer_title": "Folder organizer",
				"group_generel_title": "Generelt",
				"group_publication_title": "Publikation",
				"collection_root_title": "Root",
				"collection_group_title": "Gruppe",
				"collection_question_title": "Spørgsmål",
				"collection_answer_title": "Svar",
				"collection_item_title": "Produkt",
				"property_text_title": "Tekst",
				"property_answertype_title": "Svartype",
				"property_correct_title": "Korrekt svar ?",
				"property_correct_boxlabel": "Dette er det korrekt svar",
				"property_pubdate_title": "Publikationsdato",
				"property_pubdate_placeholder": "Angives ingen, publiceres siden øjeblikkeligt",
				"property_expiredate_title": "Udløbsdato",
				"property_expiredate_placeholder": "Valgfri udløbsdato for publiceringen",
				"property_webactive_title": "Publiceret",
				"property_webactive_boxlabel": "Siden publiceres på hjemmesiden jf. regler og datoer",
				"property_siteclude_title": "På flere hjemmesider",
				"property_siteclude_typeconfig_alltext": "Vis på alle hjemmesider",
				"property_siteclude_typeconfig_includetext": "Inkluder på valgte hjemmesider",
				"property_siteclude_typeconfig_excludetext": "Ekskluder fra valgte hjemmesider",
				"property_siteclude_listconfig_emptytext": "Vælg blandt disse sites",
				"property_pubtitle_title": "Publikation",
				"property_pubstatus_title": "Status",
				"property_removed_title": "Slet",
				"property_removed_boxlabel": "Siden bliver slettemarkeret"
			}
		},
		"en": {
			"text": {
				"environment_editor_title": "Editor",
				"environment_folderorganizer_title": "Folder organizer",
				"group_generel_title": "Generel",
				"group_publication_title": "Publication",
				"collection_root_title": "Root",
				"collection_group_title": "Group",
				"collection_question_title": "Question",
				"collection_answer_title": "Answer",
				"collection_item_title": "Product",
				"property_text_title": "Text",
				"property_answertype_title": "Type of answer",
				"property_correct_title": "Correct ?",
				"property_correct_boxlabel": "This is the correct answer",
				"property_pubdate_title": "Publication Date",
				"property_pubdate_placeholder": "If none, the page is published immediately",
				"property_expiredate_title": "Expiration date",
				"property_expiredate_placeholder": "Optional expiration date for the publication",
				"property_webactive_title": "Published",
				"property_webactive_boxlabel": "The page is published on the site according to rules and dates",
				"property_siteclude_title": "Multiple sites",
				"property_siteclude_typeconfig_alltext": "Show on all sites",
				"property_siteclude_typeconfig_includetext": "Include on selected sites",
				"property_siteclude_typeconfig_excludetext": "Exclude from selected sites",
				"property_siteclude_listconfig_emptytext": "Choose from these sites",
				"property_pubtitle_title": "Publication",
				"property_pubstatus_title": "Status",
				"property_removed_title": "Remove",
				"property_removed_boxlabel": "Site will be marked as deleted"
			}
		}
	}
}
