Created
December 21, 2015 07:07
-
-
Save kimgunnarsson/02ac86909a95cbb99b82 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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