View | Details | Raw Unified | Return to bug 7598
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/js/acq.js (-10 / +10 lines)
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&amp;basketgroupid=' + bg ){
384
	if(document.location = '/cgi-bin/koha/acqui/basketgroup.pl?op=closeandprint&amp;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
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt (+6 lines)
Lines 95-100 fieldset.various li { Link Here
95
//<![CDATA[
95
//<![CDATA[
96
	YAHOO.util.Event.onDOMReady(DDApp.init, DDApp, true);
96
	YAHOO.util.Event.onDOMReady(DDApp.init, DDApp, true);
97
97
98
var MSG_CONFIRM_CLOSE_BASKETGROUP = _("Are you sure you want to close this basketgroup?");
99
var MSG_CLOSE_EMPTY_BASKET = _("Why close an empty basket?");
100
var MSG_SAVE_BEFORE_PRINTING = _("You need to save the page before printing");
101
var MSG_REOPEN_BASKETGROUP = _("reopen basketgroup");
102
var MSG_FILE_DOWNLOAD_ERROR = _("Error downloading the file");
103
98
function submitForm(form) {
104
function submitForm(form) {
99
    if (form.close.checked == true) {
105
    if (form.close.checked == true) {
100
	var input = document.createElement("input");
106
	var input = document.createElement("input");
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tt (+1 lines)
Lines 15-20 Link Here
15
        "sPaginationType": "four_button"
15
        "sPaginationType": "four_button"
16
    } ) );
16
    } ) );
17
 });
17
 });
18
var MSG_INVALIDPRICE = _("ERROR: Price is not a valid number, please check the price and try again!");
18
 //]]>
19
 //]]>
19
</script>
20
</script>
20
<script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
21
<script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt (-1 / +7 lines)
Lines 1-6 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Administration &rsaquo; Funds[% IF ( add_form ) %] &rsaquo; [% IF ( budget_id ) %]Modify fund[% IF ( budget_name ) %] '[% budget_name %]'[% END %][% ELSE %]Add fund [% END %][% END %]</title>
2
<title>Koha &rsaquo; Administration &rsaquo; Funds[% IF ( add_form ) %] &rsaquo; [% IF ( budget_id ) %]Modify fund[% IF ( budget_name ) %] '[% budget_name %]'[% END %][% ELSE %]Add fund [% END %][% END %]</title>
3
[% INCLUDE 'doc-head-close.inc' %]
3
[% INCLUDE 'doc-head-close.inc' %]
4
<script type="text/javascript">
5
//<![CDATA[
6
var MSG_BUDGET_PARENT_ALLOCATION = _("- Fund amount exceeds parent allocation\n");
7
var MSG_PARENT_BENEATH_BUDGET = _("- New budget-parent is beneath budget\n");
8
//]]>
9
</script>
10
4
<script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
11
<script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
5
12
6
[% IF ( add_form ) %]
13
[% IF ( add_form ) %]
7
- 

Return to bug 7598