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.
[_] BUG: no drag threshold on excludedElements (TouchSwipe)
| stalled...
[_] 76% general todo
[_] 75% general todo
[_] add templates...
| elements that will get generated content, like page numbers etc.
[_] 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,
| rather than the current "hideLayers"
[_] make corners clickable for bookmarking...
[X] bookmark active zone in upper-right corner of page...
[X] SVG icons and logo...
[X] add page numbers...
[X] 100% bookmarks

View File

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

View File

@ -78,7 +78,7 @@ body {
cursor: hand;
z-index: 9999;
z-index: 8888;
opacity: 0,5;
-webkit-transform: rotate(-45deg);
@ -93,6 +93,18 @@ body {
-ms-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 {
/* XXX change to relative units... */

View File

@ -411,9 +411,27 @@ function prevArticle(){
/******************************************************* 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...
function loadBookmarks(lst){
clearBookmarks()
// setup set bookmarks...
$(lst).each(function(i, e){toggleBookmark(e)})
}
// build bookmark list...