From 31b73898af536da873e12cc0cf6f3a4ee7b7d9cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Hojtsy?= Date: Fri, 5 Oct 2007 09:35:09 +0000 Subject: #157752 by quicksketch: extend AHAH functionality to most types of form elements, without writing JavaScript. Also AHAH enable the blocks admin page. --- modules/system/system-rtl.css | 6 ++++++ modules/system/system.css | 9 ++++++++- modules/system/system.module | 24 ++++++++++++------------ 3 files changed, 26 insertions(+), 13 deletions(-) (limited to 'modules/system') diff --git a/modules/system/system-rtl.css b/modules/system/system-rtl.css index 0ccf0f4c6..bb5689e0e 100644 --- a/modules/system/system-rtl.css +++ b/modules/system/system-rtl.css @@ -83,6 +83,12 @@ div.teaser-button-wrapper { .progress .percentage { float: left; } +.progess-disabled { + float: right; +} +.ahah-progress { + float: right; +} input.password-field { margin-left: 10px; margin-right: inherit; diff --git a/modules/system/system.css b/modules/system/system.css index 0f810bf37..6cb91f001 100644 --- a/modules/system/system.css +++ b/modules/system/system.css @@ -418,8 +418,9 @@ html.js .no-js { .progress .bar { background: #fff url(../../misc/progress.gif); border: 1px solid #00375a; + width: 5em; height: 1.5em; - margin-top: 0.2em; + margin: 0.2em 0 0 0.2em; } .progress .filled { background: #0072b9; @@ -430,6 +431,12 @@ html.js .no-js { .progress .percentage { float: right; /* LTR */ } +.progress-disabled { + float: left; /* LTR */ +} +.ahah-progress { + float: left; /* LTR */ +} /* ** Formatting for welcome page diff --git a/modules/system/system.module b/modules/system/system.module index 8827857e8..f184b8f91 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -122,28 +122,28 @@ function system_elements() { $type['form'] = array('#method' => 'post', '#action' => request_uri()); // Inputs - $type['submit'] = array('#input' => TRUE, '#name' => 'op', '#button_type' => 'submit', '#executes_submit_callback' => TRUE, '#ahah_event' => 'submit', '#process' => array('form_expand_ahah')); - $type['button'] = array('#input' => TRUE, '#name' => 'op', '#button_type' => 'submit', '#executes_submit_callback' => FALSE, '#ahah_event' => 'submit', '#process' => array('form_expand_ahah')); - $type['image_button'] = array('#input' => TRUE, '#button_type' => 'submit', '#executes_submit_callback' => TRUE, '#ahah_event' => 'submit', '#process' => array('form_expand_ahah'), '#return_value' => TRUE, '#has_garbage_value' => TRUE, '#src' => NULL); - $type['textfield'] = array('#input' => TRUE, '#size' => 60, '#maxlength' => 128, '#autocomplete_path' => FALSE); - $type['password'] = array('#input' => TRUE, '#size' => 60, '#maxlength' => 128); + $type['submit'] = array('#input' => TRUE, '#name' => 'op', '#button_type' => 'submit', '#executes_submit_callback' => TRUE, '#process' => array('form_expand_ahah')); + $type['button'] = array('#input' => TRUE, '#name' => 'op', '#button_type' => 'submit', '#executes_submit_callback' => FALSE, '#process' => array('form_expand_ahah')); + $type['image_button'] = array('#input' => TRUE, '#button_type' => 'submit','#executes_submit_callback' => TRUE, '#process' => array('form_expand_ahah'), '#return_value' => TRUE, '#has_garbage_value' => TRUE, '#src' => NULL); + $type['textfield'] = array('#input' => TRUE, '#size' => 60, '#maxlength' => 128, '#autocomplete_path' => FALSE, '#process' => array('form_expand_ahah')); + $type['password'] = array('#input' => TRUE, '#size' => 60, '#maxlength' => 128, '#process' => array('form_expand_ahah')); $type['password_confirm'] = array('#input' => TRUE, '#process' => array('expand_password_confirm')); - $type['textarea'] = array('#input' => TRUE, '#cols' => 60, '#rows' => 5, '#resizable' => TRUE); + $type['textarea'] = array('#input' => TRUE, '#cols' => 60, '#rows' => 5, '#resizable' => TRUE, '#process' => array('form_expand_ahah')); $type['radios'] = array('#input' => TRUE, '#process' => array('expand_radios')); - $type['radio'] = array('#input' => TRUE, '#default_value' => NULL); + $type['radio'] = array('#input' => TRUE, '#default_value' => NULL, '#process' => array('form_expand_ahah')); $type['checkboxes'] = array('#input' => TRUE, '#process' => array('expand_checkboxes'), '#tree' => TRUE); - $type['checkbox'] = array('#input' => TRUE, '#return_value' => 1); - $type['select'] = array('#input' => TRUE, '#size' => 0, '#multiple' => FALSE); - $type['weight'] = array('#input' => TRUE, '#delta' => 10, '#default_value' => 0, '#process' => array('process_weight')); + $type['checkbox'] = array('#input' => TRUE, '#return_value' => 1, '#process' => array('form_expand_ahah')); + $type['select'] = array('#input' => TRUE, '#size' => 0, '#multiple' => FALSE, '#process' => array('form_expand_ahah')); + $type['weight'] = array('#input' => TRUE, '#delta' => 10, '#default_value' => 0, '#process' => array('process_weight', 'form_expand_ahah')); $type['date'] = array('#input' => TRUE, '#process' => array('expand_date'), '#element_validate' => array('date_validate')); $type['file'] = array('#input' => TRUE, '#size' => 60); // Form structure $type['item'] = array('#value' => ''); - $type['hidden'] = array('#input' => TRUE); + $type['hidden'] = array('#input' => TRUE, '#process' => array('expand_ahah')); $type['value'] = array('#input' => TRUE); $type['markup'] = array('#prefix' => '', '#suffix' => ''); - $type['fieldset'] = array('#collapsible' => FALSE, '#collapsed' => FALSE, '#value' => NULL); + $type['fieldset'] = array('#collapsible' => FALSE, '#collapsed' => FALSE, '#value' => NULL, '#process' => array('expand_ahah')); $type['token'] = array('#input' => TRUE); return $type; } -- cgit v1.2.3