Created
April 5, 2013 09:32
-
-
Save mneuhaus/5317971 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
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