From c08272b49eb143b6f2164d39db4c13403bae73d9 Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Fri, 6 Mar 2015 09:42:03 +0100 Subject: [PATCH] remove actions from rule lang and tags --- .../coding-rules-workspace-list-item.hbs | 6 ++--- .../js/coding-rules/workspace-list-view.js | 27 ------------------- 2 files changed, 2 insertions(+), 31 deletions(-) diff --git a/server/sonar-web/src/main/hbs/coding-rules/coding-rules-workspace-list-item.hbs b/server/sonar-web/src/main/hbs/coding-rules/coding-rules-workspace-list-item.hbs index 75f4c415e31..b7202d164c7 100644 --- a/server/sonar-web/src/main/hbs/coding-rules/coding-rules-workspace-list-item.hbs +++ b/server/sonar-web/src/main/hbs/coding-rules/coding-rules-workspace-list-item.hbs @@ -26,13 +26,11 @@ {{status}}     {{/notEq}} - {{langName}} + {{langName}} {{#notEmpty tags}}     - {{#each tags}} - {{this}} - {{/each}} + {{join tags ', '}} {{/notEmpty}} diff --git a/server/sonar-web/src/main/js/coding-rules/workspace-list-view.js b/server/sonar-web/src/main/js/coding-rules/workspace-list-view.js index b9fe6643b67..da435074b7f 100644 --- a/server/sonar-web/src/main/js/coding-rules/workspace-list-view.js +++ b/server/sonar-web/src/main/js/coding-rules/workspace-list-view.js @@ -24,21 +24,12 @@ define([ 'templates/coding-rules' ], function (WorkspaceListView, WorkspaceListItemView, WorkspaceListEmptyView) { - var $ = jQuery; - return WorkspaceListView.extend({ template: Templates['coding-rules-workspace-list'], itemView: WorkspaceListItemView, itemViewContainer: '.js-list', emptyView: WorkspaceListEmptyView, - events: function () { - return { - 'click .js-tag': 'onTagClick', - 'click .js-lang': 'onLangClick' - }; - }, - bindShortcuts: function () { WorkspaceListView.prototype.bindShortcuts.apply(this, arguments); var that = this; @@ -46,24 +37,6 @@ define([ that.options.app.controller.showDetailsForSelected(); return false; }); - }, - - onTagClick: function (e) { - var tag = $(e.currentTarget).data('tag'); - this.selectTag(tag); - }, - - onLangClick: function (e) { - var lang = $(e.currentTarget).data('lang'); - this.selectLang(lang); - }, - - selectTag: function (tag) { - this.options.app.state.setQuery({ tags: tag }); - }, - - selectLang: function (lang) { - this.options.app.state.setQuery({ languages: lang }); } }); -- 2.39.5