app/views/posts/new.html.haml in community_engine-2.0.0.beta3 vs app/views/posts/new.html.haml in community_engine-2.0.0

- old
+ new

@@ -2,13 +2,10 @@ -box :id => 'category_tips' do -if @post.category = render :partial => "categories/tips", :locals => {:category => @post.category} - else = render :partial => "categories/tips", :locals => {:category => nil} - - -box :class => "alt" do - %a.button.positive{:href => '#', :onclick => "tinyMCE.execCommand('mceCurblyAdvImage');return false;"}=:upload_an_image_for_your_post.l #yui-main .yui-b -box do %h3 @@ -38,10 +35,12 @@ %label =:tags.l %em="(#{:optional_keywords_describing_this_post_separated_by_commas.l})" = text_field_tag 'tag_list', @post.tag_list, {:autocomplete => "off", :size => 35} .auto_complete#tag_list_auto_complete + + -content_for :end_javascript do = auto_complete_field 'tag_list', {:url => { :controller => "tags", :action => 'auto_complete_for_tag_name'}, :tokens => [','] } %label %a{:href=> "#", :onclick => "$('poll-ui').toggle(); return false;"} = image_tag 'icons/poll.png' @@ -62,6 +61,7 @@ = submit_tag :save.l %p =:or.l = link_to :cancel_and_go_back_to_my_posts.l, user_posts_path(@user) - = observe_field "post_category_id", {:url => {:controller => 'categories', :action => 'show_tips'}, :with => "id", :update => "category_tips", :complete => visual_effect(:highlight, "category_tips", :duration => 0.5)} + -content_for :end_javascript do + = observe_field "post_category_id", {:url => {:controller => 'categories', :action => 'show_tips'}, :with => "id", :update => "category_tips", :complete => visual_effect(:highlight, "category_tips", :duration => 0.5)}