From a9b54d6fce56055afa323df43e259c531d216506 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Mon, 28 Nov 2016 10:40:55 +0000 Subject: [PATCH] Revert "Add provisional version of new tagger manager" --- core/images/list.tid | 9 -- core/language/en-GB/Buttons.multids | 2 - core/modules/filters/all/tags.js | 22 ---- core/modules/filters/is.js | 17 +-- core/modules/filters/listops.js | 17 --- core/modules/filters/tag.js | 31 ++---- core/modules/filters/untagged.js | 12 +-- core/modules/widgets/checkbox.js | 7 +- core/modules/widgets/dropzone.js | 56 ++++------ core/ui/EditTemplate/tags.tid | 41 +++++--- core/ui/Manager.tid | 111 -------------------- core/ui/Manager/ItemMainFields.tid | 9 -- core/ui/Manager/ItemMainRawText.tid | 5 - core/ui/Manager/ItemMainWikifiedText.tid | 5 - core/ui/Manager/ItemSidebarColour.tid | 15 --- core/ui/Manager/ItemSidebarIcon.tid | 9 -- core/ui/Manager/ItemSidebarTagsEditor.tid | 16 --- core/ui/Manager/ItemSidebarTools.tid | 10 -- core/ui/PageControls/manager.tid | 19 ---- core/ui/TagManager.tid | 3 +- core/ui/TagTemplate.tid | 29 ++++- core/wiki/config/Manager.multids | 10 -- core/wiki/config/ManagerItemState.multids | 3 - core/wiki/config/PageControlButtons.multids | 1 - core/wiki/macros/image-picker.tid | 23 ++-- core/wiki/macros/tag-picker.tid | 41 -------- core/wiki/macros/tag.tid | 40 +------ core/wiki/tags/ManagerItemMain.tid | 2 - core/wiki/tags/ManagerItemSidebar.tid | 2 - core/wiki/tags/PageControls.tid | 2 +- editions/tw5.com/tiddlers/filters/is.tid | 4 +- editions/tw5.com/tiddlers/filters/tag.tid | 23 ++-- themes/tiddlywiki/snowwhite/base.tid | 2 +- themes/tiddlywiki/vanilla/base.tid | 105 ------------------ 34 files changed, 119 insertions(+), 584 deletions(-) delete mode 100644 core/images/list.tid delete mode 100644 core/modules/filters/all/tags.js delete mode 100644 core/ui/Manager.tid delete mode 100644 core/ui/Manager/ItemMainFields.tid delete mode 100644 core/ui/Manager/ItemMainRawText.tid delete mode 100644 core/ui/Manager/ItemMainWikifiedText.tid delete mode 100644 core/ui/Manager/ItemSidebarColour.tid delete mode 100644 core/ui/Manager/ItemSidebarIcon.tid delete mode 100644 core/ui/Manager/ItemSidebarTagsEditor.tid delete mode 100644 core/ui/Manager/ItemSidebarTools.tid delete mode 100644 core/ui/PageControls/manager.tid delete mode 100644 core/wiki/config/Manager.multids delete mode 100644 core/wiki/config/ManagerItemState.multids delete mode 100644 core/wiki/macros/tag-picker.tid delete mode 100644 core/wiki/tags/ManagerItemMain.tid delete mode 100644 core/wiki/tags/ManagerItemSidebar.tid diff --git a/core/images/list.tid b/core/images/list.tid deleted file mode 100644 index c27a51647..000000000 --- a/core/images/list.tid +++ /dev/null @@ -1,9 +0,0 @@ -title: $:/core/images/list -tags: $:/tags/Image - - - - - - - \ No newline at end of file diff --git a/core/language/en-GB/Buttons.multids b/core/language/en-GB/Buttons.multids index 5c8398f6d..3a8f21969 100644 --- a/core/language/en-GB/Buttons.multids +++ b/core/language/en-GB/Buttons.multids @@ -54,8 +54,6 @@ 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 diff --git a/core/modules/filters/all/tags.js b/core/modules/filters/all/tags.js deleted file mode 100644 index 2aaa9dec2..000000000 --- a/core/modules/filters/all/tags.js +++ /dev/null @@ -1,22 +0,0 @@ -/*\ -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()); -}; - -})(); diff --git a/core/modules/filters/is.js b/core/modules/filters/is.js index 514443a62..0db243044 100644 --- a/core/modules/filters/is.js +++ b/core/modules/filters/is.js @@ -28,20 +28,11 @@ Export our filter function exports.is = function(source,operator,options) { // Dispatch to the correct isfilteroperator var isFilterOperators = getIsFilterOperators(); - if(operator.operand) { - var isFilterOperator = isFilterOperators[operator.operand]; - if(isFilterOperator) { - return isFilterOperator(source,operator.prefix,options); - } else { - return [$tw.language.getString("Error/IsFilterOperator")]; - } + var isFilterOperator = isFilterOperators[operator.operand]; + if(isFilterOperator) { + return isFilterOperator(source,operator.prefix,options); } else { - // Return all tiddlers if the operand is missing - var results = []; - source(function(tiddler,title) { - results.push(title); - }); - return results; + return [$tw.language.getString("Error/IsFilterOperator")]; } }; diff --git a/core/modules/filters/listops.js b/core/modules/filters/listops.js index d7a07b62a..58f74f092 100644 --- a/core/modules/filters/listops.js +++ b/core/modules/filters/listops.js @@ -12,23 +12,6 @@ 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 */ diff --git a/core/modules/filters/tag.js b/core/modules/filters/tag.js index a421c61d7..408d7f98f 100644 --- a/core/modules/filters/tag.js +++ b/core/modules/filters/tag.js @@ -17,30 +17,19 @@ Export our filter function */ exports.tag = function(source,operator,options) { var results = []; - if((operator.suffix || "").toLowerCase() === "strict" && !operator.operand) { - // New semantics: - // Always return copy of input if operator.operand is missing + if(operator.prefix === "!") { source(function(tiddler,title) { - results.push(title); + if(tiddler && !tiddler.hasTag(operator.operand)) { + results.push(title); + } }); } else { - // 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); - } + source(function(tiddler,title) { + if(tiddler && tiddler.hasTag(operator.operand)) { + results.push(title); + } + }); + results = options.wiki.sortByList(results,operator.operand); } return results; }; diff --git a/core/modules/filters/untagged.js b/core/modules/filters/untagged.js index ed0f90ff4..5a08b4edc 100644 --- a/core/modules/filters/untagged.js +++ b/core/modules/filters/untagged.js @@ -16,22 +16,16 @@ Filter operator returning all the selected tiddlers that are untagged Export our filter function */ exports.untagged = function(source,operator,options) { - var results = [], - isTagged = (operator.operand || operator.suffix || "").toLowerCase() === "no" ? - function(tiddler) { - return false; - } : function(tiddler) { - return tiddler && $tw.utils.isArray(tiddler.fields.tags) && tiddler.fields.tags.length > 0; - }; + var results = []; if(operator.prefix === "!") { source(function(tiddler,title) { - if(isTagged(tiddler)) { + if(tiddler && $tw.utils.isArray(tiddler.fields.tags) && tiddler.fields.tags.length > 0) { $tw.utils.pushTop(results,title); } }); } else { source(function(tiddler,title) { - if(!isTagged(tiddler)) { + if(!tiddler || !tiddler.hasField("tags") || ($tw.utils.isArray(tiddler.fields.tags) && tiddler.fields.tags.length === 0)) { $tw.utils.pushTop(results,title); } }); diff --git a/core/modules/widgets/checkbox.js b/core/modules/widgets/checkbox.js index 6c1d64feb..2480ff319 100644 --- a/core/modules/widgets/checkbox.js +++ b/core/modules/widgets/checkbox.js @@ -65,12 +65,7 @@ CheckboxWidget.prototype.getValue = function() { } } if(this.checkboxField) { - var value; - if($tw.utils.hop(tiddler.fields,this.checkboxField)) { - value = tiddler.fields[this.checkboxField] || ""; - } else { - value = this.checkboxDefault || ""; - } + var value = tiddler.fields[this.checkboxField] || this.checkboxDefault || ""; if(value === this.checkboxChecked) { return true; } diff --git a/core/modules/widgets/dropzone.js b/core/modules/widgets/dropzone.js index f7f75b0ab..4ac8e78f4 100644 --- a/core/modules/widgets/dropzone.js +++ b/core/modules/widgets/dropzone.js @@ -202,42 +202,32 @@ DropZoneWidget.prototype.importDataTypes = [ ]; DropZoneWidget.prototype.handlePasteEvent = function(event) { - var self = this, - createTiddlerFromString = function(text,type) { - var tiddlerFields = { - title: self.wiki.generateNewTitle("Untitled"), - text: text, - type: type - }; - if($tw.log.IMPORT) { - console.log("Importing string '" + text + "', type: '" + type + "'"); - } - self.dispatchEvent({type: "tm-import-tiddlers", param: JSON.stringify([tiddlerFields])}); - }; // Let the browser handle it if we're in a textarea or input box if(["TEXTAREA","INPUT"].indexOf(event.target.tagName) == -1) { - var items = event.clipboardData.items; + var self = this, + items = event.clipboardData.items; // Enumerate the clipboard items - if(items) { - for(var t = 0; t> backgroundColor="""$colour$"""> > class="tc-tag-label"> @@ -17,24 +15,39 @@ color:$(foregroundColor)$; \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=<> - $field="tags" - $subfilter="[] [all[current]tags[]]" -/> -\end -
<$fieldmangler> <$list filter="[all[current]tags[]sort[title]]" storyview="pop"> <$macrocall $name="tag-body" colour={{!!color}} palette={{$:/palette}}/> - -<$macrocall $name="tag-picker" actions=<>/> + +
+ +<$edit-text tiddler="$:/temp/NewTagName" tag="input" default="" placeholder={{$:/language/EditTemplate/Tags/Add/Placeholder}} focusPopup=<> class="tc-edit-texteditor tc-popup-handle"/> + <$button popup=<> 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 message="tm-add-tag" param={{$:/temp/NewTagName}} set="$:/temp/NewTagName" setTo="" class=""> +<> + +
+ +
+<$reveal state=<> type="nomatch" text="" default=""> +
+<$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 filter="[tags[]is[system]search:title{$:/temp/NewTagName}sort[]]"> +{{||$:/core/ui/Components/tag-link}} + + +
+ +
+ +
\ No newline at end of file diff --git a/core/ui/Manager.tid b/core/ui/Manager.tid deleted file mode 100644 index 941ece4d7..000000000 --- a/core/ui/Manager.tid +++ /dev/null @@ -1,111 +0,0 @@ -title: $:/Manager -icon: $:/core/images/list -color: #bbb - -\define tag-checkbox-actions() -<$action-listops - $tiddler="$:/config/Manager/RecentTags" - $subfilter="[] [list[$:/config/Manager/RecentTags]] +[limit[12]]" -/> -\end - -\define tag-picker-actions() -<> -<$action-listops - $tiddler=<> - $field="tags" - $subfilter="[] [all[current]tags[]]" -/> -\end - -\define list-item-content-item() -
- <$vars state-title="""$:/state/popup/manager/item/$(listItem)$"""> - <$reveal state=<> type="match" text="show" default="show" tag="div"> - <$button set=<> setTo="hide" class="tc-btn-invisible tc-manager-list-item-content-item-heading"> - {{$:/core/images/down-arrow}} <$transclude tiddler=<> field="caption"/> - - - <$reveal state=<> type="nomatch" text="show" default="show" tag="div"> - <$button set=<> setTo="show" class="tc-btn-invisible tc-manager-list-item-content-item-heading"> - {{$:/core/images/right-arrow}} <$transclude tiddler=<> field="caption"/> - - - <$reveal state=<> type="match" text="show" default="show" tag="div" class="tc-manager-list-item-content-item-body"> - <$transclude tiddler=<>/> - - -
-\end - -
-
-
- Show: <$select tiddler="$:/config/Manager/Show" default="tiddlers"> - - - -
-
- Search: <$edit-text tiddler="$:/config/Manager/Filter" tag="input" default="" placeholder="Search"/> -
-
- Filter by tag: <$select tiddler="$:/config/Manager/Tag" default=""> - - <$list filter="[!is{$:/config/Manager/System}tags[]!is[system]sort[title]]" variable="tag"> - - - -
-
- Sort by: <$select tiddler="$:/config/Manager/Sort" default="title"> - - <$list filter="title modified modifier created creator created" variable="field"> - - - - - <$list filter="[all{$:/config/Manager/Show}!is{$:/config/Manager/System}fields[]sort[title]] -title -modified -modifier -created -creator -created" variable="field"> - - - - - <$checkbox tiddler="$:/config/Manager/Order" field="text" checked="reverse" unchecked="forward" default="forward"> - Reverse order - -
-
- <$checkbox tiddler="$:/config/Manager/Untagged" field="text" checked="yes" unchecked="no" default="no"> - Only show untagged tiddlers - -
-
- <$checkbox tiddler="$:/config/Manager/System" field="text" checked="" unchecked="system" default="system"> - Include system tiddlers - -
-
-
- <$list filter="[all{$:/config/Manager/Show}!is{$:/config/Manager/System}search{$:/config/Manager/Filter}tag:strict{$:/config/Manager/Tag}untagged:no{$:/config/Manager/Untagged}sort{$:/config/Manager/Sort}order{$:/config/Manager/Order}]"> - <$vars transclusion=<>> -
- <$button popup=<> class="tc-btn-invisible tc-manager-list-item-heading" selectedClass="tc-manager-list-item-heading-selected"> - <$text text=<>/> - - <$reveal state=<> type="nomatch" text="" default="" tag="div" class="tc-manager-list-item-content tc-popup-handle"> -
- <$list filter="[all[shadows+tiddlers]tag[$:/tags/Manager/ItemMain]!has[draft.of]]" variable="listItem"> - <> - -
- - -
- - -
-
diff --git a/core/ui/Manager/ItemMainFields.tid b/core/ui/Manager/ItemMainFields.tid deleted file mode 100644 index 922cee3bd..000000000 --- a/core/ui/Manager/ItemMainFields.tid +++ /dev/null @@ -1,9 +0,0 @@ -title: $:/Manager/ItemMain/Fields -tags: $:/tags/Manager/ItemMain -caption: Fields - - - -<$list filter="[all[current]fields[]sort[title]] -text" template="$:/core/ui/TiddlerFieldTemplate" variable="listItem"/> - -
diff --git a/core/ui/Manager/ItemMainRawText.tid b/core/ui/Manager/ItemMainRawText.tid deleted file mode 100644 index 578ebff22..000000000 --- a/core/ui/Manager/ItemMainRawText.tid +++ /dev/null @@ -1,5 +0,0 @@ -title: $:/Manager/ItemMain/RawText -tags: $:/tags/Manager/ItemMain -caption: Raw text - -
<$view/>
diff --git a/core/ui/Manager/ItemMainWikifiedText.tid b/core/ui/Manager/ItemMainWikifiedText.tid deleted file mode 100644 index 51f19c6fd..000000000 --- a/core/ui/Manager/ItemMainWikifiedText.tid +++ /dev/null @@ -1,5 +0,0 @@ -title: $:/Manager/ItemMain/WikifiedText -tags: $:/tags/Manager/ItemMain -caption: Wikified text - -<$transclude mode="block"/> diff --git a/core/ui/Manager/ItemSidebarColour.tid b/core/ui/Manager/ItemSidebarColour.tid deleted file mode 100644 index 0bf3c9967..000000000 --- a/core/ui/Manager/ItemSidebarColour.tid +++ /dev/null @@ -1,15 +0,0 @@ -title: $:/Manager/ItemSidebar/Colour -tags: $:/tags/Manager/ItemSidebar -caption: Colour - -\define swatch-styles() -height: 1em; -background-color: $(colour)$ -\end - -<$vars colour={{!!color}}> -

>/> - -

-<$edit-text field="color" tag="input" type="color"/> / <$edit-text field="color" tag="input" type="text" size="9"/> -

diff --git a/core/ui/Manager/ItemSidebarIcon.tid b/core/ui/Manager/ItemSidebarIcon.tid deleted file mode 100644 index 3f607573a..000000000 --- a/core/ui/Manager/ItemSidebarIcon.tid +++ /dev/null @@ -1,9 +0,0 @@ -title: $:/Manager/ItemSidebar/Icon -tags: $:/tags/Manager/ItemSidebar -caption: Icon - -

-<$macrocall $name="image-picker-dropdown" image-tiddler={{!!icon}} fallback="(none)" actions=""" -<$action-setfield $field="icon" $value=<>/> -"""/> -

diff --git a/core/ui/Manager/ItemSidebarTagsEditor.tid b/core/ui/Manager/ItemSidebarTagsEditor.tid deleted file mode 100644 index c7ababc99..000000000 --- a/core/ui/Manager/ItemSidebarTagsEditor.tid +++ /dev/null @@ -1,16 +0,0 @@ -title: $:/Manager/ItemSidebar/Tags -tags: $:/tags/Manager/ItemSidebar -caption: Tags - -

-<$list filter="[is[current]tags[]] [list[$:/config/Manager/RecentTags]] +[sort[title]] " variable="tag"> -

-<$checkbox tiddler=<> tag=<> actions=<>> -<$macrocall $name="tag-pill" tag=<>/> - -
- -

-

-<$macrocall $name="tag-picker" actions=<>/> -

diff --git a/core/ui/Manager/ItemSidebarTools.tid b/core/ui/Manager/ItemSidebarTools.tid deleted file mode 100644 index 793487ca9..000000000 --- a/core/ui/Manager/ItemSidebarTools.tid +++ /dev/null @@ -1,10 +0,0 @@ -title: $:/Manager/ItemSidebar/Tools -tags: $:/tags/Manager/ItemSidebar -caption: Tools - -

-<$button to=<>>{{$:/core/images/link}} open -

-

-<$button message="tm-edit-tiddler" param=<>>{{$:/core/images/edit-button}} edit -

diff --git a/core/ui/PageControls/manager.tid b/core/ui/PageControls/manager.tid deleted file mode 100644 index b2a7ed9bf..000000000 --- a/core/ui/PageControls/manager.tid +++ /dev/null @@ -1,19 +0,0 @@ -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="[prefix[yes]]"> -{{$:/core/images/list}} - -<$list filter="[prefix[yes]]"> -<$text text={{$:/language/Buttons/Manager/Caption}}/> - - -\end - -<$list filter="[list[$:/StoryList]] +[field:title[$:/Manager]]" emptyMessage=<>> -<> - diff --git a/core/ui/TagManager.tid b/core/ui/TagManager.tid index eeb2135c5..fe3489dc9 100644 --- a/core/ui/TagManager.tid +++ b/core/ui/TagManager.tid @@ -1,7 +1,6 @@ title: $:/TagManager icon: $:/core/images/tag-button color: #bbb -caption: {{$:/language/TagManager/Caption}} \define lingo-base() $:/language/TagManager/ \define iconEditorTab(type) @@ -52,7 +51,7 @@ $title$$(currentTiddler)$ <$list filter="[tags[]!is[system]sort[title]]"> <$edit-text field="color" tag="input" type="color"/> -<$macrocall $name="tag" tag=<>/> +<$transclude tiddler="$:/core/ui/TagTemplate"/> <$count filter="[all[current]tagging[]]"/> <$macrocall $name="iconEditor" title={{!!title}}/> diff --git a/core/ui/TagTemplate.tid b/core/ui/TagTemplate.tid index 569e6ad0f..f302d8f3d 100644 --- a/core/ui/TagTemplate.tid +++ b/core/ui/TagTemplate.tid @@ -1,3 +1,30 @@ title: $:/core/ui/TagTemplate -<$macrocall $name="tag" tag=<>/> +\define tag-styles() +background-color:$(backgroundColor)$; +fill:$(foregroundColor)$; +color:$(foregroundColor)$; +\end + +\define tag-body-inner(colour,fallbackTarget,colourA,colourB) +<$vars foregroundColor=<> backgroundColor="""$colour$"""> +<$button popup=<> class="tc-btn-invisible tc-tag-label" style=<>> +<$transclude tiddler={{!!icon}}/> <$view field="title" format="text" /> + +<$reveal state=<> 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=<>/> + +
+<$list filter="[all[current]tagging[]]" template="$:/core/ui/ListItemTemplate"/> + + +\end + +\define tag-body(colour,palette) + +<$macrocall $name="tag-body-inner" colour="""$colour$""" fallbackTarget={{$palette$##tag-background}} colourA={{$palette$##foreground}} colourB={{$palette$##background}}/> + +\end + +<$macrocall $name="tag-body" colour={{!!color}} palette={{$:/palette}}/> diff --git a/core/wiki/config/Manager.multids b/core/wiki/config/Manager.multids deleted file mode 100644 index 93fa0944a..000000000 --- a/core/wiki/config/Manager.multids +++ /dev/null @@ -1,10 +0,0 @@ -title: $:/config/Manager/ - -Show: tiddlers -Filter: -Order: forward -Sort: title -System: system -Tag: -Untagged: no -View: wikified diff --git a/core/wiki/config/ManagerItemState.multids b/core/wiki/config/ManagerItemState.multids deleted file mode 100644 index 845034ff6..000000000 --- a/core/wiki/config/ManagerItemState.multids +++ /dev/null @@ -1,3 +0,0 @@ -title: $:/state/popup/manager/item/$:/Manager/ - -ItemMain/RawText: hide \ No newline at end of file diff --git a/core/wiki/config/PageControlButtons.multids b/core/wiki/config/PageControlButtons.multids index f880b3399..7ad91db29 100644 --- a/core/wiki/config/PageControlButtons.multids +++ b/core/wiki/config/PageControlButtons.multids @@ -11,7 +11,6 @@ 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 diff --git a/core/wiki/macros/image-picker.tid b/core/wiki/macros/image-picker.tid index 339c68001..68bbba34d 100644 --- a/core/wiki/macros/image-picker.tid +++ b/core/wiki/macros/image-picker.tid @@ -3,31 +3,24 @@ tags: $:/tags/Macro \define image-picker-inner(actions) <$button tag="a" tooltip="""$(imageTitle)$"""> + $actions$ + <$transclude tiddler=<>/> + \end \define image-picker(actions,subfilter:"")
+ <$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$"""/> + +
+ \end -\define image-picker-dropdown(image-tiddler,fallback,actions) -
-<$button popup=<> class="tc-btn-invisible"> -<$transclude tiddler="""$image-tiddler$"""> -$fallback$ - - -
-<$reveal state=<> type="nomatch" text="" default=""> -
-<$macrocall $name="image-picker" actions="""$actions$"""/> -
- -
-\end diff --git a/core/wiki/macros/tag-picker.tid b/core/wiki/macros/tag-picker.tid deleted file mode 100644 index aaea75632..000000000 --- a/core/wiki/macros/tag-picker.tid +++ /dev/null @@ -1,41 +0,0 @@ -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=<>/> - -\end - -\define tag-picker(actions) -<$set name="actions" value="""$actions$"""> -
- -<$edit-text tiddler="$:/temp/NewTagName" tag="input" default="" placeholder={{$:/language/EditTemplate/Tags/Add/Placeholder}} focusPopup=<> class="tc-edit-texteditor tc-popup-handle"/> - <$button popup=<> class="tc-btn-invisible" tooltip={{$:/language/EditTemplate/Tags/Dropdown/Hint}} aria-label={{$:/language/EditTemplate/Tags/Dropdown/Caption}}>{{$:/core/images/down-arrow}} -<$set name="tag" value={{$:/temp/NewTagName}}> -<$button set="$:/temp/NewTagName" setTo="" class=""> -$actions$ -<$action-deletetiddler $tiddler="$:/temp/NewTagName"/> -{{$:/language/EditTemplate/Tags/Add/Button}} - - - -
-
-<$reveal state=<> type="nomatch" text="" default=""> -
-<$list filter="[tags[]!is[system]search:title{$:/temp/NewTagName}sort[]]" variable="tag"> -<> - -
-<$list filter="[tags[]is[system]search:title{$:/temp/NewTagName}sort[]]" variable="tag"> -<> - -
- -
- -\end diff --git a/core/wiki/macros/tag.tid b/core/wiki/macros/tag.tid index dc23f3238..b65bfc046 100644 --- a/core/wiki/macros/tag.tid +++ b/core/wiki/macros/tag.tid @@ -1,44 +1,6 @@ title: $:/core/macros/tag tags: $:/tags/Macro -\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=<> backgroundColor="""$colour$"""> -<$element-tag$ $element-attributes$ class="tc-tag-label tc-btn-invisible" style=<>> -$actions$<$transclude tiddler="""$icon$"""/> <$view tiddler="""$tag$""" field="title" format="text" /> - - -\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:"") - -<$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$"""/> - -\end - \define tag(tag) - -<$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=<>"""/> -<$reveal state=<> 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=<>/> - -
-<$list filter="[all[current]tagging[]]" template="$:/core/ui/ListItemTemplate"/> - - - -
+{{$tag$||$:/core/ui/TagTemplate}} \end diff --git a/core/wiki/tags/ManagerItemMain.tid b/core/wiki/tags/ManagerItemMain.tid deleted file mode 100644 index fa1af0824..000000000 --- a/core/wiki/tags/ManagerItemMain.tid +++ /dev/null @@ -1,2 +0,0 @@ -title: $:/tags/Manager/ItemMain -list: $:/Manager/ItemMain/WikifiedText $:/Manager/ItemMain/RawText $:/Manager/ItemMain/Fields \ No newline at end of file diff --git a/core/wiki/tags/ManagerItemSidebar.tid b/core/wiki/tags/ManagerItemSidebar.tid deleted file mode 100644 index b450ef772..000000000 --- a/core/wiki/tags/ManagerItemSidebar.tid +++ /dev/null @@ -1,2 +0,0 @@ -title: $:/tags/Manager/ItemSidebar -list: $:/Manager/ItemSidebar/Tags $:/Manager/ItemSidebar/Colour $:/Manager/ItemSidebar/Icon $:/Manager/ItemSidebar/Tools \ No newline at end of file diff --git a/core/wiki/tags/PageControls.tid b/core/wiki/tags/PageControls.tid index 4d5972827..3bef09b7d 100644 --- a/core/wiki/tags/PageControls.tid +++ b/core/wiki/tags/PageControls.tid @@ -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/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]] +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]] diff --git a/editions/tw5.com/tiddlers/filters/is.tid b/editions/tw5.com/tiddlers/filters/is.tid index 113af22c8..c274e3a86 100644 --- a/editions/tw5.com/tiddlers/filters/is.tid +++ b/editions/tw5.com/tiddlers/filters/is.tid @@ -1,5 +1,5 @@ created: 20140410103123179 -modified: 20161127142329969 +modified: 20150220161001000 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 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). +If <<.place C>> is anything else, the output is an error message. `!is[tiddler]` is a synonym for `is[missing]`, and vice versa. diff --git a/editions/tw5.com/tiddlers/filters/tag.tid b/editions/tw5.com/tiddlers/filters/tag.tid index 929464b15..995cae7b1 100644 --- a/editions/tw5.com/tiddlers/filters/tag.tid +++ b/editions/tw5.com/tiddlers/filters/tag.tid @@ -1,23 +1,18 @@ -caption: tag created: 20140410103123179 -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 +modified: 20150203191853000 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. -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 +If <<.place T>> is empty, the output of `tag` is empty, and the output of `!tag` is a copy of the input. <<.operator-examples "tag">> diff --git a/themes/tiddlywiki/snowwhite/base.tid b/themes/tiddlywiki/snowwhite/base.tid index 9452a2ebe..78aae3b1f 100644 --- a/themes/tiddlywiki/snowwhite/base.tid +++ b/themes/tiddlywiki/snowwhite/base.tid @@ -50,7 +50,7 @@ canvas.tc-edit-bitmapeditor { <> } -.tc-drop-down, .tc-drop-down-simple { +.tc-drop-down { border-radius: 4px; <> } diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid index 48f6153b3..0cadceb1e 100644 --- a/themes/tiddlywiki/vanilla/base.tid +++ b/themes/tiddlywiki/vanilla/base.tid @@ -1287,14 +1287,6 @@ html body.tc-body.tc-single-tiddler-window { position: relative; } -.tc-drop-down-simple { - min-width: 380px; - border: 1px solid <>; - background-color: <>; - padding: 7px; - margin: 4px 0 0 0; -} - .tc-drop-down { min-width: 380px; border: 1px solid <>; @@ -1733,103 +1725,6 @@ 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 <>; - border-left: 1px solid <>; - border-right: 1px solid <>; -} - -.tc-manager-list-item { - -} - -.tc-manager-list-item-heading { - display: block; - width: 100%; - text-align: left; - border-bottom: 1px solid <>; - padding: 3px; -} - -.tc-manager-list-item-heading-selected { - font-weight: bold; - color: <>; - fill: <>; - background-color: <>; -} - -.tc-manager-list-item-heading:hover { - background: <>; - color: <>; -} - -.tc-manager-list-item-content { - display: flex; -} - -.tc-manager-list-item-content-sidebar { - flex: 1 0; - background: <>; - border-right: 0.5em solid <>; - border-bottom: 0.5em solid <>; - white-space: nowrap; -} - -.tc-manager-list-item-content-item-heading { - display: block; - width: 100%; - text-align: left; - background: <>; - 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 <>; - border-right: 0.5em solid <>; - border-bottom: 0.5em solid <>; -} - -.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; -} - /* ** Alerts */