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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt (-25 / +26 lines)
Lines 1-32 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Patrons &rsaquo; Account for [% INCLUDE 'patron-title.inc' %]</title>
2
<title>Koha &rsaquo; Patrons &rsaquo; Account for [% INCLUDE 'patron-title.inc' %]</title>
3
[% INCLUDE 'doc-head-close.inc' %]
3
[% INCLUDE 'doc-head-close.inc' %]
4
<link rel="stylesheet" type="text/css" href="/intranet-tmpl/prog/en/css/datatables.css" />
4
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
5
<script type="text/javascript" src="/intranet-tmpl/lib/jquery/plugins/jquery.dataTables.min.js"></script>
5
[% INCLUDE 'datatables.inc' %]
6
[% INCLUDE 'datatables-strings.inc' %]
6
<script type="text/javascript">
7
<script type="text/javascript" src="/intranet-tmpl/prog/en/js/datatables.js"></script>
7
$(document).ready(function() {
8
<script type="text/javascript" id="js">$(document).ready(function() {
8
    var txtActivefilter = _("Filter paid transactions");
9
 $(document).ready(function() {
9
    var txtInactivefilter = _("Show all transactions");
10
    var txtActivefilter = _('Filter paid transactions');
11
    var txtInactivefilter = _('Show all transactions');
12
    var table_account_fines = $("#table_account_fines").dataTable($.extend(true, {}, dataTablesDefaults, {
10
    var table_account_fines = $("#table_account_fines").dataTable($.extend(true, {}, dataTablesDefaults, {
13
        "sPaginationType": "four_button",
11
        "sPaginationType": "four_button",
14
        "iDisplayLength" : 25
12
        'aaSorting': [[0, 'desc']],
13
        "sDom": 'C<"top pager"ilpf><"#filter_c">tr<"bottom pager"ip>'
15
    }));
14
    }));
16
    $('<button id="filter_transacs">'+txtActivefilter+'</button>').appendTo($("#table_account_fines_filter"));
15
    $("#filter_c").html('<p><a href="#" id="filter_transacs">'+txtActivefilter+'</a>');
17
    $('#filter_transacs').click(function() {
16
    $('#filter_transacs').click(function(e) {
17
        e.preventDefault();
18
        if ($(this).hasClass('filtered')) {
18
        if ($(this).hasClass('filtered')) {
19
            var filteredValue = '';
19
            var filteredValue = '';
20
            $('#filter_transacs').text(txtActivefilter);
20
            $(this).text(txtActivefilter);
21
        } else { //Not filtered. Let's do it!
21
        } else { //Not filtered. Let's do it!
22
            var filteredValue = '^((?!0.00).*)$'; //Filter not matching 0.00 http://stackoverflow.com/a/406408
22
            var filteredValue = '^((?!0.00).*)$'; //Filter not matching 0.00 http://stackoverflow.com/a/406408
23
            $('#filter_transacs').text(txtInactivefilter);
23
            $(this).text(txtInactivefilter);
24
        }
24
        }
25
        table_account_fines.fnFilter(filteredValue, 4, true, false);
25
        table_account_fines.fnFilter(filteredValue, 4, true, false);
26
        $(this).toggleClass('filtered');
26
        $(this).toggleClass('filtered');
27
    });
27
    });
28
 });
28
});
29
}); </script>
29
</script>
30
</head>
30
</head>
31
<body id="pat_borraccount" class="pat">
31
<body id="pat_borraccount" class="pat">
32
[% INCLUDE 'header.inc' %]
32
[% INCLUDE 'header.inc' %]
Lines 54-68 Link Here
54
<!-- The table with the account items -->
54
<!-- The table with the account items -->
55
<table id="table_account_fines">
55
<table id="table_account_fines">
56
    <thead>
56
    <thead>
57
  	<th>Date</th>
57
      <tr>
58
    <th>Description of charges</th>
58
          <th>Date</th>
59
    <th>Note</th>
59
          <th>Description of charges</th>
60
    <th>Amount</th>
60
          <th>Note</th>
61
    <th>Outstanding</th>
61
          <th>Amount</th>
62
    [% IF ( reverse_col ) %]
62
          <th>Outstanding</th>
63
    <th>&nbsp;</th>
63
          [% IF ( reverse_col ) %]
64
    [% END %]
64
              <th>&nbsp;</th>
65
    <th>Print</th>
65
          [% END %]
66
          <th>Print</th>
67
        </tr>
66
    </thead>
68
    </thead>
67
69
68
	<!-- FIXME: Shouldn't hardcode dollar signs, since Euro or Pound might be needed -->
70
	<!-- FIXME: Shouldn't hardcode dollar signs, since Euro or Pound might be needed -->
69
- 

Return to bug 12258