<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>template.lay_overview.html</title>
{_META_HEAD_CONTENIDO_}
{_CSS_HEAD_CONTENIDO_}
    <link rel="stylesheet" type="text/css" href="styles/jquery/plugins/tipsy.css">
{_JS_HEAD_CONTENIDO_}
    <script type="text/javascript" src="scripts/jquery/plugins/tipsy.js"></script>
    <script type="text/javascript" src="scripts/registerTipsy.js"></script>
    <script type="text/javascript" src="scripts/rowMark.js"></script>
</head>
<body style="padding-top: 5px;">

<table class="borderless" width="100%" cellspacing="0" cellpadding="2" border="0">

    <!-- BEGIN:BLOCK -->
    <tr id="{ID}" class="layout_row tooltip-north" original-title="{DESCRIPTION}">
        <td></td>
        <td>{NAME}</td>
        <td align="right" class="nowrap">{INUSE}&nbsp;{TODO}&nbsp;{DELETE}&nbsp;</td>
    </tr>
    <!-- END:BLOCK -->

</table>

<script type="text/javascript">

// Function for deleting layout
function deleteLayout(idlay) {
    var url = Con.UtilUrl.build("main.php", {
        area: "lay_edit",
        action: "lay_delete",
        frame: 4,
        idlay: idlay
    });

    Con.getFrame('right_bottom').location.href = url;
}

(function(Con, $) {
    $(function() {
        // select a frame with jquery
        //$(Con.getFrame('right_bottom').document).find('body').html();

        $('.in_used_lay').live('click', function() {
            var iId = $(this).attr('rel');
            if (iId) {
                var sTemplateName = $(this).parents().filter('td:first').prev().text();
                $.post(
                   "{AJAXURL}",
                     { area: "{AREA}", ajax: "inused_layout", id: iId, contenido: Con.sid },
                     function(data) {
                        var sInUseTitle = "{BOX_TITLE}";
                        sInUseTitle = sInUseTitle.replace('%s', sTemplateName);
                        Con.showNotification(sInUseTitle, data, null, true);
                     }
                );
            }
        });

        // Register some events for rows
        // ## @todo move this to rowMark.js
        $("tr.layout_row").mouseover(function () {
            row.over(this);
        }).mouseout(function () {
                    row.out(this);
                }).click(function () {
                    row.click(this);
                });

        if ($('#marked')) {
            lay.click($('#marked')[0]);
        }
        // ## @todo move this to rowMark.js

    });
})(Con, Con.$);
</script>

</body>
