Make js files local

This commit is contained in:
YNH Webdev
2013-09-15 18:33:39 +02:00
parent 358fe04699
commit dd8bddd45c
4 changed files with 21 additions and 23 deletions

View File

@@ -35,9 +35,11 @@ feature {NONE} -- Initialization
map_agent_uri ("/", agent execute_hello, Void) map_agent_uri ("/", agent execute_hello, Void)
map_agent_uri ("/grid", agent grid_demo, Void) map_agent_uri ("/grid", agent grid_demo, Void)
map_agent_uri ("/repeater", agent repeater_demo, Void) map_agent_uri ("/repeater", agent repeater_demo, Void)
map_agent_uri ("/widget.js", agent load_js, Void) map_agent_uri ("/widget.js", agent load_file("widget.js", ?, ?), Void)
map_agent_uri ("/widget.css", agent load_css, Void) map_agent_uri ("/jquery.min.js", agent load_file("jquery.min.js", ?, ?), Void)
map_agent_uri ("/bootstrap.min.css", agent load_bootstrap, Void) map_agent_uri ("/typeahead.min.js", agent load_file("typeahead.min.js", ?, ?), Void)
map_agent_uri ("/widget.css", agent load_file("widget.css", ?, ?), Void)
map_agent_uri ("/bootstrap.min.css", agent load_file("bootstrap.min.css", ?, ?), Void)
end end
feature -- Helper: mapping feature -- Helper: mapping
@@ -79,27 +81,11 @@ feature -- Execution
page.execute page.execute
end end
load_js (req: WSF_REQUEST; res: WSF_RESPONSE) load_file (name: STRING; req: WSF_REQUEST; res: WSF_RESPONSE)
local local
f: WSF_FILE_RESPONSE f: WSF_FILE_RESPONSE
do do
create f.make_html ("widget.js") create f.make_html (name)
res.send (f)
end
load_css (req: WSF_REQUEST; res: WSF_RESPONSE)
local
f: WSF_FILE_RESPONSE
do
create f.make_html ("widget.css")
res.send (f)
end
load_bootstrap (req: WSF_REQUEST; res: WSF_RESPONSE)
local
f: WSF_FILE_RESPONSE
do
create f.make_html ("bootstrap.min.css")
res.send (f) res.send (f)
end end

5
examples/widgetapp/jquery.min.js vendored Normal file

File diff suppressed because one or more lines are too long

7
examples/widgetapp/typeahead.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -86,8 +86,8 @@ feature
control.read_state (states) control.read_state (states)
data.append (states.representation) data.append (states.representation)
data.append (";</script>") data.append (";</script>")
data.append ("<script src=%"//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js%"></script>") data.append ("<script src=%"/jquery.min.js%"></script>")
data.append ("<script src=%"//cdnjs.cloudflare.com/ajax/libs/typeahead.js/0.9.3/typeahead.min.js%"></script>") data.append ("<script src=%"/typeahead.min.js%"></script>")
data.append ("<script src=%"/widget.js%"></script>") data.append ("<script src=%"/widget.js%"></script>")
data.append ("</body></html>") data.append ("</body></html>")
create page.make create page.make