summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Grossenbacher2009-11-23 19:54:49 (GMT)
committer Sascha Grossenbacher2009-11-23 19:54:49 (GMT)
commit4cebacd8f1caa5acc847147b362bc36f8933064f (patch)
treeedb3b45c847cfad7a9a2d7813b30d0d9b0f4fab6
parent958e6f673f4fa182df75cffe0978f9ed66773df9 (diff)
#634194 by raklar, Berdir: Fixed theming of the message actions area.
-rw-r--r--privatemsg-list.js10
-rw-r--r--privatemsg.module6
-rw-r--r--privatemsg_filter/privatemsg_filter.module17
3 files changed, 20 insertions, 13 deletions
diff --git a/privatemsg-list.js b/privatemsg-list.js
index 9e02534..66f36b6 100644
--- a/privatemsg-list.js
+++ b/privatemsg-list.js
@@ -1,3 +1,7 @@
-Drupal.behaviors.hideButtons = function (context) {
- $("input.privatemsg-action-button").hide();
-}; \ No newline at end of file
+Drupal.behaviors.actionButtons = function (context) {
+ $("div.privatemsg-op-button").hide();
+
+ $('#privatemsg-list #edit-operation').change(function () {
+ $('#edit-submit').click();
+ });
+};
diff --git a/privatemsg.module b/privatemsg.module
index 1628d2e..5ab66a2 100644
--- a/privatemsg.module
+++ b/privatemsg.module
@@ -2107,16 +2107,16 @@ function _privatemsg_action_form() {
'#type' => 'select',
'#options' => $options,
'#default_value' => 0,
- // Execute the submit button if a operation has been selected.
- '#attributes' => array('onchange' => "$('#edit-submit').click()"),
);
$form['submit'] = array(
+ '#prefix' => '<div class="privatemsg-op-button">',
+ '#suffix' => '</div>',
'#type' => 'submit',
'#value' => t('Execute'),
'#submit' => array('privatemsg_list_submit'),
'#attributes' => array('class' => 'privatemsg-action-button'),
);
- // JS for hiding the execute button(s)
+ // JS for hiding the execute button.
drupal_add_js(drupal_get_path('module', 'privatemsg') .'/privatemsg-list.js');
return $form;
}
diff --git a/privatemsg_filter/privatemsg_filter.module b/privatemsg_filter/privatemsg_filter.module
index d088800..5b40f5e 100644
--- a/privatemsg_filter/privatemsg_filter.module
+++ b/privatemsg_filter/privatemsg_filter.module
@@ -511,29 +511,32 @@ function privatemsg_filter_form_privatemsg_list_alter(&$form, $form_state) {
'#type' => 'select',
'#options' => $options,
'#default_value' => 0,
- // Execute the submit button if a operation has been selected.
- '#attributes' => array('onchange' => "$('#edit-tag-add-submit').click()"),
);
$form['actions']['tag-add-submit'] = array(
+ '#prefix' => '<div class="privatemsg-tag-add-submit">',
+ '#suffix' => '</div>',
'#type' => 'submit',
- '#value' => t('Apply tag'),
+ '#value' => t('Apply Tag'),
'#submit' => array('privatemsg_filter_add_tag_submit'),
'#attributes' => array('class' => 'privatemsg-action-button'),
);
- $options[0] = t('Remove tag...');
+ $options[0] = t('Remove Tag...');
$form['actions']['tag-remove'] = array(
'#type' => 'select',
'#options' => $options,
'#default_value' => 0,
- // Execute the submit button if a operation has been selected.
- '#attributes' => array('onchange' => "$('#edit-tag-remove-submit').click()"),
);
$form['actions']['tag-remove-submit'] = array(
+ '#prefix' => '<div class="privatemsg-tag-remove-submit">',
+ '#suffix' => '</div>',
'#type' => 'submit',
- '#value' => t('Remove tag'),
+ '#value' => t('Remove Tag'),
'#submit' => array('privatemsg_filter_remove_tag_submit'),
'#attributes' => array('class' => 'privatemsg-action-button'),
);
+
+ // JS for hiding the submit buttons.
+ drupal_add_js(drupal_get_path('module', 'privatemsg_filter') .'/privatemsg-filter-list.js');
}
}