mirror of
https://github.com/flynx/pWiki.git
synced 2025-10-29 10:00:08 +00:00
now links to the same page will .refres() + notes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
eec1e725d3
commit
365b6ad319
@ -131,13 +131,20 @@ require(['./browser'], function(browser){
|
||||
// separates the navigate and load events...
|
||||
this.refresh() })
|
||||
.onLoad(function(evt){
|
||||
var that = this
|
||||
// handle title...
|
||||
document.querySelector('title').innerHTML = this.title
|
||||
// scroll to anchor element...
|
||||
this.hash
|
||||
&& this.dom
|
||||
.querySelector('#'+ this.hash)
|
||||
.scrollIntoView() })
|
||||
.scrollIntoView()
|
||||
// handle refresh...
|
||||
// NOTE: we need to do this as hashchange is only triggered
|
||||
// when the hash is actually changed...
|
||||
for(var lnk of this.dom.querySelectorAll(`a[href="${window.location.hash}"]`)){
|
||||
lnk.addEventListener('click', function(evt){
|
||||
that.refresh() }) } })
|
||||
|
||||
// wait for stuff to finish...
|
||||
browser.setup.then(function(){
|
||||
|
||||
@ -3,12 +3,15 @@
|
||||
*
|
||||
* XXX BUG: for some reason pwiki.get('/TestPage').raw does nothing when
|
||||
* the root store is not BaseStore...
|
||||
* ...seems to be a problem explicitly with /TestPage, could this
|
||||
* be a name clash with /Test???
|
||||
* ...the cause is:
|
||||
* pwiki.store.substore('/TestPage') -> 'Test'
|
||||
* should be:
|
||||
* pwiki.store.substore('/TestPage') -> undefined
|
||||
* XXX BUG service pages (*Error) now print "[ native code ]" instead of
|
||||
* the path and replacing @quote(..) with @source(..) breaks things...
|
||||
* ...this seems to happen only if the root store is not
|
||||
* MetaStore/BaseStore...
|
||||
* XXX BUG: .get(..) does not seem to resolve to <store>.next...
|
||||
* XXX page search: make things invariant via .names
|
||||
* - if a page is in a system path and there are no alternatives
|
||||
* just return it and do not search.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user