noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 08/20: Improve documentation


From: dwm
Subject: [Noalyss-commit] [noalyss] 08/20: Improve documentation
Date: Sun, 10 Dec 2023 03:22:23 -0500 (EST)

sparkyx pushed a commit to branch master
in repository noalyss.

commit 4f1d7e155a56280d098b863e5267823ac5d465e0
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Sat Dec 2 18:20:27 2023 +0100

    Improve documentation
---
 include/lib/manage_table_sql.class.php | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/include/lib/manage_table_sql.class.php 
b/include/lib/manage_table_sql.class.php
index ae181b58c..98951e7e8 100644
--- a/include/lib/manage_table_sql.class.php
+++ b/include/lib/manage_table_sql.class.php
@@ -75,6 +75,26 @@
 
  * @endcode
  *
+ * The afterSaveFct is the function called after saving, the param is the HTML 
Element
+ @code PHP
+// to redirect : we take the pk_id and redirect to another location
+
+      $obj=$this->get_object_name();
+      $url=DRIVINGSCHOOL_URL;
+      $script=<<<EOF
+(function(){
+{$obj}.afterSaveFct=function(p_param) {
+   let student=p_param.attributes["ctl_pk_id"].value;
+   
window.location="{$url}/do.php?do=student&student_id="+student+"&act=detail";
+ }})();
+EOF;
+
+echo create_script($script);
+ {$obj}.afterSaveFct=function(p_param) {
+   let student=p_param.attributes["ctl_pk_id"].value;
+   
window.location="{$url}/do.php?do=student&student_id="+student+"&act=detail";
+ }})();
+@endcode
  */
 
 class Manage_Table_SQL



reply via email to

[Prev in Thread] Current Thread [Next in Thread]