aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGareth Rees <gareth@mysociety.org>2014-10-29 16:43:37 +0000
committerGareth Rees <gareth@mysociety.org>2014-10-30 15:45:47 +0000
commit8a21f27ed7d0377f373a6ff1afe7195a4e1fe069 (patch)
tree1693e4daba22477420ece4227e7000ba13b3af13
parent331ed724fb2f989510af6766a11e9ad2eac2fcf0 (diff)
Remove authority preview from /select_authority
Clicking a search result now takes the user directly to the authority show page. Removes the step numbers from the headers as the show page interrupts the flow and seems pointless to add workarounds in public_body/show just for this.
-rw-r--r--app/assets/stylesheets/main.scss21
-rw-r--r--app/assets/stylesheets/responsive/_new_request_layout.scss40
-rw-r--r--app/views/public_body/_search_ahead.html.erb3
-rw-r--r--app/views/request/new.html.erb2
-rw-r--r--app/views/request/select_authority.html.erb29
5 files changed, 7 insertions, 88 deletions
diff --git a/app/assets/stylesheets/main.scss b/app/assets/stylesheets/main.scss
index 8aa8010ae..183daa59b 100644
--- a/app/assets/stylesheets/main.scss
+++ b/app/assets/stylesheets/main.scss
@@ -586,20 +586,6 @@ width:40%;
width:26em;
}
-#authority_preview {
-width:45%;
-float:right;
-background-color:#FFFFE0;
-padding-left:1em;
-padding-right:1em;
-overflow:hidden;
-margin-top:-67px;
-}
-
-#authority_preview #header_left,#authority_preview.request_left,#authority_preview #stepwise_make_request {
-width:95%;
-}
-
#request_advice {
float:right;
width:250px;
@@ -1717,16 +1703,11 @@ width:575px;
padding-right:50px;
}
-#authority_preview .request_left,
-#authority_preview #header_left {
- width: 100%;
-}
-
#request_sidebar h2,.list-filter-item {
margin-bottom:10px;
}
-div.ff-icon-printfix,.comment_in_request_text img.comment_quote,body.front #other-country-notice,#other-country-notice,#authority_preview .public-body-name-prefix,#authority_preview #list-filter,#authority_preview h2.foi_results,div#show_response_view p.event_actions, div.batch_public_body_toggle {
+div.ff-icon-printfix,.comment_in_request_text img.comment_quote,body.front #other-country-notice,#other-country-notice,div#show_response_view p.event_actions, div.batch_public_body_toggle {
display:none;
}
diff --git a/app/assets/stylesheets/responsive/_new_request_layout.scss b/app/assets/stylesheets/responsive/_new_request_layout.scss
index aba4ffc29..5e8a4fa22 100644
--- a/app/assets/stylesheets/responsive/_new_request_layout.scss
+++ b/app/assets/stylesheets/responsive/_new_request_layout.scss
@@ -18,46 +18,6 @@
@include grid-row($behavior: nest);
}
-#authority_preview {
- @include grid-column(12);
- @include respond-min( $main_menu-mobile_menu_cutoff ){
- @include grid-column(6);
- margin-top:-67px;
- @include ie8{
- padding-right: 0.9375em;
- }
- @include lte-ie7 {
- width: 26.188em;
- }
- /* Don't nest public body grid row in this context */
- #public_body_show {
- @include grid-row();
- }
-
- }
-
- /* Hide some elements of the public body that aren't appropriate in this
- context */
- #list-filter, h2.foi_results, .public-body-name-prefix {
- display: none;
- }
-
- /* Compact request list for viewing in authority preview column */
- .request_left, #header_left {
- @include grid-column(12, $collapse: true);
- }
-
- .request_right {
- @include grid-column(12, $collapse: true);
- }
-
- span.desc {
- background:none;
- line-height:18px;
- padding: 0;
- }
-
-}
/* /new/[body_name] page */
#request_header {
@include grid-row;
diff --git a/app/views/public_body/_search_ahead.html.erb b/app/views/public_body/_search_ahead.html.erb
index 2de638034..ca942324e 100644
--- a/app/views/public_body/_search_ahead.html.erb
+++ b/app/views/public_body/_search_ahead.html.erb
@@ -2,9 +2,6 @@
<% if !@xapian_requests.nil? %>
<% if @xapian_requests.results.size > 0 %>
<h3><%= _('Top search results:') %></h3>
- <p>
- <%= _('Select one to see more information about the authority.')%>
- </p>
<% else %>
<h3><%= _('No results found.') %></h3>
<% end %>
diff --git a/app/views/request/new.html.erb b/app/views/request/new.html.erb
index 7f1332464..79b4f8548 100644
--- a/app/views/request/new.html.erb
+++ b/app/views/request/new.html.erb
@@ -22,7 +22,7 @@
<% else %>
<% @title = _("Make an {{law_used_short}} request to '{{public_body_name}}'",:law_used_short=>h(@info_request.law_used_short),:public_body_name=>h(@info_request.public_body.name)) %>
<% end %>
- <h1><%= _('2. Ask for Information') %></h1>
+ <h1><%= _('Ask for Information') %></h1>
<% if @existing_request %>
<div class="errorExplanation" id="errorExplanation"><ul>
diff --git a/app/views/request/select_authority.html.erb b/app/views/request/select_authority.html.erb
index ed072cf64..462a8c8ce 100644
--- a/app/views/request/select_authority.html.erb
+++ b/app/views/request/select_authority.html.erb
@@ -1,33 +1,18 @@
<script type="text/javascript">
- $(document).ready(function(){
- $("#authority_preview").hide();
-
- // Avoid triggering too often (on each keystroke) by using the debounce jQuery plugin:
+ $(document).ready(function() {
+ // Avoid triggering too often (on each keystroke) by using the debounce
+ // jQuery plugin:
// http://benalman.com/projects/jquery-throttle-debounce-plugin/
$("#query").keypress($.debounce( 300, function() {
// Do a type ahead search and display results
- $("#typeahead_response").load("<%=search_ahead_bodies_url%>?query="+encodeURI(this.value), function() {
- $("#authority_preview").hide(); // Hide the preview, since results have changed
-
- });
+ $("#typeahead_response").load("<%= search_ahead_bodies_url %>?query="+encodeURI(this.value));
}));
- // We're using the existing body list: we intercept the clicks on the titles to
- // display a preview on the right hand side of the screen
- $("#typeahead_response .head a").live('click', function() {
- $("#authority_preview").load(this.href+" #public_body_show", function() {
- $("#authority_preview").show();
- $(window).scrollTop($("#banner").height());
- $("#authority_preview #header_right").hide();
- location.hash = '#header_left';
- });
- return false;
- });
});
</script>
<% @title = _("Select the authority to write to") %>
- <h1 style="clear: left"><%= _('1. Select an authority') %></h1>
+ <h1 style="clear: left"><%= _('Select an authority') %></h1>
<div id="authority_selection">
<%= form_tag({:controller => "request", :action => "select_authority"}, {:id => "search_form", :method => "get"}) do %>
@@ -54,7 +39,3 @@
<%= render :partial => 'public_body/search_ahead' %>
</div>
</div>
-
- <div id="authority_preview">
- </div>
-