📄 applications.jsp
字号:
toSelectCopy.AddOption(toAddOptions[i].text,toAddOptions[i].val,toAddOptions[i].selectState); } // remove options fromSelectCopy.RemOptions(fromSelectCopy.selOptions); // Sort options toSelectCopy.SortOptions(); fromSelectCopy.SortOptions(); eval("fromSelect.focus()"); // generate the selectbox toSelect with data of toSelectCopy toSelect.options.length = 0; var index = 0 ; for ( var i = 0 ; i< toSelectCopy.length ; i++ ) { if ( toSelectCopy[i].val != "BLANK" ) { index = toSelect.options.length++; toSelect.options[index].text = toSelectCopy[i].text; toSelect.options[index].value = toSelectCopy[i].val; toSelect.options[index].selected = toSelectCopy[i].selectState; } } index = toSelect.options.length++; toSelect.options[index].text = toBlankOption.text; toSelect.options[index].value = toBlankOption.val; eval("toSelect.focus()"); for (var i=0 ; i<fromSelect.options.length; i++ ) { fromSelect.options[i].selected = false; } // generate the selectbox fromSelect with data of fromSelectCopy fromSelect.options.length = 0; for ( var i = 0 ; i< fromSelectCopy.length ; i++ ) { if ( fromSelectCopy[i].val != "BLANK" ) { index = fromSelect.options.length++; fromSelect.options[index].text = fromSelectCopy[i].text; fromSelect.options[index].value = fromSelectCopy[i].val; fromSelect.options[index].selected = fromSelectCopy[i].selectState; } } index = fromSelect.options.length++; fromSelect.options[index].text = fromBlankOption.text; fromSelect.options[index].value = fromBlankOption.val; // restore initial size fromSelect.options.size = fromSelectSize; toSelect.options.size = toSelectSize;}/* InValues ************************************************************/// Return true if a value is in an array or if two values are equal/***********************************************************************/function InValues(val,vals){ if ( typeof(vals)=="object" ) { return this.InArray(val,vals); } else { if ( val == vals ) { return true; } else { return false; } }}/* InArray **************************************************************/// Return true if a value is equal with an array's item/************************************************************************/function InArray(val,theArray){ for ( var i=0 ; i<theArray.length ; i++) { if (val==theArray[i]) { return true; } } return false;}document.onkeydown = keyDown; function keyDown() { if (document.all) { var ieKey = event.keyCode; if (ieKey == 13 && event.ctrlKey) { sendForm('save','<%=switchUG%>'); } if (ieKey == 87 && event.ctrlKey) { window.close(); } }}//--></script><br><% if ( roles != null && roles.hasMoreElements() ){ %> <form name="jahiaApplicationManager" method="POST" action="<%=applicationManagerUrl%>&actionreq=managerole"><table border="0" cellpadding="0" cellspacing="0" width="90%" align="center"><tr> <td> <table border="0" width="210" align="left" cellpadding="0" cellspacing="0"> <tr> <td class="text" width="20"></td> <td class="text" align="left" nowrap valign="top"><b>Manage Roles :: </b> </td> <td class="text" valign="top"> <select name="roles" size="1" class="input" onChange="sendForm('','<%=switchUG%>');"> <% String roleName = null; while (roles.hasMoreElements()){ roleName = (String)roles.nextElement(); %> <option value="<%=roleName%>" <% if ( role.equals(roleName) ){ %>selected<%}%>> <%=roleName%></option> <% } %> </select> </td> </tr> </table> <br><br> <table border="0" width="350" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="2" width="100%" background="<jahia:serverHttpPath /><jahia:engineResourceBundle resourceName="hrImg" />"><img src="<jahia:serverHttpPath /><jahia:engineResourceBundle resourceName="pixImg" />" width="1" height="1"></td> </tr> </table> </td></tr><tr> <td height="10"></td></tr> <tr> <td> <table border="0" width="100%"> <tr> <td width="100%" align="center" class="text"> <% if (switchUG.equals("groups")) { %><img name="Groups" src="<jahia:serverHttpPath /><jahia:engineResourceBundle resourceName="groupsOnButtonImg" />" border="0" alt="Groups"><% } else { %> <a href="javascript:sendForm('','groups')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Groups','','<jahia:serverHttpPath /><jahia:engineResourceBundle resourceName="groupsOnButtonImg" />',1)"><img name="Groups" src="<jahia:serverHttpPath /><jahia:engineResourceBundle resourceName="groupsOffButtonImg" />" border="0" alt="Groups"></a> <% } %> <% if (switchUG.equals("users")) { %><img name="Users" src="<jahia:serverHttpPath /><jahia:engineResourceBundle resourceName="usersOnButtonImg" />" border="0" alt="Users"><% } else { %> <a href="javascript:sendForm('','users')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Users','','<jahia:serverHttpPath /><jahia:engineResourceBundle resourceName="usersOnButtonImg" />',1)"><img name="Users" src="<jahia:serverHttpPath /><jahia:engineResourceBundle resourceName="usersOffButtonImg" />" border="0" alt="Users"></a> <% } %> </td> </tr> </table> </td></tr><tr> <td height="20"></td></tr> <% if (switchUG.equals("users")) { %><tr> <td> <table border="0" width="100%" cellpadding="0" cellspacing="0"> <tr> <td width="40%" valign="top" align="center" class="text"> Authorized </td> <td width="20%" align="center"> </td> <td width="40%" valign="top" align="center" class="text"> Available </td> </tr> <tr> <td width="40%" valign="top" align="center"> <select class="input" name="authMembers" size="5" multiple > <% JahiaUser user = null; int size = authUsers.size(); String[] authUserKeys = new String[size]; for ( int i=0 ; i<size ; i++ ){ user = (JahiaUser)authUsers.get(i); authUserKeys[i]=user.getName(); %> <option value="<%=user.getName()%>"><%=user.getUsername()%></option> <% } %> <option value="BLANK"> </option> </select> </td> <td width="20%" align="center"> <a href="javascript:MoveOptionsTo(document.jahiaApplicationManager.noAuthMembers,document.jahiaApplicationManager.authMembers)" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Left','','<jahia:serverHttpPath /><jahia:engineResourceBundle resourceName="moveLeftOnButtonImg" />',1)"><img name="Left" src="<jahia:serverHttpPath /><jahia:engineResourceBundle resourceName="moveLeftOffButtonImg" />" width="16" height="16" border="0" alt="Move Left"></a> <br><br> <a href="javascript:MoveOptionsTo(document.jahiaApplicationManager.authMembers,document.jahiaApplicationManager.noAuthMembers)" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Right','','<jahia:serverHttpPath /><jahia:engineResourceBundle resourceName="moveRightOnButtonImg" />',1)"><img name="Right" src="<jahia:serverHttpPath /><jahia:engineResourceBundle resourceName="moveRightOffButtonImg" />" width="16" height="16" border="0" alt="Move Right"></a> </td> <td width="40%" valign="top" align="center"> <select class="input" name="noAuthMembers" size="5" multiple > <% Enumeration enum = allUsers.elements(); while (enum.hasMoreElements()){ user = (JahiaUser)enum.nextElement(); if ( !JahiaTools.inValues(user.getName(),authUserKeys) ){%> <option value="<%=user.getName()%>"><%=user.getUsername()%></option> <% } } %> <option value="BLANK"> </option> </select> </td> </tr> </table> </td></tr><% } else { %><tr> <td> <table border="0" width="100%" cellpadding="0" cellspacing="0"> <tr> <td width="40%" valign="top" align="center" class="text"> Authorized </td> <td width="20%" align="center"> </td> <td width="40%" valign="top" align="center" class="text"> Available </td> </tr> <tr> <td width="40%" valign="top" align="center"> <select class="input" name="authMembers" size="5" multiple > <% JahiaGroup grp = null; int size = authGroups.size(); String[] authGroupKeys = new String[size]; for ( int i=0 ; i<size ; i++ ){ grp = (JahiaGroup)authGroups.get(i); authGroupKeys[i] = grp.getName(); %> <option value="<%=grp.getName()%>"><%=grp.getGroupname()%></option> <% } %> <option value="BLANK"> </option> </select> </td> <td width="20%" align="center"> <a href="javascript:MoveOptionsTo(document.jahiaApplicationManager.noAuthMembers,document.jahiaApplicationManager.authMembers)" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Left','','<jahia:serverHttpPath /><jahia:engineResourceBundle resourceName="moveLeftOnButtonImg" />',1)"><img name="Left" src="<jahia:serverHttpPath /><jahia:engineResourceBundle resourceName="moveLeftOffButtonImg" />" width="16" height="16" border="0" alt="Move Left"></a> <br><br> <a href="javascript:MoveOptionsTo(document.jahiaApplicationManager.authMembers,document.jahiaApplicationManager.noAuthMembers)" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Right','','<jahia:serverHttpPath /><jahia:engineResourceBundle resourceName="moveRightOnButtonImg" />',1)"><img name="Right" src="<jahia:serverHttpPath /><jahia:engineResourceBundle resourceName="moveRightOffButtonImg" />" width="16" height="16" border="0" alt="Move Right"></a> </td> <td width="40%" valign="top" align="center"> <select class="input" name="noAuthMembers" size="5" multiple > <% Enumeration enum = allGroups.elements(); while (enum.hasMoreElements()){ grp = (JahiaGroup)enum.nextElement(); if ( !JahiaTools.inValues(grp.getName(),authGroupKeys) ){%> <option value="<%=grp.getName()%>"><%=grp.getGroupname()%></option> <% } } %> <option value="BLANK"> </option> </select> </td> </tr> </table> </td></tr><% } %><tr> <td height="20"></td></tr> <tr> <td height="2" width="100%" background="<jahia:serverHttpPath /><jahia:engineResourceBundle resourceName="hrImg" />"><img src="<jahia:serverHttpPath /><jahia:engineResourceBundle resourceName="pixImg" />" width="1" height="1"></td></tr><tr> <td height="20"></td></tr> <tr> <td align="center"> <a href="javascript:window.close();" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Cancel','','<jahia:serverHttpPath /><jahia:engineResourceBundle resourceName="cancelOnButtonImg" />',1)"><img name="Cancel" src="<jahia:serverHttpPath /><jahia:engineResourceBundle resourceName="cancelOffButtonImg" />" border="0" alt="Cancel"></a> <a href="javascript:sendForm('save','<%=switchUG%>');" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Ok','','<jahia:serverHttpPath /><jahia:engineResourceBundle resourceName="okOnButtonImg" />',1)"><img src="<jahia:serverHttpPath /><jahia:engineResourceBundle resourceName="okOffButtonImg" />" border="0" alt="Ok"></a> <input type="hidden" name="currentRole" value="<%=role%>"> <input type="hidden" name="fid" value="<%=fieldID.intValue()%>"> <input type="hidden" name="appid" value="<%=appID.intValue()%>"> <input type="hidden" name="prevswitchug" value="<%=switchUG%>"> <input type="hidden" name="switchug" value=""> <input type="hidden" name="subaction" value=""> </td></tr></table> </form><% } else { %><p class="text"> <b>Manage Roles :</b></p><br><br><center><p class="text"><b>This application doesn't define any role</b><br><br><br><br><a href="javascript:window.close()" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Close','','<jahia:serverHttpPath /><jahia:engineResourceBundle resourceName="closeOnButtonImg" />',1)"><img name="Close" src="<jahia:serverHttpPath /><jahia:engineResourceBundle resourceName="closeOffButtonImg" />" border="0" alt="Close"></a></p></center><% } %>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -