1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-14 13:54:50 +00:00
Commit Graph

7576 Commits

Author SHA1 Message Date
Devin Weaver
bf74d13df5 Handle binary files better when saving on Node.JS (#2420)
* Save binary tiddlers with meta file

The filesystemadaptor plugin was a little simplistic in its
understanding of a binary file. It was using the typeInfo dictionary to
choose what tiddler types were binary (and hence needed a meta file when
saving).

I looked as if it was trying to be smart by looking for the hasMetaFile
*OR* had the encoding of base64. Unfortunately the typeInfo only defined
image/jpeg and so any other base64 encoded tiddler was assumed to be of
type text/vnd.tiddlywiki.

The net effect was only JPG images got a meta file and everything else
were saved as .tid files with base64 encoding. It all still worked but
made working with binary data in a Git repo a bit daunting.

There is enough information in the $tw.config.contentTypeInfo to
determine if a tiddler type is encoded with base64 or not. A better list
is available from boot/boot.js who registers all the types thorough the
registerFileType and marks then with base64 were appropriate.

This commit uses the typeInfo dictionary first for any filesystem
specific overrides, then the contentTypeInfo, and finally defaults to
the typeInfo["text/vnd.tiddlywiki"]. It also eliminates the now
unnecessary override for image/jpeg.

I think this might have been the original intent from commit 10b192e7.
From my limited testing all files described in boot/boot.js (lines
1832-1856) with an encoding of base64 now save as the original binary
and a meta file. Meaning that when you start the node server and then
drag-n-drop a binary file (i.e. image/png) it will PUT to the server
and then save it on the filesystem as-is allowing the file to be managed
as a binary file and not a text file. (Binary diffs are better and
GitHub supports them as well).

* Prevent duplicate file extensions

A side effects of using the $tw.config.contentFileInfo in the previous
commit is that it will always append a file extension to the tiddler
title when saving. In most cases this is the correct course of action.
However, sometimes that title is already a proper filename with an
extension (for example importing 'foobar.png' would save a file named
'foobar.png.png') which seemed silly.

This commit simply checks to make sure the title does not already end
with the file extension before appending it to the filename. A little
convenience really.

Since IE apparently doesn't have the String endsWith method I took the
liberty to add a helper method to $tw.utils trying to follow the other
polyfill patterns. I figured this was more generic and readable then
attempting to use a one-off solution inline. I got the polyfill code
from MDN.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith#Polyfill

Is strEndsWith the best method name?
2016-07-11 11:18:19 +01:00
Brent Maxwell
19e699d330 Added mobile-web-app-capable meta tag for Android Chrome (#2456)
* Added mobile-web-app-capable meta tag for Android Chrome

* Added "mobile-web-app-capable" meta tag to the rest of the templates.
2016-07-11 11:16:58 +01:00
Bram Chen
59b62f68da Add Chinese translation for missing plugin info (#2466) 2016-07-11 11:16:27 +01:00
Jermolene
8dece4b4f6 Simplify styling of community resources
Feedback from @ssokolow
2016-07-10 16:14:58 +01:00
Jermolene
dd1e213b52 Add "Developers" to Reference section
Feedback from @ssokolow
2016-07-10 16:14:38 +01:00
Jermolene
1fdc7344ee Update new release banner picture 2016-07-10 15:37:48 +01:00
Jermolene
4523aece5e Fix reference to sync mechanism
Fixes #2492
2016-07-09 12:28:20 +01:00
Mario Pietsch
1b3819bf70 german language updatges (#2489) 2016-07-06 12:51:55 +01:00
Jermolene
1e87c4fb06 Merge branch 'pr/2473' 2016-07-05 18:09:04 +01:00
Jermolene
b2c6c24771 Minor fixes for #2473 2016-07-05 18:06:52 +01:00
Myeongjin
80256b4dab Update document in tiddlywiki.com edition
* Add string '.htm' to 'Saving with TiddlyIE'
* Change external links to match locale with wiki language
* Add instructions for use to 'Saving on Android'
* Change string in 'task'
* Change instructions for use in 'Saving on iPad/iPhone'
* Add newline to 'TiddlyDesktop Releases'
* Remove caption from 'Serving TW5 from Android'
* Change link to external in tiddlers which tagged 'Editions'
* Remove string 'index.html' from 'Some of the things you can do with TiddlyWiki'
* Change link 'TiddlyWiki Groups' to 'Forums' in tiddlers which tagged 'Community'
* Remove CamelCase link 'TiddlyWiki' from tiddlers tagged 'Community'
* Change string 'done' to 'Upgrade' in 'UpgradeMechanism'
* Change buttons to images in 'How to export tiddlers'
* Add images about buttons to tiddlers
* Add quotation mark to text 'edit' in 'Signing the Contributor License Agreement'
* Rename 'UsingSVG' to 'Using SVG'
* Change link 'TypedBlockWikiText' to 'Typed Blocks in WikiText' in 'Using SVG'
* Add tiddler 'Using Stamp'
* Add 'rel="noopener noreferrer"' to external links
* Add description about 'rel="noreferrer"' to 'HTML in WikiText'
* Add link of prerelease version about translators edition, and how to translate on Node.js, in 'Translate TiddlyWiki into your language'
* Change string 'dropdown' to 'tab' in 'Installing a plugin from the plugin library'
* Add download button to 'Empty Edition'
2016-07-06 01:10:51 +09:00
Jermolene
c3d18364c1 Don't use syncadaptors until they are ready
Fixes #2453
2016-07-05 11:29:59 +01:00
Jermolene
ff57b4084a Extend notification handler to accept variables
Now we can provide variables to be passed to the rendering of the
notification text
2016-07-03 14:55:41 +01:00
Jermolene
6f8ee52e90 Text-editor: fix placeholder colour in Chrome 2016-07-03 14:53:37 +01:00
Devin Weaver
c0b55b4498 Show tags with contrast colour in edit template (#2484)
Closes #2483

Copy the same pattern from core/ui/TagTemplate.tid and use it in
core/ui/EditTemplate/tags.tid
2016-07-01 10:40:37 +01:00
Jermolene
e8e9759816 Add more flexible support for static content
Passing the static content through the `$:/core/templates/html-tiddler`
template made it impossible to produce output that wasn’t HTML encoded
(eg stylesheets).
2016-06-23 16:29:51 +01:00
Jermolene
3d5885f5a5 Extend view widget with plainwikified format 2016-06-23 16:28:59 +01:00
Jermolene
28730caf7b Remove missing link for http://dullroar.com/tiddlywiki5.html 2016-06-23 16:24:05 +01:00
Jermolene
4934d3251e Add note about docs forum 2016-06-23 16:23:52 +01:00
Jermolene
f51f6bf774 Fix URI in "put" save handler
We don’t want the location hash
2016-06-23 16:23:36 +01:00
Jermolene
bdd5aa9343 Trap missing tiddlers in savetiddler command 2016-06-23 16:19:00 +01:00
Myeongjin
4764c456ca Update document in fr-FR edition (#2474)
* Add field 'fr-title' to 'TaskManagementExample'
* Change button texts to latest version
* Change language English to French of link for empty edition
* Change language English to French of link for document
* Add download button to 'Empty Edition'
* Remove string 'index.html' from 'Full Edition'
* Change external links to match locale with wiki language
* Change string in 'task'
* Add newline to 'TiddlyDesktop Releases'
* Remove string 'index.html' from 'Some of the things you can do with TiddlyWiki'
* Change instructions for use in 'Saving on iPad/iPhone'
* Add YouTube button to 'HelloThere'
* Add 'rel="noopener noreferrer"' to external links
* Remove CamelCase link 'TiddlyWiki' from tiddlers tagged 'Community'
* Change link 'TiddlyWiki Groups' to 'Forums' in 'Articles'
* Change language English to French of caption in tiddlers tagged 'HelloThumbnail'
* Add image to 'HelpingTiddlyWiki'
2016-06-14 21:10:42 +01:00
Andrew J Harrison
f76c7e9560 Refactor $:/core/ui/TagTemplate using sub-tiddlers (#2477)
The Open All by tag feature should really be in a plugin.
2016-06-14 16:46:40 +01:00
maxthomax
a9c4f113a1 More documentation about named properties (#2481)
* Made the link between "names" and "properties" explicit (I only figured it out by reading the TextReference documentation)
* Documented named property manipulation through ActionWidgets.
2016-06-09 22:09:16 +01:00
maxthomax
776d42c330 @maxthomax CLA signature (#2480) 2016-06-09 22:08:20 +01:00
twMat
77d4b084e6 Update TiddlerFields.tid (#2479)
Include mention of *caption* field.
2016-06-09 20:32:33 +01:00
Myeongjin
ace20ecf80 Updates and fixed for es-ES edition (#2475)
* Change button texts to latest version
* Change language English to Spanish of link for empty edition
* Rename 'GettingStarted1' to 'GettingStarted'
* Change language English to Spanish of link for document
* Add download button to 'Empty Edition'
* Change external links to match locale with wiki language
* Change string in 'task'
* Change link to external in tiddlers which tagged 'Editions'
* Remove dot from 'Plugin Editions'
* Remove string 'index.html' from 'Some of the things you can do with TiddlyWiki'
* Add 'rel="noopener noreferrer"' to external links
* Remove CamelCase link 'TiddlyWiki' from 'Examples'
* Change space to dot in 'Tutorials'
* Change language English to Spanish of caption in tiddlers tagged 'HelloThumbnail'
* Change instructions for use in 'Saving on iPad/iPhone'
2016-06-09 16:49:50 +01:00
Richard Smith
b326ba5b2c Fixed: Titles containing a URL are interpreted as external links (#2324) 2016-06-05 20:03:04 +01:00
Myeongjin
423086bd11 Add localisable string for missing plugin info (#2465) 2016-05-26 09:06:17 -06:00
Bram Chen
9cb4c5f675 Clean up line endings (#2462)
Convert line endings to Linux style ("\n") to ensure greater consistency in repository.
2016-05-25 12:11:03 -06:00
Myeongjin
f7d49723ae Update translations (#2463) 2016-05-25 12:10:41 -06:00
Myeongjin
26a252ffd9 Remove unused strings for EditTemplate (#2461) 2016-05-24 07:46:59 -06:00
Myeongjin
74db143ee8 Split exporters from miscellaneous language tiddler (#2460) 2016-05-23 12:30:57 -06:00
Myeongjin
99c21232ee Fix referred name of localisable string for recursive transclusion error (#2458) 2016-05-22 15:33:02 -06:00
Xavier Cazin
b161f49126 fr-FR translation of additional error strings (#2459) 2016-05-22 15:32:37 -06:00
Brent Maxwell
9a936a0442 Signing the CLA (#2455) 2016-05-21 13:18:02 -06:00
Myeongjin
5cceca8f55 Update edition informations (#2457) 2016-05-21 08:25:33 -06:00
Myeongjin
fb146bc4b8 Fix readme path of jszip (#2430) 2016-05-20 07:46:29 -06:00
Myeongjin
2edaa5fbce Update tiddlywiki.com edition (#2454)
* Change button texts to latest version

* Move tiddler files to appropriate categorys
2016-05-20 07:46:11 -06:00
Bram Chen
fdbf56379a Add Chinese translation for error messages (#2450) 2016-05-18 18:49:07 +01:00
Jermolene
f846a004b6 Partial fix for copyStyles problem under Chrome
There’s still a problem: in Chrome, the styling of the textarea
placeholder isn’t correct.
2016-05-17 15:45:10 -06:00
Jermolene
682b1e7027 Fix sandbox attribute for html parser generated iframes
See
https://developer.mozilla.org/en/docs/Web/HTML/Element/iframe#attr-sandb
ox
2016-05-17 15:45:10 -06:00
Myeongjin
a90cb03975 Cleanup editions information (#2444)
* Replace spaces to tabs from editions information

* Remove theme nighttime from editions information
2016-05-17 22:00:26 +01:00
Myeongjin
34bc8a5507 Update Spanish translation (#2445)
* Remove snippet messages from miscellaneous

* Update GettingStarted
2016-05-17 22:00:00 +01:00
Myeongjin
e9eb40589d Add languages for developer documentation edition (#2446) 2016-05-17 21:59:27 +01:00
Myeongjin
6388f859d1 Add localisable strings for error (#2447)
* Add localisable strings for error

* Update tiddler Transclusion Basic Usage in fr-FR
2016-05-17 21:58:47 +01:00
Myeongjin
eb47c6b2c5 Update es-ES edition (#2442)
* Cleanup es-ES edition
* Cleanup edition infomation
* Remove newline at download-empty-button

* Update system tiddlers for es-ES edition
2016-05-16 12:01:19 -06:00
Myeongjin
2fa98ee642 Update system tiddlers for ko-KR edition (#2443)
* Change type to TiddlyWiki5 in $:/SiteSubtitle
2016-05-16 12:00:53 -06:00
Xavier Cazin
c5755c5262 fr-FR translations of strings newly made localisable by @araname (#2440)
* Translation of "count" in fr-FR

* fr-FR translation of Syncer strings
2016-05-14 09:00:25 -06:00
Bram Chen
da9f05b21c Update Chinese translation (#2439)
* Refine Simplified Chinese wording

* Add Chinese translation for new localisable strings
  * RecursiveTransclusion
  * Syncer
2016-05-13 08:39:13 -06:00