Vacation filter improvements

New Pgp encrypt/sign popup
This commit is contained in:
RainLoop Team 2015-08-07 00:54:47 +04:00
parent c99a46a118
commit 723c2ac6b8
21 changed files with 470 additions and 27 deletions

View file

@ -283,10 +283,7 @@
AbstractApp.prototype.bootstart = function ()
{
if (window.console && Utils.isFunc(window.console.log))
{
window.console.log('Psss, hacker! There is nothing interesting :)');
}
Utils.log('Ps' + 'ss, hac' + 'kers! The' + 're\'s not' + 'hing inte' + 'resting :' + ')');
Events.pub('rl.bootstart');

View file

@ -195,7 +195,7 @@
}
if (Enums.FiltersAction.Vacation === this.actionType() &&
('' === this.actionValueFourth() || -1 === this.actionValueFourth().indexOf('@'))
'' !== this.actionValueFourth() && -1 === this.actionValueFourth().indexOf('@')
)
{
this.actionValueFourth.error(true);

View file

@ -200,6 +200,7 @@ cfg.paths.js = {
// 'vendors/jsencrypt/jsencrypt.min.js',
'vendors/keymaster/keymaster.min.js',
'vendors/ifvisible/ifvisible.min.js',
// 'vendors/svg4everybody/svg4everybody.js',
'vendors/bootstrap/js/bootstrap.min.js'
]
},

View file

@ -31,7 +31,7 @@
<div class="btn-group" data-bind="visible: allowMessageListActions">
<a class="btn first btn-dark-disabled-border button-archive" data-tooltip-join="top"
data-bind="visible: isArchiveVisible, command: archiveCommand, tooltip: 'MESSAGE_LIST/BUTTON_ARCHIVE'">
<svg-icon params="icon: 'archive'"></svg-icon>
<i class="icon-archive"></i>
</a>
<a class="btn btn-dark-disabled-border button-spam" data-tooltip-join="top"
data-bind="visible: isSpamVisible, command: spamCommand, tooltip: 'MESSAGE_LIST/BUTTON_SPAM',
@ -46,7 +46,7 @@
<a class="btn last btn-dark-disabled-border button-delete" data-tooltip-join="top"
data-bind="command: deleteCommand, tooltip: 'MESSAGE_LIST/BUTTON_DELETE',
css: {'first': !isArchiveVisible() && !isSpamVisible() && !isUnSpamVisible()}">
<svg-icon params="icon: 'trash'"></svg-icon>
<i class="icon-trash"></i>
<!--<span data-bind="text: printableMessageCountForDeletion()"></span>-->
</a>
</div>

View file

@ -40,7 +40,7 @@
</div>
<br />
<a class="btn" data-bind="click: addCondition, i18nInit: true">
<svg-icon params="icon: 'plus'"></svg-icon>
<i class="icon-plus"></i>
&nbsp;&nbsp;
<span class="i18n" data-i18n="POPUPS_FILTER/BUTTON_ADD_CONDITION"></span>
</a>

View file

@ -9,7 +9,7 @@
<div class="row" data-bind="visible: inited() && !serverError()">
<div class="span5">
<a class="btn" data-bind="click: addFilter">
<svg-icon params="icon: 'plus'"></svg-icon>
<i class="icon-plus"></i>
&nbsp;&nbsp;
<span class="i18n" data-i18n="SETTINGS_FILTERS/BUTTON_ADD_FILTER"></span>
</a>
@ -93,7 +93,7 @@
</td>
<td>
<span class="delete-filter" data-bind="visible: !deleteAccess() && canBeDeleted(), click: function (oFilter) { $root.filterForDeletion(oFilter); }">
<svg-icon params="icon: 'trash'"></svg-icon>
<i class="icon-trash"></i>
</span>
</td>
</tr>

View file

@ -16,7 +16,7 @@
<input type="text" class="span5 i18n" data-bind="value: actionValueFourth"
data-i18n="[placeholder]POPUPS_FILTER/VACATION_RECIPIENTS_LABEL" />
<button class="btn setRecipientsBtn" data-bind="click: setRecipients">
<svg-icon params="icon: 'plus'"></svg-icon>
<i class="icon-plus"></i>
</button>
</div>
</div>

View file

@ -7,6 +7,6 @@
&nbsp;
<span class="delete-action button-delete pull-right" style="margin-top: 5px;"
data-bind="click: function (oCondition) { $root.removeCondition(oCondition); }">
<svg-icon params="icon: 'trash'"></svg-icon>
<i class="icon-trash"></i>
</span>
</div>

View file

@ -9,6 +9,6 @@
&nbsp;
<span class="delete-action button-delete pull-right" style="margin-top: 5px;"
data-bind="click: function (oCondition) { $root.removeCondition(oCondition); }">
<svg-icon params="icon: 'trash'"></svg-icon>
<i class="icon-trash"></i>
</span>
</div>

View file

@ -7,6 +7,6 @@
&nbsp;
<span class="delete-action button-delete pull-right" style="margin-top: 5px;"
data-bind="click: function (oCondition) { $root.removeCondition(oCondition); }">
<svg-icon params="icon: 'trash'"></svg-icon>
<i class="icon-trash"></i>
</span>
</div>

View file

@ -14,15 +14,15 @@
</td>
<td class="delete-folder-parent">
<span class="delete-folder" data-bind="visible: canBeDeleted() && !deleteAccess(), click: function (oFolder) { $root.folderForDeletion(oFolder); }">
<svg-icon params="icon: 'trash'"></svg-icon>
<i class="icon-trash"></i>
</span>
</td>
<td class="subscribe-folder-parent">
<span class="unsubscribe-folder" data-bind="visible: canBeSubScribed() && !subScribed(), click: function(oFolder) { $root.subscribeFolder(oFolder); }">
<svg-icon params="icon: 'eye'"></svg-icon>
<i class="icon-eye"></i>
</span>
<span class="subscribe-folder" data-bind="visible: canBeSubScribed() && subScribed(), click: function(oFolder) { $root.unSubscribeFolder(oFolder); }">
<svg-icon params="icon: 'eye'"></svg-icon>
<i class="icon-eye"></i>
</span>
</td>
<td class="check-folder-parent" data-bind="visible: $root.displaySpecSetting">

View file

@ -12,7 +12,7 @@
&nbsp;&nbsp;
<div style="display: inline-block" data-tooltip-join="left" data-bind="tooltip: isHttps ? '' : 'SETTINGS_OPEN_PGP/GENERATE_ONLY_HTTPS'">
<button class="btn" data-bind="click: generateOpenPgpKey, disable: !isHttps">
<svg-icon params="icon: 'key'"></svg-icon>
<i class="icon-key"></i>
&nbsp;&nbsp;
<span class="i18n" data-i18n="SETTINGS_OPEN_PGP/BUTTON_GENERATE_OPEN_PGP_KEYS"></span>
</button>
@ -30,7 +30,9 @@
<!-- ko foreach: openpgpkeysPrivate -->
<tr class="open-pgp-key-item">
<td>
<span class="open-pgp-key-img i18n" data-i18n="[title]SETTINGS_OPEN_PGP/TITLE_PRIVATE"><svg-icon params="icon: 'lock'"></svg-icon></span>
<span class="open-pgp-key-img i18n" data-i18n="[title]SETTINGS_OPEN_PGP/TITLE_PRIVATE">
<i class="icon-lock"></i>
</span>
<span class="open-pgp-key-user" data-bind="text: user"></span>
<a class="btn btn-small btn-small-small btn-danger pull-right button-delete button-delete-transitions" data-bind="css: {'delete-access': deleteAccess()}, click: function(oOpenPGP) { $root.deleteOpenPgpKey(oOpenPGP); }">
<span class="i18n" data-i18n="SETTINGS_OPEN_PGP/DELETING_ASK"></span>
@ -38,12 +40,12 @@
</td>
<td>
<span class="delete-open-pgp-key" data-bind="visible: !deleteAccess(), click: function (oOpenPGP) { $root.openPgpKeyForDeletion(oOpenPGP); }">
<svg-icon params="icon: 'trash'"></svg-icon>
<i class="icon-trash"></i>
</span>
</td>
<td>
<span class="view-open-pgp-key" data-bind="click: function (oOpenPgpKey) { $root.viewOpenPgpKey(oOpenPgpKey); }">
<svg-icon params="icon: 'eye'"></svg-icon>
<i class="icon-eye"></i>
</span>
</td>
</tr>
@ -51,7 +53,9 @@
<!-- ko foreach: openpgpkeysPublic -->
<tr class="open-pgp-key-item">
<td>
<span class="open-pgp-key-img i18n" data-i18n="[title]SETTINGS_OPEN_PGP/TITLE_PUBLIC"><svg-icon params="icon: 'key'"></svg-icon></span>
<span class="open-pgp-key-img i18n" data-i18n="[title]SETTINGS_OPEN_PGP/TITLE_PUBLIC">
<i class="icon-key"></i>
</span>
<span class="open-pgp-key-user" data-bind="text: user"></span>
(<span class="open-pgp-key-id" data-bind="text: id"></span>)
<a class="btn btn-small btn-small-small btn-danger pull-right button-delete button-delete-transitions" data-bind="css: {'delete-access': deleteAccess()}, click: function(oOpenPGP) { $root.deleteOpenPgpKey(oOpenPGP); }">
@ -60,12 +64,12 @@
</td>
<td>
<span class="delete-open-pgp-key" data-bind="visible: !deleteAccess(), click: function (oOpenPgpKey) { $root.openPgpKeyForDeletion(oOpenPgpKey); }">
<svg-icon params="icon: 'trash'"></svg-icon>
<i class="icon-trash"></i>
</span>
</td>
<td>
<span class="view-open-pgp-key" data-bind="click: function (oOpenPgpKey) { $root.viewOpenPgpKey(oOpenPgpKey); }">
<svg-icon params="icon: 'eye'"></svg-icon>
<i class="icon-eye"></i>
</span>
</td>
</tr>

View file

@ -1,7 +1,27 @@
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
<symbol id="svg-icon-plus" viewBox="0 0 512 512">
<path d="m288 224l0-128-64 0 0 128-128 0 0 64 128 0 0 128 64 0 0-128 128 0 0-64z"/>
<path d="m457 210l0 55c0 8-3 14-8 20c-5 5-12 8-19 8l-119 0l0 118c0 8-3 15-8 20c-5 5-12 8-20 8l-54 0c-8 0-15-3-20-8c-5-5-8-12-8-20l0-118l-119 0c-7 0-14-3-19-8c-5-6-8-12-8-20l0-55c0-7 3-14 8-19c5-5 12-8 19-8l119 0l0-119c0-8 3-14 8-19c5-6 12-8 20-8l54 0c8 0 15 2 20 8c5 5 8 11 8 19l0 119l119 0c7 0 14 3 19 8c5 5 8 12 8 19z"/>
</symbol>
<symbol id="svg-icon-trash" viewBox="0 0 512 512">
<path d="m480 109c-2-25-23-45-48-45l-48 0l0-16c0-26-22-48-48-48l-160 0c-27 0-48 22-48 48l0 16l-48 0c-26 0-46 20-48 45l0 0l0 35c0 18 14 32 32 32l0 272c0 35 29 64 64 64l256 0c35 0 64-29 64-64l0-272c18 0 32-14 32-32l0-35z m-320-61c0-9 7-16 16-16l160 0c9 0 16 7 16 16l0 16l-192 0z m256 400c0 18-14 32-32 32l-256 0c-18 0-32-14-32-32l0-272l320 0z m32-320l0 16l-384 0l0-32c0-9 7-16 16-16l352 0c9 0 16 7 16 16z m-304 320l32 0c9 0 16-7 16-16l0-208c0-9-7-16-16-16l-32 0c-9 0-16 7-16 16l0 208c0 9 7 16 16 16z m0-224l32 0l0 208l-32 0z m96 224l32 0c9 0 16-7 16-16l0-208c0-9-7-16-16-16l-32 0c-9 0-16 7-16 16l0 208c0 9 7 16 16 16z m0-224l32 0l0 208l-32 0z m96 224l32 0c9 0 16-7 16-16l0-208c0-9-7-16-16-16l-32 0c-9 0-16 7-16 16l0 208c0 9 7 16 16 16z m0-224l32 0l0 208l-32 0z"/>
</symbol>
<symbol id="svg-icon-key" viewBox="0 0 512 512">
<path d="m352 64c53 0 96 43 96 96c0 53-43 96-96 96c-5 0-10-1-17-2l-33-6l-24 24l-3 3l-19 19l0 26l-64 0l0 64l-64 0l0 64l-64 0l0-38l200-200l-6-33c-1-7-2-12-2-17c0-53 43-96 96-96m0-64c-88 0-160 72-160 160c0 10 1 20 3 29l-195 195l0 128l192 0l0-64l64 0l0-64l64 0l0-64l3-3c9 2 19 3 29 3c88 0 160-72 160-160c0-88-72-160-160-160z m32 160c0 18-14 32-32 32c-18 0-32-14-32-32c0-18 14-32 32-32c18 0 32 14 32 32z"/>
</symbol>
<symbol id="svg-icon-lock" viewBox="0 0 512 512">
<path d="m183 219l146 0l0-54c0-21-7-38-21-52c-15-14-32-22-52-22c-20 0-37 8-52 22c-14 14-21 31-21 52z m238 28l0 164c0 8-3 15-8 20c-6 5-12 8-20 8l-274 0c-8 0-14-3-20-8c-5-5-8-12-8-20l0-164c0-8 3-14 8-20c6-5 12-8 20-8l9 0l0-54c0-35 13-66 38-91c25-25 55-37 90-37c35 0 65 12 90 37c25 25 38 56 38 91l0 54l9 0c8 0 14 3 20 8c5 6 8 12 8 20z"/>
</symbol>
<symbol id="svg-icon-eye" viewBox="0 0 512 512">
<path d="m475 274c-29-45-65-78-108-101c11 20 17 42 17 65c0 35-13 65-38 90c-25 25-55 38-90 38c-35 0-65-13-90-38c-25-25-38-55-38-90c0-23 6-45 17-65c-43 23-79 56-108 101c25 39 57 70 95 94c38 23 79 34 124 34c45 0 86-11 124-34c38-24 70-55 95-94z m-205-109c0-4-2-7-4-10c-3-3-6-4-10-4c-24 0-44 8-61 25c-17 17-26 38-26 62c0 4 1 7 4 9c3 3 6 4 10 4c4 0 7-1 10-4c2-2 4-5 4-9c0-17 5-31 17-42c12-12 26-18 42-18c4 0 7-1 10-4c2-2 4-6 4-9z m242 109c0 7-2 13-6 20c-26 44-62 79-107 105c-45 27-93 40-143 40c-50 0-98-13-143-40c-45-26-81-61-107-105c-4-7-6-13-6-20c0-6 2-13 6-19c26-44 62-79 107-106c45-26 93-39 143-39c50 0 98 13 143 39c45 27 81 62 107 106c4 6 6 13 6 19z"/>
</symbol>
<symbol id="svg-icon-archive" viewBox="0 0 512 512">
<path d="m0 192l512 0l0 320l-512 0z m288-64l224 0l-64-128l-160 0z m-64-128l-160 0l-64 128l224 0z"/>
</symbol>
</svg>

Before

Width:  |  Height:  |  Size: 235 B

After

Width:  |  Height:  |  Size: 3 KiB

View file

@ -197,7 +197,27 @@ github.com style (c) Vasily Polovnyov <vast@whiteants.net>
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
<symbol id="svg-icon-plus" viewBox="0 0 512 512">
<path d="m288 224l0-128-64 0 0 128-128 0 0 64 128 0 0 128 64 0 0-128 128 0 0-64z"/>
<path d="m457 210l0 55c0 8-3 14-8 20c-5 5-12 8-19 8l-119 0l0 118c0 8-3 15-8 20c-5 5-12 8-20 8l-54 0c-8 0-15-3-20-8c-5-5-8-12-8-20l0-118l-119 0c-7 0-14-3-19-8c-5-6-8-12-8-20l0-55c0-7 3-14 8-19c5-5 12-8 19-8l119 0l0-119c0-8 3-14 8-19c5-6 12-8 20-8l54 0c8 0 15 2 20 8c5 5 8 11 8 19l0 119l119 0c7 0 14 3 19 8c5 5 8 12 8 19z"/>
</symbol>
<symbol id="svg-icon-trash" viewBox="0 0 512 512">
<path d="m480 109c-2-25-23-45-48-45l-48 0l0-16c0-26-22-48-48-48l-160 0c-27 0-48 22-48 48l0 16l-48 0c-26 0-46 20-48 45l0 0l0 35c0 18 14 32 32 32l0 272c0 35 29 64 64 64l256 0c35 0 64-29 64-64l0-272c18 0 32-14 32-32l0-35z m-320-61c0-9 7-16 16-16l160 0c9 0 16 7 16 16l0 16l-192 0z m256 400c0 18-14 32-32 32l-256 0c-18 0-32-14-32-32l0-272l320 0z m32-320l0 16l-384 0l0-32c0-9 7-16 16-16l352 0c9 0 16 7 16 16z m-304 320l32 0c9 0 16-7 16-16l0-208c0-9-7-16-16-16l-32 0c-9 0-16 7-16 16l0 208c0 9 7 16 16 16z m0-224l32 0l0 208l-32 0z m96 224l32 0c9 0 16-7 16-16l0-208c0-9-7-16-16-16l-32 0c-9 0-16 7-16 16l0 208c0 9 7 16 16 16z m0-224l32 0l0 208l-32 0z m96 224l32 0c9 0 16-7 16-16l0-208c0-9-7-16-16-16l-32 0c-9 0-16 7-16 16l0 208c0 9 7 16 16 16z m0-224l32 0l0 208l-32 0z"/>
</symbol>
<symbol id="svg-icon-key" viewBox="0 0 512 512">
<path d="m352 64c53 0 96 43 96 96c0 53-43 96-96 96c-5 0-10-1-17-2l-33-6l-24 24l-3 3l-19 19l0 26l-64 0l0 64l-64 0l0 64l-64 0l0-38l200-200l-6-33c-1-7-2-12-2-17c0-53 43-96 96-96m0-64c-88 0-160 72-160 160c0 10 1 20 3 29l-195 195l0 128l192 0l0-64l64 0l0-64l64 0l0-64l3-3c9 2 19 3 29 3c88 0 160-72 160-160c0-88-72-160-160-160z m32 160c0 18-14 32-32 32c-18 0-32-14-32-32c0-18 14-32 32-32c18 0 32 14 32 32z"/>
</symbol>
<symbol id="svg-icon-lock" viewBox="0 0 512 512">
<path d="m183 219l146 0l0-54c0-21-7-38-21-52c-15-14-32-22-52-22c-20 0-37 8-52 22c-14 14-21 31-21 52z m238 28l0 164c0 8-3 15-8 20c-6 5-12 8-20 8l-274 0c-8 0-14-3-20-8c-5-5-8-12-8-20l0-164c0-8 3-14 8-20c6-5 12-8 20-8l9 0l0-54c0-35 13-66 38-91c25-25 55-37 90-37c35 0 65 12 90 37c25 25 38 56 38 91l0 54l9 0c8 0 14 3 20 8c5 6 8 12 8 20z"/>
</symbol>
<symbol id="svg-icon-eye" viewBox="0 0 512 512">
<path d="m475 274c-29-45-65-78-108-101c11 20 17 42 17 65c0 35-13 65-38 90c-25 25-55 38-90 38c-35 0-65-13-90-38c-25-25-38-55-38-90c0-23 6-45 17-65c-43 23-79 56-108 101c25 39 57 70 95 94c38 23 79 34 124 34c45 0 86-11 124-34c38-24 70-55 95-94z m-205-109c0-4-2-7-4-10c-3-3-6-4-10-4c-24 0-44 8-61 25c-17 17-26 38-26 62c0 4 1 7 4 9c3 3 6 4 10 4c4 0 7-1 10-4c2-2 4-5 4-9c0-17 5-31 17-42c12-12 26-18 42-18c4 0 7-1 10-4c2-2 4-6 4-9z m242 109c0 7-2 13-6 20c-26 44-62 79-107 105c-45 27-93 40-143 40c-50 0-98-13-143-40c-45-26-81-61-107-105c-4-7-6-13-6-20c0-6 2-13 6-19c26-44 62-79 107-106c45-26 93-39 143-39c50 0 98 13 143 39c45 27 81 62 107 106c4 6 6 13 6 19z"/>
</symbol>
<symbol id="svg-icon-archive" viewBox="0 0 512 512">
<path d="m0 192l512 0l0 320l-512 0z m288-64l224 0l-64-128l-160 0z m-64-128l-160 0l-64 128l224 0z"/>
</symbol>
</svg>
@ -217,6 +237,46 @@ github.com style (c) Vasily Polovnyov <vast@whiteants.net>
<input type="text" readonly="readonly" value='<svg class="svg-icon-plus"><use xlink:href="#svg-icon-plus"></use></svg>'>
</li>
<li>
<svg class="svg-icon-trash">
<use xlink:href="#svg-icon-trash"></use>
</svg>
<input type="text" readonly="readonly" value='<svg class="svg-icon-trash"><use xlink:href="#svg-icon-trash"></use></svg>'>
</li>
<li>
<svg class="svg-icon-key">
<use xlink:href="#svg-icon-key"></use>
</svg>
<input type="text" readonly="readonly" value='<svg class="svg-icon-key"><use xlink:href="#svg-icon-key"></use></svg>'>
</li>
<li>
<svg class="svg-icon-lock">
<use xlink:href="#svg-icon-lock"></use>
</svg>
<input type="text" readonly="readonly" value='<svg class="svg-icon-lock"><use xlink:href="#svg-icon-lock"></use></svg>'>
</li>
<li>
<svg class="svg-icon-eye">
<use xlink:href="#svg-icon-eye"></use>
</svg>
<input type="text" readonly="readonly" value='<svg class="svg-icon-eye"><use xlink:href="#svg-icon-eye"></use></svg>'>
</li>
<li>
<svg class="svg-icon-archive">
<use xlink:href="#svg-icon-archive"></use>
</svg>
<input type="text" readonly="readonly" value='<svg class="svg-icon-archive"><use xlink:href="#svg-icon-archive"></use></svg>'>
</li>
</ul>
<h2>How to add SVG sprite icons to your project?</h2>

View file

@ -1,7 +1,27 @@
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
<symbol id="svg-icon-plus" viewBox="0 0 512 512">
<path d="m288 224l0-128-64 0 0 128-128 0 0 64 128 0 0 128 64 0 0-128 128 0 0-64z"/>
<path d="m457 210l0 55c0 8-3 14-8 20c-5 5-12 8-19 8l-119 0l0 118c0 8-3 15-8 20c-5 5-12 8-20 8l-54 0c-8 0-15-3-20-8c-5-5-8-12-8-20l0-118l-119 0c-7 0-14-3-19-8c-5-6-8-12-8-20l0-55c0-7 3-14 8-19c5-5 12-8 19-8l119 0l0-119c0-8 3-14 8-19c5-6 12-8 20-8l54 0c8 0 15 2 20 8c5 5 8 11 8 19l0 119l119 0c7 0 14 3 19 8c5 5 8 12 8 19z"/>
</symbol>
<symbol id="svg-icon-trash" viewBox="0 0 512 512">
<path d="m480 109c-2-25-23-45-48-45l-48 0l0-16c0-26-22-48-48-48l-160 0c-27 0-48 22-48 48l0 16l-48 0c-26 0-46 20-48 45l0 0l0 35c0 18 14 32 32 32l0 272c0 35 29 64 64 64l256 0c35 0 64-29 64-64l0-272c18 0 32-14 32-32l0-35z m-320-61c0-9 7-16 16-16l160 0c9 0 16 7 16 16l0 16l-192 0z m256 400c0 18-14 32-32 32l-256 0c-18 0-32-14-32-32l0-272l320 0z m32-320l0 16l-384 0l0-32c0-9 7-16 16-16l352 0c9 0 16 7 16 16z m-304 320l32 0c9 0 16-7 16-16l0-208c0-9-7-16-16-16l-32 0c-9 0-16 7-16 16l0 208c0 9 7 16 16 16z m0-224l32 0l0 208l-32 0z m96 224l32 0c9 0 16-7 16-16l0-208c0-9-7-16-16-16l-32 0c-9 0-16 7-16 16l0 208c0 9 7 16 16 16z m0-224l32 0l0 208l-32 0z m96 224l32 0c9 0 16-7 16-16l0-208c0-9-7-16-16-16l-32 0c-9 0-16 7-16 16l0 208c0 9 7 16 16 16z m0-224l32 0l0 208l-32 0z"/>
</symbol>
<symbol id="svg-icon-key" viewBox="0 0 512 512">
<path d="m352 64c53 0 96 43 96 96c0 53-43 96-96 96c-5 0-10-1-17-2l-33-6l-24 24l-3 3l-19 19l0 26l-64 0l0 64l-64 0l0 64l-64 0l0-38l200-200l-6-33c-1-7-2-12-2-17c0-53 43-96 96-96m0-64c-88 0-160 72-160 160c0 10 1 20 3 29l-195 195l0 128l192 0l0-64l64 0l0-64l64 0l0-64l3-3c9 2 19 3 29 3c88 0 160-72 160-160c0-88-72-160-160-160z m32 160c0 18-14 32-32 32c-18 0-32-14-32-32c0-18 14-32 32-32c18 0 32 14 32 32z"/>
</symbol>
<symbol id="svg-icon-lock" viewBox="0 0 512 512">
<path d="m183 219l146 0l0-54c0-21-7-38-21-52c-15-14-32-22-52-22c-20 0-37 8-52 22c-14 14-21 31-21 52z m238 28l0 164c0 8-3 15-8 20c-6 5-12 8-20 8l-274 0c-8 0-14-3-20-8c-5-5-8-12-8-20l0-164c0-8 3-14 8-20c6-5 12-8 20-8l9 0l0-54c0-35 13-66 38-91c25-25 55-37 90-37c35 0 65 12 90 37c25 25 38 56 38 91l0 54l9 0c8 0 14 3 20 8c5 6 8 12 8 20z"/>
</symbol>
<symbol id="svg-icon-eye" viewBox="0 0 512 512">
<path d="m475 274c-29-45-65-78-108-101c11 20 17 42 17 65c0 35-13 65-38 90c-25 25-55 38-90 38c-35 0-65-13-90-38c-25-25-38-55-38-90c0-23 6-45 17-65c-43 23-79 56-108 101c25 39 57 70 95 94c38 23 79 34 124 34c45 0 86-11 124-34c38-24 70-55 95-94z m-205-109c0-4-2-7-4-10c-3-3-6-4-10-4c-24 0-44 8-61 25c-17 17-26 38-26 62c0 4 1 7 4 9c3 3 6 4 10 4c4 0 7-1 10-4c2-2 4-5 4-9c0-17 5-31 17-42c12-12 26-18 42-18c4 0 7-1 10-4c2-2 4-6 4-9z m242 109c0 7-2 13-6 20c-26 44-62 79-107 105c-45 27-93 40-143 40c-50 0-98-13-143-40c-45-26-81-61-107-105c-4-7-6-13-6-20c0-6 2-13 6-19c26-44 62-79 107-106c45-26 93-39 143-39c50 0 98 13 143 39c45 27 81 62 107 106c4 6 6 13 6 19z"/>
</symbol>
<symbol id="svg-icon-archive" viewBox="0 0 512 512">
<path d="m0 192l512 0l0 320l-512 0z m288-64l224 0l-64-128l-160 0z m-64-128l-160 0l-64 128l224 0z"/>
</symbol>
</svg>

Before

Width:  |  Height:  |  Size: 235 B

After

Width:  |  Height:  |  Size: 3 KiB

15
vendors/svg4everybody/LICENSE.md vendored Normal file
View file

@ -0,0 +1,15 @@
# CC0 1.0 Universal License
Public Domain Dedication
The person(s) who associated a work with this deed has dedicated the work to the public domain by waiving all of his or her rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law.
You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
In no way are the patent or trademark rights of any person affected by CC0, nor are the rights that other persons may have in the work or in how the work is used, such as publicity or privacy rights.
Unless expressly stated otherwise, the person(s) who associated a work with this deed makes no warranties about the work, and disclaims liability for all uses of the work, to the fullest extent permitted by applicable law.
When using or citing the work, you should not imply endorsement by the author or the affirmer.
This is a [human-readable summary of the Legal Code](https://creativecommons.org/publicdomain/zero/1.0/) ([read the full text](https://creativecommons.org/publicdomain/zero/1.0/legalcode)).

107
vendors/svg4everybody/README.md vendored Normal file
View file

@ -0,0 +1,107 @@
# SVG for Everybody
[SVG for Everybody] is a script that adds [external spritemaps] support to otherwise [SVG-capable browsers].
To use **svg4everybody**, include the script in your document.
```html
<script src="/path/to/svg4everybody.js"></script>
```
To support IE6-8 as well, include the legacy script instead.
```html
<script src="/path/to/svg4everybody.legacy.js"></script>
```
The IE6-8 script needs to be included in the `<head>` in order to shiv the **svg** and **use** elements.
If running the standard script in IE9-11, be sure to set [X-UA-Compatible] higher than IE8. This can be done with a response header or the following meta tag.
```html
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
```
## Usage
**spritemap.svg:**
```html
<svg xmlns="http://www.w3.org/2000/svg">
<symbol id="codepen" viewBox="0 0 64 64"><title>CodePen</title><path etc.../></symbol>
<symbol id="youtube" viewBox="0 0 64 64"><title>YouTube</title><path etc.../></symbol>
<symbol id="twitter" viewBox="0 0 64 64"><title>Twitter</title><path etc.../></symbol>
</svg>
```
This spritemap works fine in **Chrome**, **Firefox**, and **Opera**. [SVG for Everybody] polyfills the experience in **IE9-11**.
```html
<svg role="img" title="CodePen"><use xlink:href="spritemap.svg#codepen"></use></svg>
<svg role="img" title="YouTube"><use xlink:href="spritemap.svg#youtube"></use></svg>
<svg role="img" title="Twitter"><use xlink:href="spritemap.svg#twitter"></use></svg>
```
![3 SVG logos](http://i.imgur.com/87Npdzn.png)
Older browsers falls back to PNG images.
```html
<svg role="img" title="CodePen"><img src="spritemap.svg.codepen.png"></svg>
<svg role="img" title="YouTube"><img src="spritemap.svg.youtube.png"></svg>
<svg role="img" title="Twitter"><img src="spritemap.svg.twitter.png"></svg>
```
Fallback PNGs point to the same location as their corresponding SVGs, only with the `#` hash replaced by a `.` dot, and with an appended `.png` extension.
## Readability and accessibility
Within your spritemap, each sprite may use a `<title>` element to identify itself.
```html
<symbol id="codepen"><title>CodePen</title><path etc.../></symbol>
```
When this sprite is used, its title will be read aloud in [JAWS](http://www.freedomscientific.com/products/fs/JAWS-product-page.asp) and [NVDA](http://www.nvaccess.org/). Then, within your document, each sprite may use a `title` attribute to identify itself.
```html
<svg title="CodePen"><use xlink:href="spritemap.svg#codepen"></use></svg>
```
This title will be read aloud in [VoiceOver](http://www.apple.com/accessibility/osx/voiceover/) and [NVDA](http://www.nvaccess.org/). At present, the `title` attribute is the only way to properly read aloud an SVG in VoiceOver.
For maximum compatibility, both the `title` attribute in the document and the `title` element in the SVG should be used.
ARIA roles may be used to provide even more accessibility. `role="presentation"` should be used when a sprite decorates other content.
```html
<a href="//twitter.com/jon_neal"><svg role="presentation"><use xlink:href="sprite.svg#twitter"></svg> Find me on Twitter</a>
```
Alternatively, `role="img"` should be used when a sprite necessitates its own description.
```html
<a href="//twitter.com/jon_neal"><svg title="Find me on Twitter" role="img"><use xlink:href="sprite.svg#twitter"></svg></a>
```
### Futher reading
- [Tips for creating accessible SVG](https://www.sitepoint.com/tips-accessible-svg/)
- [Using ARIA to enhance SVG accessibility](http://blog.paciellogroup.com/2013/12/using-aria-enhance-svg-accessibility/)
- [SVG symbol a good choice for icons](http://css-tricks.com/svg-symbol-good-choice-icons/)
- [Implementing inline SVG Icons](https://kartikprabhu.com/article/inline-svg-icons)
## Smaller SVGs
SVG files, especially exported from various editors, usually contains a lot of redundant and useless information such as editor metadata, comments, hidden elements, default or non-optimal values and other stuff that can be safely removed or converted without affecting SVG rendering result.
Use a tool like [SVGO](https://github.com/svg/svgo) to optimize SVG spritemaps.
```sh
$ [sudo] npm install -g svgo
$ svgo spritemap.svg
```
[external spritemaps]: http://css-tricks.com/svg-sprites-use-better-icon-fonts/##Browser+Support
[SVG-capable browsers]: http://caniuse.com/svg
[SVG for Everybody]: https://github.com/jonathantneal/svg4everybody
[X-UA-Compatible]: http://www.modern.ie/en-us/performance/how-to-use-x-ua-compatible

20
vendors/svg4everybody/bower.json vendored Normal file
View file

@ -0,0 +1,20 @@
{
"name": "svg4everybody",
"homepage": "https://github.com/jonathantneal/svg4everybody",
"authors": [
"Jonathan Neal <jonathantneal+github@gmail.com>"
],
"description": "Use external SVG spritemaps today.",
"main": ["svg4everybody.js", "svg4everybody.legacy.js"],
"keywords": [
"svg",
"spritemaps",
"polyfill",
"ie"
],
"repository": {
"type": "git",
"url": "git@github.com:jonathantneal/svg4everybody.git"
},
"license": "CC0 1.0"
}

18
vendors/svg4everybody/package.json vendored Normal file
View file

@ -0,0 +1,18 @@
{
"name" : "svg4everybody",
"description" : "Use external SVG spritemaps in any browser",
"keywords" : ["svg", "sprites", "spritemaps", "symbol", "defs", "oldie", "ie8", "ie9", "safari", "external", "icon", "fallback"],
"author" : "Jonathan Neal <jonathantneal@hotmail.com> (http://jonathantneal.com)",
"contributors" : [],
"dependencies" : [],
"main": "svg4everybody.js",
"homepage": "https://github.com/jonathantneal/svg4everybody",
"bugs": {
"url": "https://github.com/jonathantneal/svg4everybody/issues"
},
"repository" : {
"type": "git",
"url": "git@github.com:jonathantneal/svg4everybody.git"
},
"version" : "1.0.0"
}

84
vendors/svg4everybody/svg4everybody.js vendored Normal file
View file

@ -0,0 +1,84 @@
/*! svg4everybody v1.0.0 | github.com/jonathantneal/svg4everybody */
(function (document, uses, requestAnimationFrame, CACHE, IE9TO11) {
function embed(svg, g) {
if (g) {
var
viewBox = g.getAttribute('viewBox'),
fragment = document.createDocumentFragment(),
clone = g.cloneNode(true);
if (viewBox) {
svg.setAttribute('viewBox', viewBox);
}
while (clone.childNodes.length) {
fragment.appendChild(clone.childNodes[0]);
}
svg.appendChild(fragment);
}
}
function onload() {
var xhr = this, x = document.createElement('x'), s = xhr.s;
x.innerHTML = xhr.responseText;
xhr.onload = function () {
s.splice(0).map(function (array) {
embed(array[0], x.querySelector('#' + array[1].replace(/(\W)/g, '\\$1')));
});
};
xhr.onload();
}
function onframe() {
var use;
while ((use = uses[0])) {
var
svg = use.parentNode,
url = use.getAttribute('xlink:href').split('#'),
url_root = url[0],
url_hash = url[1];
svg.removeChild(use);
if (url_root.length) {
var xhr = CACHE[url_root] = CACHE[url_root] || new XMLHttpRequest();
if (!xhr.s) {
xhr.s = [];
xhr.open('GET', url_root);
xhr.onload = onload;
xhr.send();
}
xhr.s.push([svg, url_hash]);
if (xhr.readyState === 4) {
xhr.onload();
}
} else {
embed(svg, document.getElementById(url_hash));
}
}
requestAnimationFrame(onframe);
}
if (IE9TO11) {
onframe();
}
})(
document,
document.getElementsByTagName('use'),
window.requestAnimationFrame || window.setTimeout,
{},
/Trident\/[567]\b/.test(navigator.userAgent) || /Edge\/12/.test(navigator.userAgent) || (navigator.userAgent.match(/AppleWebKit\/(\d+)/) || [])[1] < 538
);

View file

@ -0,0 +1,97 @@
/*! svg4everybody v1.0.0 | github.com/jonathantneal/svg4everybody */
(function (document, uses, requestAnimationFrame, CACHE, LTEIE8, IE9TO11) {
function embed(svg, g) {
if (g) {
var
viewBox = g.getAttribute('viewBox'),
fragment = document.createDocumentFragment(),
clone = g.cloneNode(true);
if (viewBox) {
svg.setAttribute('viewBox', viewBox);
}
while (clone.childNodes.length) {
fragment.appendChild(clone.childNodes[0]);
}
svg.appendChild(fragment);
}
}
function onload() {
var xhr = this, x = document.createElement('x'), s = xhr.s;
x.innerHTML = xhr.responseText;
xhr.onload = function () {
s.splice(0).map(function (array) {
embed(array[0], x.querySelector('#' + array[1].replace(/(\W)/g, '\\$1')));
});
};
xhr.onload();
}
function onframe() {
var use;
while ((use = uses[0])) {
if (LTEIE8) {
var img = new Image(), src, q;
src = use.getAttribute('xlink:href');
q = (/\?[^#]+/.exec(src) || [''])[0];
img.src = src.replace(/\?[^#]+/, '').replace('#', '.').replace(/^\./, '') + '.png' + q;
use.parentNode.replaceChild(img, use);
} else {
var
svg = use.parentNode,
url = use.getAttribute('xlink:href').split('#'),
url_root = url[0],
url_hash = url[1];
svg.removeChild(use);
if (url_root.length) {
var xhr = CACHE[url_root] = CACHE[url_root] || new XMLHttpRequest();
if (!xhr.s) {
xhr.s = [];
xhr.open('GET', url_root);
xhr.onload = onload;
xhr.send();
}
xhr.s.push([svg, url_hash]);
if (xhr.readyState === 4) {
xhr.onload();
}
} else {
embed(svg, document.getElementById(url_hash));
}
}
}
requestAnimationFrame(onframe);
}
if (LTEIE8 || IE9TO11) {
onframe();
}
})(
document,
document.getElementsByTagName('use'),
window.requestAnimationFrame || window.setTimeout,
{},
/MSIE\s[1-8]\b/.test(navigator.userAgent),
/Trident\/[567]\b/.test(navigator.userAgent) || /Edge\/12/.test(navigator.userAgent) || (navigator.userAgent.match(/AppleWebKit\/(\d+)/) || [])[1] < 538,
document.createElement('svg'),
document.createElement('use')
);