Subversion Repositories DevTools

Rev

Rev 6790 | Rev 7288 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6790 Rev 7249
Line 19... Line 19...
19
Dim sDiffStateIcon
19
Dim sDiffStateIcon
20
Dim sStyle
20
Dim sStyle
21
Dim sCompVerText
21
Dim sCompVerText
22
Dim sVerText
22
Dim sVerText
23
'------------ Constants Declaration -----------
23
'------------ Constants Declaration -----------
24
Const LIMG_UPDATED = "<img src='images/i_updated.gif' width='11' height='11' border='0' hspace='2' align='absmiddle' title='Updated'>"
24
Const LIMG_UPDATED = "<img src='images/i_updated.gif' width='11' height='11' border='0' hspace='2' title='Updated'>"
25
Const LIMG_ADDED = "<img src='images/i_added.gif' width='11' height='11' border='0' hspace='2' align='absmiddle' title='Added'>"
25
Const LIMG_ADDED = "<img src='images/i_added.gif' width='11' height='11' border='0' hspace='2' title='Added'>"
26
Const LIMG_REMOVED = "<img src='images/i_removed.gif' width='11' height='11' border='0' hspace='2' align='absmiddle' title='Removed'>"
26
Const LIMG_REMOVED = "<img src='images/i_removed.gif' width='11' height='11' border='0' hspace='2' title='Removed'>"
-
 
27
Const LIMG_UNCHANGED = "<img src='images/i_unchanged.gif' width='11' height='11' border='0' hspace='5' title='Unchanged'>"
27
'------------ Variable Init -------------------
28
'------------ Variable Init -------------------
28
parComparePvId = Request("compare_pv_id")
29
parComparePvId = Request("compare_pv_id")
29
parCompare = Request("compare")
30
parCompare = Request("compare")
30
'----------------------------------------------
31
'----------------------------------------------
31
If Request("btn") = "Compare" Then
32
If Request("btn") = "Compare" Then
Line 133... Line 134...
133
           }
134
           }
134
        });
135
        });
135
 
136
 
136
       updateTableIcons();
137
       updateTableIcons();
137
    });
138
    });
-
 
139
 
-
 
140
    //
-
 
141
    //  File Diff display
-
 
142
    //  Wire up the Show/Hide options
-
 
143
    //
-
 
144
	$('#btnHideUpdate').change(function(){
-
 
145
		toggleRows( $(this).is(':checked'), '.ftUpdated' );
-
 
146
    });
-
 
147
 
-
 
148
    $('#btnHideAdded').change(function(){
-
 
149
		toggleRows( $(this).is(':checked'), '.ftAdded' );
-
 
150
    });
-
 
151
 
-
 
152
	$('#btnHideRemoved').change(function(){
-
 
153
		toggleRows( $(this).is(':checked'), '.ftRemoved' );
-
 
154
    });
-
 
155
 
-
 
156
	$('#btnHideSame').change(function(){
-
 
157
		toggleRows( $(this).is(':checked'), '.ftSame' );
-
 
158
    });
-
 
159
 
-
 
160
    function toggleRows( mode, sClass) {
-
 
161
        if ( mode ) {
-
 
162
            $('#fileList tr').filter(sClass).hide();
-
 
163
        } else {
-
 
164
            $('#fileList tr').filter(sClass).show();
-
 
165
        }
-
 
166
    }
-
 
167
 
138
});
168
});
139
</script>
169
</script>
140
<%
170
<%
141
'--------------------------------------------------------------------------------------------------------------------------------------
171
'--------------------------------------------------------------------------------------------------------------------------------------
142
Sub DisplayMessage ()
172
Sub DisplayMessage ()
Line 212... Line 242...
212
    OraDatabase.Parameters.Remove "PKG_ID"
242
    OraDatabase.Parameters.Remove "PKG_ID"
213
    OraDatabase.Parameters.Remove "V_EXT"
243
    OraDatabase.Parameters.Remove "V_EXT"
214
    
244
    
215
End Sub
245
End Sub
216
'--------------------------------------------------------------------------------------------------------------------------------------
246
'--------------------------------------------------------------------------------------------------------------------------------------
217
Sub GetDiffStateIcon( nDiffState, outIcon, outStyle )
247
Sub GetDiffStateIcon( nDiffState, outIcon, outStyle, outRowStyle )
218
    Select Case CInt( nDiffState )
248
    Select Case CInt( nDiffState )
219
        Case enumDB_NUM_DIFF_UPDATED
249
        Case enumDB_NUM_DIFF_UPDATED
220
            outIcon  = LIMG_UPDATED
250
            outIcon  = LIMG_UPDATED
221
            outStyle = "body_rowbold"
251
            outStyle = "body_rowbold"
-
 
252
			outRowStyle = "ftUpdated"
222
            
253
            
223
        Case enumDB_NUM_DIFF_REMOVED
254
        Case enumDB_NUM_DIFF_REMOVED
224
            outIcon = LIMG_REMOVED
255
            outIcon = LIMG_REMOVED
225
            outStyle = "body_rowthru"
256
            outStyle = "body_rowthru"
-
 
257
			outRowStyle = "ftRemoved"
226
            
258
            
227
        Case enumDB_NUM_DIFF_NEW
259
        Case enumDB_NUM_DIFF_NEW
228
            outIcon = LIMG_ADDED
260
            outIcon = LIMG_ADDED
229
            outStyle = "body_rowbold"
261
            outStyle = "body_rowbold"
-
 
262
			outRowStyle = "ftAdded"
230
            
263
            
231
        Case Else
264
        Case Else
232
            outIcon = ""
265
            outIcon = ""
233
            outStyle = "body_rowg"
266
            outStyle = "body_rowg"
-
 
267
			outRowStyle = "ftSame"
-
 
268
 
234
    End Select
269
    End Select
235
End Sub
270
End Sub
236
'--------------------------------------------------------------------------------------------------------------------------------------
271
'--------------------------------------------------------------------------------------------------------------------------------------
237
Sub DisplayDiffSummary( orsQry )
272
Sub DisplayDiffSummary( orsQry )
238
    Dim dDiffSummary
273
    Dim dDiffSummary
239
    Set dDiffSummary = CreateObject("Scripting.Dictionary")
274
    Set dDiffSummary = CreateObject("Scripting.Dictionary")
240
    
275
    
241
    dDiffSummary.Item ("UPDATED") = 0
276
    dDiffSummary.Item ("UPDATED") = 0
242
    dDiffSummary.Item ("REMOVED") = 0
277
    dDiffSummary.Item ("REMOVED") = 0
243
    dDiffSummary.Item ("ADDED") = 0
278
    dDiffSummary.Item ("ADDED") = 0
-
 
279
    dDiffSummary.Item ("SAME") = 0
244
    
280
    
245
    While ((NOT orsQry.BOF) AND (NOT orsQry.EOF))
281
    While ((NOT orsQry.BOF) AND (NOT orsQry.EOF))
246
        
282
        
247
        Select Case CInt( orsQry("diff_state") )
283
        Select Case CInt( orsQry("diff_state") )
248
            Case enumDB_NUM_DIFF_UPDATED
284
            Case enumDB_NUM_DIFF_UPDATED
Line 251... Line 287...
251
            Case enumDB_NUM_DIFF_REMOVED
287
            Case enumDB_NUM_DIFF_REMOVED
252
                dDiffSummary.Item ("REMOVED") = CInt( dDiffSummary.Item ("REMOVED") ) + 1
288
                dDiffSummary.Item ("REMOVED") = CInt( dDiffSummary.Item ("REMOVED") ) + 1
253
                
289
                
254
            Case enumDB_NUM_DIFF_NEW
290
            Case enumDB_NUM_DIFF_NEW
255
                dDiffSummary.Item ("ADDED") = CInt( dDiffSummary.Item ("ADDED") ) + 1
291
                dDiffSummary.Item ("ADDED") = CInt( dDiffSummary.Item ("ADDED") ) + 1
-
 
292
 
256
                
293
            Case Else
-
 
294
                dDiffSummary.Item ("SAME") = CInt( dDiffSummary.Item ("SAME") ) + 1
-
 
295
 
257
        End Select
296
        End Select
258
        
297
        
259
        orsQry.MoveNext
298
        orsQry.MoveNext
260
    WEnd
299
    WEnd
261
    
300
    
Line 263... Line 302...
263
    ' Reset cursor
302
    ' Reset cursor
264
    orsQry.MoveFirst()
303
    orsQry.MoveFirst()
265
    
304
    
266
    
305
    
267
    ' Display Summary
306
    ' Display Summary
268
    Response.write dDiffSummary.Item ("UPDATED") &" -<img src='images/i_updated.gif' width='11' height='11' hspace='3'>Updated, "
307
    Response.write dDiffSummary.Item ("UPDATED") &" - "& LIMG_UPDATED   & "Updated, "
269
    Response.write dDiffSummary.Item ("ADDED") &" -<img src='images/i_added.gif' width='11' height='11' hspace='3'>Added, "
308
    Response.write dDiffSummary.Item ("ADDED")   &" - "& LIMG_ADDED     & "Added, "
270
    Response.write dDiffSummary.Item ("REMOVED") &" -<img src='images/i_removed.gif' width='11' height='11' hspace='3'>Removed"
309
    Response.write dDiffSummary.Item ("REMOVED") &" - "& LIMG_REMOVED   & "Removed, "
271
    
-
 
-
 
310
    Response.write dDiffSummary.Item ("SAME")    &" - "& LIMG_UNCHANGED & "Unchanged"
272
End Sub
311
End Sub
273
'--------------------------------------------------------------------------------------------------------------------------------------
312
'--------------------------------------------------------------------------------------------------------------------------------------
274
%>
313
%>
275
    <!-- DETAILS ------------------------------------------------->
314
    <!-- DETAILS ------------------------------------------------->
276
            
315
            
Line 299... Line 338...
299
      ' with another version
338
      ' with another version
300
    %>
339
    %>
301
    <%If pkgCompare Then %>
340
    <%If pkgCompare Then %>
302
            <form name="formname" method="get" action="<%=ScriptName%>" onSubmit="ProgressBar.style.visibility='visible';">
341
            <form name="formname" method="get" action="<%=ScriptName%>" onSubmit="ProgressBar.style.visibility='visible';">
303
            <br>                      
342
            <br>                      
304
            <span class="body_colb">Files and Folders</span><br>
-
 
305
            
-
 
306
            <%If rsQry.Recordcount > 0 Then%>
343
            <%If rsQry.Recordcount > 0 Then%>
307
            <table width="100%"  border="0" cellspacing="1" cellpadding="3">
344
            <table width="100%"  border="0" cellspacing="1" cellpadding="3">
308
              <tr>
345
              <tr>
-
 
346
				<td nowrap width=1% class="body_colb">Files and Folders</td>
309
                <td nowrap class="body_txt">
347
                <td nowrap width=1% class="body_txt">
-
 
348
					<fieldset class="fset body_row">
310
                    Show differences since version
349
						<legend>Show differences since version</legend>
311
                    <select name="compare_pv_id" class="form_item">
350
                    <select name="compare_pv_id" class="form_item">
312
                    <%Call DisplayComparePvIdCombo()%>
351
                    <%Call DisplayComparePvIdCombo()%>
313
                    </select>
352
                    </select>
314
                    <input name="btn" type="submit" class="form_btn" value="Compare"> 
353
                    <input name="btn" type="submit" class="form_btn" value="Compare"> 
315
                    <%If parCompare <> "" Then%>
354
                    <%If parCompare <> "" Then%>
316
                    &nbsp;&nbsp;&nbsp;
355
					<input type="checkbox" style='visibility:hidden'>
317
                    <a class="form_btn" href="<%=scriptName%>?pv_id=<%=parPv_id%>&rtag_id=<%=parRtag_id%>">Show <%=sVerText%></a>
356
                    <a class="form_btn" href="<%=scriptName%>?pv_id=<%=parPv_id%>&rtag_id=<%=parRtag_id%>">Show <%=sVerText%></a>
318
                    <a class="form_btn" href="<%=scriptName%>?pv_id=<%=parComparePvId%>&rtag_id=<%=parRtag_id%>">Show <%=sCompVerText%></a>
357
                    <a class="form_btn" href="<%=scriptName%>?pv_id=<%=parComparePvId%>&rtag_id=<%=parRtag_id%>">Show <%=sCompVerText%></a>
-
 
358
					</fieldset>
-
 
359
					</td>
-
 
360
					<td width=1% nowrap class="body_txt">
-
 
361
 
-
 
362
					<fieldset class="fset body_row">
-
 
363
						<legend>Hide / Show</legend>
-
 
364
						<input type="checkbox" id='btnHideUpdate' ><%=LIMG_UPDATED%>Updated
-
 
365
						<input type="checkbox" id='btnHideAdded'  ><%=LIMG_ADDED%>Added
-
 
366
						<input type="checkbox" id='btnHideRemoved'><%=LIMG_REMOVED%>Removed
-
 
367
						<input type="checkbox" id='btnHideSame'   ><%=LIMG_UNCHANGED%>Unchanged
-
 
368
					</fieldset>
-
 
369
					
319
                    <%End If%>
370
                    <%End If%>
320
                </td>
371
                </td>
-
 
372
				<td></td>
321
                <td nowrap class="body_txt" align="right">
373
                <td nowrap width=1% class="body_txt" align="right">
322
                    <%If parCompare <> "" Then%>
374
                    <%If parCompare <> "" Then%>
-
 
375
					<fieldset class="fset body_row">
-
 
376
						<legend>Summary</legend>
323
                        <%Call DisplayDiffSummary( rsQry ) %>
377
                        <%Call DisplayDiffSummary( rsQry ) %>
-
 
378
					</fieldset>
324
                    <%End If%>
379
                    <%End If%>
325
                </td>
380
                </td>
326
              </tr>
381
              </tr>
327
            </table>
382
            </table>
328
            <hr size="1" noshade color="#999999"> 
383
            <hr size="1" noshade color="#999999"> 
-
 
384
		    <%Else%>
-
 
385
				<span class="body_colb">Files and Folders</span><br>
-
 
386
				<hr size="1" noshade color="#999999"> 
-
 
387
				<span class="body_txt">No files recorded</span>
329
            <%End If%>                                               
388
            <%End If%>                                               
330
    <%End If%>
389
    <%End If%>
331
 
390
 
332
    <!-- MODULE COMPONENTS ++++++++++++++++++++++++++++++++++++++ -->
391
    <!-- MODULE COMPONENTS ++++++++++++++++++++++++++++++++++++++ -->
333
              
392
              
Line 355... Line 414...
355
            While ((NOT rsQry.BOF) AND (NOT rsQry.EOF)) 
414
            While ((NOT rsQry.BOF) AND (NOT rsQry.EOF)) 
356
                Dim sizeStyle : sizeStyle = ""
415
                Dim sizeStyle : sizeStyle = ""
357
                Dim sumStyle  : sumStyle = ""
416
                Dim sumStyle  : sumStyle = ""
358
                Dim diffState : diffState = rsQry("diff_state")
417
                Dim diffState : diffState = rsQry("diff_state")
359
                Dim sSum, sCompSum, filePath
418
                Dim sSum, sCompSum, filePath
-
 
419
                Dim sRowClass
360
                sSum = rsQry("crc_cksum")
420
                sSum = rsQry("crc_cksum")
361
                sCompSum = rsQry("comp_crc_cksum") 
421
                sCompSum = rsQry("comp_crc_cksum") 
362
                sSize = rsQry("byte_size")
422
                sSize = rsQry("byte_size")
363
                sCompSize = rsQry("comp_byte_size")
423
                sCompSize = rsQry("comp_byte_size")
364
                Call GetDiffStateIcon( diffState, sDiffStateIcon, sStyle )
424
                Call GetDiffStateIcon( diffState, sDiffStateIcon, sStyle, sRowClass )
365
                filePath = rsQry("file_path")
425
                filePath = rsQry("file_path")
366
                If IsNull(filePath) Then filePath = ""
426
                If IsNull(filePath) Then filePath = ""
367
                            
427
                            
368
                ' Find if this is file or folder
428
                ' Find if this is file or folder
369
                If Len(filePath) > 0 AND Right(filePath,1) <> "/" Then
429
                If Len(filePath) > 0 AND Right(filePath,1) <> "/" Then
Line 384... Line 444...
384
                    End If
444
                    End If
385
 
445
 
386
                End If
446
                End If
387
                            
447
                            
388
            %>
448
            %>
389
            <tr class="form_item_grey">
449
            <tr class="form_item_grey <%=sRowClass%>">
390
              <td nowrap ><%=sDiffStateIcon%></td>
450
              <td nowrap ><%=sDiffStateIcon%></td>
391
              <td nowrap class="<%=sStyle%>"><%=sIcon & rsQry("name")%></td>
451
              <td nowrap class="<%=sStyle%>"><%=sIcon & rsQry("name")%></td>
392
              <td nowrap class="<%=sizeStyle%>" align="right"><%=sSize%></td>
452
              <td nowrap class="<%=sizeStyle%>" align="right"><%=sSize%></td>
393
              <td nowrap class="<%=sumStyle%>"  align="right"><%=sSum%></td>
453
              <td nowrap class="<%=sumStyle%>"  align="right"><%=sSum%></td>
394
              <td nowrap class="<%=sizeStyle%>" align="right"><%=sCompSize%></td>
454
              <td nowrap class="<%=sizeStyle%>" align="right"><%=sCompSize%></td>