Add fileStorage config to frontend

closes #2956

- adds fileStorage to config passed to ember, and then grabs it in the relevant places.
This commit is contained in:
Hannah Wolfe 2014-06-23 22:12:22 +01:00
parent 9d4b40fd81
commit a11fd67ec9
4 changed files with 4 additions and 3 deletions

View File

@ -22,7 +22,7 @@ var Markdown = Ember.Component.extend({
uploader.call(dropzones, {
editor: true,
filestorage: false
fileStorage: this.get('config.fileStorage')
});
dropzones.on('uploadstart', _.bind(this.sendAction, this, 'uploadStarted'));

View File

@ -6,8 +6,7 @@ var UploadModal = ModalDialog.extend({
didInsertElement: function () {
this._super();
var filestorage = $('#general').data('filestorage');
upload.call(this.$('.js-drop-zone'), {fileStorage: filestorage});
upload.call(this.$('.js-drop-zone'), {fileStorage: this.get('config.fileStorage')});
},
confirm: {
reject: {

View File

@ -6,6 +6,7 @@ var ConfigInitializer = {
application.inject('route', 'config', 'ghost:config');
application.inject('controller', 'config', 'ghost:config');
application.inject('component', 'config', 'ghost:config');
}
};

View File

@ -47,6 +47,7 @@ adminControllers = {
var userData,
// config we need on the frontend
frontConfig = {
fileStorage: config().fileStorage,
apps: config().apps
};