diff options
Diffstat (limited to 'web/js')
-rw-r--r-- | web/js/labitrack.d/55-search.coffee | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/web/js/labitrack.d/55-search.coffee b/web/js/labitrack.d/55-search.coffee index 38569af..b0814f2 100644 --- a/web/js/labitrack.d/55-search.coffee +++ b/web/js/labitrack.d/55-search.coffee @@ -48,6 +48,10 @@ search = Backbone.View.extend { pgcnt = Math.ceil(meta.count / 10) pages = λ.pagination '/search/'+q, page, pgcnt + if meta.count is 1 + url = '/view/' + @collection.at(0).id + return Backbone.history.navigate(url, true) + data = { rows: @collection.toJSON(), pages |