[Logilogi-svn] SF.net SVN: logilogi:[1551] trunk/app
Status: Beta
Brought to you by:
wybow
|
From: <wy...@us...> - 2009-08-24 16:55:42
|
Revision: 1551
http://logilogi.svn.sourceforge.net/logilogi/?rev=1551&view=rev
Author: wybow
Date: 2009-08-24 16:55:26 +0000 (Mon, 24 Aug 2009)
Log Message:
-----------
Fixed bug with adding tag and layout in edit/new page in IE
Modified Paths:
--------------
trunk/app/controllers/logis_controller.rb
trunk/app/helpers/application_helper.rb
trunk/app/views/application/_errors.html.erb
trunk/app/views/application/_flash.html.erb
trunk/app/views/layouts/main.html.erb
trunk/app/views/logis/_edit_with_tags.html.erb
trunk/app/views/logis/_tag_list.html.erb
Modified: trunk/app/controllers/logis_controller.rb
===================================================================
--- trunk/app/controllers/logis_controller.rb 2009-08-22 14:08:41 UTC (rev 1550)
+++ trunk/app/controllers/logis_controller.rb 2009-08-24 16:55:26 UTC (rev 1551)
@@ -358,9 +358,9 @@
# Url-bars with context.
#
def navigation_bar
- if params[:action] == "new"
+ if params[:action] == "new" or params[:action] == "create"
render_body 'navigation_bar_new'
- elsif params[:action] == "edit"
+ elsif params[:action] == "edit" or params[:action] == "update"
render_body 'navigation_bar_edit'
elsif params[:action] == "show"
render_body 'navigation_bar_view'
Modified: trunk/app/helpers/application_helper.rb
===================================================================
--- trunk/app/helpers/application_helper.rb 2009-08-22 14:08:41 UTC (rev 1550)
+++ trunk/app/helpers/application_helper.rb 2009-08-24 16:55:26 UTC (rev 1551)
@@ -453,10 +453,13 @@
Logi::RESTRICTIONS[restriction]
end
- def show_flash(type = nil)
- if flash[:warning] or flash[:notice] or flash[:error] or (type and flash[type])
+ def show_flash(options = {})
+ if flash[:warning] or flash[:notice] or flash[:error] or (options[:type] and flash[options[:type]])
render :partial => 'application/flash',
- :locals => { :flash => flash, :type => type }
+ :locals => {
+ :flash => flash,
+ :type => options[:type],
+ :with_column_of_class => options[:with_column_of_class]}
end
end
@@ -481,6 +484,11 @@
end
def show_errors(*args)
+ if args[-1].is_a?(Hash)
+ options = args.pop
+ else
+ options = {}
+ end
error_object_name = nil
args.each do |object_name|
object = instance_variable_get("@#{object_name}")
@@ -491,7 +499,9 @@
end
if error_object_name
render :partial => 'application/errors',
- :locals => { :object_name => error_object_name }
+ :locals => {
+ :object_name => error_object_name,
+ :with_column_of_class => options[:with_column_of_class]}
end
end
Modified: trunk/app/views/application/_errors.html.erb
===================================================================
--- trunk/app/views/application/_errors.html.erb 2009-08-22 14:08:41 UTC (rev 1550)
+++ trunk/app/views/application/_errors.html.erb 2009-08-24 16:55:26 UTC (rev 1551)
@@ -1,3 +1,10 @@
+<% if local_assigns[:with_column_of_class] %>
+ <div class="<%= local_assigns[:with_column_of_class] %>">
+<% end %>
<% render :layout => 'application/panel', :locals => { :id => "errors" } do %>
<%= error_messages_for(object_name) %>
<% end %>
+<% if local_assigns[:with_column_of_class] %>
+ </div>
+ <div class="spacer"></div>
+<% end %>
Modified: trunk/app/views/application/_flash.html.erb
===================================================================
--- trunk/app/views/application/_flash.html.erb 2009-08-22 14:08:41 UTC (rev 1550)
+++ trunk/app/views/application/_flash.html.erb 2009-08-24 16:55:26 UTC (rev 1551)
@@ -1,3 +1,10 @@
+<% if local_assigns[:with_column_of_class] %>
+ <div class="<%= local_assigns[:with_column_of_class] %>">
+<% end %>
<% render :layout => 'application/panel', :locals => { :id => 'flash', :type => type } do %>
<%= display_standard_flashes %>
<% end %>
+<% if local_assigns[:with_column_of_class] %>
+ </div>
+ <div class="spacer"></div>
+<% end %>
Modified: trunk/app/views/layouts/main.html.erb
===================================================================
--- trunk/app/views/layouts/main.html.erb 2009-08-22 14:08:41 UTC (rev 1550)
+++ trunk/app/views/layouts/main.html.erb 2009-08-24 16:55:26 UTC (rev 1551)
@@ -4,7 +4,7 @@
<%= render :partial => 'layouts/title_bar' %>
<%= yield :top_body %>
- <%= show_flash('exposed') %>
+ <%= show_flash(:type => 'exposed') %>
<div class="main_column">
<%= yield %>
Modified: trunk/app/views/logis/_edit_with_tags.html.erb
===================================================================
--- trunk/app/views/logis/_edit_with_tags.html.erb 2009-08-22 14:08:41 UTC (rev 1550)
+++ trunk/app/views/logis/_edit_with_tags.html.erb 2009-08-24 16:55:26 UTC (rev 1551)
@@ -1,8 +1,5 @@
-<div class="main_column">
- <%= show_flash %>
- <%= show_errors 'logi_version','logi' %>
-</div>
-<div class="spacer"></div>
+<%= show_flash :with_column_of_class => 'main_column' %>
+<%= show_errors 'logi_version','logi', :with_column_of_class => 'main_column' %>
<div id="edit_tags_area">
<% if !@logi.untagged? or @selected == "edit_tags" %>
Modified: trunk/app/views/logis/_tag_list.html.erb
===================================================================
--- trunk/app/views/logis/_tag_list.html.erb 2009-08-22 14:08:41 UTC (rev 1550)
+++ trunk/app/views/logis/_tag_list.html.erb 2009-08-24 16:55:26 UTC (rev 1551)
@@ -1,6 +1,7 @@
<div id="<%= name %>" class="tags_container transparent_corner">
<!-- Filled via js -->
</div>
+<div class="spacer"></div>
<% if !local_assigns[:without_form] %>
<%= form_tag("#", :method => :put) %>
<% end %>
@@ -13,6 +14,6 @@
<%= end_form_tag() %>
<% end %>
<% javascript_tag do %>
- <%= name %> = new TagList('<%= name %>', '<%= url %>',
+ var <%= name %> = new TagList('<%= name %>', '<%= url %>',
'<%= param_name %>', '<%= Tag.replace.to_s %>');
<% end %>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|