diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2015-06-22 13:44:12 +0200 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2015-06-22 16:33:24 +0200 |
commit | fb018fbc9a053e60f00e3c1d006e94f1c2e81a99 (patch) | |
tree | c498ee9aa462d766ae40461588e0c91ba65c2fab /server/sonar-web/src/main/js/apps/quality-gates | |
parent | 1eb94e56649b47cfd4e14d7448fbdd380b0bf1f4 (diff) | |
download | sonarqube-fb018fbc9a053e60f00e3c1d006e94f1c2e81a99.tar.gz sonarqube-fb018fbc9a053e60f00e3c1d006e94f1c2e81a99.zip |
improve start of js apps
Diffstat (limited to 'server/sonar-web/src/main/js/apps/quality-gates')
3 files changed, 11 insertions, 18 deletions
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/app.js b/server/sonar-web/src/main/js/apps/quality-gates/app.js index f5d521fe310..6f939c9aa24 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/app.js +++ b/server/sonar-web/src/main/js/apps/quality-gates/app.js @@ -40,7 +40,7 @@ define([ this.router = new Router({ app: this }); Backbone.history.start({ pushState: true, - root: getRoot() + root: options.urlRoot }); }; @@ -57,13 +57,6 @@ define([ }); }); - function getRoot () { - var ROOT = '/quality_gates', - path = window.location.pathname, - pos = path.indexOf(ROOT); - return path.substr(0, pos + ROOT.length); - } - return App; }); diff --git a/server/sonar-web/src/main/js/apps/quality-gates/layout.js b/server/sonar-web/src/main/js/apps/quality-gates/layout.js index 791ba30ae83..db02143caa6 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/layout.js +++ b/server/sonar-web/src/main/js/apps/quality-gates/layout.js @@ -3,8 +3,6 @@ define([ './templates' ], function (IntroView) { - var $ = jQuery; - return Marionette.LayoutView.extend({ template: Templates['quality-gates-layout'], @@ -16,7 +14,7 @@ define([ }, onRender: function () { - var top = $('.search-navigator').offset().top; + var top = this.$('.search-navigator').offset().top; this.$('.search-navigator-workspace-header').css({ top: top }); this.$('.search-navigator-side').css({ top: top }).isolatedScroll(); this.renderIntro(); diff --git a/server/sonar-web/src/main/js/apps/quality-gates/templates/quality-gates-layout.hbs b/server/sonar-web/src/main/js/apps/quality-gates/templates/quality-gates-layout.hbs index 4ac8b8b6c37..25bd5742e32 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/templates/quality-gates-layout.hbs +++ b/server/sonar-web/src/main/js/apps/quality-gates/templates/quality-gates-layout.hbs @@ -1,9 +1,11 @@ -<div class="search-navigator-side search-navigator-side-light"> - <div class="search-navigator-filters"></div> - <div class="quality-gates-results panel"></div> -</div> +<div class="search-navigator sticky search-navigator-extended-view"> + <div class="search-navigator-side search-navigator-side-light"> + <div class="search-navigator-filters"></div> + <div class="quality-gates-results panel"></div> + </div> -<div class="search-navigator-workspace"> - <div class="search-navigator-workspace-header"></div> - <div class="search-navigator-workspace-details"></div> + <div class="search-navigator-workspace"> + <div class="search-navigator-workspace-header"></div> + <div class="search-navigator-workspace-details"></div> + </div> </div> |