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

(-)a/Koha/AuthorisedValueCategories.pm (+23 lines)
Lines 22-27 use Carp; Link Here
22
use Koha::Database;
22
use Koha::Database;
23
23
24
use Koha::AuthorisedValueCategory;
24
use Koha::AuthorisedValueCategory;
25
use Koha::MarcSubfieldStructures;
25
26
26
use base qw(Koha::Objects);
27
use base qw(Koha::Objects);
27
28
Lines 35-40 Koha::AuthorisedValueCategories - Koha AuthorisedValueCategory Object set class Link Here
35
36
36
=cut
37
=cut
37
38
39
=head3 findByKohaField
40
41
    my $category = Koha::AuthorisedValueCategories->findByKohaField($kohafield, [$frameworkcode]);
42
43
Returns the authorised value category linked to the given koha field
44
45
=cut
46
47
sub findByKohaField {
48
    my ($class, $kohafield, $frameworkcode) = @_;
49
50
    $frameworkcode //= '';
51
52
    my ($subfield) = Koha::MarcSubfieldStructures->search({
53
        frameworkcode => $frameworkcode,
54
        kohafield => $kohafield,
55
        authorised_value => { not => undef },
56
    });
57
58
    return $subfield ? $class->find($subfield->authorised_value) : undef;
59
}
60
38
=head3 type
61
=head3 type
39
62
40
=cut
63
=cut
(-)a/Koha/Item.pm (+14 lines)
Lines 91-96 sub biblio { Link Here
91
    return Koha::Biblio->_new_from_dbic( $biblio_rs );
91
    return Koha::Biblio->_new_from_dbic( $biblio_rs );
92
}
92
}
93
93
94
=head3 biblioitem
95
96
my $biblio = $item->biblio;
97
98
Return the biblioitem record of this item
99
100
=cut
101
102
sub biblioitem {
103
    my ( $self ) = @_;
104
    my $biblioitem_rs = $self->_result->biblioitem;
105
    return Koha::Biblioitem->_new_from_dbic( $biblioitem_rs );
106
}
107
94
=head3 get_transfer
108
=head3 get_transfer
95
109
96
my $transfer = $item->get_transfer;
110
my $transfer = $item->get_transfer;
(-)a/Koha/Template/Plugin/AuthorisedValues.pm (+9 lines)
Lines 23-28 use base qw( Template::Plugin ); Link Here
23
23
24
use C4::Koha;
24
use C4::Koha;
25
use Koha::AuthorisedValues;
25
use Koha::AuthorisedValues;
26
use Koha::AuthorisedValueCategories;
26
27
27
sub GetByCode {
28
sub GetByCode {
28
    my ( $self, $category, $code, $opac ) = @_;
29
    my ( $self, $category, $code, $opac ) = @_;
Lines 68-73 sub GetCategories { Link Here
68
    ];
69
    ];
69
}
70
}
70
71
72
sub GetCategoryByKohaField {
73
    my ($self, $kohafield, $frameworkcode) = @_;
74
75
    my $category = Koha::AuthorisedValueCategories->findByKohaField($kohafield, $frameworkcode);
76
77
    return $category ? $category->category_name : undef;
78
}
79
71
1;
80
1;
72
81
73
=head1 NAME
82
=head1 NAME
(-)a/catalogue/item-export.pl (+70 lines)
Line 0 Link Here
1
#!/usr/bin/perl
2
3
# Copyright 2017 BibLibre
4
#
5
# This file is part of Koha
6
#
7
# Koha is free software; you can redistribute it and/or modify it under the
8
# terms of the GNU General Public License as published by the Free Software
9
# Foundation; either version 3 of the License, or (at your option) any later
10
# version.
11
#
12
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
13
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
15
#
16
# You should have received a copy of the GNU General Public License along
17
# with Koha; if not, write to the Free Software Foundation, Inc.,
18
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
20
use Modern::Perl;
21
22
use CGI;
23
24
use C4::Auth;
25
use C4::Output;
26
27
my $cgi = new CGI;
28
29
my ($template, $borrowernumber, $cookie) = get_template_and_user({
30
    template_name => 'catalogue/itemsearch_csv.tt',
31
    query => $cgi,
32
    type => 'intranet',
33
    authnotrequired => 0,
34
    flagsrequired   => { catalogue => 1 },
35
});
36
37
my @itemnumbers = $cgi->multi_param('itemnumber');
38
my $format = $cgi->param('format') // 'csv';
39
40
my @items;
41
foreach my $itemnumber (@itemnumbers) {
42
    my $item = Koha::Items->find($itemnumber);
43
    if ($item) {
44
        push @items, $item;
45
    }
46
}
47
48
if ($format eq 'barcodes') {
49
    print $cgi->header({
50
        type => 'text/plain',
51
        attachment => 'barcodes.txt',
52
    });
53
54
    foreach my $item (@items) {
55
        print $item->barcode . "\n";
56
    }
57
    exit;
58
}
59
60
$template->param(
61
    results => \@items,
62
);
63
64
print $cgi->header({
65
    type => 'text/csv',
66
    attachment => 'items.csv',
67
});
68
for my $line ( split '\n', $template->output ) {
69
    print "$line\n" unless $line =~ m|^\s*$|;
70
}
(-)a/catalogue/itemsearch.pl (-42 / +3 lines)
Lines 27-33 use C4::Items; Link Here
27
use C4::Biblio;
27
use C4::Biblio;
28
use C4::Koha;
28
use C4::Koha;
29
29
30
use Koha::AuthorisedValues;
30
use Koha::AuthorisedValueCategories;
31
use Koha::Item::Search::Field qw(GetItemSearchFields);
31
use Koha::Item::Search::Field qw(GetItemSearchFields);
32
use Koha::ItemTypes;
32
use Koha::ItemTypes;
33
use Koha::Libraries;
33
use Koha::Libraries;
Lines 90-101 my ($template, $borrowernumber, $cookie) = get_template_and_user({ Link Here
90
    flagsrequired   => { catalogue => 1 },
90
    flagsrequired   => { catalogue => 1 },
91
});
91
});
92
92
93
my $mss = Koha::MarcSubfieldStructures->search({ frameworkcode => '', kohafield => 'items.notforloan', authorised_value => { not => undef } });
94
my $notforloan_values = $mss->count ? GetAuthorisedValues($mss->next->authorised_value) : [];
95
96
$mss = Koha::MarcSubfieldStructures->search({ frameworkcode => '', kohafield => 'items.location', authorised_value => { not => undef } });
97
my $location_values = $mss->count ? GetAuthorisedValues($mss->next->authorised_value) : [];
98
99
if (scalar keys %params > 0) {
93
if (scalar keys %params > 0) {
100
    # Parameters given, it's a search
94
    # Parameters given, it's a search
101
95
Lines 213-237 if (scalar keys %params > 0) { Link Here
213
    }
207
    }
214
208
215
    if ($results) {
209
    if ($results) {
216
        # Get notforloan labels
217
        my $notforloan_map = {};
218
        foreach my $nfl_value (@$notforloan_values) {
219
            $notforloan_map->{$nfl_value->{authorised_value}} = $nfl_value->{lib};
220
        }
221
222
        # Get location labels
223
        my $location_map = {};
224
        foreach my $loc_value (@$location_values) {
225
            $location_map->{$loc_value->{authorised_value}} = $loc_value->{lib};
226
        }
227
228
        foreach my $item (@$results) {
210
        foreach my $item (@$results) {
229
            $item->{biblio} = GetBiblio($item->{biblionumber});
211
            $item->{biblio} = GetBiblio($item->{biblionumber});
230
            ($item->{biblioitem}) = GetBiblioItemByBiblioNumber($item->{biblionumber});
212
            ($item->{biblioitem}) = GetBiblioItemByBiblioNumber($item->{biblionumber});
231
            $item->{status} = $notforloan_map->{$item->{notforloan}};
232
            if (defined $item->{location}) {
233
                $item->{location} = $location_map->{$item->{location}};
234
            }
235
        }
213
        }
236
    }
214
    }
237
215
Lines 261-273 if (scalar keys %params > 0) { Link Here
261
# Display the search form
239
# Display the search form
262
240
263
my @branches = map { value => $_->branchcode, label => $_->branchname }, Koha::Libraries->search( {}, { order_by => 'branchname' } );
241
my @branches = map { value => $_->branchcode, label => $_->branchname }, Koha::Libraries->search( {}, { order_by => 'branchname' } );
264
my @locations;
265
foreach my $location (@$location_values) {
266
    push @locations, {
267
        value => $location->{authorised_value},
268
        label => $location->{lib} // $location->{authorised_value},
269
    };
270
}
271
my @itemtypes;
242
my @itemtypes;
272
foreach my $itemtype ( Koha::ItemTypes->search ) {
243
foreach my $itemtype ( Koha::ItemTypes->search ) {
273
    push @itemtypes, {
244
    push @itemtypes, {
Lines 276-283 foreach my $itemtype ( Koha::ItemTypes->search ) { Link Here
276
    };
247
    };
277
}
248
}
278
249
279
$mss = Koha::MarcSubfieldStructures->search({ frameworkcode => '', kohafield => 'items.ccode', authorised_value => { not => undef } });
250
my $ccode_avcategory = Koha::AuthorisedValueCategories->findByKohaField('items.ccode');
280
my $ccode_avcode = $mss->count ? $mss->next->authorised_value : 'CCODE';
251
my $ccode_avcode = $ccode_avcategory ? $ccode_avcategory->category_name : 'CCODE';
281
my $ccodes = GetAuthorisedValues($ccode_avcode);
252
my $ccodes = GetAuthorisedValues($ccode_avcode);
282
my @ccodes;
253
my @ccodes;
283
foreach my $ccode (@$ccodes) {
254
foreach my $ccode (@$ccodes) {
Lines 287-300 foreach my $ccode (@$ccodes) { Link Here
287
    };
258
    };
288
}
259
}
289
260
290
my @notforloans;
291
foreach my $value (@$notforloan_values) {
292
    push @notforloans, {
293
        value => $value->{authorised_value},
294
        label => $value->{lib},
295
    };
296
}
297
298
my @items_search_fields = GetItemSearchFields();
261
my @items_search_fields = GetItemSearchFields();
299
262
300
my $authorised_values = {};
263
my $authorised_values = {};
Lines 306-315 foreach my $field (@items_search_fields) { Link Here
306
269
307
$template->param(
270
$template->param(
308
    branches => \@branches,
271
    branches => \@branches,
309
    locations => \@locations,
310
    itemtypes => \@itemtypes,
272
    itemtypes => \@itemtypes,
311
    ccodes => \@ccodes,
273
    ccodes => \@ccodes,
312
    notforloans => \@notforloans,
313
    items_search_fields => \@items_search_fields,
274
    items_search_fields => \@items_search_fields,
314
    authorised_values_json => to_json($authorised_values),
275
    authorised_values_json => to_json($authorised_values),
315
);
276
);
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.csv.inc (-1 / +4 lines)
Lines 1-5 Link Here
1
[%- USE Branches -%]
1
[%- USE Branches -%]
2
[%- USE Koha -%]
2
[%- USE Koha -%]
3
[%- USE AuthorisedValues -%]
3
[%- biblio = item.biblio -%]
4
[%- biblio = item.biblio -%]
4
[%- biblioitem = item.biblioitem -%]
5
[%- biblioitem = item.biblioitem -%]
5
"[% biblio.title |html %] [% IF ( Koha.Preference( 'marcflavour' ) == 'UNIMARC' && biblio.author ) %]by [% END %][% biblio.author |html %]", "[% (biblioitem.publicationyear || biblio.copyrightdate) |html %]", "[% biblioitem.publishercode |html %]", "[% biblioitem.collectiontitle |html %]", "[% item.barcode |html %]", "[% item.itemcallnumber |html %]", "[% Branches.GetName(item.homebranch) |html %]", "[% Branches.GetName(item.holdingbranch) |html %]", "[% item.location |html %]", "[% item.stocknumber |html %]", "[% item.status |html %]", "[% (item.issues || 0) |html %]"
6
[%- notforloan_avcategory = AuthorisedValues.GetCategoryByKohaField('items.notforloan') -%]
7
[%- location_avcategory = AuthorisedValues.GetCategoryByKohaField('items.location') -%]
8
"[% biblio.title |html %] [% IF ( Koha.Preference( 'marcflavour' ) == 'UNIMARC' && biblio.author ) %]by [% END %][% biblio.author |html %]", "[% (biblioitem.publicationyear || biblio.copyrightdate) |html %]", "[% biblioitem.publishercode |html %]", "[% biblioitem.collectiontitle |html %]", "[% item.barcode |html %]", "[% item.itemcallnumber |html %]", "[% Branches.GetName(item.homebranch) |html %]", "[% Branches.GetName(item.holdingbranch) |html %]", "[% IF location_avcategory %][% AuthorisedValues.GetByCode(location_avcategory, item.location) |html %][% ELSE %][% item.location |html %][% END %]", "[% item.stocknumber |html %]", "[% IF notforloan_avcategory %][% AuthorisedValues.GetByCode(notforloan_avcategory, item.notforloan) |html %][% ELSE %][% item.notforloan |html %][% END %]", "[% (item.issues || 0) |html %]"
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.json.inc (-2 / +8 lines)
Lines 1-9 Link Here
1
[%- USE Branches -%]
1
[%- USE Branches -%]
2
[%- USE Koha -%]
2
[%- USE Koha -%]
3
[%- USE AuthorisedValues -%]
3
[%- biblio = item.biblio -%]
4
[%- biblio = item.biblio -%]
4
[%- biblioitem = item.biblioitem -%]
5
[%- biblioitem = item.biblioitem -%]
6
[%- notforloan_avcategory = AuthorisedValues.GetCategoryByKohaField('items.notforloan') -%]
7
[%- location_avcategory = AuthorisedValues.GetCategoryByKohaField('items.location') -%]
5
[
8
[
6
  "[% FILTER escape_quotes = replace('"', '\"') ~%]
9
  "[% FILTER escape_quotes = replace('"', '\"') ~%]
10
    <input type="checkbox" name="itemnumber" value="[% item.itemnumber %]"/>
11
  [%~ END %]",
12
  "[% FILTER escape_quotes ~%]
7
    <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.biblionumber %]" title="Go to record detail page">[% biblio.title |html %]</a>[% IF ( Koha.Preference( 'marcflavour' ) == 'UNIMARC' && biblio.author ) %] by[% END %] [% biblio.author |html %]
13
    <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.biblionumber %]" title="Go to record detail page">[% biblio.title |html %]</a>[% IF ( Koha.Preference( 'marcflavour' ) == 'UNIMARC' && biblio.author ) %] by[% END %] [% biblio.author |html %]
8
  [%~ END %]",
14
  [%~ END %]",
9
  "[% (biblioitem.publicationyear || biblio.copyrightdate) |html %]",
15
  "[% (biblioitem.publicationyear || biblio.copyrightdate) |html %]",
Lines 15-23 Link Here
15
  "[% item.itemcallnumber |html %]",
21
  "[% item.itemcallnumber |html %]",
16
  "[% Branches.GetName(item.homebranch) |html %]",
22
  "[% Branches.GetName(item.homebranch) |html %]",
17
  "[% Branches.GetName(item.holdingbranch) |html %]",
23
  "[% Branches.GetName(item.holdingbranch) |html %]",
18
  "[% item.location |html %]",
24
  "[% IF location_avcategory %][% AuthorisedValues.GetByCode(location_avcategory, item.location) | html %][% ELSE %][% item.location |html %][% END %]",
19
  "[% item.stocknumber |html %]",
25
  "[% item.stocknumber |html %]",
20
  "[% item.status |html %]",
26
  "[% IF notforloan_avcategory %][% AuthorisedValues.GetByCode(notforloan_avcategory, item.notforloan) | html %][% ELSE %][% item.notforloan |html %][% END %]",
21
  "[% (item.issues || 0) |html %]",
27
  "[% (item.issues || 0) |html %]",
22
  "[% FILTER escape_quotes ~%]
28
  "[% FILTER escape_quotes ~%]
23
    <a href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% item.biblionumber %]&itemnumber=[% item.itemnumber %]">Edit</a>
29
    <a href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% item.biblionumber %]&itemnumber=[% item.itemnumber %]">Edit</a>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt (-18 / +91 lines)
Lines 1-5 Link Here
1
[% USE CGI %]
1
[% USE CGI %]
2
[% USE JSON.Escape %]
2
[% USE JSON.Escape %]
3
[% USE AuthorisedValues %]
3
4
4
[% BLOCK form_label %]
5
[% BLOCK form_label %]
5
  [% SWITCH label %]
6
  [% SWITCH label %]
Lines 155-160 Link Here
155
  </div>
156
  </div>
156
[% END %]
157
[% END %]
157
158
159
[% notforloan_avcategory = AuthorisedValues.GetCategoryByKohaField('items.notforloan') %]
160
[% IF notforloan_avcategory %]
161
    [% notforloans = AuthorisedValues.Get(notforloan_avcategory) %]
162
    [% FOREACH nfl IN notforloans %]
163
        [% nfl.value = nfl.authorised_value %]
164
        [% nfl.label = nfl.lib %]
165
    [% END %]
166
[% END %]
167
168
[% location_avcategory = AuthorisedValues.GetCategoryByKohaField('items.location') %]
169
[% IF location_avcategory %]
170
    [% locations = AuthorisedValues.Get(location_avcategory) %]
171
    [% FOREACH loc IN locations %]
172
        [% loc.value = loc.authorised_value %]
173
        [% loc.label = loc.lib %]
174
    [% END %]
175
[% END %]
176
158
[%# Page starts here %]
177
[%# Page starts here %]
159
178
160
[% INCLUDE 'doc-head-open.inc' %]
179
[% INCLUDE 'doc-head-open.inc' %]
Lines 207-212 Link Here
207
    function submitForm($form) {
226
    function submitForm($form) {
208
      var tr = ''
227
      var tr = ''
209
        + '    <tr>'
228
        + '    <tr>'
229
        + '      <th></th>'
210
        + '      <th>' + _("Title") + '</th>'
230
        + '      <th>' + _("Title") + '</th>'
211
        + '      <th>' + _("Publication date") + '</th>'
231
        + '      <th>' + _("Publication date") + '</th>'
212
        + '      <th>' + _("Publisher") + '</th>'
232
        + '      <th>' + _("Publisher") + '</th>'
Lines 239-276 Link Here
239
          $('#item-search-block').show();
259
          $('#item-search-block').show();
240
        });
260
        });
241
261
262
      function exportItems(format) {
263
        var itemnumbers = [];
264
        $('#results').find('input[name="itemnumber"]:checked').each(function() {
265
          itemnumbers.push($(this).val());
266
        });
267
        if (itemnumbers.length) {
268
          var href = '/cgi-bin/koha/catalogue/item-export.pl?format=' + format;
269
          href += '&itemnumber=' + itemnumbers.join('&itemnumber=');
270
          location = href;
271
        } else {
272
          $('#format-' + format).prop('checked', true);
273
          $('#itemsearchform').submit();
274
          $('#format-html').prop('checked', true);
275
        }
276
      }
277
242
      var csvExportLink = $('<a>')
278
      var csvExportLink = $('<a>')
243
        .attr('href', '#')
279
        .attr('href', '#')
244
        .html(_("Export results to CSV"))
280
        .html(_("CSV"))
245
        .addClass('btn btn-default btn-xs')
246
        .on('click', function(e) {
281
        .on('click', function(e) {
247
          e.preventDefault();
282
          e.preventDefault();
248
          $('#format-csv').prop('checked', true);
283
          exportItems('csv')
249
          $('#itemsearchform').submit();
250
          $('#format-html').prop('checked', true);
251
        });
284
        });
252
      var barcodesExportLink = $('<a>')
285
      var barcodesExportLink = $('<a>')
253
        .attr('href', '#')
286
        .attr('href', '#')
254
        .html(_("Export results to barcodes file"))
287
        .html(_("Barcodes file"))
255
        .addClass('btn btn-default btn-xs')
256
        .on('click', function(e) {
288
        .on('click', function(e) {
257
          e.preventDefault();
289
          e.preventDefault();
258
          $('#format-barcodes').prop('checked', true);
290
          exportItems('barcodes');
259
          $('#itemsearchform').submit();
260
          $('#format-html').prop('checked', true);
261
        });
291
        });
262
292
263
      var editSearchAndExportLinks = $('<p>')
293
      var exportButton = $('<div>')
264
        .append(editSearchLink)
294
        .addClass('btn-group')
265
        .append(' | ')
295
        .append($('<button>')
266
        .append(csvExportLink)
296
            .addClass('btn btn-default btn-xs dropdown-toggle')
297
            .attr('id', 'export-button')
298
            .attr('data-toggle', 'dropdown')
299
            .attr('aria-haspopup', 'true')
300
            .attr('aria-expanded', 'false')
301
            .html(_("Export all results to") + ' <span class="caret"></span>'))
302
        .append($('<ul>')
303
            .addClass('dropdown-menu')
304
            .append($('<li>').append(csvExportLink))
305
            .append($('<li>').append(barcodesExportLink)));
306
307
      var selectVisibleRows = $('<a>')
308
        .attr('href', '#')
309
        .append('<i class="fa fa-check"></i> ')
310
        .append(_("Select visible rows"))
311
        .on('click', function(e) {
312
            e.preventDefault();
313
            $('#results input[type="checkbox"]').prop('checked', true).change();
314
        });
315
      var clearSelection = $('<a>')
316
        .attr('href', '#')
317
        .append('<i class="fa fa-remove"></i> ')
318
        .append(_("Clear selection"))
319
        .on('click', function(e) {
320
            e.preventDefault();
321
            $('#results input[type="checkbox"]').prop('checked', false).change();
322
        });
323
      var exportLinks = $('<p>')
324
        .append(selectVisibleRows)
267
        .append(' ')
325
        .append(' ')
268
        .append(barcodesExportLink);
326
        .append(clearSelection)
327
        .append(' | ')
328
        .append(exportButton);
269
329
270
      var results_heading = $('<div>').addClass('results-heading')
330
      var results_heading = $('<div>').addClass('results-heading')
271
        .append("<h1>" + _("Item search results") + "</h1>")
331
        .append("<h1>" + _("Item search results") + "</h1>")
272
        .append($('<p>').append(advSearchLink))
332
        .append($('<p>').append(advSearchLink))
273
        .append(editSearchAndExportLinks);
333
        .append($('<p>').append(editSearchLink))
334
        .append(exportLinks);
274
      $('#results-wrapper').empty()
335
      $('#results-wrapper').empty()
275
        .append(results_heading)
336
        .append(results_heading)
276
        .append(table);
337
        .append(table);
Lines 309-315 Link Here
309
          });
370
          });
310
        },
371
        },
311
        'sDom': '<"top pager"ilp>t<"bottom pager"ip>r',
372
        'sDom': '<"top pager"ilp>t<"bottom pager"ip>r',
373
        'aaSorting': [[1, 'asc']],
312
        'aoColumns': [
374
        'aoColumns': [
375
          { 'sName': 'checkbox', 'bSortable': false },
313
          { 'sName': 'title' },
376
          { 'sName': 'title' },
314
          { 'sName': 'publicationyear' },
377
          { 'sName': 'publicationyear' },
315
          { 'sName': 'publishercode' },
378
          { 'sName': 'publishercode' },
Lines 322-333 Link Here
322
          { 'sName': 'stocknumber' },
385
          { 'sName': 'stocknumber' },
323
          { 'sName': 'notforloan' },
386
          { 'sName': 'notforloan' },
324
          { 'sName': 'issues' },
387
          { 'sName': 'issues' },
325
          { 'sName': 'checkbox', 'bSortable': false }
388
          { 'sName': 'actions', 'bSortable': false }
326
        ],
389
        ],
327
        "sPaginationType": "full_numbers"
390
        "sPaginationType": "full_numbers"
328
      })).columnFilter({
391
      })).columnFilter({
329
        'sPlaceHolder': 'head:after',
392
        'sPlaceHolder': 'head:after',
330
        'aoColumns': [
393
        'aoColumns': [
394
          null,
331
          { 'type': 'text' },
395
          { 'type': 'text' },
332
          { 'type': 'text' },
396
          { 'type': 'text' },
333
          { 'type': 'text' },
397
          { 'type': 'text' },
Lines 351-356 Link Here
351
          null
415
          null
352
        ]
416
        ]
353
      });
417
      });
418
419
      $('#results').on('change', 'input[type="checkbox"]', function() {
420
        var countSelected = $(this).parents('table').find('input:checked').length;
421
        var caret = ' <span class="caret">';
422
        if (countSelected > 0) {
423
          $('#export-button').html(_("Export selected results to") + caret);
424
        } else {
425
          $('#export-button').html(_("Export all results to") + caret);
426
        }
427
      })
354
    }
428
    }
355
429
356
    $(document).ready(function () {
430
    $(document).ready(function () {
357
- 

Return to bug 18433