[opencms-dev] ${cms.enableReload} erases elements (Clement)

Clement Wee clement at elixirtech.com
Fri Mar 10 12:08:32 CET 2017


Hi Tobias,

Yes, it does.

Here is the formatter, for your reference:

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<cms:formatter var="content" val="chart">
<div class="margin-bottom-30">
<c:set var="svg" value="img-${cms.element.id}"/>
<div id="${svg}">
</div>
<script>
Highcharts.chart('${svg}', {
chart: {
type: 'bar',
width: ${chart.Width},
height: ${chart.Height}
},
title: {
text: '${chart.Title}'
},
subtitle: {
text: 'Source: <a href="https://en.wikipedia.org/wiki/World_population
">Wikipedia.org</a>'
},
xAxis: {
categories: ['Africa', 'America', 'Asia', 'Europe', 'Oceania'],
title: {
text: '${chart.YAxisTitle}'
}
},
yAxis: {
min: 0,
title: {
text: '${chart.YAxisTitle}',
align: 'high'
},
labels: {
overflow: 'justify'
}
},
tooltip: {
valueSuffix: ''
},
plotOptions: {
bar: {
dataLabels: {
enabled: true
}
},
series: {
cursor: 'pointer',
events: {
mouseover: function () {
console.log(this);
var chart = this.series.chart;
this.options.color = "${chart.SelectedColor}";
this.update(this.options);
},
mouseout: function(){
console.log(this);
this.options.color = "${chart.Color}";
this.update(this.options);
}
}
}
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: -40,
y: 80,
floating: true,
borderWidth: 1,
backgroundColor: '#FFFFFF',
shadow: true
},
credits: {
enabled: false
},
series: [{
color: "${chart.Color}",
name: 'Year 1800',
data: [107, 31, 635, 203, 2]
}, {
color: "${chart.Color}",
name: 'Year 1900',
data: [133, 156, 947, 408, 6]
}, {
color: "${chart.Color}",
name: 'Year 2012',
data: [1052, 954, 4250, 740, 38]
}]
});
</script>
</div> Is there sth else I missed out in the formatter? Regards,
Clement

On Fri, Mar 10, 2017 at 7:00 PM, <opencms-dev-request at opencms.org> wrote:

> Send opencms-dev mailing list submissions to
>         opencms-dev at opencms.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev
> or, via email, send a message with subject or body 'help' to
>         opencms-dev-request at opencms.org
>
> You can reach the person managing the list at
>         opencms-dev-owner at opencms.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of opencms-dev digest..."
>
>
> Today's Topics:
>
>    1. Re: ${cms.enableReload} erases elements (Clement) (Tobias Karrer)
>    2. OpenCMS 10.5.1 - Apollo Demo multi column blog output (Arno Nym)
>    3. Re: OpenCMS 10.5.1 - Apollo Demo multi column blog output
>       (Alex Kandzior)
>    4. Re: OpenCMS 10.5.1 - Apollo Demo multi column blog output
>       (Arno Nym)
>    5. Re: OpenCMS 10.5.1 - Apollo Demo multi column blog output
>       (Alex Kandzior)
>    6. Re: OpenCMS 10.5.1 - Apollo Demo multi column blog output
>       (Arno Nym)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 9 Mar 2017 12:19:12 +0000
> From: Tobias Karrer <kartobi at gmail.com>
> To: The OpenCms mailing list <opencms-dev at opencms.org>
> Subject: Re: [opencms-dev] ${cms.enableReload} erases elements
>         (Clement)
> Message-ID: <8edad072-9ec9-bb35-62e0-750ade81c234 at gmail.com>
> Content-Type: text/plain; charset="windows-1252"; Format="flowed"
>
> Had you checked, that your formatter jsp only have on outer wrapper
> element, e.g. a <div> wrapping all markup?
>
>
> Am 07.03.2017 um 12:22 schrieb Clement Wee:
> > Hi Tobias,
> >
> > I dragged the standard Content Section element, followed by my own
> > custom element (the one with ${cms.enableReload}).
> >
> > My own custom element basically has one div and a script that calls
> > code to create a HighCharts chart. For purposes, I am simply using the
> > sample demo Bar Chart, with the chart.title replaced by
> > "${content.value.Title}".
> >
> > The navigation did not disappear, but it is always hidden by the
> > editor pane, so I can't see it.
> >
> > Can you help?
> >
> > Regards,
> > Clement
> >
> >
> > _______________________________________________
> > This mail is sent to you from the opencms-dev mailing list
> > To change your list options, or to unsubscribe from the list, please
> visit
> > http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev
> >
> >
> >
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.opencms.org/pipermail/opencms-dev/
> attachments/20170309/b5ec4d5d/attachment-0001.html>
>
> ------------------------------
>
> Message: 2
> Date: Thu, 9 Mar 2017 13:38:07 +0100
> From: "Arno Nym" <matzabweb at web.de>
> To: "Open CMS" <opencms-dev at opencms.org>
> Subject: [opencms-dev] OpenCMS 10.5.1 - Apollo Demo multi column blog
>         output
> Message-ID:
>         <trinity-dd9c653f-6c00-4e6d-9c78-c9434235b601-
> 1489063087481 at 3capp-webde-bs54>
>
> Content-Type: text/plain; charset="us-ascii"
>
> An HTML attachment was scrubbed...
> URL: <http://lists.opencms.org/pipermail/opencms-dev/
> attachments/20170309/a0791cc2/attachment-0001.html>
>
> ------------------------------
>
> Message: 3
> Date: Thu, 9 Mar 2017 13:59:25 +0100
> From: Alex Kandzior <alex at opencms.org>
> To: The OpenCms mailing list <opencms-dev at opencms.org>
> Subject: Re: [opencms-dev] OpenCMS 10.5.1 - Apollo Demo multi column
>         blog output
> Message-ID: <DDD2A67A-6020-4DBA-9ED0-8533E0A1CB9D at opencms.org>
> Content-Type: text/plain; charset="us-ascii"
>
> Arno,
>
> What you could do:
>
> * You need a new formatter for this. You may just copy the
> "blog-teaser-elaborate" formatter JSP and XML definition, and call this
> e.g. "blog-tile-teaser".
> * These are in /system/modules/org.opencms.apollo/formatters/.
> * Make sure to update the reference in the  XML to point to the copied JSP.
> * Then you need to modify the HTML in the "blog-tile-teaser.sjp"formatter.
> I suggest using the "tile" structure like so:
>
> <div class="ap-tile tile-sm-6 tile-md-4 tile-lg-3">
>     <!-- your HTML for the content here --!>
> </div>
>
> * As you can see the tile breakpoints are similar to standard bootstrap.
> * If you want multiple lines you must add some classes to ensure the
> height of the tiles is equal.
>
> HTH
>
> Kind regards,
> Alex.
>
> -------------------
> Alexander Kandzior
>
> Alkacon Software - The OpenCms Experts
> http://www.alkacon.com - http://www.opencms.org
>
>
>
> > Am 09.03.2017 um 13:38 schrieb Arno Nym <matzabweb at web.de>:
> >
> > Hi,
> > in the blog survey of the Apollo demo the blog-entries are dynamically
> listed in one column: Is there a quick way to show the blog entries in a
> multi column way, for example 3 columns (=> 3 blog entries from the same
> list) per line?
> > The pictures should then be smaller and there should be less text output
> per blog entry.
> >
> > Thank you
> > Arno
> > _______________________________________________
> > This mail is sent to you from the opencms-dev mailing list
> > To change your list options, or to unsubscribe from the list, please
> visit
> > http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev
> >
> >
> >
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.opencms.org/pipermail/opencms-dev/
> attachments/20170309/12bf21fb/attachment-0001.html>
>
> ------------------------------
>
> Message: 4
> Date: Thu, 9 Mar 2017 15:45:03 +0100
> From: "Arno Nym" <matzabweb at web.de>
> To: opencms-dev at opencms.org
> Subject: Re: [opencms-dev] OpenCMS 10.5.1 - Apollo Demo multi column
>         blog output
> Message-ID:
>         <trinity-97a3eef9-cd46-4be1-9107-bea0d939d83d-
> 1489070703400 at 3capp-webde-bs54>
>
> Content-Type: text/plain; charset="us-ascii"
>
> An HTML attachment was scrubbed...
> URL: <http://lists.opencms.org/pipermail/opencms-dev/
> attachments/20170309/9b43d16c/attachment-0001.html>
>
> ------------------------------
>
> Message: 5
> Date: Thu, 9 Mar 2017 16:08:41 +0100
> From: Alex Kandzior <alex at opencms.org>
> To: The OpenCms mailing list <opencms-dev at opencms.org>
> Subject: Re: [opencms-dev] OpenCMS 10.5.1 - Apollo Demo multi column
>         blog output
> Message-ID: <67C804A6-715B-49FA-9949-BEFF927C107E at opencms.org>
> Content-Type: text/plain; charset="utf-8"
>
> Arno,
>
> You need to get the HTML structure right.
>
> Do not replace the exiting <div class="row...">.
>
> Instead, wrap the  <div class="row..."> with something like <div
> class="ap-tile tile-sm-6 tile-md-4 tile-lg-3" style="min-height: 450px">.
>
> This works for me.
>
> Make sure your list actually uses the new formatter.
>
> Kind regards,
> Alex.
>
> -------------------
> Alexander Kandzior
>
> Alkacon Software - The OpenCms Experts
> http://www.alkacon.com - http://www.opencms.org
>
>
>
> > Am 09.03.2017 um 15:45 schrieb Arno Nym <matzabweb at web.de>:
> >
> > Hi Alex,
> > thank you for the tipp: Do you tried it, too? I have made the changes
> and i changed the "blog-teaser-elaborate" formatter to the new
> "blog-tile-teaser" in apollo-demo => element-pages => blog-article => form
> editor, but the output doesn't change.
> >
> > In blog-tile-teaser.jsp i replaced this line:
> >
> > <div class="row ap-teaser ap-blog-teaser ${animationClass}${'
> '}${cms.element.settings.cssWrapper}">
> >
> > with your "<div class" - line: The rest i left so.
> >
> > I thought that i have to add " Row 3 Cols (4 - 4 - 4) - c1 " container
> or something like that?
> >
> > Thank you
> > A.
> >
> > Gesendet: Donnerstag, 09. M?rz 2017 um 13:59 Uhr
> > Von: "Alex Kandzior" <alex at opencms.org>
> > An: "The OpenCms mailing list" <opencms-dev at opencms.org>
> > Betreff: Re: [opencms-dev] OpenCMS 10.5.1 - Apollo Demo multi column
> blog output
> > Arno,
> >
> > What you could do:
> >
> > * You need a new formatter for this. You may just copy the
> "blog-teaser-elaborate" formatter JSP and XML definition, and call this
> e.g. "blog-tile-teaser".
> > * These are in /system/modules/org.opencms.apollo/formatters/.
> > * Make sure to update the reference in the  XML to point to the copied
> JSP.
> > * Then you need to modify the HTML in the "blog-tile-teaser.sjp"formatter.
> I suggest using the "tile" structure like so:
> >
> > <div class="ap-tile tile-sm-6 tile-md-4 tile-lg-3">
> >     <!-- your HTML for the content here --!>
> > </div>
> >
> > * As you can see the tile breakpoints are similar to standard bootstrap.
> > * If you want multiple lines you must add some classes to ensure the
> height of the tiles is equal.
> >
> > HTH
> >
> > Kind regards,
> > Alex.
> >
> > -------------------
> > Alexander Kandzior
> >
> > Alkacon Software - The OpenCms Experts
> > http://www.alkacon.com <http://www.alkacon.com/> -
> http://www.opencms.org <http://www.opencms.org/>
> >
> >
> >
> > Am 09.03.2017 um 13:38 schrieb Arno Nym <matzabweb at web.de <mailto:
> matzabweb at web.de>>:
> >
> > Hi,
> > in the blog survey of the Apollo demo the blog-entries are dynamically
> listed in one column: Is there a quick way to show the blog entries in a
> multi column way, for example 3 columns (=> 3 blog entries from the same
> list) per line?
> > The pictures should then be smaller and there should be less text output
> per blog entry.
> >
> > Thank you
> > Arno
> > _______________________________________________
> > This mail is sent to you from the opencms-dev mailing list
> > To change your list options, or to unsubscribe from the list, please
> visit
> > http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev <
> http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev>
> >
> >
> >
> > _______________________________________________ This mail is sent to
> you from the opencms-dev mailing list To change your list options, or to
> unsubscribe from the list, please visit http://lists.opencms.org/cgi-
> bin/mailman/listinfo/opencms-dev <http://lists.opencms.org/cgi-
> bin/mailman/listinfo/opencms-dev>__________________________
> _____________________
> > This mail is sent to you from the opencms-dev mailing list
> > To change your list options, or to unsubscribe from the list, please
> visit
> > http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev
> >
> >
> >
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.opencms.org/pipermail/opencms-dev/
> attachments/20170309/0ab92c57/attachment-0001.html>
>
> ------------------------------
>
> Message: 6
> Date: Thu, 9 Mar 2017 16:43:45 +0100
> From: "Arno Nym" <matzabweb at web.de>
> To: opencms-dev at opencms.org
> Subject: Re: [opencms-dev] OpenCMS 10.5.1 - Apollo Demo multi column
>         blog output
> Message-ID:
>         <trinity-105d3dac-c0eb-4ea8-a4b7-0f62a3243d58-
> 1489074225011 at 3capp-webde-bs54>
>
> Content-Type: text/plain; charset="us-ascii"
>
> An HTML attachment was scrubbed...
> URL: <http://lists.opencms.org/pipermail/opencms-dev/
> attachments/20170309/19ecd60f/attachment-0001.html>
>
> ------------------------------
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev
>
> End of opencms-dev Digest, Vol 279, Issue 5
> *******************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20170310/5b1d7e64/attachment.htm>


More information about the opencms-dev mailing list