Modul:SFfield/config

This is [[MediaWiki:Tagline]]. Set to <code>display:none</code> by chameleon skin.
Wechseln zu:Navigation, Suche
Documentation icon Module documentation[view] [edit] [history] [purge]

This module provides data for Module:SFfield/class.

Usage

local cfg = mw.loadData( 'Module:SFfield/config' )

local global = {
	defaultDelimiter = ',',
	showOnSelectIdPrefix = 'row_',
	tooltipParserFunction = '#tip-info',
}

local validInputTypes

-- all valid attributes for "{{{field}}}". includes SemanticForms and SemanticFormsInputs
local validAttributes = {
	'autogrow',
	'autozoom',
	'base prefix',
	'base type',
	'cargo field',
	'cargo table',
	'center',
	'class',
	'cols',
	'date format',
	'default',
	'default filename',
	'delimiter',
	'disable dates',
	'disable days of week',
	'disable input field',
	'editor',
	'enable input field',
	'existing values only',
	'first date',
	'geoservice',
	'height',
	'hidden',
	'hide reset button',
	'hide week numbers',
	'highlight dates',
	'highlight days of week',
	'holds template',
	'image preview',
	'include timezone',
	'input type',
	'interval',
	'inverse',
	'last date',
	'list',
	'mandatory',
	'mapping cargo field',
	'mapping cargo table',
	'mapping property',
	'mapping template',
	'max values',
	'maxlength',
	'maxtime',
	'message',
	'mintime',
	'or char',
	'placeholder',
	'property',
	'regexp',
	'remote autocompletion',
	'restricted',
	'rows',
	'show on select',
	'show reset button',
	'show week numbers',
	'size',
	'structure',
	'unique',
	'unique for category',
	'unique for concept',
	'unique for namespace',
	'uploadable',
	'values',
	'values dependent on',
	'values from category',
	'values from concept',
	'values from external data',
	'values from namespace',
	'values from property',
	'values from url',
	'week start',
	'width',
	'zoom',
}

local generalAttributes = {
	-- 	there attributes are used in all the input types
	'cargo field',
	'cargo table',
	'class',
	'default',
	'default filename',
	'delimiter',
	'hidden',
	'holds template',
	'image preview',
	'input type',
	'list',
	'mandatory',
	'placeholder',
	'property',
	'restricted',
	'unique',
	'unique for category',
	'unique for concept',
	'unique for namespace',
	'uploadable',

	'values',
	'values dependent on',
	'values from category',
	'values from concept',
	'values from namespace',
	'values from property',

	'values from external data', 
	'values from url',
}
-- unused in SFfield/class, but referenced in Classgenerator
-- includes all attributes from base semantic forms and SemanticFormsInputs
validAttributesPerType = {
	checkbox = {'show on select'},
	checkboxes = {'delimiter', 'mapping cargo field', 'mapping cargo table', 'mapping property', 'mapping template', 'show on select', 
		'values', 'values from category', 'values from concept', 'values from external data', 'values from namespace', 'values from property', 'values from url'},
	combobox = {'existing values only', 'size', 'mapping cargo field', 'mapping cargo table', 'mapping property', 'mapping template', 'values', 
		'values dependent on', 'values from category', 'values from concept', 'values from external data', 'values from namespace', 'values from property', 'values from url' },
	date = {'include timezone', 'size', 'maxlength'},
	datecheck = {'size', 'maxlength'},
	datepicker = {'date format', 'disable dates', 'include timezone', 'disable input field', 'disable days of week', 'enable input field', 'first date', 'hide reset button', 'hide week numbers', 'highlight dates', 
		'highlight days of week', 'last date', 'maxlength', 'show reset button', 'show week numbers', 'size', 'values', 'week start',
		'values dependent on', 'values from category', 'values from concept', 'values from external data', 'values from namespace', 'values from property', 'values from url' },
	datetime = {'maxlength', 'size'},
	datetimepicker = {'date format', 'disable dates', 'disable input field', 'disable days of week', 'enable input field', 'first date', 'hide reset button', 'hide week numbers', 'highlight dates', 'highlight days of week', 
		'include timezone', 'interval', 'last date', 'maxlength', 'maxtime', 'mintime', 'show reset button', 'show week numbers', 'size', 'values', 'week start', 
		'values dependent on', 'values from category', 'values from concept', 'values from external data', 'values from namespace', 'values from url', 'week start'},
	dropdown = {'show on select', 'size', 'mapping cargo field', 'mapping cargo table', 'mapping property', 'mapping template', 
		'values', 'values dependent on', 'values from category', 'values from concept', 'values from external data', 'values from namespace', 'values from property', 'values from url' },
	googlemaps = {'geoservice', 'width', 'height', 'zoom', 'center', 'autozoom'},
	listbox = {'delimiter', 'size', 'mapping cargo field', 'mapping cargo table', 'mapping property', 'mapping template', 'max values', 'values', 
		'values dependent on', 'values from category', 'values from concept', 'values from external data', 'values from namespace', 'values from property', 'values from url' },
	menuselect = {'disable input field', 'enable input field', 'maxlength', 'size', 'structure'},
	openlayers = {'geoservice', 'width', 'height', 'zoom', 'center', 'autozoom'},
	radiobutton = {'mapping cargo field', 'mapping cargo table', 'mapping property', 'mapping template', 'show on select', 'values', 
		'values dependent on', 'values from category', 'values from concept', 'values from external data', 'values from namespace', 'values from property', 'values from url' },
	regexp = {'base prefix', 'base type', 'inverse', 'maxlength', 'message', 'size', 'or char', 'regexp', 'values', 
		'values dependent on', 'values from category', 'values from concept', 'values from external data', 'values from namespace', 'values from property', 'values from url' },
	text = {'size', 'maxlength'},
	textarea = {'autogrow', 'cols', 'editor', 'maxlength', 'rows'},
	timepicker = {'disable input field', 'enable input field', 'interval', 'maxlength', 'maxtime', 'mintime', 'size'},
	tokens = {'delimiter', 'existing values only', 'size', 'mapping cargo field', 'mapping cargo table', 'mapping property', 'mapping template', 'max values', 'values', 
		'values dependent on', 'values from category', 'values from concept', 'values from external data', 'values from namespace', 'values from property', 'values from url' },
	tree = {'size', 'maxlength'},
	year = {'size', 'maxlength'},
}
validAttributesPerType['text with autocomplete'] = {
	'delimiter', 'size', 'mapping cargo field', 'mapping cargo table', 'mapping property', 'mapping template', 'maxlength', 'values', 
	'values dependent on', 'values from category', 'values from concept', 'values from external data', 'values from namespace', 'values from property', 'values from url', 
}
validAttributesPerType['textarea with autocomplete'] = {
	'autogrow', 'cols', 'delimiter', 'editor', 'rows', 'mapping cargo field', 'mapping cargo table', 'mapping property', 'mapping template', 'maxlength', 'values', 
	'values dependent on', 'values from category', 'values from concept', 'values from external data', 'values from namespace', 'values from property', 'values from url',
}
validAttributesPerType['two listboxes'] = {
	'delimiter', 'mapping cargo field', 'mapping cargo table', 'mapping property', 'mapping template', 'values', 
	'values dependent on', 'values from category', 'values from concept', 'values from external data', 'values from namespace', 'values from property', 'values from url',
}

-- all valid entries for "input type=". includes SemanticForms and SemanticFormsInputs
validInputTypes = {
	'checkbox',
	'checkboxes',
	'combobox',
	'date',
	'datecheck',
	'datepicker',
	'datetime',
	'datetimepicker',
	'dropdown',
	'googlemaps',
	'listbox',
	'menuselect',
	'openlayers',
	'radiobutton',
	'regexp',
	'text',
	'text with autocomplete',
	'textarea',
	'textarea with autocomplete',
	'timepicker',
	'tokens',
	'tree',
	'two listboxes',
	'year',
}

return {
	global = global,
	generalAttributes = generalAttributes,
	validAttributes = validAttributes,
	validAttributesPerType = validAttributesPerType,
	validInputTypes = validInputTypes,
}