From 7d662fcc928c79c1965941dfef2925e1348b8b20 Mon Sep 17 00:00:00 2001 From: danielgrippi Date: Tue, 27 Sep 2011 21:08:52 -0700 Subject: [PATCH] move share button to top right corner --- app/views/layouts/application.mobile.haml | 5 ++++- app/views/shared/_publisher.mobile.haml | 15 +++----------- public/images/icons/arrow_up_small.png | Bin 0 -> 460 bytes public/javascripts/mobile.js | 5 +++++ public/stylesheets/sass/mobile.scss | 24 ++++++++++++++++++---- 5 files changed, 32 insertions(+), 17 deletions(-) create mode 100644 public/images/icons/arrow_up_small.png 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 0000000000000000000000000000000000000000..970a8e5969ecd9fc7411e789f5063421bda73dfe GIT binary patch literal 460 zcmV;-0WsPOu{r>ZZ;r+XJr!8%5 z5`f~nK$1)#;>(vW4aW{0zIf^4MKcag&cDLKLcgCpek{3r`;Kiu(|h3xuUx(?4wMiO z77_XD>FX2c?C!3sqN@7n}8$W&iByMACo58`wH3ujrWnyCTj0x%y zkitr!n~pqu_)zM@`wz^!w(pqz=GCi(K=E&ItM~8TQwH=<+PAOYST(dXZt-yQe7tz^ zqUqs-hvGy;L^yyZhJzKpdi9Ep6$p$?O%AB2tAzrE-UtZ`cO5%=wDj4tXY6njEvzi> z%F4;LGchx_0=Zv7VuB*VW#0aN4{lw*ZUo{31Q-DPzL%FF>~1Uo0000 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; +}