Comments

davidserene’s picture

Assigned: Unassigned » davidserene
davidserene’s picture

Status: Needs work » Needs review
StatusFileSize
new6.22 KB

This patch adds the pager functionality to popups for clustered features.

batje’s picture

+++ b/behaviors/openlayers_plus_behavior_popup.css
@@ -1,23 +1,54 @@
+  /*color:#444;'*/

please no commented out code in the module. use it or dont

+++ b/behaviors/openlayers_plus_behavior_popup.css
@@ -28,35 +59,87 @@
-  letter-spacing: 0.02em;
-  font-size: 0.9em;
+letter-spacing: 0.02em;

Sure we should not use em instead of px here?

+++ b/behaviors/openlayers_plus_behavior_popup.css
@@ -28,35 +59,87 @@
+  background: url(../images/pagerPrev.png) no-repeat;  ¶

some trailing spaces (and same 4 lines later)

+++ b/behaviors/openlayers_plus_behavior_popup.js
@@ -161,13 +161,26 @@
+        text += '<ul>';
+        ¶
+        for(var y = 0; y < feature.cluster.length; y++) {
+          items[y] = [];
+          text += '<li>'+feature.cluster[y]['attributes']['body']+'</li>';
+          ¶

the empty lines contain spaces

Great work, guys! Almost there.

batje’s picture

Status: Needs review » Needs work

forgot that status update

davidserene’s picture

Status: Needs work » Needs review
StatusFileSize
new7.04 KB

This patch has updated syntax in the css that gets rid of the commented out code and trailing spaces.

batje’s picture

Status: Needs review » Needs work
+++ b/behaviors/openlayers_plus_behavior_popup.js
@@ -161,32 +160,30 @@
-    // Callback for hover state
-    // Only show tooltips on hover if the story popup is not open.
-    'over': function(feature) {
-      var context = $(feature.layer.map.div);
-      if (!$('.openlayers-popupbox.popup', context).size()) {
-        if (feature.attributes.name) {
-          var text = "<div class='openlayers-popupbox'>";
-          text += "<h2 class='popup-title'>" + feature.attributes.name + "</h2>";
-          //text += "<div class='popup-count'>" + parseInt(feature.attributes.count, 10) + "</div>";
-          text += "</div>";
-          context.append(text);
-        }
-      }
-    },

Why is the 'over' functionality removed? Sounds like a nice feature that used to be supported.

davidserene’s picture

Sorry about about that, 'Over' functionality has been replaced and an option provided in the map menu to enable and disable it.

davidserene’s picture

Status: Needs work » Fixed
davidserene’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.