mirror of
https://github.com/flynx/pWiki.git
synced 2025-11-02 20:10:07 +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')
|
||||
|
||||
REFRESH_DELAY = 20
|
||||
|
||||
// start loading pWiki...
|
||||
require(['./browser'], function(browser){
|
||||
@ -186,8 +187,9 @@ require(['./browser'], function(browser){
|
||||
: '/'+path
|
||||
startSpinner()
|
||||
// NOTE: setTimeout(..) to allow the spinner to start...
|
||||
// NOTE: this seems not to work if the REFRESH_DELAY is too small...
|
||||
setTimeout(function(){
|
||||
pwiki.location = [path, hash] }, 0) })
|
||||
pwiki.location = [path, hash] }, REFRESH_DELAY) })
|
||||
pwiki
|
||||
.onBeforeNavigate(function(){
|
||||
saveNow() })
|
||||
@ -226,7 +228,7 @@ require(['./browser'], function(browser){
|
||||
lnk.addEventListener('click', function(evt){
|
||||
startSpinner()
|
||||
setTimeout(function(){
|
||||
that.refresh() }, 0) }) } })
|
||||
that.refresh() }, REFRESH_DELAY) }) } })
|
||||
|
||||
// wait for stuff to finish...
|
||||
browser.setup.then(function(){
|
||||
|
||||
@ -9,11 +9,6 @@
|
||||
* ...bug likely in .text
|
||||
* XXX might also be a good idea to investigate a .tree directory index
|
||||
* 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 start writing docs in pwiki
|
||||
* - WYSIWYG markdown editor/viewer (ASAP)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user