From 70058c9ebeac457590cc92a4419388bb9c851f4c Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Wed, 20 Feb 2013 16:03:46 +1100 Subject: [PATCH] live reload bug minor sanity check for phone --- app/assets/javascripts/discourse.js.coffee | 4 +-- .../stylesheets/application/mobile.scss | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 app/assets/stylesheets/application/mobile.scss diff --git a/app/assets/javascripts/discourse.js.coffee b/app/assets/javascripts/discourse.js.coffee index fa184897f88..3794d1dd48b 100644 --- a/app/assets/javascripts/discourse.js.coffee +++ b/app/assets/javascripts/discourse.js.coffee @@ -195,12 +195,10 @@ window.Discourse = Ember.Application.createWithMixins window.probes.clear() - Ember.View.prototype.renderToBuffer = window.probes.measure Ember.View.prototype.renderToBuffer, "renderToBuffer" Discourse.routeTo = topLevel(Discourse.routeTo, "Discourse.routeTo") Ember.run.end = topLevel(Ember.run.end, "Ember.run.end") - return authenticationComplete: (options)-> @@ -239,7 +237,7 @@ window.Discourse = Ember.Application.createWithMixins # possibly move this to dev only Discourse.MessageBus.subscribe "/file-change", (data)-> - Ember.TEMPLATES["empty"] = Handlebars.compile("") + Ember.TEMPLATES["empty"] = Handlebars.compile("
") data.each (me)-> if me == "refresh" document.location.reload(true) diff --git a/app/assets/stylesheets/application/mobile.scss b/app/assets/stylesheets/application/mobile.scss new file mode 100644 index 00000000000..cc32d09e595 --- /dev/null +++ b/app/assets/stylesheets/application/mobile.scss @@ -0,0 +1,25 @@ +@media only screen +and (min-width : 320px) +and (max-width : 480px) { +// and (min-device-width : 320px) +// and (max-device-width : 480px) { + #reply-control { + .toggle-preview { display:none; } + #reply-title { width: 250px; } + .wmd-controls { + #wmd-input { + width: 100%; + border-top: 0; + } + .preview-wrapper { + display: none; + } + .textarea-wrapper { + width: 100%; + } + .wmd-button-bar { + display: none; + } + } + } +}