diff --git a/app/views/layouts/application.mobile.haml b/app/views/layouts/application.mobile.haml index 78612d4bb..275877e7f 100644 --- a/app/views/layouts/application.mobile.haml +++ b/app/views/layouts/application.mobile.haml @@ -48,7 +48,10 @@ %header = link_to(image_tag('white@2x.png', :height => 20, :width => 127, :id => 'header_title'), aspects_path) - if user_signed_in? - = link_to(image_tag('icons/compose_mobile2.png', :height => 28, :width => 28), new_status_message_path, :class => 'compose_icon') + - if yield(:header_action).present? + = yield(:header_action) + - else + = link_to(image_tag('icons/compose_mobile2.png', :height => 28, :width => 28), new_status_message_path, :class => 'compose_icon') #main{:role => "main"} = yield diff --git a/app/views/shared/_publisher.mobile.haml b/app/views/shared/_publisher.mobile.haml index 584fe81ea..827191a97 100644 --- a/app/views/shared/_publisher.mobile.haml +++ b/app/views/shared/_publisher.mobile.haml @@ -8,16 +8,15 @@ background-color: #eee; } +- content_for :header_action do + = submit_tag t('.share'), :class => 'action', :id => "submit_new_message" = form_for StatusMessage.new, {:data => {:ajax => false}} do |status| #message_container = status.text_area :text, :placeholder => t('.whats_on_your_mind'), :style => "width:300px", :rows => 4, :autofocus => "autofocus" %fieldset - %div{:style => 'float:right;'} - = status.submit t('.share'), :class => 'action' - - %select{:id => "aspect_ids_", :name => "aspect_ids[]"} + %select{:id => "aspect_ids_", :name => "aspect_ids[]", :style => "float:right;"} %option{:value => 'public'} = t('public') @@ -28,12 +27,4 @@ %option{:value => aspect.id} = "ยท #{aspect.name}" - /- unless current_user.services.empty? - / %div{:data => {:role => 'fieldcontain'}} - / %label{:for => 'services', :class => 'select'} - / - current_user.services.each do |service| - / %input{:type => 'checkbox', :name => "services[]", :id => "#{service.provider}", :class => 'custom', :value => "#{service.provider}"} - / %label{:for => "#{service.provider}"} - / = "#{service.provider}" - diff --git a/public/images/icons/arrow_up_small.png b/public/images/icons/arrow_up_small.png new file mode 100644 index 000000000..970a8e596 Binary files /dev/null and b/public/images/icons/arrow_up_small.png differ diff --git a/public/javascripts/mobile.js b/public/javascripts/mobile.js index cc653f31e..ca16b9018 100644 --- a/public/javascripts/mobile.js +++ b/public/javascripts/mobile.js @@ -188,4 +188,9 @@ $(document).ready(function(){ }, 'html'); }); + $("#submit_new_message").bind("tap click", function(evt){ + evt.preventDefault(); + $("#new_status_message").submit(); + }); + }); diff --git a/public/stylesheets/sass/mobile.scss b/public/stylesheets/sass/mobile.scss index c8dc0ebfd..9556c698a 100644 --- a/public/stylesheets/sass/mobile.scss +++ b/public/stylesheets/sass/mobile.scss @@ -15,7 +15,7 @@ a { body { background: #555555; max-width: 100%; - margin-top: 55px; + margin-top: 45px; } .message { @@ -28,6 +28,7 @@ body { } .stream { + display: inline-block; text-align: left; max-width: 700px; } @@ -222,7 +223,6 @@ body { #author_info.profile { box-shadow: inset 0 -1px 3px #111; - margin-top: -10px; text-align: left; h2 { @@ -299,6 +299,7 @@ footer { > a, .show_comments { + @include transition(color); color: #999; font-weight: bold; } @@ -363,7 +364,6 @@ footer { } } } - } .floater { @@ -441,10 +441,11 @@ footer { } #message_container { + @include box-shadow(0, 2px, 3px, #999); background-color: #fff; padding: 5px; border: { - bottom: 1px solid #ccc; + bottom: 1px solid #999; } } @@ -543,3 +544,18 @@ select { right: 10px; line-height: 16px; } + +header { + input { + position: absolute; + top: 8px; + right: 15px; + padding: 5px !important; + min-width: 75px !important; + border: 1px solid #444 !important; + } +} + +.new_status_message { + min-height: 300px; +}