Author: ktlili
Date: Fri Jun 15 21:08:46 2007
New Revision: 17606
URL: https://svndev.jahia.net/websvn/listing.php?sc=3D1&rev=3D17606&repname=
=3Djahia
Log:
- update select portlet engine gui (no jira, only portlet)
Modified:
branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/engines/shared/a=
pplication_field.jsp
Modified: branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/engines/sh=
ared/application_field.jsp
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-5-0-SP=
-BRANCH/core/src/webapp/jsp/jahia/engines/shared/application_field.jsp&rev=
=3D17606&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/engines/shared/a=
pplication_field.jsp (original)
+++ branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/engines/shared/a=
pplication_field.jsp Fri Jun 15 21:08:46 2007
@@ -1,30 +1,31 @@
<%--
Copyright 2002-2006 Jahia Ltd
=
-Licensed under the JAHIA COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (JCDD=
L), =
-Version 1.0 (the "License"), or (at your option) any later version; you ma=
y =
-not use this file except in compliance with the License. You should have =
-received a copy of the License along with this program; if not, you may ob=
tain =
-a copy of the License at =
+Licensed under the JAHIA COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (JCDD=
L),
+Version 1.0 (the "License"), or (at your option) any later version; you may
+not use this file except in compliance with the License. You should have
+received a copy of the License along with this program; if not, you may ob=
tain
+a copy of the License at
=
http://www.jahia.org/license/
=
-Unless required by applicable law or agreed to in writing, software =
-distributed under the License is distributed on an "AS IS" BASIS, =
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. =
-See the License for the specific language governing permissions and =
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
limitations under the License.
---%><%@ page language=3D"java" %>
+--%>
+<%@ page language=3D"java" %>
<%@ page import=3D"org.jahia.data.applications.ApplicationBean" %>
<%@ page import=3D"org.jahia.data.applications.EntryPointDefinition" %>
<%@ page import=3D"org.jahia.data.fields.JahiaField" %>
<%@ page import=3D"org.jahia.data.viewhelper.principal.PrincipalViewHelper=
" %>
-<%@ page import=3D"org.jahia.engines.rights.ManageRights"%>
+<%@ page import=3D"org.jahia.engines.rights.ManageRights" %>
<%@ page import=3D"org.jahia.engines.shared.Application_Field" %>
-<%@ page import=3D"org.jahia.gui.GuiBean"%>
+<%@ page import=3D"org.jahia.gui.GuiBean" %>
<%@ page import=3D"org.jahia.params.ParamBean" %>
<%@ page import=3D"org.jahia.registries.ServicesRegistry" %>
-<%@ page import=3D"org.jahia.utils.*"%>
+<%@ page import=3D"org.jahia.utils.*" %>
<%@ page import=3D"org.jahia.services.sites.JahiaSite" %>
<%@ page import=3D"java.security.Principal" %>
<%@ page import=3D"java.util.*" %>
@@ -48,8 +49,8 @@
final Integer userNameWidth =3D new Integer(15);
request.getSession().setAttribute("userNameWidth", userNameWidth);
boolean unAuthorizedOnCurrentlySelectedWebapp =3D false;
- if(engineMap.get(theField.getDefinition().getName() + "_unAuthorized")=
!=3Dnull)
- unAuthorizedOnCurrentlySelectedWebapp =3D true;
+ if (engineMap.get(theField.getDefinition().getName() + "_unAuthorized"=
) !=3D null)
+ unAuthorizedOnCurrentlySelectedWebapp =3D true;
logger.debug("appID=3D" + appID);
logger.debug("selectedEntryPointDefName=3D" + selectedEntryPointDefNam=
e);
=
@@ -127,24 +128,39 @@
=
</script>
=
-<table>
- <% if(unAuthorizedOnCurrentlySelectedWebapp) {%>
- <td width=3D"100%">
- <td><jahia:engineResourceBundle resourceName=3D"org.jahia.engi=
nes.shared.Application_Field.unauthorized.label"/> : <%=3DselectedEntryPoin=
tDefName%></td>
+<table class=3D"evenOddTable" border=3D"0" cellpadding=3D"5" cellspacing=
=3D"0" width=3D"100%">
+ <thead>
+ <th title=3D"portlet">
+ <a href=3D"#portlet">
+ <jahia:engineResourceBundle
+ resourceName=3D"org.jahia.engines.shared.Applicati=
on_Field.browseByCategories.AllPortlets"
+ defaultValue=3D"Portlets"/>
+
+ </a>
+ </th>
+ </thead>
+ <tbody>
+ <% if (unAuthorizedOnCurrentlySelectedWebapp) {%>
+ <tr width=3D"100%">
+ <td>
+ <jahia:engineResourceBundle
+ resourceName=3D"org.jahia.engines.shared.Applicati=
on_Field.unauthorized.label"/>
+ : <%=3DselectedEntryPointDefName%>
+ </td>
</tr>
- <%}%>
- <tr>
- <% if (!appList.hasMoreElements()) { %>
- <td width=3D"100%">
- <jahia:engineResourceBundle resourceName=3D"org.jahia.engines.=
shared.Application_Field.noWebApp.label"/>
- </td>
- <% } else { %>
- <td>
- <%/* comment this for old engin */%>
- <[EMAIL PROTECTED]
file=3D"/jsp/jahia/engines/shared/application_field_displ=
ayTag.inc"%>
- </td>
- <%/* un comment this for old engin */%>
- <!--<td>
+ <%}%>
+ <tr>
+ <% if (!appList.hasMoreElements()) { %>
+ <td width=3D"100%">
+ <jahia:engineResourceBundle resourceName=3D"org.jahia.engi=
nes.shared.Application_Field.noWebApp.label"/>
+ </td>
+ <% } else { %>
+ <td>
+ <%/* comment this for old engin */%>
+ <%@ include file=3D"/jsp/jahia/engines/shared/application_=
field_displayTag.inc" %>
+ </td>
+ <%/* un comment this for old engin */%>
+ <!--<td>
<jahia:engineResourceBundle resourceName=3D"org.jahia.engines.=
shared.Application_Field.selectWebApp.label"/>
</td>
<td >
@@ -173,88 +189,127 @@
%>
</select>
</td>-->
- <% } %>
- </tr>
+ <% } %>
+ </tr>
+ </tbody>
</table>
=
-<%if(!unAuthorizedOnCurrentlySelectedWebapp) {%>
-<table>
- <%
- Vector roles =3D (Vector) engineMap.get("roles");
- roleNb =3D roles.size();
- if (roles.size() > 0) { %>
- <tr>
- <td colspan=3D"1">
- <jahia:engineResourceBundle resourceName=3D"org.jahia.engines.=
shared.Application_Field.definesRoles.label"/>
- </td>
- </tr><%
- HashMap applicationRoles =3D (HashMap) engineMap.get(Application_Field=
.APPLICATION_ROLES);
- ArrayList roleMembersList =3D (ArrayList) applicationRoles.get(new Int=
eger(appID));
- for (int i =3D 0; i < roles.size(); i++) {
-%><tr><td><br>
- <fieldset style=3D"padding: 5px;">
- <legend>
- <b><%=3D(String) roles.get(i)%></b>
- </legend>
- <%
- HashSet membersSet =3D (HashSet) roleMembersList.get(i);
- String[] textPattern =3D {"Principal", "Provider, 6", "Name, "=
+ userNameWidth, "Properties, 20"};
- PrincipalViewHelper principalViewHelper =3D new PrincipalViewH=
elper(textPattern);
- %>
- <select class=3D"fontfix" name=3D"authMembers<%=3Di%>" size=3D"5" =
multiple=3D"multiple"
- <%if (membersSet.size() =3D=3D 0) {%> disabled=3D"disabled=
" <%}%>>
- <%
- Iterator it =3D membersSet.iterator();
- while (it.hasNext()) {
- Principal p =3D (Principal) it.next();
- %><option value=3D"<%=3DprincipalViewHelper.getPrincipalValueO=
ption(p)%>">
- <%=3DprincipalViewHelper.getPrincipalTextOption(p)%>
- </option><%
- }
- if (membersSet.size() =3D=3D 0) {
- %><option value=3D"null">-- - - - <jahia:engineResourceBundle=
resourceName=3D"org.jahia.engines.shared.Application_Field.noMembersDefine=
d.label"/> - - - - --</option><%
- } %>
- </select>
- </fieldset>
-</td>
- <td> </td>
-
- <td>
- <% if (jParams.userIsAdmin() ||
- theField.checkAdminAccess(jParams.getUser()) ||
- theField.checkWriteAccess(jParams.getUser()) ||
- theField.getID() < 0) { %>
- <a href=3D"javascript:puselectUsrGrp('<%=3DselectUsrGrp%>', 'authM=
embers<%=3Di%>');">
- <jahia:engineResourceBundle
- resourceName=3D"org.jahia.engines.shared.Application_F=
ield.setUsersAndGroups.label"/>
- </a>
- <br><br>
- <a href=3D"javascript:removeSelectBox(document.mainForm.authMember=
s<%=3Di%>, '-- - - - - <jahia:engineResourceBundle resource=
Name=3D"org.jahia.engines.shared.Application_Field.noMoreMembers.label"/> -=
- - - --');">
- <jahia:engineResourceBundle
- resourceName=3D"org.jahia.engines.shared.Application_F=
ield.removeUsersOrGroups.label"/>
- </a>
- <% } %>
- </td>
-</tr>
- <% }
- } else if(counter>0) { %>
- <b><jahia:engineResourceBundle
- resourceName=3D"org.jahia.engines.shared.Application_Field.notDefi=
neRoles.label"/></b>
- <% } %>
+<%if (!unAuthorizedOnCurrentlySelectedWebapp) {%>
+<table class=3D"evenOddTable" border=3D"0" cellpadding=3D"5" cellspacing=
=3D"0" width=3D"100%">
+ <thead>
+ <th title=3D"roles">
+ <a href=3D"#roles">
+ <jahia:engineResourceBundle resourceName=3D"org.jahia.engi=
nes.shared.Application_Field.Roles"
+ defaultValue=3D"Roles"/>
+
+ </a>
+ </th>
+ </thead>
+ <tbody>
+ <tr class=3D"even">
+ <td>
+ <table>
+ <%
+
+ Vector roles =3D (Vector) engineMap.get("roles");
+ roleNb =3D roles.size();
+ if (roles.size() > 0) {
+ %>
+ <tr>
+ <td colspan=3D"1">
+ <jahia:engineResourceBundle
+ resourceName=3D"org.jahia.engines.shar=
ed.Application_Field.definesRoles.label"/>
+ </td>
+ </tr>
+ <%
+
+ HashMap applicationRoles =3D (HashMap) engineMap.g=
et(Application_Field.APPLICATION_ROLES);
+ ArrayList roleMembersList =3D (ArrayList) applicat=
ionRoles.get(new Integer(appID));
+ for (int i =3D 0; i < roles.size(); i++) {
+
+ %>
+ <tr>
+ <td><br>
+ <fieldset style=3D"padding: 5px;">
+ <legend>
+ <b><%=3D(String) roles.get(i)%>
+ </b>
+ </legend>
+ <%
+ HashSet membersSet =3D (HashSet) roleM=
embersList.get(i);
+ String[] textPattern =3D {"Principal",=
"Provider, 6", "Name, " + userNameWidth, "Properties, 20"};
+ PrincipalViewHelper principalViewHelpe=
r =3D new PrincipalViewHelper(textPattern);
+ %>
+ <select class=3D"fontfix" name=3D"authMemb=
ers<%=3Di%>" size=3D"5" multiple=3D"multiple"
+ <%if (membersSet.size() =3D=3D 0) =
{%> disabled=3D"disabled" <%}%>>
+ <%
+ Iterator it =3D membersSet.iterato=
r();
+ while (it.hasNext()) {
+ Principal p =3D (Principal) it=
.next();
+ %>
+ <option value=3D"<%=3DprincipalViewHel=
per.getPrincipalValueOption(p)%>">
+ <%=3DprincipalViewHelper.getPrinci=
palTextOption(p)%>
+ </option>
+ <%
+ }
+ if (membersSet.size() =3D=3D 0) {
+ %>
+ <option value=3D"null">-- - - -
+ <jahia:engineResourceBundle
+ resourceName=3D"org.jahia.=
engines.shared.Application_Field.noMembersDefined.label"/>
+ - - - - --
+ </option>
+ <%
+ } %>
+ </select>
+ </fieldset>
+ </td>
+ <td> </td>
+
+ <td>
+ <% if (jParams.userIsAdmin() ||
+ theField.checkAdminAccess(jParams.getU=
ser()) ||
+ theField.checkWriteAccess(jParams.getU=
ser()) ||
+ theField.getID() < 0) { %>
+ <a href=3D"javascript:puselectUsrGrp('<%=3Dsel=
ectUsrGrp%>', 'authMembers<%=3Di%>');">
+ <jahia:engineResourceBundle
+ resourceName=3D"org.jahia.engines.=
shared.Application_Field.setUsersAndGroups.label"/>
+ </a>
+ <br><br>
+ <a href=3D"javascript:removeSelectBox(document=
.mainForm.authMembers<%=3Di%>, '-- - - - - <jahia:engineRes=
ourceBundle resourceName=3D"org.jahia.engines.shared.Application_Field.noMo=
reMembers.label"/> - - - - --');">
+ <jahia:engineResourceBundle
+ resourceName=3D"org.jahia.engines.=
shared.Application_Field.removeUsersOrGroups.label"/>
+ </a>
+ <% } %>
+ </td>
+ </tr>
+ <%
+ }
+ } else if(counter>0) {
+ %>
+ <b>
+ <jahia:engineResourceBundle
+ resourceName=3D"org.jahia.engines.shared.A=
pplication_Field.notDefineRoles.label"/>
+ </b>
+ <% } %>
+ </td>
+ </tr>
+ <tbody>
+</table>
</table>
<%}%>
=
<script type=3D"text/javascript">
<!--
-function check() {
+ function check() {
<% for (int i =3D 0; i < roleNb; i++) { %>
selectAllOptionsSelectBox(document.mainForm.authMembers<%=3Di%>);
<% } %>
- return true;
-}
+ return true;
+ }
=
-function saveContent() {
- check();
-}
-// -->
+ function saveContent() {
+ check();
+ }
+ // -->
</script>
_______________________________________________
cvs_list mailing list
[email protected]
http://lists.jahia.org/cgi-bin/mailman/listinfo/cvs_list