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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt (-21 / +12 lines)
Lines 468-473 Link Here
468
            return query_params;
468
            return query_params;
469
        }
469
        }
470
470
471
        function _escape_str(s){
472
            return s != null ? s.escapeHtml() : "";
473
        }
474
        function _escape_price(p){
475
            return p != null ? p.escapeHtml().format_price() : "";
476
        }
477
471
        $(document).ready(function(){
478
        $(document).ready(function(){
472
479
473
            if ( $("#receivedt").length ) {
480
            if ( $("#receivedt").length ) {
Lines 536-565 Link Here
536
                "columnDefs": [ {
543
                "columnDefs": [ {
537
                    "targets": [3,4,5,9],
544
                    "targets": [3,4,5,9],
538
                    "render": function (data, type, row, meta) {
545
                    "render": function (data, type, row, meta) {
539
                        if ( data != null ) {
546
                        return _escape_str(data);
540
                            return data.escapeHtml();
541
                        }
542
                        else {
543
                            return "";
544
                        }
545
                    }
547
                    }
546
                },
548
                },
547
                {
549
                {
548
                    "targets": [8,10],
550
                    "targets": [8,10],
549
                    "render": function (data, type, row, meta) {
551
                    "render": function (data, type, row, meta) {
550
                        if ( data != null ) {
552
                        return _escape_price(data);
551
                            return data.escapeHtml().format_price();
552
                        }
553
                        else {
554
                            return "";
555
                        }
556
                    }
553
                    }
557
                } ],
554
                } ],
558
                "columns": [
555
                "columns": [
559
                    { "data": "basket.name",
556
                    { "data": "basket.name",
560
                      "orderable": true,
557
                      "orderable": true,
561
                      "render": function(data, type, row, meta) {
558
                      "render": function(data, type, row, meta) {
562
                        if (type != 'display') return data;
559
                        if (type != 'display') return _escape_str(data);
563
                        return "<a href=\"/cgi-bin/koha/acqui/basket.pl?basketno=" + encodeURIComponent(row.basket.basket_id) + "\">" + data.escapeHtml() + " (" + row.basket.basket_id.escapeHtml() + ")</a>";
560
                        return "<a href=\"/cgi-bin/koha/acqui/basket.pl?basketno=" + encodeURIComponent(row.basket.basket_id) + "\">" + data.escapeHtml() + " (" + row.basket.basket_id.escapeHtml() + ")</a>";
564
                      }
561
                      }
565
                    },
562
                    },
Lines 567-578 Link Here
567
                      "orderable": true,
564
                      "orderable": true,
568
                      "render": function(data, type, row, meta) {
565
                      "render": function(data, type, row, meta) {
569
                        if ( type != 'display' ) {
566
                        if ( type != 'display' ) {
570
                            if ( data == null ) {
567
                            return _escape_str(data);
571
                                return "";
572
                            }
573
                            else {
574
                                return data;
575
                            }
576
                        }
568
                        }
577
                        if ( row.basket.basket_group_id == null ) {
569
                        if ( row.basket.basket_group_id == null ) {
578
                            return _("No basket group");
570
                            return _("No basket group");
Lines 588-594 Link Here
588
                    {
580
                    {
589
                        "data": "order_id",
581
                        "data": "order_id",
590
                        "render": function(data, type, row, meta) {
582
                        "render": function(data, type, row, meta) {
591
                            if (type != 'display') return data;
583
                            if (type != 'display') return _escape_str(data);
592
                            return "<a href=\"neworderempty.pl?ordernumber="+encodeURIComponent(data)+"&amp;booksellerid="+encodeURIComponent(row.basket.vendor_id)+"\">"+data.escapeHtml()+"</a>";
584
                            return "<a href=\"neworderempty.pl?ordernumber="+encodeURIComponent(data)+"&amp;booksellerid="+encodeURIComponent(row.basket.vendor_id)+"\">"+data.escapeHtml()+"</a>";
593
                        }
585
                        }
594
                    },
586
                    },
595
- 

Return to bug 20212