mirror of
				https://github.com/flynx/PortableMag.git
				synced 2025-10-31 03:50:16 +00:00 
			
		
		
		
	some cleanup, refactoring and book-keeping...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									e70719d6a0
								
							
						
					
					
						commit
						79e21575eb
					
				
							
								
								
									
										42
									
								
								TODO.otl
									
									
									
									
									
								
							
							
						
						
									
										42
									
								
								TODO.otl
									
									
									
									
									
								
							| @ -1,17 +1,27 @@ | ||||
| [_] 37% Priority work | ||||
| [_] 36% Priority work | ||||
| 	[_] 0% TouchSwipe issues... | ||||
| 		[_] BUG: swipe-back does not cancel a swipe... (TouchSwipe) | ||||
| 		| ...unless the finger is return to within the threshold of the  | ||||
| 		| touchdown point. | ||||
| 		[_] BUG: no drag threshold on excludedElements (TouchSwipe) | ||||
| 		| stalled... | ||||
| 	[_] 66% general todo | ||||
| 		[_] 50% move some of the current configuration options to the magazine... | ||||
| 			[X] page align | ||||
| 			[_] resize settings (.no-resize class) | ||||
| 	[_] 63% general todo | ||||
| 		[_] 0% add two main page themes (global/local applicable): | ||||
| 			[_] light | ||||
| 			[_] dark | ||||
| 		[_] 20% move some of the current configuration options to the magazine... | ||||
| 			[X] page align | ||||
| 			| global, magazine, article, page-set, page | ||||
| 			[_] resize settings (.no-resize class) | ||||
| 			| global, magazine, article, page-set, page | ||||
| 			[_] default page/content size | ||||
| 			| global, magazine, article | ||||
| 			[_] fit page to view | ||||
| 			| global, magazine, article | ||||
| 			[_] drag full page | ||||
| 			| global, magazine | ||||
| 		[_] Editor: add page-set support... | ||||
| 		[_] Editor: add basic control toolbars... | ||||
| 		[_] Editor: add toggleEditiorMode to all editables in all versions... | ||||
| 		| text areas, inputs, ... | ||||
| 		[_] Editor: make the editor switchable... | ||||
| @ -21,16 +31,7 @@ | ||||
| 		[_] add default empty state to viewer, magazine and article... | ||||
| 		| use it to trigger a "New Magazine", "New Cover"/"New Article" and | ||||
| 		| "New Cover"/"New Page" actions... | ||||
| 		[_] EXPERIMENT: Try using scroll instead of left of .magazine.... | ||||
| 		| this might improve speed... | ||||
| 		[_] JSON: add page URLs as an alternative to direct content... | ||||
| 		| use AJAX to get remote pages and their nested content | ||||
| 		[_] JSON: add metadata section that can be downloaded separately... | ||||
| 		[_] 75% JSON: add the following fields to metadata section: | ||||
| 			[_] issue URL | ||||
| 			[X] authors | ||||
| 			[X] title | ||||
| 			[X] name | ||||
| 		[_] Editor: make empty magazine and article visible in the editor... | ||||
| 		[_] 57% add the following icons to buttons.svg | ||||
| 			[X] magazine create | ||||
| 			[_] magazine remove | ||||
| @ -51,7 +52,6 @@ | ||||
| 			[X] (i) info | ||||
| 			[_] (+) new | ||||
| 			[_] (x) remove | ||||
| 		[_] Editor: make empty magazine and article visible in the editor... | ||||
| 		[_] 0% populate an example issue | ||||
| 			[_] template photo page | ||||
| 			[_] template 3x3 grid | ||||
| @ -63,6 +63,16 @@ | ||||
| 		[_] make #URLs magazine-specific... | ||||
| 		[_] make #actions a configurable framework... | ||||
| 		| rather than being hard-coded as they are now... | ||||
| 		[_] JSON: add metadata section that can be downloaded separately... | ||||
| 		[_] JSON: add page URLs as an alternative to direct content... | ||||
| 		| use AJAX to get remote pages and their nested content | ||||
| 		[_] 75% JSON: add the following fields to metadata section: | ||||
| 			[_] issue URL | ||||
| 			[X] authors | ||||
| 			[X] title | ||||
| 			[X] name | ||||
| 		[_] EXPERIMENT: Try using scroll instead of left of .magazine.... | ||||
| 		| this might improve speed... | ||||
| 		[_] BUG: browser history on internal links is broken... | ||||
| 		| ...with both UPDATE_HASH_URL_POSITION and FULL_HISTORY_ENABLED false. | ||||
| 		[_] BUG: as on android, on loading from json view does not reach cur page... | ||||
|  | ||||
							
								
								
									
										32
									
								
								magazine.js
									
									
									
									
									
								
							
							
						
						
									
										32
									
								
								magazine.js
									
									
									
									
									
								
							| @ -434,6 +434,7 @@ function fitNPages(n, fit_to_content){ | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	// align the magazine...
 | ||||
| 	if(USE_REAL_PAGE_SIZES){ | ||||
| 		if(cur.hasClass('no-resize')){ | ||||
| 			var align = getPageAlign(cur) | ||||
| @ -663,7 +664,7 @@ function clearBookmarks(){ | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| // NOTE: this will trigger events on the viewer:
 | ||||
| // NOTE: this will trigger the folowing events on the viewer:
 | ||||
| // 		- bookmarkAdded(n)
 | ||||
| // 		- bookmarkRemoved(n)
 | ||||
| function toggleBookmark(n){ | ||||
| @ -746,6 +747,7 @@ function prevBookmark(){ | ||||
| // 			$('[title="<magazine>"] [name="<name>"]')
 | ||||
| // XXX BUG: if the hash url part coresponds to a real anchor the browser 
 | ||||
| // 		shifts the page, need to disable this...
 | ||||
| //
 | ||||
| // URL state managers...
 | ||||
| // NOTE: loadURLState will have no side-effects on the URL, it will just 
 | ||||
| // 		get the state from the URL and return it.
 | ||||
| @ -1015,6 +1017,22 @@ function resetState(){ | ||||
| *  				url: <URL>, | ||||
| *  				pages: [ | ||||
| *  					<page>, | ||||
| * | ||||
| *  					// page-set...
 | ||||
| *					// NOTE: this is just like and article but can be 
 | ||||
| *					//		nested within and article.
 | ||||
| *					// NOTE: only one level of nexting is supported/testd.
 | ||||
| *  					{ | ||||
| *  						type: 'page-set', | ||||
| *  						// classes set on the article element...
 | ||||
| *  						class: [...] | ||||
| *  						// XXX urls are not yet supported...
 | ||||
| *  						url: <URL>, | ||||
| *  						pages: [ | ||||
| *  							<page>, | ||||
| *  							... | ||||
| *  						] | ||||
| *  					}, | ||||
| *  					... | ||||
| *  				] | ||||
| *  			}, | ||||
| @ -1022,6 +1040,11 @@ function resetState(){ | ||||
| *  		] | ||||
| *  	} | ||||
| *  | ||||
| * NOTE: essentially we have nodes of the folowing type: | ||||
| * 		- magazine (root) | ||||
| * 		- article | ||||
| * 		- page-set | ||||
| * 		- page | ||||
| * NOTE: content classes are stored in the content... | ||||
| * NOTE: at this point all page classes will be stored, but .current  | ||||
| *  		will be ignored on restore... | ||||
| @ -1029,7 +1052,7 @@ function resetState(){ | ||||
| * | ||||
| **********************************************************************/ | ||||
| 
 | ||||
| var JSON_FORMAT_VERSION = 0.1 | ||||
| var JSON_FORMAT_VERSION = 0.2 | ||||
| 
 | ||||
| 
 | ||||
| // there are two type of metadata handlers:
 | ||||
| @ -1148,7 +1171,10 @@ function buildJSON(export_bookmarks, export_position){ | ||||
| 	return res | ||||
| } | ||||
| 
 | ||||
| // XXX this does not load page attrs correctly...
 | ||||
| // NOTE: if jQuery get's fussy about some CSS value, the style value 
 | ||||
| // 		will not get loaded correctly.
 | ||||
| // 		one example is "background: none", use "background: transparent"
 | ||||
| // 		instead.
 | ||||
| function loadJSON(data, load_user_data){ | ||||
| 	function _build(parent, data){ | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user