/*\
title: $:/core/modules/macros/totop.js
type: application/javascript
module-type: macro
Macro that scrolls to the top
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Information about this macro
*/
exports.name = "totop";
exports.params = [
];
/*
Run the macro
*/
exports.run = function() {
var totopp = window.scrollTo({ top: 0, behavior: 'smooth' });
totopp;
}
})();
trigger
...
<$set name=top filter="""[list[$:/StoryList]first[]]""" >
<$action-navigate $to=<<top>>/>
</$set>
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/d9fff9ba-caca-4cc5-8819-b504a30a09c1%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/3e58e2ff-7a57-4efd-8f04-0ba6ed5431de%40googlegroups.com.
my problem is, that the grid does not use storylist or storyriver, they are not even displayed. I could try the navigator widget...I am not optimistic with that.
<$action-navigate $to="$:/Plugins/JJ/Grid/Gridlist"/>
But isn't it all in a tiddler, $:/Plugins/JJ/Grid/Gridlist - ?I think that this would work, which doesn't rely on a storylist:
<$action-navigate $to="$:/Plugins/JJ/Grid/Gridlist"/>
/*\
type: application/javascript
module-type: widget
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var Widget = require("$:/core/modules/widgets/widget.js").widget;
var AddToHistoryWidget = function(parseTreeNode,options) {
this.initialise(parseTreeNode,options);
};
/*
Inherit from the base widget class
*/
AddToHistoryWidget.prototype = new Widget();
/*
Render this widget into the DOM
*/
AddToHistoryWidget.prototype.render = function(parent,nextSibling) {
this.computeAttributes();
this.execute();
};
/*
Compute the internal state of the widget
*/
AddToHistoryWidget.prototype.execute = function() {
this.historyTitle = this.getAttribute("$history",this.getVariable("tv-history-title"));
this.newTitle = this.getAttribute("$title");
};
/*
Refresh the widget by ensuring our attributes are up to date
*/
AddToHistoryWidget.prototype.refresh = function(changedTiddlers) {
var changedAttributes = this.computeAttributes();
if(changedAttributes["$historyTitle"] || changedAttributes["$title"]) {
this.refreshSelf();
return true;
}
return this.refreshChildren(changedTiddlers);
};
/*
Invoke the action associated with this widget
*/
AddToHistoryWidget.prototype.invokeAction = function(triggeringWidget,event) {
this.wiki.addToHistory(this.newTitle,{},this.historyTitle);
return true; // Action was invoked
};
exports["action-addtohistory"] = AddToHistoryWidget;
})();
To unsubscribe from this group and stop receiving emails from it, send an email to tiddl...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/e8e9ec93-295d-48a1-931b-d92ec0e096ca%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/d8affd86-4198-48b0-82ec-ee69f6570097%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/531AD09D-09A8-4169-8618-7DE463505BC0%40gmail.com.
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/3f6e41f2-bae4-4eb3-989e-477dd04c55a8%40googlegroups.com.
Salut Julio,
nice site, but it is not so easy to find the key to your backstage-area to see how it is done...
As I said things are a little complicated because I do use another storyview.
Best wishes Jan
Am 26.04.2020 um 17:13 schrieb Julio Peña:
Hello Jan and all,--
Maybe this can help or give you an idea? Take a look:
Regards,Julio
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddl...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/531AD09D-09A8-4169-8618-7DE463505BC0%40gmail.com.
The original thread refers to top of page. If you simply want to move to the top of the page surely there exists a simple html method like hidden anchor at the topand a link to that.
If on the other hand you are referring to tiddler navigation it is different.
Have you looked throught the page and view template process in tiddlywiki. It should be quite simple to display the existing story in the part of the page you choose. If I am on track let me know and I will present some research notes on this.
Regards
Tony
/*\
type: application/javascript
module-type: widget
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var Widget = require("$:/core/modules/widgets/widget.js").widget;
var ScrollToTopWidget = function(parseTreeNode,options) {
this.initialise(parseTreeNode,options);
};
/*
Inherit from the base widget class
*/
ScrollToTopWidget.prototype = new Widget();
/*
Render this widget into the DOM
*/
ScrollToTopWidget.prototype.render = function(parent,nextSibling) {
this.computeAttributes();
this.execute();
};
/*
Compute the internal state of the widget
*/
/*
Refresh the widget by ensuring our attributes are up to date
*/
ScrollToTopWidget.prototype.refresh = refreshSelf() {
return true;
}
return this.refreshChildren(changedTiddlers);
};
/*
Invoke the action associated with this widget
*/
ScrollToTopWidget.prototype.invokeAction = function(triggeringWidget,event) {
window.scrollTo({ top: 0, behavior: 'smooth' });
return true; // Action was invoked
};
exports["action-scrolltotop"] = ScrollToTopWidget;
})();
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/e8e9ec93-295d-48a1-931b-d92ec0e096ca%40googlegroups.com.
Your refresh method is not valid JavaScript. You can actually just remove it entirely. Remove the refresh method. It will inherit from the widget base class and that will be enough in this case. Make sure the tiddler has the correct type for JavaScript and module-type widget.
If it still doesn't work post your new code and the code for the button being used to trigger this. I'm currently not at a computer so that's the best I can do for now, hope that helps.
<h2 id="top">Top of page!</h2>
<a href="#top">Go to top</a>
or
<a href="#top">{{$:/core/images/chevron-up}}</a>
--You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/8a099897-c647-4868-9cb4-faad6a3574e9%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/M6-AoNj--3-2%40tutamail.com.
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/8a099897-c647-4868-9cb4-faad6a3574e9%40googlegroups.com.