Author: xlawrence
Date: Thu Aug  2 16:48:40 2007
New Revision: 18118

URL: https://svndev.jahia.net/websvn/listing.php?sc=3D1&rev=3D18118&repname=
=3Djahia
Log:
Implement smal improvement on APPLY TO SHARED language functionality in the=
 engines.

Instead of having a checkbox, we now have cklickable icons that will switch=
 the mode of the engines. =


Added:
    branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/css/images/icone=
s/Boolean_type_linked.gif   (with props)
    branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/css/images/icone=
s/Number_type_linked.gif   (with props)
    branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/css/images/icone=
s/application_type_linked.gif   (with props)
    branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/css/images/icone=
s/big_type_linked.gif   (with props)
    branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/css/images/icone=
s/category_type_linked.gif   (with props)
    branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/css/images/icone=
s/colors_linked.gif   (with props)
    branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/css/images/icone=
s/date_type_linked.gif   (with props)
    branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/css/images/icone=
s/file_type_linked.gif   (with props)
    branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/css/images/icone=
s/page_type_linked.gif   (with props)
    branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/css/images/icone=
s/small_shared_type_linked.gif   (with props)
    branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/css/images/icone=
s/small_type_linked.gif   (with props)
    branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/engines/containe=
redit/fieldedit.inc
Modified:
    branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/data/fields/Fields=
EditHelperAbstract.java
    branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/css/colorsAndSty=
les.css
    branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/engines/containe=
redit/containeredit.jsp
    branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/engines/containe=
redit/containereditmenu.inc

Modified: branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/data/fields/=
FieldsEditHelperAbstract.java
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-5-0-SP=
-BRANCH/core/src/java/org/jahia/data/fields/FieldsEditHelperAbstract.java&r=
ev=3D18118&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/java/org/jahia/data/fields/Fields=
EditHelperAbstract.java (original)
+++ branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/data/fields/Fields=
EditHelperAbstract.java Thu Aug  2 16:48:40 2007
@@ -283,9 +283,7 @@
                         engineMap.put (engineName+"."+"theField", theField=
);
                     }
 =

-                    if (doUpdate &&
-                            jParams.getParameter ("apply_change_to_all_lan=
g_" +
-                            fieldId) !=3D null) {
+                    if (doUpdate && "true".equals(jParams.getParameter ("a=
pply_change_to_all_lang_" +fieldId))) {
                         applyChangeToAllLang (engineName,theField,
                                 jahiaContentContainerFacade,
                                 engineMap, jParams);

Modified: branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/css/colors=
AndStyles.css
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-5-0-SP=
-BRANCH/core/src/webapp/jsp/jahia/css/colorsAndStyles.css&rev=3D18118&repna=
me=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/css/colorsAndSty=
les.css (original)
+++ branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/css/colorsAndSty=
les.css Thu Aug  2 16:48:40 2007
@@ -515,6 +515,84 @@
     padding-left: 20px;
 }
 =

+/* icons for shared lang */
+.number_type_linked {
+    background: url( "images/icones/Number_type_linked.gif" ) no-repeat 0p=
x 0px;
+    height: 24px;
+    padding-left: 30px;
+    padding-top: 2px;
+}
+
+.small_type_linked {
+    background: url( "images/icones/small_type_linked.gif" ) no-repeat 0px=
 0px;
+    height: 24px;
+    padding-left: 30px;
+    padding-top: 2px;
+}
+
+.big_type_linked {
+    background: url( "images/icones/big_type_linked.gif" ) no-repeat 0px 0=
px;
+    height: 24px;
+    padding-left: 30px;
+    padding-top: 2px;
+}
+
+.date_type_linked {
+    background: url( "images/icones/date_type_linked.gif" ) no-repeat 0px =
0px;
+    height: 24px;
+    padding-left: 30px;
+    padding-top: 2px;
+}
+
+.page_type_linked {
+    background: url( "images/icones/page_type_linked.gif" ) no-repeat 0px =
0px;
+    height: 24px;
+    padding-left: 30px;
+    padding-top: 2px;
+}
+
+.file_type_linked {
+    background: url( "images/icones/file_type_linked.gif" ) no-repeat 0px =
0px;
+    height: 24px;
+    padding-left: 30px;
+    padding-top: 2px;
+}
+
+.app_type_linked {
+    background: url( "images/icones/application_type_linked.gif" ) no-repe=
at 0px 0px;
+    height: 24px;
+    padding-left: 30px;
+    padding-top: 2px;
+}
+
+.boolean_type_linked {
+    background: url( "images/icones/Boolean_type_linked.gif" ) no-repeat 0=
px 0px;
+    height: 24px;
+    padding-left: 30px;
+    padding-top: 2px;
+}
+
+.color_type_linked {
+    background: url( "images/icones/colors_linked.gif" ) no-repeat 0px 0px;
+    height: 24px;
+    padding-left: 30px;
+    padding-top: 2px;
+}
+
+.category_type_linked {
+    background: url( "images/icones/category_type_linked.gif" ) no-repeat =
0px 0px;
+    height: 24px;
+    padding-left: 30px;
+    padding-top: 2px;
+}
+
+.small_shared_type_linked {
+    background: url( "images/icones/small_shared_type_linked.gif" ) no-rep=
eat 0px 0px;
+    height: 24px;
+    padding-left: 30px;
+    padding-top: 2px;
+}
+
 /* Big Field Type icons */
 .number_type_big {
     background: url( "images/icones/Number_type_big.gif" ) no-repeat 0px 0=
px;

Added: branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/css/images/ic=
ones/Boolean_type_linked.gif
URL: https://svndev.jahia.net/websvn/filedetails.php?path=3D/branches/JAHIA=
-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/css/images/icones/Boolean_type_lin=
ked.gif&rev=3D18118&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
Binary file - no diff available.

Added: branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/css/images/ic=
ones/Number_type_linked.gif
URL: https://svndev.jahia.net/websvn/filedetails.php?path=3D/branches/JAHIA=
-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/css/images/icones/Number_type_link=
ed.gif&rev=3D18118&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
Binary file - no diff available.

Added: branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/css/images/ic=
ones/application_type_linked.gif
URL: https://svndev.jahia.net/websvn/filedetails.php?path=3D/branches/JAHIA=
-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/css/images/icones/application_type=
_linked.gif&rev=3D18118&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
Binary file - no diff available.

Added: branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/css/images/ic=
ones/big_type_linked.gif
URL: https://svndev.jahia.net/websvn/filedetails.php?path=3D/branches/JAHIA=
-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/css/images/icones/big_type_linked.=
gif&rev=3D18118&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
Binary file - no diff available.

Added: branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/css/images/ic=
ones/category_type_linked.gif
URL: https://svndev.jahia.net/websvn/filedetails.php?path=3D/branches/JAHIA=
-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/css/images/icones/category_type_li=
nked.gif&rev=3D18118&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
Binary file - no diff available.

Added: branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/css/images/ic=
ones/colors_linked.gif
URL: https://svndev.jahia.net/websvn/filedetails.php?path=3D/branches/JAHIA=
-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/css/images/icones/colors_linked.gi=
f&rev=3D18118&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
Binary file - no diff available.

Added: branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/css/images/ic=
ones/date_type_linked.gif
URL: https://svndev.jahia.net/websvn/filedetails.php?path=3D/branches/JAHIA=
-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/css/images/icones/date_type_linked=
.gif&rev=3D18118&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
Binary file - no diff available.

Added: branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/css/images/ic=
ones/file_type_linked.gif
URL: https://svndev.jahia.net/websvn/filedetails.php?path=3D/branches/JAHIA=
-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/css/images/icones/file_type_linked=
.gif&rev=3D18118&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
Binary file - no diff available.

Added: branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/css/images/ic=
ones/page_type_linked.gif
URL: https://svndev.jahia.net/websvn/filedetails.php?path=3D/branches/JAHIA=
-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/css/images/icones/page_type_linked=
.gif&rev=3D18118&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
Binary file - no diff available.

Added: branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/css/images/ic=
ones/small_shared_type_linked.gif
URL: https://svndev.jahia.net/websvn/filedetails.php?path=3D/branches/JAHIA=
-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/css/images/icones/small_shared_typ=
e_linked.gif&rev=3D18118&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
Binary file - no diff available.

Added: branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/css/images/ic=
ones/small_type_linked.gif
URL: https://svndev.jahia.net/websvn/filedetails.php?path=3D/branches/JAHIA=
-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/css/images/icones/small_type_linke=
d.gif&rev=3D18118&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
Binary file - no diff available.

Modified: branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/engines/co=
ntaineredit/containeredit.jsp
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-5-0-SP=
-BRANCH/core/src/webapp/jsp/jahia/engines/containeredit/containeredit.jsp&r=
ev=3D18118&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/containe=
redit/containeredit.jsp (original)
+++ branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/engines/containe=
redit/containeredit.jsp Thu Aug  2 16:48:40 2007
@@ -26,7 +26,7 @@
 <%@ page import=3D"org.jahia.params.ProcessingContext"%>
 <%@ taglib uri=3D"JahiaLib" prefix=3D"jahia" %>
 <%!
-    private static String getIconClassName(final int type, final boolean s=
mall) {
+    private static String getIconClassName(final int type, final boolean s=
mall, final boolean applyChangeToAllLang) {
         final String className;
         switch (type) {
             case FieldTypes.UNDEFINED:
@@ -85,6 +85,9 @@
                 className =3D "undefined_type";
                 break;
         }
+        if (applyChangeToAllLang) {
+            return className + "_linked";
+        }
         if (small)
             return className;
         else
@@ -183,94 +186,22 @@
 <% } else { %>
 <input type=3D"hidden" name=3D"lastfname" value=3D"">
 <% }
-    boolean applyChangeToAllLang;
     if (fieldIDs.size() > 1) {
         final Enumeration enumeration =3D fieldIDs.elements();
         while (enumeration.hasMoreElements()) {
             final Integer I =3D (Integer) enumeration.nextElement();
             final String aForm =3D (String) fieldForms.get(I);
             final JahiaField aField =3D feh.getField(I.intValue());
-            applyChangeToAllLang =3D (request.getParameter("apply_change_t=
o_all_lang_" + aField.getID()) !=3D null);
-            String errorMsg =3D (String) fieldErrors.get(new Integer(aFiel=
d.getID()));
-            if (errorMsg =3D=3D null) {
-                errorMsg =3D "";
-            }
-            if (aField instanceof JahiaAllowApplyChangeToAllLangField) { %>
-
-<h4 class=3D"<%=3DgetIconClassName(aField.getType(), false)%>"><%=3DaField=
.getDefinition().getTitle(pageDefID, elh.getCurrentLocale())%>
-    <%
-        if (EngineValidationHelper.isFieldMandatory(theContainer, aField, =
jParams)) {
-    %>
-    <span class=3D"errorbold">(*)</span>
-    <% } %>
-</h4>
-<% if (errorMsg !=3D null && errorMsg.length() > 0) { %>
-<span class=3D"error"><%=3DerrorMsg%></span><br/>
-<% } %>
-<%
-    if (localeList.size() > 1 && !readOnlyMode &&
-            ServicesRegistry.getInstance().getJahiaACLManagerService().has=
WriteAccesOnAllLangs(jParams)) {
 %>
-<input type=3D"checkbox" name=3D"apply_change_to_all_lang_<%=3DaField.getI=
D()%>" value=3D"<%=3DaField.getID()%>"
-<% if (aField.isShared()){ %>
-       disabled=3D"disabled"
-       checked=3D"checked"
-<% } else if(applyChangeToAllLang){ %>
-       checked=3D"checked"
-<% } %>>
-<jahia:engineResourceBundle resourceName=3D"org.jahia.applyToAllLanguages.=
label"/><br/>
-<% } %>
-<% } %>
-<%=3DaForm%>
-<br/>&nbsp;<br/>&nbsp;
+            <%@ include file=3D"fieldedit.inc"%>
 <%
-    }
-} else {
-    applyChangeToAllLang =3D (request.getParameter("apply_change_to_all_la=
ng_" + theField.getID()) !=3D null);
-    String errorMsg =3D (String) fieldErrors.get(new Integer(theField.getI=
D()));
-    if (errorMsg =3D=3D null) {
-        errorMsg =3D "";
-    }
-%>
-<% if (theField instanceof JahiaAllowApplyChangeToAllLangField) { %>
-<h4 class=3D"<%=3DgetIconClassName(theField.getType(), false)%>"><%=3DtheF=
ield.getDefinition().getTitle(pageDefID, elh.getCurrentLocale()) %>
-    <%
-        if (EngineValidationHelper.isFieldMandatory(theContainer, theField=
, jParams)) {
-    %>
-    <span class=3D"errorbold">(*)</span>
-    <% } %>
-</h4>
-
-<span class=3D"error"><%=3DerrorMsg%></span>
-
-<% if (localeList.size() > 1 && !readOnlyMode &&
-        ServicesRegistry.getInstance().getJahiaACLManagerService().hasWrit=
eAccesOnAllLangs(jParams)) { %>
-<input type=3D"checkbox"
-              name=3D"apply_change_to_all_lang_<%=3DtheField.getID()%>"
-              value=3D"<%=3DtheField.getID()%>"
-<% if (theField.isShared()){%>
-              disabled=3D"disabled"
-              checked=3D"checked"
-<%} else if (applyChangeToAllLang){ %>
-              checked=3D"checked"
-<% } %>>
-<jahia:engineResourceBundle resourceName=3D"org.jahia.applyToAllLanguages.=
label"/><br/>
-<% } %>
-<% } %>
-<%=3DfieldForm%>
-<% if (errorMsg !=3D null && errorMsg.length() > 0) { %>
-<script type=3D"text/javascript">
-    var elem =3D document.getElementById("errorMsg");
-    if (elem) {
-        elem.innerHTML =3D "<span class=3D\"error\"><%=3DerrorMsg%></span>=
<br/>";
-        var goElem =3D document.getElementById("go");
-        if (goElem) {
-                goElem.value =3D "close";
         }
-    }
-</script>
-<% } %>
-<% } %>
+    } else {
+        String aForm =3D fieldForm;    =

+        JahiaField aField =3D theField;                =

+        %>
+        <%@ include file=3D"fieldedit.inc"%>
+  <% } %>
 <% } %>
 </div><!-- end editor containeredit -->
 </div><!-- end content containeredit -->

Modified: branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/engines/co=
ntaineredit/containereditmenu.inc
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-5-0-SP=
-BRANCH/core/src/webapp/jsp/jahia/engines/containeredit/containereditmenu.i=
nc&rev=3D18118&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/containe=
redit/containereditmenu.inc (original)
+++ branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/engines/containe=
redit/containereditmenu.inc Thu Aug  2 16:48:40 2007
@@ -134,7 +134,7 @@
                     while (fieldNames.hasNext()) {
                         final JahiaField currField =3D feh.getField((Strin=
g) fieldNames.next());
                         final int type =3D currField.getType();
-                        final String className =3D getIconClassName(type, =
true);
+                        final String className =3D getIconClassName(type, =
true, false);
                         final boolean isMandatory =3D EngineValidationHelp=
er.isFieldMandatory(theContainer,
                                 currField, jParams);
                         final String name =3D currField.getDefinition().ge=
tTitle(pageDefinitionID,
@@ -200,7 +200,7 @@
                 while (fieldNames.hasNext()) {
                     final JahiaField currField =3D feh.getField((String) f=
ieldNames.next());
                     final int type =3D currField.getType();
-                    final String className =3D getIconClassName(type, true=
);
+                    final String className =3D getIconClassName(type, true=
, false);
                     final String name =3D currField.getDefinition().getTit=
le(pageDefinitionID,
                             elh.getCurrentLocale());
                     if (isCurrentFieldGroup) {

Added: branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/engines/conta=
ineredit/fieldedit.inc
URL: https://svndev.jahia.net/websvn/filedetails.php?path=3D/branches/JAHIA=
-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/engines/containeredit/fieldedit.in=
c&rev=3D18118&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/containe=
redit/fieldedit.inc (added)
+++ branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/jsp/jahia/engines/containe=
redit/fieldedit.inc Thu Aug  2 16:48:40 2007
@@ -0,0 +1,78 @@
+<%--
+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 =

+
+ 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 =

+limitations under the License.
+--%>
+<%@ page import=3D"org.jahia.data.fields.JahiaAllowApplyChangeToAllLangFie=
ld" %>
+<%@ page import=3D"org.jahia.engines.validation.EngineValidationHelper" %>
+<%
+    boolean applyChangeToAllLang =3D "true".equals(jParams.getParameter("a=
pply_change_to_all_lang_" + aField.getID()));
+    String errorMsg =3D (String) fieldErrors.get(new Integer(aField.getID(=
)));
+    if (errorMsg =3D=3D null) {
+        errorMsg =3D "";
+    }
+    if (aField instanceof JahiaAllowApplyChangeToAllLangField) { %>
+
+<% if (localeList.size() > 1 && !readOnlyMode && !aField.isShared() &&
+        ServicesRegistry.getInstance().getJahiaACLManagerService().hasWrit=
eAccesOnAllLangs(jParams)) { %>
+<script type=3D"text/javascript">
+    function switchIcons() {
+        var element =3D document.getElementById("apply_change_to_all_lang_=
<%=3DaField.getID()%>");
+        if (element) {
+            var theValue =3D element.value;
+            if (theValue =3D=3D "true") {
+                theValue =3D "false";
+            } else {
+                theValue =3D "true"; =

+            }
+            element.value =3D theValue;
+            changeField('<%=3DaField.getID()%>');
+        }
+    }
+</script>
+
+<h4 <% if (applyChangeToAllLang) { %> title=3D'<jahia:engineResourceBundle=
 resourceName=3D"org.jahia.applyToAllLanguages.label"/>' <% } %> onclick=3D=
"switchIcons()" class=3D"<%=3DgetIconClassName(aField.getType(), false, app=
lyChangeToAllLang)%>">
+    <% } else { %>
+<h4 <% if (aField.isShared() || applyChangeToAllLang) { %>
+            title=3D'<jahia:engineResourceBundle resourceName=3D"org.jahia=
.applyToAllLanguages.label"/>' <% } %>
+            class=3D"<%=3DgetIconClassName(aField.getType(), false, applyC=
hangeToAllLang || aField.isShared())%>">
+        <% } %>
+        <%=3DaField.getDefinition().getTitle(pageDefID, elh.getCurrentLoca=
le())%>
+        <%
+            if (EngineValidationHelper.isFieldMandatory(theContainer, aFie=
ld, jParams)) {
+        %>
+        <span class=3D"errorbold">(*)</span>
+        <%}%>
+    </h4>
+    <input id=3D"apply_change_to_all_lang_<%=3DaField.getID()%>" type=3D"h=
idden"
+           name=3D"apply_change_to_all_lang_<%=3DaField.getID()%>" value=
=3D"<%=3DapplyChangeToAllLang%>"
+            <% if (errorMsg !=3D null && errorMsg.length() > 0) { %>
+    <span class=3D"error"><%=3DerrorMsg%></span><br/>
+    <% } %>
+    <% } %>
+    <%=3DaForm%>
+    <br/>&nbsp;<br/>&nbsp;
+    <% if (errorMsg !=3D null && errorMsg.length() > 0) { %>
+    <script type=3D"text/javascript">
+        var elem =3D document.getElementById("errorMsg");
+        if (elem) {
+            elem.innerHTML =3D "<span class=3D\"error\"><%=3DerrorMsg%></s=
pan><br/>";
+            var goElem =3D document.getElementById("go");
+            if (goElem) {
+                goElem.value =3D "close";
+            }
+        }
+    </script>
+<% } %>
\ No newline at end of file

_______________________________________________
cvs_list mailing list
[email protected]
http://lists.jahia.org/cgi-bin/mailman/listinfo/cvs_list

Reply via email to