diff --git a/core/images/globe.tid b/core/images/globe.tid index 7f668bb8c..2edccf671 100644 --- a/core/images/globe.tid +++ b/core/images/globe.tid @@ -1,7 +1,7 @@ title: $:/core/images/globe tags: $:/tags/Image - + diff --git a/core/images/import-button.tid b/core/images/import-button.tid new file mode 100644 index 000000000..307809e5e --- /dev/null +++ b/core/images/import-button.tid @@ -0,0 +1,8 @@ +title: $:/core/images/import-button +tags: $:/tags/Image + + + + + + \ No newline at end of file diff --git a/core/images/storyview-cecily.tid b/core/images/storyview-cecily.tid index 6b8d6f222..80bf5c8ed 100644 --- a/core/images/storyview-cecily.tid +++ b/core/images/storyview-cecily.tid @@ -1,7 +1,7 @@ title: $:/core/images/storyview-cecily tags: $:/tags/Image - + diff --git a/core/images/storyview-classic.tid b/core/images/storyview-classic.tid index 4e3be0197..86fa1c21e 100644 --- a/core/images/storyview-classic.tid +++ b/core/images/storyview-classic.tid @@ -1,7 +1,7 @@ title: $:/core/images/storyview-classic tags: $:/tags/Image - + diff --git a/core/images/storyview-pop.tid b/core/images/storyview-pop.tid index e5c41aef3..442fc8e77 100644 --- a/core/images/storyview-pop.tid +++ b/core/images/storyview-pop.tid @@ -1,7 +1,7 @@ title: $:/core/images/storyview-pop tags: $:/tags/Image - + diff --git a/core/images/storyview-zoomin.tid b/core/images/storyview-zoomin.tid index 2f76f0513..764c27993 100644 --- a/core/images/storyview-zoomin.tid +++ b/core/images/storyview-zoomin.tid @@ -1,7 +1,7 @@ title: $:/core/images/storyview-zoomin tags: $:/tags/Image - + diff --git a/core/language/en-GB/Buttons.multids b/core/language/en-GB/Buttons.multids index 61f0359d9..28b17e19a 100644 --- a/core/language/en-GB/Buttons.multids +++ b/core/language/en-GB/Buttons.multids @@ -26,6 +26,8 @@ Encryption/SetPassword/Caption: set password Encryption/SetPassword/Hint: Set a password for saving this wiki with encryption FullScreen/Caption: full-screen FullScreen/Hint: Enter or leave full-screen mode +Import/Caption: import +Import/Hint: Import files Info/Caption: info Info/Hint: Show information for this tiddler Home/Caption: home diff --git a/core/language/en-GB/Import.multids b/core/language/en-GB/Import.multids index 147c1b430..d5dea4680 100644 --- a/core/language/en-GB/Import.multids +++ b/core/language/en-GB/Import.multids @@ -6,7 +6,8 @@ Listing/Import/Caption: Import Listing/Select/Caption: Select Listing/Status/Caption: Status Listing/Title/Caption: Title -Upgrader/Plugins/Suppressed: Suppressed plugin (due to incoming <> being older than existing <>) +Upgrader/Plugins/Suppressed/Incompatible: Blocked incompatible or obsolete plugin +Upgrader/Plugins/Suppressed/Version: Blocked plugin (due to incoming <> being older than existing <>) Upgrader/Plugins/Upgraded: Upgraded plugin from <> to <> -Upgrader/System/Suppressed: Suppressed system tiddler +Upgrader/System/Suppressed: Blocked system tiddler Upgrader/ThemeTweaks/Created: Migrated theme tweak from <$text text=<>/> diff --git a/core/modules/upgraders/plugins.js b/core/modules/upgraders/plugins.js index 306c948f1..91948ff73 100644 --- a/core/modules/upgraders/plugins.js +++ b/core/modules/upgraders/plugins.js @@ -14,6 +14,12 @@ Upgrader module that checks that plugins are newer than any already installed ve var UPGRADE_LIBRARY_TITLE = "$:/UpgradeLibrary"; +var BLOCKED_PLUGINS = { + "$:/plugins/tiddlywiki/fullscreen": { + versions: ["*"] + } +}; + exports.upgrade = function(wiki,titles,tiddlers) { var self = this, messages = {}, @@ -23,7 +29,7 @@ exports.upgrade = function(wiki,titles,tiddlers) { upgradeLibrary = wiki.getTiddlerData(UPGRADE_LIBRARY_TITLE,{}); upgradeLibrary.tiddlers = upgradeLibrary.tiddlers || {}; } - return upgradeLibrary.tiddlers[title] + return upgradeLibrary.tiddlers[title]; }; // Go through all the incoming tiddlers @@ -46,7 +52,18 @@ exports.upgrade = function(wiki,titles,tiddlers) { // Reject the incoming plugin by blanking all its fields if($tw.utils.checkVersions(existingTiddler.fields.version,incomingTiddler.version)) { tiddlers[title] = Object.create(null); - messages[title] = $tw.language.getString("Import/Upgrader/Plugins/Suppressed",{variables: {incoming: incomingTiddler.version, existing: existingTiddler.fields.version}}); + messages[title] = $tw.language.getString("Import/Upgrader/Plugins/Suppressed/Version",{variables: {incoming: incomingTiddler.version, existing: existingTiddler.fields.version}}); + return; + } + } + } + if(incomingTiddler && incomingTiddler["plugin-type"]) { + // Check whether the plugin is on the blocked list + var blockInfo = BLOCKED_PLUGINS[title]; + if(blockInfo) { + if(blockInfo.versions.indexOf("*") !== -1 || (incomingTiddler.version && blockInfo.versions.indexOf(incomingTiddler.version) !== -1)) { + tiddlers[title] = Object.create(null); + messages[title] = $tw.language.getString("Import/Upgrader/Plugins/Suppressed/Incompatible"); return; } } diff --git a/core/modules/widgets/tiddler.js b/core/modules/widgets/tiddler.js index a8b10e85f..1300bd991 100755 --- a/core/modules/widgets/tiddler.js +++ b/core/modules/widgets/tiddler.js @@ -57,7 +57,7 @@ TiddlerWidget.prototype.getTagClasses = function() { if(tiddler) { var tags = []; $tw.utils.each(tiddler.fields.tags,function(tag) { - tags.push("tw-tag-" + encodeURIComponent(tag)); + tags.push("tw-tagged-" + encodeURIComponent(tag)); }); return tags.join(" "); } else { diff --git a/core/ui/PageControls/import.tid b/core/ui/PageControls/import.tid new file mode 100644 index 000000000..f0be94dca --- /dev/null +++ b/core/ui/PageControls/import.tid @@ -0,0 +1,16 @@ +title: $:/core/ui/Buttons/import +tags: $:/tags/PageControls +caption: {{$:/core/images/import-button}} {{$:/language/Buttons/Import/Caption}} +description: {{$:/language/Buttons/Import/Hint}} + +
+<$button title={{$:/language/Buttons/Import/Hint}} aria-label={{$:/language/Buttons/Import/Caption}} class=<>> +<$list filter="[prefix[yes]]"> +{{$:/core/images/import-button}} + +<$list filter="[prefix[yes]]"> +<$text text={{$:/language/Buttons/Import/Caption}}/> + + +<$browse/> +
diff --git a/core/ui/PageControls/language.tid b/core/ui/PageControls/language.tid index 1360a297c..b6afd1f7e 100644 --- a/core/ui/PageControls/language.tid +++ b/core/ui/PageControls/language.tid @@ -5,7 +5,9 @@ description: {{$:/language/Buttons/Language/Hint}} <$button popup=<> title={{$:/language/Buttons/Language/Hint}} aria-label={{$:/language/Buttons/Language/Caption}} class=<> selectedClass="tw-selected"> <$list filter="[prefix[yes]]"> -<$transclude tiddler="$:/language/Flag"/> + +<$image source="$:/language/Flag"/> + <$list filter="[prefix[yes]]"> <$text text={{$:/language/Buttons/Language/Caption}}/> @@ -24,11 +26,13 @@ description: {{$:/language/Buttons/Language/Hint}}   + <$transclude subtiddler="$:/language/Flag"> <$list filter="[all[current]field:title[$:/languages/en-GB]]"> <$transclude tiddler="$:/core" subtiddler="$:/language/Flag"/> + <$view field="description"> <$view field="name"> <$view field="title"/> diff --git a/core/ui/SideBar/Tools.tid b/core/ui/SideBar/Tools.tid index 515bafed0..d49060b6e 100644 --- a/core/ui/SideBar/Tools.tid +++ b/core/ui/SideBar/Tools.tid @@ -3,24 +3,30 @@ tags: $:/tags/SideBar caption: {{$:/language/SideBar/Tools/Caption}} \define lingo-base() $:/language/ControlPanel/ -<> <$browse/> - ---- - -{{$:/snippets/encryptionstatus}} - ---- +\define config-title() +$:/config/PageControlButtons/Visibility/$(listItem)$ +\end <> <> ---- +<$set name="tw-config-toolbar-icons" value="yes"> -{{$:/snippets/viewswitcher}} +<$set name="tw-config-toolbar-text" value="yes"> + +<$set name="tw-config-toolbar-class" value=""> + +<$list filter="[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]]" variable="listItem"> + +<$checkbox tiddler=<> field="text" checked="show" unchecked="hide" default="show"> <$transclude tiddler=<>/> <$transclude tiddler=<> field="description"/> + + + + + + + + --- {{$:/snippets/minithemeswitcher}} - ---- - -{{$:/snippets/languageswitcher}} diff --git a/core/ui/TiddlerInfo/Tools.tid b/core/ui/TiddlerInfo/Tools.tid index 1d1336b47..c14d71692 100644 --- a/core/ui/TiddlerInfo/Tools.tid +++ b/core/ui/TiddlerInfo/Tools.tid @@ -6,7 +6,6 @@ caption: {{$:/language/TiddlerInfo/Tools/Caption}} \define config-title() $:/config/ViewToolbarButtons/Visibility/$(listItem)$ \end - <$set name="tw-config-toolbar-icons" value="yes"> <$set name="tw-config-toolbar-text" value="yes"> diff --git a/core/wiki/config/PageControlButtons.multids b/core/wiki/config/PageControlButtons.multids index 4c23178ed..ab191578e 100644 --- a/core/wiki/config/PageControlButtons.multids +++ b/core/wiki/config/PageControlButtons.multids @@ -4,6 +4,7 @@ core/ui/Buttons/close-all: hide core/ui/Buttons/encryption: hide core/ui/Buttons/full-screen: hide core/ui/Buttons/home: hide +core/ui/Buttons/import: hide core/ui/Buttons/language: hide core/ui/Buttons/more-page-actions: hide core/ui/Buttons/permaview: hide diff --git a/core/wiki/tags/PageControls.tid b/core/wiki/tags/PageControls.tid index e1bca558f..af98a288b 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/permaview]] [[$:/core/ui/Buttons/new-tiddler]] [[$:/core/ui/Buttons/control-panel]] [[$:/core/ui/Buttons/save-wiki]] +list: [[$:/core/ui/Buttons/home]] [[$:/core/ui/Buttons/close-all]] [[$:/core/ui/Buttons/permaview]] [[$:/core/ui/Buttons/new-tiddler]] [[$:/core/ui/Buttons/import]] [[$:/core/ui/Buttons/control-panel]] [[$:/core/ui/Buttons/language]] [[$:/core/ui/Buttons/storyview]] [[$:/core/ui/Buttons/encryption]] [[$:/core/ui/Buttons/full-screen]] [[$:/core/ui/Buttons/save-wiki]] [[$:/core/ui/Buttons/more-page-actions]] diff --git a/editions/tw5.com/tiddlers/concepts/CurrentTiddler.tid b/editions/tw5.com/tiddlers/concepts/CurrentTiddler.tid index 8af3fab1e..28f543cfa 100644 --- a/editions/tw5.com/tiddlers/concepts/CurrentTiddler.tid +++ b/editions/tw5.com/tiddlers/concepts/CurrentTiddler.tid @@ -5,3 +5,5 @@ title: CurrentTiddler type: text/vnd.tiddlywiki The CurrentTiddler is the current tiddler during WikiText processing. A context tiddler is set by the TiddlerWidget. It allows you to write references like `<$view field="title" format="link"/>` in TemplateTiddlers without explicitly specifying the tiddler that it applies to. + +The title of the current tiddler is contained in the widget variable ''currentTiddler''. diff --git a/editions/tw5.com/tiddlers/system/github-fork-ribbon.tid b/editions/tw5.com/tiddlers/system/github-fork-ribbon.tid index 5d9c7e385..22fddf73b 100644 --- a/editions/tw5.com/tiddlers/system/github-fork-ribbon.tid +++ b/editions/tw5.com/tiddlers/system/github-fork-ribbon.tid @@ -1,6 +1,7 @@ title: $:/editions/tw5.com/github-fork-ribbon tags: $:/tags/PageControls caption: ~GitHub ribbon +description: ~GitHub ribbon for tw5.com \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/widgets/TiddlerWidget.tid b/editions/tw5.com/tiddlers/widgets/TiddlerWidget.tid index cc633426a..cd2c81a00 100644 --- a/editions/tw5.com/tiddlers/widgets/TiddlerWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/TiddlerWidget.tid @@ -1,5 +1,5 @@ created: 20130824154300000 -modified: 20140107114152456 +modified: 20140802114152456 tags: widget title: TiddlerWidget type: text/vnd.tiddlywiki @@ -13,3 +13,23 @@ The TiddlerWidget sets the CurrentTiddler that applies for processing its conten |!Attribute |!Description | |tiddler |The title of the tiddler to become the new CurrentTiddler | |class |CSS classes to added to the generated elements | + +! CSS Class Variables + +The tiddler widget assigns several useful CSS classes to variables that it creates: + +* ''missingTiddlerClass'': ''"tw-tiddler-exists"'' or ''"tw-tiddler-missing"'' depending upon whether the target tiddler exists +* ''shadowTiddlerClass'': ''"tw-tiddler-shadow"'' if the tiddler is a shadow tiddler +* ''systemTiddlerClass'': ''"tw-tiddler-system"'' if the tiddler is a system tiddler +* ''tiddlerTagClasses'': A space separated list of CSS classes named ''"tw-tagged-{tagname}"''. For example ''"tw-tagged-introduction"''. Note that tag names are UrlEncoded which means that the tag ''$:/tags/Macro'' appears as the CSS class ''"tw-tagged-%24%3A%2Ftags%2FMacro"'' + +You can use these variables like this: + +``` +<$tiddler tiddler="MyOtherTiddler"> +
>> +<$transclude/> + +``` + +See also [[$:/core/ui/ViewTemplate]]. diff --git a/languages/de-DE/Import.multids b/languages/de-DE/Import.multids index 9e9e6e5ce..95c10dd4b 100644 --- a/languages/de-DE/Import.multids +++ b/languages/de-DE/Import.multids @@ -6,7 +6,7 @@ Listing/Import/Caption: Importieren Listing/Select/Caption: Auswahl Listing/Status/Caption: Status Listing/Title/Caption: Titel -Upgrader/Plugins/Suppressed: Einige "plugins" weden unterdrückt! Importierte plugins: <> sind älter als existierende: <>. +Upgrader/Plugins/Suppressed/Version: Einige "plugins" weden unterdrückt! Importierte plugins: <> sind älter als existierende: <>. Upgrader/Plugins/Upgraded: Aktualisieren der plugins von: <> nach: <> Upgrader/System/Suppressed: Unterdrückte "System Tiddler" Upgrader/ThemeTweaks/Created: Migrieren der "theme tweaks" von: <$text text=<>/> diff --git a/languages/fr-FR/Import.multids b/languages/fr-FR/Import.multids index 273ef2dc9..b6d5b880f 100644 --- a/languages/fr-FR/Import.multids +++ b/languages/fr-FR/Import.multids @@ -6,7 +6,7 @@ Listing/Import/Caption: Importer Listing/Select/Caption: Sélectionner Listing/Status/Caption: Statut Listing/Title/Caption: Titre -Upgrader/Plugins/Suppressed: Plugin supprimé (le pressenti <> étant plus ancien que l'existant <>) +Upgrader/Plugins/Suppressed/Version: Plugin supprimé (le pressenti <> étant plus ancien que l'existant <>) Upgrader/Plugins/Upgraded: Plugin mis à jour depuis <> vers <> Upgrader/System/Suppressed: Tiddler système supprimé Upgrader/ThemeTweaks/Created: Thème modifié à partir de <$text text=<>/> diff --git a/languages/zh-Hans/Buttons.multids b/languages/zh-Hans/Buttons.multids index f15b9658e..2f70a959b 100644 --- a/languages/zh-Hans/Buttons.multids +++ b/languages/zh-Hans/Buttons.multids @@ -24,6 +24,8 @@ Encryption/ClearPassword/Caption: 清除密码 Encryption/ClearPassword/Hint: 清除密码且不加密保存此维基 Encryption/SetPassword/Caption: 设置密码 Encryption/SetPassword/Hint: 设置加密保存此维基的密码 +FullScreen/Caption: 全屏幕 +FullScreen/Hint: 进入或离开全屏模式 Home/Caption: 首页 Home/Hint: 刷新页面且开启首页条目 Info/Caption: 信息 @@ -42,6 +44,8 @@ Save/Caption: 保存 Save/Hint: 保存此条目 SaveWiki/Caption: 保存变更 SaveWiki/Hint: 保存变更 +StoryView/Caption: 检视模式 +StoryView/Hint: 选择检视条目的视觉效果 HideSideBar/Caption: 隐藏侧边栏 HideSideBar/Hint: 隐藏侧边栏 ShowSideBar/Caption: 显示侧边栏 diff --git a/languages/zh-Hans/Import.multids b/languages/zh-Hans/Import.multids index 6cf5d6b14..6b4757c70 100644 --- a/languages/zh-Hans/Import.multids +++ b/languages/zh-Hans/Import.multids @@ -6,7 +6,7 @@ Listing/Import/Caption: 导入 Listing/Select/Caption: 选择 Listing/Status/Caption: 状态 Listing/Title/Caption: 条目 -Upgrader/Plugins/Suppressed: 排除插件 (由于传入的 <> 较现有版本 <> 旧) +Upgrader/Plugins/Suppressed/Version: 排除插件 (由于传入的 <> 较现有版本 <> 旧) Upgrader/Plugins/Upgraded: 升级插件,从 <> 到 <> Upgrader/System/Suppressed: 排除系统条目 Upgrader/ThemeTweaks/Created: 從 <$text text=<>/> 遷移佈景主題 diff --git a/languages/zh-Hant/Buttons.multids b/languages/zh-Hant/Buttons.multids index 8d50d8606..002cfff1e 100644 --- a/languages/zh-Hant/Buttons.multids +++ b/languages/zh-Hant/Buttons.multids @@ -24,6 +24,8 @@ Encryption/ClearPassword/Caption: 清除密碼 Encryption/ClearPassword/Hint: 清除密碼且不加密儲存此維基 Encryption/SetPassword/Caption: 設定密碼 Encryption/SetPassword/Hint: 設定加密儲存此維基的密碼 +FullScreen/Caption: 全螢幕 +FullScreen/Hint: 進入或離開全螢幕模式 Home/Caption: 首頁 Home/Hint: 刷新頁面且開啟首頁條目 Info/Caption: 資訊 @@ -42,6 +44,8 @@ Save/Caption: 儲存 Save/Hint: 儲存此條目 SaveWiki/Caption: 儲存變更 SaveWiki/Hint: 儲存變更 +StoryView/Caption: 檢視模式 +StoryView/Hint: 選擇檢視條目的視覺效果 HideSideBar/Caption: 隱藏側邊欄 HideSideBar/Hint: 隱藏側邊欄 ShowSideBar/Caption: 顯示側邊欄 diff --git a/languages/zh-Hant/Import.multids b/languages/zh-Hant/Import.multids index 740b2e691..e80736b4c 100644 --- a/languages/zh-Hant/Import.multids +++ b/languages/zh-Hant/Import.multids @@ -6,7 +6,7 @@ Listing/Import/Caption: 導入 Listing/Select/Caption: 選擇 Listing/Status/Caption: 狀態 Listing/Title/Caption: 條目 -Upgrader/Plugins/Suppressed: 排除插件 (由於傳入的 <> 較現有版本 <> 舊) +Upgrader/Plugins/Suppressed/Version: 排除插件 (由於傳入的 <> 較現有版本 <> 舊) Upgrader/Plugins/Upgraded: 升級插件,從 <> 到 <> Upgrader/System/Suppressed: 排除系統條目 Upgrader/ThemeTweaks/Created: 從 <$text text=<>/> 遷移佈景主題 diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid index a98b533fd..00ffb28f9 100644 --- a/themes/tiddlywiki/vanilla/base.tid +++ b/themes/tiddlywiki/vanilla/base.tid @@ -270,8 +270,9 @@ button svg, button img { color: <>; } -.tw-sidebar-lists button.btn { +.tw-sidebar-lists button { color: <>; + fill: <>; } .tw-sidebar-lists button.btn-mini { @@ -282,7 +283,7 @@ button svg, button img { color: <>; } -.tw-image-button { +button svg.tw-image-button, button .tw-image-button img { height: 1em; width: 1em; } @@ -534,6 +535,11 @@ button svg, button img { border-bottom: 1px solid <>; } +.tw-tiddler-info p { + margin-top: 3px; + margin-bottom: 3px; +} + .tw-tiddler-info .tw-tab-buttons button.tw-tab-selected { background-color: <>; border-bottom: 1px solid <>; @@ -872,6 +878,15 @@ canvas.tw-edit-bitmapeditor { padding: 0 14px 0 14px; } +.tw-drop-down svg { + width: 1em; + height: 1em; +} + +.tw-drop-down img { + width: 1em; +} + .tw-drop-down a, .tw-drop-down button { display: block; padding: 0 14px 0 14px; @@ -1343,3 +1358,31 @@ body.tw-dirty span.tw-dirty-indicator, body.tw-dirty span.tw-dirty-indicator svg fill: <>; color: <>; } + +/* +** File inputs +*/ + +.tw-file-input-wrapper { + position: relative; + overflow: hidden; + display: inline-block; + vertical-align: middle; +} + +.tw-file-input-wrapper input[type=file] { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + font-size: 999px; + max-width: 100%; + max-height: 100%; + filter: alpha(opacity=0); + opacity: 0; + outline: none; + background: white; + cursor: pointer; + display: inline-block; +}