|
From: <luc...@us...> - 2013-09-17 12:24:10
|
Revision: 4317
http://openutils.svn.sourceforge.net/openutils/?rev=4317&view=rev
Author: lucaboati
Date: 2013-09-17 12:24:07 +0000 (Tue, 17 Sep 2013)
Log Message:
-----------
menu configured via mgnl config, no more jsp included
Modified Paths:
--------------
magnoliamodules/trunk/openutils-mgnlcontextmenu/src/main/java/net/sourceforge/openutils/mgnlcontextmenu/tags/MenuScripts.java
magnoliamodules/trunk/openutils-mgnlcontextmenu/src/main/resources/mgnl-files/templates/samples-contextmenu/template-contextmenu.jsp
magnoliamodules/trunk/openutils-mgnlcontextmenu/src/main/resources/mgnl-resources/contextmenu/js/contextmenu-addMenu.js
magnoliamodules/trunk/openutils-mgnlcontextmenu/src/main/resources/mgnl-resources/contextmenu/js/contextmenu-jquery.js
Added Paths:
-----------
magnoliamodules/trunk/openutils-mgnlcontextmenu/src/main/resources/mgnl-bootstrap-samples/contextmenu/config.modules.contextmenu.contextMenus.formField.xml
magnoliamodules/trunk/openutils-mgnlcontextmenu/src/main/resources/mgnl-bootstrap-samples/contextmenu/config.modules.contextmenu.contextMenus.simpleForm.xml
Modified: magnoliamodules/trunk/openutils-mgnlcontextmenu/src/main/java/net/sourceforge/openutils/mgnlcontextmenu/tags/MenuScripts.java
===================================================================
--- magnoliamodules/trunk/openutils-mgnlcontextmenu/src/main/java/net/sourceforge/openutils/mgnlcontextmenu/tags/MenuScripts.java 2013-09-16 23:33:31 UTC (rev 4316)
+++ magnoliamodules/trunk/openutils-mgnlcontextmenu/src/main/java/net/sourceforge/openutils/mgnlcontextmenu/tags/MenuScripts.java 2013-09-17 12:24:07 UTC (rev 4317)
@@ -46,18 +46,20 @@
{
StringBuilder out = new StringBuilder();
- // out.append("<script type=\"text/javascript\">\n");
- // out.append("var mgnlContextMenuInfo = {\n");
- // out.append(" contextPath: '" + MgnlContext.getContextPath() + "',\n");
- // out.append(" menus: " + menusJs() + ",\n");
- // out.append(" elements: " + elementsJs() + "\n");
- // out.append("};\n");
- // out.append("</script>\n");
+ out.append("<script type=\"text/javascript\">\n");
+ out.append("var mgnlContextMenuInfo = {\n");
+ out.append(" contextPath: '" + MgnlContext.getContextPath() + "',\n");
+ out.append(" menus: " + menusJs() + ",\n");
+ out.append(" elements: " + elementsJs() + "\n");
+ out.append("};\n");
+ out.append("</script>\n");
out.append("<!-- start contextmenu:scripts -->\n");
out.append("<script type=\"text/javascript\">\n");
out.append("jQuery(document).ready(function() {\n");
- out.append(" jQuery.mgnlAddContextMenu(" + ContextMenuElFunctions.editMessageInfosJs() + ");\n");
+ out.append(" jQuery.mgnlAddContextMenu("
+ + ContextMenuElFunctions.editMessageInfosJs()
+ + ", mgnlContextMenuInfo );\n");
out.append("});\n");
out.append("</script>\n");
out.append("<!-- end contextmenu:scripts -->\n");
Added: magnoliamodules/trunk/openutils-mgnlcontextmenu/src/main/resources/mgnl-bootstrap-samples/contextmenu/config.modules.contextmenu.contextMenus.formField.xml
===================================================================
--- magnoliamodules/trunk/openutils-mgnlcontextmenu/src/main/resources/mgnl-bootstrap-samples/contextmenu/config.modules.contextmenu.contextMenus.formField.xml (rev 0)
+++ magnoliamodules/trunk/openutils-mgnlcontextmenu/src/main/resources/mgnl-bootstrap-samples/contextmenu/config.modules.contextmenu.contextMenus.formField.xml 2013-09-17 12:24:07 UTC (rev 4317)
@@ -0,0 +1,247 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<sv:node sv:name="formField" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:contentNode</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:mixinTypes" sv:type="Name" sv:multiple="true">
+ <sv:value>mix:lockable</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:uuid" sv:type="String">
+ <sv:value>7ed5d7a8-fa8b-4eff-a555-59269837173c</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:createdBy" sv:type="String">
+ <sv:value>admin</sv:value>
+ </sv:property>
+ <sv:property sv:name="mouseoverClass" sv:type="String">
+ <sv:value>contextmenuOver</sv:value>
+ </sv:property>
+ <sv:property sv:name="mouseoverIcon" sv:type="String">
+ <sv:value>/.resources/contextmenu/img/rightclicktoedit.png</sv:value>
+ </sv:property>
+ <sv:node sv:name="MetaData">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:metaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:createdBy" sv:type="String">
+ <sv:value>admin</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activated" sv:type="Boolean">
+ <sv:value>false</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:authorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:creationdate" sv:type="Date">
+ <sv:value>2010-05-18T18:22:08.296+02:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastmodified" sv:type="Date">
+ <sv:value>2013-09-17T13:22:34.156+02:00</sv:value>
+ </sv:property>
+ </sv:node>
+ <sv:node sv:name="items">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:contentNode</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:mixinTypes" sv:type="Name" sv:multiple="true">
+ <sv:value>mix:lockable</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:uuid" sv:type="String">
+ <sv:value>8283321a-967a-411c-884d-1e74d96adf0d</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:createdBy" sv:type="String">
+ <sv:value>admin</sv:value>
+ </sv:property>
+ <sv:node sv:name="MetaData">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:metaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:createdBy" sv:type="String">
+ <sv:value>admin</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activated" sv:type="Boolean">
+ <sv:value>false</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:authorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:creationdate" sv:type="Date">
+ <sv:value>2010-05-18T18:22:40.359+02:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastmodified" sv:type="Date">
+ <sv:value>2013-09-17T13:22:22.646+02:00</sv:value>
+ </sv:property>
+ </sv:node>
+ <sv:node sv:name="label">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:contentNode</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:mixinTypes" sv:type="Name" sv:multiple="true">
+ <sv:value>mix:lockable</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:uuid" sv:type="String">
+ <sv:value>2305a310-8910-48f7-a062-4371667797ca</sv:value>
+ </sv:property>
+ <sv:property sv:name="controlType" sv:type="String">
+ <sv:value>edit</sv:value>
+ </sv:property>
+ <sv:property sv:name="icon" sv:type="String">
+ <sv:value>/.resources/contextmenu/css/images/menu-text.png</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:createdBy" sv:type="String">
+ <sv:value>admin</sv:value>
+ </sv:property>
+ <sv:property sv:name="text" sv:type="String">
+ <sv:value>Edit label</sv:value>
+ </sv:property>
+ <sv:node sv:name="MetaData">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:metaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:createdBy" sv:type="String">
+ <sv:value>admin</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activated" sv:type="Boolean">
+ <sv:value>false</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:authorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:creationdate" sv:type="Date">
+ <sv:value>2010-05-18T18:22:45.406+02:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastmodified" sv:type="Date">
+ <sv:value>2013-09-17T14:14:38.290+02:00</sv:value>
+ </sv:property>
+ </sv:node>
+ </sv:node>
+ <sv:node sv:name="description">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:contentNode</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:mixinTypes" sv:type="Name" sv:multiple="true">
+ <sv:value>mix:lockable</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:uuid" sv:type="String">
+ <sv:value>69b042c5-5a51-4843-a3e3-9ea4a21e2a12</sv:value>
+ </sv:property>
+ <sv:property sv:name="controlType" sv:type="String">
+ <sv:value>fckEdit</sv:value>
+ </sv:property>
+ <sv:property sv:name="icon" sv:type="String">
+ <sv:value>/.resources/contextmenu/css/images/menu-description.png</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:createdBy" sv:type="String">
+ <sv:value>admin</sv:value>
+ </sv:property>
+ <sv:property sv:name="text" sv:type="String">
+ <sv:value>Edit description</sv:value>
+ </sv:property>
+ <sv:node sv:name="MetaData">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:metaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:createdBy" sv:type="String">
+ <sv:value>admin</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activated" sv:type="Boolean">
+ <sv:value>false</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:authorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:creationdate" sv:type="Date">
+ <sv:value>2010-05-18T18:22:45.406+02:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastmodified" sv:type="Date">
+ <sv:value>2013-09-17T14:14:20.015+02:00</sv:value>
+ </sv:property>
+ </sv:node>
+ </sv:node>
+ <sv:node sv:name="help">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:contentNode</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:mixinTypes" sv:type="Name" sv:multiple="true">
+ <sv:value>mix:lockable</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:uuid" sv:type="String">
+ <sv:value>da3a489f-06d9-4393-86b2-9452b4bde691</sv:value>
+ </sv:property>
+ <sv:property sv:name="controlType" sv:type="String">
+ <sv:value>fckEdit</sv:value>
+ </sv:property>
+ <sv:property sv:name="icon" sv:type="String">
+ <sv:value>/.resources/contextmenu/css/images/menu-help.png</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:createdBy" sv:type="String">
+ <sv:value>admin</sv:value>
+ </sv:property>
+ <sv:property sv:name="text" sv:type="String">
+ <sv:value>Edit help</sv:value>
+ </sv:property>
+ <sv:node sv:name="MetaData">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:metaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:createdBy" sv:type="String">
+ <sv:value>admin</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activated" sv:type="Boolean">
+ <sv:value>false</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:authorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:creationdate" sv:type="Date">
+ <sv:value>2010-05-18T18:22:45.406+02:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastmodified" sv:type="Date">
+ <sv:value>2013-09-17T14:14:09.968+02:00</sv:value>
+ </sv:property>
+ </sv:node>
+ </sv:node>
+ <sv:node sv:name="move">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:contentNode</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:mixinTypes" sv:type="Name" sv:multiple="true">
+ <sv:value>mix:lockable</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:uuid" sv:type="String">
+ <sv:value>ddfc1626-d328-47e5-a501-e3cccb854081</sv:value>
+ </sv:property>
+ <sv:property sv:name="controlType" sv:type="String">
+ <sv:value>move</sv:value>
+ </sv:property>
+ <sv:property sv:name="icon" sv:type="String">
+ <sv:value>/.resources/contextmenu/css/images/menu-move.gif</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:createdBy" sv:type="String">
+ <sv:value>admin</sv:value>
+ </sv:property>
+ <sv:property sv:name="text" sv:type="String">
+ <sv:value>Move field</sv:value>
+ </sv:property>
+ <sv:node sv:name="MetaData">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:metaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:createdBy" sv:type="String">
+ <sv:value>admin</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activated" sv:type="Boolean">
+ <sv:value>false</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:authorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:creationdate" sv:type="Date">
+ <sv:value>2010-05-18T18:22:45.406+02:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastmodified" sv:type="Date">
+ <sv:value>2013-09-17T14:19:59.928+02:00</sv:value>
+ </sv:property>
+ </sv:node>
+ </sv:node>
+ </sv:node>
+</sv:node>
Added: magnoliamodules/trunk/openutils-mgnlcontextmenu/src/main/resources/mgnl-bootstrap-samples/contextmenu/config.modules.contextmenu.contextMenus.simpleForm.xml
===================================================================
--- magnoliamodules/trunk/openutils-mgnlcontextmenu/src/main/resources/mgnl-bootstrap-samples/contextmenu/config.modules.contextmenu.contextMenus.simpleForm.xml (rev 0)
+++ magnoliamodules/trunk/openutils-mgnlcontextmenu/src/main/resources/mgnl-bootstrap-samples/contextmenu/config.modules.contextmenu.contextMenus.simpleForm.xml 2013-09-17 12:24:07 UTC (rev 4317)
@@ -0,0 +1,204 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<sv:node sv:name="simpleForm" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:contentNode</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:mixinTypes" sv:type="Name" sv:multiple="true">
+ <sv:value>mix:lockable</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:uuid" sv:type="String">
+ <sv:value>dd4ec6aa-a45b-4d15-a3c6-d24a8689c546</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:createdBy" sv:type="String">
+ <sv:value>admin</sv:value>
+ </sv:property>
+ <sv:property sv:name="mouseoverClass" sv:type="String">
+ <sv:value>contextmenuOver</sv:value>
+ </sv:property>
+ <sv:property sv:name="mouseoverIcon" sv:type="String">
+ <sv:value>/.resources/contextmenu/img/rightclicktoedit.png</sv:value>
+ </sv:property>
+ <sv:node sv:name="MetaData">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:metaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:createdBy" sv:type="String">
+ <sv:value>admin</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activated" sv:type="Boolean">
+ <sv:value>false</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:authorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:creationdate" sv:type="Date">
+ <sv:value>2010-05-18T18:22:08.296+02:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastmodified" sv:type="Date">
+ <sv:value>2013-09-17T14:16:23.695+02:00</sv:value>
+ </sv:property>
+ </sv:node>
+ <sv:node sv:name="items">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:contentNode</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:mixinTypes" sv:type="Name" sv:multiple="true">
+ <sv:value>mix:lockable</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:uuid" sv:type="String">
+ <sv:value>49937044-09e6-4902-83a8-1555b8d997df</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:createdBy" sv:type="String">
+ <sv:value>admin</sv:value>
+ </sv:property>
+ <sv:node sv:name="MetaData">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:metaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:createdBy" sv:type="String">
+ <sv:value>admin</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activated" sv:type="Boolean">
+ <sv:value>false</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:authorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:creationdate" sv:type="Date">
+ <sv:value>2010-05-18T18:22:40.359+02:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastmodified" sv:type="Date">
+ <sv:value>2013-09-17T14:16:19.712+02:00</sv:value>
+ </sv:property>
+ </sv:node>
+ <sv:node sv:name="label">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:contentNode</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:mixinTypes" sv:type="Name" sv:multiple="true">
+ <sv:value>mix:lockable</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:uuid" sv:type="String">
+ <sv:value>e16bbb4a-c477-4e15-baea-9e1892535e7d</sv:value>
+ </sv:property>
+ <sv:property sv:name="controlType" sv:type="String">
+ <sv:value>edit</sv:value>
+ </sv:property>
+ <sv:property sv:name="icon" sv:type="String">
+ <sv:value>/.resources/contextmenu/css/images/menu-text.png</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:createdBy" sv:type="String">
+ <sv:value>admin</sv:value>
+ </sv:property>
+ <sv:property sv:name="text" sv:type="String">
+ <sv:value>Edit label</sv:value>
+ </sv:property>
+ <sv:node sv:name="MetaData">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:metaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:createdBy" sv:type="String">
+ <sv:value>admin</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activated" sv:type="Boolean">
+ <sv:value>false</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:authorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:creationdate" sv:type="Date">
+ <sv:value>2010-05-18T18:22:45.406+02:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastmodified" sv:type="Date">
+ <sv:value>2013-09-17T14:16:19.712+02:00</sv:value>
+ </sv:property>
+ </sv:node>
+ </sv:node>
+ <sv:node sv:name="description">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:contentNode</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:mixinTypes" sv:type="Name" sv:multiple="true">
+ <sv:value>mix:lockable</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:uuid" sv:type="String">
+ <sv:value>60e05670-07b2-4ac0-81cf-f11da06b394b</sv:value>
+ </sv:property>
+ <sv:property sv:name="controlType" sv:type="String">
+ <sv:value>fckEdit</sv:value>
+ </sv:property>
+ <sv:property sv:name="icon" sv:type="String">
+ <sv:value>/.resources/contextmenu/css/images/menu-description.png</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:createdBy" sv:type="String">
+ <sv:value>admin</sv:value>
+ </sv:property>
+ <sv:property sv:name="text" sv:type="String">
+ <sv:value>Edit description</sv:value>
+ </sv:property>
+ <sv:node sv:name="MetaData">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:metaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:createdBy" sv:type="String">
+ <sv:value>admin</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activated" sv:type="Boolean">
+ <sv:value>false</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:authorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:creationdate" sv:type="Date">
+ <sv:value>2010-05-18T18:22:45.406+02:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastmodified" sv:type="Date">
+ <sv:value>2013-09-17T14:16:19.712+02:00</sv:value>
+ </sv:property>
+ </sv:node>
+ </sv:node>
+ <sv:node sv:name="help">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:contentNode</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:mixinTypes" sv:type="Name" sv:multiple="true">
+ <sv:value>mix:lockable</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:uuid" sv:type="String">
+ <sv:value>def69d0e-9d57-40f2-b5ec-d6b741bf29d2</sv:value>
+ </sv:property>
+ <sv:property sv:name="controlType" sv:type="String">
+ <sv:value>fckEdit</sv:value>
+ </sv:property>
+ <sv:property sv:name="icon" sv:type="String">
+ <sv:value>/.resources/contextmenu/css/images/menu-help.png</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:createdBy" sv:type="String">
+ <sv:value>admin</sv:value>
+ </sv:property>
+ <sv:property sv:name="text" sv:type="String">
+ <sv:value>Edit help</sv:value>
+ </sv:property>
+ <sv:node sv:name="MetaData">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:metaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:createdBy" sv:type="String">
+ <sv:value>admin</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activated" sv:type="Boolean">
+ <sv:value>false</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:authorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:creationdate" sv:type="Date">
+ <sv:value>2010-05-18T18:22:45.406+02:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastmodified" sv:type="Date">
+ <sv:value>2013-09-17T14:16:19.712+02:00</sv:value>
+ </sv:property>
+ </sv:node>
+ </sv:node>
+ </sv:node>
+</sv:node>
Modified: magnoliamodules/trunk/openutils-mgnlcontextmenu/src/main/resources/mgnl-files/templates/samples-contextmenu/template-contextmenu.jsp
===================================================================
--- magnoliamodules/trunk/openutils-mgnlcontextmenu/src/main/resources/mgnl-files/templates/samples-contextmenu/template-contextmenu.jsp 2013-09-16 23:33:31 UTC (rev 4316)
+++ magnoliamodules/trunk/openutils-mgnlcontextmenu/src/main/resources/mgnl-files/templates/samples-contextmenu/template-contextmenu.jsp 2013-09-17 12:24:07 UTC (rev 4317)
@@ -48,15 +48,8 @@
</section>
<cms:area name="main" />
</div>
- <!-- TO BE CUSTOMIZE -->
- <jsp:include page="/templates/samples-contextmenu/page-editmenu.jsp" />
+ <!-- <jsp:include page="/templates/samples-contextmenu/page-editmenu.jsp" /> -->
${contextmenu:scripts()}
-<!-- <script type="text/javascript"> -->
-<!-- <![CDATA[ -->
-<!-- jQuery(document).ready(function() { -->
-<!-- jQuery.mgnlAddContextMenu(${contextmenu:editMessageInfosJs()}); -->
-<!-- });]]> -->
-<!-- </script> -->
<c:if test="${!empty mgnlSortLists}">
<script type="text/javascript">
<![CDATA[ jQuery(document).ready( function() {]]>
Modified: magnoliamodules/trunk/openutils-mgnlcontextmenu/src/main/resources/mgnl-resources/contextmenu/js/contextmenu-addMenu.js
===================================================================
--- magnoliamodules/trunk/openutils-mgnlcontextmenu/src/main/resources/mgnl-resources/contextmenu/js/contextmenu-addMenu.js 2013-09-16 23:33:31 UTC (rev 4316)
+++ magnoliamodules/trunk/openutils-mgnlcontextmenu/src/main/resources/mgnl-resources/contextmenu/js/contextmenu-addMenu.js 2013-09-17 12:24:07 UTC (rev 4317)
@@ -1,12 +1,33 @@
jQuery.extend({
- mgnlAddContextMenu: function( mgnlEditMessages ) {
+ mgnlAddContextMenu: function( mgnlEditMessages, mgnlContextMenuInfo ) {
+
+ jQuery.each(mgnlContextMenuInfo.menus, function(){
+ var ul = document.createElement('ul');
+ document.body.appendChild(ul);
+ jQuery(ul).attr('id', 'contextmenu-' + this.name).attr('class', 'contextMenu');
+ jQuery.each(this.items, function(){
+ var li = document.createElement('li');
+ ul.appendChild(li);
+ li.innerHTML = '<a href="#' + this.name + '" style=\"background-image: url(' + mgnlContextMenuInfo.contextPath + this.icon + ')\">' + this.text + '</a>';
+ });
+ if (this.mouseoverIcon){
+ var img = document.createElement('img');
+ jQuery(img)
+ .attr('id', 'contextmenufollow-' + this.name)
+ .attr('src', mgnlContextMenuInfo.contextPath + this.mouseoverIcon)
+ .css({ position: 'absolute', display: 'none' });
+ document.body.appendChild(img);
+ }
+ });
+
jQuery.each(mgnlEditMessages, function(id, info){
var initTrigger = function(trigger){
$(trigger).contextMenu({
- menu: (info.contextMenu || 'default') + 'ContextMenu',
+ menu: 'contextmenu-' + (info.contextMenu || 'default'),
showCallback: info.showCallback
}, function(action) {
switch (action){
+ case 'default':
case 'text':
case 'header':
mgnlOpenDialogEx(info.path,null,null,null,'website','.magnolia/dialogs/contextmenu-edit.html',null,null,null,{
@@ -63,5 +84,7 @@
initTrigger(info.parentTrigger ? el.parents(info.parentTrigger + ':first') : el);
el.data("initTrigger", initTrigger);
});
+
+
}
});
Modified: magnoliamodules/trunk/openutils-mgnlcontextmenu/src/main/resources/mgnl-resources/contextmenu/js/contextmenu-jquery.js
===================================================================
--- magnoliamodules/trunk/openutils-mgnlcontextmenu/src/main/resources/mgnl-resources/contextmenu/js/contextmenu-jquery.js 2013-09-16 23:33:31 UTC (rev 4316)
+++ magnoliamodules/trunk/openutils-mgnlcontextmenu/src/main/resources/mgnl-resources/contextmenu/js/contextmenu-jquery.js 2013-09-17 12:24:07 UTC (rev 4317)
@@ -45,6 +45,7 @@
globalEnabled: menuItem.globalEnabled
});
});
+
if (menu.mouseoverClass || menu.mouseoverIcon){
var followId = 'contextmenufollow-' + menuName;
var follow = jQuery('#' + followId);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|