=== modified file 'includes/batch.inc' --- includes/batch.inc 2009-10-15 16:18:44 +0000 +++ includes/batch.inc 2009-10-18 12:37:37 +0000 @@ -109,11 +109,20 @@ function _batch_progress_page_js() { $current_set = _batch_current_set(); drupal_set_title($current_set['title'], PASS_THROUGH); + // Add ?id=x to the batch URL. + $url_options = $batch['url_options']; + if (isset($url_options['query'])) { + $url_options['query']['id'] = $batch['id']; + } + else { + $url_options['query'] = array('id' => $batch['id']); + } + $js_setting = array( 'batch' => array( 'errorMessage' => $current_set['error_message'] . '
' . $batch['error_message'], 'initMessage' => $current_set['init_message'], - 'uri' => url($batch['url'], array('query' => array('id' => $batch['id']))), + 'uri' => url($batch['url'], $url_options), ), ); drupal_add_js($js_setting, 'setting'); @@ -189,7 +198,17 @@ function _batch_progress_page_nojs() { ob_end_clean(); } - $url = url($batch['url'], array('query' => array('id' => $batch['id'], 'op' => $new_op))); + // Add ?id=x&op=y to the batch URL. + $url_options = $batch['url_options']; + if (isset($url_options['query'])) { + $url_options['query']['id'] = $batch['id']; + $url_options['query']['op'] = $new_op; + } + else { + $url_options['query'] = array('id' => $batch['id'], 'op' => $new_op); + } + + $url = url($batch['url'], $batch['url_options']); drupal_add_html_head(''); return theme('progress_bar', array('percent' => $percentage, 'message' => $message)); === modified file 'includes/form.inc' --- includes/form.inc 2009-10-16 19:20:33 +0000 +++ includes/form.inc 2009-10-18 12:37:37 +0000 @@ -3050,7 +3050,7 @@ function batch_process($redirect = NULL, $process_info = array( 'current_set' => 0, 'progressive' => TRUE, - 'url' => $url, + 'url_options' => array(), 'source_page' => $_GET['q'], 'redirect' => $redirect, 'theme' => $GLOBALS['theme_key'], === modified file 'misc/drupal.js' --- misc/drupal.js 2009-08-31 05:51:07 +0000 +++ misc/drupal.js 2009-10-18 12:37:37 +0000 @@ -344,4 +344,11 @@ Drupal.theme.prototype = { } }; + /** + * Check if the given variable is an object. + */ + Drupal.isObject = function(something) { + return (something !== null && typeof something === 'object'); + }; + })(jQuery); === modified file 'misc/tableheader.js' --- misc/tableheader.js 2009-09-20 19:14:40 +0000 +++ misc/tableheader.js 2009-10-18 12:37:37 +0000 @@ -18,8 +18,9 @@ Drupal.behaviors.tableHeader = { var headers = []; $('table.sticky-enabled thead', context).once('tableheader', function () { - // Clone thead so it inherits original jQuery properties. - var headerClone = $(this).clone(true).insertBefore(this.parentNode).wrap('').parent().css({ + // Clone the table header so it inherits original jQuery properties. Hide + // the table to avoid a flash of the header clone upon page load. + var headerClone = $(this).clone(true).hide().insertBefore(this.parentNode).wrap('').parent().css({ position: 'fixed', top: '0px' }); @@ -32,6 +33,9 @@ Drupal.behaviors.tableHeader = { headerClone.table = table; // Finish initializing header positioning. tracker(headerClone); + // We hid the header to avoid it showing up erroneously on page load; + // we need to unhide it now so that it will show up when expected. + $(headerClone).children('thead').show(); $(table).addClass('sticky-table'); }); === modified file 'modules/dashboard/dashboard.css' --- modules/dashboard/dashboard.css 2009-10-18 11:20:26 +0000 +++ modules/dashboard/dashboard.css 2009-10-18 12:39:54 +0000 @@ -64,9 +64,11 @@ border: 0; } -#dashboard .canvas-content input { +#dashboard .canvas-content a.button { float: right; margin: 0 0 0 10px; + color: #5a5a5a; + text-decoration: none; } #dashboard .region { === modified file 'modules/dashboard/dashboard.js' --- modules/dashboard/dashboard.js 2009-10-18 11:20:26 +0000 +++ modules/dashboard/dashboard.js 2009-10-18 12:37:37 +0000 @@ -65,7 +65,7 @@ Drupal.behaviors.dashboard = { * Helper for enterCustomizeMode; sets up drag-and-drop and close button. */ setupDrawer: function () { - $('div.customize .canvas-content').prepend(''); + $('div.customize .canvas-content').prepend('' + Drupal.t('Done') + ''); $('div.customize .canvas-content input').click(Drupal.behaviors.dashboard.exitCustomizeMode); // Initialize drag-and-drop. === modified file 'modules/locale/locale.test' --- modules/locale/locale.test 2009-10-17 05:50:27 +0000 +++ modules/locale/locale.test 2009-10-18 12:37:37 +0000 @@ -237,7 +237,7 @@ class LocaleTranslationFunctionalTest ex $this->clickLink(t('edit')); // We save the lid from the path. $matches = array(); - preg_match('!admin/config/regional/translate/edit/(\d)+!', $this->getUrl(), $matches); + preg_match('!admin/config/regional/translate/edit/(\d+)!', $this->getUrl(), $matches); $lid = $matches[1]; // No t() here, it's surely not translated yet. $this->assertText($name, t('name found on edit screen.')); === modified file 'modules/overlay/overlay.info' --- modules/overlay/overlay.info 2009-09-16 23:55:40 +0000 +++ modules/overlay/overlay.info 2009-10-18 12:37:37 +0000 @@ -0,0 +1,7 @@ +; $Id$ +name = Overlay +description = Displays the Drupal administration interface in an overlay. +package = Core +version = VERSION +core = 7.x +files[] = overlay.module === modified file 'modules/toolbar/toolbar.css' --- modules/toolbar/toolbar.css 2009-10-17 00:51:52 +0000 +++ modules/toolbar/toolbar.css 2009-10-18 12:37:37 +0000 @@ -36,7 +36,7 @@ div#toolbar { left: 0; right: 0; top: 0; - z-index: 100; + z-index: 600; } div#toolbar .collapsed { === modified file 'modules/toolbar/toolbar.js' --- modules/toolbar/toolbar.js 2009-10-17 00:51:52 +0000 +++ modules/toolbar/toolbar.js 2009-10-18 12:37:37 +0000 @@ -15,6 +15,16 @@ Drupal.behaviors.admin = { Drupal.admin.toolbar.toggle(); return false; }); + + // Set the most recently clicked item as active. + $('#toolbar a').once().click(function() { + $('#toolbar a').each(function() { + $(this).removeClass('active'); + }); + if ($(this).parents('div.toolbar-shortcuts').length) { + $(this).addClass('active'); + } + }); } }; === modified file 'modules/toolbar/toolbar.module' --- modules/toolbar/toolbar.module 2009-10-17 00:51:52 +0000 +++ modules/toolbar/toolbar.module 2009-10-18 12:37:37 +0000 @@ -36,13 +36,30 @@ function toolbar_theme($existing, $type, * Add admin toolbar to the page_top region automatically. */ function toolbar_page_build(&$page) { - if (user_access('access toolbar')) { + if (user_access('access toolbar') && toolbar_enabled()) { $page['page_top']['toolbar'] = toolbar_build(); $page['page_top']['toolbar']['toolbar_drawer'] = isset($page['toolbar_drawer']) ? $page['toolbar_drawer'] : array(); } } /** + * Enable or disable the toolbar, or find out the current status of the toolbar. + * + * @param $enabled + * If given, will change the display mode of the toolbar to the given + * boolean. + * @return + * The current status of the toolbar, TRUE for enabled, FALSE for disabled. + */ +function toolbar_enabled($enabled = NULL) { + $setting = &drupal_static(__FUNCTION__, TRUE); + if (isset($enabled)) { + $setting = $enabled; + } + return $setting; +} + +/** * Implement hook_preprocess_html(). * * Add some page classes, so global page theming can adjust to the toolbar. @@ -53,6 +70,10 @@ function toolbar_preprocess_html(&$vars) } } +function template_preprocess_toolbar(&$variables) { + $variables['classes_array'][] = 'clearfix'; +} + /** * Build the admin menu as a structured array ready for drupal_render(). */ @@ -180,3 +201,12 @@ function toolbar_in_active_trail($path) } return in_array($path, $active_paths); } + +/** + * Implement hook_overlay_child_initialize(). + */ +function toolbar_overlay_child_initialize() { + // Disable admin toolbar, which is something child windows don't need and + // shouldn't have. + toolbar_enabled(FALSE); +} === modified file 'modules/toolbar/toolbar.tpl.php' --- modules/toolbar/toolbar.tpl.php 2009-10-17 00:51:52 +0000 +++ modules/toolbar/toolbar.tpl.php 2009-10-18 12:37:37 +0000 @@ -6,15 +6,17 @@ * Default template for admin toolbar. * * Available variables: + * - $classes: Classes for the toolbar div element. Can be + * manipulated in preprocess functions via $variables['classes_array']. * - $toolbar['toolbar_user']: User account / logout links. * - $toolbar['toolbar_menu']: Top level management menu links. * - $toolbar['toolbar_drawer']: A place for extended toolbar content. * * @see template_preprocess() - * @see template_preprocess_admin_toolbar() + * @see template_preprocess_toolbar() */ ?> -
+
=== modified file 'profiles/default/default.info' --- profiles/default/default.info 2009-10-17 01:15:39 +0000 +++ profiles/default/default.info 2009-10-18 12:37:37 +0000 @@ -16,6 +16,7 @@ dependencies[] = dblog dependencies[] = search dependencies[] = shortcut dependencies[] = toolbar +dependencies[] = overlay dependencies[] = field_ui dependencies[] = file files[] = default.profile === modified file 'themes/garland/style.css' --- themes/garland/style.css 2009-10-17 05:50:27 +0000 +++ themes/garland/style.css 2009-10-18 12:37:37 +0000 @@ -508,6 +508,15 @@ body.two-sidebars .region-footer { font-size: 1.5em; } +/* Don't display any header elements when within the overlay, and adjust the page height accordingly. */ +body.overlay #header * { + display: none; +} + +body.overlay { + margin-top: -80px; +} + #wrapper #container #header h1 a:hover { text-decoration: none; } === modified file 'themes/seven/style.css' --- themes/seven/style.css 2009-10-18 04:35:30 +0000 +++ themes/seven/style.css 2009-10-18 12:37:37 +0000 @@ -55,7 +55,7 @@ legend { */ #branding { overflow: hidden; - padding: 20px 40px 0 40px; + padding: 20px 20px 0 20px; position: relative; background-color: #e0e0d8; } @@ -115,7 +115,7 @@ legend { */ div.messages { padding: 9px; - margin: 1em 0; + margin: 0.5em 0 0; color: #036; background: #bdf; border: 1px solid #ace; @@ -158,9 +158,8 @@ div.status { /** * Console. */ -#page .console { - border-top: 1px solid #ccc; - padding: 9px 0 10px; +#console { + margin: 9px 0 10px; } /** @@ -549,7 +548,7 @@ body div.form-type-radio div.description } /* Buttons */ -input.form-submit { +input.form-submit, a.button { cursor: pointer; padding: 4px 17px; color: #5a5a5a; @@ -566,6 +565,11 @@ input.form-submit { font-size: 1.1em; } +a.button:link, a.button:visited, a.button:hover, a.button:active { + text-decoration: none; + color: #5a5a5a; +} + div.node-form input#edit-submit, div.node-form input#edit-submit-1 { border: 1px solid #8eB7cd; @@ -618,9 +622,14 @@ html.js input.throbbing { ul.action-links { margin: 1em 0; + padding: 0 20px 0 20px; overflow: hidden; } +#block-system-main ul.action-links { + padding: 0; +} + ul.action-links li { float: left; margin: 0 1em 0 0; @@ -716,24 +725,40 @@ div.admin-options div.form-item { } /* Overlay theming */ -body.overlay { - background: #fff; +.overlay #branding { + background-color: #fff; + padding-top: 15px; } -body.overlay #branding, -body.overlay #page-title, -body.overlay #page #left, -body.overlay #page #footer { +.overlay .primary, +.overlay #branding h1.page-title, +.overlay #page #left, +.overlay #page #footer { display: none; } -body.overlay #page { +.overlay #page { margin: 0; - padding: 0; } -body.overlay #block-system-main { - padding: 20px; +.overlay #branding div.breadcrumb { + float: left; + position: relative; + z-index: 10; +} + +.overlay ul.secondary { + background: transparent none; + margin: -2.4em 0 0; + padding: 3px 10px; +} + +.overlay #content { + padding: 0 20px; +} + +.overlay #block-system-main { + padding: 0; } /* Shortcut theming */