summaryrefslogtreecommitdiff
path: root/kolab.org/www/drupal-7.18/sites/all/modules/admin_menu/admin_menu_toolbar
diff options
context:
space:
mode:
Diffstat (limited to 'kolab.org/www/drupal-7.18/sites/all/modules/admin_menu/admin_menu_toolbar')
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/admin_menu/admin_menu_toolbar/admin_menu_toolbar.css11
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/admin_menu/admin_menu_toolbar/admin_menu_toolbar.info6
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/admin_menu/admin_menu_toolbar/admin_menu_toolbar.module34
3 files changed, 35 insertions, 16 deletions
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/admin_menu/admin_menu_toolbar/admin_menu_toolbar.css b/kolab.org/www/drupal-7.18/sites/all/modules/admin_menu/admin_menu_toolbar/admin_menu_toolbar.css
index 56e448a..a3e9f3e 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/admin_menu/admin_menu_toolbar/admin_menu_toolbar.css
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/admin_menu/admin_menu_toolbar/admin_menu_toolbar.css
@@ -16,7 +16,8 @@ html body.admin-menu {
html body.admin-menu-with-shortcuts {
margin-top: 65px !important;
}
-body div#toolbar {
+/* Displace the core Toolbar, if concurrently output. */
+body div#toolbar.toolbar {
top: 30px;
}
@@ -28,11 +29,9 @@ body div#toolbar {
*/
#admin-menu {
font: normal small "Lucida Grande", Verdana, sans-serif;
- margin: 0 -20px;
- padding: 0 20px;
- -moz-box-shadow: 0 3px 20px #000;
- -webkit-box-shadow: 0 3px 20px #000;
- box-shadow: 0 3px 20px #000;
+ -moz-box-shadow: 0 -10px 20px 13px #000;
+ -webkit-box-shadow: 0 -10px 20px 13px #000;
+ box-shadow: 0 -10px 20px 13px #000;
right: 0;
width: auto;
}
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/admin_menu/admin_menu_toolbar/admin_menu_toolbar.info b/kolab.org/www/drupal-7.18/sites/all/modules/admin_menu/admin_menu_toolbar/admin_menu_toolbar.info
index a63b6ce..2514776 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/admin_menu/admin_menu_toolbar/admin_menu_toolbar.info
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/admin_menu/admin_menu_toolbar/admin_menu_toolbar.info
@@ -4,9 +4,9 @@ package = Administration
core = 7.x
dependencies[] = admin_menu
-; Information added by drupal.org packaging script on 2012-05-17
-version = "7.x-3.0-rc3"
+; Information added by drupal.org packaging script on 2013-01-31
+version = "7.x-3.0-rc4"
core = "7.x"
project = "admin_menu"
-datestamp = "1337292349"
+datestamp = "1359651687"
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/admin_menu/admin_menu_toolbar/admin_menu_toolbar.module b/kolab.org/www/drupal-7.18/sites/all/modules/admin_menu/admin_menu_toolbar/admin_menu_toolbar.module
index 1885fce..74a9ee1 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/admin_menu/admin_menu_toolbar/admin_menu_toolbar.module
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/admin_menu/admin_menu_toolbar/admin_menu_toolbar.module
@@ -8,6 +8,17 @@
*/
/**
+ * Implements hook_form_FORMID_alter().
+ */
+function admin_menu_toolbar_form_admin_menu_theme_settings_alter(&$form) {
+ // Add the shortcut links as component on behalf of Shortcut module.
+ $form['plugins']['admin_menu_components']['#options']['shortcut.links'] = t('Shortcuts');
+ // The shortcut bar consists of two elements, so we target their class names
+ // instead of cluttering the markup with additional IDs.
+ $form['plugins']['admin_menu_components']['shortcut.links']['#attributes']['rel'] = '.shortcut-toggle, .shortcut-toolbar';
+}
+
+/**
* Implementation of hook_page_build().
*/
function admin_menu_toolbar_page_build(&$page) {
@@ -48,6 +59,9 @@ function admin_menu_toolbar_page_build(&$page) {
* Implements hook_admin_menu_output_build().
*/
function admin_menu_toolbar_admin_menu_output_build(&$content) {
+ if (empty($content['#components']['shortcut.links']) && !$content['#complete']) {
+ return;
+ }
// Add shortcuts toggle.
$content['shortcut-toggle'] = array(
'#access' => module_exists('shortcut'),
@@ -82,17 +96,23 @@ function admin_menu_toolbar_admin_menu_output_build(&$content) {
*/
function admin_menu_toolbar_admin_menu_output_alter(&$content) {
// Add a class to top-level items for styling.
- foreach (element_children($content['menu']) as $link) {
- $content['menu'][$link]['#attributes']['class'][] = 'admin-menu-toolbar-category';
+ if (isset($content['menu'])) {
+ foreach (element_children($content['menu']) as $link) {
+ $content['menu'][$link]['#attributes']['class'][] = 'admin-menu-toolbar-category';
+ }
}
// Alter icon.
- unset($content['icon']['icon']['#theme']);
- $content['icon']['icon']['#title'] = '<span>' . t('Home') . '</span>';
- $content['icon']['icon']['#attributes']['class'][] = 'admin-menu-toolbar-category';
+ if (isset($content['icon'])) {
+ unset($content['icon']['icon']['#theme']);
+ $content['icon']['icon']['#title'] = '<span>' . t('Home') . '</span>';
+ $content['icon']['icon']['#attributes']['class'][] = 'admin-menu-toolbar-category';
+ }
// Alter user account link.
- $content['user']['account']['#title'] = t('Hello <strong>@username</strong>', array('@username' => $content['user']['account']['#title']));
- $content['user']['account']['#options']['html'] = TRUE;
+ if (isset($content['account'])) {
+ $content['account']['account']['#title'] = t('Hello <strong>@username</strong>', array('@username' => $content['account']['account']['#title']));
+ $content['account']['account']['#options']['html'] = TRUE;
+ }
}