プロジェクト

全般

プロフィール

Vote #77897

完了

Allow only vertical reorderingin sortable lists

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
UI_10
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
10
version_id:
123
issue_org_id:
24062
author_id:
88801
assigned_to_id:
1
comments:
7
status_id:
5
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

Here is a patch which allows only vertical reordering for positioned items:


From: Vincent Robert 
Date: Thu, 13 Oct 2016 12:04:01 +0200
Subject: Vertical reordering only

---
 public/javascripts/application.js | 1 +
 1 file changed, 1 insertion(+)

diff --git a/public/javascripts/application.js b/public/javascripts/application.js
index 087d3de..b303702 100644
--- a/public/javascripts/application.js
+++ b/public/javascripts/application.js
@@ -597,6 +597,7 @@ function beforeShowDatePicker(input, inst) {
     }, options );

     return this.sortable($.extend({
+      axis: 'y',
       handle: ".sort-handle",
       helper: function(event, ui){
         ui.children('td').each(function(){
--

Thank you for considering this tiny contribution ;)


journals

--------------------------------------------------------------------------------
Please explain more details.
--------------------------------------------------------------------------------
Hi Toshi

As we are sorting elements in a column, we should add this constraint. If we don't specify the axis, we can drag the item to the right or to the left, which does not make sense in our case ; it's cleaner to move them vertically only.

Please try to sort elements with and without the "axis" attribute. You will instantly see the difference.

Thank you
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Committed, thanks.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------


related_issues

relates,Closed,12909,Drag'n'drop order configuration for statuses, trackers, roles...

Admin Redmine さんが約4年前に更新

  • カテゴリUI_10 にセット
  • 対象バージョン3.3.2_123 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0