Commit 146ac75b791c9e3c6867e07da3396264ba7940cb

Authored by David RENÉ
1 parent 53d782c7

add format_web_action_name with only one extra argument

Showing 1 changed file with 21 additions and 14 deletions   Show diff stats
web/CXM_web_action.anubis
@@ -10,19 +10,6 @@ read system/string.anubis @@ -10,19 +10,6 @@ read system/string.anubis
10 10
11 transmit xlib/web/types/web_action_name.anubis 11 transmit xlib/web/types/web_action_name.anubis
12 transmit xlib/web/CXM_urllib.anubis 12 transmit xlib/web/CXM_urllib.anubis
13 -//public type WEB_Action_Name:  
14 -// controller_action(  
15 -// String controller,  
16 -// String action_name  
17 -// ),  
18 -// action_name(  
19 -// String action_name  
20 -// ),  
21 -// //url is raw action, hence we will only copy that url in final link  
22 -// url(  
23 -// String url_name  
24 -// )  
25 -//.  
26 13
27 public define String 14 public define String
28 format_extra_operands 15 format_extra_operands
@@ -58,7 +45,7 @@ public define String @@ -58,7 +45,7 @@ public define String
58 if action is 45 if action is
59 { 46 {
60 no_action then "", 47 no_action then "",
61 - controller_action(controller, action_name) then "?aws_controller="+controller+"&aws_action="+action_name, 48 + controller_action(controller, action_name) then "?aws_c="+controller+"&aws_a="+action_name,
62 action_name(action_name) then "?aws_action="+action_name, 49 action_name(action_name) then "?aws_action="+action_name,
63 url(url) then url 50 url(url) then url
64 } 51 }
@@ -76,6 +63,17 @@ public define String @@ -76,6 +63,17 @@ public define String
76 . 63 .
77 64
78 public define String 65 public define String
  66 + format_web_action_name
  67 + (
  68 + WEB_Action_Name action,
  69 + (String,String) extra_ops
  70 + )=
  71 + format_web_action_name(action)
  72 + +
  73 + format_extra_operands([extra_ops])
  74 +.
  75 +
  76 +public define String
79 format_web_action_name_to_js 77 format_web_action_name_to_js
80 ( 78 (
81 WEB_Action_Name action, 79 WEB_Action_Name action,
@@ -87,6 +85,15 @@ public define String @@ -87,6 +85,15 @@ public define String
87 public define String 85 public define String
88 format_web_action_name_to_js 86 format_web_action_name_to_js
89 ( 87 (
  88 + WEB_Action_Name action,
  89 + (String,String) extra_ops,
  90 + )=
  91 + "'"+format_web_action_name(action, extra_ops)+"'"
  92 +.
  93 +
  94 +public define String
  95 + format_web_action_name_to_js
  96 + (
90 WEB_Action_Name action 97 WEB_Action_Name action
91 )= 98 )=
92 format_web_action_name_to_js(action, []) 99 format_web_action_name_to_js(action, [])