diff --git a/TODO.otl b/TODO.otl index 570fb83..2b8f622 100755 --- a/TODO.otl +++ b/TODO.otl @@ -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 diff --git a/index.html b/index.html index 0611d95..f0d9ba6 100755 --- a/index.html +++ b/index.html @@ -109,6 +109,7 @@ $(document).ready(function(){ // load state and setup everything that depends on it... loadState() setupNavigator() + setupBookmarkTouchZones() // set default view... togglePageView('on') diff --git a/magazine.css b/magazine.css index 0a4ecc4..50bd15a 100755 --- a/magazine.css +++ b/magazine.css @@ -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... */ diff --git a/magazine.js b/magazine.js index ee8f966..dce42e5 100755 --- a/magazine.js +++ b/magazine.js @@ -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){ + $('
') + .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...