diff options
Diffstat (limited to 'addons/web_dashboard/static/src')
| -rw-r--r-- | addons/web_dashboard/static/src/css/dashboard.css | 4 | ||||
| -rw-r--r-- | addons/web_dashboard/static/src/js/dashboard.js | 42 | ||||
| -rw-r--r-- | addons/web_dashboard/static/src/xml/web_dashboard.xml | 3 |
3 files changed, 24 insertions, 25 deletions
diff --git a/addons/web_dashboard/static/src/css/dashboard.css b/addons/web_dashboard/static/src/css/dashboard.css index 4d48cd4ffbd..54b1cc7d2b5 100644 --- a/addons/web_dashboard/static/src/css/dashboard.css +++ b/addons/web_dashboard/static/src/css/dashboard.css @@ -34,6 +34,10 @@ -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; } +.openerp h2.oe-dashboard-action-header-empty { + padding-top: 0; + padding-bottom: 2px; +} .openerp a.oe-dashboard-action-rename { float: left; diff --git a/addons/web_dashboard/static/src/js/dashboard.js b/addons/web_dashboard/static/src/js/dashboard.js index 3163453a122..923b43ce034 100644 --- a/addons/web_dashboard/static/src/js/dashboard.js +++ b/addons/web_dashboard/static/src/js/dashboard.js @@ -378,8 +378,8 @@ openerp.web_dashboard.apps = { module: 'account_voucher', name: 'Invoicing', help: "Send invoice, track payments and reminders" }, { - module: 'project', name: 'Projects', - help: "Manage projects, track tasks, invoice task works, follow issues, \u2026" + module: 'point_of_sale', name: 'Point of Sales', + help: "Manage shop sales, use touch-screen POS" } ], [ { @@ -389,19 +389,19 @@ openerp.web_dashboard.apps = { module: 'stock', name: 'Warehouse', help: "Track your stocks, schedule product moves, manage incoming and outgoing shipments, \u2026" }, { - module: 'hr', name: 'Human Resources', - help: "Manage employees and their contracts, follow laves, recruit people, \u2026" + module: 'mrp', name: 'Manufacturing', + help: "Manage your manufacturing, control your supply chain, personalize master data, \u2026" }, { - module: 'point_of_sale', name: 'Point of Sales', - help: "Manage shop sales, use touch-screen POS" + module: 'account_accountant', name: 'Accounting and Finance', + help: "Record financial operations, automate followup, manage multi-currency, \u2026" } ], [ { - module: 'profile_tools', name: 'Extra Tools', - help: "Track ideas, manage lunch, create surveys, share data" + module: 'project', name: 'Projects', + help: "Manage projects, track tasks, invoice task works, follow issues, \u2026" }, { - module: 'mrp', name: 'Manufacturing', - help: "Manage your manufacturing, control your supply chain, personalize master data, \u2026" + module: 'hr', name: 'Human Resources', + help: "Manage employees and their contracts, follow laves, recruit people, \u2026" }, { module: 'marketing', name: 'Marketing', help: "Manage campaigns, follow activities, automate emails, \u2026" @@ -420,18 +420,15 @@ openerp.web_dashboard.ApplicationTiles = openerp.web.View.extend({ // Check for installed application var Installer = new openerp.web.DataSet(this, 'base.setup.installer'); Installer.call('default_get', [], function (installed_modules) { - var installed = false; - _.each(installed_modules, function(v,k) { - if(_.startsWith(k,"cat")) { - installed =installed || v; - } - }); + var installed = _(installed_modules).any(function (active, name) { + return _.startsWith(name, 'cat') && active; }); + if(installed) { self.do_display_root_menu(); } else { self.do_display_installer(); } - } ); + }); }, do_display_root_menu: function() { var self = this; @@ -446,10 +443,8 @@ openerp.web_dashboard.ApplicationTiles = openerp.web.View.extend({ self.$element.append(tiles) .find('.oe-dashboard-home-tile') .click(function () { - var $this = $(this); - $this.closest('.openerp') - .find('.menu a[data-menu=' + $this.data('menuid') + ']') - .click();}); + openerp.webclient.menu.on_menu_click(null, $(this).data('menuid')) + }); }); return r; }, @@ -490,9 +485,8 @@ openerp.web_dashboard.ApplicationTiles = openerp.web.View.extend({ var self = this; new openerp.web.DataSet(this, 'res.config').call('start', [[]], function (action) { $.unblockUI(); - self.do_action(action, function () { - // TODO: less brutal reloading - window.location.reload(true); + self.widget_parent.widget_parent.do_action(action, function () { + openerp.webclient.do_reload(); }); }); } diff --git a/addons/web_dashboard/static/src/xml/web_dashboard.xml b/addons/web_dashboard/static/src/xml/web_dashboard.xml index fe96d72855d..87222baa5fd 100644 --- a/addons/web_dashboard/static/src/xml/web_dashboard.xml +++ b/addons/web_dashboard/static/src/xml/web_dashboard.xml @@ -30,9 +30,10 @@ </t> <t t-name="DashBoard.action"> <div t-att-data-id="action.attrs.name" class="oe-dashboard-action"> - <h2 class="oe-dashboard-action-header oe_view_title"> + <h2 t-attf-class="oe-dashboard-action-header oe_view_title #{action.attrs.string ? '' : 'oe-dashboard-action-header-empty'}"> <input class="oe-dashboard-action-input" type="text" name="title" value="" style="display: none"/> <t t-esc="action.attrs.string"/> + <t t-if="!action.attrs.string">&nbsp;</t> <span class='ui-icon ui-icon-closethick'></span> <span class='ui-icon ui-icon-minusthick oe-dashboard-fold' t-if="!action.attrs.fold"></span> <span class='ui-icon ui-icon-plusthick oe-dashboard-fold' t-if="action.attrs.fold"></span> |
