[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 63/219: Analytic : change the name and descri
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 63/219: Analytic : change the name and description in Ajax, improve esthetic |
Date: |
Mon, 18 Dec 2017 13:22:39 -0500 (EST) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 8246933e92b391bccf040fab23e12de6876f4650
Author: Dany De Bontridder <address@hidden>
Date: Tue Sep 26 23:12:54 2017 +0200
Analytic : change the name and description in Ajax, improve esthetic
---
html/ajax_misc.php | 4 +++-
html/js/infobulle.js | 2 +-
include/ajax/ajax_anc_plan.php | 2 ++
include/anc_pa.inc.php | 12 ++++--------
include/class/anc_plan.class.php | 29 ++++++++++++++++++++++-------
include/lib/message_javascript.php | 2 +-
include/template/anc_key_input.php | 2 +-
7 files changed, 34 insertions(+), 19 deletions(-)
diff --git a/html/ajax_misc.php b/html/ajax_misc.php
index 1f8bf74..82749d1 100644
--- a/html/ajax_misc.php
+++ b/html/ajax_misc.php
@@ -183,7 +183,9 @@ $path = array(
/* display the lettering , callebd from acc_ledger : dsp_letter*/
"dl"=>"ajax_display_letter",
// Add , delete update anc accounting
- "anc_accounting"=>"ajax_anc_accounting"
+ "anc_accounting"=>"ajax_anc_accounting",
+ // Update name and description
+ "anc_updatedescription"=>"ajax_anc_plan"
) ;
if (array_key_exists($op, $path)) {
diff --git a/html/js/infobulle.js b/html/js/infobulle.js
index e87b19b..41750dd 100644
--- a/html/js/infobulle.js
+++ b/html/js/infobulle.js
@@ -31,7 +31,7 @@ function showBulle(p_ctl){
var d=document.getElementById('bulle');
d.innerHTML=content[p_ctl];
d.style.top=posY+offsetY+"px";
- d.style.left=posX+offsetX+"px";
+ d.style.left=posX+offsetX-10+"px";
d.style.visibility="visible";
}
function getPosition(e)
diff --git a/include/ajax/ajax_anc_plan.php b/include/ajax/ajax_anc_plan.php
index 8e78c19..dca03dd 100644
--- a/include/ajax/ajax_anc_plan.php
+++ b/include/ajax/ajax_anc_plan.php
@@ -25,6 +25,8 @@ if (!defined('ALLOWED'))
require_once NOALYSS_INCLUDE . "/lib/inplace_edit.class.php";
+if ( $g_user->check_module("PLANANC ") ) die("forbidden");
+
$input = $http->request("input");
$action = $http->request("ieaction", "string", "display");
$pa_id=$http->post("id","numeric");
diff --git a/include/anc_pa.inc.php b/include/anc_pa.inc.php
index dda0426..1822757 100644
--- a/include/anc_pa.inc.php
+++ b/include/anc_pa.inc.php
@@ -30,6 +30,7 @@ if (!defined('ALLOWED'))
require_once NOALYSS_INCLUDE.'/class/anc_plan.class.php';
require_once NOALYSS_INCLUDE.'/class/anc_account_table.class.php';
require_once NOALYSS_INCLUDE.'/database/poste_analytique_sql.class.php';
+require_once NOALYSS_INCLUDE.'/lib/inplace_edit.class.php';
$ret="";
$str_dossier=Dossier::get();
@@ -117,23 +118,18 @@ if ($sa=="pa_detail")
$pa_id=$http->get("pa_id","numeric");
- $new=new Anc_Plan($cn, $_GET['pa_id']);
+ $new=new Anc_Plan($cn, $pa_id);
$wSa=HtmlInput::hidden("sa", "pa_update");
$new->get();
$ret.= '<div class="content">';
- $ret.= '<form method="post">';
- $ret.=dossier::hidden();
$ret.= $new->form();
$ret.= $wSa;
- $ret.=HtmlInput::submit("submit", _("Enregistre"));
- $ret.=HtmlInput::button_anchor(_('Efface'), '', 'remove_analytic_plan',
+ $ret.=HtmlInput::button_anchor(_('Efface ce plan'), '',
'remove_analytic_plan',
'onclick="return
confirm_box(\'remove_analytic_plan\',\'Effacer ?\',function ()
{window.location=\'do.php?ac='.$_REQUEST['ac'].'&pa_id='.$_GET['pa_id'].'&sa=pa_delete&'.$str_dossier.'\';})"',
'smallbutton');
- $ret.= '</form>';
-
//---------------------------------------------------------------------
// Detail now
// Use Manage_Table
@@ -207,7 +203,7 @@ if ($sa=='anc_menu')
echo '<TD>'.
'<a href="?'.$url.'">'.
h($line['name']);
-
+ echo " ";
echo h($line['description'])."</a>";
echo "</td>";
echo "</TR>\n";
diff --git a/include/class/anc_plan.class.php b/include/class/anc_plan.class.php
index f5ff21a..f7ee135 100644
--- a/include/class/anc_plan.class.php
+++ b/include/class/anc_plan.class.php
@@ -111,16 +111,31 @@ class Anc_Plan
}
function form()
{
+ $dossier_id=Dossier::id();
+ $wName=new IText('pa_name',$this->name,"pa_name");
+ $iName=new Inplace_Edit($wName);
+ $iName->set_callback("ajax_misc.php");
+ $iName->add_json_param("gDossier",$dossier_id);
+ $iName->add_json_param("action","anc_updatedescription");
+ $iName->add_json_param("op","anc_updatedescription");
+ $iName->add_json_param("id",$this->id);
+
+
+ $wDescription=new
IText('pa_description',$this->description,"pa_description");
+ $wDescription->size=50;
+ if ( $this->description == "") $wDescription->value=_("Aucune
description");
+ $iDescription=new Inplace_Edit($wDescription);
+ $iDescription->add_json_param("gDossier",$dossier_id);
+ $iDescription->add_json_param("op","anc_updatedescription");
+ $iDescription->add_json_param("action","anc_updatedescription");
+ $iDescription->set_callback("ajax_misc.php");
+ $iDescription->add_json_param("id",$this->id);
+
- $wName=new IText('pa_name',$this->name);
-
- $wName->table=1;
- $wDescription=new IText('pa_description',$this->description);
- $wDescription->table=1;
$wId=new IHidden("pa_id",$this->id);
$ret="<TABLE>";
- $ret.='<tr>'.td(_('Nom')).$wName->input().'</tr>';
- $ret.="<tr>".td(_('Description')).$wDescription->input()."</tr>";
+ $ret.='<tr>'.td(_('Nom')).'<td>'.$iName->input().'</td>'.'</tr>';
+
$ret.="<tr>".td(_('Description')).'<td>'.$iDescription->input().'</td>'."</tr>";
$ret.="</table>";
$ret.=$wId->input();
return $ret;
diff --git a/include/lib/message_javascript.php
b/include/lib/message_javascript.php
index 35919e2..560cf06 100644
--- a/include/lib/message_javascript.php
+++ b/include/lib/message_javascript.php
@@ -69,7 +69,7 @@ content[37]="<?php echo _("Les dates sont en format
DD.MM.YYYY")?>";
content[38]="<?php echo _("La numérotation est propre à chaque journal.
Laissez à 0 pour ne pas changer le numéro")?>";
content[39]="<?php echo _("Le préfixe des pièces doit être différent pour
chaque journal, on peut aussi utiliser l'année")?>";
content[40]="<?php echo _("Laissez à 0 pour ne pas changer le numéro")?>";
-content[41]="<?php echo _("Mettez le pourcentage à zéro pour effacer la
ligne")?>";
+content[41]="<?php echo _("Mettez le pourcentage <br> à zéro pour effacer la
ligne")?>";
content[42]="<?php echo _("Selectionnez le plan qui vous intéresse avant de
cliquer sur Recherche")?>";
</script>
\ No newline at end of file
diff --git a/include/template/anc_key_input.php
b/include/template/anc_key_input.php
index b1f71cb..87dfe95 100644
--- a/include/template/anc_key_input.php
+++ b/include/template/anc_key_input.php
@@ -62,8 +62,8 @@
endfor;
?>
<th style="text-align: right">
- <?php echo _('Pourcentage'); ?>
<?php echo HtmlInput::infobulle(41); ?>
+ <?php echo _('Pourcentage'); ?>
</th>
</tr>
<?php
- [Noalyss-commit] [noalyss] 217/219: Acc_Account : add function , improve function verify, (continued)
- [Noalyss-commit] [noalyss] 217/219: Acc_Account : add function , improve function verify, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 49/219: improve esthetic, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 136/219: Infobulle : avoid that the info balloon exceed limit of the display, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 24/219: Code improve : Replace HtmlInput::generate_id obsolete , fix bug in the filter for detail history, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 171/219: remove useless, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 61/219: Inplace_Edit : improve button + test, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 124/219: indentation, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 21/219: Improve debugging and improve manage_table_sql element will be added at the right place Manage_Table_SQL can work also with a SQL query or a view Icon place can be modified, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 34/219: rename scenario files, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 31/219: Task #0001443: opérations rapprochées : bug quand on utilise des tva avec autoliquidation Documentation, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 63/219: Analytic : change the name and description in Ajax, improve esthetic,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 116/219: Task #0001297: Perfectionnement menu COMPTA/ADV/OPEN, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 56/219: Task #1469 : Les esperluettes ne passent pas dans les libellés pour «opération identique»., Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 189/219: Task #1506 Fiche : max longueur du poste comptable = 40, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 195/219: Task #001381 : favori de filtre , ajout des favoris de filtre dans les recherches., Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 71/219: Task #0001475: Todo note : il manque le bouton "Fermer", Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 146/219: ANC : ANC_TABLE replace PGPLSQL procedure by Php functions : Anc_Table:create_temp_account Anc_Table:create_temp_card, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 102/219: task #0001386: Amélioration visuelle plan comptable - postes utilisés Ajout lien si poste comptable utilisé, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 32/219: Task #0001426: Distinction dans l'affichage des historiques des OD: libellé + fiche Ajout des qcodes pour l'historique par poste Ajout des postes comptables pour l'historique par Fiche Ajout des tiers Fait aussi pour les export PDF & CSV, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 149/219: HttpInput: protect against injection, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 47/219: Task #0001462: CA - apostrophe non affichée Use of ManageTableSQL for improving adding , update and delete analytic accounting, Dany De Bontridder, 2017/12/18