Make sure treepicker URLs are displayed for the current editor culture
This commit is contained in:
committed by
Sebastiaan Janssen
parent
5452ebaf6d
commit
438133ae1f
@@ -104,21 +104,26 @@ function entityResource($q, $http, umbRequestHelper) {
|
||||
*
|
||||
* @param {Int} id Id of node to return the public url to
|
||||
* @param {string} type Object type name
|
||||
* @param {string} culture Culture
|
||||
* @returns {Promise} resourcePromise object containing the url.
|
||||
*
|
||||
*/
|
||||
getUrl: function (id, type) {
|
||||
getUrl: function (id, type, culture) {
|
||||
|
||||
if (id === -1 || id === "-1") {
|
||||
return "";
|
||||
}
|
||||
|
||||
if (!culture) {
|
||||
culture = "";
|
||||
}
|
||||
|
||||
return umbRequestHelper.resourcePromise(
|
||||
$http.get(
|
||||
umbRequestHelper.getApiUrl(
|
||||
"entityApiBaseUrl",
|
||||
"GetUrl",
|
||||
[{ id: id }, {type: type }])),
|
||||
[{ id: id }, {type: type }, {culture: culture }])),
|
||||
'Failed to retrieve url for id:' + id);
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user