Template:Checkbox hide unhide

From Proteopedia

(Difference between revisions)
Jump to: navigation, search
(Undo revision 2942595 by Angel Herraez (Talk))
Line 21: Line 21:
<scriptWhenUnchecked>hide {{{Selection}}} or hidden</scriptWhenUnchecked>
<scriptWhenUnchecked>hide {{{Selection}}} or hidden</scriptWhenUnchecked>
<checked>true</checked>
<checked>true</checked>
-
<text>{{{Selection}}}</text>
+
<text>{{{Name}}}</text>
</jmolCheckbox>
</jmolCheckbox>
</jmol>
</jmol>
Line 32: Line 32:
<scriptWhenUnchecked>hide {{{Selection|all}}} or hidden</scriptWhenUnchecked>
<scriptWhenUnchecked>hide {{{Selection|all}}} or hidden</scriptWhenUnchecked>
<checked>true</checked>
<checked>true</checked>
-
<text> {{Name|Everything}} </text>
+
<text> {{{Name|Everything}}} </text>
</jmolCheckbox>
</jmolCheckbox>
</jmol>
</jmol>

Revision as of 09:55, 10 September 2020

This template is to make a checkbox that hides an object of a scene when unchecked, and displays them again when checked. The checkbox is checked by default, so it makes sense if the object is visible in the scene. To use the template, include the following in your Proteopedia text:

{{Checkbox hide unhide|Name="ATP molecule"|Selection="ATP"}}

In that spot, a checkbox will appear.

Under the hood, the following Wikimedia/Jmol script is inserted:

<jmol>
  <jmolCheckbox>
    <scriptWhenChecked>display displayed or {{{Selection}}}</scriptWhenChecked>
    <scriptWhenUnchecked>hide {{{Selection}}} or hidden</scriptWhenUnchecked>
    <checked>true</checked> 
    <text>{{{Name}}}</text>
  </jmolCheckbox>
</jmol>


Proteopedia Page Contributors and Editors (what is this?)

Karsten Theis, Angel Herraez

Personal tools