JQueryButton

Homepage: http://foswiki.org/Extensions/JQueryPlugin
Author(s): Michael Daum
Version: 1.3

This is a simple way to render nice buttons in Foswiki. It can be used to replace submit and reset buttons of html forms as well. FamFamFamContrib is recommended to display nice icons on buttons. Note, that this widget does not participate on the jquery theme roller. This is independent.

Macros

BUTTON{"text" ...} -- renders a nice button

  • Parameters:
    Parameter: Description:Sorted ascending Default:
    accesskey access key used for this button  
    class extra class: use foswikiRight or foswikiLeft to specify aligment; use cyan, red, green for different background colors; use simple for a non-3D button  
    id html id for this button  
    icon icon to be put on the left; note, this can be any icon attached to the {IconSearchPath}; see also VarJQICON  
    onclick javascript event triggered when clicking the button  
    onmouseover javascript event triggered when the pointer hovers over the button  
    onmouseout javascript event triggered when the pointer leaves the button  
    title popup title displayed when hovering over the button  
    "text", value="text" text to be put on this button  
    target topic to open when clicking on the button  
    type type of action to be performed; available actions are
    • button: (default) normal click button, target specified in target or href parameter
    • clear: clears all input fields in the form that contains the button
    • reset: resets all input fields in a form to their initial value
    • submit: submits the form that contains the button
    • save: same as submit but takes care of extra validation steps when saving a wiki topic
    button
    href url of the click target #
  • Example:
    %BUTTON{
        "%MAKETEXT{"Submit"}%"
        click="confirm('Are your sure?')"
      }%
      %BUTTON{
        "%MAKETEXT{"Cancel"}%"
        icon="cross"
        target="%WEB%.%TOPIC%"
      }% %CLEAR%
  • Expands as:
  • Note: BUTTONS are floating to the left by default. Take care to add a %CLEAR% after the %BUTTON{...}% so that further content does not overlap with the button.
  • Related: JQueryButton

Examples

OK Cancel Info Add Delete Globe
Topic revision: r1 - 20 Aug 2010 - 13:01:04 - ProjectContributor
 

This site is powered by FoswikiCopyright © by the contributing authors. All material on this site is the property of the contributing authors.
Ideas, requests, problems regarding Eugene Maker Space Wiki? Send feedback