mirror of
https://github.com/flynx/pWiki.git
synced 2025-12-17 08:31:38 +00:00
cleaned up redundant complexity...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
8ff8b21281
commit
34b93885b0
35
pwiki.js
35
pwiki.js
@ -500,7 +500,16 @@ module.pWikiBase = actions.Actions({
|
|||||||
}],
|
}],
|
||||||
|
|
||||||
// content shorthands...
|
// content shorthands...
|
||||||
// XXX raw/text/checked/...
|
raw: ['Page/',
|
||||||
|
function(value){
|
||||||
|
return arguments.length == 0 ?
|
||||||
|
(this.attr('text') || '')
|
||||||
|
: this.attr('text', value) }],
|
||||||
|
checked: ['Page/',
|
||||||
|
function(value){
|
||||||
|
return arguments.length == 0 ?
|
||||||
|
!!this.attr('checked')
|
||||||
|
: this.attr('checked', value || undefined) }],
|
||||||
|
|
||||||
exists: ['Page/Check if path explicitly exists.',
|
exists: ['Page/Check if path explicitly exists.',
|
||||||
function(path){
|
function(path){
|
||||||
@ -946,31 +955,10 @@ module.pWikiBase = actions.Actions({
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
// Basic data sort-hands...
|
|
||||||
//
|
|
||||||
var pWikiContent =
|
|
||||||
module.pWikiContent = actions.Actions(pWikiBase, {
|
|
||||||
config: {
|
|
||||||
},
|
|
||||||
|
|
||||||
raw: ['Page/',
|
|
||||||
function(value){
|
|
||||||
return arguments.length == 0 ?
|
|
||||||
(this.attr('text') || '')
|
|
||||||
: this.attr('text', value) }],
|
|
||||||
|
|
||||||
checked: ['Page/',
|
|
||||||
function(value){
|
|
||||||
return arguments.length == 0 ?
|
|
||||||
!!this.attr('checked')
|
|
||||||
: this.attr('checked', value || undefined) }],
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
// Data processing and macros...
|
// Data processing and macros...
|
||||||
//
|
//
|
||||||
var pWikiMacros =
|
var pWikiMacros =
|
||||||
module.pWikiMacros = actions.Actions(pWikiContent, {
|
module.pWikiMacros = actions.Actions(pWikiBase, {
|
||||||
__macro_parser__: macro,
|
__macro_parser__: macro,
|
||||||
|
|
||||||
config: {
|
config: {
|
||||||
@ -1024,7 +1012,6 @@ module.pWikiPage = object.makeConstructor('pWikiPage',
|
|||||||
// XXX not sure if we need this here...
|
// XXX not sure if we need this here...
|
||||||
//actions.MetaActions,
|
//actions.MetaActions,
|
||||||
pWikiBase,
|
pWikiBase,
|
||||||
pWikiContent,
|
|
||||||
pWikiMacros))
|
pWikiMacros))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user