update setting admin pages
This commit is contained in:
@@ -220,17 +220,22 @@ $(document).ready(function(){
|
||||
var dining_id = $(this).attr("data-id");
|
||||
var change_from = "<%= @dining.id %>";
|
||||
if (dining_id == change_from) {
|
||||
$.alert({
|
||||
/*$.alert({
|
||||
title: 'Alert!',
|
||||
content: 'Please Select Another Table',
|
||||
type: 'red',
|
||||
typeAnimated: true,
|
||||
btnClass: 'btn-danger',
|
||||
});
|
||||
}else{
|
||||
$('#moved').text(" ' " + dining_name + " ' ")
|
||||
$('#change_table_value').val(dining_id);
|
||||
}
|
||||
});*/
|
||||
swal({
|
||||
title: "Alert!!",
|
||||
text: 'Please Select Another Table !',
|
||||
type: 'warning',
|
||||
});
|
||||
}else{
|
||||
$('#moved').text(" ' " + dining_name + " ' ")
|
||||
$('#change_table_value').val(dining_id);
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
@@ -241,13 +246,11 @@ $(document).ready(function(){
|
||||
var dining_id = $(this).attr("data-id");
|
||||
var change_from = "<%= @dining.id %>";
|
||||
if (dining_id == change_from) {
|
||||
$.alert({
|
||||
title: 'Alert!',
|
||||
content: 'Please Select Another Table',
|
||||
type: 'red',
|
||||
typeAnimated: true,
|
||||
btnClass: 'btn-danger',
|
||||
});
|
||||
swal({
|
||||
title: "Alert!!",
|
||||
text: 'Please Select Another Table !',
|
||||
type: 'warning',
|
||||
});
|
||||
}else{
|
||||
$('#moved').text(dining_name)
|
||||
$('#change_table_value').val(dining_id);
|
||||
@@ -258,18 +261,29 @@ $(document).ready(function(){
|
||||
change_to = $('#change_table_value').val();
|
||||
change_from = "<%= @dining.id %>";
|
||||
if (change_to == ""){
|
||||
alert("Please Select Table")
|
||||
swal({
|
||||
title: "Alert!!",
|
||||
text: 'Please Select Table !',
|
||||
type: 'warning',
|
||||
});
|
||||
}else{
|
||||
$.ajax({type: "POST",
|
||||
url: "<%= origami_moving_path %>",
|
||||
data: "change_from="+ change_from + "&change_to=" + change_to,
|
||||
success:function(result){
|
||||
alert("Moving Success")
|
||||
if (result.get_type == 'Table'){
|
||||
window.location.href = '/origami/table/' + change_to;
|
||||
}else{
|
||||
window.location.href = '/origami/room/' + change_to;
|
||||
}
|
||||
|
||||
swal({
|
||||
title: "Information!",
|
||||
text: 'Moving Success',
|
||||
type: 'success',
|
||||
}, function (){
|
||||
if (result.get_type == 'Table'){
|
||||
window.location.href = '/origami/table/' + change_to;
|
||||
}else{
|
||||
window.location.href = '/origami/room/' + change_to;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user