From ce734fae7e8d8645ffe2ae47de7c286f635e6beb Mon Sep 17 00:00:00 2001 From: Matchu Date: Wed, 2 Apr 2014 19:03:17 -0500 Subject: [PATCH] advanced search behaves toggle-like in that the link stays in place, and OMG pagination on the right is sooo much better! --- app/assets/stylesheets/outfits/_edit.sass | 25 +++++++++++++++-------- app/views/outfits/edit.html.haml | 2 +- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/app/assets/stylesheets/outfits/_edit.sass b/app/assets/stylesheets/outfits/_edit.sass index 60bfc7c2..c83db930 100644 --- a/app/assets/stylesheets/outfits/_edit.sass +++ b/app/assets/stylesheets/outfits/_edit.sass @@ -261,23 +261,28 @@ body.outfits-edit #preview-search-advanced display: block #preview-search-basic > ul + clear: both .object min-height: 150px #preview-search-advanced display: none - margin-left: 2em + + h2 + margin-right: 2em button - margin-right: 2em + margin-right: 4em #preview-search-basic-link font-size: 85% div +inline-block + box-sizing: border-box font-size: 87.5% - margin-top: .5em - margin-bottom: 1.5em + padding-top: .5em + /* search results height, to prevent header bouncing */ + min-height: 178px vertical-align: top width: 32% @@ -295,6 +300,9 @@ body.outfits-edit list-style: none margin-left: -24px + div:first-child + margin-left: 2em + #preview-search-advanced-link font-size: 85% margin-right: 1em @@ -304,14 +312,15 @@ body.outfits-edit margin-right: 1em #preview-search-form-pagination +inline-block + float: right + margin-top: .5em a, span margin: 0 .25em .current font-weight: bold #preview-search-form-clear display: none - font-size: 87.5% - margin-left: 2em + font-size: 85% #preview-search-form-loading display: none font: @@ -352,11 +361,11 @@ body.outfits-edit bottom: 1.5em left: 0 overflow: auto - padding: 1em 2em + padding: 1em 0 position: absolute width: 100% - &.has-results + &.has-results, &.advanced padding-bottom: 0 #footer bottom: 0 diff --git a/app/views/outfits/edit.html.haml b/app/views/outfits/edit.html.haml index 707e4fe3..94f6d660 100644 --- a/app/views/outfits/edit.html.haml +++ b/app/views/outfits/edit.html.haml @@ -106,8 +106,8 @@ %input{:type => "submit", :value => t('.search.form.submit')}/ -# TODO: i18n %a#preview-search-advanced-link{href: 'javascript:void(0)'} Advanced Search - #preview-search-form-pagination %a#preview-search-form-clear{:href => "#"}= t '.search.form.clear' + #preview-search-form-pagination #preview-search-form-loading= t '.search.loading' #preview-search-form-error.possible-error #preview-search-form-no-results