]> source.dussan.org Git - sonarqube.git/commitdiff
Reverse "SONAR-6041 New webapp layout"
authorStas Vilchik <vilchiks@gmail.com>
Tue, 20 Jan 2015 12:28:52 +0000 (13:28 +0100)
committerStas Vilchik <vilchiks@gmail.com>
Wed, 21 Jan 2015 08:16:59 +0000 (09:16 +0100)
71 files changed:
server/sonar-web/.jshintrc
server/sonar-web/Gruntfile.coffee
server/sonar-web/src/main/coffee/issues/component-viewer/main.coffee
server/sonar-web/src/main/coffee/issues/facets/severity-facet.coffee
server/sonar-web/src/main/coffee/issues/facets/status-facet.coffee
server/sonar-web/src/main/coffee/issues/filters-view.coffee
server/sonar-web/src/main/coffee/issues/layout.coffee
server/sonar-web/src/main/coffee/issues/workspace-header-view.coffee
server/sonar-web/src/main/coffee/quality-gate/layout.coffee
server/sonar-web/src/main/hbs/coding-rules/coding-rules-filters.hbs
server/sonar-web/src/main/hbs/coding-rules/coding-rules-layout.hbs
server/sonar-web/src/main/hbs/coding-rules/coding-rules-workspace-header.hbs
server/sonar-web/src/main/hbs/issues/facets/issues-creation-date-facet.hbs
server/sonar-web/src/main/hbs/issues/issues-filters.hbs
server/sonar-web/src/main/hbs/issues/issues-layout.hbs
server/sonar-web/src/main/hbs/issues/issues-workspace-header.hbs
server/sonar-web/src/main/hbs/nav/_nav-logo.hbs [deleted file]
server/sonar-web/src/main/hbs/nav/_nav-navbar-label.hbs [deleted file]
server/sonar-web/src/main/hbs/nav/nav-navbar.hbs [deleted file]
server/sonar-web/src/main/hbs/nav/nav-search-empty.hbs [deleted file]
server/sonar-web/src/main/hbs/nav/nav-search-item.hbs [deleted file]
server/sonar-web/src/main/hbs/nav/nav-search.hbs [deleted file]
server/sonar-web/src/main/hbs/quality-gates/quality-gates-layout.hbs
server/sonar-web/src/main/js/application.js
server/sonar-web/src/main/js/coding-rules/controller.js
server/sonar-web/src/main/js/coding-rules/facets/severity-facet.js
server/sonar-web/src/main/js/coding-rules/filters-view.js
server/sonar-web/src/main/js/coding-rules/layout.js
server/sonar-web/src/main/js/coding-rules/rule-details-view.js
server/sonar-web/src/main/js/coding-rules/workspace-header-view.js
server/sonar-web/src/main/js/common/selectable-collection-view.js [deleted file]
server/sonar-web/src/main/js/nav/app.js [deleted file]
server/sonar-web/src/main/js/nav/navbar.js [deleted file]
server/sonar-web/src/main/js/nav/search-view.js [deleted file]
server/sonar-web/src/main/js/third-party/bootstrap/dropdown.js [deleted file]
server/sonar-web/src/main/js/translate.js
server/sonar-web/src/main/less/components.less
server/sonar-web/src/main/less/components/dropdowns.less [deleted file]
server/sonar-web/src/main/less/components/facets.less
server/sonar-web/src/main/less/components/issues.less
server/sonar-web/src/main/less/components/menu.less [deleted file]
server/sonar-web/src/main/less/components/search-navigator.less
server/sonar-web/src/main/less/icons.less
server/sonar-web/src/main/less/issues.less
server/sonar-web/src/main/less/layout-new.less [deleted file]
server/sonar-web/src/main/less/layout.less
server/sonar-web/src/main/less/navbar.less [deleted file]
server/sonar-web/src/main/less/quality-gates.less
server/sonar-web/src/main/less/style.less
server/sonar-web/src/main/less/ui.less
server/sonar-web/src/main/less/variables.less
server/sonar-web/src/main/webapp/WEB-INF/app/controllers/api/components_controller.rb
server/sonar-web/src/main/webapp/WEB-INF/app/controllers/comparison_controller.rb
server/sonar-web/src/main/webapp/WEB-INF/app/controllers/dependencies_controller.rb
server/sonar-web/src/main/webapp/WEB-INF/app/models/navigation.rb
server/sonar-web/src/main/webapp/WEB-INF/app/views/coding_rules/index.html.erb
server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/search.html.erb
server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_breadcrumb.html.erb
server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_head.html.erb
server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_layout.html.erb
server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_logo.html.erb [deleted file]
server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_menu_projects.html.erb [new file with mode: 0644]
server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_navbar.html.erb [deleted file]
server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_navbar_conf.html.erb [deleted file]
server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_navbar_conf_global.html.erb [deleted file]
server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_navbar_conf_project.html.erb [deleted file]
server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_navbar_conf_settings.html.erb [deleted file]
server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_recent_history.html.erb [deleted file]
server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_small_logo.html.erb [deleted file]
server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/application.html.erb
sonar-core/src/main/resources/org/sonar/l10n/core.properties

index 5b2eb1b387bbc1be6f564e50794400d018692e3f..2d6820a4d4c973bc7f9cece721bbcc36d74d3438 100644 (file)
@@ -82,9 +82,7 @@
     "baseUrl": true,
     "key": true,
     "Backbone": true,
-    "Marionette": true,
     "Handlebars": true,
-    "Templates": true,
     "t": true,
     "tp": true,
     "moment": true,
index 809f748df8990bc6394e8e8477def4cde65cc10c..60b9b6b3e870142be464b807fb957cd9af111348 100644 (file)
@@ -14,7 +14,6 @@ module.exports = (grunt) ->
             '<%= pkg.sources %>less/select2.less'
             '<%= pkg.sources %>less/select2-sonar.less'
             '<%= pkg.sources %>less/layout.less'
-            '<%= pkg.sources %>less/layout-new.less'
             '<%= pkg.sources %>less/style.less'
             '<%= pkg.sources %>less/icons.less'
             '<%= pkg.sources %>less/ui.less'
@@ -34,7 +33,6 @@ module.exports = (grunt) ->
             '<%= pkg.sources %>less/select2.less'
             '<%= pkg.sources %>less/select2-sonar.less'
             '<%= pkg.sources %>less/layout.less'
-            '<%= pkg.sources %>less/layout-new.less'
             '<%= pkg.sources %>less/style.less'
             '<%= pkg.sources %>less/icons.less'
             '<%= pkg.sources %>less/ui.less'
@@ -93,7 +91,6 @@ module.exports = (grunt) ->
             '<%= pkg.assets %>js/third-party/numeral.js'
             '<%= pkg.assets %>js/third-party/numeral-languages.js'
             '<%= pkg.assets %>js/third-party/bootstrap/tooltip.js'
-            '<%= pkg.assets %>js/third-party/bootstrap/dropdown.js'
             '<%= pkg.assets %>js/select2-jquery-ui-fix.js'
             '<%= pkg.assets %>js/widgets/base.js'
             '<%= pkg.assets %>js/widgets/widget.js'
@@ -137,7 +134,6 @@ module.exports = (grunt) ->
             '<%= pkg.assets %>js/third-party/numeral.js'
             '<%= pkg.assets %>js/third-party/numeral-languages.js'
             '<%= pkg.assets %>js/third-party/bootstrap/tooltip.js'
-            '<%= pkg.assets %>js/third-party/bootstrap/dropdown.js'
             '<%= pkg.assets %>js/select2-jquery-ui-fix.js'
             '<%= pkg.assets %>js/widgets/base.js'
             '<%= pkg.assets %>js/widgets/widget.js'
@@ -239,10 +235,6 @@ module.exports = (grunt) ->
         name: 'analysis-reports/app'
         out: '<%= pkg.assets %>build/js/analysis-reports/app.js'
 
-      nav: options:
-        name: 'nav/app'
-        out: '<%= pkg.assets %>build/js/nav/app.js'
-
 
     handlebars:
       options:
@@ -293,9 +285,6 @@ module.exports = (grunt) ->
           '<%= pkg.assets %>js/templates/analysis-reports.js': [
             '<%= pkg.sources %>hbs/analysis-reports/**/*.hbs'
           ]
-          '<%= pkg.assets %>js/templates/nav.js': [
-            '<%= pkg.sources %>hbs/nav/**/*.hbs'
-          ]
 
 
     clean:
index 5e4acec7525e7f083282652c3a8677f28c00b463..9979b1ad5ba30d2b8686293334c9cc95c40116bf 100644 (file)
@@ -175,6 +175,7 @@ define [
     scrollToLine: (line) ->
       row = @$("[data-line-number=#{line}]")
       goal = if row.length > 0 then row.offset().top - 200 else 0
+      goal = Math.max goal, 30
       $(window).scrollTop goal
 
 
index 17d1fabaa9e2b4c9cd2b6e94a175c526c4688335..b0b605c6a096babe6a0bc8a8be9e00b1b924e905 100644 (file)
@@ -11,6 +11,6 @@ define [
 
 
     sortValues: (values) ->
-      order = ['BLOCKER', 'CRITICAL', 'MAJOR', 'MINOR', 'INFO']
+      order = ['BLOCKER', 'MINOR', 'CRITICAL', 'INFO', 'MAJOR']
       _.sortBy values, (v) -> order.indexOf v.val
 
index e3f4d0015b42d6b0df4ed2c4017ff3d4ca276bdb..8b35191eabf9a9664d4ef28cdfc5957380424dfe 100644 (file)
@@ -11,5 +11,5 @@ define [
 
 
     sortValues: (values) ->
-      order = ['OPEN', 'REOPENED', 'CONFIRMED', 'RESOLVED', 'CLOSED']
+      order = ['OPEN', 'RESOLVED', 'REOPENED', 'CLOSED', 'CONFIRMED']
       _.sortBy values, (v) -> order.indexOf v.val
index 0b79214e605dcb84a71e36b654ddb7c973d6d04f..c8ce1732134dcf8c2075ef4af8c477b3a259a382 100644 (file)
@@ -12,6 +12,7 @@ define [
     events:
       'click .js-toggle-filters': 'toggleFilters'
       'click .js-filter': 'applyFilter'
+      'click .js-new-search': 'newSearch'
       'click .js-filter-save-as': 'saveAs'
       'click .js-filter-save': 'save'
       'click .js-filter-copy': 'copy'
@@ -47,6 +48,10 @@ define [
       filter.fetch().done => @options.app.controller.applyFilter filter
 
 
+    newSearch: ->
+      @options.app.controller.newSearch()
+
+
     saveAs: ->
       query = @options.app.controller.getQuery '&'
       url = "#{baseUrl}/issues/save_as_form?#{query}"
index f18543587948d887099678eae2128e6cb211177a..6d2a60fe82b3d0dbae99d3cb5f6dd0eebd3c5594 100644 (file)
@@ -18,13 +18,34 @@ define [
       workspaceComponentViewerRegion: '.issues-workspace-component-viewer'
 
 
+    initialize: ->
+      $(window).on 'scroll.issues-layout', (=> @onScroll())
+
+
+    onClose: ->
+      $(window).off 'scroll.issues-layout'
+
+
+    onRender: ->
+      @$('.search-navigator-side').isolatedScroll()
+
+
+    onScroll: ->
+      scrollTop = $(window).scrollTop()
+      $('.search-navigator').toggleClass 'sticky', scrollTop >= @topOffset
+      @$('.search-navigator-side').css top: Math.max(0, Math.min(@topOffset - scrollTop, @topOffset))
+
+
+    showSpinner: (region) ->
+      @[region].show new Marionette.ItemView
+        template: _.template('<i class="spinner"></i>')
+
+
     showComponentViewer: ->
       @scroll = $(window).scrollTop()
       $('.issues').addClass 'issues-extended-view'
-      @$el.closest('.container').addClass 'container-full-width'
 
 
     hideComponentViewer: ->
       $('.issues').removeClass 'issues-extended-view'
       $(window).scrollTop @scroll if @scroll?
-      @$el.closest('.container').removeClass 'container-full-width'
index 2d376f362b8ad6bf3f00d464f4d413aa698081cc..b60ed4da24b9631021b2bbdd09d1a134853058d4 100644 (file)
@@ -14,7 +14,6 @@ define [
 
     events: ->
       _.extend super,
-        'click .js-new-search': 'newSearch'
         'click .js-back': 'returnToList'
 
 
@@ -30,10 +29,6 @@ define [
       window.onBulkIssues = @_onBulkIssues
 
 
-    newSearch: ->
-      @options.app.controller.newSearch()
-
-
     returnToList: ->
       @options.app.controller.closeComponentViewer()
 
index 5a3627878503620eac412f94177759b543579b14..9a982cf1e02ae665eec59b3edbbaa897cc0bbbc6 100644 (file)
@@ -26,6 +26,20 @@ define [
 
 
     onResize: ->
+      footerEl = jQuery('#footer')
+      footerHeight = footerEl.outerHeight true
+
+      resultsEl = jQuery('.navigator-results')
+      resultsHeight = jQuery(window).height() - resultsEl.offset().top -
+      parseInt(resultsEl.css('margin-bottom'), 10) - footerHeight
+      resultsEl.height resultsHeight
+
+      detailsEl = jQuery('.navigator-details')
+      detailsWidth = jQuery(window).width() - detailsEl.offset().left -
+      parseInt(detailsEl.css('margin-right'), 10)
+      detailsHeight = jQuery(window).height() - detailsEl.offset().top -
+      parseInt(detailsEl.css('margin-bottom'), 10) - footerHeight
+      detailsEl.width(detailsWidth).height detailsHeight
 
 
     onRender: ->
index 234ff85b91e40fda31e0b401bb66246af17a988f..dc97d68a6fe4aab6b7a255b12cd1ed968e14fe4e 100644 (file)
@@ -1,3 +1,12 @@
 <div class="search-navigator-filters-header">
   <span class="search-navigator-filters-name">{{t 'coding_rules.page'}}</span>
 </div>
+
+<div class="search-navigator-filters-actions">
+  <div class="button-group">
+    <button class="js-new-search" id="coding-rules-new-search">{{t 'issue_filter.new_search'}}</button>
+    {{#if canWrite}}
+      <button class="js-create-manual-rule">{{t 'coding_rules.create'}}</button>
+    {{/if}}
+  </div>
+</div>
index 01a9f34d8b4338df048e641f73e1f5687ecc7901..8f46e4f8fb13a7b4b40942d63b44332e3a9aec74 100644 (file)
@@ -1,14 +1,10 @@
-<div class="container-side container-side-left">
+<div class="search-navigator-side">
   <div class="search-navigator-filters"></div>
-  <div class="search-navigator-side">
-    <div class="search-navigator-facets"></div>
-  </div>
+  <div class="search-navigator-facets"></div>
 </div>
 
-<div class="container-main face-main">
+<div class="search-navigator-workspace">
   <div class="search-navigator-workspace-header"></div>
-  <div class="search-navigator-workspace">
-    <div class="search-navigator-workspace-list"></div>
-    <div class="search-navigator-workspace-details"></div>
-  </div>
+  <div class="search-navigator-workspace-list"></div>
+  <div class="search-navigator-workspace-details"></div>
 </div>
index 39fbca9aeb9fab752b57c01c3257170271dd990d..bcf70f5d3ab6fc1a77e096a3f7201c2000a7f01e 100644 (file)
     </div>
   {{/notNull}}
 
-  <div class="search-navigator-header-buttons button-group">
-    <button class="js-new-search" id="coding-rules-new-search">{{t 'issue_filter.new_search'}}</button>
-    {{#if canWrite}}
-      <button class="js-create-manual-rule">{{t 'coding_rules.create'}}</button>
+  {{#if canWrite}}
+    <div class="search-navigator-header-buttons button-group">
       <button class="js-bulk-change">{{t 'bulk_change'}}</button>
-    {{/if}}
-  </div>
+    </div>
+  {{/if}}
 </div>
index b5a65ed7145919d75a42f884b8e6f6a0d627d726..c5b3e5dd47e7d6b055535c1d295ba730609b9d11 100644 (file)
@@ -6,7 +6,7 @@
     {{dt createdAt}} ({{fromNow createdAt}})
   </div>
 {{else}}
-  <div class="search-navigator-facet-container">
+  <div class="search-navigator-facet-container justify">
     <input type="text" class="search-navigator-facet-input" name="createdAfter" placeholder="From">
     to
     <input type="text" class="search-navigator-facet-input" name="createdBefore" placeholder="To">
index 234c399657967f84d213e68fdb32e3430673baa3..cd51e68565154140048950dd5737eaf261a80add 100644 (file)
@@ -21,6 +21,8 @@
 
 <div class="search-navigator-filters-actions">
   <div class="button-group">
+    <button class="js-new-search" id="issues-new-search">{{t 'issue_filter.new_search'}}</button>
+
     {{#if state.canManageFilters}}
       {{#if filter.canModify}}
         {{#if state.changed}}<button class="js-filter-save" id="issues-filter-save">{{t 'save'}}</button>{{/if}}
index b9a344806cb6d48ff2a8972e3d18f073e27d327e..f60fecfb03ffc84eed43ac735bdfd0d13223b8ed 100644 (file)
@@ -1,14 +1,10 @@
-<div class="container-side container-side-left">
+<div class="search-navigator-side">
   <div class="search-navigator-filters"></div>
-  <div class="search-navigator-side">
-    <div class="search-navigator-facets"></div>
-  </div>
+  <div class="search-navigator-facets"></div>
 </div>
 
-<div class="container-main face-main">
+<div class="search-navigator-workspace">
   <div class="search-navigator-workspace-header"></div>
-  <div class="search-navigator-workspace">
-    <div class="search-navigator-workspace-list"></div>
-    <div class="issues-workspace-component-viewer"></div>
-  </div>
+  <div class="search-navigator-workspace-list"></div>
+  <div class="issues-workspace-component-viewer"></div>
 </div>
index 09a852bd5503303a7928e9d477607cb3f9e9dd12..93175e7c99b93a60569c3e70a0679aeb01cdb58d 100644 (file)
@@ -1,6 +1,12 @@
 <div class="issues-header-component">
   {{#if state.component}}
     <a class="js-back">{{t 'issues.return_to_list'}}</a>&nbsp;&nbsp;&nbsp;
+
+    {{#with state.component}}
+      {{qualifierIcon 'TRK'}}&nbsp;<a href="{{dashboardUrl project}}" title="{{projectName}}">{{projectName}}</a>
+      &nbsp;&nbsp;
+      {{qualifierIcon qualifier}}&nbsp;<a href="{{dashboardUrl key}}" title="{{name}}">{{name}}</a>
+    {{/with}}
   {{else}}
     &nbsp;
   {{/if}}
@@ -22,7 +28,6 @@
 
 
   <div class="search-navigator-header-buttons button-group">
-    <button class="js-new-search" id="issues-new-search">{{t 'issue_filter.new_search'}}</button>
     <button id="issues-reload" class="js-reload">{{t 'reload'}}</button>
     {{#if state.canBulkChange}}
       <button id="issues-bulk-change" class="js-bulk-change">{{t 'bulk_change'}}</button>
diff --git a/server/sonar-web/src/main/hbs/nav/_nav-logo.hbs b/server/sonar-web/src/main/hbs/nav/_nav-logo.hbs
deleted file mode 100644 (file)
index fcb273a..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<div class="sq-logo">
-  <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="100" height="25">
-    <g opacity="1">
-      <path class="sq-logo-arc sq-logo-arc1" d="m96.96313,21.20284l-1.22246,0c0,-9.83637 -8.12817,-17.87548 -18.16693,-17.87548l0,-1.26294c10.69453,0 19.41368,8.6382 19.41368,19.13842l-0.02429,0z"></path>
-      <path class="sq-logo-arc sq-logo-arc2" d="m97.81319,14.62098c-1.47343,-6.17708 -6.47662,-11.36647 -12.79134,-13.15564l0.28336,-1.00388c6.64664,1.93489 11.94128,7.38335 13.47137,13.96522l-0.96339,0.1943z"></path>
-      <path class="sq-logo-arc sq-logo-arc3" d="m99.19757,8.84059c-1.522,-3.32736 -4.07217,-6.18517 -7.26192,-8.11197l0.40479,-0.72862c3.31117,1.99156 6.03945,5.05177 7.56956,8.50866l-0.71243,0.33193z"></path>
-      <path class="sq-logo-letter" d="m0,20.74138c0.72862,0.39669 1.86203,0.72862 3.12497,0.72862c2.72828,0 4.12075,-1.32771 4.12075,-3.12497c-0.02429,-1.39247 -0.80148,-2.38826 -2.59065,-2.98734c-1.18198,-0.40479 -1.5301,-0.66385 -1.5301,-1.13341c-0.02429,-0.46146 0.39669,-0.72862 1.12531,-0.72862c0.79339,0 1.66773,0.26716 2.06442,0.52623l0.51813,-2.05633c-0.59099,-0.26716 -1.57868,-0.59909 -2.71209,-0.59909c-2.35587,0 -3.85359,1.39247 -3.85359,3.18974c-0.04857,1.13341 0.72862,2.19396 2.72018,2.85781c1.09293,0.39669 1.40057,0.59909 1.40057,1.13341c-0.0081,0.53432 -0.39669,0.79339 -1.26294,0.79339c-0.90673,0 -2.06442,-0.39669 -2.59065,-0.72862l-0.53432,2.12919z"></path>
-      <path class="sq-logo-letter" d="m13.10707,13.56043c1.352,0 1.9187,1.39247 1.9187,2.85781c-0.01619,1.73249 -0.73672,2.85781 -1.92679,2.85781c-1.27104,0 -1.93489,-1.19817 -1.93489,-2.85781c-0.01619,-1.39248 0.53432,-2.85781 1.93489,-2.85781m0.10524,-2.19396c-3.10068,0 -5.15701,1.99156 -5.15701,5.11653c0.01619,3.12497 2.18586,4.987 4.9789,4.987c2.57446,0 5.05177,-1.65964 5.05177,-5.1813c0.01619,-2.85781 -1.9268,-4.92223 -4.84937,-4.92223l-0.02429,0"></path>
-      <path class="sq-logo-letter" d="m19.02508,21.20284l2.98734,0l0,-5.51323c0,-0.26716 -0.00809,-0.53432 0.12144,-0.73672c0.1862,-0.52623 0.66385,-1.12531 1.5301,-1.12531c1.05245,0 1.46534,0.86625 1.46534,2.05633l0.02429,5.31892l2.97925,0l0,-5.65085c0,-2.85781 -1.47343,-4.12075 -3.40832,-4.12075c-1.63535,0 -2.59065,0.93102 -2.98734,1.5301l-0.06477,0l-0.13763,-1.32771l-2.59065,0c0.04048,0.86625 0.06477,1.86203 0.06477,3.0602l0.01619,6.50901z"></path>
-      <path class="sq-logo-letter" d="m34.72279,17.74594c0,0.13763 -0.02429,0.33193 -0.08905,0.46956c-0.17001,0.66385 -0.80148,1.12531 -1.5301,1.12531c-0.65576,0 -1.19818,-0.39669 -1.19818,-1.12531c0.02429,-1.13341 1.26294,-1.5301 2.79304,-1.5301l0.02429,1.06054m2.8821,-2.19396c0,-2.25872 -0.97959,-4.18552 -4.16933,-4.18552c-1.78107,0 -3.12497,0.53432 -3.78882,0.86625l0.5748,1.9268c0.63147,-0.39669 1.68392,-0.72862 2.6797,-0.72862c1.44915,0 1.7325,0.72862 1.7325,1.26294l-0.00809,0.12953c-3.40023,0 -5.64276,1.19818 -5.64276,3.65929c0.0081,1.52201 1.19818,2.98734 3.12497,2.98734c1.11722,0 2.12919,-0.46146 2.72018,-1.19818l0.06477,0l0.17811,0.93101l2.6959,0c-0.12144,-0.52622 -0.14573,-1.39247 -0.14573,-2.32349l-0.01619,-3.32736z"></path>
-      <path class="sq-logo-letter" d="m39.07022,21.20284l2.97925,0l0,-4.84937c0,-0.20239 0.02429,-0.46955 0.02429,-0.66385c0.23478,-0.93101 1.00388,-1.5301 2.06442,-1.5301c0.34812,0 0.59909,0.06477 0.79338,0.06477l0.02429,-2.79304c-0.21049,0 -0.35621,-0.06477 -0.61528,-0.06477c-0.9553,0 -2.12919,0.59909 -2.59874,1.99156l-0.08096,0l-0.12143,-1.7244l-2.55017,0c0.05667,0.79339 0.09715,1.7244 0.09715,3.12497l-0.01619,6.44424z"></path>
-      <path class="sq-logo-letter" d="m64.89576,18.54743c0,0.99578 0.04858,1.9268 0.04858,2.65541l-1.5382,0l-0.09715,-1.59487l-0.04047,0c-0.46146,0.80148 -1.51391,1.86203 -3.24641,1.86203c-1.48962,0 -3.31927,-0.86625 -3.31927,-4.25028l0,-5.72372l1.77298,0l0,5.39179c0,1.85393 0.55051,3.11687 2.14538,3.11687c1.20628,0 1.99966,-0.85815 2.33159,-1.65963c0.11334,-0.26716 0.1943,-0.53432 0.1943,-0.86625l-0.01619,-5.98278l1.76488,0l0,7.05142z"></path>
-      <path class="sq-logo-letter" d="m68.01263,17.41402c0,0.20239 0.05667,0.39669 0.05667,0.59909c0.37241,1.26294 1.39247,2.12919 2.65541,2.12919c1.87012,0 2.99544,-1.5301 2.99544,-3.78882c-0.02428,-1.9268 -0.99577,-3.59453 -2.93066,-3.59453c-1.19009,0 -2.32349,0.80148 -2.65542,2.19396c-0.05668,0.20239 -0.12953,0.40479 -0.12953,0.73672l0.00809,1.7244m-1.82155,3.85359c0.04047,-0.66385 0.08096,-1.59487 0.08096,-2.45302l0,-11.77126l1.74059,0l0,6.12041l0.04047,0c0.62338,-1.06864 1.74059,-1.79726 3.33546,-1.79726c2.38825,0 4.12075,1.99156 4.05598,4.987c0.01619,3.4569 -2.19395,5.1813 -4.31505,5.1813c-1.42486,0 -2.52589,-0.52623 -3.2626,-1.86203l-0.07287,0l-0.08096,1.59487l-1.522,0z"></path>
-      <path class="sq-logo-letter" d="m83.28937,15.42246c0.01619,-1.13341 -0.46146,-2.85781 -2.46112,-2.85781c-1.77297,0 -2.59064,1.65963 -2.72018,2.85781l5.1813,0m-5.1813,1.26294c0.04047,2.39635 1.59486,3.39213 3.31927,3.39213c1.27914,0 2.06442,-0.26716 2.72827,-0.53432l0.27526,1.26294c-0.62337,0.26716 -1.67583,0.59909 -3.19784,0.59909c-3.02782,0 -4.79269,-1.9268 -4.79269,-4.85747c-0.01619,-2.92258 1.7325,-5.24607 4.52554,-5.24607c3.18164,0 4.05598,2.79304 4.05598,4.58221c-0.03238,0.33193 -0.07286,0.59909 -0.07286,0.80148l-6.84093,0z"></path>
-      <path class="sq-logo-letter" d="m52.59827,19.34081c-1.64344,1.13341 -3.86978,0.73672 -5.00319,-0.93102c-1.10103,-1.65963 -0.66385,-3.85359 0.93101,-4.9789c1.66773,-1.13341 3.91836,-0.67195 5.05177,0.93102c1.08483,1.65963 0.66385,3.91836 -0.99578,4.9789m2.23444,-5.84515c-1.58677,-2.33158 -4.76031,-2.92258 -7.15667,-1.32771c-2.3073,1.59487 -2.92258,4.78461 -1.32771,7.10809c1.40867,2.06442 4.05599,2.79305 6.3147,1.86203l1.95918,3.18974l1.57868,-1.06054l-1.98347,-3.2626c1.71631,-1.65963 2.03204,-4.37982 0.63957,-6.509l-0.02429,0"></path>
-    </g>
-  </svg>
-</div>
diff --git a/server/sonar-web/src/main/hbs/nav/_nav-navbar-label.hbs b/server/sonar-web/src/main/hbs/nav/_nav-navbar-label.hbs
deleted file mode 100644 (file)
index df44ac0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-{{#if labelLocalized}}{{labelLocalized}}{{else}}{{t label}}{{/if}}
diff --git a/server/sonar-web/src/main/hbs/nav/nav-navbar.hbs b/server/sonar-web/src/main/hbs/nav/nav-navbar.hbs
deleted file mode 100644 (file)
index 192aa01..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-<div class="container">
-  <div class="navbar-header">
-    <a class="navbar-brand navbar-logo" href="/">
-      {{> '_nav-logo'}}
-    </a>
-    {{#eq space 'project'}}
-      <div class="navbar-brand" title="{{projectName}}">
-        {{#if navbarCanFavoriteProject}}
-          <a class="js-favorite navbar-favorite {{#if projectFavorite}}icon-favorite{{else}}icon-not-favorite{{/if}}"
-             title="{{#if projectFavorite}}{{t 'click_to_remove_from_favorites'}}{{else}}{{t 'click_to_add_to_favorites'}}{{/if}}">
-          </a>
-        {{/if}}
-        <a href="{{dashboardUrl projectKey}}">{{projectName}}</a>
-      </div>
-    {{/eq}}
-    {{#eq space 'settings'}}
-      <div class="navbar-brand" title="{{t 'layout.settings'}}">
-        {{t 'layout.settings'}}
-      </div>
-    {{/eq}}
-  </div>
-
-  <ul class="nav navbar-nav">
-    {{#each items}}
-      {{#notEmpty menu}}
-        <li class="dropdown {{#if active}}active{{/if}}">
-          <a class="dropdown-toggle" data-toggle="dropdown" href="#">
-            {{> '_nav-navbar-label'}}&nbsp;<i class="icon-dropdown"></i>
-          </a>
-          <ul class="dropdown-menu">
-            {{#each menu}}
-              <li {{#if active}}class="active"{{/if}}>
-                <a href="{{link url}}">
-                  {{> '_nav-navbar-label'}}
-                </a>
-              </li>
-            {{/each}}
-          </ul>
-        </li>
-      {{else}}
-        <li {{#if active}}class="active"{{/if}}>
-          <a href="{{link url}}">
-            {{> '_nav-navbar-label'}}
-          </a>
-        </li>
-      {{/notEmpty}}
-    {{/each}}
-  </ul>
-
-  <ul class="nav navbar-nav navbar-right">
-    {{#if user}}
-      <li class="dropdown">
-        <a class="dropdown-toggle" data-toggle="dropdown" href="#">
-          {{userName}}&nbsp;<span class="icon-dropdown"></span>
-        </a>
-        <ul class="dropdown-menu dropdown-menu-right">
-          <li>
-            <a href="{{link '/account/index'}}">{{t 'layout.user_panel.my_profile'}}</a>
-          </li>
-          <li>
-            <a href="{{link '/sessions/logout'}}"
-               onclick="if (sonarRecentHistory) { sonarRecentHistory.clear(); }">{{t 'layout.logout'}}</a>
-          </li>
-        </ul>
-      </li>
-    {{else}}
-      <li>
-        <a class="js-login" href="{{link '/sessions/new'}}">{{t 'layout.login'}}</a>
-      </li>
-    {{/if}}
-    <li class="dropdown js-search-dropdown">
-      <a class="dropdown-toggle js-search-dropdown-toggle" data-toggle="dropdown" href="#">
-        <i class="icon-search navbar-icon"></i>&nbsp;<span class="icon-dropdown"></span>
-      </a>
-      <div class="js-search-region dropdown-menu dropdown-menu-right"></div>
-    </li>
-    {{#if isUserAdmin}}
-      <li>
-        <a href="{{link '/settings/index'}}"><i class="icon-settings navbar-icon"></i></a>
-      </li>
-    {{/if}}
-  </ul>
-
-</div>
diff --git a/server/sonar-web/src/main/hbs/nav/nav-search-empty.hbs b/server/sonar-web/src/main/hbs/nav/nav-search-empty.hbs
deleted file mode 100644 (file)
index ccac483..0000000
+++ /dev/null
@@ -1 +0,0 @@
-<span class="subtitle">{{t 'no_results'}}</span>
diff --git a/server/sonar-web/src/main/hbs/nav/nav-search-item.hbs b/server/sonar-web/src/main/hbs/nav/nav-search-item.hbs
deleted file mode 100644 (file)
index 1de73f2..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<a href="{{url}}" title="{{name}}">
-  {{#if extra}}
-    <span class="navbar-search-extra subtitle">{{extra}}</span>
-  {{/if}}
-  {{#if q}}{{qualifierIcon q}}{{/if}}
-  {{#if subtitle}}
-    {{title}}
-    <br>
-    {{#if extra}}
-      <span class="navbar-search-extra subtitle">&nbsp;</span>
-    {{/if}}
-    <span class="subtitle">{{subtitle}}</span>
-  {{else}}
-    {{name}}
-  {{/if}}
-</a>
diff --git a/server/sonar-web/src/main/hbs/nav/nav-search.hbs b/server/sonar-web/src/main/hbs/nav/nav-search.hbs
deleted file mode 100644 (file)
index a505964..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<i class="navbar-search-icon icon-search"></i>
-
-<input class="navbar-search-input js-search-input" type="search" name="q" placeholder="{{t 'search_verb'}}"
-    autocomplete="off">
-
-<div class="js-search-results"></div>
index 84e5825a118d82a377fe323066d67fac41b641a9..22f6fba05e7b8d6376385ce030d6622eb409d01b 100644 (file)
@@ -1,8 +1,10 @@
-<div class="container-side container-side-left">
-  <div class="navigator-actions"></div>
-  <div class="navigator-results quality-gates-nav"></div>
-</div>
-<div class="container-main">
-  <div class="navigator-header"></div>
-  <div class="navigator-details"></div>
-</div>
+<div class="navigator-content">
+  <div class="navigator-side">
+    <div class="navigator-actions"></div>
+    <div class="navigator-results quality-gates-nav"></div>
+  </div>
+  <div class="navigator-main">
+    <div class="navigator-header"></div>
+    <div class="navigator-details"></div>
+  </div>
+</div>
\ No newline at end of file
index ca0bf4dab29d7c14a99f2ce430da6162cb7c96f5..a1c209a82b6b158a0e0e78e8b1dc17768b290faa 100644 (file)
@@ -21,13 +21,13 @@ function toggleFav(resourceId, elt) {
     }});
 }
 
-function dashboardParameters (urlHasSomething) {
+function dashboardParameters() {
   var queryString = window.location.search;
-  var parameters = [];
+  var parameters = '';
 
   var matchDashboard = queryString.match(/did=\d+/);
   if (matchDashboard && $j('#is-project-dashboard').length === 1) {
-    parameters.push(matchDashboard[0]);
+    parameters += (matchDashboard[0] + '&');
   }
 
   var matchPeriod = queryString.match(/period=\d+/);
@@ -35,15 +35,14 @@ function dashboardParameters (urlHasSomething) {
     // If we have a match for period, check that it is not project-specific
     var period = parseInt(/period=(\d+)/.exec(queryString)[1]);
     if (period <= 3) {
-      parameters.push(matchPeriod[0]);
+      parameters += matchPeriod[0] + '&';
     }
   }
 
-  var query = parameters.join('&');
-  if (query !== '') {
-    query = (urlHasSomething ? '&' : '?') + query;
+  if (parameters !== '') {
+    parameters = '?' + parameters;
   }
-  return query;
+  return parameters;
 }
 
 
@@ -341,7 +340,11 @@ jQuery(function () {
 
   // Define global shortcuts
   key('s', function () {
-    jQuery('.js-search-dropdown-toggle').dropdown('toggle');
+    jQuery('#searchInput').focus().on('keydown', function (e) {
+      if (e.keyCode === 27) {
+        jQuery('#searchInput').blur();
+      }
+    });
     return false;
   });
 });
index 168fece4780918f42e1219e757579cf5091fcff7..6a502e4a0e81babd791a3d142ce28e30ab8baaca 100644 (file)
@@ -127,6 +127,7 @@ define([
       this.app.layout.workspaceDetailsRegion.reset();
       this.app.layout.hideDetails();
       this.app.workspaceListView.bindScrollEvents();
+      this.app.workspaceListView.scrollTo();
     }
 
   });
index cf466543361368a4a6cd33cc5aa760ec0d1c1fd1..3623762bd26b48f106916f3f998aa4cc2e947a70 100644 (file)
@@ -5,7 +5,7 @@ define([
 
   return BaseFacet.extend({
     template: Templates['coding-rules-severity-facet'],
-    severities: ['BLOCKER', 'CRITICAL', 'MAJOR', 'MINOR', 'INFO'],
+    severities: ['BLOCKER', 'MINOR', 'CRITICAL', 'INFO', 'MAJOR'],
 
     sortValues: function (values) {
       var order = this.severities;
index 0c0c74a9ce397dc4140b2b2b711a676f87b1789e..451790ea2b68c65438846816fc92b0bfad3e27ff 100644 (file)
@@ -1,10 +1,26 @@
 define([
+    'coding-rules/rule/manual-rule-creation-view',
     'templates/coding-rules'
-], function () {
+], function (ManualRuleCreationView) {
 
   return Marionette.ItemView.extend({
     template: Templates['coding-rules-filters'],
 
+    events: {
+      'click .js-new-search': 'newSearch',
+      'click .js-create-manual-rule': 'createManualRule'
+    },
+
+    newSearch: function () {
+      this.options.app.controller.newSearch();
+    },
+
+    createManualRule: function() {
+      new ManualRuleCreationView({
+        app: this.options.app
+      }).render();
+    },
+
     serializeData: function () {
       return _.extend(Marionette.ItemView.prototype.serializeData.apply(this, arguments), {
         canWrite: this.options.app.canWrite
index b71a89ad59aa52296aa8e6896695b3db57d364f1..412b832f9b9ee5995aaf1a92cffcad476686ca4a 100644 (file)
@@ -16,6 +16,29 @@ define([
       workspaceDetailsRegion: '.search-navigator-workspace-details'
     },
 
+    initialize: function () {
+      var that = this;
+      $(window).on('scroll.search-navigator-layout', function () {
+        that.onScroll();
+      });
+    },
+
+    onClose: function () {
+      $(window).off('scroll.search-navigator-layout');
+    },
+
+    onRender: function () {
+      this.$('.search-navigator-side').isolatedScroll();
+    },
+
+    onScroll: function () {
+      var scrollTop = $(window).scrollTop();
+      $('.search-navigator').toggleClass('sticky', scrollTop >= this.topOffset);
+      this.$('.search-navigator-side').css({
+        top: Math.max(0, Math.min(this.topOffset - scrollTop, this.topOffset))
+      });
+    },
+
     showDetails: function () {
       this.scroll = $(window).scrollTop();
       $('.search-navigator').addClass('search-navigator-extended-view');
index ef550bb876d8f1d44d0331d21904052dc83f9f3c..95475fe7b5acdb50fba9f788d25e642edbfedfd5 100644 (file)
@@ -73,6 +73,7 @@ define([
             app: this.options.app,
             model: this.model
           }));
+          this.$el.scrollParent().scrollTop(30);
         },
 
         onClose: function () {
index 7d40501f109bbbc25a8643808f3dc1acf2b587f7..cbcebe2db724794c7cc375e72dba123e89a7d7fb 100644 (file)
@@ -1,9 +1,8 @@
 define([
   'components/navigator/workspace-header-view',
   'coding-rules/bulk-change-popup-view',
-  'coding-rules/rule/manual-rule-creation-view',
   'templates/coding-rules'
-], function (WorkspaceHeaderView, BulkChangePopup, ManualRuleCreationView) {
+], function (WorkspaceHeaderView, BulkChangePopup) {
 
   var $ = jQuery;
 
@@ -13,9 +12,7 @@ define([
     events: function () {
       return _.extend(WorkspaceHeaderView.prototype.events.apply(this, arguments), {
         'click .js-back': 'onBackClick',
-        'click .js-bulk-change': 'onBulkChangeClick',
-        'click .js-new-search': 'newSearch',
-        'click .js-create-manual-rule': 'createManualRule'
+        'click .js-bulk-change': 'onBulkChangeClick'
       });
     },
 
@@ -33,16 +30,6 @@ define([
       }).render();
     },
 
-    newSearch: function () {
-      this.options.app.controller.newSearch();
-    },
-
-    createManualRule: function() {
-      new ManualRuleCreationView({
-        app: this.options.app
-      }).render();
-    },
-
     serializeData: function () {
       return _.extend(WorkspaceHeaderView.prototype.serializeData.apply(this, arguments), {
         canWrite: this.options.app.canWrite
diff --git a/server/sonar-web/src/main/js/common/selectable-collection-view.js b/server/sonar-web/src/main/js/common/selectable-collection-view.js
deleted file mode 100644 (file)
index 6ddce02..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-define(function () {
-
-  return Marionette.CollectionView.extend({
-
-    initialize: function () {
-      this.resetSelectedIndex();
-      this.listenTo(this.collection, 'reset', this.resetSelectedIndex);
-    },
-
-    resetSelectedIndex: function () {
-      this.selectedIndex = 0;
-    },
-
-    onRender: function () {
-      this.selectCurrent();
-    },
-
-    submitCurrent: function () {
-      var view = this.children.findByIndex(this.selectedIndex);
-      if (view != null) {
-        view.submit();
-      }
-    },
-
-    selectCurrent: function () {
-      this.selectItem(this.selectedIndex);
-    },
-
-    selectNext: function () {
-      if (this.selectedIndex < this.collection.length - 1) {
-        this.deselectItem(this.selectedIndex);
-        this.selectedIndex++;
-        this.selectItem(this.selectedIndex);
-      }
-    },
-
-    selectPrev: function () {
-      if (this.selectedIndex > 0) {
-        this.deselectItem(this.selectedIndex);
-        this.selectedIndex--;
-        this.selectItem(this.selectedIndex);
-      }
-    },
-
-    selectItem: function (index) {
-      if (index >= 0 && index < this.collection.length) {
-        var view = this.children.findByIndex(index);
-        if (view != null) {
-          view.select();
-        }
-      }
-    },
-
-    deselectItem: function (index) {
-      var view = this.children.findByIndex(index);
-      if (view != null) {
-        view.deselect();
-      }
-    }
-  });
-
-});
diff --git a/server/sonar-web/src/main/js/nav/app.js b/server/sonar-web/src/main/js/nav/app.js
deleted file mode 100644 (file)
index f6295ee..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-define([
-  'nav/navbar'
-], function (NavbarView) {
-
-  var $ = jQuery,
-      App = new Marionette.Application();
-
-  App.addInitializer(function () {
-    this.navbarView = new NavbarView({
-      app: App,
-      el: $('.navbar'),
-      collection: new Backbone.Collection(window.navbarItems)
-    });
-    this.navbarView.render();
-  });
-
-  window.requestMessages().done(function () {
-    App.start();
-  });
-
-});
diff --git a/server/sonar-web/src/main/js/nav/navbar.js b/server/sonar-web/src/main/js/nav/navbar.js
deleted file mode 100644 (file)
index e39268e..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-define([
-  'nav/search-view',
-  'templates/nav'
-], function (SearchView) {
-
-  var $ = jQuery;
-
-  return Marionette.Layout.extend({
-    tagName: 'nav',
-    template: Templates['nav-navbar'],
-
-    regions: {
-      searchRegion: '.js-search-region'
-    },
-
-    events: {
-      'click .js-login': 'onLoginClick',
-      'click .js-favorite': 'onFavoriteClick',
-      'show.bs.dropdown .js-search-dropdown': 'onSearchDropdownShow',
-      'hidden.bs.dropdown .js-search-dropdown': 'onSearchDropdownHidden'
-    },
-
-    initialize: function () {
-      this.projectName = window.navbarProject;
-      this.projectKey = window.navbarProjectKey;
-      this.isProjectFavorite = window.navbarProjectFavorite;
-    },
-
-    onRender: function () {
-      var that = this;
-      this.$el.addClass('navbar-' + window.navbarSpace);
-      this.$el.addClass('navbar-fade');
-      setTimeout(function () {
-        that.$el.addClass('in');
-      }, 0);
-    },
-
-    onLoginClick: function () {
-      var returnTo = window.location.pathname + window.location.search;
-      window.location = baseUrl + '/sessions/new?return_to=' + encodeURIComponent(returnTo) + window.location.hash;
-      return false;
-    },
-
-    onFavoriteClick: function () {
-      var that = this,
-          p = window.process.addBackgroundProcess(),
-          url = baseUrl + '/favourites/toggle/' + window.navbarProjectId;
-      return $.post(url).done(function () {
-        that.isProjectFavorite = !that.isProjectFavorite;
-        that.render();
-        window.process.finishBackgroundProcess(p);
-      }).fail(function () {
-        window.process.failBackgroundProcess(p);
-      });
-    },
-
-    onSearchDropdownShow: function () {
-      var that = this;
-      this.searchRegion.show(new SearchView({
-        hide: function () {
-          that.$('.js-search-dropdown-toggle').dropdown('toggle');
-        }
-      }));
-    },
-
-    onSearchDropdownHidden: function () {
-      this.searchRegion.reset();
-    },
-
-    serializeData: function () {
-      return _.extend(Marionette.Layout.prototype.serializeData.apply(this, arguments), {
-        user: window.SS.user,
-        userName: window.SS.userName,
-        isUserAdmin: window.SS.isUserAdmin,
-
-        space: window.navbarSpace,
-
-        projectName: this.projectName,
-        projectKey: this.projectKey,
-        projectFavorite: this.isProjectFavorite,
-        navbarCanFavoriteProject: window.navbarCanFavoriteProject
-      });
-    }
-  });
-
-});
diff --git a/server/sonar-web/src/main/js/nav/search-view.js b/server/sonar-web/src/main/js/nav/search-view.js
deleted file mode 100644 (file)
index 6efd0ca..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-define([
-  'common/selectable-collection-view',
-  'templates/nav'
-], function (SelectableCollectionView) {
-
-  var $ = jQuery,
-
-      SearchItemView = Marionette.ItemView.extend({
-        tagName: 'li',
-        template: Templates['nav-search-item'],
-
-        select: function () {
-          this.$el.addClass('active');
-        },
-
-        deselect: function () {
-          this.$el.removeClass('active');
-        },
-
-        submit: function () {
-          this.$('a')[0].click();
-        }
-      }),
-
-      SearchEmptyView = Marionette.ItemView.extend({
-        tagName: 'li',
-        template: Templates['nav-search-empty']
-      }),
-
-      SearchResultsView = SelectableCollectionView.extend({
-        className: 'menu',
-        tagName: 'ul',
-        itemView: SearchItemView,
-        emptyView: SearchEmptyView
-      });
-
-  return Marionette.Layout.extend({
-    className: 'navbar-search',
-    tagName: 'form',
-    template: Templates['nav-search'],
-
-    regions: {
-      resultsRegion: '.js-search-results'
-    },
-
-    events: {
-      'submit': 'onSubmit',
-      'keydown .js-search-input': 'onKeyDown',
-      'keyup .js-search-input': 'debouncedOnKeyUp'
-    },
-
-    initialize: function () {
-      this.results = new Backbone.Collection();
-      this.resetResultsToDefault();
-      this.resultsView = new SearchResultsView({ collection: this.results });
-      this.debouncedOnKeyUp = _.debounce(this.onKeyUp, 400);
-      this._bufferedValue = '';
-    },
-
-    onRender: function () {
-      var that = this;
-      this.resultsRegion.show(this.resultsView);
-      setTimeout(function () {
-        that.$('.js-search-input').focus();
-      }, 0);
-    },
-
-    onKeyDown: function (e) {
-      if (e.keyCode === 38) {
-        this.resultsView.selectPrev();
-        return false;
-      }
-      if (e.keyCode === 40) {
-        this.resultsView.selectNext();
-        return false;
-      }
-      if (e.keyCode === 13) {
-        this.resultsView.submitCurrent();
-        return false;
-      }
-      if (e.keyCode === 27) {
-        this.options.hide();
-        return false;
-      }
-    },
-
-    onKeyUp: function () {
-      var value = this.$('.js-search-input').val();
-      if (value === this._bufferedValue) {
-        return;
-      }
-      this._bufferedValue = this.$('.js-search-input').val();
-      this.search(value);
-    },
-
-    onSubmit: function () {
-      return false;
-    },
-
-    resetResultsToDefault: function () {
-      var recentHistory = JSON.parse(localStorage.getItem('sonar_recent_history')),
-          history = (recentHistory || []).map(function (historyItem) {
-            return {
-              url: baseUrl + '/dashboard/index?id=' + encodeURIComponent(historyItem.key) + dashboardParameters(true),
-              name: historyItem.name,
-              q: historyItem.icon
-            };
-          }),
-          qualifiers = window.navbarQualifiers.map(function (q) {
-            return {
-              url: baseUrl + '/all_projects?qualifier=' + encodeURIComponent(q),
-              name: t('qualifiers.all', q)
-            };
-          });
-      this.results.reset(history.concat(qualifiers));
-    },
-
-    search: function (q) {
-      if (q.length < 2) {
-        this.resetResultsToDefault();
-        return;
-      }
-      var that = this,
-          url = baseUrl + '/api/components/suggestions',
-          options = { s: q },
-          p = window.process.addBackgroundProcess();
-      return $.get(url, options).done(function (r) {
-        var collection = [];
-        r.results.forEach(function (domain) {
-          domain.items.forEach(function (item, index) {
-            var title = item.name,
-                subtitle = null;
-            if (domain.q === 'FIL' || domain.q === 'UTS') {
-              subtitle = title.substr(0, title.lastIndexOf('/') - 1);
-              title = title.substr(title.lastIndexOf('/') + 1);
-            }
-            collection.push(_.extend(item, {
-              q: domain.q,
-              title: title,
-              subtitle: subtitle,
-              extra: index === 0 ? domain.name : ' ',
-              url: baseUrl + '/dashboard/index?id=' + encodeURIComponent(item.key) + dashboardParameters(true)
-            }));
-          });
-        });
-        that.results.reset(collection);
-        window.process.finishBackgroundProcess(p);
-      }).fail(function() {
-        window.process.failBackgroundProcess(p);
-      });
-    }
-  });
-
-});
diff --git a/server/sonar-web/src/main/js/third-party/bootstrap/dropdown.js b/server/sonar-web/src/main/js/third-party/bootstrap/dropdown.js
deleted file mode 100644 (file)
index 980424d..0000000
+++ /dev/null
@@ -1,161 +0,0 @@
-/* ========================================================================
- * Bootstrap: dropdown.js v3.3.1
- * http://getbootstrap.com/javascript/#dropdowns
- * ========================================================================
- * Copyright 2011-2015 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
-  'use strict';
-
-  // DROPDOWN CLASS DEFINITION
-  // =========================
-
-  var backdrop = '.dropdown-backdrop'
-  var toggle   = '[data-toggle="dropdown"]'
-  var Dropdown = function (element) {
-    $(element).on('click.bs.dropdown', this.toggle)
-  }
-
-  Dropdown.VERSION = '3.3.1'
-
-  Dropdown.prototype.toggle = function (e) {
-    var $this = $(this)
-
-    if ($this.is('.disabled, :disabled')) return
-
-    var $parent  = getParent($this)
-    var isActive = $parent.hasClass('open')
-
-    clearMenus()
-
-    if (!isActive) {
-      if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
-        // if mobile we use a backdrop because click events don't delegate
-        $('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus)
-      }
-
-      var relatedTarget = { relatedTarget: this }
-      $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
-
-      if (e.isDefaultPrevented()) return
-
-      $this
-        .trigger('focus')
-        .attr('aria-expanded', 'true')
-
-      $parent
-        .toggleClass('open')
-        .trigger('shown.bs.dropdown', relatedTarget)
-    }
-
-    return false
-  }
-
-  Dropdown.prototype.keydown = function (e) {
-    if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return
-
-    var $this = $(this)
-
-    e.preventDefault()
-    e.stopPropagation()
-
-    if ($this.is('.disabled, :disabled')) return
-
-    var $parent  = getParent($this)
-    var isActive = $parent.hasClass('open')
-
-    if ((!isActive && e.which != 27) || (isActive && e.which == 27)) {
-      if (e.which == 27) $parent.find(toggle).trigger('focus')
-      return $this.trigger('click')
-    }
-
-    var desc = ' li:not(.divider):visible a'
-    var $items = $parent.find('[role="menu"]' + desc + ', [role="listbox"]' + desc)
-
-    if (!$items.length) return
-
-    var index = $items.index(e.target)
-
-    if (e.which == 38 && index > 0)                 index--                        // up
-    if (e.which == 40 && index < $items.length - 1) index++                        // down
-    if (!~index)                                      index = 0
-
-    $items.eq(index).trigger('focus')
-  }
-
-  function clearMenus(e) {
-    if (e && e.which === 3) return
-    $(backdrop).remove()
-    $(toggle).each(function () {
-      var $this         = $(this)
-      var $parent       = getParent($this)
-      var relatedTarget = { relatedTarget: this }
-
-      if (!$parent.hasClass('open')) return
-
-      $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
-
-      if (e.isDefaultPrevented()) return
-
-      $this.attr('aria-expanded', 'false')
-      $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
-    })
-  }
-
-  function getParent($this) {
-    var selector = $this.attr('data-target')
-
-    if (!selector) {
-      selector = $this.attr('href')
-      selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
-    }
-
-    var $parent = selector && $(selector)
-
-    return $parent && $parent.length ? $parent : $this.parent()
-  }
-
-
-  // DROPDOWN PLUGIN DEFINITION
-  // ==========================
-
-  function Plugin(option) {
-    return this.each(function () {
-      var $this = $(this)
-      var data  = $this.data('bs.dropdown')
-
-      if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
-      if (typeof option == 'string') data[option].call($this)
-    })
-  }
-
-  var old = $.fn.dropdown
-
-  $.fn.dropdown             = Plugin
-  $.fn.dropdown.Constructor = Dropdown
-
-
-  // DROPDOWN NO CONFLICT
-  // ====================
-
-  $.fn.dropdown.noConflict = function () {
-    $.fn.dropdown = old
-    return this
-  }
-
-
-  // APPLY TO STANDARD DROPDOWN ELEMENTS
-  // ===================================
-
-  $(document)
-    .on('click.bs.dropdown.data-api', clearMenus)
-    .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
-    .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
-    .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
-    .on('keydown.bs.dropdown.data-api', '[role="menu"]', Dropdown.prototype.keydown)
-    .on('keydown.bs.dropdown.data-api', '[role="listbox"]', Dropdown.prototype.keydown)
-
-}(jQuery);
index 7123c87614107b02489114d827030c168ff5e11c..9daa77f88991b2178e3368bd02ce81bfd58cfff1 100644 (file)
 
 
   window.requestMessages = function() {
-    var currentLocale = window.pageLang,
-        cachedLocale = localStorage.getItem('l10n.locale');
+    var currentLocale = (navigator.language || navigator.userLanguage).replace('-', '_');
+    var cachedLocale = localStorage.getItem('l10n.locale');
     if (cachedLocale !== currentLocale) {
       localStorage.removeItem('l10n.timestamp');
     }
 
-    var bundleTimestamp = localStorage.getItem('l10n.timestamp'),
-        params = { locale: currentLocale };
+    var bundleTimestamp = localStorage.getItem('l10n.timestamp');
+    var params = {};
     if (bundleTimestamp !== null) {
       params.ts = bundleTimestamp;
     }
index 860b68b054034e79a153ee19e98b9bd95d426f82..12c41821334ff0af9fb4bc04d19173b935af8eed 100644 (file)
@@ -8,5 +8,3 @@
 @import "components/search-navigator";
 @import "components/typography";
 @import "components/tooltips";
-@import "components/dropdowns";
-@import "components/menu";
diff --git a/server/sonar-web/src/main/less/components/dropdowns.less b/server/sonar-web/src/main/less/components/dropdowns.less
deleted file mode 100644 (file)
index 756622d..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-@import (reference) "../mixins";
-@import (reference) "../variables";
-@import (reference) "../ui";
-
-
-.dropdown {
-  position: relative;
-}
-
-.dropdown-toggle:focus {
-  outline: 0;
-}
-
-.dropdown-menu {
-  position: absolute;
-  top: 100%;
-  left: 0;
-  z-index: 1000;
-  display: none; // none by default, but block on "open" of the menu
-  float: left;
-  min-width: 160px;
-  padding: 5px 0;
-  list-style: none;
-  font-size: @smallFontSize;
-  text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)
-  background-color: #fff;
-  border: 1px solid @barBorderColor;
-  box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
-  background-clip: padding-box;
-
-  &.pull-right {
-    right: 0;
-    left: auto;
-  }
-
-  // Links within the dropdown menu
-  > li > a {
-    display: block;
-    padding: 3px 20px;
-    line-height: 1.5;
-    clear: both;
-    font-weight: normal;
-    color: @baseFontColor;
-    white-space: nowrap; // prevent links from randomly breaking onto new lines
-  }
-}
-
-// Hover/Focus state
-.dropdown-menu > li > a {
-  &:hover,
-  &:focus {
-    text-decoration: none;
-    color: @baseFontColor;
-    background-color: @lightBlue;
-  }
-}
-
-// Active state
-.dropdown-menu > .active > a {
-  &,
-  &:hover,
-  &:focus {
-    color: @baseFontColor;
-    text-decoration: none;
-    outline: 0;
-    background-color: @lightBlue;
-  }
-}
-
-// Open state for the dropdown
-.open {
-  // Show the menu
-  > .dropdown-menu {
-    display: block;
-  }
-
-  // Remove the outline when :focus is triggered
-  > a {
-    outline: 0;
-  }
-}
-
-// Menu positioning
-//
-// Add extra class to `.dropdown-menu` to flip the alignment of the dropdown
-// menu with the parent.
-.dropdown-menu-right {
-  left: auto; // Reset the default from `.dropdown-menu`
-  right: 0;
-}
-// With v3, we enabled auto-flipping if you have a dropdown within a right
-// aligned nav component. To enable the undoing of that, we provide an override
-// to restore the default dropdown menu alignment.
-//
-// This is only for left-aligning a dropdown menu within a `.navbar-right` or
-// `.pull-right` nav component.
-.dropdown-menu-left {
-  left: 0;
-  right: auto;
-}
-
-// Dropdown section headers
-.dropdown-header {
-  display: block;
-  padding: 3px 20px;
-  font-size: @smallFontSize;
-  color: @baseFontColor;
-  white-space: nowrap; // as with > li > a
-}
-
-// Backdrop to catch body clicks on mobile, etc.
-.dropdown-backdrop {
-  position: fixed;
-  left: 0;
-  right: 0;
-  bottom: 0;
-  top: 0;
-  z-index: (1000 - 10);
-}
index 33bd7f023e97cdaa265e29332383efe9221f62b1..ae37e07518411b9d6633e2bcb0e1443b40464860 100644 (file)
@@ -9,6 +9,7 @@
   padding: 4px 5px;
   border: 1px solid @barBorderColor;
   border-radius: 2px;
+  background-color: lighten(@barBackgroundColor, 2%);
   font-size: 0;
   cursor: pointer;
   white-space: nowrap;
@@ -36,6 +37,7 @@
 }
 
 .facet-name {
+  background-color: lighten(@barBackgroundColor, 2%);
   font-size: @smallFontSize;
 }
 
@@ -43,6 +45,7 @@
   margin-left: 5px;
   padding-left: 5px;
   border-left: 1px solid @barBorderColor;
+  background-color: lighten(@barBackgroundColor, 2%);
   color: @secondFontColor;
   font-size: @smallFontSize;
 }
index 5bcac57320215b3dcfa8e3d8dd3096473b576bb5..e4029858dde3fce397999bba111e4427f78d2039 100644 (file)
@@ -24,8 +24,7 @@
 
 .issue-list,
 .issue {
-  width: 780px;
-  .box-sizing(border-box);
+  max-width: 920px;
 }
 
 .issue.selected {
@@ -63,8 +62,6 @@
   line-height: 1.5;
   font-size: @baseFontSize;
   font-weight: 500;
-  word-break: break-all;
-  word-break: break-word;
 }
 
 .issue-tags {
diff --git a/server/sonar-web/src/main/less/components/menu.less b/server/sonar-web/src/main/less/components/menu.less
deleted file mode 100644 (file)
index 0b78b90..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-@import (reference) "../mixins";
-@import (reference) "../variables";
-@import (reference) "../ui";
-
-.menu {
-  min-width: 160px;
-  padding: 5px 0;
-  list-style: none;
-  font-size: @smallFontSize;
-  text-align: left;
-  background-color: #fff;
-  background-clip: padding-box;
-
-  > li > a,
-  > li > span {
-    display: block;
-    padding: 3px 20px;
-    line-height: 1.5;
-    clear: both;
-    font-weight: normal;
-    .text-ellipsis;
-  }
-
-  > li > a {
-    color: @baseFontColor;
-  }
-
-  .divider {
-    height: 1px;
-    margin: 9px 0;
-    overflow: hidden;
-    background-color: @barBorderColor;
-  }
-}
-
-
-.menu > li > a {
-  &:hover, &:focus {
-    text-decoration: none;
-    color: @baseFontColor;
-    background-color: @lightBlue;
-  }
-}
-
-
-.menu > .active > a {
-  &, &:hover, &:focus {
-    color: @baseFontColor;
-    text-decoration: none;
-    outline: 0;
-    background-color: @lightBlue;
-  }
-}
index 9b55df03892e8b0b349ba1a6f690d27c7da0c59e..f73ff56db1e913410f86f8ba7657470bdd0d130c 100644 (file)
@@ -2,18 +2,49 @@
 @import (reference) "../mixins";
 @import (reference) "../ui";
 
-@sideWidth: 180px;
+@sideWidth: 300px;
 
 .search-navigator {
-  .clearfix;
+
+  &.sticky {
+
+    .search-navigator-workspace-header {
+      position: fixed;
+      z-index: 4;
+      top: 0;
+      left: @sideWidth;
+      right: 0;
+    }
+
+    .search-navigator-workspace-list,
+    .search-navigator-workspace-details {
+      padding-top: 22px + 5px + 5px + 1px + 10px;
+    }
+
+    .search-navigator-side {
+      position: fixed;
+      z-index: 4;
+      top: 0;
+      bottom: 0;
+      overflow-y: auto;
+    }
+
+  }
 }
 
 .search-navigator-side {
+  position: fixed;
+  z-index: 100;
+  width: @sideWidth;
+  top: 30px; left: 0; bottom: 0;
   .box-sizing(border-box);
+  background-color: @barBorderColor;
   overflow-x: hidden;
 }
 
 .search-navigator-facet-box {
+  border-top: 1px solid @barBorderColor;
+  background-color: @barBackgroundColor;
   font-size: @baseFontSize;
 }
 
   margin: 0 0 1px 0;
   border-color: transparent;
   .box-sizing(border-box);
+  background-color: @barBackgroundColor;
   white-space: normal;
   overflow: hidden;
 
   .facet-name {
     white-space: nowrap;
+    background-color: @barBackgroundColor;
     color: @baseFontColor;
   }
 
     top: 0; right: 0;
     padding: 4px 5px;
     border: none;
+    background-color: @barBackgroundColor;
 
     &:before {
       content: " ";
       position: absolute;
       top: 0; bottom: 0; right: 100%;
       width: 10px;
-      background-image: linear-gradient(to right, fade(#fff, 0%), #fff 75%);
+      background-image: linear-gradient(to right, fade(@barBackgroundColor, 0%), @barBackgroundColor 75%);
     }
   }
 
 }
 
 .search-navigator-facet-half {
+  width: 45%;
+
+  &:nth-child(odd) {
+    margin-right: 10%;
+  }
 }
 
 .search-navigator-facet-header {
   display: block;
-  padding: 6px 0;
+  padding: 6px 10px;
   border-bottom: none;
   color: @baseFontColor;
   font-weight: 500;
 }
 
 .search-navigator-facet-list {
-  margin: 0;
-  padding: 0 0 10px;
+  margin: 0 0 0 0;
+  padding: 0 10px 10px;
   font-size: 0;
 }
 
 }
 
 .search-navigator-facet-query {
-  padding: 6px 0;
+  padding: 6px 10px;
 
   input {
     width: 100%;
 }
 
 .search-navigator-facet-input {
-  width: 100%;
+  width: @sideWidth * 0.4;
 }
 
 .search-navigator-filters {
-  .clearfix;
   position: relative;
-  padding: 5px 0;
+  .clearfix;
+  padding: 5px 10px;
+  background-color: @barBackgroundColor;
 }
 
 .search-navigator-filters-selected {
 }
 
 .search-navigator-workspace {
-
+  padding-left: @sideWidth;
 }
 
 .search-navigator-workspace-header {
   margin-bottom: 10px;
   padding: 5px 0;
   line-height: 22px;
+  border-bottom: 1px solid @barBorderColor;
+  background-color: @barBackgroundColor;
   font-size: @smallFontSize;
 
   .button-group,
   position: absolute;
   top: 0;
   right: 0;
-  padding: 5px 0;
+  padding: 5px 10px;
+  background-color: @barBackgroundColor;
   font-size: 0;
   white-space: nowrap;
 
     position: absolute;
     top: 0; bottom: 0; right: 100%;
     width: 10px;
-    background-image: linear-gradient(to right, fade(#fff, 0%), #fff 75%);
+    background-image: linear-gradient(to right, fade(@barBackgroundColor, 0%), @barBackgroundColor 75%);
   }
 }
 
 }
 
 .search-navigator-workspace-list {
+  padding: 0 5px;
 
+  .issue {
+    max-width: none;
+  }
 }
 
 .search-navigator-workspace-details {
index c4489efa00c45689edf36fcce4fe9deffcdb64c0..189dfd35795193163705d30a8117638c9e1841c5 100644 (file)
@@ -541,9 +541,6 @@ a[class^="icon-"], a[class*=" icon-"] {
   content: "\f002";
   font-size: @iconFontSize;
 }
-.icon-user:before {
-  content: "\e60a";
-}
 
 
 /*
index 88b13ff20aa0c125513533160660351895cce600..1bb3b601012628465ae96ed0b6ab8af1ae9555ef 100644 (file)
@@ -7,6 +7,14 @@
 
 .issues {
 
+  &.sticky {
+
+    .issues-workspace-list,
+    .issues-workspace-component-viewer {
+      padding-top: 22px + 5px + 5px + 1px + 10px;
+    }
+
+  }
 }
 
 .issues-workspace-list-component {
@@ -28,6 +36,7 @@
 
 .issues-workspace-component-viewer {
   display: none;
+  padding: 1px 10px;
   min-height: 100vh;
 
   .code-issue-modern {
diff --git a/server/sonar-web/src/main/less/layout-new.less b/server/sonar-web/src/main/less/layout-new.less
deleted file mode 100644 (file)
index 330ea4f..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-@import (reference) "mixins";
-@import (reference) "variables";
-@import (reference) "ui";
-
-@pageWidth: 1020px;
-@containerWidth: 980px;
-@contentWidth: 780px;
-@sideMargin: 10px;
-@sideWidth: @containerWidth - @contentWidth - @sideMargin;
-
-html {
-  overflow-y: scroll;
-}
-
-body {
-  min-width: @pageWidth;
-  min-height: 100vh;
-}
-
-.wrapper {
-  min-height: ~"calc(100vh - 60px)";
-}
-
-.container {
-  width: @containerWidth;
-  margin: 0 auto;
-  .box-sizing(border-box);
-}
-
-.container-full-width {
-  width: ~"calc(100% - 40px)";
-
-  .container-main {
-    width: 100%;
-  }
-
-  .container-side {
-    display: none;
-  }
-}
-
-.container-one-third {
-  width: @containerWidth / 3;
-}
-
-.container-two-thirds {
-  width: @containerWidth / 3 * 2;
-}
-
-.container-one-half {
-  width: @containerWidth / 2;
-}
-
-.container-side {
-  width: @sideWidth;
-  .box-sizing(border-box);
-}
-
-.container-side-left {
-  float: left;
-  padding-right: @sideMargin;
-  border-right: 1px solid @barBackgroundColor;
-}
-
-.container-side-left + .container-main {
-  padding-left: @sideMargin;
-}
-
-.container-side-right {
-  float: right;
-  padding-left: @sideMargin;
-  border-left: 1px solid @barBackgroundColor;
-}
-
-.container-side-right + .container-main {
-  padding-right: @sideMargin;
-}
-
-.container-main {
-  float: left;
-  width: @contentWidth;
-}
-
-.face-bar {
-
-}
-
-.face-main {
-  background-color: #fff;
-}
index ba327da05d8273776f620b639cd1e06f710bfe98..7ccf1d683c1da4fa6f519b4ffa0437c7c51320fc 100644 (file)
@@ -2,17 +2,83 @@
 @import (reference) "variables";
 @import (reference) "ui";
 
+@media print {
+  /* ------------------- PRINT ------------------- */
+  html, body {
+    font-size: 8pt;
+  }
+
+  a, a:link, a:visited {
+    text-decoration: none;
+    border-bottom: 0;
+  }
+
+  .noprint {
+    display: none !important;
+  }
+
+  .print {
+    display: inline;
+    position: static;
+    left: 0;
+  }
+
+  #hd, #sidebar, #crumbs {
+    display: none;
+  }
+
+  .with_sidebar, .wo_sidebar {
+    padding: 0 !important;
+    margin: 0;
+  }
+
+  #content {
+    margin-left: 0 !important;
+  }
+
+  .widget thead, .widget tfoot {
+    // Fix for phantomjs bug about wrapping tables
+    display: table-row-group;
+  }
+}
+
+@media screen {
+  .print {
+    display: none;
+  }
+}
+
+body, a {
+  color: #444;
+}
+
+/* LAYOUT */
+#container {
+  height: auto !important;
+  min-width: 940px;
+  min-height: 500px;
+}
+
 #hd {
+  color: #FFF;
+  background: #262626;
+  padding: 0 10px;
+  height: 30px;
+  line-height: 30px;
+  font-size: 93%;
+  margin: 0;
   position: relative;
-  background: @darkColor;
-  height: 40px;
-  line-height: 40px;
-  color: @lightColor;
+}
+
+#hd #nav-left > ul > li {
+  height: 30px;
 }
 
 #hd a {
   color: #fff;
   .link-no-underline;
+
+  &.selected, &:hover, &:focus { color: @blue; }
 }
 
 #nav-left {
 
 #nav-left > ul > li {
   float: left;
-}
-
-#nav-left > ul > li > a {
-  display: block;
-  height: 40px;
-  padding: 0 10px;
-  .box-sizing(border-box);
-}
-
-#nav-left > ul > li > a:hover,
-#nav-left > ul > li > a:focus,
-#nav-left > ul > li > a.selected {
-  background-color: #000;
-}
-
-#nav-left > ul > li > a.selected {
-  color: @blue !important;
+  padding: 0 20px 0 0;
 }
 
 #nav-left > ul > li > a,
 #nav > ul > li > a {
-  font-size: @baseFontSize;
+  font-size: @smallFontSize;
   font-weight: 300;
   letter-spacing: 0.05em;
 }
 }
 
 #footer {
-  position: relative;
-  min-height: 60px;
-  .box-sizing(border-box);
-  background-color: @barBackgroundColor;
+  padding: 4px 0;
   clear: both;
 }
 
 #body {
   position: relative;
-  padding-top: 10px;
-  padding-bottom: 10px;
 }
 
 .with_sidebar {
 }
 
 #sidebar {
-  margin-bottom: 10px;
+  position: absolute;
+  top: 0; left: 10px;
+  width: 150px;
+
+  &.sticky {
+    position: fixed;
+  }
 }
 
 ul.sidebar {
@@ -164,7 +215,6 @@ ul.sidebar {
 }
 
 ul.sidebar li {
-  display: inline-block;
   list-style-type: none;
   padding: 3px 10px;
 }
@@ -218,7 +268,7 @@ ul.sidebar select, ul.sidebar input {
 }
 
 .page {
-  padding: 10px 0;
+  padding: 10px;
 }
 .page-split-left {
   min-width: 200px;
@@ -258,49 +308,3 @@ ul.sidebar select, ul.sidebar input {
 .nolayout {
   padding: 10px;
 }
-
-@media print {
-  /* ------------------- PRINT ------------------- */
-  html, body {
-    font-size: 8pt;
-  }
-
-  a, a:link, a:visited {
-    text-decoration: none;
-    border-bottom: 0;
-  }
-
-  .noprint {
-    display: none !important;
-  }
-
-  .print {
-    display: inline;
-    position: static;
-    left: 0;
-  }
-
-  #hd, #sidebar, #crumbs {
-    display: none;
-  }
-
-  .with_sidebar, .wo_sidebar {
-    padding: 0 !important;
-    margin: 0;
-  }
-
-  #content {
-    margin-left: 0 !important;
-  }
-
-  .widget thead, .widget tfoot {
-    // Fix for phantomjs bug about wrapping tables
-    display: table-row-group;
-  }
-}
-
-@media screen {
-  .print {
-    display: none;
-  }
-}
diff --git a/server/sonar-web/src/main/less/navbar.less b/server/sonar-web/src/main/less/navbar.less
deleted file mode 100644 (file)
index 34fa99e..0000000
+++ /dev/null
@@ -1,223 +0,0 @@
-@import (reference) "mixins";
-@import (reference) "variables";
-@import (reference) "ui";
-
-@navbarBackground: #151515;
-@navbarProjectBackground: @navbarBackground;
-@navbarSettingsBackground: #591500;
-
-@navbarHeight: 36px;
-@navbarLineHeight: 20px;
-@navbarTopPadding: (@navbarHeight - @navbarLineHeight) / 2;
-
-.navbar-sticky {
-  padding-top: @navbarHeight !important;
-
-  .navbar {
-    position: fixed;
-    z-index: 10;
-    top: 0;
-    left: 0;
-    right: 0;
-    margin-bottom: 0;
-    .trans(background-color, 0.5s ease);
-  }
-}
-
-.navbar, [class^="navbar-"], [class*=" navbar-"] {
-  .box-sizing(border-box);
-}
-
-.navbar {
-  .clearfix;
-}
-
-.navbar-fade {
-  .navbar-nav {
-    opacity: 0;
-    .trans(opacity);
-  }
-
-  .navbar-favorite {
-    margin-right: -23px;
-    .trans(margin);
-  }
-
-  &.in {
-    .navbar-nav {
-      opacity: 1;
-    }
-
-    .navbar-favorite {
-      margin-right: 0;
-    }
-  }
-}
-
-.navbar a {
-  .link-no-underline;
-}
-
-.navbar-header {
-  float: left;
-}
-
-.navbar-brand {
-  position: relative;
-  float: left;
-  height: @navbarHeight;
-  padding: @navbarTopPadding 10px;
-  font-size: @bigFontSize;
-  line-height: @navbarLineHeight;
-  color: @lightColor;
-
-  max-width: 240px;
-  overflow: hidden;
-  text-overflow: ellipsis;
-  white-space: nowrap;
-
-  a, a:hover, a:focus {
-    color: @lightColor;
-  }
-}
-
-.navbar-logo {
-  @topPadding: (@navbarHeight - 25) / 2;
-  padding-top: @topPadding !important;
-  padding-bottom: @topPadding !important;
-}
-
-.navbar-nav {
-  float: left;
-}
-
-.navbar-nav > li {
-  float: left;
-}
-
-.navbar-nav > li > a {
-  padding: @navbarTopPadding 10px;
-  line-height: @navbarLineHeight;
-  color: @lightColor;
-  font-size: 12px;
-  font-weight: 300;
-  letter-spacing: 0.05em;
-
-  &:hover, &:focus {
-    color: @lightColor;
-  }
-}
-
-.navbar-nav > .active > a,
-.navbar-nav > .dropdown.open > a {
-  color: @lightColor;
-}
-
-
-.navbar-icon:before {
-  font-size: @iconFontSize;
-}
-
-.navbar-favorite {
-  position: relative;
-  top: -2px;
-}
-
-.navbar-right {
-  float: right;
-}
-
-.navbar-search {
-  position: relative;
-  width: 400px;
-  .box-sizing(border-box);
-  .trans(width);
-}
-
-.navbar-search-input {
-  width: 100%;
-  padding: 0 20px 0 40px !important;
-  border: none !important;
-}
-
-.navbar-search-icon {
-  position: absolute;
-  top: 4px;
-  left: 20px;
-  color: @secondFontColor;
-
-  &:before {
-    font-size: @iconSmallFontSize;
-  }
-}
-
-.navbar-search-extra {
-  display: inline-block;
-  width: 90px;
-  margin-right: 10px;
-  text-align: right;
-}
-
-
-.navbar-global {
-  background-color: @navbarBackground;
-
-  .navbar-sticky & {
-    background-color: fade(@navbarBackground, 90%);
-  }
-
-  .navbar-nav > li > a:hover,
-  .navbar-nav > li > a:focus,
-  .navbar-nav > .active > a,
-  .navbar-nav > .dropdown.open > a {
-    background-color: darken(@navbarBackground, 10%);
-  }
-}
-
-
-.navbar-project {
-  background-color: @navbarProjectBackground;
-
-  .navbar-sticky & {
-    background-color: fade(@navbarProjectBackground, 90%);
-  }
-
-  .navbar-nav > li > a:hover,
-  .navbar-nav > li > a:focus,
-  .navbar-nav > .active > a,
-  .navbar-nav > .dropdown.open > a {
-    background-color: darken(@navbarProjectBackground, 10%);
-  }
-
-  .sq-logo {
-    margin-left: -78px;
-  }
-
-  .sq-logo .sq-logo-letter {
-    display: none;
-  }
-}
-
-
-.navbar-settings {
-  background-color: @navbarSettingsBackground;
-
-  .navbar-sticky & {
-    background-color: fade(@navbarSettingsBackground, 90%);
-  }
-
-  .navbar-nav > li > a:hover,
-  .navbar-nav > li > a:focus,
-  .navbar-nav > .active > a,
-  .navbar-nav > .dropdown.open > a {
-    background-color: darken(@navbarSettingsBackground, 10%);
-  }
-
-  .sq-logo {
-    margin-left: -78px;
-  }
-
-  .sq-logo .sq-logo-letter {
-    display: none;
-  }
-}
index cc6de6730c7846c6328e81e1f1d9bc0ebb2eb890..070216d1b21aef108cecffaade17dbc265e1f2b8 100644 (file)
@@ -2,8 +2,17 @@
 @import (reference) "mixins";
 @import (reference) "navigator/config";
 
+@qualityGateSidebarWidth: 230px;
+
 .quality-gates-navigator {
 
+  .navigator-side {
+    display: table-cell;
+    vertical-align: top;
+    width: @qualityGateSidebarWidth + 2 * @navigatorPadding;
+    min-width: 0;
+  }
+
   .navigator-header {
     margin-left: 0;
     .spinner { margin-top: 9px; }
@@ -11,6 +20,7 @@
 
   .navigator-actions {
     height: @navigatorHeaderHeight;
+    width: @qualityGateSidebarWidth;
     margin: @navigatorPadding;
     padding: 0 @navigatorPadding;
 
@@ -23,8 +33,8 @@
   }
 
   .navigator-results {
+    width: @qualityGateSidebarWidth;
     min-width: 0;
-    width: auto;
   }
 
   .navigator-details { margin-left: 0; }
index 11b53fbc9d1bf6df13420978509631b6aeb5a7bf..5db861177683fbde83507c6db5e7f57f9d5cfd3a 100644 (file)
   FOOTER
 */
 #ftlinks {
-  background: @barBackgroundColor;
+  background: #fff;
   color: #262626;
   text-align: center;
-  border-top: 1px solid @barBackgroundColor;
+  border-top: 1px solid #fff;
   font-size: 85%;
   padding: 10px 0;
   line-height: 1.4;
@@ -1971,6 +1971,54 @@ table.nowrap td.small, td.nowrap.small, th.nowrap.small {
   cursor: pointer;
 }
 
+.dropdown {
+  cursor: pointer;
+  display: inline-block;
+  text-decoration: none !important;
+  /* zoom and *display = ie7 hack for display:inline-block */
+  zoom: 1;
+  *display: inline;
+}
+
+.dropdown-menu {
+  background-clip: padding-box;
+  background-color: #FFFFFF;
+  border: 1px solid #DDD;
+  box-shadow: 10px 10px 20px rgba(0, 0, 0, 0.5);
+  float: left;
+  margin: 0;
+  max-width: 220px;
+  min-width: 160px;
+  padding: 0;
+  position: absolute;
+  z-index: 1000;
+}
+
+.dropdown-menu h2 {
+  padding: 0 8px;
+  font-size: 100%;
+  font-weight: bold;
+}
+
+.dropdown-menu li {
+  list-style-type: none !important;
+  line-height: 24px;
+  height: 24px;
+  padding: 0 8px;
+  cursor: pointer !important;
+  float: none !important;
+}
+
+.dropdown-menu li:hover {
+  background-color: @lightBlue !important;
+}
+
+.dropdown-menu a {
+  text-decoration: none !important;
+  border-bottom: none !important;
+  color: @baseFontColor !important;
+}
+
 .form-key-cell {
   padding: 2px 8px 4px 10px;
   text-align: right;
@@ -2357,7 +2405,7 @@ div.rule-title {
 
 .sonar-d3 .plot .arc:hover,
 .sonar-d3 .plot .arc.hover {
-  fill: #4f9ed3;
+  opacity: 1;
 }
 
 .sonar-d3 .plot .line {
@@ -2522,10 +2570,10 @@ text.max-results-reached-message {
   top: 5px; right: 5px;
   line-height: @iconSmallFontSize;
   color: #fff;
-  fill: #fff;
+  opacity: 0.5;
   .link-no-underline;
 
-  &:hover { fill: #4f9ed3; }
+  &:hover { opacity: 1; }
 }
 
 .sonar-d3 .treemap-link i,
@@ -2711,14 +2759,3 @@ text.max-results-reached-message {
   }
 }
 
-
-
-.sq-logo {
-  .sq-logo-arc {
-    fill: @blue;
-  }
-
-  .sq-logo-letter {
-    fill: #fff;
-  }
-}
index 3ac51687ff0fe31a9e24bf2fd0bb522a07ff0ddc..5081ad535c1994325085d8579f029b23dcd2cdb8 100644 (file)
@@ -184,7 +184,6 @@ a {
 input[type=text],
 input[type=password],
 input[type=email],
-input[type=search],
 textarea {
   border: 1px solid @darkGrey;
   .box-sizing(border-box);
@@ -204,16 +203,11 @@ textarea {
 
 input[type=text],
 input[type=password],
-input[type=email],
-input[type=search] {
-  height: @formControlHeight;
+input[type=email] {
+  height: 22px;
   padding: 0 3px;
 }
 
-input[type=search] {
-  -webkit-appearance: none;
-}
-
 textarea {
   padding: 3px;
 }
@@ -224,7 +218,7 @@ input[type=submit],
 input[type=button] {
   display: inline-block;
   vertical-align: baseline;
-  height: @formControlHeight;
+  height: 22px;
   margin: 0 1px;
   padding: 0 10px;
 
@@ -270,7 +264,7 @@ input[type=button] {
   }
 }
 
-.button { line-height: @formControlHeight; }
+.button { line-height: 22px; }
 
 .button-red {
   &:hover, &:focus {
@@ -425,7 +419,7 @@ input[type=button] {
   max-width: 900px;
   margin-left: -150px;
   padding: 0 10px;
-  line-height: @formControlHeight;
+  line-height: 22px;
   background-color: #f0e8ac;
   border-radius: 0 0 3px 3px;
   text-align: center;
@@ -464,21 +458,3 @@ input[type=button] {
   font-weight: 500;
   text-align: center;
 }
-
-
-.nav {
-  margin: 0;
-  padding: 0;
-  list-style: none;
-}
-
-.nav > li {
-  position: relative;
-  display: block;
-}
-
-.nav > li > a {
-  position: relative;
-  display: block;
-  padding: 10px 15px;
-}
index bcb64f772803cc1a2db127ecf5378918a33d7874..37e5e29e364519ee94eaa18364f2eb78f831b8ca 100644 (file)
@@ -35,9 +35,6 @@
 
 @darkBlue: darken(@blue, 20%);
 
-@darkColor: #262626;
-@lightColor: #fff;
-
 @highlighted: @blue;
 @highlightedBackground: @lightBlue;
 @contextBackground: lighten(@purple, 40%);
 @issueBorderColor: desaturate(darken(@issueBackgroundColor, 40%), 30%);
 
 
-
-/*
- * Sizes
- */
-
-@formControlHeight: 22px;
-
-
-
 /*
  * Icons
  */
index e4e8bd713d84f4cddd84d2b4b43e7765d59fe4b0..410d59f601f982dec73dd635f1090520a420b213 100644 (file)
@@ -69,7 +69,7 @@ class Api::ComponentsController < Api::ApiController
       qualifier_results['items']=resource_indexes.map do |resource_index|
         resource=resources_by_id[resource_index.resource_id]
         {
-          'key' => resource.key,
+          'id' => resource.id,
           'name' => resource.name(true)
         }
       end
index 4b5a6d0e6c1e25f77e2820e54abfaf98ffd3e0cb..8966df0f57a9b2b9ef463cc2145a6d47d929e687 100644 (file)
@@ -20,7 +20,7 @@
 
 class ComparisonController < ApplicationController
 
-  SECTION=Navigation::SECTION_TOOLS
+  SECTION=Navigation::SECTION_HOME
 
   def index
     snapshots = []
index 485592ea4ad407a5111ad6c37e0736d872573872..16de4c40c8bbd2927cdfc910ba87889539012343 100644 (file)
@@ -19,7 +19,7 @@
 #
 class DependenciesController < ApplicationController
 
-  SECTION=Navigation::SECTION_TOOLS
+  SECTION=Navigation::SECTION_HOME
 
   SEARCH_MINIMUM_SIZE=3
   QUALIFIERS=['TRK', 'BRC', 'LIB']
index ceb6678cb38294f6003657dd6d471a2f84533522..4b690d90178c3aa238c1d26f7de9c1fd13f85c1f 100644 (file)
@@ -36,5 +36,4 @@ class Navigation
   SECTION_QUALITY_PROFILES = Navigation.new('quality_profiles', false)
   SECTION_QUALITY_GATES = Navigation.new('quality_gates', false)
   SECTION_CODING_RULES = Navigation.new('coding_rules', false)
-  SECTION_TOOLS = Navigation.new('tools', false)
 end
index bd4e8d94197eecdb30d71372a50e3452e70f26fd..a7d9e3027b1c6b76a7f42c3b2b67b429c676b191 100644 (file)
@@ -2,7 +2,5 @@
   <script>require(['coding-rules/app']);</script>
 <% end %>
 
-<% content_for :body_class do %>face-bar<% end %>
-
 
 <div class="coding-rules search-navigator"></div>
index d7cc60c36bd78f6c5abd3910b7a7843e6e9507ea..5741c2c169a46057f793d388b6bf679b82128608 100644 (file)
@@ -2,6 +2,4 @@
   <script>require(['issues/app-new']);</script>
 <% end %>
 
-<% content_for :body_class do %>face-bar<% end %>
-
 <div class="issues search-navigator"></div>
index bceb1df63ab7d8a20f16c4ae6d7dbc892c5ee01a..7b8d6f680e86709611f9ac8aef4a0f74c49f7e95 100644 (file)
 <% if @breadcrumbs %>
 
   <div id="crumbs">
-    <div class="container">
-      <ul id="bc">
-        <%
-           @breadcrumbs.each do |breadcrumb|
-        %>
-          <li>
-            <% if breadcrumb.is_a?(String) %>
-              <span><%= h breadcrumb -%></span>
-            <%
-               elsif breadcrumb.is_a?(Hash)
-                 name = breadcrumb[:name]
-                 url = breadcrumb[:url]
-                 icon = breadcrumb[:icon]
-            %>
-              <% if icon %>
-                <img src="<%= ApplicationController.root_context -%>/images/<%= icon -%>" width="16" height="16">
-              <% end %>
-              <%= link_to_if url, h(name), url -%>
-            <% elsif breadcrumb.respond_to?(:html) %>
-              <%= breadcrumb.html -%>
-            <% end %>
-          </li>
+    <ul id="crumbs-ops">
+      <% if displayed_resource && !display_only_root %>
+        <li>
+          <%= link_to_favourite(displayed_resource) -%>
+        </li>
+        <% if has_role?(:admin, displayed_resource) && !displayed_resource.entity? %>
+          <%= render 'layouts/menu_resource_settings' -%>
         <% end %>
-      </ul>
-    </div>
+      <% end %>
+    </ul>
+    <ul id="bc">
+      <%
+         @breadcrumbs.each do |breadcrumb|
+      %>
+        <li>
+          <% if breadcrumb.is_a?(String) %>
+            <span><%= h breadcrumb -%></span>
+          <%
+             elsif breadcrumb.is_a?(Hash)
+               name = breadcrumb[:name]
+               url = breadcrumb[:url]
+               icon = breadcrumb[:icon]
+          %>
+            <% if icon %><img src="<%= ApplicationController.root_context -%>/images/<%= icon -%>" width="16" height="16"><% end %>
+            <%= link_to_if url, h(name), url -%>
+          <% elsif breadcrumb.respond_to?(:html) %>
+            <%= breadcrumb.html -%>
+          <% end %>
+        </li>
+      <% end %>
+    </ul>
   </div>
 
 <% elsif displayed_resource %>
-  <%
-     resource_link = {:controller => params[:controller], :action => params[:action]}
-     if display_only_root
-       resource_link = {:controller => 'dashboard', :action => 'index'}
-     end
-
-     # ======== Path for resources ========
-
-     if displayed_resource
-       if displayed_resource.last_snapshot
-         resources=[]
-         s=displayed_resource.last_snapshot
-         while (s!=nil) do
-           resources.insert(0, s.project)
-           s=s.parent
-         end
-       else
-         resources = [displayed_resource]
-       end
-  %>
 
-    <% if resources.length > 1 %>
-      <div id="crumbs">
-        <div class="container">
-          <ul id="bc">
-            <%
-               resources.each do |resource|
-            %>
-              <li>
-                <%= qualifier_icon(resource) -%>
-                &nbsp;
-                <%=
-                    root = "#{ApplicationController.root_context}/#{u resource_link[:controller]}/#{u resource_link[:action]}?"
-                    path = ''
-                    query = request.query_parameters
-                    query[:id] = resource.key
-                    query.each do |key, value|
-                      path += '&' unless path.empty?
-                      path += "#{u key}=#{u value}"
-                    end
-                    "<a href='#{root + path}'>#{h(resource.name)}</a>"
-                -%>
-              </li>
+  <div id="crumbs">
+    <ul id="crumbs-ops">
+      <% if displayed_resource && !display_only_root %>
+        <li>
+          <%= link_to_favourite(displayed_resource) -%>
+        </li>
+        <% if (has_role?(:admin, displayed_resource) || profiles_administrator?) && !displayed_resource.entity? %>
+          <%= render 'layouts/menu_resource_settings' -%>
+        <% end %>
+      <% end %>
+    </ul>
+    <ul id="bc">
       <%
+         resource_link = {:controller => params[:controller], :action => params[:action]}
+         if display_only_root
+           resource_link = {:controller => 'dashboard', :action => 'index'}
          end
-         end
+
+         # ======== Path for resources ========
+
+         if displayed_resource
+           if displayed_resource.last_snapshot
+             resources=[]
+             s=displayed_resource.last_snapshot
+             while (s!=nil) do
+               resources.insert(0, s.project)
+               s=s.parent
+             end
+           else
+             resources = [displayed_resource]
+           end
+      %>
+        <%
+           resources.each do |resource|
+        %>
+          <li>
+            <%= qualifier_icon(resource) -%>
+            &nbsp;
+            <%=
+                root = "#{ApplicationController.root_context}/#{u resource_link[:controller]}/#{u resource_link[:action]}?"
+                path = ''
+                query = request.query_parameters
+                query[:id] = resource.key
+                query.each do |key, value|
+                  path += '&' unless path.empty?
+                  path += "#{u key}=#{u value}"
+                end
+                "<a href='#{root + path}'>#{h(resource.name)}</a>"
+            -%>
+          </li>
+        <%
+           end
+           end
 
          # ======== Path for issue ========
          if @issue
       %>
-      <li>
-        <%= link_to message('issue') + ' #' + @issue.key.to_s -%>
-      </li>
+        <li>
+          <%= link_to message('issue') + ' #' + @issue.key.to_s -%>
+        </li>
+      <%
+         end
+      %>
     </ul>
-    </div>
-    </div>
-    <% end %>
-  <% end %>
+  </div>
 
 <% end %>
index 95eb64911bd48548dbfcd62f83cac5cfa41cd5cd..be7b6ade97e752c9ef16ac21731614d7f4c96589 100644 (file)
@@ -43,4 +43,4 @@
   </script>
   <%= yield :script -%>
 </head>
-<body class="<%= yield :body_class -%>">
+<body>
index 92db26a73124679de3a48d303f1fc46b46f410b7..fb83ec46c995e3913c57f5d2916f0304c1f90e80 100644 (file)
    @project=@resource unless @project || selected_section==Navigation::SECTION_HOME
    period_param = "period=#{u(params[:period])}" if params[:period]
 %>
-<div id="container" class="wrapper navbar-sticky">
-  <%
-     navbar_class = 'navbar-global'
-     navbar_class = 'navbar-project' if selected_section==Navigation::SECTION_RESOURCE
-     navbar_class = 'navbar-settings' if selected_section==Navigation::SECTION_CONFIGURATION
-  %>
-  <nav class="navbar <%= navbar_class -%>">
-    <div class="container">
-      <div class="navbar-header">
-        <a class="navbar-brand navbar-logo" href="<%= ApplicationController.root_context -%>/">
-          <%= render 'layouts/logo' -%>
-        </a>
-        <% if selected_section==Navigation::SECTION_RESOURCE %>
-          <div class="navbar-brand"><%= @project.root_project().name -%></div>
+<div id="container">
+  <%= yield :header -%>
+  <div id="hd">
+    <div id="nav-left">
+      <ul>
+        <li>
+          <a href="<%= ApplicationController.root_context -%>/" class="<%= 'selected' if selected_section==Navigation::SECTION_HOME || selected_section==Navigation::SECTION_RESOURCE -%>"><%= message('layout.dashboards') -%></a>
+        </li>
+        <%= render 'layouts/menu_projects' -%>
+        <li>
+          <a href="<%= ApplicationController.root_context -%>/measures/search?qualifiers[]=TRK" class="<%= 'selected' if selected_section==Navigation::SECTION_MEASURES -%>"><%= message('layout.measures') -%></a>
+        </li>
+        <li>
+          <a href="<%= ApplicationController.root_context -%>/issues/index" class="<%= 'selected' if selected_section==Navigation::SECTION_ISSUES -%>"><%= message('issues.page') -%></a>
+        </li>
+        <li>
+          <a href="<%= ApplicationController.root_context -%>/coding_rules" class="<%= 'selected' if selected_section==Navigation::SECTION_CODING_RULES -%>"><%= message('coding_rules.page') -%></a>
+        </li>
+        <li>
+          <a href="<%= ApplicationController.root_context -%>/profiles" class="<%= 'selected' if selected_section==Navigation::SECTION_QUALITY_PROFILES -%>"><%= message('quality_profiles.page') -%></a>
+        </li>
+        <li>
+          <a href="<%= ApplicationController.root_context -%>/quality_gates" class="<%= 'selected' if selected_section==Navigation::SECTION_QUALITY_GATES -%>"><%= message('quality_gates.page') -%></a>
+        </li>
+      </ul>
+    </div>
+    <div id="nav">
+      <ul>
+        <li>
+          <input type="text" size="15" name="search" id="searchInput" value="<%= message('search_verb') -%>">
+          <img src="<%= ApplicationController.root_context -%>/images/loading-small.gif" id="searchingResources" style="display:none">
+        </li>
+        <% if logged_in? %>
+          <%= render 'layouts/menu_user' -%>
+        <% else %>
+          <li><a id="login-link" href="<%= ApplicationController.root_context -%>/sessions/new?return_to=<%= u (request.request_uri) -%>"><%= message('layout.login') -%></a></li>
         <% end %>
-      </div>
+        <% if is_admin? %>
+          <li><a href="<%= ApplicationController.root_context -%>/settings/index" class="<%= 'selected' if selected_section==Navigation::SECTION_CONFIGURATION -%>"><%= message('layout.settings') -%></a></li>
+        <% end %>
+      </ul>
     </div>
-  </nav>
+    <div id="searchResourcesResults" class="autocomplete" style="display:none"
+         data-results="<%= message('search.results') -%>"
+         data-no-results="<%= message('no_results') -%>"></div>
+  </div>
+  <%= render 'layouts/breadcrumb' if @breadcrumbs || selected_section==Navigation::SECTION_RESOURCE -%>
+  <div id="body">
+    <% if selected_section && selected_section.show_sidebar && !@hide_sidebar %>
+      <div id="sidebar">
+        <ul class="sidebar blue-sidebar">
+          <% if selected_section==Navigation::SECTION_HOME %>
+            <% ActiveDashboard.user_dashboards(current_user, true).each do |active_dashboard| %>
+              <li class="<%= 'active' if @dashboard && controller.controller_path=='dashboard' && active_dashboard.dashboard_id==@dashboard.id -%>">
+                <a href="<%= ApplicationController.root_context -%>/dashboard/?did=<%= active_dashboard.dashboard_id -%>"><%= h active_dashboard.dashboard.name(true) -%></a>
+              </li>
+            <% end %>
 
-  <%= yield :header -%>
+            <% controller.java_facade.getPages(Navigation::SECTION_HOME.key, nil, nil, nil, nil).each do |page|
+              page_url = (page.isController() ? page.getId() : "/plugins/home/#{page.getId()}")
+              selected=request.request_uri.include?("/plugins/home/#{page_url}")
+            %>
+              <li class="<%= 'active' if selected -%>">
+                <a href="<%= ApplicationController.root_context -%><%= page_url -%>"><%= h message(page.getId() + '.page', :default => page.getTitle()) -%></a></li>
+            <% end %>
 
-  <%= render 'layouts/breadcrumb' if @breadcrumbs || selected_section==Navigation::SECTION_RESOURCE -%>
+            <li class="spacer"></li>
+            <li class="sidebar-title"><%= message('sidebar.tools') -%></li>
 
-  <div id="body">
-    <div class="container">
-      <div id="content">
-        <% if @project %>
-          <div class="print"><h2><%= h @project.name() %></h2></div>
-        <% end %>
-        <div class="error" id="error" style="display:none">
-          <span id="errormsg"></span> &nbsp;&nbsp;[<a href="#" onclick="javascript:$j('#error').hide();return false;"><%= message('hide').downcase -%></a>]
-        </div>
-        <div class="notice" id="info" style="display:none">
-          <span id="infomsg"></span> &nbsp;&nbsp;[<a href="#" onclick="javascript:$j('#info').hide();return false;"><%= message('hide').downcase -%></a>]
-        </div>
-        <div class="warning" id="warning" style="display:none">
-          <span id="warningmsg"></span> &nbsp;&nbsp;[<a href="#" onclick="javascript:$j('#warning').hide();return false;"><%= message('hide').downcase -%></a>]
-        </div>
-        <%= yield %>
+            <li class="<%= 'active' if controller.controller_path=='dependencies' -%>">
+              <a href="<%= ApplicationController.root_context -%>/dependencies/index"><%= message('dependencies.page') -%></a></li>
+            <li class="<%= 'active' if request.request_uri.include?('/comparison/index') -%>">
+              <a href="<%= ApplicationController.root_context -%>/comparison/index"><%= message('comparison.page') -%></a>
+            </li>
+
+          <% elsif selected_section==Navigation::SECTION_RESOURCE %>
+            <% ActiveDashboard.user_dashboards(current_user, false).each do |active_dashboard| %>
+              <li class="<%= 'active' if @dashboard && controller.controller_path=='dashboard' && active_dashboard.dashboard_id==@dashboard.id -%>">
+                <a href="<%= ApplicationController.root_context -%>/dashboard/index/<%= @project.id -%>?did=<%= active_dashboard.dashboard_id -%><%= "&"+period_param if period_param -%>"><%= h active_dashboard.dashboard.name(true) -%></a>
+              </li>
+            <% end %>
+
+            <% if @snapshot %>
+              <li class="spacer"></li>
+              <li class="sidebar-title"><%= message('sidebar.tools') -%></li>
+              <li class="<%= 'active' if request.request_uri.include?('/components/index') -%>">
+                <a href="<%= ApplicationController.root_context -%>/components/index/<%= @project.id -%>"><%= message('components.page') -%></a>
+              </li>
+              <li class="<%= 'active' if request.request_uri.include?('/drilldown/issues') -%>">
+                <a href="<%= ApplicationController.root_context -%>/drilldown/issues/<%= @project.id -%><%= "?"+period_param if period_param -%>"><%= message('issues_drilldown.page') -%></a>
+              </li>
+              <% project_metrics = @project.last_snapshot.metric_keys.to_java(:string) if @project.last_snapshot
+                 controller.java_facade.getPages(Navigation::SECTION_RESOURCE.key, @project.scope, @project.qualifier, @project.language, project_metrics).each do |page|
+                   page_url = (page.isController() ? "#{page.getId()}?id=#{@project.id}" : "/plugins/resource/#{@project.id}?page=#{page.getId()}")
+              %>
+                  <li class="<%= 'active' if request.request_uri.include?(page_url) -%>">
+                    <a href="<%= ApplicationController.root_context -%><%= page_url -%>"><%= h message(page.getId() + '.page', :default => page.getTitle()) -%></a>
+                  </li>
+              <% end %>
+              <li class="<%= 'active' if request.request_uri.include?('/design/index') -%>">
+                <a href="<%= ApplicationController.root_context -%>/design/index/<%= @project.key -%>"><%= message('design.page') -%></a>
+              </li>
+              <li class="<%= 'active' if request.request_uri.include?('/libraries/index') -%>">
+                <a href="<%= ApplicationController.root_context -%>/libraries/index/<%= @project.key -%>"><%= message('libraries.page') -%></a>
+              </li>
+              <% if controller.java_facade.getResourceTypeBooleanProperty(@project.qualifier, 'comparable') %>
+              <li class="<%= 'active' if request.request_uri.include?('/comparison/index') -%>">
+                <a href="<%= ApplicationController.root_context -%>/comparison/index?resource=<%= @project.key -%>"><%= message('comparison.page') -%></a>
+              </li>
+              <% end %>
+            <% end %>
+
+          <% elsif selected_section==Navigation::SECTION_CONFIGURATION %>
+
+            <% if is_admin? %>
+
+            <li class="sidebar-title"><%= message('sidebar.project_settings') -%></li>
+            <li class="<%= 'active' if request.request_uri.include?('/settings') -%>">
+              <a href="<%= ApplicationController.root_context -%>/settings/index"><%= message('settings.page') -%></a></li>
+            <li class="<%= 'active' if controller.controller_path=='metrics' -%>">
+              <a href="<%= ApplicationController.root_context -%>/metrics/index"><%= message('manual_metrics.page') -%></a></li>
+            <li class="<%= 'active' if controller.controller_path=='admin_dashboards' -%>">
+              <a href="<%= ApplicationController.root_context -%>/admin_dashboards/index"><%= message('default_dashboards.page') -%></a></li>
+            <% controller.java_facade.getPages(Navigation::SECTION_CONFIGURATION.key, nil, nil, nil, nil).each do |page|
+              page_url = (page.isController() ? page.getId() : "/plugins/configuration/#{page.getId()}")
+            %>
+              <li class="<%= 'active' if request.request_uri.include?(page_url) -%>">
+                <a href="<%= ApplicationController.root_context -%><%= page_url -%>"><%= h message(page.getId() + '.page', :default => page.getTitle()) %></a>
+              </li>
+            <% end %>
+            <li class="spacer"></li>
+            <li class="sidebar-title"><%= message('sidebar.security') -%></li>
+            <li class="<%= 'active' if request.request_uri.include?('/users') -%>"><a href="<%= ApplicationController.root_context -%>/users"><%= message('users.page') -%></a>
+            </li>
+            <li class="<%= 'active' if request.request_uri.include?('/groups') -%>">
+              <a href="<%= ApplicationController.root_context -%>/groups/index"><%= message('user_groups.page') -%></a></li>
+            <li class="<%= 'active' if request.request_uri.include?('/roles/global') -%>">
+              <a href="<%= ApplicationController.root_context -%>/roles/global"><%= message('global_permissions.page') -%></a></li>
+            <li class="<%= 'active' if request.request_uri.include?('/roles/projects') || request.request_uri.include?('/permission_templates') -%>">
+              <a href="<%= ApplicationController.root_context -%>/roles/projects"><%= message('roles.page') -%></a></li>
+
+            <li class="spacer"></li>
+            <li class="sidebar-title"><%= message('sidebar.system') -%></li>
+            <% if has_role?("provisioning") %>
+            <li class="<%= 'active' if controller.controller_path=='provisioning' -%>">
+              <a href="<%= ApplicationController.root_context -%>/provisioning"><%= message('provisioning.page') -%></a>
+            </li>
+            <% end %>
+            <li class="<%= 'active' if controller.controller_path=='bulk_deletion' -%>">
+              <a href="<%= ApplicationController.root_context -%>/bulk_deletion"><%= message('bulk_deletion.page') -%></a>
+            </li>
+            <% update_center_activated = controller.java_facade.getSettings().getBoolean('sonar.updatecenter.activate')
+               if update_center_activated %>
+              <li class="<%= 'active' if controller.controller_path=='updatecenter' -%>">
+                <a href="<%= ApplicationController.root_context -%>/updatecenter"><%= message('update_center.page') -%></a></li>
+            <% end %>
+            <li class="<%= 'active' if controller.controller_path=='system' -%>">
+              <a href="<%= ApplicationController.root_context -%>/system"><%= message('system_info.page') -%></a></li>
+            <li class="<%= 'active' if controller.controller_path=='analysis_reports' -%>">
+              <a href="<%= ApplicationController.root_context -%>/analysis_reports"><%= message('analysis_reports.page') -%></a></li>
+
+            <% end #of admin part %>
+
+          <% end %>
+
+          <%= yield :sidebar %>
+
+          <li id="logo">
+            <center><a href="http://www.sonarqube.org/" target="SonarSource"><%= image_tag('logo.png', :alt => message('layout.sonar.slogan'), :width => 100, :height => 24) -%></a></center>
+          </li>
+        </ul>
+      </div>
+    <% end %>
+    <%
+      html_id_class = ''
+      html_id_class = "id='content' class='with_sidebar'" if selected_section && selected_section.show_sidebar
+      html_id_class = "id='content'" if @hide_sidebar || (selected_section && !selected_section.show_sidebar)
+    %>
+    <div <%= html_id_class -%>>
+      <% if @project %>
+        <div class="print"><h2><%= h @project.name() %></h2></div>
+      <% end %>
+      <div class="error" id="error" style="display:none">
+        <span id="errormsg"></span> &nbsp;&nbsp;[<a href="#" onclick="javascript:$j('#error').hide();return false;"><%= message('hide').downcase -%></a>]
+      </div>
+      <div class="notice" id="info" style="display:none">
+        <span id="infomsg"></span> &nbsp;&nbsp;[<a href="#" onclick="javascript:$j('#info').hide();return false;"><%= message('hide').downcase -%></a>]
+      </div>
+      <div class="warning" id="warning" style="display:none">
+        <span id="warningmsg"></span> &nbsp;&nbsp;[<a href="#" onclick="javascript:$j('#warning').hide();return false;"><%= message('hide').downcase -%></a>]
       </div>
+      <%= yield %>
     </div>
   </div>
 </div>
           <br><br><span class="error">The embedded database will not scale, it will not support upgrading to newer versions of SonarQube, and there is no support for migrating your data out of it into a different database engine.</span>
         <% end %>
       </div>
-      <!--[if lte IE 8 ]><br/><span class="ie-warn">IE 8 is not supported. Some widgets may not be properly displayed. Please switch to a <a
-          target="_blank" href="http://redirect.sonarsource.com/doc/requirements.html">supported version or another supported browser</a>.</span><!--<![endif]-->
+      <!--[if lte IE 8 ]><br/><span class="ie-warn">IE 8 is not supported. Some widgets may not be properly displayed. Please switch to a <a target="_blank" href="http://redirect.sonarsource.com/doc/requirements.html">supported version or another supported browser</a>.</span><!--<![endif]-->
     </div>
   </div>
 <% end %>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_logo.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_logo.html.erb
deleted file mode 100644 (file)
index 51f0c12..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<div class="sq-logo">
-  <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="100" height="25">
-    <g opacity="1">
-      <path class="sq-logo-arc sq-logo-arc1" d="m96.96313,21.20284l-1.22246,0c0,-9.83637 -8.12817,-17.87548 -18.16693,-17.87548l0,-1.26294c10.69453,0 19.41368,8.6382 19.41368,19.13842l-0.02429,0z"/>
-      <path class="sq-logo-arc sq-logo-arc2" d="m97.81319,14.62098c-1.47343,-6.17708 -6.47662,-11.36647 -12.79134,-13.15564l0.28336,-1.00388c6.64664,1.93489 11.94128,7.38335 13.47137,13.96522l-0.96339,0.1943z"/>
-      <path class="sq-logo-arc sq-logo-arc3" d="m99.19757,8.84059c-1.522,-3.32736 -4.07217,-6.18517 -7.26192,-8.11197l0.40479,-0.72862c3.31117,1.99156 6.03945,5.05177 7.56956,8.50866l-0.71243,0.33193z"/>
-      <path class="sq-logo-letter" d="m0,20.74138c0.72862,0.39669 1.86203,0.72862 3.12497,0.72862c2.72828,0 4.12075,-1.32771 4.12075,-3.12497c-0.02429,-1.39247 -0.80148,-2.38826 -2.59065,-2.98734c-1.18198,-0.40479 -1.5301,-0.66385 -1.5301,-1.13341c-0.02429,-0.46146 0.39669,-0.72862 1.12531,-0.72862c0.79339,0 1.66773,0.26716 2.06442,0.52623l0.51813,-2.05633c-0.59099,-0.26716 -1.57868,-0.59909 -2.71209,-0.59909c-2.35587,0 -3.85359,1.39247 -3.85359,3.18974c-0.04857,1.13341 0.72862,2.19396 2.72018,2.85781c1.09293,0.39669 1.40057,0.59909 1.40057,1.13341c-0.0081,0.53432 -0.39669,0.79339 -1.26294,0.79339c-0.90673,0 -2.06442,-0.39669 -2.59065,-0.72862l-0.53432,2.12919z"/>
-      <path class="sq-logo-letter" d="m13.10707,13.56043c1.352,0 1.9187,1.39247 1.9187,2.85781c-0.01619,1.73249 -0.73672,2.85781 -1.92679,2.85781c-1.27104,0 -1.93489,-1.19817 -1.93489,-2.85781c-0.01619,-1.39248 0.53432,-2.85781 1.93489,-2.85781m0.10524,-2.19396c-3.10068,0 -5.15701,1.99156 -5.15701,5.11653c0.01619,3.12497 2.18586,4.987 4.9789,4.987c2.57446,0 5.05177,-1.65964 5.05177,-5.1813c0.01619,-2.85781 -1.9268,-4.92223 -4.84937,-4.92223l-0.02429,0"/>
-      <path class="sq-logo-letter" d="m19.02508,21.20284l2.98734,0l0,-5.51323c0,-0.26716 -0.00809,-0.53432 0.12144,-0.73672c0.1862,-0.52623 0.66385,-1.12531 1.5301,-1.12531c1.05245,0 1.46534,0.86625 1.46534,2.05633l0.02429,5.31892l2.97925,0l0,-5.65085c0,-2.85781 -1.47343,-4.12075 -3.40832,-4.12075c-1.63535,0 -2.59065,0.93102 -2.98734,1.5301l-0.06477,0l-0.13763,-1.32771l-2.59065,0c0.04048,0.86625 0.06477,1.86203 0.06477,3.0602l0.01619,6.50901z"/>
-      <path class="sq-logo-letter" d="m34.72279,17.74594c0,0.13763 -0.02429,0.33193 -0.08905,0.46956c-0.17001,0.66385 -0.80148,1.12531 -1.5301,1.12531c-0.65576,0 -1.19818,-0.39669 -1.19818,-1.12531c0.02429,-1.13341 1.26294,-1.5301 2.79304,-1.5301l0.02429,1.06054m2.8821,-2.19396c0,-2.25872 -0.97959,-4.18552 -4.16933,-4.18552c-1.78107,0 -3.12497,0.53432 -3.78882,0.86625l0.5748,1.9268c0.63147,-0.39669 1.68392,-0.72862 2.6797,-0.72862c1.44915,0 1.7325,0.72862 1.7325,1.26294l-0.00809,0.12953c-3.40023,0 -5.64276,1.19818 -5.64276,3.65929c0.0081,1.52201 1.19818,2.98734 3.12497,2.98734c1.11722,0 2.12919,-0.46146 2.72018,-1.19818l0.06477,0l0.17811,0.93101l2.6959,0c-0.12144,-0.52622 -0.14573,-1.39247 -0.14573,-2.32349l-0.01619,-3.32736z"/>
-      <path class="sq-logo-letter" d="m39.07022,21.20284l2.97925,0l0,-4.84937c0,-0.20239 0.02429,-0.46955 0.02429,-0.66385c0.23478,-0.93101 1.00388,-1.5301 2.06442,-1.5301c0.34812,0 0.59909,0.06477 0.79338,0.06477l0.02429,-2.79304c-0.21049,0 -0.35621,-0.06477 -0.61528,-0.06477c-0.9553,0 -2.12919,0.59909 -2.59874,1.99156l-0.08096,0l-0.12143,-1.7244l-2.55017,0c0.05667,0.79339 0.09715,1.7244 0.09715,3.12497l-0.01619,6.44424z"/>
-      <path class="sq-logo-letter" d="m64.89576,18.54743c0,0.99578 0.04858,1.9268 0.04858,2.65541l-1.5382,0l-0.09715,-1.59487l-0.04047,0c-0.46146,0.80148 -1.51391,1.86203 -3.24641,1.86203c-1.48962,0 -3.31927,-0.86625 -3.31927,-4.25028l0,-5.72372l1.77298,0l0,5.39179c0,1.85393 0.55051,3.11687 2.14538,3.11687c1.20628,0 1.99966,-0.85815 2.33159,-1.65963c0.11334,-0.26716 0.1943,-0.53432 0.1943,-0.86625l-0.01619,-5.98278l1.76488,0l0,7.05142z"/>
-      <path class="sq-logo-letter" d="m68.01263,17.41402c0,0.20239 0.05667,0.39669 0.05667,0.59909c0.37241,1.26294 1.39247,2.12919 2.65541,2.12919c1.87012,0 2.99544,-1.5301 2.99544,-3.78882c-0.02428,-1.9268 -0.99577,-3.59453 -2.93066,-3.59453c-1.19009,0 -2.32349,0.80148 -2.65542,2.19396c-0.05668,0.20239 -0.12953,0.40479 -0.12953,0.73672l0.00809,1.7244m-1.82155,3.85359c0.04047,-0.66385 0.08096,-1.59487 0.08096,-2.45302l0,-11.77126l1.74059,0l0,6.12041l0.04047,0c0.62338,-1.06864 1.74059,-1.79726 3.33546,-1.79726c2.38825,0 4.12075,1.99156 4.05598,4.987c0.01619,3.4569 -2.19395,5.1813 -4.31505,5.1813c-1.42486,0 -2.52589,-0.52623 -3.2626,-1.86203l-0.07287,0l-0.08096,1.59487l-1.522,0z"/>
-      <path class="sq-logo-letter" d="m83.28937,15.42246c0.01619,-1.13341 -0.46146,-2.85781 -2.46112,-2.85781c-1.77297,0 -2.59064,1.65963 -2.72018,2.85781l5.1813,0m-5.1813,1.26294c0.04047,2.39635 1.59486,3.39213 3.31927,3.39213c1.27914,0 2.06442,-0.26716 2.72827,-0.53432l0.27526,1.26294c-0.62337,0.26716 -1.67583,0.59909 -3.19784,0.59909c-3.02782,0 -4.79269,-1.9268 -4.79269,-4.85747c-0.01619,-2.92258 1.7325,-5.24607 4.52554,-5.24607c3.18164,0 4.05598,2.79304 4.05598,4.58221c-0.03238,0.33193 -0.07286,0.59909 -0.07286,0.80148l-6.84093,0z"/>
-      <path class="sq-logo-letter" d="m52.59827,19.34081c-1.64344,1.13341 -3.86978,0.73672 -5.00319,-0.93102c-1.10103,-1.65963 -0.66385,-3.85359 0.93101,-4.9789c1.66773,-1.13341 3.91836,-0.67195 5.05177,0.93102c1.08483,1.65963 0.66385,3.91836 -0.99578,4.9789m2.23444,-5.84515c-1.58677,-2.33158 -4.76031,-2.92258 -7.15667,-1.32771c-2.3073,1.59487 -2.92258,4.78461 -1.32771,7.10809c1.40867,2.06442 4.05599,2.79305 6.3147,1.86203l1.95918,3.18974l1.57868,-1.06054l-1.98347,-3.2626c1.71631,-1.65963 2.03204,-4.37982 0.63957,-6.509l-0.02429,0"/>
-    </g>
-  </svg>
-</div>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_menu_projects.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_menu_projects.html.erb
new file mode 100644 (file)
index 0000000..4d18b7b
--- /dev/null
@@ -0,0 +1,46 @@
+<script>
+  if (supportsHTML5Storage()) {
+    var sonarRecentHistory = new Sonar.RecentHistory();
+  }
+</script>
+
+<li>
+  <a href="#" class="with-icon" onclick="if (sonarRecentHistory) { sonarRecentHistory.populateRecentHistoryPanel(); }; showDropdownMenu('projects-menu'); return false;">
+    <span><%= message('layout.projects') -%></span>
+    <i class="icon-dropdown"></i>
+  </a>
+
+  <div id="projects-menu" class="dropdown-menu" style="max-width: none; display: none;">
+    <div id="recent-history" style="border-bottom: 1px solid #ccc; padding-bottom: 10px;">
+      <h2><%= message('layout.recent_projects') -%></h2>
+      <ul id="recent-history-list">
+      </ul>
+    </div>
+
+    <div>
+      <ul>
+        <% Project.root_qualifiers.sort.each do |qualifier| %>
+          <li><a href="<%= ApplicationController.root_context -%>/all_projects?qualifier=<%= qualifier -%>"><%= message('qualifiers.all.' + qualifier) -%></a></li>
+        <% end %>
+      </ul>
+    </div>
+  </div>
+
+</li>
+
+<script>
+  if (sonarRecentHistory == null) {
+    $j('#recent-history').detach();
+  }
+
+  <%
+     if @resource && Project.root_qualifiers.include?(@resource.qualifier)
+  %>
+  else {
+    sonarRecentHistory.add('<%= escape_javascript(h(@resource.key)) -%>',
+                           '<%= escape_javascript(h(@resource.name)) -%>',
+                           '<%= escape_javascript @resource.qualifier.downcase -%>');
+  }
+  <% end %>
+
+</script>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_navbar.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_navbar.html.erb
deleted file mode 100644 (file)
index fd8d74e..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<%= render 'layouts/navbar_conf' -%>
-<%= render 'layouts/recent_history' -%>
-<script>
-  require(['nav/app']);
-</script>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_navbar_conf.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_navbar_conf.html.erb
deleted file mode 100644 (file)
index d2a4eca..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<%
-   selected_section = controller.class::SECTION if defined?(controller.class::SECTION)
-   if selected_section==Navigation::SECTION_RESOURCE && !@project && !@resource
-     selected_section = Navigation::SECTION_HOME
-   end
-   @project=@resource unless @project || selected_section==Navigation::SECTION_HOME
-   period_param = "period=#{u(params[:period])}" if params[:period]
-   displayed_resource = @resource || @project
-   display_only_root = @issue
-   resource_id=displayed_resource ? (displayed_resource.is_a?(Fixnum) ? displayed_resource : displayed_resource.permanent_id) : nil
-%>
-
-<% if selected_section==Navigation::SECTION_RESOURCE %>
-  <%= render :partial => 'layouts/navbar_conf_project' %>
-<% elsif selected_section==Navigation::SECTION_CONFIGURATION %>
-  <%= render :partial => 'layouts/navbar_conf_settings' %>
-<% else %>
-  <%= render :partial => 'layouts/navbar_conf_global' %>
-<% end %>
-
-
-<script>
-  var navbarQualifiers = [
-    <% Project.root_qualifiers.sort.each do |qualifier| %>
-    '<%= qualifier -%>',
-    <% end %>
-  ];
-  window.SS.isUserAdmin = <%= current_user && is_admin? ? 'true' : 'false' -%>;
-</script>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_navbar_conf_global.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_navbar_conf_global.html.erb
deleted file mode 100644 (file)
index 6c19636..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-<%
-   selected_section = controller.class::SECTION if defined?(controller.class::SECTION)
-   if selected_section==Navigation::SECTION_RESOURCE && !@project && !@resource
-     selected_section = Navigation::SECTION_HOME
-   end
-%>
-
-<script>
-  var navbarSpace = 'global',
-      navbarItems = [
-        {
-          label: 'layout.dashboards',
-          active: <%= selected_section==Navigation::SECTION_HOME || selected_section==Navigation::SECTION_RESOURCE ? 'true' : 'false' -%>,
-          menu: [
-            <% ActiveDashboard.user_dashboards(current_user, true).each do |active_dashboard| %>
-            {
-              url: '/dashboard/?did=<%= active_dashboard.dashboard_id -%>',
-              labelLocalized: '<%= escape_javascript active_dashboard.dashboard.name(true) -%>',
-              active: <%= @dashboard && controller.controller_path=='dashboard' && active_dashboard.dashboard_id==@dashboard.id ? 'true' : 'false' -%>
-            },
-            <% end %>
-          ]
-        },
-        {
-          url: '/measures/search?qualifiers[]=TRK',
-          label: 'layout.measures',
-          active: <%= selected_section==Navigation::SECTION_MEASURES ? 'true' : 'false' -%>
-        },
-        {
-          url: '/issues/index',
-          label: 'issues.page',
-          active: <%= selected_section==Navigation::SECTION_ISSUES ? 'true' : 'false' -%>
-        },
-        {
-          url: '/coding_rules',
-          label: 'coding_rules.page',
-          active: <%= selected_section==Navigation::SECTION_CODING_RULES ? 'true' : 'false' -%>
-        },
-        {
-          url: '/profiles',
-          label: 'quality_profiles.page',
-          active: <%= selected_section==Navigation::SECTION_QUALITY_PROFILES ? 'true' : 'false' -%>
-        },
-        {
-          url: '/quality_gates',
-          label: 'quality_gates.page',
-          active: <%= selected_section==Navigation::SECTION_QUALITY_GATES ? 'true' : 'false' -%>
-        },
-        {
-          label: 'more',
-          active: false,
-          menu: [
-            {
-              url: '/comparison/index',
-              label: 'comparison.page',
-              active: <%= request.request_uri.include?('/comparison') ? 'true' : 'false' -%>
-            },
-            {
-              url: '/dependencies/index',
-              label: 'dependencies.page',
-              active: <%= request.request_uri.include?('/dependencies') ? 'true' : 'false' -%>
-            },
-            <% controller.java_facade.getPages(Navigation::SECTION_HOME.key, nil, nil, nil, nil).each do |page|
-              page_url = (page.isController() ? page.getId() : "/plugins/home/#{page.getId()}")
-              selected=request.request_uri.include?("/plugins/home/#{page_url}")
-            %>
-            {
-              url: '<%= page_url -%>',
-              labelLocalized: '<%= escape_javascript message(page.getId() + '.page', :default => page.getTitle()) -%>',
-              active: <%= selected ? 'true' : 'false' -%>
-            },
-            <% end %>
-          ]
-        }
-      ];
-</script>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_navbar_conf_project.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_navbar_conf_project.html.erb
deleted file mode 100644 (file)
index a2841ae..0000000
+++ /dev/null
@@ -1,167 +0,0 @@
-<%
-   @project=@resource unless @project || selected_section==Navigation::SECTION_HOME
-   period_param = "period=#{u(params[:period])}" if params[:period]
-   displayed_resource = @resource || @project
-   display_only_root = @issue
-   resource_id=displayed_resource ? (displayed_resource.is_a?(Fixnum) ? displayed_resource : displayed_resource.permanent_id) : nil
-%>
-
-
-<script>
-  var navbarSpace = 'project',
-      navbarProject = '<%= @project.root_project().name -%>',
-      navbarProjectId = '<%= @project.root_project().id -%>',
-      navbarProjectKey = '<%= @project.root_project().key -%>',
-      navbarCanFavoriteProject = <%= logged_in? && displayed_resource && !display_only_root ? 'true' : 'false' -%>,
-      navbarProjectFavorite = <%= logged_in? && current_user.favourite?(resource_id) ? 'true' : 'false' -%>,
-      navbarItems = [
-        {
-          label: 'layout.dashboards',
-          active: <%= @dashboard && controller.controller_path=='dashboard' ? "true" : "false" -%>,
-          menu: [
-            <% ActiveDashboard.user_dashboards(current_user, false).each do |active_dashboard| %>
-            {
-              url: '/dashboard/index?id=<%= @project.key -%>&did=<%= active_dashboard.dashboard_id -%><%= "&"+period_param if period_param -%>',
-              labelLocalized: '<%= escape_javascript active_dashboard.dashboard.name(true) -%>',
-              active: <%= @dashboard && controller.controller_path=='dashboard' && active_dashboard.dashboard_id==@dashboard.id ? "true" : "false" -%>
-            },
-            <% end %>
-          ]
-        },
-        <% if @snapshot %>
-        {
-          url: '/components/index/<%= @project.id -%>',
-          label: 'components.page',
-          active: <%= request.request_uri.include?('/components/index') ? "true" : "false" -%>
-        },
-        {
-          url: '/drilldown/issues/<%= @project.id -%><%= "?"+period_param if period_param -%>',
-          label: 'issues.page',
-          active: <%= request.request_uri.include?('/drilldown/issues') ? "true" : "false" -%>
-        },
-        <% if (has_role?(:admin, displayed_resource) || profiles_administrator?) && !displayed_resource.entity? %>
-        <% is_admin = has_role?(:admin, @project) %>
-        {
-          labelLocalized: 'Settings',
-          active: false,
-          menu: [
-            <% if (is_admin && controller.java_facade.getResourceTypeBooleanProperty(@project.qualifier, 'configurable')) %>
-            {
-              url: '/project/settings/<%= @project.id -%>',
-              label: 'project_settings.page',
-              active: false
-            },
-            <% end %>
-            <% if (@project.project?) %>
-            {
-              url: '/project/profile/<%= @project.id -%>',
-              label: 'project_quality_profiles.page',
-              active: false
-            },
-            <% end %>
-            <% if (@project.project?) %>
-            {
-              url: '/project/qualitygate/<%= @project.id -%>',
-              label: 'project_quality_gate.page',
-              active: false
-            },
-            <% end %>
-            <% if is_admin %>
-            {
-              url: '/manual_measures/index/<%= @project.id -%>',
-              label: 'manual_measures.page',
-              active: false
-            },
-            <% end %>
-            <% if (is_admin && @project.project?) %>
-            {
-              url: '/action_plans/index/<%= @project.id -%>',
-              label: 'action_plans.page',
-              active: false
-            },
-            <% end %>
-            <% if (is_admin && @project.project?) %>
-            {
-              url: '/project/links/<%= @project.id -%>',
-              label: 'project_links.page',
-              active: false
-            },
-            <% end %>
-            <% if is_admin && controller.java_facade.getResourceTypeBooleanProperty(@project.qualifier, 'hasRolePolicy') %>
-            {
-              url: '/project_roles/index/<%= @project.id -%>',
-              label: 'permissions.page',
-              active: false
-            },
-            <% end %>
-            <% if is_admin && controller.java_facade.getResourceTypeBooleanProperty(@project.qualifier, 'modifiable_history') %>
-            {
-              url: '/project/history/<%= @project.id -%>',
-              label: 'project_history.page',
-              active: false
-            },
-            <% end %>
-            <% if is_admin && controller.java_facade.getResourceTypeBooleanProperty(@project.qualifier, 'updatable_key') %>
-            {
-              url: '/project/key/<%= @project.id -%>',
-              label: 'update_key.page',
-              active: false
-            },
-            <% end %>
-            <% if is_admin && controller.java_facade.getResourceTypeBooleanProperty(@project.qualifier, 'deletable') %>
-            {
-              url: '/project/deletion/<%= @project.id -%>',
-              label: 'deletion.page',
-              active: false
-            },
-            <% end %>
-            <% if is_admin
-                controller.java_facade.getPages(Navigation::SECTION_RESOURCE_CONFIGURATION.key, @project.scope, @project.qualifier, @project.language, nil).each do |page|
-                  page_url = "#{page.getId()}?resource=#{@project.id}"
-            %>
-            {
-              url: '<%= page_url -%>',
-              labelLocalized: '<%= escape_javascript message(page.getId() + '.page', :default => page.getTitle()) -%>',
-              active: false
-            },
-            <%   end
-               end %>
-          ]
-        },
-        <% end %>
-        <% end %>
-        {
-          label: 'more',
-          active: false,
-          menu: [
-            <% project_metrics = @project.last_snapshot.metric_keys.to_java(:string) if @project.last_snapshot
-               controller.java_facade.getPages(Navigation::SECTION_RESOURCE.key, @project.scope, @project.qualifier, @project.language, project_metrics).each do |page|
-                 page_url = (page.isController() ? "#{page.getId()}?id=#{@project.id}" : "/plugins/resource/#{@project.id}?page=#{page.getId()}")
-            %>
-            {
-              url: '<%= page_url -%>',
-              labelLocalized: '<%= escape_javascript message(page.getId() + '.page', :default => page.getTitle()) -%>',
-              active: <%= request.request_uri.include?(page_url) ? "true" : "false" -%>
-            },
-            <% end %>
-            {
-              url: '/design/index/<%= @project.key -%>',
-              label: 'design.page',
-              active: <%= request.request_uri.include?('/design/index') ? "true" : "false" -%>
-            },
-            {
-              url: '/libraries/index/<%= @project.key -%>',
-              label: 'libraries.page',
-              active: <%= request.request_uri.include?('/libraries/index') ? "true" : "false" -%>
-            },
-            <% if controller.java_facade.getResourceTypeBooleanProperty(@project.qualifier, 'comparable') %>
-            {
-              url: '/comparison/index?resource=<%= @project.key -%>',
-              label: 'comparison.page',
-              active: <%= request.request_uri.include?('/comparison/index') ? "true" : "false" -%>
-            }
-            <% end %>
-          ]
-        }
-      ];
-</script>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_navbar_conf_settings.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_navbar_conf_settings.html.erb
deleted file mode 100644 (file)
index 910fdfc..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-<%
-   selected_section = controller.class::SECTION if defined?(controller.class::SECTION)
-   if selected_section==Navigation::SECTION_RESOURCE && !@project && !@resource
-     selected_section = Navigation::SECTION_HOME
-   end
-%>
-
-<script>
-  var navbarSpace = 'settings',
-      navbarItems = [
-        {
-          label: 'sidebar.project_settings',
-          active: false,
-          menu: [
-            {
-              url: '/settings/index',
-              label: 'settings.page',
-              active: <%= request.request_uri.include?('/settings') ? 'true' : 'false' -%>
-            },
-            {
-              url: '/metrics/index',
-              label: 'manual_metrics.page',
-              active: <%= request.request_uri.include?('/metrics') ? 'true' : 'false' -%>
-            },
-            {
-              url: '/admin_dashboards/index',
-              label: 'default_dashboards.page',
-              active: <%= request.request_uri.include?('/admin_dashboards') ? 'true' : 'false' -%>
-            },
-            <% controller.java_facade.getPages(Navigation::SECTION_CONFIGURATION.key, nil, nil, nil, nil).each do |page|
-                        page_url = (page.isController() ? page.getId() : "/plugins/configuration/#{page.getId()}")
-                      %>
-            {
-              url: '<%= page_url -%>',
-              labelLocalized: '<%= escape_javascript message(page.getId() + '.page', :default => page.getTitle()) %>',
-              active: <%= request.request_uri.include?(page_url) ? 'true' : 'false' -%>
-            },
-            <% end %>
-          ]
-        },
-        {
-          label: 'sidebar.security',
-          active: false,
-          menu: [
-            {
-              url: '/users/index',
-              label: 'users.page',
-              active: <%= request.request_uri.include?('/users') ? 'true' : 'false' -%>
-            },
-            {
-              url: '/groups/index',
-              label: 'user_groups.page',
-              active: <%= request.request_uri.include?('/groups') ? 'true' : 'false' -%>
-            },
-            {
-              url: '/roles/global',
-              label: 'global_permissions.page',
-              active: <%= request.request_uri.include?('/roles/global') ? 'true' : 'false' -%>
-            },
-            {
-              url: '/roles/projects',
-              label: 'roles.page',
-              active: <%= request.request_uri.include?('/roles/projects') ? 'true' : 'false' -%>
-            },
-            {
-              url: '/admin_dashboards/index',
-              label: 'default_dashboards.page',
-              active: <%= request.request_uri.include?('/admin_dashboards') ? 'true' : 'false' -%>
-            }
-          ]
-        },
-        {
-          label: 'sidebar.system',
-          active: false,
-          menu: [
-            <% if has_role?("provisioning") %>
-            {
-              url: '/provisioning/index',
-              label: 'provisioning.page',
-              active: <%= request.request_uri.include?('/provisioning') ? 'true' : 'false' -%>
-            },
-            <% end %>
-            {
-              url: '/bulk_deletion/index',
-              label: 'bulk_deletion.page',
-              active: <%= request.request_uri.include?('/bulk_deletion') ? 'true' : 'false' -%>
-            },
-            <% update_center_activated = controller.java_facade.getSettings().getBoolean('sonar.updatecenter.activate')
-                         if update_center_activated %>
-            {
-              url: '/updatecenter/index',
-              label: 'update_center.page',
-              active: <%= request.request_uri.include?('/updatecenter') ? 'true' : 'false' -%>
-            },
-            <% end %>
-            {
-              url: '/system/index',
-              label: 'system_info.page',
-              active: <%= request.request_uri.include?('/system') ? 'true' : 'false' -%>
-            },
-            {
-              url: '/analysis_reports/index',
-              label: 'analysis_reports.page',
-              active: <%= request.request_uri.include?('/analysis_reports') ? 'true' : 'false' -%>
-            }
-          ]
-        }
-      ];
-</script>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_recent_history.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_recent_history.html.erb
deleted file mode 100644 (file)
index 51b81a4..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<script>
-  var sonarRecentHistory = new Sonar.RecentHistory();
-  <% if @resource && Project.root_qualifiers.include?(@resource.qualifier) %>
-  sonarRecentHistory.add(
-      '<%= escape_javascript(h(@resource.key)) -%>',
-      '<%= escape_javascript(h(@resource.name)) -%>',
-      '<%= escape_javascript @resource.qualifier.downcase -%>');
-  <% end %>
-</script>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_small_logo.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_small_logo.html.erb
deleted file mode 100644 (file)
index a7029b5..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<div class="sq-logo sq-logo-small">
-  <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="29" height="27">
-    <g opacity="1" transform="translate(-96, 0)">
-      <path class="sq-logo-arc sq-logo-arc1" d="M119.77 26.19L118.26 26.19C118.26 14.04 108.22 4.11 95.82 4.11L95.82 2.55C109.03 2.55 119.8 13.22 119.8 26.19L119.77 26.19Z"/>
-      <path class="sq-logo-arc sq-logo-arc2" d="M120.82 18.06C119 10.43 112.82 4.02 105.02 1.81L105.37 0.57C113.58 2.96 120.12 9.69 122.01 17.82L120.82 18.06Z"/>
-      <path class="sq-logo-arc sq-logo-arc3" d="M122.53 10.92C120.65 6.81 117.5 3.28 113.56 0.9L114.06 0C118.15 2.46 121.52 6.24 123.41 10.51L122.53 10.92Z"/>
-    </g>
-  </svg>
-</div>
index 52e8974dc14ebf90a1fc7ebb2810e2d990945fa0..3c67adf30b2e4bb81e79369821c8cf723f34524a 100644 (file)
    end
   %>
 <%= render :partial => 'layouts/head' unless params[:hd]=='false' %>
-<%= render :partial => 'layouts/navbar' %>
 <% if params[:layout]=='false' %>
   <%= render :partial => 'layouts/nolayout' %>
 <% else %>
   <%= render :partial => 'layouts/layout' %>
 <% end %>
-<%= render :partial => 'layouts/footer' unless params[:hd]=='false' %>
+<%= render :partial => 'layouts/footer' unless params[:hd]=='false' %>
\ No newline at end of file
index 9b39bc3135acdd7fd71f9be9fc06e1d11f8989b4..8e3508a85d4a201345a4304957fa0f1bbfd89ad8 100644 (file)
@@ -427,7 +427,6 @@ layout.sonar.slogan=Embrace Quality
 layout.dashboards=Dashboards
 layout.configuration=Project Configuration
 layout.projects=Projects
-layout.tools=Tools
 layout.recent_projects=Recent Projects
 layout.user_panel.my_profile=My profile