[#53,view/query][s]: add free text query input to query editor (though backend does not yet use it).
This commit is contained in:
parent
0a17c428cd
commit
a470e66ff3
@ -27,7 +27,17 @@
|
||||
float: none;
|
||||
}
|
||||
|
||||
.header .recline-query-editor input {
|
||||
.header .recline-query-editor label {
|
||||
float: none;
|
||||
}
|
||||
|
||||
.header .recline-query-editor input.text-query {
|
||||
float: left;
|
||||
margin-top: 1px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.header .recline-query-editor .pagination input {
|
||||
width: 30px;
|
||||
}
|
||||
|
||||
|
||||
@ -182,6 +182,7 @@ my.QueryEditor = Backbone.View.extend({
|
||||
className: 'recline-query-editor',
|
||||
template: ' \
|
||||
<form action="" method="GET"> \
|
||||
<input type="text" name="q" value="{{q}}" class="text-query" /> \
|
||||
<div class="pagination"> \
|
||||
<ul> \
|
||||
<li class="prev action-pagination-update"><a>« back</a></li> \
|
||||
@ -208,7 +209,8 @@ my.QueryEditor = Backbone.View.extend({
|
||||
e.preventDefault();
|
||||
var newOffset = parseInt(this.el.find('input[name="offset"]').val());
|
||||
var newSize = parseInt(this.el.find('input[name="to"]').val()) - newOffset;
|
||||
this.model.set({size: newSize, offset: newOffset});
|
||||
var query = this.el.find('.text-query').val();
|
||||
this.model.set({size: newSize, offset: newOffset, q: query});
|
||||
},
|
||||
onPaginationUpdate: function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user