ผลต่างระหว่างรุ่นของ "CuneiModal"
ไม่มีความย่อการแก้ไข |
|||
บรรทัดที่ 4: | บรรทัดที่ 4: | ||
=== Modal Upper Macro & Modal Object === | === Modal Upper Macro & Modal Object === | ||
'''<syntaxhighlight lang="javascript"> | |||
modal_upper_half(modalid, type="table", title="Look up", | |||
class="primary", head_bg=false, size=false, | |||
first_focus=false) | |||
</syntaxhighlight>''' | |||
{| style="margin-left:20px;" | |||
|- style="vertical-align:top;" | |||
| style="width:120px;" | '''Parameters''' || '''DO NOT''' rely on argument order farther than ''modalid'' and ''type'', '''ALWAYS PROVIDE''' argument keywords. | |||
* '''modalid''' ''(str)'' | |||
* '''type''' ''(str)'': | |||
* '''title''' ''(str)'': | |||
* '''class''' and '''head_bg''' take the formats of ''class'' and ''custom_color'' arguments of CuneiForm's '''[[CuneiForm#Buttons & Submits|render_btn]]''' respectively. They dictates the colour of the table header as well as the color scheme of the full-form modal (when applicable). Note that, if both are given, '''head_bg''' takes precedence. | |||
* '''size''' ''(str)'': | |||
* '''first_focus''' ''(str)'': | |||
|} | |||
=== Modal Lower Macro === | === Modal Lower Macro === |
รุ่นแก้ไขเมื่อ 12:18, 20 มิถุนายน 2567
CuneiModals are basically pop-up windows with pre-defined scripts and event handlers to make them work fluently with CuneiForms and CuneiTables. They are purely client-side constructs, so there are no needs to define and initiate them on the server side. It is, however, necessary for the server-side developer to anticipate their existence and, in most cases, their IDs in the server-side code. (See attributes in_modal of CuneiForms and in_modal/bound_modal of CuneiTables.)
Design & Pre-made Scripts
Modal Upper Macro & Modal Object
modal_upper_half(modalid, type="table", title="Look up",
class="primary", head_bg=false, size=false,
first_focus=false)
Parameters | DO NOT rely on argument order farther than modalid and type, ALWAYS PROVIDE argument keywords.
|