noalyss  Version-6.7.2
Public Member Functions | Static Public Member Functions
IPoste Class Reference

show a button, for selecting a account and a input text for manually inserting an account the different value of table are More...

Inheritance diagram for IPoste:
HtmlInput

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 ()

Detailed Description

show a button, for selecting a account and a input text for manually inserting an account the different value of table are

Definition at line 79 of file class_iposte.php.


Constructor & Destructor Documentation

IPoste::__construct ( p_name = "",
p_value = "",
p_id = "" 
)

Reimplemented from HtmlInput.

Definition at line 82 of file class_iposte.php.

References disabled, javascript, name, readOnly, selected, size, table, and value.

    {
        $this->name=$p_name;
        $this->readOnly=false;
        $this->size=10;
        $this->value=$p_value;
        $this->selected="";
        $this->table=0;
        $this->disabled=false;
        $this->javascript="";
        $this->extra2="all";
        $this->attribute=array();
        $this->id=$p_id;
       

    }

Member Function Documentation

add a double click to poste to see his history

Note:
change $this->javascript

Definition at line 198 of file class_iposte.php.

References $r.

        {
                $r=' ondblclick="get_history_account(\''.$this->name.'\',\''.dossier::id().'\')"';
                $this->javascript=$r;
        }

print in html the readonly value of the widget

Definition at line 180 of file class_iposte.php.

References $r, name, and value.

Referenced by input().

    {
        $r=sprintf('<TD><input type="hidden" name="%s" value="%s">
                   %s

                   </TD>',
                   $this->name,
                   $this->value ,
                   $this->value
                  );

        return $r;

    }

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*

Returns:
a javascript surrounded by the tag <SCRIPT>

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.

    {
    }

The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations