[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 62/219: Analytic : change the name and descri
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 62/219: Analytic : change the name and description in Ajax |
Date: |
Mon, 18 Dec 2017 13:22:39 -0500 (EST) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 1ae344cc30c9e7ad15ac42f43b389cdd5a5a2460
Author: Dany De Bontridder <address@hidden>
Date: Tue Sep 26 22:57:28 2017 +0200
Analytic : change the name and description in Ajax
---
include/ajax/ajax_anc_plan.php | 62 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 62 insertions(+)
diff --git a/include/ajax/ajax_anc_plan.php b/include/ajax/ajax_anc_plan.php
new file mode 100644
index 0000000..8e78c19
--- /dev/null
+++ b/include/ajax/ajax_anc_plan.php
@@ -0,0 +1,62 @@
+<?php
+
+/*
+ * This file is part of NOALYSS.
+ *
+ * NOALYSS is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * NOALYSS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with NOALYSS; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+// Copyright Author Dany De Bontridder address@hidden
+///\file ajax answer to update or change name or description of an analytic
plan
+if (!defined('ALLOWED'))
+ die('Appel direct ne sont pas permis');
+
+require_once NOALYSS_INCLUDE . "/lib/inplace_edit.class.php";
+
+$input = $http->request("input");
+$action = $http->request("ieaction", "string", "display");
+$pa_id=$http->post("id","numeric");
+$answer = Inplace_Edit::build($input);
+$answer->add_json_param("gDossier", Dossier::id());
+$answer->set_callback("ajax_misc.php");
+$answer->add_json_param("action","anc_updatedescription");
+$answer->add_json_param("op","anc_updatedescription");
+$answer->add_json_param("id",$pa_id);
+
+$input=$answer->get_input();
+if ($action=="display") {
+ echo $answer->ajax_input() ;
+}
+if ($action=="ok") {
+ $value=$http->post("value");
+ if ( $input->name=="pa_name" && trim($input->value) == "")
+ {
+ echo _("Le nom ne peut être vide"),$answer->ajax_input();
+ }else {
+ if ($input->name=="pa_name") {
+ $cn->exec_sql(" update plan_analytique set pa_name=$1 where
pa_id=$2",array($value,$pa_id));
+ }
+ if ($input->name=="pa_description") {
+ if ( trim($value ) == "" ) $value=NULL;
+ $cn->exec_sql(" update plan_analytique set pa_description=$1 where
pa_id=$2",array($value,$pa_id));
+ if ( trim($value ) == NULL ) $value=_("Aucune description");
+ }
+ $answer->set_value($value);
+ echo $answer->input();
+ }
+}
+if ($action=="cancel") {
+ echo $answer->input();
+}
\ No newline at end of file
- [Noalyss-commit] [noalyss] 167/219: Space, (continued)
- [Noalyss-commit] [noalyss] 167/219: Space, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 138/219: Javascript : small error, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 100/219: CSS input field with focus 0001302: FICHES: mise en évidence champs NOM/POSTE/CODE, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 26/219: task #1438 Remplacement de HtmlInput par Http_Input, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 91/219: Esthetic : change button appearance, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 122/219: Anc ODS : check date is valid and comment not empty, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 199/219: Task #001381 : ergonomy after selecting a filter remove the box, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 187/219: fix bug with filter_card : encodeURI not needed, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 18/219: remove href=javascript:void(0) + HtmlInput::generate_id replaced by uniqid, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 90/219: Task #0001481: Encodage Vente, Achat, Fin ou OD 1. S'il n'y a qu'une seule catégorie de fiche , il n'est plus nécessaire d'afficher le choix (puisqu'il n'y en a qu'un) 2. Avoir pour chaque ligne un bouton ajout fiche, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 62/219: Analytic : change the name and description in Ajax,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 54/219: NEW : ICard , you can hide or show the accounting in the search box with the functions ICard->hide_accounting and ICard->show_accounting, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 67/219: Icon : for Inplace Edit field, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 166/219: Space, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 19/219: Replace global $http by new httpInput() to make the test of scenario working, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 128/219: Esthetic, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 99/219: CSS : button border, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 108/219: task #0001272: Rendre possible l'appel de la calculatrice depuis le fin fond d'une page., Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 174/219: space, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 114/219: Change max article in STOCK INV, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 16/219: Update test with new architecture, Dany De Bontridder, 2017/12/18