Commit ae0c8156678cd147ec522c69920b2ca82a3b048c
1 parent
8b2211a6
Fix and optimize the formatting of windows options for jquery button. For resiz…
…able and scrollbar the yes was surrounded by quote ' which was a bug
Showing
1 changed file
with
20 additions
and
51 deletions
Show diff stats
web/jQuery/CXM_jquery_button.anubis
| ... | ... | @@ -4,7 +4,6 @@ |
| 4 | 4 | * Date: 07/09/2012 |
| 5 | 5 | * Time: 15:10 |
| 6 | 6 | * |
| 7 | - * To change this template use Tools | Options | Coding | Edit Standard Headers. | |
| 8 | 7 | */ |
| 9 | 8 | |
| 10 | 9 | transmit calexium_lib/web/CXM_making_a_web_site.anubis |
| ... | ... | @@ -42,11 +41,11 @@ public type JQuery_button: |
| 42 | 41 | public define JQuery_button |
| 43 | 42 | jQuery_button |
| 44 | 43 | ( |
| 45 | - JQuery_button_type bt_type, | |
| 46 | - String button_id, | |
| 47 | - String button_name, | |
| 48 | - String button_label, | |
| 49 | - JQuery_Actioner actioner | |
| 44 | + JQuery_button_type bt_type, | |
| 45 | + String button_id, | |
| 46 | + String button_name, | |
| 47 | + String button_label, | |
| 48 | + JQuery_Actioner actioner | |
| 50 | 49 | ) = |
| 51 | 50 | jQuery_button(bt_type, button_id, button_name, button_label, actioner, jq_icon_none, jq_icon_none). |
| 52 | 51 | |
| ... | ... | @@ -54,59 +53,29 @@ define String |
| 54 | 53 | jquery_button_get_onclick_action_window_options |
| 55 | 54 | ( |
| 56 | 55 | List(Other_Window_Option) options, |
| 57 | - String formated_options | |
| 56 | + String formated_options | |
| 58 | 57 | ) |
| 59 | 58 | = |
| 59 | + //if there is already formated_options add a comma + space between the options | |
| 60 | + with comma = if formated_options="" then "" else ", ", | |
| 61 | + | |
| 60 | 62 | if options is |
| 61 | 63 | { |
| 62 | 64 | [ ] then formated_options, |
| 63 | 65 | [ h . t ] then |
| 64 | 66 | if h is |
| 65 | 67 | { |
| 66 | - resizable then | |
| 67 | - if formated_options="" then // si c'est vide on ne prefixe pas avec une virgule | |
| 68 | - jquery_button_get_onclick_action_window_options( | |
| 69 | - t, | |
| 70 | - formated_options+"resizable='yes'" | |
| 71 | - ) | |
| 72 | - else | |
| 73 | - jquery_button_get_onclick_action_window_options( | |
| 74 | - t, | |
| 75 | - formated_options+", resizable='yes'" | |
| 76 | - ), | |
| 77 | - scrollbars then | |
| 78 | - if formated_options="" then // si c'est vide on ne prefixe pas avec une virgule | |
| 79 | - jquery_button_get_onclick_action_window_options( | |
| 80 | - t, | |
| 81 | - formated_options+"scrollbars='yes'" | |
| 82 | - ) | |
| 83 | - else | |
| 84 | - jquery_button_get_onclick_action_window_options( | |
| 85 | - t, | |
| 86 | - formated_options+", scrollbars='yes'" | |
| 87 | - ), | |
| 88 | - width(w) then | |
| 89 | - if formated_options="" then // si c'est vide on ne prefixe pas avec une virgule | |
| 90 | - jquery_button_get_onclick_action_window_options( | |
| 91 | - t, | |
| 92 | - formated_options+"width="+w | |
| 93 | - ) | |
| 94 | - else | |
| 95 | - jquery_button_get_onclick_action_window_options( | |
| 96 | - t, | |
| 97 | - formated_options+", width="+w | |
| 98 | - ), | |
| 99 | - height(h) then | |
| 100 | - if formated_options="" then // si c'est vide on ne prefixe pas avec une virgule | |
| 101 | - jquery_button_get_onclick_action_window_options( | |
| 102 | - t, | |
| 103 | - formated_options+"height="+h | |
| 104 | - ) | |
| 105 | - else | |
| 106 | - jquery_button_get_onclick_action_window_options( | |
| 107 | - t, | |
| 108 | - formated_options+", height="+h | |
| 109 | - ) | |
| 68 | + resizable then jquery_button_get_onclick_action_window_options( | |
| 69 | + t, formated_options+ comma+ "resizable=yes" ), | |
| 70 | + | |
| 71 | + scrollbars then jquery_button_get_onclick_action_window_options( | |
| 72 | + t, formated_options+ comma + "scrollbars=yes"), | |
| 73 | + | |
| 74 | + width(w) then jquery_button_get_onclick_action_window_options( | |
| 75 | + t, formated_options+ comma + "width="+w), | |
| 76 | + | |
| 77 | + height(h) then jquery_button_get_onclick_action_window_options( | |
| 78 | + t, formated_options+ comma + "height="+h) | |
| 110 | 79 | } |
| 111 | 80 | } |
| 112 | 81 | . | ... | ... |