Lines 4-10
Link Here
|
4 |
function uncheckbox(form, field) { |
4 |
function uncheckbox(form, field) { |
5 |
var price = new Number(form.elements['price' + field].value); |
5 |
var price = new Number(form.elements['price' + field].value); |
6 |
var tmpprice = ""; |
6 |
var tmpprice = ""; |
7 |
var errmsg = _("ERROR: Price is not a valid number, please check the price and try again!") |
7 |
var errmsg = MSG_INVALIDPRICE; |
8 |
if (isNaN(price)) { |
8 |
if (isNaN(price)) { |
9 |
alert(errmsg); |
9 |
alert(errmsg); |
10 |
for(var i=0; i<form.elements['price' + field].value.length; ++i) { |
10 |
for(var i=0; i<form.elements['price' + field].value.length; ++i) { |
Lines 335-341
function enterpressed(event){
Link Here
|
335 |
|
335 |
|
336 |
//Closes a basketgroup |
336 |
//Closes a basketgroup |
337 |
function closebasketgroup(bgid) { |
337 |
function closebasketgroup(bgid) { |
338 |
var answer=confirm(_("Are you sure you want to close this basketgroup?")); |
338 |
var answer = confirm(MSG_CONFIRM_CLOSE_BASKETGROUP); |
339 |
if(! answer){ |
339 |
if(! answer){ |
340 |
return; |
340 |
return; |
341 |
} |
341 |
} |
Lines 353-359
function closebasketgroup(bgid) {
Link Here
|
353 |
var ul = document.getElementById(ulid); |
353 |
var ul = document.getElementById(ulid); |
354 |
var lis = ul.getElementsByTagName('li'); |
354 |
var lis = ul.getElementsByTagName('li'); |
355 |
if (lis.length == 0 ) { |
355 |
if (lis.length == 0 ) { |
356 |
alert(_("Why close an empty basket?")); |
356 |
alert(MSG_CLOSE_EMPTY_BASKET); |
357 |
return; |
357 |
return; |
358 |
} |
358 |
} |
359 |
var cantprint = document.createElement('p'); |
359 |
var cantprint = document.createElement('p'); |
Lines 369-379
function closebasketgroup(bgid) {
Link Here
|
369 |
ddtarget.unreg(); |
369 |
ddtarget.unreg(); |
370 |
div.removeChild(stufftoremove); |
370 |
div.removeChild(stufftoremove); |
371 |
// the print button is disabled because the page's content might (or is probably) not in sync with what the database contains |
371 |
// the print button is disabled because the page's content might (or is probably) not in sync with what the database contains |
372 |
cantprint.innerHTML=_("You need to save the page before printing"); |
372 |
cantprint.innerHTML = MSG_SAVE_BEFORE_PRINTING; |
373 |
cantprint.id = 'cantprint-' + bgid; |
373 |
cantprint.id = 'cantprint-' + bgid; |
374 |
var unclosegroup = document.createElement('a'); |
374 |
var unclosegroup = document.createElement('a'); |
375 |
unclosegroup.href='javascript:unclosegroup('+bgid+');'; |
375 |
unclosegroup.href='javascript:unclosegroup('+bgid+');'; |
376 |
unclosegroup.innerHTML=_("reopen basketgroup"); |
376 |
unclosegroup.innerHTML= MSG_REOPEN_BASKETGROUP; |
377 |
unclosegroup.id = 'unclose-' + bgid; |
377 |
unclosegroup.id = 'unclose-' + bgid; |
378 |
|
378 |
|
379 |
div.appendChild(cantprint); |
379 |
div.appendChild(cantprint); |
Lines 384-390
function closeandprint(bg){
Link Here
|
384 |
if(document.location = '/cgi-bin/koha/acqui/basketgroup.pl?op=closeandprint&basketgroupid=' + bg ){ |
384 |
if(document.location = '/cgi-bin/koha/acqui/basketgroup.pl?op=closeandprint&basketgroupid=' + bg ){ |
385 |
setTimeout("window.location.reload();",3000); |
385 |
setTimeout("window.location.reload();",3000); |
386 |
}else{ |
386 |
}else{ |
387 |
alert(_("Error downloading the file")); |
387 |
alert(MSG_FILE_DOWNLOAD_ERROR); |
388 |
} |
388 |
} |
389 |
} |
389 |
} |
390 |
|
390 |
|
Lines 820-828
if ( newBudgetParent ) { url += '&parent_id=' + newBudgetParent};
Link Here
|
820 |
var result = eval ( xmlhttp.responseText ); |
820 |
var result = eval ( xmlhttp.responseText ); |
821 |
|
821 |
|
822 |
if (result == '1') { |
822 |
if (result == '1') { |
823 |
return _("- Budget total exceeds parent allocation\n"); |
823 |
return MSG_BUDGET_PARENT_ALLOCATION; |
824 |
} else if (result == '2') { |
824 |
} else if (result == '2') { |
825 |
return _("- Budget total exceeds period allocation\n"); |
825 |
return MSG_BUDGET_PARENT_ALLOCATION; |
826 |
} else { |
826 |
} else { |
827 |
return false; |
827 |
return false; |
828 |
} |
828 |
} |
Lines 854-860
function checkBudgetParent(budgetId, newBudgetParent) {
Link Here
|
854 |
var result = eval ( xmlhttp.responseText ); |
854 |
var result = eval ( xmlhttp.responseText ); |
855 |
|
855 |
|
856 |
if (result == '1') { |
856 |
if (result == '1') { |
857 |
return _("- New budget-parent is beneath budget\n"); |
857 |
return MSG_PARENT_BENEATH_BUDGET; |
858 |
// } else if (result == '2') { |
858 |
// } else if (result == '2') { |
859 |
// return "- New budget-parent has insufficent funds\n"; |
859 |
// return "- New budget-parent has insufficent funds\n"; |
860 |
// } else { |
860 |
// } else { |
Lines 891-894
function hideAllColumns(){
Link Here
|
891 |
$("#selections span").removeClass("selected"); |
891 |
$("#selections span").removeClass("selected"); |
892 |
$("#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 |
892 |
$("#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 |
893 |
$("#hideall").attr("checked","checked").parent().addClass("selected"); |
893 |
$("#hideall").attr("checked","checked").parent().addClass("selected"); |
894 |
} |
894 |
} |