kopia lustrzana https://github.com/miklobit/TiddlyWiki5
rodzic
6dc90718f0
commit
0b76c327c2
|
@ -76,6 +76,8 @@ Permalink/Caption: permalink
|
||||||
Permalink/Hint: Set browser address bar to a direct link to this tiddler
|
Permalink/Hint: Set browser address bar to a direct link to this tiddler
|
||||||
Permaview/Caption: permaview
|
Permaview/Caption: permaview
|
||||||
Permaview/Hint: Set browser address bar to a direct link to all the tiddlers in this story
|
Permaview/Hint: Set browser address bar to a direct link to all the tiddlers in this story
|
||||||
|
Print/Caption: print page
|
||||||
|
Print/Hint: Print the current page
|
||||||
Refresh/Caption: refresh
|
Refresh/Caption: refresh
|
||||||
Refresh/Hint: Perform a full refresh of the wiki
|
Refresh/Hint: Perform a full refresh of the wiki
|
||||||
Save/Caption: ok
|
Save/Caption: ok
|
||||||
|
|
|
@ -55,7 +55,7 @@ exports.startup = function() {
|
||||||
});
|
});
|
||||||
// Listen for the tm-print message
|
// Listen for the tm-print message
|
||||||
$tw.rootWidget.addEventListener("tm-print",function(event) {
|
$tw.rootWidget.addEventListener("tm-print",function(event) {
|
||||||
window.print();
|
(event.event.view || window).print();
|
||||||
});
|
});
|
||||||
// Listen for the tm-home message
|
// Listen for the tm-home message
|
||||||
$tw.rootWidget.addEventListener("tm-home",function(event) {
|
$tw.rootWidget.addEventListener("tm-home",function(event) {
|
||||||
|
|
|
@ -78,7 +78,8 @@ SendMessageWidget.prototype.invokeAction = function(triggeringWidget,event) {
|
||||||
param: param,
|
param: param,
|
||||||
paramObject: paramObject,
|
paramObject: paramObject,
|
||||||
tiddlerTitle: this.getVariable("currentTiddler"),
|
tiddlerTitle: this.getVariable("currentTiddler"),
|
||||||
navigateFromTitle: this.getVariable("storyTiddler")
|
navigateFromTitle: this.getVariable("storyTiddler"),
|
||||||
|
event: event
|
||||||
});
|
});
|
||||||
return true; // Action was invoked
|
return true; // Action was invoked
|
||||||
};
|
};
|
||||||
|
|
|
@ -131,12 +131,13 @@ ButtonWidget.prototype.navigateTo = function(event) {
|
||||||
navigateFromNode: this,
|
navigateFromNode: this,
|
||||||
navigateFromClientRect: { top: bounds.top, left: bounds.left, width: bounds.width, right: bounds.right, bottom: bounds.bottom, height: bounds.height
|
navigateFromClientRect: { top: bounds.top, left: bounds.left, width: bounds.width, right: bounds.right, bottom: bounds.bottom, height: bounds.height
|
||||||
},
|
},
|
||||||
navigateSuppressNavigation: event.metaKey || event.ctrlKey || (event.button === 1)
|
navigateSuppressNavigation: event.metaKey || event.ctrlKey || (event.button === 1),
|
||||||
|
event: event
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
ButtonWidget.prototype.dispatchMessage = function(event) {
|
ButtonWidget.prototype.dispatchMessage = function(event) {
|
||||||
this.dispatchEvent({type: this.message, param: this.param, tiddlerTitle: this.getVariable("currentTiddler")});
|
this.dispatchEvent({type: this.message, param: this.param, tiddlerTitle: this.getVariable("currentTiddler"), event: event});
|
||||||
};
|
};
|
||||||
|
|
||||||
ButtonWidget.prototype.triggerPopup = function(event) {
|
ButtonWidget.prototype.triggerPopup = function(event) {
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
title: $:/core/ui/Buttons/print
|
||||||
|
tags: $:/tags/PageControls
|
||||||
|
caption: {{$:/core/images/print-button}} {{$:/language/Buttons/Print/Caption}}
|
||||||
|
description: {{$:/language/Buttons/Print/Hint}}
|
||||||
|
|
||||||
|
<$button message="tm-print" tooltip={{$:/language/Buttons/Print/Hint}} aria-label={{$:/language/Buttons/Print/Caption}} class=<<tv-config-toolbar-class>>>
|
||||||
|
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
|
||||||
|
{{$:/core/images/print-button}}
|
||||||
|
</$list>
|
||||||
|
<$list filter="[<tv-config-toolbar-text>prefix[yes]]">
|
||||||
|
<span class="tc-btn-text"><$text text={{$:/language/Buttons/Print/Caption}}/></span>
|
||||||
|
</$list>
|
||||||
|
</$button>
|
|
@ -16,6 +16,7 @@ core/ui/Buttons/new-journal: hide
|
||||||
core/ui/Buttons/new-image: hide
|
core/ui/Buttons/new-image: hide
|
||||||
core/ui/Buttons/palette: hide
|
core/ui/Buttons/palette: hide
|
||||||
core/ui/Buttons/permaview: hide
|
core/ui/Buttons/permaview: hide
|
||||||
|
core/ui/Buttons/print: hide
|
||||||
core/ui/Buttons/storyview: hide
|
core/ui/Buttons/storyview: hide
|
||||||
core/ui/Buttons/theme: hide
|
core/ui/Buttons/theme: hide
|
||||||
core/ui/Buttons/unfold-all: hide
|
core/ui/Buttons/unfold-all: hide
|
||||||
|
|
Ładowanie…
Reference in New Issue