diff options
| author | Fabien Meghazi <fme@openerp.com> | 2011-12-22 10:52:48 +0100 |
|---|---|---|
| committer | Fabien Meghazi <fme@openerp.com> | 2011-12-22 10:52:48 +0100 |
| commit | 00344dace34e182cbf35a590fe6e0a28db396f81 (patch) | |
| tree | 0d9b698f78a2deb5a14678e7328d27db0ffe2c86 /addons/web_process/static/src | |
| parent | f442c6575917e97fdd3de31e9af360aeb854799c (diff) | |
| parent | 39beec93509b054222b2b9d8caa2cbbbac8dcaea (diff) | |
[MERGE] Merge with last trunk
bzr revid: fme@openerp.com-20111222095248-yt36zxntdyt5kce5
Diffstat (limited to 'addons/web_process/static/src')
| -rw-r--r-- | addons/web_process/static/src/css/process.css | 13 | ||||
| -rw-r--r-- | addons/web_process/static/src/js/process.js | 23 | ||||
| -rw-r--r-- | addons/web_process/static/src/xml/web_process.xml | 12 |
3 files changed, 30 insertions, 18 deletions
diff --git a/addons/web_process/static/src/css/process.css b/addons/web_process/static/src/css/process.css index 364c3788b11..728450fb921 100644 --- a/addons/web_process/static/src/css/process.css +++ b/addons/web_process/static/src/css/process.css @@ -50,6 +50,17 @@ a.cta-a strong { display: table-cell; } +.oe-process-view { + height: 20px; + margin-top:8px; + padding: 0; + width: 24px; + cursor: pointer; + display: block; + background: url(/web/static/src/img/iconset-a-help.png) no-repeat center center; + float: left; +} + .process-help-text { float: left; padding:5px 10px; @@ -59,4 +70,4 @@ a.cta-a strong { td.process_fields,button.toggle_fields span:last-child { display: none; -}
\ No newline at end of file +} diff --git a/addons/web_process/static/src/js/process.js b/addons/web_process/static/src/js/process.js index 52f6ab1a674..8d4396ba403 100644 --- a/addons/web_process/static/src/js/process.js +++ b/addons/web_process/static/src/js/process.js @@ -1,5 +1,6 @@ openerp.web_process = function (openerp) { - var QWeb = openerp.web.qweb; + var QWeb = openerp.web.qweb, + _t = openerp.web._t; openerp.web.ViewManager.include({ start: function() { this._super(); @@ -44,6 +45,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 +247,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; @@ -272,20 +275,17 @@ openerp.web_process = function (openerp) { var action_manager = new openerp.web.ActionManager(this); var dialog = new openerp.web.Dialog(this, { width: 800, - height: 600, - buttons : { - Cancel : function() { - $(this).dialog('destroy'); - }, - Save : function() { + buttons : [ + {text: _t("Cancel"), click: function() { $(this).dialog('destroy'); }}, + {text: _t("Save"), click: function() { var form_view = action_manager.inner_viewmanager.views.form.controller; form_view.do_save(function() { self.initialize_process_view(); }); $(this).dialog('destroy'); - } - } + }} + ] }).start().open(); action_manager.appendTo(dialog.$element); @@ -294,7 +294,6 @@ openerp.web_process = function (openerp) { res_id: self.process_id, views : [[false, 'form']], type : 'ir.actions.act_window', - auto_search : false, flags : { search_view: false, sidebar : false, diff --git a/addons/web_process/static/src/xml/web_process.xml b/addons/web_process/static/src/xml/web_process.xml index 63e207a4f96..5364157f1d2 100644 --- a/addons/web_process/static/src/xml/web_process.xml +++ b/addons/web_process/static/src/xml/web_process.xml @@ -1,7 +1,9 @@ <template> +<!-- vim:fdl=1: +--> <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 t-if="self.flags.display_title !== false" class="oe-process-view" title="Process View" href="javascript: void(0)"></a> </t> </t> <t t-name="ProcessView"> @@ -93,7 +95,7 @@ </option> </t> </select> - <button id="change_process">Select</button> + <button class="oe_button" id="change_process">Select</button> </fieldset> </td> </tr> @@ -104,8 +106,8 @@ </tr> <tr t-if="process_id"> <td> - <button id="edit_process">Edit Process</button> - <button class="toggle_fields"> + <button class="oe_button" id="edit_process">Edit Process</button> + <button class="oe_button toggle_fields"> <span>Show Fields</span> <span>Hide Fields</span> </button> @@ -140,4 +142,4 @@ </tr> </table> </t> -</template>
\ No newline at end of file +</template> |
