1
|
1 |
function dbx_set_key()
|
|
2 |
{
|
|
3 |
//initialise the docking boxes manager
|
|
4 |
var manager = new dbxManager('main'); //session ID [/-_a-zA-Z0-9/]
|
|
5 |
|
|
6 |
//onstatechange fires when any group state changes
|
|
7 |
manager.onstatechange = function()
|
|
8 |
{
|
|
9 |
//copy the state string to a local var
|
|
10 |
var state = this.state;
|
|
11 |
|
|
12 |
//remove group name and open/close state tokens
|
|
13 |
state = state.replace(/sbedit_(left|right)=/ig, '').replace(/[\-\+]/g, '');
|
|
14 |
|
|
15 |
//split into an array
|
|
16 |
state = state.split('&');
|
|
17 |
|
|
18 |
//output field
|
|
19 |
var field = document.getElementById('divOrder_Left');
|
|
20 |
field.value = state[0];
|
|
21 |
var field = document.getElementById('divOrder_Right');
|
|
22 |
field.value = state[1];
|
|
23 |
|
|
24 |
//return value determines whether cookie is set
|
|
25 |
return false;
|
|
26 |
};
|
|
27 |
|
|
28 |
//create new docking boxes group
|
|
29 |
var sbedit_left = new dbxGroup(
|
|
30 |
'sbedit_left', // container ID [/-_a-zA-Z0-9/]
|
|
31 |
'vertical', // orientation ['vertical'|'horizontal']
|
|
32 |
'7', // drag threshold ['n' pixels]
|
|
33 |
'no', // restrict drag movement to container axis ['yes'|'no']
|
|
34 |
'10', // animate re-ordering [frames per transition, or '0' for no effect]
|
|
35 |
'no', // include open/close toggle buttons ['yes'|'no']
|
|
36 |
'open', // default state ['open'|'closed']
|
|
37 |
'open', // word for "open", as in "open this box"
|
|
38 |
'close', // word for "close", as in "close this box"
|
|
39 |
'click-down and drag to move this box', // sentence for "move this box" by mouse
|
|
40 |
'click to %toggle% this box', // pattern-match sentence for "(open|close) this box" by mouse
|
|
41 |
'use the arrow keys to move this box', // sentence for "move this box" by keyboard
|
|
42 |
', or press the enter key to %toggle% it', // pattern-match sentence-fragment for "(open|close) this box" by keyboard
|
|
43 |
'%mytitle% [%dbxtitle%]' // pattern-match syntax for title-attribute conflicts
|
|
44 |
);
|
|
45 |
|
|
46 |
//create new docking boxes group
|
|
47 |
var sbedit_right = new dbxGroup(
|
|
48 |
'sbedit_right', // container ID [/-_a-zA-Z0-9/]
|
|
49 |
'vertical', // orientation ['vertical'|'horizontal']
|
|
50 |
'7', // drag threshold ['n' pixels]
|
|
51 |
'no', // restrict drag movement to container axis ['yes'|'no']
|
|
52 |
'10', // animate re-ordering [frames per transition, or '0' for no effect]
|
|
53 |
'no', // include open/close toggle buttons ['yes'|'no']
|
|
54 |
'open', // default state ['open'|'closed']
|
|
55 |
'open', // word for "open", as in "open this box"
|
|
56 |
'close', // word for "close", as in "close this box"
|
|
57 |
'click-down and drag to move this box', // sentence for "move this box" by mouse
|
|
58 |
'click to %toggle% this box', // pattern-match sentence for "(open|close) this box" by mouse
|
|
59 |
'use the arrow keys to move this box', // sentence for "move this box" by keyboard
|
|
60 |
', or press the enter key to %toggle% it', // pattern-match sentence-fragment for "(open|close) this box" by keyboard
|
|
61 |
'%mytitle% [%dbxtitle%]' // pattern-match syntax for title-attribute conflicts
|
|
62 |
);
|
|
63 |
}
|