[FIX] selection of current document's state in process view
authorXavier Morel <xmo@openerp.com>
Tue, 31 Jan 2012 10:52:12 +0000 (11:52 +0100)
committerXavier Morel <xmo@openerp.com>
Tue, 31 Jan 2012 10:52:12 +0000 (11:52 +0100)
bzr revid: xmo@openerp.com-20120131105212-bnu4150hai88rwm6

1  2 
addons/web_process/static/src/js/process.js

@@@ -28,6 -28,11 +28,11 @@@ openerp.web_process = function (openerp
          },
          initialize_process_view: function() {
              var self = this;
+             this.record_id = false;
+             if(this.active_view  == 'page' || this.active_view == 'form') {
+                 this.record_id = this.views[this.active_view].controller.datarecord.id;
+             }
 -            
++
              $.when(this.help(), this.get_process_object()).pipe(function(help, process) {
                  self.process_help = help;
                  if(process && process.length) {
                  //Image part
                  bg = n.node.kind == "subflow" ? "node-subflow" : "node";
                  bg = n.node.gray ? bg + "-gray" : bg;
+                 bg = n.node.active ? 'node-current': bg;
 -                
++
                  img_src = '/web_process/static/src/img/'+ bg + '.png';
  
                  r['image'](img_src, n.node.x, n.node.y,150, 100)
                          to += from;
                      }
                  }
 -                
++
+                 if(n.node.res)
+                     new_notes = n.node.res.name + '\n' + new_notes;
 -                
++
                  process_node_desc = r.text(n.node.x+85, n.node.y+50, (new_notes));
                  r['image']('/web/static/src/img/icons/gtk-info.png', n.node.x+20, n.node.y+70, 16, 16)
                      .attr({"cursor": "pointer", "title": "Help"})