move share button to top right corner

This commit is contained in:
danielgrippi 2011-09-27 21:08:52 -07:00
parent f34f0ce5fb
commit 7d662fcc92
5 changed files with 32 additions and 17 deletions

View file

@ -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

View file

@ -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}"

Binary file not shown.

After

Width:  |  Height:  |  Size: 460 B

View file

@ -188,4 +188,9 @@ $(document).ready(function(){
}, 'html');
});
$("#submit_new_message").bind("tap click", function(evt){
evt.preventDefault();
$("#new_status_message").submit();
});
});

View file

@ -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;
}