FSN#39212 Api voor settings

svn path=/Website/branches/v2016.3/; revision=32607
This commit is contained in:
Erik Groener
2017-01-30 12:15:27 +00:00
parent 851067063b
commit 649043d65a

View File

@@ -12,33 +12,18 @@
*/ */
%> %>
<% <%
function model_fac_setting(setting_key, params) function model_fac_setting()
{ {
this.REST_GET = generic_REST_GET(_model_fac_setting, this.table = "fac_setting";
{ "GET": { this.primary = "fac_setting_key";
wheres: [ "BITAND(fac_setting_flags,1)=1" this.records_name = "fac_settings";
] this.record_name = "fac_setting";
} this.autfunction = "WEB_PROFIL"; //Om zelf al je geregistreerde gegevens te kunnen inzien
} this.record_title = L("lcl_fac_setting");
) // this.records_title = L("lcl_fac_setting_m");
// this.REST_POST = generic_REST_POST(_model_mld_discipline);
// this.REST_PUT = generic_REST_PUT(_model_mld_discipline);
// this.REST_DELETE = generic_REST_DELETE(this);
}
_model_fac_setting = // Internal only
{
"table": "fac_setting",
"primary": "fac_setting_key",
"records_name": "fac_settings",
"record_name": "fac_setting",
"autfunction": "WEB_PROFIL",
"record_title": L("lcl_fac_setting"),
"records_title": L("lcl_fac_setting_m"),
"fields": { this.fields = {
"id": { "id": {
"dbs": "fac_setting_key", "dbs": "fac_setting_key",
"label": "Key", "label": "Key",
@@ -114,6 +99,30 @@ _model_fac_setting = // Internal only
"typ": "key", "typ": "key",
"foreign": "fac_functie" "foreign": "fac_functie"
} }
} };
this.list = {
"columns": [
"id",
"name",
"value"
]
};
this.search = {
"autosearch": true
};
this.REST_GET = generic_REST_GET(this,
{ "GET": {
wheres: [ "BITAND(fac_setting_flags,1)=1"
]
}
}
)
//this.REST_POST = generic_REST_POST(this);
//this.REST_PUT = generic_REST_PUT(this);
//this.REST_DELETE = generic_REST_DELETE(this, {});
} }
%> %>