Skip to content

TagSpaces is an offline, open source, document manager with tagging support

offline webdav

kristiyandd9051f0cc9af7
diff --git a/data/loader.js b/data/loader.js
index 3c1744f39..5e30fc74a 100644
--- a/data/loader.js
+++ b/data/loader.js
@@ -107,6 +107,8 @@ var isWin = navigator.appVersion.indexOf("Win")!==-1;
noty: 'libs/noty/js/noty/packaged/jquery.noty.packaged.min',
marked: 'libs/marked/marked.min',
webaudiorecording: 'libs/audio-record/WebAudioRecorder',
+ offlinelib: 'web/offlinelib/offline.min',
+ webdav: 'web/webdavlib/webdavlib',
tscore: 'js/core.api',
tssetting: 'js/settings.api',
diff --git a/data/web/offlinelib/offline-language-english-indicator.css b/data/web/offlinelib/offline-language-english-indicator.css
new file mode 100644
index 000000000..288a76505
--- /dev/null
+++ b/data/web/offlinelib/offline-language-english-indicator.css
@@ -0,0 +1,8 @@
+/* line 5, ../sass/offline-language-english-indicator.sass */
+.offline-ui.offline-ui-up .offline-ui-content:before {
+ content: "Online";
+}
+/* line 10, ../sass/offline-language-english-indicator.sass */
+.offline-ui.offline-ui-down .offline-ui-content:before {
+ content: "Offline";
+}
\ No newline at end of file
diff --git a/data/web/offlinelib/offline-language-english.css b/data/web/offlinelib/offline-language-english.css
new file mode 100644
index 000000000..741ff7bae
--- /dev/null
+++ b/data/web/offlinelib/offline-language-english.css
@@ -0,0 +1,108 @@
+/* line 6, ../sass/_content.sass */
+.offline-ui .offline-ui-retry:before {
+ content: "Reconnect";
+}
+/* line 11, ../sass/_content.sass */
+.offline-ui.offline-ui-up .offline-ui-content:before {
+ content: "Your computer is connected to the internet.";
+}
+@media (max-width: 1024px) {
+ /* line 11, ../sass/_content.sass */
+ .offline-ui.offline-ui-up .offline-ui-content:before {
+ content: "Your device is connected to the internet.";
+ }
+}
+@media (max-width: 568px) {
+ /* line 11, ../sass/_content.sass */
+ .offline-ui.offline-ui-up .offline-ui-content:before {
+ content: "Your device is connected.";
+ }
+}
+/* line 22, ../sass/_content.sass */
+.offline-ui.offline-ui-down .offline-ui-content:before {
+ content: "Your computer lost its internet connection.";
+}
+@media (max-width: 1024px) {
+ /* line 22, ../sass/_content.sass */
+ .offline-ui.offline-ui-down .offline-ui-content:before {
+ content: "Your device lost its internet connection.";
+ }
+}
+@media (max-width: 568px) {
+ /* line 22, ../sass/_content.sass */
+ .offline-ui.offline-ui-down .offline-ui-content:before {
+ content: "Your device isn't connected.";
+ }
+}
+/* line 33, ../sass/_content.sass */
+.offline-ui.offline-ui-down.offline-ui-connecting .offline-ui-content:before, .offline-ui.offline-ui-down.offline-ui-connecting-2s .offline-ui-content:before {
+ content: "Attempting to reconnect...";
+}
+/* line 42, ../sass/_content.sass */
+.offline-ui.offline-ui-down.offline-ui-waiting .offline-ui-content[data-retry-in-unit="second"]:before {
+ content: "Connection lost. Reconnecting in " attr(data-retry-in-value) " seconds...";
+}
+@media (max-width: 568px) {
+ /* line 42, ../sass/_content.sass */
+ .offline-ui.offline-ui-down.offline-ui-waiting .offline-ui-content[data-retry-in-unit="second"]:before {
+ content: "Reconnecting in " attr(data-retry-in-value) "s...";
+ }
+}
+/* line 50, ../sass/_content.sass */
+.offline-ui.offline-ui-down.offline-ui-waiting .offline-ui-content[data-retry-in-unit="second"][data-retry-in-value="1"]:before {
+ content: "Connection lost. Reconnecting in " attr(data-retry-in-value) " second...";
+}
+@media (max-width: 568px) {
+ /* line 50, ../sass/_content.sass */
+ .offline-ui.offline-ui-down.offline-ui-waiting .offline-ui-content[data-retry-in-unit="second"][data-retry-in-value="1"]:before {
+ content: "Reconnecting in " attr(data-retry-in-value) "s...";
+ }
+}
+/* line 58, ../sass/_content.sass */
+.offline-ui.offline-ui-down.offline-ui-waiting .offline-ui-content[data-retry-in-unit="minute"]:before {
+ content: "Connection lost. Reconnecting in " attr(data-retry-in-value) " minutes...";
+}
+@media (max-width: 568px) {
+ /* line 58, ../sass/_content.sass */
+ .offline-ui.offline-ui-down.offline-ui-waiting .offline-ui-content[data-retry-in-unit="minute"]:before {
+ content: "Reconnecting in " attr(data-retry-in-value) "m...";
+ }
+}
+/* line 66, ../sass/_content.sass */
+.offline-ui.offline-ui-down.offline-ui-waiting .offline-ui-content[data-retry-in-unit="minute"][data-retry-in-value="1"]:before {
+ content: "Connection lost. Reconnecting in " attr(data-retry-in-value) " minute...";
+}
+@media (max-width: 568px) {
+ /* line 66, ../sass/_content.sass */
+ .offline-ui.offline-ui-down.offline-ui-waiting .offline-ui-content[data-retry-in-unit="minute"][data-retry-in-value="1"]:before {
+ content: "Reconnecting in " attr(data-retry-in-value) "m...";
+ }
+}
+/* line 74, ../sass/_content.sass */
+.offline-ui.offline-ui-down.offline-ui-waiting .offline-ui-content[data-retry-in-unit="hour"]:before {
+ content: "Connection lost. Reconnecting in " attr(data-retry-in-value) " hours...";
+}
+@media (max-width: 568px) {
+ /* line 74, ../sass/_content.sass */
+ .offline-ui.offline-ui-down.offline-ui-waiting .offline-ui-content[data-retry-in-unit="hour"]:before {
+ content: "Reconnecting in " attr(data-retry-in-value) "h...";
+ }
+}
+/* line 82, ../sass/_content.sass */
+.offline-ui.offline-ui-down.offline-ui-waiting .offline-ui-content[data-retry-in-unit="hour"][data-retry-in-value="1"]:before {
+ content: "Connection lost. Reconnecting in " attr(data-retry-in-value) " hour...";
+}
+@media (max-width: 568px) {
+ /* line 82, ../sass/_content.sass */
+ .offline-ui.offline-ui-down.offline-ui-waiting .offline-ui-content[data-retry-in-unit="hour"][data-retry-in-value="1"]:before {
+ content: "Reconnecting in " attr(data-retry-in-value) "h...";
+ }
+}
+/* line 90, ../sass/_content.sass */
+.offline-ui.offline-ui-down.offline-ui-reconnect-failed-2s.offline-ui-waiting .offline-ui-retry {
+ display: none;
+}
+/* line 93, ../sass/_content.sass */
+.offline-ui.offline-ui-down.offline-ui-reconnect-failed-2s .offline-ui-content:before {
+ content: "Connection attempt failed.";
+}
diff --git a/data/web/offlinelib/offline-theme-chrome.css b/data/web/offlinelib/offline-theme-chrome.css
new file mode 100644
index 000000000..50a32bb0b
--- /dev/null
+++ b/data/web/offlinelib/offline-theme-chrome.css
@@ -0,0 +1,597 @@
+/* line 4, ../sass/_offline-theme-base.sass */
+.offline-ui, .offline-ui *, .offline-ui:before, .offline-ui:after, .offline-ui *:before, .offline-ui *:after {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+
+/* line 7, ../sass/_offline-theme-base.sass */
+.offline-ui {
+ display: none;
+ position: fixed;
+ background: white;
+ z-index: 2000;
+ margin: auto;
+ top: 0;
+ left: 0;
+ right: 0;
+}
+/* line 17, ../sass/_offline-theme-base.sass */
+.offline-ui .offline-ui-content:before {
+ display: inline;
+}
+/* line 20, ../sass/_offline-theme-base.sass */
+.offline-ui .offline-ui-retry {
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ user-select: none;
+ display: none;
+}
+/* line 24, ../sass/_offline-theme-base.sass */
+.offline-ui .offline-ui-retry:before {
+ display: inline;
+}
+/* line 29, ../sass/_offline-theme-base.sass */
+.offline-ui.offline-ui-up.offline-ui-up-5s {
+ display: block;
+}
+/* line 32, ../sass/_offline-theme-base.sass */
+.offline-ui.offline-ui-down {
+ display: block;
+}
+/* line 37, ../sass/_offline-theme-base.sass */
+.offline-ui.offline-ui-down.offline-ui-waiting .offline-ui-retry {
+ display: block;
+}
+/* line 42, ../sass/_offline-theme-base.sass */
+.offline-ui.offline-ui-down.offline-ui-reconnect-failed-2s.offline-ui-waiting .offline-ui-retry {
+ display: none;
+}
+
+@-webkit-keyframes offline-dropin {
+ /* line 40, ../sass/_keyframes.sass */
+ 0% {
+ transform: translateY(0);
+ -webkit-transform: translateY(0);
+ -moz-transform: translateY(0);
+ -ms-transform: translateY(0);
+ -o-transform: translateY(0);
+ opacity: 0;
+ }
+
+ /* line 43, ../sass/_keyframes.sass */
+ 1% {
+ transform: translateY(-800px);
+ -webkit-transform: translateY(-800px);
+ -moz-transform: translateY(-800px);
+ -ms-transform: translateY(-800px);
+ -o-transform: translateY(-800px);
+ opacity: 0;
+ }
+
+ /* line 48, ../sass/_keyframes.sass */
+ 2% {
+ transform: translateY(-800px);
+ -webkit-transform: translateY(-800px);
+ -moz-transform: translateY(-800px);
+ -ms-transform: translateY(-800px);
+ -o-transform: translateY(-800px);
+ opacity: 1;
+ }
+
+ /* line 51, ../sass/_keyframes.sass */
+ 100% {
+ transform: translateY(0);
+ -webkit-transform: translateY(0);
+ -moz-transform: translateY(0);
+ -ms-transform: translateY(0);
+ -o-transform: translateY(0);
+ opacity: 1;
+ }
+}
+
+@-moz-keyframes offline-dropin {
+ /* line 40, ../sass/_keyframes.sass */
+ 0% {
+ transform: translateY(0);
+ -webkit-transform: translateY(0);
+ -moz-transform: translateY(0);
+ -ms-transform: translateY(0);
+ -o-transform: translateY(0);
+ opacity: 0;
+ }
+
+ /* line 43, ../sass/_keyframes.sass */
+ 1% {
+ transform: translateY(-800px);
+ -webkit-transform: translateY(-800px);
+ -moz-transform: translateY(-800px);
+ -ms-transform: translateY(-800px);
+ -o-transform: translateY(-800px);
+ opacity: 0;
+ }
+
+ /* line 48, ../sass/_keyframes.sass */
+ 2% {
+ transform: translateY(-800px);
+ -webkit-transform: translateY(-800px);
+ -moz-transform: translateY(-800px);
+ -ms-transform: translateY(-800px);
+ -o-transform: translateY(-800px);
+ opacity: 1;
+ }
+
+ /* line 51, ../sass/_keyframes.sass */
+ 100% {
+ transform: translateY(0);
+ -webkit-transform: translateY(0);
+ -moz-transform: translateY(0);
+ -ms-transform: translateY(0);
+ -o-transform: translateY(0);
+ opacity: 1;
+ }
+}
+
+@-ms-keyframes offline-dropin {
+ /* line 40, ../sass/_keyframes.sass */
+ 0% {
+ transform: translateY(0);
+ -webkit-transform: translateY(0);
+ -moz-transform: translateY(0);
+ -ms-transform: translateY(0);
+ -o-transform: translateY(0);
+ opacity: 0;
+ }
+
+ /* line 43, ../sass/_keyframes.sass */
+ 1% {
+ transform: translateY(-800px);
+ -webkit-transform: translateY(-800px);
+ -moz-transform: translateY(-800px);
+ -ms-transform: translateY(-800px);
+ -o-transform: translateY(-800px);
+ opacity: 0;
+ }
+
+ /* line 48, ../sass/_keyframes.sass */
+ 2% {
+ transform: translateY(-800px);
+ -webkit-transform: translateY(-800px);
+ -moz-transform: translateY(-800px);
+ -ms-transform: translateY(-800px);
+ -o-transform: translateY(-800px);
+ opacity: 1;
+ }
+
+ /* line 51, ../sass/_keyframes.sass */
+ 100% {
+ transform: translateY(0);
+ -webkit-transform: translateY(0);
+ -moz-transform: translateY(0);
+ -ms-transform: translateY(0);
+ -o-transform: translateY(0);
+ opacity: 1;
+ }
+}
+
+@-o-keyframes offline-dropin {
+ /* line 40, ../sass/_keyframes.sass */
+ 0% {
+ transform: translateY(0);
+ -webkit-transform: translateY(0);
+ -moz-transform: translateY(0);
+ -ms-transform: translateY(0);
+ -o-transform: translateY(0);
+ opacity: 0;
+ }
+
+ /* line 43, ../sass/_keyframes.sass */
+ 1% {
+ transform: translateY(-800px);
+ -webkit-transform: translateY(-800px);
+ -moz-transform: translateY(-800px);
+ -ms-transform: translateY(-800px);
+ -o-transform: translateY(-800px);
+ opacity: 0;
+ }
+
+ /* line 48, ../sass/_keyframes.sass */
+ 2% {
+ transform: translateY(-800px);
+ -webkit-transform: translateY(-800px);
+ -moz-transform: translateY(-800px);
+ -ms-transform: translateY(-800px);
+ -o-transform: translateY(-800px);
+ opacity: 1;
+ }
+
+ /* line 51, ../sass/_keyframes.sass */
+ 100% {
+ transform: translateY(0);
+ -webkit-transform: translateY(0);
+ -moz-transform: translateY(0);
+ -ms-transform: translateY(0);
+ -o-transform: translateY(0);
+ opacity: 1;
+ }
+}
+
+@keyframes offline-dropin {
+ /* line 40, ../sass/_keyframes.sass */
+ 0% {
+ transform: translateY(0);
+ -webkit-transform: translateY(0);
+ -moz-transform: translateY(0);
+ -ms-transform: translateY(0);
+ -o-transform: translateY(0);
+ opacity: 0;
+ }
+
+ /* line 43, ../sass/_keyframes.sass */
+ 1% {
+ transform: translateY(-800px);
+ -webkit-transform: translateY(-800px);
+ -moz-transform: translateY(-800px);
+ -ms-transform: translateY(-800px);
+ -o-transform: translateY(-800px);
+ opacity: 0;
+ }
+
+ /* line 48, ../sass/_keyframes.sass */
+ 2% {
+ transform: translateY(-800px);
+ -webkit-transform: translateY(-800px);
+ -moz-transform: translateY(-800px);
+ -ms-transform: translateY(-800px);
+ -o-transform: translateY(-800px);
+ opacity: 1;
+ }
+
+ /* line 51, ../sass/_keyframes.sass */
+ 100% {
+ transform: translateY(0);
+ -webkit-transform: translateY(0);
+ -moz-transform: translateY(0);
+ -ms-transform: translateY(0);
+ -o-transform: translateY(0);
+ opacity: 1;
+ }
+}
+
+@-webkit-keyframes offline-dropout {
+ /* line 57, ../sass/_keyframes.sass */
+ 0% {
+ transform: translateY(0);
+ -webkit-transform: translateY(0);
+ -moz-transform: translateY(0);
+ -ms-transform: translateY(0);
+ -o-transform: translateY(0);
+ }
+
+ /* line 59, ../sass/_keyframes.sass */
+ 100% {
+ transform: translateY(-800px);
+ -webkit-transform: translateY(-800px);
+ -moz-transform: translateY(-800px);
+ -ms-transform: translateY(-800px);
+ -o-transform: translateY(-800px);
+ }
+}
+
+@-moz-keyframes offline-dropout {
+ /* line 57, ../sass/_keyframes.sass */
+ 0% {
+ transform: translateY(0);
+ -webkit-transform: translateY(0);
+ -moz-transform: translateY(0);
+ -ms-transform: translateY(0);
+ -o-transform: translateY(0);
+ }
+
+ /* line 59, ../sass/_keyframes.sass */
+ 100% {
+ transform: translateY(-800px);
+ -webkit-transform: translateY(-800px);
+ -moz-transform: translateY(-800px);
+ -ms-transform: translateY(-800px);
+ -o-transform: translateY(-800px);
+ }
+}
+
+@-ms-keyframes offline-dropout {
+ /* line 57, ../sass/_keyframes.sass */
+ 0% {
+ transform: translateY(0);
+ -webkit-transform: translateY(0);
+ -moz-transform: translateY(0);
+ -ms-transform: translateY(0);
+ -o-transform: translateY(0);
+ }
+
+ /* line 59, ../sass/_keyframes.sass */
+ 100% {
+ transform: translateY(-800px);
+ -webkit-transform: translateY(-800px);
+ -moz-transform: translateY(-800px);
+ -ms-transform: translateY(-800px);
+ -o-transform: translateY(-800px);
+ }
+}
+
+@-o-keyframes offline-dropout {
+ /* line 57, ../sass/_keyframes.sass */
+ 0% {
+ transform: translateY(0);
+ -webkit-transform: translateY(0);
+ -moz-transform: translateY(0);
+ -ms-transform: translateY(0);
+ -o-transform: translateY(0);
+ }
+
+ /* line 59, ../sass/_keyframes.sass */
+ 100% {
+ transform: translateY(-800px);
+ -webkit-transform: translateY(-800px);
+ -moz-transform: translateY(-800px);
+ -ms-transform: translateY(-800px);
+ -o-transform: translateY(-800px);
+ }
+}
+
+@keyframes offline-dropout {
+ /* line 57, ../sass/_keyframes.sass */
+ 0% {
+ transform: translateY(0);
+ -webkit-transform: translateY(0);
+ -moz-transform: translateY(0);
+ -ms-transform: translateY(0);
+ -o-transform: translateY(0);
+ }
+
+ /* line 59, ../sass/_keyframes.sass */
+ 100% {
+ transform: translateY(-800px);
+ -webkit-transform: translateY(-800px);
+ -moz-transform: translateY(-800px);
+ -ms-transform: translateY(-800px);
+ -o-transform: translateY(-800px);
+ }
+}
+
+@-webkit-keyframes offline-rotation {
+ /* line 64, ../sass/_keyframes.sass */
+ 0% {
+ transform: rotate(0deg);
+ -webkit-transform: rotate(0deg);
+ -moz-transform: rotate(0deg);
+ -ms-transform: rotate(0deg);
+ -o-transform: rotate(0deg);
+ }
+
+ /* line 66, ../sass/_keyframes.sass */
+ 100% {
+ transform: rotate(359deg);
+ -webkit-transform: rotate(359deg);
+ -moz-transform: rotate(359deg);
+ -ms-transform: rotate(359deg);
+ -o-transform: rotate(359deg);
+ }
+}
+
+@-moz-keyframes offline-rotation {
+ /* line 64, ../sass/_keyframes.sass */
+ 0% {
+ transform: rotate(0deg);
+ -webkit-transform: rotate(0deg);
+ -moz-transform: rotate(0deg);
+ -ms-transform: rotate(0deg);
+ -o-transform: rotate(0deg);
+ }
+
+ /* line 66, ../sass/_keyframes.sass */
+ 100% {
+ transform: rotate(359deg);
+ -webkit-transform: rotate(359deg);
+ -moz-transform: rotate(359deg);
+ -ms-transform: rotate(359deg);
+ -o-transform: rotate(359deg);
+ }
+}
+
+@-ms-keyframes offline-rotation {
+ /* line 64, ../sass/_keyframes.sass */
+ 0% {
+ transform: rotate(0deg);
+ -webkit-transform: rotate(0deg);
+ -moz-transform: rotate(0deg);
+ -ms-transform: rotate(0deg);
+ -o-transform: rotate(0deg);
+ }
+
+ /* line 66, ../sass/_keyframes.sass */
+ 100% {
+ transform: rotate(359deg);
+ -webkit-transform: rotate(359deg);
+ -moz-transform: rotate(359deg);
+ -ms-transform: rotate(359deg);
+ -o-transform: rotate(359deg);
+ }
+}
+
+@-o-keyframes offline-rotation {
+ /* line 64, ../sass/_keyframes.sass */
+ 0% {
+ transform: rotate(0deg);
+ -webkit-transform: rotate(0deg);
+ -moz-transform: rotate(0deg);
+ -ms-transform: rotate(0deg);
+ -o-transform: rotate(0deg);
+ }
+
+ /* line 66, ../sass/_keyframes.sass */
+ 100% {
+ transform: rotate(359deg);
+ -webkit-transform: rotate(359deg);
+ -moz-transform: rotate(359deg);
+ -ms-transform: rotate(359deg);
+ -o-transform: rotate(359deg);
+ }
+}
+
+@keyframes offline-rotation {
+ /* line 64, ../sass/_keyframes.sass */
+ 0% {
+ transform: rotate(0deg);
+ -webkit-transform: rotate(0deg);
+ -moz-transform: rotate(0deg);
+ -ms-transform: rotate(0deg);
+ -o-transform: rotate(0deg);
+ }
+
+ /* line 66, ../sass/_keyframes.sass */
+ 100% {
+ transform: rotate(359deg);
+ -webkit-transform: rotate(359deg);
+ -moz-transform: rotate(359deg);
+ -ms-transform: rotate(359deg);
+ -o-transform: rotate(359deg);
+ }
+}
+
+/* line 16, ../sass/offline-theme-chrome.sass */
+.offline-ui {
+ -webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15), 0 0 1em rgba(0, 0, 0, 0.3);
+ -moz-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15), 0 0 1em rgba(0, 0, 0, 0.3);
+ box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15), 0 0 1em rgba(0, 0, 0, 0.3);
+ font-family: "Lucida Grande", sans-serif;
+ font-size: 14px;
+ padding: 1em;
+ width: 38em;
+ max-width: 100%;
+ background: #f6f6f6;
+ color: #444444;
+ overflow: hidden;
+}
+/* line 27, ../sass/offline-theme-chrome.sass */
+.offline-ui .offline-ui-content {
+ padding-left: 2em;
+}
+/* line 30, ../sass/offline-theme-chrome.sass */
+.offline-ui .offline-ui-content:before {
+ line-height: 1.25em;
+}
+/* line 33, ../sass/offline-theme-chrome.sass */
+.offline-ui .offline-ui-content:after {
+ -webkit-border-radius: 50%;
+ -moz-border-radius: 50%;
+ -ms-border-radius: 50%;
+ -o-border-radius: 50%;
+ border-radius: 50%;
+ content: " ";
+ display: block;
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ left: 1em;
+ margin: auto;
+ height: 1em;
+ width: 1em;
+}
+/* line 45, ../sass/offline-theme-chrome.sass */
+.offline-ui .offline-ui-retry {
+ -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08), inset 0 1px 2px rgba(255, 255, 255, 0.75);
+ -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08), inset 0 1px 2px rgba(255, 255, 255, 0.75);
+ box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08), inset 0 1px 2px rgba(255, 255, 255, 0.75);
+ -webkit-border-radius: 2px;
+ -moz-border-radius: 2px;
+ -ms-border-radius: 2px;
+ -o-border-radius: 2px;
+ border-radius: 2px;
+ background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ededed), color-stop(38%, #ededed), color-stop(100%, #dedede));
+ background-image: -webkit-linear-gradient(#ededed, #ededed 38%, #dedede);
+ background-image: -moz-linear-gradient(#ededed, #ededed 38%, #dedede);
+ background-image: -o-linear-gradient(#ededed, #ededed 38%, #dedede);
+ background-image: linear-gradient(#ededed, #ededed 38%, #dedede);
+ position: absolute;
+ right: 4em;
+ top: 1em;
+ bottom: 1em;
+ border: 1px solid rgba(0, 0, 0, 0.25);
+ text-shadow: 0 1px 0 #f0f0f0;
+ padding: 0 1em;
+ line-height: 1.6em;
+ height: 1.7em;
+ margin: auto;
+ font-size: 12px;
+ text-decoration: none;
+ color: inherit;
+}
+/* line 63, ../sass/offline-theme-chrome.sass */
+.offline-ui.offline-ui-up {
+ -webkit-animation: offline-dropout forwards 0.5s 2s;
+ -moz-animation: offline-dropout forwards 0.5s 2s;
+ -ms-animation: offline-dropout forwards 0.5s 2s;
+ -o-animation: offline-dropout forwards 0.5s 2s;
+ animation: offline-dropout forwards 0.5s 2s;
+ -webkit-backface-visibility: hidden;
+}
+/* line 66, ../sass/offline-theme-chrome.sass */
+.offline-ui.offline-ui-up .offline-ui-content:after {
+ background: #80d580;
+}
+/* line 69, ../sass/offline-theme-chrome.sass */
+.offline-ui.offline-ui-down {
+ -webkit-animation: offline-dropin 0.5s;
+ -moz-animation: offline-dropin 0.5s;
+ -ms-animation: offline-dropin 0.5s;
+ -o-animation: offline-dropin 0.5s;
+ animation: offline-dropin 0.5s;
+ -webkit-backface-visibility: hidden;
+}
+/* line 72, ../sass/offline-theme-chrome.sass */
+.offline-ui.offline-ui-down .offline-ui-content:after {
+ background: #ec8787;
+}
+/* line 75, ../sass/offline-theme-chrome.sass */
+.offline-ui.offline-ui-down.offline-ui-connecting, .offline-ui.offline-ui-down.offline-ui-waiting {
+ padding-right: 3em;
+}
+/* line 78, ../sass/offline-theme-chrome.sass */
+.offline-ui.offline-ui-down.offline-ui-connecting .offline-ui-content:after, .offline-ui.offline-ui-down.offline-ui-waiting .offline-ui-content:after {
+ background: #ec8787;
+}
+/* line 81, ../sass/offline-theme-chrome.sass */
+.offline-ui.offline-ui-down.offline-ui-connecting:after, .offline-ui.offline-ui-down.offline-ui-waiting:after {
+ -webkit-animation: offline-rotation 0.7s linear infinite;
+ -moz-animation: offline-rotation 0.7s linear infinite;
+ -ms-animation: offline-rotation 0.7s linear infinite;
+ -o-animation: offline-rotation 0.7s linear infinite;
+ animation: offline-rotation 0.7s linear infinite;
+ -webkit-backface-visibility: hidden;
+ -webkit-border-radius: 50%;
+ -moz-border-radius: 50%;
+ -ms-border-radius: 50%;
+ -o-border-radius: 50%;
+ border-radius: 50%;
+ content: " ";
+ display: block;
+ position: absolute;
+ right: 1em;
+ top: 0;
+ bottom: 0;
+ margin: auto;
+ height: 1em;
+ width: 1em;
+ border: 2px solid rgba(0, 0, 0, 0);
+ border-top-color: rgba(0, 0, 0, 0.5);
+ border-left-color: rgba(0, 0, 0, 0.5);
+ opacity: 0.7;
+}
+/* line 98, ../sass/offline-theme-chrome.sass */
+.offline-ui.offline-ui-down.offline-ui-waiting {
+ padding-right: 11em;
+}
+/* line 101, ../sass/offline-theme-chrome.sass */
+.offline-ui.offline-ui-down.offline-ui-waiting.offline-ui-reconnect-failed-2s {
+ padding-right: 0;
+}
\ No newline at end of file
diff --git a/data/web/offlinelib/offline.min.js b/data/web/offlinelib/offline.min.js
new file mode 100644
index 000000000..d46b5cf2f
--- /dev/null
+++ b/data/web/offlinelib/offline.min.js
@@ -0,0 +1,2 @@
+/*! offline-js 0.7.13 */
+(function(){var a,b,c,d,e,f,g;d=function(a,b){var c,d,e,f;e=[];for(d in b.prototype)try{f=b.prototype[d],null==a[d]&&"function"!=typeof f?e.push(a[d]=f):e.push(void 0)}catch(g){c=g}return e},a={},null==a.options&&(a.options={}),c={checks:{xhr:{url:function(){return"/favicon.ico?_="+Math.floor(1e9*Math.random())},timeout:5e3},image:{url:function(){return"/favicon.ico?_="+Math.floor(1e9*Math.random())}},active:"xhr"},checkOnLoad:!1,interceptRequests:!0,reconnect:!0},e=function(a,b){var c,d,e,f,g,h;for(c=a,h=b.split("."),d=e=0,f=h.length;f>e&&(g=h[d],c=c[g],"object"==typeof c);d=++e);return d===h.length-1?c:void 0},a.getOption=function(b){var d,f;return f=null!=(d=e(a.options,b))?d:e(c,b),"function"==typeof f?f():f},"function"==typeof window.addEventListener&&window.addEventListener("online",function(){return setTimeout(a.confirmUp,100)},!1),"function"==typeof window.addEventListener&&window.addEventListener("offline",function(){return a.confirmDown()},!1),a.state="up",a.markUp=function(){return a.trigger("confirmed-up"),"up"!==a.state?(a.state="up",a.trigger("up")):void 0},a.markDown=function(){return a.trigger("confirmed-down"),"down"!==a.state?(a.state="down",a.trigger("down")):void 0},f={},a.on=function(b,c,d){var e,g,h,i,j;if(g=b.split(" "),g.length>1){for(j=[],h=0,i=g.length;i>h;h++)e=g[h],j.push(a.on(e,c,d));return j}return null==f[b]&&(f[b]=[]),f[b].push([d,c])},a.off=function(a,b){var c,d,e,g,h;if(null!=f[a]){if(b){for(e=0,h=[];e<f[a].length;)g=f[a][e],d=g[0],c=g[1],c===b?h.push(f[a].splice(e,1)):h.push(e++);return h}return f[a]=[]}},a.trigger=function(a){var b,c,d,e,g,h,i;if(null!=f[a]){for(g=f[a],i=[],d=0,e=g.length;e>d;d++)h=g[d],b=h[0],c=h[1],i.push(c.call(b));return i}},b=function(a,b,c){var d,e,f,g,h;return h=function(){return a.status&&a.status<12e3?b():c()},null===a.onprogress?(d=a.onerror,a.onerror=function(){return c(),"function"==typeof d?d.apply(null,arguments):void 0},g=a.ontimeout,a.ontimeout=function(){return c(),"function"==typeof g?g.apply(null,arguments):void 0},e=a.onload,a.onload=function(){return h(),"function"==typeof e?e.apply(null,arguments):void 0}):(f=a.onreadystatechange,a.onreadystatechange=function(){return 4===a.readyState?h():0===a.readyState&&c(),"function"==typeof f?f.apply(null,arguments):void 0})},a.checks={},a.checks.xhr=function(){var c,d;d=new XMLHttpRequest,d.offline=!1,d.open("HEAD",a.getOption("checks.xhr.url"),!0),null!=d.timeout&&(d.timeout=a.getOption("checks.xhr.timeout")),b(d,a.markUp,a.markDown);try{d.send()}catch(e){c=e,a.markDown()}return d},a.checks.image=function(){var b;return b=document.createElement("img"),b.onerror=a.markDown,b.onload=a.markUp,void(b.src=a.getOption("checks.image.url"))},a.checks.down=a.markDown,a.checks.up=a.markUp,a.check=function(){return a.trigger("checking"),a.checks[a.getOption("checks.active")]()},a.confirmUp=a.confirmDown=a.check,a.onXHR=function(a){var b,c,e;return e=function(b,c){var d;return d=b.open,b.open=function(e,f,g,h,i){return a({type:e,url:f,async:g,flags:c,user:h,password:i,xhr:b}),d.apply(b,arguments)}},c=window.XMLHttpRequest,window.XMLHttpRequest=function(a){var b,d,f;return f=new c(a),e(f,a),d=f.setRequestHeader,f.headers={},f.setRequestHeader=function(a,b){return f.headers[a]=b,d.call(f,a,b)},b=f.overrideMimeType,f.overrideMimeType=function(a){return f.mimeType=a,b.call(f,a)},f},d(window.XMLHttpRequest,c),null!=window.XDomainRequest?(b=window.XDomainRequest,window.XDomainRequest=function(){var a;return a=new b,e(a),a},d(window.XDomainRequest,b)):void 0},g=function(){return a.getOption("interceptRequests")&&a.onXHR(function(c){var d;return d=c.xhr,d.offline!==!1?b(d,a.markUp,a.confirmDown):void 0}),a.getOption("checkOnLoad")?a.check():void 0},setTimeout(g,0),window.Offline=a}).call(this),function(){var a,b,c,d,e,f,g,h,i;if(!window.Offline)throw new Error("Offline Reconnect brought in without offline.js");d=Offline.reconnect={},f=null,e=function(){var a;return null!=d.state&&"inactive"!==d.state&&Offline.trigger("reconnect:stopped"),d.state="inactive",d.remaining=d.delay=null!=(a=Offline.getOption("reconnect.initialDelay"))?a:3},b=function(){var a,b;return a=null!=(b=Offline.getOption("reconnect.delay"))?b:Math.min(Math.ceil(1.5*d.delay),3600),d.remaining=d.delay=a},g=function(){return"connecting"!==d.state?(d.remaining-=1,Offline.trigger("reconnect:tick"),0===d.remaining?h():void 0):void 0},h=function(){return"waiting"===d.state?(Offline.trigger("reconnect:connecting"),d.state="connecting",Offline.check()):void 0},a=function(){return Offline.getOption("reconnect")?(e(),d.state="waiting",Offline.trigger("reconnect:started"),f=setInterval(g,1e3)):void 0},i=function(){return null!=f&&clearInterval(f),e()},c=function(){return Offline.getOption("reconnect")&&"connecting"===d.state?(Offline.trigger("reconnect:failure"),d.state="waiting",b()):void 0},d.tryNow=h,e(),Offline.on("down",a),Offline.on("confirmed-down",c),Offline.on("up",i)}.call(this),function(){var a,b,c,d,e,f;if(!window.Offline)throw new Error("Requests module brought in without offline.js");c=[],f=!1,d=function(a){return Offline.trigger("requests:capture"),"down"!==Offline.state&&(f=!0),c.push(a)},e=function(a){var b,c,d,e,f,g,h,i,j;j=a.xhr,g=a.url,f=a.type,h=a.user,d=a.password,b=a.body,j.abort(),j.open(f,g,!0,h,d),e=j.headers;for(c in e)i=e[c],j.setRequestHeader(c,i);return j.mimeType&&j.overrideMimeType(j.mimeType),j.send(b)},a=function(){return c=[]},b=function(){var b,d,f,g,h,i;for(Offline.trigger("requests:flush"),h={},b=0,f=c.length;f>b;b++)g=c[b],i=g.url.replace(/(\?|&)_=[0-9]+/,function(a,b){return"?"===b?b:""}),h[g.type.toUpperCase()+" - "+i]=g;for(d in h)g=h[d],e(g);return a()},setTimeout(function(){return Offline.getOption("requests")!==!1?(Offline.on("confirmed-up",function(){return f?(f=!1,a()):void 0}),Offline.on("up",b),Offline.on("down",function(){return f=!1}),Offline.onXHR(function(a){var b,c,e,f,g;return g=a.xhr,e=a.async,g.offline!==!1&&(f=function(){return d(a)},c=g.send,g.send=function(b){return a.body=b,c.apply(g,arguments)},e)?null===g.onprogress?(g.addEventListener("error",f,!1),g.addEventListener("timeout",f,!1)):(b=g.onreadystatechange,g.onreadystatechange=function(){return 0===g.readyState?f():4===g.readyState&&(0===g.status||g.status>=12e3)&&f(),"function"==typeof b?b.apply(null,arguments):void 0}):void 0}),Offline.requests={flush:b,clear:a}):void 0},0)}.call(this),function(){var a,b,c,d,e;if(!Offline)throw new Error("Offline simulate brought in without offline.js");for(d=["up","down"],b=0,c=d.length;c>b;b++)e=d[b],(document.querySelector("script[data-simulate='"+e+"']")||localStorage.OFFLINE_SIMULATE===e)&&(null==Offline.options&&(Offline.options={}),null==(a=Offline.options).checks&&(a.checks={}),Offline.options.checks.active=e)}.call(this),function(){var a,b,c,d,e,f,g,h,i,j,k,l,m;if(!window.Offline)throw new Error("Offline UI brought in without offline.js");b='<div class="offline-ui"><div class="offline-ui-content"></div></div>',a='<a href class="offline-ui-retry"></a>',f=function(a){var b;return b=document.createElement("div"),b.innerHTML=a,b.children[0]},g=e=null,d=function(a){return k(a),g.className+=" "+a},k=function(a){return g.className=g.className.replace(new RegExp("(^| )"+a.split(" ").join("|")+"( |$)","gi")," ")},i={},h=function(a,b){return d(a),null!=i[a]&&clearTimeout(i[a]),i[a]=setTimeout(function(){return k(a),delete i[a]},1e3*b)},m=function(a){var b,c,d,e;d={day:86400,hour:3600,minute:60,second:1};for(c in d)if(b=d[c],a>=b)return e=Math.floor(a/b),[e,c];return["now",""]},l=function(){var c,h;return g=f(b),document.body.appendChild(g),null!=Offline.reconnect&&Offline.getOption("reconnect")&&(g.appendChild(f(a)),c=g.querySelector(".offline-ui-retry"),h=function(a){return a.preventDefault(),Offline.reconnect.tryNow()},null!=c.addEventListener?c.addEventListener("click",h,!1):c.attachEvent("click",h)),d("offline-ui-"+Offline.state),e=g.querySelector(".offline-ui-content")},j=function(){return l(),Offline.on("up",function(){return k("offline-ui-down"),d("offline-ui-up"),h("offline-ui-up-2s",2),h("offline-ui-up-5s",5)}),Offline.on("down",function(){return k("offline-ui-up"),d("offline-ui-down"),h("offline-ui-down-2s",2),h("offline-ui-down-5s",5)}),Offline.on("reconnect:connecting",function(){return d("offline-ui-connecting"),k("offline-ui-waiting")}),Offline.on("reconnect:tick",function(){var a,b,c;return d("offline-ui-waiting"),k("offline-ui-connecting"),a=m(Offline.reconnect.remaining),b=a[0],c=a[1],e.setAttribute("data-retry-in-value",b),e.setAttribute("data-retry-in-unit",c)}),Offline.on("reconnect:stopped",function(){return k("offline-ui-connecting offline-ui-waiting"),e.setAttribute("data-retry-in-value",null),e.setAttribute("data-retry-in-unit",null)}),Offline.on("reconnect:failure",function(){return h("offline-ui-reconnect-failed-2s",2),h("offline-ui-reconnect-failed-5s",5)}),Offline.on("reconnect:success",function(){return h("offline-ui-reconnect-succeeded-2s",2),h("offline-ui-reconnect-succeeded-5s",5)})},"complete"===document.readyState?j():null!=document.addEventListener?document.addEventListener("DOMContentLoaded",j,!1):(c=document.onreadystatechange,document.onreadystatechange=function(){return"complete"===document.readyState&&j(),"function"==typeof c?c.apply(null,arguments):void 0})}.call(this);
\ No newline at end of file
diff --git a/data/web/web.api.js b/data/web/web.api.js
index a32ca3379..842f258bf 100644
--- a/data/web/web.api.js
+++ b/data/web/web.api.js
@@ -16,7 +16,20 @@ define(function(require, exports, module) {
var TSCORE = require("tscore");
var TSPOSTIO = require("tspostioapi");
- require("webdavlib/webdavlib");
+ require("webdav");
+ require("offlinelib");
+
+ // Offline plugin settings
+
+ Offline.options = {
+ checkOnLoad: false,
+ interceptRequests: true,
+ reconnect: {
+ initialDelay: 3
+ },
+ requests: true,
+ game: false
+ };
var davClient;
//exact copy of getAjax with timeout added
@@ -30,7 +43,7 @@ define(function(require, exports, module) {
ajax.onreadystatechange = function() {
nl.sara.webdav.Client.ajaxHandler(ajax, callback);
};
-
+
ajax.ontimeout = function() {
ajax.readyState = 4;
ajax.ajax.status = -1;
@@ -160,9 +173,9 @@ define(function(require, exports, module) {
lmdt = undefined;
//console.log(dirList[entry]._namespaces["DAV:"]);
if (typeof dirList[entry]._namespaces["DAV:"].getcontentlength === 'undefined' ||
- dirList[entry]._namespaces["DAV:"].getcontentlength._xmlvalue.length === 0 ||
- (dirList[entry]._namespaces["DAV:"].resourcetype._xmlvalue.length === 1 &&
- dirList[entry]._namespaces["DAV:"].resourcetype._xmlvalue[0].localName === 'collection')
+ dirList[entry]._namespaces["DAV:"].getcontentlength._xmlvalue.length === 0 ||
+ (dirList[entry]._namespaces["DAV:"].resourcetype._xmlvalue.length === 1 &&
+ dirList[entry]._namespaces["DAV:"].resourcetype._xmlvalue[0].localName === 'collection')
) {
isDir = true;
} else {
@@ -188,9 +201,9 @@ define(function(require, exports, module) {
dirPath = encodeURI(dirPath);
davClient.propfind(
- dirPath,
- davSuccess,
- 1 //1 , davClient.INFINITY
+ dirPath,
+ davSuccess,
+ 1 //1 , davClient.INFINITY
);
});
}
@@ -285,17 +298,17 @@ define(function(require, exports, module) {
}
if (isNewFile || overWrite === true || mode === "text") {
davClient.put(
- encodeURI(filePath),
- function(status, data, headers) {
- console.log("Creating File Status/Content/Headers: " + status + " / " + data + " / " + headers);
- if (checkStatusCode(status)) {
- resolve(isNewFile);
- } else {
- reject("saveFilePromise: " + filePath + " failed " + status);
- }
- },
- content,
- 'application/octet-stream'
+ encodeURI(filePath),
+ function(status, data, headers) {
+ console.log("Creating File Status/Content/Headers: " + status + " / " + data + " / " + headers);
+ if (checkStatusCode(status)) {
+ resolve(isNewFile);
+ } else {
+ reject("saveFilePromise: " + filePath + " failed " + status);
+ }
+ },
+ content,
+ 'application/octet-stream'
);
} else {
reject("File Already Exists.");
@@ -305,15 +318,15 @@ define(function(require, exports, module) {
}
/**
- * Persists a given text content to a specified filepath
- * @name saveTextFilePromise
- * @method
- * @memberof IOAPI.web
- * @param {string} filePath - the full path of the file which will be saved
- * @param {string} content - content that will be saved
- * @param {string} overWrite - if true existing file path will be overwritten
- * @returns {Promise.<Success, Error>}
- */
+ * Persists a given text content to a specified filepath
+ * @name saveTextFilePromise
+ * @method
+ * @memberof IOAPI.web
+ * @param {string} filePath - the full path of the file which will be saved
+ * @param {string} content - content that will be saved
+ * @param {string} overWrite - if true existing file path will be overwritten
+ * @returns {Promise.<Success, Error>}
+ */
function saveTextFilePromise(filePath, content, overWrite) {
console.log("Saving text file: " + filePath);
return saveFilePromise(filePath, content, overWrite, "text");
@@ -346,15 +359,15 @@ define(function(require, exports, module) {
console.log("Creating directory: " + dirPath);
return new Promise(function(resolve, reject) {
davClient.mkcol(
- encodeURI(dirPath),
- function(status, data, headers) {
- console.log("Directory Creation Status/Content/Headers: " + status + " / " + data + " / " + headers);
- if (checkStatusCode(status)) {
- resolve(dirPath);
- } else {
- reject("createDirectory " + dirPath + " failed " + status);
- }
- }
+ encodeURI(dirPath),
+ function(status, data, headers) {
+ console.log("Directory Creation Status/Content/Headers: " + status + " / " + data + " / " + headers);
+ if (checkStatusCode(status)) {
+ resolve(dirPath);
+ } else {
+ reject("createDirectory " + dirPath + " failed " + status);
+ }
+ }
);
});
}
@@ -377,17 +390,17 @@ define(function(require, exports, module) {
reject($.i18n.t("ns.common:fileTheSame"));
} else {
davClient.copy(
- encodeURI(filePath),
- function(status, data, headers) {
- console.log("Copy File Status/Content/Headers: " + status + " / " + data + " / " + headers);
- if (checkStatusCode(status)) {
- resolve(filePath, newFilePath);
- } else {
- reject("copyFile " + filePath + " failed " + status);
- }
- },
- encodeURI(newFilePath),
- davClient.FAIL_ON_OVERWRITE
+ encodeURI(filePath),
+ function(status, data, headers) {
+ console.log("Copy File Status/Content/Headers: " + status + " / " + data + " / " + headers);
+ if (checkStatusCode(status)) {
+ resolve(filePath, newFilePath);
+ } else {
+ reject("copyFile " + filePath + " failed " + status);
+ }
+ },
+ encodeURI(newFilePath),
+ davClient.FAIL_ON_OVERWRITE
);
}
});
@@ -411,17 +424,17 @@ define(function(require, exports, module) {
reject($.i18n.t("ns.common:fileTheSame"));
} else {
davClient.move(
- encodeURI(filePath),
- function(status, data, headers) {
- console.log("Rename File Status/Content/Headers: " + status + " / " + data + " / " + headers);
- if (checkStatusCode(status)) {
- resolve([filePath, newFilePath]);
- } else {
- reject("rename: " + filePath + " failed " + status);
- }
- },
- encodeURI(newFilePath),
- davClient.FAIL_ON_OVERWRITE
+ encodeURI(filePath),
+ function(status, data, headers) {
+ console.log("Rename File Status/Content/Headers: " + status + " / " + data + " / " + headers);
+ if (checkStatusCode(status)) {
+ resolve([filePath, newFilePath]);
+ } else {
+ reject("rename: " + filePath + " failed " + status);
+ }
+ },
+ encodeURI(newFilePath),
+ davClient.FAIL_ON_OVERWRITE
);
}
});
@@ -446,17 +459,17 @@ define(function(require, exports, module) {
reject($.i18n.t("ns.common:fileTheSame"));
} else {
davClient.move(
- encodeURI(dirPath),
- function(status, data, headers) {
- console.log("Rename Directory Status/Content/Headers: " + status + " / " + data + " / " + headers);
- if (checkStatusCode(status)) {
- resolve(newDirPath);
- } else {
- reject("rename: " + dirPath + " failed " + status);
- }
- },
- encodeURI(newDirPath),
- davClient.FAIL_ON_OVERWRITE
+ encodeURI(dirPath),
+ function(status, data, headers) {
+ console.log("Rename Directory Status/Content/Headers: " + status + " / " + data + " / " + headers);
+ if (checkStatusCode(status)) {
+ resolve(newDirPath);
+ } else {
+ reject("rename: " + dirPath + " failed " + status);
+ }
+ },
+ encodeURI(newDirPath),
+ davClient.FAIL_ON_OVERWRITE
);
}
});
@@ -486,15 +499,15 @@ define(function(require, exports, module) {
function deleteDirectoryPromise(path) {
return new Promise(function(resolve, reject) {
davClient.remove(
- encodeURI(path),
- function(status, data, headers) {
- console.log("Directory/File Deletion Status/Content/Headers: " + status + " / " + data + " / " + headers);
- if (checkStatusCode(status)) {
- resolve(path);
- } else {
- reject("delete " + path + " failed " + status);
- }
- }
+ encodeURI(path),
+ function(status, data, headers) {
+ console.log("Directory/File Deletion Status/Content/Headers: " + status + " / " + data + " / " + headers);
+ if (checkStatusCode(status)) {
+ resolve(path);
+ } else {
+ reject("delete " + path + " failed " + status);
+ }
+ }
);
});
}