<?php
// Copyright 1999-2026. WebPros International GmbH. All rights reserved.
?>
<script type="text/javascript">
//<![CDATA[
Jsw.onReady(function() {

    new Jsw.Hint({
        renderTo: 'main',
        hint: <?php echo $this->jsLmsg('areaDescription'); ?>
    });

    new Jsw.List({
        renderTo: 'main',
        id: 'sites-list',
        data: <?php echo Zend_Json::encode($this->sitesList->fetchData()); ?>,
        <?php if ($this->sitesList->isSsl()): ?>
        dataUrl: '/statistics/site-select-list-data/ssl/true',
        <?php else: ?>
        dataUrl: '/statistics/site-select-list-data',
        <?php endif; ?>
        columns: [{
            header: <?php echo $this->sitesList->jsLmsg('domain'); ?>,
            sortable: true,
            dataIndex: 'displayName'
        }, {
            header: '',
            renderer: function(item) {
                return '<a href="#" onclick=\'' + item.statisticsUrl + '\'>[' + <?php echo $this->sitesList->jsLmsg('linkView'); ?> + ']</a>';
            }
        }]
    });

});
//]]>
</script>
