diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2016-03-24 11:12:32 +0100 |
---|---|---|
committer | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2016-03-29 19:10:52 +0200 |
commit | 44322e96335e0e309b331be79a55a5459371089a (patch) | |
tree | 47143ae60df0896109138e108e66a5fa2425e1a5 /server/sonar-web/src/main/js | |
parent | 5025760c586e0e24524794356afdb4ad48ed1296 (diff) | |
download | sonarqube-44322e96335e0e309b331be79a55a5459371089a.tar.gz sonarqube-44322e96335e0e309b331be79a55a5459371089a.zip |
SONAR-7472 Drop ability to create manual issues from UI
Diffstat (limited to 'server/sonar-web/src/main/js')
4 files changed, 1 insertions, 48 deletions
diff --git a/server/sonar-web/src/main/js/components/issue/templates/manual-issue.hbs b/server/sonar-web/src/main/js/components/issue/templates/manual-issue.hbs deleted file mode 100644 index 0a38fa2136f..00000000000 --- a/server/sonar-web/src/main/js/components/issue/templates/manual-issue.hbs +++ /dev/null @@ -1,20 +0,0 @@ -<form class="js-manual-issue-form spacer-top spacer-bottom"> - - <div class="spacer-bottom"> - <select name="rule"> - {{#each rules}} - <option value="{{key}}">{{name}}</option> - {{/each}} - </select> - </div> - - <div class="spacer-top"> - <textarea rows="4" name="message" class="width-100" required></textarea> - </div> - - <div class="spacer-top"> - <input type="submit" value="{{t 'create'}}"> - <a class="js-cancel" href="#">{{t 'cancel'}}</a> - </div> - -</form> diff --git a/server/sonar-web/src/main/js/components/source-viewer/main.js b/server/sonar-web/src/main/js/components/source-viewer/main.js index 1c125e31905..4669fb5b079 100644 --- a/server/sonar-web/src/main/js/components/source-viewer/main.js +++ b/server/sonar-web/src/main/js/components/source-viewer/main.js @@ -501,7 +501,6 @@ export default Marionette.LayoutView.extend({ showLineActionsPopup (e) { e.stopPropagation(); $('body').click(); - const that = this; const line = $(e.currentTarget).data('line-number'); const popup = new LineActionsPopupView({ line, @@ -509,9 +508,6 @@ export default Marionette.LayoutView.extend({ model: this.model, row: $(e.currentTarget).closest('.source-line') }); - popup.on('onManualIssueAdded', function (issue) { - that.addIssue(issue); - }); popup.render(); }, diff --git a/server/sonar-web/src/main/js/components/source-viewer/popups/line-actions-popup.js b/server/sonar-web/src/main/js/components/source-viewer/popups/line-actions-popup.js index cc519035255..dad2d571b65 100644 --- a/server/sonar-web/src/main/js/components/source-viewer/popups/line-actions-popup.js +++ b/server/sonar-web/src/main/js/components/source-viewer/popups/line-actions-popup.js @@ -18,15 +18,13 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import Popup from '../../common/popup'; -import ManualIssueView from '../../issue/manual-issue-view'; import Template from '../templates/source-viewer-line-options-popup.hbs'; export default Popup.extend({ template: Template, events: { - 'click .js-get-permalink': 'getPermalink', - 'click .js-add-manual-issue': 'addManualIssue' + 'click .js-get-permalink': 'getPermalink' }, getPermalink (e) { @@ -35,21 +33,6 @@ export default Popup.extend({ (encodeURIComponent(this.model.key())) + '&line=' + this.options.line; const windowParams = 'resizable=1,scrollbars=1,status=1'; window.open(url, this.model.get('name'), windowParams); - }, - - addManualIssue (e) { - e.preventDefault(); - const that = this; - const line = this.options.line; - const component = this.model.key(); - const manualIssueView = new ManualIssueView({ - line, - component - }); - manualIssueView.render().$el.appendTo(this.options.row.find('.source-line-code')); - manualIssueView.on('add', function (issue) { - that.trigger('onManualIssueAdded', issue); - }); } }); diff --git a/server/sonar-web/src/main/js/components/source-viewer/templates/source-viewer-line-options-popup.hbs b/server/sonar-web/src/main/js/components/source-viewer/templates/source-viewer-line-options-popup.hbs index facf64020ea..c6b9b418866 100644 --- a/server/sonar-web/src/main/js/components/source-viewer/templates/source-viewer-line-options-popup.hbs +++ b/server/sonar-web/src/main/js/components/source-viewer/templates/source-viewer-line-options-popup.hbs @@ -2,12 +2,6 @@ <div class="bubble-popup-section"> <a href="#" class="js-get-permalink link-action">{{t 'component_viewer.get_permalink'}}</a> </div> - - {{#if canCreateManualIssue}} - <div class="bubble-popup-section"> - <a href="#" class="js-add-manual-issue link-action">{{t 'component_viewer.add_manual_issue'}}</a> - </div> - {{/if}} </div> <div class="bubble-popup-arrow"></div> |