Skip to content

Instantly share code, notes, and snippets.

@mneuhaus
Created April 5, 2013 09:32
Show Gist options
  • Save mneuhaus/5317971 to your computer and use it in GitHub Desktop.
Save mneuhaus/5317971 to your computer and use it in GitHub Desktop.
T3.Content.UI.Editor.PluginView = T3.Content.UI.Editor.Selectbox.extend({
options: function() {
var that = this;
var options = [], currentValue = this.get('value');
var nodePath = T3.Content.Model.NodeSelection.get('selectedNode').get('nodePath');
$.get('/neos/content/pluginViews?node=' + nodePath, function(result) {
var views = JSON.parse(result);
for (var key in views) {
var view = views[key];
options.push(Ember.Object.create({value: key, label: view.label}));
}
that.$().trigger("liszt:updated");
});
return options;
}.property('values', 'value', 'placeholder', 'allowEmpty'),
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment