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('', { 'type': 'button', @@ -75,8 +75,6 @@ var dialog = new Sao.Dialog('', '', 'lg'); this.el = dialog.modal; - dialog.body.append(this.info_bar.el); - var readonly = (this.screen.attributes.readonly || this.screen.group.get_readonly()); @@ -218,10 +216,13 @@ this.but_switch.click(this.switch_.bind(this)); } + var content = jQuery('').appendTo(dialog.body); + + dialog.body.append(this.info_bar.el); switch_prm.done(function() { title_prm.done(dialog.add_title.bind(dialog)); - dialog.body.append(this.screen.screen_container.alternate_viewport); + content.append(this.screen.screen_container.alternate_viewport); this.el.modal('show'); }.bind(this)); this.el.on('shown.bs.modal', function(event) { diff --git a/src/wizard.js b/src/wizard.js index 664e0377c0..9b2760800f 100644 --- a/src/wizard.js +++ b/src/wizard.js @@ -210,7 +210,7 @@ this.dialog = dialog.modal; this.content = dialog.content; this.footer = dialog.footer; - dialog.body.append(this.info_bar.el).append(this.widget); + dialog.body.append(this.widget).append(this.info_bar.el); }, clean: function() { Sao.Wizard.Dialog._super.clean.call(this);