Author: bpapez
Date: Sat Sep  1 23:46:14 2007
New Revision: 18343

URL: https://svndev.jahia.net/websvn/listing.php?sc=3D1&rev=3D18343&repname=
=3Djahia
Log:
Put back the changes for "change action menu icons via CSS" as they have be=
en overwritten again =


Modified:
    trunk/core/src/java/org/jahia/gui/HTMLToolBox.java

Modified: trunk/core/src/java/org/jahia/gui/HTMLToolBox.java
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/trunk/core/src/java/o=
rg/jahia/gui/HTMLToolBox.java&rev=3D18343&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
--- trunk/core/src/java/org/jahia/gui/HTMLToolBox.java (original)
+++ trunk/core/src/java/org/jahia/gui/HTMLToolBox.java Sat Sep  1 23:46:14 =
2007
@@ -1393,11 +1393,6 @@
 =

         final StringBuffer buff =3D new StringBuffer(100);
 =

-        final String picto =3D actionIcon =3D=3D null ?
-                buff.append(getURLImageContext()).append("/action.gif").to=
String() :
-                actionIcon;
-        buff.delete(0, buff.length());
-
         final String uniqueID =3D buildUniqueContentID(objectType, objectI=
D,
                 definitionID, parentID, pageID, lockIcon, useFieldSet, res=
ourceBundle, namePostFix);
 =

@@ -1506,10 +1501,7 @@
         out.print(uniqueID);
         out.print("\" href=3D\"");
         out.print(ajaxFunction);
-        out.print("\"\n");
-        out.print("    onmouseover=3D\"buttonMouseover(event, '");
-        out.print(uniqueID);
-        out.print("')\"><img\n");
+        out.print("\"><span class=3D\"actionmenu ");
 =

         String resource =3D getResource(resourceBundle, objectType + "Oper=
ations");
 =

@@ -1530,9 +1522,16 @@
             if (cc !=3D null && pickerObjectsSize > 0) {
                 //this container is picked
                 resource =3D resource + " (" + getResource(resourceBundle,=
 "numbercopies") + ":" + pickerObjectsSize + ")";
-                buff.append(" src=3D\"").append(picto).append("\" alt=3D\"=
").append(resource).
-                        append("\"").append(" title=3D\"").append(resource=
).append("\" border=3D\"0\"/>");
                 =

+                buff.append("actionIcon\"");                =

+                if (actionIcon !=3D null) {         =

+                    buff.append(" style=3D\"background-image: url('").appe=
nd(actionIcon).
+                        append("');background-repeat: no-repeat;\">").appe=
nd("<img class=3D\"actionIcon\" style=3D\"visibility:hidden;\" src=3D\"").
+                            append(actionIcon).append("\" alt=3D\"").appen=
d(resource).append("\" border=3D\"0\"/>");
+                } else {
+                    buff.append("><img class=3D\"actionIcon\" src=3D\"").a=
ppend(getURLImageContext()).append("/action.gif\" alt=3D\"").
+                        append(resource).append("\" border=3D\"0\"/>");
+                }                =

             } else if (cc !=3D null && contentObject.isPicker() && cc.getP=
ickedObject() !=3D null) {
                 // picker status of object
                 pickedObject =3D cc.getPickedObject();
@@ -1543,13 +1542,22 @@
 =

                 //pickedpageID=3D""+((ContentContainer)pickedObject).getPa=
geID();
 =

-                buff.append(" src=3D\"").append(getURLImageContext()).appe=
nd("/picker.gif").append("\" alt=3D\"").append(resource).
-                        append("\"").append(" title=3D\"").append(resource=
).append("\" border=3D\"0\"/>");
+                buff.append("pickerIcon\"");
+                buff.append("><img class=3D\"pickerIcon\" src=3D\"").appen=
d(getURLImageContext()).append("/picker.gif\" alt=3D\"").
+                    append(resource).append("\" border=3D\"0\"/>");
+
 =

             } else {
                 // standard objects
-                buff.append(" src=3D\"").append(picto).append("\" alt=3D\"=
").append(resource).
-                        append("\"").append(" title=3D\"").append(resource=
).append("\" border=3D\"0\"/>");
+                buff.append("actionIcon\"");
+                if (actionIcon !=3D null) {         =

+                    buff.append(" style=3D\"background-image: url('").appe=
nd(actionIcon).
+                        append("');background-repeat: no-repeat;\">").appe=
nd("<img class=3D\"actionIcon\" style=3D\"visibility:hidden;\" src=3D\"").
+                            append(actionIcon).append("\" alt=3D\"").appen=
d(resource).append("\" border=3D\"0\"/>");
+                } else {
+                    buff.append("><img class=3D\"actionIcon\" src=3D\"").a=
ppend(getURLImageContext()).append("/action.gif\" alt=3D\"").
+                        append(resource).append("\" border=3D\"0\"/>");
+                }   =

             }
             final ContentObject obj =3D contentObject.getContentObject();
             if (aclDifferenceParam.booleanValue() && !
@@ -1564,16 +1572,23 @@
         } catch (JahiaException e) {
             logger.debug(e);
             // standard objects
-            buff.append(" src=3D\"").append(picto).append("\" alt=3D\"").a=
ppend(resource).
-                    append("\"").append(" title=3D\"").append(resource).ap=
pend("\" border=3D\"0\"/>");
+            buff.append("actionIcon\"");
+            if (actionIcon !=3D null) {         =

+                buff.append(" style=3D\"background-image: url('").append(a=
ctionIcon).
+                    append("');background-repeat: no-repeat;\">").append("=
<img class=3D\"actionIcon\" style=3D\"visibility:hidden;\" src=3D\"").appen=
d(actionIcon).
+                    append("\" alt=3D\"").append(resource).append("\" bord=
er=3D\"0\"/>");
+            } else {
+                buff.append("><img class=3D\"actionIcon\" src=3D\"").appen=
d(getURLImageContext()).append("/action.gif\" alt=3D\"").
+                    append(resource).append("\" border=3D\"0\"/>");
+            }       =

         }
 =

+        buff.append("</span>");        =

         out.println(buff.toString());
         buff.delete(0, buff.length());
 =

 =

         if (labelKey !=3D null) {
-            out.print("&nbsp;");
             out.println(getResource(resourceBundle, labelKey));
         }
         out.println("</a>");

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

Reply via email to