summaryrefslogtreecommitdiff
path: root/js/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/index.js')
-rw-r--r--js/index.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/js/index.js b/js/index.js
index 503d843..9e618a0 100644
--- a/js/index.js
+++ b/js/index.js
@@ -71,17 +71,21 @@ function addSocialButton(vdate, msg, $div){
var today = new Date();
if(vdate >= today){
+ var datestr = vdate.getDate() + "." + vdate.getMonth() + ".";
+
var btn = $('<button />')
.text('Teile die Vertretungen')
.click(function(){
- window.plugins.socialsharing.share('Hey Leute! Laut der WvS-VPlan-App gibt es folgende Vertretungen am ' + vdate.toString() + ' : ' + msg);
- console.log('Vertretungsplan geteilt: ' + vdate.toString());
- });
+ window.plugins.socialsharing.share('Hey Leute! Laut der WvS-VPlan-App gibt es folgende Vertretungen am ' + datestr + ' : ' + msg);
+ console.log('Vertretungsplan geteilt: ' + datestr);
+ })
+
+ .addClass('ui-btn ui-corner-all ui-btn-inline');
$div.prepend(btn);
- console.log('Teilen-Button hinzugefügt: ' + vdate.toString() + msg);
+ console.log('Teilen-Button hinzugefügt: ' + datestr + msg);
}
}
@@ -204,7 +208,6 @@ function renderPage($div, pdf, pageNumber, callback){
if(username !== null){
var klasse = username.match(/(\w+)_.*/)[1];
- klasse = "9BC"; //TODO DEBUG
if(klasse !== null){
vertretungen.forEach(function(vertretung){