mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-18 00:00:12 +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 */
|
/* generic Tracks functions */
|
||||||
/**************************************/
|
/**************************************/
|
||||||
|
|
@ -1145,7 +1139,7 @@ $(document).ready(function() {
|
||||||
/* enable page specific behavior */
|
/* enable page specific behavior */
|
||||||
$([ 'PreferencesPage', 'NotesPage', 'ProjectListPage', 'ContextListPage',
|
$([ 'PreferencesPage', 'NotesPage', 'ProjectListPage', 'ContextListPage',
|
||||||
'FeedsPage', 'RecurringTodosPage', 'TodoItems', 'TracksPages',
|
'FeedsPage', 'RecurringTodosPage', 'TodoItems', 'TracksPages',
|
||||||
'TracksForm', 'SearchPage', 'UsersPage' ]).each(function() {
|
'TracksForm', 'UsersPage' ]).each(function() {
|
||||||
eval(this+'.setup_behavior();');
|
eval(this+'.setup_behavior();');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,15 @@
|
||||||
<div id="display_box_search">
|
<div class="bootstrap">
|
||||||
<%= form_tag(search_results_path, :id => 'search-form') do %>
|
<div class="container-fluid">
|
||||||
<%= text_field_tag(:search, params[:search]) %>
|
<div class="row">
|
||||||
<%= submit_tag t('common.search') %>
|
<div class="col-xs-12 col-sm-6 col-sm-offset-3">
|
||||||
<% end %>
|
<%= 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>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue