[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 23/34: Documentation ManageTable.js
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 23/34: Documentation ManageTable.js |
Date: |
Sun, 5 Feb 2023 04:41:42 -0500 (EST) |
sparkyx pushed a commit to branch devel
in repository noalyss.
commit 553ac0a02c6c0cba7ee1016fd0f6a5bb627f27dd
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Sat Jan 28 19:12:02 2023 +0100
Documentation ManageTable.js
---
html/js/managetable.js | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/html/js/managetable.js b/html/js/managetable.js
index a9c4d4113..864b17230 100644
--- a/html/js/managetable.js
+++ b/html/js/managetable.js
@@ -64,6 +64,21 @@
How to call a function AFTER save ?
You set a function afterSaveFct like in the example, it will be trigger after
you submit the FORM
+ a function named afterSaveFct(r) where r is the row in HTML to display, with
a attribute ctl_pk_id which is the primary key and id of the row
+ Example :
+ @code
+ document_attach_obj.afterSaveFct=function(e) {
+ var ctl_pk_id=e.getAttribute("ctl_pk_id");
+ var formData = new FormData();
+ var file_data=document.getElementById('da_file_name');
+ formData.append('da_file_name', file_data.files[0]);
+ var xhr = new XMLHttpRequest();
+ xhr.open("POST", "ajax.php?p_id="+ctl_pk_id+"&do=upload_document", true);
+ xhr.send(formData);
+}
+ </script>
+ @endcode
+ As a hidden parameter the Manage_Table:object_name must be set
Example :
@code
@@ -231,7 +246,11 @@ var ManageTable = function (p_table_name)
the current object
</caption>
*
- *
+ * *Call the ajax with the action save , it is possible to call a
function after the save by creating
+ * + * a function named afterSaveFct(r) where r is the row in HTML to
display, with a attribute ctl_pk_id which is the
+ * + * primary key and id of the row
+ * + *
+ * + * As a hidden parameter the Manage_Table:object_name must be set
*
*/
this.save = function (form_id) {
- [Noalyss-commit] [noalyss] 02/34: Fix bug : return void, (continued)
- [Noalyss-commit] [noalyss] 02/34: Fix bug : return void, Dany De Bontridder, 2023/02/05
- [Noalyss-commit] [noalyss] 16/34: Documentation, Dany De Bontridder, 2023/02/05
- [Noalyss-commit] [noalyss] 14/34: Improve security : replace $_POST by Http_Input, Dany De Bontridder, 2023/02/05
- [Noalyss-commit] [noalyss] 24/34: Bug #0002231: "Payée par" - date non prise en compte, Dany De Bontridder, 2023/02/05
- [Noalyss-commit] [noalyss] 29/34: Bug #0002219: Compatibilité PHP 8.2 , 8.1 , 8.0, Dany De Bontridder, 2023/02/05
- [Noalyss-commit] [noalyss] 31/34: Merge branch 'master' into devel, Dany De Bontridder, 2023/02/05
- [Noalyss-commit] [noalyss] 32/34: Cosmetic #0002204: CA : balance croisée double - affichage brouillon, Dany De Bontridder, 2023/02/05
- [Noalyss-commit] [noalyss] 18/34: Cosmetic : improve CSS for enrich text, Dany De Bontridder, 2023/02/05
- [Noalyss-commit] [noalyss] 25/34: Merge branch 'devel', Dany De Bontridder, 2023/02/05
- [Noalyss-commit] [noalyss] 22/34: improve code : sql : document table action_gestion, Dany De Bontridder, 2023/02/05
- [Noalyss-commit] [noalyss] 23/34: Documentation ManageTable.js,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 30/34: Bug #0002219: Compatibilité PHP 8.2 , 8.1 , 8.0, Dany De Bontridder, 2023/02/05
- [Noalyss-commit] [noalyss] 33/34: Minimum PHP 7.4, Dany De Bontridder, 2023/02/05
- [Noalyss-commit] [noalyss] 20/34: Fix : if there is no stock there is an exception instead of a warning, Dany De Bontridder, 2023/02/05
- [Noalyss-commit] [noalyss] 27/34: Bug #0002206: CA - impossible de supprimer un poste analytique, Dany De Bontridder, 2023/02/05
- [Noalyss-commit] [noalyss] 11/34: NEW #0002205 Mode maintenance, Dany De Bontridder, 2023/02/05
- [Noalyss-commit] [noalyss] 12/34: Fix : generate_random_string returns always same value , due to a change in srand(), Dany De Bontridder, 2023/02/05
- [Noalyss-commit] [noalyss] 19/34: Documentation, Dany De Bontridder, 2023/02/05
- [Noalyss-commit] [noalyss] 34/34: esthetic and doc, Dany De Bontridder, 2023/02/05