]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5007 Add second POC
authorStas Vilchik <vilchiks@gmail.com>
Fri, 7 Mar 2014 17:07:10 +0000 (18:07 +0100)
committerStas Vilchik <vilchiks@gmail.com>
Fri, 7 Mar 2014 17:07:18 +0000 (18:07 +0100)
37 files changed:
sonar-server/src/main/webapp/WEB-INF/app/views/coding_rules/index.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/coding_rules/templates/_coding_rules_facets_item_template.hbs.erb [new file with mode: 0644]
sonar-server/src/main/webapp/WEB-INF/app/views/coding_rules/templates/_coding_rules_header_quality_profiles_template.hbs.erb [new file with mode: 0644]
sonar-server/src/main/webapp/WEB-INF/app/views/coding_rules/templates/_coding_rules_header_template.hbs.erb
sonar-server/src/main/webapp/WEB-INF/app/views/coding_rules/templates/_coding_rules_layout.hbs.erb
sonar-server/src/main/webapp/fonts/sonar.eot
sonar-server/src/main/webapp/fonts/sonar.svg
sonar-server/src/main/webapp/fonts/sonar.ttf
sonar-server/src/main/webapp/fonts/sonar.woff
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/collections/coding-rules.coffee [deleted file]
sonar-server/src/main/webapp/javascripts/coding-rules/collections/coding-rules.js [deleted file]
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/models/coding-rule.coffee [deleted file]
sonar-server/src/main/webapp/javascripts/coding-rules/models/coding-rule.js [deleted file]
sonar-server/src/main/webapp/javascripts/coding-rules/views/coding-rules-facets-item-view.coffee [new file with mode: 0644]
sonar-server/src/main/webapp/javascripts/coding-rules/views/coding-rules-facets-item-view.js [new file with mode: 0644]
sonar-server/src/main/webapp/javascripts/coding-rules/views/coding-rules-facets-view.coffee [new file with mode: 0644]
sonar-server/src/main/webapp/javascripts/coding-rules/views/coding-rules-facets-view.js [new file with mode: 0644]
sonar-server/src/main/webapp/javascripts/coding-rules/views/coding-rules-list-item-view.coffee
sonar-server/src/main/webapp/javascripts/coding-rules/views/coding-rules-list-item-view.js
sonar-server/src/main/webapp/javascripts/coding-rules/views/header-quality-profiles-view.coffee [new file with mode: 0644]
sonar-server/src/main/webapp/javascripts/coding-rules/views/header-quality-profiles-view.js [new file with mode: 0644]
sonar-server/src/main/webapp/javascripts/coding-rules/views/header-view.coffee
sonar-server/src/main/webapp/javascripts/coding-rules/views/header-view.js
sonar-server/src/main/webapp/stylesheets/coding-rules.css
sonar-server/src/main/webapp/stylesheets/coding-rules.less
sonar-server/src/main/webapp/stylesheets/icons.css
sonar-server/src/main/webapp/stylesheets/icons.less
sonar-server/src/main/webapp/stylesheets/navigator.css
sonar-server/src/main/webapp/stylesheets/navigator/base.css
sonar-server/src/main/webapp/stylesheets/navigator/base.less
sonar-server/src/main/webapp/stylesheets/navigator/config.less

index e5bb24f38a985b84b5c24ba358bec5a86988e558..9f1751d81dab21d61f0c1208910f3ab3518bdfce 100644 (file)
 <%= render :partial => '/navigator/filter_templates' -%>
 <%= render :partial => '/coding_rules/templates/coding_rules_layout.hbs' -%>
 <%= render :partial => '/coding_rules/templates/coding_rules_header_template.hbs' -%>
+<%= render :partial => '/coding_rules/templates/coding_rules_header_quality_profiles_template.hbs' -%>
 <%= render :partial => '/coding_rules/templates/coding_rules_actions_template.hbs' -%>
 <%= render :partial => '/coding_rules/templates/coding_rules_filter_bar_template.hbs' -%>
 <%= render :partial => '/coding_rules/templates/coding_rules_list_item_template.hbs' -%>
 <%= render :partial => '/coding_rules/templates/coding_rules_list_empty_template.hbs' -%>
 <%= render :partial => '/coding_rules/templates/coding_rules_detail_template.hbs' -%>
+<%= render :partial => '/coding_rules/templates/coding_rules_facets_item_template.hbs' -%>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/coding_rules/templates/_coding_rules_facets_item_template.hbs.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/coding_rules/templates/_coding_rules_facets_item_template.hbs.erb
new file mode 100644 (file)
index 0000000..95c912f
--- /dev/null
@@ -0,0 +1,11 @@
+<script id="coding-rules-facets-item-template" type="text/x-handlebars-template">
+  <h3 class="navigator-facets-list-item-name">{{name}}</h3>
+  <ul class="navigator-facets-list-item-options">
+    {{#each options}}
+      <li class="navigator-facets-list-item-option">
+        <span class="navigator-facets-list-item-option-name">{{this}}</span>
+        <span class="navigator-facets-list-item-option-stat subtitle">42</span>
+      </li>
+    {{/each}}
+  </ul>
+</script>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/coding_rules/templates/_coding_rules_header_quality_profiles_template.hbs.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/coding_rules/templates/_coding_rules_header_quality_profiles_template.hbs.erb
new file mode 100644 (file)
index 0000000..5f49de9
--- /dev/null
@@ -0,0 +1,17 @@
+<script id="coding-rules-header-quality-profiles-template" type="text/x-handlebars-template">
+  <ul class="navigator-filter-select-list">
+    <li>
+      <label title="{{t 'coding_rules.page'}}">
+          <span>{{t 'coding_rules.page'}}</span>
+      </label>
+    </li>
+    {{#each items}}
+      <li>
+        <label title="{{name}}">
+          <span>{{name}} <span class="subtitle">{{lang}}</span>
+        </span>
+        </label>
+      </li>
+    {{/each}}
+  </ul>
+</script>
index bfee909e900f403a009b66cfe1934c644bf8dd43..a628448a514fedda05ca3859871a2257023ff0a3 100644 (file)
@@ -1,5 +1,11 @@
 <script id="coding-rules-header-template" type="text/x-handlebars-template">
-  <h1 class="navigator-header-title">{{t 'coding_rules.page'}}</h1>
+  <div class="navigator-header-menu-toggle">
+    <i class="icon-list"></i>
+  </div>
+
+  <h1 class="navigator-header-title">
+    {{#if header}}{{{header}}}{{else}}{{t 'coding_rules.page'}}{{/if}}
+  </h1>
 
   <div class="navigator-header-actions button-group">
     <button id="issues-new-search">{{t 'coding_rules.new_search'}}</button>
index debdccc91f1e31f74ce90dac04f3bf5ecff4b8bf..90f4a0ee77328a04ca491b2a63b76e6a82fb82c6 100644 (file)
@@ -1,6 +1,7 @@
 <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 6c78bb318dca2e22e6b4a4944b74336476a29916..38a3bbfe0727ac7ddb5799d5be519e1c19404903 100755 (executable)
Binary files a/sonar-server/src/main/webapp/fonts/sonar.eot and b/sonar-server/src/main/webapp/fonts/sonar.eot differ
index 1ca6d69a9eb69c72120a1b2123ac99011ee88c01..a686944a8fc327f35b69deb08264bb7260a5a680 100755 (executable)
@@ -20,6 +20,7 @@
 <glyph unicode="&#xf014;" d="M877.714 426.667q0-119.429-58.857-220.286t-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857 220.286-58.857 159.714-159.714 58.857-220.286z" />
 <glyph unicode="&#xf015;" d="M585.143 426.667q0 60.571-42.857 103.429t-103.429 42.857-103.429-42.857-42.857-103.429 42.857-103.429 103.429-42.857 103.429 42.857 42.857 103.429zM877.714 488.953v-126.857q0-6.857-4.571-13.143t-11.429-7.429l-105.714-16q-10.857-30.857-22.286-52 20-28.571 61.143-78.857 5.714-6.857 5.714-14.286t-5.143-13.143q-15.429-21.143-56.571-61.714t-53.714-40.571q-6.857 0-14.857 5.143l-78.857 61.714q-25.143-13.143-52-21.714-9.143-77.714-16.571-106.286-4-16-20.571-16h-126.857q-8 0-14 4.857t-6.571 12.286l-16 105.143q-28 9.143-51.429 21.143l-80.571-61.143q-5.714-5.143-14.286-5.143-8 0-14.286 6.286-72 65.143-94.286 96-4 5.714-4 13.143 0 6.857 4.571 13.143 8.571 12 29.143 38t30.857 40.286q-15.429 28.571-23.429 56.571l-104.571 15.429q-7.429 1.143-12 7.143t-4.571 13.429v126.857q0 6.857 4.571 13.143t10.857 7.429l106.286 16q8 26.286 22.286 52.571-22.857 32.571-61.143 78.857-5.714 6.857-5.714 13.714 0 5.714 5.143 13.143 14.857 20.571 56.286 61.429t54 40.857q7.429 0 14.857-5.714l78.857-61.143q25.143 13.143 52 21.714 9.143 77.714 16.571 106.286 4 16 20.571 16h126.857q8 0 14-4.857t6.571-12.286l16-105.143q28-9.143 51.429-21.143l81.143 61.143q5.143 5.143 13.714 5.143 7.429 0 14.286-5.714 73.714-68 94.286-97.143 4-4.571 4-12.571 0-6.857-4.571-13.143-8.571-12-29.143-38t-30.857-40.286q14.857-28.571 23.429-56l104.571-16q7.429-1.143 12-7.143t4.571-13.429z" />
 <glyph unicode="&#xf039;" d="M1024 170.667v-73.143q0-14.857-10.857-25.714t-25.714-10.857h-950.857q-14.857 0-25.714 10.857t-10.857 25.714v73.143q0 14.857 10.857 25.714t25.714 10.857h950.857q14.857 0 25.714-10.857t10.857-25.714zM1024 390.096v-73.143q0-14.857-10.857-25.714t-25.714-10.857h-950.857q-14.857 0-25.714 10.857t-10.857 25.714v73.143q0 14.857 10.857 25.714t25.714 10.857h950.857q14.857 0 25.714-10.857t10.857-25.714zM1024 609.524v-73.143q0-14.857-10.857-25.714t-25.714-10.857h-950.857q-14.857 0-25.714 10.857t-10.857 25.714v73.143q0 14.857 10.857 25.714t25.714 10.857h950.857q14.857 0 25.714-10.857t10.857-25.714zM1024 828.953v-73.143q0-14.857-10.857-25.714t-25.714-10.857h-950.857q-14.857 0-25.714 10.857t-10.857 25.714v73.143q0 14.857 10.857 25.714t25.714 10.857h950.857q14.857 0 25.714-10.857t10.857-25.714z" />
+<glyph unicode="&#xf03a;" d="M146.286 188.953v-109.714q0-7.429-5.429-12.857t-12.857-5.429h-109.714q-7.429 0-12.857 5.429t-5.429 12.857v109.714q0 7.429 5.429 12.857t12.857 5.429h109.714q7.429 0 12.857-5.429t5.429-12.857zM146.286 408.381v-109.714q0-7.429-5.429-12.857t-12.857-5.429h-109.714q-7.429 0-12.857 5.429t-5.429 12.857v109.714q0 7.429 5.429 12.857t12.857 5.429h109.714q7.429 0 12.857-5.429t5.429-12.857zM146.286 627.81v-109.714q0-7.429-5.429-12.857t-12.857-5.429h-109.714q-7.429 0-12.857 5.429t-5.429 12.857v109.714q0 7.429 5.429 12.857t12.857 5.429h109.714q7.429 0 12.857-5.429t5.429-12.857zM1024 188.953v-109.714q0-7.429-5.429-12.857t-12.857-5.429h-768q-7.429 0-12.857 5.429t-5.429 12.857v109.714q0 7.429 5.429 12.857t12.857 5.429h768q7.429 0 12.857-5.429t5.429-12.857zM146.286 847.238v-109.714q0-7.429-5.429-12.857t-12.857-5.429h-109.714q-7.429 0-12.857 5.429t-5.429 12.857v109.714q0 7.429 5.429 12.857t12.857 5.429h109.714q7.429 0 12.857-5.429t5.429-12.857zM1024 408.381v-109.714q0-7.429-5.429-12.857t-12.857-5.429h-768q-7.429 0-12.857 5.429t-5.429 12.857v109.714q0 7.429 5.429 12.857t12.857 5.429h768q7.429 0 12.857-5.429t5.429-12.857zM1024 627.81v-109.714q0-7.429-5.429-12.857t-12.857-5.429h-768q-7.429 0-12.857 5.429t-5.429 12.857v109.714q0 7.429 5.429 12.857t12.857 5.429h768q7.429 0 12.857-5.429t5.429-12.857zM1024 847.238v-109.714q0-7.429-5.429-12.857t-12.857-5.429h-768q-7.429 0-12.857 5.429t-5.429 12.857v109.714q0 7.429 5.429 12.857t12.857 5.429h768q7.429 0 12.857-5.429t5.429-12.857z" />
 <glyph unicode="&#xf046;" d="M804.571 407.238v-181.714q0-68-48.286-116.286t-116.286-48.286h-475.429q-68 0-116.286 48.286t-48.286 116.286v475.429q0 68 48.286 116.286t116.286 48.286h475.429q36 0 66.857-14.286 8.571-4 10.286-13.143 1.714-9.714-5.143-16.571l-28-28q-5.714-5.714-13.143-5.714-1.714 0-5.143 1.143-13.143 3.429-25.714 3.429h-475.429q-37.714 0-64.571-26.857t-26.857-64.571v-475.429q0-37.714 26.857-64.571t64.571-26.857h475.429q37.714 0 64.571 26.857t26.857 64.571v145.143q0 7.429 5.143 12.571l36.571 36.571q5.714 5.714 13.143 5.714 3.429 0 6.857-1.714 11.429-4.571 11.429-16.571zM936.571 686.667l-465.143-465.143q-13.714-13.714-32.571-13.714t-32.571 13.714l-245.714 245.714q-13.714 13.714-13.714 32.571t13.714 32.571l62.857 62.857q13.714 13.714 32.571 13.714t32.571-13.714l150.286-150.286 369.714 369.714q13.714 13.714 32.571 13.714t32.571-13.714l62.857-62.857q13.714-13.714 13.714-32.571t-13.714-32.571z" horiz-adv-x="951" />
 <glyph unicode="&#xf057;" d="M656.571 297.524q0 14.857-10.857 25.714l-103.429 103.429 103.429 103.429q10.857 10.857 10.857 25.714 0 15.429-10.857 26.286l-51.429 51.429q-10.857 10.857-26.286 10.857-14.857 0-25.714-10.857l-103.429-103.429-103.429 103.429q-10.857 10.857-25.714 10.857-15.429 0-26.286-10.857l-51.429-51.429q-10.857-10.857-10.857-26.286 0-14.857 10.857-25.714l103.429-103.429-103.429-103.429q-10.857-10.857-10.857-25.714 0-15.429 10.857-26.286l51.429-51.429q10.857-10.857 26.286-10.857 14.857 0 25.714 10.857l103.429 103.429 103.429-103.429q10.857-10.857 25.714-10.857 15.429 0 26.286 10.857l51.429 51.429q10.857 10.857 10.857 26.286zM877.714 426.667q0-119.429-58.857-220.286t-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857 220.286-58.857 159.714-159.714 58.857-220.286z" />
 <glyph unicode="&#xf059;" d="M512 152.381v109.714q0 8-5.143 13.143t-13.143 5.143h-109.714q-8 0-13.143-5.143t-5.143-13.143v-109.714q0-8 5.143-13.143t13.143-5.143h109.714q8 0 13.143 5.143t5.143 13.143zM658.286 536.381q0 50.286-31.714 93.143t-79.143 66.286-97.143 23.429q-138.857 0-212-121.714-8.571-13.714 4.571-24l75.429-57.143q4-3.429 10.857-3.429 9.143 0 14.286 6.857 30.286 38.857 49.143 52.571 19.429 13.714 49.143 13.714 27.429 0 48.857-14.857t21.429-33.714q0-21.714-11.429-34.857t-38.857-25.714q-36-16-66-49.429t-30-71.714v-20.571q0-8 5.143-13.143t13.143-5.143h109.714q8 0 13.143 5.143t5.143 13.143q0 10.857 12.286 28.286t31.143 28.286q18.286 10.286 28 16.286t26.286 20 25.429 27.429 16 34.571 7.143 46.286zM877.714 426.667q0-119.429-58.857-220.286t-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857 220.286-58.857 159.714-159.714 58.857-220.286z" />
index 9a92996ee1cba56c5bceb2855f14b949bee62926..a5c8be5f11a6372ce83e1dc98cd35d1204dee3f4 100755 (executable)
Binary files a/sonar-server/src/main/webapp/fonts/sonar.ttf and b/sonar-server/src/main/webapp/fonts/sonar.ttf differ
index 3a1a7f10bc635d22ca3d40232acae289d3e044a2..380f913c1310b285ee06136f9a106f5c4abe71fe 100755 (executable)
Binary files a/sonar-server/src/main/webapp/fonts/sonar.woff and b/sonar-server/src/main/webapp/fonts/sonar.woff differ
index 81c81b651873f6c0f7a86f785cafe31c150212ed..ac7ee48060f7cb3158df176d78efc77b31ac523a 100644 (file)
@@ -23,14 +23,12 @@ requirejs [
   'coding-rules/layout',
   'coding-rules/router',
 
-  # models & collections
-  'coding-rules/collections/coding-rules',
-
   # views
   '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',
 
   # filters
   'navigator/filters/base-filters',
@@ -45,14 +43,12 @@ requirejs [
   CodingRulesLayout,
   CodingRulesRouter,
 
-  # models & collections
-  CodingRules,
-
   # views
   CodingRulesHeaderView,
   CodingRulesActionsView,
   CodingRulesFilterBarView,
   CodingRulesListView,
+  CodingRulesFacetsView,
 
   # filters
   BaseFilters,
@@ -112,13 +108,29 @@ requirejs [
     @storeQuery query, @codingRules.sorting
 
     @layout.showSpinner 'resultsRegion'
-    @codingRules.fetch(data: fetchQuery, remove: !!firstPage).done =>
+    @layout.showSpinner 'facetsRegion'
+    jQuery.ajax
+      url: "#{baseUrl}/api/codingrules/search"
+      data: fetchQuery
+    .done (r) =>
+      if firstPage
+        @codingRules.reset r.codingrules
+      else
+        @codingRules.add r.codingrules
+      @codingRules.paging = r.paging
       @codingRulesListView = new CodingRulesListView
         app: @
         collection: @codingRules
       @layout.resultsRegion.show @codingRulesListView
       @codingRulesListView.selectFirst()
 
+      @facets.reset r.facets
+      @codingRulesFacetsView = new CodingRulesFacetsView
+        app: @
+        collection: @facets
+      @layout.facetsRegion.show @codingRulesFacetsView
+
+
 
   App.fetchFirstPage = ->
     @pageIndex = 1
@@ -145,7 +157,8 @@ requirejs [
 
   # Define coding rules
   App.addInitializer ->
-    @codingRules = new CodingRules
+    @codingRules = new Backbone.Collection
+    @facets = new Backbone.Collection
 
 
   # Construct status bar
@@ -268,6 +281,7 @@ requirejs [
   .done (r) ->
       App.appState = new Backbone.Model
       App.state = new Backbone.Model
+      App.qualityProfiles = r.qualityprofiles
       window.messages = r.messages
 
       # Remove the initial spinner
index 4736322069fe562046320f3ef69e7191e15fae79..886acdb867a09d1ca7554ffc188641ee1a36e88c 100644 (file)
@@ -22,7 +22,7 @@
     }
   });
 
-  requirejs(['backbone', 'backbone.marionette', 'coding-rules/layout', 'coding-rules/router', 'coding-rules/collections/coding-rules', '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, CodingRules, CodingRulesHeaderView, CodingRulesActionsView, CodingRulesFilterBarView, CodingRulesListView, 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', '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) {
     var App, appXHR;
     jQuery.ajaxSetup({
       error: function(jqXHR) {
       }
       this.storeQuery(query, this.codingRules.sorting);
       this.layout.showSpinner('resultsRegion');
-      return this.codingRules.fetch({
-        data: fetchQuery,
-        remove: !!firstPage
-      }).done(function() {
+      this.layout.showSpinner('facetsRegion');
+      return jQuery.ajax({
+        url: "" + baseUrl + "/api/codingrules/search",
+        data: fetchQuery
+      }).done(function(r) {
+        if (firstPage) {
+          _this.codingRules.reset(r.codingrules);
+        } else {
+          _this.codingRules.add(r.codingrules);
+        }
+        _this.codingRules.paging = r.paging;
         _this.codingRulesListView = new CodingRulesListView({
           app: _this,
           collection: _this.codingRules
         });
         _this.layout.resultsRegion.show(_this.codingRulesListView);
-        return _this.codingRulesListView.selectFirst();
+        _this.codingRulesListView.selectFirst();
+        _this.facets.reset(r.facets);
+        _this.codingRulesFacetsView = new CodingRulesFacetsView({
+          app: _this,
+          collection: _this.facets
+        });
+        return _this.layout.facetsRegion.show(_this.codingRulesFacetsView);
       });
     };
     App.fetchFirstPage = function() {
       return this.layout.headerRegion.show(this.codingRulesHeaderView);
     });
     App.addInitializer(function() {
-      return this.codingRules = new CodingRules;
+      this.codingRules = new Backbone.Collection;
+      return this.facets = new Backbone.Collection;
     });
     App.addInitializer(function() {
       this.codingRulesActionsView = new CodingRulesActionsView({
     return jQuery.when(appXHR).done(function(r) {
       App.appState = new Backbone.Model;
       App.state = new Backbone.Model;
+      App.qualityProfiles = r.qualityprofiles;
       window.messages = r.messages;
       jQuery('#coding-rules-page-loader').remove();
       return App.start();
diff --git a/sonar-server/src/main/webapp/javascripts/coding-rules/collections/coding-rules.coffee b/sonar-server/src/main/webapp/javascripts/coding-rules/collections/coding-rules.coffee
deleted file mode 100644 (file)
index b24c751..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-define [
-  'backbone',
-  'coding-rules/models/coding-rule'
-], (
-  Backbone,
-  CodingRule
-) ->
-
-  class CodingRules extends Backbone.Collection
-    model: CodingRule
-
-
-    url: ->
-      "#{baseUrl}/api/codingrules/search"
-
-
-    parse: (r) ->
-      @paging = r.paging
-      r.codingrules
diff --git a/sonar-server/src/main/webapp/javascripts/coding-rules/collections/coding-rules.js b/sonar-server/src/main/webapp/javascripts/coding-rules/collections/coding-rules.js
deleted file mode 100644 (file)
index 14264ad..0000000
+++ /dev/null
@@ -1,32 +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', 'coding-rules/models/coding-rule'], function(Backbone, CodingRule) {
-    var CodingRules, _ref;
-    return CodingRules = (function(_super) {
-      __extends(CodingRules, _super);
-
-      function CodingRules() {
-        _ref = CodingRules.__super__.constructor.apply(this, arguments);
-        return _ref;
-      }
-
-      CodingRules.prototype.model = CodingRule;
-
-      CodingRules.prototype.url = function() {
-        return "" + baseUrl + "/api/codingrules/search";
-      };
-
-      CodingRules.prototype.parse = function(r) {
-        this.paging = r.paging;
-        return r.codingrules;
-      };
-
-      return CodingRules;
-
-    })(Backbone.Collection);
-  });
-
-}).call(this);
index 0e3abd4cfd2676267257ce2cb2f88d9a1b1ac1c3..9f2c5dd7ecf51e041d07774d824a3ef8ce10d692 100644 (file)
@@ -17,6 +17,7 @@ define [
       resultsRegion: '.navigator-results'
       detailsRegion: '.navigator-details'
       filtersRegion: '.navigator-filters'
+      facetsRegion: '.navigator-facets'
 
 
     onRender: ->
index 91d7c1067ee885e6c8b28da3be2a04482216d2b1..2a2f75f1663c4e30642428a61d998fd22af58ac8 100644 (file)
@@ -24,7 +24,8 @@
         actionsRegion: '.navigator-actions',
         resultsRegion: '.navigator-results',
         detailsRegion: '.navigator-details',
-        filtersRegion: '.navigator-filters'
+        filtersRegion: '.navigator-filters',
+        facetsRegion: '.navigator-facets'
       };
 
       AppLayout.prototype.onRender = function() {
index efaaa42739e36f8c8d2b6c5799849fbdca316477..587605045f5a2cb0f0a5fbac66293ea42f6f0501 100644 (file)
@@ -7,6 +7,11 @@ define ['jquery.mockjax'], ->
   jQuery.mockjax
     url: "#{baseUrl}/api/codingrules/app"
     responseText: JSON.stringify
+      qualityprofiles: [
+        { name: 'Sonar Way', lang: 'Java' }
+        { name: 'Sonar Way', lang: 'JavaScript' }
+        { name: 'Quality Profile 1', lang: 'Java' }
+      ]
       messages:
         'all': 'All'
         'bulk_change': 'Bulk Change'
@@ -66,6 +71,12 @@ 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'] }
+      ]
+
 
 
   # GET /api/codingrules/show
@@ -96,28 +107,28 @@ define ['jquery.mockjax'], ->
             public int[][] getMatrix() { /* ... */ }  // Compliant
             </pre>'''
 
-      qualityprofiles: [
-        {
-          name: 'SonarWay'
-          severity: 'MINOR'
-          canDeactivate: false
-          canUpdate: false
-          parameters: [
-            { key: 'max', value: 8 }
-          ]
-
-        },
-        {
-          name: 'Quality Profile 1'
-          severity: 'MAJOR'
-          canDeactivate: true
-          canUpdate: true
-          parameters: [
-            { key: 'max', value: 6 }
-          ]
-
-        }
-      ]
+        qualityProfiles: [
+          {
+            name: 'SonarWay'
+            severity: 'MINOR'
+            canDeactivate: false
+            canUpdate: false
+            parameters: [
+              { key: 'max', value: 8 }
+            ]
+
+          },
+          {
+            name: 'Quality Profile 1'
+            severity: 'MAJOR'
+            canDeactivate: true
+            canUpdate: true
+            parameters: [
+              { key: 'max', value: 6 }
+            ]
+
+          }
+        ]
 
 
 
index 26c8b1bdbe17157ce28f3566d6574cda87f699ed..27408d8285b7787103ea90ac8e381ea81de2765c 100644 (file)
@@ -6,6 +6,18 @@
     jQuery.mockjax({
       url: "" + baseUrl + "/api/codingrules/app",
       responseText: JSON.stringify({
+        qualityprofiles: [
+          {
+            name: 'Sonar Way',
+            lang: 'Java'
+          }, {
+            name: 'Sonar Way',
+            lang: 'JavaScript'
+          }, {
+            name: 'Quality Profile 1',
+            lang: 'Java'
+          }
+        ],
         messages: {
           'all': 'All',
           'bulk_change': 'Bulk Change',
         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({
         codingrule: {
           name: 'Array designators "[]" should be located after the type in method signatures',
           language: 'Java',
-          description: '<p>\nAccording to the Java Language Specification:\n</p>\n\n<pre>For compatibility with older versions of the Java SE platform,\nthe declaration of a method that returns an array is allowed to place (some or all of) the empty bracket pairs that form the declaration of the array type after the formal parameter list.\nThis obsolescent syntax should not be used in new code.\n</pre>\n\n<p>The following code snippet illustrates this rule:</p>\n\n<pre>public int getVector()[] { /* ... */ }    // Non-Compliant\n\npublic int[] getVector() { /* ... */ }    // Compliant\n\npublic int[] getMatrix()[] { /* ... */ }  // Non-Compliant\n\npublic int[][] getMatrix() { /* ... */ }  // Compliant\n</pre>'
-        },
-        qualityprofiles: [
-          {
-            name: 'SonarWay',
-            severity: 'MINOR',
-            canDeactivate: false,
-            canUpdate: false,
-            parameters: [
-              {
-                key: 'max',
-                value: 8
-              }
-            ]
-          }, {
-            name: 'Quality Profile 1',
-            severity: 'MAJOR',
-            canDeactivate: true,
-            canUpdate: true,
-            parameters: [
-              {
-                key: 'max',
-                value: 6
-              }
-            ]
-          }
-        ]
+          description: '<p>\nAccording to the Java Language Specification:\n</p>\n\n<pre>For compatibility with older versions of the Java SE platform,\nthe declaration of a method that returns an array is allowed to place (some or all of) the empty bracket pairs that form the declaration of the array type after the formal parameter list.\nThis obsolescent syntax should not be used in new code.\n</pre>\n\n<p>The following code snippet illustrates this rule:</p>\n\n<pre>public int getVector()[] { /* ... */ }    // Non-Compliant\n\npublic int[] getVector() { /* ... */ }    // Compliant\n\npublic int[] getMatrix()[] { /* ... */ }  // Non-Compliant\n\npublic int[][] getMatrix() { /* ... */ }  // Compliant\n</pre>',
+          qualityProfiles: [
+            {
+              name: 'SonarWay',
+              severity: 'MINOR',
+              canDeactivate: false,
+              canUpdate: false,
+              parameters: [
+                {
+                  key: 'max',
+                  value: 8
+                }
+              ]
+            }, {
+              name: 'Quality Profile 1',
+              severity: 'MAJOR',
+              canDeactivate: true,
+              canUpdate: true,
+              parameters: [
+                {
+                  key: 'max',
+                  value: 6
+                }
+              ]
+            }
+          ]
+        }
       })
     });
     return jQuery.mockjax({
diff --git a/sonar-server/src/main/webapp/javascripts/coding-rules/models/coding-rule.coffee b/sonar-server/src/main/webapp/javascripts/coding-rules/models/coding-rule.coffee
deleted file mode 100644 (file)
index 7561848..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-define [
-  'backbone'
-], (
-  Backbone
-) ->
-
-  class CodingRule extends Backbone.Model
-
-    url: ->
-      "#{baseUrl}/api/codingrules/show"
-
-
-    parse: (r) ->
-      model = if r.codingrule? then r.codingrule else r
-      _.extend model, qualityProfiles: r.qualityprofiles if r.qualityprofiles?
-      model
diff --git a/sonar-server/src/main/webapp/javascripts/coding-rules/models/coding-rule.js b/sonar-server/src/main/webapp/javascripts/coding-rules/models/coding-rule.js
deleted file mode 100644 (file)
index accd6f9..0000000
+++ /dev/null
@@ -1,36 +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'], function(Backbone) {
-    var CodingRule, _ref;
-    return CodingRule = (function(_super) {
-      __extends(CodingRule, _super);
-
-      function CodingRule() {
-        _ref = CodingRule.__super__.constructor.apply(this, arguments);
-        return _ref;
-      }
-
-      CodingRule.prototype.url = function() {
-        return "" + baseUrl + "/api/codingrules/show";
-      };
-
-      CodingRule.prototype.parse = function(r) {
-        var model;
-        model = r.codingrule != null ? r.codingrule : r;
-        if (r.qualityprofiles != null) {
-          _.extend(model, {
-            qualityProfiles: r.qualityprofiles
-          });
-        }
-        return model;
-      };
-
-      return CodingRule;
-
-    })(Backbone.Model);
-  });
-
-}).call(this);
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
new file mode 100644 (file)
index 0000000..1232a3d
--- /dev/null
@@ -0,0 +1,11 @@
+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
new file mode 100644 (file)
index 0000000..85dcc58
--- /dev/null
@@ -0,0 +1,27 @@
+// 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
new file mode 100644 (file)
index 0000000..b204fe8
--- /dev/null
@@ -0,0 +1,12 @@
+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
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
new file mode 100644 (file)
index 0000000..10f8775
--- /dev/null
@@ -0,0 +1,27 @@
+// 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;
+
+      return CodingRulesFacetsView;
+
+    })(Marionette.CollectionView);
+  });
+
+}).call(this);
index 844a446681ef3554e597be0392061de3bc034187..4d109e4fe07119978c821afbb2c01b95bf243f71 100644 (file)
@@ -22,6 +22,9 @@ define [
       @$el.addClass @activeClass
 
       @options.app.layout.showSpinner 'detailsRegion'
-      @model.fetch().done =>
+      jQuery.ajax
+        url: "#{baseUrl}/api/codingrules/show"
+      .done (r) =>
+        @model.set r.codingrule
         detailView = new CodingRulesDetailView model: @model
         @options.app.layout.detailsRegion.show detailView
index 1d9895a15c2482aafcd98216824ea3ef99675ef1..87ba12db6f5404ebd58a64d8da857cbdd8164c92 100644 (file)
         this.$el.siblings().removeClass(this.activeClass);
         this.$el.addClass(this.activeClass);
         this.options.app.layout.showSpinner('detailsRegion');
-        return this.model.fetch().done(function() {
+        return jQuery.ajax({
+          url: "" + baseUrl + "/api/codingrules/show"
+        }).done(function(r) {
           var detailView;
+          _this.model.set(r.codingrule);
           detailView = new CodingRulesDetailView({
             model: _this.model
           });
diff --git a/sonar-server/src/main/webapp/javascripts/coding-rules/views/header-quality-profiles-view.coffee b/sonar-server/src/main/webapp/javascripts/coding-rules/views/header-quality-profiles-view.coffee
new file mode 100644 (file)
index 0000000..c6053aa
--- /dev/null
@@ -0,0 +1,19 @@
+define [
+  'backbone.marionette',
+  'common/handlebars-extensions'
+], (
+  Marionette
+) ->
+
+  class HeaderQualityProfilesView extends Marionette.ItemView
+    className: 'coding-rules-header-quality-profiles'
+    template: getTemplate '#coding-rules-header-quality-profiles-template'
+
+
+    events:
+      'click label': 'selectQualityProfile'
+
+
+    selectQualityProfile: (e)->
+      @options.app.header = jQuery(e.target).html()
+      @options.headerView.render()
diff --git a/sonar-server/src/main/webapp/javascripts/coding-rules/views/header-quality-profiles-view.js b/sonar-server/src/main/webapp/javascripts/coding-rules/views/header-quality-profiles-view.js
new file mode 100644 (file)
index 0000000..67e4641
--- /dev/null
@@ -0,0 +1,34 @@
+// 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 HeaderQualityProfilesView, _ref;
+    return HeaderQualityProfilesView = (function(_super) {
+      __extends(HeaderQualityProfilesView, _super);
+
+      function HeaderQualityProfilesView() {
+        _ref = HeaderQualityProfilesView.__super__.constructor.apply(this, arguments);
+        return _ref;
+      }
+
+      HeaderQualityProfilesView.prototype.className = 'coding-rules-header-quality-profiles';
+
+      HeaderQualityProfilesView.prototype.template = getTemplate('#coding-rules-header-quality-profiles-template');
+
+      HeaderQualityProfilesView.prototype.events = {
+        'click label': 'selectQualityProfile'
+      };
+
+      HeaderQualityProfilesView.prototype.selectQualityProfile = function(e) {
+        this.options.app.header = jQuery(e.target).html();
+        return this.options.headerView.render();
+      };
+
+      return HeaderQualityProfilesView;
+
+    })(Marionette.ItemView);
+  });
+
+}).call(this);
index b14bb2986d3fa30b2be9fb9a141c26106ba86e3a..c648f7a30194a9eb76bf17bf6c6f18dd6669c5af 100644 (file)
@@ -1,9 +1,49 @@
 define [
   'backbone.marionette',
+  'coding-rules/views/header-quality-profiles-view',
   'common/handlebars-extensions'
 ], (
-  Marionette
+  Marionette,
+  HeaderQualityProfilesView
 ) ->
 
   class CodingRulesHeaderView extends Marionette.ItemView
     template: getTemplate '#coding-rules-header-template'
+
+
+    ui:
+      menuToggle: '.navigator-header-menu-toggle'
+
+
+    events:
+      'click @ui.menuToggle': 'toggleQualityProfiles'
+
+
+    initialize: ->
+      @qualityProfilesView = new HeaderQualityProfilesView
+        app: @options.app
+        collection: new Backbone.Collection @options.app.qualityProfiles
+        headerView: @
+      jQuery('body').on 'click', =>
+        @qualityProfilesView.$el.hide()
+        @ui.menuToggle.removeClass 'active'
+
+
+    onRender: ->
+      @qualityProfilesView.render().$el.detach().appendTo jQuery('body')
+
+
+    onDomRefresh: ->
+      @qualityProfilesView.$el.css
+        top: @$el.offset().top + @$el.outerHeight()
+        left: @$el.offset().left + @ui.menuToggle.css('margin-left')
+
+
+    toggleQualityProfiles: (e) ->
+      e.stopPropagation()
+      @qualityProfilesView.$el.toggle()
+      @ui.menuToggle.toggleClass 'active'
+
+
+    serializeData: ->
+      _.extend super, header: @options.app.header
index 21891dacac61dc7a501e33872d55e70b3e46ac0a..887d06b8c75db6176662e324d064ecf807f09f92 100644 (file)
@@ -3,7 +3,7 @@
   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) {
+  define(['backbone.marionette', 'coding-rules/views/header-quality-profiles-view', 'common/handlebars-extensions'], function(Marionette, HeaderQualityProfilesView) {
     var CodingRulesHeaderView, _ref;
     return CodingRulesHeaderView = (function(_super) {
       __extends(CodingRulesHeaderView, _super);
 
       CodingRulesHeaderView.prototype.template = getTemplate('#coding-rules-header-template');
 
+      CodingRulesHeaderView.prototype.ui = {
+        menuToggle: '.navigator-header-menu-toggle'
+      };
+
+      CodingRulesHeaderView.prototype.events = {
+        'click @ui.menuToggle': 'toggleQualityProfiles'
+      };
+
+      CodingRulesHeaderView.prototype.initialize = function() {
+        var _this = this;
+        this.qualityProfilesView = new HeaderQualityProfilesView({
+          app: this.options.app,
+          collection: new Backbone.Collection(this.options.app.qualityProfiles),
+          headerView: this
+        });
+        return jQuery('body').on('click', function() {
+          _this.qualityProfilesView.$el.hide();
+          return _this.ui.menuToggle.removeClass('active');
+        });
+      };
+
+      CodingRulesHeaderView.prototype.onRender = function() {
+        return this.qualityProfilesView.render().$el.detach().appendTo(jQuery('body'));
+      };
+
+      CodingRulesHeaderView.prototype.onDomRefresh = function() {
+        return this.qualityProfilesView.$el.css({
+          top: this.$el.offset().top + this.$el.outerHeight(),
+          left: this.$el.offset().left + this.ui.menuToggle.css('margin-left')
+        });
+      };
+
+      CodingRulesHeaderView.prototype.toggleQualityProfiles = function(e) {
+        e.stopPropagation();
+        this.qualityProfilesView.$el.toggle();
+        return this.ui.menuToggle.toggleClass('active');
+      };
+
+      CodingRulesHeaderView.prototype.serializeData = function() {
+        return _.extend(CodingRulesHeaderView.__super__.serializeData.apply(this, arguments), {
+          header: this.options.app.header
+        });
+      };
+
       return CodingRulesHeaderView;
 
     })(Marionette.ItemView);
index ec1de36b2cf4b2e62e020b54ce4e9cb177ccefe9..a4c405b08db2294b226f6b4f1d0b828feea0e894 100644 (file)
 .coding-rules-page .navigator-results .spinner {
   margin: 10px;
 }
+.coding-rules-page .navigator-actions,
+.coding-rules-page .navigator-details {
+  top: 324px;
+}
+.coding-rules-page .navigator-results {
+  top: 354px;
+}
 /*
  * Detail
  */
 .coding-rules-detail-quality-profiles-activation {
   margin-top: 10px;
 }
+.coding-rules-header-quality-profiles {
+  position: absolute;
+  z-index: 1200;
+  display: none;
+  max-width: 300px;
+  border-right: 1px solid #cdcdcd;
+  border-bottom: 1px solid #cdcdcd;
+  background: #fff;
+  box-shadow: 10px 10px 20px rgba(0, 0, 0, 0.5);
+}
+.coding-rules-header-quality-profiles .navigator-filter-select-list {
+  max-width: 600px;
+}
+.coding-rules-header-quality-profiles .navigator-filter-select-list label > span {
+  width: auto;
+}
index 7f17fed1fed0d49d09deb651dfe9fbb369a84798..842bfa069d9e5758b2d9210e2ebe8e1520eb70f4 100644 (file)
@@ -9,6 +9,16 @@
     margin: @navigatorPadding;
   }
 
+  .navigator-actions,
+  .navigator-details {
+    top: @navigatorTopOffset + @navigatorHeaderHeight + @navigatorFiltersHeight + @navigatorFacetsHeight;
+  }
+
+  .navigator-results {
+    top: @navigatorTopOffset + @navigatorHeaderHeight + @navigatorFiltersHeight + @navigatorFacetsHeight +
+         @navigatorStatusHeight;
+  }
+
 }
 
 
 .coding-rules-detail-quality-profiles-activation {
   margin-top: @navigatorPadding;
 }
+
+
+
+.coding-rules-header-quality-profiles {
+  position: absolute;
+  z-index: 1200;
+  display: none;
+  max-width: 300px;
+  border-right: 1px solid @darkGrey;
+  border-bottom: 1px solid @darkGrey;
+  background: #fff;
+  box-shadow: 10px 10px 20px rgba(0, 0, 0, 0.5);
+
+  .navigator-filter-select-list {
+    max-width: 600px;
+  }
+
+  .navigator-filter-select-list label > span {
+    width: auto;
+  }
+}
index 9ca38238d527ddee85246a9fd93fd8e27bc60385..d660974798aebf8165eb2d98d46e9c9a6264f776 100644 (file)
 .icon-list:before {
   content: "\f039";
 }
+.icon-bullet-list:before {
+  content: "\f03a";
+}
 .icon-settings:before {
   content: "\f015";
 }
index 0e098d606760e04eed5bc20616d2d7ffc09ded08..d5cf86cfc9c0dbbf20b4c680608559a47f20bbb2 100644 (file)
 .icon-list:before {
   content: "\f039";
 }
+.icon-bullet-list:before {
+  content: "\f03a";
+}
 .icon-settings:before {
   content: "\f015";
 }
index 5f6f6d6ee4cab904740e442e53a3af3cec91d4c6..fb40c05cfa83c7c5e9b192eb806067a7eea39b55 100644 (file)
   width: 100%;
   height: 37px;
 }
+.navigator-facets {
+  position: fixed;
+  z-index: 2;
+  -moz-box-sizing: border-box;
+  box-sizing: border-box;
+  top: 104px;
+  left: 0;
+  width: 100%;
+  height: 220px;
+}
 .navigator-results {
   position: fixed;
   z-index: 2;
   font-style: italic;
 }
 .navigator-header-actions {
-  margin-left: 16px;
+  margin-left: 20px;
 }
 .navigator-header-actions > a {
   vertical-align: middle;
   margin: 0 8px;
   font-size: 11px;
 }
+.navigator-header-menu-toggle {
+  display: inline-block;
+  vertical-align: top;
+  height: 36px;
+  margin-right: 10px;
+  margin-left: -10px;
+  padding: 10px;
+  border-right: 1px solid transparent;
+  -moz-box-sizing: border-box;
+  box-sizing: border-box;
+  cursor: pointer;
+  transition: all 0.3s ease;
+}
+.navigator-header-menu-toggle:hover {
+  background-color: #e2e2e2;
+}
+.navigator-header-menu-toggle.active {
+  border-color: #cdcdcd;
+  background-color: #fff;
+}
+.navigator-header-menu-toggle [class^="icon-"],
+.navigator-header-menu-toggle [class*=" icon-"] {
+  font-size: 16px;
+}
 .navigator-notes {
   padding: 0 10px;
   border-bottom: 1px solid #cdcdcd;
   overflow: hidden;
   text-overflow: ellipsis;
 }
+.navigator-facets {
+  padding: 10px;
+  border-bottom: 1px solid #cdcdcd;
+  background-color: #efefef;
+}
+.navigator-facets-list {
+  display: table;
+  height: 100%;
+}
+.navigator-facets-list-item {
+  display: table-cell;
+}
+.navigator-facets-list-item {
+  padding-right: 20px;
+}
+.navigator-facets-list-item + .navigator-facets-list-item {
+  padding-left: 20px;
+  border-left: 1px solid #e1e1e1;
+}
+.navigator-facets-list-item-name {
+  font-weight: bold;
+  text-transform: uppercase;
+}
+.navigator-facets-list-item-options {
+  margin-top: 6.666666666666667px;
+}
+.navigator-facets-list-item-option {
+  margin-bottom: -1em;
+  padding: 3.3333333333333335px 0;
+  cursor: pointer;
+  text-align: justify;
+}
+.navigator-facets-list-item-option:hover .navigator-facets-list-item-option-name {
+  text-decoration: underline;
+}
+.navigator-facets-list-item-option:after {
+  content: '';
+  display: inline-block;
+  width: 100%;
+}
+.navigator-facets-list-item-option-name {
+  padding-right: 10px;
+}
 .navigator-results {
   border-right: 1px solid #e1e1e1;
   background-color: #ffffff;
index e3624fbb24777e6b6bdc31216794775b1e445a2f..fdeb06d27853ceca24427aecbd651e0b6637a8bd 100644 (file)
   width: 100%;
   height: 37px;
 }
+.navigator-facets {
+  position: fixed;
+  z-index: 2;
+  -moz-box-sizing: border-box;
+  box-sizing: border-box;
+  top: 104px;
+  left: 0;
+  width: 100%;
+  height: 220px;
+}
 .navigator-results {
   position: fixed;
   z-index: 2;
   font-style: italic;
 }
 .navigator-header-actions {
-  margin-left: 16px;
+  margin-left: 20px;
 }
 .navigator-header-actions > a {
   vertical-align: middle;
   margin: 0 8px;
   font-size: 11px;
 }
+.navigator-header-menu-toggle {
+  display: inline-block;
+  vertical-align: top;
+  height: 36px;
+  margin-right: 10px;
+  margin-left: -10px;
+  padding: 10px;
+  border-right: 1px solid transparent;
+  -moz-box-sizing: border-box;
+  box-sizing: border-box;
+  cursor: pointer;
+  transition: all 0.3s ease;
+}
+.navigator-header-menu-toggle:hover {
+  background-color: #e2e2e2;
+}
+.navigator-header-menu-toggle.active {
+  border-color: #cdcdcd;
+  background-color: #fff;
+}
+.navigator-header-menu-toggle [class^="icon-"],
+.navigator-header-menu-toggle [class*=" icon-"] {
+  font-size: 16px;
+}
 .navigator-notes {
   padding: 0 10px;
   border-bottom: 1px solid #cdcdcd;
   overflow: hidden;
   text-overflow: ellipsis;
 }
+.navigator-facets {
+  padding: 10px;
+  border-bottom: 1px solid #cdcdcd;
+  background-color: #efefef;
+}
+.navigator-facets-list {
+  display: table;
+  height: 100%;
+}
+.navigator-facets-list-item {
+  display: table-cell;
+}
+.navigator-facets-list-item {
+  padding-right: 20px;
+}
+.navigator-facets-list-item + .navigator-facets-list-item {
+  padding-left: 20px;
+  border-left: 1px solid #e1e1e1;
+}
+.navigator-facets-list-item-name {
+  font-weight: bold;
+  text-transform: uppercase;
+}
+.navigator-facets-list-item-options {
+  margin-top: 6.666666666666667px;
+}
+.navigator-facets-list-item-option {
+  margin-bottom: -1em;
+  padding: 3.3333333333333335px 0;
+  cursor: pointer;
+  text-align: justify;
+}
+.navigator-facets-list-item-option:hover .navigator-facets-list-item-option-name {
+  text-decoration: underline;
+}
+.navigator-facets-list-item-option:after {
+  content: '';
+  display: inline-block;
+  width: 100%;
+}
+.navigator-facets-list-item-option-name {
+  padding-right: 10px;
+}
 .navigator-results {
   border-right: 1px solid #e1e1e1;
   background-color: #ffffff;
index 63cf9f8267f6b8964fe5c6725331c4b1f45e90ce..9c85d348246a32c763476ffa2f283505687d42d2 100644 (file)
   .size(100%, @navigatorFiltersHeight);
 }
 
+.navigator-facets {
+  .navigator-element;
+  top: @navigatorTopOffset + @navigatorHeaderHeight + @navigatorFiltersHeight;
+  left: 0;
+  .size(100%, @navigatorFacetsHeight);
+}
+
 .navigator-results {
   .navigator-element;
   .box-sizing(content-box);
 }
 
 .navigator-header-actions {
-  margin-left: 16px;
+  margin-left: 20px;
 
   & > a {
     vertical-align: middle;
   }
 }
 
+.navigator-header-menu-toggle {
+  display: inline-block;
+  vertical-align: top;
+  height: 36px;
+  margin-right: 10px;
+  margin-left: -10px;
+  padding: 10px;
+  border-right: 1px solid transparent;
+  .box-sizing(border-box);
+  cursor: pointer;
+  .trans;
+
+  &:hover {
+    background-color: @navigatorHover;
+  }
+
+  &.active {
+    border-color: #cdcdcd;
+    background-color: #fff;
+  }
+
+  [class^="icon-"], [class*=" icon-"] {
+    font-size: 16px;
+  }
+}
+
 
 
 // Notes
 
 
 
+// Facets
+.navigator-facets {
+  padding: @navigatorPadding;
+  border-bottom: 1px solid @navigatorBorderColor;
+  background-color: @navigatorBarBackground;
+}
+
+.navigator-facets-list {
+  display: table;
+  height: 100%;
+}
+
+.navigator-facets-list-item {
+  display: table-cell;
+}
+
+.navigator-facets-list-item {
+  padding-right: 2 * @navigatorPadding;
+}
+
+.navigator-facets-list-item + .navigator-facets-list-item {
+  padding-left: 2 * @navigatorPadding;
+  border-left: 1px solid @navigatorBorderLightColor;
+}
+
+.navigator-facets-list-item-name {
+  font-weight: bold;
+  text-transform: uppercase;
+}
+
+.navigator-facets-list-item-options {
+  margin-top: @navigatorPadding / 3 * 2;
+}
+
+.navigator-facets-list-item-option {
+  margin-bottom: -1em;
+  padding: @navigatorPadding / 3 0;
+  cursor: pointer;
+  text-align: justify;
+
+  &:hover .navigator-facets-list-item-option-name {
+    text-decoration: underline;
+  }
+
+  &:after {
+    content: '';
+    display: inline-block;
+    width: 100%;
+  }
+}
+
+.navigator-facets-list-item-option-name {
+  padding-right: @navigatorPadding;
+}
+
+.navigator-facets-list-item-option-stat {
+
+}
+
+
+
 // Results
 .navigator-results {
   border-right: 1px solid @navigatorBorderLightColor;
index d9fdacfe58d5a4c7dbc94deb76aa108c42767ac1..b8f1e42bbcb890934820abc4a6152dde750bc816 100644 (file)
@@ -6,6 +6,7 @@
 
 @navigatorHeaderHeight: 37px;
 @navigatorFiltersHeight: 37px;
+@navigatorFacetsHeight: 220px;
 @navigatorStatusHeight: 30px;
 @navigatorNotesHeight: 20px;