mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-11-04 05:10:07 +00:00 
			
		
		
		
	added docs to ui/lib/keyboard.js...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									8e8f833ff4
								
							
						
					
					
						commit
						f3c02c29cb
					
				@ -464,6 +464,37 @@ function buildKeybindingsHelp(keybindings){
 | 
				
			|||||||
	return res
 | 
						return res
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Build a basic HTML table with keyboard help...
 | 
				
			||||||
 | 
					//
 | 
				
			||||||
 | 
					//
 | 
				
			||||||
 | 
					//	The table will look like this:
 | 
				
			||||||
 | 
					//
 | 
				
			||||||
 | 
					// 		<table class="keyboard-help">
 | 
				
			||||||
 | 
					//
 | 
				
			||||||
 | 
					// 			<!-- section head -->
 | 
				
			||||||
 | 
					// 			<tr class="section-title">
 | 
				
			||||||
 | 
					// 				<th colspan=2> SECTION TITLE <th>
 | 
				
			||||||
 | 
					// 			</tr>
 | 
				
			||||||
 | 
					// 			<tr class="section-doc">
 | 
				
			||||||
 | 
					// 				<td colspan=2> SECTION DESCRIPTION <td>
 | 
				
			||||||
 | 
					// 			</tr>
 | 
				
			||||||
 | 
					//
 | 
				
			||||||
 | 
					// 			<!-- section keys -->
 | 
				
			||||||
 | 
					// 			<tr>
 | 
				
			||||||
 | 
					// 				<td> KEYS <td>
 | 
				
			||||||
 | 
					// 				<td> ACTION DESCRIPTION <td>
 | 
				
			||||||
 | 
					// 			</tr>
 | 
				
			||||||
 | 
					//
 | 
				
			||||||
 | 
					// 			...
 | 
				
			||||||
 | 
					//
 | 
				
			||||||
 | 
					//		</table>
 | 
				
			||||||
 | 
					//
 | 
				
			||||||
 | 
					// NOTE: section are not separated in any way other than the <th> element.
 | 
				
			||||||
 | 
					// NOTE: the actual HTML is created by jQuery, so the table may get 
 | 
				
			||||||
 | 
					// 		slightly structurally changed, i.e. a <tbody> element will be 
 | 
				
			||||||
 | 
					// 		added etc.
 | 
				
			||||||
 | 
					//
 | 
				
			||||||
function buildKeybindingsHelpHTML(keybindings){
 | 
					function buildKeybindingsHelpHTML(keybindings){
 | 
				
			||||||
	var doc = buildKeybindingsHelp(keybindings)
 | 
						var doc = buildKeybindingsHelp(keybindings)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -473,9 +504,12 @@ function buildKeybindingsHelpHTML(keybindings){
 | 
				
			|||||||
		if(mode == 'doc'){
 | 
							if(mode == 'doc'){
 | 
				
			||||||
			continue
 | 
								continue
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
							// section head...
 | 
				
			||||||
		res += '  <tr class="section-title"><th colspan=2>' + mode + '</th></tr>\n' 
 | 
							res += '  <tr class="section-title"><th colspan=2>' + mode + '</th></tr>\n' 
 | 
				
			||||||
		mode = doc[mode]
 | 
							mode = doc[mode]
 | 
				
			||||||
		res += '  <tr class="section-doc"><th colspan=2>'+ mode.doc + '</th></tr>\n'
 | 
							res += '  <tr class="section-doc"><td colspan=2>'+ mode.doc + '</td></tr>\n'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							// keys...
 | 
				
			||||||
		for(var action in mode){
 | 
							for(var action in mode){
 | 
				
			||||||
			if(action == 'doc'){
 | 
								if(action == 'doc'){
 | 
				
			||||||
				continue
 | 
									continue
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user