? .DS_Store ? 447816-form-error-indicator-v15.patch ? 447816-form-error-indicator-v15.patch.1 ? 447816-form-error-indicator-v16.patch ? 447816-form-error-indicator-v16.patch.1 ? 464796-10.patch ? 464796-11.patch ? 464796-11.patch.1 ? LICENSE.it.txt ? LICENSE.ja.txt ? LICENSE.pl.txt ? STATUS.it.txt ? STATUS.ja.txt ? STATUS.pl.txt ? drupal.menu-local-actions.27.patch ? drupal.menu-local-actions.27.patch.1 ? form-label-cleanup-v1.patch ? form-label-cleanup-v2.patch ? form-label-cleanup-v2_0.patch ? form-label-cleanup-v3.patch ? forms-remove-blank-labels-1.patch ? forms-remove-blank-labels-1.patch.1 ? issue-558928-form-labeling-41.patch ? issue-558928-form-labeling-45.patch ? issue-718922-offscreen-01.patch ? it-6.x-1.7.tar.gz ? ja-6.x-1.4.tar.gz ? pl-6.x-0.3.tar.gz ? st-654726-3_0.patch ? st-654726-3_0.patch.1 ? st-654726-3_0.patch.2 ? tabledrag-448292-v10.patch ? tabledrag-448292-v10.patch.1 ? tabledrag-448292-v11.patch ? tabledrag-448292-v12.patch ? tabledrag-448292-v13.patch ? tabledrag-448292-v14.patch ? tabledrag-448292-v17.patch ? tabledrag-448292-v17a.patch ? tabledrag-448292-v17b.patch ? tabledrag-448292-v18.patch ? tabledrag-448292-v19.patch ? tabledrag-448292-v19_0.patch ? tabledrag-448292-v20-3.patch ? tabledrag-448292-v20_0.patch ? tabledrag-448292-v20_0.patch.1 ? tabledrag-448292-v20_2.patch ? tabledrag-448292-v20_3.patch ? tabledrag-448292-v3.patch ? tabledrag-448292-v4.patch ? tabledrag-448292-v6.patch ? tabledrag-448292-v7.patch ? tabledrag-448292-v8.patch ? tabledrag-448292-v9.patch ? tabledrag-menu.patch ? template.php-D6-v2_0.patch ? vertical-tabs_467296.205.patch ? vertical-tabs_467296.208.patch ? vertical-tabs_467296.234.patch ? profiles/default/translations ? profiles/expert/translations ? profiles/minimal/st-654726-3_0.patch ? profiles/minimal/translations ? profiles/standard/translations ? sites/all/modules/read_more ? sites/all/themes/d6-zen ? sites/all/themes/zen Index: includes/common.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/common.inc,v retrieving revision 1.1160 diff -u -p -r1.1160 common.inc --- includes/common.inc 4 May 2010 14:55:22 -0000 1.1160 +++ includes/common.inc 6 May 2010 13:46:24 -0000 @@ -4238,6 +4238,7 @@ function drupal_add_tabledrag($table_id, // Add the table drag JavaScript to the page before the module JavaScript // to ensure that table drag behaviors are registered before any module // uses it. + drupal_add_js('misc/jquery.cookie.js', array('weight' => JS_DEFAULT - 2)); drupal_add_js('misc/tabledrag.js', array('weight' => JS_DEFAULT - 1)); $js_added = TRUE; } Index: misc/tabledrag.js =================================================================== RCS file: /cvs/drupal/drupal/misc/tabledrag.js,v retrieving revision 1.37 diff -u -p -r1.37 tabledrag.js --- misc/tabledrag.js 27 Apr 2010 13:19:31 -0000 1.37 +++ misc/tabledrag.js 6 May 2010 13:46:25 -0000 @@ -83,8 +83,18 @@ Drupal.tableDrag = function (table, tabl // Match immediate children of the parent element to allow nesting. $('> tr.draggable, > tbody > tr.draggable', table).each(function() { self.makeDraggable(this); }); - // Hide columns containing affected form elements. - this.hideColumns(); + // Hide or show weight and parent columns according to user preference. + // This aids screenreader accessibility so users can enter weight values. + // Initialize the weight columns for the show/hide toggle. + self.initColumns(); + // Add a link before the table for users to show or hide weight columns. + $(table).before($('') + .append(Drupal.t('Enable/disable accessible table editing')) + .click(function () { + self.toggleShowWeight(self); + return false; + }) + ); // Add mouse bindings to the document. The self variable is passed along // as event handlers do not have direct access to the tableDrag object. @@ -93,10 +103,12 @@ Drupal.tableDrag = function (table, tabl }; /** - * Hide the columns containing form elements according to the settings for - * this tableDrag instance. + * Initialize weight/parent columns to be hidden by default. + * + * Identify and mark each cell with a CSS class so we can easily toggle show/hide it. + * Finally, hide columns if user does not have a 'showWeight' cookie. */ -Drupal.tableDrag.prototype.hideColumns = function () { +Drupal.tableDrag.prototype.initColumns = function () { for (var group in this.tableSettings) { // Find the first field in this group. for (var d in this.tableSettings[group]) { @@ -108,7 +120,7 @@ Drupal.tableDrag.prototype.hideColumns = } } - // Hide the column containing this field. + // Mark the column containing this field so it can be hidden. if (hidden && cell[0] && cell.css('display') != 'none') { // Add 1 to our indexes. The nth-child selector is 1 based, not 0 based. // Match immediate children of the parent element to allow nesting. @@ -128,21 +140,85 @@ Drupal.tableDrag.prototype.hideColumns = if (index > 0) { cell = row.children(':nth-child(' + index + ')'); if (cell[0].colSpan > 1) { - // If this cell has a colspan, simply reduce it. - cell[0].colSpan = cell[0].colSpan - 1; + // If this cell has a colspan, mark it so we can reduce the colspan. + $(cell[0]).addClass('tabledrag-reduce-colspan'); } else { - // Hide table body cells, but remove table header cells entirely - // (Safari doesn't hide properly). - parentTag == 'thead' ? cell.remove() : cell.css('display', 'none'); + // Mark this cell so we can hide it. + $(cell[0]).addClass('tabledrag-hide'); } } }); } } + + // Now hide cells and reduce colspans unless user cookie is set. + var show = $.cookie('Drupal.tableDrag.showWeight'); + if (show != 1) { + $.cookie('Drupal.tableDrag.showWeight', 0, { + path: Drupal.settings.basePath, + // The cookie should "never" expire. + expires: 36500 + } + ); + Drupal.tableDrag.prototype.hideColumns(); + } }; /** + * Hide the columns containing weight/parent form elements. + * Undo showColumns(). + */ +Drupal.tableDrag.prototype.hideColumns = function () { + // Turn off display of weight/parent cells and headers. + $('.tabledrag-hide').css('display', 'none'); + // Reduce colspan of any effected multi-span columns. + $('.tabledrag-reduce-colspan').each(function() { this.colSpan = this.colSpan - 1; }); + $('.tabledrag-handle').css('display', ''); +} + +/** + * Show the columns containing weight/parent form elements + * Undo hideColumns(). + */ +Drupal.tableDrag.prototype.showColumns = function () { + // Increase colspan back to columns it was reduced. + $('.tabledrag-reduce-colspan').each(function() { this.colSpan = this.colSpan + 1; }); + // Turn on display of weight/parent cells and headers. + $('.tabledrag-hide').css('display', ''); + $('.tabledrag-handle').css('display', 'none'); +} + +/** + * Toggle visibility of weight/parent columns. Use a saved cookie to store the + * user preference. + */ +Drupal.tableDrag.prototype.toggleShowWeight = function (self) { + // Retrieve the tableDrag status from a stored cookie. + var show = $.cookie('Drupal.tableDrag.showWeight'); + + // Show or hide columns with weight fields and toggle the cookie value. + if (show == 1) { + $.cookie('Drupal.tableDrag.showWeight', 0, { + path: Drupal.settings.basePath, + // The cookie should "never" expire. + expires: 36500 + } + ); + this.hideColumns(); + } + else { + $.cookie('Drupal.tableDrag.showWeight', 1, { + path: Drupal.settings.basePath, + // The cookie should "never" expire. + expires: 36500 + } + ); + this.showColumns(); + } +} + +/** * Find the target used within a particular row and group. */ Drupal.tableDrag.prototype.rowSettings = function (group, row) { @@ -442,7 +518,7 @@ Drupal.tableDrag.prototype.dropRow = fun // fields in the entire dragged group. for (var group in self.tableSettings) { var rowSettings = self.rowSettings(group, droppedRow); - if (rowSettings.relationship == 'group') { + if (rowSettings !== undefined && rowSettings.relationship == 'group') { for (var n in self.rowObject.children) { self.updateField(self.rowObject.children[n], group); } @@ -594,11 +670,11 @@ Drupal.tableDrag.prototype.updateField = var rowSettings = this.rowSettings(group, changedRow); // Set the row as it's own target. - if (rowSettings.relationship == 'self' || rowSettings.relationship == 'group') { + if (rowSettings !== undefined && (rowSettings.relationship == 'self' || rowSettings.relationship == 'group')) { var sourceRow = changedRow; } // Siblings are easy, check previous and next rows. - else if (rowSettings.relationship == 'sibling') { + else if (rowSettings !== undefined && rowSettings.relationship == 'sibling') { var previousRow = $(changedRow).prev('tr').get(0); var nextRow = $(changedRow).next('tr').get(0); var sourceRow = changedRow; @@ -625,7 +701,7 @@ Drupal.tableDrag.prototype.updateField = } // Parents, look up the tree until we find a field not in this group. // Go up as many parents as indentations in the changed row. - else if (rowSettings.relationship == 'parent') { + else if (rowSettings !== undefined && rowSettings.relationship == 'parent') { var previousRow = $(changedRow).prev('tr'); while (previousRow.length && $('.indentation', previousRow).length >= this.rowObject.indents) { previousRow = previousRow.prev('tr'); @@ -660,8 +736,10 @@ Drupal.tableDrag.prototype.updateField = rowSettings.source = rowSettings.target; } - var targetClass = '.' + rowSettings.target; - var targetElement = $(targetClass, changedRow).get(0); + if(rowSettings !== undefined) { + var targetClass = '.' + rowSettings.target; + var targetElement = $(targetClass, changedRow).get(0); + } // Check if a target element exists in this row. if (targetElement) { Index: modules/block/block.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/block/block.admin.inc,v retrieving revision 1.79 diff -u -p -r1.79 block.admin.inc --- modules/block/block.admin.inc 4 May 2010 15:29:56 -0000 1.79 +++ modules/block/block.admin.inc 6 May 2010 13:46:25 -0000 @@ -80,6 +80,8 @@ function block_admin_display_form($form, '#type' => 'weight', '#default_value' => $block['weight'], '#delta' => $weight_delta, + '#title_display' => 'invisible', + '#title' => t('Weight for') . ' ' . check_plain($block['info']), ); $form[$key]['region'] = array( '#type' => 'select', Index: modules/field_ui/field_ui.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/field_ui/field_ui.admin.inc,v retrieving revision 1.49 diff -u -p -r1.49 field_ui.admin.inc --- modules/field_ui/field_ui.admin.inc 24 Apr 2010 14:49:13 -0000 1.49 +++ modules/field_ui/field_ui.admin.inc 6 May 2010 13:46:26 -0000 @@ -137,7 +137,9 @@ function field_ui_field_overview_form($f '#type' => 'textfield', '#default_value' => $weight, '#size' => 3, - ), + '#title_display' => 'invisible', + '#title' => t('Weight for') . ' ' . check_plain($instance['label']), + ), 'hidden_name' => array( '#type' => 'hidden', '#default_value' => $instance['field_name'], Index: modules/menu/menu.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/menu/menu.admin.inc,v retrieving revision 1.79 diff -u -p -r1.79 menu.admin.inc --- modules/menu/menu.admin.inc 4 May 2010 20:31:53 -0000 1.79 +++ modules/menu/menu.admin.inc 6 May 2010 13:46:26 -0000 @@ -106,13 +106,15 @@ function _menu_overview_tree_form($tree) '#type' => 'weight', '#delta' => 50, '#default_value' => isset($form_state[$mlid]['weight']) ? $form_state[$mlid]['weight'] : $item['weight'], + '#title_display' => 'invisible', + '#title' => t('Weight for') . ' ' . $item['title'], ); $form[$mlid]['mlid'] = array( '#type' => 'hidden', '#value' => $item['mlid'], ); $form[$mlid]['plid'] = array( - '#type' => 'textfield', + '#type' => 'hidden', '#default_value' => isset($form_state[$mlid]['plid']) ? $form_state[$mlid]['plid'] : $item['plid'], '#size' => 6, ); Index: modules/system/system-behavior-rtl.css =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system-behavior-rtl.css,v retrieving revision 1.3 diff -u -p -r1.3 system-behavior-rtl.css --- modules/system/system-behavior-rtl.css 28 Apr 2010 20:08:39 -0000 1.3 +++ modules/system/system-behavior-rtl.css 6 May 2010 13:46:26 -0000 @@ -75,6 +75,9 @@ div.tree-child, div.tree-child-last { background-position: -65px center; } +.tabledrag-accessibility { + float: left; /* LTR */ +} /** * Multiselect form Index: modules/system/system-behavior.css =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system-behavior.css,v retrieving revision 1.9 diff -u -p -r1.9 system-behavior.css --- modules/system/system-behavior.css 28 Apr 2010 20:08:39 -0000 1.9 +++ modules/system/system-behavior.css 6 May 2010 13:46:26 -0000 @@ -130,6 +130,12 @@ div.tree-child-last { div.tree-child-horizontal { background: url(../../misc/tree.png) no-repeat -11px center; } +.tabledrag-accessibility { + font-size: 0.9em; + float: right; /* LTR */ + position: relative; + top: -25px; +} /** * Progress bar