|
|
@ -30,7 +30,7 @@ class app.models.Doc extends app.Model
|
|
|
|
indexUrl: ->
|
|
|
|
indexUrl: ->
|
|
|
|
"#{app.indexHost()}/#{@index_path}"
|
|
|
|
"#{app.indexHost()}/#{@index_path}"
|
|
|
|
|
|
|
|
|
|
|
|
indexEntry: ->
|
|
|
|
toEntry: ->
|
|
|
|
new app.models.Entry
|
|
|
|
new app.models.Entry
|
|
|
|
doc: @
|
|
|
|
doc: @
|
|
|
|
name: @name
|
|
|
|
name: @name
|
|
|
@ -40,7 +40,7 @@ class app.models.Doc extends app.Model
|
|
|
|
if hash and entry = @entries.findBy 'path', "#{path}##{hash}"
|
|
|
|
if hash and entry = @entries.findBy 'path', "#{path}##{hash}"
|
|
|
|
entry
|
|
|
|
entry
|
|
|
|
else if path is 'index'
|
|
|
|
else if path is 'index'
|
|
|
|
@indexEntry()
|
|
|
|
@toEntry()
|
|
|
|
else
|
|
|
|
else
|
|
|
|
@entries.findBy 'path', path
|
|
|
|
@entries.findBy 'path', path
|
|
|
|
|
|
|
|
|
|
|
|