noalyss Version-9
Public Member Functions | Static Public Member Functions | Data Fields
IPopup Class Reference

create a popup in html above the current layer the html inside the popup cannot contain any floating elt as div.. More...

+ Inheritance diagram for IPopup:
+ Collaboration diagram for IPopup:

Public Member Functions

 __construct ($p_name)
 
 input ()
 
 set_attribute ($p_name, $p_val)
 set the attribute thanks javascript as the width, the position ... More...
 
 set_block ($p_block)
 set or not a blocking fond More...
 
 set_dragguable ($p_value)
 
 set_height ($p_val)
 
 set_title ($p_title)
 set the title of a ipopup thanks javascript and php mode More...
 
 set_width ($p_val)
 
 set_zindex ($p_val)
 
- 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 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

 $name
 
- 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

create a popup in html above the current layer the html inside the popup cannot contain any floating elt as div..

Definition at line 37 of file ipopup.class.php.

Constructor & Destructor Documentation

◆ __construct()

IPopup::__construct (   $p_name)

Definition at line 40 of file ipopup.class.php.

41 {
42 $this->name=$p_name;
43 $this->parameter='';
44 $this->attribute=array();
45 $this->drag=false;
46 $this->blocking=true;
47 }
$from_poste name

References name.

Member Function Documentation

◆ input()

IPopup::input ( )

Definition at line 104 of file ipopup.class.php.

105 {
106 $r="";
107 if ($this->blocking)
108 {
109 $r.=sprintf('<div id="%s_fond" class="popup_back">',$this->name);
110 $r.="</div>";
111 }
112 $javascript=sprintf("javascript:hideIPopup('%s')",
113 $this->name);
114
115
116 if ( isset($this->title) && trim($this->title) != "" )
117 {
118 $r.=sprintf('<div id="%s_border" id="%s_border" class="popup_border_title">',
119 $this->name,
120 $this->name);
121 $r.=sprintf('<span id="%s_">%s</span>',$this->name,$this->title);
122 }
123 else
124 {
125 $r.=sprintf('<div id ="%s_border" id="%s_border" class="popup_border_notitle">',
126 $this->name,
127 $this->name);
128 }
129 $r.='<div style="position:absolute;top:0px;right:10px;font-weight:normal;font-size:9px;color:black;text-align:right">';
130 $r.=sprintf('<a style="background-color:blue;color:white;text-decoration:none" href="%s">&#10761;</a></div>',
132
133 $r.=sprintf('<div id ="%s_content" id="%s_content" class="inner_box"> %s </div></div>',
134 $this->name,
135 $this->name,
136 $this->value);
137
138
139 /* Add properties at the widget */
140 $attr=$this->parameter;
141 for ($i=0;$i< count($this->attribute);$i++)
142 {
143 list($name,$value)=$this->attribute[$i];
144 $tmp1=sprintf("$('%s').%s='%s';",
145 $this->name,
146 $name,
147 $value);
148 $attr.=$tmp1;
149 }
150 $draggable='';
151 if ($this->drag==true)
152 {
153 /* add draggable possibility */
154 $draggable=sprintf(" new Draggable('%s_border',{starteffect:function(){
155 new Effect.Highlight('%s_border',{scroll:window,queue:'end'}); } });"
156 ,$this->name
157 ,$this->name);
158
159 }
160 $attr=create_script($attr.$draggable);
161 $r.=$attr;
162 return $r;
163 }
catch(Exception $exc) if(! $g_user->can_write_action($ag_id)) $r
$anc_filter title
create_script($p_string)
create the HTML for adding the script tags around of the script

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

+ Here is the call graph for this function:

◆ set_attribute()

IPopup::set_attribute (   $p_name,
  $p_val 
)

set the attribute thanks javascript as the width, the position ...

Parameters
$p_nameattribute name
$p_valval of the attribute
Note
add to the this->attribut, it will be used in input()

Reimplemented from HtmlInput.

Definition at line 89 of file ipopup.class.php.

90 {
91 $this->attribute[]=array($p_name,$p_val);
92 }

◆ set_block()

IPopup::set_block (   $p_block)

set or not a blocking fond

Parameters
$p_blockif true if you want to avoid access to background, accept true or false

Definition at line 67 of file ipopup.class.php.

68 {
69 $this->blocking=$p_block;
70 }

◆ set_dragguable()

IPopup::set_dragguable (   $p_value)

Definition at line 80 of file ipopup.class.php.

81 {
82 $this->drag=$p_value;
83 }

◆ set_height()

IPopup::set_height (   $p_val)

Definition at line 55 of file ipopup.class.php.

56 {
57 $js=sprintf('$("%s'.'_border").style.height="%s";',
58 $this->name,$p_val);
59 $this->parameter.=$js;
60
61 }

References $js, and name.

◆ set_title()

IPopup::set_title (   $p_title)

set the title of a ipopup thanks javascript and php mode

Parameters
titleof the IPopup
Returns
html string with js script

Definition at line 97 of file ipopup.class.php.

98 {
99 $this->title=$p_title;
100 $s=sprintf('$("%s_"+"title")="%s"',
101 $this->name,$this->title);
102 return create_script($s);
103 }

References $s, create_script(), name, and title.

+ Here is the call graph for this function:

◆ set_width()

IPopup::set_width (   $p_val)

Definition at line 48 of file ipopup.class.php.

49 {
50 $js=sprintf('$("%s'.'_border").style.width="%s";',
51 $this->name,$p_val);
52 $this->parameter.=$js;
53
54 }

References $js, and name.

◆ set_zindex()

IPopup::set_zindex (   $p_val)

Definition at line 72 of file ipopup.class.php.

73 {
74 $js=sprintf('$("%s'.'_border").style.zIndex=%d;',
75 $this->name,$p_val);
76 $js=sprintf('$("%s'.'_content").style.zIndex=%d;',
77 $this->name,$p_val);
78 $this->parameter.=$js;
79 }

References $js, and name.

◆ test_me()

static IPopup::test_me ( )
static

Definition at line 165 of file ipopup.class.php.

166 {
167 $select=new ISelect('a');
168 $select->value=array(array ('value'=>0,'label'=>'Première valeur'),
169 array ('value'=>0,'label'=>'Première valeur'),
170 array ('value'=>0,'label'=>'Première valeur'));
171 for ($e=0;$e<5;$e++)
172 {
173 echo $select->input();
174 if ($e%10 == 0 ) echo '<hr>';
175 }
176 $a=new IPopup('pop1');
177 $a->value="";
178 for ($e=0;$e<500;$e++)
179 {
180 $a->value.="<p>Il etait une fois dans un pays vraiment lointain où même plus loin que ça</p>";
181 }
182 echo $a->input();
183 echo '
184 <input type="button" onclick="hide(\'pop1\');hide(\'pop1_border\')" value="cacher">
185 <input type="button" onclick="showIPopup(\'pop1\')" value="montrer">
186 ';
187 $a=new IPopup('pop2');
188 $a->value='';
189 $a->title="Retrouvez une saucisse";
190 echo $a->input();
191 echo '
192 <input type="button" onclick="hide(\'pop2\');hide(\'pop2_border\')" value="cacher">
193 <input type="button" onclick="showIPopup(\'pop2\')" value="montrer">
194 ';
195
196 }
create a popup in html above the current layer the html inside the popup cannot contain any floating ...
Html Input , create a tag <SELECT> ... </SELECT> if readonly == true then display the label correspon...

References $a, $e, and $select.

Field Documentation

◆ $name

IPopup::$name

name name and id of the div

Definition at line 39 of file ipopup.class.php.

Referenced by input().


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