mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-24 00:50:28 +00:00
Fixes to get recent changes list to work
This commit is contained in:
parent
ce4a6ffa49
commit
942e463b20
@ -44,6 +44,7 @@ ViewWidget.prototype.execute = function() {
|
||||
this.viewField = this.getAttribute("field","text");
|
||||
this.viewIndex = this.getAttribute("index");
|
||||
this.viewFormat = this.getAttribute("format","text");
|
||||
this.viewTemplate = this.getAttribute("template","");
|
||||
switch(this.viewFormat) {
|
||||
case "wikified":
|
||||
this.text = this.getValueAsWikified();
|
||||
@ -55,7 +56,7 @@ ViewWidget.prototype.execute = function() {
|
||||
this.text = this.getValueAsHtmlEncoded();
|
||||
break;
|
||||
case "date":
|
||||
this.text = this.getValueAsDate(this.viewFormat);
|
||||
this.text = this.getValueAsDate(this.viewTemplate);
|
||||
break;
|
||||
case "relativedate":
|
||||
this.text = this.getValueAsRelativeDate();
|
||||
@ -120,7 +121,7 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of
|
||||
*/
|
||||
ViewWidget.prototype.refresh = function(changedTiddlers) {
|
||||
var changedAttributes = this.computeAttributes();
|
||||
if(changedAttributes.title || changedAttributes.field || changedAttributes.index || changedTiddlers[this.viewTitle]) {
|
||||
if(changedAttributes.title || changedAttributes.field || changedAttributes.index || changedAttributes.template || changedAttributes.format || changedTiddlers[this.viewTitle]) {
|
||||
this.refreshSelf();
|
||||
return true;
|
||||
} else {
|
||||
|
@ -1,8 +1,14 @@
|
||||
title: $:/snippets/recentchanges
|
||||
|
||||
<$list filter="[!is[system]has[modified]!sort[modified]limit[100]eachday[modified]]" itemClass="tw-menu-list-item">
|
||||
<div class="tw-menu-list-item">
|
||||
<$view field="modified" format="date" template="DDth MMM YYYY"/>
|
||||
<$list filter="[sameday{!!modified}!is[system]!sort[modified]]" itemClass="tw-menu-list-subitem">
|
||||
<$view field="title" format="link"/>
|
||||
<div class="tw-menu-list-subitem">
|
||||
<$link to={{!!title}}>
|
||||
<$view field="title"/>
|
||||
</$link>
|
||||
</div>
|
||||
</$list>
|
||||
</div>
|
||||
</$list>
|
||||
|
Loading…
Reference in New Issue
Block a user