cleaned up redundant complexity...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2016-09-27 15:49:22 +03:00
parent 8ff8b21281
commit 34b93885b0

View File

@ -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))