summaryrefslogtreecommitdiff
path: root/js/index.js
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2014-03-28 17:31:40 +0100
committerschneefux <schneefux+commit@schneefux.xyz>2016-08-15 19:46:46 +0200
commitc1b413b4fcbc15436d667a436cd53fe066fe2414 (patch)
tree703609d3ed092c729058a358a0e54e01e7500413 /js/index.js
parent10e5a9c69121b2a6194ccb57aea14901ad82aab8 (diff)
downloadwvs-vplan-c1b413b4fcbc15436d667a436cd53fe066fe2414.tar.gz
wvs-vplan-c1b413b4fcbc15436d667a436cd53fe066fe2414.zip
ersetze location.href durch changePage
Diffstat (limited to 'js/index.js')
-rw-r--r--js/index.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/js/index.js b/js/index.js
index b75f45a..53fd366 100644
--- a/js/index.js
+++ b/js/index.js
@@ -96,7 +96,7 @@ function download_pdf(link, id){
$('#pdf-' + id).attr('data-plan-url', theFile.toURL());
if(location.href.indexOf("page-") == -1){
- location.href = "#page-vplan-" + id;
+ $.mobile.changePage("#page-vplan-" + id);
}
},
function(error){
@@ -144,7 +144,7 @@ function get_overview(link){
var resultl = result.match(plans_re).length;
if(resultl == 0){
- location.href = "#loginpopup";
+ $.mobile.changePage("#loginpopup");
$("#loginform").removeClass('ui-disabled');
return;
}
@@ -157,14 +157,14 @@ function get_overview(link){
if(j + 1 < resultl){
$('#page-vplan-' + j).on('swipeleft', function(event){
console.log("Wisch links");
- location.href = "#page-vplan-" + (parseInt($('.ui-page-active').attr('id').match(/\d+/)[0]) + 1);
+ $.mobile.changePage("#page-vplan-" + (parseInt($('.ui-page-active').attr('id').match(/\d+/)[0]) + 1));
});
}
if(j - 1 >= 0){
$('#page-vplan-' + j).on('swiperight', function(event){
console.log("Wisch rechts");
- location.href = "#page-vplan-" + (parseInt($('.ui-page-active').attr('id').match(/\d+/)[0]) - 1);
+ $.mobile.changePage("#page-vplan-" + (parseInt($('.ui-page-active').attr('id').match(/\d+/)[0]) - 1));
});
}