Fossil SCM
/chat: in the popup which is triggered by tapping a user's name add a link to the /timeline filtered on that user, per suggestion by Sean in the forum.
Commit
b71be5ef366b39cd89f98e55a0e7345f00119c88efac55cac7948cbf5e4759c9
Parent
3c1a27646cc64ed…
2 files changed
+13
+4
+13
| --- src/chat.js | ||
| +++ src/chat.js | ||
| @@ -738,10 +738,23 @@ | ||
| 738 | 738 | btnDeleteGlobal.addEventListener('click', function(){ |
| 739 | 739 | self.hide(); |
| 740 | 740 | Chat.deleteMessage(eMsg); |
| 741 | 741 | }); |
| 742 | 742 | } |
| 743 | + if(eMsg.dataset.xfrom){ | |
| 744 | + /* Add a link to the /timeline filtered on this user. */ | |
| 745 | + const toolbar2 = D.addClass(D.div(), 'toolbar'); | |
| 746 | + D.append(this.e, toolbar2); | |
| 747 | + const timelineLink = D.attr( | |
| 748 | + D.a(F.repoUrl('timeline',{ | |
| 749 | + u: eMsg.dataset.xfrom, | |
| 750 | + y: 'a' | |
| 751 | + }), "User's Timeline"), | |
| 752 | + 'target', '_blank' | |
| 753 | + ); | |
| 754 | + D.append(toolbar2, timelineLink); | |
| 755 | + } | |
| 743 | 756 | }/*refresh()*/ |
| 744 | 757 | }); |
| 745 | 758 | f.popup.installHideHandlers(); |
| 746 | 759 | f.popup.hide = function(){ |
| 747 | 760 | delete this._eMsg; |
| 748 | 761 |
| --- src/chat.js | |
| +++ src/chat.js | |
| @@ -738,10 +738,23 @@ | |
| 738 | btnDeleteGlobal.addEventListener('click', function(){ |
| 739 | self.hide(); |
| 740 | Chat.deleteMessage(eMsg); |
| 741 | }); |
| 742 | } |
| 743 | }/*refresh()*/ |
| 744 | }); |
| 745 | f.popup.installHideHandlers(); |
| 746 | f.popup.hide = function(){ |
| 747 | delete this._eMsg; |
| 748 |
| --- src/chat.js | |
| +++ src/chat.js | |
| @@ -738,10 +738,23 @@ | |
| 738 | btnDeleteGlobal.addEventListener('click', function(){ |
| 739 | self.hide(); |
| 740 | Chat.deleteMessage(eMsg); |
| 741 | }); |
| 742 | } |
| 743 | if(eMsg.dataset.xfrom){ |
| 744 | /* Add a link to the /timeline filtered on this user. */ |
| 745 | const toolbar2 = D.addClass(D.div(), 'toolbar'); |
| 746 | D.append(this.e, toolbar2); |
| 747 | const timelineLink = D.attr( |
| 748 | D.a(F.repoUrl('timeline',{ |
| 749 | u: eMsg.dataset.xfrom, |
| 750 | y: 'a' |
| 751 | }), "User's Timeline"), |
| 752 | 'target', '_blank' |
| 753 | ); |
| 754 | D.append(toolbar2, timelineLink); |
| 755 | } |
| 756 | }/*refresh()*/ |
| 757 | }); |
| 758 | f.popup.installHideHandlers(); |
| 759 | f.popup.hide = function(){ |
| 760 | delete this._eMsg; |
| 761 |
+4
| --- src/default.css | ||
| +++ src/default.css | ||
| @@ -1287,10 +1287,14 @@ | ||
| 1287 | 1287 | /* problem: if we inherit the color it may either be |
| 1288 | 1288 | transparent or inherit translucency via the |
| 1289 | 1289 | skin, leaving it unreadable. Since we set the bg |
| 1290 | 1290 | color we must also set the fg color. */; |
| 1291 | 1291 | color: rgba(235, 235, 235, 0.9); |
| 1292 | +} | |
| 1293 | +.fossil-PopupWidget a, | |
| 1294 | +.fossil-PopupWidget a:visited { | |
| 1295 | + color: initial; | |
| 1292 | 1296 | } |
| 1293 | 1297 | .fossil-toast-message.error, |
| 1294 | 1298 | .fossil-toast-message.warning { |
| 1295 | 1299 | background: yellow; |
| 1296 | 1300 | } |
| 1297 | 1301 |
| --- src/default.css | |
| +++ src/default.css | |
| @@ -1287,10 +1287,14 @@ | |
| 1287 | /* problem: if we inherit the color it may either be |
| 1288 | transparent or inherit translucency via the |
| 1289 | skin, leaving it unreadable. Since we set the bg |
| 1290 | color we must also set the fg color. */; |
| 1291 | color: rgba(235, 235, 235, 0.9); |
| 1292 | } |
| 1293 | .fossil-toast-message.error, |
| 1294 | .fossil-toast-message.warning { |
| 1295 | background: yellow; |
| 1296 | } |
| 1297 |
| --- src/default.css | |
| +++ src/default.css | |
| @@ -1287,10 +1287,14 @@ | |
| 1287 | /* problem: if we inherit the color it may either be |
| 1288 | transparent or inherit translucency via the |
| 1289 | skin, leaving it unreadable. Since we set the bg |
| 1290 | color we must also set the fg color. */; |
| 1291 | color: rgba(235, 235, 235, 0.9); |
| 1292 | } |
| 1293 | .fossil-PopupWidget a, |
| 1294 | .fossil-PopupWidget a:visited { |
| 1295 | color: initial; |
| 1296 | } |
| 1297 | .fossil-toast-message.error, |
| 1298 | .fossil-toast-message.warning { |
| 1299 | background: yellow; |
| 1300 | } |
| 1301 |