mirror of
https://github.com/flynx/PortableMag.git
synced 2025-10-29 19:20:09 +00:00
some cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
f08b00eb6f
commit
aeb5a85cfd
24
magazine.js
24
magazine.js
@ -651,8 +651,7 @@ function updateNavigator(n){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// XXX store bookmarks in a seporate place...
|
|
||||||
// NOTE: this depends on the indicator bar...
|
|
||||||
function makeBookmarkIndicator(n){
|
function makeBookmarkIndicator(n){
|
||||||
if(n == null){
|
if(n == null){
|
||||||
n = getPageNumber()
|
n = getPageNumber()
|
||||||
@ -685,16 +684,16 @@ function removeBookmarkIndicator(n){
|
|||||||
$('.navigator .bar .bookmark[page="'+n+'"]').remove()
|
$('.navigator .bar .bookmark[page="'+n+'"]').remove()
|
||||||
}
|
}
|
||||||
|
|
||||||
// XXX move to actions...
|
|
||||||
|
|
||||||
|
/******************************************************* bookmarks ***/
|
||||||
|
|
||||||
|
// load bookmarks from list...
|
||||||
function loadBookmarks(lst){
|
function loadBookmarks(lst){
|
||||||
clearBookmarks()
|
clearBookmarks()
|
||||||
$(lst).each(function(i, e){toggleBookmark(e)})
|
$(lst).each(function(i, e){toggleBookmark(e)})
|
||||||
}
|
}
|
||||||
function clearBookmarks(){
|
// build bookmark list...
|
||||||
$('.magazine .page .bookmark').remove()
|
|
||||||
clearBookmarkIndicators()
|
|
||||||
}
|
|
||||||
|
|
||||||
function buildBookmarkList(){
|
function buildBookmarkList(){
|
||||||
var res = []
|
var res = []
|
||||||
$('.magazine .page .bookmark').each(function(_, e){
|
$('.magazine .page .bookmark').each(function(_, e){
|
||||||
@ -703,6 +702,12 @@ function buildBookmarkList(){
|
|||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function clearBookmarks(){
|
||||||
|
$('.magazine .page .bookmark').remove()
|
||||||
|
clearBookmarkIndicators()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function toggleBookmark(n){
|
function toggleBookmark(n){
|
||||||
if(n == null){
|
if(n == null){
|
||||||
n = getPageNumber()
|
n = getPageNumber()
|
||||||
@ -732,8 +737,6 @@ function toggleBookmark(n){
|
|||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// XXX move this to actions...
|
|
||||||
function nextBookmark(){
|
function nextBookmark(){
|
||||||
var pages = $('.page')
|
var pages = $('.page')
|
||||||
pages = $(pages.splice(getPageNumber()+1))
|
pages = $(pages.splice(getPageNumber()+1))
|
||||||
@ -752,6 +755,7 @@ function prevBookmark(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/********************************************************** editor ***/
|
/********************************************************** editor ***/
|
||||||
|
|
||||||
// XXX create magazine...
|
// XXX create magazine...
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user