add global setting to datatables yajrabox laravel
up vote
0
down vote
favorite
I use yajrabox data tables and I want to add the public option to all tables
This plugin needs to select a selector or table. How can I fine-tune my preferences without choosing it
my basic code is
$(function() {
$('#users-table').DataTable({
processing: true,
serverSide: true,
oLanguage: {
sProcessing: "<div class='fa-3x'><i class='fas fa-spinner fa-spin'></i></div>"
},
ajax: '{!! route('show_user_list.data') !!}',
columns: [
{ data: 'user_type.type_name', name: 'user_type.type_name' },
{ data: 'user_gender.gender_name', name: 'user_gender.gender_name' },
{ data: 'name', name: 'name' },
{ data: 'family', name: 'family' },
{ data: 'email', name: 'email' },
{ data: 'national_code', name: 'national_code' },
{ data: 'mobile_number', name: 'mobile_number' },
{ data: 'birth_date', name: 'birth_date' },
@can('user-detail')
{ data: function($user) { return '<a href="/admin/user/detail/' + $user['id'] + '" class="btn btn-primary btn-icon-anim btn-square"><i class="fas fa-eye"></i></a></a>' }, name: 'view', sortable: false },
@endcan
]
});
});
and i want use this code without $('#users-table') selector
I need a code like that
object.DataTable({
oLanguage: {
sProcessing: "<div class='fa-3x'><i class='fas fa-spinner fa-spin'></i></div>"
},
});
this code is example and the mistake
javascript jquery laravel
add a comment |
up vote
0
down vote
favorite
I use yajrabox data tables and I want to add the public option to all tables
This plugin needs to select a selector or table. How can I fine-tune my preferences without choosing it
my basic code is
$(function() {
$('#users-table').DataTable({
processing: true,
serverSide: true,
oLanguage: {
sProcessing: "<div class='fa-3x'><i class='fas fa-spinner fa-spin'></i></div>"
},
ajax: '{!! route('show_user_list.data') !!}',
columns: [
{ data: 'user_type.type_name', name: 'user_type.type_name' },
{ data: 'user_gender.gender_name', name: 'user_gender.gender_name' },
{ data: 'name', name: 'name' },
{ data: 'family', name: 'family' },
{ data: 'email', name: 'email' },
{ data: 'national_code', name: 'national_code' },
{ data: 'mobile_number', name: 'mobile_number' },
{ data: 'birth_date', name: 'birth_date' },
@can('user-detail')
{ data: function($user) { return '<a href="/admin/user/detail/' + $user['id'] + '" class="btn btn-primary btn-icon-anim btn-square"><i class="fas fa-eye"></i></a></a>' }, name: 'view', sortable: false },
@endcan
]
});
});
and i want use this code without $('#users-table') selector
I need a code like that
object.DataTable({
oLanguage: {
sProcessing: "<div class='fa-3x'><i class='fas fa-spinner fa-spin'></i></div>"
},
});
this code is example and the mistake
javascript jquery laravel
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I use yajrabox data tables and I want to add the public option to all tables
This plugin needs to select a selector or table. How can I fine-tune my preferences without choosing it
my basic code is
$(function() {
$('#users-table').DataTable({
processing: true,
serverSide: true,
oLanguage: {
sProcessing: "<div class='fa-3x'><i class='fas fa-spinner fa-spin'></i></div>"
},
ajax: '{!! route('show_user_list.data') !!}',
columns: [
{ data: 'user_type.type_name', name: 'user_type.type_name' },
{ data: 'user_gender.gender_name', name: 'user_gender.gender_name' },
{ data: 'name', name: 'name' },
{ data: 'family', name: 'family' },
{ data: 'email', name: 'email' },
{ data: 'national_code', name: 'national_code' },
{ data: 'mobile_number', name: 'mobile_number' },
{ data: 'birth_date', name: 'birth_date' },
@can('user-detail')
{ data: function($user) { return '<a href="/admin/user/detail/' + $user['id'] + '" class="btn btn-primary btn-icon-anim btn-square"><i class="fas fa-eye"></i></a></a>' }, name: 'view', sortable: false },
@endcan
]
});
});
and i want use this code without $('#users-table') selector
I need a code like that
object.DataTable({
oLanguage: {
sProcessing: "<div class='fa-3x'><i class='fas fa-spinner fa-spin'></i></div>"
},
});
this code is example and the mistake
javascript jquery laravel
I use yajrabox data tables and I want to add the public option to all tables
This plugin needs to select a selector or table. How can I fine-tune my preferences without choosing it
my basic code is
$(function() {
$('#users-table').DataTable({
processing: true,
serverSide: true,
oLanguage: {
sProcessing: "<div class='fa-3x'><i class='fas fa-spinner fa-spin'></i></div>"
},
ajax: '{!! route('show_user_list.data') !!}',
columns: [
{ data: 'user_type.type_name', name: 'user_type.type_name' },
{ data: 'user_gender.gender_name', name: 'user_gender.gender_name' },
{ data: 'name', name: 'name' },
{ data: 'family', name: 'family' },
{ data: 'email', name: 'email' },
{ data: 'national_code', name: 'national_code' },
{ data: 'mobile_number', name: 'mobile_number' },
{ data: 'birth_date', name: 'birth_date' },
@can('user-detail')
{ data: function($user) { return '<a href="/admin/user/detail/' + $user['id'] + '" class="btn btn-primary btn-icon-anim btn-square"><i class="fas fa-eye"></i></a></a>' }, name: 'view', sortable: false },
@endcan
]
});
});
and i want use this code without $('#users-table') selector
I need a code like that
object.DataTable({
oLanguage: {
sProcessing: "<div class='fa-3x'><i class='fas fa-spinner fa-spin'></i></div>"
},
});
this code is example and the mistake
javascript jquery laravel
javascript jquery laravel
asked Nov 20 at 7:11
Arman Bagheri
1228
1228
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
0
down vote
accepted
I am not sure but please try this
(function ($, DataTable) {
$.extend(true, DataTable.defaults, {
oLanguage:{
sProcessing: "<div class='fa-3x'><i class='fas fa-spinner fa-spin'></i></div>"
}
});
})(jQuery, jQuery.fn.dataTable);
Your code does not work
– Arman Bagheri
Nov 20 at 7:29
add a comment |
up vote
0
down vote
this code add object globall
$.extend( true, $.fn.dataTable.defaults, {
oLanguage: {
sProcessing: "<div class='fa-3x'><i class='fas fa-spinner fa-spin'></i></div>"
},
} );
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
I am not sure but please try this
(function ($, DataTable) {
$.extend(true, DataTable.defaults, {
oLanguage:{
sProcessing: "<div class='fa-3x'><i class='fas fa-spinner fa-spin'></i></div>"
}
});
})(jQuery, jQuery.fn.dataTable);
Your code does not work
– Arman Bagheri
Nov 20 at 7:29
add a comment |
up vote
0
down vote
accepted
I am not sure but please try this
(function ($, DataTable) {
$.extend(true, DataTable.defaults, {
oLanguage:{
sProcessing: "<div class='fa-3x'><i class='fas fa-spinner fa-spin'></i></div>"
}
});
})(jQuery, jQuery.fn.dataTable);
Your code does not work
– Arman Bagheri
Nov 20 at 7:29
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
I am not sure but please try this
(function ($, DataTable) {
$.extend(true, DataTable.defaults, {
oLanguage:{
sProcessing: "<div class='fa-3x'><i class='fas fa-spinner fa-spin'></i></div>"
}
});
})(jQuery, jQuery.fn.dataTable);
I am not sure but please try this
(function ($, DataTable) {
$.extend(true, DataTable.defaults, {
oLanguage:{
sProcessing: "<div class='fa-3x'><i class='fas fa-spinner fa-spin'></i></div>"
}
});
})(jQuery, jQuery.fn.dataTable);
answered Nov 20 at 7:19
Osama Alvi
1368
1368
Your code does not work
– Arman Bagheri
Nov 20 at 7:29
add a comment |
Your code does not work
– Arman Bagheri
Nov 20 at 7:29
Your code does not work
– Arman Bagheri
Nov 20 at 7:29
Your code does not work
– Arman Bagheri
Nov 20 at 7:29
add a comment |
up vote
0
down vote
this code add object globall
$.extend( true, $.fn.dataTable.defaults, {
oLanguage: {
sProcessing: "<div class='fa-3x'><i class='fas fa-spinner fa-spin'></i></div>"
},
} );
add a comment |
up vote
0
down vote
this code add object globall
$.extend( true, $.fn.dataTable.defaults, {
oLanguage: {
sProcessing: "<div class='fa-3x'><i class='fas fa-spinner fa-spin'></i></div>"
},
} );
add a comment |
up vote
0
down vote
up vote
0
down vote
this code add object globall
$.extend( true, $.fn.dataTable.defaults, {
oLanguage: {
sProcessing: "<div class='fa-3x'><i class='fas fa-spinner fa-spin'></i></div>"
},
} );
this code add object globall
$.extend( true, $.fn.dataTable.defaults, {
oLanguage: {
sProcessing: "<div class='fa-3x'><i class='fas fa-spinner fa-spin'></i></div>"
},
} );
answered Nov 20 at 7:40
Arman Bagheri
1228
1228
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53387923%2fadd-global-setting-to-datatables-yajrabox-laravel%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown