Browse Source

Updating openAssetManager function in PropertyFileView to utilize open-assets command

pull/213/head
Steven Gonzalez 9 years ago
parent
commit
b583ec89ae
  1. 13
      src/style_manager/view/PropertyFileView.js

13
src/style_manager/view/PropertyFileView.js

@ -120,15 +120,20 @@ module.exports = PropertyView.extend({
* */ * */
openAssetManager(e) { openAssetManager(e) {
var that = this; var that = this;
if(this.modal && this.am){ var em = this.em;
var editor = em ? em.get('Editor') : '';
if(editor) {
this.modal.setTitle('Select image'); this.modal.setTitle('Select image');
this.modal.setContent(this.am.render()); this.modal.setContent(this.am.render());
this.am.setTarget(null); this.am.setTarget(null);
this.modal.open(); editor.runCommand('open-assets', {
this.am.onSelect(model => { target: this.model,
onSelect(target) {
that.modal.close(); that.modal.close();
that.spreadUrl(model.get('src')); that.spreadUrl(target.get('src'));
that.valueChanged(e); that.valueChanged(e);
}
}); });
} }
}, },

Loading…
Cancel
Save