diff --git a/web/jQuery/CXM_jquery_button.anubis b/web/jQuery/CXM_jquery_button.anubis index 93ec457..ad51aaf 100644 --- a/web/jQuery/CXM_jquery_button.anubis +++ b/web/jQuery/CXM_jquery_button.anubis @@ -4,7 +4,6 @@ * Date: 07/09/2012 * Time: 15:10 * - * To change this template use Tools | Options | Coding | Edit Standard Headers. */ transmit calexium_lib/web/CXM_making_a_web_site.anubis @@ -42,11 +41,11 @@ public type JQuery_button: public define JQuery_button jQuery_button ( - JQuery_button_type bt_type, - String button_id, - String button_name, - String button_label, - JQuery_Actioner actioner + JQuery_button_type bt_type, + String button_id, + String button_name, + String button_label, + JQuery_Actioner actioner ) = jQuery_button(bt_type, button_id, button_name, button_label, actioner, jq_icon_none, jq_icon_none). @@ -54,59 +53,29 @@ define String jquery_button_get_onclick_action_window_options ( List(Other_Window_Option) options, - String formated_options + String formated_options ) = + //if there is already formated_options add a comma + space between the options + with comma = if formated_options="" then "" else ", ", + if options is { [ ] then formated_options, [ h . t ] then if h is { - resizable then - if formated_options="" then // si c'est vide on ne prefixe pas avec une virgule - jquery_button_get_onclick_action_window_options( - t, - formated_options+"resizable='yes'" - ) - else - jquery_button_get_onclick_action_window_options( - t, - formated_options+", resizable='yes'" - ), - scrollbars then - if formated_options="" then // si c'est vide on ne prefixe pas avec une virgule - jquery_button_get_onclick_action_window_options( - t, - formated_options+"scrollbars='yes'" - ) - else - jquery_button_get_onclick_action_window_options( - t, - formated_options+", scrollbars='yes'" - ), - width(w) then - if formated_options="" then // si c'est vide on ne prefixe pas avec une virgule - jquery_button_get_onclick_action_window_options( - t, - formated_options+"width="+w - ) - else - jquery_button_get_onclick_action_window_options( - t, - formated_options+", width="+w - ), - height(h) then - if formated_options="" then // si c'est vide on ne prefixe pas avec une virgule - jquery_button_get_onclick_action_window_options( - t, - formated_options+"height="+h - ) - else - jquery_button_get_onclick_action_window_options( - t, - formated_options+", height="+h - ) + resizable then jquery_button_get_onclick_action_window_options( + t, formated_options+ comma+ "resizable=yes" ), + + scrollbars then jquery_button_get_onclick_action_window_options( + t, formated_options+ comma + "scrollbars=yes"), + + width(w) then jquery_button_get_onclick_action_window_options( + t, formated_options+ comma + "width="+w), + + height(h) then jquery_button_get_onclick_action_window_options( + t, formated_options+ comma + "height="+h) } } . -- libgit2 0.21.4