Browse Source

adding "reload on pulltorefresh" function via pulltorefresh submodule

pull/154/head
Simon Waldherr 12 years ago
parent
commit
681195248b
  1. 28
      dist/ratchet.css
  2. 37
      dist/ratchet.js
  3. 29
      lib/css/pulltorefresh.css
  4. 37
      lib/js/pulltorefresh.js
  5. 2
      submodules/pulltorefresh
  6. 2
      test/app/checkout.html
  7. 2
      test/app/index.html

28
dist/ratchet.css vendored

@ -1297,6 +1297,7 @@ select {
height: auto;
-webkit-overflow-scrolling: touch;
position: absolute;
-webkit-transition: all 0.1s linear 0s;
}
.scrollable .wrap {
@ -1307,21 +1308,24 @@ select {
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
-webkit-transition: all 0.1s linear 0s;
}
.wrap {
position: relative;
-webkit-transition: all 0.1s linear 0s;
}
.ptr_box {
position: absolute;
top: -55px;
top: 0px;
line-height: 55px;
display: block;
text-align: center;
height: 55px;
height: 0px;
left: 0px;
right: 0px;
overflow: hidden;
}
.ptr_container {
@ -1329,19 +1333,22 @@ select {
width: 230px;
margin: auto;
height: 40px;
top: 15px;
top: 10px;
-webkit-transition: all 0.1s linear 0s;
}
.ptr_image {
margin: 5px;
margin-top: 20px;
margin-left: 10px;
margin-right: 10px;
height: 30px;
width: 30px;
width: 40px;
zoom: 0.5;
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAACACAYAAAD03Gy6AAALsUlEQVR4Ae2dDZBWVRnH34Xlo2XTtDDCKRYtA6KdZphmw4ixDRZIFlAUiMEETMQwZhiUqCQnAvGTnAwQLYQUEDQEt4AEoXEsXCowp2EYhg8/po1VQqBkl49d+v23vQTvfrz3+5574Jn5z91z33Oe83+e5733nvOcc9/NZOKRz9HNTjBA3ZWUlGTOnDlzEfigjRwSsVyD/nXgS2AluA5clEYP5EfsiT7ol/OvbOznExzX19bWjtu3b9+aurq6hqug8bNAB11RRUVFmY4dOwbSY1Pjr2PMYXAmG3l5eXVt27adDDJhoE2b/13IlZWVqbutRXUFjMDpy0EB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7qP3QZAhlUArZBFtk9SnTQj9ZybBJTVtE68BEDGvwoGgkh2CquDLFH+fgx4Kuu8NUWvAZDhSl2Ugt0qRChH0T0MKFlorfgJgJyxF2gC9BcVIpCD6FR+Smu4VovfAMgpVUBp7FBeVpPCRlFeR8GtdE7YfAwSAPlFC9zaXLpGhRDkTXTo9rYrBF2pUBE0ADKyBowCS1QIIH+k7QDwdgAdqWsaRgBktN4avw3MV8GHrKfNEPC+j7apbhJWABwnTOePWU7B5XEF9W4Aqc/ruLT3vGphB0DK5wBtbXGTLlhIPe3EOAkuSIkiAHLkAnALaM2xc/l8CnATKKrZKVoTjkqWo/gIUOq48NxOevbseffixYsf1f9e1DJeGCI9PXr0CEOVdTq+ikXVQJ7WavmEkpKS1K3d+lnvddMmqlsQfj4rGl5eDw6A8eBpcFEaPfBfsmYf8GNO7mUAAAAASUVORK5CYII=');
-webkit-background-size: 100% 100%;
-moz-background-size: 100% 100%;
background-size: 100% 100%;
-webkit-background-size: 50% 100%;
-moz-background-size: 50% 100%;
background-size: 50% 100%;
background-repeat: repeat-x;
display: inline-block;
background-position: left center;
@ -1352,7 +1359,14 @@ select {
}
.ptr_image.loading {
margin-left: 15px;
margin-right: 15px;
height: 30px;
width: 30px;
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAANOklEQVR4Ae2dDbAWVRnHX6Ar14s3RQUtv64IJnox8YMRpcCxkqkgU0Sb1GkgknRstBybIUVtkplI1HTSyUwr0wYs+hCvJldJSSIkqRHB/BZF0/iqBG8K3X5/epeWl7vvnrPv7r577nuemT+77+45z/Oc5/z37Plabp/u7u6Sl8aNQN/GLbovuSLgCdDgPPAE8ARo8Ag0ePF9C+AJ0OARaPDi+xbAE6DBI9DgxX+fSflnzZpVWrFiRam5udkkuU9DBLq6ukojR44szZgxo9DxMCKAKr+zs7M0YMCAQhcG5waCIeD9YDgYBvYBrUDsDRi8lfP14B3wJngD/BW8CtaCTaAm2bx5c03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P7HQB26RpEfUlAtE6cmNsvBqRlNQdHn0PEgaKTK1zt/Rgqx20mFiwSYSgnuAhqrN4qo6f8KWJd2gV0jwAQC8H2gjl8jieZfHsiiwC4R4FACcAdotMr/I2W+IovKl06XCHAV/qa5ipZVTNPUqyZ/CogdCyc16goBhlLAs5IW0tF8eu9fAFZl6b8rBBhPEFqyDEQBdavFm5+1X64Q4CNZB6Jg+jXevzYPn1whwB55BKMgNn6BH5rajl+lS8FhVwiwOYWyuqDitzh5Lgg+w8vcZ1cI8Hjmkai/gYdxYTLIrMffUxFdIcAjOL+1pwL0kmv6Euh0EHx8k1uxXCGAlkBTXQTJLcLxhn5EkrNBait88Sb/n8IVAmhMfA3oTa3ANspzJZgCcnvnY2sncYUAclpToiJBbxDtq9RT/y2QS28/KmguEUBl0NhYewBclk6cHwM03Ku7uEYAPS36pOr2ukcumQOzyabdS88my55+LtcIoAjofTkNfB3kOmTCXlIJmnz5bPVfuCQ1aJrPRQIEZdPT9AmwNLhQ0ONc/DoRzCuify4TQPFcDE4B2i3zAiiSyDc19+eAF4vkWNgX1wmgsug1cDM4AVwEngD1EjXvHeAzYCy4HxRaXN4VXBlYfS1zC9CWsZPAJPAxcCTIUjSefxJoNu8+8BRwRnoTAYKgq0LU/Aq7g6OACKEncig4GOwFkopm7J4Br4IFQJX/Z+CkFJ4A+iyMD1OTBvcdMi4v4yaOuwERYDBoAweBQUC/+4EBYE+g1kREUpO+AbwBVoH1YB0QAQotipnJJ3WFJ0B7e3upo6Njx4epa9euLc2dO7fU1NSUpAI0hHy+jCVJFLiSR5/UDRw4MNZdo6+DY7X4BM5GoDeMApwNfhEc9wQoQi3U0QdPgDoGvwimPQGKUAt19METoI7BL4JpT4Ai1EIdffAEqGPwi2DaE6AItVBHH/4LblUKSJmR62QAAAAASUVORK5CYII=');
-webkit-background-size: 100% 100%;
-moz-background-size: 100% 100%;
background-size: 100% 100%;
background-repeat: no-repeat;
-webkit-animation-name: rotate;
-webkit-animation-duration:0.5s;

37
dist/ratchet.js vendored

@ -764,7 +764,7 @@
}();
/* ----------------------------------
* PullToRefresh v0.003
* PullToRefresh v0.004
* By Simon Waldherr
* https://github.com/SimonWaldherr/PullToRefresh
* Licensed under The MIT License
@ -886,31 +886,18 @@ function ptr_init() {
var top = ptr_element.scrollTop;
var ptr = ptr_element.getElementsByClassName('ptr_box')[0];
var scrolldistance = Math.abs(parseInt(ptr_element.scrollTop));
if((ptr_wrapelement.className.indexOf(' active') === -1)&&(!ptr_wrapelement.getElementsByClassName('ptr_image')[0].className.match('loading'))) {
if(ptr_element.scrollTop < -25) {
rotate = (top < -40) ? -90 : 130 + (top*12+270);
}
if(ptr_element.scrollTop < 0) {
ptr.style.opacity = 1.0;
ptr_wrapelement.getElementsByClassName('ptr_image')[0].style['-webkit-transform'] = "scale(1) rotate("+rotate+"deg)";
ptr.style.height = (scrolldistance < 55) ? scrolldistance+'px' : '55px';
ptr.style.top = (scrolldistance < 55) ? '-'+scrolldistance+'px' : '-55px';
if((ptr_element.scrollTop < -30)&&(ptr_element.scrollTop > -45)) {
ptr_wrapelement.getElementsByClassName('ptr_image')[0].style['width'] = "40px";
ptr_wrapelement.getElementsByClassName('ptr_image')[0].style['margin-left'] = "10px";
ptr_wrapelement.getElementsByClassName('ptr_image')[0].style['margin-right'] = "10px";
ptr_wrapelement.getElementsByClassName('ptr_image')[0].style['background-size'] = "50% 100%";
} else if(ptr_element.scrollTop >= -30) {
ptr_wrapelement.getElementsByClassName('ptr_image')[0].style['width'] = "30px";
ptr_wrapelement.getElementsByClassName('ptr_image')[0].style['margin-left'] = "15px";
ptr_wrapelement.getElementsByClassName('ptr_image')[0].style['margin-right'] = "15px";
ptr_wrapelement.getElementsByClassName('ptr_image')[0].style['background-size'] = "100% 100%";
} else {
ptr_wrapelement.getElementsByClassName('ptr_image')[0].style['width'] = "60px";
ptr_wrapelement.getElementsByClassName('ptr_image')[0].style['margin-left'] = "0px";
ptr_wrapelement.getElementsByClassName('ptr_image')[0].style['margin-right'] = "0px";
ptr_wrapelement.getElementsByClassName('ptr_image')[0].style['background-size'] = "34% 100%";
}
ptr_wrapelement.getElementsByClassName('ptr_image')[0].style['-webkit-transform'] = "scale(1) rotate("+rotate+"deg)";
}
if(ptr_element.scrollTop < -51) {
@ -918,10 +905,11 @@ function ptr_init() {
ptr_wrapelement.className += ' active';
ptr_wrapelement.getElementsByClassName('ptr_text')[0].innerHTML = 'Loading ...';
ptr_wrapelement.getElementsByClassName('ptr_image')[0].className += ' loading';
ptr_wrapelement.getElementsByClassName('ptr_image')[0].style['width'] = "30px";
ptr_wrapelement.getElementsByClassName('ptr_image')[0].style['margin-left'] = "15px";
ptr_wrapelement.getElementsByClassName('ptr_image')[0].style['margin-right'] = "15px";
ptr_wrapelement.getElementsByClassName('ptr_image')[0].style['background-size'] = "100% 100%";
if(parent.getAttribute('data-url') == 'reload') {
window.location.reload(true);
return false;
}
var ptr_element = parent;
var ptr_wrapelement = ptr_element.getElementsByClassName('wrap')[0];
@ -997,6 +985,9 @@ function ptr_init() {
if(ptr_wrapelement.getElementsByClassName('ptr_image')[0].className.match('loading')) {
ptr_wrapelement.className = ptr_wrapelement.className.replace(' active', '');
ptr_wrapelement.style.top = '51px';
} else {
ptr.style.height = '0px';
ptr.style.top = '0px';
}
}
}

29
lib/css/pulltorefresh.css

@ -6,7 +6,7 @@
height: auto;
-webkit-overflow-scrolling: touch;
position: absolute;
bottom: 50px;
-webkit-transition: all 0.1s linear 0s;
}
.scrollable .wrap {
@ -17,21 +17,24 @@
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
-webkit-transition: all 0.1s linear 0s;
}
.wrap {
position: relative;
-webkit-transition: all 0.1s linear 0s;
}
.ptr_box {
position: absolute;
top: -55px;
top: 0px;
line-height: 55px;
display: block;
text-align: center;
height: 55px;
height: 0px;
left: 0px;
right: 0px;
overflow: hidden;
}
.ptr_container {
@ -39,19 +42,22 @@
width: 230px;
margin: auto;
height: 40px;
top: 15px;
top: 10px;
-webkit-transition: all 0.1s linear 0s;
}
.ptr_image {
margin: 5px;
margin-top: 20px;
margin-left: 10px;
margin-right: 10px;
height: 30px;
width: 30px;
width: 40px;
zoom: 0.5;
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAACACAYAAAD03Gy6AAALsUlEQVR4Ae2dDZBWVRnH34Xlo2XTtDDCKRYtA6KdZphmw4ixDRZIFlAUiMEETMQwZhiUqCQnAvGTnAwQLYQUEDQEt4AEoXEsXCowp2EYhg8/po1VQqBkl49d+v23vQTvfrz3+5574Jn5z91z33Oe83+e5733nvOcc9/NZOKRz9HNTjBA3ZWUlGTOnDlzEfigjRwSsVyD/nXgS2AluA5clEYP5EfsiT7ol/OvbOznExzX19bWjtu3b9+aurq6hqug8bNAB11RRUVFmY4dOwbSY1Pjr2PMYXAmG3l5eXVt27adDDJhoE2b/13IlZWVqbutRXUFjMDpy0EBaCJ8W9vw7V/EB5eBeU0qXEAnongGjMd/z4NmnZ/l2/spP5R17oIqhh2AaXjvaeDlyrqH+k+BsLmg0nwJ0+jZmDvfp8nfod0qcME9QcMKwOM4b5ZP5zvNbuKPl8ClzokL4Rg0AO1w0jPgrpCcNRA9vwddQtJnvJogASjEujVgXMhWlqDvFXB1yHqNVOc3AA0TKiwaGpFVvdC7BRRHpN8YtX4C8GnYbwJfi9iKz6BfV0K/iPtJVL3XAPSArb6ZyuvEIbrSNoBvxtFZEn14CcCXISjnfzZmonrWvAjGxtxvLN25DcA3YPMy+FQsrJp20p5TSm1MafpRus+4CcBITKwAHzPA1F/A4V4DeIRGIVcAJtKTZqgfCa3H4Ip+iopHgqsxQ0NrAZgOxV+BtmZQPY+FydzOI5qr0FIA5tDQ9G+Zrs7VwKSrM5e/m3yeHYA8aiwAP2pS08wTN0LLlOeTLw+dGwCNNJ4F3/WlKblGSY/QAlme39haY209bNM64WmYo1RUVJTv2bNn78mTJwM5paXG9fX1meHDh2c6d+7cUhVf57vSaitosnabwnPvwDnSWfq2bdtCXXfWLWgZuA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sbCTgsphYmzDI+A9mYqr6PbjxHSUgA0HtbW8PjGV9G7YzVdDAMfRN+V+x6aC8Bsms93ryIVNTVj/xaoNY1t9ihIOZC7TCMZkI9yVd8PqCOy5k4A2tHDEjAusp6SUaws7QPJdO2uVwXgErAMaA+7LaKZ+p1gsekGKQDK65SZTtQDvxPUvRWs8tAmsap6CM8Ef0+MQbgdH0OdZrepcL5M1xWwE2jHmlINfUBa5T0SaiP4KeFtp055W0fR70D37ds3cbsvh8EWoPtn2rAfzr0rKysTyWg6mU0/x3PnAYcxYihYC9Ikun2WglTeRs8NgJyu1Qitci0FaZA/QVIvwb2VBrLNccwOgOqcBhNArEtz6tijbKT+YPCex3ZGVW8uAA5B5YPucwqGHZ+Dj+Yt/zaMl2c6rQVAymaDqZ61RtvgCdQrU6vxfuolVwBkoPJDseyRceHNedTRDFejNCvETQBkaCy7xHJ4VAm1H+aok7qP3QZAhlUArZBFtk9SnTQj9ZybBJTVtE68BEDGvwoGgkh2CquDLFH+fgx4Kuu8NUWvAZDhSl2Ugt0qRChH0T0MKFlorfgJgJyxF2gC9BcVIpCD6FR+Smu4VovfAMgpVUBp7FBeVpPCRlFeR8GtdE7YfAwSAPlFC9zaXLpGhRDkTXTo9rYrBF2pUBE0ADKyBowCS1QIIH+k7QDwdgAdqWsaRgBktN4avw3MV8GHrKfNEPC+j7apbhJWABwnTOePWU7B5XEF9W4Aqc/ruLT3vGphB0DK5wBtbXGTLlhIPe3EOAkuSIkiAHLkAnALaM2xc/l8CnATKKrZKVoTjkqWo/gIUOq48NxOevbseffixYsf1f9e1DJeGCI9PXr0CEOVdTq+ikXVQJ7WavmEkpKS1K3d+lnvddMmqlsQfj4rGl5eDw6A8eBpcFEaPfBfsmYf8GNO7mUAAAAASUVORK5CYII=');
-webkit-background-size: 100% 100%;
-moz-background-size: 100% 100%;
background-size: 100% 100%;
-webkit-background-size: 50% 100%;
-moz-background-size: 50% 100%;
background-size: 50% 100%;
background-repeat: repeat-x;
display: inline-block;
background-position: left center;
@ -62,7 +68,14 @@
}
.ptr_image.loading {
margin-left: 15px;
margin-right: 15px;
height: 30px;
width: 30px;
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAANOklEQVR4Ae2dDbAWVRnHX6Ar14s3RQUtv64IJnox8YMRpcCxkqkgU0Sb1GkgknRstBybIUVtkplI1HTSyUwr0wYs+hCvJldJSSIkqRHB/BZF0/iqBG8K3X5/epeWl7vvnrPv7r577nuemT+77+45z/Oc5/z37Plabp/u7u6Sl8aNQN/GLbovuSLgCdDgPPAE8ARo8Ag0ePF9C+AJ0OARaPDi+xbAE6DBI9DgxX+fSflnzZpVWrFiRam5udkkuU9DBLq6ukojR44szZgxo9DxMCKAKr+zs7M0YMCAQhcG5waCIeD9YDgYBvYBrUDsDRi8lfP14B3wJngD/BW8CtaCTaAm2bx5c03588psRAA9+ar8lpaWvPwytbMvCY8BE8AIcDAQAfqAJCJCiADCSrAQPAFeB9biQotpRADrkmebQZU+DpwFRoE2kJbsjqKhZYzleBFQ5S8H94GHwUug14hLBFDFTAOTQRvISz6IoYllbOC4ANwGHgfOiwvDwAOJ8g1ATfHloA3US/bG8PngMfBzcDxwWopMAL3HLwaq+EvAXqAooridCUSEbwN1Op2UohJgMNG8F9wE9i9wZNVnUKvUCY4usJ+RrhWRAB/F28VAT5grcgKOigSnuuJw4GeRCNAPpy4DD4LDAwcdOg7C1/ngZId8LsyGEE3WzAXfAWpWXRX1Be4Bh7hSgCK0AMcSrEXApSa/Wv1qMmo2UCe28FJvApxGhB4CmsXrTaJJqjEuFKieBNCEjt6Zav57m+jpn+5CoepFgC8QnJ+Cwi0upFhp6gxq4qjQUg8CqHn8AWgqdGRqd059gUNrV5OthrwJ8EmK8xPg0hpE0hrQa6B/0sx55cuTACdRqJ+BYE0+rzLWy85/MNxVL+OmdvMigJrCu4HGyY0iWjZ+oeiFzYMAeuLvAm1FD0bK/mkzyT9S1pm6ujwIMAevnZoeTSHK/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VwEngD1EjXvHeAzYCy4HxRaXN4VXBlYfS1zC9CWsZPAJPAxcCTIUjSefxJoNu8+8BRwRnoTAYKgq0LU/Aq7g6OACKEncig4GOwFkopm7J4Br4IFQJX/Z+CkFJ4A+iyMD1OTBvcdMi4v4yaOuwERYDBoAweBQUC/+4EBYE+g1kREUpO+AbwBVoH1YB0QAQotipnJJ3WFJ0B7e3upo6Njx4epa9euLc2dO7fU1NSUpAI0hHy+jCVJFLiSR5/UDRw4MNZdo6+DY7X4BM5GoDeMApwNfhEc9wQoQi3U0QdPgDoGvwimPQGKUAt19METoI7BL4JpT4Ai1EIdffAEqGPwi2DaE6AItVBHH/4LblUKSJmR62QAAAAASUVORK5CYII=');
-webkit-background-size: 100% 100%;
-moz-background-size: 100% 100%;
background-size: 100% 100%;
background-repeat: no-repeat;
-webkit-animation-name: rotate;
-webkit-animation-duration:0.5s;

37
lib/js/pulltorefresh.js

@ -1,5 +1,5 @@
/* ----------------------------------
* PullToRefresh v0.003
* PullToRefresh v0.004
* By Simon Waldherr
* https://github.com/SimonWaldherr/PullToRefresh
* Licensed under The MIT License
@ -121,31 +121,18 @@ function ptr_init() {
var top = ptr_element.scrollTop;
var ptr = ptr_element.getElementsByClassName('ptr_box')[0];
var scrolldistance = Math.abs(parseInt(ptr_element.scrollTop));
if((ptr_wrapelement.className.indexOf(' active') === -1)&&(!ptr_wrapelement.getElementsByClassName('ptr_image')[0].className.match('loading'))) {
if(ptr_element.scrollTop < -25) {
rotate = (top < -40) ? -90 : 130 + (top*12+270);
}
if(ptr_element.scrollTop < 0) {
ptr.style.opacity = 1.0;
ptr_wrapelement.getElementsByClassName('ptr_image')[0].style['-webkit-transform'] = "scale(1) rotate("+rotate+"deg)";
ptr.style.height = (scrolldistance < 55) ? scrolldistance+'px' : '55px';
ptr.style.top = (scrolldistance < 55) ? '-'+scrolldistance+'px' : '-55px';
if((ptr_element.scrollTop < -30)&&(ptr_element.scrollTop > -45)) {
ptr_wrapelement.getElementsByClassName('ptr_image')[0].style['width'] = "40px";
ptr_wrapelement.getElementsByClassName('ptr_image')[0].style['margin-left'] = "10px";
ptr_wrapelement.getElementsByClassName('ptr_image')[0].style['margin-right'] = "10px";
ptr_wrapelement.getElementsByClassName('ptr_image')[0].style['background-size'] = "50% 100%";
} else if(ptr_element.scrollTop >= -30) {
ptr_wrapelement.getElementsByClassName('ptr_image')[0].style['width'] = "30px";
ptr_wrapelement.getElementsByClassName('ptr_image')[0].style['margin-left'] = "15px";
ptr_wrapelement.getElementsByClassName('ptr_image')[0].style['margin-right'] = "15px";
ptr_wrapelement.getElementsByClassName('ptr_image')[0].style['background-size'] = "100% 100%";
} else {
ptr_wrapelement.getElementsByClassName('ptr_image')[0].style['width'] = "60px";
ptr_wrapelement.getElementsByClassName('ptr_image')[0].style['margin-left'] = "0px";
ptr_wrapelement.getElementsByClassName('ptr_image')[0].style['margin-right'] = "0px";
ptr_wrapelement.getElementsByClassName('ptr_image')[0].style['background-size'] = "34% 100%";
}
ptr_wrapelement.getElementsByClassName('ptr_image')[0].style['-webkit-transform'] = "scale(1) rotate("+rotate+"deg)";
}
if(ptr_element.scrollTop < -51) {
@ -153,10 +140,11 @@ function ptr_init() {
ptr_wrapelement.className += ' active';
ptr_wrapelement.getElementsByClassName('ptr_text')[0].innerHTML = 'Loading ...';
ptr_wrapelement.getElementsByClassName('ptr_image')[0].className += ' loading';
ptr_wrapelement.getElementsByClassName('ptr_image')[0].style['width'] = "30px";
ptr_wrapelement.getElementsByClassName('ptr_image')[0].style['margin-left'] = "15px";
ptr_wrapelement.getElementsByClassName('ptr_image')[0].style['margin-right'] = "15px";
ptr_wrapelement.getElementsByClassName('ptr_image')[0].style['background-size'] = "100% 100%";
if(parent.getAttribute('data-url') == 'reload') {
window.location.reload(true);
return false;
}
var ptr_element = parent;
var ptr_wrapelement = ptr_element.getElementsByClassName('wrap')[0];
@ -232,6 +220,9 @@ function ptr_init() {
if(ptr_wrapelement.getElementsByClassName('ptr_image')[0].className.match('loading')) {
ptr_wrapelement.className = ptr_wrapelement.className.replace(' active', '');
ptr_wrapelement.style.top = '51px';
} else {
ptr.style.height = '0px';
ptr.style.top = '0px';
}
}
}

2
submodules/pulltorefresh

@ -1 +1 @@
Subproject commit a4a3875eb07f02cf4266ccb09f74263d2755ec02
Subproject commit 8b643ab71af3bd19363a4fd48ec3ea1179823ec3

2
test/app/checkout.html

@ -24,7 +24,7 @@
</a>
<h1 class="title">Buy tickets</h1>
</header>
<div class="content scrollable" id="list">
<div class="content" id="list">
<div class="wrap">
<div class="">
<div class="checkout-form content-padded">

2
test/app/index.html

@ -20,7 +20,7 @@
<header class="bar-title">
<h1 class="title">Movie finder</h1>
</header>
<div class="content scrollable" id="list">
<div class="content scrollable" id="list" data-url="reload">
<div class="wrap">
<nav class="bar-standard bar-header-secondary bar-scrolling">
<form>

Loading…
Cancel
Save