JavaScript modules in the Portal
Cookie
Support via cookies.js
Methods provided:
createCookie(name, value, days)
sets cookie
with name=value and days time to live. If you don't specify days,
then it is
only set for the duration of the session.
readCookie(name)
returns the
value for the cookie named by name or null if not found.
eraseCookie(name)
deletes the
cookie named by name.
Browser Capabilities Detection
via browser_capabilities.js
Uses the cookies.js module, but assumes it has
already been imported.
Creates a string (options) that represents all the
browser capabilities we are checking for in a |
(pipe) seperated string.
Methods provided:
checkBrowser()
sets the
cookie pcx_browser_cap with the string of options detected and then
submits the
browserCapForm form.
Calendar Picker via calendar.html
This provides a popup calendar that allows the user
to select a date.
See Portal::Methods generatePickerCode() method, type = 'calendar'.
Color Picker via
color_picker.html
This provides a popup color picker that provides for
selecting from a very large range of colors. Unfortunately, not
all colors are represented, but a smaller bar at the bottom provides
most of the colors I tend to use and are not in the larger selection. You can also specify the special css attributes transparent, inherit and !important.
See Portal::Methods generatePickerCode() method, type = 'color'.
Form Methods via form_methods.js
Include using the Portal::Methods includeCoreJSFiles() method.
Provides:
selectAll() - selects all items in a multi-select select box.
unSelectAll() - unselects all items in a multi-select select box.
getTimeStamp() - returns the current timestamp. mainly used for naming new popup windows.