From 680c14a6b02a77879683daad975d925ca2958780 Mon Sep 17 00:00:00 2001 From: David Cook Date: Tue, 11 Sep 2012 07:18:54 +1000 Subject: [PATCH] [SIGNED-OFF] Bug 8508 - Holds to Pull : Library dropdown options are erroneously concatenated by br tags Content-Type: text/plain; charset="utf-8" This patch introduces a new javascript function that breaks apart option strings that are erroneously concatenated by br tags. The split strings are then checked against non-concatenated option strings, and pushed into the option array if there is no duplication. This function is nestled into the JQuery datatable function for populating the drop-down menu. Signed-off-by: Owen Leonard --- .../prog/en/modules/circ/pendingreserves.tt | 27 ++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt index 458316c..d6d6c0a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt @@ -12,7 +12,34 @@ $(document).ready(function() { var holdst = $("#holdst").dataTable($.extend(true, {}, dataTablesDefaults, { })); holdst.fnAddFilters("filter"); + [%# add separateData function to cleanse jQuery select lists by breaking apart strings glued with BR tags and then de-duplicating any repeated library codes %] + function separateData ( ColumnData ){ + var cD = ColumnData; + var new_array = new Array(); + for ( j=0 ; j/gi); + if (strMatch) { + var split_array = cD[j].split(/
/gi); + for ( k=0 ; k'+data[i]+''; -- 1.7.9.5