]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5718 Add a reload link. Improve header links style
authorStas Vilchik <vilchiks@gmail.com>
Mon, 3 Nov 2014 08:58:52 +0000 (09:58 +0100)
committerStas Vilchik <vilchiks@gmail.com>
Mon, 3 Nov 2014 15:48:57 +0000 (16:48 +0100)
server/sonar-web/src/main/coffee/issues/workspace-header-view.coffee
server/sonar-web/src/main/hbs/issues/issues-workspace-header.hbs
server/sonar-web/src/main/hbs/issues/issues-workspace-list-item.hbs
server/sonar-web/src/main/less/issues.less
server/sonar-web/src/main/less/ui.less
sonar-core/src/main/resources/org/sonar/l10n/core.properties

index fd2e92e439ab9f6e239ac6d3e8e2d14c5d38b19c..0a3411d8b450e557b93b5a5293b168ce7ec52e85 100644 (file)
@@ -19,7 +19,8 @@ define [
 
     events:
       'click .js-back': 'returnToList'
-      'click .js-issues-bulk-change': 'bulkChange'
+      'click #issues-bulk-change': 'bulkChange'
+      'click #issues-reload': 'reloadIssues'
       'click .js-issues-next': 'selectNextIssue'
       'click .js-issues-prev': 'selectPrevIssue'
 
@@ -47,6 +48,10 @@ define [
       openModalWindow url, {}
 
 
+    reloadIssues: ->
+      @options.app.controller.fetchIssues()
+
+
     selectNextIssue: ->
       @options.app.controller.selectNextIssue()
 
index e06ea8aa755f017bd38d307c1b749f1765b9305a..33bc8db2feaa88bbcb6c224da4d8336ff71f4f1e 100644 (file)
@@ -1,21 +1,27 @@
-{{#if state.component}}
-  <span class="issues-header-item">
-    <a class="js-back">Return to List</a>
-  </span>
+<div class="issues-header-component">
+  {{#if state.component}}
+    {{#with state.component}}
+      <a href="{{dashboardUrl project}}" title="{{projectName}}">{{projectName}}</a>
+      /
+      <a href="{{dashboardUrl key}}" title="{{name}}">{{name}}</a>
+    {{/with}}
+  {{else}}
+    &nbsp;
+  {{/if}}
+</div>
 
-  <span class="issues-header-item">
-    {{state.component.projectName}} {{state.component.name}}
-  </span>
-{{/if}}
 
-<span class="issues-header-item issues-header-nav">
-  <a class="icon-bulk-change js-issues-bulk-change"></a>
-</span>
+<div class="issues-header-actions">
+  {{#if state.total}}
+    <div class="issues-header-pagination">
+      <a class="js-issues-prev icon-prev" title="{{t 'paging_previous'}}"></a>
+      <span class="current">{{sum state.selectedIndex 1}} / <span id="issues-total">{{state.total}}</span></span>
+      <a class="js-issues-next icon-next" title="{{t 'paging_next'}}"></a>
+    </div>
+  {{/if}}
 
-{{#if state.total}}
-  <span class="issues-header-item issues-header-nav">
-    <a class="js-issues-prev icon-prev"></a>
-    <span class="current">{{sum state.selectedIndex 1}} / <span id="issues-total">{{state.total}}</span></span>
-    <a class="js-issues-next icon-next"></a>
-  </span>
-{{/if}}
+  <div class="issues-header-buttons button-group">
+    <button id="issues-reload">{{t 'reload'}}</button>
+    <button id="issues-bulk-change">{{t 'bulk_change'}}</button>
+  </div>
+</div>
index 35fe12446aa715ff309d4ed8cc3c7147ee64a061..394902ee4d3d8d514feb4a0c5da447e180c2e8e0 100644 (file)
@@ -1,6 +1,6 @@
 <div class="issue-box-component subtitle">
   <a href="{{dashboardUrl project}}">{{projectLongName}}</a>
-   &nbsp;&nbsp;&nbsp;
+  /
   <a href="{{dashboardUrl component}}">{{componentLongName}}</a>
 </div>
 
index b6e6470387081c239c960c8d5d8ff78415e78990..d227c4e89f66b2e2e85195b1735d1a54f25ca405 100644 (file)
 }
 
 .issues-header {
-  .clearfix;
+  position: relative;
   margin-bottom: 10px;
   padding: 5px 0;
   line-height: 22px;
   background-color: @barBackgroundColor;
   font-size: @smallFontSize;
+
+  .button-group,
+  .button-group > button,
+  .button-group > .button {
+    vertical-align: top;
+  }
+}
+
+.issues-header-component {
+  margin-left: 10px;
+  white-space: nowrap;
 }
 
-.issues-header-item {
+.issues-header-actions {
+  position: absolute;
+  top: 0;
+  right: 0;
+  padding: 5px 10px;
+  background-color: @barBackgroundColor;
+  font-size: 0;
+  white-space: nowrap;
+
+  &:before {
+    content: " ";
+    position: absolute;
+    top: 0; bottom: 0; right: 100%;
+    width: 10px;
+    background-image: linear-gradient(to right, rgba(243, 243, 243, 0), @barBackgroundColor 75%);
+  }
+}
+
+.issues-header-pagination {
   display: inline-block;
-  margin: 0 10px;
+  vertical-align: top;
+  margin-right: 20px;
+  font-size: @smallFontSize;
 }
 
-.issues-header-nav {
-  float: right;
+.issues-header-buttons {
+  vertical-align: top;
 }
 
 .issues-workspace-list {
index 8b7296c28a0c46ca8653a941868d9ccfaa2507a4..3ba3a87670fa9a82c8ee4800c110bdee16324f68 100644 (file)
@@ -148,6 +148,14 @@ select::-moz-focus-inner, input::-moz-focus-inner, button::-moz-focus-inner {
   border-bottom: none;
 }
 
+.link-with-icon {
+  .link-no-underline;
+
+  & > .ul {
+    border-bottom: 1px solid @lightBlue;
+  }
+}
+
 
 a {
   cursor: pointer;
index 44beb0db519d54a62945dcfa2c8097b3b9da4f76..e369300c7ab11385dc9866febd5a2a631cd50968 100644 (file)
@@ -115,6 +115,7 @@ project=Project
 projects=Projects
 raw=Raw
 refresh=Refresh
+reload=Reload
 remove=Remove
 rename=Rename
 reporter=Reporter