mirror of
				https://github.com/flynx/PortableMag.git
				synced 2025-10-31 12:00:11 +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){ | ||||
| 	if(n == null){ | ||||
| 		n = getPageNumber() | ||||
| @ -685,16 +684,16 @@ function removeBookmarkIndicator(n){ | ||||
| 	$('.navigator .bar .bookmark[page="'+n+'"]').remove() | ||||
| } | ||||
| 
 | ||||
| // XXX move to actions...
 | ||||
| 
 | ||||
| 
 | ||||
| /******************************************************* bookmarks ***/ | ||||
| 
 | ||||
| // load bookmarks from list...
 | ||||
| function loadBookmarks(lst){ | ||||
| 	clearBookmarks() | ||||
| 	$(lst).each(function(i, e){toggleBookmark(e)}) | ||||
| } | ||||
| function clearBookmarks(){ | ||||
| 	$('.magazine .page .bookmark').remove() | ||||
| 	clearBookmarkIndicators() | ||||
| } | ||||
| 
 | ||||
| // build bookmark list...
 | ||||
| function buildBookmarkList(){ | ||||
| 	var res = [] | ||||
| 	$('.magazine .page .bookmark').each(function(_, e){ | ||||
| @ -703,6 +702,12 @@ function buildBookmarkList(){ | ||||
| 	return res | ||||
| } | ||||
| 
 | ||||
| function clearBookmarks(){ | ||||
| 	$('.magazine .page .bookmark').remove() | ||||
| 	clearBookmarkIndicators() | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| function toggleBookmark(n){ | ||||
| 	if(n == null){ | ||||
| 		n = getPageNumber() | ||||
| @ -732,8 +737,6 @@ function toggleBookmark(n){ | ||||
| 	return res | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| // XXX move this to actions...
 | ||||
| function nextBookmark(){ | ||||
| 	var pages = $('.page') | ||||
| 	pages = $(pages.splice(getPageNumber()+1)) | ||||
| @ -752,6 +755,7 @@ function prevBookmark(){ | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| /********************************************************** editor ***/ | ||||
| 
 | ||||
| // XXX create magazine...
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user