mirror of
https://github.com/flynx/pWiki.git
synced 2025-12-17 00:21:40 +00:00
some sorting issues resolved, preparing for manual sort/order...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
1ac4bbcc9d
commit
01e58c8630
@ -2,7 +2,7 @@
|
|||||||
XXX Genereal template description...
|
XXX Genereal template description...
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<macro name="show-source" src="./*">
|
<macro name="show-source" src="./**" sort="path">
|
||||||
<hr>
|
<hr>
|
||||||
<h2>
|
<h2>
|
||||||
<a href="#@source(./path)/_edit">@source(./path)</a>
|
<a href="#@source(./path)/_edit">@source(./path)</a>
|
||||||
@ -12,6 +12,8 @@ XXX Genereal template description...
|
|||||||
</p>
|
</p>
|
||||||
</macro>
|
</macro>
|
||||||
|
|
||||||
|
<macro name="show-source" src="Templates"/>
|
||||||
|
|
||||||
<macro name="show-source" src="System/style"/>
|
<macro name="show-source" src="System/style"/>
|
||||||
|
|
||||||
<!-- @filter(-wikiword) -->
|
<!-- @filter(-wikiword) -->
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
@include(style/_css)
|
@include(./style/_css)
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<a href="#pages" class="pages-list-button button">☰</a>
|
<a href="#pages" class="pages-list-button button">☰</a>
|
||||||
|
|||||||
34
pwiki.js
34
pwiki.js
@ -120,6 +120,7 @@ module.BaseData = {
|
|||||||
'System/raw': function(){ return { text: this.get('..').raw() } },
|
'System/raw': function(){ return { text: this.get('..').raw() } },
|
||||||
'System/html': function(){ return { text: this.get('..').html() } },
|
'System/html': function(){ return { text: this.get('..').html() } },
|
||||||
|
|
||||||
|
// list all path elements on a level, including empty path sections...
|
||||||
// XXX update these to the new format -- must return an object...
|
// XXX update these to the new format -- must return an object...
|
||||||
// XXX move this to Wiki.children + rename...
|
// XXX move this to Wiki.children + rename...
|
||||||
// XXX
|
// XXX
|
||||||
@ -143,6 +144,10 @@ module.BaseData = {
|
|||||||
// list links to this page...
|
// list links to this page...
|
||||||
// XXX this is done, though we cant use this until we solve .html(..)
|
// XXX this is done, though we cant use this until we solve .html(..)
|
||||||
// macro recursion issues...
|
// macro recursion issues...
|
||||||
|
// XXX cache the result + need a strategy to drop parts of cache when
|
||||||
|
// irrelevant -- when path/text changes...
|
||||||
|
// XXX might be a good idea to move this to the store, at least the
|
||||||
|
// management, part...
|
||||||
'System/links': function(){
|
'System/links': function(){
|
||||||
return 'NoImplemented'
|
return 'NoImplemented'
|
||||||
var that = this
|
var that = this
|
||||||
@ -154,14 +159,22 @@ module.BaseData = {
|
|||||||
.forEach(function(p){
|
.forEach(function(p){
|
||||||
var pa = that.acquire(p)
|
var pa = that.acquire(p)
|
||||||
|
|
||||||
that.get(p).links().forEach(function(l){
|
that.get(p)
|
||||||
var la = that.acquire(l)
|
// XXX this will render the page which might not be
|
||||||
if(l == p || la == p || la == pa){
|
// the best idea in some cases...
|
||||||
res.push([l, p])
|
.links()
|
||||||
}
|
.forEach(function(l){
|
||||||
})
|
var la = that.acquire(l)
|
||||||
|
if(l == p || la == p || la == pa){
|
||||||
|
res.push([l, p])
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// cache the result...
|
||||||
|
// XXX
|
||||||
|
this.attr('rev-links', res)
|
||||||
|
|
||||||
return res
|
return res
|
||||||
//.map(function(e){ return '['+ e[0] +'] <i>from page: ['+ e[1] +']</i>' })
|
//.map(function(e){ return '['+ e[0] +'] <i>from page: ['+ e[1] +']</i>' })
|
||||||
.map(function(e){ return '['+ e[1] +'] <i>-> ['+ e[0] +']</i>' })
|
.map(function(e){ return '['+ e[1] +'] <i>-> ['+ e[0] +']</i>' })
|
||||||
@ -242,10 +255,14 @@ module.pWikiData = {
|
|||||||
: method == 'Path' ? p
|
: method == 'Path' ? p
|
||||||
: method == 'title' ? path2list(p).pop().toLowerCase()
|
: method == 'title' ? path2list(p).pop().toLowerCase()
|
||||||
: method == 'Title' ? path2list(p).pop()
|
: method == 'Title' ? path2list(p).pop()
|
||||||
|
|
||||||
|
// special case...
|
||||||
|
: method == 'checked' ? (data[p][method] ? 1 : 0)
|
||||||
|
|
||||||
// XXX experimental...
|
// XXX experimental...
|
||||||
//: method == 'order' ? order.indexOf(p)
|
//: method == 'order' ? order.indexOf(p)
|
||||||
// attr...
|
// attr...
|
||||||
: data[method]
|
: data[p][method]
|
||||||
})
|
})
|
||||||
.concat([i, p])
|
.concat([i, p])
|
||||||
})
|
})
|
||||||
@ -1311,7 +1328,7 @@ var pWikiPeerJSSync = pWikiFeatures.Feature({
|
|||||||
|
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
|
|
||||||
// XXX should this extend pWiki or encapsulate???
|
// XXX should this extend pWiki or encapsulate (current)???
|
||||||
var pWikiUIActions = actions.Actions({
|
var pWikiUIActions = actions.Actions({
|
||||||
config: {
|
config: {
|
||||||
'special-paths': {
|
'special-paths': {
|
||||||
@ -1546,7 +1563,6 @@ var pWikiUI = pWikiFeatures.Feature({
|
|||||||
var pWikiClient =
|
var pWikiClient =
|
||||||
module.pWikiClient = object.makeConstructor('pWikiClient',
|
module.pWikiClient = object.makeConstructor('pWikiClient',
|
||||||
actions.mix(
|
actions.mix(
|
||||||
// XXX not sure if we need this here...
|
|
||||||
actions.MetaActions,
|
actions.MetaActions,
|
||||||
pWikiUIActions))
|
pWikiUIActions))
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user