function uncheckbox(form, field) {
var price = new Number(form.elements['price' + field].value);
var tmpprice = "";
- var errmsg = _("ERROR: Price is not a valid number, please check the price and try again!")
+ var errmsg = MSG_INVALIDPRICE;
if (isNaN(price)) {
alert(errmsg);
for(var i=0; i<form.elements['price' + field].value.length; ++i) {
//Closes a basketgroup
function closebasketgroup(bgid) {
- var answer=confirm(_("Are you sure you want to close this basketgroup?"));
+ var answer = confirm(MSG_CONFIRM_CLOSE_BASKETGROUP);
if(! answer){
return;
}
var ul = document.getElementById(ulid);
var lis = ul.getElementsByTagName('li');
if (lis.length == 0 ) {
- alert(_("Why close an empty basket?"));
+ alert(MSG_CLOSE_EMPTY_BASKET);
return;
}
var cantprint = document.createElement('p');
ddtarget.unreg();
div.removeChild(stufftoremove);
// the print button is disabled because the page's content might (or is probably) not in sync with what the database contains
- cantprint.innerHTML=_("You need to save the page before printing");
+ cantprint.innerHTML = MSG_SAVE_BEFORE_PRINTING;
cantprint.id = 'cantprint-' + bgid;
var unclosegroup = document.createElement('a');
unclosegroup.href='javascript:unclosegroup('+bgid+');';
- unclosegroup.innerHTML=_("reopen basketgroup");
+ unclosegroup.innerHTML= MSG_REOPEN_BASKETGROUP;
unclosegroup.id = 'unclose-' + bgid;
div.appendChild(cantprint);
if(document.location = '/cgi-bin/koha/acqui/basketgroup.pl?op=closeandprint&basketgroupid=' + bg ){
setTimeout("window.location.reload();",3000);
}else{
- alert(_("Error downloading the file"));
+ alert(MSG_FILE_DOWNLOAD_ERROR);
}
}
var result = eval ( xmlhttp.responseText );
if (result == '1') {
- return _("- Budget total exceeds parent allocation\n");
+ return MSG_BUDGET_PARENT_ALLOCATION;
} else if (result == '2') {
- return _("- Budget total exceeds period allocation\n");
+ return MSG_BUDGET_PARENT_ALLOCATION;
} else {
return false;
}
var result = eval ( xmlhttp.responseText );
if (result == '1') {
- return _("- New budget-parent is beneath budget\n");
+ return MSG_PARENT_BENEATH_BUDGET;
// } else if (result == '2') {
// return "- New budget-parent has insufficent funds\n";
// } else {
$("#selections span").removeClass("selected");
$("#plan td:nth-child(2),#plan th:nth-child(2)").nextUntil("th:nth-child("+(allCols-1)+"),td:nth-child("+(allCols-1)+")").hide(); // hide all but the last two columns
$("#hideall").attr("checked","checked").parent().addClass("selected");
-}
\ No newline at end of file
+}
//<![CDATA[
YAHOO.util.Event.onDOMReady(DDApp.init, DDApp, true);
+var MSG_CONFIRM_CLOSE_BASKETGROUP = _("Are you sure you want to close this basketgroup?");
+var MSG_CLOSE_EMPTY_BASKET = _("Why close an empty basket?");
+var MSG_SAVE_BEFORE_PRINTING = _("You need to save the page before printing");
+var MSG_REOPEN_BASKETGROUP = _("reopen basketgroup");
+var MSG_FILE_DOWNLOAD_ERROR = _("Error downloading the file");
+
function submitForm(form) {
if (form.close.checked == true) {
var input = document.createElement("input");