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

View File

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