From a97be4a36aada79889b560ea2dbb66c5315136d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 19 Sep 2016 22:21:09 +0200 Subject: [PATCH] Move info-bar to the top issue5857 review28761002 --- CHANGELOG | 1 + src/sao.less | 9 +++++++++ src/tab.js | 4 +++- src/window.js | 11 ++++++----- src/wizard.js | 2 +- 5 files changed, 20 insertions(+), 7 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index edd82d29ce..f714bdc9af 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,4 @@ +* Move info-bar to the top * Add noeval to PYSONDecoder * Add support for pyson_order on action window * Make datetimepicker locale aware diff --git a/src/sao.less b/src/sao.less index 11f6b90877..99d7491d23 100644 --- a/src/sao.less +++ b/src/sao.less @@ -297,6 +297,15 @@ button { z-index: 2000; } +.infobar { + position: fixed; + top: 0px; + left: 50%; + transform: translateX(-50%); + z-index: 1000; + min-width: 50%; +} + img.global-search-icon { width: 2em; height: 2em; diff --git a/src/tab.js b/src/tab.js index 1e3e9af11e..9ad12452fd 100644 --- a/src/tab.js +++ b/src/tab.js @@ -18,6 +18,8 @@ var toolbar = this.create_toolbar().appendTo(this.el); this.title = toolbar.find('a.navbar-brand'); + this.content = jQuery('
').appendTo(this.el); + if (this.info_bar) { this.el.append(this.info_bar.el); } @@ -289,7 +291,7 @@ this.view_prm = this.screen.switch_view().done(function() { this.set_name(attributes.name || ''); - this.el.append(screen.screen_container.el); + this.content.append(screen.screen_container.el); if (attributes.res_id) { if (!jQuery.isArray(attributes.res_id)) { attributes.res_id = [attributes.res_id]; diff --git a/src/window.js b/src/window.js index e2c73572fe..dd24ac88b6 100644 --- a/src/window.js +++ b/src/window.js @@ -9,8 +9,8 @@ init: function() { this.text = jQuery(''); this.text.css('white-space', 'pre-wrap'); - this.el = jQuery('
', { - 'class': 'alert', + this.el= jQuery('
', { + 'class': 'alert infobar', 'role': 'alert' }).append(jQuery('