Commit 87fea19b528c2b678a9c7237f847078ce830c0c6
1 parent
6cc206ce
update html_tooltip with the new format of data inside the attributes
Showing
2 changed files
with
16 additions
and
13 deletions
Show diff stats
web/making_a_web_site.anubis
| @@ -4716,12 +4716,14 @@ public define List(CoreAttrs) | @@ -4716,12 +4716,14 @@ public define List(CoreAttrs) | ||
| 4716 | //["<a id=\"help_",keyword,"\" class=\"jTipu \" name=\"",title,"\" href=\"/?a=ajax_show_tooltip&tooltip_id=",keyword,(if width > 0 then ["&width=",width,"\""] else ["\""]), "><i class=\"fa fa-info\" aria-hidden=\"true\" style=\"color:#2e6da4\"></i></a>"], | 4716 | //["<a id=\"help_",keyword,"\" class=\"jTipu \" name=\"",title,"\" href=\"/?a=ajax_show_tooltip&tooltip_id=",keyword,(if width > 0 then ["&width=",width,"\""] else ["\""]), "><i class=\"fa fa-info\" aria-hidden=\"true\" style=\"color:#2e6da4\"></i></a>"], |
| 4717 | 4717 | ||
| 4718 | html_tooltip_ext(title, extend_type, class_suffix, ext_args) then //TODO | 4718 | html_tooltip_ext(title, extend_type, class_suffix, ext_args) then //TODO |
| 4719 | - [] | ||
| 4720 | - //with extra_args = format_extra_operands(ext_args), | ||
| 4721 | - //["<a id=\"jTip\" class=\"jTipu jTip_",class_suffix,"\" name=\"",title,"\" href=\"/?a=ajax_show_tooltip&tooltip_ext=",extend_type+extra_args,"\"></a>"] | 4719 | + //[] |
| 4720 | + with extra_args = format_extra_operands(ext_args), | ||
| 4721 | + [id("jTip"), class("jTipu jTip_"+class_suffix), data("name",title), data("href", "/?a=ajax_show_tooltip&tooltip_ext="+extend_type+extra_args)] | ||
| 4722 | 4722 | ||
| 4723 | html_tooltip_ext(title, extend_type, ext_args) then //TODO | 4723 | html_tooltip_ext(title, extend_type, ext_args) then //TODO |
| 4724 | - [] | 4724 | + with extra_args = format_extra_operands(ext_args), |
| 4725 | + [id("jTip"), class("jTipu"), data("name",title), data("href", "/?a=ajax_show_tooltip&tooltip_ext="+extend_type+extra_args)] | ||
| 4726 | +// [] | ||
| 4725 | //with extra_args = format_extra_operands(ext_args), | 4727 | //with extra_args = format_extra_operands(ext_args), |
| 4726 | //["<a id=\"jTip\" class=\"jTipu \" name=\"",title,"\" href=\"/?a=ajax_show_tooltip&tooltip_ext=",extend_type+extra_args,"\"><i class=\"fa fa-info\" aria-hidden=\"true\" style=\"color:#2e6da4\"></i></a>"], | 4728 | //["<a id=\"jTip\" class=\"jTipu \" name=\"",title,"\" href=\"/?a=ajax_show_tooltip&tooltip_ext=",extend_type+extra_args,"\"><i class=\"fa fa-info\" aria-hidden=\"true\" style=\"color:#2e6da4\"></i></a>"], |
| 4727 | 4729 | ||
| @@ -4745,17 +4747,17 @@ public define Printable_tree | @@ -4745,17 +4747,17 @@ public define Printable_tree | ||
| 4745 | if tooltip is | 4747 | if tooltip is |
| 4746 | { | 4748 | { |
| 4747 | html_tooltip(title, keyword, width) then | 4749 | html_tooltip(title, keyword, width) then |
| 4748 | - ["<a id=\"help_",keyword,"\" class=\"jTipu \" name=\"",title,"\" href=\"/?a=ajax_show_tooltip&tooltip_id=",keyword,(if width > 0 then ["&width=",width,"\""] else ["\""]), "><i class=\"fa fa-info\" aria-hidden=\"true\" style=\"color:#2e6da4\"></i></a>"], | 4750 | + ["<a id=\"help_",keyword,"\" class=\"jTipu \" data-name=\"",title,"\" data-href=\"/?a=ajax_show_tooltip&tooltip_id=",keyword,(if width > 0 then ["&width=",width,"\""] else ["\""]), "><i class=\"fa fa-info\" aria-hidden=\"true\" style=\"color:#2e6da4\"></i></a>"], |
| 4749 | 4751 | ||
| 4750 | html_tooltip_ext(title, extend_type, class_suffix, ext_args) then | 4752 | html_tooltip_ext(title, extend_type, class_suffix, ext_args) then |
| 4751 | with extra_args = format_extra_operands(ext_args), | 4753 | with extra_args = format_extra_operands(ext_args), |
| 4752 | - ["<a id=\"jTip\" class=\"jTipu jTip_",class_suffix,"\" name=\"",title,"\" href=\"/?a=ajax_show_tooltip&tooltip_ext=",extend_type+extra_args,"\"></a>"] | 4754 | + ["<a id=\"jTip\" class=\"jTipu jTip_",class_suffix,"\" data-name=\"",title,"\" data-href=\"/?a=ajax_show_tooltip&tooltip_ext=",extend_type+extra_args,"\"></a>"] |
| 4753 | 4755 | ||
| 4754 | html_tooltip_ext(title, extend_type, ext_args) then | 4756 | html_tooltip_ext(title, extend_type, ext_args) then |
| 4755 | with extra_args = format_extra_operands(ext_args), | 4757 | with extra_args = format_extra_operands(ext_args), |
| 4756 | - ["<a id=\"jTip\" class=\"jTipu \" name=\"",title,"\" href=\"/?a=ajax_show_tooltip&tooltip_ext=",extend_type+extra_args,"\"><i class=\"fa fa-info\" aria-hidden=\"true\" style=\"color:#2e6da4\"></i></a>"], | 4758 | + ["<a id=\"jTip\" class=\"jTipu \" data-name=\"",title,"\" data-href=\"/?a=ajax_show_tooltip&tooltip_ext=",extend_type+extra_args,"\"><i class=\"fa fa-info\" aria-hidden=\"true\" style=\"color:#2e6da4\"></i></a>"], |
| 4757 | html_tooltip(title, web_action, extra_args) then | 4759 | html_tooltip(title, web_action, extra_args) then |
| 4758 | - ["<a id=\"jTip\" class=\"jTipu \" name=\"",title,"\" href=\"/", format_web_action_name(web_action, extra_args) ,"\"><i class=\"fa fa-info\" aria-hidden=\"true\" style=\"color:#2e6da4\"></i></a>"], | 4760 | + ["<a id=\"jTip\" class=\"jTipu \" data-name=\"",title,"\" data-href=\"/", format_web_action_name(web_action, extra_args) ,"\"><i class=\"fa fa-info\" aria-hidden=\"true\" style=\"color:#2e6da4\"></i></a>"], |
| 4759 | 4761 | ||
| 4760 | } | 4762 | } |
| 4761 | . | 4763 | . |
web/widgets/css_helper.anubis
| @@ -237,14 +237,14 @@ public define HTML_Partial_Content | @@ -237,14 +237,14 @@ public define HTML_Partial_Content | ||
| 237 | 237 | ||
| 238 | actioner(same,same, link([id("help_" + keyword), class("jTip jTip_help"), attr("target", "_blank")], " ", success(title)), "ajax_show_tooltip", [("tooltip_id", keyword)], []). | 238 | actioner(same,same, link([id("help_" + keyword), class("jTip jTip_help"), attr("target", "_blank")], " ", success(title)), "ajax_show_tooltip", [("tooltip_id", keyword)], []). |
| 239 | 239 | ||
| 240 | -public define HTML_Off_Form | 240 | + public define HTML_Off_Form |
| 241 | html_tooltip | 241 | html_tooltip |
| 242 | ( | 242 | ( |
| 243 | String title, | 243 | String title, |
| 244 | String keyword, | 244 | String keyword, |
| 245 | Int width | 245 | Int width |
| 246 | ) = | 246 | ) = |
| 247 | - a([id("help_"+keyword), class("jTipu jTip_help"), attr("name",title)], href(action_name("ajax_show_tooltip"), [("tooltip_id",keyword),("width",to_String(width))])). | 247 | + a([id("help_"+keyword), class("jTipu jTip_help"), data("name",title)], data("href",format_web_action_name(action_name("ajax_show_tooltip"), [("tooltip_id",keyword),("width",to_String(width))]))). |
| 248 | 248 | ||
| 249 | // literal("<a id=\"help_"+keyword+"\" class=\"jTipu jTip_help\" name=\""+title+"\" href=\"/?a=ajax_show_tooltip&tooltip_id="+keyword+"&width="+width+"\"></a>"). | 249 | // literal("<a id=\"help_"+keyword+"\" class=\"jTipu jTip_help\" name=\""+title+"\" href=\"/?a=ajax_show_tooltip&tooltip_id="+keyword+"&width="+width+"\"></a>"). |
| 250 | 250 | ||
| @@ -269,7 +269,7 @@ public define HTML_In_Form | @@ -269,7 +269,7 @@ public define HTML_In_Form | ||
| 269 | String keyword, | 269 | String keyword, |
| 270 | Int width, | 270 | Int width, |
| 271 | ) = | 271 | ) = |
| 272 | - literal("<a id=\"help_"+keyword+"\" class=\"jTipu jTip_help\" name=\""+title+"\" href=\"/?a=ajax_show_tooltip&tooltip_id="+keyword+"&width="+width+"\"></a>"). | 272 | + literal("<a id=\"help_"+keyword+"\" class=\"jTipu jTip_help\" data-name=\""+title+"\" data-href=\"/?a=ajax_show_tooltip&tooltip_id="+keyword+"&width="+width+"\"></a>"). |
| 273 | 273 | ||
| 274 | actioner(same,same, link([id("help_" + keyword), class("jTip jTip_help"), attr("target", "_blank")], " ", success(title)), "ajax_show_tooltip", [("tooltip_id", keyword), ("width", to_decimal(width))], []). | 274 | actioner(same,same, link([id("help_" + keyword), class("jTip jTip_help"), attr("target", "_blank")], " ", success(title)), "ajax_show_tooltip", [("tooltip_id", keyword), ("width", to_decimal(width))], []). |
| 275 | 275 | ||
| @@ -291,7 +291,7 @@ public define HTML_Off_Form | @@ -291,7 +291,7 @@ public define HTML_Off_Form | ||
| 291 | List((String, String)) ext_args | 291 | List((String, String)) ext_args |
| 292 | ) = | 292 | ) = |
| 293 | with extra_args = format_extra_operands(ext_args), | 293 | with extra_args = format_extra_operands(ext_args), |
| 294 | - literal("<a id=\"help_"+keyword+"\" class=\"jTipu jTip_"+class_suffix+"\" name=\""+title+"\" href=\"/?a=ajax_show_tooltip&tooltip_ext="+keyword+extra_args+"\"></a>"). | 294 | + literal("<a id=\"help_"+keyword+"\" class=\"jTipu jTip_"+class_suffix+"\" data-name=\""+title+"\" data-href=\"/?a=ajax_show_tooltip&tooltip_ext="+keyword+extra_args+"\"></a>"). |
| 295 | 295 | ||
| 296 | actioner(same,same, link([id("help_" + keyword), class("jTip jTip_"+class_suffix), attr("target", "_blank")], " ", success(title)), "ajax_show_tooltip", [("tooltip_ext", keyword)] + ext_args, []). | 296 | actioner(same,same, link([id("help_" + keyword), class("jTip jTip_"+class_suffix), attr("target", "_blank")], " ", success(title)), "ajax_show_tooltip", [("tooltip_ext", keyword)] + ext_args, []). |
| 297 | 297 | ||
| @@ -313,7 +313,8 @@ public define HTML_In_Form | @@ -313,7 +313,8 @@ public define HTML_In_Form | ||
| 313 | List((String, String)) ext_args | 313 | List((String, String)) ext_args |
| 314 | ) = | 314 | ) = |
| 315 | with extra_args = format_extra_operands(ext_args), | 315 | with extra_args = format_extra_operands(ext_args), |
| 316 | - literal("<a id=\"help_"+keyword+"\" class=\"jTipu jTip_"+class_suffix+"\" name=\""+title+"\" href=\"/?a=ajax_show_tooltip&tooltip_ext="+keyword+extra_args+"\"></a>"). | 316 | + |
| 317 | + literal("<a id=\"help_"+keyword+"\" class=\"jTipu jTip_"+class_suffix+"\" data-name=\""+title+"\" data-href=\"/?a=ajax_show_tooltip&tooltip_ext="+keyword+extra_args+"\"></a>"). | ||
| 317 | 318 | ||
| 318 | 319 | ||
| 319 | href=\"/?a=ajax_show_tooltip&tooltip_id="+keyword+"\" id=\"help_"+keyword+HELP_HMS_MODE" class="jTip jTip_help" target="_blank" name="Aide sur la fonctionnalité 'No Limit'"> </a>"). | 320 | href=\"/?a=ajax_show_tooltip&tooltip_id="+keyword+"\" id=\"help_"+keyword+HELP_HMS_MODE" class="jTip jTip_help" target="_blank" name="Aide sur la fonctionnalité 'No Limit'"> </a>"). |