noalyss Version-9
Public Member Functions | Static Public Member Functions | Data Fields
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:
+ Collaboration diagram for IPoste:

Public Member Functions

 __construct ($p_name="", $p_value="", $p_id="")
 
 dbl_click_history ()
 add a double click to poste to see his history More...
 
 display ()
 print in html the readonly value of the widget More...
 
 dsp_button ()
 
 get_js_attr ()
 create the javascript for adding the javascript properties onto the button More...
 
 input ($p_name=null, $p_value=null)
 show the html input of the widget More...
 
- Public Member Functions inherited from HtmlInput
 __construct ($p_name="", $p_value="", $p_id="")
 
 __toString ()
 
 get_js_attr ()
 you can add attribute to this in javascript this function is a wrapper and create a script (in js) to modify "this" (in javascript) with the value of obj->attribute from PHP. More...
 
 get_node_attribute ()
 Insert attribute inside a INPUT TYPE, these attribute can be retrieved in javascript with element.getAttribute or changed with element.setAttribute example insert my_attribute into a checkbox <input type="checkbox" "my_attribute"="XX"> More...
 
 get_value ()
 Return the value of input (IText, INum,...) More...
 
 make_object_deprecated ($p_name=null)
 Make a JSON object, this method create a javascript object with the attribute set, it returns a javascript string with the object. More...
 
 set_attribute ($p_name, $p_value)
 set the extra javascript property for the INPUT field More...
 
 set_value ($p_string)
 Set the value of input (IText, INum,...) More...
 
 setReadOnly ($p_read)
 

Static Public Member Functions

static ipopup ($p_name)
 
static test_me ()
 
- Static Public Member Functions inherited from HtmlInput
static anchor ($p_text, $p_url="", $p_js="", $p_style=' class="line" ', $p_title="click", array $p_attribute=[])
 Return a simple anchor with a url or a javascript if $p_js is not null then p_url will be javascript:void(0) we don't add the event onclick. More...
 
static anchor_action ($action, $javascript, $id=NULL, $p_class="button", $p_symbole="")
 Anchor Html with javascript. More...
 
static anchor_close ($div, $p_js="")
 Return a html string with an anchor which close the inside popup. More...
 
static anchor_empty ($p_text, $p_id, $p_title="")
 let you create only a link and set an id on it. More...
 
static anchor_hide ($action, $javascript)
 Return a html string with an anchor to hide a div, put it in the right corner. More...
 
static array_to_hidden ($array, $global_array)
 transform request data to hidden More...
 
static array_to_string ($array, $global_array, $start="?")
 transform request data to string More...
 
static button ($p_name, $p_value, $p_javascript="", $p_class="smallbutton")
 
static button_action ($action, $javascript, $id=NULL, $p_class="button", $p_symbole="")
 button Html with javascript More...
 
static button_action_add ()
 
static button_action_remove_operation ($p_operation)
 
static button_anchor ($p_label, $p_value, $p_name="", $p_javascript="", $p_class="smallbutton")
 create a button with a ref More...
 
static button_choice_ledger ($p_array)
 
static button_close ($div_name, $class='smallbutton')
 close button for the HTML popup More...
 
static button_hide ($div_name)
 Hide the HTML popup. More...
 
static button_image ($javascript, $id="xx", $p_class='class="button"', $p_image="")
 button Html image More...
 
static calendar_zoom ($obj)
 Zoom the calendar. More...
 
static card_detail ($p_qcode, $pname='', $p_style="", $p_nohistory=false, $nofollowup=false)
 show the detail of a card More...
 
static default_value ($ind, $default, $array)
 return default if the value if the value doesn't exist in the array More...
 
static default_value_get ($ind, $default)
 return default if the value if the value doesn't exist in $_GET use HttpInput instead More...
 
static default_value_post ($ind, $default)
 return default if the value if the value doesn't exist in $_POST use HttpInput instead More...
 
static default_value_request ($ind, $default)
 return default if the value if the value doesn't exist in $_REQUEST use HttpInput instead More...
 
static detail_action ($ag_id, $p_mesg, $p_modify=1)
 return an anchor to view the detail of an action More...
 
static detail_modele_document ($p_id, $p_mesg)
 return a string containing the html code for calling the modifyModeleDocument More...
 
static detail_op ($p_jr_id, $p_mesg)
 return a string containing the html code for calling the modifyOperation More...
 
static display_periode ($p_id)
 
static errorbulle ($p_comment)
 
static extension ()
 
static filter_list ($p_list_id)
 Display a field for searching an element in a list, the searchable text must be in an element with the className search-content. More...
 
static filter_table ($p_table_id, $p_col, $start_row)
 filter the rows in a table and keep the colored row in alternance More...
 
static filter_table_form ($p_table_id, $p_col, $start_row, $p_name, $p_old_value)
 
static followup_card_button ($f_id, $p_mesg)
 display a div with the history of the card More...
 
static generate_id ($p_prefix)
 generate an unique id for a widget, More...
 
static get_to_hidden ($array)
 transform $_GET data to hidden More...
 
static get_to_string ($array, $start="?")
 transform $_GET data to string More...
 
static hidden ($p_name, $p_value, $p_id="")
 
static history_account ($p_account, $p_mesg, $p_style="", $p_exercice="")
 display a div with the history of the account More...
 
static history_anc_account ($p_account, $p_mesg, $p_style="", $p_exercice="")
 display a div with the history of the analytic account More...
 
static history_card ($f_id, $p_mesg, $p_style="", $p_exercice="")
 display a div with the history of the card More...
 
static history_card_button ($f_id, $p_mesg, $p_exercice="")
 display a div with the history of the card More...
 
static image_click ($p_image, $p_js, $p_message, $p_class="")
 Image to click ,. More...
 
static json_to_hidden ($p_json)
 transform a json to hidden More...
 
static post_to_hidden ($array)
 transform $_POST data to hidden More...
 
static post_to_string ($array)
 transform $_POST data to string More...
 
static print_window ()
 Javascript to print the current window. More...
 
static remove_stock ($p_id, $p_mesg)
 return a string containing the html code for calling the removeStock More...
 
static request_to_hidden (array $array)
 transform $_REQUEST data to hidden More...
 
static request_to_string ($array, $start="?")
 transform $_REQUEST data to string More...
 
static reset ($p_value)
 
static select_cat ($array_cat)
 create a hidden plus button to select the cat of ledger More...
 
static select_stock ($p_cn, $p_name, $p_mode)
 Create an ISelect object containing the available repository for reading or writing. More...
 
static show_receipt_document ($p_jr_id, $p_name="")
 Returns HTML code for displaying a icon with a link to a receipt document from the ledger. More...
 
static show_reconcile ($p_div, $let, $span="")
 
static simple_array_to_hidden ($array)
 Transform a double array as a HTML string with hidden html value array has the formarray ["name"]="x",array['value']="y") the key name will be the hidden input name;. More...
 
static submit ($p_name, $p_value, $p_javascript="", $p_class="smallbutton")
 
static title_box ($p_name, $p_div, $p_mod="close", $p_js="", $p_draggable="n", $p_enlarge='n')
 Title for boxes, you can customize the symbol thanks symbol with the mode "custom". More...
 
static warnbulle ($p_comment)
 

Data Fields

 $jrn
 concerned ledger More...
 
 $nb_row
 
- Data Fields inherited from HtmlInput
 $attribute
 
 $css_size
 
 $ctrl
 
 $disabled
 
 $extra
 
 $extra2
 
 $heigh
 
 $id
 
 $javascript
 
 $label
 
 $name
 
 $readOnly
 
 $require
 
 $selected
 
 $size
 
 $style
 
 $tabindex
 
 $table
 
 $type
 
 $value
 
 $width
 

Detailed Description

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

echo js_include('prototype.js');

Definition at line 74 of file iposte.class.php.

Constructor & Destructor Documentation

◆ __construct()

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

Reimplemented from HtmlInput.

Definition at line 78 of file iposte.class.php.

79 {
80 $this->name=$p_name;
81 $this->readOnly=false;
82 $this->size=15;
83 $this->value=$p_value;
84 $this->selected="";
85 $this->table=0;
86 $this->disabled=false;
87 $this->javascript="";
88 $this->extra2="all";
89 $this->extra="";
90 $this->attribute=array();
91 $this->id=$p_id;
92 $this->nb_row=1;
93
94 }
$select selected
$ret javascript
$name size
$from_poste name
$all table
$icard readOnly
$account nb_row
$all disabled
$poste extra

References $p_id, disabled, extra, javascript, name, nb_row, readOnly, selected, size, table, and value.

Member Function Documentation

◆ dbl_click_history()

IPoste::dbl_click_history ( )

add a double click to poste to see his history

Note
change $this->javascript

Definition at line 197 of file iposte.class.php.

198 {
199 $r=' ondblclick="get_history_account(\''.$this->id.'\',\''.dossier::id().'\')"';
200 $this->javascript=$r;
201 }
catch(Exception $exc) if(! $g_user->can_write_action($ag_id)) $r

References $r.

◆ display()

IPoste::display ( )

print in html the readonly value of the widget

Definition at line 179 of file iposte.class.php.

180 {
181 $r=sprintf('<TD><input type="hidden" name="%s" value="%s">
182 %s
183
184 </TD>',
185 $this->name,
186 $this->value ,
187 $this->value
188 );
189
190 return $r;
191
192 }

References $r, name, and value.

Referenced by input().

◆ dsp_button()

IPoste::dsp_button ( )

Definition at line 126 of file iposte.class.php.

127 {
128 $this->id=($this->id=="")?$this->name:$this->id;
129 $javascript='search_accounting(this)';
130 $button=Icon_Action::icon_magnifier($this->id."_bt", $javascript);
131 /* add the property */
132 $sc=$this->get_js_attr();
133 return $button.$sc;
134 }
get_js_attr()
create the javascript for adding the javascript properties onto the button
static icon_magnifier($id, $p_javascript, $p_style="")
Display a icon with a magnify glass.
$sc
Definition: upgrade.inc.php:42

References HtmlInput\$javascript, $sc, get_js_attr(), Icon_Action\icon_magnifier(), and name.

Referenced by input().

+ Here is the call graph for this function:

◆ get_js_attr()

IPoste::get_js_attr ( )

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 109 of file iposte.class.php.

110 {
111 $attr="";
112 /* Add properties at the widget */
113 for ($i=0;$i< count($this->attribute);$i++)
114 {
115 list($name,$value)=$this->attribute[$i];
116 $tmp1=sprintf("$('%s_bt').%s='%s';",
117 $this->id,
118 $name,
119 $value);
120 $attr.=$tmp1;
121 }
123 return $attr;
124 }
create_script($p_string)
create the HTML for adding the script tags around of the script

References $attr, $i, HtmlInput\$name, HtmlInput\$value, and create_script().

Referenced by dsp_button().

+ Here is the call graph for this function:

◆ input()

IPoste::input (   $p_name = null,
  $p_value = null 
)

show the html input of the widget

Definition at line 136 of file iposte.class.php.

137 {
138 $this->name=($p_name==null)?$this->name:$p_name;
139 $this->value=($p_value==null)?$this->value:$p_value;
140 if ( $this->readOnly==true) return $this->display();
141 //--
142 if ( ! isset($this->ctrl) ) $this->ctrl='none';
143
144 if ( ! isset($this->javascript)) $this->javascript="";
145 $this->id=($this->id=="")?$this->name:$this->id;
146
147 /* create the text */
148 if ( $this->nb_row ==1 ) {
149 $itext=new IText($this->name,$this->value,$this->id);
150 }else {
151 $itext=new ITextarea($this->name, $this->value, $this->id);
152 $itext->style=$this->extra;
153 }
154
155 if ( isset ($this->css_size))
156 $itext->css_size=$this->css_size;
157 else
158 $itext->size=$this->size;
159
160 $itext->javascript=$this->javascript;
161 /* create the button */
162 $ibutton=$this->dsp_button();
163 if ( $this->table==3)
164 {
165 $r='<table>'.tr(td($itext->input()).td($ibutton));
166 $r.='</table>';
167 return $r;
168 }
169 $r=$itext->input().$ibutton;
170 if ( $this->table==1) $r=td($r);
171
172 return $r;
173
174
175 //--
176
177 }
td($p_string='', $p_extra='')
surround the string with td
Definition: ac_common.php:83
$description css_size
display()
print in html the readonly value of the widget
Html Input.
Definition: itext.class.php:30
Manage the TEXTAREA html element.

References HtmlInput\$css_size, HtmlInput\$extra, $itext, HtmlInput\$javascript, $r, HtmlInput\$size, css_size, display(), dsp_button(), javascript, name, nb_row, readOnly, table, td(), and value.

+ Here is the call graph for this function:

◆ ipopup()

static IPoste::ipopup (   $p_name)
static

Definition at line 96 of file iposte.class.php.

97 {
98 $ip=new IPopup($p_name);
99 $ip->title='Plan comptable';
100 $ip->value='';
101 $ip->set_height('80%');
102 $ip->set_zindex(20);
103 return $ip->input();
104 }
create a popup in html above the current layer the html inside the popup cannot contain any floating ...

◆ test_me()

static IPoste::test_me ( )
static

Definition at line 202 of file iposte.class.php.

203 {
204 }

Field Documentation

◆ $jrn

IPoste::$jrn

concerned ledger

Definition at line 77 of file iposte.class.php.

◆ $nb_row

IPoste::$nb_row

Definition at line 76 of file iposte.class.php.


The documentation for this class was generated from the following file: