aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--templates/web/fixmystreet/alert/updates.html5
-rw-r--r--templates/web/fixmystreet/report/display.html37
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js8
3 files changed, 29 insertions, 21 deletions
diff --git a/templates/web/fixmystreet/alert/updates.html b/templates/web/fixmystreet/alert/updates.html
index 73d3727e6..2240844e4 100644
--- a/templates/web/fixmystreet/alert/updates.html
+++ b/templates/web/fixmystreet/alert/updates.html
@@ -5,6 +5,11 @@
[% INCLUDE 'errors.html' %]
+<p><a href="[% c.uri_for( '/rss', problem_id ) %]">
+ <img src="/i/feed.png" width="16" height="16" title="[% loc('RSS feed') %]" alt="[% loc('RSS feed of updates to this problem' ) %]" border="0" style="float:right">
+ </a>
+</p>
+
<p>
[% loc('Receive email when updates are left on this problem.') %]
</p>
diff --git a/templates/web/fixmystreet/report/display.html b/templates/web/fixmystreet/report/display.html
index eaaf37f9c..afb7857d0 100644
--- a/templates/web/fixmystreet/report/display.html
+++ b/templates/web/fixmystreet/report/display.html
@@ -22,9 +22,23 @@
[% INCLUDE 'report/_main.html' %]
-
-
-
+<div id="report-updates-data" class="hidden-js">
+ <form action="[% c.uri_for( '/alert/subscribe' ) %]" method="post">
+ <p><a href="[% c.uri_for( '/rss', problem.id ) %]">
+ <img src="/i/feed.png" width="16" height="16" title="[% loc('RSS feed') %]" alt="[% loc('RSS feed of updates to this problem' ) %]" border="0" style="float: right">
+ </a></p>
+ <p>[% loc('Receive email when updates are left on this problem.' ) %]</p>
+ <fieldset>
+ <label class="hidden n" for="alert_rznvy">[% loc('Your email') %]</label>
+ <div class="form-txt-submit-box">
+ <input type="email" name="rznvy" id="alert_rznvy" value="[% email | html %]" size="30" placeholder="[% loc('Your email') %]">
+ <input class="green-btn" type="submit" value="[% loc('Subscribe') %]">
+ </div>
+ <input type="hidden" name="id" value="[% problem.id %]">
+ <input type="hidden" name="type" value="updates">
+ </fieldset>
+ </form>
+</div>
<div class="shadow-wrap">
<ul id="key-tools">
@@ -32,25 +46,8 @@
<li><a rel="nofollow" id="key-tool-report-updates" class="feed" href="[% c.uri_for( '/alert/subscribe', { id => problem.id } ) %]">[% loc('Get updates' ) %]</a></li>
<li><a class="chevron" id="key-tool-problems-nearby" href="[% c.uri_for( '/around', { lat => short_latitude, lon => short_longitude } ) %]">[% loc( 'Problems nearby' ) %]</a></li>
</ul>
-</div>
-<!-- <div id="alert_links">
- <a rel="nofollow" id="email_alert" href="[% c.uri_for( '/alert/subscribe', { id => problem.id } ) %]">[% loc('Email me updates' ) %]</a>
-
- <form action="[% c.uri_for( '/alert/subscribe' ) %]" method="post" id="email_alert_box">
- <p>[% loc('Receive email when updates are left on this problem.' ) %]</p>
- <label class="n" for="alert_rznvy">[% loc('Email:') %]</label>
- <input type="email" name="rznvy" id="alert_rznvy" value="[% email | html %]" size="30">
- <input type="hidden" name="id" value="[% problem.id %]">
- <input type="hidden" name="type" value="updates">
- <input type="submit" value="[% loc('Subscribe') %]">
- </form>
- &nbsp;
- <a href="[% c.uri_for( '/rss', problem.id ) %]">
- <img src="/i/feed.png" width="16" height="16" title="[% loc('RSS feed') %]" alt="[% loc('RSS feed of updates to this problem' ) %]" border="0" style="vertical-align: middle">
- </a>
</div>
- -->
[% INCLUDE 'report/updates.html' %]
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js
index 073e942da..1d18b4d98 100644
--- a/web/cobrands/fixmystreet/fixmystreet.js
+++ b/web/cobrands/fixmystreet/fixmystreet.js
@@ -377,9 +377,14 @@ $.fn.drawer = function(id, ajax) {
if (!d.length) {
d = $('<div id="' + id + '">');
}
+ var max_height = $(window).height() - $('.content').offset().top - $('.shadow-wrap').height();
+ var height = d.height();
+ if (!height || height > max_height) {
+ height = max_height;
+ }
d.css({
backgroundColor: 'white',
- height: $(window).height() - $('.content').offset().top - $('.shadow-wrap').height(),
+ height: height,
display: 'none', zIndex: 1001, position: 'relative',
overflow: 'auto',
padding: '1em'
@@ -402,6 +407,7 @@ $.fn.drawer = function(id, ajax) {
$('#key-tool-wards').drawer('council_wards', false);
$('#key-tool-around-updates').drawer('updates_ajax', true);
+ $('#key-tool-report-updates').drawer('report-updates-data', false);
// Go directly to RSS feed if RSS button clicked on alert page
// (due to not wanting around form to submit, though good thing anyway)