[Koha-patches] [PATCH] Fix for Bug 5991 - Javascript error on purchase suggestion pages
Owen Leonard
oleonard at myacpl.org
Tue Mar 29 20:43:40 CEST 2011
---
koha-tmpl/intranet-tmpl/prog/en/js/acq.js | 2 +-
.../prog/en/modules/suggestion/suggestion.tmpl | 11 ++++++++---
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/acq.js b/koha-tmpl/intranet-tmpl/prog/en/js/acq.js
index b5ec994..de9e92c 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/js/acq.js
+++ b/koha-tmpl/intranet-tmpl/prog/en/js/acq.js
@@ -695,7 +695,7 @@ function calcNewsuggTotal(){
var total = new Number(quantity*price*exchangerate);
document.getElementById('total').value = total.toFixed(2);
- document.getElementById('price').value = listprice.toFixed(2);
+ document.getElementById('price').value = price.toFixed(2);
return true;
}
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tmpl
index a941da7..617644a 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tmpl
@@ -4,7 +4,7 @@
<!-- TMPL_INCLUDE NAME="calendar.inc" -->
<!--TMPL_IF Name="op_else"--> <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
-<script type="text/JavaScript">
+<script type="text/javascript">
// <![CDATA[
function yuiToolbar() {
@@ -79,11 +79,16 @@ $(document).ready(function() {
<style type="text/css">
h4.collapse a { font-size : 80%; text-decoration: none; } fieldset.brief ol { display : none; }
.overlay { top: 180px; left: 50%; position: absolute; margin-left: -100px; width: 200px; text-align: center; display: none; margin-top: -10px; background: #eeffd4; padding: .5em; color: #000; }
-</style>
+</style><!-- TMPL_ELSE -->
+<script type="text/javascript">
+// <![CDATA[
+$(document).ready(function() { calcNewsuggTotal(); });
+// ]]>
+</script>
<!--/TMPL_IF-->
<script type="text/javascript" src="<!-- TMPL_VAR NAME='themelang' -->/js/acq.js"></script>
</head>
-<body onload="calcNewsuggTotal();">
+<body>
<!-- TMPL_INCLUDE name="header.inc" -->
<!-- TMPL_INCLUDE NAME="cat-search.inc" -->
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> › <!-- TMPL_IF name="op_save" --> <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> › <!-- TMPL_IF name="suggestionid" -->Suggestion edit #<!-- TMPL_VAR name="suggestionid" --><!--TMPL_ELSE-->New purchase suggestion<!-- /TMPL_IF --><!--TMPL_ELSE-->Suggestions Management<!-- /TMPL_IF --> </div>
--
1.7.3
More information about the Koha-patches
mailing list