').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()
*/
?>
-