noalyss
Version-6.7.2
|
show a button, for selecting a account and a input text for manually inserting an account the different value of table are More...
Public Member Functions | |
__construct ($p_name="", $p_value="", $p_id="") | |
dbl_click_history () | |
add a double click to poste to see his history | |
display () | |
print in html the readonly value of the widget | |
dsp_button () | |
get_js_attr () | |
create the javascript for adding the javascript properties onto the *button* | |
input ($p_name=null, $p_value=null) | |
show the html input of the widget | |
Static Public Member Functions | |
static | ipopup ($p_name) |
static | test_me () |
show a button, for selecting a account and a input text for manually inserting an account the different value of table are
// must be done BEFORE any FORM echo js_include('prototype.js'); echo js_include('scriptaculous.js'); echo js_include('effects.js'); echo js_include('controls.js'); echo js_include('dragdrop.js'); echo js_include('accounting_item.js'); require_once('class_iposte.php'); // In the FORM $text=new IPoste(); $text->name('field'); $text->value=$p_res[$i]['pvalue']; $text->set_attribute('gDossier',Dossier::id()); $text->set_attribute('jrn',0); $text->set_attribute('account','field');
Definition at line 79 of file class_iposte.php.
IPoste::__construct | ( | $ | p_name = "" , |
$ | p_value = "" , |
||
$ | p_id = "" |
||
) |
add a double click to poste to see his history
Definition at line 198 of file class_iposte.php.
References $r.
{ $r=' ondblclick="get_history_account(\''.$this->name.'\',\''.dossier::id().'\')"'; $this->javascript=$r; }
IPoste::display | ( | ) |
Definition at line 129 of file class_iposte.php.
References get_js_attr(), and name.
Referenced by input().
{ $this->id=($this->id=="")?$this->name:$this->id; $ib=new ISmallButton($this->id.'_bt'); $ib->label=_('Recherche'); // $ib->extra='style="background:url(image/search.png) no-repeat;background-position:0;padding-left:36px;"'; $ib->javascript='search_poste(this)'; /* add the property */ $sc=$this->get_js_attr(); return $ib->input().$sc; }
create the javascript for adding the javascript properties onto the *button*
Reimplemented from HtmlInput.
Definition at line 112 of file class_iposte.php.
References HtmlInput\$name, HtmlInput\$value, and create_script().
Referenced by dsp_button().
{ $attr=""; /* Add properties at the widget */ for ($i=0;$i< count($this->attribute);$i++) { list($name,$value)=$this->attribute[$i]; $tmp1=sprintf("$('%s_bt').%s='%s';", $this->id, $name, $value); $attr.=$tmp1; } $attr=create_script($attr); return $attr; }
IPoste::input | ( | $ | p_name = null , |
$ | p_value = null |
||
) |
show the html input of the widget
Definition at line 142 of file class_iposte.php.
References $itext, $r, css_size, display(), dsp_button(), javascript, name, readOnly, size, table, td(), and value.
{ $this->name=($p_name==null)?$this->name:$p_name; $this->value=($p_value==null)?$this->value:$p_value; if ( $this->readOnly==true) return $this->display(); //-- if ( ! isset($this->ctrl) ) $this->ctrl='none'; if ( ! isset($this->javascript)) $this->javascript=""; $this->id=($this->id=="")?$this->name:$this->id; /* create the text */ $itext=new IText($this->name,$this->value,$this->id); if ( isset ($this->css_size)) $itext->css_size=$this->css_size; else $itext->size=$this->size; $itext->javascript=$this->javascript; /* create the button */ $ibutton=$this->dsp_button(); if ( $this->table==3) { $r='<table>'.tr(td($itext->input()).td($ibutton)); $r.='</table>'; return $r; } $r=$itext->input().$ibutton; if ( $this->table==1) $r=td($r); return $r; //-- }
static IPoste::ipopup | ( | $ | p_name | ) | [static] |
Definition at line 99 of file class_iposte.php.
{ $ip=new IPopup($p_name); $ip->title='Plan comptable'; $ip->value=''; $ip->set_height('80%'); $ip->set_zindex(20); return $ip->input(); }
static IPoste::test_me | ( | ) | [static] |
Definition at line 203 of file class_iposte.php.
{ }