From b8b72cb39dc5e68897087cdaba4208e130832b4c Mon Sep 17 00:00:00 2001
From: Mihail Maxacov <0xf013@gmail.com>
Date: Thu, 5 Mar 2015 17:46:34 +0200
Subject: [PATCH 1/6] columns and ui-select change
---
frontend/app/templates/work_packages/modals/columns.html | 2 +-
frontend/bower.json | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/frontend/app/templates/work_packages/modals/columns.html b/frontend/app/templates/work_packages/modals/columns.html
index 4846da8149..350116fb00 100644
--- a/frontend/app/templates/work_packages/modals/columns.html
+++ b/frontend/app/templates/work_packages/modals/columns.html
@@ -6,7 +6,7 @@
-
+
{{$item.title}}
diff --git a/frontend/bower.json b/frontend/bower.json
index 5ef60a298d..514bca9db9 100644
--- a/frontend/bower.json
+++ b/frontend/bower.json
@@ -27,9 +27,9 @@
"hyperagent": "manwithtwowatches/hyperagent#v0.4.2",
"lodash": "~2.4.1",
"foundation-apps": "1.0.2",
- "ui-select": "0xF013/ui-select#1a67dea0f6076e8f33354bf573bf5482539f289f",
- "mousetrap": "git://github.com/ccampbell/mousetrap.git",
"bourbon": "~4.2.1"
+ "ui-select": "0xf013/ui-select#413c4df265298fc419ff96e1dbebeb25431889e5",
+ "mousetrap": "git://github.com/ccampbell/mousetrap.git"
},
"devDependencies": {
"mocha": "~1.14.0",
From 625514a2a1cc96e5e4dff1339f0cbd5b0ce63309 Mon Sep 17 00:00:00 2001
From: Mihail Maxacov <0xf013@gmail.com>
Date: Mon, 9 Mar 2015 17:20:18 +0200
Subject: [PATCH 2/6] new ui.select version
---
frontend/bower.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/frontend/bower.json b/frontend/bower.json
index 514bca9db9..f1751f3668 100644
--- a/frontend/bower.json
+++ b/frontend/bower.json
@@ -28,7 +28,7 @@
"lodash": "~2.4.1",
"foundation-apps": "1.0.2",
"bourbon": "~4.2.1"
- "ui-select": "0xf013/ui-select#413c4df265298fc419ff96e1dbebeb25431889e5",
+ "ui-select": "0xf013/ui-select#b789a7f5ad1c28a513d90e60fae94f2b62c5320c",
"mousetrap": "git://github.com/ccampbell/mousetrap.git"
},
"devDependencies": {
From b33a4da5fc94dce0dc4dd14201d551f725800664 Mon Sep 17 00:00:00 2001
From: Mihail Maxacov <0xf013@gmail.com>
Date: Tue, 10 Mar 2015 14:01:05 +0200
Subject: [PATCH 3/6] fix dragleave being fired on children
---
frontend/bower.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/frontend/bower.json b/frontend/bower.json
index f1751f3668..c8579784e9 100644
--- a/frontend/bower.json
+++ b/frontend/bower.json
@@ -27,8 +27,8 @@
"hyperagent": "manwithtwowatches/hyperagent#v0.4.2",
"lodash": "~2.4.1",
"foundation-apps": "1.0.2",
- "bourbon": "~4.2.1"
- "ui-select": "0xf013/ui-select#b789a7f5ad1c28a513d90e60fae94f2b62c5320c",
+ "bourbon": "~4.2.1",
+ "ui-select": "0xf013/ui-select#99eaa24d4696a6436a8afc44a1902379b65f37bf",
"mousetrap": "git://github.com/ccampbell/mousetrap.git"
},
"devDependencies": {
From 29f1c0c26a5409b204bb0b44e611c3136b3355ff Mon Sep 17 00:00:00 2001
From: Mihail Maxacov <0xf013@gmail.com>
Date: Tue, 10 Mar 2015 16:07:05 +0200
Subject: [PATCH 4/6] fix ordering on second opening
---
.../app/work_packages/controllers/dialogs/columns.js | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/frontend/app/work_packages/controllers/dialogs/columns.js b/frontend/app/work_packages/controllers/dialogs/columns.js
index 74f38b9b41..3fbef86040 100644
--- a/frontend/app/work_packages/controllers/dialogs/columns.js
+++ b/frontend/app/work_packages/controllers/dialogs/columns.js
@@ -32,18 +32,17 @@ module.exports = function($scope, $filter, columnsModal, QueryService, WorkPacka
this.closeMe = columnsModal.deactivate;
var vm;
$scope.vm = vm = {};
- vm.availableColumns = [];
vm.selectedColumns = [];
vm.oldSelectedColumns = [];
- var selectedColumnNames = getColumnNames(QueryService.getSelectedColumns());
+ var selectedColumns = QueryService.getSelectedColumns();
// Available selectable Columns
vm.promise = QueryService.loadAvailableColumns()
.then(function(availableColumns){
- vm.availableColumns = availableColumns;
- vm.availableColumns.forEach(function(column) {
- if (_.contains(selectedColumnNames, column.name)) {
+ var availableColumnNames = getColumnNames(availableColumns);
+ selectedColumns.forEach(function(column) {
+ if (_.contains(availableColumnNames, column.name)) {
vm.selectedColumns.push(column);
vm.oldSelectedColumns.push(column);
}
From 7e5bbe775f84dcdab6ece73f532a2c6c7acc3441 Mon Sep 17 00:00:00 2001
From: Mihail Maxacov <0xf013@gmail.com>
Date: Wed, 11 Mar 2015 10:36:34 +0200
Subject: [PATCH 5/6] fix missing choices for columns
---
frontend/app/work_packages/controllers/dialogs/columns.js | 2 ++
1 file changed, 2 insertions(+)
diff --git a/frontend/app/work_packages/controllers/dialogs/columns.js b/frontend/app/work_packages/controllers/dialogs/columns.js
index 3fbef86040..9d88ae00e3 100644
--- a/frontend/app/work_packages/controllers/dialogs/columns.js
+++ b/frontend/app/work_packages/controllers/dialogs/columns.js
@@ -34,12 +34,14 @@ module.exports = function($scope, $filter, columnsModal, QueryService, WorkPacka
$scope.vm = vm = {};
vm.selectedColumns = [];
vm.oldSelectedColumns = [];
+ vm.availableColumns = [];
var selectedColumns = QueryService.getSelectedColumns();
// Available selectable Columns
vm.promise = QueryService.loadAvailableColumns()
.then(function(availableColumns){
+ vm.availableColumns = availableColumns;
var availableColumnNames = getColumnNames(availableColumns);
selectedColumns.forEach(function(column) {
if (_.contains(availableColumnNames, column.name)) {
From 274dbfb4c0f5deda001d012b9dd6ace4b556bd72 Mon Sep 17 00:00:00 2001
From: Mihail Maxacov <0xf013@gmail.com>
Date: Mon, 23 Mar 2015 13:49:36 +0200
Subject: [PATCH 6/6] fix drag and drop with css
---
app/assets/stylesheets/content/ui_select.sass | 7 +++++++
app/assets/stylesheets/default.css.sass | 1 +
frontend/bower.json | 2 +-
3 files changed, 9 insertions(+), 1 deletion(-)
create mode 100644 app/assets/stylesheets/content/ui_select.sass
diff --git a/app/assets/stylesheets/content/ui_select.sass b/app/assets/stylesheets/content/ui_select.sass
new file mode 100644
index 0000000000..6cce2317de
--- /dev/null
+++ b/app/assets/stylesheets/content/ui_select.sass
@@ -0,0 +1,7 @@
+// keep this rule if you want ui-select drag-n-drop to work properly
+.ui-select-match .ui-select-match-item *
+ pointer-events: none
+
+// I think this rule should be global
+.select2-display-none
+ display: none
diff --git a/app/assets/stylesheets/default.css.sass b/app/assets/stylesheets/default.css.sass
index fb746b2794..aad0ebcc8b 100644
--- a/app/assets/stylesheets/default.css.sass
+++ b/app/assets/stylesheets/default.css.sass
@@ -48,6 +48,7 @@
@import content/context_menu
@import content/forms
@import content/choice
+@import content/ui_select
@import content/flash_messages
@import content/notifications
@import content/calendar
diff --git a/frontend/bower.json b/frontend/bower.json
index c8579784e9..179734982b 100644
--- a/frontend/bower.json
+++ b/frontend/bower.json
@@ -28,7 +28,7 @@
"lodash": "~2.4.1",
"foundation-apps": "1.0.2",
"bourbon": "~4.2.1",
- "ui-select": "0xf013/ui-select#99eaa24d4696a6436a8afc44a1902379b65f37bf",
+ "ui-select": "0xf013/ui-select#c7bef79e24cbeab977635c7a94d8f9504d4ee2e2",
"mousetrap": "git://github.com/ccampbell/mousetrap.git"
},
"devDependencies": {