summaryrefslogtreecommitdiff
path: root/modules/upload
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-04-11 22:19:46 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-04-11 22:19:46 +0000
commite888f0061cb7ca2f07b38ad4ff09da99faa75580 (patch)
treeb1ffa36ead61e0061e99fdb4c33a8ea823eb4af5 /modules/upload
parentf278da9e50815f279ce4c7bda993f5d21b43efa3 (diff)
downloadbrdo-e888f0061cb7ca2f07b38ad4ff09da99faa75580.tar.gz
brdo-e888f0061cb7ca2f07b38ad4ff09da99faa75580.tar.bz2
#323112 by dmitrig01, kkaefer, quicksketch, frando and many many more: Now presenting... Vertical Tabs. Fantastic new UI improvement for node forms and hopefully more in the future.
Diffstat (limited to 'modules/upload')
-rw-r--r--modules/upload/upload.js14
-rw-r--r--modules/upload/upload.module4
2 files changed, 16 insertions, 2 deletions
diff --git a/modules/upload/upload.js b/modules/upload/upload.js
new file mode 100644
index 000000000..f9d5c9108
--- /dev/null
+++ b/modules/upload/upload.js
@@ -0,0 +1,14 @@
+// $Id$
+
+(function($) {
+
+Drupal.behaviors.bookFieldsetSummaries = {
+ attach: function(context) {
+ $('fieldset#edit-attachments', context).setSummary(function(context) {
+ var size = $('#upload-attachments tbody tr').size();
+ return Drupal.formatPlural(size, '1 attachment', '@count attachments');
+ });
+ }
+};
+
+})(jQuery);
diff --git a/modules/upload/upload.module b/modules/upload/upload.module
index 411bffebe..f5b42c20e 100644
--- a/modules/upload/upload.module
+++ b/modules/upload/upload.module
@@ -231,9 +231,9 @@ function upload_form_alter(&$form, $form_state, $form_id) {
'#title' => t('File attachments'),
'#collapsible' => TRUE,
'#collapsed' => empty($node->files),
+ '#group' => 'additional_settings',
+ '#attached_js' => array(drupal_get_path('module', 'upload') . '/upload.js'),
'#description' => t('Changes made to the attachments are not permanent until you save this post. The first "listed" file will be included in RSS feeds.'),
- '#prefix' => '<div class="attachments">',
- '#suffix' => '</div>',
'#weight' => 30,
);