first commit
This commit is contained in:
60
public/themes/tailwind/js/cms/companies/index.js
Normal file
60
public/themes/tailwind/js/cms/companies/index.js
Normal file
@@ -0,0 +1,60 @@
|
||||
$(document).ready( function () {
|
||||
var currentLanguage = $('#currentLanguage').val();
|
||||
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
}
|
||||
});
|
||||
|
||||
var companyListTableColumns = [
|
||||
(currentLanguage == 'zh_hk' ? {data: 'name_chinese', name: 'companies.name_chinese'} : {data: 'name_english', name: 'companies.name_english'}),
|
||||
{data: 'bookkeeping_subscription', name: 'bookkeeping_subscription', searchable: false, sortable: false},
|
||||
{data: 'bookkeeping_requests_count', name: 'bookkeeping_requests_count', searchable: false, sortable: false},
|
||||
{data: 'com_sec_subscription', name: 'com_sec_subscription', searchable: false, sortable: false},
|
||||
{data: 'com_sec_requests_count', name: 'com_sec_requests_count', searchable: false, sortable: false},
|
||||
{data: 'actions', name: 'actions', searchable: false, sortable: false}
|
||||
];
|
||||
var companyListTableUrl = $("#companyListTable").attr('data-ajax-url');
|
||||
var companyListTableEmptyText = $("#companyListTable").attr('data-empty-text');
|
||||
var companyListTable = $("#companyListTable").DataTable({
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
ajax: {
|
||||
url: companyListTableUrl,
|
||||
type: 'post',
|
||||
"data": function ( d ) {
|
||||
return $.extend( {}, d, {
|
||||
"company_name": $('#searchFrm #search_company_name').val(),
|
||||
"bookkeeping_subscription_status": $('#searchFrm #search_bookkeeping_subscription_status').val(),
|
||||
"com_sec_subscription_status": $('#searchFrm #search_com_sec_subscription_status').val(),
|
||||
} );
|
||||
},
|
||||
"dataSrc": function ( json ) {
|
||||
for (var i = 0; i < json.data.length; i++) {
|
||||
$.each( json.data[i], function( key, value ) {
|
||||
json.data[i][key] = value ? value : '-';
|
||||
});
|
||||
}
|
||||
|
||||
return json.data;
|
||||
}
|
||||
},
|
||||
columns: companyListTableColumns,
|
||||
order: [[0, "asc"]],
|
||||
searchDelay: 500,
|
||||
"language": {
|
||||
"paginate": {
|
||||
"next": ">", // Text for the "Next" page button
|
||||
"previous": "<" // Text for the "Previous" page button
|
||||
},
|
||||
"emptyTable": companyListTableEmptyText
|
||||
// Add more text customizations if needed
|
||||
}
|
||||
});
|
||||
|
||||
$('#searchFrm').submit(function(e) {
|
||||
e.preventDefault();
|
||||
companyListTable.ajax.reload();
|
||||
});
|
||||
} );
|
||||
45
public/themes/tailwind/js/cms/companies/show-log.js
Normal file
45
public/themes/tailwind/js/cms/companies/show-log.js
Normal file
@@ -0,0 +1,45 @@
|
||||
$(document).ready( function () {
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
}
|
||||
});
|
||||
|
||||
var allUserAccessLogsListTableUrl = $("#allUserAccessLogsListTable").attr('data-ajax-url');
|
||||
var allUserAccessLogsListTableEmptyText = $("#allUserAccessLogsListTable").attr('data-empty-text');
|
||||
$("#allUserAccessLogsListTable").DataTable({
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
ajax: {
|
||||
url: allUserAccessLogsListTableUrl,
|
||||
type: 'post',
|
||||
"dataSrc": function ( json ) {
|
||||
for (var i = 0; i < json.data.length; i++) {
|
||||
$.each( json.data[i], function( key, value ) {
|
||||
json.data[i][key] = value ? value : '-';
|
||||
});
|
||||
}
|
||||
|
||||
return json.data;
|
||||
}
|
||||
},
|
||||
columns: [
|
||||
{data: 'email', name: 'users.email'},
|
||||
{data: 'date', name: 'user_access_logs.created_at'},
|
||||
{data: 'time', name: 'user_access_logs.created_at'},
|
||||
{data: 'event', name: 'user_access_logs.event'},
|
||||
{data: 'description', name: 'user_access_logs.description'},
|
||||
{data: 'status', name: 'user_access_logs.status'},
|
||||
],
|
||||
order: [[1, "desc"]],
|
||||
searchDelay: 500,
|
||||
"language": {
|
||||
"paginate": {
|
||||
"next": ">", // Text for the "Next" page button
|
||||
"previous": "<" // Text for the "Previous" page button
|
||||
},
|
||||
"emptyTable": allUserAccessLogsListTableEmptyText
|
||||
// Add more text customizations if needed
|
||||
}
|
||||
});
|
||||
} );
|
||||
55
public/themes/tailwind/js/cms/companies/show-user-invite.js
Normal file
55
public/themes/tailwind/js/cms/companies/show-user-invite.js
Normal file
@@ -0,0 +1,55 @@
|
||||
$(document).ready( function () {
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
}
|
||||
});
|
||||
|
||||
$('#sendInviteUserFrm').submit(function(e) {
|
||||
e.preventDefault();
|
||||
var action = $(this).attr('action');
|
||||
var button = $(this).find('button[type="submit"]');
|
||||
var buttonHtml = button.html();
|
||||
|
||||
if (!button.is(':disabled') && action) {
|
||||
button.attr('disabled', 'disabled');
|
||||
button.html('<i class="fa fa-spinner fa-spin" style="font-size:24px"></i>');
|
||||
|
||||
$.ajax({
|
||||
url: action,
|
||||
type: "post",
|
||||
data: $(this).serialize(),
|
||||
dataType: 'json',
|
||||
success:function(data) {
|
||||
button.removeAttr('disabled');
|
||||
button.html(buttonHtml);
|
||||
|
||||
if (data.success) {
|
||||
$('#validationModal').modal('show');
|
||||
$('#validationModal .error-message').html(data.message);
|
||||
|
||||
$('#sendInviteUserFrm').trigger("reset");
|
||||
}
|
||||
else {
|
||||
$('#validationModal .error-message').html(data.message);
|
||||
$('#validationModal').modal('show');
|
||||
}
|
||||
},
|
||||
error: function(data) {
|
||||
var errors = data.responseJSON.errors;
|
||||
var errorMessage = '<ul>';
|
||||
$.each(errors, function(index, error) {
|
||||
console.log(error);
|
||||
errorMessage += '<li>' + error[0] + '</li>';
|
||||
});
|
||||
errorMessage += '</ul>';
|
||||
|
||||
$('#validationModal .error-message').html(errorMessage);
|
||||
$('#validationModal').modal('show');
|
||||
button.removeAttr('disabled');
|
||||
button.html(buttonHtml);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
} );
|
||||
386
public/themes/tailwind/js/cms/companies/show-user.js
Normal file
386
public/themes/tailwind/js/cms/companies/show-user.js
Normal file
@@ -0,0 +1,386 @@
|
||||
$(document).ready( function () {
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
}
|
||||
});
|
||||
|
||||
var userAccessLogsListTable = null;
|
||||
var userListTableUrl = $("#userListTable").attr('data-ajax-url');
|
||||
var userListTableEmptyText = $("#userListTable").attr('data-empty-text');
|
||||
var userListTable = $("#userListTable").DataTable({
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
ajax: {
|
||||
url: userListTableUrl,
|
||||
type: 'post',
|
||||
"dataSrc": function ( json ) {
|
||||
for (var i = 0; i < json.data.length; i++) {
|
||||
$.each( json.data[i], function( key, value ) {
|
||||
json.data[i][key] = value ? value : '-';
|
||||
});
|
||||
}
|
||||
|
||||
return json.data;
|
||||
}
|
||||
},
|
||||
columns: [
|
||||
{data: 'first_name', name: 'users.first_name'},
|
||||
{data: 'last_name', name: 'users.last_name'},
|
||||
{data: 'phone', name: 'users.phone'},
|
||||
{data: 'email', name: 'users.email'},
|
||||
{data: 'display_name', name: 'roles.display_name'},
|
||||
{data: 'status', name: 'users.status'},
|
||||
{data: 'actions', name: 'actions', searchable: false, sortable: false}
|
||||
],
|
||||
order: [[0, "asc"]],
|
||||
searchDelay: 500,
|
||||
"language": {
|
||||
"paginate": {
|
||||
"next": ">", // Text for the "Next" page button
|
||||
"previous": "<" // Text for the "Previous" page button
|
||||
},
|
||||
"emptyTable": userListTableEmptyText
|
||||
// Add more text customizations if needed
|
||||
}
|
||||
});
|
||||
|
||||
$('.password-hide-show').click(function() {
|
||||
var type = $(this).parent().find('input').attr('type');
|
||||
|
||||
if (type == 'password') {
|
||||
$(this).parent().find('input').attr('type', 'text');
|
||||
}
|
||||
else {
|
||||
$(this).parent().find('input').attr('type', 'password');
|
||||
}
|
||||
});
|
||||
|
||||
$('#addUserFrm').submit(function(e) {
|
||||
e.preventDefault();
|
||||
var action = $(this).attr('action');
|
||||
var button = $(this).find('button[type="submit"]');
|
||||
var buttonHtml = button.html();
|
||||
|
||||
if (!button.is(':disabled') && action) {
|
||||
button.attr('disabled', 'disabled');
|
||||
button.html('<i class="fa fa-spinner fa-spin" style="font-size:24px"></i>');
|
||||
|
||||
$.ajax({
|
||||
url: action,
|
||||
type: "post",
|
||||
data: $(this).serialize(),
|
||||
dataType: 'json',
|
||||
success:function(data) {
|
||||
button.removeAttr('disabled');
|
||||
button.html(buttonHtml);
|
||||
|
||||
if (data.success) {
|
||||
$('#newUserModal').modal('hide');
|
||||
$('#validationModal').modal('show');
|
||||
$('#validationModal .error-message').html(data.message);
|
||||
|
||||
$('#addUserFrm').trigger("reset");
|
||||
userListTable.ajax.reload();
|
||||
}
|
||||
else {
|
||||
$('#validationModal .error-message').html(data.message);
|
||||
$('#validationModal').modal('show');
|
||||
}
|
||||
},
|
||||
error: function(data) {
|
||||
var errors = data.responseJSON.errors;
|
||||
var errorMessage = '<ul>';
|
||||
$.each(errors, function(index, error) {
|
||||
console.log(error);
|
||||
errorMessage += '<li>' + error[0] + '</li>';
|
||||
});
|
||||
errorMessage += '</ul>';
|
||||
|
||||
$('#validationModal .error-message').html(errorMessage);
|
||||
$('#validationModal').modal('show');
|
||||
button.removeAttr('disabled');
|
||||
button.html(buttonHtml);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.suspend-user', function(e) {
|
||||
var action = $(this).attr('data-action');
|
||||
|
||||
if (action) {
|
||||
Swal.fire({
|
||||
title: languageTexts["Are you sure?"],
|
||||
text: languageTexts["You would not be able to revert this!"],
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: languageTexts["Yes"],
|
||||
cancelButtonText: languageTexts["Cancel"]
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
$.ajax({
|
||||
url: action,
|
||||
type: "post",
|
||||
data: {},
|
||||
dataType: 'json',
|
||||
success:function(data) {
|
||||
if (data.success) {
|
||||
$('#validationModal').modal('show');
|
||||
$('#validationModal .error-message').html(data.message);
|
||||
|
||||
userListTable.ajax.reload();
|
||||
}
|
||||
},
|
||||
error: function(data) {
|
||||
var errors = data.responseJSON.errors;
|
||||
var errorMessage = '<ul>';
|
||||
$.each(errors, function(index, error) {
|
||||
console.log(error);
|
||||
errorMessage += '<li>' + error[0] + '</li>';
|
||||
});
|
||||
errorMessage += '</ul>';
|
||||
|
||||
$('#validationModal .error-message').html(errorMessage);
|
||||
$('#validationModal').modal('show');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.activate-user', function(e) {
|
||||
var action = $(this).attr('data-action');
|
||||
|
||||
if (action) {
|
||||
Swal.fire({
|
||||
title: languageTexts["Are you sure?"],
|
||||
text: languageTexts["You would not be able to revert this!"],
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: languageTexts["Yes"],
|
||||
cancelButtonText: languageTexts["Cancel"]
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
$.ajax({
|
||||
url: action,
|
||||
type: "post",
|
||||
data: {},
|
||||
dataType: 'json',
|
||||
success:function(data) {
|
||||
if (data.success) {
|
||||
$('#validationModal').modal('show');
|
||||
$('#validationModal .error-message').html(data.message);
|
||||
|
||||
userListTable.ajax.reload();
|
||||
}
|
||||
},
|
||||
error: function(data) {
|
||||
var errors = data.responseJSON.errors;
|
||||
var errorMessage = '<ul>';
|
||||
$.each(errors, function(index, error) {
|
||||
console.log(error);
|
||||
errorMessage += '<li>' + error[0] + '</li>';
|
||||
});
|
||||
errorMessage += '</ul>';
|
||||
|
||||
$('#validationModal .error-message').html(errorMessage);
|
||||
$('#validationModal').modal('show');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.remove-user', function(e) {
|
||||
var action = $(this).attr('data-action');
|
||||
|
||||
if (action) {
|
||||
Swal.fire({
|
||||
title: languageTexts["Are you sure?"],
|
||||
text: languageTexts["You would not be able to revert this!"],
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: languageTexts["Yes"],
|
||||
cancelButtonText: languageTexts["Cancel"]
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
$.ajax({
|
||||
url: action,
|
||||
type: "post",
|
||||
data: {},
|
||||
dataType: 'json',
|
||||
success:function(data) {
|
||||
if (data.success) {
|
||||
$('#validationModal').modal('show');
|
||||
$('#validationModal .error-message').html(data.message);
|
||||
|
||||
userListTable.ajax.reload();
|
||||
}
|
||||
},
|
||||
error: function(data) {
|
||||
var errors = data.responseJSON.errors;
|
||||
var errorMessage = '<ul>';
|
||||
$.each(errors, function(index, error) {
|
||||
console.log(error);
|
||||
errorMessage += '<li>' + error[0] + '</li>';
|
||||
});
|
||||
errorMessage += '</ul>';
|
||||
|
||||
$('#validationModal .error-message').html(errorMessage);
|
||||
$('#validationModal').modal('show');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.edit-user', function(e) {
|
||||
var actionShow = $(this).attr('data-action-show');
|
||||
var actionUpdate = $(this).attr('data-action-update');
|
||||
|
||||
if (actionShow && actionUpdate) {
|
||||
$.ajax({
|
||||
url: actionShow,
|
||||
type: "post",
|
||||
data: {},
|
||||
dataType: 'json',
|
||||
success:function(data) {
|
||||
if (data.success) {
|
||||
$('#editUserFrm').attr('action', actionUpdate);
|
||||
$('#editUserFrm input[name="first_name"]').val(data.user.first_name);
|
||||
$('#editUserFrm input[name="last_name"]').val(data.user.last_name);
|
||||
$('#editUserFrm input[name="phone"]').val(data.user.phone);
|
||||
$('#editUserFrm input[name="email"]').val(data.user.email);
|
||||
$('#editUserFrm select[name="role_id"]').val(data.user.role_id);
|
||||
$('#editUserFrm input[name="status"]').val(data.user.status);
|
||||
$('#editUserModal').modal('show');
|
||||
}
|
||||
},
|
||||
error: function(data) {
|
||||
var errors = data.responseJSON.errors;
|
||||
var errorMessage = '<ul>';
|
||||
$.each(errors, function(index, error) {
|
||||
console.log(error);
|
||||
errorMessage += '<li>' + error[0] + '</li>';
|
||||
});
|
||||
errorMessage += '</ul>';
|
||||
|
||||
$('#validationModal .error-message').html(errorMessage);
|
||||
$('#validationModal').modal('show');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$('#editUserFrm').submit(function(e) {
|
||||
e.preventDefault();
|
||||
var action = $(this).attr('action');
|
||||
var button = $(this).find('button[type="submit"]');
|
||||
var buttonHtml = button.html();
|
||||
|
||||
if (!button.is(':disabled') && action) {
|
||||
button.attr('disabled', 'disabled');
|
||||
button.html('<i class="fa fa-spinner fa-spin" style="font-size:24px"></i>');
|
||||
|
||||
$.ajax({
|
||||
url: action,
|
||||
type: "post",
|
||||
data: $(this).serialize(),
|
||||
dataType: 'json',
|
||||
success:function(data) {
|
||||
button.removeAttr('disabled');
|
||||
button.html(buttonHtml);
|
||||
|
||||
if (data.success) {
|
||||
$('#editUserModal').modal('hide');
|
||||
$('#validationModal').modal('show');
|
||||
$('#validationModal .error-message').html(data.message);
|
||||
|
||||
$('#editUserFrm').trigger("reset");
|
||||
userListTable.ajax.reload();
|
||||
}
|
||||
else {
|
||||
$('#validationModal .error-message').html(data.message);
|
||||
$('#validationModal').modal('show');
|
||||
}
|
||||
},
|
||||
error: function(data) {
|
||||
var errors = data.responseJSON.errors;
|
||||
var errorMessage = '<ul>';
|
||||
$.each(errors, function(index, error) {
|
||||
console.log(error);
|
||||
errorMessage += '<li>' + error[0] + '</li>';
|
||||
});
|
||||
errorMessage += '</ul>';
|
||||
|
||||
$('#validationModal .error-message').html(errorMessage);
|
||||
$('#validationModal').modal('show');
|
||||
button.removeAttr('disabled');
|
||||
button.html(buttonHtml);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
var userAccessLogsListTableUrl = $("#userAccessLogsListTable").attr('data-ajax-url');
|
||||
var userAccessLogsListTableEmptyText = $("#userAccessLogsListTable").attr('data-empty-text');
|
||||
$(document).on('click', '.view-user-log', function(e) {
|
||||
var action = $(this).attr('data-action');
|
||||
|
||||
if (action) {
|
||||
initializeUserAccessLogsListTable(action);
|
||||
$('#userActionLogsModal').modal('show');
|
||||
}
|
||||
});
|
||||
|
||||
function initializeUserAccessLogsListTable(url = userAccessLogsListTableUrl) {
|
||||
if (userAccessLogsListTable) {
|
||||
userAccessLogsListTable.destroy();
|
||||
}
|
||||
|
||||
userAccessLogsListTable = $("#userAccessLogsListTable").DataTable({
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
ajax: {
|
||||
url: url,
|
||||
type: 'post',
|
||||
"dataSrc": function ( json ) {
|
||||
for (var i = 0; i < json.data.length; i++) {
|
||||
$.each( json.data[i], function( key, value ) {
|
||||
json.data[i][key] = value ? value : '-';
|
||||
});
|
||||
}
|
||||
|
||||
return json.data;
|
||||
}
|
||||
},
|
||||
columns: [
|
||||
{data: 'date', name: 'user_access_logs.created_at'},
|
||||
{data: 'time', name: 'user_access_logs.created_at'},
|
||||
{data: 'event', name: 'user_access_logs.event'},
|
||||
{data: 'description', name: 'user_access_logs.description'},
|
||||
{data: 'status', name: 'user_access_logs.status'},
|
||||
],
|
||||
order: [[1, "desc"]],
|
||||
searchDelay: 500,
|
||||
"language": {
|
||||
"paginate": {
|
||||
"next": ">", // Text for the "Next" page button
|
||||
"previous": "<" // Text for the "Previous" page button
|
||||
},
|
||||
"emptyTable": userAccessLogsListTableEmptyText
|
||||
// Add more text customizations if needed
|
||||
}
|
||||
});
|
||||
}
|
||||
} );
|
||||
53
public/themes/tailwind/js/cms/companies/show-xero-api.js
Normal file
53
public/themes/tailwind/js/cms/companies/show-xero-api.js
Normal file
@@ -0,0 +1,53 @@
|
||||
$(document).ready( function () {
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
}
|
||||
});
|
||||
|
||||
$('#updateXeroApiFrm').submit(function(e) {
|
||||
e.preventDefault();
|
||||
var action = $(this).attr('action');
|
||||
var button = $(this).find('button[type="submit"]');
|
||||
var buttonHtml = button.html();
|
||||
|
||||
if (!button.is(':disabled') && action) {
|
||||
button.attr('disabled', 'disabled');
|
||||
button.html('<i class="fa fa-spinner fa-spin" style="font-size:24px"></i>');
|
||||
|
||||
$.ajax({
|
||||
url: action,
|
||||
type: "post",
|
||||
data: $(this).serialize(),
|
||||
dataType: 'json',
|
||||
success:function(data) {
|
||||
button.removeAttr('disabled');
|
||||
button.html(buttonHtml);
|
||||
|
||||
if (data.success) {
|
||||
$('#validationModal').modal('show');
|
||||
$('#validationModal .error-message').html(data.message);
|
||||
}
|
||||
else {
|
||||
$('#validationModal .error-message').html(data.message);
|
||||
$('#validationModal').modal('show');
|
||||
}
|
||||
},
|
||||
error: function(data) {
|
||||
var errors = data.responseJSON.errors;
|
||||
var errorMessage = '<ul>';
|
||||
$.each(errors, function(index, error) {
|
||||
console.log(error);
|
||||
errorMessage += '<li>' + error[0] + '</li>';
|
||||
});
|
||||
errorMessage += '</ul>';
|
||||
|
||||
$('#validationModal .error-message').html(errorMessage);
|
||||
$('#validationModal').modal('show');
|
||||
button.removeAttr('disabled');
|
||||
button.html(buttonHtml);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
} );
|
||||
59
public/themes/tailwind/js/cms/companies/show.js
Normal file
59
public/themes/tailwind/js/cms/companies/show.js
Normal file
@@ -0,0 +1,59 @@
|
||||
|
||||
$(document).ready( function () {
|
||||
$('#document-table__enqueue, #document-table__completed, #document-table, #comsec-table__enqueue, #comsec-table__completed').DataTable({
|
||||
"language": {
|
||||
"paginate": {
|
||||
"next": ">", // Text for the "Next" page button
|
||||
"previous": "<" // Text for the "Previous" page button
|
||||
},
|
||||
// Add more text customizations if needed
|
||||
},
|
||||
columnDefs: [
|
||||
{ targets: [0,1,2,3,4,5,6], orderable: false } // Change the index [1] if needed
|
||||
]
|
||||
});
|
||||
|
||||
$("#subscription-table").DataTable({
|
||||
"language": {
|
||||
"paginate": {
|
||||
"next": ">", // Text for the "Next" page button
|
||||
"previous": "<" // Text for the "Previous" page button
|
||||
},
|
||||
// Add more text customizations if needed
|
||||
},
|
||||
columnDefs: [
|
||||
{ targets: [0,1,2,3,4,5], orderable: false } // Change the index [1] if needed
|
||||
]
|
||||
});
|
||||
|
||||
$("#access-level-table, #log-table").DataTable({
|
||||
"language": {
|
||||
"paginate": {
|
||||
"next": ">", // Text for the "Next" page button
|
||||
"previous": "<" // Text for the "Previous" page button
|
||||
},
|
||||
// Add more text customizations if needed
|
||||
},
|
||||
columnDefs: [
|
||||
{ targets: [0,1,2,3,4], orderable: false } // Change the index [1] if needed
|
||||
]
|
||||
});
|
||||
|
||||
$(".js-side-nav").click(function(e){
|
||||
e.preventDefault();
|
||||
var id = jQuery(this).data('id');
|
||||
jQuery(this).closest('.side-nav-tabs').next().find('.js-content-tab').hide();
|
||||
jQuery(id).show();
|
||||
jQuery(this).closest('.side-nav-tabs').find('li').removeClass('active');
|
||||
jQuery(this).parent().addClass('active');
|
||||
});
|
||||
|
||||
$(".js-tab-navigate").click(function(e){
|
||||
e.preventDefault();
|
||||
var id = jQuery(this).data('id');
|
||||
jQuery(this).closest('.tabs-navigation').next().find('.tabs-content-item').hide();
|
||||
jQuery(id).show();
|
||||
jQuery(this).closest('.tabs-navigation').find('li').removeClass('active');
|
||||
jQuery(this).parent().addClass('active');
|
||||
});
|
||||
} );
|
||||
Reference in New Issue
Block a user