Textpattern PHP Cross Reference Content Management Systems

Summary: /textpattern/textpattern.js - 2141 lines - 56616 bytes - Source - Print

Description: Collection of client-side tools.

Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 22 functions

checkCookies()
popWin()
poweredit()
verify()
selectall()
deselectall()
selectrange()
cleanSelects()
addEvent()
setCookie()
getCookie()
deleteCookie()
getElementsByClass()
toggleDisplay()
toggleDisplayHref()
setClassDisplay()
toggleClassRemember()
setClassRemember()
sendAsyncEvent()
txpAsyncLink()
txp_search()
txp_expand_collapse_all()

Functions

Functions that are not part of a class:

checkCookies()  line: 32
Checks if HTTP cookies are enabled.

return: {boolean}
popWin(url, width, height, options)  line: 55
Spawns a centred popup window.

param: {string}  url     The location
param: {integer} width   The width
param: {integer} height  The height
param: {string}  options A list of options
poweredit(elm)  line: 81
Legacy multi-edit tool.

param: {object} elm
verify(msg)  line: 119
Basic confirmation for potentially powerful choices (like deletion,
for example).

return: {boolean} TRUE if user confirmed the action
param: {string}  msg The message
selectall()  line: 132
Selects all multi-edit checkboxes.

deselectall()  line: 143
De-selects all multi-edit checkboxes.

selectrange()  line: 154
Selects a range of multi-edit checkboxes.

cleanSelects()  line: 178
?

addEvent(elm, evType, fn, useCapture)  line: 537
Adds an event handler.

See jQuery before trying to use this.

param: {object}  elm        The element to attach to
param: {string}  evType     The event
param: {object}  fn         The callback function
param: {boolean} useCapture Initiate capture
author: S.Andrew http://www.scottandrew.com/
setCookie(name, value, days)  line: 562
Sets a HTTP cookie.

param: {string}  name  The name
param: {string}  value The value
param: {integer} days  Expires in
getCookie(name)  line: 585
Gets a HTTP cookie's value.

return: {string} The cookie
param: {string} name The name
deleteCookie(name)  line: 612
Deletes a HTTP cookie.

param: {string} name The cookie
getElementsByClass(classname, node)  line: 623
Gets element by class.

See jQuery before trying to use this.

return: {object} Matching nodes
param: {string} classname The HTML class
param: {object} node      The node, defaults to the document
toggleDisplay(id)  line: 654
Toggles panel's visibility and saves the state to the server.

return: {boolean} Returns FALSE
param: {string}  id The element ID
toggleDisplayHref()  line: 703
Direct show/hide referred #segment; decorate parent lever.

setClassDisplay(className, show)  line: 727
Shows/hides matching elements.

param: {string}  className Targeted element's class
param: {boolean} show      TRUE to display
toggleClassRemember(className)  line: 739
Toggles panel's visibility and saves the state to a HTTP cookie.

param: {string} classname The HTML class
setClassRemember(className, force)  line: 755
Toggle visibility of matching elements based on a cookie value.

param: {string}  className The HTML class
param: {string}  force     The value
sendAsyncEvent(data, fn, format)  line: 773
Load data from the server using a HTTP POST request.

return: {object} this
param: {object} data   POST payload
param: {object} fn     Success handler
param: {string} format Response data format, defaults to 'xml'
txpAsyncLink(event)  line: 1169
Sends a link using AJAX and processes the HTML response.

return: {object} this
param: {object} options          Options
param: {string} options.dataType The response data type
param: {object} options.success  The success callback
param: {object} options.error    The error callback
txp_search()  line: 1621
Search tool.

txp_expand_collapse_all(ev)  line: 1681
Set expanded/collapsed nature of all twisty boxes in a panel.

The direction can either be 'expand' or 'collapse', passed
in as an argument to the handler.

param: {event} ev Event that triggered the function

title

Body