var win=windowFactory.create({standard:true,width:100,height:100});
Option
Type
Description
winContent
A jQuery collection of DOM elements
Set content of the window.
show
true/false
Show/hide the window.
width
number/string
Set width of the client area. Default value - "auto"
height
number/string
Set height of the client area. Default value - "auto"
thickFrame
true/false
Set border which can be used for resizing. See the sizable option.
color
string
Set color of the window. For example: #aabbccdd or #aabbcc aa: Red, bb: Green, cc: Blue, dd: Opacity Empty string to set no color.
caption
true/false
Set caption for the window.
text
string
Set text of the caption.
textShadow
true/false
Set shadow for text of the caption of the window.
innerBorder
string
Set border for the client area of the window. For example: "#aabbcc" or empty string.
clientColor
string
Set color for the client area. The same format as for the color option. If not set, clientColor=color
sizable
true/false
Set sizing ability. Works only if thickFrame=true
modal
true/false
Set the modality of the window.
modalColor
string
Set color for area around the modal. The same format as for the color option.
standard
true
If you set standart:true you set show, thickFrame, caption, textShadow=true and color="#fcfcfc99"
Events
var win=windowFactory.create({standard:true,width:100,height:100});
win.hover=function(e){but.show(e.type=="mouseenter")};
Event
Description
hover
Occurs when the mouse pointer enters or leaves the window.
Methods
var win=windowFactory.create({standard:true,width:100,height:100});
win.move(300,200);
Method
Description
show(true/false)
Show/hide window.
option(optionName,value)
Set option for the window. Ex: win.option("text","Hello!");
option(map)
A map of option-value pairs to set. Ex: win.option({text:"Hello!",textShadow:false});
move(x,y)
Move window. x,y can be undefined.
center()
Move the window to the center of page.
dragBy(element,deep)
By default window can be moved only by caption. element - an element to drag by deep - true/false - not include children / include Example: win.dragBy($("#elem :not(input)"),true); //selects all elements except input
addButton(name,click,hover)
Creates standard button. The paramenter name can be only "closeButton" so far. Returns the Button Object. About other parameters see below.
Creates a button using an image. width,height - size of button in pixels image - url for image "img.png" style - extra styles for button "top:3px;right:3px;" click - function for the onlick event - function(){win.show(false)} hover - function for the hover events shadowColor - color for the shadow of the button Example of Image: Returns the Button Object.
The button object
var win=windowFactory.create({standard:true,width:100,height:100});
var but=win.addButton("closeButton",function(){win.show(false)});
but.show(false);
Method
Description
show(true/false)
Show/hide the button.
enable(true/false)
Enable/disable the button.
Comments
Add Comment
Guest
1321679168510#0
Don't waste your time with components that offer no source code. There are too many out there that come with full source.