Subversion Repositories DevTools

Rev

Rev 6877 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
119 ghuddy 1
<%
2
'=====================================================
3
'|                                                   |
7291 dpurdie 4
'|                    _front_explorer                |
119 ghuddy 5
'|                                                   |
6
'=====================================================
7
%>
8
<%
9
'------------ Variable Definition -------------
10
Dim rsProj
11
Dim rsTemp
12
Dim parListBy
13
'------------ Constants Declaration -----------
7291 dpurdie 14
Const hlColor      = "#E3B62D"
119 ghuddy 15
'------------ Variable Init -------------------
16
parListBy = Request("listby")
7291 dpurdie 17
If parListBy = "" Then parListBy = 3    ' Default visible list is Projects
119 ghuddy 18
'----------------------------------------------
19
%>
20
<%
21
'-----------------------------------------------------------------------------------------------------------------------
22
Function Set_Row_Style ( SSLink )
7291 dpurdie 23
    Set_Row_Style = "class='bg_navPane pointer' onClick=""location.href='"& SSLink &"'"""
119 ghuddy 24
End Function
25
'-----------------------------------------------------------------------------------------------------------------------
26
Function Get_Projects
7291 dpurdie 27
    Get_Projects = _
28
    "select unique p.* from release_tags rt, projects p where rt.PROJ_ID = p.PROJ_ID and rt.official in ('N','R','C','P') ORDER BY p.proj_name ASC"
119 ghuddy 29
End Function
30
'-----------------------------------------------------------------------------------------------------------------------
6070 dpurdie 31
Function Get_All_Projects
7291 dpurdie 32
    Get_All_Projects = _
33
    "select p.* from projects p ORDER BY p.proj_name ASC"
6070 dpurdie 34
End Function
35
'-----------------------------------------------------------------------------------------------------------------------
119 ghuddy 36
Function Format_Full_Name ( SSfullname )
7291 dpurdie 37
    If InStr( SSfullname, " " ) = 0 Then
38
        ' No space in full_name
39
        Format_Full_Name = SSfullname
40
 
41
    Else
42
        ' Proper full_name found
43
 
44
        Format_Full_Name = Left( SSfullname, InStr( SSfullname, " " )  )
45
 
46
    End If
47
 
119 ghuddy 48
End Function
49
'-----------------------------------------------------------------------------------------------------------------------
6543 dpurdie 50
Sub GenerateAtoZ(idx, page,emode)
7291 dpurdie 51
    Dim letter, LROW_ONE, LROW_TWO, LROW3, URL
52
 
53
    ' Declare array of letters for browsing
54
    LROW_ONE = Array("A","B","C","D","E","F","G","H","I","J","K","L","M")
55
    LROW_TWO = Array("N","O","P","Q","R","S","T","U","V","W","X","Y","Z")
56
    LROW3    = Array("1","2","3","4","5","6","7","8","9","0","*")
57
 
58
 
59
    Response.write "<table width='180'  border='0' cellspacing='1' cellpadding='2'>"
60
 
61
    ' Render first row
62
    For Each letter In LROW_ONE
63
        Response.write "<td width='10' bgcolor='#DDB02C' align='center'>"
6543 dpurdie 64
        Response.Write "<a href ='"&page&"?listby="&idx&"&browse="& Server.URLEncode( letter ) &"' class='form_txt_link'>"& letter &"</a></td>"
7291 dpurdie 65
    Next
66
    Response.write "</tr>"
67
 
68
 
69
    ' Render second row
70
    Response.write "<tr>"
71
    For Each letter In LROW_TWO
72
        Response.write "<td bgcolor='#DDB02C' align='center'>"
6543 dpurdie 73
        Response.Write "<a href ='"&page&"?listby="&idx&"&browse="& Server.URLEncode( letter ) &"' class='form_txt_link'>"& letter &"</a></td>"
7291 dpurdie 74
    Next
75
    Response.write "</tr>"
6543 dpurdie 76
 
77
    If eMode Then
7291 dpurdie 78
        ' Render 3rd row
79
        Response.write "<tr>"
80
        For Each letter In LROW3
81
            Response.write "<td bgcolor='#DDB02C' align='center'>"
6543 dpurdie 82
            Response.Write "<a href ='"&page&"?listby="&idx&"&browse="& Server.URLEncode( letter ) &"' class='form_txt_link'>"& letter &"</a></td>"
7291 dpurdie 83
        Next
84
        Response.write "</tr>"
6543 dpurdie 85
    End If
86
 
7291 dpurdie 87
    Response.write "</table>"
88
 
119 ghuddy 89
End Sub
90
'-----------------------------------------------------------------------------------------------------------------------
91
%>
7291 dpurdie 92
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
93
        <tr> 
94
            <td>
119 ghuddy 95
              <table width="100%"  border="0" cellspacing="0" cellpadding="10">
7291 dpurdie 96
                <form name="fromlist">
119 ghuddy 97
                <tr>
98
                  <td nowrap>
6543 dpurdie 99
                  <script type="text/javascript">
100
                  $(document).ready(function(){
101
                    // Force focus to the inputbox when the page is rendered
102
                    setInputFocus(<%=parListBy%>);
103
                  });
104
                  // Set required div visible and give the input box focus
105
                  function setDivVisible(divNum) {
106
                    var ii;
107
                    for (ii=1; ii<=5; ii++) {
108
                        Visible('DIVLIST' + ii, 'none')
109
                    }
110
                    Visible('DIVLIST' + divNum, 'block');
111
                    setInputFocus(divNum);
112
                  }
113
                  // Set focus to the input box - set cursor to end of text
114
                  function setInputFocus(divNum){
115
                    var input = $("#DIVFOCUS" + divNum );
116
                    input.focus();
117
                    var tmpStr = input.val();
118
                    input.val('');
119
                    input.val(tmpStr);
120
                  }
121
                  </script>
7291 dpurdie 122
                  <select name="listby" class='form_item' onChange="setDivVisible(this.value);">
123
                    <option value="3" <%If parListBy = "3" Then%>selected<%End If%>>View by Projects</option>
124
                    <option value="4" <%If parListBy = "4" Then%>selected<%End If%>>View by Projects - ALL</option>
125
                    <option value="5" <%If parListBy = "5" Then%>selected<%End If%>>View by Releases</option>
126
                    <option value="1" <%If parListBy = "1" Then%>selected<%End If%>>View by Packages</option>
127
                    <option value="2" <%If parListBy = "2" Then%>selected<%End If%>>View by Files</option>
128
                  </select>
129
                  </td>
119 ghuddy 130
                </tr>
7291 dpurdie 131
                </form>
2365 dpurdie 132
            </table>
7291 dpurdie 133
            </td>
134
        </tr> 
135
        <tr> 
6877 dpurdie 136
          <td class='bg_dialog_line'></td>
119 ghuddy 137
        </tr>
7291 dpurdie 138
    </table>
6543 dpurdie 139
<!-- LIST BY RELEASES ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
7291 dpurdie 140
    <DIV name="DIVLIST5" id="DIVLIST5" style="display:none;">
141
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
142
        <tr> 
143
           <td>
6543 dpurdie 144
              <table width="100%"  border="0" cellspacing="0" cellpadding="10">
145
                <tr>
146
                  <td nowrap>
147
                      <form name="release_search" method="get" action="view_by_release.asp" onSubmit="MM_validateForm('releasename','Release keyword','R');return document.MM_returnValue">
7291 dpurdie 148
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
149
                            <tr>
150
                              <td colspan="2" class="form_item">Find Release</td>
151
                            </tr>
152
                            <tr>
153
                              <td valign="top" class="form_txt"><input id="DIVFOCUS5" name="releasename" type="search" class="formBtnEnable form_item" size="25" value="<%=Request("releasename")%>" placeholder="Enter search string">
154
                              </td>
155
                              <td class="form_txt"><input type="submit" name="btn" value="Go" class="form_btn_comp"></td>
156
                            </tr>
157
                            <tr>
158
                              <td colspan="2" class="form_item">Browse</td>
159
                            </tr>
160
                            <tr> 
161
                              <td colspan="2"><%Call GenerateAtoZ(5,"view_by_release.asp", true)%></td>
162
                            </tr>
163
                            <input type="hidden" name="listby" value="5">
164
                      </table>
6543 dpurdie 165
                      </form>
7291 dpurdie 166
                  </td>
6543 dpurdie 167
                </tr>
168
            </table>            
7291 dpurdie 169
        </td>
170
        <tr> 
6877 dpurdie 171
          <td class='bg_dialog_line'></td>
6543 dpurdie 172
        </tr>
7291 dpurdie 173
    </table>
174
    </DIV>
175
 
119 ghuddy 176
<!-- LIST BY PACKAGE ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
7291 dpurdie 177
    <DIV name="DIVLIST1" id="DIVLIST1" style="display:none;">
178
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
179
        <tr> 
180
           <td>
119 ghuddy 181
              <table width="100%"  border="0" cellspacing="0" cellpadding="10">
182
                <tr>
183
                  <td nowrap>
184
                      <form name="pkg_search" method="get" action="view_by_package.asp" onSubmit="MM_validateForm('pkgname','Package keyword','R');return document.MM_returnValue">
7291 dpurdie 185
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
186
                            <tr>
187
                              <td colspan="2" class="form_item">Find Package</td>
188
                            </tr>
189
                            <tr>
190
                              <td valign="top" class="form_txt"><input id="DIVFOCUS1" name="pkgname" type="search" class="formBtnEnable form_item" size="25" value="<%=Request("pkgname")%>" placeholder="Enter search string">
191
                              </td>
192
                              <td class="form_txt"><input type="submit" name="btn" value="Go" class="form_btn_comp"></td>
193
                            </tr>
194
                            <tr>
195
                              <td colspan="2" class="form_item">Browse</td>
196
                            </tr>
197
                            <tr> 
198
                              <td colspan="2"><%Call GenerateAtoZ(1,"view_by_package.asp",false)%></td>
199
                            </tr>
200
                            <input type="hidden" name="listby" value="1">
201
                      </table>
119 ghuddy 202
                      </form>
7291 dpurdie 203
                  </td>
119 ghuddy 204
                </tr>
205
            </table>            
7291 dpurdie 206
        </td>
207
        <tr> 
6877 dpurdie 208
          <td class='bg_dialog_line'></td>
119 ghuddy 209
        </tr>
7291 dpurdie 210
    </table>
211
    </DIV>
119 ghuddy 212
<!-- LIST BY FILES AND FOLDERS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
7291 dpurdie 213
    <DIV name="DIVLIST2" id="DIVLIST2" style="display:none;">
214
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
215
        <tr> 
216
            <td>
119 ghuddy 217
              <table width="100%"  border="0" cellspacing="0" cellpadding="10">
218
                <tr>
219
                  <td nowrap>
220
                      <form name="pkg_search" method="get" action="view_by_file.asp" onSubmit="MM_validateForm('filename','File keyword','R');return document.MM_returnValue">
7291 dpurdie 221
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
222
                            <tr>
223
                              <td colspan="2" class="form_item">Find File</td>
224
                            </tr>
225
                            <tr>
226
                              <td valign="top" class="form_txt"><input id="DIVFOCUS2" name="filename" type="search" class="formBtnEnable form_item" size="25" value="<%=Request("filename")%>" placeholder="Enter search string">
227
                              </td>
228
                              <td class="form_txt"><input type="submit" name="btn" value="Go" class="form_btn_comp"></td>
229
                            </tr>
230
                            <tr>
231
                              <td colspan="2" class="form_item">
232
                                    HINTS:<br>- You can use * wildcard. e.g. *0123 or 0123* or *0123*
233
                                          <br>- Some searches may take a long time. Be specific.
234
                                          <br>- It will be faster to search within a specific release.
235
                              </td>
236
                            </tr>                        
237
                            <input type="hidden" name="listby" value="2">
238
                      </table>
119 ghuddy 239
                      </form>
7291 dpurdie 240
                  </td>
119 ghuddy 241
                </tr>
242
            </table>            
7291 dpurdie 243
        </td>
244
        <tr> 
6877 dpurdie 245
          <td class='bg_dialog_line'></td>
7291 dpurdie 246
        </tr>       
247
    </table>
248
    </DIV>
119 ghuddy 249
<!-- LIST BY PROJECT ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
7291 dpurdie 250
    <DIV name="DIVLIST3" id="DIVLIST3" style="display:none;">
251
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
252
 
253
        <%Set rsProj = OraDatabase.DbCreateDynaset( Get_Projects, cint(0))
254
        While ((NOT rsProj.BOF) AND (NOT rsProj.EOF))%>
119 ghuddy 255
        <tr <%=Set_Row_Style( "rtree.asp?proj_id="&  rsProj.Fields("proj_id") )%>> 
256
          <td nowrap><img src="images/h_trsp_dot.gif" width="16" height="16" align="absmiddle" vspace="4"><a href="rtree.asp?proj_id=<%=rsProj.Fields("proj_id")%>" class="form_txt_link"><%=UCase(rsProj.Fields("proj_name"))%></a></td>
257
        </tr>
258
        <tr> 
6877 dpurdie 259
          <td class='bg_dialog_line'></td>
119 ghuddy 260
        </tr>
7291 dpurdie 261
        <%rsProj.MoveNext
262
        WEnd%>
263
        <%If rsProj.RecordCount < 1 Then%>
264
            <tr> 
265
              <td nowrap class="err_alert"><img src="images/h_trsp_dot.gif" width="16" height="16" align="absmiddle" vspace="4"><b>No projects available!</b></td>
266
            </tr>
267
            <tr> 
268
              <td class='bg_dialog_line'></td>
269
            </tr>
270
        <%End If%>
271
        <tr> 
272
        <%If (canActionControl("CreateNewProject")) Then%>
6827 dpurdie 273
          <td align="right" class=pointer onClick="MM_openVixIFrame('_wform_new_project.asp','Create a New Project')"><img src="images/bt_new_project.gif" width="16" height="16" border="0" vspace="5" hspace="5" align="absmiddle" title="Create new Project"></td>
119 ghuddy 274
        </tr>
7291 dpurdie 275
        <%End If%>
276
    </table>
277
    </DIV>  
6070 dpurdie 278
<!-- LIST BY PROJECT ALL ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
7291 dpurdie 279
    <DIV name="DIVLIST4" id="DIVLIST4" style="display:none;">
280
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
281
 
282
        <%Set rsProj = OraDatabase.DbCreateDynaset( Get_All_Projects, cint(0))
283
        While ((NOT rsProj.BOF) AND (NOT rsProj.EOF))%>
6070 dpurdie 284
        <tr <%=Set_Row_Style( "rtree.asp?proj_id="&  rsProj.Fields("proj_id") )%>> 
285
          <td nowrap><img src="images/h_trsp_dot.gif" width="16" height="16" align="absmiddle" vspace="4"><a href="rtree.asp?proj_id=<%=rsProj.Fields("proj_id")%>" class="form_txt_link"><%=UCase(rsProj.Fields("proj_name"))%></a></td>
286
        </tr>
287
        <tr> 
6877 dpurdie 288
          <td class='bg_dialog_line'></td>
6070 dpurdie 289
        </tr>
7291 dpurdie 290
        <%rsProj.MoveNext
291
        WEnd%>
292
        <%If rsProj.RecordCount < 1 Then%>
293
            <tr> 
294
              <td nowrap class="err_alert"><img src="images/h_trsp_dot.gif" width="16" height="16" align="absmiddle" vspace="4"><b>No projects available!</b></td>
295
            </tr>
296
            <tr> 
297
              <td class='bg_dialog_line'></td>
298
            </tr>
299
        <%End If%>
300
        <tr> 
301
        <%If (canActionControl("CreateNewProject")) Then%>
6827 dpurdie 302
            <td align="right" class=pointer onClick="MM_openVixIFrame('_wform_new_project.asp','Create a New Project')"><img src="images/bt_new_project.gif" width="16" height="16" border="0" vspace="5" hspace="5" align="absmiddle" title="Create new Project"></td>
6070 dpurdie 303
        </tr>
7291 dpurdie 304
        <%End If%>
305
    </table>
306
    </DIV>  
119 ghuddy 307
<!-- END OF LIST BY ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
308
<script language="JavaScript" type="text/javascript">
309
<!-- 
310
// Set List visibility
6070 dpurdie 311
Visible ("DIVLIST1","none","DIVLIST2","none","DIVLIST3","none","DIVLIST4","none");
119 ghuddy 312
Visible ("DIVLIST<%=parListBy%>","block");
313
//-->
314
</script>
7291 dpurdie 315
 
119 ghuddy 316