About onEditableSave callback in bootstrap-editable

problem description

when editing bootstrap-editable, there are two ways to use it:
one is to edit and save directly in each column, for example :
{

                            title:"",
                            field:"title",
                            width:160,
                            align:"left",
                            valign:"middle",
                            sortable:false,
                            searchable:false,
                            editable: {
                                type: "text",
                                title: "",
                                mode: "popup",
                                emptytext: "--",
                                validate: function (v) {
                                    if (!v) return "";
                                },
                                url:"/edit_todo",
                                success: function(response, newValue) {
                                    if(response=="nouser"){
                                        return "";
                                    }
                                    if(response=="7"){
                                        return "";
                                    }
                                    if(response.status =="error") {
                                        return response.msg;
                                    }
                                }
                            }

                        },{
                            title:"",
                            field:"description",
                            align:"left",
                            valign:"middle",
                            sortable:false,
                            searchable:false,
                            width:400,
                            editable: {
                                type: "textarea",
                                title: "",
                                mode: "popup",
                                emptytext: "--"
                                url:"/edit_todo",
                                success: function(response, newValue) {
                                    if(response=="nouser"){
                                        return "";
                                    }
                                    if(response=="7"){
                                        return "";
                                    }
                                    if(response.status =="error") {
                                        return response.msg;
                                    }
                                }
                            }
                        }

another way to edit and save in onEditableSave, for example:

onEditableSave: function (field, row, oldValue,$el) {

                $.ajax({
                    type: "post",
                    url: "/edit_todo",
                    data: {
                        "pk":row.id,
                        "name":field,
                        "oldValue":oldValue,
                        "newValue":row[field]
                    },
                    success: function(data, status) {
                        if(status=="success"){
                            if (data == "nouser") {
                               return "";                                 
                        }
                        if(data=="notallowed") {

                            return "";
                           
                        }
                        if(data=="exHigh" || data == "Unresolved"|| data=="bug"){     //
                            $el.css("backgroundColor", "");
                            $el.removeClass("PinkBackground");
                            $el.removeClass("blueBackground");
                            $el.removeClass("greyBackground");
                            $el.addClass("redBackground");
                        }
                        else if(data=="High"){
                            $el.css("backgroundColor", "");
                            $el.removeClass("redBackground");
                            $el.removeClass("blueBackground");
                            $el.addClass("PinkBackground");

                        }

                        else {
                            $el.css("backgroundColor", "");
                            $el.removeClass("redBackground");
                            $el.removeClass("greyBackground");
                            $el.removeClass("PinkBackground");
                            $el.removeClass("blueBackground");
                        }
                    }
                        },

                    error: function () {
                        return"";
                    },
                    complete: function () {

                    }
  

question 1: in method 2, the value of oldValue can be read directly, while in method 1, the parameter name that goes to the background method is always name,value,pk,. Is there any way to pass in oldValue?
question 2: during the onEditableSave success callback, I need to prompt for an error message, as shown in figure

.

clipboard.png
this function can be realized in method 1, but not in method 2.
how can prompt messages be displayed in method 2?

Mar.28,2021

Hello, could you tell me how to write the parameters of the background receiving method of table? I don't know how to write it.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea4b22-1cf4.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea4b22-1cf4.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?