mirror of
				https://github.com/flynx/pWiki.git
				synced 2025-11-04 04:50:09 +00:00 
			
		
		
		
	fixed loading spinner...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									0c1fdf4ca6
								
							
						
					
					
						commit
						0d8c91386a
					
				@ -166,6 +166,7 @@ require.config({
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
document.pwikiloaded = new Event('pwikiloaded')
 | 
					document.pwikiloaded = new Event('pwikiloaded')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					REFRESH_DELAY = 20
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// start loading pWiki...
 | 
					// start loading pWiki...
 | 
				
			||||||
require(['./browser'], function(browser){ 
 | 
					require(['./browser'], function(browser){ 
 | 
				
			||||||
@ -186,8 +187,9 @@ require(['./browser'], function(browser){
 | 
				
			|||||||
			: '/'+path
 | 
								: '/'+path
 | 
				
			||||||
		startSpinner()
 | 
							startSpinner()
 | 
				
			||||||
		// NOTE: setTimeout(..) to allow the spinner to start...
 | 
							// NOTE: setTimeout(..) to allow the spinner to start...
 | 
				
			||||||
 | 
							// NOTE: this seems not to work if the REFRESH_DELAY is too small...
 | 
				
			||||||
		setTimeout(function(){
 | 
							setTimeout(function(){
 | 
				
			||||||
			pwiki.location = [path, hash] }, 0) })
 | 
								pwiki.location = [path, hash] }, REFRESH_DELAY) })
 | 
				
			||||||
	pwiki
 | 
						pwiki
 | 
				
			||||||
		.onBeforeNavigate(function(){
 | 
							.onBeforeNavigate(function(){
 | 
				
			||||||
			saveNow() })
 | 
								saveNow() })
 | 
				
			||||||
@ -226,7 +228,7 @@ require(['./browser'], function(browser){
 | 
				
			|||||||
				lnk.addEventListener('click', function(evt){
 | 
									lnk.addEventListener('click', function(evt){
 | 
				
			||||||
					startSpinner()
 | 
										startSpinner()
 | 
				
			||||||
					setTimeout(function(){
 | 
										setTimeout(function(){
 | 
				
			||||||
						that.refresh() }, 0) }) } })
 | 
											that.refresh() }, REFRESH_DELAY) }) } })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// wait for stuff to finish...
 | 
						// wait for stuff to finish...
 | 
				
			||||||
	browser.setup.then(function(){
 | 
						browser.setup.then(function(){
 | 
				
			||||||
 | 
				
			|||||||
@ -9,11 +9,6 @@
 | 
				
			|||||||
* 		...bug likely in .text
 | 
					* 		...bug likely in .text
 | 
				
			||||||
* XXX might also be a good idea to investigate a .tree directory index 
 | 
					* XXX might also be a good idea to investigate a .tree directory index 
 | 
				
			||||||
* 		as a supplement to .paths()
 | 
					* 		as a supplement to .paths()
 | 
				
			||||||
* XXX BUG: changing the URL does not start the spinner...
 | 
					 | 
				
			||||||
* 		chech:
 | 
					 | 
				
			||||||
* 			- url (hashchange)
 | 
					 | 
				
			||||||
* 			- click link
 | 
					 | 
				
			||||||
* 			- history back/foreward
 | 
					 | 
				
			||||||
* XXX Q: can we access fs from a pwa???
 | 
					* XXX Q: can we access fs from a pwa???
 | 
				
			||||||
* XXX start writing docs in pwiki
 | 
					* XXX start writing docs in pwiki
 | 
				
			||||||
* 		- WYSIWYG markdown editor/viewer (ASAP)
 | 
					* 		- WYSIWYG markdown editor/viewer (ASAP)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user