/home2/dakshskx/dakshaseo.com/admin/assets/scripts/custom
NameSizeModeActions
calendar.js74120644editdlrm
charts.js314980644editdlrm
coming-soon.js6610644editdlrm
components-dropdowns.js103830644editdlrm
components-editors.js5160644editdlrm
components-form-tools.js191330644editdlrm
components-ion-sliders.js23180644editdlrm
components-jqueryui-sliders.js36800644editdlrm
components-knob-dials.js5460644editdlrm
components-nouisliders.js17880644editdlrm
components-pickers.js78520644editdlrm
contact-us.js6320644editdlrm
custom.js5530644editdlrm
ecommerce-index.js80690644editdlrm
ecommerce-orders-view.js73390644editdlrm
ecommerce-orders.js27720644editdlrm
ecommerce-products-edit.js65210644editdlrm
ecommerce-products.js27890644editdlrm
form-dropzone.js14340644editdlrm
form-editable.js186430644editdlrm
form-fileupload.js27220644editdlrm
form-image-crop.js170440644editdlrm
form-samples.js14840644editdlrm
form-validation.js120080644editdlrm
form-wizard.js104420644editdlrm
inbox.js96430644editdlrm
index11.js326050644editdlrm
lock.js3950644editdlrm
login-soft.js84720644editdlrm
login.js83320644editdlrm
maps-google.js61530644editdlrm
maps-vector.js18970644editdlrm
portfolio.js1920644editdlrm
portlet-draggable.js6550644editdlrm
search.js2870644editdlrm
table-advanced.js45830644editdlrm
table-ajax.js33640644editdlrm
table-editable.js61910644editdlrm
table-managed.js60840644editdlrm
tasks.js3830644editdlrm
ui-alert-dialog-api.js33470644editdlrm
ui-blockui.js38940644editdlrm
ui-datepaginator.js8050644editdlrm
ui-extended-modals.js25640644editdlrm
ui-general.js66240644editdlrm
ui-idletimeout.js23300644editdlrm
ui-nestable.js15910644editdlrm
ui-notific8.js14720644editdlrm
ui-toastr.js49900644editdlrm
ui-tree.js64580644editdlrm
Edit: /home2/dakshskx/dakshaseo.com/admin/assets/scripts/custom/table-ajax.js (3364B)
var TableAjax = function () { var initPickers = function () { //init date pickers $('.date-picker').datepicker({ rtl: App.isRTL(), autoclose: true }); } var handleRecords = function() { var grid = new Datatable(); grid.init({ src: $("#datatable_ajax"), onSuccess: function(grid) { // execute some code after table records loaded }, onError: function(grid) { // execute some code on network or other general error }, dataTable: { // here you can define a typical datatable settings from http://datatables.net/usage/options /* By default the ajax datatable's layout is horizontally scrollable and this can cause an issue of dropdown menu is used in the table rows which. Use below "sDom" value for the datatable layout if you want to have a dropdown menu for each row in the datatable. But this disables the horizontal scroll. */ //"sDom" : "<'row'<'col-md-8 col-sm-12'pli><'col-md-4 col-sm-12'<'table-group-actions pull-right'>>r>t<'row'<'col-md-8 col-sm-12'pli><'col-md-4 col-sm-12'>r>>", "aLengthMenu": [ [20, 50, 100, 150, -1], [20, 50, 100, 150, "All"] // change per page values here ], "iDisplayLength": 20, // default record count per page "bServerSide": true, // server side processing "sAjaxSource": "demo/table_ajax.php", // ajax source "aaSorting": [[ 1, "asc" ]] // set first column as a default sort by asc } }); // handle group actionsubmit button click grid.getTableWrapper().on('click', '.table-group-action-submit', function(e){ e.preventDefault(); var action = $(".table-group-action-input", grid.getTableWrapper()); if (action.val() != "" && grid.getSelectedRowsCount() > 0) { grid.addAjaxParam("sAction", "group_action"); grid.addAjaxParam("sGroupActionName", action.val()); var records = grid.getSelectedRows(); for (var i in records) { grid.addAjaxParam(records[i]["name"], records[i]["value"]); } grid.getDataTable().fnDraw(); grid.clearAjaxParams(); } else if (action.val() == "") { App.alert({type: 'danger', icon: 'warning', message: 'Please select an action', container: grid.getTableWrapper(), place: 'prepend'}); } else if (grid.getSelectedRowsCount() === 0) { App.alert({type: 'danger', icon: 'warning', message: 'No record selected', container: grid.getTableWrapper(), place: 'prepend'}); } }); } return { //main function to initiate the module init: function () { initPickers(); handleRecords(); } }; }();