made URLs optional...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2013-01-22 19:38:12 +04:00
parent 097d1a4ae4
commit 5c71780fa5
2 changed files with 17 additions and 10 deletions

View File

@ -1,11 +1,15 @@
[_] 22% Priority work [_] 25% Priority work
[_] 40% general todo [_] 50% general todo
[_] add page urls [_] something made phonegap version unhappy...
| likely the URL logic...
|
| try and make it optional...
[_] time transitions [_] time transitions
| the goal is for slow devices to seem not to have animations at | the goal is for slow devices to seem not to have animations at
| all and faster ones to seem to have fast animations... | all and faster ones to seem to have fast animations...
[_] vanquish opacity effects [_] vanquish opacity effects
| they slow everything down considerably! | they slow everything down considerably!
[X] add page urls
[X] add state saving to local storage [X] add state saving to local storage
[X] use modes (CSS) for thumbnail/page views... [X] use modes (CSS) for thumbnail/page views...
[_] 50% stage 1 - basic features [_] 50% stage 1 - basic features

View File

@ -8,6 +8,8 @@
<script> <script>
var USE_URLS = false
/* this is needed only for live resize... */ /* this is needed only for live resize... */
var PAGES_VISIBLE = 1 var PAGES_VISIBLE = 1
var PAGES_IN_RIBBON = 6 var PAGES_IN_RIBBON = 6
@ -476,7 +478,7 @@ function saveStorageState(){
// generic state managers... // generic state managers...
function loadState(){ function loadState(){
var n = loadURLState() var n = USE_URLS ? loadURLState() : null
if(n != null){ if(n != null){
setCurrentPage(n) setCurrentPage(n)
} else { } else {
@ -484,7 +486,7 @@ function loadState(){
} }
} }
function saveState(){ function saveState(){
saveURLState() USE_URLS ? saveURLState() : null
saveStorageState() saveStorageState()
} }
@ -514,11 +516,12 @@ $(document).ready(function(){
.resize(function() { .resize(function() {
fitNPages(PAGES_VISIBLE) fitNPages(PAGES_VISIBLE)
}) })
/* if(USE_URLS){
.bind('hashchange', function(){ $(window)
setCurrentPage(loadURLState()) .bind('hashchange', function(){
}) setCurrentPage(loadURLState())
*/ })
}
$('.viewer') $('.viewer')
.swipe({ .swipe({