/**
 * Use jQuery to implement dialog boxes to show the source for the view and Flexy template
 *
 * @author Tony Bibbs <tony@apteno.com>
 * @copyright Copyright (c) 2008-2009 Apteno L.C. (http://www.apteno.net)
 * @license http://www.apteno.net/GPL.html GNU General Public License
 * 
 */
$(document).ready(function(){
    
    $("#sourceview").dialog(
                        { 
                            width: 800,
                            height:450,
                            closeOnEscape: true,
                            autoOpen: false,
                            title: 'PHP Source for View',
                            buttons: { "Done": function() { $(this).dialog("close"); } }
                        });
    $("#htmlview").dialog(
                        {
                            width: 800,
                            height:450,
                            closeOnEscape: true,
                            autoOpen: false,
                            title: 'Flexy Source View',
                            buttons: { "Done": function() { $(this).dialog("close"); } }
                        });

    $('#viewCodeButton').click(function(){
     
     $("#sourceview").dialog('open');
    });
    $('#viewHtmlButton').click(function(){
     $("#htmlview").dialog('open');
    });

});