ordering store item add
Adding new feature in store owner page. *ordering item
This commit is contained in:
@@ -783,8 +783,6 @@
|
||||
$('#btn_save_thumbnail_sorting').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
var sortable_data = tr_sortable.sortable('serialize');
|
||||
// div_response . text ( 'Save' );
|
||||
// console.log(sortable_data);
|
||||
$.ajax({
|
||||
data: sortable_data,
|
||||
type: 'POST',
|
||||
@@ -808,6 +806,32 @@
|
||||
});
|
||||
});
|
||||
|
||||
$('#btn_save_item_sorting').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
var sorted_data = item_list_sort.sortable('serialize');
|
||||
$.ajax({
|
||||
data: sorted_data,
|
||||
type: 'POST',
|
||||
url : "{{ url('user/post/save-item-ordering') }}",
|
||||
beforeSend:function(xhr){
|
||||
|
||||
var token = $('meta[name="csrf_token"]').attr('content');
|
||||
|
||||
if (token) {
|
||||
return xhr.setRequestHeader('X-CSRF-TOKEN', token);
|
||||
}
|
||||
xhr.setRequestHeader( 'X-Requested-With', 'XMLHttpRequest');
|
||||
},
|
||||
success:function(result) {
|
||||
// div_response.html(result);
|
||||
console.log(result);
|
||||
if(result.success){
|
||||
alert('Item ordering is succcessfully updated!');
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#myModal').on('hidden.bs.modal', function () {
|
||||
location.reload();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user