]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5007 Temporary remove facets (until SONAR-5012)
authorStas Vilchik <vilchiks@gmail.com>
Wed, 12 Mar 2014 05:51:14 +0000 (11:51 +0600)
committerStas Vilchik <vilchiks@gmail.com>
Wed, 12 Mar 2014 05:51:14 +0000 (11:51 +0600)
13 files changed:
sonar-server/src/main/webapp/WEB-INF/app/views/coding_rules/templates/_coding_rules_layout.hbs.erb
sonar-server/src/main/webapp/javascripts/coding-rules/app.coffee
sonar-server/src/main/webapp/javascripts/coding-rules/app.js
sonar-server/src/main/webapp/javascripts/coding-rules/layout.coffee
sonar-server/src/main/webapp/javascripts/coding-rules/layout.js
sonar-server/src/main/webapp/javascripts/coding-rules/mockjax.coffee
sonar-server/src/main/webapp/javascripts/coding-rules/mockjax.js
sonar-server/src/main/webapp/javascripts/coding-rules/views/coding-rules-facets-item-view.coffee [deleted file]
sonar-server/src/main/webapp/javascripts/coding-rules/views/coding-rules-facets-item-view.js [deleted file]
sonar-server/src/main/webapp/javascripts/coding-rules/views/coding-rules-facets-view.coffee [deleted file]
sonar-server/src/main/webapp/javascripts/coding-rules/views/coding-rules-facets-view.js [deleted file]
sonar-server/src/main/webapp/stylesheets/coding-rules.css
sonar-server/src/main/webapp/stylesheets/coding-rules.less

index 90f4a0ee77328a04ca491b2a63b76e6a82fb82c6..debdccc91f1e31f74ce90dac04f3bf5ecff4b8bf 100644 (file)
@@ -1,7 +1,6 @@
 <script id="coding-rules-layout" type="text/x-handlebars-template">
   <div class="navigator-header"></div>
   <div class="navigator-filters"></div>
-  <div class="navigator-facets"></div>
   <div class="navigator-actions"></div>
   <div class="navigator-results"></div>
   <div class="navigator-details"></div>
index 2ac34dbf19752edb4f2a4da5196892db84ae68f9..ec4caa0b769597b2b0ca84e1efe8ac700692c2ab 100644 (file)
@@ -28,7 +28,6 @@ requirejs [
   'coding-rules/views/actions-view',
   'coding-rules/views/filter-bar-view',
   'coding-rules/views/coding-rules-list-view',
-  'coding-rules/views/coding-rules-facets-view',
 
   # filters
   'navigator/filters/base-filters',
@@ -48,7 +47,6 @@ requirejs [
   CodingRulesActionsView,
   CodingRulesFilterBarView,
   CodingRulesListView,
-  CodingRulesFacetsView,
 
   # filters
   BaseFilters,
@@ -96,7 +94,7 @@ requirejs [
 
 
 
-  App.fetchList = (firstPage, fetchFacets = true) ->
+  App.fetchList = (firstPage) ->
     query = @getQuery()
     fetchQuery = _.extend { pageIndex: @pageIndex }, query
 
@@ -105,13 +103,10 @@ requirejs [
           sort: @codingRules.sorting.sort,
           asc: @codingRules.sorting.asc
 
-    unless fetchFacets
-      _.extend fetchQuery, facets: false
-
     @storeQuery query, @codingRules.sorting
 
     @layout.showSpinner 'resultsRegion'
-    @layout.showSpinner 'facetsRegion' if fetchFacets
+    @layout.showSpinner 'facetsRegion'
     jQuery.ajax
       url: "#{baseUrl}/api/codingrules/search"
       data: fetchQuery
@@ -127,18 +122,11 @@ requirejs [
       @layout.resultsRegion.show @codingRulesListView
       @codingRulesListView.selectFirst()
 
-      if fetchFacets
-        @facets.reset r.facets
-        @codingRulesFacetsView = new CodingRulesFacetsView
-          app: @
-          collection: @facets
-        @layout.facetsRegion.show @codingRulesFacetsView
-
 
 
-  App.fetchFirstPage = (fetchFacets = true) ->
+  App.fetchFirstPage = ->
     @pageIndex = 1
-    App.fetchList true, fetchFacets
+    App.fetchList true
 
 
   App.fetchNextPage = ->
@@ -167,7 +155,6 @@ requirejs [
   # Define coding rules
   App.addInitializer ->
     @codingRules = new Backbone.Collection
-    @facets = new Backbone.Collection
 
 
   # Construct status bar
index 2b238827ade4b4ada0985e8db244104bac3e2079..bb0e902cf2bb21cbcbbe36028b5e7795f8a28939 100644 (file)
@@ -22,7 +22,7 @@
     }
   });
 
-  requirejs(['backbone', 'backbone.marionette', 'coding-rules/layout', 'coding-rules/router', 'coding-rules/views/header-view', 'coding-rules/views/actions-view', 'coding-rules/views/filter-bar-view', 'coding-rules/views/coding-rules-list-view', 'coding-rules/views/coding-rules-facets-view', 'navigator/filters/base-filters', 'navigator/filters/choice-filters', 'navigator/filters/string-filters', 'coding-rules/views/filters/quality-profile-filter-view', 'coding-rules/mockjax'], function(Backbone, Marionette, CodingRulesLayout, CodingRulesRouter, CodingRulesHeaderView, CodingRulesActionsView, CodingRulesFilterBarView, CodingRulesListView, CodingRulesFacetsView, BaseFilters, ChoiceFilters, StringFilterView, QualityProfileFilterView) {
+  requirejs(['backbone', 'backbone.marionette', 'coding-rules/layout', 'coding-rules/router', 'coding-rules/views/header-view', 'coding-rules/views/actions-view', 'coding-rules/views/filter-bar-view', 'coding-rules/views/coding-rules-list-view', 'navigator/filters/base-filters', 'navigator/filters/choice-filters', 'navigator/filters/string-filters', 'coding-rules/views/filters/quality-profile-filter-view', 'coding-rules/mockjax'], function(Backbone, Marionette, CodingRulesLayout, CodingRulesRouter, CodingRulesHeaderView, CodingRulesActionsView, CodingRulesFilterBarView, CodingRulesListView, BaseFilters, ChoiceFilters, StringFilterView, QualityProfileFilterView) {
     var App, appXHR;
     jQuery.ajaxSetup({
       error: function(jqXHR) {
         replace: true
       });
     };
-    App.fetchList = function(firstPage, fetchFacets) {
+    App.fetchList = function(firstPage) {
       var fetchQuery, query,
         _this = this;
-      if (fetchFacets == null) {
-        fetchFacets = true;
-      }
       query = this.getQuery();
       fetchQuery = _.extend({
         pageIndex: this.pageIndex
           asc: this.codingRules.sorting.asc
         });
       }
-      if (!fetchFacets) {
-        _.extend(fetchQuery, {
-          facets: false
-        });
-      }
       this.storeQuery(query, this.codingRules.sorting);
       this.layout.showSpinner('resultsRegion');
-      if (fetchFacets) {
-        this.layout.showSpinner('facetsRegion');
-      }
+      this.layout.showSpinner('facetsRegion');
       return jQuery.ajax({
         url: "" + baseUrl + "/api/codingrules/search",
         data: fetchQuery
           collection: _this.codingRules
         });
         _this.layout.resultsRegion.show(_this.codingRulesListView);
-        _this.codingRulesListView.selectFirst();
-        if (fetchFacets) {
-          _this.facets.reset(r.facets);
-          _this.codingRulesFacetsView = new CodingRulesFacetsView({
-            app: _this,
-            collection: _this.facets
-          });
-          return _this.layout.facetsRegion.show(_this.codingRulesFacetsView);
-        }
+        return _this.codingRulesListView.selectFirst();
       });
     };
-    App.fetchFirstPage = function(fetchFacets) {
-      if (fetchFacets == null) {
-        fetchFacets = true;
-      }
+    App.fetchFirstPage = function() {
       this.pageIndex = 1;
-      return App.fetchList(true, fetchFacets);
+      return App.fetchList(true);
     };
     App.fetchNextPage = function() {
       if (this.pageIndex < this.codingRules.paging.pages) {
       return this.layout.headerRegion.show(this.codingRulesHeaderView);
     });
     App.addInitializer(function() {
-      this.codingRules = new Backbone.Collection;
-      return this.facets = new Backbone.Collection;
+      return this.codingRules = new Backbone.Collection;
     });
     App.addInitializer(function() {
       this.codingRulesActionsView = new CodingRulesActionsView({
index 9f2c5dd7ecf51e041d07774d824a3ef8ce10d692..0e3abd4cfd2676267257ce2cb2f88d9a1b1ac1c3 100644 (file)
@@ -17,7 +17,6 @@ define [
       resultsRegion: '.navigator-results'
       detailsRegion: '.navigator-details'
       filtersRegion: '.navigator-filters'
-      facetsRegion: '.navigator-facets'
 
 
     onRender: ->
index 2a2f75f1663c4e30642428a61d998fd22af58ac8..91d7c1067ee885e6c8b28da3be2a04482216d2b1 100644 (file)
@@ -24,8 +24,7 @@
         actionsRegion: '.navigator-actions',
         resultsRegion: '.navigator-results',
         detailsRegion: '.navigator-details',
-        filtersRegion: '.navigator-filters',
-        facetsRegion: '.navigator-facets'
+        filtersRegion: '.navigator-filters'
       };
 
       AppLayout.prototype.onRender = function() {
index 80b4092174aaae2b60decf431f422775a4783512..1423e37bdb0f4485209b7b0570c442c4da2bf78e 100644 (file)
@@ -76,11 +76,6 @@ define ['jquery.mockjax'], ->
       paging:
         total: 5
         fTotal: '5'
-      facets: [
-        { name: 'Language', options: ['Java', 'JavaScript'] }
-        { name: 'Repository', options: ['PMD', 'PMD Unit Tests', 'Checkstyle'] }
-        { name: 'Tags', options: ['brain-overload', 'bug', 'comment', 'convention', 'error-handling', 'formatting', 'java8'] }
-      ]
 
 
 
index e8a5a7d976067f99973b5d40b4c1545b8e41f065..ad63ef15be6cc40e62a76de8fae774d7379ff1e3 100644 (file)
         paging: {
           total: 5,
           fTotal: '5'
-        },
-        facets: [
-          {
-            name: 'Language',
-            options: ['Java', 'JavaScript']
-          }, {
-            name: 'Repository',
-            options: ['PMD', 'PMD Unit Tests', 'Checkstyle']
-          }, {
-            name: 'Tags',
-            options: ['brain-overload', 'bug', 'comment', 'convention', 'error-handling', 'formatting', 'java8']
-          }
-        ]
+        }
       })
     });
     jQuery.mockjax({
diff --git a/sonar-server/src/main/webapp/javascripts/coding-rules/views/coding-rules-facets-item-view.coffee b/sonar-server/src/main/webapp/javascripts/coding-rules/views/coding-rules-facets-item-view.coffee
deleted file mode 100644 (file)
index 1232a3d..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-define [
-  'backbone.marionette',
-  'common/handlebars-extensions'
-], (
-  Marionette,
-) ->
-
-  class CodingRulesFacetsView extends Marionette.ItemView
-    tagName: 'li'
-    className: 'navigator-facets-list-item'
-    template: getTemplate '#coding-rules-facets-item-template'
diff --git a/sonar-server/src/main/webapp/javascripts/coding-rules/views/coding-rules-facets-item-view.js b/sonar-server/src/main/webapp/javascripts/coding-rules/views/coding-rules-facets-item-view.js
deleted file mode 100644 (file)
index 85dcc58..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-// Generated by CoffeeScript 1.6.3
-(function() {
-  var __hasProp = {}.hasOwnProperty,
-    __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
-
-  define(['backbone.marionette', 'common/handlebars-extensions'], function(Marionette) {
-    var CodingRulesFacetsView, _ref;
-    return CodingRulesFacetsView = (function(_super) {
-      __extends(CodingRulesFacetsView, _super);
-
-      function CodingRulesFacetsView() {
-        _ref = CodingRulesFacetsView.__super__.constructor.apply(this, arguments);
-        return _ref;
-      }
-
-      CodingRulesFacetsView.prototype.tagName = 'li';
-
-      CodingRulesFacetsView.prototype.className = 'navigator-facets-list-item';
-
-      CodingRulesFacetsView.prototype.template = getTemplate('#coding-rules-facets-item-template');
-
-      return CodingRulesFacetsView;
-
-    })(Marionette.ItemView);
-  });
-
-}).call(this);
diff --git a/sonar-server/src/main/webapp/javascripts/coding-rules/views/coding-rules-facets-view.coffee b/sonar-server/src/main/webapp/javascripts/coding-rules/views/coding-rules-facets-view.coffee
deleted file mode 100644 (file)
index 0dd3b2d..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-define [
-  'backbone.marionette',
-  'coding-rules/views/coding-rules-facets-item-view'
-], (
-  Marionette,
-  CodingRulesFacetsItemView
-) ->
-
-  class CodingRulesFacetsView extends Marionette.CollectionView
-    tagName: 'ul'
-    className: 'navigator-facets-list'
-    itemView: CodingRulesFacetsItemView
-
-
-    ui:
-      options: '.navigator-facets-list-item-option'
-
-
-    events:
-      'click @ui.options': 'toggleOption'
-
-
-    toggleOption: (e) ->
-      jQuery(e.currentTarget).toggleClass 'active'
-      @options.app.fetchFirstPage false
diff --git a/sonar-server/src/main/webapp/javascripts/coding-rules/views/coding-rules-facets-view.js b/sonar-server/src/main/webapp/javascripts/coding-rules/views/coding-rules-facets-view.js
deleted file mode 100644 (file)
index 6e3d906..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-// Generated by CoffeeScript 1.6.3
-(function() {
-  var __hasProp = {}.hasOwnProperty,
-    __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
-
-  define(['backbone.marionette', 'coding-rules/views/coding-rules-facets-item-view'], function(Marionette, CodingRulesFacetsItemView) {
-    var CodingRulesFacetsView, _ref;
-    return CodingRulesFacetsView = (function(_super) {
-      __extends(CodingRulesFacetsView, _super);
-
-      function CodingRulesFacetsView() {
-        _ref = CodingRulesFacetsView.__super__.constructor.apply(this, arguments);
-        return _ref;
-      }
-
-      CodingRulesFacetsView.prototype.tagName = 'ul';
-
-      CodingRulesFacetsView.prototype.className = 'navigator-facets-list';
-
-      CodingRulesFacetsView.prototype.itemView = CodingRulesFacetsItemView;
-
-      CodingRulesFacetsView.prototype.ui = {
-        options: '.navigator-facets-list-item-option'
-      };
-
-      CodingRulesFacetsView.prototype.events = {
-        'click @ui.options': 'toggleOption'
-      };
-
-      CodingRulesFacetsView.prototype.toggleOption = function(e) {
-        jQuery(e.currentTarget).toggleClass('active');
-        return this.options.app.fetchFirstPage(false);
-      };
-
-      return CodingRulesFacetsView;
-
-    })(Marionette.CollectionView);
-  });
-
-}).call(this);
index 7f9f781a642206b5a2dfe26854f392ccd4560931..735bca885836de626285d120d9ac5cd230b6b1f6 100644 (file)
 .coding-rules-page .navigator-results .spinner {
   margin: 10px;
 }
-.coding-rules-page .navigator-actions,
-.coding-rules-page .navigator-details {
-  top: 194px;
-}
-.coding-rules-page .navigator-results {
-  top: 224px;
-}
 /*
  * Detail
  */
index 78ee8871a4d03f61a6ca619d423838262543caa9..26c61ba854606f13a95fc3584736538f30ba9bed 100644 (file)
@@ -9,16 +9,6 @@
     margin: @navigatorPadding;
   }
 
-  .navigator-actions,
-  .navigator-details {
-    top: @navigatorTopOffset + @navigatorHeaderHeight + @navigatorFiltersHeight + @navigatorFacetsHeight;
-  }
-
-  .navigator-results {
-    top: @navigatorTopOffset + @navigatorHeaderHeight + @navigatorFiltersHeight + @navigatorFacetsHeight +
-         @navigatorStatusHeight;
-  }
-
 }