mirror of
https://github.com/redmine/redmine.git
synced 2025-11-15 17:56:03 +01:00
Moved select_list_move.js content to application.js.
git-svn-id: http://svn.redmine.org/redmine/trunk@13618 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -31,6 +31,10 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<% content_for :header_tags do %>
|
<%= javascript_tag do %>
|
||||||
<%= javascript_include_tag 'select_list_move' %>
|
$(document).ready(function(){
|
||||||
|
$('.query-columns').closest('form').submit(function(){
|
||||||
|
$('#selected_columns option').prop('selected', true);
|
||||||
|
});
|
||||||
|
});
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -74,6 +74,31 @@ function hideFieldset(el) {
|
|||||||
fieldset.children('div').hide();
|
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() {
|
function initFilters() {
|
||||||
$('#add_filter_select').change(function() {
|
$('#add_filter_select').change(function() {
|
||||||
addFilter($(this).val(), '', []);
|
addFilter($(this).val(), '', []);
|
||||||
|
|||||||
@@ -1,29 +0,0 @@
|
|||||||
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);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
Reference in New Issue
Block a user