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

<html>
<%@page info="DesktopAdminService" 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.DesktopAdminServiceViewBean" 
    fireChildDisplayEvents="true">  
<jsp:useBean id="viewBean" 
    type="com.sun.portal.desktop.admin.DesktopAdminServiceViewBean"/>

<head>
    <title><jato:text name="titleHtmlPage" /></title>
    <link rel="stylesheet" href="../console/css/adminstyle.css"> 
    <style>.authless-separator{background-color: #CCC;}</style>

    <script language="javascript" src="../console/js/consolecomp.js"></script>

<script language="javascript">
    function openUploadWin(url) {
        var bars = 'directories=no,location=0,menubar=0,status=0,titlebar=yes,toolbar=no';
        var options = 'scrollbars=yes,width=450,height=250,resizable=yes';
        var feature = bars + ',' + options;
        var openwin = window.open(url, 'uploadWin', feature);
        openwin.focus();
    }

   function showAlert() {
        var agt = navigator.userAgent.toLowerCase();
        var is_major = parseInt(navigator.appVersion);
        var is_minor = parseFloat(navigator.appVersion);
        var is_nav  = ((agt.indexOf('mozilla')!=-1)
                        && (agt.indexOf('spoofer')==-1)
                        && (agt.indexOf('compatible') == -1)
                        && (agt.indexOf('hotjava')==-1));
        var is_nav6up = (is_nav && (is_major >= 5));
        var is_nav4up = (is_nav && (is_major >= 4));
        if ((navigator.appVersion.lastIndexOf('Win') != -1)
            && is_nav4up && !is_nav6up) {
            window.alert("<jato:text name="alertMessage"/>");
        }
   }

</script>


</head>  

<body class="dataFrame" 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>

<!-- page header -->
<console:title name="serviceName" />

<console:form name="DesktopAdminService" method="post">

<div class="left-margin">
<jato:content name="dpLinksBlock">
<!-- buttons -->
<table border=0 cellpadding=0 cellspacing=0 width="100%">
    <tr>
        <td width="97%" align=right>
            <console:button name="btnSave" />
        </td>
        <td width="1%">
            <console:button name="btnReset" />
        </td>
        <jato:content name="DeleteButtonBlock">
        <!-- only for template level processing -->
        <td width="1%">
            <console:button name="DeleteButton" />
        </td>
        </jato:content>
        <jato:content name="showCancel">
        <td width="1%">
            <console:button name="btnCancel" />
        </td>
        </jato:content>
    </tr>
</table>
</jato:content>

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

<jato:content name="GlobalBlock">
<!-- Global attributes section --> 
<table border=0 cellpadding="0" cellspacing="0" width="100%" >
<tr>
  <td nowrap>
    <div class="properties-level1-label-text">
      <jato:text name="lblGlobal" />
    </div>               
  </td>
  <td valign="bottom" width="99%"> 
    <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>
  </td>
</tr>  
</table> 

<div class="properties-level3-label-text">
<table border=0 cellpadding="0" cellspacing="0">
    <jato:tiledView name="GlobalDataView" 
        type="com.sun.portal.desktop.admin.DesktopAdminServiceView"
        fireDisplayEvents="true">

    <jato:content name="SpacerRow">
    <tr>
      <td colspan="3"><img src="../console/images/spacer.gif" height="10" alt=""></td>
    </tr>
    </jato:content>
    <tr>
        <console:dynamicgui 
	    name="ccAttrSet" 
	    imageURI="../console/images"/>
        <jato:content name="channelWizard">
            <tr>
              <td colspan="3"><img src="../console/images/spacer.gif" height="10" alt=""></td>
            </tr>
            <tr>
                <td nowrap>  
                    <jato:text name="attrLabel" />:
                </td>
                <td nowrap valign="middle">&nbsp;</td>
                <td>
                  <table border="0" cellpadding="0" cellspacing="0" width="100%">
                    <tr>
                      <td colspan="4"><console:href name="channelWizardLink"><jato:text name="channelWizardLinkLabel"/></console:href></td>
                    </tr>
                    <tr>
                      <td colspan="4"><console:button name="dpEditButton" onClick="showAlert()" type="mini"/></td>
                    </tr>
                    <tr>
                      <td width="1" nowrap>
                        <!-- Begin DP Upload Button -->
                        <table border=0 cellpadding=2 cellspacing=0>
                                <tr><td><table border=0 cellpadding=1 cellspacing=0 class="mini-button-frame-enabled">
                                        <tr><td><table border=0 cellpadding=0 cellspacing=0 width="100%" class="mini-button-content-enabled">
                                                <tr><td align="center" valign="middle" nowrap>
                                                <a href="javascript:openUploadWin('<jato:text name="dpUploadURL"/>')" class="mini-button-link">
                                                    <div class="mini-button-link-enabled-text">
                                                       &nbsp;<jato:text name="dpUploadLinkLabel"/>&nbsp;
                                                    </div>
                                                 </a>
                                        </td></tr></table>
                                </td></tr></table>
                         </table>
                         <!-- End DP Upload Button -->
                      </td>
                      <td width="1" nowrap><img src="../console/images/spacer.gif" width="1" height="1" alt=""></td>
                      <td width="1" nowrap>
                        <!-- Begin DP Download Button -->
                        <table border=0 cellpadding=2 cellspacing=0>
                                <tr><td><table border=0 cellpadding=1 cellspacing=0 class="mini-button-frame-enabled">
                                        <tr><td><table border=0 cellpadding=0 cellspacing=0 width="100%" class="mini-button-content-enabled">
                                                <tr><td align="center" valign="middle" nowrap>
                                                <a href="<jato:text name="dpDownloadURL"/>" class="mini-button-link">
                                                    <div class="mini-button-link-enabled-text">
                                                        &nbsp;<jato:text name="dpDownloadLinkLabel"/>&nbsp;
                                                    </div>
                                                </a>
                                        </td></tr></table>
                                </td></tr></table>
                         </table>
                        <!-- End DP Download Button -->
                      </td>
                      <td width="100%">&nbsp;</td>
                    </tr>
                  </table>
                </td>
            </tr>
            <tr>
              <td colspan="3"><img src="../console/images/spacer.gif" height="10" alt=""></td>
            </tr>
        </jato:content>
    </jato:tiledView>
</table>
</div>

<!-- begin authless config section -->
<table border=0 cellpadding="0" cellspacing="0">
    <tr>
      <td nowrap width="1%">
        <div class="properties-level3-label-text">
          <jato:text name="AuthlessSectionLabel" />
        </div>               
      </td>
      <td valign="bottom" width="99%">
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
          <tr>
            <td valign="bottom" class="authless-separator">
              <img src="../console/images/spacer.gif"
                 width="1" height="1" alt=""></td>
          </tr>
        </table>
      </td>
    </tr>
</table>

<table border=0 cellpadding="0" cellspacing="0">
    <tr>
      <td colspan="3"><img src="../console/images/spacer.gif" height="10" alt=""></td>
    </tr>
    <tr>
      <td nowrap width="1%">
        <img src="../console/images/spacer.gif" width="35" height="1" alt=""></td>
      </td>
      <td colspan=2 width="99%">
        <jato:radioButtons name="AuthlessConfig" 
            elementId="DesktopAdminService.AuthlessConfig"/>
      </td>
    </tr>
    <tr>
      <td nowrap width="1%">
        <img src="../console/images/spacer.gif" width="35" height="1" alt=""></td>
      </td>
      <td nowrap width="1%">
        <img src="../console/images/spacer.gif" width="20" height="1" alt=""></td>
      </td>
      <td width="99%">
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
          <tr>
            <td colspan="3"><img src="../console/images/spacer.gif" height="10" alt=""></td>
          </tr>
          <tr>
              <console:dynamicgui 
                name="DisableAuthlessForFedUsers" 
                imageURI="../console/images"
                styleClass="properties-label-text"/>
          </tr>
          <tr>
            <td colspan="3"><img src="../console/images/spacer.gif" height="10" alt=""></td>
          </tr>
          <tr>
              <console:dynamicgui 
                name="DefaultAuthlessUID" 
                imageURI="../console/images"
                styleClass="properties-label-text"/>
          </tr>
          <tr>
            <td colspan="3"><img src="../console/images/spacer.gif" height="10" alt=""></td>
          </tr>
          <tr>
              <console:dynamicgui 
                name="AuthlessUIDList" 
                imageURI="../console/images"
                styleClass="properties-label-text"/>
          </tr>
        </table>
      </td>
    <tr>
</table>
<!-- end authless config section -->

<!-- end the global block -->
</jato:content>

<jato:content name="OrgBlock">
<!-- organization attributes section -->
<table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr>
      <td nowrap>
        <div class="properties-level1-label-text">
          <jato:text name="lblOrg" />
        </div>            
      </td>
      <td valign="bottom" width="99%">
        <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>
      </td>
    </tr>
</table>

<div class="properties-level3-label-text">
<table border=0 cellpadding=0 cellspacing=0>
    <jato:tiledView name="OrgDataView" 
        type="com.sun.portal.desktop.admin.DesktopAdminServiceView"
        fireDisplayEvents="true">

    <tr>
      <td colspan="3"><img src="../console/images/spacer.gif" height="10" alt=""></td>
    </tr>

    <console:dynamicgui name="ccAttrSet" 
        imageURI="../console/images"
        styleLabelClass="properties-level3-label-text"/>
    </jato:tiledView> 
</table>
</div>

<!-- end org block -->    
</jato:content>

<jato:content name="TopLevelBlock">
<!-- Dynamic attributes section for Service management module -->
<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>  
    <td nowrap> 
      <div class="properties-level1-label-text"> 
        <jato:text name="lblDynamic" />
      </div>                
    </td> 
    <td valign="bottom" width="99%"> 
      <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> 
    </td> 
  </tr>   
</table> 

<div class="properties-level3-label-text">
<table border=0 cellpadding=0 cellspacing=0>
    <jato:tiledView name="DynamicDataView" 
        type="com.sun.portal.desktop.admin.DesktopAdminServiceView"
        fireDisplayEvents="true">
    <tr>
      <td colspan="3"><img src="../console/images/spacer.gif" height="10" alt=""></td>
    </tr>

    <console:dynamicgui name="ccAttrSet" 
        imageURI="../console/images"/>

    <jato:content name="channelWizard">
      <tr>
        <td nowrap>  
          <jato:text name="attrLabel" />:
        </td>
        <td nowrap valign="middle">&nbsp;</td>
        <td>
          <table border="0" cellpadding="0" cellspacing="0" width="100%">
            <tr>
              <td colspan="4"><console:button name="dpEditButton" onClick="showAlert()" type="mini"/></td>
            </tr>
            <tr>
              <td width="1" nowrap>
                <!-- Begin DP Upload Button -->
                <table border=0 cellpadding=2 cellspacing=0>
                        <tr><td><table border=0 cellpadding=1 cellspacing=0 class="mini-button-frame-enabled">
                                <tr><td><table border=0 cellpadding=0 cellspacing=0 width="100%" class="mini-button-content-enabled">
                                        <tr><td align="center" valign="middle" nowrap>
                                        <a href="javascript:openUploadWin('<jato:text name="dpUploadURL"/>')" class="mini-button-link">
                                            <div class="mini-button-link-enabled-text">
                                               &nbsp;<jato:text name="dpUploadLinkLabel"/>&nbsp;
                                            </div>
                                         </a>
                                </td></tr></table>
                        </td></tr></table>
                 </table>
                 <!-- End DP Upload Button -->
              </td>
              <td width="1" nowrap><img src="../console/images/spacer.gif" width="1" height="1" alt=""></td>
              <td width="1" nowrap>
                <!-- Begin DP Download Button -->
                <table border=0 cellpadding=2 cellspacing=0>
                        <tr><td><table border=0 cellpadding=1 cellspacing=0 class="mini-button-frame-enabled">
                                <tr><td><table border=0 cellpadding=0 cellspacing=0 width="100%" class="mini-button-content-enabled">
                                        <tr><td align="center" valign="middle" nowrap>
                                        <a href="<jato:text name="dpDownloadURL"/>" class="mini-button-link">
                                            <div class="mini-button-link-enabled-text">
                                                &nbsp;<jato:text name="dpDownloadLinkLabel"/>&nbsp;
                                            </div>
                                        </a>
                                </td></tr></table>
                        </td></tr></table>
                 </table>
                <!-- End DP Download Button -->
              </td>
              <td width="100%">&nbsp;</td>
            </tr>
          </table>
        </td>
      </tr>
    <!-- end channel wizard -->
    </jato:content>
    </jato:tiledView>
</table>
</div>

<!-- end TopLevelBlock -->
</jato:content>

<jato:content name="TemplateLevelBlock">
<!-- Dynamic attributes section for User management module -->

<table border="0" cellpadding="0" cellspacing="0" width="100%">  
  <tr>   
    <td nowrap>  
      <div class="properties-level1-label-text">  
        <jato:text name="lblDynamic" /> 
      </div>                 
      </td>  
    <td valign="bottom" width="99%">  
      <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>  
    </td>  
  </tr>    
</table>

<div class="properties-level3-label-text">
<table border=0 cellpadding=0 cellspacing=0>
  <tr>
    <td colspan=3><img src="../console/images/spacer.gif" height=10 alt=""></td>
  </tr> 

  <jato:content name="PriorityBlock">
  <tr>
    <td>  
      <jato:text name="lblPriority" />:
    </td>  
    <td nowrap valign="middle">&nbsp;</td>
    <td nowrap>
      <jato:combobox name="Priority" extraHtml="id='SMData.Priority'"/>
    </td>
  </tr>
  </jato:content>

  <jato:tiledView name="DynamicDataView" 
        type="com.sun.portal.desktop.admin.DesktopAdminServiceView"
        fireDisplayEvents="true">

    <tr>
      <td colspan="3"><img src="../console/images/spacer.gif" height="10" alt=""></td>
    </tr>

    <console:dynamicgui name="ccAttrSet" 
        imageURI="../console/images"/>

    <jato:content name="channelWizard">
    <tr>
        <td nowrap>  
          <jato:text name="attrLabel" />:
        </td>
        <td nowrap valign="middle">&nbsp;</td>
        <td>
          <table border="0" cellpadding="0" cellspacing="0" width="100%">
            <tr>
              <td colspan="4"><console:href name="channelWizardLink"><jato:text name="channelWizardLinkLabel"/></console:href></td>
            </tr>
            <jato:content name="dpLinksBlock">
            <tr>
              <td colspan="4"><console:button name="dpEditButton" onClick="showAlert()" type="mini"/></td>
            </tr>
            <tr>
              <td width="1" nowrap>
                <!-- Begin DP Upload Button -->
                <table border=0 cellpadding=2 cellspacing=0>
                        <tr><td><table border=0 cellpadding=1 cellspacing=0 class="mini-button-frame-enabled">
                                <tr><td><table border=0 cellpadding=0 cellspacing=0 width="100%" class="mini-button-content-enabled">
                                        <tr><td align="center" valign="middle" nowrap>
                                        <a href="javascript:openUploadWin('<jato:text name="dpUploadURL"/>')" class="mini-button-link">
                                            <div class="mini-button-link-enabled-text">
                                               &nbsp;<jato:text name="dpUploadLinkLabel"/>&nbsp;
                                            </div>
                                         </a>
                                </td></tr></table>
                        </td></tr></table>
                 </table>
                 <!-- End DP Upload Button -->
              </td>
              <td width="1" nowrap><img src="../console/images/spacer.gif" width="1" height="1" alt=""></td>
              <td width="1" nowrap>
                <!-- Begin DP Download Button -->
                <table border=0 cellpadding=2 cellspacing=0>
                        <tr><td><table border=0 cellpadding=1 cellspacing=0 class="mini-button-frame-enabled">
                                <tr><td><table border=0 cellpadding=0 cellspacing=0 width="100%" class="mini-button-content-enabled">
                                        <tr><td align="center" valign="middle" nowrap>
                                        <a href="<jato:text name="dpDownloadURL"/>" class="mini-button-link">
                                            <div class="mini-button-link-enabled-text">
                                                &nbsp;<jato:text name="dpDownloadLinkLabel"/>&nbsp;
                                            </div>
                                        </a>
                                </td></tr></table>
                        </td></tr></table>
                 </table>
                <!-- End DP Download Button -->
              </td>
              <td width="100%">&nbsp;</td>
            </tr>
            </jato:content>
          </table>
        </td>
    </tr>
    <!-- end channel wizard -->
    </jato:content>
  </jato:tiledView> 
</table>
</div>

<!-- end TemplateLevelBlock -->  
</jato:content>

<jato:content name="dpLinksBlock">
<hr noshade size="1">
<!-- buttons -->
<table border=0 cellpadding=0 cellspacing=0 width="100%">
    <tr>
        <td width="98%" align=right>
	    <console:button name="btnSave" />
        </td>
        <td width="1%">
	    <console:button name="btnReset" />
        </td>
        <jato:content name="DeleteButtonBlock">
        <!-- only for template level processing --> 
        <td width="1%">
            <console:button name="DeleteButton" />
        </td>
        </jato:content>
        <jato:content name="showCancel">
        <td width="1%">
            <console:button name="btnCancel" />
        </td>
        </jato:content>
    </tr>
</table>
</jato:content>

</div>
</console:form> 

<script language="javascript">
    var frm = document.forms['DesktopAdminService'];
    var enableAuthless="var authlessRadio = frm.elements['DesktopAdminService.AuthlessConfig'];authlessRadio[1].checked = 'true';"
    if (frm) {
        var enFedUsers = frm.elements['DesktopAdminService.DisableAuthlessForFedUsers.boolValue'];
        if(enFedUsers) {
            appendOnClick(enFedUsers, enableAuthless);
        }
        var defuid =  frm.elements['DesktopAdminService.DefaultAuthlessUID.fldValue'];
        if(defuid) {
            appendOnClick(defuid, enableAuthless);
        }
        var uidlist =  frm.elements['DesktopAdminService.AuthlessUIDList.cbValue'];
        if(uidlist) {
            appendOnClick(uidlist, enableAuthless);
        }
        var uidaddrm =  frm.elements['DesktopAdminService.AuthlessUIDList.cbValue__console__'];
        if(uidaddrm) {
            appendOnClick(uidaddrm, enableAuthless);
        }
    }
    
    function appendOnClick(elm, fn) {
        var origOnClick = elm.onclick;
        if (origOnClick) {
            origOnClick += '';
            var idx = origOnClick.indexOf('{');
            origOnClick = origOnClick.substring(idx+1);
            idx = origOnClick.indexOf('}');
            origOnClick = origOnClick.substring(0, idx);
        } else {
            origOnClick = '';
        }
        elm.onclick = new Function("" + origOnClick + "\n" + fn);
    }
</script>

</body>
<script language="javascript">
pageLoaded = 1;
</script>
</jato:useViewBean> 
</html>
