diff --git a/calexium_lib/web/CXM_making_a_web_site.anubis b/calexium_lib/web/CXM_making_a_web_site.anubis
index cc11b15..b80cda1 100644
--- a/calexium_lib/web/CXM_making_a_web_site.anubis
+++ b/calexium_lib/web/CXM_making_a_web_site.anubis
@@ -916,7 +916,8 @@ public type Actioner_Target:
other(String window_name, List(Other_Window_Option)).
public type Actioner_Aspect:
- link (List(Text_Option),String text, Maybe(String) name), // hypertext link
+ link (List(Text_Option), String url, Maybe(String) name),// hypertext link
+ img_link (String url, String img_url),
push_button (List(CoreAttrs),String text),
button (String url_off, String url_on), // rollover button
button (String url_off, String url_on, Int32 w, Int32 h), // idem with size
@@ -993,9 +994,10 @@ public type HTML_In_Form:
HTML_In_Form content),
actioner (Actioner_Connection, Actioner_Target, Actioner_Aspect,
String action_name, List((String,String)) extra_ops,
- List(Actioner_Local_Action)),
+ List(Actioner_Local_Action)),
+ foreign_link_new (Actioner_Target, Actioner_Aspect, String url),
foreign_link (List(Text_Option), String url),
- foreign_link (List(Text_Option), String url, String name),
+ foreign_link (List(Text_Option), String url, String name),
private_download (String abs_path, String name, String extra_ext,
Maybe((String,List((String,String)))) action),
text_input (List(InputAttrs), String label_text, HtmlId id, WebArgName name, InitialValue init, Int32 width),
@@ -1178,6 +1180,7 @@ public type HTML_Off_Form:
actioner (Actioner_Connection, Actioner_Target, Actioner_Aspect,
String action_name, List((String,String)) extra_ops,
List(Actioner_Local_Action), String form_name),
+ foreign_link_new (Actioner_Target, Actioner_Aspect, String url),
foreign_link (List(Text_Option), String url),
foreign_link (List(Text_Option), String url, String name),
private_download (String abs_path, String name, String extra_ext,
@@ -2409,6 +2412,7 @@ type HTML_Any($T):
List((String,String)) extra_ops,
List(Actioner_Local_Action),
Maybe(String) form_name),
+ any_foreign_link_new (Actioner_Target, Actioner_Aspect, String url),
any_foreign_link (List(Text_Option), String url),
any_foreign_link (List(Text_Option), String url, String name),
any_private_download (String abs_path, String name, String extra_ext,
@@ -2800,10 +2804,27 @@ define String
same then strict_url,
same(label) then strict_url+"#"+label,
other(wn,ops) then
+
"javascript:void window.open('"+strict_url+"&t="+wn+"','"+
"w"+to_ascii(sha1(wn))+"','"+format(ops)+"')"
}.
+define String
+ make_foreign_link_url
+ (
+ Actioner_Target target,
+ String url
+ ) =
+ if target is
+ {
+ same then "/",
+ same(label) then "/#"+label,
+ other(wn,ops) then
+
+ "javascript:void window.open('"+url+"','"+
+ "w"+to_ascii(sha1(wn))+"','"+format(ops)+"')"
+ }.
+
Depending on the fact that the actioner refers to a form or not, the URL is used in two
different ways. If the actioner does not refer to a form, it is realized by a ''
@@ -3096,6 +3117,7 @@ define Maybe(String)
if aspect is
{
link(_,_,_) then failure,
+ img_link(_,_) then failure,
push_button(opts,_) then extract_id(opts),
button(_,_) then failure,
button(_,_,_,_) then failure,
@@ -3103,7 +3125,55 @@ define Maybe(String)
immediate_selector(_,_,_) then failure,
immediate_selector(_,_,_,_) then failure,
}.
-
+
+to do Complete format_foreign_link
+//TODO Complete format_foreign_link
+define Printable_tree
+ format_foreign_link
+ (
+// CommonInfo cinfo,
+ Actioner_Target target,
+ Actioner_Aspect aspect,
+ String url,
+ Bool is_https,
+ ) =
+ //if cinfo is info(common_name,http_port,https_port,site_dir,secret) then
+ with url = make_foreign_link_url(target,url),
+// with action = format_action(url, aspect, extract_id(aspect), mb_form_name),
+ if aspect is
+ {
+
+ link(opt, text, mb_name) then
+ with name_tag = if mb_name is success(n) then " name=\"" + n + "\"" else "",
+ [
+ "",
+ text,
+ ""
+ ],
+ img_link(_, img) then
+ [
+ "
"
+ ],
+ push_button(options, text) then
+ ["",
+ text, ""
+ ],
+ button(url_off,url_on) then
+ [ ],
+
+ button(url_off,url_on,w,h) then
+ [ ],
+
+ submit(options, text) then
+ [ ],
+
+ immediate_selector(name,size,choices) then
+ [ ],
+ immediate_selector(name,size,choices,selected) then
+ [ ],
+ }.
+
define Printable_tree
format_actioner
(
@@ -3132,7 +3202,11 @@ define Printable_tree
text,
""
],
-
+ img_link(url1, img) then
+ [
+ "
"
+ ],
push_button(options, text) then
[
if action is
@@ -3226,6 +3300,7 @@ define Printable_tree
if aspect is
{
link(opt,text,name) then [text],
+ img_link(url, img_url) then [url],
push_button(opt, text) then [text],
button(url_off,url_on) then
[
@@ -3689,6 +3764,10 @@ define Printable_tree
""],
any_actioner(c,t,a,an,eo,ja,fn) then
format_actioner(cinfo,sn,c,t,a,an,eo,ja,fn,is_https),
+
+ any_foreign_link_new(target, aspect, url) then
+ format_foreign_link(target, aspect, url, is_https),
+
any_foreign_link(options,url) then
[""], // IE7 doesn't support the form
any_foreign_link(options,url,name) then
@@ -3755,7 +3834,11 @@ define Printable_tree
scroller(w,h,cw,ch,c) then
format(cinfo,sn,ic_v,any_scroller(w,h,cw,ch,c),format_element,is_https),
actioner(c,t,a,an,eo,ja) then
- format(cinfo,sn,ic_v,any_actioner(c,t,a,an,eo,ja,success(fn)),format_element,is_https),
+ format(cinfo,sn,ic_v,any_actioner(c,t,a,an,eo,ja,success(fn)),format_element,is_https),
+
+ foreign_link_new(target, aspect, url) then
+ format(cinfo,sn,ic_v,any_foreign_link_new(target,aspect,url),format_element,is_https),
+
foreign_link(options,url) then
format(cinfo,sn,ic_v,any_foreign_link(options,url),format_element,is_https),
foreign_link(options,url,name) then
@@ -3868,6 +3951,7 @@ define Bool
mail_to(m,e) then false, // 'e' may but should not contain an upload
scroller(w,h,cw,ch,e) then contains_an_upload(e),
actioner(c,t,a,an,eo,ja) then false,
+ foreign_link_new(_,_,_) then false,
foreign_link(o,u) then false,
foreign_link(o,u,n) then false,
private_download(p,n,e,a) then false,
@@ -3942,6 +4026,8 @@ define Printable_tree
format(cinfo,sn,ic_v,any_actioner(c,t,a,an,eo,ja,failure),format_element,is_https),
actioner(c,t,a,an,eo,ja,fn) then
format(cinfo,sn,ic_v,any_actioner(c,t,a,an,eo,ja,success(fn)),format_element,is_https),
+ foreign_link_new(target, aspect, url) then
+ format(cinfo,sn,ic_v,any_foreign_link_new(target,aspect,url),format_element,is_https),
foreign_link(options,url) then
format(cinfo,sn,ic_v,any_foreign_link(options,url),format_element,is_https),
foreign_link(options,url,name) then
--
libgit2 0.21.4