diff --git a/database/db_utils.anubis b/database/db_utils.anubis
index 72a25a9..6bf8028 100644
--- a/database/db_utils.anubis
+++ b/database/db_utils.anubis
@@ -262,10 +262,22 @@ public define Int
if table_cursor(unique) is
{
error(sql_error) then logError("DB", db_error(sql_error, "db_get_integer")); 0,
- no_more_row then 0, //can't find the symbol in the table, because the row is empty
+ no_more_row then 0,
row(explorer) then (Int)db_integer(explorer)(0)
}.
+public define Maybe(Int)
+ db_get_mb_integer
+ (
+ One -> SQLite3Row table_cursor
+ ) =
+ if table_cursor(unique) is
+ {
+ error(sql_error) then logError("DB", db_error(sql_error, "db_get_mb_integer")); failure,
+ no_more_row then failure,
+ row(explorer) then db_integer(explorer)(0)
+ }.
+
// sqlite3 API
public define List(Int)
db_get_integer_list
diff --git a/web/CXM_making_a_web_site.anubis b/web/CXM_making_a_web_site.anubis
index 9ac67b5..6568e9e 100644
--- a/web/CXM_making_a_web_site.anubis
+++ b/web/CXM_making_a_web_site.anubis
@@ -1331,7 +1331,14 @@ public type HTML_tooltip:
String title,
String extend_type,
List((String, String)) ext_args
+ ),
+ html_tooltip
+ (
+ String title,
+ WEB_Action_Name wan,
+ List((String, String)) ext_args
).
+
public define HTML_tooltip
html_tooltip
@@ -3401,7 +3408,7 @@ define WEB_Controller_Result
//println("apply_action ");
if actions_list is
{
- [] then http_answer(error_page(http_not_found, "No action found", _session)),
+ [] then http_answer(error_page(http_not_found, "["+requested_action_name+"] Action not found in all controllers", _session)),
[h . t] then
if h.name = no_action then
http_answer( _session, html_content(http_no_content, empty))
@@ -3974,18 +3981,18 @@ public define String
List(CoreAttrs) attributs
).
-public define String
- format_extra_operands
- (
- List((String,String)) l
- ) =
- if l is
- {
- [ ] then "",
- [h . t] then if h is (n,v) then
- "&"+n+"="+v+format_extra_operands(t)
- }
-.
+//public define String
+// format_extra_operands
+// (
+// List((String,String)) l
+// ) =
+// if l is
+// {
+// [ ] then "",
+// [h . t] then if h is (n,v) then
+// "&"+n+"="+v+format_extra_operands(t)
+// }
+//.
It seams that the standard requires "&" instead of "&" !
@@ -4088,30 +4095,30 @@ define Int
The next function composes the URL. It is a JavaScript URL when the target is another
window.
-public define String
- format_web_action_name
- (
- WEB_Action_Name action
- )=
- if action is
- {
- no_action then "",
- controller_action(controller, action_name) then "?aws_controller="+controller+"&aws_action="+action_name,
- action_name(action_name) then "?aws_action="+action_name,
- url(url) then url
- }
-.
-
-public define String
- format_web_action_name
- (
- WEB_Action_Name action,
- List((String,String)) extra_ops,
- )=
- format_web_action_name(action)
- +
- format_extra_operands(extra_ops)
-.
+//public define String
+// format_web_action_name
+// (
+// WEB_Action_Name action
+// )=
+// if action is
+// {
+// no_action then "",
+// controller_action(controller, action_name) then "?aws_controller="+controller+"&aws_action="+action_name,
+// action_name(action_name) then "?aws_action="+action_name,
+// url(url) then url
+// }
+//.
+//
+//public define String
+// format_web_action_name
+// (
+// WEB_Action_Name action,
+// List((String,String)) extra_ops,
+// )=
+// format_web_action_name(action)
+// +
+// format_extra_operands(extra_ops)
+//.
define String
make_actioner_url
@@ -5391,12 +5398,30 @@ public define Printable_tree
html_tooltip_ext(title, extend_type, ext_args) then
with extra_args = format_extra_operands(ext_args),
- [""]
+ [""],
+ html_tooltip(title, web_action, extra_args) then
+ [""],
+
}.
public define HTML_Off_Form
html_tooltip
(
+ String title,
+ WEB_Action_Name web_action,
+ List((String,String)) extra_args,
+ HTML_Off_Form html_element,
+ )=
+ sequence([
+ literal_pt([""]),
+ html_element,
+ literal_pt([""])
+ ])
+.
+
+public define HTML_Off_Form
+ html_tooltip
+ (
String title,
String keyword,
) =
diff --git a/web/CXM_web_action.anubis b/web/CXM_web_action.anubis
index 021ddae..5e1216f 100644
--- a/web/CXM_web_action.anubis
+++ b/web/CXM_web_action.anubis
@@ -6,6 +6,8 @@
* © Calexium
*/
+read system/string.anubis
+
transmit calexium_lib/web/types/web_action_name.anubis
//public type WEB_Action_Name:
// controller_action(
@@ -21,6 +23,14 @@ transmit calexium_lib/web/types/web_action_name.anubis
// )
//.
+public define String
+ format_extra_operands
+ (
+ List((String,String)) l_args
+ ) =
+ join("&", map(((String, String) arg) |-> since arg is (name, value), name+"="+value, l_args))
+.
+
public define String
to_Anubis_Source
(
@@ -34,3 +44,32 @@ public define String
url(url_name) then "url(\""+url_name+"\")"
}
.
+
+public define String
+ format_web_action_name
+ (
+ WEB_Action_Name action
+ )=
+
+ if action is
+ {
+ no_action then "",
+ controller_action(controller, action_name) then "?aws_controller="+controller+"&aws_action="+action_name,
+ action_name(action_name) then "?aws_action="+action_name,
+ url(url) then url
+ }
+.
+
+public define String
+ format_web_action_name
+ (
+ WEB_Action_Name action,
+ List((String,String)) extra_ops,
+ )=
+ format_web_action_name(action)
+ +
+ if length(extra_ops) = 0 then
+ ""
+ else
+ "&"+format_extra_operands(extra_ops)
+.
diff --git a/web/CXM_web_session.anubis b/web/CXM_web_session.anubis
index 01cd2ff..0ff92b6 100644
--- a/web/CXM_web_session.anubis
+++ b/web/CXM_web_session.anubis
@@ -16,9 +16,9 @@ read CXM_web_dump.anubis
public type WEB_Session_Field_Datum:
string(String), //fully implented
bool(Bool), //fully implented
- int(Int), //fully implented
+ int(Int), //fully implemented
db_id(DB_id),
- message(Message), //fully implented
+ message(Message), //fully implemented
byte_array(ByteArray),
float(Float),
word128(Word128),
@@ -27,6 +27,7 @@ public type WEB_Session_Field_Datum:
word16(Word16),
word8(Word8),
word4(Word4)
+ //WEB_Request
.
public type WEB_Session_Field_Type:
diff --git a/web/jQuery/CXM_jquery_dialog.anubis b/web/jQuery/CXM_jquery_dialog.anubis
index 3f74905..e6c59d0 100644
--- a/web/jQuery/CXM_jquery_dialog.anubis
+++ b/web/jQuery/CXM_jquery_dialog.anubis
@@ -19,13 +19,27 @@ public type JQuery_dialog:
ajax(WEB_Action_Name url).
public define JQuery_dialog ajax(String url) = ajax(action_name(url)).
+
+public type JQuery_dialog_size:
+ auto,
+ percent(Float w, Float h)
+.
+
+public define JQuery_dialog_size
+ percent
+ (
+ Float all
+ )=
+ percent(all, all).
+
public define HTML_Partial_Content
jq_dialog_create
(
JQuery_dialog_id dial_id,
JQuery_dialog content,
Bool autoOpen,
+ JQuery_dialog_size size,
String extra_param
)=
with dlg_id = id(dial_id),
@@ -34,9 +48,13 @@ public define HTML_Partial_Content
$( \"#"+dlg_id+"\" ).dialog({
autoOpen: "+to_String(autoOpen)+",
modal: true,
- height: 'auto',
- width: 'auto',
- "+extra_param+"
+"+
+ if size is
+ {
+ auto then "height: 'auto', width: 'auto',",
+ percent(w, h) then "width: $(window).width() * "+w+", height: $(window).height() * "+h+","
+ }
+ +extra_param+"
Cancel: function() {
$( this ).dialog( 'close' );
}
@@ -64,7 +82,7 @@ public define HTML_Partial_Content
JQuery_dialog content,
String extra_param
)=
- jq_dialog_create(dial_id, content, false, extra_param).
+ jq_dialog_create(dial_id, content, false, auto, extra_param).
public define HTML_Partial_Content
jq_dialog_create
@@ -72,7 +90,7 @@ public define HTML_Partial_Content
JQuery_dialog_id dial_id,
JQuery_dialog content
)=
- jq_dialog_create(dial_id, content, false, "").
+ jq_dialog_create(dial_id, content, false, auto, "").
public define HTML_Partial_Content
jq_dialog_create
@@ -81,7 +99,7 @@ public define HTML_Partial_Content
JQuery_dialog content,
Bool autoOpen
)=
- jq_dialog_create(dial_id, content, autoOpen, "").
+ jq_dialog_create(dial_id, content, autoOpen, auto, "").
define String
_jq_dialog_open
--
libgit2 0.21.4