Skip to content

Commit

Permalink
ui improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
ishmael committed Oct 25, 2010
1 parent b613062 commit b70e506
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 26 deletions.
18 changes: 11 additions & 7 deletions app/controllers/movements_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,17 @@ def show
add_breadcrumb @account.name,polymorphic_path([@account,:movements])
@movement = @account.movements.find_by_id(params[:id])
add_breadcrumb I18n.t('layout.movements.title'), polymorphic_path([@account,@movement])
if (not @movement.lng.blank?) and (not @movement.lat.blank?)
@map = GMap.new("map_show")
@map.control_init
@map.interface_init(:scroll_wheel_zoom => true,:double_click_zoom=> false,:set_ui_to_default => true)
@map.center_zoom_init([@movement.lat, @movement.lng],14)
@map.overlay_init(GMarker.new([@movement.lat, @movement.lng]))
end
@map = GMap.new("map_show")
@map.control_init(:local_search => true)
@map.interface_init(:scroll_wheel_zoom => true,:double_click_zoom=> false,:set_ui_to_default => true)
if (not @movement.lng.blank?) and (not @movement.lat.blank?)
@map.center_zoom_init([@movement.lat, @movement.lng], 16)
@marker = GMarker.new([@movement.lat, @movement.lng])
@map.declare_init(@marker, 'mymarker')
@map.overlay_init(@marker)
else
@map.center_zoom_init([38.134557,-95.537109],8)
end

respond_to do |format|
format.html # show.html.erb
Expand Down
4 changes: 2 additions & 2 deletions app/views/movements/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<div class="header cr-top">
<h3><%= I18n.t('layout.movements.map') %></h3>
</div>
<div class="basic cr-bottom" style="padding:5px 0;">
<%= @map.div(:width => 475, :height => 400) %>
<div class="basic cr-bottom" >
<%= @map.div(:width => 490, :height => 400, :class => 'cr-all') %>
</div>
</div>
4 changes: 2 additions & 2 deletions app/views/movements/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<div class="header cr-top">
<h3><%= I18n.t('layout.movements.map') %></h3>
</div>
<div class="basic cr-bottom" style="padding:5px 0;">
<%= @map.div(:width => 475, :height => 400) %>
<div class="basic cr-bottom" >
<%= @map.div(:width => 490, :height => 400, :class => 'cr-all') %>
</div>
</div>
10 changes: 5 additions & 5 deletions app/views/movements/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<% content_for :javascript_bottom do %>
<% content_for :javascript_includes do %>
<% if (not @movement.lng.blank?) and (not @movement.lat.blank?) %>
<%= GMap.header %>
<%= GMap.header(:local_search => true) %>
<%= @map.to_html %>
<% end%>
<% end %>
Expand All @@ -27,12 +27,12 @@
</div>
</div>
<% if (not @movement.lng.blank?) and (not @movement.lat.blank?) %>
<div class="box box-50 cr-all box-last"><!-- .altbox for alternative box's color -->
<div class="box box-50 cr-all box-last">
<div class="header cr-top">
<h3><%= I18n.t('layout.movements.map') %></h3>
</div>
<div class="content cr-bottom">
<%= @map.div(:width => 988, :height => 400) %>
<div class="basic cr-bottom" >
<%= @map.div(:width => 490, :height => 400, :class => 'cr-all') %>
</div>
</div>
<% end %>
2 changes: 1 addition & 1 deletion app/views/users/_form.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
<dd><%= form.password_field :password_confirmation , :class => 'txt' %></dd><dt><%= form.label :email%></dt>
<dd><%= form.text_field :email , :class => 'txt'%></dd>
<dt><%= form.label :locale,I18n.t('layout.users.locale') %></dt>
<dd><div id="locale_container"></div><%= form.select(:locale, [['Portugues', 'pt'], ['English', 'en']],{},{:id => "user_locale"}) %></dd>
<dd><div id="locale_container"></div><%= form.select(:locale, [['Portugu&#x00EA;s', 'pt'], ['English', 'en']],{},{:id => "user_locale"}) %></dd>
2 changes: 1 addition & 1 deletion app/views/users/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</ul>
</div>
<% form_for @user, :html => { :class => "basic register"}, :url => account_path do |f| %>
<div class="basic cr-bottom">
<div id="users_div" class="basic cr-bottom">
<% if not f.error_messages.blank? %>
<div class="msg msg-error">
<%= f.error_messages :header_message => nil, :message => nil %>
Expand Down
18 changes: 10 additions & 8 deletions public/stylesheets/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ STRUCTURE */
border-bottom-style:none;
width: 400px;
}

/*
#map_show {
margin:5px;
margin:0px;
}

*
/*
CORNERS
* -moz-border-radius-topleft / -webkit-border-top-left-radius
Expand Down Expand Up @@ -444,7 +444,7 @@ a.yuimenuitemlabel {
div.basic {margin:0;background-color:#FFF;}
div.basic dl {width: 100%; overflow: hidden;padding-top:7px;padding-bottom:10px; } /* basic layout for forms */
div.basic dl dt,
div.basic dl dd {float: left;margin-left: 6px;}
div.basic dl dd {display:inline-block; margin-left: 6px;}
div.basic dl dt {padding: 3px 5px 3px 0; width: 20%;}
div.basic dl dd {padding: 3px 0 3px 5px; width: 70%;}
div.basic dl dd.submit { padding: 3px 0px 0px 0px; width: 100%;height:30px ; margin-left:0px}
Expand All @@ -456,9 +456,9 @@ form.plain fieldset {border: 0 !important; padding: 0 !important;}
/*form.basic div.basic {padding-bottom:10px;}*/
form.basic dl {width: 100%; overflow: hidden;} /* basic layout for forms */
form.basic dl dt,
form.basic dl dd {float: left;}
form.basic dl dt {padding: 3px 5px 3px 0; width: 20%;}
form.basic dl dd {padding: 3px 0 3px 5px; width: 76%;}
form.basic dl dd {display:block;}
form.basic dl dt {padding: 3px 5px 3px 0; width: auto;}
form.basic dl dd {padding: 3px 15px 3px 5px; width: auto;}
form.basic dl dd.submit {padding: 3px 0px 0px 0px; width: 100%;margin-left:0px;}
/*form.basic dl dd.submit div {float:right;}*/
form small {color: #999;}
Expand Down Expand Up @@ -576,10 +576,11 @@ input.phosney-header-button {
display:inline-block;
vertical-align:top;
}
/*
#search {
margin:0 !important;
}

*/
#search dl {
padding-bottom:0px !important;
}
Expand All @@ -590,6 +591,7 @@ input.phosney-header-button {
}
#search dl dd {
width:100%;
display:block !important;
}
.search_form {
padding:0 0 0 0px !important;
Expand Down

0 comments on commit b70e506

Please sign in to comment.