added bookmark active zone in upper-right corner of page...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2013-01-30 01:40:54 +04:00
parent 47373dc251
commit fc7c48bf2e
4 changed files with 34 additions and 2 deletions

View File

@ -5,7 +5,7 @@
| touchdown point. | touchdown point.
[_] BUG: no drag threshold on excludedElements (TouchSwipe) [_] BUG: no drag threshold on excludedElements (TouchSwipe)
| stalled... | stalled...
[_] 76% general todo [_] 75% general todo
[_] add templates... [_] add templates...
| elements that will get generated content, like page numbers etc. | elements that will get generated content, like page numbers etc.
[_] BUG: initial load on android does not center on the correct page... [_] BUG: initial load on android does not center on the correct page...
@ -23,6 +23,7 @@
| something like a page reset that will restore the default state, | something like a page reset that will restore the default state,
| rather than the current "hideLayers" | rather than the current "hideLayers"
[_] make corners clickable for bookmarking... [_] make corners clickable for bookmarking...
[X] bookmark active zone in upper-right corner of page...
[X] SVG icons and logo... [X] SVG icons and logo...
[X] add page numbers... [X] add page numbers...
[X] 100% bookmarks [X] 100% bookmarks

View File

@ -109,6 +109,7 @@ $(document).ready(function(){
// load state and setup everything that depends on it... // load state and setup everything that depends on it...
loadState() loadState()
setupNavigator() setupNavigator()
setupBookmarkTouchZones()
// set default view... // set default view...
togglePageView('on') togglePageView('on')

View File

@ -78,7 +78,7 @@ body {
cursor: hand; cursor: hand;
z-index: 9999; z-index: 8888;
opacity: 0,5; opacity: 0,5;
-webkit-transform: rotate(-45deg); -webkit-transform: rotate(-45deg);
@ -93,6 +93,18 @@ body {
-ms-transition: all 0.2s ease; -ms-transition: all 0.2s ease;
transition: all 0.2s ease; transition: all 0.2s ease;
} }
.page .bookmark-toggler {
position: absolute;
width: 40px;
height: 40px;
right: 0px;
top: 0px;
cursor: hand;
z-index: 9999;
}
.page-view-mode .page { .page-view-mode .page {
/* XXX change to relative units... */ /* XXX change to relative units... */

View File

@ -411,9 +411,27 @@ function prevArticle(){
/******************************************************* bookmarks ***/ /******************************************************* bookmarks ***/
// setup bookmarking active zones in page...
function setupBookmarkTouchZones(){
$('.bookmark-toggler').remove()
var page = $('.page')
page.each(function(i, e){
$('<div/>')
.prependTo(e)
.addClass('bookmark-toggler')
.attr({
title: 'Toggle bookmark (B)'
})
.click(function(){
toggleBookmark(i)
})
})
}
// load bookmarks from list... // load bookmarks from list...
function loadBookmarks(lst){ function loadBookmarks(lst){
clearBookmarks() clearBookmarks()
// setup set bookmarks...
$(lst).each(function(i, e){toggleBookmark(e)}) $(lst).each(function(i, e){toggleBookmark(e)})
} }
// build bookmark list... // build bookmark list...