@@ -, +, @@ js/staff-global.js --- .../prog/en/modules/acqui/parcel.tt | 57 ++++++++----------- .../intranet-tmpl/prog/js/staff-global.js | 6 ++ 2 files changed, 31 insertions(+), 32 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt @@ -333,13 +333,6 @@ dt_overwrite_html_sorting_localeCompare(); var columns_filter = {}; - function _escape_str(s){ - return s != null ? s.escapeHtml() : ""; - } - function _escape_price(p){ - return p != null ? p.escapeHtml().format_price() : ""; - } - $(document).ready(function(){ if ( $("#receivedt").length ) { @@ -400,15 +393,15 @@ "searchable": true, "orderable": true, "render": function(data, type, row, meta) { - if (type != 'display') return _escape_str(data); - return "" + _escape_str(data) + " (" + _escape_str(row.basket.basket_id) + ")"; + if (type != 'display') return escape_str(data); + return "" + escape_str(data) + " (" + escape_str(row.basket.basket_id) + ")"; } }, { "data": "basket.basket_group.name", "orderable": true, "render": function(data, type, row, meta) { if ( type != 'display' ) { - return _escape_str(data); + return escape_str(data); } if ( row.basket.basket_group_id == null ) { return _("No basket group"); @@ -417,15 +410,15 @@ return "" - + _escape_str(row.basket.basket_group.name) + " (" + _escape_str(row.basket.basket_group_id) + ")"; + + escape_str(row.basket.basket_group.name) + " (" + escape_str(row.basket.basket_group_id) + ")"; } } }, { "data": "order_id", "render": function(data, type, row, meta) { - if (type != 'display') return _escape_str(data); - return ""+_escape_str(data)+""; + if (type != 'display') return escape_str(data); + return ""+escape_str(data)+""; } }, { @@ -435,22 +428,22 @@ "render": function(data, type, row, meta) { var result = ''; if ( row && row.biblio_id != null ) { - result = "
"+_escape_str(row.biblio.title)+""; + result = "
"+escape_str(row.biblio.title)+"";
if ( row.biblio.author != null )
- result += _(" by ") + _escape_str(row.biblio.author);
+ result += _(" by ") + escape_str(row.biblio.author);
if ( row.biblio.isbn != null )
- result += " – " + _escape_str(row.biblio.isbn);
+ result += " – " + escape_str(row.biblio.isbn);
[% IF Koha.Preference('marcflavour')=='UNIMARC' %]
if ( row.biblio.ean != null )
- result += " – EAN:" + _escape_str(row.biblio.ean);
+ result += " – EAN:" + escape_str(row.biblio.ean);
[% END %]
if ( row.biblio.publisher != null ) {
- result += "
" + _("Publisher: ") + _escape_str(row.biblio.publisher);
+ result += "
" + _("Publisher: ") + escape_str(row.biblio.publisher);
if ( row.biblio.publication_year != null ) {
- result += ", " + _escape_str(row.biblio.publication_year);
+ result += ", " + escape_str(row.biblio.publication_year);
}
else if ( row.biblio.copyright_date != null ) {
- result += _escape_str(row.biblio.copyright_date);
+ result += escape_str(row.biblio.copyright_date);
}
}
var suggestions = row.biblio.suggestions;
@@ -460,10 +453,10 @@
var suggester = suggestion.suggester;
var suggested_by = [];
if ( suggester.surname != null ) {
- suggested_by.push(_escape_str(suggester.surname));
+ suggested_by.push(escape_str(suggester.surname));
}
if ( suggester.firstname != null ) {
- suggested_by.push(_escape_str(suggester.firstname));
+ suggested_by.push(escape_str(suggester.firstname));
}
result += "
" + _("Suggested by: ") +
@@ -471,7 +464,7 @@
+ encodeURIComponent(suggestion.suggestionid)
+ '&op=show">'
+ suggested_by.join(", ")
- + " (#" + _escape_str(suggestions[0].suggestionid) + ")"; // FIXME: could be changed if we allow matching multiple suggestions
+ + " (#" + escape_str(suggestions[0].suggestionid) + ")"; // FIXME: could be changed if we allow matching multiple suggestions
}
}
result += '
' + _("Internal note: ") - + '' + _escape_str(internal_note) + + '' + escape_str(internal_note) + ' [' + _("Change internal note") + ']
'; @@ -496,7 +489,7 @@ if ( vendor_note != null && vendor_note != '' ) { result += '' + _("Vendor note: ") - + '' + _escape_str(vendor_note) + '
'; + + '' + escape_str(vendor_note) + ''; } else { result += ' [' + _("Receive") + '