[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpcompta-dev] r4851 - phpcompta/trunk/include
From: |
phpcompta-dev |
Subject: |
[Phpcompta-dev] r4851 - phpcompta/trunk/include |
Date: |
Thu, 31 May 2012 02:20:31 +0200 (CEST) |
Author: danydb
Date: 2012-05-31 02:20:30 +0200 (Thu, 31 May 2012)
New Revision: 4851
Modified:
phpcompta/trunk/include/class_icard.php
Log:
add the possibility to use an id : if on the same page, you have twice the same
name and same id, the javascriipt won't work
Modified: phpcompta/trunk/include/class_icard.php
===================================================================
--- phpcompta/trunk/include/class_icard.php 2012-05-31 00:19:25 UTC (rev
4850)
+++ phpcompta/trunk/include/class_icard.php 2012-05-31 00:20:30 UTC (rev
4851)
@@ -190,6 +190,7 @@
$this->value=($p_value==null)?$this->value:$p_value;
if ( $this->readOnly==true) return $this->display();
+ if ( ! isset($this->id )) $this->id=$this->name;
$attr=$this->get_js_attr();
@@ -203,7 +204,7 @@
$input=sprintf('<INPUT TYPE="Text" class="input_text" '.
' NAME="%s" ID="%s" VALUE="%s" SIZE="%d" %s %s>',
$this->name,
- $this->name,
+ $this->id,
$this->value,
$this->size,
$this->dblclick,
@@ -212,10 +213,10 @@
$ind=sprintf('<span id="%s_ind" class="autocomplete"
style="display:none">Un instant... <img src="image/loading.gif"
alt="Chargement..."/>'.
'</span>',
- $this->name);
+ $this->id);
$div=sprintf('<div id="%s_choices" class="autocomplete"></div>',
- $this->name);
+ $this->id);
$query=dossier::get().'&e='.urlencode($this->typecard);
@@ -223,7 +224,7 @@
'{paramName:"FID",minChars:1,indicator:null, '.
'callback:%s, '.
' afterUpdateElement:%s});} catch
(e){alert(e.message);};',
- $this->name,$this->name,$query,
+ $this->id,$this->id,$query,
$this->callback,
$this->fct);
@@ -276,7 +277,7 @@
function search()
{
if ( $this->readOnly==true) return '';
-
+ if ( ! isset($this->id )) $this->id=$this->name;
$button=new IButton($this->name.'_bt');
$a="";
foreach (array('typecard','jrn','label','price','tvaid') as $att)
@@ -284,8 +285,8 @@
if (isset($this->$att) )
$a.="this.".$att."='".$this->$att."';";
}
- if (isset($this->name))
- $a.="this.inp='".$this->name."';";
+ if (isset($this->id))
+ $a.="this.inp='".$this->id."';";
$a.="this.popup='ipop_card';";
$button->javascript=$a.' search_card(this)';
---
PhpCompta est un logiciel de comptabilité libre en ligne (full web)
Projet opensource http://www.phpcompta.eu
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpcompta-dev] r4851 - phpcompta/trunk/include,
phpcompta-dev <=