Skip to content

Commit d3f864f

Browse files
author
Koen Deforche
committed
see Changelog
1 parent e3b9e9b commit d3f864f

File tree

3 files changed

+30
-9
lines changed

3 files changed

+30
-9
lines changed

examples/charts/ChartsExample.C

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ CategoryExample::CategoryExample(Wt::WContainerWidget *parent):
101101
table->setModel(model);
102102
table->setSortingEnabled(true);
103103
table->setColumnResizeEnabled(true);
104-
table->setSelectionMode(NoSelection);
104+
// table->setSelectionMode(ExtendedSelection);
105105
table->setAlternatingRowColors(true);
106106
table->setColumnAlignment(0, AlignCenter);
107107
table->setHeaderAlignment(0, AlignCenter);
@@ -131,6 +131,7 @@ CategoryExample::CategoryExample(Wt::WContainerWidget *parent):
131131
* Create the category chart.
132132
*/
133133
WCartesianChart *chart = new WCartesianChart(this);
134+
chart->setPreferredMethod(WPaintedWidget::PngImage);
134135
chart->setModel(model); // set the model
135136
chart->setXSeriesColumn(0); // set the column that holds the categories
136137
chart->setLegendEnabled(true); // enable the legend
@@ -218,7 +219,7 @@ TimeSeriesExample::TimeSeriesExample(Wt::WContainerWidget *parent):
218219
* Create the scatter plot.
219220
*/
220221
WCartesianChart *chart = new WCartesianChart(this);
221-
//chart->setPreferredMethod(WPaintedWidget::InlineSvgVml);
222+
//chart->setPreferredMethod(WPaintedWidget::PngImage);
222223
//chart->setBackground(gray);
223224
chart->setModel(model); // set the model
224225
chart->setXSeriesColumn(0); // set the column that holds the X data

src/web/WebRenderer.C

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1426,13 +1426,15 @@ std::string WebRenderer::headDeclarations() const
14261426
"type=\"image/vnd.microsoft.icon\" "
14271427
"href=\"" << session_.favicon() << (xhtml ? "\"/>" : "\">");
14281428

1429-
/*
1430-
* FIXME: make this work on IE too. Perhaps we really need to add the
1431-
* host name (lynx complains too) ? -- oh dear !
1432-
*/
1433-
if (!session_.env().agentIsIE())
1434-
result << "<base href=\"" << session_.deploymentPath()
1435-
<< (xhtml ? "\"/>" : "\">");
1429+
#ifndef WT_TARGET_JAVA
1430+
std::string baseUrl;
1431+
WApplication::readConfigurationProperty("baseURL", baseUrl);
1432+
#else
1433+
std::string baseUrl = WApplication::readConfigurationProperty("base-url", "");
1434+
#endif // WT_TARGET_JAVA
1435+
1436+
if (!baseUrl.empty())
1437+
result << "<base href=\"" << baseUrl << (xhtml ? "\"/>" : "\">");
14361438

14371439
return result.str();
14381440
}

wt_config.xml.in

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,24 @@
400400
that may or may not be shared between several applications.
401401
-->
402402
<properties>
403+
<!-- baseURL property
404+
405+
The absolute URL at which the application is deployed
406+
(known to the user). This may be a reverse-proxified URL
407+
when the app is deployed behind a reverse proxy. This is
408+
set as base URL in the HTML so that relative URLs (to e.g.
409+
css, images, etc...) work correctly regardless of the
410+
internal path.
411+
412+
Eg. "http://www.webtoolkit.eu/"
413+
414+
The default value is empty, in which case the base URL is
415+
explicitly set. Note that for most applications (which do
416+
not use internal paths and rely on relative URls) this is
417+
fine.
418+
-->
419+
<property name="baseURL"></property>
420+
403421
<!-- resourcesURL property
404422

405423
The URL at which the resources/ folder is deploeyd that

0 commit comments

Comments
 (0)