diff --git a/addons/base_dashboard/static/src/css/dashboard.css b/addons/base_dashboard/static/src/css/dashboard.css index 57f1ceb8f98..9dd03284eff 100644 --- a/addons/base_dashboard/static/src/css/dashboard.css +++ b/addons/base_dashboard/static/src/css/dashboard.css @@ -50,21 +50,68 @@ .openerp .oe-dashboard-layout_1 .oe-dashboard-column { width: 100%; } +.openerp .oe-dashboard-layout_1 .oe-dashboard-column.index_1 .oe-dashboard-column.index_2 { + display: none; +} + .openerp .oe-dashboard-layout_1-1 .oe-dashboard-column { width: 50%; } +.openerp .oe-dashboard-layout_1-1 .oe-dashboard-column.index_2 { + display: none; +} + .openerp .oe-dashboard-layout_1-1-1 .oe-dashboard-column { width: 33%; } + .openerp .oe-dashboard-layout_2-1 .oe-dashboard-column.index_0 { width: 70%; } .openerp .oe-dashboard-layout_2-1 .oe-dashboard-column.index_1 { width: 30%; } +.openerp .oe-dashboard-layout_2-1 .oe-dashboard-column.index_2 { + display: none; +} + .openerp .oe-dashboard-layout_1-2 .oe-dashboard-column.index_0 { width: 30%; } .openerp .oe-dashboard-layout_1-2 .oe-dashboard-column.index_1 { width: 70%; } +.openerp .oe-dashboard-layout_1-2 .oe-dashboard-column.index_2 { + display: none; +} + + +.openerp .oe-dashboard-layout-selector { + overflow: auto; + padding: 10px; +} + +.openerp .oe-dashboard-layout-selector ul { + margin: 0; + padding: 0; +} + +.openerp .oe-dashboard-layout-selector ul li { + position: relative; + float: left; + height: 51px; + list-style-type: none; + margin: 5px; + padding: 0; + width: 82px; + cursor: pointer; + border: 1px solid white; +} +.openerp .oe-dashboard-layout-selector ul li:hover { + border: 1px solid #090; +} +.openerp .oe-dashboard-layout-selector ul li img.oe-selected-layout { + position: absolute; + top: 0px; + right: 0px; +} diff --git a/addons/base_dashboard/static/src/img/layout_1-1-1.png b/addons/base_dashboard/static/src/img/layout_1-1-1.png new file mode 100644 index 00000000000..5eda2823c46 Binary files /dev/null and b/addons/base_dashboard/static/src/img/layout_1-1-1.png differ diff --git a/addons/base_dashboard/static/src/img/layout_1-1.png b/addons/base_dashboard/static/src/img/layout_1-1.png new file mode 100644 index 00000000000..e72aa3a0533 Binary files /dev/null and b/addons/base_dashboard/static/src/img/layout_1-1.png differ diff --git a/addons/base_dashboard/static/src/img/layout_1-2.png b/addons/base_dashboard/static/src/img/layout_1-2.png new file mode 100644 index 00000000000..4b14d7aeaad Binary files /dev/null and b/addons/base_dashboard/static/src/img/layout_1-2.png differ diff --git a/addons/base_dashboard/static/src/img/layout_1.png b/addons/base_dashboard/static/src/img/layout_1.png new file mode 100644 index 00000000000..69a0e30854c Binary files /dev/null and b/addons/base_dashboard/static/src/img/layout_1.png differ diff --git a/addons/base_dashboard/static/src/img/layout_2-1.png b/addons/base_dashboard/static/src/img/layout_2-1.png new file mode 100644 index 00000000000..ed866add47c Binary files /dev/null and b/addons/base_dashboard/static/src/img/layout_2-1.png differ diff --git a/addons/base_dashboard/static/src/js/dashboard.js b/addons/base_dashboard/static/src/js/dashboard.js index 8497ffc2ce5..9d6511fd215 100644 --- a/addons/base_dashboard/static/src/js/dashboard.js +++ b/addons/base_dashboard/static/src/js/dashboard.js @@ -19,7 +19,7 @@ openerp.base.form.DashBoard = openerp.base.form.Widget.extend({ // Events this.$element.find('.oe-dashboard-link-undo').click(this.on_undo); this.$element.find('.oe-dashboard-link-add_widget').click(this.on_add_widget); - this.$element.find('.oe-dashboard-link-edit_layout').click(this.on_edit_layout); + this.$element.find('.oe-dashboard-link-change_layout').click(this.on_change_layout); this.$element.find('.oe-dashboard-column .ui-icon-minusthick').click(this.on_fold_action); this.$element.find('.oe-dashboard-column .ui-icon-closethick').click(this.on_close_action); @@ -44,7 +44,44 @@ openerp.base.form.DashBoard = openerp.base.form.Widget.extend({ }, on_add_widget: function() { }, - on_edit_layout: function() { + on_change_layout: function() { + var self = this; + var qdict = { + current_layout : this.$element.find('.oe-dashboard').attr('data-layout') + }; + var $dialog = $('
Choose dashboard layout
-