new ExtraPost(args)
Optionally post a in a thread
| Name | Type | Description |
|---|---|---|
args |
Object | post arguments |
Example
var post = new ExtraPost({
// default values (can be changed with val()):
namespace : 'variables namespace', // namespace to retrieve variables from
title_variable : 'Title variable', // variable to use for PM title or infraction reason
bbcode_variable: 'BBCode variable', // variable to use for BBCode
keys : {...}, // keys to use when resolving variables
// these two usually aren't used:
// title : 'initial text for PM title',
// bbcode: 'initial text for BBCode',
thread_desc: 'name of thread to show the user',
thread_id : 12345, // post will be placed in this thread
visible : true, // or false to hide
checked : true, // or false to uncheck
text : 'message to display'
// other data needed for the widget to function:
v : variables, // Variables object
bb : bb, // BulletinBoard object
callback : function(keys) { ... }, // called with the current data
container : widget_appended_to_this
});
Extends
Methods
-
Action built by this selector
-
Returns:
Type Description Action -
inherited reset_value(current_value, name){string}
Update the "reset" data and get a stored value
-
this should be called by a "reset" button, to reset the contents of an input to a recent value
Name Type Description current_valuestring current value as entered by the user (which we can reset to) namestring variable name Returns:
Type Description string new value -
inherited resolve_value(name, name_suffix, keys, parser, value)
Resolve one of the values defined in the constructor
-
Name Type Description namestring variable name name_suffixstring array appended to variable name during resolution keysObject optional keys to use when resolving parserstring optional how to parse the variable valuestring | null (if defined) or null (otherwise) -
inherited set_value(current_value, name, name_suffix, keys, parser, new)
Update the "reset" data and get a new value (if changed)
-
Name Type Description current_valuestring current value as entered by the user (which we can reset to) namestring variable name name_suffixstring array appended to variable name during resolution keysObject optional keys to use when resolving parserstring optional how to parse the variable newstring optional value (if defined and in need of an update) -
inherited update_previous_values()
Specify new values for reset_value()
-
records values from this.val(), will return them on reset
-
val(value){Object}
Get/set widget's values
-
Name Type Description valueObject new value Returns:
Type Description Object (new) value Example
ns.val({ visible : true, // or false to hide checked : true, // or false to uncheck text : 'message to display' });