📄 component_share.jsp
字号:
var toAddOptions = fromSelectCopy.GetSelOnly(); var toRemOptions = toAddOptions; // add options for ( var i=0 ; i<toAddOptions.length ; i++ ) { 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.size = fromSelectSize; toSelect.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;}/* cashAndCarry **********************************************************//* Eric Vassalli <vassalli@jahia.org> *//* (c) Jahia 2001 */function cashAndCarry(theSelect){ SelectAllOptions(theSelect,"BLANK")}/* end cashAndCarry *******************************************************/</script><tr> <td align="right" class="text" colspan="2"><b><% if ( currentSite!= null ){%>site <%=currentSite.getServerName()%> <%}%>:: Manage components ::</b> </td></tr></table><br><form name="mainForm" action="<%=requestURI%>?do=components&sub=share" method="post"><table cellpadding="2" cellspacing="0" border="0" width="100%"><tr> <td colspan="2" width="530"> </td></tr><% if ( appsList.hasMoreElements() ) {%><tr> <td width="100"> </td> <td width="100%"> <table border="0" cellspacing="0" cellpadding="0" width="90%"> <tr> <td nowrap class="text" valign="top"> <b>Applications List:</b> <select name="apps" size="1" class="input" onChange="sendForm('')"> <% ApplicationBean app = null; while (appsList.hasMoreElements()){ app = (ApplicationBean)appsList.nextElement(); %> <option value="<%=app.getID()%>" <% if ( appID.intValue()==app.getID() ){ %>selected<%}%>> <%=app.getName()%></option> <% } %> </select> </td> </tr> <tr> <td nowrap> <br><br><br><br> </td> </tr> <tr> <td align="left"> <table border="0" width="100%" cellpadding="0" cellspacing="0"> <tr> <td width="40%" valign="top" align="center" class="text"> Authorized Sites </td> <td width="20%" align="center"> </td> <td width="40%" valign="top" align="center" class="text"> Available Sites </td> </tr> <tr> <td width="40%" valign="top" align="center"> <select class="input" name="authSites" size="5" multiple > <% JahiaSite site = null; Hashtable authSitesID = new Hashtable(); while ( authSites.hasMoreElements() ){ site = (JahiaSite)authSites.nextElement(); if ( site.getID() != currentSite.getID() ){ authSitesID.put(new Integer(site.getID()),new Integer(site.getID()) ); } if ( site.getID()!=0 ){ %> <option value="<%=site.getID()%>"><%=site.getServerName()%></option> <% } } %> <option value="BLANK"> </option> </select> </td> <td width="20%" align="center"> <a href="#" onClick="MoveOptionsTo(document.mainForm.noAuthSites,document.mainForm.authSites)" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Left','','<%=URL%>images/buttons/left_on.gif',1)"><img name="Left" src="<%=URL%>images/buttons/left_off.gif" width="16" height="16" border="0" alt="Move Left"></a> <br><br> <a href="#" onClick="MoveOptionsTo(document.mainForm.authSites,document.mainForm.noAuthSites)" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Right','','<%=URL%>images/buttons/right_on.gif',1)"><img name="Right" src="<%=URL%>images/buttons/right_off.gif" width="16" height="16" border="0" alt="Move Right"></a> </td> <td width="40%" valign="top" align="center"> <select class="input" name="noAuthSites" size="5" multiple > <% Enumeration enum = sites.elements(); while (enum.hasMoreElements()){ site = (JahiaSite)enum.nextElement(); if ( (site.getID() != currentSite.getID()) && (site.getID()!=0) ){ if ( authSitesID.get( new Integer( site.getID() ) ) == null ){ %> <option value="<%=site.getID()%>"><%=site.getServerName()%></option> <% } } } %> <option value="BLANK"> </option> </select> </td> </tr> </table> </td> </tr> <tr> <td><br><br><br></td> </tr> <tr> <td align="center"> <br> <input type="hidden" name="subaction" value=""> <a href="javascript:sendForm('save');" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('save','','<%=request.getContextPath()%>/jsp/jahia/engines/images/buttons/save_on.gif',1)"><img name="save" src="<%=request.getContextPath()%>/jsp/jahia/engines/images/buttons/save_off.gif" width="69" height="17" border="0" alt="Save"></a> </td> </tr> <tr> <td> <br><br> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td nowrap width="145" valign="top"><font class="text"><b>Other operations: </b></font></td> <td valign="top"> <font class="text"> <%if(!isLynx){%><li> <%}%><a href="<%=JahiaAdministration.composeActionURL(request,response,"components","&sub=display")%>">Back to components list</a><br> <%if(!isLynx){%><li> <%}%><a href="<%=JahiaAdministration.composeActionURL(request,response,"displaymenu","")%>">Back to menu</a><br> </font> </td> </tr> </table> </td> </tr> </table> </td></tr><% } else {%><tr> <td width="100"> </td> <td align="center" width="100%"> <br> <br> <font class="text">No Applications to share with other sites</font> </td></tr><tr> <td width="100"> </td> <td> <br><br><br><br><br> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td nowrap width="145" valign="top"><font class="text"><b>Other operations: </b></font></td> <td valign="top"> <font class="text"> <%if(!isLynx){%><li> <%}%><a href="<%=JahiaAdministration.composeActionURL(request,response,"components","&sub=display")%>">Back to components list</a><br> <%if(!isLynx){%><li> <%}%><a href="<%=JahiaAdministration.composeActionURL(request,response,"displaymenu","")%>">Back to menu</a><br> </font> </td> </tr> </table> </td></tr><% } %><tr> <td colspan="2" align="right"> <br> <br> <font class="text2"><%=jahiaDisplayMessage%> </font> </td></tr><tr> <td colspan="2"> </td></tr></table></form><%@include file="include_footer.jsp"%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -