Bug 955312 - Add date to message tooltips. r=clokep a=aleth on CLOSED TREE
--HG-- extra : amend_source : 6008026fd86b9d13f405153063286cce501b29f9
This commit is contained in:
Родитель
911ea6b1b7
Коммит
978ceeb590
|
@ -41,6 +41,10 @@ XPCOMUtils.defineLazyGetter(this, "TXTToHTML", function() {
|
|||
return function(aTXT) cs.scanTXT(aTXT, cs.kEntities);
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetter(this, "ScriptableDateFormat",
|
||||
"@mozilla.org/intl/scriptabledateformat;1",
|
||||
"nsIScriptableDateFormat");
|
||||
|
||||
var gCurrentTheme = null;
|
||||
|
||||
function getChromeFile(aURI)
|
||||
|
@ -353,6 +357,14 @@ const statusMessageReplacements = {
|
|||
},
|
||||
timestamp: function(aMsg) aMsg.time,
|
||||
shortTime: function(aMsg) (new Date(aMsg.time * 1000)).toLocaleTimeString(),
|
||||
datetime: function(aMsg) {
|
||||
let date = new Date(aMsg.time * 1000);
|
||||
let sdf = ScriptableDateFormat;
|
||||
return sdf.FormatDateTime("", sdf.dateFormatShort,
|
||||
sdf.timeFormatNoSeconds, date.getFullYear(),
|
||||
date.getMonth() + 1, date.getDate(),
|
||||
date.getHours(), date.getMinutes(), 0);
|
||||
},
|
||||
messageClasses: function(aMsg) {
|
||||
let msgClass = [];
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div class="bubble %messageClasses%" senderColor="%senderColor%">
|
||||
<div class="indicator">
|
||||
<p class="pseudo">%sender%<span class="time"> - %time{%H:%M}%</span></p>
|
||||
<p class="%messageClasses%" title="%time%">%message%</p>
|
||||
<p class="%messageClasses%" title="%datetime%">%message%</p>
|
||||
<div id="insert"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div class="bubble context %messageClasses%" senderColor="%senderColor%">
|
||||
<div class="indicator">
|
||||
<p class="pseudo">%sender%<span class="time"> - %time{%H:%M}%</span></p>
|
||||
<p class="%messageClasses%" title="%time%">%message%</p>
|
||||
<p class="%messageClasses%" title="%datetime%">%message%</p>
|
||||
<div id="insert"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<hr/>
|
||||
<p class="%messageClasses%" title="%time%">%message%</p>
|
||||
<p class="%messageClasses%" title="%datetime%">%message%</p>
|
||||
<div id="insert"></div>
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
<p class="%messageClasses%" title="%time%" senderColor="%senderColor%"><span class="pseudo">%sender%</span> <span class="message-style">%message%</span></p>
|
||||
<p class="%messageClasses%" title="%datetime%" senderColor="%senderColor%"><span class="pseudo">%sender%</span> <span class="message-style">%message%</span></p>
|
||||
<div id="insert"/>
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
<p class="context %messageClasses%" title="%time%" senderColor="%senderColor%"><span class="pseudo">%sender%</span> <span class="message-style">%message%</span></p>
|
||||
<p class="context %messageClasses%" title="%datetime%" senderColor="%senderColor%"><span class="pseudo">%sender%</span> <span class="message-style">%message%</span></p>
|
||||
<div id="insert"/>
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
<p class="%messageClasses%" title="%time%" senderColor="%senderColor%"><span class="message-style">%message%</span></p>
|
||||
<p class="%messageClasses%" title="%datetime%" senderColor="%senderColor%"><span class="message-style">%message%</span></p>
|
||||
<div id="insert"/>
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
<p class="context %messageClasses%" title="%time%" senderColor="%senderColor%"><span class="message-style">%message%</span></p>
|
||||
<p class="context %messageClasses%" title="%datetime%" senderColor="%senderColor%"><span class="message-style">%message%</span></p>
|
||||
<div id="insert"/>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="messages-group %messageClasses%" senderColor="%senderColor%">
|
||||
<p class="%messageClasses%"><span class="date">%time%</span> <span class="pseudo" style="%senderColor%">%sender%</span> <span class="message-style">%message%</span></p>
|
||||
<p class="%messageClasses%" title="%datetime%"><span class="date">%time%</span> <span class="pseudo" style="%senderColor%">%sender%</span> <span class="message-style">%message%</span></p>
|
||||
<div id="insert"/>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="messages-group context %messageClasses%" senderColor="%senderColor%">
|
||||
<p class="%messageClasses%"><span class="date">%time%</span> <span class="pseudo" style="%senderColor%">%sender%</span> <span class="message-style">%message%</span></p>
|
||||
<p class="%messageClasses%" title="%datetime%"><span class="date">%time%</span> <span class="pseudo" style="%senderColor%">%sender%</span> <span class="message-style">%message%</span></p>
|
||||
<div id="insert"/>
|
||||
</div>
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<hr/>
|
||||
<p class="%messageClasses%"><span class="date date-next">%time%</span> <span class="message-style">%message%</span></p>
|
||||
<p class="%messageClasses%" title="%datetime%"><span class="date date-next">%time%</span> <span class="message-style">%message%</span></p>
|
||||
<div id="insert"/>
|
||||
|
|
|
@ -1 +1 @@
|
|||
<div class="%messageClasses%" prpl="%service%"><img src="%userIconPath%" class="usericon"/><div class="date">%time%</div><div class="pseudo" style="%senderColor%">%sender%</div>%message%</div>
|
||||
<div class="%messageClasses%" prpl="%service%" title="%date%"><img src="%userIconPath%" class="usericon"/><div class="date">%time%</div><div class="pseudo" style="%senderColor%">%sender%</div>%message%</div>
|
||||
|
|
|
@ -1 +1 @@
|
|||
<div class="context %messageClasses%" prpl="%service%"><img src="%userIconPath%" class="usericon"/><div class="date">%time%</div><div class="pseudo" style="%senderColor%">%sender%</div>%message%</div>
|
||||
<div class="context %messageClasses%" prpl="%service%" title="%date%"><img src="%userIconPath%" class="usericon"/><div class="date">%time%</div><div class="pseudo" style="%senderColor%">%sender%</div>%message%</div>
|
||||
|
|
|
@ -1 +1 @@
|
|||
<div class="%messageClasses%" prpl="%service%"><img src="%userIconPath%" class="usericon"/><div class="date">%time%</div><div class="pseudo next" style="%senderColor%">%sender%</div>%message%</div>
|
||||
<div class="%messageClasses%" prpl="%service%" title="%date%"><img src="%userIconPath%" class="usericon"/><div class="date">%time%</div><div class="pseudo next" style="%senderColor%">%sender%</div>%message%</div>
|
||||
|
|
Загрузка…
Ссылка в новой задаче