import PlanFormView from './views/plan-form-view';
import SetSeverityFormView from './views/set-severity-form-view';
import SetTypeFormView from './views/set-type-form-view';
-import MoreActionsView from './views/more-actions-view';
import TagsFormView from './views/tags-form-view';
import Workspace from '../workspace/main';
import Template from './templates/issue.hbs';
'click .js-issue-assign-to-me': 'assignToMe',
'click .js-issue-plan': 'plan',
'click .js-issue-show-changelog': 'showChangeLog',
- 'click .js-issue-more': 'showMoreActions',
'click .js-issue-rule': 'showRule',
'click .js-issue-edit-tags': 'editTags',
'click .js-issue-locations': 'showLocations'
Workspace.openRule({ key: ruleKey });
},
- showMoreActions (e) {
- e.stopPropagation();
- $('body').click();
- this.popup = new MoreActionsView({
- triggerEl: $(e.currentTarget),
- bottomRight: true,
- model: this.model,
- detailView: this
- });
- this.popup.render();
- },
-
action (action) {
const that = this;
this.disableControls();
+++ /dev/null
-<ul class="menu">
- {{#pluginActions actions}}
- <li>
- <a class="issue-action js-issue-action" href="#" data-action="{{this}}">{{t "issue.action" this "formlink"}}</a>
- </li>
- {{/pluginActions}}
-</ul>
-
-<div class="bubble-popup-arrow"></div>
class="issue-meta-label">{{t 'issue.comment.formlink' }}</span></button>
</li>
{{/inArray}}
-
- {{#ifHasExtraActions actions}}
- <li class="issue-meta">
- <button class="button-link issue-action issue-action-with-options js-issue-more">
- <span class="issue-meta-label">{{t 'more'}}</span> <i class="icon-dropdown"></i>
- </button>
- </li>
- {{/ifHasExtraActions}}
</ul>
{{#inArray actions "assign_to_me"}}
+++ /dev/null
-/*
- * SonarQube
- * Copyright (C) 2009-2016 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser 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.
- */
-import $ from 'jquery';
-import ActionOptionsView from '../../../components/common/action-options-view';
-import Template from '../templates/issue-more-actions.hbs';
-
-export default ActionOptionsView.extend({
- template: Template,
-
- selectOption (e) {
- const action = $(e.currentTarget).data('action');
- this.submit(action);
- return ActionOptionsView.prototype.selectOption.apply(this, arguments);
- },
-
- submit (actionKey) {
- return this.options.detailView.action(actionKey);
- }
-});
-
-
+++ /dev/null
-/*
- * SonarQube
- * Copyright (C) 2009-2016 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser 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.
- */
-import _ from 'underscore';
-
-const DEFAULT_ACTIONS = ['comment', 'assign', 'assign_to_me', 'plan', 'set_severity', 'set_tags', 'set_type'];
-
-module.exports = function (actions, options) {
- const actionsLeft = _.difference(actions, DEFAULT_ACTIONS);
- if (actionsLeft.length > 0) {
- return options.fn(this);
- } else {
- return options.inverse(this);
- }
-};
+++ /dev/null
-/*
- * SonarQube
- * Copyright (C) 2009-2016 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser 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.
- */
-import _ from 'underscore';
-
-const DEFAULT_ACTIONS = ['comment', 'assign', 'assign_to_me', 'plan', 'set_severity', 'set_tags', 'set_type'];
-
-module.exports = function (actions, options) {
- const pluginActions = _.difference(actions, DEFAULT_ACTIONS);
- return pluginActions.reduce(function (prev, current) {
- return prev + options.fn(current);
- }, '');
-};