cross
Foswiki General Assembly will be held on 28th November 2019, 1200 UTC on Freenode IRC channel #foswiki-association. See AgendaTenthGeneralAssembly
You are here: Foswiki>Tasks Web>Item13522 (30 Sep 2019, MichaelDaum)Edit Attach

Item13522: Site BROADCAST message should be closable, hide it once a user acknowledges it.

pencil
Priority: Enhancement
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Engine
Component: FoswikiTemplates
Branches:
Reported By: GeorgeClark
Waiting For:
Last Change By: MichaelDaum
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

 

ItemTemplate edit

Summary Site BROADCAST message should be closable, hide it once a user acknowledges it.
ReportedBy GeorgeClark
Codebase 2.0.0
SVN Range
AppliesTo Engine
Component FoswikiTemplates
Priority Enhancement
CurrentState Closed
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release02x01Checkins
Release02x00Checkins
Release01x01Checkins
Topic revision: r4 - 30 Sep 2019, MichaelDaum - This page was cached on 20 Nov 2019 - 10:34.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy