| 1 |
<?php |
|---|
| 2 |
require_once('admin.php'); |
|---|
| 3 |
header('Content-type: text/javascript; charset=' . get_settings('blog_charset'), true); |
|---|
| 4 |
|
|---|
| 5 |
switch ( $_GET['pagenow'] ) : |
|---|
| 6 |
case 'post.php' : |
|---|
| 7 |
case 'post-new.php' : |
|---|
| 8 |
$man = 'postmeta'; |
|---|
| 9 |
break; |
|---|
| 10 |
case 'page.php' : |
|---|
| 11 |
case 'page-new.php' : |
|---|
| 12 |
$man = 'pagemeta'; |
|---|
| 13 |
break; |
|---|
| 14 |
case 'link.php' : |
|---|
| 15 |
$man = 'linkmeta'; |
|---|
| 16 |
break; |
|---|
| 17 |
default: |
|---|
| 18 |
exit; |
|---|
| 19 |
break; |
|---|
| 20 |
endswitch; |
|---|
| 21 |
?> |
|---|
| 22 |
addLoadEvent( function() {var manager = new dbxManager('<?php echo $man; ?>');} ); |
|---|
| 23 |
|
|---|
| 24 |
addLoadEvent( function() |
|---|
| 25 |
{ |
|---|
| 26 |
//create new docking boxes group |
|---|
| 27 |
var meta = new dbxGroup( |
|---|
| 28 |
'grabit', // container ID [/-_a-zA-Z0-9/] |
|---|
| 29 |
'vertical', // orientation ['vertical'|'horizontal'] |
|---|
| 30 |
'10', // drag threshold ['n' pixels] |
|---|
| 31 |
'no', // restrict drag movement to container axis ['yes'|'no'] |
|---|
| 32 |
'10', // animate re-ordering [frames per transition, or '0' for no effect] |
|---|
| 33 |
'yes', // include open/close toggle buttons ['yes'|'no'] |
|---|
| 34 |
'closed', // default state ['open'|'closed'] |
|---|
| 35 |
'open', // word for "open", as in "open this box" |
|---|
| 36 |
'close', // word for "close", as in "close this box" |
|---|
| 37 |
'click-down and drag to move this box', // sentence for "move this box" by mouse |
|---|
| 38 |
'click to %toggle% this box', // pattern-match sentence for "(open|close) this box" by mouse |
|---|
| 39 |
'use the arrow keys to move this box', // sentence for "move this box" by keyboard |
|---|
| 40 |
', or press the enter key to %toggle% it', // pattern-match sentence-fragment for "(open|close) this box" by keyboard |
|---|
| 41 |
'%mytitle% [%dbxtitle%]' // pattern-match syntax for title-attribute conflicts |
|---|
| 42 |
); |
|---|
| 43 |
|
|---|
| 44 |
// Boxes are closed by default. Open the Category box if the cookie isn't already set. |
|---|
| 45 |
var catdiv = document.getElementById('categorydiv'); |
|---|
| 46 |
if ( catdiv ) { |
|---|
| 47 |
var button = catdiv.getElementsByTagName('A')[0]; |
|---|
| 48 |
if ( dbx.cookiestate == null && /dbx\-toggle\-closed/.test(button.className) ) |
|---|
| 49 |
meta.toggleBoxState(button, true); |
|---|
| 50 |
} |
|---|
| 51 |
|
|---|
| 52 |
var advanced = new dbxGroup( |
|---|
| 53 |
'advancedstuff', // container ID [/-_a-zA-Z0-9/] |
|---|
| 54 |
'vertical', // orientation ['vertical'|'horizontal'] |
|---|
| 55 |
'10', // drag threshold ['n' pixels] |
|---|
| 56 |
'yes', // restrict drag movement to container axis ['yes'|'no'] |
|---|
| 57 |
'10', // animate re-ordering [frames per transition, or '0' for no effect] |
|---|
| 58 |
'yes', // include open/close toggle buttons ['yes'|'no'] |
|---|
| 59 |
'closed', // default state ['open'|'closed'] |
|---|
| 60 |
'open', // word for "open", as in "open this box" |
|---|
| 61 |
'close', // word for "close", as in "close this box" |
|---|
| 62 |
'click-down and drag to move this box', // sentence for "move this box" by mouse |
|---|
| 63 |
'click to %toggle% this box', // pattern-match sentence for "(open|close) this box" by mouse |
|---|
| 64 |
'use the arrow keys to move this box', // sentence for "move this box" by keyboard |
|---|
| 65 |
', or press the enter key to %toggle% it', // pattern-match sentence-fragment for "(open|close) this box" by keyboard |
|---|
| 66 |
'%mytitle% [%dbxtitle%]' // pattern-match syntax for title-attribute conflicts |
|---|
| 67 |
); |
|---|
| 68 |
}); |
|---|
| 69 |
|
|---|