<%-- 
  Copyright 2003 Sun Microsystems, Inc. All rights reserved 
  Use is subject to license terms.
 --%> 

<%@page info="BrowseContainer" language="java"%>
<%@taglib uri="/WEB-INF/jato.tld" prefix="jato"%>
<%@taglib uri="/WEB-INF/console.tld" prefix="console"%>

<jato:useViewBean 
    className="com.sun.portal.desktop.admin.BrowseContainerViewBean">
<jsp:useBean id="viewBean" 
    type="com.sun.portal.desktop.admin.BrowseContainerViewBean"/>

<html>
<head>
  <title><jato:text name="titleHtmlPage" /></title>
  <!------------- style sheet ------------->
  <link rel="stylesheet" href="../console/css/adminstyle.css">
  <link rel="stylesheet" href="../ps/css/psadminstyle.css">
  <script language="javascript" src="../console/js/consolecomp.js"></script>
</head>

<script language="javascript">
function shiftBetween(from, to, allp) { //shifts from one box to another
  var fbox = document.forms[0].elements[from];
  var tbox = document.forms[0].elements[to];
  if (fbox.length > 1 && (fbox.selectedIndex != -1 | allp == 1))  {
    deselectAll(tbox);
    sbv = tbox.options[tbox.length-1].value; 
    sbt = tbox.options[tbox.length-1].text;
    i=0; 
    do {
      if (fbox.options[i].selected | allp == 1) {
      iotext = fbox.options[i].text;
      iovalue = fbox.options[i].value;
      didx = tbox.length;
      fbox.options[i] = null;
      tbox.options[didx] = new Option (sbt, sbv, false, false);
      tbox.options[didx-1] = new Option (iotext, iovalue, false, true);
      tbox.options[didx].selected = false;    // ns4 bug
      tbox.options[didx-1].selected = true;   // ns6 bug
      } else {
        if (allp == 0) { i++ };
      }
    }  
    while (fbox.options[i].value != "______________________________________________________________");
    if (is_nav4 == 1 && is_sun == 1) {  // ns4sol usability issue with multi-select boxes
      deselectAll(tbox);               // only select the last-moved item
      tbox.options[tbox.length -2].selected = true;
    }
    fbox.options[0].selected = false; // deselects spaceer in from box
  } 
}

function deselectAll(box)  { // deselects all items in list
  for(i=0; i<box.options.length; i++) {
    box.options[i].selected = false;
  }
}

//<!--
    // convert all characters to lowercase to simplify testing
    var agt=navigator.userAgent.toLowerCase();

    // *** BROWSER VERSION ***
    var is_major = parseInt(navigator.appVersion);
    var is_minor = parseFloat(navigator.appVersion);

    var is_nav  = ((agt.indexOf('mozilla')!=-1));
    var is_nav4 = (is_nav && (is_major == 4));
    var is_sun   = (agt.indexOf("sunos")!=-1);
//--> end hide JavaScript
</script>

<body bgcolor="#ffffff" leftMargin=0 rightMargin=0 topMargin=0 
  marginheight="0" marginwidth="0">
<script language="javascript">
    pageLoaded = 0;
    parent.headerFrame.helpDocURL = "<jato:text name="helpDocURL"/>";
    parent.headerFrame.helpPage = "<jato:text name="helpAnchorTag"/>";
</script>
  <table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr class="breadcrumb-row"> 
      <td nowrap> 
        <div class="page-title-text">
          <jato:text name="DesktopLinkLabel"/>
          <jato:text name="PageTitle"/>
        </div>
      </td>
    </tr>
    <tr> 
      <td nowrap><img alt="" border="0" height="3" width="1" 
          src="../console/images/spacer.gif"></td>
    </tr>
    <!--Begin Parentage path for container-->
    <tr> 
      <td nowrap> 
        <table border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><img alt="" border="0" height="1" width="10" 
                  src="../console/images/spacer.gif"></td>
            <td nowrap>
              <div class="path-breadcrumb-text">
                <jato:text name="containerPathLabel"/>:&nbsp;
              </div>
            </td>
            <td align=left>
              <console:parentagepath name="ParentagePath" bgColor="white"/>
            </td>
          </tr>
        </table>
      </td>
    </tr>
    <!--End Parentage path for container -->
    <tr> 
      <td nowrap><img alt="" border="0" height="3" width="1" 
          src="../console/images/spacer.gif"></td>
    </tr>
    <tr> 
      <td bgcolor="000000"><img alt="" border="0" height="1" width="1" 
          src="../console/images/spacer.gif"></td>
    </tr>
    <tr>
      <td nowrap><img alt="" border="0" height="15" width="1"
          src="../console/images/spacer.gif"></td>
    </tr>
  </table>

<console:messagebox name="MessageBox" imageURI="../console/images" />

<console:form name="BrowseContainer">

  <!--  Buttons -->
  <!-- Begin table containing Back 2 desktop Button -->
  <table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr>
      <td colspan="2" align="right">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td>
              <console:button name="BackToDesktop"/>
            </td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td nowrap colspan="2"><img alt="" border="0" height="10" width="1"
          src="../console/images/spacer.gif"></td>
    </tr>
  </table>
  <!-- End table containing Back 2 desktop Buttons -->

  <table border="0" cellpadding="0" cellspacing="10" width="100%">
    <jato:content name="GlobalBlock">
    <!-- Begin global props block -->
    <tr>
      <td colspan="2"> 
        <table border="0">
          <tr>
            <td align="left"> 
                <jato:text name="GlobalProps"/>:
            </td>
            <td align="left">
                <console:button name="EditGlobalPropButton" type="mini"/>
            </td>
          </tr>
        </table>
      </td>
    </tr>
    <!-- End global props block -->
    </jato:content>
    <!-- Begin container Block -->
    <tr> 
      <td colspan="2"> 
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
          <tr>
            <td nowrap>
              <!-- Table Title -->
              <div class="table-title-text">
                <jato:text name="ContainersLabel" />
              </div>
            </td>
            <td valign="bottom" width="99%"> 
              <!-- Begin table with the single-pixel light purple separator -->
              <table border="0" cellpadding="0" cellspacing="0" width="100%">
              <tr>
                <td valign="bottom" class="properties-separator"><img 
                  src="../console/images/spacer.gif" width="1" 
                  height="1" alt=""></td>
              </tr>
              </table>
              <!-- End table with the single-pixel light purple separator -->
            </td>
          </tr>
          <tr>
            <td colspan="2">
              <!-- Begin table containing Add and Delete Container Buttons -->
              <jato:content name="AddAndDeleteContainerButtonBlock">
                <table border="0" cellpadding="0" cellspacing="0">
                  <tr> 
                    <td colspan="3"><img src="../console/images/spacer.gif" 
                        width="1" height="6" alt=""></td>
                  </tr>
                  <tr>
                    <jato:content name="AddContainerButtonBlock">
                    <td>
                      <console:button name="AddContainerButton" type="mini"/>
                    </td>
                    <td width="5">&nbsp;</td>
                      </jato:content>
                    <td>
                      <console:button name="DeleteContainerButton" type="mini" fireDisplayEvents="true"/>
                    </td>
                  </tr>
                  <tr> 
                    <td colspan="3"><img src="../console/images/spacer.gif" 
                        width="1" height="6" alt=""></td>
                  </tr>
                </table>
              </jato:content>
              <!-- End table containing Add and Delete Container Buttons -->
            </td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td colspan="2">
        <!-- Begin outer table -->
        <table class="table-frame" border="0" cellspacing="0" cellpadding="1">
          <tr> 
            <td> 
              <!-- Begin inner table -->
              <table class="table-content" border="0" 
                cellspacing="0" cellpadding="0">
                <!-- Top row containing the column headers -->
                <tr class="table-header-row"> 
                  <td>
                    <img alt="" border="0" height="1" width="10" 
                        src="../console/images/spacer.gif">
                  </td>
                  <td>
                    &nbsp;
                  </td>
                  <td>
                    <img alt="" border="0" height="1" width="10" 
                        src="../console/images/spacer.gif">
                  </td>
                  <td> 
                    <div class="table-header-text">
                      <jato:text name="NameLabel"/>
                    </div>
                  </td>
                  <td>
                    <img alt="" border="0" height="1" width="15" 
                        src="../console/images/spacer.gif">
                  </td>
                  <td> 
                    <div class="table-header-text">
                      <jato:text name="ActionLabel"/>
                    </div>
                  </td>
                  <td>
                    <img alt="" border="0" height="1" width="10" 
                        src="../console/images/spacer.gif">
                  </td>
                </tr>
                <!-- Container TiledView -->
                <jato:tiledView name="ContainerTiledView" 
                    type="com.sun.portal.desktop.admin.BrowseContainerTiledView">
                <tr> 
                  <td class="table-separator-row" colspan="7" ><img 
                    src="../console/images/spacer.gif" alt="" width="1" 
                    height="1" border="0"></td>
                </tr>                  
                <tr> 
                  <td>&nbsp;</td>
		  <td><jato:checkbox name="ChannelCheckBox"/></td>
                  <td>&nbsp;</td>
                  <td> 
                    <console:href name="ContainerHref" >
                      <div class="table-navlink-text">
                        <jato:text name="ChannelName"/>
                      </div>
                    </console:href>
                  </td>
                  <td>&nbsp;</td>
                  <td>
                    <font color="#CC6600">[</font><console:href name="EditChannel">
                      <font color="#CC6600"><jato:text name="EditLabel"/>
                      </font></console:href><font color="#CC6600">]</font>
                  </td>
                  <td>&nbsp;</td>
                </tr>
                </jato:tiledView>
                <jato:content name="NoContainersBlock">
                  <tr>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td><jato:text name="NoContainersLabel"/></td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                  </tr>
                </jato:content>                
              </table>
              <!--End inner table -->
            </td>
          </tr>
        </table>
      </td>
    </tr>
    <!-- End container Block -->
    <!-- Add/Delete Buttons -->
    <tr> 
      <td colspan="2"> 
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
          <tr>
            <td nowrap>
              <!-- Table Title -->
              <div class="table-title-text">
                <jato:text name="ChannelsLabel"/>
              </div>
            </td>
            <td valign="bottom" width="99%"> 
              <!-- Begin table with the single-pixel light purple separator -->
              <table border="0" cellpadding="0" cellspacing="0" width="100%">
                <tr>
                  <td valign="bottom" class="properties-separator"><img 
                     src="../console/images/spacer.gif" width="1" 
                     height="1" alt=""></td>
                </tr>
              </table>
              <!-- End table with the single-pixel light purple separator -->
            </td>
          </tr>
          <tr>
            <td colspan="2">
              <!-- Begin table containing Add and Delete Buttons -->
              <jato:content name="AddAndDeleteButtonBlock">
              <table border="0" cellpadding="0" cellspacing="0">
                <tr> 
                  <td colspan="3"><img src="../console/images/spacer.gif" 
                     width="1" height="6" alt=""></td>
                </tr>
                <tr>
                  <jato:content name="AddButtonBlock">
                  <td>
                    <console:button name="AddButton" type="mini"/>
                  </td>
                  <td width="5">&nbsp;</td>
                  </jato:content>
                  <td>
                    <console:button name="DeleteButton" type="mini" fireDisplayEvents="true"/>
                  </td>
                  <td width="5">&nbsp;</td>

                  <!-- External Modules Button TiledView -->
                  <jato:tiledView name="ExternalModulesTiledView"
                      type="com.sun.portal.desktop.admin.ExternalModulesButtonTiledView">
                  <td>
                    <console:button name="ModuleButton" type="mini" fireDisplayEvents="true"/>
                  </td>
                  <td width="5">&nbsp;</td>
                  </jato:tiledView>


                </tr>
                <tr> 
                  <td colspan="3"><img src="../console/images/spacer.gif" 
                     width="1" height="6" alt=""></td>
                </tr>
              </table>
              </jato:content>
              <!-- End table containing Add and Delete Buttons -->
            </td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td colspan="2">
        <!-- Begin outer table (channels)-->
        <table class="table-frame" border="0" cellspacing="0" cellpadding="1">
          <tr> 
            <td> 
              <!-- Begin inner table (channels)-->
              <table class="table-content" border="0" cellspacing="0" 
                cellpadding="0">
                <!-- Top row containing the column headers -->
                <tr class="table-header-row"> 
                  <td><img alt="" border="0" height="1" width="10" 
                     src="../console/images/spacer.gif"></td>
                  <td>&nbsp;</td>
                  <td><img alt="" border="0" height="1" width="10" 
                    src="../console/images/spacer.gif"></td>
                  <td> 
                    <div class="table-header-text">
                      <jato:text name="NameLabel"/>
                    </div>
                  </td>
                  <td><img alt="" border="0" height="1" width="15" 
                         src="../console/images/spacer.gif"></td>
                  <td> 
                    <div class="table-header-text">
                       <jato:text name="ActionLabel"/>
                    </div>
                  </td>
                  <td><img alt="" border="0" height="1" width="10" 
                         src="../console/images/spacer.gif"></td>
                </tr>
                <!-- Channel TiledView -->
                <jato:tiledView name="ChannelTiledView"
                      type="com.sun.portal.desktop.admin.BrowseChannelTiledView">
                <tr>
                  <td class="table-separator-row" colspan="7" ><img 
                      src="../console/images/spacer.gif" alt="" width="1" 
                      height="1" border="0"></td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                  <td><jato:checkbox name="ChannelCheckBox"/></td>
                  <td>&nbsp;</td>
                  <td><jato:text name="ChannelName"/></td>
                  <td>&nbsp;</td>
                  <td>
                    <font color="#CC6600">[</font><console:href name="EditChannel">
                    <font color="#CC6600"><jato:text name="EditLabel"/>
                    </font></console:href><font color="#CC6600">]</font>
                  </td>
                  <td>&nbsp;</td>
                </tr>
                </jato:tiledView>
                <jato:content name="NoChannelsBlock">
                <tr>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td><jato:text name="NoChannelsLabel"/></td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                </tr>
                </jato:content>                
              </table>
              <!-- End inner table (channels) -->
            </td>
          </tr>
        </table>
        <!-- End outer table (channels) -->
      </td>
    </tr>
    <jato:content name="AdminBlock">
    <tr>
      <td colspan="2" width="100%"> 
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
          <tr>
            <td nowrap>
              <!-- Table Title -->
              <div class="table-title-text">
                <jato:text name="AdminLabel"/>
              </div>
            </td>
            <td valign="bottom" width="99%"> 
              <!-- Begin table with the single-pixel light purple separator -->
              <table border="0" cellpadding="0" cellspacing="0" width="100%">
                <tr>
                  <td valign="bottom" class="properties-separator"><img 
                    src="../console/images/spacer.gif" width="1" 
                    height="1" alt=""></td>
                </tr>
              </table>
              <!-- End table with the single-pixel light purple separator -->
            </td>
          </tr>
          <tr>
            <td colspan="2">
              <!-- Begin table containing Save and Reset Buttons -->
              <table border="0" cellpadding="0" cellspacing="0">
              <tr> 
                <td colspan="3"><img src="../console/images/spacer.gif" 
                    width="1" height="6" alt=""></td>
              </tr>
              <tr>
                <td>
                  <console:button name="SaveButton"/>
                </td>
                <td width="5">&nbsp;</td>
                <td>
                  <console:button name="ResetButton"/>
                </td>
              </tr>
              <tr> 
                <td colspan="3"><img src="../console/images/spacer.gif" 
                    width="1" height="6" alt=""></td>
              </tr>
              </table>
              <!-- End table containing Save and Reset Buttons -->
            </td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td colspan="2" width="100%">
        <!-- Begin outer part of data table with 3 lists-->
        <table border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td>
             <jato:text name="ExistingLabel"/>:
          </td>
        </tr>
        <tr>
          <td>
            <jato:listbox name="ExistingList" size="6"
              elementId="BrowseContainer.ExistingList" multiple="true"/>
          </td>
        </tr>
        <tr>
          <td><img src="../console/images/spacer.gif" width="1" height="6" alt=""></td>
        </tr>
        <tr>
          <td>
             <table border="0" cellspacing="0" cellpadding="0">
                <tr>
                   <td>
                      <table border="0" cellpadding="1" cellspacing="0" 
                        class="button-frame-enabled" width="100%">
                        <tr>
                          <td>
                            <table border="0" cellspacing="0" cellpadding="0" 
                              class="button-content-enabled" width="100%">
                             <tr>
                               <td align="center" valign="middle" nowrap>
                                 <div class="button-link-enabled-text">
                                  <a class="button-link" 
                                   href='javascript:shiftBetween("BrowseContainer.ExistingList","BrowseContainer.AvailableList", 0)'>
                                   &nbsp;<jato:text name="AddLabel"/>
                                   <img src="../ps/images/add_vert.gif" 
                                    border="0" width="18" height="12" alt="Add">
                                  </a>
                                 </div>
                               </td>
                             </tr>
                            </table>
                          </td>
                        </tr>
                      </table>
                    </td>
                    <td width="10"><img src="../console/images/spacer.gif" width="10" alt=""></td>
                    <td>
                      <table border="0" cellpadding="1" cellspacing="0" 
                             class="button-frame-enabled" width="100%">
                        <tr>
                          <td>
                            <table border="0" cellspacing="0" cellpadding="0" 
                                   class="button-content-enabled" width="100%">
                             <tr>
                               <td align="center" valign="middle" nowrap>
                                 <div class="button-link-enabled-text">
                                  <a class="button-link" 
                                   href='javascript:shiftBetween("BrowseContainer.AvailableList","BrowseContainer.ExistingList", 0)'>
                                   &nbsp;<jato:text name="RemoveLabel"/>
                                   <img src="../ps/images/remove_vert.gif" width="18" 
                                    height="12" border="0" alt="Remove">
                                  </a>
                                 </div>
                               </td>
                             </tr>
                            </table>
                          </td>
                        </tr>
                      </table>
                    </td>
                </tr>
             </table>
          </td>
        </tr>
        <tr>
          <td><img src="../console/images/spacer.gif" width="1" height="20" alt=""></td>
        </tr>
        <tr>
          <td><jato:text name="AvailableLabel"/>:</td>
        </tr>
        <tr>
          <td>
            <jato:listbox name="AvailableList" size="6"
              elementId="BrowseContainer.AvailableList" multiple="true"/>
          </td>
        </tr>
        <tr>
          <td><img src="../console/images/spacer.gif" width="1" height="6" alt=""></td>
        </tr>
        <tr>
          <td>
            <table border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td>
                  <table border="0" cellpadding="1" cellspacing="0" 
                         class="button-frame-enabled" width="100%">
                    <tr>
                      <td>
                        <table border="0" cellspacing="0" cellpadding="0" 
                               class="button-content-enabled" width="100%">
                          <tr>
                            <td align="center" valign="middle" nowrap>
                              <div class="button-link-enabled-text"> 
                                <a class="button-link" 
                                 href='javascript:shiftBetween("BrowseContainer.AvailableList","BrowseContainer.SelectedList", 0)'>
                                 &nbsp;<jato:text name="AddLabel"/>
                                 <img src="../ps/images/add_vert.gif" 
                                  border="0" width="18" height="12" alt="Add">
                                </a>
                              </div>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
                <td width="10"><img src="../console/images/spacer.gif" width="10" alt=""></td>
                <td>
                  <table border="0" cellpadding="1" cellspacing="0" 
                         class="button-frame-enabled" width="100%">
                    <tr>
                      <td>
                        <table border="0" cellspacing="0" cellpadding="0" 
                               class="button-content-enabled" width="100%">
                          <tr>
                            <td align="center" valign="middle" nowrap>
                              <div class="button-link-enabled-text">
                               <a class="button-link" 
                                href='javascript:shiftBetween("BrowseContainer.SelectedList","BrowseContainer.AvailableList", 0)'>
                                &nbsp;<jato:text name="RemoveLabel"/>
                                <img src="../ps/images/remove_vert.gif" 
                                 width="18" height="12" border="0" alt="Remove">
                                </a>
                              </div>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
        <tr>
          <td><img src="../console/images/spacer.gif" width="1" height="20" alt=""></td>
        </tr>
        <tr>
          <td><jato:text name="SelectedLabel"/>:</td>
        </tr>
        <tr>
          <td>
            <jato:listbox name="SelectedList" size="6" multiple="true"
                          elementId="BrowseContainer.SelectedList" />
          </td>
        </tr>
        <tr>
          <td><img src="../console/images/spacer.gif" width="1" height="6" alt=""></td>
        </tr>
        </table>
        <!-- End outer part of data table with 3 lists-->
      </td>
    </tr>
    </jato:content>
  </table>
</console:form>
</body>
<script language="javascript">
pageLoaded = 1;
addToSelBeforeSubmitArray('BrowseContainer', 'BrowseContainer.SelectedList');
addToSelBeforeSubmitArray('BrowseContainer', 'BrowseContainer.AvailableList');
</script>

</html>
</jato:useViewBean>
