aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2016-03-25 14:25:55 +0100
committerStas Vilchik <vilchiks@gmail.com>2016-03-25 14:25:55 +0100
commitd1f00f9057d67c580dbe2c27037be08a9174294c (patch)
treee41a5e6884285fc03b70d8c56476586012ec6d19
parent46c1052e04652b318ac1cf2e934bfad9c152d690 (diff)
downloadsonarqube-d1f00f9057d67c580dbe2c27037be08a9174294c.tar.gz
sonarqube-d1f00f9057d67c580dbe2c27037be08a9174294c.zip
SONAR-6742 Stop displaying plugin actions for issues in the UI
-rw-r--r--server/sonar-web/src/main/js/components/issue/issue-view.js14
-rw-r--r--server/sonar-web/src/main/js/components/issue/templates/issue-more-actions.hbs9
-rw-r--r--server/sonar-web/src/main/js/components/issue/templates/issue.hbs8
-rw-r--r--server/sonar-web/src/main/js/components/issue/views/more-actions-view.js38
-rw-r--r--server/sonar-web/src/main/js/helpers/handlebars/ifHasExtraActions.js31
-rw-r--r--server/sonar-web/src/main/js/helpers/handlebars/pluginActions.js29
6 files changed, 0 insertions, 129 deletions
diff --git a/server/sonar-web/src/main/js/components/issue/issue-view.js b/server/sonar-web/src/main/js/components/issue/issue-view.js
index 081e80699f5..9a4fb2e7849 100644
--- a/server/sonar-web/src/main/js/components/issue/issue-view.js
+++ b/server/sonar-web/src/main/js/components/issue/issue-view.js
@@ -30,7 +30,6 @@ import CommentFormView from './views/comment-form-view';
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';
@@ -56,7 +55,6 @@ export default Marionette.ItemView.extend({
'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'
@@ -241,18 +239,6 @@ export default Marionette.ItemView.extend({
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();
diff --git a/server/sonar-web/src/main/js/components/issue/templates/issue-more-actions.hbs b/server/sonar-web/src/main/js/components/issue/templates/issue-more-actions.hbs
deleted file mode 100644
index f4e842242b5..00000000000
--- a/server/sonar-web/src/main/js/components/issue/templates/issue-more-actions.hbs
+++ /dev/null
@@ -1,9 +0,0 @@
-<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>
diff --git a/server/sonar-web/src/main/js/components/issue/templates/issue.hbs b/server/sonar-web/src/main/js/components/issue/templates/issue.hbs
index c8d76d67734..6ed51a13a82 100644
--- a/server/sonar-web/src/main/js/components/issue/templates/issue.hbs
+++ b/server/sonar-web/src/main/js/components/issue/templates/issue.hbs
@@ -122,14 +122,6 @@
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>&nbsp;<i class="icon-dropdown"></i>
- </button>
- </li>
- {{/ifHasExtraActions}}
</ul>
{{#inArray actions "assign_to_me"}}
diff --git a/server/sonar-web/src/main/js/components/issue/views/more-actions-view.js b/server/sonar-web/src/main/js/components/issue/views/more-actions-view.js
deleted file mode 100644
index 9865c54bddf..00000000000
--- a/server/sonar-web/src/main/js/components/issue/views/more-actions-view.js
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 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);
- }
-});
-
-
diff --git a/server/sonar-web/src/main/js/helpers/handlebars/ifHasExtraActions.js b/server/sonar-web/src/main/js/helpers/handlebars/ifHasExtraActions.js
deleted file mode 100644
index ab47aaaf6c7..00000000000
--- a/server/sonar-web/src/main/js/helpers/handlebars/ifHasExtraActions.js
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * 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);
- }
-};
diff --git a/server/sonar-web/src/main/js/helpers/handlebars/pluginActions.js b/server/sonar-web/src/main/js/helpers/handlebars/pluginActions.js
deleted file mode 100644
index 995069db8fe..00000000000
--- a/server/sonar-web/src/main/js/helpers/handlebars/pluginActions.js
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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);
- }, '');
-};