From 74c5e46910fa66da0e8f11ed9ec1f8e0df3b63d7 Mon Sep 17 00:00:00 2001 From: schneefux Date: Wed, 11 Jun 2014 16:02:42 +0200 Subject: verschiebe Dateien --- js/SocialSharing.js | 591 - js/index.js | 1016 - js/jqm-themehack.js | 26 - js/jquery-2.1.0.min.js | 4 - js/jquery.mobile-1.4.2.min.js | 10 - js/kuerzel.js | 111 - js/moment-with-langs.min.js | 9 - js/pdf.js | 6926 ------- js/pdf.worker.js | 42765 ---------------------------------------- js/piwik.js | 31 - 10 files changed, 51489 deletions(-) delete mode 100644 js/SocialSharing.js delete mode 100644 js/index.js delete mode 100644 js/jqm-themehack.js delete mode 100644 js/jquery-2.1.0.min.js delete mode 100644 js/jquery.mobile-1.4.2.min.js delete mode 100644 js/kuerzel.js delete mode 100644 js/moment-with-langs.min.js delete mode 100644 js/pdf.js delete mode 100644 js/pdf.worker.js delete mode 100644 js/piwik.js (limited to 'js') diff --git a/js/SocialSharing.js b/js/SocialSharing.js deleted file mode 100644 index 71005d6..0000000 --- a/js/SocialSharing.js +++ /dev/null @@ -1,591 +0,0 @@ - - - - - - - - - - - - - SocialSharing-PhoneGap-Plugin/www/SocialSharing.js at master · EddyVerbruggen/SocialSharing-PhoneGap-Plugin · GitHub - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Skip to content -
- - - - - - - -
-
- - - - - - - -
- - -
- -
- - - -
- - - -
- - This repository - - - -
- - - - - - - - -
-
- -
-
- - - -
-
-
- -
-
-
- - - - -

- public - - /SocialSharing-PhoneGap-Plugin - - - Octocat-spinner-32 - - -

-
-
- -
-
-
- - - - -
- - - - -
-

HTTPS clone URL

-
- - - -
-
- - - -
-

Subversion checkout URL

-
- - - -
-
- - -

You can clone with - HTTPS - or Subversion. - - - - - -

- - - - - - Download ZIP - -
-
- -
- - - - - - - - - -
- - -
- - - branch: - master - - - -
- - -
- - -
- Eddy Verbruggen - - - - - - -
- -
-
-
-
- - executable file - - 47 lines (36 sloc) - - 2.018 kb -
- -
-
- - - - - -
- 1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 - -
function SocialSharing() {
}

SocialSharing.prototype.available = function (callback) {
  cordova.exec(function (avail) {
    callback(avail ? true : false);
  }, null, "SocialSharing", "available", []);
};

SocialSharing.prototype.share = function (message, subject, file, url, successCallback, errorCallback) {
  cordova.exec(successCallback, errorCallback, "SocialSharing", "share", [message, subject, file, url]);
};

SocialSharing.prototype.shareViaTwitter = function (message, image, url, successCallback, errorCallback) {
  cordova.exec(successCallback, errorCallback, "SocialSharing", "shareViaTwitter", [message, null, image, url]);
};

SocialSharing.prototype.shareViaFacebook = function (message, image, url, successCallback, errorCallback) {
  cordova.exec(successCallback, errorCallback, "SocialSharing", "shareViaFacebook", [message, null, image, url]);
};

SocialSharing.prototype.shareViaWhatsApp = function (message, image, url, successCallback, errorCallback) {
  cordova.exec(successCallback, errorCallback, "SocialSharing", "shareViaWhatsApp", [message, null, image, url]);
};

SocialSharing.prototype.shareViaSMS = function (message, phonenumbers, successCallback, errorCallback) {
  cordova.exec(successCallback, errorCallback, "SocialSharing", "shareViaSMS", [message, phonenumbers]);
};

SocialSharing.prototype.canShareVia = function (via, message, subject, image, url, successCallback, errorCallback) {
  cordova.exec(successCallback, errorCallback, "SocialSharing", "canShareVia", [message, subject, image, url, via]);
};

SocialSharing.prototype.shareVia = function (via, message, subject, image, url, successCallback, errorCallback) {
  cordova.exec(successCallback, errorCallback, "SocialSharing", "shareVia", [message, subject, image, url, via]);
};

SocialSharing.install = function () {
  if (!window.plugins) {
    window.plugins = {};
  }

  window.plugins.socialsharing = new SocialSharing();
  return window.plugins.socialsharing;
};

cordova.addConstructor(SocialSharing.install);
-
- -
-
- - - - -
- -
- -
-
- - -
- -
- -
- - -
-
-
- -
-
- -
- - - -
- - - Something went wrong with that request. Please try again. -
- - - - diff --git a/js/index.js b/js/index.js deleted file mode 100644 index ddedc8f..0000000 --- a/js/index.js +++ /dev/null @@ -1,1016 +0,0 @@ -/* - * Copyright (C) 2014 - * This file is part of WvS-VPlan. - * - * WvS-VPlan is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . -*/ - -version = '0.9.5_rc4'; - -function istPremium(benutzer, key){ // Supersicherer Keygenerator :P Inspiriert von kryptochef.de - sollKey = ''; - - switch(benutzer.length % 10){ // Anzahl Zeichen ausschreiben - case 0: sollKey = 'NULL'; break; - case 1: sollKey = 'EINS'; break; - case 2: sollKey = 'ZWEI'; break; - case 3: sollKey = 'DREI'; break; - case 4: sollKey = 'VIER'; break; - case 5: sollKey = 'FUNF'; break; - case 6: sollKey = 'SECHS'; break; - case 7: sollKey = 'SIEBEN'; break; - case 8: sollKey = 'ACHT'; break; - case 9: sollKey = 'NEUN'; break; - } - - sollKey = sollKey.replace(/[A-Z]/g, function(s){ - return String.fromCharCode(s.charCodeAt(0) + (s < 'N' ? 13 : -13)); // ROT13 - }); - - sollKey = sollKey + Math.round(benutzer.length * 3.14); // Eine Zahl anfügen - - if(sollKey === key){ - return true; - }else{ - return false; - } -} - -function updateCheck(){ - var request = $.ajax({ - url: 'http://klimaag.***REMOVED***/app/www/knockout.html', - cache: false - }); - - request.done(function(resultHtml){ - var appStatus = $('li[id="' + version + '"]', resultHtml).text().trim(); - var loginOk = true; - - console.log('Appstatus: ' + appStatus); - - switch(appStatus){ - case 'ok': - break; - case 'hangon': - $('#versioninfo').text('Es besteht ein Problem mit der aktuellen Version. Ein Update ist in Arbeit.'); - break; - case 'info': - $('#versioninfo').text('Ein Update ist im Appstore verfügbar.').show(); - break; - case 'warn': - $('#versioninfo').text('Ein wichtiges Update ist im Appstore verfügbar.').show(); - break; - case 'force': - $('#versioninfo').text('Ein wichtiges Update ist im Appstore verfügbar. Du musst es installieren, um dich weiterhin einloggen zu können.').show(); - $('#loginsubmit').prop('disabled', true); - loginOk = false; - break; - default: - $('#versioninfo').text('Diese Appversion wird nicht mehr unterstützt, bitte aktualisiere auf die neueste Version aus dem Appstore.').show(); - $('#loginsubmit').prop('disabled', true); - loginOk = false; - } - - if(loginOk === true){ - tryLogin(); // nur wenn alles in Ordnung ist, einloggen lassen - } - }); - - request.fail(fail); -} - -function track(what){ - _paq.push(['setCustomUrl', what]); - _paq.push(['trackPageView', what]); -} - -function trackPlan(vdate){ - track('plan/' + vdate.format('YYYY/MM/DD')); -} - -$('#settingspanel').change(function(){ - localStorage.setItem('dntrack', $('#dntflip').val()); - localStorage.setItem('classes', $('#addclass').val().toUpperCase()); - localStorage.setItem('notifyday', $('#notifydayflip').val()); - localStorage.setItem('notifynull', $('#notifynullflip').val()); - localStorage.setItem('notifydate', $('#notifydate').val()); - localStorage.setItem('apptheme', $('#themeselect').val()); -}); - -document.addEventListener('offline', function(){ - $('#loginsubmit').prop('disabled', true); - $('#error_noconn').show('fast'); -}, false); - -document.addEventListener('online', function(){ - $('#loginsubmit').prop('disabled', false); - $('#error_noconn').hide('fast'); -}, false); - -$('#mainpage').on('swiperight', function(){ - $('#settingspanel').panel('open'); -}); - -var _paq = _paq || []; -$('#mainpage').on('pagebeforeshow', function(){ - /* Versionsnummer zeigen */ - $('.version').text(version); - - /* Sprache setzen */ - moment.lang('de'); - - /* Nutzungsstatistiken */ - _paq.push(['setTrackerUrl', 'http://klimaag.***REMOVED***/piwik/piwik.php']); // TODO Https wäre schön. - _paq.push(['setSiteId', 5]); - - console.log('Piwik initialisiert'); - - /* gespeicherte Daten laden */ - var dntrack = localStorage.getItem('dntrack'); - var additionalClasses = localStorage.getItem('classes'); - var notifyDay = localStorage.getItem('notifyday'); - var notifyNull = localStorage.getItem('notifynull'); - var notifyDate = localStorage.getItem('notifydate'); - var premium = localStorage.getItem('premium'); - var easteregg = localStorage.getItem('easteregg'); - var apptheme = localStorage.getItem('apptheme'); - - if(dntrack === null || dntrack.length === 0){ - dntrack = 'false'; - } - $('#dntflip').val(dntrack).slider('refresh'); - - if(additionalClasses === null || additionalClasses.length === 0){ - additionalClasses = ''; - } - $('#addclass').val(additionalClasses).textinput('refresh'); - - if(notifyDay === null || notifyDay.length === 0){ - notifyDay = 0; - } - $('#notifydayflip').val(notifyDay).slider('refresh'); - - if(notifyNull === null || notifyNull.length === 0){ - notifyNull = 0; - } - $('#notifynullflip').val(notifyNull).slider('refresh'); - - if(notifyDate === null || notifyDate.length === 0){ - notifyDate = '18:00'; - } - $('#notifydate').val(notifyDate).textinput('refresh'); - - if(premium === null || premium.length === 0){ - premium = 'false'; - } - if(premium === 'true'){ - $('#themeselect').append('').selectmenu('refresh'); - console.log('Premium geladen'); - } - - if(easteregg === null || easteregg.length === 0){ - easteregg = 'false'; - } - if(easteregg === 'true'){ - $('#themeselect').append('').selectmenu('refresh'); - console.log('Easteregg geladen'); - } - - if(apptheme === null || apptheme.length === 0){ - apptheme = 'a'; - } - $('#themeselect').val(apptheme).selectmenu('refresh'); - - /* Piwik initialisieren */ - _paq.push(['setDoNotTrack', dntrack]); -}); - -// Login-Popup beim Start -document.addEventListener('deviceready', function(){ - /* iOS fix */ - if(window.device && parseFloat(window.device.version) >= 7.0) { - $('body').addClass('iOS7'); - } - - /* los geht's */ - _paq.push(['setCustomVariable', 1, 'Modell', device.model, 'visit']); - _paq.push(['setCustomVariable', 2, 'Version', device.version, 'visit']); - _paq.push(['setCustomVariable', 3, 'Appversion', version, 'visit']); - track('load'); - - fillForm(); - - if(navigator.connection.type !== Connection.NONE){ // falls Netz da ist - updateCheck(); // checkt ob aktuellste Version und loggt ein - } - - window.plugin.notification.local.cancelAll(); // alle Benachrichtigungen canceln, werden während des Renderings neu gesetzt - load(); -}, false); - -/* der Loader wird nur angezeigt, wenn das Popup zu ist */ -$('#loginpopup').on('popupafteropen', function(){ - $.mobile.loading('hide'); -}); - -/* füllt die Loginform mit gespeicherten Werten */ -function fillForm(){ - var username = localStorage.getItem('username'); - - if(username !== null && username.length !== 0){ - $('#username').val(username); - } - - var password = localStorage.getItem('password'); - - if(password !== null && password.length !== 0){ - $('#password').val(password); - } -} - -/* benachrichtigt den Benutzer an vdate mit msg */ -function addNotification(vdate, msg, $div){ - var title = 'Vertretungen für ' + vdate.format('dddd'); - var ndate = vdate.subtract('days', 1).add('days', $('#notifydayflip').val()); // Bei Bedarf einen Tag vorher - - if(moment().isBefore(ndate)){ - window.plugin.notification.local.add({ - date: ndate.toDate(), - message: msg, - title: title, - autoCancel: true, - json: JSON.stringify({id: $div.attr('id')}) - }); - - window.plugin.notification.local.onclick = function(id, state, json){ - var div = JSON.parse(json).id; - location.href = '#' + div; // TODO hoffentlich funktioniert das auch immer... - }; - - console.log('Benachrichtigung hinzugefügt: ' + ndate.format('DD.MM. HH:mm') + '; ' + msg); - } -} - -/* zeigt einen Button an, mit dem die Vertretung geteilt werden kann */ -function addSocialButton(vdate, msg, $div){ - if(moment().isBefore(vdate)){ - var datestr = vdate.format('dddd'); - var sharebtns = $('button', $div); - - if(sharebtns.length === 0){ - var btn = $('