trabajando en editar plantillas

This commit is contained in:
2024-12-04 12:34:10 +01:00
parent 3fb37af0f8
commit a7cda851f0
15 changed files with 1024 additions and 520 deletions

View File

@ -1,6 +1,6 @@
let TableEditor = function (
table,
url,
url = "",
headers,
idSrc,
fields) {
@ -16,15 +16,26 @@ let TableEditor = function (
this.init = function () {
this.editor = new $.fn.dataTable.Editor( {
ajax: {
url: url,
headers: headers,
},
table : table,
idSrc: idSrc,
fields: fields,
});
if (url == "") {
this.editor = new $.fn.dataTable.Editor({
table: table,
idSrc: idSrc,
fields: fields,
});
}
else {
this.editor = new $.fn.dataTable.Editor({
ajax: {
url: url,
headers: headers,
},
table: table,
idSrc: idSrc,
fields: fields,
});
}
};
}