Commit dbf49dedb72c107c351a5dcc39566e44fce60ac2
1 parent
9422c7b2
Removing javascript on 'link' actioner.
Minor other changes.
Showing
1 changed file
with
39 additions
and
76 deletions
Show diff stats
calexium_lib/web/CXM_making_a_web_site.anubis
| ... | ... | @@ -646,7 +646,9 @@ public type Text_Option: |
| 646 | 646 | line_through, |
| 647 | 647 | nowrap, |
| 648 | 648 | class(String), //CSS class |
| 649 | - id(String). | |
| 649 | + id(String), | |
| 650 | +// name(String), | |
| 651 | + tooltip(String). | |
| 650 | 652 | |
| 651 | 653 | A list of 'Text_Option' must be given with each text you want to put in your page. |
| 652 | 654 | |
| ... | ... | @@ -910,11 +912,9 @@ public type Actioner_Target: |
| 910 | 912 | other(String window_name, List(Other_Window_Option)). |
| 911 | 913 | |
| 912 | 914 | public type Actioner_Aspect: |
| 913 | - link (List(Text_Option),String text), // hypertext link | |
| 915 | + link (List(Text_Option),String text, Maybe(String) name), // hypertext link | |
| 914 | 916 | push_button (List(CoreAttrs),String text), |
| 915 | 917 | submit (List(CoreAttrs),String text), |
| 916 | - button (String url_off, String url_on), // rollover button | |
| 917 | - button (String url_off, String url_on, Int32 w, Int32 h), // idem with size | |
| 918 | 918 | immediate_selector (WebArgName name, Int32 size, List((WebArgValue,String)) choices), |
| 919 | 919 | immediate_selector (WebArgName name, Int32 size, List((WebArgValue,String)) choices, InitialValue selected). |
| 920 | 920 | |
| ... | ... | @@ -927,9 +927,17 @@ public type Actioner_Local_Action: |
| 927 | 927 | public define Actioner_Aspect |
| 928 | 928 | link |
| 929 | 929 | ( |
| 930 | + List(Text_Option) options, | |
| 931 | + String text | |
| 932 | + ) = | |
| 933 | + link(options, text, failure). | |
| 934 | + | |
| 935 | +public define Actioner_Aspect | |
| 936 | + link | |
| 937 | + ( | |
| 930 | 938 | String text |
| 931 | 939 | ) = |
| 932 | - link([],text). | |
| 940 | + link([], text, failure). | |
| 933 | 941 | |
| 934 | 942 | |
| 935 | 943 | public define Actioner_Aspect |
| ... | ... | @@ -938,22 +946,15 @@ public define Actioner_Aspect |
| 938 | 946 | List(Text_Option) options, |
| 939 | 947 | Int32 i |
| 940 | 948 | ) = |
| 941 | - link(options,integer_to_string(i)). | |
| 949 | + link(options,integer_to_string(i), failure). | |
| 942 | 950 | |
| 943 | 951 | public define Actioner_Aspect |
| 944 | 952 | link |
| 945 | 953 | ( |
| 946 | 954 | Int32 i |
| 947 | 955 | ) = |
| 948 | - link([],i). | |
| 949 | - | |
| 950 | -public define Actioner_Aspect | |
| 951 | - button | |
| 952 | - ( | |
| 953 | - String url_img | |
| 954 | - ) = | |
| 955 | - button(url_img,url_img). | |
| 956 | - | |
| 956 | + link([], i). | |
| 957 | + | |
| 957 | 958 | |
| 958 | 959 | |
| 959 | 960 | Actioners are explained in details below. |
| ... | ... | @@ -2837,6 +2838,10 @@ define List(Text_Option) |
| 2837 | 2838 | get_text_options(t) |
| 2838 | 2839 | else if h is id(_) then |
| 2839 | 2840 | get_text_options(t) |
| 2841 | +// else if h is name(_) then | |
| 2842 | +// get_text_options(t) | |
| 2843 | + else if h is tooltip(_) then | |
| 2844 | + get_text_options(t) | |
| 2840 | 2845 | else |
| 2841 | 2846 | [ h . get_text_options(t) ] |
| 2842 | 2847 | |
| ... | ... | @@ -2861,6 +2866,10 @@ define List(CoreAttrs) |
| 2861 | 2866 | [ class(name) . get_css_class(t) ] |
| 2862 | 2867 | else if h is id(name) then |
| 2863 | 2868 | [ id(name) . get_css_class(t) ] |
| 2869 | +// else if h is name(the_name) then | |
| 2870 | +// [ name(the_name) . get_css_class(t) ] | |
| 2871 | + else if h is tooltip(name) then | |
| 2872 | + [ tooltip(name) . get_css_class(t) ] | |
| 2864 | 2873 | else |
| 2865 | 2874 | get_css_class(t) |
| 2866 | 2875 | } |
| ... | ... | @@ -3052,13 +3061,11 @@ define Maybe(String) |
| 3052 | 3061 | ) = |
| 3053 | 3062 | if aspect is |
| 3054 | 3063 | { |
| 3055 | - link(_,_) then failure, | |
| 3056 | - push_button(opts,_) then extract_id(opts), | |
| 3057 | - submit(opts,_) then extract_id(opts), | |
| 3058 | - button(_,_) then failure, | |
| 3059 | - button(_,_,_,_) then failure, | |
| 3060 | - immediate_selector(_,_,_) then failure, | |
| 3061 | - immediate_selector(_,_,_,_) then failure, | |
| 3064 | + link(_,_,_) then failure, | |
| 3065 | + push_button(opts,_) then extract_id(opts), | |
| 3066 | + submit(opts,_) then extract_id(opts), | |
| 3067 | + immediate_selector(_,_,_) then failure, | |
| 3068 | + immediate_selector(_,_,_,_) then failure, | |
| 3062 | 3069 | }. |
| 3063 | 3070 | |
| 3064 | 3071 | define Printable_tree |
| ... | ... | @@ -3082,18 +3089,13 @@ define Printable_tree |
| 3082 | 3089 | if aspect is |
| 3083 | 3090 | { |
| 3084 | 3091 | |
| 3085 | - link(opt, text) then [ | |
| 3086 | - if action is | |
| 3087 | - { | |
| 3088 | - url(u) then | |
| 3089 | - ["<a href=\"",u,"\"", format_text_options(opt), ">"], | |
| 3090 | -// ["<a href=\"",u,"\" style=\"",format(reverse(opt)),"\">"], | |
| 3091 | - javascript(s,h) then | |
| 3092 | - [s,"<a href=\"javascript: ",h,"\">"] | |
| 3093 | - }, | |
| 3092 | + link(opt, text, mb_name) then | |
| 3093 | + with name_tag = if mb_name is success(n) then " name=\" " + n + "\"" else "", | |
| 3094 | + [ | |
| 3095 | + "<a href=\"", url, "\"", format_text_options(opt), name_tag, ">", | |
| 3094 | 3096 | text, |
| 3095 | - "</a>" | |
| 3096 | - ], | |
| 3097 | + "</a>" | |
| 3098 | + ], | |
| 3097 | 3099 | |
| 3098 | 3100 | push_button(options, text) then |
| 3099 | 3101 | [ |
| ... | ... | @@ -3122,32 +3124,6 @@ define Printable_tree |
| 3122 | 3124 | } |
| 3123 | 3125 | ], |
| 3124 | 3126 | |
| 3125 | - button(url_off,url_on) then | |
| 3126 | - [ if action is | |
| 3127 | - { | |
| 3128 | - url(u) then ["<a href=\"",u], | |
| 3129 | - javascript(s,h) then [s,"<a onmousedown=\"",h] | |
| 3130 | - }, | |
| 3131 | - "\" style=\"text-decoration:none\">", | |
| 3132 | - "<img alt=\"",url_off,"\" src=\"",url_off,"\" border=\"0\"", | |
| 3133 | - " onmouseover=\"this.src='",url_on,"'\" ", | |
| 3134 | - " onmouseout=\"this.src='",url_off,"'\">", | |
| 3135 | - "</a>" | |
| 3136 | - ], | |
| 3137 | - | |
| 3138 | - button(url_off,url_on,w,h) then | |
| 3139 | - [ if action is | |
| 3140 | - { | |
| 3141 | - url(u) then ["<a href=\"",u], | |
| 3142 | - javascript(s,h) then [s,"<a onmousedown=\"",h] | |
| 3143 | - }, | |
| 3144 | - "\" style=\"text-decoration:none\">", | |
| 3145 | - "<img width=\"",w,"\" height=\"",h,"\" alt=\"",url_off,"\" src=\"",url_off,"\" border=\"0\"", | |
| 3146 | - " onmouseover=\"this.src='",url_on,"'\" ", | |
| 3147 | - " onmouseout=\"this.src='",url_off,"'\">", | |
| 3148 | - "</a>" | |
| 3149 | - ], | |
| 3150 | - | |
| 3151 | 3127 | immediate_selector(name,size,choices) then |
| 3152 | 3128 | [ if action is |
| 3153 | 3129 | { |
| ... | ... | @@ -3184,23 +3160,9 @@ define Printable_tree |
| 3184 | 3160 | "<a href=\"javascript:show_local_popup('lpu_",n,"','lpust_",n,"');\">", |
| 3185 | 3161 | if aspect is |
| 3186 | 3162 | { |
| 3187 | - link(opt,text) then [text], | |
| 3163 | + link(opt,text,name) then [text], | |
| 3188 | 3164 | push_button(opt, text) then [text], |
| 3189 | 3165 | submit(opt, text) then [text], |
| 3190 | - button(url_off,url_on) then | |
| 3191 | - [ | |
| 3192 | - "<img alt=\"",url_off,"\" src=\"",url_off,"\" border=0", | |
| 3193 | - " onMouseOver=\"this.src='",url_on,"'\" ", | |
| 3194 | - " onMouseOut=\"this.src='",url_off,"'\">", | |
| 3195 | - ], | |
| 3196 | - | |
| 3197 | - button(url_off,url_on,w,h) then | |
| 3198 | - [ | |
| 3199 | - "<img width=",w," height=",h," alt=\"",url_off,"\" src=\"",url_off,"\" border=0", | |
| 3200 | - " onMouseOver=\"this.src='",url_on,"'\" ", | |
| 3201 | - " onMouseOut=\"this.src='",url_off,"'\">", | |
| 3202 | - ], | |
| 3203 | - | |
| 3204 | 3166 | immediate_selector(name,size,choices) then alert, |
| 3205 | 3167 | immediate_selector(name,size,choices,selected) then alert, |
| 3206 | 3168 | |
| ... | ... | @@ -3474,8 +3436,9 @@ define String |
| 3474 | 3436 | justified then "text-align:justify", |
| 3475 | 3437 | line_through then "text-decoration:line-through", |
| 3476 | 3438 | nowrap then "white-space:nowrap", |
| 3477 | - class(class_name)then " class=\"" +class_name +"\"", | |
| 3478 | - id(id_name) then " id=\"" +id_name +"\"" | |
| 3439 | + class(class_name)then " class=\"" + class_name +"\"", | |
| 3440 | + id(id_name) then " id=\"" + id_name +"\"" | |
| 3441 | + tooltip(title) then " title=\"" + title +"\"" | |
| 3479 | 3442 | } + if t is [ ] then "" else ("; "+format(t)) |
| 3480 | 3443 | }. |
| 3481 | 3444 | ... | ... |