From 26dacf4739d12832995cf0885ea7bb8fba4f9017 Mon Sep 17 00:00:00 2001 From: Alex Dik Date: Tue, 1 Dec 2015 08:45:52 +0100 Subject: [PATCH 01/13] Disable WP-create button for create states universally --- .../wp-buttons/create-button/create-button.directive.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/app/components/wp-buttons/create-button/create-button.directive.js b/frontend/app/components/wp-buttons/create-button/create-button.directive.js index 6068267d74..c96230d6fe 100644 --- a/frontend/app/components/wp-buttons/create-button/create-button.directive.js +++ b/frontend/app/components/wp-buttons/create-button/create-button.directive.js @@ -53,7 +53,7 @@ function WorkPackageCreateButtonController($state, ProjectService) { vm.text = I18n.t('js.toolbar.unselected_title'); vm.isDisabled = function () { - return !inProjectContext || !canCreate || $state.is('work-packages.list.new') || !vm.types; + return !inProjectContext || !canCreate || $state.includes('**.new') || !vm.types; }; if (inProjectContext) { From 77f5ce915d55b684b1bb2b4fe4809a6f87b7287c Mon Sep 17 00:00:00 2001 From: Alex Dik Date: Tue, 1 Dec 2015 08:56:17 +0100 Subject: [PATCH 02/13] Move types drop down menu to create button directory --- .../create-button.directive.html | 2 +- .../types-drop-down-menu.service.js | 39 +++++++++++++++++++ .../types-drop-down-menu.template.html} | 0 .../work_packages/controllers/menus/index.js | 9 ----- 4 files changed, 40 insertions(+), 10 deletions(-) create mode 100644 frontend/app/components/wp-buttons/create-button/types-drop-down-menu.service.js rename frontend/app/{templates/work_packages/menus/tasks_dropdown_menu.html => components/wp-buttons/create-button/types-drop-down-menu.template.html} (100%) diff --git a/frontend/app/components/wp-buttons/create-button/create-button.directive.html b/frontend/app/components/wp-buttons/create-button/create-button.directive.html index 12f8668192..ce6eb23361 100644 --- a/frontend/app/components/wp-buttons/create-button/create-button.directive.html +++ b/frontend/app/components/wp-buttons/create-button/create-button.directive.html @@ -1,5 +1,5 @@
-