aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Whiteland <dave@mysociety.org>2012-11-15 01:54:31 +0000
committerDave Whiteland <dave@mysociety.org>2012-11-15 01:54:31 +0000
commit8d9f1dead28ca5f676cefa0d9a64de48a75be703 (patch)
tree88a4c8427fc11fad5e939eda38ff8eb651ef060c
parentcc8d957e65e361ed49705816b8b2300c341b2373 (diff)
fixed hiding bug; missing the hide-submit code (dunno where that went) but also, for now, suppressed the dummy_busy lock (see comments)
-rw-r--r--templates/web/fixmybarangay/report/_message_manager.html18
1 files changed, 18 insertions, 0 deletions
diff --git a/templates/web/fixmybarangay/report/_message_manager.html b/templates/web/fixmybarangay/report/_message_manager.html
index 0fa2adff7..8ca1cf7d4 100644
--- a/templates/web/fixmybarangay/report/_message_manager.html
+++ b/templates/web/fixmybarangay/report/_message_manager.html
@@ -134,6 +134,7 @@ $(document).ready(function() {
}
var dummy_hide_cleanup = function(data) {
+ $('#reason_text').val('');
dummy_busy = false;
}
@@ -176,6 +177,9 @@ $(document).ready(function() {
$('#reply-submit').click(function(e) {
e.preventDefault();
+ // TODO: pending fancybox callbacks working, force dummy_busy here
+ // this is possibly overly cautious anyway
+ dummy_busy = false;
if (! dummy_busy) {
dummy_busy = true;
message_manager.reply(
@@ -184,6 +188,20 @@ $(document).ready(function() {
{callback:dummy_reply_cleanup});
}
});
+
+ $('#hide-submit').click(function(e) {
+ e.preventDefault();
+ // TODO: pending fancybox callbacks working, force dummy_busy here
+ // this is possibly overly cautious anyway
+ dummy_busy = false;
+ if (! dummy_busy) {
+ dummy_busy = true;
+ message_manager.hide(
+ $('#hide_msg_id').val(),
+ $('#reason_text').val(),
+ {callback:dummy_hide_cleanup});
+ }
+ });
$("a#reply").fancybox({onClosed: function(){dummy_busy=false;}});