Class Index

Classes


Namespace SSB.prefs.pane

The Preference Pane allows you to easily allow users to configure your scripts with parameters of your choice. By specifying the structure of your preferences and pointing them at keys you have used with SSB.prefs.getValue and SSB.prefs.setValue, the pane object will automagically generate UI with which the user can configure the preference-enabled variables of your script. For example, lets say your script checks a site for updates, and it does it every such and such interval. If you store this interval as a value with SSB.prefs.setValue, and define it as a variable of type integer using SSB.prefs.pane.addPrefs the user will be able to get a configuration dialog for your script where he can choose the interval, and that will update the values you pull with SSB.prefs.getValue. Its like SSB.prefs is your registry and SSB.prefs.pane is your registry-editor, but since you don't want to expose your entire registry to users, you tell the registry-editor what things to expose. different site options and enhance SSB experience.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
<static>
{JavaCode String}
SSB.prefs.pane.documentHandler
Use this field to set handler function or script code string for computing document object in which preference pane should be showed by calling SSB.prefs.pane.show or by clicking "Bubble Preferences" in the context menu.
<static>
{Hanler Function}
SSB.prefs.pane.onSubmit
Set handler function to be executed after user clicks "Save Settings" in the prefsPane.
Method Summary
Method Attributes Method Name and Description
<static>
{void}
SSB.prefs.pane.addPrefs(prefsPaneObjectsArray)
Adds configurable preferences variables to the prefsPane.
<static>
{boolean}
SSB.prefs.pane.hasPrefs()
Function that returns boolean value indicating whether the SSB.prefs.pane has decleared preference variables.
<static>
SSB.prefs.pane.init(prefsPaneObjectsArray)
Deprecated, use SSB.prefs.pane.addPrefs instead.
<static>
{boolean}
SSB.prefs.pane.isOpen()
Function that returns boolean value indicating whether the SSB.prefs.pane is open.
<static>
{void}
SSB.prefs.pane.show()
Shows preferences box to the user in the bubbles window with configurable variables that was previously defined with SSB.prefs.pane.addPrefs.
Namespace Detail
SSB.prefs.pane
Field Detail
<static> {JavaCode String} SSB.prefs.pane.documentHandler
Use this field to set handler function or script code string for computing document object in which preference pane should be showed by calling SSB.prefs.pane.show or by clicking "Bubble Preferences" in the context menu. This is useful when there is couple of iframes in the page that swapped between each other and the viewed document object is not constant.

<static> {Hanler Function} SSB.prefs.pane.onSubmit
Set handler function to be executed after user clicks "Save Settings" in the prefsPane.
SSB.prefs.pane.onSubmit = function() {
		alert("You have just saved preferences!");
}
Method Detail
<static> {void} SSB.prefs.pane.addPrefs(prefsPaneObjectsArray)
Adds configurable preferences variables to the prefsPane. Must be invoked before calling the SSB.prefs.pane.show function.
SSB.prefs.pane.addPrefs([
	{	type:'boolean',
		defVal:true,
		name:'isNotifiactionEnabled',
		title:'Enable notification of new emails'
	},
	{	type:'string',
		name:'name',
		title:'whats your name'
	},
	{	type:'options',
		name:'myOprions',
		title:'choose your car',
		defVal:'BMW',
		options:{
			MB:'Mercedes-Benz',
			BMW:'Bavarian Motor Works',
			nocar:'I don't have a car!'
		}
	}
]);
Parameters:
{Array} prefsPaneObjectsArray
Array of PrefsPaneObjects.
Returns:
{void}
See:
PrefsPaneObject

<static> {boolean} SSB.prefs.pane.hasPrefs()
Function that returns boolean value indicating whether the SSB.prefs.pane has decleared preference variables.
Returns:
{boolean}

<static> SSB.prefs.pane.init(prefsPaneObjectsArray)
Deprecated, use SSB.prefs.pane.addPrefs instead.
Parameters:
prefsPaneObjectsArray
Deprecated:
Use SSB.prefs.pane.addPrefs instead.

<static> {boolean} SSB.prefs.pane.isOpen()
Function that returns boolean value indicating whether the SSB.prefs.pane is open.
Returns:
{boolean}

<static> {void} SSB.prefs.pane.show()
Shows preferences box to the user in the bubbles window with configurable variables that was previously defined with SSB.prefs.pane.addPrefs. User can change these variables and save them. These variables can be accessed by their names with SSB.prefs.getValue function.
Returns:
{void}

Documentation generated by JsDoc Toolkit 2.0.beta2.3 on Tue Jun 24 2008 01:59:23 GMT+0300 (IDT)