<!-- bconsole/wterminal.phtml -->
<script type="text/javascript" src="<?php echo $this->baseUrl; ?>/scripts/wterm.jquery.js"></script>
<link rel="stylesheet" type="text/css" href="<?php echo $this->baseUrl; ?>/styles/default/wterm.css" media="screen" />

<script>
String.prototype.reverse = function() {
    return this.split('').reverse().join('');
};
</script>

<script>
var welcome='<div style="color: #0f0;">Welcome to <b>webacula terminal.</b></div>'
$( document ).ready( function() {
    $('#wterm').wterm({
        WIDTH:  '70%',
        HEIGHT: '100%',
        WELCOME_MESSAGE: welcome+'<div  style="color: #0f0;">'+
        'All command will be send to Bacula Console (bconsole).<br>'+
        '<div style="color: #fff;">Bacula Console commands will be written like command line style.<br>'+
        'See Bacula documentation "Running the Console from a Shell Script" for details.</div><br>'+
        '<b>clear</b> - clear the screen<br></div>',
        PS1: '*',
        NOT_FOUND: '<div> CMD: command not found.</div>',
        AJAX_METHOD: 'POST',
        HISTORY: true,
        AJAX_PARAM: 'bcommand'
    });
});

    var arr_cmds = {
        'add':null,
        'automount':null,
        'cancel':null,
        'create':null,
        'disable':null,
        'enable':null,
        'estimate':null,
        'help':null,
        'label':null,
        'list':null,
        'llist':null,
        'messages':null,
        'memory':null,
        'mount':null,
        'restore':null,
        'relabel':null,
        'release':null,
        'reload':null,
        'run':null,
        'status':null,
        'setdebug':null,
        'show':null,
        'time':null,
        'trace':null,
        'unmount':null,
        'umount':null,
        'use':null,
        'version':null,
        'delete':null,
        'prune':null,
        'purge':null,
        'python':null,
        'setip':null,
        'sqlquery':null,
        'query':null
    };

    for( var cmd in arr_cmds ) {
        $.register_command( cmd, 'cmd' );
    }
</script>


<title>Webacula bconsole</title>
</head>

<body>

<div id='wterm'>
</div>