Subversion Repositories DevTools

Rev

Rev 6971 | Rev 7288 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<%@LANGUAGE="VBSCRIPT"%>
<%
'   rep_new_versions_info.asp
'   This file is designed to be injected (loaded) into a 'div' on a window
'   It is a pop up dialog
'
'   This dialog will allow a user to explow the users of a package-vesrion
%>
<script>
$( "#f1" ).dialog({
autoOpen: true,
minWidth: 500,
width : "auto",
position: { my: "top", at: "top+100", of: window },
modal: true,
draggable: true,
resizable: true,
dialogClass: "rounded_box",
        buttons: [
            {
            text : 'Close',
            click : function(){ 
                        $( this ).dialog( "close" ); 
                        },
            },
        ],
open: function( event, ui ) {
        populateForm(this);
        },
close : function(event, ui ){
        // Need to remove DOM elements on close so that
        // When it is opened again - the binds occur correctly
        $(this).dialog('destroy').remove();
        },
});

function setInfo(txt) {
    $("#info").text( txt).addClass("error");
}

function clearInfo(txt) {
    $("#info").text("").removeClass("error");
}

function populateForm() {

    // Get the Package Name and Version number for display
    $("body").addClass("cursor-wait");
    $("#ProgressBar").css('visibility', 'visible');
    $.get({
        url: 'rep_new_versions_json.asp',
        dataType : 'json',
        data : {
               action : 'getPackageInfo',
               pv_id : <%=Request("pvid")%>
               },
        success : function(data, textStatus, jqXHR){
                    if (data.result != 0){
                        setInfo("Error: " + (data.hasOwnProperty('emsgSummary') ? data.emsgSummary : "Reason not given"));
                        return;
                    }
                    $('#pkgName').text(data.aaData.pkg_name);
                    $('#pkgVersion').text(data.aaData.pkg_version);
                    populateData();
        }
    }).done( function(){

    }).always( function(){

    }).fail( function(jqXHR, textStatus, errorThrown){
                setInfo("Error: " + errorThrown );
    });
}

function populateData() {

    // Get the Package Version Usage information
    $.get({
        url: 'RequestUsedByThisProjectSummary.asp',
        dataType : 'html',
        data : {
               mode : 2,
               pv_id : <%=Request("pvid")%>
               },
        success : function(data, textStatus, jqXHR){
                    $('#pkgData').html(data);
        }
    }).done( function(){

    }).always( function(){
        $("body").removeClass("cursor-wait");
        $("#ProgressBar").css('visibility', 'hidden');

    }).fail( function(jqXHR, textStatus, errorThrown){
                setInfo("Error: " + errorThrown );
    });
}

//# sourceURL=rep_new_versions_info.asp
</script>
<link rel="stylesheet" href="jquery/form-validator.css" type="text/css">
<script language="JavaScript" src="scripts/remote_scripting.js?ver=<%=VixVerNum%>"></script>
<div title="Projects using package version" id=f1 class=td style="min-width:500px"><span id=clipRoot></span>
    <div id="info"></div>
        <DIV id='ProgressBar' style='visibility:hidden;'>
        <img src='icons/i_processing.gif' width='79' height='14'>
    </DIV>
    <table class='stdGrey wide'>
        <thead>
            <th>Package Name</th>
            <th>Version</th>
        </thead>
        <tr>
            <td id=pkgName></td>
            <td id=pkgVersion></td>
        </tr>
        <tr>
            <td id=pkgData colspan=2 class=tight>Loading ...</td>
        </tr>
    </table>
</div>