Lines 17-44
$(document).ready(function() {
Link Here
|
17 |
holdst.fnAddFilters("filter"); |
17 |
holdst.fnAddFilters("filter"); |
18 |
[%# add separateData function to cleanse jQuery select lists by breaking apart strings glued with BR tags and then de-duplicating any repeated library codes %] |
18 |
[%# add separateData function to cleanse jQuery select lists by breaking apart strings glued with BR tags and then de-duplicating any repeated library codes %] |
19 |
function separateData ( ColumnData ){ |
19 |
function separateData ( ColumnData ){ |
20 |
var cD = ColumnData; |
20 |
var cD = ColumnData; |
21 |
var new_array = new Array(); |
21 |
var new_array = new Array(); |
22 |
for ( j=0 ; j<cD.length ; j++ ) { |
22 |
for ( j=0 ; j<cD.length ; j++ ) { |
23 |
var strMatch = cD[j].match(/<br>/gi); |
23 |
var split_array = cD[j].split(/<br>/gi); |
24 |
if (strMatch) { |
24 |
for ( k=0 ; k<split_array.length ; k++ ){ |
25 |
var split_array = cD[j].split(/<br>/gi); |
25 |
var check_array = $.inArray(split_array[k], new_array); |
26 |
for ( k=0 ; k<split_array.length ; k++ ){ |
26 |
if (check_array == -1) { |
27 |
var check_array = $.inArray(split_array[k], new_array); |
27 |
new_array.push(split_array[k]); |
28 |
if (check_array == -1) { |
28 |
} |
29 |
new_array.push(split_array[k]); |
29 |
} |
30 |
} |
30 |
} |
31 |
} |
31 |
new_array.sort(); |
32 |
} |
32 |
return new_array; |
33 |
else { |
|
|
34 |
var check_array = $.inArray(cD[j], new_array); |
35 |
if (check_array == -1) { |
36 |
new_array.push(cD[j]); |
37 |
} |
38 |
} |
39 |
} |
40 |
new_array.sort(); |
41 |
return new_array; |
42 |
} |
33 |
} |
43 |
[%# add SeparateData function into createSelect function, so that it does the createSelect on clean data %] |
34 |
[%# add SeparateData function into createSelect function, so that it does the createSelect on clean data %] |
44 |
function createSelect( data ) { |
35 |
function createSelect( data ) { |
45 |
- |
|
|