FIX: layout problems in composer on mobile

This commit is contained in:
Neil Lalonde 2014-05-26 10:53:05 -04:00
parent b676c51b4a
commit 96ed5e0e54
3 changed files with 22 additions and 21 deletions

View File

@ -64,17 +64,19 @@
<div id='wmd-preview' {{bind-attr class="hidePreview:hidden"}}></div> <div id='wmd-preview' {{bind-attr class="hidePreview:hidden"}}></div>
</div> </div>
{{#if currentUser}} {{#if currentUser}}
<a href="#" {{action togglePreview}} class='toggle-preview'>{{{model.toggleText}}}</a> <div class="composer-bottom-right">
<div id='draft-status'></div> <a href="#" {{action togglePreview}} class='toggle-preview'>{{{model.toggleText}}}</a>
{{#if view.isUploading}} {{#if view.isUploading}}
<div id="file-uploading"> <div id="file-uploading">
{{i18n upload_selector.uploading}} {{view.uploadProgress}}% <a id="cancel-file-upload">{{i18n cancel}}</a> {{i18n upload_selector.uploading}} {{view.uploadProgress}}% <a id="cancel-file-upload">{{i18n cancel}}</a>
</div> </div>
{{else}} {{else}}
{{#if Discourse.Mobile.mobileView}} {{#if Discourse.Mobile.mobileView}}
<a {{action showUploadSelector view}} class='mobile-file-upload'>{{i18n upload}}</a> <a {{action showUploadSelector view}} class='mobile-file-upload'>{{i18n upload}}</a>
{{/if}}
{{/if}} {{/if}}
{{/if}} <div id='draft-status'></div>
</div>
{{/if}} {{/if}}
</div> </div>

View File

@ -15,9 +15,6 @@ and (max-device-width : 540px) {
.textarea-wrapper { .textarea-wrapper {
width: 100%; width: 100%;
} }
.wmd-button-bar {
display: none;
}
} }
} }
} }

View File

@ -16,13 +16,20 @@ display: none;
#reply-control { #reply-control {
.toggle-preview, #draft-status, #file-uploading, .mobile-file-upload { .composer-bottom-right {
position: absolute; position: absolute;
bottom: -37px; bottom: -37px;
right: 5px;
margin-top: 0; margin-top: 0;
} }
.toggle-preview, .mobile-file-upload { .toggle-preview, .mobile-file-upload {
right: 5px; text-decoration: underline;
}
.toggle-preview, #draft-status, #file-uploading, .mobile-file-upload {
float: right;
margin-right: 8px;
}
.toggle-preview, .mobile-file-upload {
text-decoration: underline; text-decoration: underline;
} }
#file-uploading { #file-uploading {
@ -31,7 +38,6 @@ display: none;
color: scale-color($secondary, $lightness: 50%); color: scale-color($secondary, $lightness: 50%);
} }
#draft-status { #draft-status {
right: 70px;
color: scale-color($primary, $lightness: 75%); color: scale-color($primary, $lightness: 75%);
&.flash { &.flash {
color: $danger; color: $danger;
@ -354,10 +360,6 @@ display: none;
} }
} }
#wmd-button-bar { #wmd-button-bar {
top: 0; display: none;
position: absolute;
border-bottom: 1px solid scale-color-diff();
background-color: $secondary;
z-index: 100;
} }
} }