diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index d19474fca..82a4a6768 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -47,8 +47,10 @@ module ApplicationHelper def aspect_links aspects, opts={} str = "" - aspects.each do |a| - str << aspect_li(a, opts) + aspects.each do |aspect| + str << '
  • ' + str << link_for_aspect(aspect, :params => opts, 'data-guid' => aspect.id, :class => 'hard_aspect_link').html_safe + str << '
  • ' end str.html_safe end diff --git a/app/helpers/aspects_helper.rb b/app/helpers/aspects_helper.rb index 747041a69..fb72819bc 100644 --- a/app/helpers/aspects_helper.rb +++ b/app/helpers/aspects_helper.rb @@ -4,7 +4,10 @@ module AspectsHelper def link_for_aspect(aspect, opts={}) - link_to aspect.name, aspects_path("a_ids[]" => aspect.id), opts + opts[:params] ||= {} + opts[:params] = opts[:params].merge("a_ids[]" => aspect.id) + + link_to aspect.name, aspects_path( opts[:params] ), opts end def remove_link(aspect) diff --git a/app/views/shared/_publisher.haml b/app/views/shared/_publisher.haml index 2de6b9879..ecc9667e3 100644 --- a/app/views/shared/_publisher.haml +++ b/app/views/shared/_publisher.haml @@ -3,7 +3,7 @@ -# the COPYRIGHT file. -#publisher{:class => ("closed" unless params[:op])} +#publisher{:class => ("closed" unless params[:op] || params[:prefill])} #click_to_share = image_tag 'icons/doc_edit.png' diff --git a/public/javascripts/aspect-filters.js b/public/javascripts/aspect-filters.js index f81861b99..afc549ce8 100644 --- a/public/javascripts/aspect-filters.js +++ b/public/javascripts/aspect-filters.js @@ -111,8 +111,13 @@ $(document).ready(function(){ // fill in publisher // (not cached because this element changes) - $("#publisher textarea").val(post); + var textarea = $("#publisher textarea"); + + if( textarea.val() == "" ) { + textarea.val(post); + textarea.focus(); + } $('html, body').animate({scrollTop:0}, 'fast'); // reinit listeners on stream