Navigation Menu

Skip to content

Commit

Permalink
[fix] app_sources.opa: remove an implicit protected value exposition,…
Browse files Browse the repository at this point in the history
… and make it dynamically published to limit its exposition
  • Loading branch information
OpaOnWindowsNow committed Apr 18, 2012
1 parent db992a7 commit 007c8b0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions stdlib/core/web/server/app_sources.opa
@@ -1,5 +1,5 @@
/*
Copyright © 2011 MLstate
Copyright © 2011, 2012 MLstate

This file is part of OPA.

Expand Down Expand Up @@ -49,7 +49,7 @@ AppSources =
| _ -> dom


show_file(filename) =
show_file(filename)(_) =
content = %%BslAppSrcCode.get_file_content%%(filename)
Dom.transform([#content <- <>{content}</>])

Expand All @@ -62,7 +62,8 @@ AppSources =
)
files =
new_file(filename) =
<a onclick={_ -> show_file(filename)}>{filename}</>
show = show_file(filename)
<a onclick={show}>{filename}</>
|> apply_style(css { display: block }, _)
<span id=#files onready={_ -> init()}>
{List.map(new_file, app_files)}
Expand Down

0 comments on commit 007c8b0

Please sign in to comment.