aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2012-03-13 00:46:06 +0000
committerMatthew Somerville <matthew@mysociety.org>2012-03-13 00:46:06 +0000
commite969202aee6953ab5d8fcf6d075249109352d97e (patch)
tree0de3b06c6c25cde7c0b9227f91b16413db7c05e1
parent500d5f63a85b81db8efe9fbfae3c093c2f0356a8 (diff)
.data() doesn't appear to work here in Firefox 3.6 (though does in the other place it's used, sigh), so set our own variable instead. Set gallery of all images, typo.
-rw-r--r--templates/web/fixmystreet/report/new/fill_in_details_text.html10
-rw-r--r--templates/web/fixmystreet/report/photo.html2
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js10
-rw-r--r--web/js/map-OpenLayers.js4
4 files changed, 16 insertions, 10 deletions
diff --git a/templates/web/fixmystreet/report/new/fill_in_details_text.html b/templates/web/fixmystreet/report/new/fill_in_details_text.html
index 4838168ee..8b5e3a2ad 100644
--- a/templates/web/fixmystreet/report/new/fill_in_details_text.html
+++ b/templates/web/fixmystreet/report/new/fill_in_details_text.html
@@ -1,13 +1,13 @@
[%
IF area_ids_to_list.size != 0;
- loc('Please fill in details of the problem below. The council won\'t be able
-to help unless you leave as much detail as you can, so please describe the exact location of
-the problem (e.g. on a wall), what it is, how long it has been there, a description (and a
-photo of the problem if you have one), etc.');
+ loc('The council won&rsquo;t be able to help unless you leave as much
+detail as you can. Please describe the exact location of the problem (e.g. on a
+wall), what it is, how long it has been there, a description (and a photo of
+the problem if you have one), etc.');
IF category_extras;
' ' _ loc('Some categories may require additional information.');
END;
ELSE;
loc('Please fill in details of the problem below.');
END;
-%] \ No newline at end of file
+%]
diff --git a/templates/web/fixmystreet/report/photo.html b/templates/web/fixmystreet/report/photo.html
index c78f76e2f..a7761a721 100644
--- a/templates/web/fixmystreet/report/photo.html
+++ b/templates/web/fixmystreet/report/photo.html
@@ -1,7 +1,7 @@
[% IF c.cobrand.allow_photo_display && object.photo %]
[% photo = object.get_photo_params %]
<div class="update-img">
- [% IF photo.url_full %]<a href="[% photo.url_full %]" class="fancy-image">[% END
+ [% IF photo.url_full %]<a href="[% photo.url_full %]" rel="fancy">[% END
%]<img alt="Photo of this report" [% IF photo.height %]height="[% photo.height %]" width="[% photo.width %]"[% END %] src="[% photo.url %]">
[%- IF photo.url_full %]</a>[% END %]
</div>
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js
index 173c247c3..324915e16 100644
--- a/web/cobrands/fixmystreet/fixmystreet.js
+++ b/web/cobrands/fixmystreet/fixmystreet.js
@@ -119,7 +119,10 @@ $(function(){
top: 0, left: 0, right: 0, bottom: 0,
width: '100%', height: map_height,
margin: 0
- }).data('size', 'full');
+ });
+ if (typeof fixmystreet !== 'undefined') {
+ fixmystreet.state_map = 'full';
+ }
}
//heightfix the desktop .content div
@@ -527,7 +530,10 @@ $.fn.drawer = function(id, ajax) {
/*
* Fancybox fullscreen images
*/
- $('.fancy-image').fancybox();
+ $('a[rel=fancy]').fancybox({
+ 'overlayColor': '#000000'
+ });
+
});
/*
diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js
index 2978bf7fe..6ffcb5c1d 100644
--- a/web/js/map-OpenLayers.js
+++ b/web/js/map-OpenLayers.js
@@ -227,7 +227,7 @@ $(function(){
fixmystreet.map.setCenter(centre, fixmystreet.zoom || 3);
}
- if ($('#map_box').data('size')=='full') {
+ if (fixmystreet.state_map && fixmystreet.state_map == 'full') {
// TODO Work better with window resizing, this is pretty 'set up' only at present
var q = $(window).width() / 4;
// Need to try and fake the 'centre' being 75% from the left
@@ -445,7 +445,7 @@ OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, {
document.getElementById('side-form').style.display = 'block';
}
$('#side').hide();
- if (typeof heightFix !== undefined) {
+ if (typeof heightFix !== 'undefined') {
heightFix('#report-a-problem-sidebar', '.content', 26);
}