summaryrefslogtreecommitdiff
path: root/js/index.js
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2014-04-24 16:00:54 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2016-08-15 19:46:56 +0200
commit00bf4f0179535f2fa501532b818932cfdb953094 (patch)
tree9596310f2d4badff5fe801ff95497f29e7588354 /js/index.js
parent5a3b389ba418890bc47da7d3b3d7a8fbb4c4d9d5 (diff)
downloadwvs-vplan-00bf4f0179535f2fa501532b818932cfdb953094.tar.gz
wvs-vplan-00bf4f0179535f2fa501532b818932cfdb953094.zip
entferne Debug-Code des letzten Commits; verbessere Layout des Share-Buttons; verbessere Nachricht des Shares
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){