add composing mobile classes if composing on mobile

This commit is contained in:
psychobunny
2015-03-11 13:22:41 -04:00
parent 7282bbafb2
commit 7227dfd704
2 changed files with 3 additions and 4 deletions

View File

@@ -254,9 +254,9 @@ define('composer', [
isGuestPost = composer.posts[post_uuid] ? parseInt(composer.posts[post_uuid].uid, 10) === 0 : null;
composer.bsEnvironment = utils.findBootstrapEnvironment();
var data = {
mobile: template === (composer.bsEnvironment === 'xs' || composer.bsEnvironment === 'sm'),
mobile: composer.bsEnvironment === 'xs' || composer.bsEnvironment === 'sm',
allowTopicsThumbnail: allowTopicsThumbnail,
showTags: isTopic || isMain,
minimumTagLength: config.minimumTagLength,

View File

@@ -34,8 +34,7 @@ define('composer/resize', function() {
// todo, lump in browsers that don't support transform (ie8) here
// at this point we should use modernizr
if (env === 'sm' || env === 'xs' || window.innerHeight < 480) {
app.toggleNavbar(false);
postContainer.find('textarea').css('height', $(window).height());
$('html').addClass('composing mobile');
}
if (config.hasImageUploadPlugin) {