From 15b53b4703afdf21199f8e46e8900b72057b404d Mon Sep 17 00:00:00 2001 From: Rufus Pollock Date: Thu, 4 Oct 2012 07:26:57 +0100 Subject: [PATCH] [demos/search][s]: minor refactoring of facets in sidebar and styling. --- demos/search/app.js | 19 +++++++++++++------ demos/search/index.html | 13 +++++++++++-- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/demos/search/app.js b/demos/search/app.js index 4e25c8b2..1a9929ea 100644 --- a/demos/search/app.js +++ b/demos/search/app.js @@ -18,9 +18,10 @@ var createSearch = function(dataset, state) { {{#records}} \
\

\ - {{title}} \ + {{title}} by {{Author}} \

\ -

{{description}} \ +

{{description}}

\ +

${{price}}

\
\ {{/records}} \ '; @@ -36,7 +37,7 @@ var createSearch = function(dataset, state) { }, {silent: true} ); - dataset.queryState.addFacet('author'); + dataset.queryState.addFacet('Author'); dataset.query(); } @@ -97,15 +98,21 @@ var SearchView = Backbone.View.extend({ var simpleData = [ { title: 'War and Peace', - description: 'The epic tale ...', - author: 'Tolstoy', + description: 'The epic tale of love, war and history', + Author: 'Tolstoy', price: 7.99 }, { title: 'Anna Karenina', description: 'How things go wrong in love and ultimately lead to suicide. This is why you should not have affairs, girls!', - author: 'Tolstoy', + Author: 'Tolstoy', price: 8.50 + }, + { + title: "Fathers and Sons", + description: "Another 19th century Russian novel", + Author: "Turgenev", + price: 11 } ]; diff --git a/demos/search/index.html b/demos/search/index.html index 25de448b..e7fc1138 100644 --- a/demos/search/index.html +++ b/demos/search/index.html @@ -57,12 +57,21 @@ root: ../../ } .results { - margin-right: 300px; + margin-right: 290px; + border-right: #eee 1px solid; + padding-right: 20px; } .sidebar { - width: 250px; + height: 100%; + width: 270px; float: right; + padding-left: 10px; +} + +ul.facet-items { + list-style-type: none; + margin-left: 0; }