From 8c39ab6f4af21e0426d61e975f4cb3ab77d3b6c0 Mon Sep 17 00:00:00 2001 From: Bachir Soussi Chiadmi Date: Tue, 23 Jun 2020 12:38:16 +0200 Subject: [PATCH] updated admin_menu & adminimal_admin_menu --- .../contrib/admin/admin_menu/README.txt | 214 +++-- .../admin_menu/admin_devel/admin_devel.info | 7 +- .../admin/admin_menu/admin_menu-rtl.css | 9 +- .../admin/admin_menu/admin_menu.admin.js | 12 +- .../admin/admin_menu/admin_menu.color.css | 3 +- .../contrib/admin/admin_menu/admin_menu.css | 14 +- .../contrib/admin/admin_menu/admin_menu.inc | 58 +- .../contrib/admin/admin_menu/admin_menu.info | 7 +- .../contrib/admin/admin_menu/admin_menu.js | 12 +- .../admin/admin_menu/admin_menu.map.inc | 9 +- .../admin/admin_menu/admin_menu.module | 39 +- .../admin/admin_menu/admin_menu.uid1.css | 1 - .../admin_menu_toolbar-rtl.css | 4 + .../admin_menu_toolbar/admin_menu_toolbar.css | 7 +- .../admin_menu_toolbar.info | 7 +- .../admin_menu_toolbar.install | 1 - .../admin_menu_toolbar.module | 1 - .../admin/admin_menu/tests/admin_menu.test | 67 +- .../admin/adminimal_admin_menu/CREDITS.txt | 6 + .../admin/adminimal_admin_menu/README.txt | 26 +- .../adminimal_admin_menu.admin.inc | 103 +++ .../adminimal_admin_menu.css | 101 +-- .../adminimal_admin_menu.info | 7 +- .../adminimal_admin_menu.install | 16 +- .../adminimal_admin_menu.module | 224 +++-- .../adminimal_menu_settings.inc | 101 --- .../admin/adminimal_admin_menu/credits.txt | 2 - .../adminimal_admin_menu/images/home.png | Bin 1347 -> 562 bytes .../adminimal_admin_menu/images/shortcut.png | Bin 1478 -> 699 bytes .../adminimal_admin_menu/images/square.png | Bin 964 -> 171 bytes .../js/adminimal_admin_menu.js | 87 +- .../slicknav/jquery-no-conflict.slicknav.js | 814 ++++++++--------- .../js/slicknav/jquery.slicknav.js | 818 +++++++++--------- .../js/slicknav/slicknav.css | 387 +++++---- .../updates/update_7100.php | 18 - 35 files changed, 1687 insertions(+), 1495 deletions(-) create mode 100644 sites/all/modules/contrib/admin/admin_menu/admin_menu_toolbar/admin_menu_toolbar-rtl.css create mode 100644 sites/all/modules/contrib/admin/adminimal_admin_menu/CREDITS.txt create mode 100644 sites/all/modules/contrib/admin/adminimal_admin_menu/adminimal_admin_menu.admin.inc delete mode 100644 sites/all/modules/contrib/admin/adminimal_admin_menu/adminimal_menu_settings.inc delete mode 100644 sites/all/modules/contrib/admin/adminimal_admin_menu/credits.txt delete mode 100644 sites/all/modules/contrib/admin/adminimal_admin_menu/updates/update_7100.php diff --git a/sites/all/modules/contrib/admin/admin_menu/README.txt b/sites/all/modules/contrib/admin/admin_menu/README.txt index 136db709..6fe556d2 100644 --- a/sites/all/modules/contrib/admin/admin_menu/README.txt +++ b/sites/all/modules/contrib/admin/admin_menu/README.txt @@ -1,65 +1,84 @@ +CONTENTS OF THIS FILE +--------------------- --- SUMMARY -- + * Introduction + * Requirements + * Installation + * Configuration + * Customization + * Troubleshooting + * FAQ + * Maintainers + + +INTRODUCTION +------------ The Administration menu module displays the entire administrative menu tree (and most local tasks) in a drop-down menu, providing administrators one- or two-click access to most pages. Other modules may also add menu links to the menu using hook_admin_menu_output_alter(). -For a full description of the module, visit the project page: - http://drupal.org/project/admin_menu +For a full description of the project visit the project page: +http://drupal.org/project/admin_menu To submit bug reports and feature suggestions, or to track changes: - http://drupal.org/project/issues/admin_menu +http://drupal.org/project/issues/admin_menu --- REQUIREMENTS -- +REQUIREMENTS +------------ -None. +No special requirements --- INSTALLATION -- +INSTALLATION +------------ -* Install as usual, see http://drupal.org/node/895232 for further information. +Install as you would normally install a contributed Drupal. See: +https://drupal.org/documentation/install/modules-themes/modules-7 for further +information. -* You likely want to disable Toolbar module, since its output clashes with - Administration menu. + * You likely want to disable Toolbar module, since its output clashes with + Administration menu. --- CONFIGURATION -- +CONFIGURATION +------------- -* Configure user permissions in Administration » People » Permissions: + * Configure user permissions in Administration » People » Permissions: - - Use the administration pages and help (System module) + - Use the administration pages and help (System module) - The top-level administration categories require this permission to be - accessible. The administration menu will be empty unless this permission is - granted. + The top-level administration categories require this permission to be + accessible. The administration menu will be empty unless this permission is + granted. - - Access administration menu + - Access administration menu - Users in roles with the "Access administration menu" permission will see - the administration menu at the top of each page. + Users in roles with the "Access administration menu" permission will see + the administration menu at the top of each page. - - Display Drupal links + - Display Drupal links - Users in roles with the "Display drupal links" permission will receive - links to drupal.org issue queues for all enabled contributed modules. The - issue queue links appear under the administration menu icon. + Users in roles with the "Display drupal links" permission will receive + links to drupal.org issue queues for all enabled contributed modules. The + issue queue links appear under the administration menu icon. - Note that the menu items displayed in the administration menu depend on the - actual permissions of the viewing user. For example, the "People" menu item - is not displayed to a user who is not a member of a role with the "Administer - users" permission. + Note that the menu items displayed in the administration menu depend on the + actual permissions of the viewing user. For example, the "People" menu item + is not displayed to a user who is not a member of a role with the + "Administer users" permission. -* Customize the menu settings in Administration » Configuration and modules » - Administration » Administration menu. + * Customize the menu settings in Administration » Configuration and modules » + Administration » Administration menu. -* To prevent administrative menu items from appearing twice, you may hide the - "Management" menu block. + * To prevent administrative menu items from appearing twice, you may hide the + "Management" menu block. --- CUSTOMIZATION -- +CUSTOMIZATION +------------- * To override the default administration menu icon, you may: @@ -82,12 +101,13 @@ None. body #admin-menu { font-size: 10px; } --- TROUBLESHOOTING -- +TROUBLESHOOTING +------------- * If the menu does not display, check the following: - - Are the "Access administration menu" and "Use the administration pages and help" - permissions enabled for the appropriate roles? + - Are the "Access administration menu" and "Use the administration pages and + help" permissions enabled for the appropriate roles? - Does html.tpl.php of your theme output the $page_bottom variable? @@ -99,90 +119,102 @@ None. See http://drupal.org/node/195386 for further information. --- FAQ -- +FAQ +--- -Q: When the administration menu module is enabled, blank space is added to the - bottom of my theme. Why? + Q: When the administration menu module is enabled, blank space is added to the + bottom of my theme. Why? -A: This is caused by a long list of links to module issue queues at Drupal.org. - Use Administer >> User management >> Permissions to disable the "display - drupal links" permission for all appropriate roles. Note that since UID 1 - automatically receives all permissions, the list of issue queue links cannot - be disabled for UID 1. + A: This is caused by a long list of links to module issue queues at Drupal.org. + Use Administer >> User management >> Permissions to disable the "display + drupal links" permission for all appropriate roles. Note that since UID 1 + automatically receives all permissions, the list of issue queue links cannot + be disabled for UID 1. -Q: After upgrading to 6.x-1.x, the menu disappeared. Why? + Q: After upgrading to 6.x-1.x, the menu disappeared. Why? -A: You may need to regenerate your menu. Visit - http://example.com/admin/build/modules to regenerate your menu (substitute - your site name for example.com). + A: You may need to regenerate your menu. Visit + http://example.com/admin/build/modules to regenerate your menu (substitute + your site name for example.com). -Q: Can I configure the administration menu module to display another menu (like - the Navigation menu, for instance)? + Q: Can I configure the administration menu module to display another menu (like + the Navigation menu, for instance)? -A: No. As the name implies, administration menu module is for administrative - menu links only. However, you can copy and paste the contents of - admin_menu.css into your theme's stylesheet and replace #admin-menu with any - other menu block id (#block-menu-1, for example). + A: No. As the name implies, administration menu module is for administrative + menu links only. However, you can copy and paste the contents of + admin_menu.css into your theme's stylesheet and replace #admin-menu with any + other menu block id (#block-menu-1, for example). -Q: Sometimes, the user counter displays a lot of anonymous users, but no spike - of users or requests appear in Google Analytics or other tracking tools. + Q: Sometimes, the user counter displays a lot of anonymous users, but no spike + of users or requests appear in Google Analytics or other tracking tools. -A: If your site was concurrently spidered by search-engine robots, it may have - a significant number of anonymous users for a short time. Most web tracking - tools like Google Analytics automatically filter out these requests. + A: If your site was concurrently spidered by search-engine robots, it may have + a significant number of anonymous users for a short time. Most web tracking + tools like Google Analytics automatically filter out these requests. -Q: I enabled "Aggregate and compress CSS files", but admin_menu.css is still - there. Is this normal? + Q: I enabled "Aggregate and compress CSS files", but admin_menu.css is still + there. Is this normal? -A: Yes, this is the intended behavior. the administration menu module only loads - its stylesheet as needed (i.e., on page requests by logged-on, administrative - users). + A: Yes, this is the intended behavior. the administration menu module only + loads its stylesheet as needed (i.e., on page requests by logged-on, + administrative users). -Q: Why are sub-menus not visible in Opera? + Q: Why are sub-menus not visible in Opera? -A: In the Opera browser preferences under "web pages" there is an option to fit - to width. By disabling this option, sub-menus in the administration menu - should appear. + A: In the Opera browser preferences under "web pages" there is an option to fit + to width. By disabling this option, sub-menus in the administration menu + should appear. -Q: How can the administration menu be hidden on certain pages? + Q: How can the administration menu be hidden on certain pages? -A: You can suppress it by simply calling the following function in PHP: + A: You can suppress it by simply calling the following function in PHP: + module_invoke('admin_menu', 'suppress'); - module_invoke('admin_menu', 'suppress'); - - However, this needs to happen as early as possible in the page request, so - placing it in the theming layer (resp. a page template file) is too late. - Ideally, the function is called in hook_init() in a custom module. If you do - not have a custom module, placing it into some conditional code at the top of - template.php may work out, too. + However, this needs to happen as early as possible in the page request, so + placing it in the theming layer (resp. a page template file) is too late. + Ideally, the function is called in hook_init() in a custom module. If you + do not have a custom module, placing it into some conditional code at the + top of template.php may work out, too. --- CONTACT -- +Q: What does the "Administration Development Tools" module do? + +A: The Administration Development Tools adds a jQuery Debugger which allows + a developer to debug and inspect arbitrary data/variables in Firebug's + console, and also to access them again in the global window object + (optionally using a named identifier, e.g. window.debug.myValue). + Chainable via jQuery. Especially useful for re-accessing and debugging + selected data via Firebug's console. + + +MAINTAINERS +----------- Current maintainers: -* Daniel F. Kudwien (sun) - http://drupal.org/user/54136 -* Peter Wolanin (pwolanin) - http://drupal.org/user/49851 -* Stefan M. Kudwien (smk-ka) - http://drupal.org/user/48898 -* Dave Reid (Dave Reid) - http://drupal.org/user/53892 + * Daniel F. Kudwien (sun) - http://drupal.org/user/54136 + * Peter Wolanin (pwolanin) - http://drupal.org/user/49851 + * Stefan M. Kudwien (smk-ka) - http://drupal.org/user/48898 + * Dave Reid (Dave Reid) - http://drupal.org/user/53892 + * Truls S. Yggeseth (truls1502) - http://drupal.org/user/325866 + * Sebastian Siemssen (fubhy) - https://www.drupal.org/user/761344 Major rewrite for Drupal 6 by Peter Wolanin (pwolanin). This project has been sponsored by: -* UNLEASHED MIND - Specialized in consulting and planning of Drupal powered sites, UNLEASHED - MIND offers installation, development, theming, customization, and hosting - to get you started. Visit http://www.unleashedmind.com for more information. + * UNLEASHED MIND + Specialized in consulting and planning of Drupal powered sites, UNLEASHED + MIND offers installation, development, theming, customization, and hosting + to get you started. Visit http://www.unleashedmind.com for more information. -* Lullabot - Friendly Drupal experts providing professional consulting & education - services. Visit http://www.lullabot.com for more information. - -* Acquia - Commercially Supported Drupal. Visit http://acquia.com for more information. + * Lullabot + Friendly Drupal experts providing professional consulting & education + services. Visit http://www.lullabot.com for more information. + * Acquia + Commercially Supported Drupal. Visit http://acquia.com for more information. diff --git a/sites/all/modules/contrib/admin/admin_menu/admin_devel/admin_devel.info b/sites/all/modules/contrib/admin/admin_menu/admin_devel/admin_devel.info index ab3d641f..8b09eb18 100644 --- a/sites/all/modules/contrib/admin/admin_menu/admin_devel/admin_devel.info +++ b/sites/all/modules/contrib/admin/admin_menu/admin_devel/admin_devel.info @@ -4,9 +4,8 @@ package = Administration core = 7.x scripts[] = admin_devel.js -; Information added by Drupal.org packaging script on 2014-12-19 -version = "7.x-3.0-rc5" +; Information added by Drupal.org packaging script on 2018-12-03 +version = "7.x-3.0-rc6" core = "7.x" project = "admin_menu" -datestamp = "1419029284" - +datestamp = "1543859284" diff --git a/sites/all/modules/contrib/admin/admin_menu/admin_menu-rtl.css b/sites/all/modules/contrib/admin/admin_menu/admin_menu-rtl.css index 9414dcf9..ff9f5008 100644 --- a/sites/all/modules/contrib/admin/admin_menu/admin_menu-rtl.css +++ b/sites/all/modules/contrib/admin/admin_menu/admin_menu-rtl.css @@ -1,4 +1,3 @@ - #admin-menu { text-align: right; } @@ -25,7 +24,7 @@ border-right: 0; } #admin-menu .dropdown .admin-menu-tab a { - border-left: 1px solid #52565E; + border-left: 1px solid #52565e; border-right: 0; } #admin-menu .dropdown li li a { @@ -42,13 +41,13 @@ /* Second-level lists */ #admin-menu .dropdown li ul { left: auto; - right: -999em; + right: auto; } /* Third-and-above-level lists */ #admin-menu .dropdown li li.expandable ul { - margin-left: 0; - margin-right: 160px; + margin-left: 0 !important; + margin-right: 160px !important; } /* Lists nested under hovered list items */ diff --git a/sites/all/modules/contrib/admin/admin_menu/admin_menu.admin.js b/sites/all/modules/contrib/admin/admin_menu/admin_menu.admin.js index 9ee9f36f..37534631 100644 --- a/sites/all/modules/contrib/admin/admin_menu/admin_menu.admin.js +++ b/sites/all/modules/contrib/admin/admin_menu/admin_menu.admin.js @@ -1,4 +1,8 @@ -(function($) { +/** + * @file + */ + +(function ($) { /** * Live preview of Administration menu components. @@ -45,9 +49,9 @@ Drupal.behaviors.adminMenuPermissionsSetupHelp = { // Figure out which is the other, check whether it still disabled, // and if so, ask whether to auto-enable it. var other = (this == $admin[index] ? $menu[index] : $admin[index]); - if (!other.checked && confirm(Drupal.t('Also allow !name role to !permission?', { - '!name': $roles[index].textContent, - '!permission': (this == $admin[index] ? menuPermission : adminPermission) + if (!other.checked && confirm(Drupal.t('Also allow @name role to @permission?', { + '@name': $roles[index].textContent, + '@permission': (this == $admin[index] ? menuPermission : adminPermission) }))) { other.checked = 'checked'; } diff --git a/sites/all/modules/contrib/admin/admin_menu/admin_menu.color.css b/sites/all/modules/contrib/admin/admin_menu/admin_menu.color.css index ea3ef491..00cbf651 100644 --- a/sites/all/modules/contrib/admin/admin_menu/admin_menu.color.css +++ b/sites/all/modules/contrib/admin/admin_menu/admin_menu.color.css @@ -1,4 +1,3 @@ - /** * @file * Administration menu color override. @@ -17,7 +16,7 @@ border-right-color: #a91f1f; } #admin-menu ul li.admin-menu-tab a { - border-right-color: #52565E; + border-right-color: #52565e; } #admin-menu li li a { border-top-color: #801f1f; diff --git a/sites/all/modules/contrib/admin/admin_menu/admin_menu.css b/sites/all/modules/contrib/admin/admin_menu/admin_menu.css index 52ae3ff5..73f15e32 100644 --- a/sites/all/modules/contrib/admin/admin_menu/admin_menu.css +++ b/sites/all/modules/contrib/admin/admin_menu/admin_menu.css @@ -1,4 +1,3 @@ - /** * @file * Administration menu. @@ -16,6 +15,7 @@ position: absolute; text-align: left; top: 0; + height: 30px; width: 100%; } #admin-menu-wrapper { @@ -62,7 +62,7 @@ body.admin-menu { #admin-menu li > span { background: transparent none; border: none; - color: #EEE; + color: #eee; font-weight: normal; text-align: left; /* LTR */ text-decoration: none; @@ -74,7 +74,7 @@ body.admin-menu { padding: 4px 8px; } #admin-menu .dropdown .admin-menu-tab a { - border-right: 1px solid #52565E; /* LTR */ + border-right: 1px solid #52565e; /* LTR */ } #admin-menu .dropdown li li a { border-right: none; /* LTR */ @@ -147,7 +147,7 @@ body.admin-menu { /* Second-and-more-level hovering */ #admin-menu .dropdown li li.expandable { - background: #45454A url(images/arrow.png) no-repeat 145px 6px; + background: #45454a url(images/arrow.png) no-repeat 145px 6px; } #admin-menu .dropdown li li:hover { background-color: #111; @@ -155,19 +155,19 @@ body.admin-menu { #admin-menu .dropdown li li:hover a, #admin-menu .dropdown li li:hover li:hover a, #admin-menu .dropdown li li:hover li:hover li:hover a { - color: #FFF; + color: #fff; } #admin-menu .dropdown li li.expandable:hover a, #admin-menu .dropdown li li.expandable:hover li.expandable:hover a { border-color: #444; - color: #EEE; + color: #eee; } #admin-menu .dropdown li li.expandable:hover li a, #admin-menu .dropdown li li.expandable:hover li.expandable:hover li a { border-color: #323232; } #admin-menu .dropdown li li:hover li a { - color: #EEE; + color: #eee; } /* Search form */ diff --git a/sites/all/modules/contrib/admin/admin_menu/admin_menu.inc b/sites/all/modules/contrib/admin/admin_menu/admin_menu.inc index 2eab789b..5721d9ad 100644 --- a/sites/all/modules/contrib/admin/admin_menu/admin_menu.inc +++ b/sites/all/modules/contrib/admin/admin_menu/admin_menu.inc @@ -97,7 +97,7 @@ function admin_menu_tree_dynamic(array $expand_map) { $db_or = db_or(); foreach ($plids as $path_plids) { $db_and = db_and(); - // plids with value 0 may be ignored. + // Plids with value 0 may be ignored. foreach (array_filter($path_plids) as $column => $plid) { $db_and->condition($column, $plid); } @@ -204,7 +204,7 @@ function admin_menu_merge_tree(array &$tree, array $tree_dynamic, array $expand_ foreach ($load_functions as $index => $function) { if ($function) { if (is_array($function)) { - list($function,) = each($function); + $function = key($function); } // Add the loader function name minus "_load". $placeholder = '%' . substr($function, 0, -5); @@ -269,7 +269,7 @@ function admin_menu_translate($router_item, $map) { // replace any other. // @todo Doing this instead leads to plenty of duplicate links below // admin/structure/menu; likely a hidden recursion problem. - // $router_item['mlid'] = $router_item['href'] . $router_item['mlid']; + // $router_item['mlid'] = $router_item['href'] . $router_item['mlid'];. $router_item['mlid'] = $router_item['href']; // Turn menu callbacks into regular menu items to make them visible. if ($router_item['type'] == MENU_CALLBACK) { @@ -278,10 +278,12 @@ function admin_menu_translate($router_item, $map) { // @see _menu_tree_check_access() $key = (50000 + $router_item['weight']) . ' ' . $router_item['title'] . ' ' . $router_item['mlid']; - return array($key => array( - 'link' => $router_item, - 'below' => array(), - )); + return array( + $key => array( + 'link' => $router_item, + 'below' => array(), + ), + ); } return array(); @@ -461,20 +463,22 @@ function admin_menu_links_icon() { '#access' => user_access('display drupal links'), '#href' => 'http://drupal.org', ); - // Add links to project issue queues. - foreach (module_list(FALSE, TRUE) as $module) { - $info = drupal_parse_info_file(drupal_get_path('module', $module) . '/' . $module . '.info'); - if (!isset($info['project']) || isset($links['icon']['drupal.org'][$info['project']])) { - continue; + if (variable_get('admin_menu_issue_queues', TRUE)) { + // Add links to project issue queues. + foreach (module_list(FALSE, TRUE) as $module) { + $info = drupal_parse_info_file(drupal_get_path('module', $module) . '/' . $module . '.info'); + if (!isset($info['project']) || isset($links['icon']['drupal.org'][$info['project']])) { + continue; + } + $links['icon']['drupal.org'][$info['project']] = array( + '#title' => t('@project issue queue', array('@project' => $info['name'])), + '#weight' => ($info['project'] == 'drupal' ? -10 : 0), + '#href' => 'http://drupal.org/project/issues/' . $info['project'], + '#options' => array( + 'query' => array('version' => (isset($info['core']) ? $info['core'] : 'All')), + ), + ); } - $links['icon']['drupal.org'][$info['project']] = array( - '#title' => t('@project issue queue', array('@project' => $info['name'])), - '#weight' => ($info['project'] == 'drupal' ? -10 : 0), - '#href' => 'http://drupal.org/project/issues/' . $info['project'], - '#options' => array( - 'query' => array('version' => (isset($info['core']) ? $info['core'] : 'All')), - ), - ); } // Add items to flush caches. $links['icon']['flush-cache'] = array( @@ -570,7 +574,7 @@ function admin_menu_links_users() { '#description' => t('Current anonymous / authenticated users'), '#weight' => -90, '#attributes' => array('class' => array('admin-menu-action', 'admin-menu-users')), - '#href' => (user_access('administer users') ? 'admin/people/people' : 'user'), + '#href' => (user_access('administer users') ? 'admin/people' : 'user'), ); return $links; } @@ -658,7 +662,7 @@ function admin_menu_theme_settings() { '#default_value' => variable_get('admin_menu_tweak_modules', 0), ); if (module_exists('util')) { - $form['tweaks']['admin_menu_tweak_modules']['#description'] .= '
' . t('If the Utility module was installed for this purpose, it can be safely disabled and uninstalled.') . ''; + $form['tweaks']['admin_menu_tweak_modules']['#description'] = '
' . t('If the Utility module was installed for this purpose, it can be safely disabled and uninstalled.') . ''; } $form['tweaks']['admin_menu_tweak_permissions'] = array( '#type' => 'checkbox', @@ -685,6 +689,11 @@ function admin_menu_theme_settings() { '#title' => t('Cache menu in client-side browser'), '#default_value' => variable_get('admin_menu_cache_client', 1), ); + $form['performance']['admin_menu_issue_queues'] = array( + '#type' => 'checkbox', + '#title' => t('Show Issue Queue links in icon menu'), + '#default_value' => variable_get('admin_menu_issue_queues', 1), + ); return system_settings_form($form); } @@ -763,18 +772,20 @@ function admin_menu_flush_cache($name = NULL) { if (!isset($caches[$name])) { return MENU_NOT_FOUND; } + $message = t('@title cache cleared.', array('@title' => $caches[$name]['title'])); } else { $caches[$name] = array( 'title' => t('Every'), 'callback' => 'drupal_flush_all_caches', ); + $message = t('All caches cleared.'); } // Pass the cache to flush forward to the callback. $function = $caches[$name]['callback']; $function($name); - drupal_set_message(t('!title cache cleared.', array('!title' => $caches[$name]['title']))); + drupal_set_message($message); // The JavaScript injects a destination request parameter pointing to the // originating page, so the user is redirected back to that page. Without @@ -907,4 +918,3 @@ function template_preprocess_admin_menu_icon(&$variables) { function theme_admin_menu_icon($variables) { return '' . $variables['alt'] . ''; } - diff --git a/sites/all/modules/contrib/admin/admin_menu/admin_menu.info b/sites/all/modules/contrib/admin/admin_menu/admin_menu.info index c6dbd892..ffd22e44 100644 --- a/sites/all/modules/contrib/admin/admin_menu/admin_menu.info +++ b/sites/all/modules/contrib/admin/admin_menu/admin_menu.info @@ -8,9 +8,8 @@ configure = admin/config/administration/admin_menu dependencies[] = system (>7.10) files[] = tests/admin_menu.test -; Information added by Drupal.org packaging script on 2014-12-19 -version = "7.x-3.0-rc5" +; Information added by Drupal.org packaging script on 2018-12-03 +version = "7.x-3.0-rc6" core = "7.x" project = "admin_menu" -datestamp = "1419029284" - +datestamp = "1543859284" diff --git a/sites/all/modules/contrib/admin/admin_menu/admin_menu.js b/sites/all/modules/contrib/admin/admin_menu/admin_menu.js index 2e28b554..1e32b3d6 100644 --- a/sites/all/modules/contrib/admin/admin_menu/admin_menu.js +++ b/sites/all/modules/contrib/admin/admin_menu/admin_menu.js @@ -1,4 +1,8 @@ -(function($) { +/** + * @file + */ + +(function ($) { Drupal.admin = Drupal.admin || {}; Drupal.admin.behaviors = Drupal.admin.behaviors || {}; @@ -139,7 +143,7 @@ Drupal.admin.getCache = function (hash, onSuccess) { * * @see toolbar.js */ -Drupal.admin.height = function() { +Drupal.admin.height = function () { var $adminMenu = $('#admin-menu'); var height = $adminMenu.outerHeight(); // In IE, Shadow filter adds some extra height, so we need to remove it from @@ -161,7 +165,7 @@ Drupal.admin.height = function() { Drupal.admin.attachBehaviors = function (context, settings, $adminMenu) { if ($adminMenu.length) { $adminMenu.addClass('admin-menu-processed'); - $.each(Drupal.admin.behaviors, function() { + $.each(Drupal.admin.behaviors, function () { this(context, settings, $adminMenu); }); } @@ -206,7 +210,7 @@ Drupal.admin.behaviors.replacements = function (context, settings, $adminMenu) { */ Drupal.admin.behaviors.destination = function (context, settings, $adminMenu) { if (settings.admin_menu.destination) { - $('a.admin-menu-destination', $adminMenu).each(function() { + $('a.admin-menu-destination', $adminMenu).each(function () { this.search += (!this.search.length ? '?' : '&') + Drupal.settings.admin_menu.destination; }); } diff --git a/sites/all/modules/contrib/admin/admin_menu/admin_menu.map.inc b/sites/all/modules/contrib/admin/admin_menu/admin_menu.map.inc index f86e80cd..831e3243 100644 --- a/sites/all/modules/contrib/admin/admin_menu/admin_menu.map.inc +++ b/sites/all/modules/contrib/admin/admin_menu/admin_menu.map.inc @@ -80,7 +80,14 @@ function field_ui_admin_menu_map() { 'access callback' => 'user_access', 'access arguments' => array('administer site configuration'), ); - if (!call_user_func_array($bundle_info['admin']['access callback'], $bundle_info['admin']['access arguments'])) { + $access_arguments = $bundle_info['admin']['access arguments']; + if (isset($bundle_info['admin']['real path'])) { + $menu_item = menu_get_item($bundle_info['admin']['real path']); + if (isset($menu_item['map'])) { + $access_arguments = menu_unserialize(serialize($access_arguments), $menu_item['map']); + } + } + if (!call_user_func_array($bundle_info['admin']['access callback'], $access_arguments)) { continue; } diff --git a/sites/all/modules/contrib/admin/admin_menu/admin_menu.module b/sites/all/modules/contrib/admin/admin_menu/admin_menu.module index 795ad211..f9ce3aed 100644 --- a/sites/all/modules/contrib/admin/admin_menu/admin_menu.module +++ b/sites/all/modules/contrib/admin/admin_menu/admin_menu.module @@ -63,7 +63,7 @@ function admin_menu_theme() { function admin_menu_menu() { // AJAX callback. // @see http://drupal.org/project/js - $items['js/admin_menu/cache'] = array( + $items['js/admin_menu/cache/%'] = array( 'page callback' => 'admin_menu_js_cache', 'delivery callback' => 'admin_menu_deliver', 'access arguments' => array('access administration menu'), @@ -78,7 +78,7 @@ function admin_menu_menu() { 'file' => 'system.admin.inc', 'file path' => drupal_get_path('module', 'system'), ); - $items['admin/config/administration/admin_menu'] = array( + $items['admin/config/administration/admin-menu'] = array( 'title' => 'Administration menu', 'description' => 'Adjust administration menu settings.', 'page callback' => 'drupal_get_form', @@ -211,7 +211,7 @@ function admin_menu_page_build(&$page) { // @todo Drupal.behaviors.adminMenuMarginTop is obsolete, but // hook_page_build() does not allow to set a CSS class on the body yet. // @see http://drupal.org/node/1473548, http://drupal.org/node/1194528 - //$page['#attributes']['class'][] = 'admin-menu'; + // $page['#attributes']['class'][] = 'admin-menu'; } if ($setting = variable_get('admin_menu_position_fixed', 1)) { $settings['position_fixed'] = $setting; @@ -230,7 +230,7 @@ function admin_menu_page_build(&$page) { if ($_GET['q'] == 'admin/modules' || strpos($_GET['q'], 'admin/modules/list') === 0) { $settings['tweak_modules'] = variable_get('admin_menu_tweak_modules', 0); } - if ($_GET['q'] == 'admin/people/permissions' || $_GET['q'] == 'admin/people/permissions/list') { + if (strpos($_GET['q'], 'admin/people/permissions') === 0) { $settings['tweak_permissions'] = variable_get('admin_menu_tweak_permissions', 0); } @@ -502,7 +502,6 @@ function admin_menu_output($complete = FALSE) { // @todo Move the below callbacks into hook_admin_menu_build() // implementations (and $module.admin_menu.inc). - // Add administration menu. if (!empty($components['admin_menu.menu']) || $complete) { $content['menu'] = admin_menu_links_menu(admin_menu_tree('management')); @@ -548,7 +547,10 @@ function admin_menu_output($complete = FALSE) { // Store the new hash for this user. if (!empty($_COOKIE['has_js']) && !$complete) { - admin_menu_cache_set($cid, md5($content)); + $cache = cache_get($cid, 'cache_admin_menu'); + if (!$cache || !isset($cache->data)) { + admin_menu_cache_set($cid, md5($content)); + } } return $content; @@ -603,11 +605,13 @@ function admin_menu_admin_menu_output_build(&$content) { * Implements hook_admin_menu_output_alter(). */ function admin_menu_admin_menu_output_alter(&$content) { - foreach ($content['menu'] as $key => $link) { - // Move local tasks on 'admin' into icon menu. - if ($key == 'admin/tasks' || $key == 'admin/index') { - $content['icon']['icon'][$key] = $link; - unset($content['menu'][$key]); + if (!empty($content['menu'])) { + foreach ($content['menu'] as $key => $link) { + // Move local tasks on 'admin' into icon menu. + if ($key == 'admin/tasks' || $key == 'admin/index') { + $content['icon']['icon'][$key] = $link; + unset($content['menu'][$key]); + } } } } @@ -677,6 +681,13 @@ function theme_admin_menu_links($variables) { $elements[$path]['#options']['attributes']['class'][] = 'admin-menu-destination'; } + // If the path has an alias replace the href with the alias. + if (module_exists('path')) { + if ($alias = drupal_get_path_alias($elements[$path]['#href'])) { + $elements[$path]['#href'] = $alias; + } + } + $link = l($elements[$path]['#title'], $elements[$path]['#href'], $elements[$path]['#options']); } // Handle plain text items, but do not interfere with menu additions. @@ -751,7 +762,7 @@ function admin_menu_translated_menu_link_alter(&$item, $map) { } } - // Don't waste cycles altering items that are not visible + // Don't waste cycles altering items that are not visible. if (!$item['access']) { return; } @@ -795,8 +806,8 @@ function admin_menu_flush_caches($uid = NULL) { cache_clear_all($cid, 'cache_menu', TRUE); // Flush client-side cache hashes. drupal_static_reset('admin_menu_cache_get'); - // db_table_exists() required for SimpleTest. - if (db_table_exists('cache_admin_menu')) { + // If cache_admin_menu is not empty, flush it. + if (!cache_is_empty('cache_admin_menu')) { cache_clear_all(isset($uid) ? $cid : '*', 'cache_admin_menu', TRUE); } } diff --git a/sites/all/modules/contrib/admin/admin_menu/admin_menu.uid1.css b/sites/all/modules/contrib/admin/admin_menu/admin_menu.uid1.css index e375cfe6..105fd242 100644 --- a/sites/all/modules/contrib/admin/admin_menu/admin_menu.uid1.css +++ b/sites/all/modules/contrib/admin/admin_menu/admin_menu.uid1.css @@ -1,4 +1,3 @@ - /** * @file * Administration menu color override for uid1. diff --git a/sites/all/modules/contrib/admin/admin_menu/admin_menu_toolbar/admin_menu_toolbar-rtl.css b/sites/all/modules/contrib/admin/admin_menu/admin_menu_toolbar/admin_menu_toolbar-rtl.css new file mode 100644 index 00000000..a159034d --- /dev/null +++ b/sites/all/modules/contrib/admin/admin_menu/admin_menu_toolbar/admin_menu_toolbar-rtl.css @@ -0,0 +1,4 @@ +#admin-menu > div > .dropdown > li > a, +#admin-menu > div > .dropdown > li > span { + border-left: 0; +} diff --git a/sites/all/modules/contrib/admin/admin_menu/admin_menu_toolbar/admin_menu_toolbar.css b/sites/all/modules/contrib/admin/admin_menu/admin_menu_toolbar/admin_menu_toolbar.css index a3e9f3e3..f1bc0935 100644 --- a/sites/all/modules/contrib/admin/admin_menu/admin_menu_toolbar/admin_menu_toolbar.css +++ b/sites/all/modules/contrib/admin/admin_menu/admin_menu_toolbar/admin_menu_toolbar.css @@ -1,4 +1,3 @@ - /** * @file * Toolbar style for Administration menu. @@ -63,8 +62,9 @@ body div#toolbar.toolbar { background: url(toolbar.png) no-repeat 0 -45px; text-indent: -9999px; } -#admin-menu > div > .dropdown > li > a { - border-right: 0; +#admin-menu > div > .dropdown > li > a, +#admin-menu > div > .dropdown > li > span { + border-right: 0; /* LTR */ margin-bottom: 4px; padding: 2px 10px 3px; } @@ -142,4 +142,3 @@ body div#toolbar.toolbar { #admin-menu .shortcut-toolbar a { display: block; } - diff --git a/sites/all/modules/contrib/admin/admin_menu/admin_menu_toolbar/admin_menu_toolbar.info b/sites/all/modules/contrib/admin/admin_menu/admin_menu_toolbar/admin_menu_toolbar.info index fa4ca095..340ced07 100644 --- a/sites/all/modules/contrib/admin/admin_menu/admin_menu_toolbar/admin_menu_toolbar.info +++ b/sites/all/modules/contrib/admin/admin_menu/admin_menu_toolbar/admin_menu_toolbar.info @@ -4,9 +4,8 @@ package = Administration core = 7.x dependencies[] = admin_menu -; Information added by Drupal.org packaging script on 2014-12-19 -version = "7.x-3.0-rc5" +; Information added by Drupal.org packaging script on 2018-12-03 +version = "7.x-3.0-rc6" core = "7.x" project = "admin_menu" -datestamp = "1419029284" - +datestamp = "1543859284" diff --git a/sites/all/modules/contrib/admin/admin_menu/admin_menu_toolbar/admin_menu_toolbar.install b/sites/all/modules/contrib/admin/admin_menu/admin_menu_toolbar/admin_menu_toolbar.install index bf067d78..f6449dcd 100644 --- a/sites/all/modules/contrib/admin/admin_menu/admin_menu_toolbar/admin_menu_toolbar.install +++ b/sites/all/modules/contrib/admin/admin_menu/admin_menu_toolbar/admin_menu_toolbar.install @@ -34,4 +34,3 @@ function admin_menu_toolbar_update_6300() { ->condition('name', 'admin_menu_toolbar') ->execute(); } - diff --git a/sites/all/modules/contrib/admin/admin_menu/admin_menu_toolbar/admin_menu_toolbar.module b/sites/all/modules/contrib/admin/admin_menu/admin_menu_toolbar/admin_menu_toolbar.module index c6111bdc..0f5c0662 100644 --- a/sites/all/modules/contrib/admin/admin_menu/admin_menu_toolbar/admin_menu_toolbar.module +++ b/sites/all/modules/contrib/admin/admin_menu/admin_menu_toolbar/admin_menu_toolbar.module @@ -115,4 +115,3 @@ function admin_menu_toolbar_admin_menu_output_alter(&$content) { $content['account']['account']['#options']['html'] = TRUE; } } - diff --git a/sites/all/modules/contrib/admin/admin_menu/tests/admin_menu.test b/sites/all/modules/contrib/admin/admin_menu/tests/admin_menu.test index 4b48c9ab..b7c611d7 100644 --- a/sites/all/modules/contrib/admin/admin_menu/tests/admin_menu.test +++ b/sites/all/modules/contrib/admin/admin_menu/tests/admin_menu.test @@ -16,7 +16,10 @@ class AdminMenuWebTestCase extends DrupalWebTestCase { 'admin_menu' => 'access administration menu', ); - function setUp() { + /** + * + */ + public function setUp() { // Enable admin menu module and any other modules. $modules = func_get_args(); $modules = isset($modules[0]) ? $modules[0] : $modules; @@ -108,12 +111,17 @@ class AdminMenuWebTestCase extends DrupalWebTestCase { $xpath = '//div[@id="admin-menu"]/div/ul' . implode('/parent::li/ul', $xpath); $this->assertNoElementByXPath($xpath, $args, $message . ' link not found.'); } + } /** * Tests menu links depending on user permissions. */ class AdminMenuPermissionsTestCase extends AdminMenuWebTestCase { + + /** + * + */ public static function getInfo() { return array( 'name' => 'Menu link access permissions', @@ -122,14 +130,17 @@ class AdminMenuPermissionsTestCase extends AdminMenuWebTestCase { ); } - function setUp() { + /** + * + */ + public function setUp() { parent::setUp(array('node')); } /** * Test that the links are added to the page (no JS testing). */ - function testPermissions() { + public function testPermissions() { module_enable(array('contact')); $this->resetAll(); @@ -140,7 +151,7 @@ class AdminMenuPermissionsTestCase extends AdminMenuWebTestCase { // Create a user who // - can access content overview // - cannot access drupal.org links - // - cannot administer Contact module + // - cannot administer Contact module. $permissions = $this->basePermissions + array( 'access content overview', ); @@ -156,7 +167,7 @@ class AdminMenuPermissionsTestCase extends AdminMenuWebTestCase { // Create a user "reversed" to the above; i.e., who // - cannot access content overview // - can access drupal.org links - // - can administer Contact module + // - can administer Contact module. $permissions = $this->basePermissions + array( 'display drupal links', 'administer contact forms', @@ -172,7 +183,7 @@ class AdminMenuPermissionsTestCase extends AdminMenuWebTestCase { /** * Tests handling of links pointing to category/overview pages. */ - function testCategories() { + public function testCategories() { // Create a user with minimum permissions. $admin_user = $this->drupalCreateUser($this->basePermissions); $this->drupalLogin($admin_user); @@ -201,7 +212,7 @@ class AdminMenuPermissionsTestCase extends AdminMenuWebTestCase { /** * Tests that user role and permission changes are properly taken up. */ - function testPermissionChanges() { + public function testPermissionChanges() { // Create a user who is able to change permissions. $permissions = $this->basePermissions + array( 'administer permissions', @@ -253,12 +264,17 @@ class AdminMenuPermissionsTestCase extends AdminMenuWebTestCase { // Verify that Structure » Content types does not appear. $this->assertNoLinkTrailByTitle(array(t('Structure'), t('Content types'))); } + } /** * Tests appearance, localization, and escaping of dynamic links. */ class AdminMenuDynamicLinksTestCase extends AdminMenuWebTestCase { + + /** + * + */ public static function getInfo() { return array( 'name' => 'Dynamic links', @@ -267,14 +283,17 @@ class AdminMenuDynamicLinksTestCase extends AdminMenuWebTestCase { ); } - function setUp() { + /** + * + */ + public function setUp() { parent::setUp(array('node')); } /** * Tests node type links. */ - function testNode() { + public function testNode() { $type = $this->drupalCreateContentType(array('type' => 'article', 'name' => 'Article')); // Create a content-type with special characters. $type = $this->drupalCreateContentType(array('type' => 'special', 'name' => 'Cool & Special')); @@ -324,7 +343,7 @@ class AdminMenuDynamicLinksTestCase extends AdminMenuWebTestCase { /** * Tests Add content links. */ - function testNodeAdd() { + public function testNodeAdd() { $type = $this->drupalCreateContentType(array('type' => 'article', 'name' => 'Article')); // Verify that "Add content" does not appear for unprivileged users. @@ -359,12 +378,17 @@ class AdminMenuDynamicLinksTestCase extends AdminMenuWebTestCase { t('Add content'), )); } + } /** * Tests appearance of different types of links. */ class AdminMenuLinkTypesTestCase extends AdminMenuWebTestCase { + + /** + * + */ public static function getInfo() { return array( 'name' => 'Link types', @@ -373,7 +397,10 @@ class AdminMenuLinkTypesTestCase extends AdminMenuWebTestCase { ); } - function setUp() { + /** + * + */ + public function setUp() { parent::setUp(array('help')); $permissions = module_invoke_all('permission'); @@ -385,7 +412,7 @@ class AdminMenuLinkTypesTestCase extends AdminMenuWebTestCase { /** * Tests appearance of different router item link types. */ - function testLinkTypes() { + public function testLinkTypes() { // Verify that MENU_NORMAL_ITEMs appear. $this->assertLinkTrailByTitle(array( t('Configuration'), @@ -420,12 +447,17 @@ class AdminMenuLinkTypesTestCase extends AdminMenuWebTestCase { ':title' => t('Index'), ), "Icon » Index link found."); } + } /** * Tests customized menu links. */ class AdminMenuCustomizedTestCase extends AdminMenuWebTestCase { + + /** + * + */ public static function getInfo() { return array( 'name' => 'Customized links', @@ -434,7 +466,10 @@ class AdminMenuCustomizedTestCase extends AdminMenuWebTestCase { ); } - function setUp() { + /** + * + */ + public function setUp() { parent::setUp(array('menu')); $this->admin_user = $this->drupalCreateUser($this->basePermissions + array( @@ -446,7 +481,7 @@ class AdminMenuCustomizedTestCase extends AdminMenuWebTestCase { /** * Test disabled custom links. */ - function testCustomDisabled() { + public function testCustomDisabled() { $type = $this->drupalCreateContentType(); $node = $this->drupalCreateNode(array('type' => $type->type)); $text = $this->randomName(); @@ -488,7 +523,7 @@ class AdminMenuCustomizedTestCase extends AdminMenuWebTestCase { /** * Tests external links. */ - function testCustomExternal() { + public function testCustomExternal() { // Add a custom link to the node to the menu. $edit = array( 'link_path' => 'http://example.com', @@ -516,5 +551,5 @@ class AdminMenuCustomizedTestCase extends AdminMenuWebTestCase { ':path' => $path, ))->fetchField(); } -} +} diff --git a/sites/all/modules/contrib/admin/adminimal_admin_menu/CREDITS.txt b/sites/all/modules/contrib/admin/adminimal_admin_menu/CREDITS.txt new file mode 100644 index 00000000..1f36965f --- /dev/null +++ b/sites/all/modules/contrib/admin/adminimal_admin_menu/CREDITS.txt @@ -0,0 +1,6 @@ +# Design and development +* [ANDiTKO](https://anditko.com/) + +# Icons +* [Icons8](https://icons8.com/) +* [VisualPharm](https://visualpharm.com/) diff --git a/sites/all/modules/contrib/admin/adminimal_admin_menu/README.txt b/sites/all/modules/contrib/admin/adminimal_admin_menu/README.txt index 67ff8806..b9cf91a1 100644 --- a/sites/all/modules/contrib/admin/adminimal_admin_menu/README.txt +++ b/sites/all/modules/contrib/admin/adminimal_admin_menu/README.txt @@ -1,22 +1,24 @@ -Quick info: +# Quick info “Adminimal Administration Menu” changes the style of the “Administration menu” module. It adds a nice and simple minimalist look and provides some tweaks to improve you Drupal administration experience. -The menu hierarchy is not simpler and easier to understand -(removing the unnecessary transparency and only highlighting the correct menus). - It also adds shortcut links that can be edited from the core shortcut module. - The shortcut links fit nicely and have a small icon that separates them from - the normal admin menu links. -Requirements: -Requires the administration menu module (http://drupal.org/project/admin_menu) +The menu hierarchy is now easier to understand, by removing the unnecessary +transparency and only highlighting the correct menus. -Installation: -1) Download and install like any other drupal module -2) Enable the “Administration menu Adminimal Theme” from the module manager. +It also adds shortcut links that can be edited from the core shortcut module. +The shortcut links fit nicely and have a small icon that separates them from +the normal admin menu links. + +# Requirements +* [Administration menu module](http://drupal.org/project/admin_menu) + +# Installation +1. Download and install like any other drupal module +2. Enable the “Administration menu Adminimal Theme” from the module manager. If you are using the “Administration menu Toolbar style” it will be disabled automatically to prevent some styling issues. This change will be saved in your database, so if you decide to disable the “Administration menu Adminimal Theme” your old “Administration menu Toolbar style” will be enabled automatically so you have nothing to worry about. -3) Refresh your administration page and you must be good to go! +3. Refresh your administration page and you must be good to go! diff --git a/sites/all/modules/contrib/admin/adminimal_admin_menu/adminimal_admin_menu.admin.inc b/sites/all/modules/contrib/admin/adminimal_admin_menu/adminimal_admin_menu.admin.inc new file mode 100644 index 00000000..33d5da08 --- /dev/null +++ b/sites/all/modules/contrib/admin/adminimal_admin_menu/adminimal_admin_menu.admin.inc @@ -0,0 +1,103 @@ + 'fieldset', + '#title' => t('Shortcut options'), + ); + + if (module_exists('shortcut')) { + // Create the select list. + $form['shortcut']['adminimal_admin_menu_render'] = array( + '#type' => 'radios', + '#title' => t('Rendering method'), + '#default_value' => variable_get('adminimal_admin_menu_render', 'collapsed'), + '#options' => array( + 'hidden' => t('Hidden'), + 'inline' => t('Inline'), + 'collapsed' => t('Collapsed'), + 'newline' => t('Newline'), + 'dropdown' => t('Dropdown'), + 'exclusive' => t('Exclusive'), + ), + '#required' => TRUE, + ); + + $descriptions = &$form['shortcut']['adminimal_admin_menu_render']; + $descriptions['hidden']['#description'] = t('Shortcuts will not be rendered inside the admin menu.'); + $descriptions['inline']['#description'] = t('Shortcuts will be rendered on the same line with the root menu links.'); + $descriptions['collapsed']['#description'] = t('Shortcuts will be collapsed like a normal menu.'); + $descriptions['newline']['#description'] = t('(Default)') . ' ' . t('Shortcuts will be rendered on a new line, below the root menu links.'); + $descriptions['dropdown']['#description'] = t('Shortcuts will be rendered inside a dropdown using the select html tag.'); + $descriptions['exclusive']['#description'] = t('Only the shortcuts will be rendered; the normal menu will be hidden.'); + } + else { + $form['shortcut']['#description'] = t('Module Shortcut is supported, but not required by Adminimal Admin Menu.'); + } + + // Create the advanced settings category. + $form['advanced_settings'] = array( + '#type' => 'fieldset', + '#title' => t('Advanced settings'), + '#description' => t('Do not change any of the advanced setting unless you know what you are doing!'), + '#collapsible' => TRUE, + '#collapsed' => TRUE, + ); + + $form['advanced_settings']['adminimal_admin_menu_slicknav'] = array( + '#type' => 'checkbox', + '#default_value' => variable_get('adminimal_admin_menu_slicknav', TRUE), + '#title' => t('Enable Responsive Menu.'), + '#description' => t('Enable this option if you want to have responsive menu and mobile device support. While disabling this option could save you few kilobytes (around 3KB), it will completely disable the responsive menu functionality.'), + ); + + $form['advanced_settings']['adminimal_admin_menu_jquery'] = array( + '#type' => 'checkbox', + '#default_value' => variable_get('adminimal_admin_menu_jquery', TRUE), + '#title' => t('Load the required jQuery 1.7 library automagically.'), + '#description' => t('This will load the newer jQuery version 1.7 using the no-conflict method so it won\'t interfere with any existing jQuery or other JavaScript libraries. The only reason to un-check this if you are already using a newer version of jQuery site-wide and its globally accessible by the "$" variable. Un-cheking this option could save you 33KB, but it may also break your JavaScript if not used correctly.'), + '#states' => array( + // Hide the settings when the cancel notify checkbox is disabled. + 'visible' => array( + ':input[name="adminimal_admin_menu_slicknav"]' => array('checked' => TRUE), + ), + ), + ); + + $form['advanced_settings']['adminimal_admin_menu_viewport'] = array( + '#type' => 'checkbox', + '#default_value' => variable_get('adminimal_admin_menu_viewport', TRUE), + '#title' => t('Set the metatag viewport \'width=device-width, initial-scale=1\' for devices.'), + '#description' => t('This is needed for the responsive menu, if no other theme or module sets the viewport.'), + '#states' => array( + // Hide the settings when the cancel notify checkbox is disabled. + 'visible' => array( + ':input[name="adminimal_admin_menu_slicknav"]' => array('checked' => TRUE), + ), + ), + ); + + $form = system_settings_form($form); + + $form['#submit'][] = 'adminimal_admin_menu_settings_submit'; + + return $form; +} + +/** + * Submit callback for adminimal_admin_menu_settings(); + */ +function adminimal_admin_menu_settings_submit($form, &$form_state) { + // Clear the admin menu cache. + admin_menu_flush_caches(); +} diff --git a/sites/all/modules/contrib/admin/adminimal_admin_menu/adminimal_admin_menu.css b/sites/all/modules/contrib/admin/adminimal_admin_menu/adminimal_admin_menu.css index 3edb463a..e8335719 100644 --- a/sites/all/modules/contrib/admin/adminimal_admin_menu/adminimal_admin_menu.css +++ b/sites/all/modules/contrib/admin/adminimal_admin_menu/adminimal_admin_menu.css @@ -6,22 +6,18 @@ font-weight: 300; src: local('Open Sans Light'), local('OpenSans-Light'), url(https://themes.googleusercontent.com/static/fonts/opensans/v6/DXI1ORHCpsQm3Vp6mXoaTRsxEYwM7FgeyaSgU71cLG0.woff) format('woff'); } - @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: local('Open Sans'), local('OpenSans'), url(https://themes.googleusercontent.com/static/fonts/opensans/v6/uYKcPVoh6c5R0NpdEY5A-Q.woff) format('woff'); } - @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(https://themes.googleusercontent.com/static/fonts/opensans/v6/MTP_ySUJH_bn48VBG8sNShsxEYwM7FgeyaSgU71cLG0.woff) format('woff'); } - - /* Blink Animation */ @keyframes blink { @@ -38,7 +34,6 @@ color: #fff; } } - @-moz-keyframes blink { 0% { background-color: #f69231; @@ -53,7 +48,6 @@ color: #fff; } } - @-webkit-keyframes blink { 0% { background-color: #f69231; @@ -68,7 +62,6 @@ color: #fff; } } - @-o-keyframes blink { 0% { background-color: #f69231; @@ -83,15 +76,12 @@ color: #fff; } } - body.admin-menu.adminimal-menu #admin-menu *::-moz-focus-inner { border: 0; } - body.admin-menu.adminimal-menu { - margin-top: 0px !important; + margin-top: 0 !important; } - body.admin-menu.adminimal-menu:before { content: ""; display: block; @@ -100,18 +90,15 @@ body.admin-menu.adminimal-menu:before { top: 0; left: 0; } - body.adminimal-menu div#admin-menu { background: #333; background: none repeat scroll 0 0 #202020; - border-bottom: 1px solid #111111; + border-bottom: 1px solid #111; font-family: Open Sans, "Segoe UI", "Helvetica", sans-serif; } - body.adminimal-menu div#admin-menu li.admin-menu-toolbar-home-menu { background: transparent; } - body.adminimal-menu div#admin-menu ul.dropdown span.admin-menu-home-icon { background: url("images/home.svg") no-repeat scroll 0 0 transparent; display: block; @@ -119,7 +106,6 @@ body.adminimal-menu div#admin-menu ul.dropdown span.admin-menu-home-icon { padding: 0; width: 15px; } - body.adminimal-menu div#admin-menu a, body.adminimal-menu div#admin-menu span { border: none !important; @@ -127,146 +113,114 @@ body.adminimal-menu div#admin-menu span { font-size: 12px; line-height: 18px; } - body.adminimal-menu div#admin-menu a:hover { background-color: #0074bd; color: #fff; } - body.adminimal-menu #admin-menu .dropdown li li { background-color: #1f1f1f; } - body.adminimal-menu #admin-menu .dropdown li li.expandable ul { margin-top: -28px; } - body.adminimal-menu #admin-menu .dropdown li li > li.admin-menu-toolbar-category { background: #fff !important; } - body.adminimal-menu #admin-menu .dropdown li li li:hover, body.adminimal-menu #admin-menu .dropdown li:hover { background: #0074bd !important; } - body.adminimal-menu #admin-menu .dropdown a { border-right: none; } - body.adminimal-menu #admin-menu .dropdown li.admin-menu-toolbar-category a { line-height: 20px; } - body.adminimal-menu #admin-menu .dropdown li.admin-menu-toolbar-category a:focus { - background: #0074BD; + background: #0074bd; } - body.adminimal-menu #admin-menu #admin-menu-wrapper .dropdown li li { opacity: 1; } - body.adminimal-menu #admin-menu .dropdown li li:hover, body.adminimal-menu #admin-menu .dropdown li li.iehover { background-color: #333; } - body.adminimal-menu #admin-menu #admin-menu-wrapper .dropdown li li a { border: none; } - body.adminimal-menu #admin-menu #admin-menu-wrapper .dropdown li li.expandable { background: url("images/square.png") no-repeat scroll 145px 11px #1f1f1f; } - body.adminimal-menu #admin-menu #admin-menu-wrapper .dropdown li li.expandable a { background: transparent; padding-right: 25px; } - body.adminimal-menu #admin-menu #admin-menu-wrapper .dropdown li li.expandable:hover { background: url("images/square.png") no-repeat scroll 145px -83px #0074bd !important; } - - /* Shortcuts bar */ body.adminimal-menu div.toolbar-shortcuts { float: left; } - body.adminimal-menu div.shortcut-toolbar div#toolbar div.toolbar-shortcuts ul.menu { margin: 0; padding: 0; } - body.adminimal-menu div.shortcut-toolbar div#toolbar div.toolbar-shortcuts ul.menu li { float: left; list-style: none outside none; padding: 0; margin: 0; } - body.adminimal-menu div.shortcut-toolbar div#toolbar a#edit-shortcuts { float: right; line-height: 18px; padding: 5px 10px; text-decoration: none; } - body.adminimal-menu div.shortcut-toolbar div#toolbar a#edit-shortcuts:hover { text-decoration: none; } - body.adminimal-menu div.shortcut-toolbar div#toolbar a#edit-shortcuts:focus { - background: #0074BD; + background: #0074bd; } - body.adminimal-menu #admin-menu .dropdown li ul { box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3); } - body.adminimal-menu #admin-menu .dropdown li ul { - border-top: 3px solid #0074BD; + border-top: 3px solid #0074bd; } - body.adminimal-menu #admin-menu .admin-menu-toolbar-category.expandable .dropdown li ul, body.adminimal-menu #admin-menu .dropdown.admin-menu-search-results li ul { border-top: none; } - body.adminimal-menu #admin-menu .dropdown li.admin-menu-action a { border: none !important; } - body.adminimal-menu #admin-menu .dropdown li.admin-menu-action:first-child a { background: #444; padding: 5px 10px; } - body.adminimal-menu #admin-menu .dropdown li.admin-menu-action:first-child a:hover, body.adminimal-menu #admin-menu .dropdown li.admin-menu-action:first-child a:focus { background: #b73939; } - body.adminimal-menu #admin-menu .dropdown li.admin-menu-action.admin-menu-users { border-left: 1px solid #000; } - body.adminimal-menu #admin-menu .dropdown li.admin-menu-action.admin-menu-users a:hover { - background: #0074BD; + background: #0074bd; } - body.adminimal-menu #admin-menu .dropdown li.admin-menu-action.admin-menu-account a { background: #4d8f46 !important; border: medium none; padding: 5px 10px; } - body.adminimal-menu #admin-menu .dropdown li.admin-menu-action.admin-menu-account a:hover { background: #277d1e !important; } - body.adminimal-menu #admin-menu #admin-menu-wrapper div#toolbar div.toolbar-shortcuts ul li a { background: url("images/shortcut.png") no-repeat scroll 7px 7px transparent; border-radius: 0 0 0 0; @@ -275,17 +229,15 @@ body.adminimal-menu #admin-menu #admin-menu-wrapper div#toolbar div.toolbar-shor padding: 5px 10px; text-indent: 16px; } - body.adminimal-menu #admin-menu #admin-menu-wrapper div#toolbar div.toolbar-shortcuts ul li a:hover { background-color: #0074bd; background-position: 7px -78px; } - body.adminimal-menu #admin-menu .admin-menu-search input { background: none no-repeat scroll right center #444; border: medium none; border-radius: 0 0 0 0; - color: #999999; + color: #999; font-size: 12px; margin: 0 !important; outline: medium none; @@ -293,18 +245,15 @@ body.adminimal-menu #admin-menu .admin-menu-search input { width: 110px; height: 20px; } - body.adminimal-menu #admin-menu .admin-menu-search input:focus, #admin-menu .admin-menu-search input:hover, #admin-menu .admin-menu-search input:active { background: none no-repeat scroll right center #888; color: #eee; } - body.adminimal-menu li.admin-menu-search:hover { background: transparent !important; } - body.adminimal-menu div#admin-menu li.highlight { background-color: #ef6114; animation: blink 1s ease both infinite; @@ -313,7 +262,6 @@ body.adminimal-menu div#admin-menu li.highlight { -o-animation: blink 1s ease both infinite; color: #fff !important; } - body.adminimal-menu #admin-menu li.highlight > a, body.adminimal-menu #admin-menu li.highlight > li { border-color: #ef6114; @@ -323,87 +271,69 @@ body.adminimal-menu #admin-menu li.highlight > li { -webkit-animation: blink 1s ease both infinite; -o-animation: blink 1s ease both infinite; } - - /* Newline render mode */ body.adminimal-menu.admin-menu.menu-render-newline div#admin-menu div#admin-menu-wrapper div.shortcut-toolbar { clear: both; border-top: 1px solid #000; } - -body.adminimal-menu.admin-menu.menu-render-newline { - margin-top: 56px !important; +body.admin-menu.adminimal-menu.menu-render-newline:before { + height: 56px; } - body.adminimal-menu.admin-menu.menu-render-newline #overlay-container, body.adminimal-menu.admin-menu.newline .overlay-modal-background, body.adminimal-menu.admin-menu.newline .overlay-element, body.adminimal-menu.admin-menu.newline #overlay { padding-top: 30px !important; } - - /* Collapsed render mode */ body.adminimal-menu.admin-menu.menu-render-collapsed div.shortcut-toolbar div#toolbar div.toolbar-shortcuts ul.menu { position: absolute; } - body.adminimal-menu.admin-menu.menu-render-collapsed div.shortcut-toolbar div#toolbar div.toolbar-shortcuts ul.menu li { float: none; display: none; border: none; } - body.adminimal-menu.admin-menu.menu-render-collapsed div.shortcut-toolbar div#toolbar div.toolbar-shortcuts ul.menu li.label { display: block; cursor: default; } - body.adminimal-menu.admin-menu.menu-render-collapsed div.shortcut-toolbar div#toolbar div.toolbar-shortcuts ul.menu li.label a:hover { background: url("images/shortcut.png") no-repeat scroll 7px 7px #202020 !important; - color: #EEEEEE !important; + color: #eee !important; } - body.adminimal-menu.admin-menu.menu-render-collapsed div.shortcut-toolbar div#toolbar div.toolbar-shortcuts ul.menu:hover li { display: block; background: #202020; } - - /* Dropdown render mode */ body.adminimal-menu.admin-menu.menu-render-dropdown .toolbar-shortcuts select#shortcut-menu { -webkit-appearance: none; - background: url("images/shortcut.png") no-repeat scroll 7px 7px #222222; + background: url("images/shortcut.png") no-repeat scroll 7px 7px #222; border: medium none; - color: #EEEEEE; + color: #eee; font-family: "Open Sans", "Segoe UI", "Helvetica", sans-serif; font-size: 12px; padding: 5px 4px 4px 24px; } - body.adminimal-menu.admin-menu.menu-render-dropdown .toolbar-shortcuts select#shortcut-menu option:hover { cursor: pointer; } - body.adminimal-menu.admin-menu.menu-render-dropdown .toolbar-shortcuts select#shortcut-menu option:first-child { display: none; } - body.adminimal-menu #admin-menu .dropdown .admin-menu-tab { background: #444; padding-bottom: 2px; } - - /* Environment indicator 2.x */ body.adminimal-menu #admin-menu #environment-indicator { text-shadow: none; } - body.adminimal-menu #admin-menu #environment-indicator .environment-indicator-name { background-image: none; border-left: 1px solid #323232; @@ -412,20 +342,18 @@ body.adminimal-menu #admin-menu #environment-indicator .environment-indicator-na line-height: 18px; padding: 5px 10px; } - body.adminimal-menu #admin-menu #admin-menu-wrapper div#toolbar div.toolbar-shortcuts ul, body.adminimal-menu #admin-menu #admin-menu-wrapper div#toolbar div.toolbar-shortcuts ul li { margin: 0; padding: 0; } - body.adminimal-menu #admin-menu .admin-menu-search input { background: none no-repeat scroll right center #444; border: medium none; -webkit-border-radius: 0 0 0 0; -moz-border-radius: 0 0 0 0; border-radius: 0 0 0 0; - color: #999999; + color: #999; font-size: 12px; margin: 0 !important; outline: medium none; @@ -438,3 +366,6 @@ body.adminimal-menu #admin-menu .admin-menu-search input { height: 28px; box-sizing: border-box; } +#admin-menu-search .form-item.form-type-textfield label.control-label { + display: none; +} diff --git a/sites/all/modules/contrib/admin/adminimal_admin_menu/adminimal_admin_menu.info b/sites/all/modules/contrib/admin/adminimal_admin_menu/adminimal_admin_menu.info index 6c31f0cc..deb89679 100644 --- a/sites/all/modules/contrib/admin/adminimal_admin_menu/adminimal_admin_menu.info +++ b/sites/all/modules/contrib/admin/adminimal_admin_menu/adminimal_admin_menu.info @@ -3,10 +3,11 @@ description = Clean and minimal theme for the administration menu module. package = Administration core = 7.x dependencies[] = admin_menu +configure = admin/config/administration/adminimal_menu -; Information added by Drupal.org packaging script on 2015-12-03 -version = "7.x-1.7" +; Information added by Drupal.org packaging script on 2018-02-28 +version = "7.x-1.9" core = "7.x" project = "adminimal_admin_menu" -datestamp = "1449182323" +datestamp = "1519862286" diff --git a/sites/all/modules/contrib/admin/adminimal_admin_menu/adminimal_admin_menu.install b/sites/all/modules/contrib/admin/adminimal_admin_menu/adminimal_admin_menu.install index e998a0e6..09b8cc77 100644 --- a/sites/all/modules/contrib/admin/adminimal_admin_menu/adminimal_admin_menu.install +++ b/sites/all/modules/contrib/admin/adminimal_admin_menu/adminimal_admin_menu.install @@ -84,7 +84,19 @@ function adminimal_admin_menu_uninstall() { */ function adminimal_admin_menu_update_7100() { - // Include the update file. - include 'updates/update_7100.php'; + // Define Adminimal Menu path. + $module_path = drupal_get_path('module', 'adminimal_admin_menu'); + if (file_exists($module_path . '/adminimal_admin_menu.js')) { + // Delete the "adminimal_admin_menu.js" file. + file_unmanaged_delete($module_path . '/adminimal_admin_menu.js'); + } + + if (file_exists($module_path . '/slicknav')) { + // Empty the "slicknav" folder. + file_unmanaged_delete_recursive($module_path . '/slicknav'); + + // Delete the "slicknav" folder. + drupal_rmdir($module_path . '/slicknav'); + } } diff --git a/sites/all/modules/contrib/admin/adminimal_admin_menu/adminimal_admin_menu.module b/sites/all/modules/contrib/admin/adminimal_admin_menu/adminimal_admin_menu.module index 98c10c43..b5d35ffa 100644 --- a/sites/all/modules/contrib/admin/adminimal_admin_menu/adminimal_admin_menu.module +++ b/sites/all/modules/contrib/admin/adminimal_admin_menu/adminimal_admin_menu.module @@ -10,17 +10,34 @@ */ function adminimal_admin_menu_menu() { $items = array(); + $items['admin/config/administration/adminimal_menu'] = array( 'title' => 'Adminimal menu', 'description' => 'Adjust adminimal menu settings.', 'page callback' => 'drupal_get_form', 'page arguments' => array('adminimal_admin_menu_settings'), 'access arguments' => array('administer site configuration'), - 'file' => 'adminimal_menu_settings.inc', + 'file' => 'adminimal_admin_menu.admin.inc', ); return $items; +} +/** + * Implements hook_module_implements_alter(). + */ +function adminimal_admin_menu_module_implements_alter(&$implementations, $hook) { + // Put Adminimal Admin Menu's implementation of hook_admin_menu_output_alter() + // to the end of the list of implementors, assuring that it will be executed + // at the very end. Other modules may manipulate the menu items in the + // administration menu (i.e. the excellent Administration Menu Source) and we + // need to make sure those changes are preserved and respected by the output + // of Adminimal Admin Menu. + if ($hook == 'admin_menu_output_alter') { + $group = $implementations['adminimal_admin_menu']; + unset($implementations['adminimal_admin_menu']); + $implementations['adminimal_admin_menu'] = $group; + } } /** @@ -31,46 +48,42 @@ function adminimal_admin_menu_page_build(&$page) { return; } $path = drupal_get_path('module', 'adminimal_admin_menu'); - $load_slicknav = variable_get('adminimal_admin_menu_slicknav', TRUE ); - $load_jQuery = variable_get('adminimal_admin_menu_jquery', TRUE ); + $load_slicknav = variable_get('adminimal_admin_menu_slicknav', TRUE); + $load_jquery = variable_get('adminimal_admin_menu_jquery', TRUE); // Attach the CSS and JavaScript assets. drupal_add_css($path . '/adminimal_admin_menu.css'); - // Support for the Environment Indicator module. - if (module_exists('environment_indicator')) { - $environment_info = environment_indicator_get_active(); - drupal_add_css(' - div.slicknav_menu a.slicknav_btn:after { - content: "' . $environment_info['name']. '"; - margin-left: 1em; - color: ' . $environment_info['text_color'] . '; - font-size: 12px; - background-color: ' . $environment_info['color'] . '; - padding: 2px 5px; - } - #admin-menu-wrapper {background: #222 !important;} - ', - array( - 'group' => CSS_DEFAULT, - 'type' => 'inline', - 'preprocess' => FALSE, - 'weight' => '100', - )); - } + _adminimal_admin_menu_support_environment_indicator(); - // Check if both slicknav and custom jQuery must be loaded. - if ($load_slicknav and $load_jQuery) { - drupal_add_js($path . '/js/jquery.min.js', array( 'type' => 'file', 'scope' => 'header', 'weight' => 888 )); - drupal_add_js($path . '/js/slicknav/jquery-no-conflict.slicknav.js', array( 'type' => 'file', 'scope' => 'header', 'weight' => 888 )); - drupal_add_css($path . '/js/slicknav/slicknav.css'); - } - elseif ($load_slicknav and !$load_jQuery) { - drupal_add_js($path . '/js/slicknav/jquery.slicknav.js', array( 'type' => 'file', 'scope' => 'header', 'weight' => 888 )); - drupal_add_css($path . '/js/slicknav/slicknav.css'); - } + // Check if both slicknav and custom jQuery must be loaded. + if ($load_slicknav and $load_jquery) { + drupal_add_js($path . '/js/jquery.min.js', array( + 'type' => 'file', + 'scope' => 'header', + 'weight' => 888, + )); + drupal_add_js($path . '/js/slicknav/jquery-no-conflict.slicknav.js', array( + 'type' => 'file', + 'scope' => 'header', + 'weight' => 888, + )); + drupal_add_css($path . '/js/slicknav/slicknav.css'); + } + elseif ($load_slicknav and !$load_jquery) { + drupal_add_js($path . '/js/slicknav/jquery.slicknav.js', array( + 'type' => 'file', + 'scope' => 'header', + 'weight' => 888, + )); + drupal_add_css($path . '/js/slicknav/slicknav.css'); + } - drupal_add_js($path . '/js/adminimal_admin_menu.js', array( 'type' => 'file', 'scope' => 'header', 'weight' => 888 )); + drupal_add_js($path . '/js/adminimal_admin_menu.js', array( + 'type' => 'file', + 'scope' => 'header', + 'weight' => 888, + )); if (!isset($page['page_bottom']['admin_menu'])) { return; @@ -78,8 +91,7 @@ function adminimal_admin_menu_page_build(&$page) { $attached = &$page['page_bottom']['admin_menu']['#attached']; $options = array('every_page' => TRUE); - // @todo Stop-gap fix until cached rendering is resolved. - // @see http://drupal.org/node/1567622 + // @todo Stop-gap fix until cached rendering is resolved (http://drupal.org/node/1567622). if (module_exists('shortcut')) { $attached['css'][drupal_get_path('module', 'shortcut') . '/shortcut.css'] = $options; } @@ -99,7 +111,39 @@ function adminimal_admin_menu_page_build(&$page) { 'data' => array('admin_menu' => array('toolbar' => $settings)), 'type' => 'setting', ); +} +/** + * Add CSS for module environment_indicator. + */ +function _adminimal_admin_menu_support_environment_indicator() { + if (!module_exists('environment_indicator')) { + return; + } + + $environment_info = environment_indicator_get_active(); + + if (!environment_indicator_check_access($environment_info)) { + return; + } + + drupal_add_css(' + div.slicknav_menu a.slicknav_btn:after { + content: "' . $environment_info['name'] . '"; + margin-left: 1em; + color: ' . $environment_info['text_color'] . '; + font-size: 12px; + background-color: ' . $environment_info['color'] . '; + padding: 2px 5px; + } + #admin-menu-wrapper {background: #222 !important;} + ', + array( + 'group' => CSS_DEFAULT, + 'type' => 'inline', + 'preprocess' => FALSE, + 'weight' => '100', + )); } /** @@ -107,7 +151,8 @@ function adminimal_admin_menu_page_build(&$page) { */ function adminimal_admin_menu_admin_menu_output_build(&$content) { - if (variable_get('adminimal_admin_menu_render', 'collapsed') != 'hidden') { + // Shortcut menu. + if (module_exists('shortcut') && variable_get('adminimal_admin_menu_render', 'collapsed') != 'hidden') { // Add shortcuts bar. $content['shortcut'] = array( '#access' => module_exists('shortcut'), @@ -124,7 +169,6 @@ function adminimal_admin_menu_admin_menu_output_build(&$content) { '#pre_render' => array('shortcut_toolbar_pre_render'), ); } - } /** @@ -140,10 +184,11 @@ function adminimal_admin_menu_admin_menu_output_alter(&$content) { unset($content['icon']['icon']['#theme']); $content['icon']['icon']['#title'] = ' '; $content['icon']['icon']['#attributes']['class'][] = 'admin-menu-toolbar-home-menu'; + // @todo Fix this CS-issue. $page['#attributes']['class'][] = 'adminimal-menu'; // Hide the menu. - if (variable_get('adminimal_admin_menu_render', 'collapsed') == 'exclusive') { + if (module_exists('shortcut') && variable_get('adminimal_admin_menu_render', 'collapsed') == 'exclusive') { unset($content['icon']['icon']); unset($content['search']); foreach ($content['menu'] as $key => $link) { @@ -152,30 +197,39 @@ function adminimal_admin_menu_admin_menu_output_alter(&$content) { } } - // Create the responsive menu. - if (variable_get('adminimal_admin_menu_slicknav', 'TRUE')) { - // Prepare the responsive menu and Join the Icon menu with the administration menu. - $responsivemenu = array_merge($content['icon'], $content['menu']); - - // Give it ID to target it later with js and css. - $responsivemenu['#wrapper_attributes']['id'] = 'admin-menu-menu-responsive'; - - // Move the icon menu to the top. - $responsivemenu['icon']['#weight'] = '-100'; - - // Change the link title to Administration. - $responsivemenu['admin/index']['#title'] = t('Administration'); - - // Bind the responsive menu the the content varable so it can be rendered. - $content['responsive-menu'] = $responsivemenu; - - // Create the responsive shortucts. - $content['responsive']['shortcuts'] = array( - '#prefix' => '
', - '#suffix' => '
', - '#pre_render' => array('shortcut_toolbar_pre_render'), - ); - } + // Create the responsive menu. + if (variable_get('adminimal_admin_menu_slicknav', TRUE)) { + // Join the Icon menu with the administration menu. + $responsivemenu = array_merge($content['icon'], $content['menu']); + + // Give it ID to target it later with js and css. + $responsivemenu['#wrapper_attributes']['id'] = 'admin-menu-menu-responsive'; + + // Move the icon menu to the top. + $responsivemenu['icon']['#weight'] = '-100'; + + // Change the link title for 'admin/index' to Administration if it exists. + if (!empty($responsivemenu['admin/index'])) { + $responsivemenu['admin/index']['#title'] = t('Administration'); + } + + // Add the account menu, and push account and logout links toward bottom. + $responsivemenu = array_merge($content['account'], $responsivemenu); + $responsivemenu['account']['#weight'] = 99; + $responsivemenu['logout']['#weight'] = 100; + + // Bind the responsive menu the the content varable so it can be rendered. + $content['responsive-menu'] = $responsivemenu; + + // Create the responsive shortucts. + if (module_exists('shortcut')) { + $content['responsive']['shortcuts'] = array( + '#prefix' => '
', + '#suffix' => '
', + '#pre_render' => array('shortcut_toolbar_pre_render'), + ); + } + } } /** @@ -185,6 +239,7 @@ function adminimal_admin_menu_preprocess_html(&$vars) { if (!_adminimal_admin_menu_access()) { return; } + // Add the "adminimal" class to the body for better css selection. $vars['classes_array'][] = 'adminimal-menu'; @@ -197,27 +252,38 @@ function adminimal_admin_menu_preprocess_html(&$vars) { } // Add the shortcut render mode class. - $vars['classes_array'][] = 'menu-render-' . variable_get('adminimal_admin_menu_render', 'collapsed'); + if (module_exists('shortcut')) { + $vars['classes_array'][] = 'menu-render-' . variable_get('adminimal_admin_menu_render', 'collapsed'); + } - // Fix the viewport, correcting the mobile device zoom. - /** @todo - Mybre remove this and let the theme manage the view pont. - * But i was suprised that only few "responsive" drupal themes were fixing - * the viewport. - */ - $viewport = array( - '#tag' => 'meta', - '#attributes' => array( - 'name' => 'viewport', - 'content' => 'width=device-width, initial-scale=1, maximum-scale=1', - ), - ); - drupal_add_html_head($viewport, 'viewport'); + _adminimal_admin_menu_viewport(); +} +/** + * Add viewport for scaling on devices. + */ +function _adminimal_admin_menu_viewport() { + $use_slicknav = variable_get('adminimal_admin_menu_slicknav', TRUE); + $use_viewport = variable_get('adminimal_admin_menu_viewport', TRUE); + + // Only needed for slicknav. + if ($use_slicknav && $use_viewport) { + $viewport = array( + '#tag' => 'meta', + '#attributes' => array( + 'name' => 'viewport', + 'content' => 'width=device-width, initial-scale=1', + ), + ); + drupal_add_html_head($viewport, 'viewport'); + } } /** * Check if the user has access to use the admin menu. - * @return boolean Result of access checks. + * + * @return bool + * Result of access checks. */ function _adminimal_admin_menu_access() { if (!user_access('access administration menu') || admin_menu_suppress(FALSE)) { diff --git a/sites/all/modules/contrib/admin/adminimal_admin_menu/adminimal_menu_settings.inc b/sites/all/modules/contrib/admin/adminimal_admin_menu/adminimal_menu_settings.inc deleted file mode 100644 index e1147f47..00000000 --- a/sites/all/modules/contrib/admin/adminimal_admin_menu/adminimal_menu_settings.inc +++ /dev/null @@ -1,101 +0,0 @@ - 'fieldset', - '#title' => t('Shortcuts options'), - ); - - // Create the select list. - $form['shortcuts']['adminimal_admin_menu_render'] = array( - '#type' => 'select', - '#title' => t('Rendering method'), - '#default_value' => variable_get('adminimal_admin_menu_render', 'collapsed'), - '#options' => array( - 'hidden' => t('Hidden'), - 'inline' => t('Inline'), - 'collapsed' => t('Collapsed'), - 'newline' => t('Newline'), - 'dropdown' => t('Dropdown'), - 'exclusive' => t('Exclusive'), - ), - '#description' => t('Select how the shortcuts will be rendered. There are currently 6 options:
  1. Hidden -> The shortcuts will not be rendered inside the admin menu
  2. Inline -> The shortcuts will be rendered on the same line with the root menu links
  3. Collapsed -> The sorctus links will be collapsed like a normal menu. (Default option)
  4. Newline -> The shortcuts will be rendered on a new line. Below the root menu links.
  5. Dropdown -> The shortcuts will be rendered inside a dropdown using the select html tag.
  6. Exclusive -> Only the shortcuts will be rendered, and the normal menu will be hidden.
'), - '#required' => TRUE, - ); - - // Create the shortcut category. - $form['advanced_settings'] = array( - '#type' => 'fieldset', - '#title' => t('Advanced Settings'), - '#description' => '
WARNING: Do not change any of the advanced setting unless you know what you are doing!
', - ); - - $form['advanced_settings']['adminimal_admin_menu_slicknav'] = array( - '#type' => 'checkbox', - '#default_value' => variable_get('adminimal_admin_menu_slicknav', 'TRUE'), - '#title' => t('Enable Responsive Menu.'), - '#description' => t('Default value => Checked. - Enable this option if you want to have responsive menu and mobile device support. - While disabling this option could save you few kilobytes (around 3KB), i will completely disable the responsive menu functionality.'), - ); - - $form['advanced_settings']['adminimal_admin_menu_jquery'] = array( - '#type' => 'checkbox', - '#default_value' => variable_get('adminimal_admin_menu_jquery', 'TRUE'), - '#title' => t('Load the requred jQuery 1.7 library automagically.'), - '#description' => t('Default value => Checked. This will load the newer jQuery version 1.7 using - the no-conflict method so it wont interfere with any existing jQuery or other java-script libraries. - The only reason to uncheck this if you are already using a newer version of jQuery site-wide and its globally accessible by the "$" variable. - Unchekig this option could save you 33KB, but it may also break your javasctipt if not used correctly.'), - '#states' => array( - // Hide the settings when the cancel notify checkbox is disabled. - 'visible' => array( - ':input[name="adminimal_admin_menu_slicknav"]' => array('checked' => TRUE), - ), - 'unchecked' => array( - variable_get('adminimal_admin_menu_jquery', 'TRUE') => FALSE, - ), - ), - ); - - // Create the submit button. - $form['submit'] = array( - '#type' => 'submit', - '#value' => t('Save configuration'), - ); - - return $form; - -} - -/** - * Submit handler for views_sexy_throbber_settings(). - */ -function adminimal_admin_menu_settings_submit($form, &$form_state) { - - // Exclude unnecessary elements. - form_state_values_clean($form_state); - - foreach ($form_state['values'] as $key => $value) { - if (is_array($value) && isset($form_state['values']['array_filter'])) { - $value = array_keys(array_filter($value)); - } - variable_set($key, $value); - } - - // Clear the admin menu cache. - admin_menu_flush_caches(); - - // Display a message to the user. - drupal_set_message(t('The configuration options have been saved.')); -} diff --git a/sites/all/modules/contrib/admin/adminimal_admin_menu/credits.txt b/sites/all/modules/contrib/admin/adminimal_admin_menu/credits.txt deleted file mode 100644 index cd21dc49..00000000 --- a/sites/all/modules/contrib/admin/adminimal_admin_menu/credits.txt +++ /dev/null @@ -1,2 +0,0 @@ -Designed and developed by: ANDiTKO -> http://anditko.com -Some of the Icons are from the Icons8 set -> http://icons8.com/ and -> http://VisualPharm.com \ No newline at end of file diff --git a/sites/all/modules/contrib/admin/adminimal_admin_menu/images/home.png b/sites/all/modules/contrib/admin/adminimal_admin_menu/images/home.png index 5705af7f61cff59b201a8cd919ca3e1b7fc1ce10..42247842e04e3c2270f45d5d89dc0719958c61c7 100644 GIT binary patch delta 537 zcmV+!0_Oe03bF){B!32COGiWi{{a60|De66lK=n!32;bRa{vGf6951U69E94oEQKA z00(qQO+^Rd0vZ++2SOnez z74Q-`2A;?Am)uP&fKA|C08b^YNO}Q03Eh;LZ4IERuIqi^Ht-#IAnC)<8E1hvfPe#F ztrY;k(l7uZX@3uR7}Hz8%@!~h{hx4gbV4&HX}u${AZ1-KXg?}7PPYoEKl7!L<$&-W1HVbV4`T?2Y%b_`4=XwuB4fnI26UWA!_0>-1- z32>S^Xve&kH2udjx@@%gizrZm3RIv16{tW3Do}w6RDYlX6{tY}3aY|W*^YS^SdIKy zxO@I4+h4RVN_R#8863p3EBi*kdI#tOjc*htOye5?jc*j%|K%G+-{*WIV6<-pT*^0! b0{j9eiV|G&*1MF+00000NkvXXu0mjf=RfT8 literal 1347 zcmeAS@N?(olHy`uVBq!ia0vp@K%BzC1|(wzcD(~qk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+n3Xa^B1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxSU1_g&``n5OwZ87 z)XdCKN5ROz&`93^h|F{iO{`4Ktc=VRpg;*|TTx1yRgjAt)Gi>;Rw<*Tq`*pFzr4I$ zuiRKKzbIYb(9+TpWQLKEE>MMTab;dfVufyAu`f(~1RD^r68eAMwS&*t9 zlvv ztM~P_^2{qPNz6-5^>ndS0-B(gnVDi`ZfWa(sTY;0m; zVr1zI)9aF-T$-DjR|3Q!gkfv4~Pj*wm=R%;iu*SQ+p9GSv&S@Kf}PlxZTsmF{I+w zn;Gl9oeM>d-oMQzW_WVd2N@1-vBZPDiV~)gDa>!PE*o9GVw76=zk!QOP1kMmx{fwe z@q3GoE#y}FZWDgK`rcVit){1O7Q64uKmT0&{dYy`b>5}}7cXXQjakB+apLnH*E5qP z);n0w*grFt_uvF2gR@JGUkFAq7zq6m;?hu%J?VHs?h8+D;qS0;VdVfVidwofWw7<3QTTr5AXb4l@uqwmh>o(7kV@)Hh3$!5;H%$eb{z~*&* z;l4f=+e(=r&j-(iR7*BYNU^k>r*ZMfKhaMbR|MDBRTq9;B4l#>qov9Dy%pzgC+D@7 zUw_}YbM2msliL=`cun4Qnae9#SGoF&#YOSP-t3;^m9wT?3KczK`Mq%YndRqS>=rDp z6J(Q2nc#>*T!?qntJYGV<6XS?%-8P|?EiRau8^xaqPd0NHgi53SHSdVu`AX*nC%!4 zDtT>cV(8lICRZLjvNgFKzD|St=a)NC+#RY(?eh5mGnkV;jg_5 yR^+?9um9Q`QSN`AL+XyXQ_br9Bg}Kc8QB=ryJ9|XR99;S6>FZZelF{r5}E+8xZw`~ diff --git a/sites/all/modules/contrib/admin/adminimal_admin_menu/images/shortcut.png b/sites/all/modules/contrib/admin/adminimal_admin_menu/images/shortcut.png index 844baea76e8ef0e223dece1c7e3c83e0883dbcbd..1f6969abe83b492e9dc29082bb4e20ea911f2a10 100644 GIT binary patch delta 675 zcmV;U0$lyZ3%do7B!32COGiWi{{a60|De66lK=n!32;bRa{vGf6951U69E94oEQKA z00(qQO+^Rd0vZ+*HT}!3!2kdPNJ&INR9M69m^)}xQ4of|>?R-*G~gPdLcm@mAlM|n zuuud8E7)n{qmL0Srr+sAyGX>&N237+MNC|>u@lmSSSSc;p?`w0(L97?{VhB3h099Zw@C0}bd;)d@ zhk!F-lcQ#~v<|y_H}DmB1DrOqWioR2BJd124D^}V&(0950dr<{oCY$pI&jk6YrqUJ z&{3&WhJnXs)_;}CG74M(Ce7?hP8Dmw*#dACxSNST0{#Fa?mm%I$Q@v$0F;2|nG!#n z*?!z-8b)Flc5ADfk5NqX66hE@qOB25<`4mwy2PE&;a^lgt7uW;R3%x%)KG zV`c-1Nsa*D+xWH>daYdIO+fzjyl>NAOcGONJ3J#q+gO=N!l9LvR_fs3rWk8wn8U}fi7AzZCsS=07?_nZLn2Bde0{8v^Kf6`()~Xj@TAnpKdC8`Lf!&sHg;q@=(~U%$M( zT(8_%FTW^V-_X+15@d#vkuFe$ZgFK^Nn(X=Ua>OF1ees}+T7#d8#0MoBXEYLU9GXQxBrqI_HztY@Xxa#7Ppj3o=u^L<)Qdy9y zACy|0Us{w5jJPyqkW~d%&PAz-CHX}m`T04pPz=b(FUc>?$S+WE4mMNJ2+zz*$uBR~ z1grP;werj>E=kNwPW5!LRRWrzmzkMjWoYJVU}$b)WN2Y(W@zYYWMOP*U}@@VVQye< zZ0hQ01k>x1pIn-onpXnTn}X15j8iWtDdZLaZFWg5$}CGwaVyHtRRDY0DigO`3~-tU z)tiFbErvMt>H{644~kf%h=vIPQxAvpUo7TmxT=0PNZOP=V=LKWW)TN2<44zUpOqBxumiQLIXc3O9O3bB?&3_pF^SdkEf4bIqao+pJ`@5%CpZ`Dacj3KfE?lim;#+de zUSH;Ml1VDy+W)ZBYVJJVUv66@F7nQjF*zvxgT;O!<2%RwQA@gA`TlhahF!eha{j{c zCkxXh>;h+%U*IhNaC2=)ab-mEg5%tV&(3AYZRq$>*W#iw`J~FrGscqKE}j={+EkCV z>+YUVT@i9Hoh44{b8!LR`GS}YIVn-kTw>VY_v-#@65F-@KzgIh74{ghg<(h1Uv0{H zF0n^+~`HZ8}B@dojoHX*<|gjlb0GbZ{~*NRZGhqihdla_CT|yy{v4btibm} zeJ*u;&Tbc`2UBw?_e{@p&b@&ZrA?i-@j?)L%QUM~dJ2c`D|M?Ut!T21Xq=sO zMukiMfk58L8GSmfOOrG7AFl{g{lT+(GX|YE1-_0gh z8%3*^HK7-C1=FrDS+3yk`MqiLB373-uUK8yWH1`OIrB*;IP3KN1$uAJY`ZNNdPub+ z@}1M4zYnbC9o;40@8L52HMg|w?cq1k)5$loLR@-w;4{Z9sikp#* XLGz(>|DidS;G)&j)z4*}Q$iB}j8Z2s diff --git a/sites/all/modules/contrib/admin/adminimal_admin_menu/images/square.png b/sites/all/modules/contrib/admin/adminimal_admin_menu/images/square.png index 3c764fc85d06c81aa2ff5fae4ae10c2ddccec8af..f210d7780275cf105458d7f8e3dfe44906ddda4a 100644 GIT binary patch delta 143 zcmX@YzM64@NE+@WVRS}SF qQMq>3RDy@C`QQgbl@0H8V}H(PcUNha;0Bt(z~SlY=d#Wzp$Pz3b}h;P literal 964 zcmaJ=yKmD#9JbU7p{kYGpdHZ3WdI33&Z(XFR8u8((iqiMl}1X&I`$>8TKio4TDu+D z_%j$-5lkR46b1$sCL|<4Vqro^6c$#_X_7J!EZg_c_kF+j!=3HTrG=FRj^mc>rqyEW z754d8i~r;E>M~oFX}wE#NuOqJg1M?sdKlQDJHRdM`X`5P@jA!N@j<&wyUrH!NGQ4m zM$E&Qu{myiBadBgA5+l7gCH{aA1}{%5cme)Q61TdO*{;mrwQIY-EMoQ`=0Le8~4C^ zj+j7*sSEP(AWBhg@FQKs_QkctgAs)88~lY+U1tZFB*8!xOM)ju2sBNEYpSNfyFihl zBFXI41h|G&4Jl4{S#z>N~EEBVmNRojBbzLts6h&YNAw7wx zn+s98I#IB2>Lo!;0}_Ek(e05VYVgd{ix9$iDjTKaG_iz9xf@GRl#7riK*#w%Gz_Qc zl(z7tzyB0Y+b1!WS~w*~iN^}pUoA|<$V{+HNzx|dV3Nh1A)zE4k{Fn~8o1pFBA;aG zoe|z~kR7GejXZ2y2G114An=h@(<*8STCh@4A*?I93L6a*YN`%RrPh!qT#I-|A&%&T z>tAx~Gr2`8gfX*h;UqZ5ej_0v7=?_2*}l|f>W#VnY+uZoT!}d&6@~q)(330HJ;ip~ zw(Kx%d>pZEPgq-j_c*7|qbD`g!(r{sz~CH^2PaEEm(s+4XJfNp0`J9}JNxhX4Qo diff --git a/sites/all/modules/contrib/admin/adminimal_admin_menu/js/adminimal_admin_menu.js b/sites/all/modules/contrib/admin/adminimal_admin_menu/js/adminimal_admin_menu.js index bad746ab..b476803b 100644 --- a/sites/all/modules/contrib/admin/adminimal_admin_menu/js/adminimal_admin_menu.js +++ b/sites/all/modules/contrib/admin/adminimal_admin_menu/js/adminimal_admin_menu.js @@ -1,58 +1,63 @@ -(function($) { +(function ($) { -Drupal.admin = Drupal.admin || {}; -Drupal.admin.behaviors = Drupal.admin.behaviors || {}; + Drupal.admin = Drupal.admin || {}; + Drupal.admin.behaviors = Drupal.admin.behaviors || {}; -/** - * @ingroup admin_behaviors - * @{ - */ + /** + * @ingroup admin_behaviors + * @{ + */ -/** - * Apply active trail highlighting based on current path. - * - * @todo Not limited to toolbar; move into core? - */ -Drupal.admin.behaviors.toolbarActiveTrail = function (context, settings, $adminMenu) { - if (settings.admin_menu.toolbar && settings.admin_menu.toolbar.activeTrail) { - $adminMenu.find('> div > ul > li > a[href="' + settings.admin_menu.toolbar.activeTrail + '"]').addClass('active-trail'); - } -}; + /** + * Apply active trail highlighting based on current path. + * + * @todo Not limited to toolbar; move into core? + */ + Drupal.admin.behaviors.toolbarActiveTrail = function (context, settings, $adminMenu) { + if (settings.admin_menu.toolbar && settings.admin_menu.toolbar.activeTrail) { + $adminMenu.find('> div > ul > li > a[href="' + settings.admin_menu.toolbar.activeTrail + '"]').addClass('active-trail'); + } + }; -Drupal.admin.behaviors.shorcutcollapsed = function (context, settings, $adminMenu) { + Drupal.admin.behaviors.shorcutcollapsed = function (context, settings, $adminMenu) { - // Create the dropdown base - $("
  • "+Drupal.t('Shortcuts')+"
  • ").prependTo("body.menu-render-collapsed #toolbar div.toolbar-shortcuts ul"); + // Create the dropdown base + $('
  • ' + Drupal.t('Shortcuts') + '
  • ').prependTo("body.menu-render-collapsed #toolbar div.toolbar-shortcuts ul"); -}; + }; -Drupal.admin.behaviors.shorcutselect = function (context, settings, $adminMenu) { + Drupal.admin.behaviors.shorcutselect = function (context, settings, $adminMenu) { - // Create the dropdown base - $("').appendTo("body.menu-render-dropdown #toolbar div.toolbar-shortcuts"); - // Create default option "Select" - $("