Skip to main content
summaryrefslogtreecommitdiffstats
blob: 74ec758bffb372436fa1f8518bcc683443a91702 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<%
/*******************************************************************************
 * Copyright (c) 2001, 2004 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License 2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 * 
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
%>
<%@ page contentType="text/html; charset=UTF-8" import="java.util.Enumeration,
                                                                                          java.util.Vector,
                                                                                          org.eclipse.wst.ws.internal.explorer.platform.util.QuickSort,
                                                                                          org.eclipse.wst.ws.internal.explorer.platform.perspective.*,
                                                                                          org.eclipse.wst.ws.internal.explorer.platform.constants.*,
                                                                                          org.eclipse.wst.ws.internal.explorer.platform.datamodel.*,
                                                                                          org.eclipse.wst.ws.internal.explorer.platform.favorites.constants.*,
                                                                                          org.eclipse.wst.ws.internal.explorer.platform.favorites.actions.*,
                                                                                          org.eclipse.wst.ws.internal.explorer.platform.favorites.perspective.FavoritesPerspective,
                                                                                          org.eclipse.wst.ws.internal.explorer.platform.favorites.datamodel.*" %>

<jsp:useBean id="controller" class="org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller" scope="session"/>
<%
    String divFavoriteWSILTable = "divFavoriteWSILTable";
    String xdivFavoriteWSILTable = "xdivFavoriteWSILTable";

    FavoritesPerspective favoritesPerspective = controller.getFavoritesPerspective();
    NodeManager nodeManager = favoritesPerspective.getNodeManager();
    Node selectedNode = nodeManager.getSelectedNode();
    TreeElement selectedElement = selectedNode.getTreeElement();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html lang="<%=response.getLocale().getLanguage()%>">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title><%=favoritesPerspective.getMessage("VIEW_TITLE_WSIL_LIST")%></title>
    <link rel="stylesheet" type="text/css" href="<%=response.encodeURL(controller.getPathWithContext("css/windows.css"))%>">
    <jsp:include page="/favorites/scripts/favoritesFormSubmit.jsp" flush="true"/>
    <jsp:include page="/favorites/scripts/favoritesTable.jsp" flush="true"/>
</head>
<body dir="<%=org.eclipse.wst.ws.internal.explorer.platform.util.DirUtils.getDir()%>" class="contentbodymargin">
<div id="contentborder">
    <%
    String titleImagePath = "favorites/images/list_WSIL_highlighted.gif";
    String title = favoritesPerspective.getMessage("ALT_LIST_FAVORITE_WSIL");
    %>
    <%@ include file = "/forms/formheader.inc" %>
    <table>
      <tr>
        <td class="labels">
          <%=favoritesPerspective.getMessage("FORM_LABEL_LIST_FAVORITE_WSIL_DESC")%>
        </td>
      </tr>
    </table>    
    <form action="<%=response.encodeURL(controller.getPathWithContext(RemoveFavoritesAction.getBaseActionLink()))%>" method="post" target="<%=FrameNames.PERSPECTIVE_WORKAREA%>" style="margin-top:10px;">
    <%
    if (selectedElement instanceof FavoritesWSILFolderElement) {
    %>
        <input type="hidden" name="<%=FavoritesActionInputs.MULTIPLE_LINK_ACTION%>" value="1">
        <table width="95%" border=0 cellpadding=6 cellspacing=0>
            <tr>
                <td height=20 valign="bottom" align="left" nowrap width=11>
                    <a href="javascript:twist('<%=divFavoriteWSILTable%>','<%=xdivFavoriteWSILTable%>')"><img name="<%=xdivFavoriteWSILTable%>" src="<%=response.encodeURL(controller.getPathWithContext("images/twistclosed.gif"))%>" alt="<%=controller.getMessage("ALT_TWIST_CLOSED")%>" class="twist"></a>
                </td>
                <td height=20 valign="bottom" align="left" nowrap class="labels">
                    <strong><%=favoritesPerspective.getMessage("FORM_LABEL_FAVORITE_WSIL")%></strong>
                </td>
            </tr>
        </table>

        <table width="95%" border=0 cellpadding=0 cellspacing=0>
            <tr>
                <td valign="top" height=10><img src="<%=response.encodeURL(controller.getPathWithContext("images/keyline.gif"))%>" alt="" height=2 width="100%"></td>
            </tr>
        </table>

        <div id="<%=divFavoriteWSILTable%>">
        <table width="95%" cellpadding=3 cellspacing=0 class="tableborder">
            <tr>
                <th class="checkboxcells" width=10><input type="checkbox" onClick="favHandleCheckAllClick('<%=divFavoriteWSILTable%>',this)" title="<%=controller.getMessage("FORM_CONTROL_TITLE_SELECT_ALL_CHECK_BOX")%>"></th>
                <th class="headercolor"><%=favoritesPerspective.getMessage("FORM_LABEL_URL")%></th>
            </tr>
            <%
            FavoritesWSILFolderElement favWSILFolderElement = (FavoritesWSILFolderElement)selectedElement;
            Enumeration e = favWSILFolderElement.getAllFavorites();
            Vector sortedVector = new Vector();
            while (e.hasMoreElements()) {
                sortedVector.add(e.nextElement());
            }
            QuickSort.sort(sortedVector);
            e = sortedVector.elements();
            while (e.hasMoreElements()) {
                FavoritesWSILElement favWSILElement = (FavoritesWSILElement)e.nextElement();
                %>
                <tr>
                    <td class="checkboxcells" width=10><input type="checkbox"  name="<%=FavoritesActionInputs.MASS_ACTION_NODE_ID%>" value="<%=selectedNode.getChildNode(favWSILElement).getNodeId()%>" onClick="validateCheckBoxInput(this, this.checked)" title="<%=controller.getMessage("FORM_CONTROL_TITLE_SELECT_ROW_CHECK_BOX")%>"></td>
                    <td class="tablecells" nowrap><a href="<%=response.encodeURL(controller.getPathWithContext(SelectFavoritesNodeAction.getActionLink(selectedNode.getChildNode(favWSILElement).getNodeId(), false)))%>" target="<%=FrameNames.PERSPECTIVE_WORKAREA%>"><%=favWSILElement.getWsilUrl()%></a></td>
                </tr>
                <%
            }
            %>
        </table>
        </div>
        <script language="javascript">
            twistInit('<%=divFavoriteWSILTable%>','<%=xdivFavoriteWSILTable%>');
        </script>


        <table border=0 cellpadding=2 cellspacing=0>
            <tr>
                <td height=40 valign="bottom" nowrap>
                    <input type="button" value="<%=favoritesPerspective.getMessage("FORM_LABEL_IMPORT_TO_WSIL_PERSPECTIVE")%>" onClick="setFormLocationAndSubmit('<%=divFavoriteWSILTable%>', this.form, '<%=response.encodeURL(controller.getPathWithContext(AddWSILToWSILPerspectiveAction.getBaseActionLink()))%>')" class="button">
                </td>
                <td height=40 valign="bottom" nowrap>
                    <input type="button" value="<%=favoritesPerspective.getMessage("FORM_LABEL_REMOVE")%>" onClick="setFormLocationAndSubmit('<%=divFavoriteWSILTable%>', this.form, '<%=response.encodeURL(controller.getPathWithContext(RemoveFavoritesAction.getBaseActionLink()))%>')" class="button">
                </td>
                <td nowrap width="90%">&nbsp;</td>
            </tr>
        </table>

    <%
    }
    %>
    </form>
</div>
</body>
</html>

Back to the top