Subversion Repositories DevTools

Rev

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

Rev Author Line No. Line
6971 dpurdie 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'   rep_new_versions_info.asp
4
'   This file is designed to be injected (loaded) into a 'div' on a window
5
'   It is a pop up dialog
6
'
7
'   This dialog will allow a user to explow the users of a package-vesrion
8
%>
9
<script>
10
$( "#f1" ).dialog({
11
autoOpen: true,
12
minWidth: 500,
13
width : "auto",
14
position: { my: "top", at: "top+100", of: window },
15
modal: true,
16
draggable: true,
17
resizable: true,
18
dialogClass: "rounded_box",
19
        buttons: [
20
            {
21
            text : 'Close',
22
            click : function(){ 
23
                        $( this ).dialog( "close" ); 
24
                        },
25
            },
26
        ],
27
open: function( event, ui ) {
28
        populateForm(this);
29
        },
30
close : function(event, ui ){
31
        // Need to remove DOM elements on close so that
32
        // When it is opened again - the binds occur correctly
33
        $(this).dialog('destroy').remove();
34
        },
35
});
36
 
37
function setInfo(txt) {
38
    $("#info").text( txt).addClass("error");
39
}
40
 
41
function clearInfo(txt) {
42
    $("#info").text("").removeClass("error");
43
}
44
 
45
function populateForm() {
46
 
47
    // Get the Package Name and Version number for display
48
    $("body").addClass("cursor-wait");
7287 dpurdie 49
    $("#ProgressBar").css('visibility', 'visible');
6971 dpurdie 50
    $.get({
51
        url: 'rep_new_versions_json.asp',
52
        dataType : 'json',
53
        data : {
54
               action : 'getPackageInfo',
55
               pv_id : <%=Request("pvid")%>
56
               },
57
        success : function(data, textStatus, jqXHR){
58
                    if (data.result != 0){
59
                        setInfo("Error: " + (data.hasOwnProperty('emsgSummary') ? data.emsgSummary : "Reason not given"));
60
                        return;
61
                    }
62
                    $('#pkgName').text(data.aaData.pkg_name);
63
                    $('#pkgVersion').text(data.aaData.pkg_version);
64
                    populateData();
65
        }
66
    }).done( function(){
67
 
68
    }).always( function(){
69
 
70
    }).fail( function(jqXHR, textStatus, errorThrown){
71
                setInfo("Error: " + errorThrown );
72
    });
73
}
74
 
75
function populateData() {
76
 
77
    // Get the Package Version Usage information
78
    $.get({
79
        url: 'RequestUsedByThisProjectSummary.asp',
80
        dataType : 'html',
81
        data : {
82
               mode : 2,
83
               pv_id : <%=Request("pvid")%>
84
               },
85
        success : function(data, textStatus, jqXHR){
86
                    $('#pkgData').html(data);
87
        }
88
    }).done( function(){
89
 
90
    }).always( function(){
91
        $("body").removeClass("cursor-wait");
7287 dpurdie 92
        $("#ProgressBar").css('visibility', 'hidden');
6971 dpurdie 93
 
94
    }).fail( function(jqXHR, textStatus, errorThrown){
95
                setInfo("Error: " + errorThrown );
96
    });
97
}
98
 
99
//# sourceURL=rep_new_versions_info.asp
100
</script>
101
<link rel="stylesheet" href="jquery/form-validator.css" type="text/css">
102
<script language="JavaScript" src="scripts/remote_scripting.js?ver=<%=VixVerNum%>"></script>
103
<div title="Projects using package version" id=f1 class=td style="min-width:500px"><span id=clipRoot></span>
104
    <div id="info"></div>
7287 dpurdie 105
	<DIV id='ProgressBar' style='visibility:hidden;'>
6971 dpurdie 106
        <img src='icons/i_processing.gif' width='79' height='14'>
107
    </DIV>
108
    <table class='stdGrey wide'>
109
        <thead>
110
            <th>Package Name</th>
111
            <th>Version</th>
112
        </thead>
113
        <tr>
114
            <td id=pkgName></td>
115
            <td id=pkgVersion></td>
116
        </tr>
117
        <tr>
118
            <td id=pkgData colspan=2 class=tight>Loading ...</td>
119
        </tr>
120
    </table>
121
</div>