new version

This commit is contained in:
silas 2021-04-24 12:50:28 +02:00
parent d27f9e5683
commit 9a8184e7d5
55 changed files with 23196 additions and 179 deletions

View File

@ -1,5 +1,5 @@
<div>
<p class="translation" data-translation="credits-sister-text"></p>
<p class="translation" data-translation="credits-text"></p>
<p class="translation" data-translation="credits-coin-text" data-translation-args='["https://www.freesfx.co.uk/"]'></p>
<p class="translation" data-translation="credits-music-text" data-translation-args='["https://audeeyah.de", "http://creativecommons.org/licenses/by/4.0/"]'></p>
</div>
</div>

View File

@ -23,7 +23,7 @@
"choose-theme-dialog-title": "Theme auswählen:",
"install": "Installieren",
"share-dialog": "Teilen:",
"credits-sister-text": "Ich danke meiner Lieblingsschwester, denn ohne Sie würde diese App nicht so aussehen, wie sie aussieht (wahrscheinlich eher schlechter :p)",
"credits-text": "Ein großer Dank geht an Hanna, denn ohne sie sähe die App nicht so aus, wie sie aussieht. Danke für deine guten Vorschlä und Ratschläge für das Design!",
"credits-coin-text": "Sound:<br/>Der Münz-Sound ist von der Webseite <a href = '{0}' target='_blank' rel='noopener' class = 'link'>{0}</a>. Alle Rechte für diesen Münz-Sound gehören <a target='_blank' rel='noopener' href = '{0}' class = 'link'>{0}</a>.",
"credits-music-text": "Musik:<br/>Bright And Beautiful - GEMAfreie Musik von <a href = '{0}' target='_blank' rel='noopener' class = 'link'>{0}</a><br/>Licensed under Creative Commons: By Attribution 4.0 International (CC BY 4.0)<br/><a href = '{1}' target='_blank' rel='noopener' class = 'link'>{1}</a><br/>Angepasst (geschnitten) für diese App",
"storage-info": "Fortschritt {0} dauerhaft gespeichert",

File diff suppressed because one or more lines are too long

View File

@ -1,39 +0,0 @@
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
/*!
*/
/*! *****************************************************************************
Copyright (C) Microsoft. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */

File diff suppressed because one or more lines are too long

View File

@ -246,6 +246,84 @@ module.exports = [
"id": "cordova-sqlite-storage.SQLiteProxy",
"pluginId": "cordova-sqlite-storage",
"runs": true
},
{
"file": "plugins/cordova-plugin-statusbar/www/statusbar.js",
"id": "cordova-plugin-statusbar.statusbar",
"pluginId": "cordova-plugin-statusbar",
"clobbers": [
"window.StatusBar"
]
},
{
"file": "plugins/cordova-plugin-statusbar/src/browser/StatusBarProxy.js",
"id": "cordova-plugin-statusbar.StatusBarProxy",
"pluginId": "cordova-plugin-statusbar",
"runs": true
},
{
"file": "plugins/cordova-plugin-calendar/www/Calendar.js",
"id": "cordova-plugin-calendar.Calendar",
"pluginId": "cordova-plugin-calendar",
"clobbers": [
"Calendar"
]
},
{
"file": "plugins/cordova-plugin-badge/www/badge.js",
"id": "cordova-plugin-badge.Badge",
"pluginId": "cordova-plugin-badge",
"clobbers": [
"cordova.plugins.notification.badge"
]
},
{
"file": "plugins/cordova-plugin-badge/src/browser/favico.min.js",
"id": "cordova-plugin-badge.Badge.Favico",
"pluginId": "cordova-plugin-badge",
"clobbers": [
"cordova.plugins.notification.badge.Favico"
]
},
{
"file": "plugins/cordova-plugin-badge/src/browser/BadgeProxy.js",
"id": "cordova-plugin-badge.Badge.Proxy",
"pluginId": "cordova-plugin-badge",
"runs": true
},
{
"file": "plugins/cordova-plugin-local-notification/www/local-notification.js",
"id": "cordova-plugin-local-notification.LocalNotification",
"pluginId": "cordova-plugin-local-notification",
"clobbers": [
"cordova.plugins.notification.local"
]
},
{
"file": "plugins/cordova-plugin-local-notification/www/local-notification-core.js",
"id": "cordova-plugin-local-notification.LocalNotification.Core",
"pluginId": "cordova-plugin-local-notification",
"clobbers": [
"cordova.plugins.notification.local.core",
"plugin.notification.local.core"
]
},
{
"file": "plugins/cordova-plugin-local-notification/www/local-notification-util.js",
"id": "cordova-plugin-local-notification.LocalNotification.Util",
"pluginId": "cordova-plugin-local-notification",
"merges": [
"cordova.plugins.notification.local.core",
"plugin.notification.local.core"
]
},
{
"file": "plugins/cordova-plugin-background-fetch/www/BackgroundFetch.js",
"id": "cordova-plugin-background-fetch.BackgroundFetch",
"pluginId": "cordova-plugin-background-fetch",
"clobbers": [
"window.BackgroundFetch"
]
}
];
module.exports.metadata =
@ -257,7 +335,13 @@ module.exports.metadata =
"cordova-plugin-tts": "0.2.3",
"cordova-plugin-device": "2.0.3",
"cordova-plugin-file": "6.0.2",
"cordova-sqlite-storage": "5.1.0"
"cordova-sqlite-storage": "5.1.0",
"cordova-plugin-statusbar": "2.4.3",
"cordova-plugin-calendar": "5.1.5",
"cordova-plugin-badge": "0.8.8",
"cordova-plugin-local-notification": "0.9.0-beta.2",
"cordova-plugin-background-fetch": "6.1.1",
"cordova-plugin-wkwebview-file-xhr": "3.0.0"
}
// BOTTOM OF METADATA
});

View File

@ -1 +1,24 @@
<div class="window-container"> <div class="flex-container"> <span class="window-resize edge nw" data-direction="-1,-1">&nbsp;</span> <span class="window-resize top grow" data-direction="0,-1">&nbsp;</span> <span class="window-resize edge ne" data-direction="1,-1">&nbsp;</span> </div> <div class="flex-container grow overflow-hidden"> <div class="window-resize left" data-direction="-1,0">&nbsp;</div> <div class="grow flex-container flex-dir-column"> <h4 id="title">&nbsp;</h4> <div class="window grow"> <span id="child-view"></span> </div> </div> <div class="window-resize right" data-direction="1,0">&nbsp;</div> </div> <div class="flex-container"> <div class="window-resize edge sw" data-direction="-1,1">&nbsp;</div> <div class="window-resize bottom grow" data-direction="0,1">&nbsp;</div> <div class="window-resize edge se" data-direction="1,1">&nbsp;</div> </div> </div>
<div class="window-container">
<div class="flex-container">
<span class="window-resize edge nw" data-direction="-1,-1">&nbsp;</span>
<span class="window-resize top grow" data-direction="0,-1">&nbsp;</span>
<span class="window-resize edge ne" data-direction="1,-1">&nbsp;</span>
</div>
<div class="flex-container grow overflow-hidden">
<div class="window-resize left" data-direction="-1,0">&nbsp;</div>
<div class="grow flex-container flex-dir-column max-width-100">
<div class="flex-container"><h4 id="title" class="grow">&nbsp;</h4></div>
<div class="window">
<span id="child-view"></span>
</div>
</div>
<div class="window-resize right" data-direction="1,0">&nbsp;</div>
</div>
<div class="flex-container">
<div class="window-resize edge sw" data-direction="-1,1">&nbsp;</div>
<div class="window-resize bottom grow" data-direction="0,1">&nbsp;</div>
<div class="window-resize edge se" data-direction="1,1">&nbsp;</div>
</div>
</div>

View File

@ -1 +1,59 @@
<div class="flex-container alphabetic-list"> <article class="grow alphabetic-list-container"> <span class="alphabet-section A"></span> <span class="alphabet-section B"></span> <span class="alphabet-section C"></span> <span class="alphabet-section D"></span> <span class="alphabet-section E"></span> <span class="alphabet-section F"></span> <span class="alphabet-section G"></span> <span class="alphabet-section H"></span> <span class="alphabet-section I"></span> <span class="alphabet-section J"></span> <span class="alphabet-section K"></span> <span class="alphabet-section L"></span> <span class="alphabet-section M"></span> <span class="alphabet-section N"></span> <span class="alphabet-section O"></span> <span class="alphabet-section P"></span> <span class="alphabet-section Q"></span> <span class="alphabet-section R"></span> <span class="alphabet-section S"></span> <span class="alphabet-section T"></span> <span class="alphabet-section U"></span> <span class="alphabet-section V"></span> <span class="alphabet-section W"></span> <span class="alphabet-section X"></span> <span class="alphabet-section Y"></span> <span class="alphabet-section Z"></span> </article> <span class="alphabetic-list-sidealphabet"> <span class="alphabet-scroll-to" data-letter="A">A</span> <span class="alphabet-scroll-to" data-letter="B">B</span> <span class="alphabet-scroll-to" data-letter="C">C</span> <span class="alphabet-scroll-to" data-letter="D">D</span> <span class="alphabet-scroll-to" data-letter="E">E</span> <span class="alphabet-scroll-to" data-letter="F">F</span> <span class="alphabet-scroll-to" data-letter="G">G</span> <span class="alphabet-scroll-to" data-letter="H">H</span> <span class="alphabet-scroll-to" data-letter="I">I</span> <span class="alphabet-scroll-to" data-letter="J">J</span> <span class="alphabet-scroll-to" data-letter="K">K</span> <span class="alphabet-scroll-to" data-letter="L">L</span> <span class="alphabet-scroll-to" data-letter="M">M</span> <span class="alphabet-scroll-to" data-letter="N">N</span> <span class="alphabet-scroll-to" data-letter="O">O</span> <span class="alphabet-scroll-to" data-letter="P">P</span> <span class="alphabet-scroll-to" data-letter="Q">Q</span> <span class="alphabet-scroll-to" data-letter="R">R</span> <span class="alphabet-scroll-to" data-letter="S">S</span> <span class="alphabet-scroll-to" data-letter="T">T</span> <span class="alphabet-scroll-to" data-letter="U">U</span> <span class="alphabet-scroll-to" data-letter="V">V</span> <span class="alphabet-scroll-to" data-letter="W">W</span> <span class="alphabet-scroll-to" data-letter="X">X</span> <span class="alphabet-scroll-to" data-letter="Y">Y</span> <span class="alphabet-scroll-to" data-letter="Z">Z</span> </span> </div>
<div class="flex-container alphabetic-list">
<article class="grow alphabetic-list-container">
<span id ='alphabetic-list-heading'></span>
<span class='alphabet-section A'></span>
<span class='alphabet-section B'></span>
<span class='alphabet-section C'></span>
<span class='alphabet-section D'></span>
<span class='alphabet-section E'></span>
<span class='alphabet-section F'></span>
<span class='alphabet-section G'></span>
<span class='alphabet-section H'></span>
<span class='alphabet-section I'></span>
<span class='alphabet-section J'></span>
<span class='alphabet-section K'></span>
<span class='alphabet-section L'></span>
<span class='alphabet-section M'></span>
<span class='alphabet-section N'></span>
<span class='alphabet-section O'></span>
<span class='alphabet-section P'></span>
<span class='alphabet-section Q'></span>
<span class='alphabet-section R'></span>
<span class='alphabet-section S'></span>
<span class='alphabet-section T'></span>
<span class='alphabet-section U'></span>
<span class='alphabet-section V'></span>
<span class='alphabet-section W'></span>
<span class='alphabet-section X'></span>
<span class='alphabet-section Y'></span>
<span class='alphabet-section Z'></span>
</article>
<span class="alphabetic-list-sidealphabet">
<span class="alphabet-scroll-to" data-letter="A">A</span>
<span class="alphabet-scroll-to" data-letter="B">B</span>
<span class="alphabet-scroll-to" data-letter="C">C</span>
<span class="alphabet-scroll-to" data-letter="D">D</span>
<span class="alphabet-scroll-to" data-letter="E">E</span>
<span class="alphabet-scroll-to" data-letter="F">F</span>
<span class="alphabet-scroll-to" data-letter="G">G</span>
<span class="alphabet-scroll-to" data-letter="H">H</span>
<span class="alphabet-scroll-to" data-letter="I">I</span>
<span class="alphabet-scroll-to" data-letter="J">J</span>
<span class="alphabet-scroll-to" data-letter="K">K</span>
<span class="alphabet-scroll-to" data-letter="L">L</span>
<span class="alphabet-scroll-to" data-letter="M">M</span>
<span class="alphabet-scroll-to" data-letter="N">N</span>
<span class="alphabet-scroll-to" data-letter="O">O</span>
<span class="alphabet-scroll-to" data-letter="P">P</span>
<span class="alphabet-scroll-to" data-letter="Q">Q</span>
<span class="alphabet-scroll-to" data-letter="R">R</span>
<span class="alphabet-scroll-to" data-letter="S">S</span>
<span class="alphabet-scroll-to" data-letter="T">T</span>
<span class="alphabet-scroll-to" data-letter="U">U</span>
<span class="alphabet-scroll-to" data-letter="V">V</span>
<span class="alphabet-scroll-to" data-letter="W">W</span>
<span class="alphabet-scroll-to" data-letter="X">X</span>
<span class="alphabet-scroll-to" data-letter="Y">Y</span>
<span class="alphabet-scroll-to" data-letter="Z">Z</span>
</span>
</div>

View File

@ -1 +1,17 @@
<div> <h1 id="username"></h1> <div class="grid-x"> <div class="small-6" id="has-role-container"> <div class="grid-x has-role" id="has-role-template"> <span class="small-10 role-name"></span> <button class="small-2 button remove-role">-&gt;</button> </div> </div> <div class="small-6" id="available-role-container"> <div class="grid-x has-role" id="available-role-template"> <button class="small-2 add-role button">&lt;-</button> <span class="small-10 role-name"></span> </div> </div> </div> </div>
<div>
<h1 id = "username"></h1>
<div class="grid-x">
<div class="small-6" id = "has-role-container">
<div class="grid-x has-role" id = "has-role-template">
<span class="small-10 role-name"></span>
<button class="small-2 button remove-role">-&gt;</button>
</div>
</div>
<div class="small-6" id = "available-role-container">
<div class="grid-x has-role" id = "available-role-template">
<button class="small-2 add-role button">&lt;-</button>
<span class="small-10 role-name"></span>
</div>
</div>
</div>
</div>

View File

@ -1 +1,7 @@
<div> <div id="choose-container"> <div id="choose-value-template" class="choose-dialog-value-row grid-x"> <div class="choose-dialog-value column small-12"></div> </div> </div> </div>
<div>
<div id='choose-container'>
<div id='choose-value-template' class = 'choose-dialog-value-row grid-x'>
<div class='choose-dialog-value column small-12'></div>
</div>
</div>
</div>

View File

@ -1 +1,21 @@
<h1 class="translation">contact</h1> <p id="contactText"> </p> <form class="grid-x" id="contact-form"> <label class="small-12 medium-6 right"> <input type="checkbox" value="1" required name="policy"> <span> <a class="link translation" href="/?s=privacyPolicy">privacy-policy</a> <span class="translation">privacy policy accepted</span> </span> </label> <label class="small-12 medium-6"> <input type="email" required name="email"> <span class="translation">e-mail</span> </label> <label class="small-12"> <textarea required name="message"></textarea> <span class="translation">message</span> </label> <button class="small-12 button translation">send</button> </form>
<h1 class = "translation">contact</h1>
<p id = "contactText">
</p>
<form class="grid-x" id = "contact-form">
<label class="small-12 medium-6 right">
<input type="checkbox" value="1" required name="policy">
<span>
<a class = "link translation" href="/?s=privacyPolicy">privacy-policy</a>
<span class = "translation">privacy policy accepted</span>
</span>
</label>
<label class = "small-12 medium-6">
<input type="email" required name="email">
<span class="translation">e-mail</span>
</label>
<label class="small-12">
<textarea required name="message"></textarea>
<span class="translation">message</span>
</label>
<button class="small-12 button translation">send</button>
</form>

View File

@ -1 +1,7 @@
<div class="grid-x grid-padding-x grid-padding-y grow grid-container" id="main-content-container"> <div class="cell small-12 max-height-100" id="main-content"> <span id="site-content"> </span> </div> </div>
<div class="grid-x grid-padding-x grid-padding-y grow grid-container" id="main-content-container">
<div class="cell small-12 max-height-100" id="main-content">
<!--site-_content wird ersetzt, daher keine wirklichen attribute-->
<span id="site-content">
</span>
</div>
</div>

View File

@ -1 +1,5 @@
<div> <p class="translation" data-translation="credits-sister-text"></p> <p class="translation" data-translation="credits-coin-text" data-translation-args='["https://www.freesfx.co.uk/"]'></p> <p class="translation" data-translation="credits-music-text" data-translation-args='["https://audeeyah.de", "http://creativecommons.org/licenses/by/4.0/"]'></p> </div>
<div>
<p class="translation" data-translation="credits-text"></p>
<p class="translation" data-translation="credits-coin-text" data-translation-args='["https://www.freesfx.co.uk/"]'></p>
<p class="translation" data-translation="credits-music-text" data-translation-args='["https://audeeyah.de", "http://creativecommons.org/licenses/by/4.0/"]'></p>
</div>

View File

@ -1 +1,3 @@
<div class="max-height flex-center"> <div data-translation="game-ended" class="center translation"></div> </div>
<div class = 'max-height flex-center'>
<div data-translation="game-ended" class = 'center translation'></div>
</div>

View File

@ -1 +1,26 @@
<article> <section id="forgot-password"> <h2 class="translation">password forgotten</h2> <form id="forgot-password-form"> <label> <input type="text" name="email" required> <span class="translation">Email</span> </label> <button class="translation button">Request new password</button> </form> </section> <section id="reset-password" class="hidden"> <h2 class="translation">reset password</h2> <form id="reset-password-form"> <label> <input type="password" name="password1" required> <span class="translation">Password</span> </label> <label> <input type="password" name="password2" required> <span class="translation">Repeat Password</span> </label> <button class="translation button">Reset password</button> </form> </section> </article>
<article >
<section id = "forgot-password">
<h2 class="translation">password forgotten</h2>
<form id="forgot-password-form">
<label>
<input type="text" name='email' required>
<span class="translation">Email</span>
</label>
<button class="translation button">Request new password</button>
</form>
</section>
<section id = "reset-password" class="hidden">
<h2 class="translation">reset password</h2>
<form id="reset-password-form">
<label>
<input type="password" name='password1' required>
<span class="translation">Password</span>
</label>
<label>
<input type="password" name='password2' required>
<span class="translation">Repeat Password</span>
</label>
<button class="translation button">Reset password</button>
</form>
</section>
</article>

View File

@ -1 +1,11 @@
<div> <h2>Impressum</h2> <p>Silas Günther<br/> Mariabrunnstraße 48<br/> 52064 Aachen<br/> Deutschland </p> <p>E-Mail: <a href="mailto:wordRotator@silas.link">wordRotator@silas.link</a><br/> <a href="?s=contact" class="link" target="_blank">Kontaktformular</a> </p> </div>
<div>
<h2>Impressum</h2>
<p>Silas Günther<br />
Mariabrunnstraße 48<br />
52064 Aachen<br/>
Deutschland
</p>
<p>E-Mail: <a href="mailto:wordRotator@silas.link">wordRotator@silas.link</a><br/>
<a href = "?s=contact" class = "link">Kontaktformular</a>
</p>
</div>

View File

@ -1 +1,54 @@
<div class="max-height overflow-hidden"> <div id="segment-leaf-template" class="segment segment-leaf"> <div class="leaf-element"></div> </div> <div id="segment-parent-template" class="segment segment-parent"> <div class="child-container"></div> </div> <div id="segment-row-template" class="segment segment-row"> <div class="child-container"></div> </div> <div id="segment-column-template" class="segment segment-column"> <div class="child-container"></div> </div> <div id="segment-triangle-template" class="segment segment-triangle"> <div class="child-container"></div> </div> <div id="tutorial-pointer"></div> <div class="max-height fill-me"> <div class="height-20 no-transition tutorial-text center flex-center hidden"> <div class="step-1 hidden translation" data-translation="tutorial-step-1"></div> <div class="step-2 hidden translation" data-translation="tutorial-step-2"></div> <div class="step-3 hidden translation" data-translation="tutorial-step-3"></div> <div class="step-4 hidden translation" data-translation="tutorial-step-4"></div> </div> <div class="height-20 show-when-won center flex-center fill-me" style="min-height:45px"> <div class="grow max-width"> <b class="translation" data-translation="won" id="won-text"></b> </div> <div id="coin-container"> <div id="coin-template" class="coin" style="opacity:0"> <img src="img/coin.png"/> </div> </div> </div> <div class="flex-center level-container grow"> <div id="level"> </div> </div> <div class="show-when-won flex-center height-20"> <button class="button max-width translation" id="continue-button" data-translation="continue"></button> </div> </div> <div class="tutorial-blanket"></div> </div>
<div class='max-height overflow-hidden'>
<!-- Templates for segments-->
<div id='segment-leaf-template' class='segment segment-leaf'>
<div class='leaf-element'></div>
</div>
<div id='segment-parent-template' class='segment segment-parent'>
<div class='child-container'></div>
</div>
<div id='segment-row-template' class='segment segment-row'>
<div class='child-container'></div>
</div>
<div id='segment-column-template' class='segment segment-column'>
<div class='child-container'></div>
</div>
<div id='segment-triangle-template' class='segment segment-triangle'>
<div class='child-container'></div>
</div>
<div id = 'tutorial-pointer'></div>
<!-- Site Content -->
<div class='max-height fill-me'>
<!-- <div class="text-right max-width">-->
<!-- <button class="button show-while-playing" id='help-button'>-->
<!-- <img src = "../../img/help.png"/>-->
<!-- </button>-->
<!-- </div>-->
<div class = 'height-20 no-transition tutorial-text center flex-center hidden'>
<div class = 'step-1 hidden translation' data-translation="tutorial-step-1"></div>
<div class = 'step-2 hidden translation' data-translation="tutorial-step-2"></div>
<div class = 'step-3 hidden translation' data-translation="tutorial-step-3"></div>
<div class = 'step-4 hidden translation' data-translation="tutorial-step-4"></div>
</div>
<div class='height-20 show-when-won center flex-center fill-me' style = 'min-height: 45px'>
<div class = 'grow max-width'>
<b class="translation" data-translation="won" id="won-text"></b>
</div>
<div id='coin-container'>
<div id='coin-template' class='coin' style="opacity: 0">
<img src='img/coin.png'/>
</div>
</div>
</div>
<div class="flex-center level-container grow">
<div id='level'>
</div>
</div>
<div class='show-when-won flex-center height-20'>
<button class='button max-width translation' id='continue-button' data-translation="continue"></button>
</div>
</div>
<div class = 'tutorial-blanket'></div>
</div>

View File

@ -1 +1,21 @@
<article> <section> <h2 class="translation">Login</h2> <form id="login-form"> <label> <input type="text" name="email" required> <span class="translation">Email</span> </label> <label> <input type="password" name="password" required> <span class="translation">password</span> </label> <label> <input type="checkbox" checked="checked" name="saveLogin"> <span class="translation">stay logged in</span> </label> <button class="translation button">Login</button> </form> <button class="translation link" id="forgot-pw">Passwort vergessen?</button> </section> </article>
<article >
<section>
<h2 class="translation">Login</h2>
<form id="login-form">
<label>
<input type="text" name='email' required>
<span class="translation">Email</span>
</label>
<label>
<input type="password" name='password' required>
<span class="translation">password</span>
</label>
<label>
<input type="checkbox" checked name='saveLogin'>
<span class="translation">stay logged in</span>
</label>
<button class="translation button">Login</button>
</form>
<button class="translation link" id = "forgot-pw">Passwort vergessen?</button>
</section>
</article>

View File

@ -1 +1,39 @@
<div class="max-height flex-center"> <div id="segment-leaf-template" class="segment segment-leaf"> <div class="leaf-element"></div> </div> <div id="segment-parent-template" class="segment segment-parent"> <div class="child-container"></div> </div> <div id="segment-row-template" class="segment segment-row"> <div class="child-container"></div> </div> <div id="segment-triangle-template" class="segment segment-triangle"> <div class="child-container"></div> </div> <div class="height-60 max-width flex-center relative-level-number"> <div id="level"></div> <span id="level-number-container" class="visible in-main-menu"> <span id="level-number">1</span> </span> </div> <div class="height-30 flex-center fill-me"> <button class="button grow text-center" id="play-button"><span class="translation" data-translation="play"></span></button> <div class="max-width line-height-1 fill-me vertical"> <label class="switch"> <div data-view="img/speaker.svg"></div> <input type="checkbox" class="setting" id="play-sound"> <span class="slider"></span> </label> <div class="grow center" id="share-button"><span data-view="img/share.svg"></span></div> <label class="switch right"> <div data-view="img/music.svg"></div> <input type="checkbox" class="setting" id="play-music"> <span class="slider"></span> </label> </div> </div> </div>
<div class='max-height flex-center'>
<!--<b>WordRotator</b>-->
<div id='segment-leaf-template' class='segment segment-leaf'>
<div class='leaf-element'></div>
</div>
<div id='segment-parent-template' class='segment segment-parent'>
<div class='child-container'></div>
</div>
<div id='segment-row-template' class='segment segment-row'>
<div class='child-container'></div>
</div>
<div id='segment-triangle-template' class='segment segment-triangle'>
<div class='child-container'></div>
</div>
<div class='height-60 max-width flex-center relative-level-number'>
<div id='level'></div>
<span id='level-number-container' class='visible in-main-menu'>
<span id='level-number'>1</span>
</span>
</div>
<div class='height-30 flex-center fill-me'>
<button class='button grow text-center' id='play-button'><span class="translation" data-translation="play"></span></button>
<div class='max-width line-height-1 fill-me vertical'>
<label class="switch">
<div data-view="img/speaker.svg"></div>
<input type="checkbox" class="setting" id="play-sound">
<span class="slider"></span>
</label>
<div class="grow center" id = "share-button"><span data-view="img/share.svg"></span></div>
<label class="switch right">
<div data-view="img/music.svg"></div>
<input type="checkbox" class="setting" id="play-music">
<span class="slider"></span>
</label>
</div>
</div>
</div>

View File

@ -1 +1,12 @@
<div class="grid-container flex-dir-column flex-container height-100" id="main-content-container"> <span id="navbar-fragment"></span> <div class="grid-x grid-padding-x grid-padding-y grow max-height-100"> <div class="cell small-12" id="main-content"> <span id="site-content"> </span> </div> </div> </div>
<!--<div class="flex-dir-column flex-container height-100">-->
<div class="grid-container flex-dir-column flex-container height-100" id="main-content-container">
<span id="navbar-fragment"></span>
<div class="grid-x grid-padding-x grid-padding-y grow max-height-100">
<div class="cell small-12" id="main-content">
<!--site-_content wird ersetzt, daher keine wirklichen attribute-->
<span id="site-content">
</span>
</div>
</div>
</div>
<!--</div>-->

View File

@ -1 +1,37 @@
<nav class="top-bar"> <img class="background-img"> <span class="grid-container width-100"> <span class="grid-padding-x"> <span class="small-12 cell"> <div class="hidden back-button"> <img data-view="img/arrowLeft.svg" alt="back"> </div> <div class="hidden logo"> <img class="logo-img"> </div> <div class="top-bar-title grow"> <strong> <a class="hidden-link" href="?"> <span class="" id="title-element-container"></span> </a> </strong> </div> <div id="navbar-close-listener-container" style="display:none"> <div id="navbar-close-listener"></div> </div> <ul class="dropdown menu horizontal navbar-menu" id="navbar-menu-visible"> <div id="navbar-menu-visible-close-listener"></div> </ul> <span id="responsive-menu-toggle" class="right"> <button class="menu-icon" type="button" data-toggle=""></button> </span> <div id="responsive-menu"> <ul class="menu vertical accordion-menu navbar-menu hidden-menu" id="navbar-menu-hidden"> </ul> </div> </span> </span> </span> </nav>
<nav class="top-bar">
<img class="background-img">
<span class="grid-container width-100">
<span class="grid-padding-x ">
<span class="small-12 cell">
<div class="hidden back-button">
<img data-view="img/arrowLeft.svg" alt="back">
</div>
<div class="hidden logo">
<img class = "logo-img">
</div>
<div class="top-bar-title grow">
<strong>
<a class="hidden-link" href="?">
<span class="" id='title-element-container'></span>
</a>
</strong>
</div>
<div id='navbar-close-listener-container' style="display: none">
<div id='navbar-close-listener'></div>
</div>
<ul class="dropdown menu horizontal navbar-menu" id='navbar-menu-visible'>
<div id='navbar-menu-visible-close-listener'></div>
</ul>
<span id="responsive-menu-toggle" class="right">
<button class="menu-icon" type="button" data-toggle=""></button>
</span>
<div id="responsive-menu">
<ul class="menu vertical accordion-menu navbar-menu hidden-menu" id="navbar-menu-hidden">
</ul>
</div>
</span>
</span>
</span>
</nav>

View File

@ -1 +1,9 @@
<br/> <br/> <br/> <br/> <br/> <h2 class="translation">Not allowed</h2> <p class="translation">You don't have the rights to do this!</p> <p class="translation">If you are not logged in, please log in and try again.</p>
<br/>
<br/>
<br/>
<br/>
<br/>
<h2 class="translation">Not allowed</h2>
<p class="translation">You don't have the rights to do this!</p>
<p class="translation">If you are not logged in, please log in and try again.</p>

File diff suppressed because one or more lines are too long

View File

@ -1 +1,28 @@
<article> <section> <h2 class="translation">registration</h2> <form id="registration-form"> <label> <input type="text" name="email" required> <span class="translation">Email</span> </label> <label> <input type="text" name="username" required> <span class="translation">username</span> </label> <label> <input type="password" name="password" required> <span class="translation">password</span> </label> <label> <input type="password" name="password2" required> <span class="translation">retype password</span> </label> <label> <input type="checkbox" name="agbAccepted" required> <span class="translation">I have read and accepted the terms and conditions.</span> </label> <button class="translation button">registration</button> </form> </section> </article>
<article >
<section>
<h2 class="translation">registration</h2>
<form id = "registration-form">
<label>
<input type="text" name='email' required>
<span class="translation">Email</span>
</label>
<label>
<input type="text" name='username' required>
<span class="translation">username</span>
</label>
<label>
<input type="password" name='password' required>
<span class="translation">password</span>
</label>
<label>
<input type="password" name='password2' required>
<span class="translation">retype password</span>
</label>
<label>
<input type="checkbox" name='agbAccepted' required>
<span class="translation">I have read and accepted the terms and conditions.</span>
</label>
<button class="translation button">registration</button>
</form>
</section>
</article>

View File

@ -1 +1,10 @@
<div> <form id="user-search"> <input type="text" id="username-input"> </form> <div id="user-container"> <div id="user-template"> <span class="name"></span> </div> </div> </div>
<div>
<form id = "user-search">
<input type = "text" id = "username-input">
</form>
<div id = "user-container">
<div id = "user-template">
<span class = "name"></span>
</div>
</div>
</div>

View File

@ -1 +1,61 @@
<div class="max-height fill-me"> <div class="grid-x max-width grow flex-center"> <div class="columns small-centered small-12 smedium-11 medium-9 large-7"> <label class="switch grid-x setting-row"> <span class="columns small-6 translation">sound</span> <span class="columns small-6 text-right"> <input type="checkbox" class="setting" id="play-sound" name="play-sound" value="1" data-default="1"> <span class="slider"></span> </span> </label> <label class="switch grid-x setting-row"> <span class="columns small-6 translation">music</span> <span class="columns small-6 text-right"> <input type="checkbox" class="setting" id="play-music" name="play-music" value="1" data-default="1"> <span class="slider"></span> </span> </label> <div class="grid-x setting-row" id="credits-button"> <span class="columns small-6 translation">credits</span> <span class="columns small-6 text-right translation">&gt;</span> </div> <div class="grid-x setting-row" id="privacy-policy-button"> <span class="columns small-6 translation">privacy-policy</span> <span class="columns small-6 text-right translation">&gt;</span> </div> <div class="grid-x setting-row" id="impressum-button"> <span class="columns small-6 translation">impressum</span> <span class="columns small-6 text-right translation">&gt;</span> </div> <div class="grid-x setting-row" id="contact-button"> <span class="columns small-6 translation">contact</span> <span class="columns small-6 text-right translation">&gt;</span> </div> <label class="switch grid-x setting-row"> <span class="columns small-6 translation">track</span> <span class="columns small-6 text-right"> <input type="checkbox" class="setting" id="track-switch" name="matomoShouldTrack" value="1" data-default="1" data-raw="1"> <span class="slider"></span> </span> </label> <div class="grid-x setting-row hidden"> <span class="column small-10" id="storage-info"></span> <span class="columns small-2 text-right translation">&gt;</span> </div> <div class="grid-x setting-row"> <span class="column small-6 translation">version-label</span> <span class="column small-6 text-right" id="version-info"></span> </div> <button id="reset-levels" class="button hidden">reset-levels</button> </div> </div> </div>
<div class='max-height fill-me'>
<div class='grid-x max-width grow flex-center'>
<div class='columns small-centered small-12 smedium-11 medium-9 large-7'>
<label class="switch grid-x setting-row">
<span class='columns small-6 translation'>sound</span>
<span class='columns small-6 text-right'>
<input type="checkbox" class="setting" id="play-sound" name='play-sound' value="1"
data-default="1">
<span class="slider"></span>
</span>
</label>
<label class="switch grid-x setting-row">
<span class='columns small-6 translation' >music</span>
<span class='columns small-6 text-right'>
<input type="checkbox" class="setting" id="play-music" name='play-music' value="1"
data-default="1">
<span class="slider"></span>
</span>
</label>
<div class='grid-x setting-row' id='tutorial-button'>
<span class='columns small-6 translation'>tutorial</span>
<span class='columns small-6 text-right translation'>&gt;</span>
</div>
<div class='grid-x setting-row' id='credits-button'>
<span class='columns small-6 translation' >credits</span>
<span class='columns small-6 text-right translation'>&gt;</span>
</div>
<div class='grid-x setting-row' id='privacy-policy-button'>
<span class='columns small-6 translation'>privacy-policy</span>
<span class='columns small-6 text-right translation'>&gt;</span>
</div>
<div class='grid-x setting-row' id='impressum-button'>
<span class='columns small-6 translation' >impressum</span>
<span class='columns small-6 text-right translation'>&gt;</span>
</div>
<div class='grid-x setting-row' id='contact-button'>
<span class='columns small-6 translation'>contact</span>
<span class='columns small-6 text-right translation'>&gt;</span>
</div>
<label class="switch grid-x setting-row">
<span class='columns small-6 translation'>track</span>
<span class='columns small-6 text-right'>
<input type="checkbox" class="setting" id="track-switch" name='matomoShouldTrack' value="1"
data-default="1" data-raw="1">
<span class="slider"></span>
</span>
</label>
<div class='grid-x setting-row hidden' >
<span class = "column small-10" id='storage-info'></span>
<span class='columns small-2 text-right translation'>&gt;</span>
</div>
<div class='grid-x setting-row' >
<span class = "column small-6 translation">version-label</span>
<span class = "column small-6 text-right" id='version-info'></span>
</div>
<button id='reset-levels' class="button hidden">reset-levels</button>
</div>
</div>
</div>

View File

@ -1 +1,3 @@
<div> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <div id="wordRotatorSettings"></div> </div>
<div class="height-100">
<div id = "wordRotatorSettings" class="height-100" ></div>
</div>

View File

@ -1 +1,9 @@
<div class="max-width center"> <a class="share-icon" id="whatsapp-share"> <img data-view="img/whatsapp.svg"> </a> <a class="share-icon" id="telegram-share"> <img data-view="img/telegram.svg"> </a> </div>
<div class = 'max-width center'>
<a class="share-icon" id = "whatsapp-share">
<img data-view="img/whatsapp.svg">
</a>
<a class="share-icon" id = "telegram-share">
<img data-view="img/telegram.svg">
</a>
</div>

View File

@ -1 +1 @@
<div class="swipe-container height-100"></div>
<div class = "swipe-container height-100"></div>

View File

@ -1 +1,9 @@
<div class="tab-fragment"> <div class="tab-names flex-container flex-dir-row"> <div class="tab-button tab-button-template"></div> <div class="grow border-bottom">&nbsp;</div> </div> <div class="tab-content"> <div class="tab-site tab-site-template"></div> </div> </div>
<div class="tab-fragment">
<div class="tab-names flex-container flex-dir-row">
<div class="tab-button tab-button-template"></div>
<div class="grow border-bottom">&nbsp;</div>
</div>
<div class="tab-content">
<div class="tab-site tab-site-template active"></div>
</div>
</div>

View File

@ -0,0 +1,39 @@
<article id=tutorial-site>
<section>
<div id='segment-leaf-template' class='segment segment-leaf'>
<div class='leaf-element'></div>
</div>
<div id='segment-parent-template' class='segment segment-parent'>
<div class='child-container'></div>
</div>
<div id='segment-row-template' class='segment segment-row'>
<div class='child-container'></div>
</div>
<div id='segment-column-template' class='segment segment-column'>
<div class='child-container'></div>
</div>
<div id='segment-triangle-template' class='segment segment-triangle'>
<div class='child-container'></div>
</div>
</section>
<section id="tutorial-1">
<div class="tutorial-text translation">tutorial-1</div>
<div class="level-container"></div>
</section>
<section id="tutorial-2">
<div class="tutorial-text translation">tutorial-2</div>
<div class="tutorial-wrapper">
<button class="help-action">
<img src="img/help.png" class="action-image">
</button>
<div class="level-container"></div>
</div>
</section>
<section id="tutorial-3">
<div class="tutorial-text translation">tutorial-3</div>
<div class="tutorial-wrapper">
<div id='tutorial-pointer'></div>
<div class="level-container"></div>
</div>
</section>
</article>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 494 KiB

File diff suppressed because one or more lines are too long

View File

@ -1 +1,42 @@
<!doctype html><html><head><link rel="icon" type="image/png" href="img/logo.png"><meta charset="utf-8"/><meta name="format-detection" content="telephone=no"><meta name="msapplication-tap-highlight" content="no"><meta name="viewport" content="user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1,width=device-width"><meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: cdvfile: * 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *; img-src 'self' * data: cdvfile: content:; script-src 'self' data: 'unsafe-eval'" ;><meta class="foundation-mq"><link rel="stylesheet" href="index.css"><title>WordRotator</title><script src="scripts/sql-wasm.js"></script><script src="scripts/localforage.js"></script></head><body class="default"><div id="toast-container"><div class="toast toast-template" style="opacity:0"><span class="message"></span></div></div><div id="site"><div class="loader overlay"><svg viewBox="0 0 32 32" width="32" height="32"><circle class="spinner" cx="16" cy="16" r="14" fill="none" style="stroke:#000"></circle></svg></div></div><script src="cordova.js"></script><script src="bundle.js"></script></body></html>
<!DOCTYPE html>
<html>
<head>
<link rel="icon" type="image/png" href="img/logo.png">
<meta charset="utf-8"/>
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<meta name="viewport"
content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
<meta http-equiv="Content-Security-Policy"
content="default-src 'self' data: gap: cdvfile: * 'unsafe-eval';
style-src 'self' 'unsafe-inline';
media-src *; img-src 'self' * data: cdvfile: content:;
script-src 'self' data: 'unsafe-eval'" ;>
<!--Element, mit dem Foundation die ViewQueries mitteilt-->
<meta class='foundation-mq'>
<link rel="stylesheet" type="text/css" href="index.css">
<title>WordRotator</title>
<script src="scripts/sql-wasm.js"></script>
<script src="scripts/localforage.js"></script>
</head>
<body class="theme-blue">
<div id="toast-container">
<div class='toast toast-template' style="opacity: 0">
<span class='message'></span>
</div>
</div>
<div id='site'>
<div class="loader overlay">
<svg viewBox="0 0 32 32" width="32" height="32">
<circle class="spinner" cx="16" cy="16" r="14" fill="none" style="stroke: black;"></circle>
</svg>
</div>
</div>
<!--<script src='https://vjs.zencdn.net/7.4.1/video.js'></script>-->
<script type="text/javascript" src="cordova.js"></script>
<script src="bundle.js"></script></body>
</html>

View File

@ -0,0 +1,95 @@
cordova.define("cordova-plugin-background-fetch.BackgroundFetch", function(require, exports, module) { /***
* Custom Cordova Background Fetch plugin.
* @author <chris@transistorsoft.com>
* iOS native-side is largely based upon http://www.mindsizzlers.com/2011/07/ios-background-location/
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
var exec = require("cordova/exec");
var EMPTY_FN = function() {}
var MODULE = "BackgroundFetch";
module.exports = {
STATUS_RESTRICTED: 0,
STATUS_DENIED: 1,
STATUS_AVAILABLE: 2,
FETCH_RESULT_NEW_DATA: 0,
FETCH_RESULT_NO_DATA: 1,
FETCH_RESULT_FAILED: 2,
NETWORK_TYPE_NONE: 0,
NETWORK_TYPE_ANY: 1,
NETWORK_TYPE_UNMETERED: 2,
NETWORK_TYPE_NOT_ROAMING: 3,
NETWORK_TYPE_CELLULAR: 4,
configure: function(callback, failure, config) {
if (typeof(callback) !== 'function') {
throw "BackgroundFetch configure error: You must provide a callback function as 1st argument";
}
config = config || {};
failure = failure || EMPTY_FN;
exec(callback, failure, MODULE, 'configure', [config]);
},
finish: function(taskId, success, failure) {
if (typeof(taskId) !== 'string') {
throw "BackgroundGeolocation.finish now requires a String taskId as first argument";
}
success = success || EMPTY_FN;
failure = failure || EMPTY_FN;
exec(success, failure, MODULE, 'finish',[taskId]);
},
start: function(success, failure) {
success = success || EMPTY_FN;
failure = failure || EMPTY_FN;
exec(success, failure, MODULE, 'start',[]);
},
stop: function(success, failure) {
success = success || EMPTY_FN;
failure = failure || EMPTY_FN;
exec(success, failure, MODULE, 'stop', []);
},
scheduleTask: function(config, success, failure) {
if (typeof(config) !== 'object') throw "[BackgroundFetch stopTask] ERROR: The 1st argument to scheduleTask is a config {}";
success = success || EMPTY_FN;
failure = failure || EMPTY_FN;
exec(success, failure, MODULE, 'scheduleTask', [config]);
},
stopTask: function(taskId, success, failure) {
if (typeof(taskId) !== 'string') throw "[BackgroundFetch stopTask] ERROR: The 1st argument must be a taskId:String";
success = success || EMPTY_FN;
failure = failure || EMPTY_FN;
exec(success, failure, MODULE, 'stop', [taskId]);
},
status: function(success, failure) {
success = success || EMPTY_FN;
failure = failure || EMPTY_FN;
exec(success, failure, MODULE, 'status',[]);
}
};
});

View File

@ -0,0 +1,117 @@
cordova.define("cordova-plugin-badge.Badge.Proxy", function(require, exports, module) { /*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apache License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. Please obtain a copy of the License at
* http://opensource.org/licenses/Apache-2.0/ and read it before using this
* file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
*/
// Instance of the Favico.js libary
exports.favico = new cordova.plugins.notification.badge.Favico({
animation: 'none'
});
// Holds the current badge number
var BADGE_KEY = 'cordova_badge_number';
// Holds the saved badge config
var CONFIG_KEY = 'APPBadgeConfigKey';
/**
* Clears the badge of the app icon.
*
* @param [ Function ] success Success callback
* @param [ Function ] error Error callback
*
* @return [ Void ]
*/
exports.clear = function (success, error) {
exports.set(success, error, [0]);
};
/**
* Gets the badge of the app icon.
*
* @param [ Function ] success Success callback
* @param [ Function ] error Error callback
*
* @return [ Void ]
*/
exports.get = function (success, error) {
var badge = localStorage[BADGE_KEY];
success(badge || 0);
};
/**
* Sets the badge of the app icon.
*
* @param [ Function ] success Success callback
* @param [ Function ] error Error callback
* @param [ Int ] badge The badge number
*
* @return [ Void ]
*/
exports.set = function (success, error, args) {
var badge = args[0];
exports.saveBadge(badge);
exports.favico.badge(badge);
success(badge);
};
/**
* Save the badge config.
*
* @param [ Function ] success Success callback
* @param [ Function ] error Error callback
* @param [ Int ] config The config map
*
* @return [ Void ]
*/
exports.save = function (success, error, args) {
var config = args[0] || null,
json = JSON.stringify(config);
localStorage[CONFIG_KEY] = json;
};
/**
* Load the badge config.
*
* @param [ Function ] success Success callback
* @param [ Function ] error Error callback
*
* @return [ Void ]
*/
exports.load = function (success, error) {
var json = localStorage[CONFIG_KEY],
config = JSON.parse(json || null);
success(config);
};
/**
* Persist the badge of the app icon so that `getBadge` is able to return the
* badge number back to the client.
*
* @param [ Int ] badge The badge number
*
* @return [ Void ]
*/
exports.saveBadge = function (badge) {
localStorage[BADGE_KEY] = badge;
};
cordova.commandProxy.add('Badge', exports);
});

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,281 @@
cordova.define("cordova-plugin-badge.Badge", function(require, exports, module) { /*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apache License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. Please obtain a copy of the License at
* http://opensource.org/licenses/Apache-2.0/ and read it before using this
* file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
*/
var exec = require('cordova/exec'),
channel = require('cordova/channel'),
ua = navigator.userAgent.toLowerCase(),
isIOS = ua.indexOf('ipad') > -1 || ua.indexOf('iphone') > -1,
isMac = ua.indexOf('macintosh') > -1,
isWin = window.Windows !== undefined,
isAndroid = !isWin && ua.indexOf('android') > -1,
isWinPC = isWin && Windows.System.Profile.AnalyticsInfo.versionInfo.deviceFamily.includes('Desktop'),
isDesktop = isMac || isWinPC;
// Default settings
exports._config = { indicator: 'badge', autoClear: false };
/**
* Clears the badge number.
*
* @param [ Function ] callback The callback function to be execute later.
* @param [ Function ] scope Optional scope for the callback function.
*
* @return [ Void ]
*/
exports.clear = function (callback, scope) {
this.exec('clear', null, callback, scope);
};
/**
* Sets the badge number.
*
* @param [ Int ] badge The new badge number.
* @param [ Function ] callback The callback function to be execute later.
* @param [ Function ] scope Optional scope for the callback function.
*
* @return [ Void ]
*/
exports.set = function (badge, callback, scope) {
var args = [parseInt(badge) || 0];
this.requestPermission(function (granted) {
if (granted) {
this.exec('set', args, callback, scope);
}
}, this);
};
/**
* Gets the badge of the app icon.
*
* @param [ Function ] callback The callback function to be execute later.
* @param [ Function ] scope Optional scope for the callback function.
*
* @return [ Void ]
*/
exports.get = function (callback, scope) {
this.exec('get', null, callback, scope);
};
/**
* Increases the badge number.
*
* @param [ Int ] count Number to add to the badge number.
* @param [ Function ] callback The callback function to be execute later.
* @param [ Function ] scope Optional scope for the callback function.
*
* @return [ Void ]
*/
exports.increase = function (count, callback, scope) {
this.get(function (badge) {
this.set(badge + (count || 1), callback, scope);
}, this);
};
/**
* Decreases the badge number.
*
* @param [ Int ] count Number to substract to the badge number.
* @param [ Function ] callback The callback function to be execute later.
* @param [ Function ] scope Optional scope for the callback function.
*
* @return [ Void ]
*/
exports.decrease = function (count, callback, scope) {
this.get(function (badge) {
this.set(Math.max(0, badge - (count || 1)), callback, scope);
}, this);
};
/**
* Check support to show badges.
*
* @param [ Function ] callback The callback function to be execute later.
* @param [ Function ] scope Optional scope for the callback function.
*
* @return [ Void ]
*/
exports.isSupported = function (callback, scope) {
if (isAndroid) {
this.exec('check', null, callback, scope);
} else {
this.createCallbackFn(callback, scope)(true);
}
};
/**
* Check permission to show badges.
*
* @param [ Function ] callback The callback function to be execute later.
* @param [ Function ] scope Optional scope for the callback function.
*
* @return [ Void ]
*/
exports.hasPermission = function (callback, scope) {
if (isIOS) {
this.exec('check', null, callback, scope);
} else {
this.createCallbackFn(callback, scope)(true);
}
};
/**
* Request permission to show badges.
*
* @param [ Function ] callback The callback function to be execute later.
* @param [ Function ] scope Optional scope for the callback function.
*
* @return [ Void ]
*/
exports.requestPermission = function (callback, scope) {
if (isIOS) {
this.exec('request', null, callback, scope);
} else {
this.createCallbackFn(callback, scope)(true);
}
};
/**
* Configures the plugin's platform options.
*
* @param [ Hash ] object Optional config settings.
*
* @return [ Hash ] The merged config settings.
*/
exports.configure = function (config) {
this.mergeConfig(config);
this.exec('save', this._config);
return this._config;
};
/**
* Merge the config values with the current ones.
*
* @param [ Hash ] object Optional config settings.
*
* @return [ Hash ] The merged config settings.
*/
exports.mergeConfig = function (config) {
return Object.assign(this._config, config);
};
/**
* Create callback, which will be executed within a specific scope.
*
* @param [ Function ] callback The callback function to be execute later.
* @param [ Function ] scope Optional scope for the callback function.
*
* @return [ Function ] The new callback function
*/
exports.createCallbackFn = function (callbackFn, scope) {
if (typeof callbackFn != 'function')
return;
return function () {
callbackFn.apply(scope || this, arguments);
};
};
/**
* Clear the badge if autoClear is on and the indicator type is badge.
*
* @return [ Void ]
*/
exports.clearIf = function () {
if (this._config.autoClear && this._config.indicator == 'badge') {
this.clear();
}
};
/**
* Execute the native counterpart.
*
* @param [ String ] action The name of the action to execute.
* @param [ Array ] args Array of arguments to pass with.
* @param [ Function ] callback The callback function to be execute later.
* @param [ Function ] scope Optional scope for the callback function.
*
* @return [ Void ]
*/
exports.exec = function (action, args, callback, scope) {
var fn = this.createCallbackFn(callback, scope),
params = [];
if (Array.isArray(args)) {
params = args;
} else if (args) {
params.push(args);
}
exec(fn, null, 'Badge', action, params);
};
// Clear badge on app start if autoClear is set to true
channel.onCordovaReady.subscribe(function () {
exports.exec('load', null, function (config) {
this.mergeConfig(config);
this.clearIf();
}, exports);
});
// Clear badge on app resume if autoClear is set to true
channel.onResume.subscribe(function () {
exports.clearIf();
});
// Clear badge on app resume if autoClear is set to true
channel.onActivated.subscribe(function () {
exports.clearIf();
});
if (isDesktop) {
// Clear badge on app resume if autoClear is set to true
document.addEventListener('visibilitychange', function () {
if (!document.hidden) { exports.clearIf(); }
}, false);
// Clear badge on app resume if autoClear is set to true
window.addEventListener('focus', function () {
exports.clearIf();
}, false);
}
// Polyfill for Object.assign
if (typeof Object.assign != 'function') {
Object.assign = function(target) {
'use strict';
if (target == null) {
throw new TypeError('Cannot convert undefined or null to object');
}
target = Object(target);
for (var index = 1; index < arguments.length; index++) {
var source = arguments[index];
if (source != null) {
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
}
return target;
};
}
});

View File

@ -0,0 +1,304 @@
cordova.define("cordova-plugin-calendar.Calendar", function(require, exports, module) { "use strict";
function Calendar() {
}
Calendar.prototype.getCreateCalendarOptions = function () {
return {
calendarName: null,
calendarColor: null // optional, the OS will choose one if left empty, example: pass "#FF0000" for red
};
};
Calendar.prototype.hasReadPermission = function (successCallback, errorCallback) {
cordova.exec(successCallback, errorCallback, "Calendar", "hasReadPermission", []);
};
Calendar.prototype.requestReadPermission = function (successCallback, errorCallback) {
cordova.exec(successCallback, errorCallback, "Calendar", "requestReadPermission", []);
};
Calendar.prototype.hasWritePermission = function (successCallback, errorCallback) {
cordova.exec(successCallback, errorCallback, "Calendar", "hasWritePermission", []);
};
Calendar.prototype.requestWritePermission = function (successCallback, errorCallback) {
cordova.exec(successCallback, errorCallback, "Calendar", "requestWritePermission", []);
};
Calendar.prototype.hasReadWritePermission = function (successCallback, errorCallback) {
cordova.exec(successCallback, errorCallback, "Calendar", "hasReadWritePermission", []);
};
Calendar.prototype.requestReadWritePermission = function (successCallback, errorCallback) {
cordova.exec(successCallback, errorCallback, "Calendar", "requestReadWritePermission", []);
};
Calendar.prototype.createCalendar = function (calendarNameOrOptionsObject, successCallback, errorCallback) {
var options;
if (typeof calendarNameOrOptionsObject == "string") {
options = {
"calendarName": calendarNameOrOptionsObject
};
} else {
options = calendarNameOrOptionsObject;
}
// merge passed options with defaults
var mergedOptions = Calendar.prototype.getCreateCalendarOptions();
for (var val in options) {
if (options.hasOwnProperty(val)) {
mergedOptions[val] = options[val];
}
}
cordova.exec(successCallback, errorCallback, "Calendar", "createCalendar", [mergedOptions]);
};
Calendar.prototype.deleteCalendar = function (calendarName, successCallback, errorCallback) {
cordova.exec(successCallback, errorCallback, "Calendar", "deleteCalendar", [{
"calendarName": calendarName
}]);
};
Calendar.prototype.openCalendar = function (date, successCallback, errorCallback) {
// default: today
if (!(date instanceof Date)) {
date = new Date();
}
cordova.exec(successCallback, errorCallback, "Calendar", "openCalendar", [{
"date": date.getTime()
}]);
};
Calendar.prototype.getCalendarOptions = function () {
return {
firstReminderMinutes: 60,
secondReminderMinutes: null,
recurrence: null, // options are: 'daily', 'weekly', 'monthly', 'yearly'
recurrenceInterval: 1, // only used when recurrence is set
recurrenceWeekstart: "MO",
recurrenceByDay: null,
recurrenceByMonthDay: null,
recurrenceEndDate: null,
recurrenceCount: null,
calendarName: null,
calendarId: null,
url: null
};
};
/**
* This method can be used if you want more control over the event details.
* Pass in an options object which you can easily override as follow:
* var options = window.plugins.calendar.getCalendarOptions();
* options.firstReminderMinutes = 150;
*/
Calendar.prototype.createEventWithOptions = function (title, location, notes, startDate, endDate, options, successCallback, errorCallback) {
if (!(startDate instanceof Date && endDate instanceof Date)) {
errorCallback("startDate and endDate must be JavaScript Date Objects");
return;
}
// merge passed options with defaults
var mergedOptions = Calendar.prototype.getCalendarOptions();
for (var val in options) {
if (options.hasOwnProperty(val)) {
mergedOptions[val] = options[val];
}
}
if (options.recurrenceEndDate != null) {
mergedOptions.recurrenceEndTime = options.recurrenceEndDate.getTime();
}
cordova.exec(successCallback, errorCallback, "Calendar", "createEventWithOptions", [{
"title": title,
"location": location,
"notes": notes,
"startTime": startDate instanceof Date ? startDate.getTime() : null,
"endTime": endDate instanceof Date ? endDate.getTime() : null,
"options": mergedOptions
}]);
};
/**
* @deprecated use createEventWithOptions instead
*/
Calendar.prototype.createEventInNamedCalendar = function (title, location, notes, startDate, endDate, calendarName, successCallback, errorCallback) {
Calendar.prototype.createEventWithOptions(title, location, notes, startDate, endDate, {calendarName:calendarName}, successCallback, errorCallback);
};
Calendar.prototype.createEvent = function (title, location, notes, startDate, endDate, successCallback, errorCallback) {
Calendar.prototype.createEventWithOptions(title, location, notes, startDate, endDate, {}, successCallback, errorCallback);
};
Calendar.prototype.createEventInteractively = function (title, location, notes, startDate, endDate, successCallback, errorCallback) {
Calendar.prototype.createEventInteractivelyWithOptions(title, location, notes, startDate, endDate, {}, successCallback, errorCallback);
};
Calendar.prototype.createEventInteractivelyWithOptions = function (title, location, notes, startDate, endDate, options, successCallback, errorCallback) {
// merge passed options with defaults
var mergedOptions = Calendar.prototype.getCalendarOptions();
for (var val in options) {
if (options.hasOwnProperty(val)) {
mergedOptions[val] = options[val];
}
}
if (options.recurrenceEndDate != null) {
mergedOptions.recurrenceEndTime = options.recurrenceEndDate.getTime();
}
cordova.exec(successCallback, errorCallback, "Calendar", "createEventInteractively", [{
"title": title,
"location": location,
"notes": notes,
"startTime": startDate instanceof Date ? startDate.getTime() : null,
"endTime": endDate instanceof Date ? endDate.getTime() : null,
"options": mergedOptions
}])
};
Calendar.prototype.findEventWithOptions = function (title, location, notes, startDate, endDate, options, successCallback, errorCallback) {
// merge passed options with defaults
var mergedOptions = Calendar.prototype.getCalendarOptions();
for (var val in options) {
if (options.hasOwnProperty(val)) {
mergedOptions[val] = options[val];
}
}
if (options.recurrenceEndDate != null) {
mergedOptions.recurrenceEndTime = options.recurrenceEndDate.getTime();
}
cordova.exec(successCallback, errorCallback, "Calendar", "findEventWithOptions", [{
"title": title,
"location": location,
"notes": notes,
"startTime": startDate instanceof Date ? startDate.getTime() : null,
"endTime": endDate instanceof Date ? endDate.getTime() : null,
"options": mergedOptions
}])
};
Calendar.prototype.findEvent = function (title, location, notes, startDate, endDate, successCallback, errorCallback) {
Calendar.prototype.findEventWithOptions(title, location, notes, startDate, endDate, {}, successCallback, errorCallback);
};
Calendar.prototype.findAllEventsInNamedCalendar = function (calendarName, successCallback, errorCallback) {
cordova.exec(successCallback, errorCallback, "Calendar", "findAllEventsInNamedCalendar", [{
"calendarName": calendarName
}]);
};
Calendar.prototype.deleteEvent = function (title, location, notes, startDate, endDate, successCallback, errorCallback) {
if (!(startDate instanceof Date && endDate instanceof Date)) {
errorCallback("startDate and endDate must be JavaScript Date Objects");
}
cordova.exec(successCallback, errorCallback, "Calendar", "deleteEvent", [{
"title": title,
"location": location,
"notes": notes,
"startTime": startDate instanceof Date ? startDate.getTime() : null,
"endTime": endDate instanceof Date ? endDate.getTime() : null
}])
};
Calendar.prototype.deleteEventFromNamedCalendar = function (title, location, notes, startDate, endDate, calendarName, successCallback, errorCallback) {
cordova.exec(successCallback, errorCallback, "Calendar", "deleteEventFromNamedCalendar", [{
"title": title,
"location": location,
"notes": notes,
"startTime": startDate instanceof Date ? startDate.getTime() : null,
"endTime": endDate instanceof Date ? endDate.getTime() : null,
"calendarName": calendarName
}])
};
Calendar.prototype.deleteEventById = function (id, fromDate, successCallback, errorCallback) {
cordova.exec(successCallback, errorCallback, "Calendar", "deleteEventById", [{
"id": id,
"fromTime": fromDate instanceof Date ? fromDate.getTime() : null
}]);
};
Calendar.prototype.modifyEventWithOptions = function (title, location, notes, startDate, endDate, newTitle, newLocation, newNotes, newStartDate, newEndDate, options, newOptions, successCallback, errorCallback) {
if (!(newStartDate instanceof Date && newEndDate instanceof Date)) {
errorCallback("newStartDate and newEndDate must be JavaScript Date Objects");
return;
}
// merge passed options with defaults
var mergedOptions = Calendar.prototype.getCalendarOptions();
for (var val in options) {
if (options.hasOwnProperty(val)) {
mergedOptions[val] = options[val];
}
}
if (options.recurrenceEndDate != null) {
mergedOptions.recurrenceEndTime = options.recurrenceEndDate.getTime();
}
// and also merge passed newOptions with defaults
var newMergedOptions = Calendar.prototype.getCalendarOptions();
for (var val2 in newOptions) {
if (newOptions.hasOwnProperty(val2)) {
newMergedOptions[val2] = newOptions[val2];
}
}
if (newOptions.recurrenceEndDate != null) {
newMergedOptions.recurrenceEndTime = newOptions.recurrenceEndDate.getTime();
}
cordova.exec(successCallback, errorCallback, "Calendar", "modifyEventWithOptions", [{
"title": title,
"location": location,
"notes": notes,
"startTime": startDate instanceof Date ? startDate.getTime() : null,
"endTime": endDate instanceof Date ? endDate.getTime() : null,
"newTitle": newTitle,
"newLocation": newLocation,
"newNotes": newNotes,
"newStartTime": newStartDate instanceof Date ? newStartDate.getTime() : null,
"newEndTime": newEndDate instanceof Date ? newEndDate.getTime() : null,
"options": mergedOptions,
"newOptions": newMergedOptions
}])
};
Calendar.prototype.modifyEvent = function (title, location, notes, startDate, endDate, newTitle, newLocation, newNotes, newStartDate, newEndDate, successCallback, errorCallback) {
Calendar.prototype.modifyEventWithOptions(title, location, notes, startDate, endDate, newTitle, newLocation, newNotes, newStartDate, newEndDate, {}, successCallback, errorCallback);
};
Calendar.prototype.modifyEventInNamedCalendar = function (title, location, notes, startDate, endDate, newTitle, newLocation, newNotes, newStartDate, newEndDate, calendarName, successCallback, errorCallback) {
var options = Calendar.prototype.getCalendarOptions();
options.calendarName = calendarName;
Calendar.prototype.modifyEventWithOptions(title, location, notes, startDate, endDate, newTitle, newLocation, newNotes, newStartDate, newEndDate, options, successCallback, errorCallback);
};
Calendar.prototype.listEventsInRange = function (startDate, endDate, successCallback, errorCallback) {
cordova.exec(successCallback, errorCallback, "Calendar", "listEventsInRange", [{
"startTime": startDate instanceof Date ? startDate.getTime() : null,
"endTime": endDate instanceof Date ? endDate.getTime() : null
}])
};
Calendar.prototype.listCalendars = function (successCallback, errorCallback) {
cordova.exec(successCallback, errorCallback, "Calendar", "listCalendars", []);
};
Calendar.prototype.parseEventDate = function (dateStr) {
// Handle yyyyMMddTHHmmssZ iCalendar UTC format
var icalRegExp = /\b(\d{4})(\d{2})(\d{2}T\d{2})(\d{2})(\d{2}Z)\b/;
if (icalRegExp.test(dateStr))
return new Date(String(dateStr).replace(icalRegExp, '$1-$2-$3:$4:$5'));
var spl;
// Handle yyyy-MM-dd HH:mm:ss format returned by AbstractCalendarAccessor.java L66 and Calendar.m L378, and yyyyMMddTHHmmss iCalendar local format, and similar
return (spl = /^\s*(\d{4})\D?(\d{2})\D?(\d{2})\D?(\d{2})\D?(\d{2})\D?(\d{2})\s*$/.exec(dateStr))
&& new Date(spl[1], spl[2] - 1, spl[3], spl[4], spl[5], spl[6])
|| new Date(dateStr);
};
Calendar.install = function () {
if (!window.plugins) {
window.plugins = {};
}
window.plugins.calendar = new Calendar();
return window.plugins.calendar;
};
cordova.addConstructor(Calendar.install);
});

View File

@ -0,0 +1,416 @@
cordova.define("cordova-plugin-local-notification.LocalNotification.Core", function(require, exports, module) { /*
* Apache 2.0 License
*
* Copyright (c) Sebastian Katzer 2017
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apache License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. Please obtain a copy of the License at
* http://opensource.org/licenses/Apache-2.0/ and read it before using this
* file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
*/
var exec = require('cordova/exec');
/**
* Check permission to show notifications.
*
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*
* @return [ Void ]
*/
exports.hasPermission = function (callback, scope) {
var fn = this.createCallbackFn(callback, scope);
exec(fn, null, 'LocalNotification', 'check', []);
};
/**
* Request permission to show notifications.
*
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*
* @return [ Void ]
*/
exports.requestPermission = function (callback, scope) {
var fn = this.createCallbackFn(callback, scope);
exec(fn, null, 'LocalNotification', 'request', []);
};
/**
* Schedule notifications.
*
* @param [ Array ] notifications The notifications to schedule.
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
* @param [ Object ] args Optional flags how to schedule.
*
* @return [ Void ]
*/
exports.schedule = function (msgs, callback, scope, args) {
var fn = function (granted) {
var toasts = this.toArray(msgs);
if (!granted && callback) {
callback.call(scope || this, false);
return;
}
for (var i = 0, len = toasts.length; i < len; i++) {
var toast = toasts[i];
this.mergeWithDefaults(toast);
this.convertProperties(toast);
}
this.exec('schedule', toasts, callback, scope);
};
if (args && args.skipPermission) {
fn.call(this, true);
} else {
this.requestPermission(fn, this);
}
};
/**
* Schedule notifications.
*
* @param [ Array ] notifications The notifications to schedule.
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
* @param [ Object ] args Optional flags how to schedule.
*
* @return [ Void ]
*/
exports.update = function (msgs, callback, scope, args) {
var fn = function(granted) {
var toasts = this.toArray(msgs);
if (!granted && callback) {
callback.call(scope || this, false);
return;
}
for (var i = 0, len = toasts.length; i < len; i++) {
this.convertProperties(toasts[i]);
}
this.exec('update', toasts, callback, scope);
};
if (args && args.skipPermission) {
fn.call(this, true);
} else {
this.requestPermission(fn, this);
}
};
/**
* Clear the specified notifications by id.
*
* @param [ Array<Int> ] ids The IDs of the notifications.
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*
* @return [ Void ]
*/
exports.clear = function (ids, callback, scope) {
ids = this.toArray(ids);
ids = this.convertIds(ids);
this.exec('clear', ids, callback, scope);
};
/**
* Clear all triggered notifications.
*
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*
* @return [ Void ]
*/
exports.clearAll = function (callback, scope) {
this.exec('clearAll', null, callback, scope);
};
/**
* Clear the specified notifications by id.
*
* @param [ Array<Int> ] ids The IDs of the notifications.
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*
* @return [ Void ]
*/
exports.cancel = function (ids, callback, scope) {
ids = this.toArray(ids);
ids = this.convertIds(ids);
this.exec('cancel', ids, callback, scope);
};
/**
* Cancel all scheduled notifications.
*
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*
* @return [ Void ]
*/
exports.cancelAll = function (callback, scope) {
this.exec('cancelAll', null, callback, scope);
};
/**
* Check if a notification is present.
*
* @param [ Int ] id The ID of the notification.
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*
* @return [ Void ]
*/
exports.isPresent = function (id, callback, scope) {
var fn = this.createCallbackFn(callback, scope);
this.getType(id, function (type) {
fn(type != 'unknown');
});
};
/**
* Check if a notification has a given type.
*
* @param [ Int ] id The ID of the notification.
* @param [ String ] type The type of the notification.
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*
* @return [ Void ]
*/
exports.hasType = function (id, type, callback, scope) {
var fn = this.createCallbackFn(callback, scope);
this.getType(id, function (type2) {
fn(type == type2);
});
};
/**
* Get the type (triggered, scheduled) for the notification.
*
* @param [ Int ] id The ID of the notification.
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*
* @return [ Void ]
*/
exports.getType = function (id, callback, scope) {
this.exec('type', id, callback, scope);
};
/**
* List of all notification ids.
*
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*
* @return [ Void ]
*/
exports.getIds = function (callback, scope) {
this.exec('ids', null, callback, scope);
};
/**
* List of all scheduled notification IDs.
*
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*
* @return [ Void ]
*/
exports.getScheduledIds = function (callback, scope) {
this.exec('scheduledIds', null, callback, scope);
};
/**
* List of all triggered notification IDs.
*
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*
* @return [ Void ]
*/
exports.getTriggeredIds = function (callback, scope) {
this.exec('triggeredIds', null, callback, scope);
};
/**
* List of local notifications specified by id.
* If called without IDs, all notification will be returned.
*
* @param [ Array<Int> ] ids The IDs of the notifications.
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*
* @return [ Void ]
*/
exports.get = function () {
var args = Array.apply(null, arguments);
if (typeof args[0] == 'function') {
args.unshift([]);
}
var ids = args[0],
callback = args[1],
scope = args[2];
if (!Array.isArray(ids)) {
this.exec('notification', Number(ids), callback, scope);
return;
}
ids = this.convertIds(ids);
this.exec('notifications', ids, callback, scope);
};
/**
* List for all notifications.
*
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*
* @return [ Void ]
*/
exports.getAll = function (callback, scope) {
this.exec('notifications', null, callback, scope);
};
/**
* List of all scheduled notifications.
*
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*/
exports.getScheduled = function (callback, scope) {
this.exec('scheduledNotifications', null, callback, scope);
};
/**
* List of all triggered notifications.
*
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*/
exports.getTriggered = function (callback, scope) {
this.exec('triggeredNotifications', null, callback, scope);
};
/**
* Register an group of actions by id.
*
* @param [ String ] id The Id of the group.
* @param [ Array] actions The action config settings.
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*
* @return [ Void ]
*/
exports.addActionGroup = function (id, actions, callback, scope) {
var config = { actionGroupId: id, actions: actions };
this.exec('actions', config, callback, scope);
};
/**
* The (platform specific) default settings.
*
* @return [ Object ]
*/
exports.getDefaults = function () {
var map = Object.assign({}, this._defaults);
for (var key in map) {
if (Array.isArray(map[key])) {
map[key] = Array.from(map[key]);
} else
if (Object.prototype.isPrototypeOf(map[key])) {
map[key] = Object.assign({}, map[key]);
}
}
return map;
};
/**
* Overwrite default settings.
*
* @param [ Object ] newDefaults New default values.
*
* @return [ Void ]
*/
exports.setDefaults = function (newDefaults) {
Object.assign(this._defaults, newDefaults);
};
/**
* Register callback for given event.
*
* @param [ String ] event The name of the event.
* @param [ Function ] callback The function to be exec as callback.
* @param [ Object ] scope The callback function's scope.
*
* @return [ Void ]
*/
exports.on = function (event, callback, scope) {
if (typeof callback !== "function")
return;
if (!this._listener[event]) {
this._listener[event] = [];
}
var item = [callback, scope || window];
this._listener[event].push(item);
};
/**
* Unregister callback for given event.
*
* @param [ String ] event The name of the event.
* @param [ Function ] callback The function to be exec as callback.
*
* @return [ Void ]
*/
exports.un = function (event, callback) {
var listener = this._listener[event];
if (!listener)
return;
for (var i = 0; i < listener.length; i++) {
var fn = listener[i][0];
if (fn == callback) {
listener.splice(i, 1);
break;
}
}
};
});

View File

@ -0,0 +1,553 @@
cordova.define("cordova-plugin-local-notification.LocalNotification.Util", function(require, exports, module) { /*
* Apache 2.0 License
*
* Copyright (c) Sebastian Katzer 2017
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apache License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. Please obtain a copy of the License at
* http://opensource.org/licenses/Apache-2.0/ and read it before using this
* file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
*/
var exec = require('cordova/exec'),
channel = require('cordova/channel');
// Default values
exports._defaults = {
actionGroupId : null,
actions : [],
attachments : [],
autoClear : true,
badge : null,
channel : null,
color : null,
data : null,
defaults : 0,
foreground : false,
group : null,
groupSummary : false,
icon : null,
id : 0,
launch : true,
led : true,
lockscreen : true,
mediaSession : null,
number : 0,
priority : 0,
progressBar : false,
showWhen : true,
silent : false,
smallIcon : 'res://icon',
sound : true,
sticky : false,
summary : null,
text : '',
title : '',
trigger : { type : 'calendar' },
vibrate : false,
wakeup : true
};
// Listener
exports._listener = {};
/**
* Merge custom properties with the default values.
*
* @param [ Object ] options Set of custom values.
*
* @retrun [ Object ]
*/
exports.mergeWithDefaults = function (options) {
var values = this.getDefaults();
if (values.hasOwnProperty('sticky')) {
options.sticky = this.getValueFor(options, 'sticky', 'ongoing');
}
if (options.sticky && options.autoClear !== true) {
options.autoClear = false;
}
Object.assign(values, options);
for (var key in values) {
if (values[key] !== null) {
options[key] = values[key];
} else {
delete options[key];
}
if (!this._defaults.hasOwnProperty(key)) {
console.warn('Unknown property: ' + key);
}
}
options.meta = {
plugin: 'cordova-plugin-local-notification',
version: '0.9-beta.2'
};
return options;
};
/**
* Convert the passed values to their required type.
*
* @param [ Object ] options Properties to convert for.
*
* @return [ Object ] The converted property list
*/
exports.convertProperties = function (options) {
var parseToInt = function (prop, options) {
if (isNaN(options[prop])) {
console.warn(prop + ' is not a number: ' + options[prop]);
return this._defaults[prop];
} else {
return Number(options[prop]);
}
};
if (options.id) {
options.id = parseToInt('id', options);
}
if (options.title) {
options.title = options.title.toString();
}
if (options.badge) {
options.badge = parseToInt('badge', options);
}
if (options.priority) {
options.priority = parseToInt('priority', options);
}
if (options.foreground === true) {
options.priority = Math.max(options.priority, 1);
}
if (options.foreground === false) {
options.priority = Math.min(options.priority, 0);
}
if (options.defaults) {
options.defaults = parseToInt('defaults', options);
}
if (options.smallIcon && !options.smallIcon.match(/^res:/)) {
console.warn('Property "smallIcon" must be of kind res://...');
}
options.data = JSON.stringify(options.data);
this.convertTrigger(options);
this.convertActions(options);
this.convertProgressBar(options);
return options;
};
/**
* Convert the passed values to their required type, modifying them
* directly for Android and passing the converted list back for iOS.
*
* @param [ Map ] options Set of custom values.
*
* @return [ Map ] Interaction object with category & actions.
*/
exports.convertActions = function (options) {
var actions = [];
if (!options.actions)
return null;
for (var i = 0, len = options.actions.length; i < len; i++) {
var action = options.actions[i];
if (!action.id) {
console.warn('Action with title ' + action.title + ' ' +
'has no id and will not be added.');
continue;
}
action.id = action.id.toString();
actions.push(action);
}
options.actions = actions;
return options;
};
/**
* Convert the passed values for the trigger to their required type.
*
* @param [ Map ] options Set of custom values.
*
* @return [ Map ] Interaction object with trigger spec.
*/
exports.convertTrigger = function (options) {
var trigger = options.trigger || {},
date = this.getValueFor(trigger, 'at', 'firstAt', 'date');
var dateToNum = function (date) {
var num = typeof date == 'object' ? date.getTime() : date;
return Math.round(num);
};
if (!options.trigger)
return;
if (!trigger.type) {
trigger.type = trigger.center ? 'location' : 'calendar';
}
var isCal = trigger.type == 'calendar';
if (isCal && !date) {
date = this.getValueFor(options, 'at', 'firstAt', 'date');
}
if (isCal && !trigger.every && options.every) {
trigger.every = options.every;
}
if (isCal && (trigger.in || trigger.every)) {
date = null;
}
if (isCal && date) {
trigger.at = dateToNum(date);
}
if (isCal && trigger.firstAt) {
trigger.firstAt = dateToNum(trigger.firstAt);
}
if (isCal && trigger.before) {
trigger.before = dateToNum(trigger.before);
}
if (isCal && trigger.after) {
trigger.after = dateToNum(trigger.after);
}
if (!trigger.count && device.platform == 'windows') {
trigger.count = trigger.every ? 5 : 1;
}
if (trigger.count && device.platform == 'iOS') {
console.warn('trigger: { count: } is not supported on iOS.');
}
if (!isCal) {
trigger.notifyOnEntry = !!trigger.notifyOnEntry;
trigger.notifyOnExit = trigger.notifyOnExit === true;
trigger.radius = trigger.radius || 5;
trigger.single = !!trigger.single;
}
if (!isCal || trigger.at) {
delete trigger.every;
}
delete options.every;
delete options.at;
delete options.firstAt;
delete options.date;
options.trigger = trigger;
return options;
};
/**
* Convert the passed values for the progressBar to their required type.
*
* @param [ Map ] options Set of custom values.
*
* @return [ Map ] Interaction object with trigger spec.
*/
exports.convertProgressBar = function (options) {
var isAndroid = device.platform == 'Android',
cfg = options.progressBar;
if (cfg === undefined)
return;
if (typeof cfg === 'boolean') {
cfg = options.progressBar = { enabled: cfg };
}
if (typeof cfg.enabled !== 'boolean') {
cfg.enabled = !!(cfg.value || cfg.maxValue || cfg.indeterminate !== null);
}
cfg.value = cfg.value || 0;
if (isAndroid) {
cfg.maxValue = cfg.maxValue || 100;
cfg.indeterminate = !!cfg.indeterminate;
}
cfg.enabled = !!cfg.enabled;
return options;
};
/**
* Create a callback function to get executed within a specific scope.
*
* @param [ Function ] fn The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*
* @return [ Function ]
*/
exports.createCallbackFn = function (fn, scope) {
if (typeof fn != 'function')
return;
return function () {
fn.apply(scope || this, arguments);
};
};
/**
* Convert the IDs to numbers.
*
* @param [ Array ] ids
*
* @return [ Array<Number> ]
*/
exports.convertIds = function (ids) {
var convertedIds = [];
for (var i = 0, len = ids.length; i < len; i++) {
convertedIds.push(Number(ids[i]));
}
return convertedIds;
};
/**
* First found value for the given keys.
*
* @param [ Object ] options Object with key-value properties.
* @param [ *Array<String> ] keys List of keys.
*
* @return [ Object ]
*/
exports.getValueFor = function (options) {
var keys = Array.apply(null, arguments).slice(1);
for (var i = 0, key = keys[i], len = keys.length; i < len; key = keys[++i]) {
if (options.hasOwnProperty(key)) {
return options[key];
}
}
return null;
};
/**
* Convert a value to an array.
*
* @param [ Object ] obj Any kind of object.
*
* @return [ Array ] An array with the object as first item.
*/
exports.toArray = function (obj) {
return Array.isArray(obj) ? Array.from(obj) : [obj];
};
/**
* Fire the event with given arguments.
*
* @param [ String ] event The event's name.
* @param [ *Array] args The callback's arguments.
*
* @return [ Void]
*/
exports.fireEvent = function (event) {
var args = Array.apply(null, arguments).slice(1),
listener = this._listener[event];
if (!listener)
return;
if (args[0] && typeof args[0].data === 'string') {
args[0].data = JSON.parse(args[0].data);
}
for (var i = 0; i < listener.length; i++) {
var fn = listener[i][0],
scope = listener[i][1];
fn.apply(scope, args);
}
};
/**
* Execute the native counterpart.
*
* @param [ String ] action The name of the action.
* @param [ Array ] args Array of arguments.
* @param [ Function] callback The callback function.
* @param [ Object ] scope The scope for the function.
*
* @return [ Void ]
*/
exports.exec = function (action, args, callback, scope) {
var fn = this.createCallbackFn(callback, scope),
params = [];
if (Array.isArray(args)) {
params = args;
} else if (args) {
params.push(args);
}
exec(fn, null, 'LocalNotification', action, params);
};
exports.setLaunchDetails = function () {
exports.exec('launch', null, function (details) {
if (details) {
cordova.plugins.notification.local.launchDetails = details;
}
});
};
// Called after 'deviceready' event
channel.deviceready.subscribe(function () {
if (['Android', 'windows', 'iOS'].indexOf(device.platform) > -1) {
exports.exec('ready');
}
});
// Called before 'deviceready' event
channel.onCordovaReady.subscribe(function () {
channel.onCordovaInfoReady.subscribe(function () {
if (['Android', 'windows', 'iOS'].indexOf(device.platform) > -1) {
exports.setLaunchDetails();
}
});
});
// Polyfill for Object.assign
if (typeof Object.assign != 'function') {
Object.assign = function(target) {
'use strict';
if (target == null) {
throw new TypeError('Cannot convert undefined or null to object');
}
target = Object(target);
for (var index = 1; index < arguments.length; index++) {
var source = arguments[index];
if (source != null) {
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
}
return target;
};
}
// Production steps of ECMA-262, Edition 6, 22.1.2.1
// Reference: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.from
if (!Array.from) {
Array.from = (function () {
var toStr = Object.prototype.toString;
var isCallable = function (fn) {
return typeof fn === 'function' || toStr.call(fn) === '[object Function]';
};
var toInteger = function (value) {
var number = Number(value);
if (isNaN(number)) { return 0; }
if (number === 0 || !isFinite(number)) { return number; }
return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number));
};
var maxSafeInteger = Math.pow(2, 53) - 1;
var toLength = function (value) {
var len = toInteger(value);
return Math.min(Math.max(len, 0), maxSafeInteger);
};
// The length property of the from method is 1.
return function from(arrayLike/*, mapFn, thisArg */) {
// 1. Let C be the this value.
var C = this;
// 2. Let items be ToObject(arrayLike).
var items = Object(arrayLike);
// 3. ReturnIfAbrupt(items).
if (arrayLike == null) {
throw new TypeError("Array.from requires an array-like object - not null or undefined");
}
// 4. If mapfn is undefined, then let mapping be false.
var mapFn = arguments.length > 1 ? arguments[1] : void undefined;
var T;
if (typeof mapFn !== 'undefined') {
// 5. else
// 5. a If IsCallable(mapfn) is false, throw a TypeError exception.
if (!isCallable(mapFn)) {
throw new TypeError('Array.from: when provided, the second argument must be a function');
}
// 5. b. If thisArg was supplied, let T be thisArg; else let T be undefined.
if (arguments.length > 2) {
T = arguments[2];
}
}
// 10. Let lenValue be Get(items, "length").
// 11. Let len be ToLength(lenValue).
var len = toLength(items.length);
// 13. If IsConstructor(C) is true, then
// 13. a. Let A be the result of calling the [[Construct]] internal method of C with an argument list containing the single item len.
// 14. a. Else, Let A be ArrayCreate(len).
var A = isCallable(C) ? Object(new C(len)) : new Array(len);
// 16. Let k be 0.
var k = 0;
// 17. Repeat, while k < len… (also steps a - h)
var kValue;
while (k < len) {
kValue = items[k];
if (mapFn) {
A[k] = typeof T === 'undefined' ? mapFn(kValue, k) : mapFn.call(T, kValue, k);
} else {
A[k] = kValue;
}
k += 1;
}
// 18. Let putStatus be Put(A, "length", len, true).
A.length = len;
// 20. Return A.
return A;
};
}());
}
});

View File

@ -0,0 +1,317 @@
cordova.define("cordova-plugin-local-notification.LocalNotification", function(require, exports, module) { /*
* Apache 2.0 License
*
* Copyright (c) Sebastian Katzer 2017
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apache License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. Please obtain a copy of the License at
* http://opensource.org/licenses/Apache-2.0/ and read it before using this
* file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
*/
/**
* Request permission to show notifications.
*
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*
* @return [ Void ]
*/
exports.hasPermission = function (callback, scope) {
this.core.hasPermission(callback, scope);
};
/**
* Request permission to show notifications.
*
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*
* @return [ Void ]
*/
exports.requestPermission = function (callback, scope) {
this.core.requestPermission(callback, scope);
};
/**
* Schedule notifications.
*
* @param [ Array ] notifications The notifications to schedule.
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
* @param [ Object ] args Optional flags how to schedule.
*
* @return [ Void ]
*/
exports.schedule = function (notifications, callback, scope, args) {
this.core.schedule(notifications, callback, scope, args);
};
/**
* Update notifications.
*
* @param [ Array ] notifications The notifications to schedule.
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
* @param [ Object ] args Optional flags how to schedule.
*
* @return [ Void ]
*/
exports.update = function (notifications, callback, scope, args) {
this.core.update(notifications, callback, scope, args);
};
/**
* Clear the specified notifications by id.
*
* @param [ Array<Int> ] ids The IDs of the notifications.
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*
* @return [ Void ]
*/
exports.clear = function (ids, callback, scope) {
this.core.clear(ids, callback, scope);
};
/**
* Clear all triggered notifications.
*
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*
* @return [ Void ]
*/
exports.clearAll = function (callback, scope) {
this.core.clearAll(callback, scope);
};
/**
* Cancel the specified notifications by id.
*
* @param [ Array<Int> ] ids The IDs of the notifications.
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*
* @return [ Void ]
*/
exports.cancel = function (ids, callback, scope) {
this.core.cancel(ids, callback, scope);
};
/**
* Cancel all scheduled notifications.
*
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*
* @return [ Void ]
*/
exports.cancelAll = function (callback, scope) {
this.core.cancelAll(callback, scope);
};
/**
* Check if a notification is present.
*
* @param [ Int ] id The ID of the notification.
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*
* @return [ Void ]
*/
exports.isPresent = function (id, callback, scope) {
this.core.isPresent(id, callback, scope);
};
/**
* Check if a notification is scheduled.
*
* @param [ Int ] id The ID of the notification.
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*
* @return [ Void ]
*/
exports.isScheduled = function (id, callback, scope) {
this.core.hasType(id, 'scheduled', callback, scope);
};
/**
* Check if a notification was triggered.
*
* @param [ Int ] id The ID of the notification.
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*
* @return [ Void ]
*/
exports.isTriggered = function (id, callback, scope) {
this.core.hasType(id, 'triggered', callback, scope);
};
/**
* Get the type (triggered, scheduled) for the notification.
*
* @param [ Int ] id The ID of the notification.
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*
* @return [ Void ]
*/
exports.getType = function (id, callback, scope) {
this.core.getType(id, callback, scope);
};
/**
* List of all notification ids.
*
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*
* @return [ Void ]
*/
exports.getIds = function (callback, scope) {
this.core.getIds(callback, scope);
};
/**
* List of all scheduled notification IDs.
*
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*
* @return [ Void ]
*/
exports.getScheduledIds = function (callback, scope) {
this.core.getScheduledIds(callback, scope);
};
/**
* List of all triggered notification IDs.
*
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*
* @return [ Void ]
*/
exports.getTriggeredIds = function (callback, scope) {
this.core.getTriggeredIds(callback, scope);
};
/**
* List of local notifications specified by id.
* If called without IDs, all notification will be returned.
*
* @param [ Array<Int> ] ids The IDs of the notifications.
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*
* @return [ Void ]
*/
exports.get = function (ids, callback, scope) {
this.core.get(ids, callback, scope);
};
/**
* List for all notifications.
*
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*
* @return [ Void ]
*/
exports.getAll = function (callback, scope) {
this.core.getAll(callback, scope);
};
/**
* List of all scheduled notifications.
*
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*/
exports.getScheduled = function (callback, scope) {
this.core.getScheduled(callback, scope);
};
/**
* List of all triggered notifications.
*
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*/
exports.getTriggered = function (callback, scope) {
this.core.getTriggered(callback, scope);
};
/**
* Register an group of actions by id.
*
* @param [ String ] id The Id of the group.
* @param [ Array] actions The action config settings.
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*
* @return [ Void ]
*/
exports.addActionGroup = function (id, actions, callback, scope) {
this.core.addActionGroup(id, actions, callback, scope);
};
/**
* The (platform specific) default settings.
*
* @return [ Object ]
*/
exports.getDefaults = function () {
return this.core.getDefaults();
};
/**
* Overwrite default settings.
*
* @param [ Object ] newDefaults New default values.
*
* @return [ Void ]
*/
exports.setDefaults = function (defaults) {
this.core.setDefaults(defaults);
};
/**
* Register callback for given event.
*
* @param [ String ] event The name of the event.
* @param [ Function ] callback The function to be exec as callback.
* @param [ Object ] scope The callback function's scope.
*
* @return [ Void ]
*/
exports.on = function (event, callback, scope) {
this.core.on(event, callback, scope);
};
/**
* Unregister callback for given event.
*
* @param [ String ] event The name of the event.
* @param [ Function ] callback The function to be exec as callback.
*
* @return [ Void ]
*/
exports.un = function (event, callback) {
this.core.un(event, callback);
};
});

View File

@ -0,0 +1,52 @@
cordova.define("cordova-plugin-statusbar.StatusBarProxy", function(require, exports, module) { /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
function notSupported(win,fail) {
//
console.log('StatusBar is not supported');
setTimeout(function(){
if (win) {
win();
}
// note that while it is not explicitly supported, it does not fail
// this is really just here to allow developers to test their code in the browser
// and if we fail, then their app might as well. -jm
},0);
}
module.exports = {
isVisible: false,
styleBlackTranslucent:notSupported,
styleDefault:notSupported,
styleLightContent:notSupported,
styleBlackOpaque:notSupported,
overlaysWebView:notSupported,
styleLightContect: notSupported,
backgroundColorByName: notSupported,
backgroundColorByHexString: notSupported,
hide: notSupported,
show: notSupported,
_ready:notSupported
};
require("cordova/exec/proxy").add("StatusBar", module.exports);
});

View File

@ -0,0 +1,115 @@
cordova.define("cordova-plugin-statusbar.statusbar", function(require, exports, module) { /*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
/* global cordova */
var exec = require('cordova/exec');
var namedColors = {
"black": "#000000",
"darkGray": "#A9A9A9",
"lightGray": "#D3D3D3",
"white": "#FFFFFF",
"gray": "#808080",
"red": "#FF0000",
"green": "#00FF00",
"blue": "#0000FF",
"cyan": "#00FFFF",
"yellow": "#FFFF00",
"magenta": "#FF00FF",
"orange": "#FFA500",
"purple": "#800080",
"brown": "#A52A2A"
};
var StatusBar = {
isVisible: true,
overlaysWebView: function (doOverlay) {
exec(null, null, "StatusBar", "overlaysWebView", [doOverlay]);
},
styleDefault: function () {
// dark text ( to be used on a light background )
exec(null, null, "StatusBar", "styleDefault", []);
},
styleLightContent: function () {
// light text ( to be used on a dark background )
exec(null, null, "StatusBar", "styleLightContent", []);
},
styleBlackTranslucent: function () {
// #88000000 ? Apple says to use lightContent instead
exec(null, null, "StatusBar", "styleBlackTranslucent", []);
},
styleBlackOpaque: function () {
// #FF000000 ? Apple says to use lightContent instead
exec(null, null, "StatusBar", "styleBlackOpaque", []);
},
backgroundColorByName: function (colorname) {
return StatusBar.backgroundColorByHexString(namedColors[colorname]);
},
backgroundColorByHexString: function (hexString) {
if (hexString.charAt(0) !== "#") {
hexString = "#" + hexString;
}
if (hexString.length === 4) {
var split = hexString.split("");
hexString = "#" + split[1] + split[1] + split[2] + split[2] + split[3] + split[3];
}
exec(null, null, "StatusBar", "backgroundColorByHexString", [hexString]);
},
hide: function () {
exec(null, null, "StatusBar", "hide", []);
StatusBar.isVisible = false;
},
show: function () {
exec(null, null, "StatusBar", "show", []);
StatusBar.isVisible = true;
}
};
// prime it. setTimeout so that proxy gets time to init
window.setTimeout(function () {
exec(function (res) {
if (typeof res == 'object') {
if (res.type == 'tap') {
cordova.fireWindowEvent('statusTap');
}
} else {
StatusBar.isVisible = res;
}
}, null, "StatusBar", "_ready", []);
}, 0);
module.exports = StatusBar;
});

File diff suppressed because one or more lines are too long

View File

@ -1,6 +0,0 @@
/*!
localForage -- Offline Storage, Improved
Version 1.9.0
https://localforage.github.io/localForage
(c) 2013-2017 Mozilla, Apache License 2.0
*/

View File

@ -1 +0,0 @@
{"version":3,"sources":[],"names":[],"mappings":"","file":"scripts/localforage.js","sourceRoot":""}

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,247 @@
if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let a=Promise.resolve();return i[e]||(a=new Promise(async a=>{if("document"in self){const i=document.createElement("script");i.src=e,document.head.appendChild(i),i.onload=a}else importScripts(e),a()})),a.then(()=>{if(!i[e])throw new Error(`Module ${e} didnt register its module`);return i[e]})},a=(a,i)=>{Promise.all(a.map(e)).then(e=>i(1===e.length?e[0]:e))},i={require:Promise.resolve(a)};self.define=(a,t,r)=>{i[a]||(i[a]=Promise.resolve().then(()=>{let i={};const c={uri:location.origin+a.slice(1)};return Promise.all(t.map(a=>{switch(a){case"exports":return i;case"module":return c;default:return e(a)}})).then(e=>{const a=r(...e);return i.default||(i.default=a),i})}))}}define("./service-worker.js",["./workbox-69b5a3b7"],(function(e){"use strict";self.addEventListener("message",e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()}),e.precacheAndRoute([{url:"autobundle.js",revision:"13c52d778d9424443ebc2f01ea905320"},{url:"autohtml/abstractWindowTemplate.html",revision:"6c3ea1af1622920ddbc5bf4b548792f1"},{url:"autohtml/alphabeticListFragment.html",revision:"17b160c9c961ee83eced3a2c7d5f7749"},{url:"autohtml/changeUserSite.html",revision:"32ca48dd5c17c3ca7259a192c6ad3e5f"},{url:"autohtml/chooseDialog.html",revision:"1e4a0cfb29c721b64799c342f7586ad6"},{url:"autohtml/contactSite.html",revision:"2cdee4e20c1728e1f8e03110cbfcbd4c"},{url:"autohtml/container.html",revision:"7c9ef0046546b6535e2197845804df3d"},{url:"autohtml/credits.html",revision:"7ad14642353efd449a3890122bb73b1e"},{url:"autohtml/end.html",revision:"162cd57d50145eb4dbf51ca7bc97256a"},{url:"autohtml/forgotPasswordSite.html",revision:"ef290b527ae9e6ecf6e2ec31ecc99b87"},{url:"autohtml/impressum.html",revision:"1533d5dba0bd88309b004d65bc59c5f1"},{url:"autohtml/level.html",revision:"05cef7e7e823c25ed8bb735da3cf585b"},{url:"autohtml/loginSite.html",revision:"28536b28261bdd966784e32ef8e8bda2"},{url:"autohtml/menu.html",revision:"a356869e90f07077cc3a07dd36c238c5"},{url:"autohtml/menuSite.html",revision:"926a7a940ae8741445644f16132a9f20"},{url:"autohtml/navbar.html",revision:"04c4cb0adaa4e69cb43fb35cc8482b0a"},{url:"autohtml/notAllowedSite.html",revision:"da6b73654dccd61eebe8f4f1ba06e340"},{url:"autohtml/privacyPolicy.html",revision:"7319848c6b090b0af30ac56492101ee8"},{url:"autohtml/registrationSite.html",revision:"0911eeabc518befa874ea1661b64c3d7"},{url:"autohtml/selectUserDialog.html",revision:"23ae55ef46c250f2ab2528f4422a14d6"},{url:"autohtml/settings.html",revision:"d8a6ead5c9f8dd6f6319b61caab9d359"},{url:"autohtml/settingsSite.html",revision:"06f47ad4321d3ede658035e0411df0b0"},{url:"autohtml/shareDialog.html",revision:"cc8b45e9c7f6264e7b61d6da3e6210c6"},{url:"autohtml/swipeFragment.html",revision:"553c580ff0a282c49a2efe35dabad809"},{url:"autohtml/tabFragment.html",revision:"ca8c3b2c4a353a0ee7900aef656cc958"},{url:"autoimg/arrowLeft.svg",revision:"6bbb4f0e313bb88cd0cc80c2b3cd36fc"},{url:"autoimg/background.png",revision:"be3db85ac9a143f4bcac7db7f5a4856e"},{url:"autoimg/brightAndBeautifull__.mp3",revision:"2b40fd6c076d254cf639f8f46819d5ca"},{url:"autoimg/coin.png",revision:"5b380862ff8349f6b4b8d5241893f508"},{url:"autoimg/coinTower.png",revision:"50cef0780a1affcd301c2c4be09ccb25"},{url:"autoimg/errorIcon.png",revision:"b48a01a1871b83b30c317f0fc4aed555"},{url:"autoimg/help.png",revision:"45a8dc0493279dc37f72f8026af5bc10"},{url:"autoimg/logo.png",revision:"5246599497de18a878951e1e98083493"},{url:"autoimg/music.svg",revision:"ce36074e94a8d19dfa383f98bd66a1f4"},{url:"autoimg/settings.png",revision:"c44ce577ac56632e53208833ff78e67f"},{url:"autoimg/share.svg",revision:"ac8fc0221ee400fc843090a834df7c9d"},{url:"autoimg/single_coin_fall_on_concrete_.mp3",revision:"7f0de4f503644a7fc14de7e307bbf722"},{url:"autoimg/speaker.svg",revision:"0d926850f1558dd431e1c6b10fe0c2ef"},{url:"autoimg/telegram.svg",revision:"e366fed4603e06142a2d6b8221be51b8"},{url:"autoimg/whatsapp.svg",revision:"0fa4092ac1f91a5390e74a3c2c03d5e3"},{url:"autoindex.css",revision:"57dd368ab96459de433a2a3cbacc765d"},{url:"autoindex.html",revision:"d9da26b18b24767c7bedb06a44bc31ce"},{url:"autoscripts/localforage.js",revision:"7ae08028a75fed2acce92b8e75fbe08c"},{url:"autoscripts/sql-wasm.js",revision:"b34648b4b4c89ba52bcd7468fa035583"},{url:"autosql-wasm.wasm",revision:"bff856e0a3429d33cfb88d20b7f9fcff"}],{})}));
/**
* Copyright 2018 Google Inc. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// If the loader is already loaded, just stop.
if (!self.define) {
const singleRequire = name => {
if (name !== 'require') {
name = name + '.js';
}
let promise = Promise.resolve();
if (!registry[name]) {
promise = new Promise(async resolve => {
if ("document" in self) {
const script = document.createElement("script");
script.src = name;
document.head.appendChild(script);
script.onload = resolve;
} else {
importScripts(name);
resolve();
}
});
}
return promise.then(() => {
if (!registry[name]) {
throw new Error(`Module ${name} didnt register its module`);
}
return registry[name];
});
};
const require = (names, resolve) => {
Promise.all(names.map(singleRequire))
.then(modules => resolve(modules.length === 1 ? modules[0] : modules));
};
const registry = {
require: Promise.resolve(require)
};
self.define = (moduleName, depsNames, factory) => {
if (registry[moduleName]) {
// Module is already loading or loaded.
return;
}
registry[moduleName] = Promise.resolve().then(() => {
let exports = {};
const module = {
uri: location.origin + moduleName.slice(1)
};
return Promise.all(
depsNames.map(depName => {
switch(depName) {
case "exports":
return exports;
case "module":
return module;
default:
return singleRequire(depName);
}
})
).then(deps => {
const facValue = factory(...deps);
if(!exports.default) {
exports.default = facValue;
}
return exports;
});
});
};
}
define("./service-worker.js",['./workbox-3b8b670f'], function (workbox) { 'use strict';
/**
* Welcome to your Workbox-powered service worker!
*
* You'll need to register this file in your web app.
* See https://goo.gl/nhQhGp
*
* The rest of the code is auto-generated. Please don't update this file
* directly; instead, make changes to your Workbox build configuration
* and re-run your build process.
* See https://goo.gl/2aRDsh
*/
self.addEventListener('message', event => {
if (event.data && event.data.type === 'SKIP_WAITING') {
self.skipWaiting();
}
});
/**
* The precacheAndRoute() method efficiently caches and responds to
* requests for URLs in the manifest.
* See https://goo.gl/S9QRab
*/
workbox.precacheAndRoute([{
"url": "bundle.js",
"revision": "45af70c24da2c923b2e86465e4fca63c"
}, {
"url": "html/abstractWindowTemplate.html",
"revision": "00bb2496dac07a457654781fa8c6948c"
}, {
"url": "html/alphabeticListFragment.html",
"revision": "05e1a0c8574de51e0de78277af030920"
}, {
"url": "html/changeUserSite.html",
"revision": "b416ddd8f231490201243a26afa49ca8"
}, {
"url": "html/chooseDialog.html",
"revision": "0171b83550d8a21f1332a5360c10baf5"
}, {
"url": "html/contactSite.html",
"revision": "b8acb685882c2cb4a970e5a7615a5c5d"
}, {
"url": "html/container.html",
"revision": "a7285c607fdacd912f47738462150efe"
}, {
"url": "html/credits.html",
"revision": "efb301e087d02b5dcd97ecda45e661ca"
}, {
"url": "html/end.html",
"revision": "8aa547874fa8716e1ddb8d29276dcc91"
}, {
"url": "html/forgotPasswordSite.html",
"revision": "b063ea7614dce48ed6794400d34b135f"
}, {
"url": "html/impressum.html",
"revision": "d0e2e95559a8820115ac92659e3d2590"
}, {
"url": "html/level.html",
"revision": "481bf599c219a9f2d94eae4096fc6d79"
}, {
"url": "html/loginSite.html",
"revision": "4d8c2f02ba16dbf38ad679827cbd62f2"
}, {
"url": "html/menu.html",
"revision": "06cf7df2e0e4918542d0d83f21a1c2b0"
}, {
"url": "html/menuSite.html",
"revision": "8dae573b1dcba5727f4bc598b1a09007"
}, {
"url": "html/navbar.html",
"revision": "482d5ac8a3b6ea9ae3f06543d3eed977"
}, {
"url": "html/notAllowedSite.html",
"revision": "2a65f4f3da6f1f508736bd63c3d093ea"
}, {
"url": "html/privacyPolicy.html",
"revision": "f55a77320c0744ac684231107bd51012"
}, {
"url": "html/registrationSite.html",
"revision": "5d732604002df8c6eb1f206709bc4b9a"
}, {
"url": "html/selectUserDialog.html",
"revision": "3cd8fc58c0d2c6a260747475f861b855"
}, {
"url": "html/settings.html",
"revision": "5a7cf19679ca839e4badd6624b6c35aa"
}, {
"url": "html/settingsSite.html",
"revision": "c20c185a3dd15b8e5a62d9934f0402f5"
}, {
"url": "html/shareDialog.html",
"revision": "49fd3d7553c48ecc11c3861afc0b0771"
}, {
"url": "html/swipeFragment.html",
"revision": "3278efb5dd279a359cdd950fa002b234"
}, {
"url": "html/tabFragment.html",
"revision": "733ad585b3927993d15cbd04e9c135da"
}, {
"url": "html/tutorialSite.html",
"revision": "24b319cd6fbb2d54fa57fdf46176287a"
}, {
"url": "img/arrowLeft.svg",
"revision": "6bbb4f0e313bb88cd0cc80c2b3cd36fc"
}, {
"url": "img/brightAndBeautifull__.mp3",
"revision": "2b40fd6c076d254cf639f8f46819d5ca"
}, {
"url": "img/coin.png",
"revision": "5b380862ff8349f6b4b8d5241893f508"
}, {
"url": "img/coinTower.png",
"revision": "50cef0780a1affcd301c2c4be09ccb25"
}, {
"url": "img/errorIcon.png",
"revision": "b48a01a1871b83b30c317f0fc4aed555"
}, {
"url": "img/help.png",
"revision": "45a8dc0493279dc37f72f8026af5bc10"
}, {
"url": "img/logo.png",
"revision": "5246599497de18a878951e1e98083493"
}, {
"url": "img/music.svg",
"revision": "ce36074e94a8d19dfa383f98bd66a1f4"
}, {
"url": "img/settings.png",
"revision": "c44ce577ac56632e53208833ff78e67f"
}, {
"url": "img/share.svg",
"revision": "ac8fc0221ee400fc843090a834df7c9d"
}, {
"url": "img/single_coin_fall_on_concrete_.mp3",
"revision": "7f0de4f503644a7fc14de7e307bbf722"
}, {
"url": "img/speaker.svg",
"revision": "0d926850f1558dd431e1c6b10fe0c2ef"
}, {
"url": "img/telegram.svg",
"revision": "e366fed4603e06142a2d6b8221be51b8"
}, {
"url": "img/whatsapp.svg",
"revision": "0fa4092ac1f91a5390e74a3c2c03d5e3"
}, {
"url": "index.css",
"revision": "6fc107452ad861200f8193f85e7709c2"
}, {
"url": "index.html",
"revision": "5f8832bceb6eae4ba8126bf5b03e0d38"
}, {
"url": "scripts/localforage.js",
"revision": "7e2a4110781376e372c538e67787773a"
}, {
"url": "scripts/sql-wasm.js",
"revision": "7da4edc42b013dcff1b48e8c02867e26"
}, {
"url": "sql-wasm.wasm",
"revision": "bff856e0a3429d33cfb88d20b7f9fcff"
}], {});
});
//# sourceMappingURL=service-worker.js.map

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long