diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-11-18 22:14:34 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-11-18 22:14:34 +0000 |
commit | a7559e669f4f131ccec74b585973492665a21daa (patch) | |
tree | 2cbc83d8c84e90acf3d0aad799e822e8a978175f /public | |
parent | 4bfbabfdfa34eb27ac9d1593efa1fdf830269694 (diff) | |
download | redmine-a7559e669f4f131ccec74b585973492665a21daa.tar.gz redmine-a7559e669f4f131ccec74b585973492665a21daa.zip |
Moved select_list_move.js content to application.js.
git-svn-id: http://svn.redmine.org/redmine/trunk@13618 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'public')
-rw-r--r-- | public/javascripts/application.js | 25 | ||||
-rw-r--r-- | public/javascripts/select_list_move.js | 29 |
2 files changed, 25 insertions, 29 deletions
diff --git a/public/javascripts/application.js b/public/javascripts/application.js index 19104fdc2..e598bbcaf 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -74,6 +74,31 @@ function hideFieldset(el) { 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(), '', []); diff --git a/public/javascripts/select_list_move.js b/public/javascripts/select_list_move.js deleted file mode 100644 index db0585424..000000000 --- a/public/javascripts/select_list_move.js +++ /dev/null @@ -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); - }); -}); |