Author: michiel
Date: 2010-01-07 11:51:52 +0100 (Thu, 07 Jan 2010)
New Revision: 40381
Added:
speeltuin/mihxil/portal/src/main/resources/META-INF/tags/mm/portal/page.tagx
Modified:
speeltuin/mihxil/portal/src/main/resources/META-INF/mmbase-portal.tld
speeltuin/mihxil/portal/src/main/webapp/mmbase/portal/portal.js.jsp
speeltuin/mihxil/portal/test-webapp/jetty-env.xml
Log:
added a 'page' tag
Modified: speeltuin/mihxil/portal/src/main/resources/META-INF/mmbase-portal.tld
===================================================================
--- speeltuin/mihxil/portal/src/main/resources/META-INF/mmbase-portal.tld
2010-01-07 10:46:10 UTC (rev 40380)
+++ speeltuin/mihxil/portal/src/main/resources/META-INF/mmbase-portal.tld
2010-01-07 10:51:52 UTC (rev 40381)
@@ -18,5 +18,10 @@
<path>/META-INF/tags/mm/portal/block.tagx</path>
</tag-file>
+ <tag-file>
+ <name>page</name>
+ <path>/META-INF/tags/mm/portal/page.tagx</path>
+ </tag-file>
+
</taglib>
Added:
speeltuin/mihxil/portal/src/main/resources/META-INF/tags/mm/portal/page.tagx
===================================================================
---
speeltuin/mihxil/portal/src/main/resources/META-INF/tags/mm/portal/page.tagx
(rev 0)
+++
speeltuin/mihxil/portal/src/main/resources/META-INF/tags/mm/portal/page.tagx
2010-01-07 10:51:52 UTC (rev 40381)
@@ -0,0 +1,33 @@
+<jsp:root
+ xmlns:jsp="http://java.sun.com/JSP/Page"
+ xmlns:mm="http://www.mmbase.org/mmbase-taglib-2.0"
+ xmlns:c="http://java.sun.com/jsp/jstl/core"
+ version="2.0"
+ >
+ <jsp:directive.attribute name="date" />
+ <jsp:directive.attribute name="id" required="true" type="java.lang.String"
rtexprvalue="false" />
+ <jsp:directive.variable name-from-attribute="id" alias="page"
variable-class="org.mmbase.bridge.Node" scope="AT_END" />
+
+
+ <c:choose>
+ <c:when test="${empty date}">
+ <mm:time id="now" time="now" write="false" />
+ </c:when>
+ <c:otherwise>
+ <mm:time id="now" time="${date}" write="false" />
+ </c:otherwise>
+ </c:choose>
+
+ <mm:relatednodescontainer type="pages">
+ <mm:size />
+ <mm:constraint field="online" operator="lt" value="${now}" />
+ <mm:constraint field="offline" operator="gt" value="${now}" />
+ <mm:constraint field="show" value="true" />
+ <mm:sortorder field="online" />
+ <mm:maxnumber value="1" />
+ <mm:size />
+ <mm:relatednodes>
+ <mm:node id="page" />
+ </mm:relatednodes>
+ </mm:relatednodescontainer>
+</jsp:root>
Modified: speeltuin/mihxil/portal/src/main/webapp/mmbase/portal/portal.js.jsp
===================================================================
--- speeltuin/mihxil/portal/src/main/webapp/mmbase/portal/portal.js.jsp
2010-01-07 10:46:10 UTC (rev 40380)
+++ speeltuin/mihxil/portal/src/main/webapp/mmbase/portal/portal.js.jsp
2010-01-07 10:51:52 UTC (rev 40381)
@@ -16,7 +16,7 @@
height: 0.8 * $(window).height(),
width: 0.8 * $(window).width(),
close: function() {
- $("#edit").empty();
+ $("#mm_portal_edit").empty();
$("body").trigger("mmpClosed", [self]);
}
}
@@ -27,9 +27,10 @@
MMBasePortal.prototype.init = function() {
var self = this;
- if ($("#edit").length == 0) {
- $("body").append("<div id='edit' title='<fmt:message key="edit"
/>'></div>");
- $("#edit").dialog(self.options);
+ if ($("#mm_portal_edit").length == 0) {
+ $("body").append("<div id='mm_portal_edit' title='<fmt:message
key="edit" />'></div>");
+ $("body").append("<div id='mm_portal_date' title='<fmt:message
key="date" />'><input type='string' value='now' /></div>");
+ $("#mm_portal_edit").dialog(self.options);
}
this.addLinksToEditables();
this.addLinkToBody();
@@ -68,9 +69,11 @@
$(div).append(a);
$(a).click(function() {
try {
- var iframe = $("<iframe class='mm_portal_iframe' src='" +
this.href + "'> </iframe></div>");
- $("#edit").append(iframe);
- $("#edit").dialog("open");
+
+ var ift = "<iframe class='mm_portal_iframe' src='" + this.href
+ "'> </iframe>";
+ var iframe = $(ift);
+ $("#mm_portal_edit").append(iframe);
+ $("#mm_portal_edit").dialog("open");
self.edits++;
} catch (e) {
console.log(e);
Modified: speeltuin/mihxil/portal/test-webapp/jetty-env.xml
===================================================================
--- speeltuin/mihxil/portal/test-webapp/jetty-env.xml 2010-01-07 10:46:10 UTC
(rev 40380)
+++ speeltuin/mihxil/portal/test-webapp/jetty-env.xml 2010-01-07 10:51:52 UTC
(rev 40381)
@@ -14,15 +14,15 @@
<Arg>
<Array type="java.lang.String">
<Item>src/main/webapp</Item>
- <Item>../applications/taglib/src/main/webapp</Item>
- <Item>../base-webapp/src/main/webapp</Item>
- <Item>../base-webapp/target/base-webapp-1.9-servlet25-SNAPSHOT</Item>
+ <Item>../src/main/webapp</Item>
+ <Item>/home/michiel/mmbase/9/base-webapp/src/main/webapp</Item>
+
<Item>/home/michiel/mmbase/9/base-webapp/target/base-webapp-1.9-servlet25-SNAPSHOT</Item>
+
<Item>/home/michiel/mmbase/9/applications/searchrelate/target/mmbase-searchrelate-1.9-SNAPSHOT</Item>
</Array>
</Arg>
</New>
</Set>
-->
-
<!--
When using jetty:run use an hsql database in the directory 'data'.
-->
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs