Subversion Repositories DevTools

Rev

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

Rev 6379 Rev 6427
Line 43... Line 43...
43
    updateTableIcons();
43
    updateTableIcons();
44
}
44
}
45
 
45
 
46
function closeTableAll()
46
function closeTableAll()
47
{
47
{
48
    $('#fileList tr td:nth-child(2)').each(function(idx, item){
48
    $('#fileList tr').each(function(idx, item){
-
 
49
        var tr = $(item);
-
 
50
        if (tr.hasClass('tag-isDir')) {
49
        $(item.closest('tr')).addClass('tag-isHidden');
51
            tr.addClass('tag-isHidden');
-
 
52
        }
50
        var txt =  item.innerText;
53
        var txt =  tr.data('path') || '';
51
        if ( txt.indexOf("/") >= 0 ) {
54
        if ( txt.indexOf("/") >= 0) {
52
            $(item.closest('tr')).addClass('display-none');
55
            tr.addClass('display-none');
53
        };
56
        };
54
    });
57
    });
55
    updateTableIcons();
58
    updateTableIcons();
56
}
59
}
57
 
60
 
Line 86... Line 89...
86
}
89
}
87
 
90
 
88
$( document ).ready(function() {
91
$( document ).ready(function() {
89
 
92
 
90
    // Open / Close directory elements
93
    // Open / Close directory elements
91
    $('#fileList tr td:first-child').click(function() {
94
    $('#fileList tr:not(:first-child) td:first-child').click(function() {
92
 
95
 
93
       // Calculate the text name of the parent directory
96
       // Calculate the text name of the parent directory
94
       var tr = $(this.closest('tr'));
97
       var tr = $(this.closest('tr'));
95
       var dir = $(tr).children('td').eq(1).get(0).innerText;
98
       var dir =  tr.data('path') || '';
96
       if ( ! $(tr).hasClass('tag-isDir') ) {
99
       if ( ! tr.hasClass('tag-isDir') ) {
97
           dir=dir.replace(/\/[^\/]*$/,'');
100
           dir=dir.replace(/\/[^\/]*$/,'');
98
       }
101
       }
99
 
102
 
100
       // Scan table:
103
       // Scan table:
101
       //   Looking for directory element
104
       //   Looking for directory element
102
       //   Then show/hide elements
105
       //   Then show/hide elements
103
       var isHidden = false;
106
       var isHidden = false;
104
       var found = false;
107
       var found = false;
105
       $('#fileList tr td:nth-child(2)').each(function(idx, item){
108
       $('#fileList tr').each(function(idx, item){
106
           var txt =  item.innerText;
109
           var tr = $(item);
-
 
110
           var txt =  tr.data('path') || '';
107
           if ( !found ) {
111
           if ( !found ) {
108
               if ( txt.indexOf(dir) == 0 )
112
               if ( txt.indexOf(dir) == 0 )
109
               {
113
               {
110
                   var tr = $(item.closest('tr'));
-
 
111
                   isHidden = tr.hasClass('tag-isHidden');
114
                   isHidden = tr.hasClass('tag-isHidden');
112
                   tr.toggleClass('tag-isHidden');
115
                   tr.toggleClass('tag-isHidden');
113
                   found = true;
116
                   found = true;
114
               }
117
               }
115
           } else {
118
           } else {
116
               if ( txt.indexOf(dir)  < 0 ) return false;
119
               if ( txt.indexOf(dir)  < 0 ) return false;
117
               var tr = $(item.closest('tr'));
-
 
118
               if ( isHidden ) {
120
               if ( isHidden ) {
119
                   tr.removeClass('display-none');
121
                   tr.removeClass('display-none');
120
               } else {
122
               } else {
121
                   tr.addClass('display-none');
123
                   tr.addClass('display-none');
122
               };
124
               };
Line 409... Line 411...
409
            Else
411
            Else
410
            %>
412
            %>
411
            <table id="fileList" width="100%"  border="0" cellspacing="1" cellpadding="3">
413
            <table id="fileList" width="100%"  border="0" cellspacing="1" cellpadding="3">
412
            <tr class="form_field_hdr">
414
            <tr class="form_field_hdr">
413
              <td width="1%" onclick="tableToggleAll(this)">
415
              <td width="1%" onclick="tableToggleAll(this)">
414
                    <img class='display-none' src='images/rex_images/_folderopen.gif' border='0' hspace='3' align='absmiddle' title='Close all'>
-
 
415
                    <img class='' src='images/rex_images/_folder.gif' border='0' hspace='3' align='absmiddle' title='Expand All'>
416
                    <img class='' src='images/rex_images/_folder.gif' border='0' hspace='3' align='absmiddle' title='Expand All'>
-
 
417
                    <img class='display-none' src='images/rex_images/_folderopen.gif' border='0' hspace='3' align='absmiddle' title='Close all'>
416
              </td>
418
              </td>
417
              <td width="25%" >Name</td>
419
              <td width="25%" >Name</td>
418
              <td width="25%" align="right">Byte Size</td>
420
              <td width="25%" align="right">Byte Size</td>
419
              <td width="25%" align="right">CKSUM</td>
421
              <td width="25%" align="right">CKSUM</td>
420
              <td width="25%" align="right">MODCRC</td>
422
              <td width="25%" align="right">MODCRC</td>
421
            </tr>
423
            </tr>
422
            <%
424
            <%
423
            Dim dClass, nextClass, altClass
425
            Dim dClass, nextClass, altClass
424
            Dim isHidden , bFirst
426
            Dim isHidden , bFirst
425
            Dim filePath
427
            Dim filePath, fileName
426
            Dim curDir, hiddenBase
428
            Dim curDir, hiddenBase
427
            Dim knownDirs : knownDirs = Array ("lcov", "doc", "utfResults" )
429
            Dim knownDirs : knownDirs = Array ("lcov", "doc", "utfResults" )
428
            Dim item
430
            Dim item
-
 
431
            Dim trAttr
429
 
432
 
430
            dClass = ""
433
            dClass = ""
431
            isHidden = FALSE
434
            isHidden = FALSE
432
            curDir = ""
435
            curDir = ""
433
 
436
 
434
            While ((NOT rsQry.BOF) AND (NOT rsQry.EOF))
437
            While ((NOT rsQry.BOF) AND (NOT rsQry.EOF))
435
                    sLink = dpkg_archiveURL & pkgInfoHash.Item ("pkg_name") &"/"& pkgInfoHash.Item ("pkg_version") &"/"& Replace( rsQry("file_path") & rsQry("file_name"), "\", "/" )
438
                    sLink = dpkg_archiveURL & pkgInfoHash.Item ("pkg_name") &"/"& pkgInfoHash.Item ("pkg_version") &"/"& Replace( rsQry("file_path") & rsQry("file_name"), "\", "/" )
436
                    filePath = rsQry("file_path")
439
                    filePath = rsQry("file_path")
437
                    If IsNull(filePath) Then filePath = ""
440
                    If IsNull(filePath) Then filePath = ""
-
 
441
                    fileName = rsQry("file_name")
-
 
442
                    trAttr = "data-path=""" & filePath & fileName & """"
438
 
443
 
439
                    ' Determine if item is 'still' in hidden area
444
                    ' Determine if item is 'still' in hidden area
440
                    If isHidden Then
445
                    If isHidden Then
441
                        If InStr(filePath, hiddenBase) <> 1 Then
446
                        If InStr(filePath, hiddenBase) <> 1 Then
442
                            isHidden = FALSE
447
                            isHidden = FALSE
Line 484... Line 489...
484
                        If isHidden Then
489
                        If isHidden Then
485
                            dClass = dClass & " display-none tag-isHidden"
490
                            dClass = dClass & " display-none tag-isHidden"
486
                        End If
491
                        End If
487
                    End If
492
                    End If
488
                    %>
493
                    %>
489
                    <tr class="<%=dClass%> form_field_grey_bg body_txt_gray">
494
                    <tr class="<%=dClass%> form_field_grey_bg body_txt_gray" <%=trAttr%>>
490
                      <td nowrap ><%=sIcon%></td>
495
                      <td nowrap ><%=sIcon%></td>
491
                      <td nowrap><a target="_blank" href="<%=sLink%>" class="body_txt_gray_link"><%=filePath & rsQry("file_name")%></a></td>
496
                      <td nowrap><a target="_blank" href="<%=sLink%>" class="body_txt_gray_link"><%=filePath & fileName%></a></td>
492
                      <td nowrap align="right"><%=sSize%></td>
497
                      <td nowrap align="right"><%=sSize%></td>
493
                      <td nowrap align="right"><%=rsQry("crc_cksum")%></td>
498
                      <td nowrap align="right"><%=rsQry("crc_cksum")%></td>
494
                      <td nowrap align="right"><%=rsQry("crc_modcrc")%></td>
499
                      <td nowrap align="right"><%=rsQry("crc_modcrc")%></td>
495
                    </tr>
500
                    </tr>
496
                    <%
501
                    <%