Raphael Collet (OpenERP) has proposed merging
lp:~openerp-dev/openerp-web/trunk-review-dashboards into lp:openerp-web.
Requested reviews:
OpenERP R&D Web Team (openerp-dev-web)
For more details, see:
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-review-dashboards/+merge/111355
--
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-review-dashboards/+merge/111355
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openerp-web/trunk-review-dashboards.
=== added file 'addons/web_dashboard/static/src/img/view_todo_arrow.png'
Binary files addons/web_dashboard/static/src/img/view_todo_arrow.png 1970-01-01 00:00:00 +0000 and addons/web_dashboard/static/src/img/view_todo_arrow.png 2012-06-21 08:26:27 +0000 differ
=== modified file 'addons/web_dashboard/static/src/js/dashboard.js'
--- addons/web_dashboard/static/src/js/dashboard.js 2012-04-26 15:28:00 +0000
+++ addons/web_dashboard/static/src/js/dashboard.js 2012-06-21 08:26:27 +0000
@@ -231,6 +231,14 @@
}
},
renderElement: function() {
+ var self = this;
+ var check = _.detect(this.node.children, function(column, column_index) {
+ return _.detect(column.children,function(element){
+ return element.tag === "action"? element: false;
+ });
+ });
+ if (!check)
+ return self.no_result();
// We should start with three columns available
for (var i = this.node.children.length; i < 3; i++) {
this.node.children.push({
@@ -242,6 +250,15 @@
var rendered = QWeb.render(this.form_template, this);
this.$element.html(rendered);
},
+ no_result: function () {
+ if (this.view.options.action.help){
+ this.$element.append(
+ $('<div class="oe_view_nocontent">')
+ .append($('<img>', { src: '/web_dashboard/static/src/img/view_todo_arrow.png' }))
+ .append($('<div>').html(this.view.options.action.help || " "))
+ );
+ }
+ },
do_reload: function() {
var view_manager = this.view.getParent(),
action_manager = view_manager.getParent();
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp