disable "empty path" handling out of confusion

This commit is contained in:
Anton Dyudin 2015-09-24 14:56:21 -07:00
parent a2d9922d9c
commit f93a8c2401
3 changed files with 11 additions and 33 deletions

View File

@ -47,7 +47,7 @@ Links = React.createFactory query {
render: -> div {className:'links'}, @props.children, @_render()
_render: -> div {id:"sibs"}, div {className:"active"}, a {}, @props.curr
CLICK = 'a' # 'a,h1,h2,h3,h4,h5,h6'
CLICK = 'a,h1,h2,h3,h4,h5,h6'
module.exports = query {sein:'t',path:'t',name:'t',next:'t',prev:'t'},recl
displayName: "Anchor"
getInitialState: -> url: window.location.pathname

View File

@ -142,7 +142,7 @@ Links = React.createFactory(query({
}
})));
CLICK = 'a';
CLICK = 'a,h1,h2,h3,h4,h5,h6';
module.exports = query({
sein: 't',
@ -1778,29 +1778,6 @@ TreeStore = _.extend(EventEmitter.prototype, {
}
if (data.kids && _.isEmpty(data.kids)) {
old.EMPTY = true;
old.body = {
gn: 'div',
c: [
{
gn: 'h1',
ga: {
className: 'error'
},
c: ['Error: Empty path']
}, {
gn: 'div',
c: [
{
gn: 'pre',
c: [this.getCurr()]
}, {
gn: 'span',
c: ['is either empty or does not exist.']
}
]
}
]
};
}
return _data[path] = old;
},

View File

@ -59,14 +59,15 @@ TreeStore = _.extend EventEmitter.prototype, {
if data.kids && _.isEmpty data.kids
old.EMPTY = true
old.body =
gn: 'div'
c: [ {gn:'h1', ga:{className:'error'}, c:['Error: Empty path']}
{gn:'div', c:[
{gn:'pre', c:[@getCurr()]}
{gn:'span', c:['is either empty or does not exist.']}
# {gn:'list'} XX handle empty snip
] }]
# XX why here?
# old.body =
# gn: 'div'
# c: [ {gn:'h1', ga:{className:'error'}, c:['Error: Empty path']}
# {gn:'div', c:[
# {gn:'pre', c:[@getCurr()]}
# {gn:'span', c:['is either empty or does not exist.']}
# # {gn:'list'} XX handle empty snip
# ] }]
_data[path] = old