Subversion Repositories DevTools

Rev

Rev 5103 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5103 Rev 5114
Line 70... Line 70...
70
            ajax : {
70
            ajax : {
71
                url : "sdk_versions_json.asp",
71
                url : "sdk_versions_json.asp",
72
                data : function (o){
72
                data : function (o){
73
                    o.sdk_id = <%=parSdk_id%>;
73
                    o.sdk_id = <%=parSdk_id%>;
74
                    o.sdkstateFilter = getDisplayFilter();
74
                    o.sdkstateFilter = getDisplayFilter();
75
                },
75
                }
76
            },
76
            },
77
 
77
 
78
            ordering: true,
78
            ordering: true,
79
             order: [[ 1, "asc" ]],
79
             order: [[ 1, "asc" ]],
80
             columns: [
80
             columns: [
Line 84... Line 84...
84
                { data: "CREATED_STAMP_TXT", className: "dt-nowrap" },
84
                { data: "CREATED_STAMP_TXT", className: "dt-nowrap" },
85
                { data: "CREATOR_NAME" , className: "dt-nowrap"},
85
                { data: "CREATOR_NAME" , className: "dt-nowrap"},
86
                { data: "SDK_STATE", width: "5%"},
86
                { data: "SDK_STATE", width: "5%"},
87
                { data: "SDK_EDIT", orderable: false },
87
                { data: "SDK_EDIT", orderable: false },
88
                { data: "SDK_MODIFY", orderable: false },
88
                { data: "SDK_MODIFY", orderable: false },
89
                { data: "SDK_USE", orderable: false },
89
                { data: "SDK_USE", orderable: false }
90
            ],
90
            ],
91
            //  Add class to rows that we want to highlight
91
            //  Add class to rows that we want to highlight
92
            createdRow : function( row, data, index) {
92
            createdRow : function( row, data, index) {
93
                $(row).addClass('mainTable');
93
                $(row).addClass('mainTable');
94
                },
94
                }
95
            });
95
            });
96
 
96
 
97
//  Process each row of table data before it is presented to the table scroller
97
//  Process each row of table data before it is presented to the table scroller
98
//  Process the raw Ajax data
98
//  Process the raw Ajax data
99
//      Add 'Edit' box
99
//      Add 'Edit' box
100
//      Decode State
100
//      Decode State
101
$('#sdk_versions').on('xhr.dt', function ( e, settings, json ) {
101
$('#sdk_versions').on('xhr.dt', function ( e, settings, json ) {
102
        json.aaData.forEach(function(row){
102
        $.each(json.aaData, function(idx,row){
103
            row.SDK_EDIT   = "<button <%=editMode%> class='rmbutton editSdk' data-sdktag_id='" + row.SDKTAG_ID + "' title='Edit Version Name and Description'>Edit</button>";
103
            row.SDK_EDIT   = "<button <%=editMode%> class='rmbutton editSdk' data-sdktag_id='" + row.SDKTAG_ID + "' title='Edit Version Name and Description'>Edit</button>";
104
<%If canActionControlInProject("CreateSdk") Then %>
104
<%If canActionControlInProject("CreateSdk") Then %>
105
            row.SDK_MODIFY = "<button class='rmbutton modifySdk' data-sdktag_id='" + row.SDKTAG_ID + "' title='Modify content of the SDK'>Modify</button>";
105
            row.SDK_MODIFY = "<button class='rmbutton modifySdk' data-sdktag_id='" + row.SDKTAG_ID + "' title='Modify content of the SDK'>Modify</button>";
106
<%Else%>
106
<%Else%>
107
            row.SDK_MODIFY = "<button class='rmbutton modifySdk' data-sdktag_id='" + row.SDKTAG_ID + "' title='View content of the SDK'>View</button>";
107
            row.SDK_MODIFY = "<button class='rmbutton modifySdk' data-sdktag_id='" + row.SDKTAG_ID + "' title='View content of the SDK'>View</button>";
Line 174... Line 174...
174
                if ( data.aaData.length <= 0 ) {
174
                if ( data.aaData.length <= 0 ) {
175
                    txt += 'No users found';
175
                    txt += 'No users found';
176
                }
176
                }
177
                else {
177
                else {
178
                    txt += '<tr><th>Project<th>Release';
178
                    txt += '<tr><th>Project<th>Release';
179
                    data.aaData.forEach(function(item){
179
                    $.each(data.aaData, function(idx,item){
180
                        txt += '<tr><td>' + '<a href="'+"rtree.asp?proj_id=" + item.PROJ_ID+'">'+ item.PROJ_NAME +'</a>';
180
                        txt += '<tr><td>' + '<a href="'+"rtree.asp?proj_id=" + item.PROJ_ID+'">'+ item.PROJ_NAME +'</a>';
181
                        txt += '<td>' +   '<a href="'+"dependencies.asp?rtag_id=" + item.RTAG_ID+'">'+item.RTAG_NAME+'</a>';
181
                        txt += '<td>' +   '<a href="'+"dependencies.asp?rtag_id=" + item.RTAG_ID+'">'+item.RTAG_NAME+'</a>';
182
                    });
182
                    });
183
                }
183
                }
184
                txt += '</table></div>';
184
                txt += '</table></div>';