mirror of
https://github.com/urbit/shrub.git
synced 2025-01-08 14:09:29 +03:00
simplify default-data handling
This commit is contained in:
parent
3f31b23500
commit
98c538eee3
@ -29,7 +29,7 @@ $ ->
|
||||
frag = window.tree.fragpath window.location.pathname
|
||||
|
||||
TreeActions.setCurr frag
|
||||
TreeActions.loadPath frag,window.tree.body,window.tree.kids
|
||||
TreeActions.loadPath frag,window.tree.data
|
||||
|
||||
rend (head {}, ""),$('#nav')[0]
|
||||
rend (body {}, ""),$('#cont')[0]
|
||||
|
@ -1604,7 +1604,7 @@ $(function() {
|
||||
TreePersistence = require('./persistence/TreePersistence.coffee');
|
||||
frag = window.tree.fragpath(window.location.pathname);
|
||||
TreeActions.setCurr(frag);
|
||||
TreeActions.loadPath(frag, window.tree.body, window.tree.kids);
|
||||
TreeActions.loadPath(frag, window.tree.data);
|
||||
rend(head({}, ""), $('#nav')[0]);
|
||||
rend(body({}, ""), $('#cont')[0]);
|
||||
window.tree.util = {
|
||||
|
@ -2,19 +2,12 @@
|
||||
/? 314
|
||||
/- tree-include
|
||||
/= gas /$ fuel
|
||||
/= dat /^ tree-include
|
||||
/: /===/tree-gen /%
|
||||
/tree-include/
|
||||
::
|
||||
/= kid /^ (map span tree-include)
|
||||
/: /===/tree-gen /% 2 /_
|
||||
/tree-include/
|
||||
/= dat /: /%%/ /% /json/ :: default include
|
||||
::
|
||||
!:
|
||||
::::
|
||||
::
|
||||
=+ dez=(trip &2:%)
|
||||
=+ kids-json=a/(turn (~(tap by kid)) |=([a=span *] (joba %name s/a)))
|
||||
=+ aut=(~(has ju aut.ced.gas) %$ (scot %p p.bem.gas))
|
||||
;html
|
||||
;head
|
||||
@ -38,9 +31,7 @@
|
||||
[;script(type "text/javascript", src "/~/as/own/~/at/home/lib/urb.js");]~
|
||||
==
|
||||
;body
|
||||
;+ =+ mime=(jobe mite/[%s (moon p.mime.dat)] octs/[%s q.q.mime.dat] ~) :: XX factor out
|
||||
=+ inject=(jobe kids/kids-json body/body.dat ?.(aut ~ [mime/mime]~))
|
||||
;script(type "text/javascript"): window.tree = {(pojo inject)}
|
||||
;script(type "text/javascript"): window.tree = {(pojo (joba %data dat))}
|
||||
;div#nav;
|
||||
;div#cont;
|
||||
==
|
||||
|
@ -74,6 +74,6 @@
|
||||
[tree .]
|
||||
^- json
|
||||
=+ ^= schem
|
||||
=+ seh=(fall (~(get by qix.gas) 'q') 'body.r')
|
||||
=+ seh=(fall (~(get by qix.gas) 'q') 'spur.t_mime.m_body.r_kids.name.t')
|
||||
~|(bad-noun/seh ;;(schema (rash seh read-schem)))
|
||||
(from-queries bem.gas(s but.gas) (to-queries schem))
|
||||
|
Loading…
Reference in New Issue
Block a user