From: Stas Vilchik Date: Wed, 8 Apr 2015 14:09:23 +0000 (+0200) Subject: SONAR-6331 show project meta in the header X-Git-Tag: 5.2-RC1~2339 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a0d088fc98ab1d5a146ed6b87b991a33af06abc6;p=sonarqube.git SONAR-6331 show project meta in the header --- diff --git a/server/sonar-web/src/main/hbs/nav/nav-context-navbar.hbs b/server/sonar-web/src/main/hbs/nav/nav-context-navbar.hbs index 5dcff71a941..74d0196ce6a 100644 --- a/server/sonar-web/src/main/hbs/nav/nav-context-navbar.hbs +++ b/server/sonar-web/src/main/hbs/nav/nav-context-navbar.hbs @@ -72,5 +72,11 @@ {{/if}} + diff --git a/server/sonar-web/src/main/js/nav/context-navbar-view.js b/server/sonar-web/src/main/js/nav/context-navbar-view.js index 6f37d7ab2e4..eccfd034dfc 100644 --- a/server/sonar-web/src/main/js/nav/context-navbar-view.js +++ b/server/sonar-web/src/main/js/nav/context-navbar-view.js @@ -39,7 +39,8 @@ define([ }, events: { - 'click .js-favorite': 'onFavoriteClick' + 'click .js-favorite': 'onFavoriteClick', + 'show.bs.dropdown .js-meta-dropdown': 'onMetaDropdownShow' }, onRender: function () { @@ -58,6 +59,22 @@ define([ }); }, + onMetaDropdownShow: function () { + var that = this; + this.requestMeta().done(function (r) { + that.$('.js-meta').html(r); + }); + }, + + requestMeta: function () { + var url = baseUrl + '/widget/show', + options = { + id: 'description', + resource: this.model.get('contextKey') + }; + return $.get(url, options); + }, + serializeData: function () { var href = window.location.href, isMoreActive = _.some(OVERVIEW_URLS, function (url) { diff --git a/server/sonar-web/src/main/less/init/misc.less b/server/sonar-web/src/main/less/init/misc.less index ce7d07dc15e..f3000fbb979 100644 --- a/server/sonar-web/src/main/less/init/misc.less +++ b/server/sonar-web/src/main/less/init/misc.less @@ -48,6 +48,9 @@ td.spacer-right { padding-right: 8px; } td.spacer-bottom { padding-bottom: 8px; } td.spacer-top { padding-top: 8px; } +.pull-left { float: left !important; } +.pull-right { float: right !important; } + .bordered { border: 1px solid @barBorderColor; } .bordered-left { border-left: 1px solid @barBorderColor; } .bordered-right { border-right: 1px solid @barBorderColor; } @@ -62,6 +65,8 @@ td.spacer-top { padding-top: 8px; } .width-20 { width: 20%; } .width-15 { width: 15%; } +.abs-width-400 { width: 400px; } + .justify { margin-bottom: -1em; text-align: justify;