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

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

Return to bug 6427