[imp] improvements to the process view

bzr revid: nicolas.vanhoren@openerp.com-20111124113816-v3l0ji146ex9s83p
This commit is contained in:
niv-openerp 2011-11-24 17:08:16 +05:30
commit c9d3b801f2
4 changed files with 16 additions and 4 deletions

View File

@ -9,7 +9,7 @@
"static/src/css/process.css"
],
'qweb': [
"static/src/xml/web_process.css"
"static/src/xml/*.xml"
],
'active': True
}

View File

@ -50,6 +50,16 @@ a.cta-a strong {
display: table-cell;
}
.oe-process-view {
height: 20px;
padding: 0;
width: 24px;
cursor: pointer;
display: block;
background: url(/web/static/src/img/icons/gtk-help.png) no-repeat bottom;
float: left;
}
.process-help-text {
float: left;
padding:5px 10px;

View File

@ -44,6 +44,7 @@ openerp.web_process = function (openerp) {
if(self.process_id) {
self.graph_get().done(function(res) {
self.process_notes = res.notes;
self.process_title = res.name;
self.process_subflows = _.filter(res.nodes, function(x) {
return x.subflow != false;
});
@ -245,9 +246,10 @@ openerp.web_process = function (openerp) {
transitions['active'] = src.active && !dst.gray;
process_graph.addEdge(src['name'], dst['name'], {directed : true});
});
var width = $(document).width();
var height = $(document).height();
var layouter = new Graph.Layout.Ordered(process_graph);
var render_process_graph = new Graph.Renderer.Raphael('process_canvas', process_graph, $('#process_canvas').width(), $('#process_canvas').height());
var render_process_graph = new Graph.Renderer.Raphael('process_canvas', process_graph, width, height);
},
jump_to_view: function(model, id) {
var self = this;

View File

@ -1,7 +1,7 @@
<template>
<t t-extend="ViewManager" t-name="ViewManagerAction">
<t t-jquery=".oe-view-manager-header" t-operation="append">
<img class="oe-process-view" src="/web/static/src/img/icons/gtk-help.png" title="ProcessView"/>
<a class="oe-process-view" title="Process View" href="javascript: void(0)"></a>
</t>
</t>
<t t-name="ProcessView">