Support customizing the composer below the textarea

This commit is contained in:
Robin Ward 2015-01-16 12:52:16 -05:00
parent 24b282e5e9
commit 37d73ec488
2 changed files with 8 additions and 0 deletions

View File

@ -101,6 +101,7 @@ so I'm going to stop rendering it until we figure out what's up
{{#if currentUser}}
<div class='submit-panel'>
{{plugin-outlet "composer-fields-below"}}
<button {{action "save"}} tabindex="5" {{bind-attr class=":btn :btn-primary :create disableSubmit:disabled"}} title="{{i18n 'composer.title'}}">{{{model.saveIcon}}}{{model.saveText}}</button>
<a href='#' {{action "cancel"}} class='cancel' tabindex="6">{{i18n 'cancel'}}</a>
</div>

View File

@ -73,6 +73,13 @@ var ComposerView = Discourse.View.extend(Ember.Evented, {
if (pos) {
self.$('.wmd-controls').css('top', $fields.height() + pos.top + 5);
}
// get the submit panel height
pos = self.$('.submit-panel').position();
if (pos) {
self.$('.wmd-controls').css('bottom', h - pos.top + 7);
}
});
}.observes('model.composeState', 'model.action'),