User Tools

Site Tools


en:public:developer:template_system:tags:htmlinput:tbutton

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

en:public:developer:template_system:tags:htmlinput:tbutton [2014/06/20 15:16]
admin created
en:public:developer:template_system:tags:htmlinput:tbutton [2015/01/18 22:34] (current)
svanderclock [Properties]
Line 1: Line 1:
-===== <#Button> =====+===== <#TButton> =====
  
-Create an HTML button from the given params+Tbutton is an object used to create html button
  
-==== Parameters ====+==== Properties ====
  
 ^ Name                                                           ^ Mandatory  ^ Description       ^        ^ Name                                                           ^ Mandatory  ^ Description       ^       
-| <html><span style="color:#008000">template</span></html>       | Yes        | The template that will be used to construct the button+| <html><span style="color:#008000">template</span></html>       | Yes        | The template that will be used to construct the button | 
-| <html><span style="color:#008000">href</span></html>           | No         | The href params of the link (<a **href=".."**>). This parameter will be store in the variable **<#button_href>** +| <html><span style="color:#008000">href</span></html>           | No         | The href params of the link (<a **href=".."**>) | 
-| <html><span style="color:#008000">onclick</span></html>        | No         | The onclick params of the link (<a **onclick=".."**>). This parameter will be store in the variable **<#button_onclick>** +| <html><span style="color:#008000">onclick</span></html>        | No         | The onclick params of the link (<a **onclick=".."**>) | 
-| <html><span style="color:#008000">caption</span></html>        | No         | The caption of the button (<a href="..">**caption**</a>). This parameter will be store in the variable **<#button_caption>** +| <html><span style="color:#008000">caption</span></html>        | No         | The caption of the button (<a href="..">**caption**</a>) | 
-| <html><span style="color:#008000">title</span></html>          | No         | The Title of the link (<a **title=".."**>). This parameter will be store in the variable **<#button_title>** +| <html><span style="color:#008000">title</span></html>          | No         | The Title of the link (<a **title=".."**>) | 
-| <html><span style="color:#008000">itemprop</span></html>       | No         | The itemprop value of the button (<a **itemprop=".."**>). This parameter will be store in the variable **<#button_itemprop>** +| <html><span style="color:#008000">itemprop</span></html>       | No         | The itemprop value of the button (<a **itemprop=".."**>) | 
-| <html><span style="color:#008000">extra_params</span></html>   | No         | Extra params for the link (<a **extra_params**>). This parameter will be store in the variable **<#button_extra_params>** +| <html><span style="color:#008000">extra_params</span></html>   | No         | Extra params for the link (<a **extra_params**>) | 
-| <html><span style="color:#008000">extra_class</span></html>    | No         | Extra Class for the link (<a class="Btn_main_class **extra_class**">). This parameter will be store in the variable **<#button_extra_class>** |+| <html><span style="color:#008000">extra_class</span></html>    | No         | Extra Class for the link (<a class="Btn_main_class **extra_class**">) 
 +| <html><span style="color:#008000">asInput</span></html>        | No         | Render the button as an **<input type="submit">** element | 
 +| <html><span style="color:#008000">type</span></html>           | No         | Specifies the type of button (**button**, **reset**, **submit**)  | 
 +===== Constructors =====
  
-==== Mechanism ====+^ Name                                                      ^ Type   ^ Description ^ 
 +| [[en:public:developer:template_system:tags:htmlinput:tbutton:create]]    | String | construct a Tbutton object | 
 + 
 +When the tag <#Button> is use without any path (like <#Button.caption> for exemple)  
 +then it's the Constructor of a TButton object that will be available via the var named Button.
  
-The function <#button> will simply create from it's parameters the variables **<#button_href>**, **<#button_onclick>**, **<#button_caption>**,  
-**<#button_title>**, **<#button_itemprop>**, **<#button_extra_params>**, **<#button_extra_class>** and them parse 
-the template and return the result 
  
 ==== Example ==== ==== Example ====
Line 25: Line 29:
 We define the template of MyButton.html like this : We define the template of MyButton.html like this :
  
-<code> +<code html
-<a class="MyButtonClass<#if condition"'<#button_extra_class>' <''"> <#button_extra_class><#endif>"  +<a class="ak_btn_2 ak_btn_2_9<#if condition="<#button.extra_class checksum=1>"> <#button.extra_class><#endif>"  
-   href="<#button_href>" +   href="<#button.href>" 
-   <#if condition"'<#button_onclick>' <> ''"> onclick="<#button_onclick>"<#endif> +   <#if condition="<#button.onclick checksum=1>"> onclick="<#button.onclick>"<#endif> 
-   <#if condition"'<#button_title>' <''"> title="<#button_title xmlencode=1>"<#endif> +   <#if condition="<#button.title checksum=1>"> title="<#button.title xmlencode=1>"<#endif> 
-   <#if condition"'<#button_itemprop>' <> ''"> itemprop="<#button_itemprop>"<#endif> +   <#if condition="<#button.itemprop checksum=1>"> itemprop="<#button.itemprop>"<#endif> 
-   <#if condition"'<#button_extra_params>' <''"> <#button_extra_params><#endif>> +   <#if condition="<#button.extra_params checksum=1>"> <#button.extra_params><#endif>> 
- +  <span> 
- <span class="l"></span> +    <#button.caption xmlencode=1> 
- <span class="m"><#button_caption xmlencode=1></span+  </span>
- <span class="r"></span> +
 </a> </a>
 </code> </code>
Line 42: Line 44:
 if we call this function if we call this function
  
-<code>+<code html>
 <#Button Template="MyButton.html" <#Button Template="MyButton.html"
          Href="MyPage.html"          Href="MyPage.html"
Line 51: Line 53:
  
 <code html> <code html>
-<a class="MyButtonClassHref=&quot;MyPage.html"+<a class="ak_btn_2 ak_btn_2_9"&gt;" href="MyPage.html"> 
- <span class="l"></span> +  <span> 
- <span class="m">Go to my Page</span> +    Go to my Page 
- <span class="r"></span>+  </span>
 </a> </a>
 </code> </code>
- 
en/public/developer/template_system/tags/htmlinput/tbutton.1403262979.txt.gz · Last modified: 2014/06/20 15:16 by admin