Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 01573fd

Browse files
authored
Merge pull request #59 from Namoshek/add-reset-to-column-search
Add reset to column search and icons to copy and colvis buttons.
2 parents 5a6f9da + c6f7300 commit 01573fd

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

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

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,9 @@
188188
},
189189

190190
action: function (e, dt, button, config) {
191-
dt.search('').draw();
191+
dt.search('');
192+
dt.columns().search('');
193+
dt.draw();
192194
}
193195
};
194196

@@ -215,4 +217,20 @@
215217
window.location = window.location.href.replace(/\/+$/, "") + '/create';
216218
}
217219
};
220+
221+
if (typeof DataTable.ext.buttons.copyHtml5 !== 'undefined') {
222+
$.extend(DataTable.ext.buttons.copyHtml5, {
223+
text: function (dt) {
224+
return '<i class="fa fa-copy"></i> ' + dt.i18n('buttons.copy', 'Copy');
225+
}
226+
});
227+
}
228+
229+
if (typeof DataTable.ext.buttons.colvis !== 'undefined') {
230+
$.extend(DataTable.ext.buttons.colvis, {
231+
text: function (dt) {
232+
return '<i class="fa fa-eye"></i> ' + dt.i18n('buttons.colvis', 'Column visibility');
233+
}
234+
});
235+
}
218236
})(jQuery, jQuery.fn.dataTable);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /