Skip to content
Browse files

Formatted the result view a little bit.

  • Loading branch information...
1 parent 8110087 commit e23b333054c9b6081531060b41a2c574aa8f52a1 @ottok ottok committed Mar 20, 2012
Showing with 34 additions and 23 deletions.
  1. +12 −14 index.html
  2. +3 −1 js/libs/facetview.css
  3. +11 −4 js/libs/jquery.facetview.js
  4. +8 −4 less/style.less
View
26 index.html
@@ -42,27 +42,25 @@
<div class="container">
- <!-- Main hero unit for a primary marketing message or call to action -->
- <div class="row-fluid">
+ <!-- Main hero unit for a primary marketing message or call to action -->
+ <div class="row-fluid">
<div class="span3">[logo?]</div>
<div class="span9">
- <h1>Find your library!</h1>
- <p>Enter the name of the library or the service you need. Enter city name or zip-code to find the closest libraries.</p>
+ <h1>Find your library!</h1>
+ <p>Enter the name of the library or the service you need. Enter city name or zip-code to find the closest libraries.</p>
</div>
- </div>
-
- <!-- consult README.rst from Facetview on how to configure -->
- <div class="facet-view-simple"></div>
-
- </div>
+ </div>
- <hr>
+ <!-- consult README.rst from Facetview on how to configure -->
+ <div class="facet-view-simple"></div>
- <footer>
- <p>&copy; Seravo Oy 2012. <a href="http://opendefinition.org/">Openly Licensed</a>. Get the <a href="https://github.com/Seravo/Library-Directory">source</a>.</p>
- </footer>
+ <hr>
+ <footer>
+ <p>&copy; Seravo Oy 2012. <a href="http://opendefinition.org/">Openly Licensed</a>. Get the <a href="https://github.com/Seravo/Library-Directory">source</a>.</p>
+ </footer>
</div> <!-- /container -->
+
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/libs/jquery-1.7.1.min.js"><\/script>')</script>
View
4 js/libs/facetview.css
@@ -65,4 +65,6 @@
text-decoration:none;
margin:0 5px 0 5px;
}
-
+.result-data {
+ margin-left: 122px;
+}
View
15 js/libs/jquery.facetview.js
@@ -121,10 +121,15 @@
// library-directory search result display-template
var search_results = [
- [ { "field": "contact.homepage_fi", "format": "<i class='icon-home'></i><a href='{{data}}'>" }, { "field": "name_fi", "format": "{{data}}</a>" } ],
- [ { "field": "description_fi" } ],
- [ { "field": "contact.email", "format": "Email: <a href='mailto:{{data}}'>{{data}}</a>" } ]
+ [ { "field": "name_fi", "format": "<big>{{data}}</big>" } ],
+ [ { "field": "contact.street_address.street_fi", "format": "{{data}}," }, { "field": "contact.street_address.post_code", "format": "{{data}}" }, { "field": "contact.street_address.muncipality_fi", "format": "{{data}}" } ],
+ [ { "field": "contact.telephones.0.telephone_number", "format": "Puhelin: {{data}}" }, { "field": "contact.telephones.0.telephone_name_fi", "format": " ({{data}})" } ],
+ [ { "field": "contact.homepage_fi", "format": "<i class='icon-home'></i><a href='{{data}}'>{{data}}</a>" } ],
+ [ { "field": "contact.email", "format": "Email: <a href='mailto:{{data}}'>{{data}}</a>" } ],
+ [ { "field": "description_fi" } ]
]
+/* [ { "field": "period", "format": "Aukioloaika: {{data}}" } ], */
+/* [ { "field": "services" } ], */
// library-directory default settings
var settings = {
@@ -603,6 +608,8 @@
'<ul style="margin-left:-100px;" class="dropdown-menu">' +
'<li><a class="facetview_viewrecord" href="' + index + '">view full record</a></li>' +
'</ul>' + '</div>'
+ // container for data
+ result += '<div class="result-data">'
// add the record based on display template if available
var display = options.result_display
var lines = ''
@@ -641,7 +648,7 @@
}
}
lines ? result += lines : result += JSON.stringify(record,""," ")
- result += '</td></tr>'
+ result += '</div></td></tr>'
return result;
}
View
12 less/style.less
@@ -2,14 +2,18 @@
body {
padding-top: 60px;
- padding-bottom: 40px;
+ padding-bottom: 10px;
+}
+
+footer {
+ margin: 12px auto 0px;
}
@import "bootstrap/responsive.less";
-
+
/* ===== Primary Styles ========================================================
- Author:
+ Author: Otto Kekäläinen (Seravo Oy)
========================================================================== */
@@ -21,4 +25,4 @@ body {
-
+

0 comments on commit e23b333

Please sign in to comment.
Something went wrong with that request. Please try again.