Skip to content

Commit 493edaf

Browse files
committed
Add button icons.
1 parent 250d55c commit 493edaf

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

src/resources/assets/buttons.server-side.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
className: 'buttons-excel',
1414

1515
text: function (dt) {
16-
return dt.i18n('buttons.excel', 'Excel');
16+
return '<i class="fa fa-file-excel-o"></i> ' + dt.i18n('buttons.excel', 'Excel');
1717
},
1818

1919
action: function (e, dt, button, config) {
@@ -26,7 +26,7 @@
2626
className: 'buttons-csv',
2727

2828
text: function (dt) {
29-
return dt.i18n('buttons.csv', 'CSV');
29+
return '<i class="fa fa-file-excel-o"></i> ' + dt.i18n('buttons.csv', 'CSV');
3030
},
3131

3232
action: function (e, dt, button, config) {
@@ -39,7 +39,7 @@
3939
className: 'buttons-pdf',
4040

4141
text: function (dt) {
42-
return dt.i18n('buttons.pdf', 'PDF');
42+
return '<i class="fa fa-file-pdf-o"></i> ' + dt.i18n('buttons.pdf', 'PDF');
4343
},
4444

4545
action: function (e, dt, button, config) {
@@ -52,7 +52,7 @@
5252
className: 'buttons-print',
5353

5454
text: function (dt) {
55-
return dt.i18n('buttons.print', 'Print');
55+
return '<i class="fa fa-print"></i> ' + dt.i18n('buttons.print', 'Print');
5656
},
5757

5858
action: function (e, dt, button, config) {
@@ -65,7 +65,7 @@
6565
className: 'buttons-reset',
6666

6767
text: function (dt) {
68-
return dt.i18n('buttons.reset', 'Reset');
68+
return '<i class="fa fa-undo"></i> ' + dt.i18n('buttons.reset', 'Reset');
6969
},
7070

7171
action: function (e, dt, button, config) {
@@ -77,7 +77,7 @@
7777
className: 'buttons-reload',
7878

7979
text: function (dt) {
80-
return dt.i18n('buttons.reload', 'Reload');
80+
return '<i class="fa fa-refresh"></i> ' + dt.i18n('buttons.reload', 'Reload');
8181
},
8282

8383
action: function (e, dt, button, config) {
@@ -89,13 +89,11 @@
8989
className: 'buttons-create',
9090

9191
text: function (dt) {
92-
return dt.i18n('buttons.create', 'Create');
92+
return '<i class="fa fa-plus"></i> ' + dt.i18n('buttons.create', 'Create');
9393
},
9494

9595
action: function (e, dt, button, config) {
9696
window.location = window.location.href.replace(/\/+$/, "") + '/create';
9797
}
9898
};
99-
100-
10199
})(jQuery, jQuery.fn.dataTable);

0 commit comments

Comments
 (0)