Item13522: Site BROADCAST message should be closable, hide it once a user acknowledges it.
Priority: Enhancement
Current State: Closed
Released In: n/a
Target Release: n/a
Summary says it. The Broadcast message is clutter and in the way once a user has seen it.
diff --git a/core/templates/foswiki.tmpl b/core/templates/foswiki.tmpl
index 9f4264b..ca7b25a 100644
--- a/core/templates/foswiki.tmpl
+++ b/core/templates/foswiki.tmpl
@@ -74,7 +74,7 @@ but may be used in derived templates.
---------------------------------------------------
}%%TMPL:DEF{"broadcastmessage"}%%IF{"defined FOSWIKI_BROADCAST and $FOSWIKI_BROADCAST != ''" then="$percntTMPL:P{$quotbroadcastmessage:system$quot}$percnt"}%%IF{"defined BROADCASTMESSAGE and $BROADCASTMESSAGE != ''" then="$percntTMPL:P{$quotbroadcastmessage:contents$quot}$percnt"}%%TMPL:END%%{
---------------------------------------------------
-}%%TMPL:DEF{"broadcastmessage:contents"}%<div class="foswikiBroadcastMessage"> %BROADCASTMESSAGE% </div>%TMPL:END%%{
+}%%TMPL:DEF{"broadcastmessage:contents"}%%TWISTY{ id="%BROADCASTID%" class="foswikiBroadcastMessage" showlink="" hidelink="<span class='ui-icon ui-icon-closethick'></span>" remember="on" firststart="show" }% %BROADCASTMESSAGE% %ENDTWISTY%%TMPL:END%%{
}%%TMPL:DEF{"broadcastmessage:system"}%<div class="foswikiAlert"> %FOSWIKI_BROADCAST% </div>%TMPL:END%%{
---------------------------------------------------
}%%TMPL:DEF{"attachments"}%%TMPL:END%%{
This adds a new setting BROADCASTID ... the twisty remembers the state of any unique ID. To publish a new message, need to set BROADCASTMESSAGE and also increment the BROADCASTID
--
GeorgeClark - 14 Jul 2015
This is implemented on foswiki.org using a template override:
foswiki.fo.template
. Do we want to make this a default behavior?
--
GeorgeClark - 25 Sep 2016
Sure, looks useful.
--
Main.CrawfordCurrie - 08 Jan 2017 - 16:59