blueshoes php application framework and cms            javascript_components
[ class tree: javascript_components ] [ index: javascript_components ] [ all elements ]

Class: Bs_LimitedTextarea

Source Location: /components/limitedtextarea/Bs_LimitedTextarea.class.js.php

Class Overview


Includes (+Dependences):


Author(s):

Copyright:

  • blueshoes.org

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 35]
Includes (+Dependences):


1 <script type="text/javascript" src="/_bsJavascript/core/lang/Bs_Misc.lib.js"></script>
2 <script type="text/javascript" src="/_bsJavascript/components/limitedtextarea/Bs_LimitedTextarea.class.js"></script>
3 <script type="text/javascript" src="/_bsJavascript/core/gfx/Bs_ColorUtil.lib.js"></script>
the Bs_ColorUtil.lib.js is only needed if you use the setBgColorWarning() feature.




Tags:

copyright:  blueshoes.org
author:  andrej arn <at blueshoes dot org>


[ Top ]


Class Variables

$infolineCssClass =

[line 59]

if specified then this css class will be used on the infoline span.



Tags:

var:  infolineCssClass
access:  public

Type:   string


[ Top ]

$infolineCssStyle =

[line 66]

if specified then this css style will be used on the infoline span.



Tags:

var:  infolineCssStyle
access:  public

Type:   string


[ Top ]

$infolineText =  'Characters remaining:'

[line 52]

The text displayed to the user, next to the number of remaining characters.



Tags:

var:  infolineText
access:  public

Type:   string


[ Top ]

$numberCssClass =

[line 73]

if specified then this css class will be used on the "chars-left" number div.



Tags:

var:  numberCssClass
access:  public

Type:   string


[ Top ]

$numberCssStyle =

[line 80]

if specified then this css style will be used on the "chars-left" number div.



Tags:

var:  numberCssStyle
access:  public

Type:   string


[ Top ]

$useProgressBar =  false

[line 109]

if you want to use the progress bar feature, it shows how much of the available space you've used with your text.



Tags:

var:  useProgressBar
status:  experimental
access:  public

Type:   bool


[ Top ]

$_constructor =

[line 420]


Type:   mixed


[ Top ]



Class Methods


method checkLength [line 238]

void checkLength( )

checks the current value, and cuts if needed.



[ Top ]

method draw [line 137]

void draw( )



Tags:

access:  public


[ Top ]

method getCurrentLength [line 229]

int getCurrentLength( )

tells the current number of chars used.



Tags:

access:  public


[ Top ]

method getMaxLength [line 220]

int getMaxLength( )

tells the current maxlength.



Tags:

access:  public


[ Top ]

method getValue [line 199]

string getValue( )

returns the current value.



Tags:

access:  public


[ Top ]

method setBgColorWarning [line 271]

void setBgColorWarning( int kickInValue, string kickInType, string endColor)

sets the properties for the "background color warning" feature.

check the example 2 for this feature: http://www.blueshoes.org/_bsJavascript/components/limitedtextarea/examples/example2.html

example calls: yourObj.setBgColorWarning(); kicks in if 80% of the chars are used. transforms to color 'FF4040'.

yourObj.setBgColorWarning(50, 'char', 'FFC0C0'); kicks in if 50 chars are used. transforms to color 'FFC0C0'.

note that if you use this feature with a % value, you need to setMaxLength() before.

this feature requires that you include this file as well: /_bsJavascript/core/gfx/Bs_ColorUtil.lib.js




Tags:

access:  public


Parameters:

int   kickInValue   kickInValue (when to kick in, eg 50, default is 80.)
string   kickInType   kickInType ('%' or 'char', default is '%'.)
string   endColor   endColor (6 digit hex code, default is 'FF4040'.)

[ Top ]

method setMaxLength [line 210]

void setMaxLength( int maxLength)

sets a new max length.



Tags:

access:  public


Parameters:

int   maxLength   maxLength

[ Top ]

method setValue [line 189]

void setValue( string val)

sets the given value.



Tags:

access:  public


Parameters:

string   val   val

[ Top ]


Documentation generated on Mon, 29 Dec 2003 22:18:25 +0100 by phpDocumentor 1.2.3