mirror of
				https://github.com/flynx/PortableMag.git
				synced 2025-10-31 20:10:13 +00:00 
			
		
		
		
	fixed a feature that made me make the same mistake three times...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									16968d7876
								
							
						
					
					
						commit
						21fca66036
					
				
							
								
								
									
										4
									
								
								TODO.otl
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								TODO.otl
									
									
									
									
									
								
							| @ -1,5 +1,5 @@ | ||||
| [_] 37% Priority work | ||||
| 	[_] 65% general todo | ||||
| 	[_] 66% general todo | ||||
| 		[_] 37% Version 1.0 checklist (migration to layout.html) | ||||
| 			[X] page scaling for full page view | ||||
| 			[X] top/bottom toolbars | ||||
| @ -88,7 +88,7 @@ | ||||
| 					[_] scrollend | ||||
| 				[_] 0% snap | ||||
| 					[_] snapped | ||||
| 		[_] BUG: full-page-view-mode class does not apply to some elements... | ||||
| 		[X] BUG: full-page-view-mode class does not apply to some elements... | ||||
| 		| - toolbars | ||||
| 		| - bookmarks | ||||
| 		[_] BUG: #URLs do not all work in the new index... | ||||
|  | ||||
| @ -23,7 +23,7 @@ var toggleThemes = createCSSClassToggler('.chrome', [ | ||||
| 
 | ||||
| var togglePageFitMode = createCSSClassToggler( | ||||
| 		'.chrome',  | ||||
| 		'.page-fit-to-viewer',  | ||||
| 		'page-fit-to-viewer',  | ||||
| 		function(action){ | ||||
| 			if(action == 'on'){ | ||||
| 				var n = getPageNumber() | ||||
| @ -39,7 +39,7 @@ var togglePageFitMode = createCSSClassToggler( | ||||
| 
 | ||||
| var togglePageView = createCSSClassToggler( | ||||
| 		'.chrome', | ||||
| 		'.full-page-view-mode', | ||||
| 		'full-page-view-mode', | ||||
| 		function(action){ | ||||
| 			var view = $('.viewer') | ||||
| 			var page = $('.page') | ||||
|  | ||||
							
								
								
									
										16
									
								
								lib/jli.js
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								lib/jli.js
									
									
									
									
									
								
							| @ -41,13 +41,27 @@ | ||||
| // NOTE: of only one callback is given then it will be called after the 
 | ||||
| // 		class change...
 | ||||
| // 		a way around this is to pass an empty function as callback_b
 | ||||
| //
 | ||||
| // NOTE: due to several times I've repeated the same mistake of forgetting 
 | ||||
| // 		to write the classes without leading dots, this now will normalize
 | ||||
| // 		the class list, so now this will correctly treat both dotted 
 | ||||
| // 		and non-dotted class names...
 | ||||
| function createCSSClassToggler(elem, class_list, callback_a, callback_b){ | ||||
| 	var bool_action = false | ||||
| 	if(typeof(class_list) == typeof('')){ | ||||
| 		class_list = ['none', class_list] | ||||
| 		bool_action = true | ||||
| 	} | ||||
| 	// Normalize classes -- remove the dot from class names...
 | ||||
| 	// NOTE: this is here because I've made the error of including a 
 | ||||
| 	// 		leading "." almost every time I use this after I forget 
 | ||||
| 	// 		the UI...
 | ||||
| 	class_list = $(class_list).map(function(i, e){ | ||||
| 		return $(e.split(' ')).map(function(i, c){ | ||||
| 			c = c.trim() | ||||
| 			return c[0] == '.' ? c.slice(1) : c | ||||
| 		}).toArray().join(' ') | ||||
| 	}).toArray() | ||||
| 	// normalize the callbacks...
 | ||||
| 	if(callback_b == null){ | ||||
| 		var callback_pre = null | ||||
| 		var callback_post = callback_a | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user