Commit ead0383b4fb1c5faf48cd8874d9bb3520d5f5649

Authored by Cédric RICARD
1 parent 69e1e2bb

Little API changes on ActionerAspect.img_link alternative

Showing 1 changed file with 6 additions and 44 deletions   Show diff stats
calexium_lib/web/CXM_making_a_web_site.anubis
... ... @@ -916,8 +916,8 @@ public type Actioner_Target:
916 916 other(String window_name, List(Other_Window_Option)).
917 917  
918 918 public type Actioner_Aspect:
919   - link (List(Text_Option), String url, Maybe(String) name),// hypertext link
920   - img_link (String url, String img_url),
  919 + link (List(Text_Option), String text, Maybe(String) name),// hypertext link
  920 + img_link (String img_url, String alt_text),
921 921 push_button (List(CoreAttrs),String text),
922 922 button (String url_off, String url_on), // rollover button
923 923 button (String url_off, String url_on, Int32 w, Int32 h), // idem with size
... ... @@ -3180,10 +3180,10 @@ define Printable_tree
3180 3180 text,
3181 3181 "</a>"
3182 3182 ],
3183   - img_link(_, img) then
  3183 + img_link(img,alt_text) then
3184 3184 [
3185 3185 "<a href=\"", url ,"\"><img src=\"", img,
3186   - "\" border=\"0\"></a>"
  3186 + "\" alt=\"" + alt_text + "\" border=\"0\"></a>"
3187 3187 ],
3188 3188 push_button(options, text) then
3189 3189 ["<a href=\"",url,"\"", format_attrs(options), ">",
... ... @@ -3232,10 +3232,10 @@ define Printable_tree
3232 3232 text,
3233 3233 "</a>"
3234 3234 ],
3235   - img_link(url1, img) then
  3235 + img_link(img, alt_text) then
3236 3236 [
3237 3237 "<a href=\"", url ,"\"><img src=\"", img,
3238   - "\" border=\"0\"></a>"
  3238 + "\" alt=\"" + alt_text + "\" border=\"0\"></a>"
3239 3239 ],
3240 3240 push_button(options, text) then
3241 3241 [
... ... @@ -3314,45 +3314,7 @@ define Printable_tree
3314 3314 }.
3315 3315  
3316 3316  
3317   -define Printable_tree
3318   - format_local_popup_button
3319   - (
3320   - CommonInfo cinfo,
3321   - Actioner_Aspect aspect,
3322   - Int32 n,
3323   - ) =
3324   - if cinfo is info(common_name,http_port,https_port,site_dir,secret) then
3325   - [ "<script type=\"text/javascript\" language=\"JavaScript\">",
3326   - " var lpust_",n," = new Array(); ",
3327   - " lpust_",n,"[0] = 0; ",
3328   - "</script>\n",
3329   - "<a href=\"javascript:show_local_popup('lpu_",n,"','lpust_",n,"');\">",
3330   - if aspect is
3331   - {
3332   - link(opt,text,name) then [text],
3333   - img_link(url, img_url) then [url],
3334   - push_button(opt, text) then [text],
3335   - button(url_off,url_on) then
3336   - [
3337   - "<img alt=\"",url_off,"\" src=\"",url_off,"\" border=0",
3338   - " onMouseOver=\"this.src='",url_on,"'\" ",
3339   - " onMouseOut=\"this.src='",url_off,"'\">",
3340   - ],
3341   -
3342   - button(url_off,url_on,w,h) then
3343   - [
3344   - "<img width=",w," height=",h," alt=\"",url_off,"\" src=\"",url_off,"\" border=0",
3345   - " onMouseOver=\"this.src='",url_on,"'\" ",
3346   - " onMouseOut=\"this.src='",url_off,"'\">",
3347   - ],
3348   - submit(opt, text) then [text],
3349   - immediate_selector(options,name,size,choices) then alert,
3350   - immediate_selector(options,name,size,choices,selected) then alert,
3351 3317  
3352   - },
3353   - "</a>"].
3354   -
3355   -
3356 3318  
3357 3319  
3358 3320  
... ...