mirror of
https://github.com/flynx/PortableMag.git
synced 2025-10-29 11:10:08 +00:00
made URLs optional...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
097d1a4ae4
commit
5c71780fa5
10
TODO.otl
10
TODO.otl
@ -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
|
||||
|
||||
17
index.html
17
index.html
@ -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({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user