Move types drop down menu to create button directory

pull/3943/head
Alex Dik 9 years ago
parent 26dacf4739
commit 77f5ce915d
  1. 2
      frontend/app/components/wp-buttons/create-button/create-button.directive.html
  2. 39
      frontend/app/components/wp-buttons/create-button/types-drop-down-menu.service.js
  3. 0
      frontend/app/components/wp-buttons/create-button/types-drop-down-menu.template.html
  4. 9
      frontend/app/work_packages/controllers/menus/index.js

@ -1,5 +1,5 @@
<div class="wp-create-button">
<button class="button -alt-highlight add-work-package" has-dropdown-menu target="TasksDropdownMenu"
<button class="button -alt-highlight add-work-package" has-dropdown-menu target="typesDropDownMenu"
locals="vm" ng-disabled="vm.isDisabled()">
<i class="button--icon icon-add"></i>

@ -0,0 +1,39 @@
// -- copyright
// OpenProject is a project management system.
// Copyright (C) 2012-2015 the OpenProject Foundation (OPF)
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License version 3.
//
// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
// Copyright (C) 2006-2013 Jean-Philippe Lang
// Copyright (C) 2010-2013 the ChiliProject Team
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
// See doc/COPYRIGHT.rdoc for more details.
// ++
angular
.module('openproject.workPackages')
.factory('typesDropDownMenu', typesDropDownMenu);
function typesDropDownMenu(ngContextMenu) {
return ngContextMenu({
templateUrl: '/components/wp-buttons/create-button/types-drop-down-menu.template.html',
container: '.wp-create-button'
});
}

@ -86,15 +86,6 @@ angular.module('openproject.workPackages')
'NotificationsService',
require('./settings-dropdown-menu-controller')
])
.factory('TasksDropdownMenu', [
'ngContextMenu',
function(ngContextMenu) {
return ngContextMenu({
templateUrl: '/templates/work_packages/menus/tasks_dropdown_menu.html',
container: '.wp-create-button'
});
}
])
.constant('PERMITTED_CONTEXT_MENU_ACTIONS', [
'edit', 'watch', 'log_time',
'move', 'copy', 'delete'

Loading…
Cancel
Save