[Commits] r2021 - in core/trunk/geoext: examples lib/GeoExt/widgets tests/lib/GeoExt/widgets
commits at geoext.org
commits at geoext.org
Mon Mar 22 21:27:28 CET 2010
Author: ahocevar
Date: 2010-03-22 21:27:28 +0100 (Mon, 22 Mar 2010)
New Revision: 2021
Modified:
core/trunk/geoext/examples/popup.js
core/trunk/geoext/lib/GeoExt/widgets/Popup.js
core/trunk/geoext/tests/lib/GeoExt/widgets/Popup.html
Log:
made popup maximizable. r=tschaub (closes #179)
Modified: core/trunk/geoext/examples/popup.js
===================================================================
--- core/trunk/geoext/examples/popup.js 2010-03-22 20:25:35 UTC (rev 2020)
+++ core/trunk/geoext/examples/popup.js 2010-03-22 20:27:28 UTC (rev 2021)
@@ -35,6 +35,7 @@
feature: feature,
width:200,
html: bogusMarkup,
+ maximizable: true,
collapsible: true
});
// unselect feature when the popup
Modified: core/trunk/geoext/lib/GeoExt/widgets/Popup.js
===================================================================
--- core/trunk/geoext/lib/GeoExt/widgets/Popup.js 2010-03-22 20:25:35 UTC (rev 2020)
+++ core/trunk/geoext/lib/GeoExt/widgets/Popup.js 2010-03-22 20:27:28 UTC (rev 2021)
@@ -176,6 +176,16 @@
}
},
+ /** private: method[maximize]
+ * Override.
+ */
+ maximize: function() {
+ if(!this.maximized && this.anc) {
+ this.unanchorPopup();
+ }
+ GeoExt.Popup.superclass.maximize.apply(this, arguments);
+ },
+
/** api: method[setSize]
* :param w: ``Integer``
* :param h: ``Integer``
Modified: core/trunk/geoext/tests/lib/GeoExt/widgets/Popup.html
===================================================================
--- core/trunk/geoext/tests/lib/GeoExt/widgets/Popup.html 2010-03-22 20:25:35 UTC (rev 2020)
+++ core/trunk/geoext/tests/lib/GeoExt/widgets/Popup.html 2010-03-22 20:27:28 UTC (rev 2021)
@@ -164,6 +164,23 @@
}
+ function test_maximize(t) {
+ t.plan(2);
+
+ var context = setupContext();
+
+ var pop = popup(context.feature, context.mapPanel);
+
+ pop.show();
+
+ pop.maximize();
+ t.ok(!pop.anc, "Anchor element removed");
+ t.ok(pop.maximized, "Popup is maximized");
+
+ tearDown(context);
+
+ }
+
function test_Popup_destroy(t){
t.plan(1);
More information about the Commits
mailing list