Corrections to manage marc import interface, including fix for inaccurate progress bar.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This commit is contained in:
Henri-Damien LAURENT 2008-10-28 23:29:37 +01:00
parent 6c168bf22b
commit bb3d3afe6e
3 changed files with 16 additions and 10 deletions

View File

@ -15,7 +15,9 @@
if (json.job_status == 'completed') {
percentage = 100;
}
$("#jobprogress").text(percentage);
var bgproperty = (parseInt(percentage)*2-300)+"px 0px";
$("#jobprogress").css("background-position",bgproperty);
$("#jobprogresspercent").text(percentage);
if (percentage == 100) {
clearInterval(backgroundJobProgressTimer); // just in case form submission fails
completeJob();

View File

@ -14,7 +14,9 @@
inFileUploadProgressTimer = true;
$.getJSON("/cgi-bin/koha/tools/upload-file-progress.pl", function(json) {
if (!fileUploadProgressTimerCanceled) {
$("#fileuploadprogress").text(json.progress);
var bgproperty = (parseInt(json.progress)*2-300)+"px 0px";
$("#fileuploadprogress").css("background-position",bgproperty);
$("#fileuploadpercent").text(json.progress);
}
inFileUploadProgressTimer = false;
});

View File

@ -10,7 +10,7 @@
<style type="text/css">
#jobpanel,#jobstatus,#jobfailed { display : none; }
#jobstatus { margin:.4em; }
#jobprogress{ width:150px;height:10px;border:1px solid #666;background:url('/intranet-tmpl/prog/img/progress.png') -300px 0px no-repeat; }</style>
#jobprogress{ width:200px;height:10px;border:1px solid #666;background:url('/intranet-tmpl/prog/img/progress.png') -300px 0px no-repeat; }</style>
</head>
<body>
<!-- TMPL_INCLUDE NAME="header.inc" -->
@ -38,7 +38,7 @@
<!-- /TMPL_IF -->
</h1>
<!-- TMPL_IF name="label_batch" -->
<div class="alert">
<div class="dialog message">
<p>Label batch created, with id: <!-- TMPL_VAR name="label_batch" --> </p>
</div>
<!-- /TMPL_IF -->
@ -69,6 +69,7 @@
<li><span class="label">Item processing</span> <!-- TMPL_VAR NAME="item_action" --></li>
</ol>
</fieldset>
<!-- TMPL_IF name="can_commit" -->
<div id="matchingrules">
<form action="<!-- TMPL_VAR name="script_name" -->" method="post">
@ -171,7 +172,7 @@
</table>
<!-- /TMPL_IF -->
<!-- /TMPL_IF -->
<br />
<br style="clear:both;" />
<!-- TMPL_IF name="batch_list" -->
<!-- TMPL_IF name="pages" -->
@ -198,13 +199,13 @@ Page
</tr>
<!-- TMPL_LOOP name="batch_list" -->
<tr>
<td><a href="<!-- TMPL_VAR name="script_name" -->?import_batch_id=<!-- TMPL_VAR name="import_batch_id" -->"><!-- TMPL_VAR name="import_batch_id" --></a></td>
<td><!-- TMPL_VAR name="file_name" --></td>
<td><!-- TMPL_VAR name="import_batch_id" --></td>
<td><a href="<!-- TMPL_VAR name="script_name" -->?import_batch_id=<!-- TMPL_VAR name="import_batch_id" -->"><!-- TMPL_VAR name="file_name" --></a></td>
<td><!-- TMPL_VAR name="comments" --></td>
<td><!-- TMPL_VAR name="import_status" --></td>
<td><!-- TMPL_VAR name="upload_timestamp" --></td>
<td><!-- TMPL_VAR name="num_biblios" --></td>
<td><!-- TMPL_VAR name="num_items" --><!-- TMPL_IF NAME="num_items" --><a href="<!-- TMPL_VAR name="script_name" -->?import_batch_id=<!-- TMPL_VAR name="import_batch_id" -->&op=create_labels">(Create Label Batch)</a><!-- /TMPL_IF --></td>
<td><!-- TMPL_VAR name="num_items" --><!-- TMPL_IF NAME="num_items" --> <a href="<!-- TMPL_VAR name="script_name" -->?import_batch_id=<!-- TMPL_VAR name="import_batch_id" -->&amp;op=create_labels">(Create Label Batch)</a><!-- /TMPL_IF --></td>
</tr>
<!-- /TMPL_LOOP -->
</table>
@ -271,8 +272,9 @@ Page
<!-- /TMPL_IF -->
<!-- TMPL_ELSE -->
<!-- TMPL_IF name="batch_info" -->
<div class="dialog alert">There are no records in this batch to import.</div>
<a href="/cgi-bin/koha/tools/manage-marc-import.pl">Manage staged MARC records</a>.
<div class="dialog alert">There are no records in this batch to import.
<a href="/cgi-bin/koha/tools/manage-marc-import.pl">Manage staged MARC records</a>.</div>
<!-- /TMPL_IF -->
<!-- /TMPL_IF -->