2006-05-22 13:16:05 -04:00
|
|
|
<?php
|
|
|
|
require_once('admin.php');
|
2006-08-22 13:31:53 -04:00
|
|
|
cache_javascript_headers();
|
2006-05-22 13:16:05 -04:00
|
|
|
|
|
|
|
switch ( $_GET['pagenow'] ) :
|
|
|
|
case 'post.php' :
|
|
|
|
case 'post-new.php' :
|
|
|
|
$man = 'postmeta';
|
|
|
|
break;
|
|
|
|
case 'page.php' :
|
|
|
|
case 'page-new.php' :
|
2006-11-19 02:56:05 -05:00
|
|
|
$man = 'pagemeta';
|
2006-05-22 13:16:05 -04:00
|
|
|
break;
|
|
|
|
case 'link.php' :
|
|
|
|
$man = 'linkmeta';
|
|
|
|
break;
|
2006-06-01 17:51:20 -04:00
|
|
|
default:
|
|
|
|
exit;
|
|
|
|
break;
|
2006-05-22 13:16:05 -04:00
|
|
|
endswitch;
|
|
|
|
?>
|
|
|
|
addLoadEvent( function() {var manager = new dbxManager('<?php echo $man; ?>');} );
|
2005-08-27 14:48:56 -04:00
|
|
|
|
|
|
|
addLoadEvent( function()
|
|
|
|
{
|
|
|
|
//create new docking boxes group
|
|
|
|
var meta = new dbxGroup(
|
|
|
|
'grabit', // container ID [/-_a-zA-Z0-9/]
|
|
|
|
'vertical', // orientation ['vertical'|'horizontal']
|
|
|
|
'10', // drag threshold ['n' pixels]
|
|
|
|
'no', // restrict drag movement to container axis ['yes'|'no']
|
|
|
|
'10', // animate re-ordering [frames per transition, or '0' for no effect]
|
|
|
|
'yes', // include open/close toggle buttons ['yes'|'no']
|
|
|
|
'closed', // default state ['open'|'closed']
|
2006-11-28 16:51:13 -05:00
|
|
|
'<?php echo js_escape(__('open')); ?>', // word for "open", as in "open this box"
|
|
|
|
'<?php echo js_escape(__('close')); ?>', // word for "close", as in "close this box"
|
|
|
|
'<?php echo js_escape(__('click-down and drag to move this box')); ?>', // sentence for "move this box" by mouse
|
|
|
|
'<?php echo js_escape(__('click to %toggle% this box')); ?>', // pattern-match sentence for "(open|close) this box" by mouse
|
|
|
|
'<?php echo js_escape(__('use the arrow keys to move this box')); ?>', // sentence for "move this box" by keyboard
|
|
|
|
'<?php echo js_escape(__(', or press the enter key to %toggle% it')); ?>', // pattern-match sentence-fragment for "(open|close) this box" by keyboard
|
2005-08-27 14:48:56 -04:00
|
|
|
'%mytitle% [%dbxtitle%]' // pattern-match syntax for title-attribute conflicts
|
|
|
|
);
|
|
|
|
|
2006-03-20 19:25:58 -05:00
|
|
|
// Boxes are closed by default. Open the Category box if the cookie isn't already set.
|
|
|
|
var catdiv = document.getElementById('categorydiv');
|
|
|
|
if ( catdiv ) {
|
|
|
|
var button = catdiv.getElementsByTagName('A')[0];
|
|
|
|
if ( dbx.cookiestate == null && /dbx\-toggle\-closed/.test(button.className) )
|
|
|
|
meta.toggleBoxState(button, true);
|
|
|
|
}
|
|
|
|
|
2005-08-27 14:48:56 -04:00
|
|
|
var advanced = new dbxGroup(
|
|
|
|
'advancedstuff', // container ID [/-_a-zA-Z0-9/]
|
|
|
|
'vertical', // orientation ['vertical'|'horizontal']
|
|
|
|
'10', // drag threshold ['n' pixels]
|
|
|
|
'yes', // restrict drag movement to container axis ['yes'|'no']
|
|
|
|
'10', // animate re-ordering [frames per transition, or '0' for no effect]
|
|
|
|
'yes', // include open/close toggle buttons ['yes'|'no']
|
|
|
|
'closed', // default state ['open'|'closed']
|
2006-11-28 16:51:13 -05:00
|
|
|
'<?php echo js_escape(__('open')); ?>', // word for "open", as in "open this box"
|
|
|
|
'<?php echo js_escape(__('close')); ?>', // word for "close", as in "close this box"
|
|
|
|
'<?php echo js_escape(__('click-down and drag to move this box')); ?>', // sentence for "move this box" by mouse
|
|
|
|
'<?php echo js_escape(__('click to %toggle% this box')); ?>', // pattern-match sentence for "(open|close) this box" by mouse
|
|
|
|
'<?php echo js_escape(__('use the arrow keys to move this box')); ?>', // sentence for "move this box" by keyboard
|
|
|
|
'<?php echo js_escape(__(', or press the enter key to %toggle% it')); ?>', // pattern-match sentence-fragment for "(open|close) this box" by keyboard
|
2005-08-27 14:48:56 -04:00
|
|
|
'%mytitle% [%dbxtitle%]' // pattern-match syntax for title-attribute conflicts
|
|
|
|
);
|
|
|
|
});
|