Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
define([
// Dojo
"dojo/_base/declare",
"dojo/_base/array",
"dojox/html/entities",
// EPi
"epi-cms/contentediting/editors/SelectionEditor",
// Resources
"epi/i18n!epi/cms/nls/episerver.cms.widget.contentselector"],
function (
// Dojo
declare,
array,
entities,
// EPi
SelectionEditor,
// Resources
res) {
return declare("alloy/editors/SelectionEditor", [SelectionEditor], {
_setSelectionsAttr: function (newSelections) {
this._set("options", array.map(newSelections, function (item) {
return {
label: item.text, //The replaced line
value: item.value,
selected: (item.value == this.value) || (!item.value && !this.value)
};
}, this));
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment