Add Basepath

This commit is contained in:
YNH Webdev
2014-03-05 15:05:26 +01:00
parent 605a094910
commit d4b877f18e

View File

@@ -25,8 +25,14 @@ inherit
feature {NONE} -- Initialization feature {NONE} -- Initialization
make (req: WSF_REQUEST; res: WSF_RESPONSE) make (req: WSF_REQUEST; res: WSF_RESPONSE)
do
make_with_base_path (req, res, "/")
end
make_with_base_path (req: WSF_REQUEST; res: WSF_RESPONSE; a_base_path: STRING_32)
-- Initialize -- Initialize
do do
base_path := a_base_path
control_name := req.request_time_stamp.out control_name := req.request_time_stamp.out
make_control ("body") make_control ("body")
request := req request := req
@@ -119,12 +125,20 @@ feature -- Implementation
create Result.make_empty create Result.make_empty
if not ajax then if not ajax then
Result.append ("<html><head>") Result.append ("<html><head>")
Result.append ("<link href=%"/assets/bootstrap.min.css%" rel=%"stylesheet%">") Result.append ("<link href=%"")
Result.append ("<link href=%"/assets/widget.css%" rel=%"stylesheet%">") Result.append (base_path)
Result.append ("assets/bootstrap.min.css%" rel=%"stylesheet%">")
Result.append ("<link href=%"")
Result.append (base_path)
Result.append ("assets/widget.css%" rel=%"stylesheet%">")
Result.append ("</head><body data-name=%"" + control_name + "%" data-type=%"WSF_PAGE_CONTROL%">") Result.append ("</head><body data-name=%"" + control_name + "%" data-type=%"WSF_PAGE_CONTROL%">")
Result.append (control.render) Result.append (control.render)
Result.append ("<script src=%"/assets/jquery.min.js%"></script>") Result.append ("<script src=%"")
Result.append ("<script src=%"/assets/widget.js%"></script>") Result.append (base_path)
Result.append ("assets/jquery.min.js%"></script>")
Result.append ("<script src=%"")
Result.append (base_path)
Result.append ("assets/widget.js%"></script>")
Result.append ("<script type=%"text/javascript%">$(function() {var page= new WSF_PAGE_CONTROL(") Result.append ("<script type=%"text/javascript%">$(function() {var page= new WSF_PAGE_CONTROL(")
Result.append (full_state.representation) Result.append (full_state.representation)
Result.append (");page.initialize();});</script>") Result.append (");page.initialize();});</script>")
@@ -198,6 +212,8 @@ feature
control_name: STRING_32 control_name: STRING_32
base_path: STRING_32
feature {NONE} -- Root control feature {NONE} -- Root control
control: WSF_CONTROL control: WSF_CONTROL