diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index 45cbaf46bfb..5dab5c81d18 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -289,10 +289,10 @@ instance.web.Loading = instance.web.Widget.extend({ } } }); - instance.web.DatabaseManager = instance.web.Widget.extend({ init: function(parent) { this._super(parent); + self.$('.oe_topbar,.oe_leftbar').show(); this.unblockUIFunction = instance.web.unblockUI; $.validator.addMethod('matches', function (s, _, re) { return new RegExp(re).test(s); @@ -315,11 +315,18 @@ instance.web.DatabaseManager = instance.web.Widget.extend({ }, do_render: function() { var self = this; - self.$element.html(QWeb.render("DatabaseManager", { widget : self })); - self.$element.find(".oe_database_manager_menu").tabs({ - show: function(event, ui) { - $('*[autofocus]:first', ui.panel).focus(); - } + self.$element.html(QWeb.render("DatabaseManager",{ widget : self })); + $('.oe_secondary_menus_container').replaceWith($('.datamanager_menu')); + $('.oe_user_menu_placeholder').replaceWith($('.oe_user_menu')); + $('ul.oe_secondary_submenu > li').bind('click', function (event) { + $(this).addClass('oe_active').siblings().removeClass('oe_active'); + var $new = $(this); + var submenu = $('ul.oe_secondary_submenu > li > a'); + submenu.each(function () { + $($(this).attr('href')).hide(); + }); + $($new.find('a').attr('href')).show(); + event.preventDefault(); }); self.$element.find("form[name=create_db_form]").validate({ submitHandler: self.do_create }); self.$element.find("form[name=drop_db_form]").validate({ submitHandler: self.do_drop }); @@ -336,7 +343,7 @@ instance.web.DatabaseManager = instance.web.Widget.extend({ }, submitHandler: self.do_change_password }); - self.$element.find("#back_to_login").click(self.do_exit); + $('#back-to-login').click(self.do_exit); }, destroy: function () { this.$element.find('#db-create, #db-drop, #db-backup, #db-restore, #db-change-password, #back-to-login').unbind('click').end().empty(); @@ -407,7 +414,6 @@ instance.web.DatabaseManager = instance.web.Widget.extend({ }; self.do_action(client_action); }); - }, do_drop: function(form) { var self = this; @@ -490,7 +496,8 @@ instance.web.DatabaseManager = instance.web.Widget.extend({ }); }, do_exit: function () { - this.do_action("login"); + this.do_action('reload'); + //this.do_action('login'); } }); instance.web.client_actions.add("database_manager", "instance.web.DatabaseManager"); diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 601fe165f81..dc900d2c0c0 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -122,153 +122,297 @@ -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CREATE DATABASE
- -
-
-
- - - - - - - - - - - - - - - -
DROP DATABASE
- - -
-
-
- - - - - - - - - - - - - - - - -
BACKUP DATABASE
- - -
-
-
- - - - - - - - - - - - - - - - - - - -
RESTORE DATABASE
-
-
- - - - - - - - - - - - - - - - - - - -
CHANGE MASTER PASSWORD
-
-
+
+ +
+
Database Management
+ +
+
+
+
+
+ + + + + + + +
+

+ CREATE DATABASE +

+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ + + + + +
+ + + +
+ + + +
+ + + +
+
+ + + + +
+
+