1
<%inherit file="/openerp/controllers/templates/base_dispatch.mako"/>
4
<title>${_("Information")}</title>
5
<link href="/openerp/static/css/style.css" rel="stylesheet" type="text/css"/>
6
<script type="text/javascript">
7
function set_as_read(target) {
8
var req = openobject.http.postJSON('/openerp/progressbar/setread', {'model': "${model}", 'id': ${id}, "job_id": ${job_id}});
9
req.addCallback(function(obj) {
11
jQuery.fancybox(obj.error, {scrolling: 'no'});
16
function open_progress_target(target) {
18
window.openAction(target);
20
window.editRecord(${id});
22
jQuery.fancybox.close();
25
get_progress = function () {
26
var req = openobject.http.postJSON('/openerp/progressbar/get', {'model': "${model}", 'id': ${id}, "job_id": ${job_id}});
27
req.addCallback(function(obj) {
29
jQuery.fancybox(obj.error, {scrolling: 'no'});
32
$('#indicator').width((obj.progress*250)/100+'px');
33
$('#percentage').html(obj.progress+'%');
34
if (obj.state == 'error') {
36
$('#boxtitle').html(_("Last Processing Error"));
37
$('#open_src').click(open_progress_target);
38
$('#open_src').show();
39
$('#pwidget').css('overflow', 'scroll');
40
$('#pwidget').css('white-space', 'pre');
41
$('#pwidget').html(obj.errormsg);
42
} else if (obj.state != 'done') {
43
setTimeout(get_progress, 1000);
47
$('#boxtitle').html(obj.job_name + " " + _("Done"));
49
$('#boxtitle').html(_("Done"));
52
$('#open_src').html(_('View ')+obj.src_name)
54
$('#open_src').click(function() {open_progress_target()});
56
if (obj.target_name) {
57
$('#open_target').html(_('View ')+obj.target_name);
59
$('#open_target').show();
60
$('#open_target').click(function() {open_progress_target(obj.target)});
62
$('#open_src').show();
69
jQuery(document).ready(function () {
78
background-color:white;
79
border:1px solid black;
82
vertical-align: middle;
89
background-color:lightgray;
95
-moz-border-radius:3px;
98
border:1px solid gray;
103
background-image: linear-gradient(white, green);
114
<%def name="content()">
115
<table class="view" cellspacing="5" border="0" height="200px" width="400px">
118
<h1 id="boxtitle">${_("In Progress")}</h1>
124
<div id="progressbar">
125
<span id="percentage"></span>
126
<div id="indicator" style="width: 25px"></div>
133
<button id="open_src" style="display:none">View Object</button>
134
<button id="open_target" style="display:none">View Target</button>