mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
Merge branch 'master' of https://github.com/Jermolene/TiddlyWiki5 into zh
This commit is contained in:
commit
b29c9cf829
9
core/images/list.tid
Normal file
9
core/images/list.tid
Normal file
@ -0,0 +1,9 @@
|
||||
title: $:/core/images/list
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg class="tc-image-list tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
|
||||
<g fill-rule="evenodd">
|
||||
<path d="M0.719999312,185.568543 C2.21955287,181.862817 3.0452019,177.812144 3.0452019,173.568542 C3.0452019,155.891545 -11.2816707,141.568542 -28.9547636,141.568542 L-60.9548326,141.568542 C-78.6344937,141.568542 -92.9547981,155.895431 -92.9547981,173.568542 C-92.9547981,191.24554 -78.6279255,205.568542 -60.9548326,205.568542 L-28.9547636,205.568542 C-27.593228,205.568542 -26.2516158,205.483573 -24.9349335,205.31865 C-31.5207556,201.78951 -36.8809788,196.272192 -40.2126959,189.568542 L-60.9493786,189.568542 C-69.7889277,189.568542 -76.9547981,182.407041 -76.9547981,173.568542 C-76.9547981,164.731986 -69.7994766,157.568542 -60.9493786,157.568542 L-28.9602176,157.568542 C-20.1206685,157.568542 -12.9547981,164.730044 -12.9547981,173.568542 C-12.9547981,176.946528 -14.0004297,180.080016 -15.7866505,182.6623 C-13.6856165,184.473592 -10.949961,185.568542 -7.9585771,185.568542 L0.720002586,185.568542 Z" transform="translate(-44.954798, 173.568542) rotate(-225.000000) translate(44.954798, -173.568542) "></path>
|
||||
<path d="M87.7480315,128 L23.9992458,128 C19.5813843,128 16,124.409247 16,119.993027 L16,8.00697327 C16,3.58484404 19.5881049,0 23.9992458,0 L104.000754,0 C108.418616,0 112,3.59075293 112,8.00697327 L112,104 L91.2492027,104 C90.2848199,104 89.410573,104.391703 88.7768998,105.025201 C88.1373658,105.661376 87.7480315,106.53563 87.7480315,107.501171 L87.7480315,128 Z M95.7480315,127.879386 L111.627417,112 L95.7480315,112 L95.7480315,127.879386 Z M40,15.5089165 C40,13.5709954 41.5636015,12 43.4998101,12 L98.5001899,12 C100.433082,12 102,13.5614718 102,15.5089165 L102,16.4910835 C102,18.4290046 100.436399,20 98.5001899,20 L43.4998101,20 C41.5669183,20 40,18.4385282 40,16.4910835 L40,15.5089165 Z M32,22 C35.3137085,22 38,19.3137085 38,16 C38,12.6862915 35.3137085,10 32,10 C28.6862915,10 26,12.6862915 26,16 C26,19.3137085 28.6862915,22 32,22 Z M40,31.5089165 C40,29.5709954 41.5636015,28 43.4998101,28 L98.5001899,28 C100.433082,28 102,29.5614718 102,31.5089165 L102,32.4910835 C102,34.4290046 100.436399,36 98.5001899,36 L43.4998101,36 C41.5669183,36 40,34.4385282 40,32.4910835 L40,31.5089165 Z M40,47.5089165 C40,45.5709954 41.5636015,44 43.4998101,44 L98.5001899,44 C100.433082,44 102,45.5614718 102,47.5089165 L102,48.4910835 C102,50.4290046 100.436399,52 98.5001899,52 L43.4998101,52 C41.5669183,52 40,50.4385282 40,48.4910835 L40,47.5089165 Z M40,63.5089165 C40,61.5709954 41.5636015,60 43.4998101,60 L98.5001899,60 C100.433082,60 102,61.5614718 102,63.5089165 L102,64.4910835 C102,66.4290046 100.436399,68 98.5001899,68 L43.4998101,68 C41.5669183,68 40,66.4385282 40,64.4910835 L40,63.5089165 Z M40,79.5089165 C40,77.5709954 41.5636015,76 43.4998101,76 L98.5001899,76 C100.433082,76 102,77.5614718 102,79.5089165 L102,80.4910835 C102,82.4290046 100.436399,84 98.5001899,84 L43.4998101,84 C41.5669183,84 40,82.4385282 40,80.4910835 L40,79.5089165 Z M40,95.5089165 C40,93.5709954 41.5636015,92 43.4998101,92 L98.5001899,92 C100.433082,92 102,93.5614718 102,95.5089165 L102,96.4910835 C102,98.4290046 100.436399,100 98.5001899,100 L43.4998101,100 C41.5669183,100 40,98.4385282 40,96.4910835 L40,95.5089165 Z M40,111.508916 C40,109.570995 41.5680474,108 43.4972017,108 L76.5027983,108 C78.4342495,108 80,109.561472 80,111.508916 L80,112.491084 C80,114.429005 78.4319526,116 76.5027983,116 L43.4972017,116 C41.5657505,116 40,114.438528 40,112.491084 L40,111.508916 Z M32,38 C35.3137085,38 38,35.3137085 38,32 C38,28.6862915 35.3137085,26 32,26 C28.6862915,26 26,28.6862915 26,32 C26,35.3137085 28.6862915,38 32,38 Z M32,54 C35.3137085,54 38,51.3137085 38,48 C38,44.6862915 35.3137085,42 32,42 C28.6862915,42 26,44.6862915 26,48 C26,51.3137085 28.6862915,54 32,54 Z M32,70 C35.3137085,70 38,67.3137085 38,64 C38,60.6862915 35.3137085,58 32,58 C28.6862915,58 26,60.6862915 26,64 C26,67.3137085 28.6862915,70 32,70 Z M32,86 C35.3137085,86 38,83.3137085 38,80 C38,76.6862915 35.3137085,74 32,74 C28.6862915,74 26,76.6862915 26,80 C26,83.3137085 28.6862915,86 32,86 Z M32,102 C35.3137085,102 38,99.3137085 38,96 C38,92.6862915 35.3137085,90 32,90 C28.6862915,90 26,92.6862915 26,96 C26,99.3137085 28.6862915,102 32,102 Z M32,118 C35.3137085,118 38,115.313708 38,112 C38,108.686292 35.3137085,106 32,106 C28.6862915,106 26,108.686292 26,112 C26,115.313708 28.6862915,118 32,118 Z"></path>
|
||||
</g>
|
||||
</svg>
|
@ -54,6 +54,8 @@ Home/Caption: home
|
||||
Home/Hint: Open the default tiddlers
|
||||
Language/Caption: language
|
||||
Language/Hint: Choose the user interface language
|
||||
Manager/Caption: tiddler manager
|
||||
Manager/Hint: Open tiddler manager
|
||||
More/Caption: more
|
||||
More/Hint: More actions
|
||||
NewHere/Caption: new here
|
||||
|
@ -43,6 +43,33 @@ OfficialPluginLibrary/Hint: The official ~TiddlyWiki plugin library at tiddlywik
|
||||
PluginReloadWarning: Please save {{$:/core/ui/Buttons/save-wiki}} and reload {{$:/core/ui/Buttons/refresh}} to allow changes to plugins to take effect
|
||||
RecentChanges/DateFormat: DDth MMM YYYY
|
||||
SystemTiddler/Tooltip: This is a system tiddler
|
||||
|
||||
SystemTiddlers/Include/Prompt: Include system tiddlers
|
||||
|
||||
Manager/Item/Fields: Fields
|
||||
Manager/Item/RawText: Raw text
|
||||
Manager/Item/WikifiedText: Wikified text
|
||||
Manager/Item/Colour: Colour
|
||||
Manager/Item/Tags: Tags
|
||||
Manager/Item/Icon: Icon
|
||||
Manager/Item/Icon/None: (none)
|
||||
Manager/Item/Tools: Tools
|
||||
|
||||
Manager/Controls/Show/Prompt: Show:
|
||||
Manager/Controls/Show/Option/Tiddlers: tiddlers
|
||||
Manager/Controls/Show/Option/Tags: tags
|
||||
|
||||
Manager/Controls/Search/Prompt: Search:
|
||||
Manager/Controls/Search/Placeholder: Search
|
||||
|
||||
Manager/Controls/Sort/Prompt: Sort by:
|
||||
|
||||
Manager/Controls/Order/Prompt: Reverse order
|
||||
|
||||
|
||||
Manager/Controls/FilterByTag/Prompt: Filter by tag:
|
||||
Manager/Controls/FilterByTag/None: (none)
|
||||
|
||||
TagManager/Colour/Heading: Colour
|
||||
TagManager/Count/Heading: Count
|
||||
TagManager/Icon/Heading: Icon
|
||||
|
@ -2,3 +2,4 @@ title: $:/language/Docs/Types/application/javascript
|
||||
description: JavaScript code
|
||||
name: application/javascript
|
||||
group: Developer
|
||||
group-sort: 2
|
||||
|
@ -2,3 +2,4 @@ title: $:/language/Docs/Types/application/json
|
||||
description: JSON data
|
||||
name: application/json
|
||||
group: Developer
|
||||
group-sort: 2
|
||||
|
@ -2,3 +2,4 @@ title: $:/language/Docs/Types/application/x-tiddler-dictionary
|
||||
description: Data dictionary
|
||||
name: application/x-tiddler-dictionary
|
||||
group: Developer
|
||||
group-sort: 2
|
||||
|
@ -2,3 +2,4 @@ title: $:/language/Docs/Types/image/gif
|
||||
description: GIF image
|
||||
name: image/gif
|
||||
group: Image
|
||||
group-sort: 1
|
||||
|
@ -2,3 +2,4 @@ title: $:/language/Docs/Types/image/jpeg
|
||||
description: JPEG image
|
||||
name: image/jpeg
|
||||
group: Image
|
||||
group-sort: 1
|
||||
|
@ -2,3 +2,4 @@ title: $:/language/Docs/Types/image/png
|
||||
description: PNG image
|
||||
name: image/png
|
||||
group: Image
|
||||
group-sort: 1
|
||||
|
@ -2,3 +2,4 @@ title: $:/language/Docs/Types/image/svg+xml
|
||||
description: Structured Vector Graphics image
|
||||
name: image/svg+xml
|
||||
group: Image
|
||||
group-sort: 1
|
||||
|
@ -2,3 +2,4 @@ title: $:/language/Docs/Types/image/x-icon
|
||||
description: ICO format icon file
|
||||
name: image/x-icon
|
||||
group: Image
|
||||
group-sort: 1
|
||||
|
@ -2,3 +2,4 @@ title: $:/language/Docs/Types/text/css
|
||||
description: Static stylesheet
|
||||
name: text/css
|
||||
group: Developer
|
||||
group-sort: 2
|
||||
|
@ -2,3 +2,4 @@ title: $:/language/Docs/Types/text/html
|
||||
description: HTML markup
|
||||
name: text/html
|
||||
group: Text
|
||||
group-sort: 0
|
||||
|
@ -2,3 +2,4 @@ title: $:/language/Docs/Types/text/plain
|
||||
description: Plain text
|
||||
name: text/plain
|
||||
group: Text
|
||||
group-sort: 0
|
||||
|
@ -2,3 +2,4 @@ title: $:/language/Docs/Types/text/vnd.tiddlywiki
|
||||
description: TiddlyWiki 5
|
||||
name: text/vnd.tiddlywiki
|
||||
group: Text
|
||||
group-sort: 0
|
||||
|
@ -2,3 +2,4 @@ title: $:/language/Docs/Types/text/x-tiddlywiki
|
||||
description: TiddlyWiki Classic
|
||||
name: text/x-tiddlywiki
|
||||
group: Text
|
||||
group-sort: 0
|
||||
|
22
core/modules/filters/all/tags.js
Normal file
22
core/modules/filters/all/tags.js
Normal file
@ -0,0 +1,22 @@
|
||||
/*\
|
||||
title: $:/core/modules/filters/all/tags.js
|
||||
type: application/javascript
|
||||
module-type: allfilteroperator
|
||||
|
||||
Filter function for [all[tags]]
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
Export our filter function
|
||||
*/
|
||||
exports.tags = function(source,prefix,options) {
|
||||
return Object.keys(options.wiki.getTagMap());
|
||||
};
|
||||
|
||||
})();
|
@ -28,11 +28,20 @@ Export our filter function
|
||||
exports.is = function(source,operator,options) {
|
||||
// Dispatch to the correct isfilteroperator
|
||||
var isFilterOperators = getIsFilterOperators();
|
||||
var isFilterOperator = isFilterOperators[operator.operand];
|
||||
if(isFilterOperator) {
|
||||
return isFilterOperator(source,operator.prefix,options);
|
||||
if(operator.operand) {
|
||||
var isFilterOperator = isFilterOperators[operator.operand];
|
||||
if(isFilterOperator) {
|
||||
return isFilterOperator(source,operator.prefix,options);
|
||||
} else {
|
||||
return [$tw.language.getString("Error/IsFilterOperator")];
|
||||
}
|
||||
} else {
|
||||
return [$tw.language.getString("Error/IsFilterOperator")];
|
||||
// Return all tiddlers if the operand is missing
|
||||
var results = [];
|
||||
source(function(tiddler,title) {
|
||||
results.push(title);
|
||||
});
|
||||
return results;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -12,6 +12,23 @@ Filter operators for manipulating the current selection list
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
Order a list
|
||||
*/
|
||||
exports.order = function(source,operator,options) {
|
||||
var results = [];
|
||||
if(operator.operand.toLowerCase() === "reverse") {
|
||||
source(function(tiddler,title) {
|
||||
results.unshift(title);
|
||||
});
|
||||
} else {
|
||||
source(function(tiddler,title) {
|
||||
results.push(title);
|
||||
});
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
||||
/*
|
||||
Reverse list
|
||||
*/
|
||||
|
@ -17,19 +17,30 @@ Export our filter function
|
||||
*/
|
||||
exports.tag = function(source,operator,options) {
|
||||
var results = [];
|
||||
if(operator.prefix === "!") {
|
||||
if((operator.suffix || "").toLowerCase() === "strict" && !operator.operand) {
|
||||
// New semantics:
|
||||
// Always return copy of input if operator.operand is missing
|
||||
source(function(tiddler,title) {
|
||||
if(tiddler && !tiddler.hasTag(operator.operand)) {
|
||||
results.push(title);
|
||||
}
|
||||
results.push(title);
|
||||
});
|
||||
} else {
|
||||
source(function(tiddler,title) {
|
||||
if(tiddler && tiddler.hasTag(operator.operand)) {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
results = options.wiki.sortByList(results,operator.operand);
|
||||
// Old semantics:
|
||||
if(operator.prefix === "!") {
|
||||
// Returns a copy of the input if operator.operand is missing
|
||||
source(function(tiddler,title) {
|
||||
if(tiddler && !tiddler.hasTag(operator.operand)) {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// Returns empty results if operator.operand is missing
|
||||
source(function(tiddler,title) {
|
||||
if(tiddler && tiddler.hasTag(operator.operand)) {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
results = options.wiki.sortByList(results,operator.operand);
|
||||
}
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
@ -358,8 +358,7 @@ exports.getWeek = function(date) {
|
||||
d = 7; // JavaScript Sun=0, ISO Sun=7
|
||||
}
|
||||
dt.setTime(dt.getTime() + (4 - d) * 86400000);// shift day to Thurs of same week to calculate weekNo
|
||||
var x = new Date(dt.getFullYear(),0,1);
|
||||
var n = Math.floor((dt.getTime() - x.getTime()) / 86400000);
|
||||
var n = Math.floor((dt.getTime()-new Date(dt.getFullYear(),0,1) + 3600000) / 86400000);
|
||||
return Math.floor(n / 7) + 1;
|
||||
};
|
||||
|
||||
|
@ -65,7 +65,12 @@ CheckboxWidget.prototype.getValue = function() {
|
||||
}
|
||||
}
|
||||
if(this.checkboxField) {
|
||||
var value = tiddler.fields[this.checkboxField] || this.checkboxDefault || "";
|
||||
var value;
|
||||
if($tw.utils.hop(tiddler.fields,this.checkboxField)) {
|
||||
value = tiddler.fields[this.checkboxField] || "";
|
||||
} else {
|
||||
value = this.checkboxDefault || "";
|
||||
}
|
||||
if(value === this.checkboxChecked) {
|
||||
return true;
|
||||
}
|
||||
|
@ -2,11 +2,13 @@ title: $:/core/ui/EditTemplate/tags
|
||||
tags: $:/tags/EditTemplate
|
||||
|
||||
\define lingo-base() $:/language/EditTemplate/
|
||||
|
||||
\define tag-styles()
|
||||
background-color:$(backgroundColor)$;
|
||||
fill:$(foregroundColor)$;
|
||||
color:$(foregroundColor)$;
|
||||
\end
|
||||
|
||||
\define tag-body-inner(colour,fallbackTarget,colourA,colourB)
|
||||
<$vars foregroundColor=<<contrastcolour target:"""$colour$""" fallbackTarget:"""$fallbackTarget$""" colourA:"""$colourA$""" colourB:"""$colourB$""">> backgroundColor="""$colour$""">
|
||||
<span style=<<tag-styles>> class="tc-tag-label">
|
||||
@ -15,39 +17,24 @@ color:$(foregroundColor)$;
|
||||
</span>
|
||||
</$vars>
|
||||
\end
|
||||
|
||||
\define tag-body(colour,palette)
|
||||
<$macrocall $name="tag-body-inner" colour="""$colour$""" fallbackTarget={{$palette$##tag-background}} colourA={{$palette$##foreground}} colourB={{$palette$##background}}/>
|
||||
\end
|
||||
|
||||
\define tag-picker-actions()
|
||||
<$action-listops
|
||||
$tiddler=<<currentTiddler>>
|
||||
$field="tags"
|
||||
$subfilter="[<tag>] [all[current]tags[]]"
|
||||
/>
|
||||
\end
|
||||
|
||||
<div class="tc-edit-tags">
|
||||
<$fieldmangler>
|
||||
<$list filter="[all[current]tags[]sort[title]]" storyview="pop">
|
||||
<$macrocall $name="tag-body" colour={{!!color}} palette={{$:/palette}}/>
|
||||
</$list>
|
||||
|
||||
<div class="tc-edit-add-tag">
|
||||
<span class="tc-add-tag-name">
|
||||
<$edit-text tiddler="$:/temp/NewTagName" tag="input" default="" placeholder={{$:/language/EditTemplate/Tags/Add/Placeholder}} focusPopup=<<qualify "$:/state/popup/tags-auto-complete">> class="tc-edit-texteditor tc-popup-handle"/>
|
||||
</span> <$button popup=<<qualify "$:/state/popup/tags-auto-complete">> class="tc-btn-invisible tc-btn-dropdown" tooltip={{$:/language/EditTemplate/Tags/Dropdown/Hint}} aria-label={{$:/language/EditTemplate/Tags/Dropdown/Caption}}>{{$:/core/images/down-arrow}}</$button> <span class="tc-add-tag-button">
|
||||
<$button message="tm-add-tag" param={{$:/temp/NewTagName}} set="$:/temp/NewTagName" setTo="" class="">
|
||||
<<lingo Tags/Add/Button>>
|
||||
</$button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="tc-block-dropdown-wrapper">
|
||||
<$reveal state=<<qualify "$:/state/popup/tags-auto-complete">> type="nomatch" text="" default="">
|
||||
<div class="tc-block-dropdown">
|
||||
<$linkcatcher set="$:/temp/NewTagName" setTo="" message="tm-add-tag">
|
||||
<$list filter="[tags[]!is[system]search:title{$:/temp/NewTagName}sort[]]">
|
||||
{{||$:/core/ui/Components/tag-link}}
|
||||
</$list>
|
||||
<hr>
|
||||
<$list filter="[tags[]is[system]search:title{$:/temp/NewTagName}sort[]]">
|
||||
{{||$:/core/ui/Components/tag-link}}
|
||||
</$list>
|
||||
</$linkcatcher>
|
||||
</div>
|
||||
</$reveal>
|
||||
</div>
|
||||
</$fieldmangler>
|
||||
</div>
|
||||
<$macrocall $name="tag-picker" actions=<<tag-picker-actions>>/>
|
||||
</div>
|
||||
|
@ -10,7 +10,7 @@ tags: $:/tags/EditTemplate
|
||||
<$reveal state=<<qualify "$:/state/popup/type-dropdown">> type="nomatch" text="" default="">
|
||||
<div class="tc-block-dropdown tc-edit-type-dropdown">
|
||||
<$linkcatcher to="!!type">
|
||||
<$list filter='[all[shadows+tiddlers]prefix[$:/language/Docs/Types/]each[group]sort[group]]'>
|
||||
<$list filter='[all[shadows+tiddlers]prefix[$:/language/Docs/Types/]each[group]sort[group-sort]]'>
|
||||
<div class="tc-dropdown-item">
|
||||
<$text text={{!!group}}/>
|
||||
</div>
|
||||
|
92
core/ui/Manager.tid
Normal file
92
core/ui/Manager.tid
Normal file
@ -0,0 +1,92 @@
|
||||
title: $:/Manager
|
||||
icon: $:/core/images/list
|
||||
color: #bbb
|
||||
|
||||
\define lingo-base() $:/language/Manager/
|
||||
|
||||
\define list-item-content-item()
|
||||
<div class="tc-manager-list-item-content-item">
|
||||
<$vars state-title="""$:/state/popup/manager/item/$(listItem)$""">
|
||||
<$reveal state=<<state-title>> type="match" text="show" default="show" tag="div">
|
||||
<$button set=<<state-title>> setTo="hide" class="tc-btn-invisible tc-manager-list-item-content-item-heading">
|
||||
{{$:/core/images/down-arrow}} <$transclude tiddler=<<listItem>> field="caption"/>
|
||||
</$button>
|
||||
</$reveal>
|
||||
<$reveal state=<<state-title>> type="nomatch" text="show" default="show" tag="div">
|
||||
<$button set=<<state-title>> setTo="show" class="tc-btn-invisible tc-manager-list-item-content-item-heading">
|
||||
{{$:/core/images/right-arrow}} <$transclude tiddler=<<listItem>> field="caption"/>
|
||||
</$button>
|
||||
</$reveal>
|
||||
<$reveal state=<<state-title>> type="match" text="show" default="show" tag="div" class="tc-manager-list-item-content-item-body">
|
||||
<$transclude tiddler=<<listItem>>/>
|
||||
</$reveal>
|
||||
</$vars>
|
||||
</div>
|
||||
\end
|
||||
|
||||
<div class="tc-manager-wrapper">
|
||||
<div class="tc-manager-controls">
|
||||
<div class="tc-manager-control">
|
||||
<<lingo Controls/Show/Prompt>> <$select tiddler="$:/config/Manager/Show" default="tiddlers">
|
||||
<option value="tiddlers"><<lingo Controls/Show/Option/Tiddlers>></option>
|
||||
<option value="tags"><<lingo Controls/Show/Option/Tags>></option>
|
||||
</$select>
|
||||
</div>
|
||||
<div class="tc-manager-control">
|
||||
<<lingo Controls/Search/Prompt>> <$edit-text tiddler="$:/config/Manager/Filter" tag="input" default="" placeholder={{$:/language/Manager/Controls/Search/Placeholder}}/>
|
||||
</div>
|
||||
<div class="tc-manager-control">
|
||||
<<lingo Controls/FilterByTag/Prompt>> <$select tiddler="$:/config/Manager/Tag" default="">
|
||||
<option value=""><<lingo Controls/FilterByTag/None>></option>
|
||||
<$list filter="[!is{$:/config/Manager/System}tags[]!is[system]sort[title]]" variable="tag">
|
||||
<option value=<<tag>>><$text text=<<tag>>/></option>
|
||||
</$list>
|
||||
</$select>
|
||||
</div>
|
||||
<div class="tc-manager-control">
|
||||
<<lingo Controls/Sort/Prompt>> <$select tiddler="$:/config/Manager/Sort" default="title">
|
||||
<optgroup label="Common">
|
||||
<$list filter="title modified modifier created creator created" variable="field">
|
||||
<option value=<<field>>><$text text=<<field>>/></option>
|
||||
</$list>
|
||||
</optgroup>
|
||||
<optgroup label="All">
|
||||
<$list filter="[all{$:/config/Manager/Show}!is{$:/config/Manager/System}fields[]sort[title]] -title -modified -modifier -created -creator -created" variable="field">
|
||||
<option value=<<field>>><$text text=<<field>>/></option>
|
||||
</$list>
|
||||
</optgroup>
|
||||
</$select>
|
||||
<$checkbox tiddler="$:/config/Manager/Order" field="text" checked="reverse" unchecked="forward" default="forward">
|
||||
<<lingo Controls/Order/Prompt>>
|
||||
</$checkbox>
|
||||
</div>
|
||||
<div class="tc-manager-control">
|
||||
<$checkbox tiddler="$:/config/Manager/System" field="text" checked="" unchecked="system" default="system">
|
||||
{{$:/language/SystemTiddlers/Include/Prompt}}
|
||||
</$checkbox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tc-manager-list">
|
||||
<$list filter="[all{$:/config/Manager/Show}!is{$:/config/Manager/System}search{$:/config/Manager/Filter}tag:strict{$:/config/Manager/Tag}sort{$:/config/Manager/Sort}order{$:/config/Manager/Order}]">
|
||||
<$vars transclusion=<<currentTiddler>>>
|
||||
<div style="tc-manager-list-item">
|
||||
<$button popup=<<qualify "$:/state/manager/popup">> class="tc-btn-invisible tc-manager-list-item-heading" selectedClass="tc-manager-list-item-heading-selected">
|
||||
<$text text=<<currentTiddler>>/>
|
||||
</$button>
|
||||
<$reveal state=<<qualify "$:/state/manager/popup">> type="nomatch" text="" default="" tag="div" class="tc-manager-list-item-content tc-popup-handle">
|
||||
<div class="tc-manager-list-item-content-tiddler">
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/Manager/ItemMain]!has[draft.of]]" variable="listItem">
|
||||
<<list-item-content-item>>
|
||||
</$list>
|
||||
</div>
|
||||
<div class="tc-manager-list-item-content-sidebar">
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/Manager/ItemSidebar]!has[draft.of]]" variable="listItem">
|
||||
<<list-item-content-item>>
|
||||
</$list>
|
||||
</div>
|
||||
</$reveal>
|
||||
</div>
|
||||
</$vars>
|
||||
</$list>
|
||||
</div>
|
||||
</div>
|
9
core/ui/Manager/ItemMainFields.tid
Normal file
9
core/ui/Manager/ItemMainFields.tid
Normal file
@ -0,0 +1,9 @@
|
||||
title: $:/Manager/ItemMain/Fields
|
||||
tags: $:/tags/Manager/ItemMain
|
||||
caption: {{$:/language/Manager/Item/Fields}}
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<$list filter="[all[current]fields[]sort[title]] -text" template="$:/core/ui/TiddlerFieldTemplate" variable="listItem"/>
|
||||
</tbody>
|
||||
</table>
|
5
core/ui/Manager/ItemMainRawText.tid
Normal file
5
core/ui/Manager/ItemMainRawText.tid
Normal file
@ -0,0 +1,5 @@
|
||||
title: $:/Manager/ItemMain/RawText
|
||||
tags: $:/tags/Manager/ItemMain
|
||||
caption: {{$:/language/Manager/Item/RawText}}
|
||||
|
||||
<pre><code><$view/></code></pre>
|
5
core/ui/Manager/ItemMainWikifiedText.tid
Normal file
5
core/ui/Manager/ItemMainWikifiedText.tid
Normal file
@ -0,0 +1,5 @@
|
||||
title: $:/Manager/ItemMain/WikifiedText
|
||||
tags: $:/tags/Manager/ItemMain
|
||||
caption: {{$:/language/Manager/Item/WikifiedText}}
|
||||
|
||||
<$transclude mode="block"/>
|
15
core/ui/Manager/ItemSidebarColour.tid
Normal file
15
core/ui/Manager/ItemSidebarColour.tid
Normal file
@ -0,0 +1,15 @@
|
||||
title: $:/Manager/ItemSidebar/Colour
|
||||
tags: $:/tags/Manager/ItemSidebar
|
||||
caption: {{$:/language/Manager/Item/Colour}}
|
||||
|
||||
\define swatch-styles()
|
||||
height: 1em;
|
||||
background-color: $(colour)$
|
||||
\end
|
||||
|
||||
<$vars colour={{!!color}}>
|
||||
<p style=<<swatch-styles>>/>
|
||||
</$vars>
|
||||
<p>
|
||||
<$edit-text field="color" tag="input" type="color"/> / <$edit-text field="color" tag="input" type="text" size="9"/>
|
||||
</p>
|
23
core/ui/Manager/ItemSidebarIcon.tid
Normal file
23
core/ui/Manager/ItemSidebarIcon.tid
Normal file
@ -0,0 +1,23 @@
|
||||
title: $:/Manager/ItemSidebar/Icon
|
||||
tags: $:/tags/Manager/ItemSidebar
|
||||
caption: {{$:/language/Manager/Item/Icon}}
|
||||
|
||||
<p>
|
||||
<div class="tc-manager-icon-editor">
|
||||
<$button popup=<<qualify "$:/state/popup/image-picker">> class="tc-btn-invisible">
|
||||
<$transclude tiddler={{!!icon}}>
|
||||
{{$:/language/Manager/Item/Icon/None}}
|
||||
</$transclude>
|
||||
</$button>
|
||||
<div class="tc-block-dropdown-wrapper" style="position: static;">
|
||||
<$reveal state=<<qualify "$:/state/popup/image-picker">> type="nomatch" text="" default="" tag="div" class="tc-popup">
|
||||
<div class="tc-block-dropdown tc-popup-keep" style="width: 80%; left: 10%; right: 10%; padding: 0.5em;">
|
||||
<$macrocall $name="image-picker-include-tagged-images" actions="""
|
||||
<$action-setfield $field="icon" $value=<<imageTitle>>/>
|
||||
<$action-deletetiddler $tiddler=<<qualify "$:/state/popup/image-picker">>/>
|
||||
"""/>
|
||||
</div>
|
||||
</$reveal>
|
||||
</div>
|
||||
</div>
|
||||
</p>
|
32
core/ui/Manager/ItemSidebarTags.tid
Normal file
32
core/ui/Manager/ItemSidebarTags.tid
Normal file
@ -0,0 +1,32 @@
|
||||
title: $:/Manager/ItemSidebar/Tags
|
||||
tags: $:/tags/Manager/ItemSidebar
|
||||
caption: {{$:/language/Manager/Item/Tags}}
|
||||
|
||||
\define tag-checkbox-actions()
|
||||
<$action-listops
|
||||
$tiddler="$:/config/Manager/RecentTags"
|
||||
$subfilter="[<tag>] [list[$:/config/Manager/RecentTags]] +[limit[12]]"
|
||||
/>
|
||||
\end
|
||||
|
||||
\define tag-picker-actions()
|
||||
<<tag-checkbox-actions>>
|
||||
<$action-listops
|
||||
$tiddler=<<currentTiddler>>
|
||||
$field="tags"
|
||||
$subfilter="[<tag>] [all[current]tags[]]"
|
||||
/>
|
||||
\end
|
||||
|
||||
<p>
|
||||
<$list filter="[is[current]tags[]] [list[$:/config/Manager/RecentTags]] +[sort[title]] " variable="tag">
|
||||
<div>
|
||||
<$checkbox tiddler=<<currentTiddler>> tag=<<tag>> actions=<<tag-checkbox-actions>>>
|
||||
<$macrocall $name="tag-pill" tag=<<tag>>/>
|
||||
</$checkbox>
|
||||
</div>
|
||||
</$list>
|
||||
</p>
|
||||
<p>
|
||||
<$macrocall $name="tag-picker" actions=<<tag-picker-actions>>/>
|
||||
</p>
|
10
core/ui/Manager/ItemSidebarTools.tid
Normal file
10
core/ui/Manager/ItemSidebarTools.tid
Normal file
@ -0,0 +1,10 @@
|
||||
title: $:/Manager/ItemSidebar/Tools
|
||||
tags: $:/tags/Manager/ItemSidebar
|
||||
caption: {{$:/language/Manager/Item/Tools}}
|
||||
|
||||
<p>
|
||||
<$button to=<<currentTiddler>>>{{$:/core/images/link}} open</$button>
|
||||
</p>
|
||||
<p>
|
||||
<$button message="tm-edit-tiddler" param=<<currentTiddler>>>{{$:/core/images/edit-button}} edit</$button>
|
||||
</p>
|
19
core/ui/PageControls/manager.tid
Normal file
19
core/ui/PageControls/manager.tid
Normal file
@ -0,0 +1,19 @@
|
||||
title: $:/core/ui/Buttons/manager
|
||||
tags: $:/tags/PageControls
|
||||
caption: {{$:/core/images/list}} {{$:/language/Buttons/Manager/Caption}}
|
||||
description: {{$:/language/Buttons/Manager/Hint}}
|
||||
|
||||
\define manager-button(class)
|
||||
<$button to="$:/Manager" tooltip={{$:/language/Buttons/Manager/Hint}} aria-label={{$:/language/Buttons/Manager/Caption}} class="""$(tv-config-toolbar-class)$ $class$""">
|
||||
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
|
||||
{{$:/core/images/list}}
|
||||
</$list>
|
||||
<$list filter="[<tv-config-toolbar-text>prefix[yes]]">
|
||||
<span class="tc-btn-text"><$text text={{$:/language/Buttons/Manager/Caption}}/></span>
|
||||
</$list>
|
||||
</$button>
|
||||
\end
|
||||
|
||||
<$list filter="[list[$:/StoryList]] +[field:title[$:/Manager]]" emptyMessage=<<manager-button>>>
|
||||
<<manager-button "tc-selected">>
|
||||
</$list>
|
@ -1,6 +1,7 @@
|
||||
title: $:/TagManager
|
||||
icon: $:/core/images/tag-button
|
||||
color: #bbb
|
||||
caption: {{$:/language/TagManager/Caption}}
|
||||
|
||||
\define lingo-base() $:/language/TagManager/
|
||||
\define iconEditorTab(type)
|
||||
@ -51,7 +52,7 @@ $title$$(currentTiddler)$
|
||||
<$list filter="[tags[]!is[system]sort[title]]">
|
||||
<tr>
|
||||
<td><$edit-text field="color" tag="input" type="color"/></td>
|
||||
<td><$transclude tiddler="$:/core/ui/TagTemplate"/></td>
|
||||
<td><$macrocall $name="tag" tag=<<currentTiddler>>/></td>
|
||||
<td><$count filter="[all[current]tagging[]]"/></td>
|
||||
<td>
|
||||
<$macrocall $name="iconEditor" title={{!!title}}/>
|
||||
|
@ -1,30 +1,3 @@
|
||||
title: $:/core/ui/TagTemplate
|
||||
|
||||
\define tag-styles()
|
||||
background-color:$(backgroundColor)$;
|
||||
fill:$(foregroundColor)$;
|
||||
color:$(foregroundColor)$;
|
||||
\end
|
||||
|
||||
\define tag-body-inner(colour,fallbackTarget,colourA,colourB)
|
||||
<$vars foregroundColor=<<contrastcolour target:"""$colour$""" fallbackTarget:"""$fallbackTarget$""" colourA:"""$colourA$""" colourB:"""$colourB$""">> backgroundColor="""$colour$""">
|
||||
<$button popup=<<qualify "$:/state/popup/tag">> class="tc-btn-invisible tc-tag-label" style=<<tag-styles>>>
|
||||
<$transclude tiddler={{!!icon}}/> <$view field="title" format="text" />
|
||||
</$button>
|
||||
<$reveal state=<<qualify "$:/state/popup/tag">> type="popup" position="below" animate="yes" class="tc-drop-down"><$transclude tiddler="$:/core/ui/ListItemTemplate"/>
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/TagDropdown]!has[draft.of]]" variable="listItem">
|
||||
<$transclude tiddler=<<listItem>>/>
|
||||
</$list>
|
||||
<hr>
|
||||
<$list filter="[all[current]tagging[]]" template="$:/core/ui/ListItemTemplate"/>
|
||||
</$reveal>
|
||||
</$vars>
|
||||
\end
|
||||
|
||||
\define tag-body(colour,palette)
|
||||
<span class="tc-tag-list-item">
|
||||
<$macrocall $name="tag-body-inner" colour="""$colour$""" fallbackTarget={{$palette$##tag-background}} colourA={{$palette$##foreground}} colourB={{$palette$##background}}/>
|
||||
</span>
|
||||
\end
|
||||
|
||||
<$macrocall $name="tag-body" colour={{!!color}} palette={{$:/palette}}/>
|
||||
<$macrocall $name="tag" tag=<<currentTiddler>>/>
|
||||
|
8
core/wiki/config/Manager.multids
Normal file
8
core/wiki/config/Manager.multids
Normal file
@ -0,0 +1,8 @@
|
||||
title: $:/config/Manager/
|
||||
|
||||
Show: tiddlers
|
||||
Filter:
|
||||
Order: forward
|
||||
Sort: title
|
||||
System: system
|
||||
Tag:
|
3
core/wiki/config/ManagerItemState.multids
Normal file
3
core/wiki/config/ManagerItemState.multids
Normal file
@ -0,0 +1,3 @@
|
||||
title: $:/state/popup/manager/item/$:/Manager/
|
||||
|
||||
ItemMain/RawText: hide
|
@ -11,6 +11,7 @@ core/ui/Buttons/refresh: hide
|
||||
core/ui/Buttons/import: hide
|
||||
core/ui/Buttons/language: hide
|
||||
core/ui/Buttons/tag-manager: hide
|
||||
core/ui/Buttons/manager: hide
|
||||
core/ui/Buttons/more-page-actions: hide
|
||||
core/ui/Buttons/new-journal: hide
|
||||
core/ui/Buttons/new-image: hide
|
||||
|
@ -1,26 +1,35 @@
|
||||
title: $:/core/macros/image-picker
|
||||
tags: $:/tags/Macro
|
||||
|
||||
\define image-picker-inner(actions)
|
||||
\define image-picker-thumbnail(actions)
|
||||
<$button tag="a" tooltip="""$(imageTitle)$""">
|
||||
|
||||
$actions$
|
||||
|
||||
<$transclude tiddler=<<imageTitle>>/>
|
||||
|
||||
</$button>
|
||||
\end
|
||||
|
||||
\define image-picker(actions,subfilter:"")
|
||||
<div class="tc-image-chooser">
|
||||
|
||||
<$list filter="[all[shadows+tiddlers]is[image]$subfilter$!has[draft.of]] -[type[application/pdf]] +[sort[title]]" variable="imageTitle">
|
||||
|
||||
<$macrocall $name="image-picker-inner" actions="""$actions$"""/>
|
||||
|
||||
\define image-picker-list(filter,actions)
|
||||
<$list filter="""$filter$""" variable="imageTitle">
|
||||
<$macrocall $name="image-picker-thumbnail" actions="""$actions$"""/>
|
||||
</$list>
|
||||
|
||||
</div>
|
||||
|
||||
\end
|
||||
|
||||
\define image-picker(actions,filter:"[all[shadows+tiddlers]is[image]] -[type[application/pdf]] +[!has[draft.of]sort[title]]")
|
||||
<div class="tc-image-chooser">
|
||||
<$vars state-system=<<qualify "$:/state/image-picker/system">>>
|
||||
<$checkbox tiddler=<<state-system>> field="text" checked="show" unchecked="hide" default="hide">
|
||||
{{$:/language/SystemTiddlers/Include/Prompt}}
|
||||
</$checkbox>
|
||||
<$reveal state=<<state-system>> type="match" text="hide" default="hide" tag="div">
|
||||
<$macrocall $name="image-picker-list" filter="""$filter$ +[!is[system]]""" actions="""$actions$"""/>
|
||||
</$reveal>
|
||||
<$reveal state=<<state-system>> type="nomatch" text="hide" default="hide" tag="div">
|
||||
<$macrocall $name="image-picker-list" filter="""$filter$""" actions="""$actions$"""/>
|
||||
</$reveal>
|
||||
</$vars>
|
||||
</div>
|
||||
\end
|
||||
|
||||
\define image-picker-include-tagged-images(actions)
|
||||
<$macrocall $name="image-picker" filter="[all[shadows+tiddlers]is[image]] [all[shadows+tiddlers]tag[$:/tags/Image]] -[type[application/pdf]] +[!has[draft.of]sort[title]]" actions="""$actions$"""/>
|
||||
\end
|
||||
|
41
core/wiki/macros/tag-picker.tid
Normal file
41
core/wiki/macros/tag-picker.tid
Normal file
@ -0,0 +1,41 @@
|
||||
title: $:/core/macros/tag-picker
|
||||
tags: $:/tags/Macro
|
||||
|
||||
\define tag-button()
|
||||
<$button class="tc-btn-invisible" tag="a">
|
||||
$(actions)$
|
||||
<$action-deletetiddler $tiddler="$:/temp/NewTagName"/>
|
||||
<$macrocall $name="tag-pill" tag=<<tag>>/>
|
||||
</$button>
|
||||
\end
|
||||
|
||||
\define tag-picker(actions)
|
||||
<$set name="actions" value="""$actions$""">
|
||||
<div class="tc-edit-add-tag">
|
||||
<span class="tc-add-tag-name">
|
||||
<$edit-text tiddler="$:/temp/NewTagName" tag="input" default="" placeholder={{$:/language/EditTemplate/Tags/Add/Placeholder}} focusPopup=<<qualify "$:/state/popup/tags-auto-complete">> class="tc-edit-texteditor tc-popup-handle"/>
|
||||
</span> <$button popup=<<qualify "$:/state/popup/tags-auto-complete">> class="tc-btn-invisible" tooltip={{$:/language/EditTemplate/Tags/Dropdown/Hint}} aria-label={{$:/language/EditTemplate/Tags/Dropdown/Caption}}>{{$:/core/images/down-arrow}}</$button> <span class="tc-add-tag-button">
|
||||
<$set name="tag" value={{$:/temp/NewTagName}}>
|
||||
<$button set="$:/temp/NewTagName" setTo="" class="">
|
||||
$actions$
|
||||
<$action-deletetiddler $tiddler="$:/temp/NewTagName"/>
|
||||
{{$:/language/EditTemplate/Tags/Add/Button}}
|
||||
</$button>
|
||||
</$set>
|
||||
</span>
|
||||
</div>
|
||||
<div class="tc-block-dropdown-wrapper">
|
||||
<$reveal state=<<qualify "$:/state/popup/tags-auto-complete">> type="nomatch" text="" default="">
|
||||
<div class="tc-block-dropdown">
|
||||
<$list filter="[tags[]!is[system]search:title{$:/temp/NewTagName}sort[]]" variable="tag">
|
||||
<<tag-button>>
|
||||
</$list>
|
||||
<hr>
|
||||
<$list filter="[tags[]is[system]search:title{$:/temp/NewTagName}sort[]]" variable="tag">
|
||||
<<tag-button>>
|
||||
</$list>
|
||||
</div>
|
||||
</$reveal>
|
||||
</div>
|
||||
</$set>
|
||||
\end
|
@ -1,6 +1,44 @@
|
||||
title: $:/core/macros/tag
|
||||
tags: $:/tags/Macro
|
||||
|
||||
\define tag(tag)
|
||||
{{$tag$||$:/core/ui/TagTemplate}}
|
||||
\define tag-pill-styles()
|
||||
background-color:$(backgroundColor)$;
|
||||
fill:$(foregroundColor)$;
|
||||
color:$(foregroundColor)$;
|
||||
\end
|
||||
|
||||
\define tag-pill-inner(tag,icon,colour,fallbackTarget,colourA,colourB,element-tag,element-attributes,actions)
|
||||
<$vars foregroundColor=<<contrastcolour target:"""$colour$""" fallbackTarget:"""$fallbackTarget$""" colourA:"""$colourA$""" colourB:"""$colourB$""">> backgroundColor="""$colour$""">
|
||||
<$element-tag$ $element-attributes$ class="tc-tag-label tc-btn-invisible" style=<<tag-pill-styles>>>
|
||||
$actions$<$transclude tiddler="""$icon$"""/> <$view tiddler="""$tag$""" field="title" format="text" />
|
||||
</$element-tag$>
|
||||
</$vars>
|
||||
\end
|
||||
|
||||
\define tag-pill-body(tag,icon,colour,palette,element-tag,element-attributes,actions)
|
||||
<$macrocall $name="tag-pill-inner" tag="""$tag$""" icon="""$icon$""" colour="""$colour$""" fallbackTarget={{$palette$##tag-background}} colourA={{$palette$##foreground}} colourB={{$palette$##background}} element-tag="""$element-tag$""" element-attributes="""$element-attributes$""" actions="""$actions$"""/>
|
||||
\end
|
||||
|
||||
\define tag-pill(tag,element-tag:"span",element-attributes:"",actions:"")
|
||||
<span class="tc-tag-list-item">
|
||||
<$macrocall $name="tag-pill-body" tag="""$tag$""" icon={{$tag$!!icon}} colour={{$tag$!!color}} palette={{$:/palette}} element-tag="""$element-tag$""" element-attributes="""$element-attributes$""" actions="""$actions$"""/>
|
||||
</span>
|
||||
\end
|
||||
|
||||
\define tag(tag)
|
||||
<span class="tc-tag-list-item">
|
||||
<$set name="transclusion" value="""$tag$""">
|
||||
<$macrocall $name="tag-pill-body" tag="""$tag$""" icon={{$tag$!!icon}} colour={{$tag$!!color}} palette={{$:/palette}} element-tag="""$button""" element-attributes="""popup=<<qualify "$:/state/popup/tag">>"""/>
|
||||
<$reveal state=<<qualify "$:/state/popup/tag">> type="popup" position="below" animate="yes" class="tc-drop-down">
|
||||
<$tiddler tiddler="""$tag$""">
|
||||
<$transclude tiddler="$:/core/ui/ListItemTemplate"/>
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/TagDropdown]!has[draft.of]]" variable="listItem">
|
||||
<$transclude tiddler=<<listItem>>/>
|
||||
</$list>
|
||||
<hr>
|
||||
<$list filter="[all[current]tagging[]]" template="$:/core/ui/ListItemTemplate"/>
|
||||
</$tiddler>
|
||||
</$reveal>
|
||||
</$set>
|
||||
</span>
|
||||
\end
|
||||
|
2
core/wiki/tags/ManagerItemMain.tid
Normal file
2
core/wiki/tags/ManagerItemMain.tid
Normal file
@ -0,0 +1,2 @@
|
||||
title: $:/tags/Manager/ItemMain
|
||||
list: $:/Manager/ItemMain/WikifiedText $:/Manager/ItemMain/RawText $:/Manager/ItemMain/Fields
|
2
core/wiki/tags/ManagerItemSidebar.tid
Normal file
2
core/wiki/tags/ManagerItemSidebar.tid
Normal file
@ -0,0 +1,2 @@
|
||||
title: $:/tags/Manager/ItemSidebar
|
||||
list: $:/Manager/ItemSidebar/Tags $:/Manager/ItemSidebar/Colour $:/Manager/ItemSidebar/Icon $:/Manager/ItemSidebar/Tools
|
@ -1,2 +1,2 @@
|
||||
title: $:/tags/PageControls
|
||||
list: [[$:/core/ui/Buttons/home]] [[$:/core/ui/Buttons/close-all]] [[$:/core/ui/Buttons/fold-all]] [[$:/core/ui/Buttons/unfold-all]] [[$:/core/ui/Buttons/permaview]] [[$:/core/ui/Buttons/new-tiddler]] [[$:/core/ui/Buttons/new-journal]] [[$:/core/ui/Buttons/new-image]] [[$:/core/ui/Buttons/import]] [[$:/core/ui/Buttons/export-page]] [[$:/core/ui/Buttons/control-panel]] [[$:/core/ui/Buttons/advanced-search]] [[$:/core/ui/Buttons/tag-manager]] [[$:/core/ui/Buttons/language]] [[$:/core/ui/Buttons/palette]] [[$:/core/ui/Buttons/theme]] [[$:/core/ui/Buttons/storyview]] [[$:/core/ui/Buttons/encryption]] [[$:/core/ui/Buttons/full-screen]] [[$:/core/ui/Buttons/save-wiki]] [[$:/core/ui/Buttons/refresh]] [[$:/core/ui/Buttons/more-page-actions]]
|
||||
list: [[$:/core/ui/Buttons/home]] [[$:/core/ui/Buttons/close-all]] [[$:/core/ui/Buttons/fold-all]] [[$:/core/ui/Buttons/unfold-all]] [[$:/core/ui/Buttons/permaview]] [[$:/core/ui/Buttons/new-tiddler]] [[$:/core/ui/Buttons/new-journal]] [[$:/core/ui/Buttons/new-image]] [[$:/core/ui/Buttons/import]] [[$:/core/ui/Buttons/export-page]] [[$:/core/ui/Buttons/control-panel]] [[$:/core/ui/Buttons/advanced-search]] [[$:/core/ui/Buttons/manager]] [[$:/core/ui/Buttons/tag-manager]] [[$:/core/ui/Buttons/language]] [[$:/core/ui/Buttons/palette]] [[$:/core/ui/Buttons/theme]] [[$:/core/ui/Buttons/storyview]] [[$:/core/ui/Buttons/encryption]] [[$:/core/ui/Buttons/timestamp]] [[$:/core/ui/Buttons/full-screen]] [[$:/core/ui/Buttons/print]] [[$:/core/ui/Buttons/save-wiki]] [[$:/core/ui/Buttons/refresh]] [[$:/core/ui/Buttons/more-page-actions]]
|
||||
|
@ -27,38 +27,11 @@ describe("Utility tests", function() {
|
||||
|
||||
it("should handle formatting a date string", function() {
|
||||
var fds = $tw.utils.formatDateString,
|
||||
// nov is month: 10!
|
||||
d = new Date(2014,10,9,17,41,28,542);
|
||||
expect(fds(d,"DDD DD MMM YYYY")).toBe("Sunday 9 November 2014");
|
||||
expect(fds(d,"ddd hh mm ssss")).toBe("Sun 17 41 2828");
|
||||
expect(fds(d,"MM0DD")).toBe("1109");
|
||||
expect(fds(d,"MM0\\D\\D")).toBe("110DD");
|
||||
|
||||
// test some edge cases found at: https://en.wikipedia.org/wiki/ISO_week_date
|
||||
// 2016-11-13 is Week 45 and it's a Sunday (month nr: 10)
|
||||
d = new Date(2016,10,12,23,59,59);
|
||||
expect(fds(d,"WW")).toBe("45");
|
||||
d = new Date(2016,10,13,23,59,59,999);
|
||||
expect(fds(d,"WW")).toBe("45");
|
||||
d = new Date(2016,10,13,23,59,60); // see 60 seconds. so it's week 46
|
||||
expect(fds(d,"WW")).toBe("46");
|
||||
|
||||
// 2006 Dez. 31 is end of week 52 (month nr: 11)
|
||||
d = new Date(2006,11,31,23,59,59);
|
||||
expect(fds(d,"WW")).toBe("52");
|
||||
d = new Date(2006,11,31,23,59,60);
|
||||
expect(fds(d,"WW")).toBe("1");
|
||||
|
||||
// 2010 Jan 03 is in week 53 (month nr: 0)
|
||||
d = new Date(2010,0,3,23,59,59);
|
||||
expect(fds(d,"WW")).toBe("53");
|
||||
d = new Date(2010,0,3,23,59,60);
|
||||
expect(fds(d,"WW")).toBe("1");
|
||||
|
||||
// 2014 12 29 is in week 1 of 2015 (month nr. 11)
|
||||
d = new Date(2014,11,29,23,59,59);
|
||||
expect(fds(d,"WW")).toBe("1");
|
||||
expect(fds(d,"wYYYY")).toBe("2015");
|
||||
});
|
||||
|
||||
it("should parse text references", function() {
|
||||
|
@ -1,13 +1,13 @@
|
||||
caption: all
|
||||
created: 20140410103123179
|
||||
modified: 20150220160957000
|
||||
modified: 20161128185445034
|
||||
op-input: ignored, unless the parameter is empty
|
||||
op-output: the titles that belong to all the specified categories
|
||||
op-parameter: zero or more categories
|
||||
op-purpose: find all titles of a fundamental category
|
||||
tags: [[Filter Operators]] [[Common Operators]] [[Selection Constructors]]
|
||||
title: all Operator
|
||||
type: text/vnd.tiddlywiki
|
||||
caption: all
|
||||
op-purpose: find all titles of a fundamental category
|
||||
op-input: ignored, unless the parameter is empty
|
||||
op-parameter: zero or more categories
|
||||
op-output: the titles that belong to all the specified categories
|
||||
|
||||
The parameter specifies zero or more fundamental categories using the following syntax:
|
||||
|
||||
@ -21,6 +21,7 @@ The parameter specifies zero or more fundamental categories using the following
|
||||
|^`orphans` |all tiddlers to which there are <<.em no>> hard links |^by title |
|
||||
|^`shadows` |all the [[shadow tiddlers|ShadowTiddlers]] that exist, including any that have been overridden with non-shadow tiddlers |^no |
|
||||
|^`tiddlers` |all the non-shadow tiddlers that exist |no |
|
||||
|^`tags` |all the tags in use on non-shadow tiddlers |no |
|
||||
|
||||
If the parameter specifies more than one category, they are processed from left to right. The overall output is initially empty, and each category's output is [[dominantly appended|Dominant Append]] to it in turn. Unrecognised categories contribute nothing to the output.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
created: 20140410103123179
|
||||
modified: 20150220161001000
|
||||
modified: 20161127142329969
|
||||
tags: [[Filter Operators]] [[Common Operators]] [[Negatable Operators]]
|
||||
title: is Operator
|
||||
type: text/vnd.tiddlywiki
|
||||
@ -23,7 +23,7 @@ The parameter <<.place C>> is one of the following fundamental categories:
|
||||
|^`tag` |is in use as a tag |
|
||||
|^`tiddler` |exists as a non-shadow tiddler |
|
||||
|
||||
If <<.place C>> is anything else, the output is an error message.
|
||||
If <<.place C>> is anything else an error message is returned. <<.from-version "5.1.14"> if <<.place C>> is blank, the output is passed through unchanged (in earlier versions an error message was returned).
|
||||
|
||||
`!is[tiddler]` is a synonym for `is[missing]`, and vice versa.
|
||||
|
||||
|
15
editions/tw5.com/tiddlers/filters/order_Operator.tid
Normal file
15
editions/tw5.com/tiddlers/filters/order_Operator.tid
Normal file
@ -0,0 +1,15 @@
|
||||
caption: order
|
||||
created: 20161128185907280
|
||||
modified: 20161128191251557
|
||||
op-input: a [[selection of titles|Title Selection]]
|
||||
op-output: the input, with the order reversed if <<.field F>> is the special value `reverse`
|
||||
op-parameter: Either the string `reverse` or another value
|
||||
op-parameter-name: F
|
||||
op-purpose: selectively reverse the input list
|
||||
tags: [[Filter Operators]] [[Common Operators]] [[Field Operators]] [[Order Operators]]
|
||||
title: order Operator
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
Either reverses or preserves the order of the input list according to whether the parameter is the special value `reverse`.
|
||||
|
||||
<<.operator-examples "order">>
|
@ -1,18 +1,23 @@
|
||||
caption: tag
|
||||
created: 20140410103123179
|
||||
modified: 20150203191853000
|
||||
modified: 20161126122900712
|
||||
op-input: a [[selection of titles|Title Selection]]
|
||||
op-neg-output: those input tiddlers that do <<.em not>> have tag <<.place T>>
|
||||
op-output: those input tiddlers that have tag <<.place T>>
|
||||
op-parameter: the title of a [[tag|Tagging]]
|
||||
op-parameter-name: T
|
||||
op-purpose: filter the input by tag
|
||||
op-suffix: <<.from-version "5.1.14">> optional `strict` flag
|
||||
op-suffix-name: S
|
||||
tags: [[Filter Operators]] [[Common Operators]] [[Tag Operators]] [[Negatable Operators]]
|
||||
title: tag Operator
|
||||
type: text/vnd.tiddlywiki
|
||||
caption: tag
|
||||
op-purpose: filter the input by tag
|
||||
op-input: a [[selection of titles|Title Selection]]
|
||||
op-parameter: the title of a [[tag|Tagging]]
|
||||
op-parameter-name: T
|
||||
op-output: those input tiddlers that have tag <<.place T>>
|
||||
op-neg-output: those input tiddlers that do <<.em not>> have tag <<.place T>>
|
||||
|
||||
The output is [[sorted|Order of Tagged Tiddlers]] using the tag's <<.field list>> field and the tiddlers' <<.field list-before>> and <<.field list-after>> fields.
|
||||
|
||||
If <<.place T>> is empty, the output of `tag` is empty, and the output of `!tag` is a copy of the input.
|
||||
The behaviour when <<.place T>> is empty depends on the settings of the <<.place S>> optional suffix:
|
||||
|
||||
* if <<.place T>> is missing and <<.place S>> is either missing or set to "loose", then the output of `tag` is empty, and the output of `!tag` is a copy of the input.
|
||||
* <<.from-version "5.1.14">> if <<.place T>> is missing and <<.place S>> is set to "strict", then the output of both `tag` and `!tag` is a copy of the input
|
||||
|
||||
<<.operator-examples "tag">>
|
||||
|
15
editions/tw5.com/tiddlers/macros/tag-picker_Macro.tid
Normal file
15
editions/tw5.com/tiddlers/macros/tag-picker_Macro.tid
Normal file
@ -0,0 +1,15 @@
|
||||
caption: tag-picker
|
||||
created: 20161128191316701
|
||||
modified: 20161128191435641
|
||||
tags: Macros [[Core Macros]]
|
||||
title: tag-picker Macro
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
The <<.def tag-picker>> [[macro|Macros]] generates a combination of a text box and a button that allows a tag to be selected and added.
|
||||
|
||||
!! Parameters
|
||||
|
||||
;actions
|
||||
: Action widgets to be triggered when the pill is clicked. Within the text, the variable ''tag'' contains the title of the selected tag.
|
||||
|
||||
<<.macro-examples "tag-picker">>
|
21
editions/tw5.com/tiddlers/macros/tag-pill_Macro.tid
Normal file
21
editions/tw5.com/tiddlers/macros/tag-pill_Macro.tid
Normal file
@ -0,0 +1,21 @@
|
||||
caption: tag-pill
|
||||
created: 20161128190930538
|
||||
modified: 20161128191220364
|
||||
tags: Macros [[Core Macros]]
|
||||
title: tag-pill Macro
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
The <<.def tag-pill>> [[macro|Macros]] generates a static tag pill showing a specified tag, but without the dropdown action provided by the [[tag Macro]].
|
||||
|
||||
!! Parameters
|
||||
|
||||
;tag
|
||||
: The title of the tag
|
||||
;element-tag
|
||||
: The element name to be used for the pill (defaults to "span")
|
||||
;element-attributes
|
||||
: Additional attributes for the pill element
|
||||
;actions
|
||||
: Action widgets to be triggered when the pill is clicked. Within the text, the macro parameter ''tag'' contains the title of the selected tag.
|
||||
|
||||
<<.macro-examples "tag-pill">>
|
@ -1725,6 +1725,113 @@ html body.tc-body.tc-single-tiddler-window {
|
||||
border: none;
|
||||
}
|
||||
|
||||
/*
|
||||
** Manager
|
||||
*/
|
||||
|
||||
.tc-manager-wrapper {
|
||||
|
||||
}
|
||||
|
||||
.tc-manager-controls {
|
||||
|
||||
}
|
||||
|
||||
.tc-manager-control {
|
||||
margin: 0.5em 0;
|
||||
}
|
||||
|
||||
.tc-manager-list {
|
||||
width: 100%;
|
||||
border-top: 1px solid <<colour muted-foreground>>;
|
||||
border-left: 1px solid <<colour muted-foreground>>;
|
||||
border-right: 1px solid <<colour muted-foreground>>;
|
||||
}
|
||||
|
||||
.tc-manager-list-item {
|
||||
|
||||
}
|
||||
|
||||
.tc-manager-list-item-heading {
|
||||
display: block;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
border-bottom: 1px solid <<colour muted-foreground>>;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
.tc-manager-list-item-heading-selected {
|
||||
font-weight: bold;
|
||||
color: <<colour background>>;
|
||||
fill: <<colour background>>;
|
||||
background-color: <<colour foreground>>;
|
||||
}
|
||||
|
||||
.tc-manager-list-item-heading:hover {
|
||||
background: <<colour primary>>;
|
||||
color: <<colour background>>;
|
||||
}
|
||||
|
||||
.tc-manager-list-item-content {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.tc-manager-list-item-content-sidebar {
|
||||
flex: 1 0;
|
||||
background: <<colour tiddler-editor-background>>;
|
||||
border-right: 0.5em solid <<colour muted-foreground>>;
|
||||
border-bottom: 0.5em solid <<colour muted-foreground>>;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.tc-manager-list-item-content-item-heading {
|
||||
display: block;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
background: <<colour muted-foreground>>;
|
||||
text-transform: uppercase;
|
||||
font-size: 0.6em;
|
||||
font-weight: bold;
|
||||
padding: 0.5em 0 0.5em 0;
|
||||
}
|
||||
|
||||
.tc-manager-list-item-content-item-body {
|
||||
padding: 0 0.5em 0 0.5em;
|
||||
}
|
||||
|
||||
.tc-manager-list-item-content-item-body > pre {
|
||||
margin: 0.5em 0 0.5em 0;
|
||||
border: none;
|
||||
background: inherit;
|
||||
}
|
||||
|
||||
.tc-manager-list-item-content-tiddler {
|
||||
flex: 3 1;
|
||||
border-left: 0.5em solid <<colour muted-foreground>>;
|
||||
border-right: 0.5em solid <<colour muted-foreground>>;
|
||||
border-bottom: 0.5em solid <<colour muted-foreground>>;
|
||||
}
|
||||
|
||||
.tc-manager-list-item-content-item-body > table {
|
||||
border: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.tc-manager-list-item-content-item-body > table td {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.tc-manager-icon-editor > button {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.tc-manager-icon-editor > button > svg,
|
||||
.tc-manager-icon-editor > button > button {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/*
|
||||
** Alerts
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user