Add import button

This commit is contained in:
Jermolene 2014-08-02 11:59:07 +01:00
parent 120203a8e0
commit 7816c1d944
6 changed files with 53 additions and 1 deletions

View File

@ -0,0 +1,8 @@
title: $:/core/images/import-button
tags: $:/tags/Image
<svg class="tw-image-import-button tw-image-button" width="128px" height="128px" viewBox="0 0 128 128">
<g fill-rule="evenodd">
<path d="M105.449437,94.2138951 C105.449437,94.2138951 110.049457,94.1897106 110.049457,99.4026111 C110.049457,104.615512 105.163246,104.615511 105.163246,104.615511 L45.0075072,105.157833 C45.0075072,105.157833 0.367531803,106.289842 0.367532368,66.6449212 C0.367532934,27.0000003 45.0428249,27.0000003 45.0428249,27.0000003 L105.532495,27.0000003 C105.532495,27.0000003 138.996741,25.6734987 138.996741,55.1771866 C138.996741,84.6808745 105.727102,82.8457535 105.727102,82.8457535 L56.1735087,82.8457535 C56.1735087,82.8457535 22.6899229,85.1500223 22.6899229,66.0913753 C22.6899229,47.0327282 56.1735087,49.3383013 56.1735087,49.3383013 L105.727102,49.3383013 C105.727102,49.3383013 111.245209,49.3383024 111.245209,54.8231115 C111.245209,60.3079206 105.727102,60.5074524 105.727102,60.5074524 L56.1735087,60.5074524 C56.1735087,60.5074524 37.48913,60.5074528 37.48913,66.6449195 C37.48913,72.7823862 56.1735087,71.6766023 56.1735087,71.6766023 L105.727102,71.6766029 C105.727102,71.6766029 127.835546,73.1411469 127.835546,55.1771866 C127.835546,35.5304025 105.727102,38.3035317 105.727102,38.3035317 L45.0428249,38.3035317 C45.0428249,38.3035317 11.5287276,38.3035313 11.5287276,66.6449208 C11.5287276,94.9863103 45.0428244,93.9579678 45.0428244,93.9579678 L105.449437,94.2138951 Z" transform="translate(69.367532, 66.000000) rotate(-45.000000) translate(-69.367532, -66.000000) "></path>
</g>
</svg>

View File

@ -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

View File

@ -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}}
<span class="tw-file-input-wrapper">
<$button title={{$:/language/Buttons/Import/Hint}} aria-label={{$:/language/Buttons/Import/Caption}} class=<<tw-config-toolbar-class>>>
<$list filter="[<tw-config-toolbar-icons>prefix[yes]]">
{{$:/core/images/import-button}}
</$list>
<$list filter="[<tw-config-toolbar-text>prefix[yes]]">
<$text text={{$:/language/Buttons/Import/Caption}}/>
</$list>
</$button>
<$browse/>
</span>

View File

@ -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

View File

@ -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]]

View File

@ -1352,3 +1352,28 @@ body.tw-dirty span.tw-dirty-indicator, body.tw-dirty span.tw-dirty-indicator svg
fill: <<colour dirty-indicator>>;
color: <<colour dirty-indicator>>;
}
/*
** File inputs
*/
.tw-file-input-wrapper {
position: relative;
}
.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;
}