...
New method can be called using akioma.invokeServerTask, like in the example below, by specifying the desired settings domain in the request:
Code Block | ||
---|---|---|
| ||
akioma.invokeServerTask({ |
...
????????????name:??"Akioma.Crm.MasterData.System.ApplicationSettingsBT", |
...
????????????methodName:??"GetApplicationSettingsByDomain", |
...
????????????paramObj:??{??plcParameter:??{ApplicationSettingsDomain: "ckEditor"} |
...
??} ????????}).then((response) |
...
??=>??{ ?? ?? ??//process |
...
response ?? ?? }??catch??(e) |
...
??{ ?? ?? ??//process |
...
error ?? ??} }); |
The above call will return all the settings under the "ckEditor" domain.
...
The response would look like this:
Code Block | |
---|---|
|
...
| |
{ ?? ?? "SerializedType": "Akioma.Crm.MasterData.System.ApplicationSettingsParameter", |
...
?? ?? "ApplicationSettingsDomain": "ckEditor", |
...
?? ?? "ApplicationSettings": |
...
{ ?? ?? ?? ?? "ckEditor": |
...
{ ?? ?? ?? ?? ?? ?? "fontSize_defaultLabel": "10", |
...
?? ?? ?? ?? ?? ?? "font_defaultLabel": "Arial", |
...
?? ?? ?? ?? ?? ?? "listStyle_afterTextSpace": "-.25", |
...
?? ?? ?? ?? ?? ?? "fontSize_sizes": "val", |
...
?? ?? ?? ?? ?? ?? "styles": "", |
...
?? ?? ?? ?? ?? ?? "specialChars": "", |
...
?? ?? ?? ?? ?? ?? "listStyle_beforeTextSpace": ".25", |
...
?? ?? ?? ?? ?? ?? "font_names": "Arial;Comic Sans MS;Courier New;Georgia;Lucida Sans Unicode;Tahoma;Times New Roman;Trebuchet MS;Verdana", |
...
?? ?? ?? ?? ?? ?? "uiColor": "#DDDDDD", |
...
?? ?? ?? ?? ?? ?? "toolbar": "Standard", |
...
?? ?? ?? ?? ?? ?? "listStyle_defaultName": "MsoListParagraph", |
...
?? ?? ?? ?? ?? ?? "editorAdvancedSettings": "{}", |
...
?? ?? ?? ?? ?? ?? "templates": "" |
...
?? ?? ?? ?? } ?? ?? } } |
All of the returned properties are available under: response.ApplicationSettings.ApplicationSettingsDomain (in our case, ApplicationSettings is ckEditor).
...
For example, if our .restapplicationsettings file looks like below and we specify in the request the "rootProp1" as theĀ ApplicationSettingsDomain, nothing will be returned.
Code Block | |
---|---|
|
...
| |
{ ?? ?? "rootProp1": "rootValue1", |
...
?? ?? "rootProp2": "rootValue2", |
...
?? ?? "rootProp3": |
...
{ ?? ?? ?? ?? "subProp1": "subValue1" |
...
?? ?? } } |