internal package Foswiki::Plugins::JQueryPlugin::Plugins
On this page:
- internal package Foswiki::Plugins::JQueryPlugin
- init()
- ObjectMethod createPlugin( $pluginName, ... ) → $plugin
- ObjectMethd createTheme ($themeName, $url) -> $boolean
- ObjectMethod registerPlugin( $pluginName, $class ) → $descriptor
- ObjectMethod registerTheme( $themeName, $url ) → $descriptor
- ObjectMethod load ( $pluginName ) → $plugin
- ObjectMethod expandVariables( $format, %params) → $string
- ObjectMethod getIconUrlPath ( $iconName ) → $pubUrlPath
- ClassMethod getPlugins () → @plugins
- ClassMethod getRandom () → $integer
internal package Foswiki::Plugins::JQueryPlugin
Container for jQuery and plugins
init()
initialize plugin container ObjectMethod createPlugin( $pluginName, ... ) → $plugin
Helper method to establish plugin dependencies. See load().
ObjectMethd createTheme ($themeName, $url) -> $boolean
Helper method to switch on a theme. Returns true if$themeName has been loaded successfully. Note that a previously
loaded theme will be replaced with the new one as there can only
be one theme per html page. The $url parameter optionally specifies
from where to load the theme. It defaults to the url registered
in configure for the named theme.
ObjectMethod registerPlugin( $pluginName, $class ) → $descriptor
Helper method to register a plugin.
ObjectMethod registerTheme( $themeName, $url ) → $descriptor
Helper method to register a theme.
finalizer
ObjectMethod load ( $pluginName ) → $plugin
Loads a plugin and runs its initializer.
parameters -
$pluginName: name of plugin
-
$plugin: returns the plugin object or false if instantiating the plugin failed
ObjectMethod expandVariables( $format, %params) → $string
Helper function to expand standard escape sequences $percnt, $nop,
$n and $dollar.
-
$format: format string to be expaneded -
%params: optional hash array containing further key-value pairs to be expanded as well, that is all occurences of$keywill be replaced by itsvalueas defined in %params -
$string: returns the resulting text
ObjectMethod getIconUrlPath ( $iconName ) → $pubUrlPath
Returns the path to the named icon searching along a given icon search path.
This path can be in $Foswiki::cfg{JQueryPlugin}{IconSearchPath} or will fall
back to FamFamFamSilkIcons, FamFamFamSilkCompanion1Icons,
FamFamFamFlagIcons, FamFamFamMiniIcons, FamFamFamMintIcons As you see
installing Foswiki:Extensions/FamFamFamContrib would be nice to have.
= $iconName: name of icon; you will have to know the icon name by heart as listed in your
favorite icon set, meaning there's no mapping between something like "semantic" and "physical" icons
= $pubUrlPath: the path to the icon as it is attached somewhere in your wiki or the empty
string if the icon was not found
ClassMethod getPlugins () → @plugins
returns a list of all known plugins
ClassMethod getRandom () → $integer
returns a random positive integer between 1 and 10000.
this can be used to
generate html element IDs which are not
allowed to clash within the same html page,
even not when it got extended via ajax.
History: r1 - 19 Apr 2011 - 03:38:03 - ProjectContributor