Permalink
Browse files

Update popup example to load themed css

  • Loading branch information...
1 parent bcffce8 commit b0e9691671b040f4623228eea3c57266283558a6 @bentrm bentrm committed Feb 26, 2016
Showing with 7 additions and 3 deletions.
  1. +3 −0 examples/include-ext.js
  2. +4 −3 examples/popup/popup.js
@@ -67,13 +67,16 @@
rtl = rtl && rtl.toString() === 'true';
+ themeName = theme;
theme = 'ext-theme-' + theme;
packagePath = path + '/packages/' + theme + '/build/';
themePath = packagePath + 'resources/' + theme + (rtl ? '-all-rtl' : '-all');
if (includeCSS) {
document.write('<link rel="stylesheet" type="text/css" href="' +
themePath + '-debug.css"/>');
+ document.write('<link rel="stylesheet" type="text/css" href="' +
+ '/resources/css/popup-' + themeName + '.css" />');
}
document.write('<script type="text/javascript" src="' + path + '/ext-all' +
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2008-present The Open Source Geospatial Foundation
- *
+ *
* Published under the BSD license.
* See https://github.com/geoext/geoext2/blob/master/license.txt for the full
* text of the license.
@@ -44,7 +44,7 @@ Ext.onReady(function() {
"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. " +
"Lorem ipsum dolor sit amet, consectetuer adipiscing elit." +
"Lorem ipsum dolor sit amet, consectetuer adipiscing elit.";
-
+
function createPopup(feature) {
var DomQuery = GeoExt.isExt4 ? Ext.DomQuery : Ext.dom.Query,
checkConstrOpt = DomQuery.select('input[name="constrainOpt"]:checked')[0].value,
@@ -57,6 +57,7 @@ Ext.onReady(function() {
title: 'My Popup',
location: feature,
width:200,
+ padding: 3,
html: bogusMarkup,
maximizable: true,
collapsible: true,
@@ -99,7 +100,7 @@ Ext.onReady(function() {
border: false,
region: "center",
layers: [
- new OpenLayers.Layer.WMS(
+ new OpenLayers.Layer.WMS(
"OpenStreetMap WMS",
"http://ows.terrestris.de/osm/service?",
{layers: 'OSM-WMS'},

0 comments on commit b0e9691

Please sign in to comment.