Bugzilla – Attachment 28085 Details for
Bug 6427
Rewrite of the accounts system
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 6427 [Part 19] - Add full debit and credit table Print and Download features
Bug-6427-Part-19---Add-full-debit-and-credit-table.patch (text/plain), 6.83 KB, created by
Kyle M Hall (khall)
on 2014-05-08 12:16:44 UTC
(
hide
)
Description:
Bug 6427 [Part 19] - Add full debit and credit table Print and Download features
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2014-05-08 12:16:44 UTC
Size:
6.83 KB
patch
obsolete
>From 8f9cbc7b1e87ccbac1bd86b2435506409bcfdb2c Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 28 Jan 2014 09:07:21 -0500 >Subject: [PATCH] Bug 6427 [Part 19] - Add full debit and credit table Print and Download features > >--- > .../intranet-tmpl/prog/en/includes/datatables.inc | 1 + > koha-tmpl/intranet-tmpl/prog/en/js/datatables.js | 24 ++++++++++ > .../prog/en/modules/members/account.tt | 48 ++++++++++++++++++-- > 3 files changed, 69 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/datatables.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/datatables.inc >index 44d8277..1d038de 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/datatables.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/datatables.inc >@@ -1,4 +1,5 @@ > <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.min.js"></script> >+<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/TableTools/media/js/TableTools.min.js"></script> > <script type="text/javascript"> > //<![CDATA[ > var MSG_DT_FIRST = _("First"); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js >index c3b882c..d399132 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js >@@ -28,6 +28,30 @@ var dataTablesDefaults = { > "iDisplayLength": 20 > }; > >+// Set the classes that TableTools uses to something suitable for Bootstrap >+$.extend( true, $.fn.DataTable.TableTools.classes, { >+ "container": "btn-group", >+ "buttons": { >+ "normal": "btn btn-small", >+ "disabled": "btn btn-small disabled" >+ }, >+ "collection": { >+ "container": "DTTT_dropdown dropdown-menu", >+ "buttons": { >+ "normal": "", >+ "disabled": "disabled" >+ } >+ } >+} ); >+ >+// Have the collection use a bootstrap compatible dropdown >+$.extend( true, $.fn.DataTable.TableTools.DEFAULTS.oTags, { >+ "collection": { >+ "container": "ul", >+ "button": "li", >+ "liner": "a" >+ } >+} ); > > // Return an array of string containing the values of a particular column > $.fn.dataTableExt.oApi.fnGetColumnData = function ( oSettings, iColumn, bUnique, bFiltered, bIgnoreEmpty ) { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/account.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/account.tt >index 5a8c071..ae98c2c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/account.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/account.tt >@@ -32,6 +32,26 @@ $(document).ready(function() { > var sImageUrl = "[% interface %]/[% theme %]/img/"; > > var debitsTable = $('#debits-table').dataTable( { >+ "sDom": "<'row-fluid'<'span6'T><'span6'>r>t<'row-fluid'><'top pager'ilpf>t<'bottom pager'ip>", >+ "oTableTools": { >+ "sSwfPath": "/intranet-tmpl/lib/jquery/plugins/TableTools/media/swf/copy_csv_xls_pdf.swf", >+ "aButtons": [ >+ { >+ "sExtends": "print", >+ "sButtonText": "<i class='icon-print'></i> " + _("Print") >+ }, >+ { >+ "sExtends": "collection", >+ "sButtonText": "<i class='icon-download'></i> " + _("Download") + " <span class='caret' />", >+ "aButtons": [ >+ { >+ "sExtends": "csv", >+ "sButtonText": "<i class='icon-file'></i> " + _("CSV") >+ } >+ ] >+ } >+ ] >+ }, > "bProcessing": true, > "aoColumns": [ > { >@@ -117,6 +137,26 @@ $(document).ready(function() { > } ); > > var creditsTable = $('#credits-table').dataTable( { >+ "sDom": "<'row-fluid'<'span6'T><'span6'>r>t<'row-fluid'><'top pager'ilpf>t<'bottom pager'ip>", >+ "oTableTools": { >+ "sSwfPath": "/intranet-tmpl/lib/jquery/plugins/TableTools/media/swf/copy_csv_xls_pdf.swf", >+ "aButtons": [ >+ { >+ "sExtends": "print", >+ "sButtonText": "<i class='icon-print'></i> " + _("Print") >+ }, >+ { >+ "sExtends": "collection", >+ "sButtonText": "<i class='icon-download'></i> " + _("Download") + " <span class='caret' />", >+ "aButtons": [ >+ { >+ "sExtends": "csv", >+ "sButtonText": "<i class='icon-file'></i> " + _("CSV") >+ } >+ ] >+ } >+ ] >+ }, > "bProcessing": true, > "aoColumns": [ > { >@@ -187,7 +227,7 @@ function fnFormatDebitDetails( debitsTable, nTr ) { > > var account_offsets = oData.account_offsets; > >- sOut += "<a class='debit_print btn btn-small' style='margin:5px;' onclick='accountPrint(\"debit\"," + oData.debit_id + ")'>" + >+ sOut += "<a class='debit_print btn btn-small noprint' style='margin:5px;' onclick='accountPrint(\"debit\"," + oData.debit_id + ")'>" + > "<i class='icon-print'></i> " + _("Print receipt") + > "</a>"; > >@@ -275,7 +315,7 @@ function fnFormatCreditDetails( creditsTable, nTr ) { > > var sOut = "<div class='innerDetails' style='display:none;'>"; > >- sOut += "<button class='credit_print btn btn-small' style='margin:5px;' onclick='accountPrint(\"credit\"," + oData.credit_id + ")'>" + >+ sOut += "<button class='credit_print btn btn-small noprint' style='margin:5px;' onclick='accountPrint(\"credit\"," + oData.credit_id + ")'>" + > "<i class='icon-print'></i> " + _("Print receipt") + > "</button>"; > >@@ -372,7 +412,7 @@ function accountPrint( type, id ) { > > <div> > <div id="account-debits"> >- <a id="account-debits-switcher" href="#" onclick="return false">View payments</a> >+ <p><a id="account-debits-switcher" href="#" onclick="return false">View payments</a></p> > <table cellpadding="0" cellspacing="0" border="0" class="display" id="debits-table"> > <thead> > <tr> >@@ -394,7 +434,7 @@ function accountPrint( type, id ) { > </div> > > <div id="account-credits"> >- <a id="account-credits-switcher" href="#" onclick="return false">View fees</a> >+ <p><a id="account-credits-switcher" href="#" onclick="return false">View fees</a></p> > <table cellpadding="0" cellspacing="0" border="0" class="display" id="credits-table"> > <thead> > <tr> >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 6427
:
21922
|
22704
|
22705
|
22708
|
22709
|
22710
|
22741
|
22870
|
22871
|
22872
|
22873
|
22874
|
22875
|
22876
|
22881
|
22889
|
22940
|
22948
|
22949
|
22995
|
23000
|
23137
|
23158
|
23161
|
23171
|
23186
|
23269
|
23275
|
23276
|
23391
|
23392
|
23400
|
23401
|
23402
|
23403
|
23404
|
23405
|
23406
|
23407
|
23408
|
23409
|
23410
|
23411
|
23412
|
23413
|
23420
|
23421
|
23422
|
23423
|
23424
|
23425
|
23426
|
23427
|
23428
|
23429
|
23430
|
23431
|
23432
|
23433
|
23440
|
23441
|
23442
|
23443
|
23444
|
23445
|
23446
|
23447
|
23448
|
23449
|
23450
|
23451
|
23452
|
23453
|
23454
|
23458
|
23459
|
23460
|
23461
|
23462
|
23463
|
23464
|
23465
|
23466
|
23467
|
23468
|
23469
|
23470
|
23471
|
23603
|
23643
|
23644
|
23645
|
23646
|
23647
|
23648
|
23649
|
23650
|
23651
|
23652
|
23653
|
23654
|
23655
|
23656
|
23657
|
23937
|
23938
|
23939
|
23940
|
23941
|
23942
|
23943
|
23944
|
23945
|
23946
|
23947
|
23948
|
23949
|
23950
|
23951
|
24612
|
24613
|
24614
|
24615
|
24616
|
24617
|
24618
|
24619
|
24620
|
24621
|
24622
|
24623
|
24624
|
24625
|
24626
|
24627
|
24628
|
24757
|
24758
|
24759
|
24760
|
24761
|
24762
|
24763
|
24764
|
24765
|
24766
|
24767
|
24768
|
24769
|
24770
|
24771
|
24772
|
24777
|
24792
|
24793
|
24794
|
24795
|
24796
|
24797
|
24798
|
24799
|
24800
|
24801
|
24802
|
24803
|
24804
|
24805
|
24806
|
24807
|
24808
|
24809
|
24810
|
24811
|
24812
|
24813
|
24814
|
24815
|
24816
|
24817
|
24818
|
24819
|
24820
|
24821
|
24822
|
24823
|
24824
|
24825
|
24826
|
24827
|
24828
|
24829
|
24830
|
24831
|
24832
|
24833
|
24834
|
24835
|
24836
|
24837
|
24838
|
24839
|
24840
|
24841
|
24842
|
24843
|
24844
|
25777
|
25778
|
25779
|
25780
|
25781
|
25782
|
25783
|
25784
|
25785
|
25786
|
25787
|
25788
|
25789
|
25790
|
25791
|
25792
|
25793
|
25794
|
25795
|
25796
|
25797
|
25798
|
25799
|
25800
|
25801
|
25802
|
25803
|
25804
|
25805
|
25806
|
25807
|
25808
|
25809
|
25810
|
25811
|
25812
|
25813
|
25814
|
25815
|
25816
|
25930
|
25932
|
25933
|
25934
|
26033
|
26034
|
26035
|
26036
|
26107
|
27167
|
27168
|
27169
|
27170
|
27171
|
27172
|
27173
|
27174
|
27175
|
27176
|
27177
|
27178
|
27179
|
27180
|
27181
|
27182
|
27183
|
27184
|
27185
|
27186
|
27187
|
27189
|
27190
|
27197
|
28067
|
28068
|
28069
|
28070
|
28071
|
28072
|
28073
|
28074
|
28075
|
28076
|
28077
|
28078
|
28079
|
28080
|
28081
|
28082
|
28083
|
28084
|
28085
|
28086
|
28087
|
28088
|
28089
|
28090
|
28091
|
28527
|
28528
|
28529
|
28530
|
28531
|
28532
|
28533
|
28534
|
28535
|
28536
|
28537
|
28538
|
28539
|
28540
|
28541
|
28542
|
28543
|
28544
|
28545
|
28546
|
28547
|
28548
|
28549
|
28550
|
28551
|
28552
|
28553
|
28555
|
28556
|
28561
|
28563
|
28564
|
28795
|
28796
|
28797
|
28798
|
28799
|
28800
|
28801
|
28802
|
28803
|
28804
|
28805
|
28806
|
28807
|
28808
|
28809
|
28810
|
28811
|
28812
|
28813
|
28814
|
28815
|
28816
|
28817
|
28818
|
28819
|
28820
|
28821
|
28822
|
28887
|
28888
|
28889
|
28890
|
28909
|
29176
|
29230
|
29231
|
29232
|
29233
|
29234
|
29235
|
29236
|
29237
|
29238
|
29239
|
29240
|
29241
|
29242
|
29243
|
29244
|
29245
|
29246
|
29247
|
29248
|
29249
|
29250
|
29251
|
29252
|
29253
|
29254
|
29255
|
29256
|
29257
|
29258
|
29259
|
29260
|
29261
|
29262
|
29263
|
29264
|
29265
|
29706
|
29707
|
29708
|
29709
|
29710
|
29711
|
29712
|
29713
|
29714
|
29715
|
29716
|
29717
|
29719
|
29720
|
29721
|
29722
|
29723
|
29724
|
29725
|
29726
|
29727
|
29728
|
29729
|
29730
|
30271
|
30272
|
30273
|
30274
|
30275
|
30276
|
30277
|
30278
|
30279
|
30280
|
30281
|
30282
|
30320
|
30321
|
30322
|
30323
|
30324
|
30325
|
30326
|
30327
|
30328
|
30329
|
30330
|
30331
|
30416
|
30417
|
30418
|
30419
|
30420
|
30421
|
30422
|
30423
|
30424
|
30425
|
30426
|
30427
|
31477
|
31478
|
31479
|
31480
|
31481
|
31482
|
31483
|
31484
|
31485
|
31486
|
31487
|
31488
|
31754
|
31755
|
31756
|
31757
|
31758
|
31759
|
31760
|
31761
|
31762
|
31763
|
31764
|
31765
|
31766
|
31767
|
31768
|
31769
|
31770
|
31771
|
31772
|
31773
|
31774
|
31775
|
31776
|
31777
|
32478
|
32479
|
32480
|
32481
|
32482
|
32483
|
32484
|
32485
|
32486
|
32487
|
32488
|
32489
|
32591
|
32592
|
32593
|
32594
|
32595
|
32596
|
32597
|
32598
|
32599
|
32600
|
32601
|
32602
|
32827
|
32828
|
32829
|
32830
|
32831
|
32832
|
32833
|
32834
|
32835
|
32836
|
32837
|
32838
|
33251
|
33252
|
33253
|
33254
|
33255
|
33256
|
33257
|
33258
|
33259
|
33260
|
33261
|
33262
|
34096
|
34097
|
34098
|
34099
|
34100
|
34101
|
34102
|
34103
|
34104
|
34105
|
34106
|
34107
|
34204
|
34205
|
34206
|
34207
|
34208
|
34209
|
34210
|
34211
|
34212
|
34213
|
34214
|
34215
|
35196
|
35197
|
35198
|
35199
|
35200
|
35201
|
35202
|
35203
|
35204
|
35205
|
35206
|
35207
|
35208
|
35302
|
36324
|
36326
|
36327
|
36328
|
36329
|
36330
|
36331
|
36332
|
36333
|
36334
|
36335
|
36337
|
36338
|
36340
|
36380
|
36391
|
36393
|
37127
|
37128
|
37129
|
37130
|
37131
|
37133
|
37134
|
37135
|
37136
|
37137
|
37138
|
37139
|
37140
|
37141
|
37142
|
37143
|
37147
|
37148
|
37149
|
37150
|
37151
|
37152
|
37153
|
37154
|
37155
|
37156
|
37157
|
37158
|
37159
|
37160
|
37161
|
37162
|
37229
|
37230
|
37231
|
37232
|
37233
|
37234
|
37235
|
37236
|
37237
|
37238
|
37239
|
37240
|
37241
|
37242
|
37243
|
37244
|
38247
|
38248
|
38249
|
38250
|
38251
|
38252
|
38253
|
38254
|
38255
|
38256
|
38257
|
38258
|
38259
|
38260
|
38261
|
38262
|
39063
|
39064
|
39065
|
39066
|
39067
|
39069
|
39070
|
39071
|
39072
|
39073
|
39074
|
39075
|
39076
|
39077
|
39078
|
39079
|
39671
|
39672
|
39673
|
39674
|
39675
|
39676
|
39677
|
39678
|
39679
|
39680
|
39681
|
39682
|
39683
|
39684
|
39685
|
39686