@@ -31,6 +31,10 | |||||
31 | </tr> |
|
31 | </tr> | |
32 | </table> |
|
32 | </table> | |
33 |
|
33 | |||
34 | <% content_for :header_tags do %> |
|
34 | <%= javascript_tag do %> | |
35 | <%= javascript_include_tag 'select_list_move' %> |
|
35 | $(document).ready(function(){ | |
|
36 | $('.query-columns').closest('form').submit(function(){ | |||
|
37 | $('#selected_columns option').prop('selected', true); | |||
|
38 | }); | |||
|
39 | }); | |||
36 | <% end %> |
|
40 | <% end %> |
@@ -74,6 +74,31 function hideFieldset(el) { | |||||
74 | fieldset.children('div').hide(); |
|
74 | fieldset.children('div').hide(); | |
75 | } |
|
75 | } | |
76 |
|
76 | |||
|
77 | // columns selection | |||
|
78 | function moveOptions(theSelFrom, theSelTo) { | |||
|
79 | $(theSelFrom).find('option:selected').detach().prop("selected", false).appendTo($(theSelTo)); | |||
|
80 | } | |||
|
81 | ||||
|
82 | function moveOptionUp(theSel) { | |||
|
83 | $(theSel).find('option:selected').each(function(){ | |||
|
84 | $(this).prev(':not(:selected)').detach().insertAfter($(this)); | |||
|
85 | }); | |||
|
86 | } | |||
|
87 | ||||
|
88 | function moveOptionTop(theSel) { | |||
|
89 | $(theSel).find('option:selected').detach().prependTo($(theSel)); | |||
|
90 | } | |||
|
91 | ||||
|
92 | function moveOptionDown(theSel) { | |||
|
93 | $($(theSel).find('option:selected').get().reverse()).each(function(){ | |||
|
94 | $(this).next(':not(:selected)').detach().insertBefore($(this)); | |||
|
95 | }); | |||
|
96 | } | |||
|
97 | ||||
|
98 | function moveOptionBottom(theSel) { | |||
|
99 | $(theSel).find('option:selected').detach().appendTo($(theSel)); | |||
|
100 | } | |||
|
101 | ||||
77 | function initFilters() { |
|
102 | function initFilters() { | |
78 | $('#add_filter_select').change(function() { |
|
103 | $('#add_filter_select').change(function() { | |
79 | addFilter($(this).val(), '', []); |
|
104 | addFilter($(this).val(), '', []); |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now