<%@ Master Language="C#" MasterPageFile="~/umbraco/masterpages/default.master" AutoEventWireup="true" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
  <head>
    <title>Umbraco Package Repository</title>
    <link href="/umbraco_client/ui/default.css" type="text/css" rel="stylesheet"/>
    <link href="/umbraco_client/panel/style.css" type="text/css" rel="stylesheet"/>  
    <link rel="stylesheet" type="text/css" href="/css/community.css?v=4&update=yes" />    
     <link href="/css/repository.css" type="text/css" rel="stylesheet"/>
    <link href="/css/deli.css" type="text/css" rel="stylesheet"/>  
    <link rel="stylesheet" type="text/css" href="/css/shadowbox.css" />

    <script type="text/javascript" src="/scripts/libs/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="/scripts/community.js?v=2"></script>
    <script type="text/javascript" src="/scripts/powers/uPowers.js?v=6"></script>
    <script type="text/javascript" src="/scripts/jquery.validation.js"></script>    
    <script type="text/javascript" src="/scripts/notifications/notifications.js?ay=y"></script>
    <script type="text/javascript" src="/scripts/libs/jquery-ui-1.7.1.custom.min.js"></script>
    <script type="text/javascript" src="/scripts/libs/SimpleModal.js"></script>
    <script type="text/javascript" src="/scripts/shadowbox/shadowbox.js"></script>

    <script type="text/javascript">
      
      jQuery(document).ready(function(){
        
          jQuery("a").click(function(ev){
          
          ev.preventDefault();
           var href = jQuery(this).attr("href");
            
          document.location = getRepoUrl(href);
        });  
      });
      
      function goSearch(tbId, url){
        var term = jQuery(tbId).val();
        var surl = getRepoUrl(url) + "&q=" + term;
        
        alert(surl);
        
        document.location = surl;
        
        return false;
      }
      
      function getRepoUrl(href){

        var id = '<%= Request.QueryString["id"] %>';
        var version = '<%= Request.QueryString["version"] %>';
        var useLegacySchema= '<%= Request.QueryString["useLegacySchema"] %>';
        var callback = '<%= Request.QueryString["callback"] %>'; 
        
        var sep = "?"; 
         var qs = "id=" + id + "&version=" + version + "&useLegacySchema=" + useLegacySchema + "&callback=" + callback + "&repo=true";  
         if(href.indexOf("?") > 0){
            sep = "&";  
         }          
         return href + sep + qs;
     }

     Shadowbox.init({ overlayColor: '#ffffff', overlayOpacity: '0.01', onFinish: addClickClose });

     function addClickClose() {
         $('#sb-content').unbind('click').click(function () { Shadowbox.close(); });
     } 

    </script>
    
     <asp:ContentPlaceHolder Id="Head" runat="server"></asp:ContentPlaceHolder>
  </head>
<body>
<form runat="server">

<div id="TheForm">
<div id="table1" class="propertyPane guiDialogNormal" >
<div class="propertyContent">

<div id="header">
<umbraco:Macro licenses="17783" search="17770" favs="17784" Alias="Repository/Header_Login" runat="server"></umbraco:Macro> 
</div>

  
  <h1><umbraco:Item field="pageName" runat="server"></umbraco:Item></h1>
<umbraco:Macro linkToCurrent="0" Alias="Breadcrumb" runat="server"></umbraco:Macro>
  
<asp:ContentPlaceHolder Id="Main" runat="server"/>    
  
<br style="clear: both;" />
</div>
</div>
</div>
</form>
</body>
</html>

</asp:Content> 