</tr>
</table>
-<% content_for :header_tags do %>
-<%= javascript_include_tag 'select_list_move' %>
+<%= javascript_tag do %>
+$(document).ready(function(){
+ $('.query-columns').closest('form').submit(function(){
+ $('#selected_columns option').prop('selected', true);
+ });
+});
<% end %>
fieldset.children('div').hide();
}
+// columns selection
+function moveOptions(theSelFrom, theSelTo) {
+ $(theSelFrom).find('option:selected').detach().prop("selected", false).appendTo($(theSelTo));
+}
+
+function moveOptionUp(theSel) {
+ $(theSel).find('option:selected').each(function(){
+ $(this).prev(':not(:selected)').detach().insertAfter($(this));
+ });
+}
+
+function moveOptionTop(theSel) {
+ $(theSel).find('option:selected').detach().prependTo($(theSel));
+}
+
+function moveOptionDown(theSel) {
+ $($(theSel).find('option:selected').get().reverse()).each(function(){
+ $(this).next(':not(:selected)').detach().insertBefore($(this));
+ });
+}
+
+function moveOptionBottom(theSel) {
+ $(theSel).find('option:selected').detach().appendTo($(theSel));
+}
+
function initFilters() {
$('#add_filter_select').change(function() {
addFilter($(this).val(), '', []);
+++ /dev/null
-function moveOptions(theSelFrom, theSelTo) {
- $(theSelFrom).find('option:selected').detach().prop("selected", false).appendTo($(theSelTo));
-}
-
-function moveOptionUp(theSel) {
- $(theSel).find('option:selected').each(function(){
- $(this).prev(':not(:selected)').detach().insertAfter($(this));
- });
-}
-
-function moveOptionTop(theSel) {
- $(theSel).find('option:selected').detach().prependTo($(theSel));
-}
-
-function moveOptionDown(theSel) {
- $($(theSel).find('option:selected').get().reverse()).each(function(){
- $(this).next(':not(:selected)').detach().insertBefore($(this));
- });
-}
-
-function moveOptionBottom(theSel) {
- $(theSel).find('option:selected').detach().appendTo($(theSel));
-}
-
-$(document).ready(function(){
- $('.query-columns').closest('form').submit(function(){
- $('#selected_columns option').prop('selected', true);
- });
-});