|
Lines 36-41
Link Here
|
| 36 |
$(this).parents('tr').remove(); |
36 |
$(this).parents('tr').remove(); |
| 37 |
var line = $(this).closest("tr"); |
37 |
var line = $(this).closest("tr"); |
| 38 |
|
38 |
|
|
|
39 |
var name; |
| 39 |
// We clicked delete button on search fields tab. |
40 |
// We clicked delete button on search fields tab. |
| 40 |
if (name = $(line).find('input[name="search_field_name"]').val()) { |
41 |
if (name = $(line).find('input[name="search_field_name"]').val()) { |
| 41 |
// Prevent user from using a search field for a mapping |
42 |
// Prevent user from using a search field for a mapping |
|
Lines 54-62
Link Here
|
| 54 |
} |
55 |
} |
| 55 |
}); |
56 |
}); |
| 56 |
|
57 |
|
| 57 |
$("table.mappings").tableDnD( { |
|
|
| 58 |
onDragClass: "dragClass", |
| 59 |
} ); |
| 60 |
$('.add').click(function() { |
58 |
$('.add').click(function() { |
| 61 |
var table = $(this).closest('table'); |
59 |
var table = $(this).closest('table'); |
| 62 |
var index_name = $(table).attr('data-index_name'); |
60 |
var index_name = $(table).attr('data-index_name'); |
|
Lines 72-81
Link Here
|
| 72 |
$(search_field_line).find('a.btn-default').addClass('disabled'); |
70 |
$(search_field_line).find('a.btn-default').addClass('disabled'); |
| 73 |
|
71 |
|
| 74 |
clean_line(line); |
72 |
clean_line(line); |
| 75 |
|
|
|
| 76 |
$(table).tableDnD( { |
| 77 |
onDragClass: "dragClass", |
| 78 |
} ); |
| 79 |
} |
73 |
} |
| 80 |
}); |
74 |
}); |
| 81 |
|
75 |
|
|
Lines 90-101
Link Here
|
| 90 |
var label = $(line).find('input[data-id="search_field_name"]').val(); |
84 |
var label = $(line).find('input[data-id="search_field_name"]').val(); |
| 91 |
if ( name.length > 0 && label.length > 0 ) { |
85 |
if ( name.length > 0 && label.length > 0 ) { |
| 92 |
var new_line = clone_line( line ); |
86 |
var new_line = clone_line( line ); |
| 93 |
new_line.appendTo($('table[data-index_name=search_fields]>tbody')); |
87 |
new_line.appendTo(table.find('tbody')); |
| 94 |
clean_line(line); |
88 |
clean_line(line); |
| 95 |
|
|
|
| 96 |
$(table).tableDnD( { |
| 97 |
onDragClass: "dragClass", |
| 98 |
} ); |
| 99 |
} |
89 |
} |
| 100 |
}); |
90 |
}); |
| 101 |
}); |
91 |
}); |
|
Lines 213-218
a.add, a.delete {
Link Here
|
| 213 |
<th>Staff client</th> |
203 |
<th>Staff client</th> |
| 214 |
<th>OPAC</th> |
204 |
<th>OPAC</th> |
| 215 |
<th> </th> |
205 |
<th> </th> |
|
|
206 |
<th> </th> |
| 216 |
</tr> |
207 |
</tr> |
| 217 |
</thead> |
208 |
</thead> |
| 218 |
<tbody> |
209 |
<tbody> |
|
Lines 296-302
a.add, a.delete {
Link Here
|
| 296 |
</select> |
287 |
</select> |
| 297 |
</td> |
288 |
</td> |
| 298 |
<td> |
289 |
<td> |
| 299 |
[% IF search_field.mapped_biblios %] |
290 |
[% IF search_field.is_mapped_biblios %] |
| 300 |
<input type="number" step="0.01" min="0.01" max="999.99" name="search_field_weight" value="[% search_field.weight | html %]" /> |
291 |
<input type="number" step="0.01" min="0.01" max="999.99" name="search_field_weight" value="[% search_field.weight | html %]" /> |
| 301 |
[% ELSE %] |
292 |
[% ELSE %] |
| 302 |
<input type="hidden" name="search_field_weight" value=""> |
293 |
<input type="hidden" name="search_field_weight" value=""> |
|
Lines 309-315
a.add, a.delete {
Link Here
|
| 309 |
<a class="btn btn-default btn-xs delete" style="cursor: pointer;"><i class="fa fa-trash"></i> Delete</a> |
300 |
<a class="btn btn-default btn-xs delete" style="cursor: pointer;"><i class="fa fa-trash"></i> Delete</a> |
| 310 |
[% END %] |
301 |
[% END %] |
| 311 |
</td> |
302 |
</td> |
| 312 |
</td> |
|
|
| 313 |
</tr> |
303 |
</tr> |
| 314 |
[% END %] |
304 |
[% END %] |
| 315 |
</tbody> |
305 |
</tbody> |
| 316 |
- |
|
|