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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/datatables.inc (+1 lines)
Lines 1-4 Link Here
1
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
1
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
2
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/TableTools/media/js/TableTools.min.js"></script>
2
<script type="text/javascript">
3
<script type="text/javascript">
3
//<![CDATA[
4
//<![CDATA[
4
    var MSG_DT_FIRST = _("First");
5
    var MSG_DT_FIRST = _("First");
(-)a/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js (+24 lines)
Lines 28-33 var dataTablesDefaults = { Link Here
28
    "iDisplayLength": 20
28
    "iDisplayLength": 20
29
};
29
};
30
30
31
// Set the classes that TableTools uses to something suitable for Bootstrap
32
$.extend( true, $.fn.DataTable.TableTools.classes, {
33
    "container": "btn-group",
34
    "buttons": {
35
        "normal": "btn btn-small",
36
        "disabled": "btn btn-small disabled"
37
    },
38
    "collection": {
39
        "container": "DTTT_dropdown dropdown-menu",
40
        "buttons": {
41
            "normal": "",
42
            "disabled": "disabled"
43
        }
44
    }
45
} );
46
47
// Have the collection use a bootstrap compatible dropdown
48
$.extend( true, $.fn.DataTable.TableTools.DEFAULTS.oTags, {
49
    "collection": {
50
        "container": "ul",
51
        "button": "li",
52
        "liner": "a"
53
    }
54
} );
31
55
32
// Return an array of string containing the values of a particular column
56
// Return an array of string containing the values of a particular column
33
$.fn.dataTableExt.oApi.fnGetColumnData = function ( oSettings, iColumn, bUnique, bFiltered, bIgnoreEmpty ) {
57
$.fn.dataTableExt.oApi.fnGetColumnData = function ( oSettings, iColumn, bUnique, bFiltered, bIgnoreEmpty ) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/account.tt (-5 / +44 lines)
Lines 32-37 $(document).ready(function() { Link Here
32
    var sImageUrl = "[% interface %]/[% theme %]/img/";
32
    var sImageUrl = "[% interface %]/[% theme %]/img/";
33
33
34
    var debitsTable = $('#debits-table').dataTable( {
34
    var debitsTable = $('#debits-table').dataTable( {
35
        "sDom": "<'row-fluid'<'span6'T><'span6'>r>t<'row-fluid'><'top pager'ilpf>t<'bottom pager'ip>",
36
        "oTableTools": {
37
            "sSwfPath": "/intranet-tmpl/lib/jquery/plugins/TableTools/media/swf/copy_csv_xls_pdf.swf",
38
            "aButtons": [
39
                {
40
                    "sExtends": "print",
41
                    "sButtonText": "<i class='icon-print'></i> " + _("Print")
42
                },
43
                {
44
                    "sExtends":    "collection",
45
                    "sButtonText": "<i class='icon-download'></i> " + _("Download") + " <span class='caret' />",
46
                    "aButtons": [
47
                        {
48
                            "sExtends": "csv",
49
                            "sButtonText": "<i class='icon-file'></i> " + _("CSV")
50
                        }
51
                    ]
52
                }
53
            ]
54
        },
35
        "bProcessing": true,
55
        "bProcessing": true,
36
        "aoColumns": [
56
        "aoColumns": [
37
            {
57
            {
Lines 117-122 $(document).ready(function() { Link Here
117
    } );
137
    } );
118
138
119
    var creditsTable = $('#credits-table').dataTable( {
139
    var creditsTable = $('#credits-table').dataTable( {
140
        "sDom": "<'row-fluid'<'span6'T><'span6'>r>t<'row-fluid'><'top pager'ilpf>t<'bottom pager'ip>",
141
        "oTableTools": {
142
            "sSwfPath": "/intranet-tmpl/lib/jquery/plugins/TableTools/media/swf/copy_csv_xls_pdf.swf",
143
            "aButtons": [
144
                {
145
                    "sExtends": "print",
146
                    "sButtonText": "<i class='icon-print'></i> " + _("Print")
147
                },
148
                {
149
                    "sExtends":    "collection",
150
                    "sButtonText": "<i class='icon-download'></i> " + _("Download") + " <span class='caret' />",
151
                    "aButtons": [
152
                        {
153
                            "sExtends": "csv",
154
                            "sButtonText": "<i class='icon-file'></i> " + _("CSV")
155
                        }
156
                    ]
157
                }
158
            ]
159
        },
120
        "bProcessing": true,
160
        "bProcessing": true,
121
        "aoColumns": [
161
        "aoColumns": [
122
            {
162
            {
Lines 187-193 function fnFormatDebitDetails( debitsTable, nTr ) { Link Here
187
227
188
    var account_offsets = oData.account_offsets;
228
    var account_offsets = oData.account_offsets;
189
229
190
    sOut += "<a class='debit_print btn btn-small' style='margin:5px;' onclick='accountPrint(\"debit\"," + oData.debit_id + ")'>" +
230
    sOut += "<a class='debit_print btn btn-small noprint' style='margin:5px;' onclick='accountPrint(\"debit\"," + oData.debit_id + ")'>" +
191
                "<i class='icon-print'></i> " + _("Print receipt") +
231
                "<i class='icon-print'></i> " + _("Print receipt") +
192
            "</a>";
232
            "</a>";
193
233
Lines 275-281 function fnFormatCreditDetails( creditsTable, nTr ) { Link Here
275
315
276
    var sOut = "<div class='innerDetails' style='display:none;'>";
316
    var sOut = "<div class='innerDetails' style='display:none;'>";
277
317
278
    sOut += "<button class='credit_print btn btn-small' style='margin:5px;' onclick='accountPrint(\"credit\"," + oData.credit_id + ")'>" +
318
    sOut += "<button class='credit_print btn btn-small noprint' style='margin:5px;' onclick='accountPrint(\"credit\"," + oData.credit_id + ")'>" +
279
                "<i class='icon-print'></i> " + _("Print receipt") +
319
                "<i class='icon-print'></i> " + _("Print receipt") +
280
            "</button>";
320
            "</button>";
281
321
Lines 372-378 function accountPrint( type, id ) { Link Here
372
412
373
                    <div>
413
                    <div>
374
                        <div id="account-debits">
414
                        <div id="account-debits">
375
                            <a id="account-debits-switcher" href="#" onclick="return false">View payments</a>
415
                            <p><a id="account-debits-switcher" href="#" onclick="return false">View payments</a></p>
376
                            <table cellpadding="0" cellspacing="0" border="0" class="display" id="debits-table">
416
                            <table cellpadding="0" cellspacing="0" border="0" class="display" id="debits-table">
377
                                <thead>
417
                                <thead>
378
                                    <tr>
418
                                    <tr>
Lines 394-400 function accountPrint( type, id ) { Link Here
394
                        </div>
434
                        </div>
395
435
396
                        <div id="account-credits">
436
                        <div id="account-credits">
397
                            <a id="account-credits-switcher" href="#"  onclick="return false">View fees</a>
437
                            <p><a id="account-credits-switcher" href="#"  onclick="return false">View fees</a></p>
398
                            <table cellpadding="0" cellspacing="0" border="0" class="display" id="credits-table">
438
                            <table cellpadding="0" cellspacing="0" border="0" class="display" id="credits-table">
399
                                <thead>
439
                                <thead>
400
                                    <tr>
440
                                    <tr>
401
- 

Return to bug 6427