]> source.dussan.org Git - sonarqube.git/commitdiff
fix SONAR-6041 update navigator pages
authorStas Vilchik <vilchiks@gmail.com>
Mon, 19 Jan 2015 09:50:36 +0000 (10:50 +0100)
committerStas Vilchik <vilchiks@gmail.com>
Mon, 19 Jan 2015 09:50:36 +0000 (10:50 +0100)
12 files changed:
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/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/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/js/coding-rules/filters-view.js
server/sonar-web/src/main/js/coding-rules/workspace-header-view.js
server/sonar-web/src/main/less/components/search-navigator.less

index c8ce1732134dcf8c2075ef4af8c477b3a259a382..0b79214e605dcb84a71e36b654ddb7c973d6d04f 100644 (file)
@@ -12,7 +12,6 @@ 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'
@@ -48,10 +47,6 @@ 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 2b57dbf22b61928a6790c9f1aea1f65ecc536bf9..c6b591c231e40f52e55c34c8c738622524908ce1 100644 (file)
@@ -18,25 +18,6 @@ define [
       workspaceComponentViewerRegion: '.issues-workspace-component-viewer'
 
 
-    initialize: ->
-      $(window).on 'scroll.issues-layout', (=> @onScroll())
-
-
-    onClose: ->
-      $(window).off 'scroll.issues-layout'
-
-
-    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'
index b60ed4da24b9631021b2bbdd09d1a134853058d4..2d376f362b8ad6bf3f00d464f4d413aa698081cc 100644 (file)
@@ -14,6 +14,7 @@ define [
 
     events: ->
       _.extend super,
+        'click .js-new-search': 'newSearch'
         'click .js-back': 'returnToList'
 
 
@@ -29,6 +30,10 @@ define [
       window.onBulkIssues = @_onBulkIssues
 
 
+    newSearch: ->
+      @options.app.controller.newSearch()
+
+
     returnToList: ->
       @options.app.controller.closeComponentViewer()
 
index dc97d68a6fe4aab6b7a255b12cd1ed968e14fe4e..234ff85b91e40fda31e0b401bb66246af17a988f 100644 (file)
@@ -1,12 +1,3 @@
 <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 7a107af3688386141f39556b7010293b4345dabb..ae396827d7f6b574a6723da5f41e800b9ace1f26 100644 (file)
@@ -1,13 +1,13 @@
 <div class="container-side container-side-left">
+  <div class="search-navigator-filters"></div>
   <div class="search-navigator-side">
-    <div class="search-navigator-filters"></div>
     <div class="search-navigator-facets"></div>
   </div>
 </div>
 
 <div class="container-main">
+  <div class="search-navigator-workspace-header"></div>
   <div class="search-navigator-workspace">
-    <div class="search-navigator-workspace-header"></div>
     <div class="search-navigator-workspace-list"></div>
     <div class="search-navigator-workspace-details"></div>
   </div>
index bcf70f5d3ab6fc1a77e096a3f7201c2000a7f01e..39fbca9aeb9fab752b57c01c3257170271dd990d 100644 (file)
     </div>
   {{/notNull}}
 
-  {{#if canWrite}}
-    <div class="search-navigator-header-buttons button-group">
+  <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>
       <button class="js-bulk-change">{{t 'bulk_change'}}</button>
-    </div>
-  {{/if}}
+    {{/if}}
+  </div>
 </div>
index cd51e68565154140048950dd5737eaf261a80add..234c399657967f84d213e68fdb32e3430673baa3 100644 (file)
@@ -21,8 +21,6 @@
 
 <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 fb22d724577a90406d82e0745a45e30ec1e81026..e0399a5a2cec7e15f54330549f549d1df3cc8f95 100644 (file)
@@ -1,13 +1,14 @@
+
 <div class="container-side container-side-left">
+  <div class="search-navigator-filters"></div>
   <div class="search-navigator-side">
-    <div class="search-navigator-filters"></div>
     <div class="search-navigator-facets"></div>
   </div>
 </div>
 
 <div class="container-main">
+  <div class="search-navigator-workspace-header"></div>
   <div class="search-navigator-workspace">
-    <div class="search-navigator-workspace-header"></div>
     <div class="search-navigator-workspace-list"></div>
     <div class="issues-workspace-component-viewer"></div>
   </div>
index 93175e7c99b93a60569c3e70a0679aeb01cdb58d..e29177268b750ca7be5384a7ac1e238bd3f1ec7c 100644 (file)
@@ -28,6 +28,7 @@
 
 
   <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>
index 451790ea2b68c65438846816fc92b0bfad3e27ff..0c0c74a9ce397dc4140b2b2b711a676f87b1789e 100644 (file)
@@ -1,26 +1,10 @@
 define([
-    'coding-rules/rule/manual-rule-creation-view',
     'templates/coding-rules'
-], function (ManualRuleCreationView) {
+], function () {
 
   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 cbcebe2db724794c7cc375e72dba123e89a7d7fb..7d40501f109bbbc25a8643808f3dc1acf2b587f7 100644 (file)
@@ -1,8 +1,9 @@
 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) {
+], function (WorkspaceHeaderView, BulkChangePopup, ManualRuleCreationView) {
 
   var $ = jQuery;
 
@@ -12,7 +13,9 @@ define([
     events: function () {
       return _.extend(WorkspaceHeaderView.prototype.events.apply(this, arguments), {
         'click .js-back': 'onBackClick',
-        'click .js-bulk-change': 'onBulkChangeClick'
+        'click .js-bulk-change': 'onBulkChangeClick',
+        'click .js-new-search': 'newSearch',
+        'click .js-create-manual-rule': 'createManualRule'
       });
     },
 
@@ -30,6 +33,16 @@ 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
index 389479102c465bb52462ce7678ddcb2a50334628..9246d8442d30938bdfb9ba1eb7c27009ccb51b09 100644 (file)
   position: relative;
   .clearfix;
   padding: 5px 10px;
-  background-color: @barBackgroundColor;
 }
 
 .search-navigator-filters-selected {