
var Config = {
	// Values must match config.h
	// Naming with CONFIG_ prefix is redundant but want to match exact screen to those in config.h, which are scopeless

	CONFIG_SETTING_TITO_HIDE_EMPTY_SECTIONS: 1,
	CONFIG_SETTING_TITO_GROUP_BY: 2,
	CONFIG_SETTING_SHOW_SIGNATURES: 3,

	CONFIG_VALUE_TITO_GROUP_BY_DAY: 0,
	CONFIG_VALUE_TITO_GROUP_BY_WEEK: 1,
	CONFIG_VALUE_TITO_GROUP_BY_PROJECT: 2,
	CONFIG_VALUE_TITO_GROUP_BY_STATUS: 3,

	/*get: function(settingid) {
	},*/
	set: function(settingid, value) {
		//only change config if ajax is available, otherwise change config ajax call will change the frame
		if (Ajax.ajaxAvailable()) {
			Ajax.send({
				silent: true,
				type: 'post',
				relativeUrl: '?SetData',
				data: {
					tokenid: DocumentData.tokenid,
					command: 'Config',
					settingid: settingid,
					value: value
				},
				afterOnError: function() {
					// Notify user?
				}
			});
		}
	}
}
