mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-31 03:10:07 +00:00 
			
		
		
		
	started adding file persistance layer (CEFPython/Phonegap)...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									1709fa053b
								
							
						
					
					
						commit
						82a4a3bef2
					
				| @ -37,6 +37,8 @@ body { | ||||
| <script src="images.js"></script> | ||||
| <script src="gallery-prototype.js"></script> | ||||
| <script src="ui.js"></script> | ||||
| <script src="persistance.js"></script> | ||||
| 
 | ||||
| <script src="markers.js"></script> | ||||
| 
 | ||||
| <!-- keep this after anything it uses --> | ||||
|  | ||||
							
								
								
									
										30
									
								
								ui/persistance.js
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										30
									
								
								ui/persistance.js
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,30 @@ | ||||
| /* | ||||
|  * Here we will need several levels of storage: | ||||
|  * 	- state | ||||
|  * 	  this can be anything including file or localstorage. | ||||
|  * 	  this is stored in a unified location. | ||||
|  * 	  global per user/instance | ||||
|  * 	- progress | ||||
|  * 	  this is stored in file location as local config file. | ||||
|  * | ||||
|  */ | ||||
| 
 | ||||
| function loadJSONfile(path){ | ||||
| 	// XXX CEF (file) - binding
 | ||||
| 	if(CEF_loadJSON != null){ | ||||
| 		return CEF_loadJSON(path) | ||||
| 	} | ||||
| 	// XXX PhoneGap (file) - binding
 | ||||
| 	// XXX browser - open file dialog
 | ||||
| } | ||||
| 
 | ||||
| function dumpJSONfile(path, value){ | ||||
| 	// XXX CEF (file) - binding
 | ||||
| 	if(CEF_dumpJSON != null){ | ||||
| 		return CEF_dumpJSON(path, value) | ||||
| 	} | ||||
| 	// XXX PhoneGap (file) - binding
 | ||||
| 	// XXX browser - download file dialog
 | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user