summaryrefslogtreecommitdiff
path: root/addons/web_dashboard/static/src
diff options
context:
space:
mode:
authorniv-openerp <nicolas.vanhoren@openerp.com>2012-02-17 11:17:31 +0100
committerniv-openerp <nicolas.vanhoren@openerp.com>2012-02-17 11:17:31 +0100
commit1e9380b8faf05aa5ccb7fdfaf7309c362b1963bb (patch)
treee49a42e01b00a5e95522a93c720762d487b17fd8 /addons/web_dashboard/static/src
parentaffc2d4d04539d452ee207eef2c01238df72d1ef (diff)
parent9f65e1565e785fd1c11fef65e7b49e78fba290ed (diff)
[merge]
bzr revid: nicolas.vanhoren@openerp.com-20120217101731-3g9hrhs65qb32pkv
Diffstat (limited to 'addons/web_dashboard/static/src')
-rw-r--r--addons/web_dashboard/static/src/js/dashboard.js25
-rw-r--r--addons/web_dashboard/static/src/xml/web_dashboard.xml4
2 files changed, 14 insertions, 15 deletions
diff --git a/addons/web_dashboard/static/src/js/dashboard.js b/addons/web_dashboard/static/src/js/dashboard.js
index b5649e3e954..4972d32c584 100644
--- a/addons/web_dashboard/static/src/js/dashboard.js
+++ b/addons/web_dashboard/static/src/js/dashboard.js
@@ -321,7 +321,10 @@ openerp.web_dashboard.ConfigOverview = openerp.web.View.extend({
.value();
this.$element.html(QWeb.render('ConfigOverview.content', {
completion: 100 * progress.done / progress.total,
- groups: grouped_todos
+ groups: grouped_todos,
+ task_title: _t("Execute task \"%s\""),
+ checkbox_title: _t("Mark this task as done"),
+ _: _
}));
var $progress = this.$element.find('div.oe-config-progress-bar');
$progress.progressbar({value: $progress.data('completion')});
@@ -420,18 +423,14 @@ openerp.web_dashboard.ApplicationTiles = openerp.web.OldWidget.extend({
},
on_installed_database: function() {
var self = this;
- var ds = new openerp.web.DataSetSearch(this, 'ir.ui.menu', null, [['parent_id', '=', false]]);
- var r = ds.read_slice( ['name', 'web_icon_data', 'web_icon_hover_data', 'module']).then(function (applications) {
- //// Create a matrix of 3*x applications
- //var rows = [];
- //while (applications.length) {
- // rows.push(applications.splice(0, 3));
- //}
- //var tiles = QWeb.render('ApplicationTiles.content', {rows: rows});
- var tiles = QWeb.render('ApplicationTiles.content', {applications: applications});
- $(tiles).appendTo(self.$element).find('.oe_install-module-link').click(function () {
- openerp.webclient.menu.on_menu_click(null, $(this).data('menu'))
- });
+ self.rpc('/web/menu/get_user_roots', {}).then(function (menu_ids) {
+ var menuds = new openerp.web.DataSet(this, 'ir.ui.menu',{})
+ .read_ids(menu_ids, ['name', 'web_icon_data', 'web_icon_hover_data', 'module']).then(function (applications) {
+ var tiles = QWeb.render('ApplicationTiles.content', {applications: applications});
+ $(tiles).appendTo(self.$element).find('.oe_install-module-link').click(function () {
+ openerp.webclient.menu.on_menu_click(null, $(this).data('menu'))
+ });
+ });
});
}
});
diff --git a/addons/web_dashboard/static/src/xml/web_dashboard.xml b/addons/web_dashboard/static/src/xml/web_dashboard.xml
index 4db96d5ebbe..9a9c0486400 100644
--- a/addons/web_dashboard/static/src/xml/web_dashboard.xml
+++ b/addons/web_dashboard/static/src/xml/web_dashboard.xml
@@ -72,10 +72,10 @@
<li t-foreach="category_value" t-as="todo"
t-att-class="todo.done ? 'oe-done' : undefined"
t-att-data-id="todo.id"
- t-att-title="!todo.done ? 'Execute task \'' + todo.name + '\'' : undefined">
+ t-att-title="!todo.done ? _.str.sprintf(task_title, todo.name) : undefined">
<span style="text-decoration: underline;"><t t-esc="todo.name"/></span>
<input type="checkbox" t-att-value="todo.id"
- t-att-title="!todo.done ? 'Mark this task as done' : undefined"
+ t-att-title="!todo.done ? checkbox_title : undefined"
t-att-checked="todo.done ? 'checked' : undefined"/>
</li>
</ul></dd>