mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 15:20:13 +01:00
Merge pull request #2021 from rbndickson/convert-search-page-to-bootstrap
Convert search page to bootstrap
This commit is contained in:
commit
c53fdf76b4
2 changed files with 15 additions and 12 deletions
|
|
@ -894,12 +894,6 @@ var RecurringTodosPage = {
|
|||
}
|
||||
};
|
||||
|
||||
var SearchPage = {
|
||||
setup_behavior: function() {
|
||||
$('#search-form #search').focus();
|
||||
}
|
||||
};
|
||||
|
||||
/**************************************/
|
||||
/* generic Tracks functions */
|
||||
/**************************************/
|
||||
|
|
@ -1145,7 +1139,7 @@ $(document).ready(function() {
|
|||
/* enable page specific behavior */
|
||||
$([ 'PreferencesPage', 'NotesPage', 'ProjectListPage', 'ContextListPage',
|
||||
'FeedsPage', 'RecurringTodosPage', 'TodoItems', 'TracksPages',
|
||||
'TracksForm', 'SearchPage', 'UsersPage' ]).each(function() {
|
||||
'TracksForm', 'UsersPage' ]).each(function() {
|
||||
eval(this+'.setup_behavior();');
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,15 @@
|
|||
<div id="display_box_search">
|
||||
<%= form_tag(search_results_path, :id => 'search-form') do %>
|
||||
<%= text_field_tag(:search, params[:search]) %>
|
||||
<%= submit_tag t('common.search') %>
|
||||
<% end %>
|
||||
<div class="bootstrap">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-6 col-sm-offset-3">
|
||||
<%= form_tag(search_results_path) do %>
|
||||
<div class="form-group">
|
||||
<%= label_tag 'Search', nil, class: 'sr-only' %>
|
||||
<%= text_field_tag(:search, params[:search], class: 'form-control', autofocus: true) %>
|
||||
</div>
|
||||
<%= submit_tag t('common.search'), class: 'btn btn-primary pull-right' %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue