From 4b055e9eab425d596c0d9b9ef88632714a7f3c1b Mon Sep 17 00:00:00 2001 From: Chris Gross <gross.364@osu.edu> Date: Fri, 22 Sep 2017 15:51:02 -0400 Subject: [PATCH] 7.x-1.3 Release Candidate 1 --- profiles/wcm_base/CHANGELOG.txt | 15 +- .../wcm_base/libraries/superfish/PATCHES.txt | 4 + profiles/wcm_base/libraries/superfish/VERSION | 2 +- profiles/wcm_base/libraries/superfish/aria.js | 46 + .../libraries/superfish/composer.json | 32 +- .../libraries/superfish/sfautomaticwidth.js | 4 +- .../libraries/superfish/sfsmallscreen.js | 12 +- .../libraries/superfish/sftouchscreen.js | 5 +- .../modules/contrib/superfish/CHANGELOG.txt | 23 +- .../modules/contrib/superfish/PATCHES.txt | 4 + .../modules/contrib/superfish/README.txt | 49 +- .../contrib/superfish/superfish.admin.inc | 91 +- .../contrib/superfish/superfish.drush.inc | 31 +- .../modules/contrib/superfish/superfish.info | 7 +- .../contrib/superfish/superfish.install | 84 +- .../modules/contrib/superfish/superfish.js | 6 + .../modules/contrib/superfish/superfish.make | 2 +- .../contrib/superfish/superfish.module | 943 ++++++---- .../modules/contrib/xmlsitemap/LICENSE.txt | 339 ++++ .../modules/contrib/xmlsitemap/README.txt | 86 + .../contrib/xmlsitemap/xmlsitemap.admin.inc | 877 +++++++++ .../contrib/xmlsitemap/xmlsitemap.api.php | 289 +++ .../contrib/xmlsitemap/xmlsitemap.drush.inc | 171 ++ .../xmlsitemap/xmlsitemap.generate.inc | 551 ++++++ .../modules/contrib/xmlsitemap/xmlsitemap.inc | 89 + .../contrib/xmlsitemap/xmlsitemap.info | 22 + .../contrib/xmlsitemap/xmlsitemap.install | 570 ++++++ .../modules/contrib/xmlsitemap/xmlsitemap.js | 22 + .../contrib/xmlsitemap/xmlsitemap.module | 1595 +++++++++++++++++ .../contrib/xmlsitemap/xmlsitemap.pages.inc | 159 ++ .../contrib/xmlsitemap/xmlsitemap.test | 783 ++++++++ .../xmlsitemap/xmlsitemap.xmlsitemap.inc | 311 ++++ .../xmlsitemap_custom.admin.inc | 198 ++ .../xmlsitemap_custom/xmlsitemap_custom.info | 17 + .../xmlsitemap_custom.install | 14 + .../xmlsitemap_custom.module | 63 + .../xmlsitemap_custom/xmlsitemap_custom.test | 107 ++ .../tests/xmlsitemap_engines.test | 105 ++ .../tests/xmlsitemap_engines_test.info | 14 + .../tests/xmlsitemap_engines_test.module | 42 + .../xmlsitemap_engines.admin.inc | 65 + .../xmlsitemap_engines.api.php | 34 + .../xmlsitemap_engines.info | 18 + .../xmlsitemap_engines.install | 45 + .../xmlsitemap_engines.module | 245 +++ .../xmlsitemap_i18n/xmlsitemap_i18n.info | 15 + .../xmlsitemap_i18n/xmlsitemap_i18n.module | 116 ++ .../xmlsitemap_i18n/xmlsitemap_i18n.test | 139 ++ .../xmlsitemap_menu/xmlsitemap_menu.info | 16 + .../xmlsitemap_menu/xmlsitemap_menu.install | 47 + .../xmlsitemap_menu/xmlsitemap_menu.module | 303 ++++ .../xmlsitemap_menu/xmlsitemap_menu.test | 50 + .../xmlsitemap_modal/xmlsitemap_modal.info | 15 + .../xmlsitemap_modal/xmlsitemap_modal.module | 81 + .../xmlsitemap_node/xmlsitemap_node.info | 15 + .../xmlsitemap_node/xmlsitemap_node.install | 44 + .../xmlsitemap_node/xmlsitemap_node.module | 346 ++++ .../xmlsitemap_node/xmlsitemap_node.test | 148 ++ .../xmlsitemap_taxonomy.info | 16 + .../xmlsitemap_taxonomy.install | 66 + .../xmlsitemap_taxonomy.module | 278 +++ .../xmlsitemap_taxonomy.test | 49 + .../xmlsitemap_user/xmlsitemap_user.info | 15 + .../xmlsitemap_user/xmlsitemap_user.install | 43 + .../xmlsitemap_user/xmlsitemap_user.module | 163 ++ .../xmlsitemap_user/xmlsitemap_user.test | 50 + .../xmlsitemap/xsl/jquery.tablesorter.js | 852 +++++++++ .../xmlsitemap/xsl/jquery.tablesorter.min.js | 2 + .../contrib/xmlsitemap/xsl/xmlsitemap.xsl | 137 ++ .../contrib/xmlsitemap/xsl/xmlsitemap.xsl.css | 45 + .../contrib/xmlsitemap/xsl/xmlsitemap.xsl.js | 45 + .../custom/ocio_calendar/ocio_calendar.ds.inc | 22 +- .../ocio_calendar.features.field_base.inc | 21 + .../ocio_calendar.features.field_instance.inc | 78 +- .../ocio_calendar.field_group.inc | 4 +- .../custom/ocio_calendar/ocio_calendar.info | 2 + .../custom/ocio_calendar/ocio_calendar.module | 2 +- .../ocio_calendar/ocio_calendar.strongarm.inc | 2 +- .../ocio_calendar.views_default.inc | 210 ++- .../custom/ocio_main_menu/ocio_main_menu.make | 6 +- .../wcm_front_page.strongarm.inc | 2 +- ...s_settings.features.features_overrides.inc | 5 +- .../wcm_panels_settings.features.inc | 5 +- .../wcm_panels_settings.info | 2 + .../custom/wcm_search/wcm_search.module | 10 +- .../wcm_base/themes/wcm_omega/css/mail.css | 6 + .../themes/wcm_omega/css/wcm-omega.styles.css | 2 +- .../wcm_omega/js/wcm-omega-menu.behaviors.js | 77 +- .../wcm_omega/js/wcm-omega.behaviors.js | 8 +- .../themes/wcm_omega/sass/base/_buttons.scss | 1 + .../wcm_omega/sass/components/_search.scss | 29 +- .../components/calendar/_calendar-entry.scss | 31 +- .../components/calendar/_calendar-views.scss | 40 + .../templates/mail/mimemail-message.tpl.php | 40 + .../wcm_omega/templates/system/html.tpl.php | 2 +- profiles/wcm_base/wcm_base.info | 1 + profiles/wcm_base/wcm_base.make | 3 + 97 files changed, 11284 insertions(+), 614 deletions(-) create mode 100644 profiles/wcm_base/libraries/superfish/PATCHES.txt create mode 100644 profiles/wcm_base/libraries/superfish/aria.js create mode 100644 profiles/wcm_base/modules/contrib/superfish/PATCHES.txt create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/LICENSE.txt create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/README.txt create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.admin.inc create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.api.php create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.drush.inc create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.generate.inc create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.inc create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.info create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.install create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.js create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.module create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.pages.inc create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.test create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.xmlsitemap.inc create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_custom/xmlsitemap_custom.admin.inc create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_custom/xmlsitemap_custom.info create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_custom/xmlsitemap_custom.install create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_custom/xmlsitemap_custom.module create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_custom/xmlsitemap_custom.test create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_engines/tests/xmlsitemap_engines.test create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_engines/tests/xmlsitemap_engines_test.info create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_engines/tests/xmlsitemap_engines_test.module create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_engines/xmlsitemap_engines.admin.inc create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_engines/xmlsitemap_engines.api.php create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_engines/xmlsitemap_engines.info create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_engines/xmlsitemap_engines.install create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_engines/xmlsitemap_engines.module create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_i18n/xmlsitemap_i18n.info create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_i18n/xmlsitemap_i18n.module create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_i18n/xmlsitemap_i18n.test create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_menu/xmlsitemap_menu.info create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_menu/xmlsitemap_menu.install create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_menu/xmlsitemap_menu.module create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_menu/xmlsitemap_menu.test create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_modal/xmlsitemap_modal.info create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_modal/xmlsitemap_modal.module create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_node/xmlsitemap_node.info create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_node/xmlsitemap_node.install create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_node/xmlsitemap_node.module create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_node/xmlsitemap_node.test create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_taxonomy/xmlsitemap_taxonomy.info create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_taxonomy/xmlsitemap_taxonomy.install create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_taxonomy/xmlsitemap_taxonomy.module create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_taxonomy/xmlsitemap_taxonomy.test create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_user/xmlsitemap_user.info create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_user/xmlsitemap_user.install create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_user/xmlsitemap_user.module create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_user/xmlsitemap_user.test create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xsl/jquery.tablesorter.js create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xsl/jquery.tablesorter.min.js create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xsl/xmlsitemap.xsl create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xsl/xmlsitemap.xsl.css create mode 100644 profiles/wcm_base/modules/contrib/xmlsitemap/xsl/xmlsitemap.xsl.js create mode 100644 profiles/wcm_base/themes/wcm_omega/css/mail.css create mode 100644 profiles/wcm_base/themes/wcm_omega/templates/mail/mimemail-message.tpl.php diff --git a/profiles/wcm_base/CHANGELOG.txt b/profiles/wcm_base/CHANGELOG.txt index a5e6804b..e3bc3455 100644 --- a/profiles/wcm_base/CHANGELOG.txt +++ b/profiles/wcm_base/CHANGELOG.txt @@ -1,9 +1,18 @@ -WCM Base 7.x-1.2, 2017-0x-xx +WCM Base 7.x-1.3-rc1, 2017-09-22 +-------------------------------- +- WCM Search: Improved accessibility of search submit button. +- WCM Panels Settings: Allow svg uploads to image panes. +- WCM Omega: + - Added enhanced keyboard navigation to main menu. + - Added base mime-mail template and mail.css for html mail +- WCM Base: Added XML Sitemap Module to contrib. + +WCM Base 7.x-1.2, 2017-09-08 ---------------------------- - WCM Base: Remove OCIO Omega Base and OCIO Omega 4 from profile. -- OCIO Calendar: +- OCIO Calendar: - Added Tag functionality to view panes. - - Added location fields: Building name/number, and address field with map link. + - Added location fields: Building name/number, and address field with map link. - OCIO Landing Page: Updated allowed view panes. - OCIO WYSIWYG: Changed CSS reference to WCM Omega theme. - WCM Omega: diff --git a/profiles/wcm_base/libraries/superfish/PATCHES.txt b/profiles/wcm_base/libraries/superfish/PATCHES.txt new file mode 100644 index 00000000..637a2dbd --- /dev/null +++ b/profiles/wcm_base/libraries/superfish/PATCHES.txt @@ -0,0 +1,4 @@ +The following patches have been applied to this project: +- http://github.com/zipymonkey/Superfish-for-Drupal/commit/cb6bb121e596dd948f66400bdf8cf25dd6b0b01c.patch + +This file was automatically generated by Drush Make (http://drupal.org/project/drush). diff --git a/profiles/wcm_base/libraries/superfish/VERSION b/profiles/wcm_base/libraries/superfish/VERSION index e91b82fb..ea710abb 100644 --- a/profiles/wcm_base/libraries/superfish/VERSION +++ b/profiles/wcm_base/libraries/superfish/VERSION @@ -1 +1 @@ -1.2-beta2 \ No newline at end of file +1.2 \ No newline at end of file diff --git a/profiles/wcm_base/libraries/superfish/aria.js b/profiles/wcm_base/libraries/superfish/aria.js new file mode 100644 index 00000000..fa58e0a3 --- /dev/null +++ b/profiles/wcm_base/libraries/superfish/aria.js @@ -0,0 +1,46 @@ +/* + * Aria v0.1 - optional ARIA enhancer for Superfish jQuery menu widget. + * + * To supplement HTML with attributes that explicitly communicate the roles, states, and + * properties of the various parts that make up a menu system. + * As assistive technology (AT) users interact with the menu, ARIA passes updated information + * to their AT, and their AT then communicates that information in meaningful ways. + * + * Accessible Rich Internet Applications (WAI-ARIA): https://www.w3.org/TR/wai-aria/ + */ + +(function($) { + $.fn.aria = function() { + onHide = function() { + var $li = this.closest('li.menuparent'); + + $li.attr('aria-expanded', false) + .children('ul').attr('aria-hidden', true); + }, + onBeforeShow = function() { + var $li = this.closest('li.menuparent'); + + $li.attr('aria-expanded', true) + .children('ul').attr('aria-hidden', false); + }; + + return this.each(function() { + var o = $.fn.superfish.o[this.serial]; // Get this menu's options + + // If callbacks already set, store them + var _onBeforeShow = o.onBeforeShow, + _onHide = o.onHide; + + $.extend($.fn.superfish.o[this.serial],{ + onBeforeShow: function() { + onBeforeShow.call(this); // Fire our ARIA callback + _onBeforeShow.call(this); // Fire stored callbacks + }, + onHide: function() { + onHide.call(this); // Fire our ARIA callback + _onHide.call(this); // Fire stored callbacks + } + }); + }); + }; +})(jQuery); diff --git a/profiles/wcm_base/libraries/superfish/composer.json b/profiles/wcm_base/libraries/superfish/composer.json index 4a9346ae..a21e37f4 100644 --- a/profiles/wcm_base/libraries/superfish/composer.json +++ b/profiles/wcm_base/libraries/superfish/composer.json @@ -1,17 +1,17 @@ -{ - "name": "mehrpadin/superfish", - "homepage": "https://github.com/mehrpadin/Superfish-for-Drupal", - "description": "Superfish library for the Drupal Superfish module.", - "repository": { - "type": "git", - "url": "git://github.com/mehrpadin/Superfish-for-Drupal" - }, - "peerDependencies": { - "jquery": ">= 1.3.0" - }, - "keywords": [ - "plugin", - "jquery" - ], - "license": "MIT" +{ + "name": "mehrpadin/superfish", + "homepage": "https://github.com/mehrpadin/Superfish-for-Drupal", + "description": "Superfish library for the Drupal Superfish module.", + "repository": { + "type": "git", + "url": "git://github.com/mehrpadin/Superfish-for-Drupal" + }, + "peerDependencies": { + "jquery": ">= 1.3.0" + }, + "keywords": [ + "plugin", + "jquery" + ], + "license": "MIT" } \ No newline at end of file diff --git a/profiles/wcm_base/libraries/superfish/sfautomaticwidth.js b/profiles/wcm_base/libraries/superfish/sfautomaticwidth.js index b5d6fc4e..7102b870 100644 --- a/profiles/wcm_base/libraries/superfish/sfautomaticwidth.js +++ b/profiles/wcm_base/libraries/superfish/sfautomaticwidth.js @@ -43,7 +43,7 @@ var child = children.eq(a), // Calculating and applying the new width to the item. - autoWidth = (((child[0].clientWidth * 100) / menuWidth) + difference) + '%'; + autoWidth = (((child[0].clientWidth * 99.8) / menuWidth) + difference) + '%'; child.css({width:autoWidth}); } } @@ -70,4 +70,4 @@ } return this; }; -})(jQuery); \ No newline at end of file +})(jQuery); diff --git a/profiles/wcm_base/libraries/superfish/sfsmallscreen.js b/profiles/wcm_base/libraries/superfish/sfsmallscreen.js index a98ae1ae..ed83e0b9 100644 --- a/profiles/wcm_base/libraries/superfish/sfsmallscreen.js +++ b/profiles/wcm_base/libraries/superfish/sfsmallscreen.js @@ -79,7 +79,7 @@ for (var b = 0; b < parent.length; b++){ var item = parent.eq(b), - path = (item.is('a') && !!item.attr('href')) ? item.attr('href') : '', + path = item.is('a') ? item.attr('href') : '', // Class names modification. itemClone = item.clone(), classes = (options.hyperlinkClasses) ? ((options.excludeClass_hyperlink && itemClone.hasClass(options.excludeClass_hyperlink)) ? itemClone.removeClass(options.excludeClass_hyperlink).attr('class') : itemClone.attr('class')) : '', @@ -89,7 +89,7 @@ classes += ' active'; } // <option> has to be disabled if the item is not a link. - disable = (path == '') || (path == '#') ? ' disabled="disabled"' : '', + disable = item.is('span') || item.attr('href')=='#' ? ' disabled="disabled"' : '', // Crystal clear. subIndicator = 1 < level ? Array(level).join('-') + ' ' : ''; // Preparing the <option> element. @@ -131,7 +131,7 @@ // Removing style attributes and any unnecessary class. accordion.children('li').removeAttr('style').removeClass('sfHover'); // Doing the same and making sure all the sub-menus are off-screen (hidden). - accordion.children('ul').removeAttr('style').not('.sf-hidden').addClass('sf-hidden'); + accordion.find('ul').removeAttr('style').not('.sf-hidden').addClass('sf-hidden'); // Creating the accordion toggle switch. var toggle = '<div class="sf-accordion-toggle ' + styleClass + '"><a href="#" id="' + toggleID + '"><span>' + options.title + '</span></a></div>'; @@ -162,7 +162,7 @@ // If the accordion is already expanded: // Hiding its expanded sub-menus and then the accordion itself as well. accordionElement.add(accordionElement.find('li.sf-expanded')).removeClass('sf-expanded') - .end().children('ul').hide() + .end().find('ul').hide() // This is a bit tricky, it's the same trick that has been in use in the main plugin for sometime. // Basically we'll add a class that keeps the sub-menu off-screen and still visible, // and make it invisible and removing the class one moment before showing or hiding it. @@ -269,8 +269,8 @@ if (options.type == 'accordion'){ $(id + '-toggle').parent('div').remove(); } - // Remove inline CSS display property; less clear than simply using .show(), but respects stylesheet - $(id).css('display', ''); + // Crystal clear! + $(id).show(); } // Return original object to support chaining. diff --git a/profiles/wcm_base/libraries/superfish/sftouchscreen.js b/profiles/wcm_base/libraries/superfish/sftouchscreen.js index fd80b391..5fb46ae7 100644 --- a/profiles/wcm_base/libraries/superfish/sftouchscreen.js +++ b/profiles/wcm_base/libraries/superfish/sftouchscreen.js @@ -51,10 +51,7 @@ if (item.hasClass('sf-clicked')){ // Depending on the preferred behaviour, either proceed to the URL. if (options.behaviour == 0){ - url = item.attr('href'); - if (typeof(url) != "undefined"){ - window.location = url; - } + window.location = item.attr('href'); } // or collapse the sub-menu. else if (options.behaviour == 1 || options.behaviour == 2){ diff --git a/profiles/wcm_base/modules/contrib/superfish/CHANGELOG.txt b/profiles/wcm_base/modules/contrib/superfish/CHANGELOG.txt index d9b0f6ea..8a1fb840 100644 --- a/profiles/wcm_base/modules/contrib/superfish/CHANGELOG.txt +++ b/profiles/wcm_base/modules/contrib/superfish/CHANGELOG.txt @@ -33,7 +33,7 @@ Version 1.9-beta5, 2012-10-25 - #1455724 Tweaked the if statement. - #1158926 Libraries API is no longer mandatory. - #1534734 Applied a patch to make it easier to theme hyperlinks. -- #1539894 Added a new feature to make it possible to hide hyperlink descriptions ('title' attribute). +- #1539894 Added new feature to hide hyperlink descriptions ('title' attribute). - #1700566 Block form tweaked. - #1570796 Added README.txt file. @@ -45,14 +45,14 @@ Version 1.9-beta3, 2011-11-20 ---------------------- - #1117348 [Fixed] Fixed the $output array. - #1158890, #1158926 [Fixed] hook_requirements. -- #1111668, #1124998, #1144698, #1153712, #1107496, #1147596 [Fixed] Update script removed. +- #1111668, #1124998, #1144698, #1153712, #1107496, #1147596 Update removed. - #925944, #979202, #1112928, #1123734 [Fixed] i18n function added back. - #1117568 [Fixed] Added prefix "sf-". - #1138278 [Fixed] Added a 0 to the "Path levels" options. - #1282708 [New feature] Take the "Expanded by default" option into effect. -- #1126574, #1167776, #1190688 [Fixed] No more conflicts with other menu-related modules. -- #1184642, #1194244, #1191050, #1179838 [Improvement] Superfish now uses Drupal behvaiours. -- #776480, #1140910, #1165838 [Improvement] Superfish now scans the /styles folder. +- #1126574, #1167776, #1190688 Fixed conflicts with menu-related modules. +- #1184642, #1194244, #1191050, #1179838 Superfish now uses Drupal behvaiours. +- #776480, #1140910, #1165838 Superfish now scans the /styles folder. - #1231378 [New feature] Drush integration. - #1246378, #1298846 [Fixed] cache_get issues. - #1141848 [Improvement] Added the standard "menu" class. @@ -71,7 +71,7 @@ Version 1.9-beta, 2011-03-23 - #798722 [New feature] Path to Superfish library. - #801238 [Improvement] "middle" class added. - #849566 [Improvement] "neutral" style added. -- #866006 [New feature] jQuery Supposition plugin added and heavily heavily modified. +- #866006 [New feature] jQuery Supposition plugin added and heavily modified. - #906038 [New feature] Multi-column sub-menus. - #913548 Admin form tweaks. - #929146 [Fixed] @@ -79,7 +79,7 @@ Version 1.9-beta, 2011-03-23 - #975182 [Improvement] hook_uninstall added. - #993322, #1002766 [Improvement] "Item depth" class added. - [New feature] New slide-in effects. -- [Improvement] Menu caching added using a patch originally provided for NiceMenus. +- [Improvement] Menu cache added by a patch originally provided for NiceMenus. - [Improvement] hoverIntent moved to block settings. - [Improvement] Superfish.css - [Improvement] Blocks number in the admin form. @@ -90,17 +90,20 @@ Version 1.9-beta, 2011-03-23 Version 1.6, 2010-04-12 ---------------------- -- #764152, #741528 [Bug fixed] A previous modification to the links was causing problems regarding the <front> tag. +- #764152, #741528 Previous modification was causing problems with <front> tag. - #761446 [Improvement] More space for HTML wrappers. Version 1.5, 2010-04-02 ---------------------- -- #758148 [Bug fixed] Fade in\out effect is enabled by default and could not be disabled hence removed from SF block settings; It should be noted that any trick for disabling the fade effect (jQuery .animate Opacity) was causing JavaScript errors. +- #758148 [Bug fixed] Fade in\out effect is enabled by default and could not be + disabled hence removed from SF block settings; It should + be noted that any trick for disabling the fade effect + (jQuery .animate Opacity) was causing JavaScript errors. - #753412 [New feature] HTML Wrapper for Main UL. Version 1.4, 2010-03-27 ---------------------- -- #748474 [New features] New classes added first\last, zebra striping, item count. +- #748474 [New features] New classes added first\last, zebra, item count. - #743164, #718676 [Bug fixed] Active tab in NavBar menus. - #741528 [New feature] HTML Wrappers for hyperlinks, and link texts. - #716622 [New feature] Path for extra CSS files. diff --git a/profiles/wcm_base/modules/contrib/superfish/PATCHES.txt b/profiles/wcm_base/modules/contrib/superfish/PATCHES.txt new file mode 100644 index 00000000..7fb9e087 --- /dev/null +++ b/profiles/wcm_base/modules/contrib/superfish/PATCHES.txt @@ -0,0 +1,4 @@ +The following patches have been applied to this project: +- http://drupal.org/files/issues/superfish-add_aria_attributes-2674280-6.patch + +This file was automatically generated by Drush Make (http://drupal.org/project/drush). diff --git a/profiles/wcm_base/modules/contrib/superfish/README.txt b/profiles/wcm_base/modules/contrib/superfish/README.txt index 30d3aa76..df4af8bb 100644 --- a/profiles/wcm_base/modules/contrib/superfish/README.txt +++ b/profiles/wcm_base/modules/contrib/superfish/README.txt @@ -13,9 +13,9 @@ Requirement Installation instructions ------------------------- -1. Download and extract the Superfish library into the libraries directory (usually - "sites/all/libraries"). - Link: https://github.com/mehrpadin/Superfish-for-Drupal/zipball/master +1. Download and extract the Superfish library into the libraries directory + (usually "sites/all/libraries"). + Link: https://github.com/mehrpadin/Superfish-for-Drupal/zipball/1.x 2. Download and extract the Superfish module into the modules directory (usually "sites/all/modules"). @@ -32,28 +32,30 @@ Upgrade instructions -------------------- Did you change any part of the module or the library? -- If you did not change the module or the library; download the latest versions of the module and - the library and upload them (replacing the old files). +- If you did not change the module or the library; download the latest versions + of the module and the library and upload them (replacing the old files). -- If you did change the module or the library; use a visual comparison tool (such as Winmerge - or Kompare, so on) in order to compare your current copy with its original one (you can find it at - http://drupal.org/node/711944/release) find out what was changed and do the same to the version - you are upgrading to. +- If you did change the module or the library; use a visual comparison tool + (such as Winmerge or Kompare, so on) in order to compare your current copy + with its original one (http://drupal.org/node/711944/release) find out what + was changed and do the same to the version you are upgrading to. WARNING: This is for experts only! -- Please note that if you are upgrading from version 1.6 running update.php will cause error - messages to appear. To resolve this go to "Administer" -> "Structure" -> "Blocks", click the - "Configure" link for each Superfish block and click "Save block" button. +- Please note that if you are upgrading from version 1.6 running update.php will + cause error messages to appear. To resolve this go to + "Administer" -> "Structure" -> "Blocks", click the "Configure" link for each + Superfish block and click "Save block" button. Configuring the module ---------------------- -- For block-specific settings go to "Administer" -> "Structure" -> "Blocks" and click the - "Configure" link of the Superfish block. +- For block-specific settings go to "Administer" -> "Structure" -> "Blocks" and + click the "Configure" link of the Superfish block. -- For module settings go to "Administer" -> "Configuration" -> "User Interface" -> "Superfish". +- For module settings go to + "Administer" -> "Configuration" -> "User Interface" -> "Superfish". -- Detailed configuration instructions can be found at http://drupal.org/node/1125896 +- Detailed instructions can be found at http://drupal.org/node/1125896 How to style @@ -64,17 +66,18 @@ Here are some tips and tricks: A) Always use a DOM inspector utility (such as Firebug). -B) Set the "Menu delay" option to a very high number such as 99999999. This will give you enough - time to work with sub-menus. +B) Set the "Menu delay" option to a very high number such as 99999999. + This will give you enough time to work with sub-menus. C) If you are not using the built-in styles, set the "Style" option to "None". -D) Utilise the "Simple" style as reference; add the newly-created CSS file either to your theme CSS - or as a new CSS file under the styles directory in the Superfish library (probably - "sites/all/libraries/superfish/style"); putting it in the styles folder will automatically add it - to the styles list in the block configuration. +D) Utilise the "Simple" style as reference; add the newly-created CSS file + either to your theme CSS or as a new CSS file under the styles directory in + the Superfish library (probably "sites/all/libraries/superfish/style"); + putting it in the styles folder will automatically add it to the styles list + in the block configuration. -- More information can be found in the Superfish documentation at http://drupal.org/node/1125896 +- More information in Superfish documentation at http://drupal.org/node/1125896 Support requests diff --git a/profiles/wcm_base/modules/contrib/superfish/superfish.admin.inc b/profiles/wcm_base/modules/contrib/superfish/superfish.admin.inc index 8f48c01d..7b7811c4 100644 --- a/profiles/wcm_base/modules/contrib/superfish/superfish.admin.inc +++ b/profiles/wcm_base/modules/contrib/superfish/superfish.admin.inc @@ -5,33 +5,6 @@ * Functions that are only called on the admin pages. */ -/** - * Generate the default path for the Superfish library. - */ -function slp_default() { - // Ensure the Libraries API module is installed and working. - if (module_exists('libraries') && function_exists('libraries_get_path')) { - $directory = libraries_get_path('superfish'); - } - // Otherwise use the default directory. - else { - $directory = 'sites/all/libraries/superfish'; - } - if (file_exists($directory)) { - $output = $directory . "/jquery.hoverIntent.minified.js\n" . - $directory . "/jquery.bgiframe.min.js\n" . - $directory . "/superfish.js\n" . - $directory . "/supersubs.js\n" . - $directory . "/supposition.js\n" . - $directory . "/sftouchscreen.js\n" . - $directory . "/sfsmallscreen.js"; - } - else { - $output = ''; - } - return $output; -} - /** * Overriding system settings form. */ @@ -48,6 +21,10 @@ function superfish_system_settings_form($form, $automatic_defaults = TRUE) { if (!empty($_POST) && form_get_errors()) { drupal_set_message(t('The settings have not been saved because of the errors.'), 'error'); } + + // Adding our custom submission handler. + $form['#submit'][] = 'superfish_admin_settings_submit'; + $form['#submit'][] = 'system_settings_form_submit'; // By default, render the form using theme_system_settings_form(). if (!isset($form['#theme'])) { @@ -61,20 +38,12 @@ function superfish_system_settings_form($form, $automatic_defaults = TRUE) { */ function superfish_admin_settings() { $form['superfish_number'] = array( - '#type' => 'select', + '#type' => 'textfield', '#title' => t('Number of blocks'), '#multiple' => FALSE, - '#options' => drupal_map_assoc(range(1, 50)), - '#description' => t('The number of Superfish menu blocks.'), + '#description' => t('The number of Superfish menu blocks.') . ' (' . t('Default') . ': 4' . ')' . '<br />' . t('Please note decreasing this number leads to permanent deletion of blocks.'), '#default_value' => variable_get('superfish_number', 4), ); - $form['superfish_slp'] = array( - '#type' => 'textarea', - '#title' => t('Path to Superfish library'), - '#description' => t('Edit only if you are sure of what you are doing.'), - '#default_value' => variable_get('superfish_slp', slp_default()), - '#rows' => 7, - ); return superfish_system_settings_form($form, FALSE); } @@ -82,32 +51,30 @@ function superfish_admin_settings() { * Implements hook_validate(). */ function superfish_admin_settings_validate($form, &$form_state) { - $error = array(); - $sf_library = preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", trim($form_state['values']['superfish_slp'])); - if (empty($sf_library)) { - form_set_error('superfish_slp', t('<strong>Path to Superfish library</strong> field cannot be empty. Please try the below list:<br />' . '<pre>' . slp_default() . '</pre>')); + if (!is_numeric($form_state['values']['superfish_number'])) { + form_set_error('superfish_number', t('Please enter a number.')); } - else { - // Trimming blank lines and such - $sf_library = explode("\n", $sf_library); - // Crystal clear - foreach ($sf_library as $s) { - if (!file_exists($s)) { - $error[] = $s; - } - } - if (!empty($error)) { - $error_message = ''; - if (count($error) > 1) { - foreach ($error as $e) { - $error_message .= '<li>' . $e . '</li>'; - } - $error_message = t('Files not found') . ': <ul>' . $error_message . '</ul>'; - } - else { - $error_message = t('File not found') . ': ' . $error[0]; - } - form_set_error('superfish_slp', $error_message); +} + +/** + * Custom submission handler for the settings form. + */ +function superfish_admin_settings_submit($form, &$form_state) { + $values = &$form_state['values']; + $before = variable_get('superfish_number', 4); + $after = $values['superfish_number']; + // If the number of blocks has been decreased. + if ($before > $after) { + // How many blocks should be removed? + $reduce = $before - $after; + // Remove each block with all its variables. + $delta = $after; + for ($i = 0; $i < $reduce; $i++) { + $delta++; + db_delete('variable')->condition('name', 'superfish_%%_' . $delta, 'LIKE')->execute(); + db_delete('block')->condition('module', 'superfish')->condition('delta', $delta)->execute(); + db_delete('block_role')->condition('module', 'superfish')->condition('delta', $delta)->execute(); } + drupal_set_message(t('Successfully removed @number Superfish block(s).', array('@number' => $reduce))); } } \ No newline at end of file diff --git a/profiles/wcm_base/modules/contrib/superfish/superfish.drush.inc b/profiles/wcm_base/modules/contrib/superfish/superfish.drush.inc index cda9fde8..b2076a22 100644 --- a/profiles/wcm_base/modules/contrib/superfish/superfish.drush.inc +++ b/profiles/wcm_base/modules/contrib/superfish/superfish.drush.inc @@ -12,27 +12,15 @@ define('SUPERFISH_DOWNLOAD_URI', 'https://github.com/mehrpadin/Superfish-for-Dru /** * Implements hook_drush_command(). - * - * In this hook, you specify which commands your - * drush module makes available, what it does and - * description. - * - * Notice how this structure closely resembles how - * you define menu hooks. - * - * See `drush topic docs-commands` for a list of recognized keys. - * - * @return - * An associative array describing your command(s). */ function superfish_drush_command() { $items = array(); - // the key in the $items array is the name of the command. + // The key in the $items array is the name of the command. $items['superfish-plugin'] = array( 'callback' => 'drush_superfish_plugin', 'description' => dt("Downloads the Superfish plugin."), - 'bootstrap' => DRUSH_BOOTSTRAP_DRUSH, // No bootstrap. + 'bootstrap' => DRUSH_BOOTSTRAP_DRUSH, 'arguments' => array( 'path' => dt('Optional. A path where to install the Superfish plugin. If omitted Drush will use the default location.'), ), @@ -44,15 +32,6 @@ function superfish_drush_command() { /** * Implements hook_drush_help(). - * - * This function is called whenever a drush user calls - * 'drush help <name-of-your-command>' - * - * @param - * A string with the help section (prepend with 'drush:') - * - * @return - * A string with the help text for your command. */ function superfish_drush_help($section) { switch ($section) { @@ -83,19 +62,19 @@ function drush_superfish_plugin() { $olddir = getcwd(); chdir($path); - // Download the zip archive + // Download the zip archive. if ($filepath = drush_download_file(SUPERFISH_DOWNLOAD_URI)) { $filename = basename($filepath); $dirname = 'Superfish-for-Drupal-' . basename($filepath, '.zip'); - // Remove any existing Superfish plugin directory + // Remove any existing Superfish plugin directory. if (is_dir($dirname) || is_dir('superfish')) { drush_delete_dir($dirname, TRUE); drush_delete_dir('superfish', TRUE); drush_log(dt('A existing Superfish plugin was deleted from @path', array('@path' => $path)), 'notice'); } - // Decompress the zip archive + // Decompress the zip archive. drush_tarball_extract($filename); // Change the directory name to "superfish" if needed. diff --git a/profiles/wcm_base/modules/contrib/superfish/superfish.info b/profiles/wcm_base/modules/contrib/superfish/superfish.info index b9f63e52..51516a9b 100644 --- a/profiles/wcm_base/modules/contrib/superfish/superfish.info +++ b/profiles/wcm_base/modules/contrib/superfish/superfish.info @@ -1,13 +1,14 @@ name = "Superfish" description = "jQuery Superfish plugin for your Drupal menus." package = User interface +dependencies[] = block dependencies[] = menu configure = admin/config/user-interface/superfish core = 7.x -; Information added by drupal.org packaging script on 2013-04-27 -version = "7.x-1.9" +; Information added by Drupal.org packaging script on 2015-11-25 +version = "7.x-2.0" core = "7.x" project = "superfish" -datestamp = "1367054112" +datestamp = "1448444942" diff --git a/profiles/wcm_base/modules/contrib/superfish/superfish.install b/profiles/wcm_base/modules/contrib/superfish/superfish.install index fbac0ff0..d1641803 100644 --- a/profiles/wcm_base/modules/contrib/superfish/superfish.install +++ b/profiles/wcm_base/modules/contrib/superfish/superfish.install @@ -9,50 +9,102 @@ * Implements hook_uninstall(). */ function superfish_uninstall() { - db_delete('variable')->condition('name', '%%superfish%%', 'LIKE')->execute(); + db_delete('variable')->condition('name', 'superfish_%%', 'LIKE')->execute(); db_delete('block')->condition('module', 'superfish')->execute(); + db_delete('block_role')->condition('module', 'superfish')->execute(); } /** * Implements hook_enable(). */ function superfish_enable() { - drupal_set_message(check_plain('To use Superfish go to the administer blocks page and enable a Superfish block.')); + if (superfish_library_check()){ + drupal_set_message(t('In order to use Superfish, go to the <a href="@block">Blocks</a> page and enable a Superfish block.', array('@block' => 'structure/block'))); + } else { + drupal_set_message(t('Superfish library is missing. Please refer to the <a href="@documentation">plugin documentation</a> for how you can fix this issue; Once done, go to the <a href="@block">Blocks</a> page and enable a Superfish block.', array('@documentation' => 'http://drupal.org/node/1125896', '@block' => 'structure/block')), 'warning'); + } } - /** * Implements hook_requirements(). */ function superfish_requirements($phase) { $requirements = array(); if ($phase == 'runtime') { - // Ensure translations do not break at install time + // Ensure translations do not break at install time. $t = get_t(); + // Ensure the Superfish library is present. $requirements['superfish']['title'] = $t('Superfish library'); - if (module_exists('libraries') && function_exists('libraries_get_libraries')) { - $library = libraries_get_libraries(); - $superfish_installed = (isset($library['superfish'])) ? TRUE : FALSE; - } - elseif (file_exists('sites/all/libraries/superfish/superfish.js') || file_exists('profiles/' . drupal_get_profile() . '/libraries/superfish/superfish.js')) { - $superfish_installed = TRUE; - } - else { - $superfish_installed = FALSE; - } - if ($superfish_installed) { + + if (superfish_library_check()) { $requirements['superfish']['value'] = $t('Installed'); $requirements['superfish']['severity'] = REQUIREMENT_OK; } else { $requirements['superfish']['value'] = $t('Not installed'); $requirements['superfish']['severity'] = REQUIREMENT_ERROR; - $requirements['superfish']['description'] = $t('Please download the Superfish library from !link.', array('!link' => l('http://drupal.org/project/superfish', 'http://drupal.org/project/superfish'))); + $requirements['superfish']['description'] = $t('Please download the Superfish library from !link.', array('!link' => l($t('Superfish project homepage'), 'http://drupal.org/project/superfish'))); + } + + // Check the uploaded Superfish library version. + if (superfish_library_version() != '1.2') { + $requirements['superfish']['value'] = $t('Not supported'); + $requirements['superfish']['severity'] = REQUIREMENT_ERROR; + $requirements['superfish']['description'] = $t('The Superfish library requires an update. You can find the update instructions on !link.', array('!link' => l($t('Superfish project homepage'), 'http://drupal.org/project/superfish'))); } } return $requirements; } +/** + * Verifies Superfish library is present. + */ +function superfish_library_check() { + if (function_exists('libraries_get_libraries')) { + $library = libraries_get_libraries(); + if (isset($library['superfish'])) { + return TRUE; + } + } + elseif (file_exists('sites/all/libraries/superfish/superfish.js') || file_exists('profiles/' . drupal_get_profile() . '/libraries/superfish/superfish.js')) { + return TRUE; + } + return FALSE; +} + +/** + * A function to check the Superfish library version. + */ +function superfish_library_version() { + // Ensure the Libraries API module is installed and working. + if (module_exists('libraries') && function_exists('libraries_get_path') && libraries_get_path('superfish') != '') { + $directory = libraries_get_path('superfish'); + } + // Otherwise use the default directory. + elseif (file_exists('profiles/' . drupal_get_profile() . '/libraries/superfish')) { + $directory = 'profiles/' . drupal_get_profile() . '/libraries/superfish'; + } + else { + $directory = 'sites/all/libraries/superfish'; + } + + // Get the library version. + if (file_exists($directory . '/VERSION')) { + $version = file_get_contents($directory . '/VERSION'); + // Removing blank lines and white spaces. + $version = preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", trim($version)); + if (!empty($version)) { + return $version; + } + else { + return ''; + } + } + else { + return ''; + } +} + /** * Implements hook_update_N(). */ diff --git a/profiles/wcm_base/modules/contrib/superfish/superfish.js b/profiles/wcm_base/modules/contrib/superfish/superfish.js index 91924cf8..030727e1 100644 --- a/profiles/wcm_base/modules/contrib/superfish/superfish.js +++ b/profiles/wcm_base/modules/contrib/superfish/superfish.js @@ -30,9 +30,15 @@ if (options.plugins.smallscreen || false) { list.sfsmallscreen(options.plugins.smallscreen); } + if (options.plugins.automaticwidth || false) { + list.sfautomaticwidth(); + } if (options.plugins.supposition || false) { list.supposition(); } + if (options.plugins.aria || false) { + list.aria(); + } if (options.plugins.bgiframe || false) { list.find('ul').bgIframe({opacity:false}); } diff --git a/profiles/wcm_base/modules/contrib/superfish/superfish.make b/profiles/wcm_base/modules/contrib/superfish/superfish.make index 6cadbf16..6e401841 100644 --- a/profiles/wcm_base/modules/contrib/superfish/superfish.make +++ b/profiles/wcm_base/modules/contrib/superfish/superfish.make @@ -3,4 +3,4 @@ api = 2 libraries[superfish][directory_name] = superfish libraries[superfish][download][type] = get -libraries[superfish][download][url] = https://github.com/mehrpadin/Superfish-for-Drupal/zipball/master \ No newline at end of file +libraries[superfish][download][url] = https://github.com/mehrpadin/Superfish-for-Drupal/archive/1.x.zip \ No newline at end of file diff --git a/profiles/wcm_base/modules/contrib/superfish/superfish.module b/profiles/wcm_base/modules/contrib/superfish/superfish.module index 850964f2..aa8d1f60 100644 --- a/profiles/wcm_base/modules/contrib/superfish/superfish.module +++ b/profiles/wcm_base/modules/contrib/superfish/superfish.module @@ -40,8 +40,9 @@ function superfish_help($path, $arg) { case 'admin/modules#description': $output .= t('jQuery Superfish plugin for your Drupal menus.'); break; + case 'admin/config/user-interface/superfish': - $output .= t('<p>Block-specific Superfish settings could be found at !link</p>', array('!link' => l('admin/structure/block', 'admin/structure/block'))); + $output .= t('<p>Block-specific Superfish settings could be found at !link</p>', array('!link' => l(t('Blocks management'), 'admin/structure/block'))); break; } return $output; @@ -66,125 +67,146 @@ function superfish_block_info() { * Implements hook_block_configure(). */ function superfish_block_configure($delta = 0) { - $form = array(); + $form = $menu_default = array(); + + // Integration with the Domain Access module. + if (module_exists('domain_conf')) { + $main = variable_get('menu_main_links_source'); + $secondary = variable_get('menu_secondary_links_source'); + if ($main) { + $menu_default['domainaccessmenu1st-' . $main . ':0'] = t('Domains Access') . ': ' . t('Main links'); + } + if ($secondary) { + $menu_default['domainaccessmenu2nd-' . $secondary . ':0'] = t('Domains Access') . ': ' . t('Secondary links'); + } + } + $menu_default += menu_parent_options(menu_get_menus(), array('mlid' => 0)); + $form['superfish_name_' . $delta] = array( '#type' => 'textfield', '#title' => t('Block description'), '#description' => t('A brief description of your block. Used on the !link', array('!link' => l(t('Blocks administration page'), 'admin/structure/block'))), '#default_value' => variable_get('superfish_name_' . $delta, 'Superfish ' . $delta), ); - $form['sf-menu'] = array( + $form['sf-settings'] = array( '#type' => 'fieldset', - '#title' => t('Menu'), + '#title' => t('Superfish settings'), '#collapsible' => TRUE, '#collapsed' => FALSE, ); - $form['sf-menu']['superfish_menu_' . $delta] = array( + $form['sf-settings']['superfish_menu_' . $delta] = array( '#type' => 'select', - '#title' => t('Menu parent'), + '#title' => t('Menu'), '#description' => t('The menu you want to be displayed using Superfish.') . ' <em>(' . t('Default') . ': <Main menu>)</em>', '#default_value' => variable_get('superfish_menu_' . $delta, 'main-menu:0'), - '#options' => menu_parent_options(menu_get_menus(), array('mlid' => 0)), + '#options' => $menu_default, + ); + $form['sf-settings']['superfish_type_' . $delta] = array( + '#type' => 'radios', + '#title' => t('Type'), + '#default_value' => variable_get('superfish_type_' . $delta, 'horizontal'), + '#options' => array( + 'horizontal' => t('Horizontal (single row)') . ' <em>(' . t('Default') . ')</em>', + 'navbar' => t('Horizontal (double row)'), + 'vertical' => t('Vertical (stack)') + ), + ); + $form['sf-settings']['superfish_style_' . $delta] = array( + '#type' => 'select', + '#title' => t('Style'), + '#description' => '<em>(' . t('Default') . ': ' . t('None') . ')</em>', + '#default_value' => variable_get('superfish_style_' . $delta, 'none'), + '#options' => superfish_styles(), + ); + $form['sf-settings']['superfish_arrow_' . $delta] = array( + '#type' => 'checkbox', + '#title' => t('Add arrows to parent menus'), + '#default_value' => variable_get('superfish_arrow_' . $delta, 1), + ); + $form['sf-settings']['superfish_shadow_' . $delta] = array( + '#type' => 'checkbox', + '#title' => t('Drop shadows'), + '#default_value' => variable_get('superfish_shadow_' . $delta, 1), + ); + $form['sf-settings']['superfish_slide_' . $delta] = array( + '#type' => 'select', + '#title' => t('Slide-in effect'), + '#description' => '<em>(' . t('Default') . ': ' . t('Vertical') . ')</em><br />' . ((count(superfish_effects()) == 4) ? t('jQuery Easing plugin is not installed.') . '<br />' . t("The plugin provides a handful number of animation effects, they can be used by uploading the 'jquery.easing.js' file to the libraries directory within the 'easing' directory (for example: sites/all/libraries/easing/jquery.easing.js). Refresh this page after the plugin is uploaded, this will make more effects available in the above list.") . '<br />' : '') . '<strong>' . t('Important') . ':</strong> ' . t('Easing effects require jQuery 1.6.1 or higher. If you need to update your jQuery to version 1.6.1 or higher, please use the jQuery Update module.'), + '#default_value' => variable_get('superfish_slide_' . $delta, 'vertical'), + '#options' => superfish_effects(), + ); + $form['sf-settings']['sf-advanced'] = array( + '#type' => 'fieldset', + '#title' => t('Advanced'), + '#collapsible' => TRUE, + '#collapsed' => TRUE, + ); + $form['sf-settings']['sf-advanced']['sf-menu'] = array( + '#type' => 'fieldset', + '#title' => t('Menu'), + '#collapsible' => FALSE ); - $form['sf-menu']['superfish_depth_' . $delta] = array( + $form['sf-settings']['sf-advanced']['sf-menu']['superfish_depth_' . $delta] = array( '#type' => 'select', '#title' => t('Menu depth'), '#description' => t('The number of child levels starting with the parent selected above. <strong>-1</strong> means all of them, <strong>0</strong> means none of them.') . ' <em>(' . t('Default') . ': -1)</em>', '#default_value' => variable_get('superfish_depth_' . $delta, -1), '#options' => drupal_map_assoc(range(-1, 50)), ); - $form['sf-menu']['superfish_expanded_' . $delta] = array( + $form['sf-settings']['sf-advanced']['sf-menu']['superfish_expanded_' . $delta] = array( '#type' => 'checkbox', '#title' => t('Take "Expanded" option into effect.'), - '#description' => t('By enabling this option, only parent menu items with <em>Expanded</em> option enabled will have their submenus appear.') . ' <em>(' . t('Default') . ': ' . t('disabled') . ')</em>', + '#description' => t('By enabling this option only those parent menu items which have the <em>Expanded</em> option enabled will have their sub-menus included in this menu block.') . ' <em>(' . t('Default') . ': ' . t('disabled') . ')</em>', '#default_value' => variable_get('superfish_expanded_' . $delta, 0), ); - $form['sf-settings'] = array( - '#type' => 'fieldset', - '#title' => t('Superfish settings'), - '#collapsible' => TRUE, - '#collapsed' => FALSE, + $form['sf-settings']['sf-advanced']['sf-menu']['superfish_use_link_theme_' . $delta] = array( + '#type' => 'checkbox', + '#title' => t('Use a theme function for hyperlinks.') . ' <em>(' . t('Default') . ': ' . t('enabled') . ')</em><br /><small>' . t('(Disabling this feature can result in performance improvements, depending on the number of hyperlinks in the menu.)') . '</small>', + '#default_value' => variable_get('superfish_use_link_theme_' . $delta, 1), ); - $form['sf-settings']['superfish_type_' . $delta] = array( - '#type' => 'select', - '#title' => t('Menu type'), - '#description' => '<em>(' . t('Default') . ': ' . t('Horizontal') . ')</em>', - '#default_value' => variable_get('superfish_type_' . $delta, 'horizontal'), - '#options' => array( - 'horizontal' => t('Horizontal'), - 'vertical' => t('Vertical'), - 'navbar' => t('NavBar'), - ), + $form['sf-settings']['sf-advanced']['sf-menu']['superfish_use_item_theme_' . $delta] = array( + '#type' => 'checkbox', + '#title' => t('Use a theme function for menu items.') . ' <em>(' . t('Default') . ': ' . t('enabled') . ')</em><br /><small>' . t('(Disabling this feature can result in performance improvements, depending on the number of items in the menu.)') . '</small>', + '#default_value' => variable_get('superfish_use_item_theme_' . $delta, 1), ); - $form['sf-settings']['superfish_style_' . $delta] = array( - '#type' => 'select', - '#title' => t('Style'), - '#description' => '<em>(' . t('Default') . ': ' . t('None') . ')</em>', - '#default_value' => variable_get('superfish_style_' . $delta, 'none'), - '#options' => superfish_styles(), + $form['sf-settings']['sf-advanced']['sf-menu']['superfish_clone_parent_' . $delta] = array( + '#type' => 'checkbox', + '#title' => t('Add cloned parent links to the top of sub-menus.') . ' <em>(' . t('Default') . ': ' . t('disabled') . ')</em>', + '#default_value' => variable_get('superfish_clone_parent_' . $delta, 0), + ); + $form['sf-settings']['sf-advanced']['sf-settings'] = array( + '#type' => 'fieldset', + '#title' => t('Superfish'), + '#collapsible' => FALSE ); - $form['sf-settings']['superfish_speed_' . $delta] = array( + $form['sf-settings']['sf-advanced']['sf-settings']['superfish_speed_' . $delta] = array( '#type' => 'textfield', '#title' => t('Animation speed'), '#description' => t('The speed of the animation either in <strong>milliseconds</strong> or pre-defined values (<strong>slow, normal, fast</strong>).') . ' <em>(' . t('Default') . ': fast)</em>', '#default_value' => variable_get('superfish_speed_' . $delta, 'fast'), '#size' => 15, - '#required' => TRUE, ); - $form['sf-settings']['superfish_delay_' . $delta] = array( + $form['sf-settings']['sf-advanced']['sf-settings']['superfish_delay_' . $delta] = array( '#type' => 'textfield', '#title' => t('Mouse delay'), '#description' => t('The delay in <strong>milliseconds</strong> that the mouse can remain outside a sub-menu without it closing.') . ' <em>(' . t('Default') . ': 800)</em>', '#default_value' => variable_get('superfish_delay_' . $delta, 800), '#size' => 15, ); - $form['sf-settings']['superfish_pathclass_' . $delta] = array( + $form['sf-settings']['sf-advanced']['sf-settings']['superfish_pathclass_' . $delta] = array( '#type' => 'textfield', '#title' => t('Path class'), - '#description' => t('The class you have applied to list items that lead to the current page.') . ' <em>(' . t('Default') . ': active-trail)</em><br />' . t('Change this <strong>only</strong> if you are <strong>totally sure</strong> of what you are doing.'), + '#description' => t('The class you have applied to list items that lead to the current page.') . ' <em>(' . t('Default') . ': active-trail)</em><br />' . t('Change this setting <strong>only and only</strong> if you are <strong>totally sure</strong> of what you are doing.'), '#default_value' => variable_get('superfish_pathclass_' . $delta, 'active-trail'), '#size' => 15, ); - $form['sf-settings']['superfish_pathlevels_' . $delta] = array( + $form['sf-settings']['sf-advanced']['sf-settings']['superfish_pathlevels_' . $delta] = array( '#type' => 'select', '#title' => t('Path levels'), - '#description' => t('The amount of sub-menu levels that remain open or are restored using <strong>Path class</strong>.') . ' <em>(' . t('Default') . ': 1)</em>', + '#description' => t('The amount of sub-menu levels that remain open or are restored using <strong>Path class</strong>.') . ' <em>(' . t('Default') . ': 1)</em><br />' . t('Change this setting <strong>only and only</strong> if you are <strong>totally sure</strong> of what you are doing.'), '#default_value' => variable_get('superfish_pathlevels_' . $delta, 1), '#options' => drupal_map_assoc(range(0, 10)), ); - $form['sf-settings']['superfish_slide_' . $delta] = array( - '#type' => 'select', - '#title' => t('Slide-in effect'), - '#description' => '<em>(' . t('Default') . ': ' . t('Vertical') . ')</em><br />' . ((count(superfish_effects()) == 4) ? t('jQuery Easing plugin is not installed.') . '<br />' . t('The plugin provides a handful number of animation effects, they can be used by uploading the \'jquery.easing.js\' file to the libraries directory within the \'easing\' directory (for example: sites/all/libraries/easing/jquery.easing.js). Refresh this page after the plugin is uploaded, this will make more effects available in the above list.') . '<br />' : '') . '<strong>' . t('Important') . ':</strong> ' . t('Easing effects require jQuery 1.6.1 or higher. If you need to update your jQuery to version 1.6.1 or higher, please use the jQuery Update module.'), - '#default_value' => variable_get('superfish_slide_' . $delta, 'vertical'), - '#options' => superfish_effects(), - ); - $form['sf-settings']['superfish_arrow_' . $delta] = array( - '#type' => 'checkbox', - '#title' => t('Auto-arrows'), - '#default_value' => variable_get('superfish_arrow_' . $delta, 1), - ); - $form['sf-settings']['superfish_shadow_' . $delta] = array( - '#type' => 'checkbox', - '#title' => t('Drop shadows'), - '#default_value' => variable_get('superfish_shadow_' . $delta, 1), - ); - $form['sf-settings']['sf-more'] = array( - '#type' => 'fieldset', - '#title' => t('More options'), - '#collapsible' => TRUE, - '#collapsed' => TRUE, - ); - $form['sf-settings']['sf-more']['superfish_use_link_theme_' . $delta] = array( - '#type' => 'checkbox', - '#title' => t('Use a theme function for hyperlinks.') . ' <em>(' . t('Default') . ': ' . t('enabled') . ')</em><br /><small>' . t('(Disabling this feature can result in performance improvements, depending on the number of hyperlinks in the menu.)') . '</small>', - '#default_value' => variable_get('superfish_use_link_theme_' . $delta, 1), - ); - $form['sf-settings']['sf-more']['superfish_use_item_theme_' . $delta] = array( - '#type' => 'checkbox', - '#title' => t('Use a theme function for menu items.') . ' <em>(' . t('Default') . ': ' . t('enabled') . ')</em><br /><small>' . t('(Disabling this feature can result in performance improvements, depending on the number of items in the menu.)') . '</small>', - '#default_value' => variable_get('superfish_use_item_theme_' . $delta, 1), - ); $form['sf-plugins'] = array( '#type' => 'fieldset', '#title' => t('Superfish plugins'), @@ -194,25 +216,37 @@ function superfish_block_configure($delta = 0) { $form['sf-plugins']['superfish_bgf_' . $delta] = array( '#type' => 'checkbox', '#title' => t('Use jQuery BgiFrame plugin for this menu.'), - '#description' => t('Helps ease the pain when having to deal with IE z-index issues.') . ' <em>(' . t('Default') . ': ' . t('disabled') . ')</em>', + '#description' => t('Helps ease the pain when having to deal with IE z-index issues.') . ' <em>(' . t('Default') . ': ' . t('disabled') . ')</em>' . ((!file_exists(superfish_get_path('superfish') . '/jquery.bgiframe.min.js')) ? '<br /><strong>' . t('Important') . ':</strong> ' . t('Cannot find the required JavaScript file, please upload jquery.bgiframe.min.js to the /libraries/superfish directory.') : ''), '#default_value' => variable_get('superfish_bgf_' . $delta, 0), ); $form['sf-plugins']['superfish_spp_' . $delta] = array( '#type' => 'checkbox', '#title' => t('Use jQuery Supposition plugin for this menu.') . ' <sup>(' . t('Beta') . ')</sup>', - '#description' => t('Relocates sub-menus when they would otherwise appear outside the browser window area.') . ' <em>(' . t('Default') . ': ' . t('enabled') . ')</em>', + '#description' => t('Relocates sub-menus when they would otherwise appear outside the browser window area.') . ' <em>(' . t('Default') . ': ' . t('enabled') . ')</em>' . ((!file_exists(superfish_get_path('superfish') . '/supposition.js')) ? '<br /><strong>' . t('Important') . ':</strong> ' . t('Cannot find the required JavaScript file, please upload supposition.js to the /libraries/superfish directory.') : ''), '#default_value' => variable_get('superfish_spp_' . $delta, 1), ); + $form['sf-plugins']['superfish_aria_' . $delta] = array( + '#type' => 'checkbox', + '#title' => t('Use jQuery ARIA plugin for this menu.') . ' <sup>(' . t('Beta') . ')</sup>', + '#description' => t('Supplements HTML with ARIA attributes for assistive technology (AT) users.') . ' <em>(' . t('Default') . ': ' . t('enabled') . ')</em>', + '#default_value' => variable_get('superfish_aria_' . $delta, 1), + ); $form['sf-plugins']['superfish_hid_' . $delta] = array( '#type' => 'checkbox', '#title' => t('Enable hoverIntent detection.'), - '#description' => t('Prevents accidental firing of animations by waiting until the user\'s mouse slows down enough, hence determinig user\'s <em>intent</em>.') . ' <em>(' . t('Default') . ': ' . t('enabled') . ')</em>', + '#description' => t("Prevents accidental firing of animations by waiting until the user's mouse slows down enough, hence determinig user's <em>intent</em>.") . ' <em>(' . t('Default') . ': ' . t('enabled') . ')</em>' . ((!file_exists(superfish_get_path('superfish') . '/jquery.hoverIntent.minified.js')) ? '<br /><strong>' . t('Important') . ':</strong> ' . t('Cannot find the required JavaScript file, please upload jquery.hoverIntent.minified.js to the /libraries/superfish directory.') : ''), '#default_value' => variable_get('superfish_hid_' . $delta, 1), ); + $form['sf-plugins']['superfish_amw_' . $delta] = array( + '#type' => 'checkbox', + '#title' => t('Use sf-AutomaticWidth plugin for this menu.'), + '#description' => t('Automatically adjusts the menu width to maximum possible.') . ' <em>(' . t('Default') . ': ' . t('disabled') . ')</em><br />' . t('This is limited to Horizontal and NavBar types.') . ((!file_exists(superfish_get_path('superfish') . '/sfautomaticwidth.js')) ? '<br /><strong>' . t('Important') . ':</strong> ' . t('Cannot find the required JavaScript file, please upload sfautomaticwidth.js to the /libraries/superfish directory.') : ''), + '#default_value' => variable_get('superfish_amw_' . $delta, 0), + ); $form['sf-plugins']['sf-touchscreen'] = array( '#type' => 'fieldset', '#title' => t('sf-Touchscreen') . ' <sup>(' . t('Beta') . ')</sup>', - '#description' => t('<strong>sf-Touchscreen</strong> provides touchscreen compatibility for your menus.') . ' <sup>(' . t('The first click on a parent hyperlink shows its children and the second click opens the hyperlink.') . ')</sup>', + '#description' => t('<strong>sf-Touchscreen</strong> provides touchscreen compatibility for your menus.') . ' <sup>(' . t('The first click on a parent hyperlink shows its children and the second click opens the hyperlink.') . ')</sup>' . ((!file_exists(superfish_get_path('superfish') . '/sftouchscreen.js')) ? '<br /><strong>' . t('Important') . ':</strong> ' . t('Cannot find the required JavaScript file, please upload sftouchscreen.js to the /libraries/superfish directory.') : ''), '#collapsible' => TRUE, '#collapsed' => FALSE, ); @@ -222,23 +256,52 @@ function superfish_block_configure($delta = 0) { '#options' => array( 0 => t('Disable') . '. <sup>(' . t('Default') . ')</sup>', 1 => t('Enable jQuery sf-Touchscreen plugin for this menu.'), - 2 => t('Enable jQuery sf-Touchscreen plugin for this menu depending on the user\'s Web browser <strong>window width</strong>.'), - 3 => t('Enable jQuery sf-Touchscreen plugin for this menu depending on the user\'s Web browser <strong>user agent</strong>.'), + 2 => t("Enable jQuery sf-Touchscreen plugin for this menu depending on the user's Web browser <strong>window width</strong>."), + 3 => t("Enable jQuery sf-Touchscreen plugin for this menu depending on the user's Web browser <strong>user agent</strong>."), + ), + ); + $form['sf-plugins']['sf-touchscreen']['superfish_touchbh_' . $delta] = array( + '#type' => 'radios', + '#title' => t('Select a behaviour'), + '#description' => t('Using this plugin, the first click or tap will expand the sub-menu, here you can choose what a second click or tap should do.'), + '#default_value' => variable_get('superfish_touchbh_' . $delta, 2), + '#options' => array( + 0 => t('Opening the parent menu item link on the second tap.'), + 1 => t('Hiding the sub-menu on the second tap.'), + 2 => t('Hiding the sub-menu on the second tap, adding cloned parent links to the top of sub-menus as well.') . ' <sup>(' . t('Default') . ')</sup>', ), ); + $form['sf-plugins']['sf-touchscreen']['superfish_touchdh_' . $delta] = array( + '#type' => 'checkbox', + '#title' => t('Also disable the <em>hover</em> (mouse over) event for all its items.'), + '#default_value' => variable_get('superfish_touchdh_' . $delta, 0), + ); $form['sf-plugins']['sf-touchscreen']['sf-touchscreen-windowwidth'] = array( '#type' => 'fieldset', '#title' => t('Window width settings'), - '#description' => t('sf-Touchscreen will be enabled only if the width of user\'s Web browser window is smaller than the below value.') . '<br /><br />' . t('Please note that in most cases such a meta tag is necessary for this feature to work properly:') . '<br /><code><meta name="viewport" content="width=device-width, initial-scale=1.0" /></code>', + '#description' => t("sf-Touchscreen will be enabled only if the width of user's Web browser window is smaller than the below value.") . '<br /><br />' . t('Please note that in most cases such a meta tag is necessary for this feature to work properly:') . '<br /><code><meta name="viewport" content="width=device-width, initial-scale=1.0" /></code>', '#collapsible' => TRUE, '#collapsed' => TRUE, ); $form['sf-plugins']['sf-touchscreen']['sf-touchscreen-windowwidth']['superfish_touchbp_' . $delta] = array( '#type' => 'textfield', - '#description' => t('Also known as "Breakpoint".') . ' <em>(' . t('Default') . ': 768)</em>', + '#title' => t('Breakpoint'), + '#description' => '<em>(' . t('Default') . ': 768px)</em>', '#default_value' => variable_get('superfish_touchbp_' . $delta, 768), - '#field_suffix' => t('pixels'), '#size' => 10, + '#prefix' => '<div class="clearfix"></div><div class="sf-breakpoint" style="float:left;">', + '#suffix' => '</div>', + ); + $form['sf-plugins']['sf-touchscreen']['sf-touchscreen-windowwidth']['superfish_touchbpu_' . $delta] = array( + '#type' => 'select', + '#title' => t('Unit'), + '#default_value' => variable_get('superfish_touchbpu_' . $delta, 'px'), + '#options' => array( + 'px' => 'px', + 'em' => 'em', + ), + '#prefix' => '<div class="sf-breakpoint-unit" style="float:left;">', + '#suffix' => '</div><div class="clearfix"></div>', ); $form['sf-plugins']['sf-touchscreen']['sf-touchscreen-useragent'] = array( '#type' => 'fieldset', @@ -269,13 +332,13 @@ function superfish_block_configure($delta = 0) { '#default_value' => variable_get('superfish_touchuam_' . $delta, 0), '#options' => array( 0 => t('Client-side (JavaScript)'), - 1 => t('Server-side (PHP)') + 1 => t('Server-side (PHP)'), ), ); $form['sf-plugins']['sf-smallscreen'] = array( '#type' => 'fieldset', '#title' => t('sf-Smallscreen') . ' <sup>(' . t('Beta') . ')</sup>', - '#description' => t('<strong>sf-Smallscreen</strong> provides small-screen compatibility for your menus.') . ' <sup>(' . t('Converts the dropdown into a <select> element.') . ')</sup>', + '#description' => t('<strong>sf-Smallscreen</strong> provides small-screen compatibility for your menus.') . ' <sup>(' . t('Converts the dropdown into a <select> element.') . ')</sup>' . ((!file_exists(superfish_get_path('superfish') . '/sfsmallscreen.js')) ? '<br /><strong>' . t('Important') . ':</strong> ' . t('Cannot find the required JavaScript file, please upload sfsmallscreen.js to the /libraries/superfish directory.') : ''), '#collapsible' => TRUE, '#collapsed' => FALSE, ); @@ -285,23 +348,36 @@ function superfish_block_configure($delta = 0) { '#options' => array( 0 => t('Disable') . '.', 1 => t('Enable jQuery sf-Smallscreen plugin for this menu.'), - 2 => t('Enable jQuery sf-Smallscreen plugin for this menu depending on the user\'s Web browser <strong>window width</strong>.') . ' <sup>(' . t('Default') . ')</sup>', - 3 => t('Enable jQuery sf-Smallscreen plugin for this menu depending on the user\'s Web browser <strong>user agent</strong>.'), + 2 => t("Enable jQuery sf-Smallscreen plugin for this menu depending on the user's Web browser <strong>window width</strong>.") . ' <sup>(' . t('Default') . ')</sup>', + 3 => t("Enable jQuery sf-Smallscreen plugin for this menu depending on the user's Web browser <strong>user agent</strong>."), ), ); $form['sf-plugins']['sf-smallscreen']['sf-smallscreen-windowwidth'] = array( '#type' => 'fieldset', '#title' => t('Window width settings'), - '#description' => t('sf-Smallscreen will be enabled only if the width of user\'s Web browser window is smaller than the below value.') . '<br /><br />' . t('Please note that in most cases such a meta tag is necessary for this feature to work properly:') . '<br /><code><meta name="viewport" content="width=device-width, initial-scale=1.0" /></code>', + '#description' => t("sf-Smallscreen will be enabled only if the width of user's Web browser window is smaller than the below value.") . '<br /><br />' . t('Please note that in most cases such a meta tag is necessary for this feature to work properly:') . '<br /><code><meta name="viewport" content="width=device-width, initial-scale=1.0" /></code>', '#collapsible' => TRUE, '#collapsed' => TRUE, ); $form['sf-plugins']['sf-smallscreen']['sf-smallscreen-windowwidth']['superfish_smallbp_' . $delta] = array( '#type' => 'textfield', - '#description' => t('Also known as "Breakpoint".') . ' <em>(' . t('Default') . ': 768)</em>', + '#title' => t('Breakpoint'), + '#description' => '<em>(' . t('Default') . ': 768px)</em>', '#default_value' => variable_get('superfish_smallbp_' . $delta, 768), - '#field_suffix' => t('pixels'), '#size' => 10, + '#prefix' => '<div class="clearfix"></div><div class="sf-breakpoint" style="float:left;">', + '#suffix' => '</div>', + ); + $form['sf-plugins']['sf-smallscreen']['sf-smallscreen-windowwidth']['superfish_smallbpu_' . $delta] = array( + '#type' => 'select', + '#title' => t('Unit'), + '#default_value' => variable_get('superfish_smallbpu_' . $delta, 'px'), + '#options' => array( + 'px' => 'px', + 'em' => 'em', + ), + '#prefix' => '<div class="sf-breakpoint-unit" style="float:left;">', + '#suffix' => '</div><div class="clearfix"></div>', ); $form['sf-plugins']['sf-smallscreen']['sf-smallscreen-useragent'] = array( '#type' => 'fieldset', @@ -327,12 +403,21 @@ function superfish_block_configure($delta = 0) { ); $form['sf-plugins']['sf-smallscreen']['sf-smallscreen-useragent']['superfish_smalluam_' . $delta] = array( '#type' => 'select', - '#title' => t('<strong>User agent</strong> detection method:'), + '#title' => t('<strong>User agent</strong> detection method'), '#description' => '<em>(' . t('Default') . ': ' . t('Client-side (JavaScript)') . ')</em>', '#default_value' => variable_get('superfish_smalluam_' . $delta, 0), '#options' => array( 0 => t('Client-side (JavaScript)'), - 1 => t('Server-side (PHP)') + 1 => t('Server-side (PHP)'), + ), + ); + $form['sf-plugins']['sf-smallscreen']['superfish_smallact_' . $delta] = array( + '#type' => 'radios', + '#title' => t('Select a reaction'), + '#default_value' => variable_get('superfish_smallact_' . $delta, 1), + '#options' => array( + 0 => t('Convert the menu to a <select> element.'), + 1 => t('Convert the menu to an accordion menu.') . ' <sup>(' . t('Default') . ')</sup>', ), ); $form['sf-plugins']['sf-smallscreen']['sf-smallscreen-select'] = array( @@ -351,7 +436,7 @@ function superfish_block_configure($delta = 0) { ); $form['sf-plugins']['sf-smallscreen']['sf-smallscreen-select']['superfish_smallasa_' . $delta] = array( '#type' => 'checkbox', - '#title' => t('Add <em>selected</em> attribute to the <option> element with the class <strong>active</strong>'), + '#title' => t('Add <em>selected</em> attribute to the <option> element with the class <strong>active</strong> .'), '#description' => t('Makes pre-selected the item linked to the active page when the page loads.'), '#default_value' => variable_get('superfish_smallasa_' . $delta, 0), ); @@ -363,8 +448,7 @@ function superfish_block_configure($delta = 0) { ); $form['sf-plugins']['sf-smallscreen']['sf-smallscreen-select']['sf-smallscreen-select-more']['superfish_smallcmc_' . $delta] = array( '#type' => 'checkbox', - '#title' => t('Copy the main <ul> classes to the <select>.'), - '#description' => ' <em>(' . t('Default') . ': ' . t('disabled') . ')</em>', + '#title' => t('Copy the main <ul> classes to the <select>.') . ' <sup><em>(' . t('Default') . ': ' . t('disabled') . ')</em></sup>', '#default_value' => variable_get('superfish_smallcmc_' . $delta, 0), ); $form['sf-plugins']['sf-smallscreen']['sf-smallscreen-select']['sf-smallscreen-select-more']['superfish_smallecm_' . $delta] = array( @@ -376,14 +460,13 @@ function superfish_block_configure($delta = 0) { '#maxlength' => 1000, '#states' => array( 'enabled' => array( - ':input[name="superfish_smallcmc_' . $delta . '"]' => array('checked' => TRUE), + ':input[name="superfish_smallcmc_' . $delta . '"]' => array('checked' => TRUE), ), ), ); $form['sf-plugins']['sf-smallscreen']['sf-smallscreen-select']['sf-smallscreen-select-more']['superfish_smallchc_' . $delta] = array( '#type' => 'checkbox', - '#title' => t('Copy the hyperlink classes to the <option> elements of the <select>.'), - '#description' => ' <em>(' . t('Default') . ': ' . t('disabled') . ')</em>', + '#title' => t('Copy the hyperlink classes to the <option> elements of the <select>.') . ' <sup><em>(' . t('Default') . ': ' . t('disabled') . ')</em></sup>', '#default_value' => variable_get('superfish_smallchc_' . $delta, 0), ); $form['sf-plugins']['sf-smallscreen']['sf-smallscreen-select']['sf-smallscreen-select-more']['superfish_smallech_' . $delta] = array( @@ -395,7 +478,7 @@ function superfish_block_configure($delta = 0) { '#maxlength' => 1000, '#states' => array( 'enabled' => array( - ':input[name="superfish_smallchc_' . $delta . '"]' => array('checked' => TRUE), + ':input[name="superfish_smallchc_' . $delta . '"]' => array('checked' => TRUE), ), ), ); @@ -415,10 +498,34 @@ function superfish_block_configure($delta = 0) { '#size' => 100, '#maxlength' => 1000, ); + $form['sf-plugins']['sf-smallscreen']['sf-smallscreen-accordion'] = array( + '#type' => 'fieldset', + '#title' => t('Accordion settings'), + '#collapsible' => TRUE, + '#collapsed' => TRUE, + ); + $form['sf-plugins']['sf-smallscreen']['sf-smallscreen-accordion']['superfish_smallamt_' . $delta] = array( + '#type' => 'textfield', + '#title' => t('Accordion menu title'), + '#description' => t('By default the caption of the accordion toggle switch will be the name of the parent menu or the title of this block, you can change this by setting a custom title.') . ' <em>(' . t('Default') . ': ' . t('empty') . ')</em><br />' . t('Example') . ': <em>' . t('Menu') . '</em>.', + '#default_value' => variable_get('superfish_smallamt_' . $delta, ''), + '#size' => 50, + '#maxlength' => 500, + ); + $form['sf-plugins']['sf-smallscreen']['sf-smallscreen-accordion']['superfish_smallabt_' . $delta] = array( + '#type' => 'radios', + '#title' => t('Accordion button type'), + '#default_value' => variable_get('superfish_smallabt_' . $delta, 1), + '#options' => array( + 0 => t('Use parent menu items as buttons.'), + 1 => t('Use parent menu items as buttons, add cloned parent links to sub-menus as well.') . ' <sup>(' . t('Default') . ')</sup>', + 2 => t('Create new links next to parent menu item links and use them as buttons.'), + ), + ); $form['sf-plugins']['sf-supersubs'] = array( '#type' => 'fieldset', '#title' => t('Supersubs'), - '#description' => t('<strong>Supersubs</strong> makes it possible to define custom widths for your menus.'), + '#description' => t('<strong>Supersubs</strong> makes it possible to define custom widths for your menus.') . ((!file_exists(superfish_get_path('superfish') . '/supersubs.js')) ? '<br /><strong>' . t('Important') . ':</strong> ' . t('Cannot find the required JavaScript file, please upload supersubs.js to the /libraries/superfish directory.') : ''), '#collapsible' => TRUE, '#collapsed' => FALSE, ); @@ -427,21 +534,24 @@ function superfish_block_configure($delta = 0) { '#title' => t('Enable Supersubs for this menu.'), '#default_value' => variable_get('superfish_supersubs_' . $delta, 1), ); + $form['sf-plugins']['sf-supersubs']['superfish_supersubs_emm_' . $delta] = array( + '#type' => 'checkbox', + '#title' => t('Do not use Supersubs for multi-column sub-menus.'), + '#default_value' => variable_get('superfish_supersubs_emm_' . $delta, 0), + ); $form['sf-plugins']['sf-supersubs']['superfish_minwidth_' . $delta] = array( '#type' => 'textfield', '#title' => t('Minimum width'), '#description' => t('Minimum width for sub-menus, in <strong>em</strong> units.') . ' <em>(' . t('Default') . ': 12)</em>', - '#default_value' => variable_get('superfish_minwidth_' . $delta, '12'), - '#size' => 20, - '#required' => TRUE, + '#default_value' => variable_get('superfish_minwidth_' . $delta, 12), + '#size' => 10, ); $form['sf-plugins']['sf-supersubs']['superfish_maxwidth_' . $delta] = array( '#type' => 'textfield', '#title' => t('Maximum width'), '#description' => t('Maximum width for sub-menus, in <strong>em</strong> units.') . ' <em>(' . t('Default') . ': 27)</em>', - '#default_value' => variable_get('superfish_maxwidth_' . $delta, '27'), - '#size' => 20, - '#required' => TRUE, + '#default_value' => variable_get('superfish_maxwidth_' . $delta, 27), + '#size' => 10, ); $form['sf-megamenu'] = array( '#type' => 'fieldset', @@ -507,7 +617,7 @@ function superfish_block_configure($delta = 0) { $form['sf-advanced-html']['sf-hyperlinks']['sf-hyperlinktexts']['superfish_hldmenus_' . $delta] = array( '#type' => 'textfield', '#title' => t('Limit to below menu items'), - '#description' => t('Enter menu item ID\'s. Leave empty to include all menus. (Comma separated)') . ' <em>(' . t('Default') . ': ' . t('empty') . ')</em><br />' . t('Example') . ': 5,10,20', + '#description' => t("Enter menu item ID's. Leave empty to include all menus. (Comma separated)") . ' <em>(' . t('Default') . ': ' . t('empty') . ')</em><br />' . t('Example') . ': 5,10,20', '#default_value' => variable_get('superfish_hldmenus_' . $delta, ''), '#size' => 50, ); @@ -521,6 +631,7 @@ function superfish_block_configure($delta = 0) { $form['sf-advanced-html']['sf-html-wrappers'] = array( '#type' => 'fieldset', '#title' => t('HTML wrappers'), + '#description' => t('Please consider using CSS pseudo-elements :before & :after before using the features below as improper use of them may break your drop down menu.'), '#collapsible' => TRUE, '#collapsed' => FALSE, ); @@ -534,7 +645,7 @@ function superfish_block_configure($delta = 0) { ); $form['sf-advanced-html']['sf-html-wrappers']['superfish_wrapul_' . $delta] = array( '#type' => 'textfield', - '#title' => t('Around the <UL> content'), + '#title' => t('Around the <LI> content'), '#description' => t('Insert extra codes <strong>before</strong> and\or <strong>after</strong> the ULs. (Comma separated).') . ' <em>(' . t('Default') . ': ' . t('empty') . ')</em><br />' . t('Examples') . ': <ul><li><h3>Discover the universe!</h3>,</li><li><h3>Hello there!</h3>,<div style="clear:both"></div></li><li>,<div style="clear:both"></div></li></ul>', '#default_value' => variable_get('superfish_wrapul_' . $delta, ''), '#size' => 100, @@ -669,14 +780,21 @@ function superfish_block_save($delta = 0, $edit = array()) { variable_set('superfish_expanded_' . $delta, $edit['superfish_expanded_' . $delta]); variable_set('superfish_bgf_' . $delta, $edit['superfish_bgf_' . $delta]); variable_set('superfish_spp_' . $delta, $edit['superfish_spp_' . $delta]); + variable_set('superfish_aria_' . $delta, $edit['superfish_aria_' . $delta]); variable_set('superfish_hid_' . $delta, $edit['superfish_hid_' . $delta]); + variable_set('superfish_amw_' . $delta, $edit['superfish_amw_' . $delta]); variable_set('superfish_touch_' . $delta, $edit['superfish_touch_' . $delta]); + variable_set('superfish_touchbh_' . $delta, $edit['superfish_touchbh_' . $delta]); + variable_set('superfish_touchdh_' . $delta, $edit['superfish_touchdh_' . $delta]); variable_set('superfish_touchbp_' . $delta, $edit['superfish_touchbp_' . $delta]); + variable_set('superfish_touchbpu_' . $delta, $edit['superfish_touchbpu_' . $delta]); variable_set('superfish_touchua_' . $delta, $edit['superfish_touchua_' . $delta]); variable_set('superfish_touchual_' . $delta, $edit['superfish_touchual_' . $delta]); variable_set('superfish_touchuam_' . $delta, $edit['superfish_touchuam_' . $delta]); variable_set('superfish_small_' . $delta, $edit['superfish_small_' . $delta]); + variable_set('superfish_smallact_' . $delta, $edit['superfish_smallact_' . $delta]); variable_set('superfish_smallbp_' . $delta, $edit['superfish_smallbp_' . $delta]); + variable_set('superfish_smallbpu_' . $delta, $edit['superfish_smallbpu_' . $delta]); variable_set('superfish_smallua_' . $delta, $edit['superfish_smallua_' . $delta]); variable_set('superfish_smallual_' . $delta, $edit['superfish_smallual_' . $delta]); variable_set('superfish_smalluam_' . $delta, $edit['superfish_smalluam_' . $delta]); @@ -688,7 +806,10 @@ function superfish_block_save($delta = 0, $edit = array()) { variable_set('superfish_smallech_' . $delta, $edit['superfish_smallech_' . $delta]); variable_set('superfish_smallicm_' . $delta, $edit['superfish_smallicm_' . $delta]); variable_set('superfish_smallich_' . $delta, $edit['superfish_smallich_' . $delta]); + variable_set('superfish_smallamt_' . $delta, $edit['superfish_smallamt_' . $delta]); + variable_set('superfish_smallabt_' . $delta, $edit['superfish_smallabt_' . $delta]); variable_set('superfish_supersubs_' . $delta, $edit['superfish_supersubs_' . $delta]); + variable_set('superfish_supersubs_emm_' . $delta, $edit['superfish_supersubs_emm_' . $delta]); variable_set('superfish_minwidth_' . $delta, $edit['superfish_minwidth_' . $delta]); variable_set('superfish_maxwidth_' . $delta, $edit['superfish_maxwidth_' . $delta]); variable_set('superfish_multicolumn_' . $delta, $edit['superfish_multicolumn_' . $delta]); @@ -704,6 +825,7 @@ function superfish_block_save($delta = 0, $edit = array()) { variable_set('superfish_itemdepth_' . $delta, $edit['superfish_itemdepth_' . $delta]); variable_set('superfish_use_link_theme_' . $delta, $edit['superfish_use_link_theme_' . $delta]); variable_set('superfish_use_item_theme_' . $delta, $edit['superfish_use_item_theme_' . $delta]); + variable_set('superfish_clone_parent_' . $delta, $edit['superfish_clone_parent_' . $delta]); variable_set('superfish_hhldescription_' . $delta, $edit['superfish_hhldescription_' . $delta]); variable_set('superfish_hldescription_' . $delta, $edit['superfish_hldescription_' . $delta]); variable_set('superfish_hldmenus_' . $delta, $edit['superfish_hldmenus_' . $delta]); @@ -716,19 +838,15 @@ function superfish_block_save($delta = 0, $edit = array()) { variable_set('superfish_liclass_' . $delta, $edit['superfish_liclass_' . $delta]); variable_set('superfish_hlclass_' . $delta, $edit['superfish_hlclass_' . $delta]); variable_set('superfish_pathcss_' . $delta, $edit['superfish_pathcss_' . $delta]); - return; } /** - * Implements hook_block_contents(). + * Implements hook_block_view(). */ -function superfish_contents($delta = 0) { +function superfish_block_view($delta = 0) { global $language; - $block_css = $block_js = array(); - - list($menu_name, $mlid) = explode(':', variable_get('superfish_menu_' . $delta, 'main-menu:0')); + $block_css = $block_js = $sfsettings = $sfoptions = $sfplugins = array(); - $sfsettings = $sfoptions = $sfplugins = array(); $sfsettings['depth'] = variable_get('superfish_depth_' . $delta, '-1'); $sfsettings['type'] = variable_get('superfish_type_' . $delta, 'horizontal'); $sfsettings['style'] = variable_get('superfish_style_' . $delta, 'default'); @@ -740,27 +858,29 @@ function superfish_contents($delta = 0) { $sfsettings['itemcount'] = variable_get('superfish_itemcount_' . $delta, 1); $sfsettings['itemcounter'] = variable_get('superfish_itemcounter_' . $delta, 1); $sfsettings['itemdepth'] = variable_get('superfish_itemdepth' . $delta, 1); - $sfsettings['ulclass'] = variable_get('superfish_ulclass_' . $delta, ''); - $sfsettings['liclass'] = variable_get('superfish_liclass_' . $delta, ''); - $sfsettings['hlclass'] = variable_get('superfish_hlclass_' . $delta, ''); - $sfsettings['wrapmul'] = variable_get('superfish_wrapmul_' . $delta, ''); - $sfsettings['wrapul'] = variable_get('superfish_wrapul_' . $delta, ''); - $sfsettings['wraphl'] = variable_get('superfish_wraphl_' . $delta, ''); - $sfsettings['wraphlt'] = variable_get('superfish_wraphlt_' . $delta, ''); + $sfsettings['ulclass'] = superfish_sanitize(variable_get('superfish_ulclass_' . $delta, ''), 'strict'); + $sfsettings['liclass'] = superfish_sanitize(variable_get('superfish_liclass_' . $delta, ''), 'strict'); + $sfsettings['hlclass'] = superfish_sanitize(variable_get('superfish_hlclass_' . $delta, ''), 'strict'); + $sfsettings['wrapmul'] = superfish_sanitize(variable_get('superfish_wrapmul_' . $delta, '')); + $sfsettings['wrapul'] = superfish_sanitize(variable_get('superfish_wrapul_' . $delta, '')); + $sfsettings['wraphl'] = superfish_sanitize(variable_get('superfish_wraphl_' . $delta, '')); + $sfsettings['wraphlt'] = superfish_sanitize(variable_get('superfish_wraphlt_' . $delta, '')); $sfsettings['use_link_theme'] = variable_get('superfish_use_link_theme_' . $delta, 1); $sfsettings['use_item_theme'] = variable_get('superfish_use_item_theme_' . $delta, 1); + $sfsettings['clone_parent'] = variable_get('superfish_clone_parent_' . $delta, 0); $sfsettings['hidelinkdescription'] = variable_get('superfish_hhldescription_' . $delta, 0); $sfsettings['linkdescription'] = variable_get('superfish_hldescription_' . $delta, 0); $sfsettings['hldmenus'] = variable_get('superfish_hldmenus_' . $delta, ''); - $sfsettings['hldmenus'] = (strpos($sfsettings['hldmenus'], ',')) ? array_remove_empty(explode(',', $sfsettings['hldmenus'])) : $sfsettings['hldmenus']; + $sfsettings['hldmenus'] = (strpos($sfsettings['hldmenus'], ',')) ? superfish_array_filter(explode(',', $sfsettings['hldmenus'])) : $sfsettings['hldmenus']; $sfsettings['hldexclude'] = variable_get('superfish_hldexclude_' . $delta, ''); - $sfsettings['hldexclude'] = (strpos($sfsettings['hldexclude'], ',')) ? array_remove_empty(explode(',', $sfsettings['hldexclude'])) : $sfsettings['hldexclude']; + $sfsettings['hldexclude'] = (strpos($sfsettings['hldexclude'], ',')) ? superfish_array_filter(explode(',', $sfsettings['hldexclude'])) : $sfsettings['hldexclude']; $sfsettings['megamenu'] = variable_get('superfish_multicolumn_' . $delta, 0); $sfsettings['megamenu_depth'] = variable_get('superfish_mcdepth_' . $delta, 1); $sfsettings['megamenu_depth'] = ($sfsettings['type'] == 'navbar' && $sfsettings['megamenu_depth'] == 1) ? 2 : $sfsettings['megamenu_depth']; $sfsettings['megamenu_levels'] = variable_get('superfish_mclevels_' . $delta, 1) + $sfsettings['megamenu_depth']; $sfsettings['megamenu_exclude'] = variable_get('superfish_mcexclude_' . $delta, ''); - $sfsettings['megamenu_exclude'] = (strpos($sfsettings['megamenu_exclude'], ',')) ? array_remove_empty(explode(',', $sfsettings['megamenu_exclude'])) : $sfsettings['megamenu_exclude']; + $sfsettings['megamenu_exclude'] = (strpos($sfsettings['megamenu_exclude'], ',')) ? superfish_array_filter(explode(',', $sfsettings['megamenu_exclude'])) : $sfsettings['megamenu_exclude']; + $sfsettings['aria'] = variable_get('superfish_aria_' . $delta, 1); $sfoptions['pathClass'] = ($sfsettings['type'] == 'navbar') ? variable_get('superfish_pathclass_' . $delta, 'active-trail') : ''; $sfoptions['pathLevels'] = (variable_get('superfish_pathlevels_' . $delta, 1) != 1) ? variable_get('superfish_pathlevels_' . $delta, 1) : ''; @@ -772,14 +892,16 @@ function superfish_contents($delta = 0) { switch ($slide[1]) { case 'vertical': $sfoptions['animation']['height'] = array('show', $slide[0]); - break; + break; + case 'horizontal': $sfoptions['animation']['width'] = array('show', $slide[0]); - break; + break; + case 'diagonal': $sfoptions['animation']['height'] = array('show', $slide[0]); $sfoptions['animation']['width'] = array('show', $slide[0]); - break; + break; } $block_js = array_merge($block_js, superfish_library('javascript', 'easing', 'add')); } @@ -787,75 +909,99 @@ function superfish_contents($delta = 0) { switch ($slide) { case 'vertical': $sfoptions['animation']['height'] = 'show'; - break; + break; + case 'horizontal': $sfoptions['animation']['width'] = 'show'; - break; + break; + case 'diagonal': $sfoptions['animation']['height'] = 'show'; $sfoptions['animation']['width'] = 'show'; - break; + break; } } $speed = variable_get('superfish_speed_' . $delta, 'fast'); - $sfoptions['speed'] = ((is_numeric($speed)) ? (int)$speed : (($speed == ('slow' || 'normal' || 'fast')) ? '\'' . $speed . '\'': '')); - $sfoptions['autoArrows'] = (variable_get('superfish_arrow_' . $delta, 1) == 1) ? TRUE : FALSE; - $sfoptions['dropShadows'] = (variable_get('superfish_shadow_' . $delta, 1) == 1) ? TRUE : FALSE; + if ($speed != 'normal') { + $sfoptions['speed'] = ((is_numeric($speed)) ? (int) $speed : (($speed == ('slow' || 'normal' || 'fast')) ? $speed : '')); + } + $sfoptions['autoArrows'] = (variable_get('superfish_arrow_' . $delta, 1) == 0) ? FALSE : ''; + $sfoptions['dropShadows'] = (variable_get('superfish_shadow_' . $delta, 1) == 0) ? FALSE : ''; + if (variable_get('superfish_hid_' . $delta, 1) == 1 && superfish_library('javascript', 'jquery.hoverIntent.minified.js', 'check')) { - $sfoptions['disableHI'] = FALSE; $block_js = array_merge($block_js, superfish_library('javascript', 'hoverIntent', 'add')); } else { - $sfoptions['disableHI'] = FALSE; + $sfoptions['disableHI'] = TRUE; + } + $sfoptions = superfish_array_filter($sfoptions); + + if (variable_get('superfish_amw_' . $delta, 0) == 1 && superfish_library('javascript', 'sfautomaticwidth.js', 'check')) { + $sfplugins['automaticwidth'] = TRUE; + $block_js = array_merge($block_js, superfish_library('javascript', 'sfautomaticwidth', 'add')); } - $sfoptions = array_remove_empty($sfoptions); $touchscreen = variable_get('superfish_touch_' . $delta, 0); if ($touchscreen > 0 && superfish_library('javascript', 'sftouchscreen.js', 'check')) { $block_js = array_merge($block_js, superfish_library('javascript', 'sftouchscreen', 'add')); + $behaviour = variable_get('superfish_touchbh_' . $delta, 2); + $sfplugins['touchscreen']['behaviour'] = ($behaviour != 2) ? $behaviour : ''; + if (variable_get('superfish_touchdh_' . $delta, 0)) { + $sfplugins['touchscreen']['disableHover'] = TRUE; + } switch ($touchscreen) { - case 1 : + case 1: $sfplugins['touchscreen']['mode'] = 'always_active'; - break; - case 2 : + break; + + case 2: $sfplugins['touchscreen']['mode'] = 'window_width'; $tsbp = variable_get('superfish_touchbp_' . $delta, 768); - $sfplugins['touchscreen']['breakpoint'] = ($tsbp != 768) ? (int)$tsbp : ''; - break; - case 3 : + $sfplugins['touchscreen']['breakpoint'] = ($tsbp != 768) ? (int) $tsbp : ''; + $tsbpu = variable_get('superfish_touchbpu_' . $delta, 'px'); + $sfplugins['touchscreen']['breakpointUnit'] = $tsbpu; + break; + + case 3: // Which method to use for UA detection. $tsuam = variable_get('superfish_touchuam_' . $delta, 0); $tsua = variable_get('superfish_touchua_' . $delta, 0); switch ($tsuam) { // Client-side. - case 0 : + case 0: switch ($tsua) { - case 0 : + case 0: $sfplugins['touchscreen']['mode'] = 'useragent_predefined'; - break; - case 1 : + break; + + case 1: $sfplugins['touchscreen']['mode'] = 'useragent_custom'; $tsual = drupal_strtolower(variable_get('superfish_touchual_' . $delta, '')); if (strpos($tsual, '*')) { $tsual = str_replace('*', '|', $tsual); } $sfplugins['touchscreen']['useragent'] = $tsual; - break; + break; } - break; + break; + // Server-side. - case 1 : + case 1: if (isset($_SERVER['HTTP_USER_AGENT'])) { $hua = drupal_strtolower($_SERVER['HTTP_USER_AGENT']); switch ($tsua) { // Use the pre-defined list of mobile UA strings. - case 0 : - if (preg_match('/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i', $hua)) { + case 0: + if (preg_match('/(android|bb\d+|meego)|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i', $hua)) { $sfplugins['touchscreen']['mode'] = 'always_active'; + if ($behaviour == 2) { + $sfsettings['clone_parent'] = 1; + } } - break; + break; + // Use the custom list of UA strings. - case 1 : + case 1: $tsual = drupal_strtolower(variable_get('superfish_touchual_' . $delta, '')); $tsuac = array(); if (strpos($tsual, '*')) { @@ -869,13 +1015,26 @@ function superfish_contents($delta = 0) { } if (in_array(1, $tsuac)) { $sfplugins['touchscreen']['mode'] = 'always_active'; + if ($behaviour == 2) { + $sfsettings['clone_parent'] = 1; + } } - break; + break; + } } - break; + break; + } - break; + break; + } + } + + // Unset hoverIntent if sfTouchscreen settings make it ineffective. + if (isset($sfplugins['touchscreen']['disableHover']) && $sfplugins['touchscreen']['disableHover'] === TRUE && $sfplugins['touchscreen']['mode'] == 'always_active') { + $hid = array_keys(superfish_library('javascript', 'hoverIntent', 'add')); + if (isset($block_js[$hid[0]])) { + unset($block_js[$hid[0]]); } } @@ -883,49 +1042,55 @@ function superfish_contents($delta = 0) { if ($smallscreen > 0 && superfish_library('javascript', 'sfsmallscreen.js', 'check') == 1) { $block_js = array_merge($block_js, superfish_library('javascript', 'sfsmallscreen', 'add')); switch ($smallscreen) { - case 1 : + case 1: $sfplugins['smallscreen']['mode'] = 'always_active'; - break; - case 2 : + break; + + case 2: $sfplugins['smallscreen']['mode'] = 'window_width'; $ssbp = variable_get('superfish_smallbp_' . $delta, 768); - $sfplugins['smallscreen']['breakpoint'] = ($ssbp != 768) ? (int)$ssbp : ''; - break; - case 3 : + $sfplugins['smallscreen']['breakpoint'] = ($ssbp != 768) ? (int) $ssbp : ''; + $ssbpu = variable_get('superfish_smallbpu_' . $delta, 'px'); + $sfplugins['smallscreen']['breakpointUnit'] = $ssbpu; + break; + + case 3: // Which method to use for UA detection. $ssuam = variable_get('superfish_smalluam_' . $delta, 0); $ssua = variable_get('superfish_smallua_' . $delta, 0); switch ($ssuam) { // Client-side. - case 0 : + case 0: switch ($ssua) { - case 0 : + case 0: $sfplugins['smallscreen']['mode'] = 'useragent_predefined'; - break; - case 1 : + break; + + case 1: $sfplugins['smallscreen']['mode'] = 'useragent_custom'; $ssual = drupal_strtolower(variable_get('superfish_smallual_' . $delta, '')); if (strpos($ssual, '*')) { $ssual = str_replace('*', '|', $ssual); } $sfplugins['smallscreen']['useragent'] = $ssual; - break; + break; } + break; - break; // Server-side. - case 1 : + case 1: if (isset($_SERVER['HTTP_USER_AGENT'])) { $hua = drupal_strtolower($_SERVER['HTTP_USER_AGENT']); switch ($ssua) { // Use the pre-defined list of mobile UA strings. - case 0 : - if (preg_match('/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i', $hua)) { + case 0: + if (preg_match('/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge|maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i', $hua)) { $sfplugins['smallscreen']['mode'] = 'always_active'; } - break; + break; + // Use the custom list of UA strings. - case 1 : + case 1: $ssual = drupal_strtolower(variable_get('superfish_smallual_' . $delta, '')); $ssuac = array(); if (strpos($ssual, '*')) { @@ -940,34 +1105,44 @@ function superfish_contents($delta = 0) { if (in_array(1, $ssuac)) { $sfplugins['smallscreen']['mode'] = 'always_active'; } - break; + break; } } - break; + break; + } - break; - } - $addselected = variable_get('superfish_smallasa_' . $delta, 0); - $menuclasses = variable_get('superfish_smallcmc_' . $delta, 0); - $hyperlinkclasses = variable_get('superfish_smallchc_' . $delta, 0); - $excludeclass_menu = variable_get('superfish_smallecm_' . $delta, ''); - $excludeclass_hyperlink = variable_get('superfish_smallech_' . $delta, ''); - $includeclass_menu = variable_get('superfish_smallicm_' . $delta, ''); - $includeclass_hyperlink = variable_get('superfish_smallich_' . $delta, ''); - $sfplugins['smallscreen']['addSelected'] = ($addselected == 1) ? TRUE : FALSE; - $sfplugins['smallscreen']['menuClasses'] = ($menuclasses == 1) ? TRUE : FALSE; - $sfplugins['smallscreen']['hyperlinkClasses'] = ($hyperlinkclasses == 1) ? TRUE : FALSE; - if ($menuclasses == 1 && !empty($excludeclass_menu)) { - $sfplugins['smallscreen']['excludeClass_menu'] = $excludeclass_menu; - } - if ($hyperlinkclasses == 1 && !empty($excludeclass_hyperlink)) { - $sfplugins['smallscreen']['excludeClass_hyperlink'] = $excludeclass_hyperlink; + break; } - if (!empty($includeclass_menu)) { - $sfplugins['smallscreen']['includeClass_menu'] = $includeclass_menu; - } - if (!empty($includeclass_hyperlink)) { - $sfplugins['smallscreen']['includeClass_hyperlink'] = $includeclass_hyperlink; + $type = variable_get('superfish_smallact_' . $delta, 1); + switch ($type) { + case 0: + $asa = variable_get('superfish_smallasa_' . $delta, 0); + $cmc = variable_get('superfish_smallcmc_' . $delta, 0); + $chc = variable_get('superfish_smallchc_' . $delta, 0); + $ecm = variable_get('superfish_smallecm_' . $delta, ''); + $ech = variable_get('superfish_smallech_' . $delta, ''); + $icm = variable_get('superfish_smallicm_' . $delta, ''); + $ich = variable_get('superfish_smallich_' . $delta, ''); + + $sfplugins['smallscreen']['type'] = 'select'; + $sfplugins['smallscreen']['addSelected'] = ($asa == 1) ? TRUE : ''; + $sfplugins['smallscreen']['menuClasses'] = ($cmc == 1) ? TRUE : ''; + $sfplugins['smallscreen']['hyperlinkClasses'] = ($chc == 1) ? TRUE : ''; + $sfplugins['smallscreen']['excludeClass_menu'] = ($cmc == 1 && !empty($ecm)) ? $ecm : ''; + $sfplugins['smallscreen']['excludeClass_hyperlink'] = ($chc == 1 && !empty($ech)) ? $ech : ''; + $sfplugins['smallscreen']['includeClass_menu'] = (!empty($icm)) ? $icm : ''; + $sfplugins['smallscreen']['includeClass_hyperlink'] = (!empty($ich)) ? $ich : ''; + break; + + case 1: + if (superfish_library('CSS', 'smallscreen', 'check')) { + $block_css = array_merge($block_css, superfish_library('CSS', 'smallscreen', 'add')); + } + $ab = variable_get('superfish_smallabt_' . $delta, 1); + $sfplugins['smallscreen']['accordionButton'] = ($ab != 1) ? $ab : ''; + $sfplugins['smallscreen']['expandText'] = (t('Expand') != 'Expand') ? t('Expand') : ''; + $sfplugins['smallscreen']['collapseText'] = (t('Collapse') != 'Collapse') ? t('Collapse') : ''; + break; } } @@ -975,52 +1150,79 @@ function superfish_contents($delta = 0) { $sfplugins['supposition'] = TRUE; $block_js = array_merge($block_js, superfish_library('javascript', 'supposition', 'add')); } + + if (variable_get('superfish_aria_' . $delta, 1) == 1 && superfish_library('javascript', 'aria.js', 'check')) { + $sfplugins['aria'] = TRUE; + $block_js = array_merge($block_js, superfish_library('javascript', 'aria', 'add')); + } else { - $sfplugins['supposition'] = FALSE; + $sfplugins['aria'] = FALSE; } if (variable_get('superfish_bgf_' . $delta, 0) == 1 && superfish_library('javascript', 'jquery.bgiframe.min.js', 'check')) { $sfplugins['bgiframe'] = TRUE; $block_js = array_merge($block_js, superfish_library('javascript', 'bgiframe', 'add')); } - else { - $sfplugins['bgiframe'] = FALSE; - } if (variable_get('superfish_supersubs_' . $delta, 1) == 1 && superfish_library('javascript', 'supersubs.js', 'check')) { - $sfplugins['supersubs']['minWidth'] = variable_get('superfish_minwidth_' . $delta, '12'); - $sfplugins['supersubs']['maxWidth'] = variable_get('superfish_maxwidth_' . $delta, '27'); - $sfplugins['supersubs']['extraWidth'] = 1; $block_js = array_merge($block_js, superfish_library('javascript', 'supersubs', 'add')); + $emm = variable_get('superfish_supersubs_emm_' . $delta, 0); + $minwidth = variable_get('superfish_minwidth_' . $delta, 12); + $maxwidth = variable_get('superfish_maxwidth_' . $delta, 27); + $sfplugins['supersubs']['megamenu'] = ($emm) ? FALSE : ''; + $sfplugins['supersubs']['minWidth'] = ($minwidth != 12) ? $minwidth : ''; + $sfplugins['supersubs']['maxWidth'] = ($maxwidth != 27) ? $maxwidth : ''; + if (empty($sfplugins['supersubs']['minWidth']) && empty($sfplugins['supersubs']['maxWidth']) && $sfplugins['supersubs']['megamenu'] !== FALSE) { + $sfplugins['supersubs'] = TRUE; + } } + $menu_name = variable_get('superfish_menu_' . $delta, 'primary-links:0'); + // Integration with the Domain Access module. + $main = variable_get('menu_main_links_source'); + $secondary = variable_get('menu_secondary_links_source'); + if ($main || $secondary) { + if (strpos($menu_name, 'domainaccessmenu1st') !== FALSE) { + $menu_name = $main . ':0'; + } + elseif (strpos($menu_name, 'domainaccessmenu2nd') !== FALSE) { + $menu_name = $secondary . ':0'; + } + } + $menu_name = str_replace(array('domainaccessmenu1st-', 'domainaccessmenu2nd-'), '', $menu_name); + + list($menu_name, $mlid) = explode(':', $menu_name); + $vars = array( 'id' => $delta, 'menu_name' => $menu_name, 'mlid' => $mlid, - 'sfsettings' => $sfsettings + 'sfsettings' => $sfsettings, ); - if ($output = theme('superfish', $vars)) { - if (!empty($output['content'])) { - $output['content'] = array( + if ($block = theme('superfish', $vars)) { + if (!empty($block['content'])) { + $block['content'] = array( '#type' => 'markup', - '#markup' => filter_xss($output['content'], $allowed_tags = array('a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'command', 'datalist', 'dd', 'del', 'details', 'dfn', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hgroup', 'hr', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'map', 'mark', 'meter', 'nav', 'noframes', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'ul', 'var', 'video', 'wbr')), + '#markup' => $block['content'], '#contextual_links' => array( 'superfish' => array('admin/structure/menu/manage', array($menu_name)), - ) + ), ); - // Creating a title for the <select> title. + // Creating a title for the small-screen menu. if ($smallscreen > 0 && superfish_library('javascript', 'sfsmallscreen.js', 'check')) { - $smallset = variable_get('superfish_smallset_' . $delta, ''); - if (empty($smallset)) { - $sfplugins['smallscreen']['title'] = $output['subject']; - } - else { - $sfplugins['smallscreen']['title'] = $smallset; + switch ($type) { + case 0: + $title = variable_get('superfish_smallset_' . $delta, ''); + break; + + case 1: + $title = variable_get('superfish_smallamt_' . $delta, ''); + break; } + $sfplugins['smallscreen']['title'] = (empty($title)) ? $block['subject'] : $title; } - $sfplugins = array_remove_empty($sfplugins); + $sfplugins = superfish_array_filter($sfplugins); // Prepare the JavaScript settings. $javascript['superfish'][$delta]['id'] = $delta; @@ -1037,7 +1239,7 @@ function superfish_contents($delta = 0) { } } - // Adding required CSS files + // Adding required CSS files. if (superfish_library('CSS', 'superfish', 'check')) { $block_css = array_merge($block_css, superfish_library('CSS', 'superfish', 'add')); } @@ -1045,7 +1247,7 @@ function superfish_contents($delta = 0) { $block_css = array_merge($block_css, superfish_library('CSS', $sfsettings['type'], 'add')); } if ($sfsettings['style'] != 'none' && superfish_styles('path', $sfsettings['style']) != '') { - $block_css = array_merge($block_css, array(superfish_styles('path', $sfsettings['style']) => array('type' => 'file', 'weight' => 500))); + $block_css = array_merge($block_css, superfish_styles('path', $sfsettings['style'])); } $extracss = variable_get('superfish_pathcss_' . $delta, ''); if ($extracss) { @@ -1059,20 +1261,12 @@ function superfish_contents($delta = 0) { $block_css = array_merge($block_css, array($extracss => array('type' => 'file', 'weight' => 510))); } } - $output['content']['#attached'] = array( + $block['content']['#attached'] = array( 'css' => $block_css, 'js' => $block_js, ); } } - return $output; -} - -/** - * Implements hook_block_view(). - */ -function superfish_block_view($delta = 0) { - $block = superfish_contents($delta); return $block; } @@ -1089,6 +1283,7 @@ function superfish_form_block_admin_configure_alter(&$form, $form_state) { function superfish_block_validate($form, &$form_state) { if ($form_state['values']['module'] == 'superfish') { $supersubs_error = FALSE; + $allowed_speed = array('slow', 'normal', 'fast'); $delta = $form_state['values']['delta']; $style = $form_state['values']['superfish_style_' . $delta]; $speed = $form_state['values']['superfish_speed_' . $delta]; @@ -1112,7 +1307,7 @@ function superfish_block_validate($form, &$form_state) { if ($style != 'none' && superfish_styles('path', $style) == '') { form_set_error('superfish_style_' . $delta, t('Cannot find the CSS file of the selected style.')); } - elseif (!is_numeric($speed) && !in_array($speed, array('slow', 'normal', 'fast'))) { + elseif (!is_numeric($speed) && !in_array($speed, $allowed_speed)) { form_set_error('superfish_speed_' . $delta, t('<strong>Animation speed</strong>: unacceptable value entered.')); } if (!is_numeric($delay)) { @@ -1162,7 +1357,7 @@ function superfish_block_validate($form, &$form_state) { if (!empty($extracss)) { if (strpos($extracss, ',')) { $error = array(); - $extracss = array_remove_empty(explode(',', $extracss)); + $extracss = superfish_array_filter(explode(',', $extracss)); foreach ($extracss as $c) { if (!file_exists($c)) { $error[] = $c; @@ -1180,18 +1375,30 @@ function superfish_block_validate($form, &$form_state) { } /** - * Get a list of CSS files that can be used for styles. + * Helper function to get library paths. */ -function superfish_styles($display = 'list', $style = NULL) { - $output = ''; - // Ensure the Libraries API module is installed and working. +function superfish_get_path($library = 'superfish') { + $directory = ''; + // Ensure the Libraries API module is installed. if (module_exists('libraries') && function_exists('libraries_get_path')) { - $directory = libraries_get_path('superfish') . '/style'; + $directory = libraries_get_path($library); } // Otherwise use the default directory. - else { - $directory = 'sites/all/libraries/superfish/style'; + elseif (file_exists('profiles/' . drupal_get_profile() . '/libraries/' . $library)) { + $directory = 'profiles/' . drupal_get_profile() . '/libraries/' . $library; + } + if (empty($directory)) { + $directory = 'sites/all/libraries/' . $library; } + return $directory; +} + +/** + * Get a list of CSS files that can be used for styles. + */ +function superfish_styles($display = 'list', $style = NULL) { + $output = ''; + $directory = superfish_get_path('superfish') . '/style'; $files = (file_exists($directory)) ? file_scan_directory($directory, '/.*\.css$/', array('key' => 'name')) : ''; if ($display == 'list') { $output = array('none' => '- ' . t('None') . ' -'); @@ -1204,10 +1411,10 @@ function superfish_styles($display = 'list', $style = NULL) { } if ($display == 'path' && $style) { if (isset($files[$style])) { - $output = $files[$style]->uri; + $output = array($files[$style]->uri => array('type' => 'file', 'weight' => 500)); } else { - watchdog('page not found', 'Required files for the Superfish \'%style\' style cannot be found.', array('%style' => $style), WATCHDOG_WARNING); + watchdog('page not found', 'Cannot find the required files for the Superfish \'%style\' style.', array('%style' => $style), WATCHDOG_WARNING); $output = ''; } } @@ -1223,15 +1430,8 @@ function superfish_effects() { 'vertical' => t('Vertical'), 'horizontal' => t('Horizontal'), 'diagonal' => t('Diagonal')); - // Ensure the Libraries API module is installed and working. - if (module_exists('libraries') && function_exists('libraries_get_path') && libraries_get_path('easing') != '') { - $file = libraries_get_path('easing') . '/jquery.easing.js'; - } - // Otherwise look for the file in the default location. - else { - $file = 'sites/all/libraries/easing/jquery.easing.js'; - } - if (file_exists($file)) { + + if (file_exists(superfish_get_path('easing') . '/jquery.easing.js')) { $easing_types = array( 'easeInSine_vertical' => 'easeInSine (' . t('Vertical') . ')', 'easeInSine_horizontal' => 'easeInSine (' . t('Horizontal') . ')', @@ -1326,25 +1526,18 @@ function superfish_effects() { * Add require JavaScript and CSS files from the Superfish library. */ function superfish_library($type = NULL, $name = NULL, $action = 'add') { - // Ensure the Libraries API module is installed and working and is able to find the library. - if (module_exists('libraries') && function_exists('libraries_get_path') && libraries_get_path('superfish') != '') { - $directory = libraries_get_path('superfish'); - $directory_easing = libraries_get_path('easing'); - } - // Otherwise use the default directory. - else { - $directory = 'sites/all/libraries/superfish'; - $directory_easing = 'sites/all/libraries/easing'; - } - $slp_default = $directory . "/jquery.hoverIntent.minified.js\n" . + $directory = superfish_get_path('superfish'); + $directory_easing = superfish_get_path('easing'); + $sf_library = $directory . "/jquery.hoverIntent.minified.js\n" . $directory . "/jquery.bgiframe.min.js\n" . $directory . "/superfish.js\n" . $directory . "/supersubs.js\n" . $directory . "/supposition.js\n" . + $directory . "/aria.js\n" . $directory . "/sftouchscreen.js\n" . - $directory . "/sfsmallscreen.js"; + $directory . "/sfsmallscreen.js\n" . + $directory . "/sfautomaticwidth.js"; - $sf_library = variable_get('superfish_slp', $slp_default); $sf_library = preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", trim($sf_library)); $sf_library = explode("\n", $sf_library); @@ -1355,25 +1548,32 @@ function superfish_library($type = NULL, $name = NULL, $action = 'add') { case 'drupal_behavior': $name = 'superfish.js'; $sf_library = array(drupal_get_path('module', 'superfish') . '/' . $name); - break; + break; + case 'jquery.easing.js': $name = 'jquery.easing.js'; $sf_library = array($directory_easing . '/' . $name); - break; + break; } + $in_library = FALSE; foreach ($sf_library as $s) { if (strpos($s, $name) !== FALSE) { + $in_library = TRUE; if (file_exists($s)) { return TRUE; } else { - $file = $directory . (($type == 'CSS') ? '/css' : '') . '/' . $name; - watchdog('page not found', '%file', array('%file' => $file), WATCHDOG_ERROR); + watchdog('page not found', '%file', array('%file' => $directory . '/' . $name), WATCHDOG_ERROR); return FALSE; } } } - break; + if (!$in_library) { + watchdog('page not found', '%path missing from Superfish library configuration, please add it immediately.', array('%path' => $directory . '/' . $name), WATCHDOG_WARNING, l(t('Superfish library configuration'), 'admin/config/user-interface/superfish')); + return FALSE; + } + break; + case 'CSS': $directory .= '/css'; switch ($name) { @@ -1386,9 +1586,11 @@ function superfish_library($type = NULL, $name = NULL, $action = 'add') { watchdog('page not found', '%directory/superfish.css', array('%directory' => $directory), WATCHDOG_WARNING); return FALSE; } - break; + break; + case 'navbar': case 'vertical': + case 'smallscreen': if (file_exists($directory . '/superfish-' . $name . '.css')) { return TRUE; } @@ -1396,9 +1598,9 @@ function superfish_library($type = NULL, $name = NULL, $action = 'add') { watchdog('page not found', '%directory/superfish-%name.css', array('%directory' => $directory, '%name' => $name), WATCHDOG_WARNING); return FALSE; } - break; + break; } - break; + break; } } if ($action == 'add') { @@ -1408,11 +1610,14 @@ function superfish_library($type = NULL, $name = NULL, $action = 'add') { case 'easing': $output = array($directory_easing . '/jquery.easing.js' => array('type' => 'file', 'weight' => 490)); return $output; - break; + case 'drupal_behavior': - $output = array(drupal_get_path('module', 'superfish') . '/superfish.js' => array('type' => 'file', 'weight' => 495)); + $output = array( + drupal_get_path('module', 'superfish') . '/superfish.js' => + array('type' => 'file', 'weight' => 495), + ); return $output; - break; + default: if (file_exists($directory . '/superfish.js')) { foreach ($sf_library as $s) { @@ -1420,13 +1625,14 @@ function superfish_library($type = NULL, $name = NULL, $action = 'add') { switch ($name) { case 'superfish': $weight = 480; - break; + break; + case 'supersubs': $weight = 490; - break; + break; + default: $weight = 470; - break; } $output = array($s => array('type' => 'file', 'weight' => $weight)); return $output; @@ -1440,9 +1646,9 @@ function superfish_library($type = NULL, $name = NULL, $action = 'add') { else { watchdog('page not found', '%directory/superfish.js', array('%directory' => $directory), WATCHDOG_ERROR); } - break; } - break; + break; + case 'CSS': $directory .= '/css'; switch ($name) { @@ -1450,25 +1656,56 @@ function superfish_library($type = NULL, $name = NULL, $action = 'add') { case 'horizontal': $output = array($directory . '/superfish.css' => array('type' => 'file', 'weight' => 480)); return $output; - break; + case 'navbar': case 'vertical': + case 'smallscreen': $output = array($directory . '/superfish-' . $name . '.css' => array('type' => 'file', 'weight' => 490)); return $output; - break; + } - break; + break; } } } +/** + * Sanitization function. + * + * @param string The input. + * @param mode Sanitization type. + * + * @return string + */ +function superfish_sanitize($string, $type = '') { + if ($type == 'strict') { + $allowed_tags = array(); + } else { + $allowed_tags = array( + 'a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', + 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'br', 'button', 'canvas', + 'caption', 'cite', 'code', 'col', 'colgroup', 'command', 'datalist', + 'dd', 'del', 'details', 'dfn', 'div', 'dl', 'dt', 'em', 'embed', + 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', + 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hgroup', + 'hr', 'i', 'iframe', 'img', 'ins', 'kbd', 'keygen', 'label', + 'legend', 'li', 'map', 'mark', 'meter', 'nav', 'noframes', 'noscript', + 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'pre', + 'progress', 'q', 'rp', 'rt', 'ruby', 'samp', 'section', + 'select', 'small', 'source', 'span', 'strong', 'sub', 'summary', + 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', + 'time', 'tr', 'track', 'tt', 'ul', 'var', 'video', 'wbr'); + } + return filter_xss($string, $allowed_tags); +} + /** * Helper function to clean up arrays. */ -function array_remove_empty($haystack) { +function superfish_array_filter($haystack) { foreach ($haystack as $key => $value) { if (is_array($value)) { - $haystack[$key] = array_remove_empty($haystack[$key]); + $haystack[$key] = superfish_array_filter($haystack[$key]); } elseif (empty($value) && is_bool($value) !== TRUE) { if ($haystack[$key] != '0') { @@ -1489,7 +1726,7 @@ function superfish_theme() { 'id' => NULL, 'menu_name' => NULL, 'mlid' => NULL, - 'sfsettings' => NULL + 'sfsettings' => NULL, ), ), 'superfish_build' => array( @@ -1498,7 +1735,8 @@ function superfish_theme() { 'menu' => NULL, 'depth' => -1, 'trail' => NULL, - 'sfsettings' => NULL + 'clone_parent' => NULL, + 'sfsettings' => NULL, ), ), 'superfish_menu_item' => array( @@ -1586,7 +1824,8 @@ function theme_superfish($variables) { 'menu' => $menu, 'depth' => $depth, 'trail' => superfish_build_page_trail(menu_tree_page_data($menu_name)), - 'sfsettings' => $sfsettings + 'clone_parent' => FALSE, + 'sfsettings' => $sfsettings, ); if ($menu_tree = theme('superfish_build', $var)) { if ($menu_tree['content']) { @@ -1601,15 +1840,24 @@ function theme_superfish($variables) { else { $wmul = array(); } + $classes = 'menu sf-menu sf-' . $menu_name . ' sf-' . $sfsettings['type'] . ' sf-style-' . $sfsettings['style']; + $classes .= ($sfsettings['itemcounter']) ? ' sf-total-items-' . $menu_tree['total_children'] : ''; + $classes .= ($sfsettings['itemcounter']) ? ' sf-parent-items-' . $menu_tree['parent_children'] : ''; + $classes .= ($sfsettings['itemcounter']) ? ' sf-single-items-' . $menu_tree['single_children'] : ''; + $classes .= ($sfsettings['ulclass']) ? ' ' . trim($sfsettings['ulclass']) : ''; + $classes .= ($language->direction == 1) ? ' rtl' : ''; $output['content'] = isset($wmul[0]) ? $wmul[0] : ''; - $output['content'] .= '<ul id="superfish-' . $id . '"'; - $output['content'] .= ' class="menu sf-menu sf-' . $menu_name . ' sf-' . $sfsettings['type'] . ' sf-style-' . $sfsettings['style']; - $output['content'] .= ($sfsettings['itemcounter']) ? ' sf-total-items-' . $menu_tree['total_children'] : ''; - $output['content'] .= ($sfsettings['itemcounter']) ? ' sf-parent-items-' . $menu_tree['parent_children'] : ''; - $output['content'] .= ($sfsettings['itemcounter']) ? ' sf-single-items-' . $menu_tree['single_children'] : ''; - $output['content'] .= ($sfsettings['ulclass']) ? ' ' . $sfsettings['ulclass'] : ''; - $output['content'] .= ($language->direction == 1) ? ' rtl' : ''; - $output['content'] .= '">' . $menu_tree['content'] . '</ul>'; + + $attributes = array( + 'id' => 'superfish-' . $id, + 'class' => $classes + ); + if ($sfsettings['aria']) { + $attributes['role'] = 'menubar'; + } + $output['content'] .= '<ul ' . drupal_attributes($attributes) . '>'; + $output['content'] .= $menu_tree['content']; + $output['content'] .= '</ul>'; $output['content'] .= isset($wmul[1]) ? $wmul[1] : ''; } } @@ -1626,6 +1874,7 @@ function theme_superfish_build($variables) { $menu = $variables['menu']; $depth = $variables['depth']; $trail = $variables['trail']; + $clone_parent = $variables['clone_parent']; // Keep $sfsettings untouched as we need to pass it to the child menus. $settings = $sfsettings = $variables['sfsettings']; $megamenu = $megamenu_below = $settings['megamenu']; @@ -1639,10 +1888,16 @@ function theme_superfish_build($variables) { } } + // sfTouchscreen. + // Adding cloned parent to the sub-menu. + if ($clone_parent !== FALSE) { + array_unshift($menu, $clone_parent); + } + foreach ($menu as $menu_item) { $show_children = $megamenu_wrapper = $megamenu_column = $megamenu_content = FALSE; - $item_class = $link_options = $link_class = array(); + $item_class = $link_class = array(); $mlid = $menu_item['link']['mlid']; if (!isset($menu_item['link']['hidden']) || $menu_item['link']['hidden'] == 0) { @@ -1656,11 +1911,12 @@ function theme_superfish_build($variables) { $item_class[] = ($settings['itemcount'] == 1) ? 'sf-item-' . $i : ''; $item_class[] = ($settings['itemdepth'] == 1) ? 'sf-depth-' . $menu_item['link']['depth'] : ''; $link_class[] = ($settings['itemdepth'] == 1) ? 'sf-depth-' . $menu_item['link']['depth'] : ''; - $item_class[] = ($settings['liclass']) ? $settings['liclass'] : ''; + $item_class[] = ($settings['liclass']) ? trim($settings['liclass']) : ''; + $item_class[] = ($clone_parent !== FALSE) ? 'sf-clone-parent' : ''; if (strpos($settings['hlclass'], ' ')) { $l = explode(' ', $settings['hlclass']); foreach ($l as $c) { - $link_class[] = $c; + $link_class[] = trim($c); } } else { @@ -1686,7 +1942,7 @@ function theme_superfish_build($variables) { $menu_item['link']['title'] .= ' <span class="sf-description">'; $menu_item['link']['title'] .= (!empty($menu_item['link']['localized_options']['attributes']['title'])) ? $menu_item['link']['localized_options']['attributes']['title'] : array(); $menu_item['link']['title'] .= '</span>'; - $link_options['html'] = TRUE; + $menu_item['link']['localized_options']['html'] = TRUE; } } @@ -1705,7 +1961,7 @@ function theme_superfish_build($variables) { // Add custom HTML codes around the hyperlinks. if ($settings['wraphl'] && strpos($settings['wraphl'], ',') !== FALSE) { $whl = explode(',', $settings['wraphl']); - // The same as above + // The same as above. if (drupal_substr($settings['wraphl'], 0) == ',') { array_unshift($whl, ''); } @@ -1717,19 +1973,19 @@ function theme_superfish_build($variables) { // Add custom HTML codes around the hyperlinks text. if ($settings['wraphlt'] && strpos($settings['wraphlt'], ',') !== FALSE) { $whlt = explode(',', $settings['wraphlt']); - // The same as above + // The same as above. if (drupal_substr($settings['wraphlt'], 0) == ',') { array_unshift($whlt, ''); } - $menu_item['link']['title'] = $whlt[0] . check_plain($menu_item['link']['title']) . $whlt[1]; - $link_options['html'] = TRUE; + $menu_item['link']['title'] = $whlt[0] . $menu_item['link']['title'] . $whlt[1]; + $menu_item['link']['localized_options']['html'] = TRUE; } $expanded = ($sfsettings['expanded'] == 1) ? (($menu_item['link']['expanded'] == 1) ? TRUE : FALSE) : TRUE; if (!empty($menu_item['link']['has_children']) && !empty($menu_item['below']) && $depth != 0 && $expanded === TRUE) { - // Megamenu is still beta, there is a good chance much of this will be changed. + // Megamenu is still beta, there is a good chance this will be changed. if (!empty($settings['megamenu_exclude'])) { if (is_array($settings['megamenu_exclude'])) { $megamenu_below = (in_array($mlid, $settings['megamenu_exclude'])) ? 0 : $megamenu; @@ -1745,13 +2001,32 @@ function theme_superfish_build($variables) { $megamenu_column = ($menu_item['link']['depth'] == $settings['megamenu_depth'] + 1) ? TRUE : FALSE; $megamenu_content = ($menu_item['link']['depth'] >= $settings['megamenu_depth'] && $menu_item['link']['depth'] <= $settings['megamenu_levels']) ? TRUE : FALSE; } + + // sfTouchscreen. + // Preparing the cloned parent links to be added to the sub-menus. + $below_visible = array(); + foreach ($menu_item['below'] as $below) { + if (!isset($below['link']['hidden']) || $below['link']['hidden'] == 0) { + $below_visible[] = 1; + } + } + if ($settings['clone_parent'] == 1 && in_array(1, $below_visible)) { + $clone_parent = $menu_item; + unset($clone_parent['below']); + unset($clone_parent['has_children']); + } + else { + $clone_parent = FALSE; + } + // Render the sub-menu. $var = array( 'id' => $id, 'menu' => $menu_item['below'], 'depth' => $depth, 'trail' => $trail, - 'sfsettings' => $sfsettings + 'clone_parent' => $clone_parent, + 'sfsettings' => $sfsettings, ); $children = theme('superfish_build', $var); // Check to see whether it should be displayed. @@ -1774,15 +2049,16 @@ function theme_superfish_build($variables) { $single_children++; } - $item_class = implode(' ', array_remove_empty($item_class)); + $item_class = trim(implode(' ', superfish_array_filter($item_class))); if (isset($menu_item['link']['localized_options']['attributes']['class'])) { $link_class_current = $menu_item['link']['localized_options']['attributes']['class']; - $link_class = array_merge($link_class_current, array_remove_empty($link_class)); + $link_class = array_merge($link_class_current, superfish_array_filter($link_class)); } - $menu_item['link']['localized_options']['attributes']['class'] = array_remove_empty($link_class); + $menu_item['link']['localized_options']['attributes']['class'] = superfish_array_filter($link_class); - // The Context module uses theme_menu_link, Superfish does not, this is why we have to do this. + // The Context module uses theme_menu_link, + // Superfish does not, this is why we have to do this. if (function_exists('context_active_contexts')) { if ($contexts = context_active_contexts()) { foreach ($contexts as $context) { @@ -1795,8 +2071,6 @@ function theme_superfish_build($variables) { } } - $link_options += $menu_item['link']['localized_options']; - // Render the menu item. // Should a theme be used for menu items? if ($settings['use_item_theme']) { @@ -1808,7 +2082,6 @@ function theme_superfish_build($variables) { ), 'below' => ($show_children) ? $children['content'] : NULL, 'item' => $menu_item, - 'localized_options' => $link_options, ), 'properties' => array( 'megamenu' => array( @@ -1817,25 +2090,48 @@ function theme_superfish_build($variables) { 'megamenu_content' => $megamenu_content, ), 'use_link_theme' => $settings['use_link_theme'], - 'wrapper' => $whl, + 'wrapper' => array( + 'wul' => $wul, + 'whl' => $whl, + ), + ), + 'submenu' => array( + 'attributes' => array(), ), + 'sfsettings' => $sfsettings, ); + + // Set ARIA attributes when enabled. + if ($sfsettings['aria']) { + // Item role and attributes. + $item_variables['element']['attributes']['role'] = 'menuitem'; + if ($show_children) { + $item_variables['element']['attributes']['aria-haspopup'] = 'true'; + $item_variables['element']['attributes']['aria-expanded'] = 'false'; + } + + // Submenu role and attributes. + $item_variables['submenu']['attributes'] = array( + 'role' => 'menu', + 'aria-hidden' => 'true', + ); + } + $output['content'] .= theme('superfish_menu_item', $item_variables); } else { - $output['content'] .= '<li id="menu-' . $mlid . '-' . $id . '"'; - $output['content'] .= ($item_class) ? ' class="' . trim($item_class) . '">' : '>'; + $output['content'] .= '<li' . drupal_attributes(array('id' => 'menu-' . $mlid . '-' . $id, 'class' => $item_class)) . '>'; $output['content'] .= ($megamenu_column) ? '<div class="sf-megamenu-column">' : ''; $output['content'] .= isset($whl[0]) ? $whl[0] : ''; if ($settings['use_link_theme']) { $link_variables = array( 'menu_item' => $menu_item, - 'link_options' => $link_options, + 'link_options' => $menu_item['link']['localized_options'], ); $output['content'] .= theme('superfish_menu_item_link', $link_variables); } else { - $output['content'] .= l($menu_item['link']['title'], $menu_item['link']['href'], $link_options); + $output['content'] .= l($menu_item['link']['title'], $menu_item['link']['href'], $menu_item['link']['localized_options']); } $output['content'] .= isset($whl[1]) ? $whl[1] : ''; $output['content'] .= ($megamenu_wrapper) ? '<ul class="sf-megamenu"><li class="sf-megamenu-wrapper ' . $item_class . '">' : ''; @@ -1858,11 +2154,14 @@ function theme_superfish_build($variables) { /** * Returns HTML for a menu item. * - * @param $variables + * @param array $variables * An associative array containing: * - element: Structured array data for a menu item. * - properties: Various properties of a menu item. * + * @return string + * HTML string + * * @ingroup themeable */ function theme_superfish_menu_item($variables) { @@ -1871,11 +2170,11 @@ function theme_superfish_menu_item($variables) { $sub_menu = ''; if ($element['below']) { - $sub_menu .= isset($variables['wrapper']['wul'][0]) ? $variables['wrapper']['wul'][0] : ''; - $sub_menu .= ($properties['megamenu']['megamenu_content']) ? '<ol>' : '<ul>'; + $sub_menu .= isset($properties['wrapper']['wul'][0]) ? $properties['wrapper']['wul'][0] : ''; + $sub_menu .= ($properties['megamenu']['megamenu_content']) ? '<ol ' . drupal_attributes($variables['submenu']['attributes']) . '>' : '<ul ' . drupal_attributes($variables['submenu']['attributes']) . '>'; $sub_menu .= $element['below']; $sub_menu .= ($properties['megamenu']['megamenu_content']) ? '</ol>' : '</ul>'; - $sub_menu .= isset($variables['wrapper']['wul'][1]) ? $variables['wrapper']['wul'][1] : ''; + $sub_menu .= isset($properties['wrapper']['wul'][1]) ? $properties['wrapper']['wul'][1] : ''; } $output = '<li' . drupal_attributes($element['attributes']) . '>'; @@ -1884,12 +2183,12 @@ function theme_superfish_menu_item($variables) { if ($properties['use_link_theme']) { $link_variables = array( 'menu_item' => $element['item'], - 'link_options' => $element['localized_options'] + 'link_options' => $element['item']['link']['localized_options'], ); $output .= theme('superfish_menu_item_link', $link_variables); } else { - $output .= l($element['item']['link']['title'], $element['item']['link']['href'], $element['localized_options']); + $output .= l($element['item']['link']['title'], $element['item']['link']['href'], $element['item']['link']['localized_options']); } $output .= isset($properties['wrapper']['whl'][1]) ? $properties['wrapper']['whl'][1] : ''; $output .= ($properties['megamenu']['megamenu_wrapper']) ? '<ul class="sf-megamenu"><li class="sf-megamenu-wrapper ' . $element['attributes']['class'] . '">' : ''; @@ -1903,7 +2202,7 @@ function theme_superfish_menu_item($variables) { /** * Theme a menu item link. * - * @param $variables + * @param array $variables * An array of variables containing: * - menu_item: The menu item array. * - link_options: An array of link options. @@ -1914,4 +2213,4 @@ function theme_superfish_menu_item_link($variables) { $menu_item = $variables['menu_item']; $link_options = $variables['link_options']; return l($menu_item['link']['title'], $menu_item['link']['href'], $link_options); -} \ No newline at end of file +} diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/LICENSE.txt b/profiles/wcm_base/modules/contrib/xmlsitemap/LICENSE.txt new file mode 100644 index 00000000..d159169d --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/LICENSE.txt @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/README.txt b/profiles/wcm_base/modules/contrib/xmlsitemap/README.txt new file mode 100644 index 00000000..92eca43e --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/README.txt @@ -0,0 +1,86 @@ + +CONTENTS OF THIS FILE +--------------------- + + * Introduction + * Installing + * Uninstalling + * Frequently Asked Questions (FAQ) + * Known Issues + * More Information + * How Can You Contribute? + + +INTRODUCTION +------------ + +Current Maintainer: Dave Reid <http://drupal.org/user/53892> +Co-maintainer: Kiam <http://drupal.org/user/55077> +Co-maintainer: Earnie <http://drupal.org/user/86710> +Co-maintainer: Darren Oh <http://drupal.org/user/30772> +Original Author: Matthew Loar <http://drupal.org/user/24879> + +XML Sitemap automatically creates a sitemap that conforms to the sitemaps.org +specification. This helps search engines keep their search results up to date. + + +INSTALLING +---------- + +See http://drupal.org/getting-started/install-contrib for instructions on +how to install or update Drupal modules. + +Once XML Sitemap is installed and enabled, you can adjust the settings for your +site's sitemap at admin/config/search/xmlsitemap. Your can view your site's +sitemap at http://yoursite.com/sitemap.xml. + +It is highly recommended that you have clean URLs enabled for this module. + + +UNINSTALLING +------------ + +Because Drupal does not uninstall modules in reverse order of their +dependencies, if you want to uninstall all the XML sitemap modules, be sure to +disable and uninstall all the sub-modules before the base XML sitemap module. +To help fix this bug in Drupal core, visit http://drupal.org/node/151452. + + +FREQUENTLY ASKED QUESTIONS (FAQ) +-------------------------------- + +- There are no frequently asked questions at this time. + + +KNOWN ISSUES +------------ + +- See http://drupal.org/node/482550 for a list of the current known issues. + + +MORE INFORMATION +---------------- + +- To issue any bug reports, feature or support requests, see the module issue + queue at http://drupal.org/project/issues/xmlsitemap. + +- For additional documentation, see the online module handbook at + http://drupal.org/handbook/modules/xmlsitemap. + +- You can view the sitemap.org specification at http://sitemaps.org. + + +HOW CAN YOU CONTRIBUTE? +----------------------- + +- Report any bugs, feature requests, etc. in the issue tracker. + http://drupal.org/project/issues/xmlsitemap + +- Help translate this module. + http://localize.drupal.org/translate/projects/xmlsitemap + +- Write a review for this module at drupalmodules.com. + http://drupalmodules.com/module/xml-sitemap + +- Help keep development active by dontating to the developer. + http://davereid.chipin.com/ diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.admin.inc b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.admin.inc new file mode 100644 index 00000000..496dd2c1 --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.admin.inc @@ -0,0 +1,877 @@ +<?php + +/** + * @file + * Administrative page callbacks for the xmlsitemap module. + * + * @ingroup xmlsitemap + */ + +/** + * Render a tableselect list of XML sitemaps for the main admin page. + */ +function xmlsitemap_sitemap_list_form() { + $destination = drupal_get_destination(); + + // Build the 'Update options' form. + $form['#operations'] = module_invoke_all('xmlsitemap_sitemap_operations'); + $operations = array(); + foreach ($form['#operations'] as $operation => $operation_info) { + $operations[$operation] = $operation_info['label']; + } + asort($operations); + + $form['operations'] = array( + '#type' => 'fieldset', + '#title' => t('Update options'), + '#prefix' => '<div class="container-inline">', + '#suffix' => '</div>', + ); + $form['operations']['operation'] = array( + '#type' => 'select', + '#options' => $operations, + '#default_value' => 'update', + ); + $form['operations']['submit'] = array( + '#type' => 'submit', + '#value' => t('Update'), + //'#validate' => array('xmlsitemap_sitemap_list_form_validate'), + //'#submit' => array('xmlsitemap_sitemap_list_form_submit'), + ); + + $contexts = xmlsitemap_get_context_info(); + + $header = array(); + $header['url'] = array('data' => t('URL')); + foreach ($contexts as $context_key => $context_info) { + if (!empty($context_info['summary callback'])) { + $header['context_' . $context_key] = $context_info['label']; + } + } + $header['updated'] = array('data' => t('Last updated'), 'field' => 'updated', 'sort' => 'asc'); + $header['links'] = array('data' => t('Links'), 'field' => 'links'); + $header['chunks'] = array('data' => t('Pages'), 'field' => 'chunks'); + $header['operations'] = array('data' => t('Operations')); + + $query = db_select('xmlsitemap_sitemap'); + $query->fields('xmlsitemap_sitemap', array('smid')); + $query->extend('TableSort')->orderByHeader($header); + $smids = $query->execute()->fetchCol(); + $sitemaps = $smids ? xmlsitemap_sitemap_load_multiple($smids) : array(); + + $options = array(); + foreach ($sitemaps as $smid => $sitemap) { + $sitemap->url = url($sitemap->uri['path'], $sitemap->uri['options']); + + $options[$smid]['url'] = array( + 'data' => array( + '#type' => 'link', + '#title' => $sitemap->url, + '#href' => $sitemap->url, + ), + ); + + foreach ($contexts as $context_key => $context_info) { + if (!empty($context_info['summary callback'])) { + $options[$smid]['context_' . $context_key] = _xmlsitemap_sitemap_context_summary($sitemap, $context_key, $context_info); + } + } + + $options[$smid]['updated'] = $sitemap->updated ? format_date($sitemap->updated, 'short') : t('Never'); + $options[$smid]['links'] = $sitemap->updated ? $sitemap->links : '-'; + $options[$smid]['chunks'] = $sitemap->updated ? $sitemap->chunks : '-'; + + // @todo Highlight sitemaps that need updating. + //$options[$smid]['#attributes']['class'][] = 'warning'; + + $operations = array(); + $operations['edit'] = xmlsitemap_get_operation_link('admin/config/search/xmlsitemap/edit/' . $smid, array('title' => t('Edit'), 'modal' => TRUE)); + $operations['delete'] = xmlsitemap_get_operation_link('admin/config/search/xmlsitemap/delete/' . $smid, array('title' => t('Delete'), 'modal' => TRUE)); + if ($operations) { + $options[$smid]['operations'] = array( + 'data' => array( + '#theme' => 'links', + '#links' => $operations, + '#attributes' => array('class' => array('links', 'inline')), + ), + ); + } + else { + $options[$smid]['operations'] = t('None (sitemap locked)'); + } + } + + $form['sitemaps'] = array( + '#type' => 'tableselect', + '#header' => $header, + '#options' => $options, + '#empty' => t('No XML sitemaps available.') . ' ' . l(t('Add a new XML sitemap'), 'admin/config/search/xmlsitemap/add'), + ); + return $form; +} + +/** + * Validate xmlsitemap_sitemap_list_form submissions. + */ +function xmlsitemap_sitemap_list_form_validate($form, &$form_state) { + $form_state['values']['sitemaps'] = array_filter($form_state['values']['sitemaps']); + + // Error if there are no items to select. + if (!count($form_state['values']['sitemaps'])) { + form_set_error('', t('No sitemaps selected.')); + } +} + +/** + * Process xmlsitemap_sitemap_list_form submissions. + * + * Execute the chosen 'Update option' on the selected sitemaps. + */ +function xmlsitemap_sitemap_list_form_submit($form, &$form_state) { + $operation = $form['#operations'][$form_state['values']['operation']]; + + // Filter out unchecked sitemaps. + $sitemaps = array_filter($form_state['values']['sitemaps']); + + if (!empty($operation['confirm']) && empty($form_state['values']['confirm'])) { + // We need to rebuild the form to go to a second step. For example, to + // show the confirmation form for the deletion of redirects. + $form_state['rebuild'] = TRUE; + } + else { + $function = $operation['callback']; + + // Add in callback arguments if present. + if (isset($operation['callback arguments'])) { + $args = array_merge(array($sitemaps), $operation['callback arguments']); + } + else { + $args = array($sitemaps); + } + call_user_func_array($function, $args); + + $count = count($form_state['values']['sitemaps']); + //watchdog('xmlsitemap', '@action @count XML sitemaps.', array('@action' => $operation['action past'], '@count' => $count)); + drupal_set_message(format_plural(count($sitemaps), '@action @count XML sitemap.', '@action @count XML sitemaps.', array('@action' => $operation['action past'], '@count' => $count))); + //$form_state['redirect'] = 'admin/config/search/xmlsitemap'; + } +} + +function xmlsitemap_sitemap_edit_form(array $form, array &$form_state, stdClass $sitemap = NULL) { + _xmlsitemap_set_breadcrumb(); + + if (!isset($sitemap)) { + $sitemap = new stdClass(); + $sitemap->smid = NULL; + $sitemap->context = array(); + } + + $form['#sitemap'] = $sitemap; + + $form['smid'] = array( + '#type' => 'value', + '#value' => $sitemap->smid, + ); + // The context settings should be form_alter'ed by the context modules. + $form['context'] = array( + '#tree' => TRUE, + ); + + $form['actions'] = array( + '#type' => 'actions', + ); + $form['actions']['save'] = array( + '#type' => 'submit', + '#value' => t('Save'), + ); + $form['actions']['cancel'] = array( + '#type' => 'link', + '#href' => isset($_GET['destination']) ? $_GET['destination'] : 'admin/config/search/xmlsitemap', + '#title' => t('Cancel'), + ); + + // Let other modules alter this form with their context settings. + $form['#pre_render'][] = 'xmlsitemap_sitemap_edit_form_pre_render'; + + return $form; +} + +function xmlsitemap_sitemap_edit_form_pre_render($form) { + $visible_children = element_get_visible_children($form['context']); + if (empty($visible_children)) { + $form['context']['empty'] = array( + '#type' => 'markup', + '#markup' => '<p>' . t('There are currently no XML sitemap contexts available.') . '</p>', + ); + } + return $form; +} + +function xmlsitemap_sitemap_edit_form_validate($form, &$form_state) { + // If there are no context options, the $form_state['values']['context'] + // disappears. + $form_state['values'] += array('context' => array()); + $existing = xmlsitemap_sitemap_load_by_context($form_state['values']['context']); + if ($existing && $existing->smid != $form_state['values']['smid']) { + form_set_error('context', t('A sitemap with the same context already exists.')); + } +} + +function xmlsitemap_sitemap_edit_form_submit($form, &$form_state) { + form_state_values_clean($form_state); + $sitemap = (object) $form_state['values']; + xmlsitemap_sitemap_save($sitemap); + drupal_set_message(t('The sitemap has been saved.')); + $form_state['redirect'] = 'admin/config/search/xmlsitemap'; +} + +function xmlsitemap_sitemap_delete_form(array $form, array &$form_state, stdClass $sitemap) { + _xmlsitemap_set_breadcrumb(); + + $count = (int) db_query("SELECT COUNT(smid) FROM {xmlsitemap_sitemap}")->fetchField(); + if ($count === 1 && empty($_POST)) { + drupal_set_message(t('It is not recommended to delete the only XML sitemap.'), 'error'); + } + + $form['#sitemap'] = $sitemap; + $form['smid'] = array( + '#type' => 'value', + '#value' => $sitemap->smid, + ); + return confirm_form( + $form, + t('Are you sure you want to delete the XML sitemap?'), + 'admin/config/search/xmlsitemap', + '', + t('Delete'), + t('Cancel') + ); +} + +function xmlsitemap_sitemap_delete_form_submit($form, $form_state) { + xmlsitemap_sitemap_delete($form_state['values']['smid']); + drupal_set_message(t('The sitemap has been deleted.')); + $form_state['redirect'] = 'admin/config/search/xmlsitemap'; +} + +/** + * Form builder; Administration settings form. + * + * @see system_settings_form() + * @see xmlsitemap_settings_form_validate() + */ +function xmlsitemap_settings_form($form, &$form_state) { + $form['xmlsitemap_minimum_lifetime'] = array( + '#type' => 'select', + '#title' => t('Minimum sitemap lifetime'), + '#options' => array(0 => t('No minimum')) + drupal_map_assoc(array(300, 900, 1800, 3600, 10800, 21600, 43200, 86400, 172800, 259200, 604800), 'format_interval'), + '#description' => t('The minimum amount of time that will elapse before the sitemaps are regenerated. The sitemaps will also only be regenerated on cron if any links have been added, updated, or deleted.') . '<br />' . t('Recommended value: %value.', array('%value' => t('1 day'))), + '#default_value' => variable_get('xmlsitemap_minimum_lifetime', 0), + ); + $form['xmlsitemap_xsl'] = array( + '#type' => 'checkbox', + '#title' => t('Include a stylesheet in the sitemaps for humans.'), + '#description' => t('When enabled, this will add formatting and tables with sorting to make it easier to view the XML sitemap data instead of viewing raw XML output. Search engines will ignore this.'), + '#default_value' => variable_get('xmlsitemap_xsl', 1), + ); + $form['xmlsitemap_prefetch_aliases'] = array( + '#type' => 'checkbox', + '#title' => t('Prefetch URL aliases during sitemap generation.'), + '#description' => t('When enabled, this will fetch all URL aliases at once instead of one at a time during sitemap generation. For medium or large sites, it is recommended to disable this feature as it uses a lot of memory.'), + '#default_value' => variable_get('xmlsitemap_prefetch_aliases', 1), + ); + + $form['advanced'] = array( + '#type' => 'fieldset', + '#title' => t('Advanced settings'), + '#collapsible' => TRUE, + '#collapsed' => !variable_get('xmlsitemap_developer_mode', 0), + '#weight' => 10, + ); + //$form['advanced']['xmlsitemap_gz'] = array( + // '#type' => 'checkbox', + // '#title' => t('Generate additional compressed sitemaps using gzip.'), + // '#default_value' => xmlsitemap_var('gz'), + // '#disabled' => !function_exists('gzencode'), + //); + $form['advanced']['xmlsitemap_chunk_size'] = array( + '#type' => 'select', + '#title' => t('Number of links in each sitemap page'), + '#options' => array('auto' => t('Automatic (recommended)')) + drupal_map_assoc(array(100, 500, 1000, 2500, 5000, 10000, 25000, XMLSITEMAP_MAX_SITEMAP_LINKS)), + '#default_value' => xmlsitemap_var('chunk_size'), + // @todo This description is not clear. + '#description' => t('If there are problems with rebuilding the sitemap, you may want to manually set this value. If you have more than @max links, an index with multiple sitemap pages will be generated. There is a maximum of @max sitemap pages.', array('@max' => XMLSITEMAP_MAX_SITEMAP_LINKS)), + ); + $form['advanced']['xmlsitemap_batch_limit'] = array( + '#type' => 'select', + '#title' => t('Maximum number of sitemap links to process at once'), + '#options' => drupal_map_assoc(array(5, 10, 25, 50, 100, 250, 500, 1000, 2500, 5000)), + '#default_value' => xmlsitemap_var('batch_limit'), + '#description' => t('If you have problems running cron or rebuilding the sitemap, you may want to lower this value.'), + ); + if (!xmlsitemap_check_directory()) { + form_set_error('xmlsitemap_path', t('The directory %directory does not exist or is not writable.', array('%directory' => xmlsitemap_get_directory()))); + } + $form['advanced']['xmlsitemap_path'] = array( + '#type' => 'textfield', + '#title' => t('Sitemap cache directory'), + '#default_value' => variable_get('xmlsitemap_path', 'xmlsitemap'), + '#size' => 30, + '#maxlength' => 255, + '#description' => t('Subdirectory where the sitemap data will be stored. This folder <strong>must not be shared</strong> with any other Drupal site or install using XML sitemap.'), + '#field_prefix' => file_build_uri(''), + '#required' => TRUE, + ); + $form['advanced']['xmlsitemap_base_url'] = array( + '#type' => 'textfield', + '#title' => t('Default base URL'), + '#default_value' => variable_get('xmlsitemap_base_url', $GLOBALS['base_url']), + '#size' => 30, + '#description' => t('This is the default base URL used for sitemaps and sitemap links.'), + '#required' => TRUE, + ); + $form['advanced']['xmlsitemap_lastmod_format'] = array( + '#type' => 'select', + '#title' => t('Last modification date format'), + '#options' => array( + XMLSITEMAP_LASTMOD_SHORT => t('Short'), + XMLSITEMAP_LASTMOD_MEDIUM => t('Medium'), + XMLSITEMAP_LASTMOD_LONG => t('Long'), + ), + '#default_value' => variable_get('xmlsitemap_lastmod_format', XMLSITEMAP_LASTMOD_MEDIUM), + ); + foreach ($form['advanced']['xmlsitemap_lastmod_format']['#options'] as $key => &$label) { + $label .= ' (' . gmdate($key, REQUEST_TIME) . ')'; + } + $form['advanced']['xmlsitemap_developer_mode'] = array( + '#type' => 'checkbox', + '#title' => t('Enable developer mode to expose additional settings.'), + '#default_value' => variable_get('xmlsitemap_developer_mode', 0), + ); + $form['advanced']['xmlsitemap_disable_cron_regeneration'] = array( + '#type' => 'checkbox', + '#title' => t('Disable cron generation of sitemap files.'), + '#default_value' => variable_get('xmlsitemap_disable_cron_regeneration', 0), + '#description' => t('This can be disabled if other methods are being used to generate the sitemap files, like <em>drush xmlsitemap-regenerate</em>.'), + ); + $form['advanced']['xmlsitemap_output_elements'] = array( + '#type' => 'checkboxes', + '#title' => t('Enable or disable the individual @loc elements from output', array('@loc' => '<loc>')), + '#options' => array( + 'lastmod' => t('Last modification date: @lastmod', array('@lastmod' => '<lastmod>')), + 'changefreq' => t('Change frequency: @changfreq', array('@changfreq' => '<changefreq>')), + 'priority' => t('Priority: @priority', array('@priority' => '<priority>')), + ), + '#default_value' => drupal_map_assoc(variable_get('xmlsitemap_output_elements', array('lastmod', 'changefreq', 'priority'))), + ); + + $form['xmlsitemap_settings'] = array( + '#type' => 'vertical_tabs', + '#weight' => 20, + ); + + $entities = xmlsitemap_get_link_info(NULL, TRUE); + module_load_all_includes('xmlsitemap.inc'); + foreach ($entities as $entity => $entity_info) { + $form[$entity] = array( + '#type' => 'fieldset', + '#title' => $entity_info['label'], + '#collapsible' => TRUE, + '#collapsed' => TRUE, + '#group' => 'xmlsitemap_settings', + ); + + if (!empty($entity_info['bundles'])) { + // If this entity has bundles, show a bundle setting summary. + xmlsitemap_add_form_entity_summary($form[$entity], $entity, $entity_info); + } + + if (!empty($entity_info['xmlsitemap']['settings callback'])) { + // Add any entity-specific settings. + $entity_info['xmlsitemap']['settings callback']($form[$entity]); + } + + // Ensure that the entity fieldset is not shown if there are no accessible + // sub-elements. + $form[$entity]['#access'] = (bool) element_get_visible_children($form[$entity]); + } + + $form['#validate'][] = 'xmlsitemap_settings_form_validate'; + $form['#submit'][] = 'xmlsitemap_settings_form_submit'; + array_unshift($form['#submit'], 'xmlsitemap_form_submit_flag_regenerate'); + $form['array_filter'] = array('#type' => 'value', '#value' => TRUE); + + $form = system_settings_form($form); + return $form; +} + +/** + * Form validator; Check the sitemap files directory. + * + * @see xmlsitemap_settings_form() + */ +function xmlsitemap_settings_form_validate($form, &$form_state) { + // Check that the chunk size will not create more than 1000 chunks. + $chunk_size = $form_state['values']['xmlsitemap_chunk_size']; + if ($chunk_size != 'auto' && $chunk_size != 50000 && (xmlsitemap_get_link_count() / $chunk_size) > 1000) { + form_set_error('xmlsitemap_chunk_size', t('The sitemap page link count of @size will create more than 1,000 sitemap pages. Please increase the link count.', array('@size' => $chunk_size))); + } + + $base_url = &$form_state['values']['xmlsitemap_base_url']; + $base_url = rtrim($base_url, '/'); + if ($base_url != '' && !valid_url($base_url, TRUE)) { + form_set_error('xmlsitemap_base_url', t('Invalid base URL.')); + } +} + +/** + * Submit handler; + * + * @see xmlsitemap_settings_form() + */ +function xmlsitemap_settings_form_submit($form, $form_state) { + // Save any changes to the frontpage link. + xmlsitemap_link_save(array('type' => 'frontpage', 'id' => 0, 'loc' => '')); +} + +/** + * Menu callback; Confirm rebuilding of the sitemap. + * + * @see xmlsitemap_rebuild_form_submit() + */ +function xmlsitemap_rebuild_form() { + if (!$_POST && !variable_get('xmlsitemap_rebuild_needed', FALSE)) { + if (!variable_get('xmlsitemap_regenerate_needed', FALSE)) { + drupal_set_message(t('Your sitemap is up to date and does not need to be rebuilt.'), 'error'); + } + else { + $_REQUEST += array('destination' => 'admin/config/search/xmlsitemap'); + drupal_set_message(t('A rebuild is not necessary. If you are just wanting to regenerate the XML sitemap files, you can <a href="@link-cron">run cron manually</a>.', array('@link-cron' => url('admin/reports/status/run-cron', array('query' => drupal_get_destination())))), 'warning'); + } + } + + // Build a list of rebuildable link types. + module_load_include('generate.inc', 'xmlsitemap'); + $rebuild_types = xmlsitemap_get_rebuildable_link_types(); + + $form['entities'] = array( + '#type' => 'select', + '#title' => t("Select which link types you would like to rebuild"), + '#description' => t('If no link types are selected, the sitemap files will just be regenerated.'), + '#multiple' => TRUE, + '#options' => drupal_map_assoc($rebuild_types), + '#default_value' => variable_get('xmlsitemap_rebuild_needed', FALSE) || !variable_get('xmlsitemap_developer_mode', 0) ? $rebuild_types : array(), + '#access' => variable_get('xmlsitemap_developer_mode', 0), + ); + $form['save_custom'] = array( + '#type' => 'checkbox', + '#title' => t('Save and restore any custom inclusion and priority links.'), + '#default_value' => TRUE, + ); + + return confirm_form( + $form, + t('Are you sure you want to rebuild the XML sitemap?'), + 'admin/config/search/xmlsitemap', + '', + t('Rebuild sitemap'), + t('Cancel') + ); +} + +/** + * Submit handler; Starts the sitemap rebuild batch. + * + * @see xmlsitemap_rebuild_form() + * @see xmlsitemap_rebuild_batch() + */ +function xmlsitemap_rebuild_form_submit($form, &$form_state) { + module_load_include('generate.inc', 'xmlsitemap'); + $batch = xmlsitemap_rebuild_batch($form_state['values']['entities'], $form_state['values']['save_custom']); + batch_set($batch); + $form_state['redirect'] = 'admin/config/search/xmlsitemap'; +} + +/** + * Add a table summary for an entity and its bundles. + */ +function xmlsitemap_add_form_entity_summary(&$form, $entity, array $entity_info) { + $priorities = xmlsitemap_get_priority_options(NULL, FALSE); + $statuses = xmlsitemap_get_status_options(NULL); + $destination = drupal_get_destination(); + + $rows = array(); + $totals = array('total' => 0, 'indexed' => 0, 'visible' => 0); + foreach ($entity_info['bundles'] as $bundle => $bundle_info) { + // Fetch current per-bundle link total and indexed counts. + $status = xmlsitemap_get_link_type_indexed_status($entity, $bundle); + $totals['total'] += $status['total']; + $totals['indexed'] += $status['indexed']; + $totals['visible'] += $status['visible']; + + $row = array(); + if (drupal_valid_path("admin/config/search/xmlsitemap/settings/$entity/$bundle")) { + $edit_link = xmlsitemap_get_operation_link("admin/config/search/xmlsitemap/settings/$entity/$bundle", array('title' => $bundle_info['label'], 'modal' => TRUE)); + $row[] = l($edit_link['title'], $edit_link['href'], $edit_link); + } + else { + // Bundle labels are assumed to be un-escaped input. + $row[] = check_plain($bundle_info['label']); + } + $row[] = $statuses[$bundle_info['xmlsitemap']['status'] ? 1 : 0]; + $row[] = $priorities[number_format($bundle_info['xmlsitemap']['priority'], 1)]; + $row[] = $status['total']; + $row[] = $status['indexed']; + $row[] = $status['visible']; + $rows[] = $row; + } + + if ($rows) { + $header = array( + isset($entity_info['bundle label']) ? $entity_info['bundle label'] : '', + t('Inclusion'), + t('Priority'), + t('Available'), + t('Indexed'), + t('Visible'), + ); + $rows[] = array( + array( + 'data' => t('Totals'), + 'colspan' => 3, + 'header' => TRUE, + ), + array( + 'data' => $totals['total'], + 'header' => TRUE, + ), + array( + 'data' => $totals['indexed'], + 'header' => TRUE, + ), + array( + 'data' => $totals['visible'], + 'header' => TRUE, + ), + ); + $form['summary'] = array( + '#theme' => 'table', + '#header' => $header, + '#rows' => $rows, + ); + } +} + +/** + * Add the link type XML sitemap options to the link type's form. + * + * Caller is responsible for ensuring xmlsitemap_link_bundle_settings_save() + * is called during submission. + */ +function xmlsitemap_add_link_bundle_settings(array &$form, array &$form_state, $entity, $bundle) { + $entity_info = xmlsitemap_get_link_info($entity); + + //if (!isset($bundle) && isset($entity_info['bundle keys']['bundle'])) { + // $bundle_key = $entity_info['bundle keys']['bundle']; + // if (isset($form[$bundle_key]['#value'])) { + // $bundle = $form[$bundle_key]['#value']; + // } + // elseif (isset($form[$bundle_key]['#default_value'])) { + // $bundle = $form[$bundle_key]['#default_value']; + // } + //} + + $bundle_info = xmlsitemap_link_bundle_load($entity, $bundle); + + $form['xmlsitemap'] = array( + '#type' => 'fieldset', + '#title' => t('XML sitemap'), + '#collapsible' => TRUE, + '#collapsed' => TRUE, + '#access' => user_access('administer xmlsitemap'), + '#group' => 'additional_settings', + '#attached' => array( + 'js' => array( + 'vertical-tabs' => drupal_get_path('module', 'xmlsitemap') . '/xmlsitemap.js', + ), + ), + '#tree' => TRUE, + '#entity' => $entity, + '#bundle' => $bundle, + '#entity_info' => $entity_info, + '#bundle_info' => $bundle_info, + ); + + // Hack to remove fieldset summary if Vertical tabs is not enabled. + if (!isset($form['additional_settings'])) { + unset($form['xmlsitemap']['#attached']['js']['vertical-tabs']); + } + + $form['xmlsitemap']['description'] = array( + '#prefix' => '<div class="description">', + '#suffix' => '</div>', + '#markup' => t('Changing these type settings will affect any items of this type that have either inclusion or priority set to default.'), + ); + $form['xmlsitemap']['status'] = array( + '#type' => 'select', + '#title' => t('Inclusion'), + '#options' => xmlsitemap_get_status_options(), + '#default_value' => $bundle_info['status'], + ); + $form['xmlsitemap']['priority'] = array( + '#type' => 'select', + '#title' => t('Default priority'), + '#options' => xmlsitemap_get_priority_options(), + '#default_value' => $bundle_info['priority'], + '#states' => array( + 'invisible' => array( + 'select[name="xmlsitemap[status]"]' => array('value' => '0'), + ), + ), + ); + + $form += array('#submit' => array()); + array_unshift($form['#submit'], 'xmlsitemap_link_bundle_settings_form_submit'); + + if (isset($form['submit'])) { + $form['submit'] += array('#weight' => 40); + } + if (isset($form['delete'])) { + $form['delete'] += array('#weight' => 50); + } +} + +function xmlsitemap_link_bundle_settings_form(array $form, array &$form_state, array $bundle) { + if (empty($form_state['ajax']) && $admin_path = xmlsitemap_get_bundle_path($bundle['entity'], $bundle['bundle'])) { + // If this is a non-ajax form, redirect to the bundle administration page. + $destination = drupal_get_destination(); + unset($_GET['destination']); + drupal_goto($admin_path, array('query' => $destination)); + } + else { + drupal_set_title( t('@bundle XML sitemap settings', array('@bundle' => $bundle['info']['label']))); + } + + $form = array(); + xmlsitemap_add_link_bundle_settings($form, $form_state, $bundle['entity'], $bundle['bundle']); + $form['xmlsitemap']['#type'] = 'markup'; + $form['xmlsitemap']['#value'] = ''; + $form['xmlsitemap']['#access'] = TRUE; + $form['xmlsitemap']['#show_message'] = TRUE; + + $form['actions'] = array( + '#type' => 'actions', + ); + $form['actions']['save'] = array( + '#type' => 'submit', + '#value' => t('Save'), + ); + $form['actions']['cancel'] = array( + '#value' => l(t('Cancel'), isset($_GET['destination']) ? $_GET['destination'] : 'admin/config/search/xmlsitemap/settings'), + '#weight' => 10, + ); + + return $form; +} + +/** + * Add a link's XML sitemap options to the link's form. + * + * @todo Add changefreq overridability. + */ +function xmlsitemap_add_form_link_options(array &$form, $entity, $bundle, $id) { + $info = xmlsitemap_get_link_info($entity); + + if (!$info || empty($info['bundles'][$bundle])) { + return; + } + + if (!$link = xmlsitemap_link_load($entity, $id)) { + $link = array(); + } + + $bundle_info = xmlsitemap_link_bundle_load($entity, $bundle); + $link += array( + 'access' => 1, + 'status' => $bundle_info['status'], + 'status_default' => $bundle_info['status'], + 'status_override' => 0, + 'priority' => $bundle_info['priority'], + 'priority_default' => $bundle_info['priority'], + 'priority_override' => 0, + ); + + $form['xmlsitemap'] = array( + '#type' => 'fieldset', + '#tree' => TRUE, + '#title' => t('XML sitemap'), + '#collapsible' => TRUE, + '#collapsed' => !$link['status_override'] && !$link['priority_override'], + '#access' => user_access('administer xmlsitemap') || xmlsitemap_link_bundle_access($bundle_info), + '#group' => 'additional_settings', + '#attached' => array( + 'js' => array( + 'vertical-tabs' => drupal_get_path('module', 'xmlsitemap') . '/xmlsitemap.js', + ), + ), + ); + + // Hack to remove fieldset summary if Vertical tabs is not enabled. + if (!isset($form['additional_settings'])) { + unset($form['xmlsitemap']['#attached']['js']['vertical-tabs']); + } + + if (xmlsitemap_link_bundle_access($bundle_info) && $path = xmlsitemap_get_bundle_path($entity, $bundle)) { + $form['xmlsitemap']['description'] = array( + '#prefix' => '<div class="description">', + '#suffix' => '</div>', + '#markup' => t('The default XML sitemap settings for this @bundle can be changed <a href="@link-type">here</a>.', array('@bundle' => drupal_strtolower($info['bundle label']), '@link-type' => url($path, array('query' => drupal_get_destination())))), + ); + } + + // Show a warning if the link is not accessible and will not be included in + // the sitemap. + if ($id && !$link['access']) { + $form['xmlsitemap']['warning'] = array( + '#type' => 'markup', + '#prefix' => '<p><strong>', + '#suffix' => '</strong></p>', + '#value' => ('This item is not currently visible to anonymous users, so it will not be included in the sitemap.'), + ); + } + + // Status field (inclusion/exclusion) + $form['xmlsitemap']['status'] = array( + '#type' => 'select', + '#title' => t('Inclusion'), + '#options' => xmlsitemap_get_status_options($link['status_default']), + '#default_value' => $link['status_override'] ? $link['status'] : 'default', + ); + $form['xmlsitemap']['status_default'] = array( + '#type' => 'value', + '#value' => $link['status_default'], + ); + $form['xmlsitemap']['status_override'] = array( + '#type' => 'value', + '#value' => $link['status_override'], + ); + + // Priority field + $form['xmlsitemap']['priority'] = array( + '#type' => 'select', + '#title' => t('Priority'), + '#options' => xmlsitemap_get_priority_options($link['priority_default']), + '#default_value' => $link['priority_override'] ? number_format($link['priority'], 1) : 'default', + '#description' => t('The priority of this URL relative to other URLs on your site.'), + '#states' => array( + 'invisible' => array( + 'select[name="xmlsitemap[status]"]' => array('value' => '0'), + ), + ), + ); + if (!$link['status_default']) { + // If the default status is excluded, add a visible state on the include + // override option. + $form['xmlsitemap']['priority']['#states']['visible'] = array( + 'select[name="xmlsitemap[status]"]' => array('value' => '1'), + ); + } + $form['xmlsitemap']['priority_default'] = array( + '#type' => 'value', + '#value' => $link['priority_default'], + ); + $form['xmlsitemap']['priority_override'] = array( + '#type' => 'value', + '#value' => $link['priority_override'], + ); + + // Other persistent fields. + //$form['xmlsitemap']['lastmod'] = array( + // '#type' => 'value', + // '#value' => $node->xmlsitemap['lastmod'], + //); + //$form['xmlsitemap']['changefreq'] = array( + // '#type' => 'value', + // '#value' => $node->xmlsitemap['changefreq'], + //); + //$form['xmlsitemap']['changecount'] = array( + // '#type' => 'value', + // '#value' => $node->xmlsitemap['changecount'], + //); + + // Add the submit handler to adjust the default values if selected. + $form += array('#submit' => array()); + if (!in_array('xmlsitemap_process_form_link_options', $form['#submit'])) { + array_unshift($form['#submit'], 'xmlsitemap_process_form_link_options'); + } +} + +/** + * Get a list of priority options. + * + * @param $default + * Include a 'default' option. + * @param $guides + * Add helpful indicators for the highest, middle and lowest values. + * @return + * An array of options. + */ +function xmlsitemap_get_priority_options($default = NULL, $guides = TRUE) { + $options = array(); + $priorities = array( + '1.0' => t('1.0'), + '0.9' => t('0.9'), + '0.8' => t('0.8'), + '0.7' => t('0.7'), + '0.6' => t('0.6'), + '0.5' => t('0.5'), + '0.4' => t('0.4'), + '0.3' => t('0.3'), + '0.2' => t('0.2'), + '0.1' => t('0.1'), + '0.0' => t('0.0'), + ); + + if (isset($default)) { + $default = number_format($default, 1); + $options['default'] = t('Default (@value)', array('@value' => $priorities[$default])); + } + + // Add the rest of the options. + $options += $priorities; + + if ($guides) { + $options['1.0'] .= ' ' . t('(highest)'); + $options['0.5'] .= ' ' . t('(normal)'); + $options['0.0'] .= ' ' . t('(lowest)'); + } + + return $options; +} + +/** + * Get a list of priority options. + * + * @param $default + * Include a 'default' option. + * @return + * An array of options. + * + * @see _xmlsitemap_translation_strings() + */ +function xmlsitemap_get_status_options($default = NULL) { + $options = array(); + $statuses = array( + 1 => t('Included'), + 0 => t('Excluded'), + ); + + if (isset($default)) { + $default = $default ? 1 : 0; + $options['default'] = t('Default (@value)', array('@value' => drupal_strtolower($statuses[$default]))); + } + + $options += $statuses; + + return $options; +} diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.api.php b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.api.php new file mode 100644 index 00000000..4a84af82 --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.api.php @@ -0,0 +1,289 @@ +<?php + +/** + * @file + * Hooks provided by the XML sitemap module. + * + * @ingroup xmlsitemap + */ + +/** + * @addtogroup hooks + * @{ + */ + +/** + * Provide information on the type of links this module provides. + * + * @see hook_entity_info() + * @see hook_entity_info_alter() + */ +function hook_xmlsitemap_link_info() { + return array( + 'mymodule' => array( + 'label' => 'My module', + 'base table' => 'mymodule', + 'entity keys' => array( + // Primary ID key on {base table} + 'id' => 'myid', + // Subtype key on {base table} + 'bundle' => 'mysubtype', + ), + 'path callback' => 'mymodule_path', + 'bundle label' => t('Subtype name'), + 'bundles' => array( + 'mysubtype1' => array( + 'label' => t('My subtype 1'), + 'admin' => array( + 'real path' => 'admin/settings/mymodule/mysubtype1/edit', + 'access arguments' => array('administer mymodule'), + ), + 'xmlsitemap' => array( + 'status' => XMLSITEMAP_STATUS_DEFAULT, + 'priority' => XMLSITEMAP_PRIORITY_DEFAULT, + ), + ), + ), + 'xmlsitemap' => array( + // Callback function to take an array of IDs and save them as sitemap + // links. + 'process callback' => '', + // Callback function used in batch API for rebuilding all links. + 'rebuild callback' => '', + // Callback function called from the XML sitemap settings page. + 'settings callback' => '', + ) + ), + ); +} + +/** + * Alter the data of a sitemap link before the link is saved. + * + * @param array $link + * An array with the data of the sitemap link. + * @param array $context + * An optional context array containing data related to the link. + */ +function hook_xmlsitemap_link_alter(array &$link, array $context) { + if ($link['type'] == 'mymodule') { + $link['priority'] += 0.5; + } +} + +/** + * Inform modules that an XML sitemap link has been created. + * + * @param $link + * Associative array defining an XML sitemap link as passed into + * xmlsitemap_link_save(). + * @param array $context + * An optional context array containing data related to the link. + * + * @see hook_xmlsitemap_link_update() + */ +function hook_xmlsitemap_link_insert(array $link, array $context) { + db_insert('mytable') + ->fields(array( + 'link_type' => $link['type'], + 'link_id' => $link['id'], + 'link_status' => $link['status'], + )) + ->execute(); +} + +/** + * Inform modules that an XML sitemap link has been updated. + * + * @param $link + * Associative array defining an XML sitemap link as passed into + * xmlsitemap_link_save(). + * @param array $context + * An optional context array containing data related to the link. + * + * @see hook_xmlsitemap_link_insert() + */ +function hook_xmlsitemap_link_update(array $link, array $context) { + db_update('mytable') + ->fields(array( + 'link_type' => $link['type'], + 'link_id' => $link['id'], + 'link_status' => $link['status'], + )) + ->execute(); +} + +/** + * Respond to XML sitemap link clearing and rebuilding. + * + * @param array $types + * An array of link types that are being rebuilt. + * @param bool $save_custom + * If links with overridden status and/or priority are being removed or not. + */ +function hook_xmlsitemap_rebuild_clear(array $types, $save_custom) { + db_delete('mytable') + ->condition('link_type', $types, 'IN') + ->execute(); +} + +/** + * Index links for the XML sitemaps. + */ +function hook_xmlsitemap_index_links($limit) { +} + +/** + * Provide information about contexts available to XML sitemap. + * + * @see hook_xmlsitemap_context_info_alter(). + */ +function hook_xmlsitemap_context_info() { + $info['vocabulary'] = array( + 'label' => t('Vocabulary'), + 'summary callback' => 'mymodule_xmlsitemap_vocabulary_context_summary', + 'default' => 0, + ); + return $info; +} + +/** + * Alter XML sitemap context info. + * + * @see hook_xmlsitemap_context_info(). + */ +function hook_xmlsitemap_context_info_alter(&$info) { + $info['vocabulary']['label'] = t('Site vocabularies'); +} + +/** + * Provide information about the current context on the site. + * + * @see hook_xmlsitemap_context_alter() + */ +function hook_xmlsitemap_context() { + $context = array(); + if ($vid = mymodule_get_current_vocabulary()) { + $context['vocabulary'] = $vid; + } + return $context; +} + +/** + * Alter the current context information. + * + * @see hook_xmlsitemap_context() + */ +function hook_xmlsitemap_context_alter(&$context) { + if (user_access('administer taxonomy')) { + unset($context['vocabulary']); + } +} + +/** + * Provide options for the url() function based on an XML sitemap context. + */ +function hook_xmlsitemap_context_url_options(array $context) { +} + +/** + * Alter the url() options based on an XML sitemap context. + */ +function hook_xmlsitemap_context_url_options_alter(array &$options, array $context) { +} + +/** + * Alter the content added to an XML sitemap for an individual element. + * + * This hooks is called when the module is generating the XML content for the + * sitemap and allows other modules to alter existing or add additional XML data + * for any element by adding additional key value paris to the $element array. + * + * The key in the element array is then used as the name of the XML child + * element to add and the value is the value of that element. For example: + * + * @code $element['video:title'] = 'Big Ponycorn'; @endcode + * + * Would result in a child element like <video:title>Big Ponycorn</video:title> + * being added to the sitemap for this particular link. + * + * @param array $element + * The element that will be converted to XML for the link. + * @param array $link + * An array of properties providing context about the link that we are + * generating an XML element for. + * @param object $sitemap + * The sitemap that is currently being generated. + */ +function hook_xmlsitemap_element_alter(array &$element, array $link, $sitemap) { + if ($link['subtype'] === 'video') { + $node = node_load($link['id']); + $element['video:video'] = array( + 'video:title' => check_plain($node->title), + 'video:description' => isset($node->body[LANGUAGE_NONE][0]['summary']) ? check_plain($node->body[LANGUAGE_NONE][0]['summary']) : check_plain($node->body[LANGUAGE_NONE][0]['value']), + 'video:live' => 'no', + ); + } +} + +/** + * Alter the attributes used for the root element of the XML sitemap. + * + * For example add an xmlns:video attribute: + * <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"> + * + * @param array $attributes + * An associative array of attributes to use in the root element of an XML + * sitemap. + * @param object $sitemap + * The sitemap that is currently being generated. + */ +function hook_xmlsitemap_root_attributes_alter(&$attributes, $sitemap) { + $attributes['xmlns:video'] = 'http://www.google.com/schemas/sitemap-video/1.1'; +} + +/** + * Alter the query selecting data from {xmlsitemap} during sitemap generation. + * + * @param $query + * A Query object describing the composite parts of a SQL query. + * + * @see hook_query_TAG_alter() + */ +function hook_query_xmlsitemap_generate_alter(QueryAlterableInterface $query) { + $sitemap = $query->getMetaData('sitemap'); + if (!empty($sitemap->context['vocabulary'])) { + $node_condition = db_and(); + $node_condition->condition('type', 'taxonomy_term'); + $node_condition->condition('subtype', $sitemap->context['vocabulary']); + $normal_condition = db_and(); + $normal_condition->condition('type', 'taxonomy_term', '<>'); + $condition = db_or(); + $condition->condition($node_condition); + $condition->condition($normal_condition); + $query->condition($condition); + } +} + +/** + * Provide information about XML sitemap bulk operations. + */ +function hook_xmlsitemap_sitemap_operations() { +} + +/** + * Respond to XML sitemap deletion. + * + * This hook is invoked from xmlsitemap_sitemap_delete_multiple() after the XML + * sitemap has been removed from the table in the database. + * + * @param $sitemap + * The XML sitemap object that was deleted. + */ +function hook_xmlsitemap_sitemap_delete(stdClass $sitemap) { + db_query("DELETE FROM {mytable} WHERE smid = '%s'", $sitemap->smid); +} + +/** + * @} End of "addtogroup hooks". + */ diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.drush.inc b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.drush.inc new file mode 100644 index 00000000..4bd09648 --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.drush.inc @@ -0,0 +1,171 @@ +<?php + +/** + * @file + * Drush integration functions for the xmlsitemap module. + * + * @ingroup xmlsitemap + */ + +/** + * Implements hook_drush_command(). + */ +function xmlsitemap_drush_command() { + $items['xmlsitemap-regenerate'] = array( + 'description' => 'Regenerate the XML sitemap files.', + 'callback' => 'drush_xmlsitemap_regenerate', + 'drupal dependencies' => array('xmlsitemap'), + ); + $items['xmlsitemap-rebuild'] = array( + 'description' => 'Dump and re-process all possible XML sitemap data, and then regenerate the files.', + 'callback' => 'drush_xmlsitemap_rebuild', + 'drupal dependencies' => array('xmlsitemap'), + 'options' => array( + 'types' => 'The types of links to rebuild, comma separated. If not provided, all link types will be used.', + ), + ); + $items['xmlsitemap-index'] = array( + 'description' => 'Process un-indexed XML sitemap links.', + 'callback' => 'drush_xmlsitemap_index', + 'drupal dependencies' => array('xmlsitemap'), + 'options' => array( + 'limit' => 'The limit of links of each type to process. Default value: ' . variable_get('xmlsitemap_batch_limit', 100), + ), + ); + $items['xmlsitemap-queue-rebuild'] = array( + 'description' => 'Dump and queues all possible XML sitemap data to be re-processed via the xmlsitemap_link_process queue. This command does not regenerate the sitemap files.', + 'options' => array( + 'types' => 'The types of links to queue for rebuild, comma separated. If not provided, all link types will be used.', + 'limit' => 'The number of links to be processed in each queue task.', + ), + ); + return $items; +} + +/** + * Regenerate the sitemap files from existing data. + */ +function drush_xmlsitemap_regenerate() { + module_load_include('generate.inc', 'xmlsitemap'); + + // Run the batch process. + timer_start('xmlsitemap_regenerate'); + xmlsitemap_run_unprogressive_batch('xmlsitemap_regenerate_batch'); + + $vars = array( + '@timer' => timer_read('xmlsitemap_regenerate'), + '@memory-peak' => format_size(memory_get_peak_usage(TRUE)), + ); + drush_print(dt('XML sitemap files regenerated in @timer ms. Peak memory usage: @memory-peak.', $vars)); +} + +/** + * Dump and rebuild all the sitemap data, then regenerate the files. + */ +function drush_xmlsitemap_rebuild() { + module_load_include('generate.inc', 'xmlsitemap'); + + // Build a list of rebuildable link types. + $types = xmlsitemap_get_rebuildable_link_types(); + if ($option_types = drush_get_option('types', '')) { + $option_types = explode(',', $option_types); + if ($invalid_types = array_diff($option_types, $types)) { + drush_set_error(dt('The following link types are invalid: @types', array('@types' => implode(', ', $invalid_types)))); + } + $types = array_intersect($types, $option_types); + } + if (empty($types)) { + return drush_set_error(dt('No link types are rebuildable.')); + } + + // Run the batch process. + timer_start('xmlsitemap_rebuild'); + xmlsitemap_run_unprogressive_batch('xmlsitemap_rebuild_batch', $types, TRUE); + + $vars = array( + '@timer' => timer_read('xmlsitemap_rebuild'), + '@memory-peak' => format_size(memory_get_peak_usage(TRUE)), + ); + drush_print(dt('XML sitemap files rebuilt in @timer ms. Peak memory usage: @memory-peak.', $vars)); +} + +/** + * Process un-indexed XML sitemap links. + */ +function drush_xmlsitemap_index() { + $limit = (int) drush_get_option('limit', variable_get('xmlsitemap_batch_limit', 100)); + $count_before = db_query("SELECT COUNT(id) FROM {xmlsitemap}")->fetchField(); + + module_invoke_all('xmlsitemap_index_links', $limit); + $count_after = db_query("SELECT COUNT(id) FROM {xmlsitemap}")->fetchField(); + + if ($count_after == $count_before) { + drush_print(dt('No new XML sitemap links to index.')); + } + else { + drush_print(dt('Indexed @count new XML sitemap links.', array('@count' => $count_after - $count_before))); + } +} + +/** + * Dump and queue all the sitemap links to be rebuilt in a queue process. + */ +function drush_xmlsitemap_queue_rebuild() { + module_load_include('generate.inc', 'xmlsitemap'); + + $types = xmlsitemap_get_rebuildable_link_types(); + if ($option_types = drush_get_option('types', '')) { + $option_types = explode(',', $option_types); + if ($invalid_types = array_diff($option_types, $types)) { + drush_set_error(dt('The following link types are invalid: @types', array('@types' => implode(', ', $invalid_types)))); + } + $types = array_intersect($types, $option_types); + } + if (empty($types)) { + return drush_set_error(dt('No link types are rebuildable.')); + } + + xmlsitemap_rebuild_clear($types, TRUE); + + $link_count = 0; + $chunk_count = 0; + $chunk_size = (int) drush_get_option('limit', variable_get('xmlsitemap_batch_limit', 100)); + + // @todo Figure out how to re-use this code with xmlsitemap_rebuild_batch_fetch() + foreach ($types as $type) { + $info = xmlsitemap_get_link_info($type); + $query = new EntityFieldQuery(); + $query->entityCondition('entity_type', $type); + $query->entityCondition('entity_id', 0, '>'); + $query->addTag('xmlsitemap_link_bundle_access'); + $query->addTag('xmlsitemap_rebuild'); + $query->addMetaData('entity', $type); + $query->addMetaData('entity_info', $info); + if ($bundles = xmlsitemap_get_link_type_enabled_bundles($type)) { + $query->entityCondition('bundle', $bundles, 'IN'); + } + else { + // If no enabled bundle types, skip everything else. + continue; + } + + $results = $query->execute(); + if (!empty($results[$type])) { + $ids = array_keys($results[$type]); + $link_count += count($ids); + $chunks = array_chunk($ids, $chunk_size); + $chunk_count += count($chunks); + foreach ($chunks as $chunk) { + xmlsitemap_link_enqueue($type, $chunk); + } + } + } + + if ($link_count) { + drush_log(dt('Queued @link_count links for rebuild processing in the xmlsitemap_link_process (in @chunk_count chunks of up to @chunk_size links each).', array('@link_count' => $link_count, '@chunk_count' => $chunk_count, '@chunk_size' => $chunk_size)), 'success'); + } + else { + drush_log(dt('No links to queue for rebuild processing.'), 'ok'); + } + variable_set('xmlsitemap_rebuild_needed', FALSE); +} diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.generate.inc b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.generate.inc new file mode 100644 index 00000000..57c3bc18 --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.generate.inc @@ -0,0 +1,551 @@ +<?php + +/** + * @file + * Sitemap generation and rebuilding functions for the xmlsitemap module. + * + * @ingroup xmlsitemap + */ + +/** + * Given an internal Drupal path, return the alias for the path. + * + * This is similar to drupal_get_path_alias(), but designed to fetch all alises + * at once so that only one database query is executed instead of several or + * possibly thousands during sitemap generation. + * + * @param $path + * An internal Drupal path. + * @param $language + * A language code to use when looking up the paths. + */ +function xmlsitemap_get_path_alias($path, $language) { + static $aliases; + static $last_language; + + if (!isset($aliases)) { + $aliases[LANGUAGE_NONE] = db_query("SELECT source, alias FROM {url_alias} WHERE language = :language ORDER BY pid", array(':language' => LANGUAGE_NONE))->fetchAllKeyed(); + } + if ($language != LANGUAGE_NONE && $last_language != $language) { + unset($aliases[$last_language]); + $aliases[$language] = db_query("SELECT source, alias FROM {url_alias} WHERE language = :language ORDER BY pid", array(':language' => $language))->fetchAllKeyed(); + $last_language = $language; + } + + // We need to pass our path through hook_url_outbound_alter(). This fixes + // clean URLs not working when they don't exist in the {url_alias} table and + // are created with something like subpathauto. + $normalized_path = $path; + + // hook_url_outbound_alter() expects defaults in url() options. + $options = array( + 'fragment' => '', + 'query' => array(), + 'absolute' => FALSE, + 'alias' => FALSE, + 'prefix' => '', + 'external' => FALSE, + ); + + if ($language != LANGUAGE_NONE && isset($aliases[$language][$path])) { + $normalized_path = $aliases[$language][$path]; + $options['alias'] = TRUE; + } + elseif (isset($aliases[LANGUAGE_NONE][$path])) { + $normalized_path = $aliases[LANGUAGE_NONE][$path]; + $options['alias'] = TRUE; + } + + $original_path = $normalized_path; + drupal_alter('url_outbound', $normalized_path, $options, $original_path); + return $normalized_path; +} + +/** + * Perform operations before rebuilding the sitemap. + */ +function _xmlsitemap_regenerate_before() { + // Attempt to increase the memory limit. + _xmlsitemap_set_memory_limit(); + + if (variable_get('xmlsitemap_developer_mode', 0)) { + watchdog('xmlsitemap', 'Starting XML sitemap generation. Memory usage: @memory-peak.', array( + '@memory-peak' => format_size(memory_get_peak_usage(TRUE)), + ), + WATCHDOG_DEBUG + ); + } +} + +function _xmlsitemap_get_memory_usage($start = FALSE) { + static $memory_start; + $current = memory_get_peak_usage(TRUE); + if (!isset($memory_start) || $start) { + $memory_start = $current; + } + return $current - $memory_start; +} + +/** + * Calculate the optimal PHP memory limit for sitemap generation. + * + * This function just makes a guess. It does not take into account + * the currently loaded modules. + */ +function _xmlsitemap_get_optimal_memory_limit() { + $optimal_limit = &drupal_static(__FUNCTION__); + if (!isset($optimal_limit)) { + // Set the base memory amount from the provided core constant. + $optimal_limit = parse_size(DRUPAL_MINIMUM_PHP_MEMORY_LIMIT); + + // Add memory based on the chunk size. + $optimal_limit += xmlsitemap_get_chunk_size() * 500; + + // Add memory for storing the url aliases. + if (variable_get('xmlsitemap_prefetch_aliases', 1)) { + $aliases = db_query("SELECT COUNT(pid) FROM {url_alias}")->fetchField(); + $optimal_limit += $aliases * 250; + } + } + return $optimal_limit; +} + +/** + * Calculate the optimal memory level for sitemap generation. + * + * @param $new_limit + * An optional PHP memory limit in bytes. If not provided, the value of + * _xmlsitemap_get_optimal_memory_limit() will be used. + */ +function _xmlsitemap_set_memory_limit($new_limit = NULL) { + $current_limit = @ini_get('memory_limit'); + if ($current_limit && $current_limit != -1) { + if (!is_null($new_limit)) { + $new_limit = _xmlsitemap_get_optimal_memory_limit(); + } + if (parse_size($current_limit) < $new_limit) { + return @ini_set('memory_limit', $new_limit); + } + } +} + +/** + * Generate one page (chunk) of the sitemap. + * + * @param $sitemap + * An unserialized data array for an XML sitemap. + * @param $page + * An integer of the specific page of the sitemap to generate. + */ +function xmlsitemap_generate_page(stdClass $sitemap, $page) { + try { + $writer = new XMLSitemapWriter($sitemap, $page); + $writer->startDocument(); + $writer->generateXML(); + $writer->endDocument(); + } + catch (Exception $e) { + watchdog_exception('xmlsitemap', $e); + throw $e; + return FALSE; + } + + return $writer->getSitemapElementCount(); +} + +function xmlsitemap_generate_chunk(stdClass $sitemap, XMLSitemapWriter $writer, $chunk) { + $output_elements = drupal_map_assoc(variable_get('xmlsitemap_output_elements', array('lastmod', 'changefreq', 'priority'))); + $lastmod_format = variable_get('xmlsitemap_lastmod_format', XMLSITEMAP_LASTMOD_MEDIUM); + + $url_options = $sitemap->uri['options']; + $url_options += array( + 'absolute' => TRUE, + 'base_url' => variable_get('xmlsitemap_base_url', $GLOBALS['base_url']), + 'language' => language_default(), + 'alias' => variable_get('xmlsitemap_prefetch_aliases', TRUE), + ); + + $last_url = ''; + $link_count = 0; + + $query = db_select('xmlsitemap', 'x'); + $query->fields('x', array('id', 'type', 'subtype', 'loc', 'lastmod', 'changefreq', 'changecount', 'priority', 'language', 'access', 'status')); + $query->condition('x.access', 1); + $query->condition('x.status', 1); + $query->orderBy('x.language', 'DESC'); + $query->orderBy('x.loc'); + $query->addTag('xmlsitemap_generate'); + $query->addMetaData('sitemap', $sitemap); + + $offset = max($chunk - 1, 0) * xmlsitemap_get_chunk_size(); + $limit = xmlsitemap_get_chunk_size(); + $query->range($offset, $limit); + $links = $query->execute(); + + while ($link = $links->fetchAssoc()) { + $link['language'] = $link['language'] != LANGUAGE_NONE ? xmlsitemap_language_load($link['language']) : $url_options['language']; + if ($url_options['alias']) { + $link['loc'] = xmlsitemap_get_path_alias($link['loc'], $link['language']->language); + } + $link_options = array( + 'language' => $link['language'], + 'xmlsitemap_link' => $link, + 'xmlsitemap_sitemap' => $sitemap, + ); + // @todo Add a separate hook_xmlsitemap_link_url_alter() here? + $link_url = url($link['loc'], $link_options + $url_options); + + // Skip this link if it was a duplicate of the last one. + // @todo Figure out a way to do this before generation so we can report + // back to the user about this. + if ($link_url == $last_url) { + continue; + } + else { + $last_url = $link_url; + // Keep track of the total number of links written. + $link_count++; + } + + $element = array(); + $element['loc'] = $link_url; + if ($link['lastmod']) { + if (!empty($output_elements['lastmod'])) { + $element['lastmod'] = gmdate($lastmod_format, $link['lastmod']); + } + // If the link has a lastmod value, update the changefreq so that links + // with a short changefreq but updated two years ago show decay. + // We use abs() here just incase items were created on this same cron run + // because lastmod would be greater than REQUEST_TIME. + $link['changefreq'] = (abs(REQUEST_TIME - $link['lastmod']) + $link['changefreq']) / 2; + } + if (!empty($output_elements['changefreq']) && $link['changefreq']) { + $element['changefreq'] = xmlsitemap_get_changefreq($link['changefreq']); + } + if (!empty($output_elements['priority']) && isset($link['priority']) && $link['priority'] != 0.5) { + // Don't output the priority value for links that have 0.5 priority. This + // is the default 'assumed' value if priority is not included as per the + // sitemaps.org specification. + $element['priority'] = number_format($link['priority'], 1); + } + + // @todo Should this be moved to XMLSitemapWritier::writeSitemapElement()? + drupal_alter('xmlsitemap_element', $element, $link, $sitemap); + + $writer->writeSitemapElement('url', $element); + } + + return $link_count; +} + +/** + * Generate the index sitemap. + * + * @param $sitemap + * An unserialized data array for an XML sitemap. + */ +function xmlsitemap_generate_index(stdClass $sitemap) { + try { + $writer = new XMLSitemapIndexWriter($sitemap); + $writer->startDocument(); + $writer->generateXML(); + $writer->endDocument(); + } + catch (Exception $e) { + watchdog_exception('xmlsitemap', $e); + throw $e; + return FALSE; + } + + return $writer->getSitemapElementCount(); +} + +// BATCH OPERATIONS ------------------------------------------------------------ + +/** + * Batch information callback for regenerating the sitemap files. + * + * @param $smids + * An optional array of XML sitemap IDs. If not provided, it will load all + * existing XML sitemaps. + */ +function xmlsitemap_regenerate_batch(array $smids = array()) { + if (empty($smids)) { + $smids = db_query("SELECT smid FROM {xmlsitemap_sitemap}")->fetchCol(); + } + + //$t = get_t(); + $batch = array( + 'operations' => array(), + //'error_message' => $t('An error has occurred.'), + 'finished' => 'xmlsitemap_regenerate_batch_finished', + 'title' => t('Regenerating Sitemap'), + 'file' => drupal_get_path('module', 'xmlsitemap') . '/xmlsitemap.generate.inc', + ); + + // Set the regenerate flag in case something fails during file generation. + $batch['operations'][] = array('xmlsitemap_batch_variable_set', array(array('xmlsitemap_regenerate_needed' => TRUE))); + + // @todo Get rid of this batch operation. + $batch['operations'][] = array('_xmlsitemap_regenerate_before', array()); + + // Generate all the sitemap pages for each context. + foreach ($smids as $smid) { + $batch['operations'][] = array('xmlsitemap_regenerate_batch_generate', array($smid)); + $batch['operations'][] = array('xmlsitemap_regenerate_batch_generate_index', array($smid)); + } + + // Clear the regeneration flag. + $batch['operations'][] = array('xmlsitemap_batch_variable_set', array(array('xmlsitemap_regenerate_needed' => FALSE))); + + return $batch; +} + +/** + * Batch callback; generate all pages of a sitemap. + */ +function xmlsitemap_regenerate_batch_generate($smid, array &$context) { + if (!isset($context['sandbox']['sitemap'])) { + $context['sandbox']['sitemap'] = xmlsitemap_sitemap_load($smid); + $context['sandbox']['sitemap']->chunks = 1; + $context['sandbox']['sitemap']->links = 0; + $context['sandbox']['max'] = XMLSITEMAP_MAX_SITEMAP_LINKS; + + // Clear the cache directory for this sitemap before generating any files. + xmlsitemap_check_directory($context['sandbox']['sitemap']); + xmlsitemap_clear_directory($context['sandbox']['sitemap']); + } + + $sitemap = &$context['sandbox']['sitemap']; + $links = xmlsitemap_generate_page($sitemap, $sitemap->chunks); + $context['message'] = t('Now generating %sitemap-url.', array('%sitemap-url' => url('sitemap.xml', $sitemap->uri['options'] + array('query' => array('page' => $sitemap->chunks))))); + + if ($links) { + $sitemap->links += $links; + $sitemap->chunks++; + } + else { + // Cleanup the 'extra' empty file. + $file = xmlsitemap_sitemap_get_file($sitemap, $sitemap->chunks); + if (file_exists($file) && $sitemap->chunks > 1) { + file_unmanaged_delete($file); + } + $sitemap->chunks--; + + // Save the updated chunks and links values. + $context['sandbox']['max'] = $sitemap->chunks; + $sitemap->updated = REQUEST_TIME; + xmlsitemap_sitemap_get_max_filesize($sitemap); + xmlsitemap_sitemap_save($sitemap); + } + + if ($sitemap->chunks != $context['sandbox']['max']) { + $context['finished'] = $sitemap->chunks / $context['sandbox']['max']; + } +} + +/** + * Batch callback; generate the index page of a sitemap. + */ +function xmlsitemap_regenerate_batch_generate_index($smid, array &$context) { + $sitemap = xmlsitemap_sitemap_load($smid); + if ($sitemap->chunks > 1) { + xmlsitemap_generate_index($sitemap); + $context['message'] = t('Now generating sitemap index %sitemap-url.', array('%sitemap-url' => url('sitemap.xml', $sitemap->uri['options']))); + } +} + +/** + * Batch callback; sitemap regeneration finished. + */ +function xmlsitemap_regenerate_batch_finished($success, $results, $operations, $elapsed) { + if ($success && !variable_get('xmlsitemap_regenerate_needed', FALSE)) { + variable_set('xmlsitemap_generated_last', REQUEST_TIME); + //drupal_set_message(t('The sitemaps were regenerated.')); + // Show a watchdog message that the sitemap was regenerated. + watchdog('xmlsitemap', + 'Finished XML sitemap generation in @elapsed. Memory usage: @memory-peak.', + array( + '@elapsed' => $elapsed, + '@memory-peak' => format_size(memory_get_peak_usage(TRUE)), + ), + WATCHDOG_NOTICE + ); + } + else { + drupal_set_message(t('The sitemaps were not successfully regenerated.'), 'error'); + } +} + +/** + * Batch information callback for rebuilding the sitemap data. + */ +function xmlsitemap_rebuild_batch(array $entities, $save_custom = FALSE) { + $batch = array( + 'operations' => array(), + 'finished' => 'xmlsitemap_rebuild_batch_finished', + 'title' => t('Rebuilding Sitemap'), + 'file' => drupal_get_path('module', 'xmlsitemap') . '/xmlsitemap.generate.inc', + ); + + // Set the rebuild flag in case something fails during the rebuild. + $batch['operations'][] = array('xmlsitemap_batch_variable_set', array(array('xmlsitemap_rebuild_needed' => TRUE))); + + // Purge any links first. + $batch['operations'][] = array('xmlsitemap_rebuild_batch_clear', array($entities, (bool) $save_custom)); + + // Fetch all the sitemap links and save them to the {xmlsitemap} table. + foreach ($entities as $entity) { + $info = xmlsitemap_get_link_info($entity); + $batch['operations'][] = array($info['xmlsitemap']['rebuild callback'], array($entity)); + } + + // Clear the rebuild flag. + $batch['operations'][] = array('xmlsitemap_batch_variable_set', array(array('xmlsitemap_rebuild_needed' => FALSE))); + + // Add the regeneration batch. + $regenerate_batch = xmlsitemap_regenerate_batch(); + $batch['operations'] = array_merge($batch['operations'], $regenerate_batch['operations']); + + return $batch; +} + +/** + * Batch callback; set an array of variables and their values. + */ +function xmlsitemap_batch_variable_set(array $variables) { + foreach ($variables as $variable => $value) { + variable_set($variable, $value); + } +} + +/** + * Batch callback; clear sitemap links for entites. + */ +function xmlsitemap_rebuild_batch_clear(array $entities, $save_custom, &$context) { + if (!empty($entities)) { + xmlsitemap_rebuild_clear($entities, $save_custom); + } + $context['message'] = t('Purging links.'); +} + +/** + * Batch callback; fetch and add the sitemap links for a specific entity. + */ +function xmlsitemap_rebuild_batch_fetch($entity, &$context) { + if (!isset($context['sandbox']['info'])) { + $context['sandbox']['info'] = xmlsitemap_get_link_info($entity); + $context['sandbox']['progress'] = 0; + $context['sandbox']['last_id'] = 0; + } + $info = $context['sandbox']['info']; + + $query = new EntityFieldQuery(); + $query->entityCondition('entity_type', $entity); + $query->entityCondition('entity_id', $context['sandbox']['last_id'], '>'); + $query->addTag('xmlsitemap_link_bundle_access'); + $query->addTag('xmlsitemap_rebuild'); + $query->addMetaData('entity', $entity); + $query->addMetaData('entity_info', $info); + if ($types = xmlsitemap_get_link_type_enabled_bundles($entity)) { + $query->entityCondition('bundle', $types, 'IN'); + } + else { + // If no enabled bundle types, skip everything else. + return; + } + + if (!isset($context['sandbox']['max'])) { + $count_query = clone $query; + $count_query->count(); + $context['sandbox']['max'] = $count_query->execute(); + if (!$context['sandbox']['max']) { + // If there are no items to process, skip everything else. + return; + } + } + + // PostgreSQL cannot have the ORDERED BY in the count query. + $query->entityOrderBy('entity_id'); + + $limit = 20; //variable_get('xmlsitemap_batch_limit', 100) + $query->range(0, $limit); + + $result = $query->execute(); + $ids = array_keys($result[$entity]); + + $info['xmlsitemap']['process callback']($ids); + $context['sandbox']['last_id'] = end($ids); + $context['sandbox']['progress'] += count($ids); + $context['message'] = t('Now processing %entity @last_id (@progress of @count).', array('%entity' => $entity, '@last_id' => $context['sandbox']['last_id'], '@progress' => $context['sandbox']['progress'], '@count' => $context['sandbox']['max'])); + + if ($context['sandbox']['progress'] >= $context['sandbox']['max']) { + $context['finished'] = 1; + } + else { + $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max']; + } +} + +/** + * Batch callback; sitemap rebuild finished. + */ +function xmlsitemap_rebuild_batch_finished($success, $results, $operations, $elapsed) { + if ($success && !variable_get('xmlsitemap_rebuild_needed', FALSE)) { + drupal_set_message(t('The sitemap links were rebuilt.')); + } + else { + drupal_set_message(t('The sitemap links were not successfully rebuilt.'), 'error'); + } +} + +function xmlsitemap_get_rebuildable_link_types() { + $rebuild_types = array(); + $entities = xmlsitemap_get_link_info(); + + foreach ($entities as $entity => $info) { + if (empty($info['xmlsitemap']['rebuild callback'])) { + // If the entity is missing a rebuild callback, skip. + continue; + } + if (!empty($info['entity keys']['bundle']) && !xmlsitemap_get_link_type_enabled_bundles($entity)) { + // If the entity has bundles, but no enabled bundles, skip since + // rebuilding wouldn't get any links. + continue; + } + else { + $rebuild_types[] = $entity; + } + } + + return $rebuild_types; +} + +/** + * Clear all sitemap links for given entity types. + * + * @param array $types + * An array of link types. + * @param bool $save_custom + * A boolean if links with status or priority overridden should not be + * removed (and hence overridden values not lost). + * + * @return int + * The number of deleted links. + */ +function xmlsitemap_rebuild_clear(array $types, $save_custom) { + // Let other modules respond to the rebuild clearing. + module_invoke_all('xmlsitemap_rebuild_clear', $types, $save_custom); + + $query = db_delete('xmlsitemap'); + $query->condition('type', $types); + + // If we want to save the custom data, make sure to exclude any links + // that are not using default inclusion or priority. + if ($save_custom) { + $query->condition('status_override', 0); + $query->condition('priority_override', 0); + } + + return $query->execute(); +} diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.inc b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.inc new file mode 100644 index 00000000..e37fa88d --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.inc @@ -0,0 +1,89 @@ +<?php + +/** + * @file + * Miscellaneous functions for the xmlsitemap module. + * + * @ingroup xmlsitemap + */ + +/** + * Fetch a short blurb string about module maintainership and sponsors. + * + * This message will be FALSE in 'official' releases. + */ +function _xmlsitemap_get_blurb($check_version = TRUE) { + static $blurb; + + if (!isset($blurb)) { + $blurb = FALSE; + if (!$check_version || (($version = _xmlsitemap_get_version()) && preg_match('/dev|unstable|alpha|beta|HEAD/i', $version))) { + $sponsors = array( + l('Symantec', 'http://www.symantec.com/'), + l('WebWise Solutions', 'http://www.webwiseone.com/'), + l('Volacci', 'http://www.volacci.com/'), + l('lanetro', 'http://www.lanetro.com/'), + l('Coupons Dealuxe', 'http://couponsdealuxe.com/'), + ); + // Don't extract the following string for translation. + $blurb = '<div class="description"><p>Thank you for helping test the XML sitemap module rewrite. Please consider helping offset developer free time by <a href="http://davereid.chipin.com/">donating</a> or if your company is interested in sponsoring the rewrite or a specific feature, please <a href="http://davereid.net/contact">contact the developer</a>. Thank you to the following current sponsors: ' . implode(', ', $sponsors) . ', and all the individuals that have donated. This message will not be seen in the stable versions.</p></div>'; + //http://drupalmodules.com/module/xml-sitemap + } + } + + return $blurb; +} + +function _xmlsitemap_get_version() { + static $version; + if (!isset($version)) { + $modules = _system_rebuild_module_data(); + $version = $modules['xmlsitemap']->info['version']; + } + return $version; +} + +/** + * Check the status of all hook_requirements() from any xmlsitemap modules. + */ +function xmlsitemap_check_status() { + $messages = &drupal_static(__FUNCTION__); + + if (!isset($messages)) { + // Cache the list of modules that are checked. + if ($cache = cache_get('xmlsitemap:registry:requirements')) { + $modules = $cache->data; + } + else { + $modules = array(); + module_load_all_includes('install'); + foreach (module_implements('requirements') as $module) { + if (strpos($module, 'xmlsitemap') !== FALSE) { + $modules[] = $module; + } + } + cache_set('xmlsitemap:registry:requirements', $modules); + } + + $messages = array(); + foreach ($modules as $module) { + module_load_install($module); + $requirements = module_invoke($module, 'requirements', 'runtime'); + foreach ($requirements as $requirement) { + if (isset($requirement['severity']) && max(REQUIREMENT_OK, $requirement['severity'])) { + $messages[] = $requirement['description']; + } + } + } + + if ($messages) { + $message = t('One or more problems were detected with your XML sitemap configuration: !messages', array('!messages' => theme('item_list', array('items' => $messages)))); + if (user_access('access site reports')) { + $message .= t('Check the <a href="@status-report">status report</a> for more information.', array('@status-report' => url('admin/reports/status'))); + } + drupal_set_message($message, 'warning', FALSE); + } + } + + return !empty($messages); +} diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.info b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.info new file mode 100644 index 00000000..44d72585 --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.info @@ -0,0 +1,22 @@ +name = XML sitemap +description = Creates an XML sitemap conforming to the <a href="http://sitemaps.org/">sitemaps.org protocol</a>. +package = XML sitemap +core = 7.x +files[] = xmlsitemap.module +files[] = xmlsitemap.inc +files[] = xmlsitemap.admin.inc +files[] = xmlsitemap.drush.inc +files[] = xmlsitemap.generate.inc +files[] = xmlsitemap.xmlsitemap.inc +files[] = xmlsitemap.pages.inc +files[] = xmlsitemap.install +files[] = xmlsitemap.test +recommends[] = robotstxt +configure = admin/config/search/xmlsitemap + +; Information added by Drupal.org packaging script on 2016-05-25 +version = "7.x-2.3" +core = "7.x" +project = "xmlsitemap" +datestamp = "1464191061" + diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.install b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.install new file mode 100644 index 00000000..916ebec0 --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.install @@ -0,0 +1,570 @@ +<?php + +/** + * @file + * Install, update and uninstall functions for the xmlsitemap module. + * + * @ingroup xmlsitemap + */ + +/** + * Implements hook_requirements(). + */ +function xmlsitemap_requirements($phase) { + $requirements = array(); + $t = get_t(); + + // Check that required PHP extensions are enabled. + // Note: Drupal 7 already requires the 'xml' extension. + $required_extensions = array('xmlwriter'); + $missing_extensions = array_diff($required_extensions, array_filter($required_extensions, 'extension_loaded')); + + if (!empty($missing_extensions)) { + $requirements['xmlsitemap_php_extensions'] = array( + 'title' => $t('XML sitemap PHP extensions'), + 'value' => $t('Disabled'), + 'severity' => REQUIREMENT_ERROR, + 'description' => $t("The XML sitemap module requires you to enable the PHP extensions in the following list (see the <a href=\"@xmlsitemap_requirements\">module's system requirements page</a> for more information):", array( + '@xmlsitemap_requirements' => 'http://drupal.org/documentation/modules/xmlsitemap/requirements', + )) . theme('item_list', array('items' => $missing_extensions)), + ); + } + + if ($phase == 'runtime') { + // If clean URLs are disabled there must not be an actual sitemap.xml in + // the root directory. + if (variable_get('clean_url', 0) && file_exists(DRUPAL_ROOT . '/sitemap.xml')) { + $requirements['xmlsitemap_file'] = array( + 'title' => $t('XML sitemap'), + 'value' => $t('Existing sitemap.xml file found.'), + 'severity' => REQUIREMENT_ERROR, + 'description' => $t('The XML sitemap module cannot display its XML output if there is an existing sitemap.xml file in your website root.'), + ); + } + + // Check that the base directory and all its subdirectories are writable. + $requirements['xmlsitemap_directory'] = array( + 'title' => $t('XML sitemap cache directory'), + 'value' => $t('Writable'), + ); + if (!xmlsitemap_check_directory()) { + $requirements['xmlsitemap_directory']['value'] = $t('Not found or not writable'); + $requirements['xmlsitemap_directory']['severity'] = REQUIREMENT_ERROR; + $requirements['xmlsitemap_directory']['description'] = $t('The directory %directory was not found or is not writable by the server. See <a href="@docpage">@docpage</a> for more information.', array('%directory' => xmlsitemap_get_directory(), '@docpage' => 'http://drupal.org/node/34025')); + } + else { + $directories = xmlsitemap_check_all_directories(); + foreach ($directories as $directory => $writable) { + if ($writable) { + unset($directories[$directory]); + } + } + if (!empty($directories)) { + $requirements['xmlsitemap_directory']['value'] = $t('Not found or not writable'); + $requirements['xmlsitemap_directory']['severity'] = REQUIREMENT_ERROR; + $requirements['xmlsitemap_directory']['description'] = $t('The following directories were not found or are not writable by the server. See <a href="@docpage">@docpage</a> for more information. !directories', array('!directories' => theme('item_list', array('items' => array_keys($directories))), '@docpage' => 'http://drupal.org/node/34025')); + } + } + + // The maximum number of links in a sitemap. + $max_links = db_query("SELECT MAX(links) FROM {xmlsitemap_sitemap}")->fetchField(); + $max_links_limit = XMLSITEMAP_MAX_SITEMAP_LINKS * XMLSITEMAP_MAX_SITEMAP_LINKS; + if ($max_links > $max_links_limit) { + $requirements['xmlsitemap_link_count'] = array( + 'title' => $t('XML sitemap link count'), + 'value' => $max_links, + 'description' => $t('You have exceeded the number of links that your sitemap can contain (@num).', array('@num' => number_format($max_links))), + 'severity' => REQUIREMENT_ERROR, + ); + } + + // The maximum number of chunks in a sitemap. + $max_chunks = db_query("SELECT MAX(chunks) FROM {xmlsitemap_sitemap}")->fetchField(); + if ($max_chunks > XMLSITEMAP_MAX_SITEMAP_LINKS) { + $requirements['xmlsitemap_chunk_count'] = array( + 'title' => $t('XML sitemap page count'), + 'value' => $max_chunks, + 'description' => $t('You have exceeded the number of sitemap pages (@number).', array('@number' => number_format(XMLSITEMAP_MAX_SITEMAP_LINKS))), + 'severity' => REQUIREMENT_ERROR, + ); + if (!in_array(xmlsitemap_get_chunk_size(), array(50000, 'auto'))) { + $requirements['xmlsitemap_chunk_count']['description'] .= ' ' . t('Please increase the number of links per page.'); + } + } + + // Check maximum file size. + $max_filesize = db_query("SELECT MAX(max_filesize) FROM {xmlsitemap_sitemap}")->fetchField(); + $requirements['xmlsitemap_file_size'] = array( + 'title' => $t('XML sitemap maximum file size'), + 'value' => format_size($max_filesize), + ); + if ($max_filesize > XMLSITEMAP_MAX_SITEMAP_FILESIZE) { + $requirements['xmlsitemap_file_size']['description'] = $t('You have exceeded the maximum sitemap file size of @size. If possible, decrease the number of links per sitemap page.', array('@size' => format_size(XMLSITEMAP_MAX_SITEMAP_FILESIZE))); + $requirements['xmlsitemap_file_size']['severity'] = REQUIREMENT_ERROR; + } + elseif (!variable_get('xmlsitemap_developer_mode', 0)) { + unset($requirements['xmlsitemap_file_size']); + } + + // Check when the cached files were last generated. + $generated_last = variable_get('xmlsitemap_generated_last', 0); + $generated_ago = REQUEST_TIME - $generated_last; + $requirements['xmlsitemap_generated'] = array( + 'title' => $t('XML sitemap'), + 'value' => $generated_last ? $t('Last attempted generation on !date (!interval ago).', array('!date' => format_date($generated_last, 'small'), '!interval' => format_interval($generated_ago))) : $t('Cached files have not been generated yet.'), + 'severity' => REQUIREMENT_OK, + ); + if (variable_get('xmlsitemap_rebuild_needed', FALSE) && _xmlsitemap_rebuild_form_access()) { + $requirements['xmlsitemap_generated']['severity'] = REQUIREMENT_ERROR; + $requirements['xmlsitemap_generated']['description'] = $t('The XML sitemap data is out of sync and needs to be <a href="@link-rebuild">completely rebuilt<a>.', array('@link-rebuild' => url('admin/config/search/xmlsitemap/rebuild'))); + } + elseif (variable_get('xmlsitemap_regenerate_needed', FALSE)) { + if ($max_filesize == 0) { + // A maximum sitemap file size of 0 indicates an error in generation. + $requirements['xmlsitemap_generated']['severity'] = REQUIREMENT_ERROR; + } + elseif ($generated_ago >= variable_get('cron_threshold_error', 1209600)) { + $requirements['xmlsitemap_generated']['severity'] = REQUIREMENT_ERROR; + } + elseif ($generated_ago >= variable_get('cron_threshold_warning', 172800)) { + $requirements['xmlsitemap_generated']['severity'] = REQUIREMENT_WARNING; + } + if ($requirements['xmlsitemap_generated']['severity']) { + $requirements['xmlsitemap_generated']['description'] = $t('The XML cached files are out of date and need to be regenerated. You can <a href="@link-cron">run cron manually</a> to regenerate the sitemap files.', array('@link-cron' => url('admin/reports/status/run-cron', array('query' => drupal_get_destination())))); + } + } + } + + return $requirements; +} + +/** + * Implements hook_schema(). + */ +function xmlsitemap_schema() { + // @todo Rename to xmlsitemap_link + $schema['xmlsitemap'] = array( + 'description' => 'The base table for xmlsitemap links.', + 'fields' => array( + 'id' => array( + 'description' => 'Primary key with type; a unique id for the item.', + 'type' => 'int', + 'not null' => TRUE, + 'unsigned' => TRUE, + 'default' => 0, + ), + 'type' => array( + 'description' => 'Primary key with id; the type of item (e.g. node, user, etc.).', + 'type' => 'varchar', + 'length' => 32, + 'not null' => TRUE, + 'default' => '', + ), + 'subtype' => array( + 'description' => 'A sub-type identifier for the link (node type, menu name, term VID, etc.).', + 'type' => 'varchar', + 'length' => 128, + 'not null' => TRUE, + 'default' => '', + ), + 'loc' => array( + 'description' => 'The URL to the item relative to the Drupal path.', + 'type' => 'varchar', + 'length' => 255, + 'not null' => TRUE, + 'default' => '', + ), + 'language' => array( + 'description' => 'The {languages}.language of this link or an empty string if it is language-neutral.', + 'type' => 'varchar', + 'length' => 12, + 'not null' => TRUE, + 'default' => '', + ), + 'access' => array( + 'description' => 'A boolean that represents if the item is viewable by the anonymous user. This field is useful to store the result of node_access() so we can retain changefreq and priority_override information.', + 'type' => 'int', + 'size' => 'tiny', + 'not null' => TRUE, + 'default' => 1, + ), + 'status' => array( + 'description' => 'An integer that represents if the item is included in the sitemap.', + 'type' => 'int', + 'size' => 'tiny', + 'not null' => TRUE, + 'default' => 1, + ), + 'status_override' => array( + 'description' => 'A boolean that if TRUE means that the status field has been overridden from its default value.', + 'type' => 'int', + 'size' => 'tiny', + 'not null' => TRUE, + 'default' => 0, + ), + 'lastmod' => array( + 'description' => 'The UNIX timestamp of last modification of the item.', + 'type' => 'int', + 'unsigned' => TRUE, + 'not null' => TRUE, + 'default' => 0, + ), + 'priority' => array( + 'description' => 'The priority of this URL relative to other URLs on your site. Valid values range from 0.0 to 1.0.', + 'type' => 'float', + 'default' => NULL, + // @todo Convert this field to non-nullable. + //'default' => 0.5, + //'not null' => NULL, + ), + 'priority_override' => array( + 'description' => 'A boolean that if TRUE means that the priority field has been overridden from its default value.', + 'type' => 'int', + 'size' => 'tiny', + 'not null' => TRUE, + 'default' => 0, + ), + 'changefreq' => array( + 'description' => 'The average time in seconds between changes of this item.', + 'type' => 'int', + 'unsigned' => TRUE, + 'not null' => TRUE, + 'default' => 0, + ), + 'changecount' => array( + 'description' => 'The number of times this item has been changed. Used to help calculate the next changefreq value.', + 'type' => 'int', + 'unsigned' => TRUE, + 'not null' => TRUE, + 'default' => 0, + ), + ), + 'primary key' => array('id', 'type'), + 'indexes' => array( + 'loc' => array('loc'), + 'access_status_loc' => array('access', 'status', 'loc'), + 'type_subtype' => array('type', 'subtype'), + 'language' => array('language'), + ), + ); + + $schema['xmlsitemap_sitemap'] = array( + 'fields' => array( + 'smid' => array( + 'description' => 'The sitemap ID (the hashed value of {xmlsitemap}.context.', + 'type' => 'varchar', + 'length' => 64, + 'not null' => TRUE, + ), + 'context' => array( + 'description' => 'Serialized array with the sitemaps context', + 'type' => 'text', + 'not null' => TRUE, + 'serialize' => TRUE, + ), + 'updated' => array( + 'type' => 'int', + 'unsigned' => TRUE, + 'not null' => TRUE, + 'default' => 0, + ), + 'links' => array( + 'type' => 'int', + 'unsigned' => TRUE, + 'not null' => TRUE, + 'default' => 0, + ), + 'chunks' => array( + 'type' => 'int', + 'unsigned' => TRUE, + 'not null' => TRUE, + 'default' => 0, + ), + 'max_filesize' => array( + 'type' => 'int', + 'unsigned' => TRUE, + 'not null' => TRUE, + 'default' => 0, + ), + //'queued' => array( + // 'type' => 'int', + // 'unsigned' => TRUE, + // 'not null' => TRUE, + // 'default' => 0, + // 'description' => 'Time when this sitemap was queued for regeneration, 0 if not queued.', + //), + ), + 'primary key' => array('smid'), + ); + + return $schema; +} + +/** + * Implements hook_install(). + */ +function xmlsitemap_install() { + // Set this module's weight to 1 so xmlsitemap_cron() runs after all other + // xmlsitemap_x_cron() runs. + db_update('system') + ->fields(array('weight' => 1)) + ->condition('type', 'module') + ->condition('name', 'xmlsitemap') + ->execute(); + + // Load the module. + drupal_load('module', 'xmlsitemap'); + + // Insert the homepage link into the {xmlsitemap} table so we do not show an + // empty sitemap after install. + db_insert('xmlsitemap') + ->fields(array( + 'type' => 'frontpage', + 'id' => 0, + 'loc' => '', + 'priority' => variable_get('xmlsitemap_frontpage_priority', 1.0), + 'changefreq' => variable_get('xmlsitemap_frontpage_changefreq', XMLSITEMAP_FREQUENCY_DAILY), + 'language' => LANGUAGE_NONE, + )) + ->execute(); + + // Insert the default context sitemap. + $context = array(); + db_insert('xmlsitemap_sitemap') + ->fields(array( + 'smid' => xmlsitemap_sitemap_get_context_hash($context), + 'context' => serialize($context), + )) + ->execute(); + + // @todo Does the sitemap show up on first install or is it a 404 page? + + // Create the link process the queue. + /** @var DrupalReliableQueueInterface $queue */ + $queue = DrupalQueue::get('xmlsitemap_link_process', TRUE); + $queue->createQueue(); +} + +/** + * Implements hook_enable(). + */ +function xmlsitemap_enable() { + // Ensure the file cache directory is available and ready. + xmlsitemap_check_directory(); + + variable_set('xmlsitemap_regenerate_needed', TRUE); +} + +/** + * Implements hook_uninstall(). + */ +function xmlsitemap_uninstall() { + // Remove variables. + drupal_load('module', 'xmlsitemap'); + $variables = array_keys(xmlsitemap_variables()); + foreach ($variables as $variable) { + variable_del($variable); + } + + // Remove the file cache directory. + xmlsitemap_clear_directory(NULL, TRUE); + + // Remove the queue. + /** @var DrupalReliableQueueInterface $queue */ + $queue = DrupalQueue::get('xmlsitemap_link_process', TRUE); + $queue->deleteQueue(); +} + +/** + * Implements hook_update_last_removed(). + */ +function xmlsitemap_update_last_removed() { + return 6201; +} + +/** + * Create the {xmlsitemap_sitemap} table and add the sitemap context data. + */ +function xmlsitemap_update_6202() { + if (!db_table_exists('xmlsitemap_sitemap')) { + $schema['xmlsitemap_sitemap'] = array( + 'fields' => array( + 'smid' => array( + 'description' => 'Sitemap ID', + 'type' => 'serial', + 'unsigned' => TRUE, + 'not null' => TRUE, + ), + 'context_hash' => array( + 'description' => 'The MD5 hash of the context field.', + 'type' => 'varchar', + 'length' => 32, + 'not null' => TRUE, + 'default' => '', + ), + 'context' => array( + 'description' => 'Serialized array with the sitemaps context', + 'type' => 'text', + 'not null' => TRUE, + ), + 'updated' => array( + 'type' => 'int', + 'unsigned' => TRUE, + 'not null' => TRUE, + 'default' => 0, + ), + 'links' => array( + 'type' => 'int', + 'unsigned' => TRUE, + 'not null' => TRUE, + 'default' => 0, + ), + 'chunks' => array( + 'type' => 'int', + 'unsigned' => TRUE, + 'not null' => TRUE, + 'default' => 0, + ), + ), + 'primary key' => array('smid'), + 'unique keys' => array( + 'context_hash' => array('context_hash'), + ), + ); + db_create_table('xmlsitemap_sitemap', $schema['xmlsitemap_sitemap']); + } + + // Add the default sitemap(s) and use language contexts if possible. + if (!db_query_range("SELECT 1 FROM {xmlsitemap_sitemap}", 0, 1)->fetchField()) { + // Refresh the schema and load the module if it's disabled. + drupal_get_schema(NULL, TRUE); + drupal_load('module', 'xmlsitemap'); + + if (module_exists('xmlsitemap_i18n') && $languages = variable_get('xmlsitemap_languages', array())) { + foreach ($languages as $language) { + $sitemap = new stdClass(); + $sitemap->context = array('language' => $language); + xmlsitemap_sitemap_save($sitemap); + } + } + else { + $sitemap = new stdClass(); + $sitemap->context = array(); + xmlsitemap_sitemap_save($sitemap); + } + } + + // Language variable is no longer needed, so go ahead and delete it. + variable_del('xmlsitemap_languages'); + + // Ensure that the sitemaps will be refreshed on next cron. + variable_set('xmlsitemap_generated_last', 0); + variable_set('xmlsitemap_regenerate_needed', TRUE); +} + +/** + * Convert the xmlsitemap_max_filesize variable to a max_filesize column + * per-sitemap. + */ +function xmlsitemap_update_6203() { + if (db_field_exists('xmlsitemap_sitemap', 'max_filesize')) { + return; + } + + // Add the max_filesize column. + $field = array( + 'type' => 'int', + 'unsigned' => TRUE, + 'not null' => TRUE, + 'default' => 0, + ); + db_add_field('xmlsitemap_sitemap', 'max_filesize', $field); + + // Scan each sitemap directory for the largest file. + drupal_load('module', 'xmlsitemap'); + $sitemaps = xmlsitemap_sitemap_load_multiple(FALSE); + foreach ($sitemaps as $sitemap) { + xmlsitemap_sitemap_get_max_filesize($sitemap); + db_update('xmlsitemap_sitemap') + ->fields(array('max_filesize' => $sitemap->max_filesize)) + ->condition('smid', $sitemap->smid) + ->execute(); + } + + variable_del('xmlsitemap_max_filesize'); + variable_del('xmlsitemap_max_chunks'); +} + +/** + * Convert {xmlsitemap}.context_hash to replace {xmlsitemap}.smid. + */ +function xmlsitemap_update_6204() { + if (db_field_exists('xmlsitemap_sitemap', 'context_hash')) { + db_drop_unique_key('xmlsitemap_sitemap', 'context_hash'); + db_drop_field('xmlsitemap_sitemap', 'smid'); + + // Rename context_hash to the new smid column. + $smid_field = array( + 'description' => 'The sitemap ID (the hashed value of {xmlsitemap}.context.', + 'type' => 'varchar', + 'length' => 64, + 'not null' => TRUE, + ); + db_change_field('xmlsitemap_sitemap', 'context_hash', 'smid', $smid_field); + + // Re-add the primary key now that the smid field is changed. + // We don't need to drop the primary key since we already dropped the field + // that was the primary key. + db_add_primary_key('xmlsitemap_sitemap', array('smid')); + } + + _xmlsitemap_sitemap_rehash_all(); +} + +/** + * Update empty string languages to LANGUAGE_NONE. + */ +function xmlsitemap_update_7200() { + db_update('xmlsitemap') + ->fields(array('language' => LANGUAGE_NONE)) + ->condition('language', '') + ->execute(); +} + +/** + * Re-run xmlsitemap_update_6202() to ensure sitemap data has been added. + */ +function xmlsitemap_update_7201() { + xmlsitemap_update_6202(); +} + +/** + * Convert the xmlsitemap_max_filesize variable to a max_filesize column + * per-sitemap. + */ +function xmlsitemap_update_7202() { + xmlsitemap_update_6203(); +} + +/** + * Convert {xmlsitemap}.context_hash to replace {xmlsitemap}.smid. + */ +function xmlsitemap_update_7203() { + xmlsitemap_update_6204(); + _xmlsitemap_sitemap_rehash_all(); +} + +function _xmlsitemap_sitemap_rehash_all() { + // Reload the schema cache and reprocess all sitemap hashes into smids. + drupal_load('module', 'xmlsitemap'); + drupal_get_schema(NULL, TRUE); + + // Force a rehash of all sitemaps. + $sitemaps = xmlsitemap_sitemap_load_multiple(FALSE); + foreach ($sitemaps as $sitemap) { + $hash = xmlsitemap_sitemap_get_context_hash($sitemap->context); + if ($hash != $sitemap->smid) { + xmlsitemap_sitemap_save($sitemap); + } + } +} diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.js b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.js new file mode 100644 index 00000000..06b92bcd --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.js @@ -0,0 +1,22 @@ + +(function ($) { + +Drupal.behaviors.xmlsitemapFieldsetSummaries = { + attach: function (context) { + $('fieldset#edit-xmlsitemap', context).drupalSetSummary(function (context) { + var vals = []; + + // Inclusion select field. + var status = $('#edit-xmlsitemap-status option:selected').text(); + vals.push(Drupal.t('Inclusion: @value', { '@value': status })); + + // Priority select field. + var priority = $('#edit-xmlsitemap-priority option:selected').text(); + vals.push(Drupal.t('Priority: @value', { '@value': priority })); + + return vals.join('<br />'); + }); + } +}; + +})(jQuery); diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.module b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.module new file mode 100644 index 00000000..09d02ea1 --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.module @@ -0,0 +1,1595 @@ +<?php + +/** + * @defgroup xmlsitemap XML sitemap + */ + +/** + * @file + * Main file for the xmlsitemap module. + */ + +/** + * The maximum number of links in one sitemap chunk file. + */ +define('XMLSITEMAP_MAX_SITEMAP_LINKS', 50000); + +/** + * The maximum filesize of a sitemap chunk file. + */ +define('XMLSITEMAP_MAX_SITEMAP_FILESIZE', 10485760); + +define('XMLSITEMAP_FREQUENCY_YEARLY', 31449600); // 60 * 60 * 24 * 7 * 52 +define('XMLSITEMAP_FREQUENCY_MONTHLY', 2419200); // 60 * 60 * 24 * 7 * 4 +define('XMLSITEMAP_FREQUENCY_WEEKLY', 604800); // 60 * 60 * 24 * 7 +define('XMLSITEMAP_FREQUENCY_DAILY', 86400); // 60 * 60 * 24 +define('XMLSITEMAP_FREQUENCY_HOURLY', 3600); // 60 * 60 +define('XMLSITEMAP_FREQUENCY_ALWAYS', 60); + +/** + * Short lastmod timestamp format. + */ +define('XMLSITEMAP_LASTMOD_SHORT', 'Y-m-d'); + +/** + * Medium lastmod timestamp format. + */ +define('XMLSITEMAP_LASTMOD_MEDIUM', 'Y-m-d\TH:i\Z'); + +/** + * Long lastmod timestamp format. + */ +define('XMLSITEMAP_LASTMOD_LONG', 'c'); + +/** + * The default inclusion status for link types in the sitemaps. + */ +define('XMLSITEMAP_STATUS_DEFAULT', 0); + +/** + * The default priority for link types in the sitemaps. + */ +define('XMLSITEMAP_PRIORITY_DEFAULT', 0.5); + +/** + * Implements hook_hook_info(). + */ +function xmlsitemap_hook_info() { + $hooks = array( + 'xmlsitemap_link_info', + 'xmlsitemap_link_info_alter', + 'xmlsitemap_link_alter', + 'xmlsitemap_index_links', + 'xmlsitemap_context_info', + 'xmlsitemap_context_info_alter', + 'xmlsitemap_context_url_options', + 'xmlsitemap_context', + 'xmlsitemap_element_alter', + 'xmlsitemap_root_attributes_alter', + 'xmlsitemap_sitemap_insert', + 'xmlsitemap_sitemap_update', + 'xmlsitemap_sitemap_operations', + 'xmlsitemap_sitemap_delete', + 'xmlsitemap_sitemap_link_url_options_alter', + 'query_xmlsitemap_generate_alter', + 'query_xmlsitemap_link_bundle_access_alter', + 'form_xmlsitemap_sitemap_edit_form_alter', + 'xmlsitemap_rebuild_clear', + ); + + $hooks = array_combine($hooks, $hooks); + foreach ($hooks as $hook => $info) { + $hooks[$hook] = array('group' => 'xmlsitemap'); + } + + return $hooks; +} + +/** + * Implements hook_help(). + */ +function xmlsitemap_help($path, $arg) { + $output = ''; + + switch ($path) { + case 'admin/help/xmlsitemap': + case 'admin/config/search/xmlsitemap/settings/%/%/%': + case 'admin/config/search/xmlsitemap/edit/%': + case 'admin/config/search/xmlsitemap/delete/%': + return; + case 'admin/help#xmlsitemap': + break; + case 'admin/config/search/xmlsitemap': + break; + case 'admin/config/search/xmlsitemap/rebuild': + $output .= '<p>' . t("This action rebuilds your site's XML sitemap and regenerates the cached files, and may be a lengthy process. If you just installed XML sitemap, this can be helpful to import all your site's content into the sitemap. Otherwise, this should only be used in emergencies.") . '</p>'; + } + + if (arg(0) == 'admin' && strpos($path, 'xmlsitemap') !== FALSE && user_access('administer xmlsitemap')) { + module_load_include('inc', 'xmlsitemap'); + if ($arg[1] == 'config') { + // Alert the user to any potential problems detected by hook_requirements. + xmlsitemap_check_status(); + } + $output .= _xmlsitemap_get_blurb(); + } + + return $output; +} + +/** + * Implements hook_perm(). + */ +function xmlsitemap_permission() { + $permissions['administer xmlsitemap'] = array( + 'title' => t('Administer XML sitemap settings.'), + ); + return $permissions; +} + +/** + * Implements hook_menu(). + */ +function xmlsitemap_menu() { + $items['admin/config/search/xmlsitemap'] = array( + 'title' => 'XML sitemap', + 'description' => "Configure your site's XML sitemaps to help search engines find and index pages on your site.", + 'page callback' => 'drupal_get_form', + 'page arguments' => array('xmlsitemap_sitemap_list_form'), + 'access arguments' => array('administer xmlsitemap'), + 'file' => 'xmlsitemap.admin.inc', + ); + $items['admin/config/search/xmlsitemap/list'] = array( + 'title' => 'List', + 'type' => MENU_DEFAULT_LOCAL_TASK, + 'weight' => -10, + ); + $items['admin/config/search/xmlsitemap/add'] = array( + 'title' => 'Add new XML sitemap', + 'page callback' => 'drupal_get_form', + 'page arguments' => array('xmlsitemap_sitemap_edit_form'), + 'access arguments' => array('administer xmlsitemap'), + 'type' => MENU_LOCAL_ACTION, + 'file' => 'xmlsitemap.admin.inc', + 'modal' => TRUE, + 'options' => array('modal' => TRUE), + ); + $items['admin/config/search/xmlsitemap/edit/%xmlsitemap_sitemap'] = array( + 'title' => 'Edit XML sitemap', + 'page callback' => 'drupal_get_form', + 'page arguments' => array('xmlsitemap_sitemap_edit_form', 5), + 'access arguments' => array('administer xmlsitemap'), + 'file' => 'xmlsitemap.admin.inc', + 'modal' => TRUE, + ); + $items['admin/config/search/xmlsitemap/delete/%xmlsitemap_sitemap'] = array( + 'title' => 'Delete XML sitemap', + 'page callback' => 'drupal_get_form', + 'page arguments' => array('xmlsitemap_sitemap_delete_form', 5), + 'access arguments' => array('administer xmlsitemap'), + 'file' => 'xmlsitemap.admin.inc', + 'modal' => TRUE, + ); + + $items['admin/config/search/xmlsitemap/settings'] = array( + 'title' => 'Settings', + 'page callback' => 'drupal_get_form', + 'page arguments' => array('xmlsitemap_settings_form'), + 'access arguments' => array('administer xmlsitemap'), + 'type' => MENU_LOCAL_TASK, + 'file' => 'xmlsitemap.admin.inc', + 'weight' => 10, + ); + $items['admin/config/search/xmlsitemap/settings/%xmlsitemap_link_bundle/%'] = array( + 'load arguments' => array(6), + 'page callback' => 'drupal_get_form', + 'page arguments' => array('xmlsitemap_link_bundle_settings_form', 5), + 'access callback' => 'xmlsitemap_link_bundle_access', + 'access arguments' => array(5), + 'file' => 'xmlsitemap.admin.inc', + 'modal' => TRUE, + ); + + $items['admin/config/search/xmlsitemap/rebuild'] = array( + 'title' => 'Rebuild links', + 'description' => 'Rebuild the site map.', + 'page callback' => 'drupal_get_form', + 'page arguments' => array('xmlsitemap_rebuild_form'), + 'access callback' => '_xmlsitemap_rebuild_form_access', + 'type' => MENU_LOCAL_TASK, + 'file' => 'xmlsitemap.admin.inc', + 'weight' => 20, + ); + + $items['sitemap.xml'] = array( + 'page callback' => 'xmlsitemap_output_chunk', + 'access callback' => TRUE, + 'type' => MENU_CALLBACK, + 'file' => 'xmlsitemap.pages.inc', + ); + $items['sitemap.xsl'] = array( + 'page callback' => 'xmlsitemap_output_xsl', + 'access callback' => TRUE, + 'type' => MENU_CALLBACK, + 'file' => 'xmlsitemap.pages.inc', + ); + + return $items; +} + +/** + * Menu access callback; determines if the user can use the rebuild links page. + */ +function _xmlsitemap_rebuild_form_access() { + module_load_include('generate.inc', 'xmlsitemap'); + $rebuild_types = xmlsitemap_get_rebuildable_link_types(); + return !empty($rebuild_types) && user_access('administer xmlsitemap'); +} + +/** + * Implements hook_cron(). + * + * @todo Use new Queue system. Need to add {sitemap}.queued. + * @todo Regenerate one at a time? + */ +function xmlsitemap_cron() { + // If there were no new or changed links, skip. + if (!variable_get('xmlsitemap_regenerate_needed', FALSE)) { + return; + } + // If cron sitemap file regeneration is disabled, stop. + if (variable_get('xmlsitemap_disable_cron_regeneration', 0)) { + return; + } + + // If the minimum sitemap lifetime hasn't been passed, skip. + $lifetime = REQUEST_TIME - variable_get('xmlsitemap_generated_last', 0); + if ($lifetime < variable_get('xmlsitemap_minimum_lifetime', 0)) { + return; + } + + // Regenerate the sitemap XML files. + module_load_include('generate.inc', 'xmlsitemap'); + xmlsitemap_run_unprogressive_batch('xmlsitemap_regenerate_batch'); +} + +/** + * Implements hook_modules_enabled(). + */ +function xmlsitemap_modules_enabled(array $modules) { + cache_clear_all('xmlsitemap:', 'cache', TRUE); +} + +/** + * Implements hook_modules_disabled(). + */ +function xmlsitemap_modules_disabled(array $modules) { + cache_clear_all('xmlsitemap:', 'cache', TRUE); +} + +/** + * Implements hook_robotstxt(). + */ +function xmlsitemap_robotstxt() { + if ($sitemap = xmlsitemap_sitemap_load_by_context()) { + $robotstxt[] = 'Sitemap: ' . url($sitemap->uri['path'], $sitemap->uri['options']); + return $robotstxt; + } +} + +/** + * Internal default variables for xmlsitemap_var(). + */ +function xmlsitemap_variables() { + return array( + 'xmlsitemap_rebuild_needed' => FALSE, + 'xmlsitemap_regenerate_needed' => FALSE, + 'xmlsitemap_minimum_lifetime' => 0, + 'xmlsitemap_generated_last' => 0, + 'xmlsitemap_xsl' => 1, + 'xmlsitemap_prefetch_aliases' => 1, + 'xmlsitemap_chunk_size' => 'auto', + 'xmlsitemap_batch_limit' => 100, + 'xmlsitemap_path' => 'xmlsitemap', + 'xmlsitemap_base_url' => $GLOBALS['base_url'], + 'xmlsitemap_developer_mode' => 0, + 'xmlsitemap_frontpage_priority' => 1.0, + 'xmlsitemap_frontpage_changefreq' => XMLSITEMAP_FREQUENCY_DAILY, + 'xmlsitemap_lastmod_format' => XMLSITEMAP_LASTMOD_MEDIUM, + 'xmlsitemap_gz' => FALSE, + 'xmlsitemap_disable_cron_regeneration' => 0, + 'xmlsitemap_output_elements' => array('lastmod', 'changefreq', 'priority'), + // Removed variables are set to NULL so they can still be deleted. + 'xmlsitemap_regenerate_last' => NULL, + 'xmlsitemap_custom_links' => NULL, + 'xmlsitemap_priority_default' => NULL, + 'xmlsitemap_languages' => NULL, + 'xmlsitemap_max_chunks' => NULL, + 'xmlsitemap_max_filesize' => NULL, + ); +} + +/** + * Internal implementation of variable_get(). + */ +function xmlsitemap_var($name, $default = NULL) { + $defaults = &drupal_static(__FUNCTION__); + if (!isset($defaults)) { + $defaults = xmlsitemap_variables(); + } + + $name = 'xmlsitemap_' . $name; + + // @todo Remove when stable. + if (!isset($defaults[$name])) { + trigger_error(strtr('Default variable for %variable not found.', array('%variable' => drupal_placeholder($name)))); + } + + return variable_get($name, isset($default) || !isset($defaults[$name]) ? $default : $defaults[$name]); +} + +/** + * @defgroup xmlsitemap_api XML sitemap API. + * @{ + * This is the XML sitemap API to be used by modules wishing to work with + * XML sitemap and/or link data. + */ + +/** + * Load an XML sitemap array from the database. + * + * @param $smid + * An XML sitemap ID. + * + * @return + * The XML sitemap object. + */ +function xmlsitemap_sitemap_load($smid) { + $sitemap = xmlsitemap_sitemap_load_multiple(array($smid)); + return $sitemap ? reset($sitemap) : FALSE; +} + +/** + * Load multiple XML sitemaps from the database. + * + * @param $smids + * An array of XML sitemap IDs, or FALSE to load all XML sitemaps. + * @param $conditions + * An array of conditions in the form 'field' => $value. + * + * @return + * An array of XML sitemap objects. + */ +function xmlsitemap_sitemap_load_multiple($smids = array(), array $conditions = array()) { + if ($smids !== FALSE) { + $conditions['smid'] = $smids; + } + + $query = db_select('xmlsitemap_sitemap'); + $query->fields('xmlsitemap_sitemap'); + foreach ($conditions as $field => $value) { + $query->condition($field, $value); + } + + $sitemaps = $query->execute()->fetchAllAssoc('smid'); + foreach ($sitemaps as $smid => $sitemap) { + $sitemaps[$smid]->context = unserialize($sitemap->context); + $sitemaps[$smid]->uri = xmlsitemap_sitemap_uri($sitemaps[$smid]); + } + + return $sitemaps; +} + +/** + * Load an XML sitemap array from the database based on its context. + * + * @param $context + * An optional XML sitemap context array to use to find the correct XML + * sitemap. If not provided, the current site's context will be used. + * + * @see xmlsitemap_get_current_context() + */ +function xmlsitemap_sitemap_load_by_context(array $context = NULL) { + if (!isset($context)) { + $context = xmlsitemap_get_current_context(); + } + $hash = xmlsitemap_sitemap_get_context_hash($context); + $smid = db_query_range("SELECT smid FROM {xmlsitemap_sitemap} WHERE smid = :hash", 0, 1, array(':hash' => $hash))->fetchField(); + return xmlsitemap_sitemap_load($smid); +} + +/** + * Save changes to an XML sitemap or add a new XML sitemap. + * + * @param $sitemap + * The XML sitemap array to be saved. If $sitemap->smid is omitted, a new + * XML sitemap will be added. + * + * @todo Save the sitemap's URL as a column? + */ +function xmlsitemap_sitemap_save(stdClass $sitemap) { + if (!isset($sitemap->context)) { + $sitemap->context = array(); + } + + // Make sure context is sorted before saving the hash. + $sitemap->is_new = empty($sitemap->smid); + $sitemap->old_smid = $sitemap->is_new ? NULL : $sitemap->smid; + $sitemap->smid = xmlsitemap_sitemap_get_context_hash($sitemap->context); + + // If the context was changed, we need to perform additional actions. + if (!$sitemap->is_new && $sitemap->smid != $sitemap->old_smid) { + // Rename the files directory so the sitemap does not break. + $old_sitemap = (object) array('smid' => $sitemap->old_smid); + $old_dir = xmlsitemap_get_directory($old_sitemap); + $new_dir = xmlsitemap_get_directory($sitemap); + xmlsitemap_directory_move($old_dir, $new_dir); + + // Change the smid field so drupal_write_record() does not fail. + db_update('xmlsitemap_sitemap') + ->fields(array('smid' => $sitemap->smid)) + ->condition('smid', $sitemap->old_smid) + ->execute(); + + // Mark the sitemaps as needing regeneration. + variable_set('xmlsitemap_regenerate_needed', TRUE); + } + + if ($sitemap->is_new) { + drupal_write_record('xmlsitemap_sitemap', $sitemap); + module_invoke_all('xmlsitemap_sitemap_insert', $sitemap); + } + else { + drupal_write_record('xmlsitemap_sitemap', $sitemap, array('smid')); + module_invoke_all('xmlsitemap_sitemap_update', $sitemap); + } + + return $sitemap; +} + +/** + * Delete an XML sitemap. + * + * @param $smid + * An XML sitemap ID. + */ +function xmlsitemap_sitemap_delete($smid) { + xmlsitemap_sitemap_delete_multiple(array($smid)); +} + +/** + * Delete multiple XML sitemaps. + * + * @param $smids + * An array of XML sitemap IDs. + */ +function xmlsitemap_sitemap_delete_multiple(array $smids) { + if (!empty($smids)) { + $sitemaps = xmlsitemap_sitemap_load_multiple($smids); + db_delete('xmlsitemap_sitemap') + ->condition('smid', $smids) + ->execute(); + + foreach ($sitemaps as $sitemap) { + xmlsitemap_clear_directory($sitemap, TRUE); + module_invoke_all('xmlsitemap_sitemap_delete', $sitemap); + } + } +} + +/** + * Return the expected file path for a specific sitemap chunk. + * + * @param $sitemap + * An XML sitemap array. + * @param $chunk + * An optional specific chunk in the sitemap. Defaults to the index page. + */ +function xmlsitemap_sitemap_get_file(stdClass $sitemap, $chunk = 'index') { + return xmlsitemap_get_directory($sitemap) . "/{$chunk}.xml"; +} + +/** + * Find the maximum file size of all a sitemap's XML files. + * + * @param $sitemap + * The XML sitemap array. + */ +function xmlsitemap_sitemap_get_max_filesize(stdClass $sitemap) { + $dir = xmlsitemap_get_directory($sitemap); + $sitemap->max_filesize = 0; + foreach (file_scan_directory($dir, '/\.xml$/') as $file) { + $sitemap->max_filesize = max($sitemap->max_filesize, filesize($file->uri)); + } + return $sitemap->max_filesize; +} + +function xmlsitemap_sitemap_get_context_hash(array &$context) { + asort($context); + return drupal_hash_base64(serialize($context)); +} + +/** + * Returns the uri elements of an XML sitemap. + * + * @param $sitemap + * An unserialized data array for an XML sitemap. + * @return + * An array containing the 'path' and 'options' keys used to build the uri of + * the XML sitemap, and matching the signature of url(). + */ +function xmlsitemap_sitemap_uri(stdClass $sitemap) { + $uri['path'] = 'sitemap.xml'; + $uri['options'] = module_invoke_all('xmlsitemap_context_url_options', $sitemap->context); + drupal_alter('xmlsitemap_context_url_options', $uri['options'], $sitemap->context); + $uri['options'] += array( + 'absolute' => TRUE, + 'base_url' => variable_get('xmlsitemap_base_url', $GLOBALS['base_url']), + ); + return $uri; +} + +/** + * Load a specific sitemap link from the database. + * + * @param $entity_type + * A string with the entity type. + * @param $entity_id + * An integer with the entity ID. + * @return + * A sitemap link (array) or FALSE if the conditions were not found. + */ +function xmlsitemap_link_load($entity_type, $entity_id) { + $link = xmlsitemap_link_load_multiple(array('type' => $entity_type, 'id' => $entity_id)); + return $link ? reset($link) : FALSE; +} + +/** + * Load sitemap links from the database. + * + * @param $conditions + * An array of conditions on the {xmlsitemap} table in the form + * 'field' => $value. + * @return + * An array of sitemap link arrays. + */ +function xmlsitemap_link_load_multiple(array $conditions = array()) { + $query = db_select('xmlsitemap'); + $query->fields('xmlsitemap'); + + foreach ($conditions as $field => $value) { + $query->condition($field, $value); + } + + $links = $query->execute()->fetchAll(PDO::FETCH_ASSOC); + + return $links; +} + +/** + * Saves or updates a sitemap link. + * + * @param array $link + * An array with a sitemap link. + * @param array $context + * An optional context array containing data related to the link. + * + * @return array + * The saved sitemap link. + */ +function xmlsitemap_link_save(array $link, array $context = array()) { + $link += array( + 'access' => 1, + 'status' => 1, + 'status_override' => 0, + 'lastmod' => 0, + 'priority' => XMLSITEMAP_PRIORITY_DEFAULT, + 'priority_override' => 0, + 'changefreq' => 0, + 'changecount' => 0, + 'language' => LANGUAGE_NONE, + ); + + // Allow other modules to alter the link before saving. + drupal_alter('xmlsitemap_link', $link, $context); + + // Temporary validation checks. + // @todo Remove in final? + if ($link['priority'] < 0 || $link['priority'] > 1) { + trigger_error(t('Invalid sitemap link priority %priority.<br />@link', array('%priority' => $link['priority'], '@link' => var_export($link, TRUE))), E_USER_ERROR); + } + if ($link['changecount'] < 0) { + trigger_error(t('Negative changecount value. Please report this to <a href="@516928">@516928</a>.<br />@link', array('@516928' => 'http://drupal.org/node/516928', '@link' => var_export($link, TRUE))), E_USER_ERROR); + $link['changecount'] = 0; + } + + $existing = db_query_range("SELECT loc, access, status, lastmod, priority, changefreq, changecount, language FROM {xmlsitemap} WHERE type = :type AND id = :id", 0, 1, array(':type' => $link['type'], ':id' => $link['id']))->fetchAssoc(); + + // Check if this is a changed link and set the regenerate flag if necessary. + if (!variable_get('xmlsitemap_regenerate_needed', FALSE)) { + _xmlsitemap_check_changed_link($link, $existing, TRUE); + } + + // Save the link and allow other modules to respond to the link being saved. + if ($existing) { + drupal_write_record('xmlsitemap', $link, array('type', 'id')); + module_invoke_all('xmlsitemap_link_update', $link, $context); + } + else { + drupal_write_record('xmlsitemap', $link); + module_invoke_all('xmlsitemap_link_insert', $link, $context); + } + + return $link; +} + +/** + * Perform a mass update of sitemap data. + * + * If visible links are updated, this will automatically set the regenerate + * needed flag to TRUE. + * + * @param $updates + * An array of values to update fields to, keyed by field name. + * @param $conditions + * An array of values to match keyed by field. + * @return + * The number of links that were updated. + */ +function xmlsitemap_link_update_multiple($updates = array(), $conditions = array(), $check_flag = TRUE) { + // If we are going to modify a visible sitemap link, we will need to set + // the regenerate needed flag. + if ($check_flag && !variable_get('xmlsitemap_regenerate_needed', FALSE)) { + _xmlsitemap_check_changed_links($conditions, $updates, TRUE); + } + + // Process updates. + $query = db_update('xmlsitemap'); + $query->fields($updates); + foreach ($conditions as $field => $value) { + $query->condition($field, $value); + } + + return $query->execute(); +} + +/** + * Delete a specific sitemap link from the database. + * + * If a visible sitemap link was deleted, this will automatically set the + * regenerate needed flag. + * + * @param $entity_type + * A string with the entity type. + * @param $entity_id + * An integer with the entity ID. + * @return + * The number of links that were deleted. + */ +function xmlsitemap_link_delete($entity_type, $entity_id) { + $conditions = array('type' => $entity_type, 'id' => $entity_id); + return xmlsitemap_link_delete_multiple($conditions); +} + +/** + * Delete multiple sitemap links from the database. + * + * If visible sitemap links were deleted, this will automatically set the + * regenerate needed flag. + * + * @param $conditions + * An array of conditions on the {xmlsitemap} table in the form + * 'field' => $value. + * @return + * The number of links that were deleted. + */ +function xmlsitemap_link_delete_multiple(array $conditions) { + // Because this function is called from sub-module uninstall hooks, we have + // to manually check if the table exists since it could have been removed + // in xmlsitemap_uninstall(). + // @todo Remove this check when http://drupal.org/node/151452 is fixed. + if (!db_table_exists('xmlsitemap')) { + return FALSE; + } + + if (!variable_get('xmlsitemap_regenerate_needed', TRUE)) { + _xmlsitemap_check_changed_links($conditions, array(), TRUE); + } + + // @todo Add a hook_xmlsitemap_link_delete() hook invoked here. + + $query = db_delete('xmlsitemap'); + foreach ($conditions as $field => $value) { + $query->condition($field, $value); + } + + return $query->execute(); +} + +/** + * Check if there is a visible sitemap link given a certain set of conditions. + * + * @param $conditions + * An array of values to match keyed by field. + * @param $flag + * An optional boolean that if TRUE, will set the regenerate needed flag if + * there is a match. Defaults to FALSE. + * @return + * TRUE if there is a visible link, or FALSE otherwise. + */ +function _xmlsitemap_check_changed_links(array $conditions = array(), array $updates = array(), $flag = FALSE) { + // If we are changing status or access, check for negative current values. + $conditions['status'] = (!empty($updates['status']) && empty($conditions['status'])) ? 0 : 1; + $conditions['access'] = (!empty($updates['access']) && empty($conditions['access'])) ? 0 : 1; + + $query = db_select('xmlsitemap'); + $query->addExpression('1'); + foreach ($conditions as $field => $value) { + $query->condition($field, $value); + } + $query->range(0, 1); + $changed = $query->execute()->fetchField(); + + if ($changed && $flag) { + variable_set('xmlsitemap_regenerate_needed', TRUE); + } + + return $changed; +} + +/** + * Check if there is sitemap link is changed from the existing data. + * + * @param $link + * An array of the sitemap link. + * @param $original_link + * An optional array of the existing data. This should only contain the + * fields necessary for comparison. If not provided the existing data will be + * loaded from the database. + * @param $flag + * An optional boolean that if TRUE, will set the regenerate needed flag if + * there is a match. Defaults to FALSE. + * @return + * TRUE if the link is changed, or FALSE otherwise. + */ +function _xmlsitemap_check_changed_link(array $link, $original_link = NULL, $flag = FALSE) { + $changed = FALSE; + + if ($original_link === NULL) { + // Load only the fields necessary for data to be changed in the sitemap. + $original_link = db_query_range("SELECT loc, access, status, lastmod, priority, changefreq, changecount, language FROM {xmlsitemap} WHERE type = :type AND id = :id", 0, 1, array(':type' => $link['type'], ':id' => $link['id']))->fetchAssoc(); + } + + if (!$original_link) { + if ($link['access'] && $link['status']) { + // Adding a new visible link. + $changed = TRUE; + } + } + else { + if (!($original_link['access'] && $original_link['status']) && $link['access'] && $link['status']) { + // Changing a non-visible link to a visible link. + $changed = TRUE; + } + elseif ($original_link['access'] && $original_link['status'] && array_diff_assoc($original_link, $link)) { + // Changing a visible link + $changed = TRUE; + } + } + + if ($changed && $flag) { + variable_set('xmlsitemap_regenerate_needed', TRUE); + } + + return $changed; +} + +/** + * @} End of "defgroup xmlsitemap_api" + */ + +function xmlsitemap_get_directory(stdClass $sitemap = NULL) { + $directory = &drupal_static(__FUNCTION__); + + if (!isset($directory)) { + $directory = variable_get('xmlsitemap_path', 'xmlsitemap'); + } + + if (!empty($sitemap->smid)) { + return file_build_uri($directory . '/' . $sitemap->smid); + } + else { + return file_build_uri($directory); + } +} + +/** + * Check that the sitemap files directory exists and is writable. + */ +function xmlsitemap_check_directory(stdClass $sitemap = NULL) { + $directory = xmlsitemap_get_directory($sitemap); + $result = file_prepare_directory($directory, FILE_CREATE_DIRECTORY | FILE_MODIFY_PERMISSIONS); + if (!$result) { + watchdog('file system', 'The directory %directory does not exist or is not writable.', array('%directory' => $directory), WATCHDOG_ERROR); + } + return $result; +} + +function xmlsitemap_check_all_directories() { + $directories = array(); + + $sitemaps = xmlsitemap_sitemap_load_multiple(FALSE); + foreach ($sitemaps as $smid => $sitemap) { + $directory = xmlsitemap_get_directory($sitemap); + $directories[$directory] = $directory; + } + + foreach ($directories as $directory) { + $result = file_prepare_directory($directory, FILE_CREATE_DIRECTORY | FILE_MODIFY_PERMISSIONS); + if ($result) { + $directories[$directory] = TRUE; + } + else { + $directories[$directory] = FALSE; + } + } + + return $directories; +} + +function xmlsitemap_clear_directory(stdClass $sitemap = NULL, $delete = FALSE) { + $directory = xmlsitemap_get_directory($sitemap); + return _xmlsitemap_delete_recursive($directory, $delete); +} + +/** + * Move a directory to a new location. + * + * @param $old_dir + * A string specifying the filepath or URI of the original directory. + * @param $new_dir + * A string specifying the filepath or URI of the new directory. + * @param $replace + * Replace behavior when the destination file already exists. + * + * @return + * TRUE if the directory was moved successfully. FALSE otherwise. + */ +function xmlsitemap_directory_move($old_dir, $new_dir, $replace = FILE_EXISTS_REPLACE) { + $success = file_prepare_directory($new_dir, FILE_CREATE_DIRECTORY | FILE_MODIFY_PERMISSIONS); + + $old_path = drupal_realpath($old_dir); + $new_path = drupal_realpath($new_dir); + if (!is_dir($old_path) || !is_dir($new_path) || !$success) { + return FALSE; + } + + $files = file_scan_directory($old_dir, '/.*/'); + foreach ($files as $file) { + $file->uri_new = $new_dir . '/' . basename($file->filename); + $success &= (bool) file_unmanaged_move($file->uri, $file->uri_new, $replace); + } + + // The remove the directory. + $success &= drupal_rmdir($old_dir); + return $success; +} + +/** + * Recursively delete all files and folders in the specified filepath. + * + * This is a backport of Drupal 7's file_unmanaged_delete_recursive(). + * + * Note that this only deletes visible files with write permission. + * + * @param $path + * A filepath relative to the Drupal root directory. + * @param $delete_root + * A boolean if TRUE will delete the $path directory afterwards. + */ +function _xmlsitemap_delete_recursive($path, $delete_root = FALSE) { + // Resolve streamwrapper URI to local path. + $path = drupal_realpath($path); + if (is_dir($path)) { + $dir = dir($path); + while (($entry = $dir->read()) !== FALSE) { + if ($entry == '.' || $entry == '..') { + continue; + } + $entry_path = $path . '/' . $entry; + file_unmanaged_delete_recursive($entry_path, TRUE); + } + $dir->close(); + return $delete_root ? drupal_rmdir($path) : TRUE; + } + return file_unmanaged_delete($path); +} + +/** + * Returns information about supported sitemap link types. + * + * @param $type + * (optional) The link type to return information for. If omitted, + * information for all link types is returned. + * @param $reset + * (optional) Boolean whether to reset the static cache and do nothing. Only + * used for tests. + * + * @see hook_xmlsitemap_link_info() + * @see hook_xmlsitemap_link_info_alter() + */ +function xmlsitemap_get_link_info($type = NULL, $reset = FALSE) { + global $language; + $link_info = &drupal_static(__FUNCTION__); + + if ($reset) { + $link_info = NULL; + cache_clear_all('xmlsitemap:link_info:', 'cache', TRUE); + } + + if (!isset($link_info)) { + $cid = 'xmlsitemap:link_info:' . $language->language; + if ($cache = cache_get($cid)) { + $link_info = $cache->data; + } + else { + entity_info_cache_clear(); + $link_info = entity_get_info(); + foreach ($link_info as $key => $info) { + if (empty($info['uri callback']) || !isset($info['xmlsitemap'])) { + // Remove any non URL-able or XML sitemap un-supported entites. + unset($link_info[$key]); + } + foreach ($info['bundles'] as $bundle_key => $bundle) { + if (!isset($bundle['xmlsitemap'])) { + // Remove any un-supported entity bundles. + //unset($link_info[$key]['bundles'][$bundle_key]); + } + } + } + $link_info = array_merge($link_info, module_invoke_all('xmlsitemap_link_info')); + foreach ($link_info as $key => &$info) { + $info += array( + 'type' => $key, + 'base table' => FALSE, + 'bundles' => array(), + 'xmlsitemap' => array(), + ); + if (!isset($info['xmlsitemap']['rebuild callback']) && !empty($info['base table']) && !empty($info['entity keys']['id']) && !empty($info['xmlsitemap']['process callback'])) { + $info['xmlsitemap']['rebuild callback'] = 'xmlsitemap_rebuild_batch_fetch'; + } + foreach ($info['bundles'] as $bundle => &$bundle_info) { + $bundle_info += array( + 'xmlsitemap' => array(), + ); + $bundle_info['xmlsitemap'] += xmlsitemap_link_bundle_load($key, $bundle, FALSE); + } + } + drupal_alter('xmlsitemap_link_info', $link_info); + ksort($link_info); + // Cache by language since this info contains translated strings. + cache_set($cid, $link_info); + } + } + + if (isset($type)) { + return isset($link_info[$type]) ? $link_info[$type] : NULL; + } + + return $link_info; +} + +function xmlsitemap_get_link_type_enabled_bundles($entity_type) { + $bundles = array(); + $info = xmlsitemap_get_link_info($entity_type); + foreach ($info['bundles'] as $bundle => $bundle_info) { + $settings = xmlsitemap_link_bundle_load($entity_type, $bundle); + if (!empty($settings['status'])) { + //if (!empty($bundle_info['xmlsitemap']['status'])) { + $bundles[] = $bundle; + } + } + return $bundles; +} + +function xmlsitemap_get_link_type_indexed_status($entity_type, $bundle = '') { + $info = xmlsitemap_get_link_info($entity_type); + + $status['indexed'] = db_query("SELECT COUNT(id) FROM {xmlsitemap} WHERE type = :entity AND subtype = :bundle", array(':entity' => $entity_type, ':bundle' => $bundle))->fetchField(); + $status['visible'] = db_query("SELECT COUNT(id) FROM {xmlsitemap} WHERE type = :entity AND subtype = :bundle AND status = 1 AND access = 1", array(':entity' => $entity_type, ':bundle' => $bundle))->fetchField(); + + $total = new EntityFieldQuery(); + $total->entityCondition('entity_type', $entity_type); + $total->entityCondition('bundle', $bundle); + $total->entityCondition('entity_id', 0, '>'); + //$total->addTag('xmlsitemap_link_bundle_access'); + $total->addTag('xmlsitemap_link_indexed_status'); + $total->addMetaData('entity', $entity_type); + $total->addMetaData('bundle', $bundle); + $total->addMetaData('entity_info', $info); + $total->count(); + $status['total'] = $total->execute(); + + return $status; +} + +/** + * Implements hook_entity_query_alter(). + * + * @todo Remove when http://drupal.org/node/1054168 is fixed. + */ +function xmlsitemap_entity_query_alter($query) { + $conditions = &$query->entityConditions; + + // Alter user entity queries only. + if (isset($conditions['entity_type']) && $conditions['entity_type']['value'] == 'user' && isset($conditions['bundle'])) { + unset($conditions['bundle']); + } +} + +function xmlsitemap_link_bundle_settings_save($entity, $bundle, array $settings, $update_links = TRUE) { + if ($update_links) { + $old_settings = xmlsitemap_link_bundle_load($entity, $bundle); + if ($settings['status'] != $old_settings['status']) { + xmlsitemap_link_update_multiple(array('status' => $settings['status']), array('type' => $entity, 'subtype' => $bundle, 'status_override' => 0)); + } + if ($settings['priority'] != $old_settings['priority']) { + xmlsitemap_link_update_multiple(array('priority' => $settings['priority']), array('type' => $entity, 'subtype' => $bundle, 'priority_override' => 0)); + } + } + + variable_set("xmlsitemap_settings_{$entity}_{$bundle}", $settings); + cache_clear_all('xmlsitemap:link_info:', 'cache', TRUE); + //xmlsitemap_get_link_info(NULL, TRUE); +} + +function xmlsitemap_link_bundle_rename($entity, $bundle_old, $bundle_new) { + if ($bundle_old != $bundle_new) { + $settings = xmlsitemap_link_bundle_load($entity, $bundle_old); + variable_del("xmlsitemap_settings_{$entity}_{$bundle_old}"); + xmlsitemap_link_bundle_settings_save($entity, $bundle_new, $settings, FALSE); + xmlsitemap_link_update_multiple(array('subtype' => $bundle_new), array('type' => $entity, 'subtype' => $bundle_old)); + } +} + +/** + * Rename a link type. + */ +function xmlsitemap_link_type_rename($entity_old, $entity_new, $bundles = NULL) { + $variables = db_query("SELECT name FROM {variable} WHERE name LIKE :pattern", array(':pattern' => db_like('xmlsitemap_settings_' . $entity_old . '_') . '%'))->fetchCol(); + foreach ($variables as $variable) { + $value = variable_get($variable); + variable_del($variable); + if (isset($value)) { + $variable_new = str_replace('xmlsitemap_settings_' . $entity_old, 'xmlsitemap_settings_' . $entity_new, $variable); + variable_set($variable_new, $value); + } + } + + xmlsitemap_link_update_multiple(array('type' => $entity_new), array('type' => $entity_old), FALSE); + xmlsitemap_get_link_info(NULL, TRUE); +} + +function xmlsitemap_link_bundle_load($entity, $bundle, $load_bundle_info = TRUE) { + $info = array( + 'entity' => $entity, + 'bundle' => $bundle, + ); + if ($load_bundle_info) { + $entity_info = xmlsitemap_get_link_info($entity); + if (isset($entity_info['bundles'][$bundle])) { + $info['info'] = $entity_info['bundles'][$bundle]; + } + } + $info += variable_get("xmlsitemap_settings_{$entity}_{$bundle}", array()); + $info += array( + 'status' => XMLSITEMAP_STATUS_DEFAULT, + 'priority' => XMLSITEMAP_PRIORITY_DEFAULT, + ); + return $info; +} + +function xmlsitemap_link_bundle_delete($entity, $bundle, $delete_links = TRUE) { + variable_del("xmlsitemap_settings_{$entity}_{$bundle}"); + if ($delete_links) { + xmlsitemap_link_delete_multiple(array('type' => $entity, 'subtype' => $bundle)); + } + cache_clear_all('xmlsitemap:link_info:', 'cache', TRUE); + //xmlsitemap_get_link_info(NULL, TRUE); +} + +function xmlsitemap_link_bundle_access($entity, $bundle = NULL) { + if (is_array($entity) && !isset($bundle)) { + $bundle = $entity; + } + else { + $bundle = xmlsitemap_link_bundle_load($entity, $bundle); + } + + if (isset($bundle['info']['admin'])) { + $admin = $bundle['info']['admin']; + $admin += array('access arguments' => array()); + + if (!isset($admin['access callback']) && count($admin['access arguments']) == 1) { + $admin['access callback'] = 'user_access'; + } + + if (!empty($admin['access callback'])) { + return call_user_func_array($admin['access callback'], $admin['access arguments']); + } + } + + return FALSE; +} + +function xmlsitemap_get_bundle_path($entity, $bundle) { + $info = xmlsitemap_get_link_info($entity); + + if (!empty($info['bundles'][$bundle]['admin']['real path'])) { + return $info['bundles'][$bundle]['admin']['real path']; + } + elseif (!empty($info['bundles'][$bundle]['admin']['path'])) { + return $info['bundles'][$bundle]['admin']['path']; + } + else { + return FALSE; + } +} + +/** + * Implements hook_field_attach_rename_bundle(). + */ +function xmlsitemap_field_attach_rename_bundle($entity_type, $bundle_old, $bundle_new) { + xmlsitemap_link_bundle_rename($entity_type, $bundle_old, $bundle_new); +} + +/** + * Implements hook_field_attach_delete_bundle(). + */ +function xmlsitemap_field_attach_delete_bundle($entity_type, $bundle, $instances) { + xmlsitemap_link_bundle_delete($entity_type, $bundle, TRUE); +} + +/** + * Determine the frequency of updates to a link. + * + * @param $interval + * An interval value in seconds. + * @return + * A string representing the update frequency according to the sitemaps.org + * protocol. + */ +function xmlsitemap_get_changefreq($interval) { + if ($interval <= 0 || !is_numeric($interval)) { + return FALSE; + } + + foreach (xmlsitemap_get_changefreq_options() as $value => $frequency) { + if ($interval <= $value) { + return $frequency; + } + } + + return 'never'; +} + +/** + * Get the current number of sitemap chunks. + */ +function xmlsitemap_get_chunk_count($reset = FALSE) { + static $chunks; + if (!isset($chunks) || $reset) { + $count = max(xmlsitemap_get_link_count($reset), 1); + $chunks = ceil($count / xmlsitemap_get_chunk_size($reset)); + } + return $chunks; +} + +/** + * Get the current number of sitemap links. + */ +function xmlsitemap_get_link_count($reset = FALSE) { + static $count; + if (!isset($count) || $reset) { + $count = db_query("SELECT COUNT(id) FROM {xmlsitemap} WHERE access = 1 AND status = 1")->fetchField(); + } + return $count; +} + +/** + * Get the sitemap chunk size. + * + * This function is useful with the chunk size is set to automatic as it will + * calculate the appropriate value. Use this function instead of @code + * xmlsitemap_var('chunk_size') @endcode when the actual value is needed. + * + * @param $reset + * A boolean to reset the saved, static result. Defaults to FALSE. + * @return + * An integer with the number of links in each sitemap page. + */ +function xmlsitemap_get_chunk_size($reset = FALSE) { + static $size; + if (!isset($size) || $reset) { + $size = xmlsitemap_var('chunk_size'); + if ($size === 'auto') { + $count = max(xmlsitemap_get_link_count($reset), 1); // Prevent divide by zero. + $size = min(ceil($count / 10000) * 5000, XMLSITEMAP_MAX_SITEMAP_LINKS); + } + } + return $size; +} + +/** + * Recalculate the changefreq of a sitemap link. + * + * @param $link + * A sitemap link array. + */ +function xmlsitemap_recalculate_changefreq(&$link) { + $link['changefreq'] = round((($link['changefreq'] * $link['changecount']) + (REQUEST_TIME - $link['lastmod'])) / ($link['changecount'] + 1)); + $link['changecount']++; + $link['lastmod'] = REQUEST_TIME; +} + +/** + * Calculates the average interval between UNIX timestamps. + * + * @param $timestamps + * An array of UNIX timestamp integers. + * @return + * An integer of the average interval. + */ +function xmlsitemap_calculate_changefreq($timestamps) { + sort($timestamps); + $count = count($timestamps) - 1; + $diff = 0; + + for ($i = 0; $i < $count; $i++) { + $diff += $timestamps[$i + 1] - $timestamps[$i]; + } + + return $count > 0 ? round($diff / $count) : 0; +} + +/** + * Submit handler; Set the regenerate needed flag if variables have changed. + * + * This function needs to be called before system_settings_form_submit() or any + * calls to variable_set(). + */ +function xmlsitemap_form_submit_flag_regenerate($form, $form_state) { + foreach ($form_state['values'] as $variable => $value) { + $stored_value = variable_get($variable, 'not_a_variable'); + if (is_array($value) && !empty($form_state['values']['array_filter'])) { + $value = array_keys(array_filter($value)); + } + if ($stored_value != 'not_a_variable' && $stored_value != $value) { + variable_set('xmlsitemap_regenerate_needed', TRUE); + drupal_set_message(t('XML sitemap settings have been modified and the files should be regenerated. You can <a href="@run-cron">run cron manually</a> to regenerate the cached files.', array('@run-cron' => url('admin/reports/status/run-cron', array('query' => drupal_get_destination())))), 'warning', FALSE); + return; + } + } +} + +/** + * Set the current user stored in $GLOBALS['user']. + * + * @todo Remove when http://drupal.org/node/287292 is fixed. + */ +function xmlsitemap_switch_user($new_user = NULL) { + global $user; + $user_original = &drupal_static(__FUNCTION__); + + if (!isset($new_user)) { + if (isset($user_original)) { + // Restore the original user. + $user = $user_original; + $user_original = NULL; + drupal_save_session(TRUE); + } + else { + return FALSE; + } + } + elseif (is_numeric($new_user) && $user->uid != $new_user) { + // Get the full user object. + if (!$new_user) { + $new_user = drupal_anonymous_user(); + } + elseif (!$new_user = user_load($new_user)) { + return FALSE; + } + + // Backup the original user object. + if (!isset($user_original)) { + $user_original = $user; + drupal_save_session(FALSE); + } + + $user = $new_user; + } + elseif (is_object($new_user) && $user->uid != $new_user->uid) { + // Backup the original user object. + if (!isset($user_original)) { + $user_original = $user; + drupal_save_session(FALSE); + } + + $user = $new_user; + } + else { + return FALSE; + } + + return $user; +} + +/** + * Restore the user that was originally loaded. + * + * @return + * Current user. + */ +function xmlsitemap_restore_user() { + return xmlsitemap_switch_user(); +} + +function xmlsitemap_process_form_link_options($form, &$form_state) { + $link = &$form_state['values']['xmlsitemap']; + $fields = array('status' => XMLSITEMAP_STATUS_DEFAULT, 'priority' => XMLSITEMAP_PRIORITY_DEFAULT); + + foreach ($fields as $field => $default) { + if ($link[$field] === 'default') { + $link[$field] = isset($link[$field . '_default']) ? $link[$field . '_default'] : $default; + $link[$field . '_override'] = 0; + } + else { + $link[$field . '_override'] = 1; + } + } +} + +function xmlsitemap_link_bundle_settings_form_submit($form, &$form_state) { + $entity = $form['xmlsitemap']['#entity']; + $bundle = $form['xmlsitemap']['#bundle']; + + // Handle new bundles by fetching the proper bundle key value from the form + // state values. + if (empty($bundle)) { + $entity_info = $form['xmlsitemap']['#entity_info']; + if (isset($entity_info['bundle keys']['bundle'])) { + $bundle_key = $entity_info['bundle keys']['bundle']; + if (isset($form_state['values'][$bundle_key])) { + $bundle = $form_state['values'][$bundle_key]; + $form['xmlsitemap']['#bundle'] = $bundle; + } + } + } + + xmlsitemap_link_bundle_settings_save($entity, $bundle, $form_state['values']['xmlsitemap']); + + $entity_info = $form['xmlsitemap']['#entity_info']; + if (!empty($form['xmlsitemap']['#show_message'])) { + drupal_set_message(t('XML sitemap settings for the @bundle-label %bundle have been saved.', array('@bundle-label' => drupal_strtolower($entity_info['bundle label']), '%bundle' => $entity_info['bundles'][$bundle]['label']))); + } + + // Unset the form values since we have already saved the bundle settings and + // we don't want these values to get saved as variables in-case this form + // also uses system_settings_form(). + unset($form_state['values']['xmlsitemap']); +} + +/** + * @todo Document this function. + * @todo Make these translatable + */ +function xmlsitemap_get_changefreq_options() { + return array( + XMLSITEMAP_FREQUENCY_ALWAYS => 'always', + XMLSITEMAP_FREQUENCY_HOURLY => 'hourly', + XMLSITEMAP_FREQUENCY_DAILY => 'daily', + XMLSITEMAP_FREQUENCY_WEEKLY => 'weekly', + XMLSITEMAP_FREQUENCY_MONTHLY => 'monthly', + XMLSITEMAP_FREQUENCY_YEARLY => 'yearly', + ); +} + +/** + * Load a language object by its language code. + * + * @todo Remove when http://drupal.org/node/660736 is fixed in Drupal core. + * + * @param $language + * A language code. If not provided the default language will be returned. + * @return + * A language object. + */ +function xmlsitemap_language_load($language = LANGUAGE_NONE) { + $languages = &drupal_static(__FUNCTION__); + + if (!isset($languages)) { + $languages = language_list(); + $languages[LANGUAGE_NONE] = NULL; + } + + return isset($languages[$language]) ? $languages[$language] : NULL; +} + +/** + * @defgroup xmlsitemap_context_api XML sitemap API for sitemap contexts. + * @{ + */ + +function xmlsitemap_get_context_info($context = NULL, $reset = FALSE) { + global $language; + $info = &drupal_static(__FUNCTION__); + + if ($reset) { + $info = NULL; + } + elseif ($cached = cache_get('xmlsitemap:context_info:' . $language->language)) { + $info = $cached->data; + } + + if (!isset($info)) { + $info = module_invoke_all('xmlsitemap_context_info'); + drupal_alter('xmlsitemap_context_info', $info); + ksort($info); + // Cache by language since this info contains translated strings. + cache_set('xmlsitemap:context_info:' . $language->language, $info); + } + + if (isset($context)) { + return isset($info[$context]) ? $info[$context] : NULL; + } + + return $info; +} + +/** + * Get the sitemap context of the current request. + */ +function xmlsitemap_get_current_context() { + $context = &drupal_static(__FUNCTION__); + + if (!isset($context)) { + $context = module_invoke_all('xmlsitemap_context'); + drupal_alter('xmlsitemap_context', $context); + asort($context); + } + + return $context; +} + +function _xmlsitemap_sitemap_context_summary(stdClass $sitemap, $context_key, array $context_info) { + $context_value = isset($sitemap->context[$context_key]) ? $sitemap->context[$context_key] : NULL; + + if (!isset($context_value)) { + return t('Default'); + } + elseif (!empty($context_info['summary callback'])) { + return $context_info['summary callback']($context_value); + } + else { + return $context_value; + } +} + +/** + * @} End of "defgroup xmlsitemap_context_api" + */ + +/** + * Run a not-progressive batch operation. + */ +function xmlsitemap_run_unprogressive_batch() { + $batch = batch_get(); + if (!empty($batch)) { + // If there is already something in the batch, don't run. + return FALSE; + } + + $args = func_get_args(); + $batch_callback = array_shift($args); + + if (!lock_acquire($batch_callback)) { + return FALSE; + } + + // Attempt to increase the execution time. + drupal_set_time_limit(240); + + // Build the batch array. + $batch = call_user_func_array($batch_callback, $args); + batch_set($batch); + + // We need to manually set the progressive variable again. + // @todo Remove when http://drupal.org/node/638712 is fixed. + $batch =& batch_get(); + $batch['progressive'] = FALSE; + + // Run the batch process. + batch_process(); + + lock_release($batch_callback); + return TRUE; +} + +/** + * Workaround for missing breadcrumbs on callback and action paths. + * + * @todo Remove when http://drupal.org/node/576290 is fixed. + */ +function _xmlsitemap_set_breadcrumb($path = 'admin/config/search/xmlsitemap') { + $breadcrumb = array(); + $path = explode('/', $path); + do { + $menu_path = implode('/', $path); + $menu_item = menu_get_item($menu_path); + array_unshift($breadcrumb, l($menu_item['title'], $menu_path)); + } while (array_pop($path) && !empty($path)); + array_unshift($breadcrumb, l(t('Home'), NULL)); + drupal_set_breadcrumb($breadcrumb); +} + +function xmlsitemap_get_operation_link($url, $options = array()) { + static $destination; + + if (!isset($destination)) { + $destination = drupal_get_destination(); + } + + $link = array('href' => $url) + $options; + + // Fetch the item's menu router link info and title. + if (!isset($link['title'])) { + $item = menu_get_item($url); + $link['title'] = $item['title']; + } + + $link += array('query' => $destination); + drupal_alter('xmlsitemap_operation_link', $link); + return $link; +} + +/** + * Implements hook_cron_queue_info(). + */ +function xmlsitemap_cron_queue_info() { + $info['xmlsitemap_link_process'] = array( + 'worker callback' => 'xmlsitemap_link_queue_process', + 'time' => 60, + ); + + return $info; +} + +/** + * Queue callback for processing sitemap links. + */ +function xmlsitemap_link_queue_process($data) { + $info = xmlsitemap_get_link_info($data['type']); + $ids = isset($data['ids']) ? $data['ids'] : array($data['id']); + if (function_exists($info['xmlsitemap']['process callback'])) { + $info['xmlsitemap']['process callback']($ids); + } +} + +/** + * Enqueue sitemap links to be updated via the xmlsitemap_link_process queue. + * + * @param string $type + * The link type. + * @param array|int $ids + * An array of link IDs or a singular link ID. + */ +function xmlsitemap_link_enqueue($type, $ids) { + $data = array(); + $data['type'] = $type; + $data['ids'] = is_array($ids) ? $ids : array($ids); + + /** @var DrupalReliableQueueInterface $queue */ + $queue = DrupalQueue::get('xmlsitemap_link_process'); + $queue->createItem($data); +} diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.pages.inc b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.pages.inc new file mode 100644 index 00000000..565cacd3 --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.pages.inc @@ -0,0 +1,159 @@ +<?php + +/** + * @file + * Page callbacks for the xmlsitemap module. + * + * @ingroup xmlsitemap + */ + +/** + * Get the sitemap chunk/page of the current request. + */ +function xmlsitemap_get_current_chunk(stdClass $sitemap) { + // Check if we should be displaing the index. + if (!isset($_GET['page']) || !is_numeric($_GET['page'])) { + if ($sitemap->chunks > 1) { + return 'index'; + } + else { + return 1; + } + } + else { + return (int) $_GET['page']; + } +} + +/** + * Output a sitemap page. + * + * @see xmlsitemap_sitemap_load_by_context() + * @see xmlsitemap_get_current_chunk() + * @see xmlsitemap_sitemap_get_file() + * @see xmlsitemap_output_file() + */ +function xmlsitemap_output_chunk() { + $sitemap = xmlsitemap_sitemap_load_by_context(); + if (!$sitemap) { + return MENU_NOT_FOUND; + } + + $chunk = xmlsitemap_get_current_chunk($sitemap); + $file = xmlsitemap_sitemap_get_file($sitemap, $chunk); + + // Provide debugging information if enabled. + if (variable_get('xmlsitemap_developer_mode', 0) && isset($_GET['debug'])) { + $output = array(); + $context = xmlsitemap_get_current_context(); + $output[] = "Current context: " . print_r($context, TRUE); + $output[] = "Sitemap: " . print_r($sitemap, TRUE); + $output[] = "Chunk: $chunk"; + $output[] = "Cache file location: $file"; + $output[] = "Cache file exists: " . (file_exists($file) ? 'Yes' : 'No'); + return implode('<br />', $output); + } + + return xmlsitemap_output_file($file); +} + +/** + * Output the contents of a file to the browser and check caching headers. + */ +function xmlsitemap_output_file($file, array $headers = array()) { + if (!file_exists($file) || !is_readable($file)) { + return MENU_NOT_FOUND; + } + + $mtime = filemtime($file); + $last_modified = gmdate(DATE_RFC1123, $mtime); + $etag = '"' . md5($last_modified) . '"'; + + // See if the client has provided the required HTTP headers. + $if_modified_since = isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) ? stripslashes($_SERVER['HTTP_IF_MODIFIED_SINCE']) : FALSE; + $if_none_match = isset($_SERVER['HTTP_IF_NONE_MATCH']) ? stripslashes($_SERVER['HTTP_IF_NONE_MATCH']) : FALSE; + if ($if_modified_since && $if_none_match && $if_none_match == $etag && $if_modified_since == $last_modified) { + header('HTTP/1.1 304 Not Modified'); + // All 304 responses must send an etag if the 200 response for the same object contained an etag + header('Etag: ' . $etag); + exit; + } + + $headers += array( + 'Content-type' => 'text/xml; charset=utf-8', + //'Content-length' => filesize($file), + 'Last-modified' => $last_modified, + 'Etag' => $etag, + 'Expires' => gmdate(DATE_RFC1123, $mtime + variable_get('xmlsitemap_minimum_lifetime', 0)), + 'Cache-Control' => 'must-revalidate', + 'X-Robots-Tag' => 'noindex, follow', + ); + + // Transfer the file as output. + xmlsitemap_file_transfer($file, $headers); +} + +/** + * Modified version of file_transfer() that invokes hook_exit()s afterwards. + * + * @see file_transfer() + */ +function xmlsitemap_file_transfer($uri, $headers) { + if (ob_get_level()) { + ob_end_clean(); + } + + foreach ($headers as $name => $value) { + drupal_add_http_header($name, $value); + } + drupal_send_headers(); + + // Attempt to increase time to transfer file. + drupal_set_time_limit(240); + + $scheme = variable_get('file_default_scheme', 'public'); + // Transfer file in 16 KB chunks to save memory usage. + if ($scheme && file_stream_wrapper_valid_scheme($scheme) && $fd = fopen($uri, 'rb')) { + while (!feof($fd)) { + print fread($fd, 1024*16); + } + fclose($fd); + } + else { + drupal_not_found(); + } + drupal_exit(); +} + +/** + * Output an XML transformation file for the sitemap XML. + */ +function xmlsitemap_output_xsl() { + // Read the XSL content from the file. + $module_path = drupal_get_path('module', 'xmlsitemap'); + $xsl_content = file_get_contents($module_path . '/xsl/xmlsitemap.xsl'); + + // Make sure the strings in the XSL content are translated properly. + $replacements = array( + 'Sitemap file' => t('Sitemap file'), + 'Generated by the <a href="http://drupal.org/project/xmlsitemap">Drupal XML sitemap module</a>.' => t('Generated by the <a href="@link-xmlsitemap">Drupal XML sitemap module</a>.', array('@link-xmlsitemap' => 'http://drupal.org/project/xmlsitemap')), + 'Number of sitemaps in this index' => t('Number of sitemaps in this index'), + 'Click on the table headers to change sorting.' => t('Click on the table headers to change sorting.'), + 'Sitemap URL' => t('Sitemap URL'), + 'Last modification date' => t('Last modification date'), + 'Number of URLs in this sitemap' => t('Number of URLs in this sitemap'), + 'URL location' => t('URL location'), + 'Change frequency' => t('Change frequency'), + 'Priority' => t('Priority'), + '[jquery]' => base_path() . 'misc/jquery.js', + '[jquery-tablesort]' => base_path() . $module_path . '/xsl/jquery.tablesorter.min.js', + '[xsl-js]' => base_path() . $module_path . '/xsl/xmlsitemap.xsl.js', + '[xsl-css]' => base_path() . $module_path . '/xsl/xmlsitemap.xsl.css', + ); + $xsl_content = strtr($xsl_content, $replacements); + + // Output the XSL content. + drupal_add_http_header('Content-type', 'application/xml; charset=utf-8'); + drupal_add_http_header('X-Robots-Tag', 'noindex, follow'); + print $xsl_content; +} diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.test b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.test new file mode 100644 index 00000000..f42cf1e5 --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.test @@ -0,0 +1,783 @@ +<?php + +/** + * @file + * Unit tests for the xmlsitemap module. + * + * @ingroup xmlsitemap + */ + +/** + * Helper test class with some added functions for testing. + */ +class XMLSitemapTestHelper extends DrupalWebTestCase { + protected $admin_user; + + function setUp($modules = array()) { + array_unshift($modules, 'xmlsitemap'); + parent::setUp($modules); + } + + function tearDown() { + // Capture any (remaining) watchdog errors. + $this->assertNoWatchdogErrors(); + + parent::tearDown(); + } + + /** + * Assert the page does not respond with the specified response code. + * + * @param $code + * Response code. For example 200 is a successful page request. For a list + * of all codes see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html. + * @param $message + * Message to display. + * @return + * Assertion result. + */ + protected function assertNoResponse($code, $message = '') { + $curl_code = curl_getinfo($this->curlHandle, CURLINFO_HTTP_CODE); + $match = is_array($code) ? in_array($curl_code, $code) : $curl_code == $code; + return $this->assertFalse($match, $message ? $message : t('HTTP response not expected !code, actual !curl_code', array('!code' => $code, '!curl_code' => $curl_code)), t('Browser')); + } + + /** + * Check the files directory is created (massive fails if not done). + * + * @todo This can be removed when http://drupal.org/node/654752 is fixed. + */ + protected function checkFilesDirectory() { + if (!xmlsitemap_check_directory()) { + $this->fail(t('Sitemap directory was found and writable for testing.')); + } + } + + /** + * Retrieves an XML sitemap. + * + * @param $context + * An optional array of the XML sitemap's context. + * @param $options + * Options to be forwarded to url(). These values will be merged with, but + * always override $sitemap->uri['options']. + * @param $headers + * An array containing additional HTTP request headers, each formatted as + * "name: value". + * @return + * The retrieved HTML string, also available as $this->drupalGetContent() + */ + protected function drupalGetSitemap(array $context = array(), array $options = array(), array $headers = array()) { + $sitemap = xmlsitemap_sitemap_load_by_context($context); + if (!$sitemap) { + return $this->fail('Could not load sitemap by context.'); + } + return $this->drupalGet($sitemap->uri['path'], $options + $sitemap->uri['options'], $headers); + } + + /** + * Regenerate the sitemap by setting the regenerate flag and running cron. + */ + protected function regenerateSitemap() { + variable_set('xmlsitemap_regenerate_needed', TRUE); + variable_set('xmlsitemap_generated_last', 0); + $this->cronRun(); + $this->assertTrue(variable_get('xmlsitemap_generated_last', 0) && !variable_get('xmlsitemap_regenerate_needed', FALSE), t('XML sitemaps regenerated and flag cleared.')); + } + + protected function assertSitemapLink($entity_type, $entity_id = NULL) { + if (is_array($entity_type)) { + $links = xmlsitemap_link_load_multiple($entity_type); + $link = $links ? reset($links) : FALSE; + } + else { + $link = xmlsitemap_link_load($entity_type, $entity_id); + } + $this->assertTrue(is_array($link), 'Link loaded.'); + return $link; + } + + protected function assertNoSitemapLink($entity_type, $entity_id = NULL) { + if (is_array($entity_type)) { + $links = xmlsitemap_link_load_multiple($entity_type); + $link = $links ? reset($links) : FALSE; + } + else { + $link = xmlsitemap_link_load($entity_type, $entity_id); + } + $this->assertFalse($link, 'Link not loaded.'); + return $link; + } + + protected function assertSitemapLinkVisible($entity_type, $entity_id) { + $link = xmlsitemap_link_load($entity_type, $entity_id); + $this->assertTrue($link && $link['access'] && $link['status'], t('Sitemap link @type @id is visible.', array('@type' => $entity_type, '@id' => $entity_id))); + } + + protected function assertSitemapLinkNotVisible($entity_type, $entity_id) { + $link = xmlsitemap_link_load($entity_type, $entity_id); + $this->assertTrue($link && !($link['access'] && $link['status']), t('Sitemap link @type @id is not visible.', array('@type' => $entity_type, '@id' => $entity_id))); + } + + protected function assertSitemapLinkValues($entity_type, $entity_id, array $conditions) { + $link = xmlsitemap_link_load($entity_type, $entity_id); + + if (!$link) { + return $this->fail(t('Could not load sitemap link for @type @id.', array('@type' => $entity_type, '@id' => $entity_id))); + } + + foreach ($conditions as $key => $value) { + if ($value === NULL || $link[$key] === NULL) { + // For nullable fields, always check for identical values (===). + $this->assertIdentical($link[$key], $value, t('Identical values for @type @id link field @key.', array('@type' => $entity_type, '@id' => $entity_id, '@key' => $key))); + } + else { + // Otherwise check simple equality (==). + $this->assertEqual($link[$key], $value, t('Equal values for @type @id link field @key.', array('@type' => $entity_type, '@id' => $entity_id, '@key' => $key))); + } + } + } + + protected function assertNotSitemapLinkValues($entity_type, $entity_id, array $conditions) { + $link = xmlsitemap_link_load($entity_type, $entity_id); + + if (!$link) { + return $this->fail(t('Could not load sitemap link for @type @id.', array('@type' => $entity_type, '@id' => $entity_id))); + } + + foreach ($conditions as $key => $value) { + if ($value === NULL || $link[$key] === NULL) { + // For nullable fields, always check for identical values (===). + $this->assertNotIdentical($link[$key], $value, t('Not identical values for @type @id link field @key.', array('@type' => $entity_type, '@id' => $entity_id, '@key' => $key))); + } + else { + // Otherwise check simple equality (==). + $this->assertNotEqual($link[$key], $value, t('Not equal values for link @type @id field @key.', array('@type' => $entity_type, '@id' => $entity_id, '@key' => $key))); + } + } + } + + protected function assertRawSitemapLinks() { + $links = func_get_args(); + foreach ($links as $link) { + $path = url($link['loc'], array('language' => xmlsitemap_language_load($link['language']), 'absolute' => TRUE)); + $this->assertRaw($link['loc'], t('Link %path found in the sitemap.', array('%path' => $path))); + } + } + + protected function assertNoRawSitemapLinks() { + $links = func_get_args(); + foreach ($links as $link) { + $path = url($link['loc'], array('language' => xmlsitemap_language_load($link['language']), 'absolute' => TRUE)); + $this->assertNoRaw($link['loc'], t('Link %path not found in the sitemap.', array('%path' => $path))); + } + } + + protected function addSitemapLink(array $link = array()) { + $last_id = &drupal_static(__FUNCTION__, 1); + + $link += array( + 'type' => 'testing', + 'id' => $last_id, + 'access' => 1, + 'status' => 1, + ); + + // Make the default path easier to read than a random string. + $link += array('loc' => $link['type'] . '-' . $link['id']); + + $last_id = max($last_id, $link['id']) + 1; + xmlsitemap_link_save($link); + return $link; + } + + protected function assertFlag($variable, $assert_value = TRUE, $reset_if_true = TRUE) { + $value = xmlsitemap_var($variable); + + if ($reset_if_true && $value) { + variable_set('xmlsitemap_' . $variable, FALSE); + } + + return $this->assertEqual($value, $assert_value, "xmlsitemap_$variable is " . ($assert_value ? 'TRUE' : 'FALSE')); + } + + protected function assertXMLSitemapProblems($problem_text = FALSE) { + $this->drupalGet('admin/config/search/xmlsitemap'); + $this->assertText(t('One or more problems were detected with your XML sitemap configuration')); + if ($problem_text) { + $this->assertText($problem_text); + } + } + + protected function assertNoXMLSitemapProblems() { + $this->drupalGet('admin/config/search/xmlsitemap'); + $this->assertNoText(t('One or more problems were detected with your XML sitemap configuration')); + } + + /** + * Fetch all seen watchdog messages. + * + * @todo Add unit tests for this function. + */ + protected function getWatchdogMessages(array $conditions = array(), $reset = FALSE) { + static $seen_ids = array(); + + if (!module_exists('dblog') || $reset) { + $seen_ids = array(); + return array(); + } + + $query = db_select('watchdog'); + $query->fields('watchdog', array('wid', 'type', 'severity', 'message', 'variables', 'timestamp')); + foreach ($conditions as $field => $value) { + if ($field == 'variables' && !is_string($value)) { + $value = serialize($value); + } + $query->condition($field, $value); + } + if ($seen_ids) { + $query->condition('wid', $seen_ids, 'NOT IN'); + } + $query->orderBy('timestamp'); + $messages = $query->execute()->fetchAllAssoc('wid'); + + $seen_ids = array_merge($seen_ids, array_keys($messages)); + return $messages; + } + + protected function assertWatchdogMessage(array $conditions, $message = 'Watchdog message found.') { + $this->assertTrue($this->getWatchdogMessages($conditions), $message); + } + + protected function assertNoWatchdogMessage(array $conditions, $message = 'Watchdog message not found.') { + $this->assertFalse($this->getWatchdogMessages($conditions), $message); + } + + /** + * Check that there were no watchdog errors or worse. + */ + protected function assertNoWatchdogErrors() { + $messages = $this->getWatchdogMessages(); + $verbose = array(); + + foreach ($messages as $message) { + $message->text = $this->formatWatchdogMessage($message); + if (in_array($message->severity, array(WATCHDOG_EMERGENCY, WATCHDOG_ALERT, WATCHDOG_CRITICAL, WATCHDOG_ERROR, WATCHDOG_WARNING))) { + $this->fail($message->text); + } + $verbose[] = $message->text; + } + + if ($verbose) { + array_unshift($verbose, '<h2>Watchdog messages</h2>'); + $this->verbose(implode("<br />", $verbose), 'Watchdog messages from test run'); + } + + // Clear the seen watchdog messages since we've failed on any errors. + $this->getWatchdogMessages(array(), TRUE); + } + + /** + * Format a watchdog message in a one-line summary. + * + * @param $message + * A watchdog messsage object. + * @return + * A string containing the watchdog message's timestamp, severity, type, + * and actual message. + */ + private function formatWatchdogMessage(stdClass $message) { + static $levels; + + if (!isset($levels)) { + module_load_include('admin.inc', 'dblog'); + $levels = watchdog_severity_levels(); + } + + return t('@timestamp - @severity - @type - !message', array( + '@timestamp' => $message->timestamp, + '@severity' => $levels[$message->severity], + '@type' => $message->type, + '!message' => theme_dblog_message(array('event' => $message, 'link' => FALSE)), + )); + } + + /** + * Log verbose message in a text file. + * + * This is a copy of DrupalWebTestCase->verbose() but allows a customizable + * summary message rather than hard-coding 'Verbose message'. + * + * @param $verbose_message + * The verbose message to be stored. + * @param $message + * Message to display. + * @see simpletest_verbose() + * + * @todo Remove when http://drupal.org/node/800426 is fixed. + */ + protected function verbose($verbose_message, $message = 'Verbose message') { + if ($id = simpletest_verbose($verbose_message)) { + $url = file_create_url($this->originalFileDirectory . '/simpletest/verbose/' . get_class($this) . '-' . $id . '.html'); + $this->error(l($message, $url, array('attributes' => array('target' => '_blank'))), 'User notice'); + } + } +} + +class XMLSitemapUnitTest extends XMLSitemapTestHelper { + public static function getInfo() { + return array( + 'name' => 'XML sitemap unit tests', + 'description' => 'Unit tests for the XML sitemap module.', + 'group' => 'XML sitemap', + ); + } + + function testAssertFlag() { + variable_set('xmlsitemap_rebuild_needed', TRUE); + $this->assertTrue(xmlsitemap_var('rebuild_needed')); + $this->assertTrue($this->assertFlag('rebuild_needed', TRUE, FALSE)); + $this->assertTrue(xmlsitemap_var('rebuild_needed')); + $this->assertTrue($this->assertFlag('rebuild_needed', TRUE, TRUE)); + $this->assertFalse(xmlsitemap_var('rebuild_needed')); + $this->assertTrue($this->assertFlag('rebuild_needed', FALSE, FALSE)); + $this->assertFalse(xmlsitemap_var('rebuild_needed')); + } + + /** + * Tests for xmlsitemap_get_changefreq(). + */ + function testGetChangefreq() { + // The test values. + $values = array( + 0, + mt_rand(1, XMLSITEMAP_FREQUENCY_ALWAYS), + mt_rand(XMLSITEMAP_FREQUENCY_ALWAYS + 1, XMLSITEMAP_FREQUENCY_HOURLY), + mt_rand(XMLSITEMAP_FREQUENCY_HOURLY + 1, XMLSITEMAP_FREQUENCY_DAILY), + mt_rand(XMLSITEMAP_FREQUENCY_DAILY + 1, XMLSITEMAP_FREQUENCY_WEEKLY), + mt_rand(XMLSITEMAP_FREQUENCY_WEEKLY + 1, XMLSITEMAP_FREQUENCY_MONTHLY), + mt_rand(XMLSITEMAP_FREQUENCY_MONTHLY + 1, XMLSITEMAP_FREQUENCY_YEARLY), + mt_rand(XMLSITEMAP_FREQUENCY_YEARLY + 1, mt_getrandmax()), + ); + + // The expected values. + $expected = array( + FALSE, + 'always', + 'hourly', + 'daily', + 'weekly', + 'monthly', + 'yearly', + 'never', + ); + + foreach ($values as $i => $value) { + $actual = xmlsitemap_get_changefreq($value); + $this->assertIdentical($actual, $expected[$i]); + } + } + + /** + * Tests for xmlsitemap_get_chunk_count(). + */ + function testGetChunkCount() { + // Set a low chunk size for testing. + variable_set('xmlsitemap_chunk_size', 4); + + // Make the total number of links just equal to the chunk size. + $count = db_query("SELECT COUNT(id) FROM {xmlsitemap}")->fetchField(); + for ($i = $count; $i < 4; $i++) { + $this->addSitemapLink(); + $this->assertEqual(xmlsitemap_get_chunk_count(TRUE), 1); + } + $this->assertEqual(db_query("SELECT COUNT(id) FROM {xmlsitemap}")->fetchField(), 4); + + // Add a disabled link, should not change the chunk count. + $this->addSitemapLink(array('status' => FALSE)); + $this->assertEqual(xmlsitemap_get_chunk_count(TRUE), 1); + + // Add a visible link, should finally bump up the chunk count. + $this->addSitemapLink(); + $this->assertEqual(xmlsitemap_get_chunk_count(TRUE), 2); + + // Change all links to disabled. The chunk count should be 1 not 0. + db_query("UPDATE {xmlsitemap} SET status = 0"); + $this->assertEqual(xmlsitemap_get_chunk_count(TRUE), 1); + $this->assertEqual(xmlsitemap_get_link_count(), 0); + + // Delete all links. The chunk count should be 1 not 0. + db_query("DELETE FROM {xmlsitemap}"); + $this->assertEqual(db_query("SELECT COUNT(id) FROM {xmlsitemap}")->fetchField(), 0); + $this->assertEqual(xmlsitemap_get_chunk_count(TRUE), 1); + } + + //function testGetChunkFile() { + //} + // + //function testGetChunkSize() { + //} + // + //function testGetLinkCount() { + //} + + /** + * Tests for xmlsitemap_calculate_changereq(). + */ + function testCalculateChangefreq() { + // The test values. + $values = array( + array(), + array(REQUEST_TIME), + array(REQUEST_TIME, REQUEST_TIME - 200), + array(REQUEST_TIME - 200, REQUEST_TIME, REQUEST_TIME - 600), + ); + + // Expected values. + $expected = array(0, 0, 200, 300); + + foreach ($values as $i => $value) { + $actual = xmlsitemap_calculate_changefreq($value); + $this->assertEqual($actual, $expected[$i]); + + } + } + + /** + * Test for xmlsitemap_recalculate_changefreq(). + */ + function testRecalculateChangefreq() { + // The starting test value. + $value = array('lastmod' => REQUEST_TIME - 1000, 'changefreq' => 0, 'changecount' => 0); + + // Expected values. + $expecteds = array( + array('lastmod' => REQUEST_TIME, 'changefreq' => 1000, 'changecount' => 1), + array('lastmod' => REQUEST_TIME, 'changefreq' => 500, 'changecount' => 2), + array('lastmod' => REQUEST_TIME, 'changefreq' => 333, 'changecount' => 3), + ); + + foreach ($expecteds as $expected) { + xmlsitemap_recalculate_changefreq($value); + $this->assertEqual($value, $expected); + } + } + + /** + * Tests for xmlsitemap_switch_user and xmlsitemap_restore_user(). + */ + function testSwitchUser() { + global $user; + + $original_user = $user; + $new_user = $this->drupalCreateUser(); + + // Switch to a new valid user. + $this->assertEqual(xmlsitemap_switch_user($new_user), TRUE); + $this->assertEqual($user->uid, $new_user->uid); + + // Switch again to the anonymous user. + $this->assertEqual(xmlsitemap_switch_user(0), TRUE); + $this->assertEqual($user->uid, 0); + + // Switch again to the new user. + $this->assertEqual(xmlsitemap_switch_user($new_user->uid), TRUE); + $this->assertEqual($user->uid, $new_user->uid); + + // Test that after two switches the original user was restored. + $this->assertEqual(xmlsitemap_restore_user(), TRUE); + $this->assertEqual($user->uid, $original_user->uid); + + // Attempt to switch to the same user. + $this->assertEqual(xmlsitemap_switch_user($original_user->uid), FALSE); + $this->assertEqual($user->uid, $original_user->uid); + $this->assertEqual(xmlsitemap_restore_user(), FALSE); + $this->assertEqual($user->uid, $original_user->uid); + + // Attempt to switch to an invalid user ID. + $invalid_uid = db_query("SELECT MAX(uid) FROM {users}")->fetchField() + 100; + $this->assertEqual(xmlsitemap_switch_user($invalid_uid), FALSE); + $this->assertEqual($user->uid, $original_user->uid); + $this->assertEqual(xmlsitemap_restore_user(), FALSE); + $this->assertEqual($user->uid, $original_user->uid); + + // Attempt user switching when the original user is anonymous. + $user = drupal_anonymous_user(); + $this->assertEqual(xmlsitemap_switch_user(0), FALSE); + $this->assertEqual($user->uid, 0); + $this->assertEqual(xmlsitemap_restore_user(), FALSE); + $this->assertEqual($user->uid, 0); + } + + //function testLoadLink() { + //} + + /** + * Tests for xmlsitemap_link_save(). + */ + function testSaveLink() { + $link = array('type' => 'testing', 'id' => 1, 'loc' => 'testing', 'status' => 1); + xmlsitemap_link_save($link); + $this->assertFlag('regenerate_needed', TRUE); + + $link['status'] = 0; + xmlsitemap_link_save($link); + $this->assertFlag('regenerate_needed', TRUE); + + $link['priority'] = 0.5; + $link['loc'] = 'new_location'; + $link['status'] = 1; + xmlsitemap_link_save($link); + $this->assertFlag('regenerate_needed', TRUE); + + $link['priority'] = 0.0; + xmlsitemap_link_save($link); + $this->assertFlag('regenerate_needed', TRUE); + + $link['priority'] = 0.1; + xmlsitemap_link_save($link); + $this->assertFlag('regenerate_needed', TRUE); + + $link['priority'] = 1.0; + xmlsitemap_link_save($link); + $this->assertFlag('regenerate_needed', TRUE); + + $link['priority'] = 1; + xmlsitemap_link_save($link); + $this->assertFlag('regenerate_needed', FALSE); + + $link['priority'] = 0; + xmlsitemap_link_save($link); + $this->assertFlag('regenerate_needed', TRUE); + + $link['priority'] = 0.5; + xmlsitemap_link_save($link); + $this->assertFlag('regenerate_needed', TRUE); + + $link['priority'] = 0.5; + $link['priority_override'] = 0; + $link['status'] = 1; + xmlsitemap_link_save($link); + $this->assertFlag('regenerate_needed', FALSE); + } + + /** + * Tests for xmlsitemap_link_delete(). + */ + function testLinkDelete() { + // Add our testing data. + $link1 = $this->addSitemapLink(array('loc' => 'testing1', 'status' => 0)); + $link2 = $this->addSitemapLink(array('loc' => 'testing1', 'status' => 1)); + $link3 = $this->addSitemapLink(array('status' => 0)); + variable_set('xmlsitemap_regenerate_needed', FALSE); + + // Test delete multiple links. + // Test that the regenerate flag is set when visible links are deleted. + $deleted = xmlsitemap_link_delete_multiple(array('loc' => 'testing1')); + $this->assertEqual($deleted, 2); + $this->assertFalse(xmlsitemap_link_load($link1['type'], $link1['id'])); + $this->assertFalse(xmlsitemap_link_load($link2['type'], $link2['id'])); + $this->assertTrue(xmlsitemap_link_load($link3['type'], $link3['id'])); + $this->assertFlag('regenerate_needed', TRUE); + + $deleted = xmlsitemap_link_delete($link3['type'], $link3['id']); + $this->assertEqual($deleted, 1); + $this->assertFalse(xmlsitemap_link_load($link3['type'], $link3['id'])); + $this->assertFlag('regenerate_needed', FALSE); + } + + /** + * Tests for xmlsitemap_link_update_multiple(). + */ + function testUpdateLinks() { + // Add our testing data. + $links = array(); + $links[1] = $this->addSitemapLink(array('subtype' => 'group1')); + $links[2] = $this->addSitemapLink(array('subtype' => 'group1')); + $links[3] = $this->addSitemapLink(array('subtype' => 'group2')); + variable_set('xmlsitemap_regenerate_needed', FALSE); + // id | type | subtype | language | access | status | priority + // 1 | testing | group1 | '' | 1 | 1 | 0.5 + // 2 | testing | group1 | '' | 1 | 1 | 0.5 + // 3 | testing | group2 | '' | 1 | 1 | 0.5 + + $updated = xmlsitemap_link_update_multiple(array('status' => 0), array('type' => 'testing', 'subtype' => 'group1', 'status_override' => 0)); + $this->assertEqual($updated, 2); + $this->assertFlag('regenerate_needed', TRUE); + // id | type | subtype | language | status | priority + // 1 | testing | group1 | '' | 0 | 0.5 + // 2 | testing | group1 | '' | 0 | 0.5 + // 3 | testing | group2 | '' | 1 | 0.5 + + $updated = xmlsitemap_link_update_multiple(array('priority' => 0.0), array('type' => 'testing', 'subtype' => 'group1', 'priority_override' => 0)); + $this->assertEqual($updated, 2); + $this->assertFlag('regenerate_needed', FALSE); + // id | type | subtype | language | status | priority + // 1 | testing | group1 | '' | 0 | 0.0 + // 2 | testing | group1 | '' | 0 | 0.0 + // 3 | testing | group2 | '' | 1 | 0.5 + + $updated = xmlsitemap_link_update_multiple(array('subtype' => 'group2'), array('type' => 'testing', 'subtype' => 'group1')); + $this->assertEqual($updated, 2); + $this->assertFlag('regenerate_needed', FALSE); + // id | type | subtype | language | status | priority + // 1 | testing | group2 | '' | 0 | 0.0 + // 2 | testing | group2 | '' | 0 | 0.0 + // 3 | testing | group2 | '' | 1 | 0.5 + + $updated = xmlsitemap_link_update_multiple(array('status' => 1), array('type' => 'testing', 'subtype' => 'group2', 'status_override' => 0, 'status' => 0)); + $this->assertEqual($updated, 2); + $this->assertFlag('regenerate_needed', TRUE); + // id | type | subtype | language | status | priority + // 1 | testing | group2 | '' | 1 | 0.0 + // 2 | testing | group2 | '' | 1 | 0.0 + // 3 | testing | group2 | '' | 1 | 0.5 + } + + /** + * Test that duplicate paths are skipped during generation. + */ + function testDuplicatePaths() { + $link1 = $this->addSitemapLink(array('loc' => 'duplicate')); + $link2 = $this->addSitemapLink(array('loc' => 'duplicate')); + $this->regenerateSitemap(); + $this->drupalGetSitemap(); + $this->assertUniqueText('duplicate'); + } + + /** + * Test that the sitemap will not be genereated before the lifetime expires. + */ + function testMinimumLifetime() { + variable_set('xmlsitemap_minimum_lifetime', 300); + $this->regenerateSitemap(); + + $link = $this->addSitemapLink(array('loc' => 'lifetime-test')); + $this->cronRun(); + $this->drupalGetSitemap(); + $this->assertResponse(200); + $this->assertNoRaw('lifetime-test'); + + variable_set('xmlsitemap_generated_last', REQUEST_TIME - 400); + $this->cronRun(); + $this->drupalGetSitemap(); + $this->assertRaw('lifetime-test'); + + xmlsitemap_link_delete($link['type'], $link['id']); + $this->cronRun(); + $this->drupalGetSitemap(); + $this->assertRaw('lifetime-test'); + + $this->regenerateSitemap(); + $this->drupalGetSitemap(); + $this->assertResponse(200); + $this->assertNoRaw('lifetime-test'); + } +} + +class XMLSitemapFunctionalTest extends XMLSitemapTestHelper { + public static function getInfo() { + return array( + 'name' => 'XML sitemap interface tests', + 'description' => 'Functional tests for the XML sitemap module.', + 'group' => 'XML sitemap', + ); + } + + function setUp($modules = array()) { + $modules[] = 'path'; + parent::setUp($modules); + $this->admin_user = $this->drupalCreateUser(array('access content', 'administer site configuration', 'administer xmlsitemap')); + $this->drupalLogin($this->admin_user); + } + + /** + * Test the sitemap file caching. + */ + function testSitemapCaching() { + $this->regenerateSitemap(); + $this->drupalGetSitemap(); + $this->assertResponse(200); + $etag = $this->drupalGetHeader('etag'); + $last_modified = $this->drupalGetHeader('last-modified'); + $this->assertTrue($etag, t('Etag header found.')); + $this->assertTrue($last_modified, t('Last-modified header found.')); + + $this->drupalGetSitemap(array(), array(), array('If-Modified-Since: ' . $last_modified, 'If-None-Match: ' . $etag)); + $this->assertResponse(304); + } + + /** + * Test base URL functionality. + */ + function testBaseURL() { + $edit = array('xmlsitemap_base_url' => ''); + $this->drupalPost('admin/config/search/xmlsitemap/settings', $edit, t('Save configuration')); + $this->assertText(t('Default base URL field is required.')); + + $edit = array('xmlsitemap_base_url' => 'invalid'); + $this->drupalPost('admin/config/search/xmlsitemap/settings', $edit, t('Save configuration')); + $this->assertText(t('Invalid base URL.')); + + $edit = array('xmlsitemap_base_url' => 'http://example.com/ '); + $this->drupalPost('admin/config/search/xmlsitemap/settings', $edit, t('Save configuration')); + $this->assertText(t('Invalid base URL.')); + + $edit = array('xmlsitemap_base_url' => 'http://example.com/'); + $this->drupalPost('admin/config/search/xmlsitemap/settings', $edit, t('Save configuration')); + $this->assertText(t('The configuration options have been saved.')); + + $this->regenerateSitemap(); + $this->drupalGetSitemap(array(), array('base_url' => NULL)); + $this->assertRaw('<loc>http://example.com/</loc>'); + } + + /** + * Test that configuration problems are reported properly in the status report. + */ + function testStatusReport() { + // Test the rebuild flag. + // @todo Re-enable these tests once we get a xmlsitemap_test.module. + //variable_set('xmlsitemap_generated_last', REQUEST_TIME); + //variable_set('xmlsitemap_rebuild_needed', TRUE); + //$this->assertXMLSitemapProblems(t('The XML sitemap data is out of sync and needs to be completely rebuilt.')); + //$this->clickLink(t('completely rebuilt')); + //$this->assertResponse(200); + //variable_set('xmlsitemap_rebuild_needed', FALSE); + //$this->assertNoXMLSitemapProblems(); + + // Test the regenerate flag (and cron hasn't run in a while). + variable_set('xmlsitemap_regenerate_needed', TRUE); + variable_set('xmlsitemap_generated_last', REQUEST_TIME - variable_get('cron_threshold_warning', 172800) - 100); + $this->assertXMLSitemapProblems(t('The XML cached files are out of date and need to be regenerated. You can run cron manually to regenerate the sitemap files.')); + $this->clickLink(t('run cron manually')); + $this->assertResponse(200); + $this->assertNoXMLSitemapProblems(); + + // Test chunk count > 1000. + // Test directory not writable. + } +} + +class XMLSitemapRobotsTxtIntegrationTest extends XMLSitemapTestHelper { + public static function getInfo() { + return array( + 'name' => 'XML sitemap robots.txt', + 'description' => 'Integration tests for the XML sitemap and robots.txt module.', + 'group' => 'XML sitemap', + 'dependencies' => array('robotstxt'), + ); + } + + function setUp($modules = array()) { + $modules[] = 'robotstxt'; + parent::setUp($modules); + } + + function testRobotsTxt() { + // Request the un-clean robots.txt path so this will work in case there is + // still the robots.txt file in the root directory. + $this->drupalGet('', array('query' => array('q' => 'robots.txt'))); + $this->assertRaw('Sitemap: ' . url('sitemap.xml', array('absolute' => TRUE))); + } +} diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.xmlsitemap.inc b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.xmlsitemap.inc new file mode 100644 index 00000000..3e236228 --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap.xmlsitemap.inc @@ -0,0 +1,311 @@ +<?php + +/** + * @file + * XML sitemap integration functions for xmlsitemap.module. + */ + +class XMLSitemapException extends Exception {} + +class XMLSitemapGenerationException extends XMLSitemapException {} + +/** + * Extended class for writing XML sitemap files. + */ +class XMLSitemapWriter extends XMLWriter { + protected $uri = NULL; + protected $sitemapElementCount = 0; + protected $linkCountFlush = 500; + protected $sitemap = NULL; + protected $sitemap_page = NULL; + protected $rootElement = 'urlset'; + + /** + * Constructor. + * + * @param $sitemap + * The sitemap array. + * @param $page + * The current page of the sitemap being generated. + */ + function __construct(stdClass $sitemap, $page) { + $this->sitemap = $sitemap; + $this->sitemap_page = $page; + $this->uri = xmlsitemap_sitemap_get_file($sitemap, $page); + $this->openUri($this->uri); + } + + public function openUri($uri) { + $return = parent::openUri($uri); + if (!$return) { + throw new XMLSitemapGenerationException(t('Could not open file @file for writing.', array('@file' => $uri))); + } + return $return; + } + + public function startDocument($version = '1.0', $encoding = 'UTF-8', $standalone = NULL) { + $this->setIndent(FALSE); + $result = parent::startDocument($version, $encoding); + if (!$result) { + throw new XMLSitemapGenerationException(t('Unknown error occurred while writing to file @file.', array('@file' => $this->uri))); + } + if (variable_get('xmlsitemap_xsl', 1)) { + $this->writeXSL(); + } + $this->startElement($this->rootElement, TRUE); + return $result; + } + + public function getSitemapUrl($path, array $options = array()) { + $options += $this->sitemap->uri['options']; + $options += array( + 'absolute' => TRUE, + 'base_url' => variable_get('xmlsitemap_base_url', $GLOBALS['base_url']), + 'language' => language_default(), + 'alias' => TRUE, + ); + if (!empty($options['protocol_relative'])) { + $options['base_url'] = preg_replace('~^https?:~', '', $options['base_url']); + } + return url($path, $options); + } + + /** + * Add the XML stylesheet to the XML page. + */ + public function writeXSL() { + $this->writePi('xml-stylesheet', 'type="text/xsl" href="' . $this->getSitemapUrl('sitemap.xsl', array('protocol_relative' => TRUE)) . '"'); + $this->writeRaw(PHP_EOL); + } + + /** + * Return an array of attributes for the root element of the XML. + */ + public function getRootAttributes() { + $attributes['xmlns'] = 'http://www.sitemaps.org/schemas/sitemap/0.9'; + if (variable_get('xmlsitemap_developer_mode', 0)) { + $attributes['xmlns:xsi'] = 'http://www.w3.org/2001/XMLSchema-instance'; + $attributes['xsi:schemaLocation'] = 'http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd'; + } + + drupal_alter('xmlsitemap_root_attributes', $attributes, $this->sitemap); + + return $attributes; + } + + public function generateXML() { + return xmlsitemap_generate_chunk($this->sitemap, $this, $this->sitemap_page); + } + + public function startElement($name, $root = FALSE) { + parent::startElement($name); + + if ($root) { + foreach ($this->getRootAttributes() as $name => $value) { + $this->writeAttribute($name, $value); + } + $this->writeRaw(PHP_EOL); + } + } + + /** + * Write an full XML sitemap element tag. + * + * @param $name + * The element name. + * @param $element + * An array of the elements properties and values. + */ + public function writeSitemapElement($name, array &$element) { + $this->writeElement($name, $element); + $this->writeRaw(PHP_EOL); + + // After a certain number of elements have been added, flush the buffer + // to the output file. + $this->sitemapElementCount++; + if (($this->sitemapElementCount % $this->linkCountFlush) == 0) { + $this->flush(); + } + } + + /** + * Write full element tag including support for nested elements. + * + * @param string $name + * The element name. + * @param string|array $content + * The element contents or an array of the elements' sub-elements. + * + * @todo Missing a return value since XMLWriter::writeElement() has one. + */ + public function writeElement($name, $content = NULL) { + if (is_array($content)) { + $this->startElement($name); + $xml_content = format_xml_elements($content); + // Remove additional spaces from the output. + $xml_content = str_replace(array(" <", ">\n"), array("<", ">"), $xml_content); + $this->writeRaw($xml_content); + $this->endElement(); + } + else { + parent::writeElement($name, check_plain((string) $content)); + } + } + + public function getURI() { + return $this->uri; + } + + public function getSitemapElementCount() { + return $this->sitemapElementCount; + } + + public function endDocument() { + $return = parent::endDocument(); + + if (!$return) { + throw new XMLSitemapGenerationException(t('Unknown error occurred while writing to file @file.', array('@file' => $this->uri))); + } + + //if (xmlsitemap_var('gz')) { + // $file_gz = $file . '.gz'; + // file_put_contents($file_gz, gzencode(file_get_contents($file), 9)); + //} + + return $return; + } +} + +class XMLSitemapIndexWriter extends XMLSitemapWriter { + protected $rootElement = 'sitemapindex'; + + function __construct(stdClass $sitemap, $page = 'index') { + parent::__construct($sitemap, 'index'); + } + + public function getRootAttributes() { + $attributes['xmlns'] = 'http://www.sitemaps.org/schemas/sitemap/0.9'; + if (variable_get('xmlsitemap_developer_mode', 0)) { + $attributes['xmlns:xsi'] = 'http://www.w3.org/2001/XMLSchema-instance'; + $attributes['xsi:schemaLocation'] = 'http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd'; + } + + drupal_alter('xmlsitemap_root_attributes', $attributes, $this->sitemap); + + return $attributes; + } + + public function generateXML() { + $lastmod_format = variable_get('xmlsitemap_lastmod_format', XMLSITEMAP_LASTMOD_MEDIUM); + + for ($i = 1; $i <= $this->sitemap->chunks; $i++) { + $element = array( + 'loc' => $this->getSitemapUrl('sitemap.xml', array('query' => array('page' => $i))), + // @todo Use the actual lastmod value of the chunk file. + 'lastmod' => gmdate($lastmod_format, REQUEST_TIME), + ); + $this->writeSitemapElement('sitemap', $element); + } + } +} + +/** + * Implements hook_xmlsitemap_link_info(). + */ +function xmlsitemap_xmlsitemap_link_info() { + return array( + 'frontpage' => array( + 'label' => t('Frontpage'), + 'xmlsitemap' => array( + 'settings callback' => 'xmlsitemap_link_frontpage_settings', + ), + ), + ); +} + +/** + * XML sitemap link type settings callback for frontpage link entity. + */ +function xmlsitemap_link_frontpage_settings(&$form) { + module_load_include('admin.inc', 'xmlsitemap'); + if (user_access('administer site configuration')) { + $form['#description'] = t('The front page path can be changed in the <a href="@url-frontpage">site information configuration</a>.', array('@url-frontpage' => url('admin/config/system/site-information'))); + } + $form['xmlsitemap_frontpage_priority'] = array( + '#type' => 'select', + '#title' => t('Priority'), + '#options' => xmlsitemap_get_priority_options(), + '#default_value' => variable_get('xmlsitemap_frontpage_priority', 1.0), + ); + $form['xmlsitemap_frontpage_changefreq'] = array( + '#type' => 'select', + '#title' => t('Change frequency'), + '#options' => xmlsitemap_get_changefreq_options(), + '#default_value' => variable_get('xmlsitemap_frontpage_changefreq', XMLSITEMAP_FREQUENCY_DAILY), + ); + return $form; +} + +/** + * Implements hook_xmlsitemap_link_alter(). + */ +function xmlsitemap_xmlsitemap_link_alter(&$link) { + // Alter the frontpage priority. + if ($link['type'] == 'frontpage' || $link['loc'] == '' || $link['loc'] == variable_get('site_frontpage', 'node')) { + $link['priority'] = variable_get('xmlsitemap_frontpage_priority', 1.0); + $link['changefreq'] = variable_get('xmlsitemap_frontpage_changefreq', XMLSITEMAP_FREQUENCY_DAILY); + } +} + +/** + * Implements hook_xmlsitemap_links(). + */ +function xmlsitemap_xmlsitemap_links() { + // Frontpage link. + $links[] = array( + 'type' => 'frontpage', + 'id' => 0, + 'loc' => '', + ); + return $links; +} + +/** + * Implements hook_xmlsitemap_sitemap_operations(). + */ +function xmlsitemap_xmlsitemap_sitemap_operations() { + $operations['update'] = array( + 'label' => t('Update cached files'), + 'action past' => t('Updated'), + 'callback' => 'xmlsitemap_sitemap_multiple_update', + ); + return $operations; +} + +/** + * XML sitemap operation callback; regenerate sitemap files using the batch API. + * + * @param $smids + * An array of XML sitemap IDs. + * + * @see xmlsitemap_regenerate_batch() + */ +function xmlsitemap_sitemap_multiple_update(array $smids) { + module_load_include('generate.inc', 'xmlsitemap'); + $batch = xmlsitemap_regenerate_batch($smids); + batch_set($batch); +} + +/** + * Implements hook_query_TAG_alter(). + */ +function xmlsitemap_query_xmlsitemap_link_bundle_access_alter(QueryAlterableInterface $query) { + if ($query instanceof EntityFieldQuery && $entity = $query->getMetaData('entity')) { + $info = $query->getMetaData('entity_info'); + $bundle = $query->getMetaData('bundle'); + if (empty($bundle)) { + $bundle = xmlsitemap_get_link_type_enabled_bundles($entity); + } + $query->entityCondition('bundle', $bundle, is_array($bundle) ? 'IN' : '='); + } +} diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_custom/xmlsitemap_custom.admin.inc b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_custom/xmlsitemap_custom.admin.inc new file mode 100644 index 00000000..6889ec75 --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_custom/xmlsitemap_custom.admin.inc @@ -0,0 +1,198 @@ +<?php + +/** + * @file + * Administrative page callbacks for the xmlsitemap_custom module. + */ + +function xmlsitemap_custom_list_links() { + $header = array( + 'loc' => array('data' => t('Location'), 'field' => 'loc', 'sort' => 'asc'), + 'priority' => array('data' => t('Priority'), 'field' => 'priority'), + 'changefreq' => array('data' => t('Change frequency'), 'field' => 'changefreq'), + 'language' => array('data' => t('Language'), 'field' => 'language'), + 'operations' => array('data' => t('Operations')), + ); + // Do not include the language column if locale is disabled. + if (!module_exists('locale')) { + unset($header['language']); + } + + $rows = array(); + $destination = drupal_get_destination(); + + $query = db_select('xmlsitemap') + ->extend('PagerDefault') + ->extend('TableSort'); + $query->fields('xmlsitemap'); + $query->condition('type', 'custom'); + $query->limit(25); + $query->orderByHeader($header); + $result = $query->execute(); + + foreach ($result as $link) { + $row = array(); + $row['loc'] = l($link->loc, $link->loc); + $row['priority'] = number_format($link->priority, 1); + $row['changefreq'] = $link->changefreq ? drupal_ucfirst(xmlsitemap_get_changefreq($link->changefreq)) : t('None'); + if (isset($header['language'])) { + $row['language'] = module_invoke('locale', 'language_name', $link->language); + } + $operations = array(); + $operations['edit'] = xmlsitemap_get_operation_link('admin/config/search/xmlsitemap/custom/edit/' . $link->id, array('title' => t('Edit'), 'modal' => TRUE)); + $operations['delete'] = xmlsitemap_get_operation_link('admin/config/search/xmlsitemap/custom/delete/' . $link->id, array('title' => t('Delete'), 'modal' => TRUE)); + $row['operations'] = array( + 'data' => array( + '#theme' => 'links', + '#links' => $operations, + '#attributes' => array('class' => array('links', 'inline')), + ), + ); + $rows[] = $row; + } + + // @todo Convert to tableselect + $build['xmlsitemap_custom_table'] = array( + '#theme' => 'table', + '#header' => $header, + '#rows' => $rows, + '#empty' => t('No custom links available.') . ' ' . l(t('Add custom link'), 'admin/config/search/xmlsitemap/custom/add', array('query' => $destination)), + ); + $build['xmlsitemap_custom_pager'] = array('#theme' => 'pager'); + return $build; +} + +function xmlsitemap_custom_edit_link_form($form, &$form_state, $link = array()) { + module_load_include('inc', 'xmlsitemap', 'xmlsitemap.admin'); + _xmlsitemap_set_breadcrumb('admin/config/search/xmlsitemap/custom'); + + $link += array( + 'id' => db_query("SELECT MAX(id) FROM {xmlsitemap} WHERE type = 'custom'")->fetchField() + 1, + 'loc' => '', + 'priority' => XMLSITEMAP_PRIORITY_DEFAULT, + 'lastmod' => 0, + 'changefreq' => 0, + 'changecount' => 0, + 'language' => LANGUAGE_NONE, + ); + + $form['type'] = array( + '#type' => 'value', + '#value' => 'custom', + ); + $form['id'] = array( + '#type' => 'value', + '#value' => $link['id'], + ); + $form['loc'] = array( + '#type' => 'textfield', + '#title' => t('Path to link'), + '#field_prefix' => url('', array('absolute' => TRUE)), + '#default_value' => $link['loc'] ? drupal_get_path_alias($link['loc'], $link['language']) : '', + '#required' => TRUE, + '#size' => 30, + ); + $form['priority'] = array( + '#type' => 'select', + '#title' => t('Priority'), + '#options' => xmlsitemap_get_priority_options(), + '#default_value' => number_format($link['priority'], 1), + '#description' => t('The priority of this URL relative to other URLs on your site.'), + ); + $form['changefreq'] = array( + '#type' => 'select', + '#title' => t('Change frequency'), + '#options' => array(0 => t('None')) + xmlsitemap_get_changefreq_options(), + '#default_value' => $link['changefreq'], + '#description' => t('How frequently the page is likely to change. This value provides general information to search engines and may not correlate exactly to how often they crawl the page.'), + ); + $languages = module_exists('locale') ? locale_language_list() : array(); + $form['language'] = array( + '#type' => 'select', + '#title' => t('Language'), + '#default_value' => $link['language'], + '#options' => array(LANGUAGE_NONE => t('Language neutral')) + $languages, + '#access' => $languages, + ); + + $form['actions'] = array( + '#type' => 'actions' + ); + $form['actions']['submit'] = array( + '#type' => 'submit', + '#value' => t('Save'), + '#weight' => 5, + ); + $form['actions']['cancel'] = array( + '#markup' => l(t('Cancel'), 'admin/config/search/xmlsitemap/custom'), + '#weight' => 10, + ); + + return $form; +} + +function xmlsitemap_custom_edit_link_form_validate($form, &$form_state) { + $link = &$form_state['values']; + + // Make sure we trim and normalize the path first. + $link['loc'] = trim($link['loc']); + $link['loc'] = drupal_get_normal_path($link['loc'], $link['language']); + + // Test anonymous user access to the custom link paths. + xmlsitemap_switch_user(0); + $menu_item = menu_get_item($link['loc']); + xmlsitemap_restore_user(); + + // Since the menu item access results are cached, manually check the current path. + if ($menu_item && strpos($link['loc'], 'admin/config/search/xmlsitemap/custom') === 0 && !user_access('administer xmlsitemap', drupal_anonymous_user())) { + $menu_item['access'] = FALSE; + } + + if (db_query_range("SELECT 1 FROM {xmlsitemap} WHERE type <> 'custom' AND loc = :loc AND status = 1 AND access = 1 AND language IN (:languages)", 0, 1, array(':loc' => $link['loc'], ':languages' => array(LANGUAGE_NONE, $link['language'])))->fetchField()) { + form_set_error('loc', t('There is already an existing link in the sitemap with the path %link.', array('%link' => $link['loc']))); + } + elseif (empty($menu_item['access']) && !is_readable('./' . $link['loc'])) { + // @todo Harden this file exists check to make sure we can't link to files + // like .htaccess. + form_set_error('loc', t('The custom link %link is either invalid or it cannot be accessed by anonymous users.', array('%link' => $link['loc']))); + } +} + +function xmlsitemap_custom_edit_link_form_submit($form, &$form_state) { + $link = $form_state['values']; + xmlsitemap_link_save($link); + drupal_set_message(t('The custom link for %loc was saved.', array('%loc' => $link['loc']))); + $form_state['redirect'] = 'admin/config/search/xmlsitemap/custom'; +} + +function xmlsitemap_custom_delete_link_form($form, &$form_state, array $link) { + // @todo Remove when http://drupal.org/node/576290 is fixed. + _xmlsitemap_set_breadcrumb('admin/config/search/xmlsitemap/custom'); + + $form['#link'] = $link; + $form['id'] = array( + '#type' => 'value', + '#value' => $link['id'], + ); + $form['link'] = array( + '#type' => 'value', + '#value' => $link, + ); + + return confirm_form( + $form, + t('Are you sure you want to delete the custom link for %loc?', array('%loc' => $link['loc'])), + 'admin/config/search/xmlsitemap/custom', + t('This action cannot be undone.'), + t('Delete'), + t('Cancel') + ); +} + +function xmlsitemap_custom_delete_link_form_submit($form, &$form_state) { + $link = $form_state['values']['link']; + xmlsitemap_link_delete('custom', $link['id']); + drupal_set_message(t('The custom link for %loc has been deleted.', array('%loc' => $link['loc']))); + watchdog('xmlsitemap', 'The custom link for %loc has been deleted.', array('%loc' => $link['loc']), WATCHDOG_NOTICE); + $form_state['redirect'] = 'admin/config/search/xmlsitemap/custom'; +} diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_custom/xmlsitemap_custom.info b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_custom/xmlsitemap_custom.info new file mode 100644 index 00000000..e77f4ca4 --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_custom/xmlsitemap_custom.info @@ -0,0 +1,17 @@ +name = XML sitemap custom +description = Adds user configurable links to the sitemap. +package = XML sitemap +core = 7.x +dependencies[] = xmlsitemap +files[] = xmlsitemap_custom.module +files[] = xmlsitemap_custom.admin.inc +files[] = xmlsitemap_custom.install +files[] = xmlsitemap_custom.test +configure = admin/config/search/xmlsitemap/custom + +; Information added by Drupal.org packaging script on 2016-05-25 +version = "7.x-2.3" +core = "7.x" +project = "xmlsitemap" +datestamp = "1464191061" + diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_custom/xmlsitemap_custom.install b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_custom/xmlsitemap_custom.install new file mode 100644 index 00000000..6731a55d --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_custom/xmlsitemap_custom.install @@ -0,0 +1,14 @@ +<?php + +/** + * @file + * Install and uninstall schema and functions for the xmlsitemap_custom module. + */ + +/** + * Implements hook_uninstall(). + */ +function xmlsitemap_custom_uninstall() { + drupal_load('module', 'xmlsitemap'); + xmlsitemap_link_delete_multiple(array('type' => 'custom')); +} diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_custom/xmlsitemap_custom.module b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_custom/xmlsitemap_custom.module new file mode 100644 index 00000000..f831acf1 --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_custom/xmlsitemap_custom.module @@ -0,0 +1,63 @@ +<?php + +/** + * Implements hook_menu(). + */ +function xmlsitemap_custom_menu() { + $items['admin/config/search/xmlsitemap/custom'] = array( + 'title' => 'Custom links', + 'page callback' => 'xmlsitemap_custom_list_links', + 'access arguments' => array('administer xmlsitemap'), + 'type' => MENU_LOCAL_TASK, + 'file' => 'xmlsitemap_custom.admin.inc', + ); + $items['admin/config/search/xmlsitemap/custom/add'] = array( + 'title' => 'Add custom link', + 'page callback' => 'drupal_get_form', + 'page arguments' => array('xmlsitemap_custom_edit_link_form'), + 'access arguments' => array('administer xmlsitemap'), + 'type' => MENU_LOCAL_ACTION, + 'file' => 'xmlsitemap_custom.admin.inc', + 'modal' => TRUE, + ); + $items['admin/config/search/xmlsitemap/custom/edit/%xmlsitemap_custom'] = array( + 'title' => 'Edit custom link', + 'page callback' => 'drupal_get_form', + 'page arguments' => array('xmlsitemap_custom_edit_link_form', 6), + 'access arguments' => array('administer xmlsitemap'), + 'file' => 'xmlsitemap_custom.admin.inc', + 'modal' => TRUE, + ); + $items['admin/config/search/xmlsitemap/custom/delete/%xmlsitemap_custom'] = array( + 'title' => 'Delete custom link', + 'page callback' => 'drupal_get_form', + 'page arguments' => array('xmlsitemap_custom_delete_link_form', 6), + 'access arguments' => array('administer xmlsitemap'), + 'file' => 'xmlsitemap_custom.admin.inc', + 'modal' => TRUE, + ); + return $items; +} + +/** + * Menu load callback; load a custom sitemap link from the {xmlsitemap} table. + * + * @param $id + * The sitemap link ID of the custom link to load. + * + * @see xmlsitemap_link_load() + */ +function xmlsitemap_custom_load($id) { + return xmlsitemap_link_load('custom', $id); +} + +/** + * Implements hook_xmlsitemap_link_info(). + */ +function xmlsitemap_custom_xmlsitemap_link_info() { + return array( + 'custom' => array( + 'label' => t('Custom links'), + ), + ); +} diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_custom/xmlsitemap_custom.test b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_custom/xmlsitemap_custom.test new file mode 100644 index 00000000..b8b14deb --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_custom/xmlsitemap_custom.test @@ -0,0 +1,107 @@ +<?php + +/** + * @file + * Unit tests for the xmlsitemap_custom module. + */ + +class XMLSitemapCustomFunctionalTest extends XMLSitemapTestHelper { + public static function getInfo() { + return array( + 'name' => 'XML sitemap custom interface tests', + 'description' => 'Functional tests for the XML sitemap custom module.', + 'group' => 'XML sitemap', + ); + } + + function setUp($modules = array()) { + $modules[] = 'xmlsitemap_custom'; + $modules[] = 'path'; + parent::setUp($modules); + + $this->admin_user = $this->drupalCreateUser(array('access content', 'administer xmlsitemap')); + $this->drupalLogin($this->admin_user); + } + + function testCustomLinks() { + // Set a path alias for the node page. + $alias = array('source' => 'system/files', 'alias' => 'public-files'); + path_save($alias); + + $this->drupalGet('admin/config/search/xmlsitemap/custom'); + $this->clickLink(t('Add custom link')); + + // Test an invalid path. + $edit['loc'] = 'invalid-testing-path'; + $this->drupalPost(NULL, $edit, t('Save')); + $this->assertText(t('The custom link @link is either invalid or it cannot be accessed by anonymous users.', array('@link' => $edit['loc']))); + $this->assertNoSitemapLink(array('type' => 'custom', 'loc' => $edit['loc'])); + + // Test a path not accessible to anonymous user. + $edit['loc'] = 'admin/people/people'; + $this->drupalPost(NULL, $edit, t('Save')); + $this->assertText(t('The custom link @link is either invalid or it cannot be accessed by anonymous users.', array('@link' => $edit['loc']))); + $this->assertNoSitemapLink(array('type' => 'custom', 'loc' => $edit['loc'])); + + // Test that the current page, which should not give a false positive for + // $menu_item['access'] since the result has been cached already. + $edit['loc'] = 'admin/config/search/xmlsitemap/custom/add'; + $this->drupalPost(NULL, $edit, t('Save')); + $this->assertText(t('The custom link @link is either invalid or it cannot be accessed by anonymous users.', array('@link' => $edit['loc']))); + $this->assertNoSitemapLink(array('type' => 'custom', 'loc' => $edit['loc'])); + + // Add an aliased path with padded spaces. + $edit['loc'] = ' public-files '; + $this->drupalPost(NULL, $edit, t('Save')); + $this->assertText('The custom link for system/files was saved'); + $links = xmlsitemap_link_load_multiple(array('type' => 'custom', 'loc' => 'system/files')); + $this->assertEqual(count($links), 1, t('Custom link saved in the database.')); + $link = reset($links); + $this->assertSitemapLinkValues('custom', $link['id'], array('priority' => 0.5, 'changefreq' => 0, 'access' => 1, 'status' => 1)); + + $this->clickLink('Edit'); + $edit = array( + 'priority' => 0.1, + 'changefreq' => XMLSITEMAP_FREQUENCY_ALWAYS, + ); + $this->drupalPost(NULL, $edit, t('Save')); + $this->assertText('The custom link for system/files was saved'); + $this->assertSitemapLinkValues('custom', $link['id'], array('priority' => 0.1, 'changefreq' => XMLSITEMAP_FREQUENCY_ALWAYS, 'access' => 1, 'status' => 1)); + + $this->clickLink('Delete'); + $this->drupalPost(NULL, array(), t('Delete')); + $this->assertText('The custom link for system/files has been deleted.'); + $this->assertNoSitemapLink(array('type' => 'custom', 'loc' => 'system/files')); + } + + /** + * Test adding files as custom links. + */ + function testCustomFileLinks() { + // Test an invalid file. + $edit['loc'] = $this->randomName(); + $this->drupalPost('admin/config/search/xmlsitemap/custom/add', $edit, t('Save')); + $this->assertText(t('The custom link @link is either invalid or it cannot be accessed by anonymous users.', array('@link' => $edit['loc']))); + $this->assertNoSitemapLink(array('type' => 'custom', 'loc' => $edit['loc'])); + + // Test an unaccessible file . + //$edit['loc'] = '.htaccess'; + //$this->drupalPost('admin/config/search/xmlsitemap/custom/add', $edit, t('Save')); + //$this->assertText(t('The custom link @link is either invalid or it cannot be accessed by anonymous users.', array('@link' => $edit['loc']))); + //$this->assertNoSitemapLink(array('type' => 'custom', 'loc' => $edit['loc'])); + + // Test a valid file. + $edit['loc'] = 'misc/drupal.js'; + $this->drupalPost('admin/config/search/xmlsitemap/custom/add', $edit, t('Save')); + $this->assertText('The custom link for ' . $edit['loc'] . ' was saved'); + $links = xmlsitemap_link_load_multiple(array('type' => 'custom', 'loc' => $edit['loc'])); + $this->assertEqual(count($links), 1, t('Custom link saved in the database.')); + + // Test a valid folder. + $edit['loc'] = 'misc'; + $this->drupalPost('admin/config/search/xmlsitemap/custom/add', $edit, t('Save')); + $this->assertText('The custom link for ' . $edit['loc'] . ' was saved'); + $links = xmlsitemap_link_load_multiple(array('type' => 'custom', 'loc' => $edit['loc'])); + $this->assertEqual(count($links), 1, t('Custom link saved in the database.')); + } +} diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_engines/tests/xmlsitemap_engines.test b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_engines/tests/xmlsitemap_engines.test new file mode 100644 index 00000000..0f0dbfdf --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_engines/tests/xmlsitemap_engines.test @@ -0,0 +1,105 @@ +<?php + +/** + * @file + * Tests for the xmlsitemap_engines module. + */ + +class XMLSitemapEnginesFunctionalTest extends XMLSitemapTestHelper { + protected $submit_url; + + public static function getInfo() { + return array( + 'name' => 'XML sitemap engines functional tests', + 'description' => 'Functional tests for the XML sitemap engines module.', + 'group' => 'XML sitemap', + ); + } + + function setUp($modules = array()) { + $modules[] = 'xmlsitemap_engines'; + $modules[] = 'xmlsitemap_engines_test'; + parent::setUp($modules); + + $this->admin_user = $this->drupalCreateUser(array('access content', 'administer xmlsitemap')); + $this->drupalLogin($this->admin_user); + + // @todo For some reason the test client does not have clean URLs while + // the test runner does, so it causes mismatches in watchdog assertions + // later. + variable_set('clean_url', 0); + + $this->submit_url = url('ping', array('absolute' => TRUE, 'query' => array('sitemap' => ''))) . '[sitemap]'; + } + + function submitEngines() { + variable_set('xmlsitemap_engines_submit_last', REQUEST_TIME - 10000); + variable_set('xmlsitemap_generated_last', REQUEST_TIME - 100); + variable_set('xmlsitemap_engines_minimum_lifetime', 0); + xmlsitemap_engines_cron(); + $this->assertTrue(variable_get('xmlsitemap_engines_submit_last', 0) > (REQUEST_TIME - 100), 'Submitted the sitemaps to search engines.'); + } + + function testPrepareURL() { + $sitemap = 'http://example.com/sitemap.xml'; + $input = 'http://example.com/ping?sitemap=[sitemap]&foo=bar'; + $output = 'http://example.com/ping?sitemap=http://example.com/sitemap.xml&foo=bar'; + $this->assertEqual(xmlsitemap_engines_prepare_url($input, $sitemap), $output); + } + + function testSubmitSitemaps() { + $sitemaps = array(); + $sitemap = new stdClass(); + $sitemap->uri = array( + 'path' => 'http://example.com/sitemap.xml', + 'options' => array(), + ); + $sitemaps[] = $sitemap; + $sitemap = new stdClass(); + $sitemap->uri = array( + 'path' => 'http://example.com/sitemap-2.xml', + 'options' => array(), + ); + $sitemaps[] = $sitemap; + xmlsitemap_engines_submit_sitemaps($this->submit_url, $sitemaps); + + $this->assertWatchdogMessage(array('type' => 'xmlsitemap', 'message' => 'Recieved ping for @sitemap.', 'variables' => array('@sitemap' => 'http://example.com/sitemap.xml'))); + $this->assertWatchdogMessage(array('type' => 'xmlsitemap', 'message' => 'Recieved ping for @sitemap.', 'variables' => array('@sitemap' => 'http://example.com/sitemap-2.xml'))); + } + + function testPing() { + $edit = array('xmlsitemap_engines_engines[simpletest]' => TRUE); + $this->drupalPost('admin/config/search/xmlsitemap/engines', $edit, t('Save configuration')); + $this->assertText(t('The configuration options have been saved.')); + + $this->submitEngines(); + $this->assertWatchdogMessage(array('type' => 'xmlsitemap', 'message' => 'Submitted the sitemap to %url and received response @code.')); + $this->assertWatchdogMessage(array('type' => 'xmlsitemap', 'message' => 'Recieved ping for @sitemap.')); + } + + function testCustomURL() { + $edit = array('xmlsitemap_engines_custom_urls' => 'an-invalid-url'); + $this->drupalPost('admin/config/search/xmlsitemap/engines', $edit, t('Save configuration')); + $this->assertText('Invalid URL an-invalid-url.'); + $this->assertNoText('The configuration options have been saved.'); + + $url = url('ping', array('absolute' => TRUE)); + $edit = array('xmlsitemap_engines_custom_urls' => $url); + $this->drupalPost('admin/config/search/xmlsitemap/engines', $edit, t('Save configuration')); + $this->assertText(t('The configuration options have been saved.')); + + $this->submitEngines(); + $this->assertWatchdogMessage(array('type' => 'xmlsitemap', 'message' => 'Submitted the sitemap to %url and received response @code.', 'variables' => array('%url' => $url, '@code' => '404'))); + $this->assertWatchdogMessage(array('type' => 'xmlsitemap', 'message' => 'No valid sitemap parameter provided.')); + $this->assertWatchdogMessage(array('type' => 'page not found', 'message' => 'ping')); + + $edit = array('xmlsitemap_engines_custom_urls' => $this->submit_url); + $this->drupalPost('admin/config/search/xmlsitemap/engines', $edit, t('Save configuration')); + $this->assertText(t('The configuration options have been saved.')); + + $this->submitEngines(); + $url = xmlsitemap_engines_prepare_url($this->submit_url, url('sitemap.xml', array('absolute' => TRUE))); + $this->assertWatchdogMessage(array('type' => 'xmlsitemap', 'message' => 'Submitted the sitemap to %url and received response @code.', 'variables' => array('%url' => $url, '@code' => '200'))); + $this->assertWatchdogMessage(array('type' => 'xmlsitemap', 'message' => 'Recieved ping for @sitemap.', 'variables' => array('@sitemap' => url('sitemap.xml', array('absolute' => TRUE))))); + } +} diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_engines/tests/xmlsitemap_engines_test.info b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_engines/tests/xmlsitemap_engines_test.info new file mode 100644 index 00000000..19a3afad --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_engines/tests/xmlsitemap_engines_test.info @@ -0,0 +1,14 @@ +name = XML sitemap engines test +description = Support module for XML sitemap engines testing. +package = Testing +core = 7.x +files[] = xmlsitemap_engines_test.module +version = VERSION +hidden = TRUE + +; Information added by Drupal.org packaging script on 2016-05-25 +version = "7.x-2.3" +core = "7.x" +project = "xmlsitemap" +datestamp = "1464191061" + diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_engines/tests/xmlsitemap_engines_test.module b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_engines/tests/xmlsitemap_engines_test.module new file mode 100644 index 00000000..1a61d84a --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_engines/tests/xmlsitemap_engines_test.module @@ -0,0 +1,42 @@ +<?php + +/** + * Implements hook_menu(). + */ +function xmlsitemap_engines_test_menu() { + $items['ping'] = array( + 'page callback' => 'xmlsitemap_engines_test_pinged', + 'access callback' => TRUE, + 'type' => MENU_CALLBACK, + ); + return $items; +} + +/** + * Implements hook_xmlsitemap_engine_info(). + */ +function xmlsitemap_engines_test_xmlsitemap_engine_info() { + $engines['simpletest'] = array( + 'name' => t('SimpleTest'), + 'url' => 'http://example.com/', + ); + return $engines; +} + +/** + * Implements hook_xmlsitemap_engine_info_alter(). + */ +function xmlsitemap_engines_test_xmlsitemap_engine_info_alter(&$engines) { + $engines['simpletest']['url'] = url('ping', array('absolute' => TRUE, 'query' => array('sitemap' => ''))) . '[sitemap]'; +} + +function xmlsitemap_engines_test_pinged() { + if (empty($_GET['sitemap']) || !valid_url($_GET['sitemap'])) { + watchdog('xmlsitemap', 'No valid sitemap parameter provided.', array(), WATCHDOG_WARNING); + // @todo Remove this? Causes an extra watchdog error to be handled. + return MENU_NOT_FOUND; + } + else { + watchdog('xmlsitemap', 'Recieved ping for @sitemap.', array('@sitemap' => $_GET['sitemap'])); + } +} diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_engines/xmlsitemap_engines.admin.inc b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_engines/xmlsitemap_engines.admin.inc new file mode 100644 index 00000000..e1df50d9 --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_engines/xmlsitemap_engines.admin.inc @@ -0,0 +1,65 @@ +<?php + +/** + * @file + * Administrative page callbacks for the xmlsitemap_engines module. + */ + +/** + * Form builder; Administration settings form. + */ +function xmlsitemap_engines_settings_form() { + // Build the list of support engines for the checkboxes options. + $engines = xmlsitemap_engines_get_engine_info(); + $engine_options = array(); + foreach ($engines as $engine => $engine_info) { + $engine_options[$engine] = $engine_info['name']; + } + asort($engine_options); + + $form['xmlsitemap_engines_engines'] = array( + '#type' => 'checkboxes', + '#title' => t('Submit the sitemap to the following engines'), + '#default_value' => variable_get('xmlsitemap_engines_engines', array()), + '#options' => $engine_options, + ); + $form['xmlsitemap_engines_minimum_lifetime'] = array( + '#type' => 'select', + '#title' => t('Do not submit more often than every'), + '#options' => drupal_map_assoc(array(3600, 10800, 21600, 32400, 43200, 86400, 172800, 259200, 604800, 604800 * 2, 604800 * 4), 'format_interval'), + '#default_value' => variable_get('xmlsitemap_engines_minimum_lifetime', 86400), + ); + $form['xmlsitemap_engines_submit_updated'] = array( + '#type' => 'checkbox', + '#title' => t('Only submit if the sitemap has been updated since the last submission.'), + '#default_value' => variable_get('xmlsitemap_engines_submit_updated', TRUE), + ); + $form['xmlsitemap_engines_custom_urls'] = array( + '#type' => 'textarea', + '#title' => t('Custom submission URLs'), + '#description' => t('Enter one URL per line. The token [sitemap] will be replaced with the URL to your sitemap. For example: %example-before would become %example-after.', array('%example-before' => 'http://example.com/ping?[sitemap]', '%example-after' => xmlsitemap_engines_prepare_url('http://example.com/ping?[sitemap]', url('sitemap.xml', array('absolute' => TRUE))))), + '#default_value' => variable_get('xmlsitemap_engines_custom_urls', ''), + '#rows' => 2, + '#wysiwyg' => FALSE, + '#element_validate' => array('xmlsitemap_engines_validate_custom_urls'), + ); + + // Ensure the xmlsitemap_engines variable gets filterd to a simple array. + $form['array_filter'] = array('#type' => 'value', '#value' => TRUE); + + return system_settings_form($form); +} + +/** + * Validate the custom submission URL element. + */ +function xmlsitemap_engines_validate_custom_urls($element, &$form_state) { + $custom_urls = preg_split('/[\r\n]+/', $element['#value'], -1, PREG_SPLIT_NO_EMPTY); + foreach ($custom_urls as $custom_url) { + $url = xmlsitemap_engines_prepare_url($custom_url, ''); + if (!valid_url($url, TRUE)) { + form_error($element, t('Invalid URL %url.', array('%url' => $custom_url))); + } + } + $form_state['values']['xmlsitemap_engines_custom_urls'] = implode("\n", $custom_urls); +} diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_engines/xmlsitemap_engines.api.php b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_engines/xmlsitemap_engines.api.php new file mode 100644 index 00000000..4be9d17f --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_engines/xmlsitemap_engines.api.php @@ -0,0 +1,34 @@ +<?php + +/** + * @file + * Hooks provided by the XML sitemap engines module. + */ + +/** + * @addtogroup hooks + * @{ + */ + +/** + * Provide a list of supported sitemap engines. + */ +function hook_xmlsitemap_engine_info() { + $engines['example'] = array( + 'name' => t('Example search engine'), + 'url' => 'http://example.com/ping?sitemap=[sitemap]' + ); + return $engines; +} + +/** + * Alter the list of sitemap engines. + */ +function hook_xmlsitemap_engine_info_alter(&$engines) { + $engines['example']['name'] = t('Kitten Search'); + $engines['example']['url'] = 'http://kittens.com/ping?sitemap=[sitemap]'; +} + +/** + * @} End of "addtogroup hooks". + */ diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_engines/xmlsitemap_engines.info b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_engines/xmlsitemap_engines.info new file mode 100644 index 00000000..e8894d60 --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_engines/xmlsitemap_engines.info @@ -0,0 +1,18 @@ +name = XML sitemap engines +description = Submit the sitemap to search engines. +package = XML sitemap +core = 7.x +dependencies[] = xmlsitemap +files[] = xmlsitemap_engines.module +files[] = xmlsitemap_engines.admin.inc +files[] = xmlsitemap_engines.install +files[] = tests/xmlsitemap_engines.test +recommends[] = site_verify +configure = admin/config/search/xmlsitemap/engines + +; Information added by Drupal.org packaging script on 2016-05-25 +version = "7.x-2.3" +core = "7.x" +project = "xmlsitemap" +datestamp = "1464191061" + diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_engines/xmlsitemap_engines.install b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_engines/xmlsitemap_engines.install new file mode 100644 index 00000000..72ec1cc7 --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_engines/xmlsitemap_engines.install @@ -0,0 +1,45 @@ +<?php + +/** + * @file + * Install, update and uninstall functions for the xmlsitemap_engines module. + */ + +/** + * Implements hook_install(). + */ +function xmlsitemap_engines_install() { + // Set this module's weight to 1 so xmlsitemap_engines_cron() runs after + // the sitemap has been generated in xmlsitemap_cron(). + db_update('system') + ->fields(array('weight' => 2)) + ->condition('type', 'module') + ->condition('name', 'xmlsitemap_engines') + ->execute(); +} + +/** + * Implements hook_uninstall(). + */ +function xmlsitemap_engines_uninstall() { + variable_del('xmlsitemap_engines_engines'); + variable_del('xmlsitemap_engines_custom_urls'); + variable_del('xmlsitemap_engines_minimum_lifetime'); + variable_del('xmlsitemap_engines_submit_last'); + variable_del('xmlsitemap_engines_submit_updated'); +} + +/** + * Deprecate support for Ask.com, Moreover, and Yahoo! search engines. + */ +function xmlsitemap_engines_update_6202() { + $engines = variable_get('xmlsitemap_engines_engines', array()); + $removed = array( + 'ask' => 'Ask.com', + 'moreover' => 'Moreover', + 'yahoo' => 'Yahoo.com', + ); + $engines = array_diff($engines, array_keys($removed)); + variable_set('xmlsitemap_engines_engines', $engines); + return t('The following search engines have deprecated their XML sitemap ping services and have been disabled: !list.', array('!list' => implode(', ', $removed))); +} diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_engines/xmlsitemap_engines.module b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_engines/xmlsitemap_engines.module new file mode 100644 index 00000000..a03e2894 --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_engines/xmlsitemap_engines.module @@ -0,0 +1,245 @@ +<?php + +/** + * Implements hook_hook_info(). + */ +function xmlsitemap_engines_hook_info() { + $hooks['xmlsitemap_engine_info'] = array( + 'group' => 'xmlsitemap', + ); + $hooks['xmlsitemap_engine_info_alter'] = array( + 'group' => 'xmlsitemap', + ); + return $hooks; +} + +/** + * Implements hook_help(). + */ +function xmlsitemap_engines_help($path, $arg) { + $output = ''; + switch ($path) { + case 'admin/config/search/xmlsitemap/engines': + if (!module_exists('site_verify')) { + $output .= '<p>' . t('In order to verify site ownership with the search engines listed below, it is highly recommended to download and install the <a href="@site-verify">Site verification module</a>.', array('@site-verify' => 'http://drupal.org/project/site_verify')) . '</p>'; + } + break; + } + + return $output; +} + +/** + * Implements hook_menu(). + */ +function xmlsitemap_engines_menu() { + $items['admin/config/search/xmlsitemap/engines'] = array( + 'title' => 'Search Engines', + 'page callback' => 'drupal_get_form', + 'page arguments' => array('xmlsitemap_engines_settings_form'), + 'access arguments' => array('administer xmlsitemap'), + 'type' => MENU_LOCAL_TASK, + 'file' => 'xmlsitemap_engines.admin.inc', + ); + //$items['admin/config/search/xmlsitemap/engines/submit'] = array( + // 'page callback' => 'xmlsitemap_engines_submit', + // 'access callback' => 'xmlsitemap_engines_submit_access', + // 'type' => MENU_CALLBACK, + //); + + return $items; +} + +/** + * Implements hook_cron(). + */ +function xmlsitemap_engines_cron() { + if (xmlsitemap_engines_submit_access()) { + xmlsitemap_engines_submit_engines(); + } +} + +function xmlsitemap_engines_can_submit() { + // Skip if the site is offline since search engines will not be able to + // access the site's content. + if (variable_get('maintenance_mode', 0) || defined('MAINTENANCE_MODE')) { + return FALSE; + } + + if (!variable_get('xmlsitemap_engines_engines', array()) && !variable_get('xmlsitemap_engines_custom_urls', '')) { + return FALSE; + } + + return TRUE; +} + +function xmlsitemap_engines_submit_access() { + if (!xmlsitemap_engines_can_submit()) { + return FALSE; + } + + // Allow manual submissions to run. + //if ($_GET['q'] == 'admin/config/search/xmlsitemap/engines/submit' && user_access('administer xmlsitemap')) { + // return TRUE; + //} + + $submit_updated = variable_get('xmlsitemap_engines_submit_updated', TRUE); + $submitted_last = variable_get('xmlsitemap_engines_submit_last', 0); + $minimum_lifetime = variable_get('xmlsitemap_engines_minimum_lifetime', 86400); + + // Skip if sitemap data has not been updated since last submission. + if ($submit_updated && variable_get('xmlsitemap_generated_last', 0) <= $submitted_last) { + return FALSE; + } + + // Skip if the time since last submission is less than the minimum lifetime. + if ((REQUEST_TIME - $submitted_last) < $minimum_lifetime) { + return FALSE; + } + + return TRUE; +} + +/** + * Submit the sitemaps to all the specified search engines. + * + * @param $smids + * An optional array of XML sitemap IDs. If not provided, it will load all + * existing XML sitemaps. + */ +function xmlsitemap_engines_submit_engines(array $smids = array()) { + if (empty($smids)) { + $smids = FALSE; + } + + $sitemaps = xmlsitemap_sitemap_load_multiple($smids); + $engines = variable_get('xmlsitemap_engines_engines', array()); + $engine_info = xmlsitemap_engines_get_engine_info(); + + foreach ($engines as $engine) { + if (isset($engine_info[$engine]['url'])) { + xmlsitemap_engines_submit_sitemaps($engine_info[$engine]['url'], $sitemaps); + } + } + + $custom_urls = variable_get('xmlsitemap_engines_custom_urls', ''); + $custom_urls = preg_split('/[\r\n]+/', $custom_urls, -1, PREG_SPLIT_NO_EMPTY); + foreach ($custom_urls as $custom_url) { + xmlsitemap_engines_submit_sitemaps($custom_url, $sitemaps); + } + + variable_set('xmlsitemap_engines_submit_last', REQUEST_TIME); +} + +/** + * Submit the sitemaps to a specific URL. + * + * @param $url + * The URL for sitemap submission. + * @param $sitemaps + * An array of URLs of the sitemaps to submit. + */ +function xmlsitemap_engines_submit_sitemaps($url, array $sitemaps) { + foreach ($sitemaps as $sitemap) { + $sitemap->url = url($sitemap->uri['path'], $sitemap->uri['options']); + $submit_url = xmlsitemap_engines_prepare_url($url, $sitemap->url); + $request = drupal_http_request($submit_url); + watchdog('xmlsitemap', 'Submitted the sitemap to %url and received response @code.', array('%url' => $submit_url, '@code' => $request->code)); + } +} + +/** + * Replace valid tokens in the URL with their appropriate values. + * + * @param $url + * An un-tokenized URL. + * @return + * A tokenized URL. + */ +function xmlsitemap_engines_prepare_url($url, $sitemap) { + return str_replace('[sitemap]', $sitemap, $url); +} + +/** + * Returns information about supported search engines. + * + * @param $engine + * (optional) The engine to return information for. If omitted, information + * for all engines is returned. + * @param $reset + * (optional) Boolean whether to reset the static cache and do nothing. Only + * used for tests. + * + * @see hook_xmlsitemap_engines_info() + * @see hook_xmlsitemap_engines_info_alter() + */ +function xmlsitemap_engines_get_engine_info($engine = NULL) { + global $language; + $engines = &drupal_static(__FUNCTION__); + + if (!isset($engines)) { + if ($cached = cache_get('xmlsitemap:engines:' . $language->language)) { + $engines = $cached->data; + } + else { + // Fetch the results of all hook_xmlsitemap_engine_info() implementations. + $engines = module_invoke_all('xmlsitemap_engine_info'); + // Allow other modulse to alter the engine info. + drupal_alter('xmlsitemap_engine_info', $engines); + // Cache by language since engine names are translated. + cache_set('xmlsitemap:engines:' . $language->language, $engines); + } + } + + if (isset($engine)) { + return isset($engines[$engine]) ? $engines[$engine] : NULL; + } + else { + return $engines; + } +} + +/** + * Implements hook_xmlsitemap_engine_info(). + */ +function xmlsitemap_engines_xmlsitemap_engine_info() { + $engines['google'] = array( + 'name' => t('Google'), + 'url' => 'http://www.google.com/webmasters/tools/ping?sitemap=[sitemap]', + 'help url' => 'http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=156184', + ); + $engines['bing'] = array( + 'name' => t('Bing'), + 'url' => 'http://www.bing.com/webmaster/ping.aspx?siteMap=[sitemap]', + 'help url' => 'http://www.bing.com/webmaster', + ); + return $engines; +} + +/** + * Implements hook_variables(). + */ +function xmlsitemap_engines_variables() { + $variables = array( + 'xmlsitemap_engines_engines' => array(), + 'xmlsitemap_engines_custom_urls' => '', + 'xmlsitemap_engines_minimum_lifetime' => 86400, + 'xmlsitemap_engines_submit_last' => 0, + 'xmlsitemap_engines_submit_updated' => TRUE, + ); + return $variables; +} + +/** + * Implements hook_xmlsitemap_sitemap_operations(). + */ +function xmlsitemap_engines_xmlsitemap_sitemap_operations() { + if (xmlsitemap_engines_can_submit()) { + $operations['xmlsitemap_engines_submit'] = array( + 'label' => t('Submit to search engines'), + 'action past' => t('Submitted'), + 'callback' => 'xmlsitemap_engines_submit_engines', + ); + return $operations; + } +} diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_i18n/xmlsitemap_i18n.info b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_i18n/xmlsitemap_i18n.info new file mode 100644 index 00000000..c3f79af1 --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_i18n/xmlsitemap_i18n.info @@ -0,0 +1,15 @@ +name = XML sitemap internationalization +description = Enables multilingual XML sitemaps. +package = XML sitemap +core = 7.x +dependencies[] = xmlsitemap +dependencies[] = i18n +files[] = xmlsitemap_i18n.module +files[] = xmlsitemap_i18n.test + +; Information added by Drupal.org packaging script on 2016-05-25 +version = "7.x-2.3" +core = "7.x" +project = "xmlsitemap" +datestamp = "1464191061" + diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_i18n/xmlsitemap_i18n.module b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_i18n/xmlsitemap_i18n.module new file mode 100644 index 00000000..c02163fc --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_i18n/xmlsitemap_i18n.module @@ -0,0 +1,116 @@ +<?php + +/** + * Implements hook_xmlsitemap_context_info(). + */ +function xmlsitemap_i18n_xmlsitemap_context_info() { + $context['language'] = array( + 'label' => t('Language'), + 'summary callback' => 'locale_language_name', + 'default' => language_default('language'), + ); + return $context; +} + +/** + * Implements hook_xmlsitemap_context(). + */ +function xmlsitemap_i18n_xmlsitemap_context() { + $context['language'] = $GLOBALS['language']->language; + return $context; +} + +/** + * Implements xmlsitemap_context_url_options(). + */ +function xmlsitemap_i18n_xmlsitemap_context_url_options(array $context) { + $options = array(); + if (isset($context['language'])) { + $options['language'] = xmlsitemap_language_load($context['language']); + } + return $options; +} + +/** + * Implements hook_form_FORM_ID_alter(). + */ +function xmlsitemap_i18n_form_xmlsitemap_sitemap_edit_form_alter(&$form, $form_state) { + $form['context']['language'] = array( + '#type' => 'select', + '#title' => t('Language'), + '#options' => locale_language_list(), + '#default_value' => isset($form['#sitemap']->context['language']) ? $form['#sitemap']->context['language'] : LANGUAGE_NONE, + ); +} + +/** + * Implements hook_form_FORM_ID_alter(). + * + * Set the regeneration needed flag if settings are changed. + */ +function xmlsitemap_form_locale_languages_overview_form_alter(&$form, $form_state) { + array_unshift($form['#submit'], 'xmlsitemap_form_submit_flag_regenerate'); +} + +/** + * Implements hook_form_FORM_ID_alter(). + * + * Set the regeneration needed flag if multilingual settings are changed. + */ +function xmlsitemap_i18n_form_i18n_admin_settings_alter(&$form, $form_state) { + array_unshift($form['#submit'], 'xmlsitemap_form_submit_flag_regenerate'); +} + +/** + * Implements hook_query_TAG_alter(). + * + * @see i18n_db_rewrite_where() + */ +function xmlsitemap_i18n_query_xmlsitemap_generate_alter(QueryAlterableInterface $query) { + $mode = variable_get('i18n_selection_mode', 'simple'); + $sitemap = $query->getMetaData('sitemap'); + + if (!isset($sitemap->context['language']) || $mode == 'off') { + return; + } + + // Get languages to simplify query building. + $current = $sitemap->context['language']; + $default = language_default(); + + if ($mode == 'mixed' && $current == $default) { + // If mode is mixed but current = default, is the same as 'simple'. + $mode = 'simple'; + } + + switch ($mode) { + case 'simple': + // Current language and language neutral. + $query->condition('x.language', array($current, LANGUAGE_NONE)); + break; + case 'mixed': + // Mixed current language (if available) or default language (if not) and language neutral. + $query->condition('x.language', array($current, $default, LANGUAGE_NONE)); + break; + case 'default': + // Only default language and language neutral. + $query->condition('x.language', array($default, LANGUAGE_NONE)); + break; + case 'strict': + // Only current language (for nodes), simple for all other types. + $node_condition = db_and(); + $node_condition->condition('x.type', 'node'); + $node_condition->condition('x.language', $current); + $normal_condition = db_and(); + $normal_condition->condition('x.type', 'node', '<>'); + $normal_condition->condition('x.language', array($current, LANGUAGE_NONE)); + $condition = db_or(); + $condition->condition($node_condition); + $condition->condition($normal_condition); + $query->condition($condition); + break; + case 'off': + // All content. No language conditions apply. + break; + } +} diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_i18n/xmlsitemap_i18n.test b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_i18n/xmlsitemap_i18n.test new file mode 100644 index 00000000..d34b388e --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_i18n/xmlsitemap_i18n.test @@ -0,0 +1,139 @@ +<?php + +/** + * @file + * Unit tests for the xmlsitemap_i18n module. + */ + +/** + * Common base test class for XML sitemap internationalization tests. + */ +class XMLSitemapI18nWebTestCase extends XMLSitemapTestHelper { + protected $admin_user; + + /** + * Set up an administrative user account and testing keys. + */ + function setUp($modules = array()) { + // Call parent::setUp() allowing test cases to pass further modules. + $modules[] = 'locale'; + $modules[] = 'translation'; + $modules[] = 'i18n'; + $modules[] = 'xmlsitemap_i18n'; + parent::setUp($modules); + + // Add predefined language and reset the locale cache. + require_once DRUPAL_ROOT . '/includes/locale.inc'; + locale_add_language('fr', NULL, NULL, LANGUAGE_LTR, '', 'fr'); + drupal_language_initialize(); + variable_set('language_negotiation', LOCALE_LANGUAGE_NEGOTIATION_URL_PREFIX); + + // Create the two different language-context sitemaps. + db_query("DELETE FROM {xmlsitemap_sitemap}"); + $sitemap = new stdClass(); + $sitemap->context = array('language' => 'en'); + xmlsitemap_sitemap_save($sitemap); + $sitemap = new stdClass(); + $sitemap->context = array('language' => 'fr'); + xmlsitemap_sitemap_save($sitemap); + } +} + +class XMLSitemapI18nTest extends XMLSitemapI18nWebTestCase { + public static function getInfo() { + return array( + 'name' => 'XML sitemap i18n tests', + 'description' => 'Functional and integration tests for the XML sitemap and internationalization modules.', + 'group' => 'XML sitemap', + 'dependencies' => array('i18n', 'disable-this-test-for-now'), + ); + } + + function testLanguageSelection() { + // Create our three different language nodes. + $node = $this->addSitemapLink(array('type' => 'node', 'language' => LANGUAGE_NONE)); + $node_en = $this->addSitemapLink(array('type' => 'node', 'language' => 'en')); + $node_fr = $this->addSitemapLink(array('type' => 'node', 'language' => 'fr')); + + // Create three non-node language nodes. + $link = $this->addSitemapLink(array('language' => LANGUAGE_NONE)); + $link_en = $this->addSitemapLink(array('language' => 'en')); + $link_fr = $this->addSitemapLink(array('language' => 'fr')); + + variable_set('i18n_selection_mode', 'off'); + $this->regenerateSitemap(); + $this->drupalGetSitemap(array('language' => 'en')); + $this->assertRawSitemapLinks($node, $node_en, $node_fr, $link, $link_en, $link_fr); + $this->drupalGetSitemap(array('language' => 'fr')); + $this->assertRawSitemapLinks($node, $node_en, $node_fr, $link, $link_en, $link_fr); + + variable_set('i18n_selection_mode', 'simple'); + $this->regenerateSitemap(); + $this->drupalGetSitemap(array('language' => 'en')); + $this->assertRawSitemapLinks($node, $node_en, $link, $link_en); + $this->assertNoRawSitemapLinks($node_fr, $link_fr); + $this->drupalGetSitemap(array('language' => 'fr')); + $this->assertRawSitemapLinks($node, $node_fr, $link, $link_fr); + $this->assertNoRawSitemapLinks($node_en, $link_en); + + variable_set('i18n_selection_mode', 'mixed'); + $this->regenerateSitemap(); + $this->drupalGetSitemap(array('language' => 'en')); + $this->assertRawSitemapLinks($node, $node_en, $link, $link_en); + $this->assertNoRawSitemapLinks($node_fr, $link_fr); + $this->drupalGetSitemap(array('language' => 'fr')); + $this->assertRawSitemapLinks($node, $node_en, $node_fr, $link, $link_en, $link_fr); + + variable_set('i18n_selection_mode', 'default'); + $this->regenerateSitemap(); + $this->drupalGetSitemap(array('language' => 'en')); + $this->assertRawSitemapLinks($node, $node_en, $link, $link_en); + $this->assertNoRawSitemapLinks($node_fr, $link_fr); + $this->drupalGetSitemap(array('language' => 'fr')); + $this->assertRawSitemapLinks($node, $node_en, $link, $link_en); + $this->assertNoRawSitemapLinks($node_fr, $link_fr); + + // With strict mode, the language neutral node should not be found, but the + // language neutral non-node should be. + variable_set('i18n_selection_mode', 'strict'); + $this->regenerateSitemap(); + $this->drupalGetSitemap(array('language' => 'en')); + $this->assertRawSitemapLinks($node_en, $link, $link_en); + $this->assertNoRawSitemapLinks($node, $node_fr, $link_fr); + $this->drupalGetSitemap(array('language' => 'fr')); + $this->assertRawSitemapLinks($node_fr, $link, $link_fr); + $this->assertNoRawSitemapLinks($node, $node_en, $link_en); + } +} + +class XMLSitemapI18nNodeTest extends XMLSitemapI18nWebTestCase { + public static function getInfo() { + return array( + 'name' => 'XML sitemap i18n node tests', + 'description' => 'Functional and integration tests for the XML sitemap node and internationalization modules.', + 'group' => 'XML sitemap', + 'dependencies' => array('i18n', 'disable-this-test-for-now'), + ); + } + + function setUp($modules = array()) { + $modules[] = 'xmlsitemap_node'; + parent::setUp($modules); + + variable_set('language_content_type_page', 1); + $this->admin_user = $this->drupalCreateUser(array('administer nodes')); + $this->drupalLogin($this->admin_user); + } + + function testNodeLanguageData() { + $node = $this->drupalCreateNode(array()); + + $this->drupalPost('node/' . $node->nid . '/edit', array('language' => 'en'), t('Save')); + $link = $this->assertSitemapLink('node', $node->nid); + $this->assertIdentical($link['language'], 'en'); + + $this->drupalPost('node/' . $node->nid . '/edit', array('language' => 'fr'), t('Save')); + $link = $this->assertSitemapLink('node', $node->nid); + $this->assertIdentical($link['language'], 'fr'); + } +} diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_menu/xmlsitemap_menu.info b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_menu/xmlsitemap_menu.info new file mode 100644 index 00000000..cdcfd8db --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_menu/xmlsitemap_menu.info @@ -0,0 +1,16 @@ +name = XML sitemap menu +description = Adds menu item links to the sitemap. +package = XML sitemap +core = 7.x +dependencies[] = xmlsitemap +dependencies[] = menu +files[] = xmlsitemap_menu.module +files[] = xmlsitemap_menu.install +files[] = xmlsitemap_menu.test + +; Information added by Drupal.org packaging script on 2016-05-25 +version = "7.x-2.3" +core = "7.x" +project = "xmlsitemap" +datestamp = "1464191061" + diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_menu/xmlsitemap_menu.install b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_menu/xmlsitemap_menu.install new file mode 100644 index 00000000..54136da3 --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_menu/xmlsitemap_menu.install @@ -0,0 +1,47 @@ +<?php + +/** + * @file + * Install and uninstall schema and functions for the xmlsitemap_menu module. + */ + +/** + * Implements hook_uninstall(). + */ +function xmlsitemap_menu_uninstall() { + drupal_load('module', 'menu'); + drupal_load('module', 'xmlsitemap'); + $menus = array_keys(menu_get_menus()); + foreach ($menus as $menu) { + xmlsitemap_link_bundle_delete('menu_link', $menu); + } +} + +/** + * Cleanup variables. + */ +function xmlsitemap_menu_update_6200() { + drupal_load('module', 'menu'); + drupal_load('module', 'xmlsitemap'); + $menus = array_keys(menu_get_menus()); + foreach ($menus as $menu) { + $settings = array( + 'status' => variable_get('xmlsitemap_menu_status_' . $menu, XMLSITEMAP_STATUS_DEFAULT), + 'priority' => variable_get('xmlsitemap_menu_priority_' . $menu, XMLSITEMAP_PRIORITY_DEFAULT), + ); + variable_set('xmlsitemap_settings_menu_' . $menu, $settings); + variable_del('xmlsitemap_menu_status_' . $menu); + variable_del('xmlsitemap_menu_priority_' . $menu); + variable_del('xmlsitemap_menu_calculate_priority_' . $menu); + } + variable_del('xmlsitemap_menu_menus'); + variable_del('xmlsitemap_menu_calculate_priority'); +} + +/** + * Rename the menu type to 'menu_link'. + */ +function xmlsitemap_menu_update_6201() { + drupal_load('module', 'xmlsitemap'); + xmlsitemap_link_type_rename('menu', 'menu_link'); +} diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_menu/xmlsitemap_menu.module b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_menu/xmlsitemap_menu.module new file mode 100644 index 00000000..65e24f49 --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_menu/xmlsitemap_menu.module @@ -0,0 +1,303 @@ +<?php + +/** + * Implements hook_entity_info_alter(). + * + * Adds support for the menu link entity if it doesn't already exist. + */ +function xmlsitemap_menu_entity_info_alter(&$info) { + if (!isset($info['menu_link'])) { + $info['menu_link'] = array( + 'label' => t('Menu link'), + 'controller class' => 'DrupalDefaultEntityController', + 'base table' => 'menu_links', + 'uri callback' => 'xmlsitemap_menu_menu_link_uri', + 'fieldable' => FALSE, + 'static cache' => TRUE, + 'field cache' => TRUE, + 'entity keys' => array( + 'id' => 'mlid', + 'bundle' => 'menu_name', + 'label' => 'link_title', + 'revision' => '', + ), + 'load hook' => NULL, + 'view modes' => array(), + 'translation' => array(), + 'schema_fields_sql' => array( + 'base table' => drupal_schema_fields_sql('menu_links'), + ), + 'xmlsitemap' => array( + 'process callback' => 'xmlsitemap_menu_xmlsitemap_process_menu_links', + ), + 'bundle label' => t('Menu'), + 'token type' => 'menu_link', + ); + + foreach (menu_get_menus() as $type => $name) { + $info['menu_link']['bundles'][$type] = array( + 'label' => $name, + 'admin' => array( + 'path' => 'admin/structure/menu/manage/%menu/edit', + 'bundle argument' => 4, + 'real path' => 'admin/structure/menu/manage/' . $type . '/edit', + 'access arguments' => array('administer menus'), + ), + ); + } + } + else { + // If the entity type already exists ensure the xmlsitemap is added. + $info['menu_link'] += array( + 'uri callback' => 'xmlsitemap_menu_menu_link_uri', + 'xmlsitemap' => array( + 'process callback' => 'xmlsitemap_menu_xmlsitemap_process_menu_links', + ), + ); + } +} + +/** + * Entity URI callback. + */ +function xmlsitemap_menu_menu_link_uri($menu_item) { + return is_array($menu_item) ? $menu_item['href'] : $menu_item->href; +} + +/** + * Implements hook_cron(). + * + * Process old menu links not found in the {xmlsitemap} table. + */ +function xmlsitemap_menu_cron() { + xmlsitemap_menu_xmlsitemap_index_links(xmlsitemap_var('batch_limit')); +} + +/** + * Implements hook_xmlsitemap_index_links(). + */ +function xmlsitemap_menu_xmlsitemap_index_links($limit) { + if ($menus = xmlsitemap_get_link_type_enabled_bundles('menu_link')) { + $sql = "SELECT ml.mlid FROM {menu_links} ml LEFT JOIN {xmlsitemap} x ON x.type = 'menu' AND ml.mlid = x.id WHERE x.id IS NULL AND ml.menu_name IN (:menus) ORDER BY ml.mlid DESC"; + $mlids = db_query_range($sql, 0, $limit, array(':menus' => $menus))->fetchCol(); + xmlsitemap_menu_xmlsitemap_process_menu_links($mlids); + } +} + +/** + * Process menu sitemap links. + * + * @param $mlids + * An array of menu link IDs. + */ +function xmlsitemap_menu_xmlsitemap_process_menu_links(array $mlids, array $xmlsitemap = array()) { + // Set the global user variable to the anonymous user. + xmlsitemap_switch_user(0); + + foreach ($mlids as $mlid) { + $menu_item = menu_link_load($mlid); + if (empty($menu_item)) { + continue; + } + if (!empty($xmlsitemap)) { + $menu_item['xmlsitemap'] = $xmlsitemap; + } + $link = xmlsitemap_menu_create_link($menu_item); + xmlsitemap_link_save($link, array($link['type'] => $menu_item)); + } + + // Set the global user variable back to the original user. + xmlsitemap_restore_user(); +} + +/** + * Implements hook_form_FORM_ID_alter(). + * + * @see menu_edit_menu() + * @see xmlsitemap_add_link_bundle_settings() + */ +function xmlsitemap_menu_form_menu_edit_menu_alter(&$form, $form_state) { + $menu = isset($form['menu_name']['#default_value']) ? $form['menu_name']['#default_value'] : ''; + module_load_include('inc', 'xmlsitemap', 'xmlsitemap.admin'); + xmlsitemap_add_link_bundle_settings($form, $form_state, 'menu_link', $menu); +} + +//function xmlsitemap_menu_form_menu_overview_form_alter(&$form, $form_state) { +// $form['#submit'][] = 'xmlsitemap_menu_menu_overview_form_submit'; +//} +// +//function xmlsitemap_menu_menu_overview_form_submit($form, $form_state) { +// $mlids = array(); +// foreach (element_children($form) as $mlid) { +// if (isset($form[$mlid]['#item'])) { +// $mlids[] = $form[$mlid]['#item']['mlid']; +// } +// } +// xmlsitemap_menu_xmlsitemap_process_menu_links($mlids); +//} + +/** + * Implements hook_form_FORM_ID_alter(). + * + * @see menu_edit_item() + */ +function xmlsitemap_menu_form_menu_edit_item_alter(&$form, $form_state) { + $menu_name = $form['parent']['#default_value']; + $menu_name = substr($menu_name, 0, strpos($menu_name, ':')); + + // Add the link options. + module_load_include('inc', 'xmlsitemap', 'xmlsitemap.admin'); + xmlsitemap_add_form_link_options($form, 'menu_link', $menu_name, $form['mlid']['#value']); + $form['xmlsitemap']['#weight'] = 30; +} + +/** + * Implements hook_menu_insert(). + */ +function xmlsitemap_menu_menu_insert(array $menu) { + if (isset($menu['xmlsitemap'])) { + xmlsitemap_link_bundle_settings_save('menu_link', $menu['menu_name'], $menu['xmlsitemap']); + } + + // When menus change, the bundles we defined in + // xmlsitemap_menu_entity_info_alter() change, so we need to clear the cache. + entity_info_cache_clear(); +} + +/** + * Implements hook_menu_update(). + */ +function xmlsitemap_menu_menu_update(array $menu) { + if (isset($menu['xmlsitemap'])) { + xmlsitemap_link_bundle_settings_save('menu_link', $menu['menu_name'], $menu['xmlsitemap']); + } + + // When menus change, the bundles we defined in + // xmlsitemap_menu_entity_info_alter() change, so we need to clear the cache. + entity_info_cache_clear(); +} + +/** + * Implements hook_menu_delete(). + */ +function xmlsitemap_menu_menu_delete(array $menu) { + xmlsitemap_link_bundle_delete('menu_link', $menu['menu_name']); + + // When menus change, the bundles we defined in + // xmlsitemap_menu_entity_info_alter() change, so we need to clear the cache. + entity_info_cache_clear(); +} + +/** + * Implements hook_menu_link_insert(). + */ +function xmlsitemap_menu_menu_link_insert(array $link) { + $link += array('xmlsitemap' => array()); + xmlsitemap_menu_xmlsitemap_process_menu_links(array($link['mlid']), $link['xmlsitemap']); +} + +/** + * Implements hook_menu_link_update(). + * + * @see hook_menu_link_alter() + */ +function xmlsitemap_menu_menu_link_update(array $link) { + //$link += array('xmlsitemap' => array()); + //xmlsitemap_menu_xmlsitemap_process_menu_links(array($link['mlid']), $link['xmlsitemap']); +} + +/** + * Implements hook_menu_link_alter(). + * + * We have to use this hook rather than hook_menu_link_update() because this + * hook is not always called if the user does not edit the core menu item + * fields. + * + * @see http://drupal.org/node/1013856 + */ +function xmlsitemap_menu_menu_link_alter(array &$link) { + if (!empty($link['mlid'])) { + $link += array('xmlsitemap' => array()); + xmlsitemap_menu_xmlsitemap_process_menu_links(array($link['mlid']), $link['xmlsitemap']); + } +} + +/** + * Implements hook_menu_link_delete(). + */ +function xmlsitemap_menu_menu_link_delete(array $link) { + xmlsitemap_link_delete('menu_link', $link['mlid']); +} + +/** + * Create a sitemap link from a menu item. + * + * @param $menu_item + * A loaded menu item. + */ +function xmlsitemap_menu_create_link(array $menu_item) { + if (!isset($menu_item['xmlsitemap'])) { + $menu_item['xmlsitemap'] = array(); + if ($menu_item['mlid'] && $link = xmlsitemap_link_load('menu_link', $menu_item['mlid'])) { + $menu_item['xmlsitemap'] = $link; + } + } + + $settings = xmlsitemap_link_bundle_load('menu_link', $menu_item['menu_name']); + + $menu_item['xmlsitemap'] += array( + 'type' => 'menu_link', + 'id' => $menu_item['mlid'], + 'status' => $settings['status'], + 'status_default' => $settings['status'], + 'status_override' => 0, + 'priority' => $settings['priority'], + 'priority_default' => $settings['priority'], + 'priority_override' => 0, + ); + + // The following values must always be checked because they are volatile. + $menu_item['xmlsitemap']['loc'] = $menu_item['href']; + $menu_item['xmlsitemap']['subtype'] = $menu_item['menu_name']; + $menu_item['xmlsitemap']['access'] = $menu_item['access'] && !$menu_item['external'] && !$menu_item['hidden']; + $menu_item['xmlsitemap']['language'] = isset($menu_item['options']['langcode']) ? $menu_item['options']['langcode'] : LANGUAGE_NONE; + + return $menu_item['xmlsitemap']; +} + +/** + * Calculate the priority of a menu link based on depth and weight. + */ +function xmlsitemap_menu_calculate_priority(array $menu_item) { + $priority = (MENU_MAX_DEPTH - $menu_item['depth'] + 1) / MENU_MAX_DEPTH; + $priority -= (50 + $menu_item['weight']) / (100 * (MENU_MAX_DEPTH + 1)); + return $priority; +} + +/** + * Internal default variables for template_var(). + */ +function xmlsitemap_menu_variables() { + $defaults = array(); + $menus = array_keys(menu_get_menus()); + foreach ($menus as $menu) { + $defaults['xmlsitemap_settings_menu_' . $menu] = array( + 'status' => XMLSITEMAP_STATUS_DEFAULT, + 'priority' => XMLSITEMAP_PRIORITY_DEFAULT, + ); + } + return $defaults; +} + +/** + * Implements hook_features_pipe_COMPONENT_alter(). + * + * Add variables to exported menus. + */ +function xmlsitemap_menu_features_pipe_menu_custom_alter(&$pipe, $data, $export) { + if (!empty($data)) { + foreach ($data as $menu_name) { + $pipe['variable'][] = "xmlsitemap_settings_menu_link_{$menu_name}"; + } + } +} diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_menu/xmlsitemap_menu.test b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_menu/xmlsitemap_menu.test new file mode 100644 index 00000000..ac33351e --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_menu/xmlsitemap_menu.test @@ -0,0 +1,50 @@ +<?php + +/** + * @file + * Unit tests for the xmlsitemap_menu module. + */ + +class XMLSitemapMenuFunctionalTest extends XMLSitemapTestHelper { + protected $normal_user; + protected $menu_items = array(); + + public static function getInfo() { + return array( + 'name' => 'XML sitemap menu', + 'description' => 'Functional tests for the XML sitemap menu module.', + 'group' => 'XML sitemap', + ); + } + + function setUp($modules = array()) { + $modules[] = 'xmlsitemap_menu'; + $modules[] = 'menu'; + parent::setUp($modules); + + $this->admin_user = $this->drupalCreateUser(array('administer menu', 'administer xmlsitemap')); + $this->normal_user = $this->drupalCreateUser(array('access content')); + } + + function testMenuSettings() { + $this->drupalLogin($this->admin_user); + + $edit = array( + 'title' => $this->randomName(), + 'menu_name' => drupal_strtolower($this->randomName()), + 'xmlsitemap[status]' => '1', + 'xmlsitemap[priority]' => '1.0', + ); + $this->drupalPost('admin/structure/menu/add', $edit, 'Save'); + $menu = menu_load($edit['menu_name']); + + $this->clickLink('Add link'); + $edit = array( + 'link_title' => $this->randomName(), + 'link_path' => 'node', + 'xmlsitemap[status]' => 'default', + 'xmlsitemap[priority]' => 'default', + ); + $this->drupalPost(NULL, $edit, 'Save'); + } +} diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_modal/xmlsitemap_modal.info b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_modal/xmlsitemap_modal.info new file mode 100644 index 00000000..5ef0d928 --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_modal/xmlsitemap_modal.info @@ -0,0 +1,15 @@ +name = XML sitemap modal UI +description = "Provides an AJAX modal UI for common XML sitemap tasks." +package = XML sitemap +core = 7.x +dependencies[] = xmlsitemap +dependencies[] = ctools +files[] = xmlsitemap_modal.module +hidden = TRUE + +; Information added by Drupal.org packaging script on 2016-05-25 +version = "7.x-2.3" +core = "7.x" +project = "xmlsitemap" +datestamp = "1464191061" + diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_modal/xmlsitemap_modal.module b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_modal/xmlsitemap_modal.module new file mode 100644 index 00000000..bfc2bfd4 --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_modal/xmlsitemap_modal.module @@ -0,0 +1,81 @@ +<?php + +/** + * Implements hook_menu_alter(). + */ +function xmlsitemap_modal_menu_alter(&$items) { + foreach ($items as $path => $item) { + if (!empty($item['modal']) && strpos($path, '%ctools_js') === FALSE && $item['page callback'] ==='drupal_get_form') { + $items["$path/%ctools_js"] = $item; + $items["$path/%ctools_js"]['page callback'] = 'xmlsitemap_modal_get_form'; + $items["$path/%ctools_js"]['page arguments'][] = substr_count($path, '/') + 1; + } + } +} + +/** + * Display a Drupal form using CTools modal or normal page display. + */ +function xmlsitemap_modal_get_form() { + $args = func_get_args(); + $form_id = array_shift($args); + $ajax = array_pop($args); + + if ($ajax) { + ctools_include('ajax'); + ctools_include('modal'); + + $form_state = array( + 'ajax' => TRUE, + 'build_info' => array('args' => $args), + ); + $commands = ctools_modal_form_wrapper($form_id, $form_state); + + if (empty($commands)) { + $commands[] = ctools_modal_command_loading(); + if (!empty($_GET['destination'])) { + $commands[] = ctools_ajax_command_redirect($_GET['destination']); + } + } + print ajax_render($commands); + exit; + } + else { + array_unshift($args, $form_id); + return call_user_func_array('drupal_get_form', $args); + } +} + +/** + * Implements hook_xmlsitemap_operation_link_alter(). + */ +function xmlsitemap_modal_xmlsitemap_operation_link_alter(array &$link) { + static $ctools_modal_included; + + // Process modal frame links. + if (!empty($link['modal'])) { + unset($link['modal']); + + if (!isset($ctools_modal_included)) { + // Only process a few includes once per request. + ctools_include('ajax'); + ctools_include('modal'); + ctools_modal_add_js(); + drupal_add_css(drupal_get_path('module', 'xmlsitemap_modal') . '/xmlsitemap_modal.css'); + } + + $link['attributes']['class'][] = 'ctools-use-modal'; + + if (strpos($link['href'], 'nojs') === FALSE) { + $link['href'] .= '/nojs'; + } + else { + $link['href'] = trim($link['href'], '/'); + } + + // @todo Remove when http://drupal.org/node/565808 is fixed. + if (substr($link['href'], -4) === 'nojs') { + $link['href'] .= '/'; + } + } +} diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_node/xmlsitemap_node.info b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_node/xmlsitemap_node.info new file mode 100644 index 00000000..7a3ac0ff --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_node/xmlsitemap_node.info @@ -0,0 +1,15 @@ +name = XML sitemap node +description = Adds content links to the sitemap. +package = XML sitemap +core = 7.x +dependencies[] = xmlsitemap +files[] = xmlsitemap_node.module +files[] = xmlsitemap_node.install +files[] = xmlsitemap_node.test + +; Information added by Drupal.org packaging script on 2016-05-25 +version = "7.x-2.3" +core = "7.x" +project = "xmlsitemap" +datestamp = "1464191061" + diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_node/xmlsitemap_node.install b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_node/xmlsitemap_node.install new file mode 100644 index 00000000..c7eaa5b5 --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_node/xmlsitemap_node.install @@ -0,0 +1,44 @@ +<?php + +/** + * @file + * Install and uninstall schema and functions for the xmlsitemap_node module. + */ + +/** + * Implements hook_uninstall(). + */ +function xmlsitemap_node_uninstall() { + drupal_load('module', 'node'); + drupal_load('module', 'xmlsitemap'); + $node_types = array_keys(node_type_get_names()); + foreach ($node_types as $node_type) { + xmlsitemap_link_bundle_delete('node', $node_type); + } +} + +/** + * Cleanup variables. + */ +function xmlsitemap_node_update_6200() { + drupal_load('module', 'node'); + drupal_load('module', 'xmlsitemap'); + $node_types = array_keys(node_type_get_names()); + foreach ($node_types as $node_type) { + $settings = array( + 'status' => variable_get('xmlsitemap_node_status_' . $node_type, XMLSITEMAP_STATUS_DEFAULT), + 'priority' => variable_get('xmlsitemap_node_priority_' . $node_type, XMLSITEMAP_PRIORITY_DEFAULT), + ); + variable_set('xmlsitemap_settings_node_' . $node_type, $settings); + variable_del('xmlsitemap_node_status_' . $node_type); + variable_del('xmlsitemap_node_priority_' . $node_type); + variable_del('xmlsitemap_node_update_' . $node_type); + } + return array(); +} + +/** + * Empty update. + */ +function xmlsitemap_node_update_6201() { +} diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_node/xmlsitemap_node.module b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_node/xmlsitemap_node.module new file mode 100644 index 00000000..20f5f05a --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_node/xmlsitemap_node.module @@ -0,0 +1,346 @@ +<?php + +/** + * Implements hook_entity_info_alter(). + */ +function xmlsitemap_node_entity_info_alter(array &$entity_info) { + $entity_info['node']['label'] = t('Content'); + $entity_info['node']['bundle label'] = t('Content type'); + $entity_info['node']['xmlsitemap'] = array( + 'process callback' => 'xmlsitemap_node_xmlsitemap_process_node_links', + ); +} + +/** + * Implements hook_cron(). + * + * Process old nodes not found in the {xmlsitemap} table. + */ +function xmlsitemap_node_cron() { + xmlsitemap_node_xmlsitemap_index_links(xmlsitemap_var('batch_limit')); +} + +/** + * Implements hook_xmlsitemap_index_links(). + */ +function xmlsitemap_node_xmlsitemap_index_links($limit) { + if ($types = xmlsitemap_get_link_type_enabled_bundles('node')) { + $nids = db_query_range("SELECT n.nid FROM {node} n LEFT JOIN {xmlsitemap} x ON x.type = 'node' AND n.nid = x.id WHERE x.id IS NULL AND n.type IN (:types) ORDER BY n.nid DESC", 0, $limit, array(':types' => $types))->fetchCol(); + xmlsitemap_node_xmlsitemap_process_node_links($nids); + } +} + +/** + * Process node sitemap links. + * + * @param $nids + * An array of node IDs. + */ +function xmlsitemap_node_xmlsitemap_process_node_links(array $nids) { + $nodes = node_load_multiple($nids); + foreach ($nodes as $node) { + $link = xmlsitemap_node_create_link($node); + xmlsitemap_link_save($link, array($link['type'] => $node)); + } +} + +/** + * Implements hook_node_insert(). + */ +function xmlsitemap_node_node_insert(stdClass $node) { + xmlsitemap_node_node_update($node); +} + +/** + * Implements hook_node_update(). + */ +function xmlsitemap_node_node_update(stdClass $node) { + $link = xmlsitemap_node_create_link($node); + xmlsitemap_link_save($link, array($link['type'] => $node)); +} + +/** + * Implements hook_node_delete(). + */ +function xmlsitemap_node_node_delete(stdClass $node) { + xmlsitemap_link_delete('node', $node->nid); +} + +/** + * Implements hook_comment_update(). + */ +function xmlsitemap_node_comment_update(stdClass $comment) { + if ($node = node_load($comment->nid, NULL, TRUE)) { + xmlsitemap_node_node_update($node); + } +} + +/** + * Implements hook_comment_publish(). + */ +function xmlsitemap_node_comment_publish(stdClass $comment) { + xmlsitemap_node_comment_update($comment); +} + +/** + * Implements hook_comment_unpublish(). + */ +function xmlsitemap_node_comment_unpublish(stdClass $comment) { + xmlsitemap_node_comment_update($comment); +} + +/** + * Implements hook_comment_delete(). + */ +function xmlsitemap_node_comment_delete(stdClass $comment) { + xmlsitemap_node_comment_update($comment); +} + +/** + * Implements hook_field_extra_fields(). + */ +function xmlsitemap_node_field_extra_fields() { + $extras = array(); + foreach (node_type_get_names() as $type => $name) { + $extras['node'][$type]['form']['xmlsitemap'] = array( + 'label' => t('XML sitemap'), + 'description' => t('XML sitemap module element'), + 'weight' => 30, + ); + } + return $extras; +} + +/** + * Implements hook_form_FORM_ID_alter(). + * + * @see node_type_form() + * @see xmlsitemap_add_link_bundle_settings() + */ +function xmlsitemap_node_form_node_type_form_alter(array &$form, array $form_state) { + $node_type = isset($form['#node_type']->type) ? $form['#node_type']->type : ''; + module_load_include('inc', 'xmlsitemap', 'xmlsitemap.admin'); + xmlsitemap_add_link_bundle_settings($form, $form_state, 'node', $node_type); +} + +/** + * Implements hook_form_alter(). + * + * Add the XML sitemap individual link options for a node. + * + * @see xmlsitemap_add_form_link_options() + */ +function xmlsitemap_node_form_node_form_alter(array &$form, array &$form_state) { + // Add the link options. + module_load_include('inc', 'xmlsitemap', 'xmlsitemap.admin'); + xmlsitemap_add_form_link_options($form, 'node', $form['type']['#value'], $form['nid']['#value']); + $form['xmlsitemap']['#weight'] = 30; +} + +/** + * Fetch all the timestamps for when a node was changed. + * + * @param $node + * A node object. + * @return + * An array of UNIX timestamp integers. + */ +function xmlsitemap_node_get_timestamps(stdClass $node) { + $timestamps = &drupal_static(__FUNCTION__, array()); + + if (!isset($timestamps[$node->nid])) { + $timestamps[$node->nid] = db_query("SELECT nr.timestamp FROM {node_revision} nr WHERE nr.nid = :nid", array(':nid' => $node->nid))->fetchCol(); + if (module_exists('comment')) { + $comment_timestamps = db_query("SELECT c.created FROM {comment} c WHERE c.nid = :nid AND c.status = :status", array(':nid' => $node->nid, ':status' => COMMENT_PUBLISHED))->fetchCol(); + $timestamps[$node->nid] = array_merge($timestamps[$node->nid], $comment_timestamps); + } + } + + return $timestamps[$node->nid]; +} + +/** + * Create a sitemap link from a node. + * + * The link will be saved as $node->xmlsitemap. + * + * @param $node + * A node object. + */ +function xmlsitemap_node_create_link(stdClass $node) { + if (!isset($node->xmlsitemap) || !is_array($node->xmlsitemap)) { + $node->xmlsitemap = array(); + if ($node->nid && $link = xmlsitemap_link_load('node', $node->nid)) { + $node->xmlsitemap = $link; + } + } + + $settings = xmlsitemap_link_bundle_load('node', $node->type); + $uri = entity_uri('node', $node); + + $node->xmlsitemap += array( + 'type' => 'node', + 'id' => $node->nid, + 'subtype' => $node->type, + 'status' => $settings['status'], + 'status_default' => $settings['status'], + 'status_override' => 0, + 'priority' => $settings['priority'], + 'priority_default' => $settings['priority'], + 'priority_override' => 0, + ); + + // Always recalculate changefreq and changecount. + $timestamps = xmlsitemap_node_get_timestamps($node); + $node->xmlsitemap['changefreq'] = $node->nid ? xmlsitemap_calculate_changefreq($timestamps) : 0; + $node->xmlsitemap['changecount'] = $node->nid ? count($timestamps) - 1 : 0; + + // Node access must be reset since it a user may have changed published status, etc. + //$access = &drupal_static('node_access'); + //unset($access[0][$node->nid]); + //node_access_acquire_grants($node); + + // The following values must always be checked because they are volatile. + $node->xmlsitemap['loc'] = $uri['path']; + $node->xmlsitemap['lastmod'] = count($timestamps) ? max($timestamps) : 0; + $node->xmlsitemap['access'] = $node->nid ? xmlsitemap_node_view_access($node, drupal_anonymous_user()) : 1; + $node->xmlsitemap['language'] = isset($node->language) ? $node->language : LANGUAGE_NONE; + + return $node->xmlsitemap; +} + +/** + * Determine whether a user may view the specified node. + * + * @param $node + * The node object on which the operation is to be performed, or node type + * (e.g. 'forum') for "create" operation. + * @param $account + * Optional, a user object representing the user for whom the operation is to + * be performed. Determines access for a user other than the current user. + * @return + * TRUE if the operation may be performed, FALSE otherwise. + * + * This is for all intesive purposes a copy of Drupal 7's node_access() function. + */ +function xmlsitemap_node_view_access($node, $account = NULL) { + global $user; + + $op = 'view'; + $rights = &drupal_static(__FUNCTION__, array()); + + if (!$node || !in_array($op, array('view', 'update', 'delete', 'create'), TRUE)) { + // If there was no node to check against, or the $op was not one of the + // supported ones, we return access denied. + return FALSE; + } + // If no user object is supplied, the access check is for the current user. + if (empty($account)) { + $account = $user; + } + + // $node may be either an object or a node type. Since node types cannot be + // an integer, use either nid or type as the static cache id. + //$cid = is_object($node) ? $node->nid : $node; + + // If we've already checked access for this node, user and op, return from + // cache. + if (isset($rights[$account->uid][$node->nid])) { + return $rights[$account->uid][$node->nid]; + } + + if (user_access('bypass node access', $account)) { + $rights[$account->uid][$node->nid] = TRUE; + return TRUE; + } + + if (!user_access('access content', $account)) { + $rights[$account->uid][$node->nid] = FALSE; + return FALSE; + } + + // We grant access to the node if both of the following conditions are met: + // - No modules say to deny access. + // - At least one module says to grant access. + // If no module specified either allow or deny, we fall back to the + // node_access table. + $access = module_invoke_all('node_access', $node, $op, $account); + if (in_array(NODE_ACCESS_DENY, $access, TRUE)) { + $rights[$account->uid][$node->nid] = FALSE; + return FALSE; + } + elseif (in_array(NODE_ACCESS_ALLOW, $access, TRUE)) { + $rights[$account->uid][$node->nid] = TRUE; + return TRUE; + } + + // Check if authors can view their own unpublished nodes. + if ($op == 'view' && !$node->status && user_access('view own unpublished content', $account) && $account->uid == $node->uid && $account->uid != 0) { + $rights[$account->uid][$node->nid] = TRUE; + return TRUE; + } + + // If the module did not override the access rights, use those set in the + // node_access table. + if ($op != 'create' && $node->nid) { + if (module_implements('node_grants')) { + $query = db_select('node_access'); + $query->addExpression('1'); + $query->condition('grant_' . $op, 1, '>='); + $nids = db_or()->condition('nid', $node->nid); + if ($node->status) { + $nids->condition('nid', 0); + } + $query->condition($nids); + $query->range(0, 1); + + // Fetch the node grants and allow other modules to alter them (D7 backport). + $grants = &drupal_static(__FUNCTION__ . ':grants', array()); + if (!isset($grants[$account->uid][$op])) { + // Indicate that this is our special function in the grants. + $account->xmlsitemap_node_access = TRUE; + $grants[$account->uid][$op] = node_access_grants($op, $account); + // Remove the special indicator. + unset($account->xmlsitemap_node_access); + } + + $grant_condition = db_or(); + foreach ($grants[$account->uid][$op] as $realm => $gids) { + foreach ($gids as $gid) { + $grant_condition->condition(db_and() + ->condition('gid', $gid) + ->condition('realm', $realm) + ); + } + } + if (count($grant_condition) > 0) { + $query->condition($grant_condition); + } + + $result = (bool) $query->execute()->fetchField(); + $rights[$account->uid][$node->nid] = $result; + return $result; + } + elseif (is_object($node) && $op == 'view' && $node->status) { + // If no modules implement hook_node_grants(), the default behaviour is to + // allow all users to view published nodes, so reflect that here. + $rights[$account->uid][$node->nid] = TRUE; + return TRUE; + } + } + + return FALSE; +} + +/** + * Implements hook_features_pipe_COMPONENT_alter(). + * + * Add variables to exported node types. + */ +function xmlsitemap_node_features_pipe_node_alter(&$pipe, $data, $export) { + if (!empty($data)) { + foreach ($data as $node_type) { + $pipe['variable'][] = "xmlsitemap_settings_node_{$node_type}"; + } + } +} diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_node/xmlsitemap_node.test b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_node/xmlsitemap_node.test new file mode 100644 index 00000000..edb59fdf --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_node/xmlsitemap_node.test @@ -0,0 +1,148 @@ +<?php + +/** + * @file + * Unit tests for the xmlsitemap_node module. + */ + +class XMLSitemapNodeFunctionalTest extends XMLSitemapTestHelper { + protected $normal_user; + protected $nodes = array(); + + public static function getInfo() { + return array( + 'name' => 'XML sitemap node', + 'description' => 'Functional tests for the XML sitemap node module.', + 'group' => 'XML sitemap', + ); + } + + function setUp($modules = array()) { + $modules[] = 'xmlsitemap_node'; + $modules[] = 'comment'; + parent::setUp($modules); + + $this->admin_user = $this->drupalCreateUser(array('administer nodes', 'bypass node access', 'administer content types', 'administer xmlsitemap')); + $this->normal_user = $this->drupalCreateUser(array('create page content', 'edit any page content', 'access content', 'view own unpublished content')); + xmlsitemap_link_bundle_settings_save('node', 'page', array('status' => 1, 'priority' => 0.5)); + } + + function testNodeSettings() { + $body_field = 'body[' . LANGUAGE_NONE . '][0][value]'; + + $node = $this->drupalCreateNode(array('status' => FALSE, 'uid' => $this->normal_user->uid)); + $this->assertSitemapLinkValues('node', $node->nid, array('access' => 0, 'status' => 1, 'priority' => 0.5, 'status_override' => 0, 'priority_override' => 0)); + + $this->drupalLogin($this->normal_user); + $this->drupalGet('node/' . $node->nid . '/edit'); + $this->assertNoField('xmlsitemap[status]'); + $this->assertNoField('xmlsitemap[priority]'); + + $edit = array( + 'title' => 'Test node title', + $body_field => 'Test node body', + ); + $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save')); + $this->assertText('Basic page Test node title has been updated.'); + $this->assertSitemapLinkValues('node', $node->nid, array('access' => 0, 'status' => 1, 'priority' => 0.5, 'status_override' => 0, 'priority_override' => 0)); + + $this->drupalLogin($this->admin_user); + $this->drupalGet('node/' . $node->nid . '/edit'); + $this->assertField('xmlsitemap[status]'); + $this->assertField('xmlsitemap[priority]'); + + $edit = array( + 'xmlsitemap[status]' => 0, + 'xmlsitemap[priority]' => 0.9, + 'status' => TRUE, + ); + $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save')); + $this->assertText('Basic page Test node title has been updated.'); + $this->assertSitemapLinkValues('node', $node->nid, array('access' => 1, 'status' => 0, 'priority' => 0.9, 'status_override' => 1, 'priority_override' => 1)); + + $edit = array( + 'xmlsitemap[status]' => 'default', + 'xmlsitemap[priority]' => 'default', + 'status' => FALSE, + ); + $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save')); + $this->assertText('Basic page Test node title has been updated.'); + $this->assertSitemapLinkValues('node', $node->nid, array('access' => 0, 'status' => 1, 'priority' => 0.5, 'status_override' => 0, 'priority_override' => 0)); + } + + /** + * Test the content type settings. + */ + function testTypeSettings() { + $this->drupalLogin($this->admin_user); + + $node_old = $this->drupalCreateNode(); + $this->assertSitemapLinkValues('node', $node_old->nid, array('status' => 1, 'priority' => 0.5)); + + $edit = array( + 'xmlsitemap[status]' => 0, + 'xmlsitemap[priority]' => '0.0', + ); + $this->drupalPost('admin/structure/types/manage/page', $edit, t('Save content type')); + $this->assertText('The content type Basic page has been updated.'); + + $node = $this->drupalCreateNode(); + $this->assertSitemapLinkValues('node', $node->nid, array('status' => 0, 'priority' => 0.0)); + $this->assertSitemapLinkValues('node', $node_old->nid, array('status' => 0, 'priority' => 0.0)); + + $edit = array( + 'type' => 'page2', + 'xmlsitemap[status]' => 1, + 'xmlsitemap[priority]' => '0.5', + ); + $this->drupalPost('admin/structure/types/manage/page', $edit, t('Save content type')); + $this->assertText('Changed the content type of 2 posts from page to page2.'); + $this->assertText('The content type Basic page has been updated.'); + + $this->assertSitemapLinkValues('node', $node->nid, array('subtype' => 'page2', 'status' => 1, 'priority' => 0.5)); + $this->assertSitemapLinkValues('node', $node_old->nid, array('subtype' => 'page2', 'status' => 1, 'priority' => 0.5)); + $this->assertEqual(count(xmlsitemap_link_load_multiple(array('type' => 'node', 'subtype' => 'page'))), 0); + $this->assertEqual(count(xmlsitemap_link_load_multiple(array('type' => 'node', 'subtype' => 'page2'))), 2); + + $this->drupalPost('admin/structure/types/manage/page2/delete', array(), t('Delete')); + $this->assertText('The content type Basic page has been deleted.'); + $this->assertFalse(xmlsitemap_link_load_multiple(array('type' => 'node', 'subtype' => 'page2')), 'Nodes with deleted node type removed from {xmlsitemap}.'); + } + + /** + * Test the import of old nodes via cron. + */ + function testCron() { + $limit = 5; + variable_set('xmlsitemap_batch_limit', $limit); + + $nodes = array(); + for ($i = 1; $i <= ($limit + 1); $i++) { + $node = $this->drupalCreateNode(); + array_push($nodes, $node); + // Need to delay by one second so the nodes don't all have the same + // timestamp. + sleep(1); + } + + // Clear all the node link data so we can emulate 'old' nodes. + db_delete('xmlsitemap') + ->condition('type', 'node') + ->execute(); + + // Run cron to import old nodes. + xmlsitemap_node_cron(); + + for ($i = 1; $i <= ($limit + 1); $i++) { + $node = array_pop($nodes); + if ($i <= $limit) { + // The first $limit nodes should be inserted. + $this->assertSitemapLinkValues('node', $node->nid, array('access' => 1, 'status' => 1, 'lastmod' => $node->changed)); + } + else { + // Any beyond $limit should not be in the sitemap. + $this->assertNoSitemapLink(array('type' => 'node', 'id' => $node->nid)); + } + } + } +} diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_taxonomy/xmlsitemap_taxonomy.info b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_taxonomy/xmlsitemap_taxonomy.info new file mode 100644 index 00000000..214775fe --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_taxonomy/xmlsitemap_taxonomy.info @@ -0,0 +1,16 @@ +name = XML sitemap taxonomy +description = Add taxonomy term links to the sitemap. +package = XML sitemap +core = 7.x +dependencies[] = xmlsitemap +dependencies[] = taxonomy +files[] = xmlsitemap_taxonomy.module +files[] = xmlsitemap_taxonomy.install +files[] = xmlsitemap_taxonomy.test + +; Information added by Drupal.org packaging script on 2016-05-25 +version = "7.x-2.3" +core = "7.x" +project = "xmlsitemap" +datestamp = "1464191061" + diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_taxonomy/xmlsitemap_taxonomy.install b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_taxonomy/xmlsitemap_taxonomy.install new file mode 100644 index 00000000..78687c39 --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_taxonomy/xmlsitemap_taxonomy.install @@ -0,0 +1,66 @@ +<?php + +/** + * @file + * Install and uninstall schema and functions for the xmlsitemap_taxonomy module. + */ + +/** + * Implements hook_uninstall(). + */ +function xmlsitemap_taxonomy_uninstall() { + drupal_load('module', 'taxonomy'); + drupal_load('module', 'xmlsitemap'); + $vocabularies = taxonomy_get_vocabularies(); + foreach ($vocabularies as $vid => $vocabulary) { + xmlsitemap_link_bundle_delete('taxonomy_term', $vocabulary->machine_name); + } +} + +/** + * Implements hook_update_last_removed(). + */ +function xmlsitemap_taxonomy_update_last_removed() { + return 6198; +} + +/** + * Cleanup variables. + */ +function xmlsitemap_taxonomy_update_6200() { + drupal_load('module', 'taxonomy'); + drupal_load('module', 'xmlsitemap'); + $vids = array_keys(taxonomy_get_vocabularies()); + foreach ($vids as $vid) { + $settings = array( + 'status' => variable_get('xmlsitemap_taxonomy_status_' . $vid, XMLSITEMAP_STATUS_DEFAULT), + 'priority' => variable_get('xmlsitemap_taxonomy_priority_' . $vid, XMLSITEMAP_PRIORITY_DEFAULT), + ); + variable_set('xmlsitemap_settings_taxonomy_term_' . $vid, $settings); + variable_del('xmlsitemap_taxonomy_status_' . $vid); + variable_del('xmlsitemap_taxonomy_priority_' . $vid); + variable_del('xmlsitemap_taxonomy_calculate_priority_' . $vid); + variable_del('xmlsitemap_taxonomy_include_empty_terms_' . $vid); + } + variable_del('xmlsitemap_taxonomy_include_empty_terms'); + variable_del('xmlsitemap_taxonomy_calculate_priority'); +} + +/** + * Empty update. + */ +function xmlsitemap_taxonomy_update_6201() { +} + +/** + * Change bundles on taxonomy terms from vid to $vocabulary->machine_name. + */ +function xmlsitemap_taxonomy_update_7200() { + drupal_load('module', 'taxonomy'); + drupal_load('module', 'xmlsitemap'); + + $vocabularies = taxonomy_get_vocabularies(); + foreach ($vocabularies as $vid => $vocabulary) { + xmlsitemap_link_bundle_rename('taxonomy_term', $vid, $vocabulary->machine_name); + } +} diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_taxonomy/xmlsitemap_taxonomy.module b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_taxonomy/xmlsitemap_taxonomy.module new file mode 100644 index 00000000..f0d335df --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_taxonomy/xmlsitemap_taxonomy.module @@ -0,0 +1,278 @@ +<?php + +/** + * Implements hook_entity_info_alter(). + */ +function xmlsitemap_taxonomy_entity_info_alter(&$entity_info) { + $entity_info['taxonomy_term']['bundle label'] = t('Vocabulary'); + $entity_info['taxonomy_term']['xmlsitemap'] = array( + 'process callback' => 'xmlsitemap_taxonomy_xmlsitemap_process_taxonomy_term_links', + ); +} + +/** + * Implements hook_xmlsitemap_link_info_alter(). + */ +function xmlsitemap_taxonomy_xmlsitemap_link_info_alter(&$link_info) { + foreach (taxonomy_vocabulary_get_names() as $machine_name => $vocabulary) { + // Adjust the edit path to the *real* edit path. + $link_info['taxonomy_term']['bundles'][$machine_name]['admin']['path'] .= '/edit'; + $link_info['taxonomy_term']['bundles'][$machine_name]['admin']['real path'] .= '/edit'; + } +} + +/** + * Implements hook_cron(). + * + * Process old taxonomy terms not found in the {xmlsitemap} table. + */ +function xmlsitemap_taxonomy_cron() { + xmlsitemap_taxonomy_xmlsitemap_index_links(xmlsitemap_var('batch_limit')); +} + +/** + * Implements hook_xmlsitemap_index_links(). + */ +function xmlsitemap_taxonomy_xmlsitemap_index_links($limit) { + if ($bundles = xmlsitemap_get_link_type_enabled_bundles('taxonomy_term')) { + $tids = db_query_range("SELECT t.tid FROM {taxonomy_term_data} t INNER JOIN {taxonomy_vocabulary} tv USING (vid) LEFT JOIN {xmlsitemap} x ON x.type = 'taxonomy_term' AND t.tid = x.id WHERE x.id IS NULL AND tv.machine_name IN (:bundles) ORDER BY t.tid DESC", 0, $limit, array(':bundles' => $bundles))->fetchCol(); + xmlsitemap_taxonomy_xmlsitemap_process_taxonomy_term_links($tids); + } +} + +/** + * Process taxonomy term sitemap links. + * + * @param $tids + * An array of taxonomy term IDs. + */ +function xmlsitemap_taxonomy_xmlsitemap_process_taxonomy_term_links(array $tids) { + $terms = taxonomy_term_load_multiple($tids); + foreach ($terms as $term) { + $link = xmlsitemap_taxonomy_create_link($term); + xmlsitemap_link_save($link, array($link['type'] => $term)); + } +} + +/** + * Implements hook_form_FORM_ID_alter(). + * + * @see taxonomy_form_vocabulary() + * @see xmlsitemap_add_link_bundle_settings() + */ +function xmlsitemap_taxonomy_form_taxonomy_form_vocabulary_alter(&$form, $form_state) { + if (in_array('taxonomy_vocabulary_confirm_delete_submit', $form['#submit'])) { + // If this is the delete form, do not add our form elements. + return; + } + + module_load_include('inc', 'xmlsitemap', 'xmlsitemap.admin'); + xmlsitemap_add_link_bundle_settings($form, $form_state, 'taxonomy_term', $form['#vocabulary']->machine_name); +} + +/** + * Implements hook_form_FORM_ID_alter(). + */ +function xmlsitemap_taxonomy_form_taxonomy_form_term_alter(&$form, $form_state) { + if ($form['name']['#type'] == 'value') { + // If this is the delete form, do not add our form elements. + return; + } + + // Add the link options. + module_load_include('inc', 'xmlsitemap', 'xmlsitemap.admin'); + xmlsitemap_add_form_link_options($form, 'taxonomy_term', $form['#term']['vocabulary_machine_name'], $form['tid']['#value']); +} + +/** + * Implements hook_taxonomy_vocabulary_insert(). + */ +function xmlsitemap_taxonomy_vocabulary_insert(stdClass $vocabulary) { + if (isset($vocabulary->xmlsitemap)) { + xmlsitemap_link_bundle_settings_save('taxonomy_term', $vocabulary->machine_name, $vocabulary->xmlsitemap); + } +} + +/** + * Implements hook_taxonomy_vocabulary_update(). + */ +function xmlsitemap_taxonomy_vocabulary_update(stdClass $vocabulary) { + if (isset($vocabulary->xmlsitemap)) { + xmlsitemap_link_bundle_settings_save('taxonomy_term', $vocabulary->machine_name, $vocabulary->xmlsitemap); + } +} + +/** + * Implements hook_taxonomy_term_insert() { + */ +function xmlsitemap_taxonomy_term_insert(stdClass $term) { + $link = xmlsitemap_taxonomy_create_link($term); + xmlsitemap_link_save($link, array($link['type'] => $term)); +} + +/** + * Implements hook_taxonomy_term_update() { + */ +function xmlsitemap_taxonomy_term_update(stdClass $term) { + $link = xmlsitemap_taxonomy_create_link($term); + xmlsitemap_link_save($link, array($link['type'] => $term)); +} + +/** + * Implements hook_taxonomy_term_delete() { + */ +function xmlsitemap_taxonomy_term_delete(stdClass $term) { + xmlsitemap_link_delete('taxonomy_term', $term->tid); +} + +/** + * Implements hook_field_extra_fields(). + */ +function xmlsitemap_taxonomy_field_extra_fields() { + $extras = array(); + foreach (taxonomy_vocabulary_get_names() as $machine_name => $vocabulary) { + $extras['taxonomy_term'][$machine_name]['form']['xmlsitemap'] = array( + 'label' => t('XML sitemap'), + 'description' => t('XML sitemap module element'), + 'weight' => 30, + ); + } + return $extras; +} + +/** + * Create a sitemap link from a taxonomy term. + * + * @param $term + * A taxonomy term object. + * @return + * An array representing a sitemap link. + */ +function xmlsitemap_taxonomy_create_link(stdClass &$term) { + if (!isset($term->xmlsitemap)) { + $term->xmlsitemap = array(); + if ($term->tid && $link = xmlsitemap_link_load('taxonomy_term', $term->tid)) { + $term->xmlsitemap = $link; + } + } + + $settings = xmlsitemap_link_bundle_load('taxonomy_term', $term->vocabulary_machine_name); + $uri = entity_uri('taxonomy_term', $term); + + $term->xmlsitemap += array( + 'id' => $term->tid, + 'type' => 'taxonomy_term', + 'subtype' => $term->vocabulary_machine_name, + 'status' => $settings['status'], + 'status_default' => $settings['status'], + 'status_override' => 0, + 'priority' => $settings['priority'], + 'priority_default' => $settings['priority'], + 'priority_override' => 0, + ); + + // The following values must always be checked because they are volatile. + // @todo How can/should we check taxonomy term access? + $term->xmlsitemap['loc'] = $uri['path']; + $term->xmlsitemap['access'] = 1; + $term->xmlsitemap['language'] = isset($term->language) ? $term->language : LANGUAGE_NONE; + + return $term->xmlsitemap; +} + +/** + * Calculate the priority of a taxonomy term based on depth and weight. + */ +//function xmlsitemap_taxonomy_calculate_term_priority(stdClass $term) { +// // Calculate priority. +// // Min weight = -128 +// // Max weight = 127 +// // Max depth = ? +//} + +/** + * Find the tree depth of a taxonomy term. + * + * @param $term + * A taxonomy term object. + * @return + * The tree depth of the term. + */ +function xmlsitemap_taxonomy_get_term_depth(stdClass $term) { + static $depths = array(); + + if (!isset($depths[$term->tid])) { + if ($parent = db_query("SELECT parent FROM {taxonomy_term_hierarchy} WHERE tid = %d", $term->tid)->fetchField()) { + // If the term has a parent, the term's depth is the parent's depth + 1. + if (!isset($depths[$parent])) { + $depths[$parent] = xmlsitemap_taxonomy_get_term_depth($parent); + } + $depths[$term->tid] = $depths[$parent] + 1; + } + else { + // Term has no parents, so depth is 0. + $depths[$term->tid] = 0; + } + } + + return $depths[$term->tid]; +} + +/** + * Find the number of nodes that are associated with a taxonomy term. + * + * @param $term + * A taxonomy term object. + * @return + * The number of nodes associated with the term. + */ +function xmlsitemap_taxonomy_get_node_count(stdClass $term) { + // @todo Use db_rewrite_sql() w/ switch user. + return db_query_range("SELECT COUNT(ti.nid) FROM {taxonomy_index} ti LEFT JOIN {node n} USING (nid) WHERE ti.tid = :tid AND n.status = 1", 0, 1, array(':tid' => $term->tid))->fetchField(); +} + +/** + * Implements hook_entity_query_alter(). + * + * @todo Remove when http://drupal.org/node/1054162 is fixed. + */ +function xmlsitemap_taxonomy_entity_query_alter($query) { + $conditions = &$query->entityConditions; + + // Alter taxonomy term queries only. + if (isset($conditions['entity_type']) && $conditions['entity_type']['value'] == 'taxonomy_term' && isset($conditions['bundle'])) { + + // We can only support the operators that are explicit in values. + if (in_array($conditions['bundle']['operator'], array(NULL, '=', '!=', 'IN', 'NOT IN'))) { + $vids = array(); + + // Convert vocabulary machine names to vocabulary IDs. + if (is_array($conditions['bundle']['value'])) { + foreach ($conditions['bundle']['value'] as $vocabulary_machine_name) { + $vocabulary = taxonomy_vocabulary_machine_name_load($vocabulary_machine_name); + $vids[] = $vocabulary->vid; + } + } + else { + $vocabulary = taxonomy_vocabulary_machine_name_load($conditions['bundle']['value']); + $vids = $vocabulary->vid; + } + + $query->propertyCondition('vid', $vids, $conditions['bundle']['operator']); + unset($conditions['bundle']); + } + } +} + +/** + * Implements hook_features_pipe_COMPONENT_alter(). + * + * Add variables to exported taxonomy vocabularies. + */ +function xmlsitemap_taxonomy_features_pipe_taxonomy_alter(&$pipe, $data, $export) { + if (!empty($data)) { + foreach ($data as $vocabulary_name) { + $pipe['variable'][] = "xmlsitemap_settings_taxonomy_term_{$vocabulary_name}"; + } + } +} diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_taxonomy/xmlsitemap_taxonomy.test b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_taxonomy/xmlsitemap_taxonomy.test new file mode 100644 index 00000000..9d1bf554 --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_taxonomy/xmlsitemap_taxonomy.test @@ -0,0 +1,49 @@ +<?php + +/** + * @file + * Unit tests for the xmlsitemap_taxonomy module. + */ + +class XMLSitemapTaxonomyFunctionalTest extends XMLSitemapTestHelper { + protected $normal_user; + protected $terms = array(); + + public static function getInfo() { + return array( + 'name' => 'XML sitemap taxonomy', + 'description' => 'Functional tests for the XML sitemap taxonomy module.', + 'group' => 'XML sitemap', + ); + } + + function setUp($modules = array()) { + $modules[] = 'xmlsitemap_taxonomy'; + $modules[] = 'taxonomy'; + parent::setUp($modules); + + $this->admin_user = $this->drupalCreateUser(array('administer taxonomy', 'administer xmlsitemap')); + $this->normal_user = $this->drupalCreateUser(array('access content')); + } + + function testTaxonomySettings() { + $this->drupalLogin($this->admin_user); + + $edit = array( + 'name' => $this->randomName(), + 'machine_name' => drupal_strtolower($this->randomName()), + 'xmlsitemap[status]' => '1', + 'xmlsitemap[priority]' => '1.0', + ); + $this->drupalPost('admin/structure/taxonomy/add', $edit, 'Save'); + $this->assertText("Created new vocabulary {$edit['name']}."); + $vocabulary = taxonomy_vocabulary_machine_name_load($edit['machine_name']); + + $edit = array( + 'name' => $this->randomName(), + 'xmlsitemap[status]' => 'default', + 'xmlsitemap[priority]' => 'default', + ); + $this->drupalPost("admin/structure/taxonomy/{$vocabulary->machine_name}/add", $edit, 'Save'); + } +} diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_user/xmlsitemap_user.info b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_user/xmlsitemap_user.info new file mode 100644 index 00000000..83615710 --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_user/xmlsitemap_user.info @@ -0,0 +1,15 @@ +name = XML sitemap user +description = Adds user profile links to the sitemap. +package = XML sitemap +dependencies[] = xmlsitemap +core = 7.x +files[] = xmlsitemap_user.module +files[] = xmlsitemap_user.install +files[] = xmlsitemap_user.test + +; Information added by Drupal.org packaging script on 2016-05-25 +version = "7.x-2.3" +core = "7.x" +project = "xmlsitemap" +datestamp = "1464191061" + diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_user/xmlsitemap_user.install b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_user/xmlsitemap_user.install new file mode 100644 index 00000000..f66fec01 --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_user/xmlsitemap_user.install @@ -0,0 +1,43 @@ +<?php + +/** + * @file + * Install and uninstall schema and functions for the xmlsitemap_user module. + */ + +/** + * Implements hook_requirements(). + */ +function xmlsitemap_user_requirements($phase) { + $requirements = array(); + $t = get_t(); + + if ($phase == 'runtime') { + if (!user_access('access user profiles', drupal_anonymous_user())) { + $requirements['xmlsitemap_user_anonymous_permission'] = array( + 'title' => $t('XML sitemap user'), + 'value' => $t('Anonymous access to user profiles'), + 'description' => $t('In order to list user profile links in the sitemap, the anonymous user must have the <a href="@perm-link"><em>View user profiles</em> permission</a>.', array('@perm-link' => url('admin/people/permissions/' . DRUPAL_ANONYMOUS_RID, array('fragment' => 'module-user')))), + 'severity' => REQUIREMENT_ERROR, + ); + } + } + + return $requirements; +} + +/** + * Implements hook_uninstall(). + */ +function xmlsitemap_user_uninstall() { + drupal_load('module', 'user'); + drupal_load('module', 'xmlsitemap'); + xmlsitemap_link_bundle_delete('user', 'user'); +} + +/** + * Implements hook_update_last_removed(). + */ +function xmlsitemap_user_update_last_removed() { + return 6202; +} diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_user/xmlsitemap_user.module b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_user/xmlsitemap_user.module new file mode 100644 index 00000000..d4415706 --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_user/xmlsitemap_user.module @@ -0,0 +1,163 @@ +<?php + +/** + * Implements hook_entity_info_alter(). + */ +function xmlsitemap_user_entity_info_alter(&$entity_info) { + $entity_info['user']['bundle label'] = t('User'); + $entity_info['user']['xmlsitemap'] = array( + 'process callback' => 'xmlsitemap_user_xmlsitemap_process_user_links', + ); +} + +/** + * Implements hook_cron(). + * + * Process old users not found in the {xmlsitemap} table. + */ +function xmlsitemap_user_cron() { + xmlsitemap_user_xmlsitemap_index_links(xmlsitemap_var('batch_limit')); +} + +/** + * Implements hook_xmlsitemap_index_links(). + */ +function xmlsitemap_user_xmlsitemap_index_links($limit) { + $uids = db_query_range("SELECT u.uid FROM {users} u LEFT JOIN {xmlsitemap} x ON x.type = 'user' AND u.uid = x.id WHERE x.id IS NULL AND u.uid > 0 ORDER BY u.uid DESC", 0, $limit)->fetchCol(); + xmlsitemap_user_xmlsitemap_process_user_links($uids); +} + +/** + * Process user sitemap links. + * + * @param $uids + * An array of user IDs. + */ +function xmlsitemap_user_xmlsitemap_process_user_links(array $uids) { + $accounts = user_load_multiple($uids); + foreach ($accounts as $account) { + $link = xmlsitemap_user_create_link($account); + xmlsitemap_link_save($link, array($link['type'] => $account)); + } +} + +/** + * Implements hook_user_presave(). + */ +function xmlsitemap_user_user_presave(&$edit, $account, $category) { + if (!empty($account->uid)) { + $link = xmlsitemap_user_create_link($account); + if (isset($edit['xmlsitemap'])) { + $link = $edit['xmlsitemap'] + $link; + unset($edit['xmlsitemap']); + } + xmlsitemap_link_save($link, array($link['type'] => $account)); + } +} + +/** + * Implements hook_user_insert(). + */ +function xmlsitemap_user_user_insert(&$edit, $account, $category) { + $link = xmlsitemap_user_create_link($account); + xmlsitemap_link_save($link, array($link['type'] => $account)); +} + +/** + * Implements hook_user_update(). + */ +function xmlsitemap_user_user_update(&$edit, $account, $category) { + $link = xmlsitemap_user_create_link($account); + xmlsitemap_link_save($link, array($link['type'] => $account)); +} + +/** + * Implements hook_user_delete(). + */ +function xmlsitemap_user_user_delete($account) { + xmlsitemap_link_delete('user', $account->uid); +} + +/** + * Implements hook_field_extra_fields(). + */ +function xmlsitemap_user_field_extra_fields() { + $extras['user']['user']['form']['xmlsitemap'] = array( + 'label' => t('XML sitemap'), + 'description' => t('XML sitemap module element'), + 'weight' => 30, + ); + return $extras; +} + +/** + * Implements hook_form_FORM_ID_alter(). + * + * @see user_admin_settings() + * @see xmlsitemap_add_link_bundle_settings() + */ +function xmlsitemap_user_form_user_profile_form_alter(&$form, $form_state) { + // Add the link options. + module_load_include('inc', 'xmlsitemap', 'xmlsitemap.admin'); + xmlsitemap_add_form_link_options($form, 'user', 'user', $form['#user']->uid); +} + +/** + * Implements hook_form_FORM_ID_alter(). + * + * @see user_admin_settings() + * @see xmlsitemap_add_link_bundle_settings() + */ +function xmlsitemap_user_form_user_admin_settings_alter(&$form, $form_state) { + module_load_include('inc', 'xmlsitemap', 'xmlsitemap.admin'); + xmlsitemap_add_link_bundle_settings($form, $form_state, 'user', 'user'); + $form['email_title'] += array('#weight' => 10); + $form['email'] += array('#weight' => 10); +} + +/** + * Create a sitemap link from a user. + * + * The link will be saved as $account->xmlsitemap. + * + * @param $account + * A user object. + */ +function xmlsitemap_user_create_link(stdClass &$account) { + if (!isset($account->xmlsitemap)) { + $account->xmlsitemap = array(); + if ($account->uid && $link = xmlsitemap_link_load('user', $account->uid)) { + $account->xmlsitemap = $link; + } + } + + $settings = xmlsitemap_link_bundle_load('user', 'user'); + $uri = entity_uri('user', $account); + + $account->xmlsitemap += array( + 'type' => 'user', + 'id' => $account->uid, + 'subtype' => 'user', + 'status' => $settings['status'], + 'status_default' => $settings['status'], + 'status_override' => 0, + 'priority' => $settings['priority'], + 'priority_default' => $settings['priority'], + 'priority_override' => 0, + ); + + // The following values must always be checked because they are volatile. + $account->xmlsitemap['loc'] = $uri['path']; + $account->xmlsitemap['access'] = $account->uid && $account->status; + $account->xmlsitemap['language'] = !empty($account->language) ? $account->language : LANGUAGE_NONE; + + return $account->xmlsitemap; +} + +/** + * Implementation of hook_variables(). + */ +function xmlsitemap_user_variables() { + $defaults = array(); + return $defaults; +} diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_user/xmlsitemap_user.test b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_user/xmlsitemap_user.test new file mode 100644 index 00000000..346038ce --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xmlsitemap_user/xmlsitemap_user.test @@ -0,0 +1,50 @@ +<?php + +/** + * @file + * Unit tests for the xmlsitemap_user module. + */ + +class XMLSitemapUserFunctionalTest extends XMLSitemapTestHelper { + protected $normal_user; + protected $accounts = array(); + + public static function getInfo() { + return array( + 'name' => 'XML sitemap user', + 'description' => 'Functional tests for the XML sitemap user module.', + 'group' => 'XML sitemap', + ); + } + + function setUp($modules = array()) { + $modules[] = 'xmlsitemap_user'; + parent::setUp($modules); + + // Save the user settings before creating the users. + xmlsitemap_link_bundle_settings_save('user', 'user', array('status' => 1, 'priority' => 0.5)); + + // Create the users + $this->admin_user = $this->drupalCreateUser(array('administer users', 'administer permissions', 'administer xmlsitemap')); + $this->normal_user = $this->drupalCreateUser(array('access content')); + + // Update the normal user to make its sitemap link visible. + $account = clone $this->normal_user; + user_save($account, array('access' => 1, 'login' => 1)); + } + + function testBlockedUser() { + $this->drupalLogin($this->admin_user); + $this->assertSitemapLinkVisible('user', $this->normal_user->uid); + + // Mark the user as blocked. + $edit = array( + 'status' => 0, + ); + + // This will pass when http://drupal.org/node/360925 is fixed. + $this->drupalPost('user/' . $this->normal_user->uid . '/edit', $edit, t('Save')); + $this->assertText('The changes have been saved.'); + $this->assertSitemapLinkNotVisible('user', $this->normal_user->uid); + } +} diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xsl/jquery.tablesorter.js b/profiles/wcm_base/modules/contrib/xmlsitemap/xsl/jquery.tablesorter.js new file mode 100644 index 00000000..ac28230c --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xsl/jquery.tablesorter.js @@ -0,0 +1,852 @@ +/* + * + * TableSorter 2.0 - Client-side table sorting with ease! + * Version 2.0.3 + * @requires jQuery v1.2.3 + * + * Copyright (c) 2007 Christian Bach + * Examples and docs at: http://tablesorter.com + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + */ +/** + * + * @description Create a sortable table with multi-column sorting capabilitys + * + * @example $('table').tablesorter(); + * @desc Create a simple tablesorter interface. + * + * @example $('table').tablesorter({ sortList:[[0,0],[1,0]] }); + * @desc Create a tablesorter interface and sort on the first and secound column in ascending order. + * + * @example $('table').tablesorter({ headers: { 0: { sorter: false}, 1: {sorter: false} } }); + * @desc Create a tablesorter interface and disableing the first and secound column headers. + * + * @example $('table').tablesorter({ 0: {sorter:"integer"}, 1: {sorter:"currency"} }); + * @desc Create a tablesorter interface and set a column parser for the first and secound column. + * + * + * @param Object settings An object literal containing key/value pairs to provide optional settings. + * + * @option String cssHeader (optional) A string of the class name to be appended to sortable tr elements in the thead of the table. + * Default value: "header" + * + * @option String cssAsc (optional) A string of the class name to be appended to sortable tr elements in the thead on a ascending sort. + * Default value: "headerSortUp" + * + * @option String cssDesc (optional) A string of the class name to be appended to sortable tr elements in the thead on a descending sort. + * Default value: "headerSortDown" + * + * @option String sortInitialOrder (optional) A string of the inital sorting order can be asc or desc. + * Default value: "asc" + * + * @option String sortMultisortKey (optional) A string of the multi-column sort key. + * Default value: "shiftKey" + * + * @option String textExtraction (optional) A string of the text-extraction method to use. + * For complex html structures inside td cell set this option to "complex", + * on large tables the complex option can be slow. + * Default value: "simple" + * + * @option Object headers (optional) An array containing the forces sorting rules. + * This option let's you specify a default sorting rule. + * Default value: null + * + * @option Array sortList (optional) An array containing the forces sorting rules. + * This option let's you specify a default sorting rule. + * Default value: null + * + * @option Array sortForce (optional) An array containing forced sorting rules. + * This option let's you specify a default sorting rule, which is prepended to user-selected rules. + * Default value: null + * + * @option Array sortAppend (optional) An array containing forced sorting rules. + * This option let's you specify a default sorting rule, which is appended to user-selected rules. + * Default value: null + * + * @option Boolean widthFixed (optional) Boolean flag indicating if tablesorter should apply fixed widths to the table columns. + * This is usefull when using the pager companion plugin. + * This options requires the dimension jquery plugin. + * Default value: false + * + * @option Boolean cancelSelection (optional) Boolean flag indicating if tablesorter should cancel selection of the table headers text. + * Default value: true + * + * @option Boolean debug (optional) Boolean flag indicating if tablesorter should display debuging information usefull for development. + * + * @type jQuery + * + * @name tablesorter + * + * @cat Plugins/Tablesorter + * + * @author Christian Bach/christian.bach@polyester.se + */ + +(function($) { + $.extend({ + tablesorter: new function() { + + var parsers = [], widgets = []; + + this.defaults = { + cssHeader: "header", + cssAsc: "headerSortUp", + cssDesc: "headerSortDown", + sortInitialOrder: "asc", + sortMultiSortKey: "shiftKey", + sortForce: null, + sortAppend: null, + textExtraction: "simple", + parsers: {}, + widgets: [], + widgetZebra: {css: ["even","odd"]}, + headers: {}, + widthFixed: false, + cancelSelection: true, + sortList: [], + headerList: [], + dateFormat: "us", + decimal: '.', + debug: false + }; + + /* debuging utils */ + function benchmark(s,d) { + log(s + "," + (new Date().getTime() - d.getTime()) + "ms"); + } + + this.benchmark = benchmark; + + function log(s) { + if (typeof console != "undefined" && typeof console.debug != "undefined") { + console.log(s); + } else { + alert(s); + } + } + + /* parsers utils */ + function buildParserCache(table,$headers) { + + if(table.config.debug) { var parsersDebug = ""; } + + var rows = table.tBodies[0].rows; + + if(table.tBodies[0].rows[0]) { + + var list = [], cells = rows[0].cells, l = cells.length; + + for (var i=0;i < l; i++) { + var p = false; + + if($.metadata && ($($headers[i]).metadata() && $($headers[i]).metadata().sorter) ) { + + p = getParserById($($headers[i]).metadata().sorter); + + } else if((table.config.headers[i] && table.config.headers[i].sorter)) { + + p = getParserById(table.config.headers[i].sorter); + } + if(!p) { + p = detectParserForColumn(table,cells[i]); + } + + if(table.config.debug) { parsersDebug += "column:" + i + " parser:" +p.id + "\n"; } + + list.push(p); + } + } + + if(table.config.debug) { log(parsersDebug); } + + return list; + }; + + function detectParserForColumn(table,node) { + var l = parsers.length; + for(var i=1; i < l; i++) { + if(parsers[i].is($.trim(getElementText(table.config,node)),table,node)) { + return parsers[i]; + } + } + // 0 is always the generic parser (text) + return parsers[0]; + } + + function getParserById(name) { + var l = parsers.length; + for(var i=0; i < l; i++) { + if(parsers[i].id.toLowerCase() == name.toLowerCase()) { + return parsers[i]; + } + } + return false; + } + + /* utils */ + function buildCache(table) { + + if(table.config.debug) { var cacheTime = new Date(); } + + + var totalRows = (table.tBodies[0] && table.tBodies[0].rows.length) || 0, + totalCells = (table.tBodies[0].rows[0] && table.tBodies[0].rows[0].cells.length) || 0, + parsers = table.config.parsers, + cache = {row: [], normalized: []}; + + for (var i=0;i < totalRows; ++i) { + + /** Add the table data to main data array */ + var c = table.tBodies[0].rows[i], cols = []; + + cache.row.push($(c)); + + for(var j=0; j < totalCells; ++j) { + cols.push(parsers[j].format(getElementText(table.config,c.cells[j]),table,c.cells[j])); + } + + cols.push(i); // add position for rowCache + cache.normalized.push(cols); + cols = null; + }; + + if(table.config.debug) { benchmark("Building cache for " + totalRows + " rows:", cacheTime); } + + return cache; + }; + + function getElementText(config,node) { + + if(!node) return ""; + + var t = ""; + + if(config.textExtraction == "simple") { + if(node.childNodes[0] && node.childNodes[0].hasChildNodes()) { + t = node.childNodes[0].innerHTML; + } else { + t = node.innerHTML; + } + } else { + if(typeof(config.textExtraction) == "function") { + t = config.textExtraction(node); + } else { + t = $(node).text(); + } + } + return t; + } + + function appendToTable(table,cache) { + + if(table.config.debug) {var appendTime = new Date()} + + var c = cache, + r = c.row, + n= c.normalized, + totalRows = n.length, + checkCell = (n[0].length-1), + tableBody = $(table.tBodies[0]), + rows = []; + + for (var i=0;i < totalRows; i++) { + rows.push(r[n[i][checkCell]]); + if(!table.config.appender) { + + var o = r[n[i][checkCell]]; + var l = o.length; + for(var j=0; j < l; j++) { + + tableBody[0].appendChild(o[j]); + + } + + //tableBody.append(r[n[i][checkCell]]); + } + } + + if(table.config.appender) { + + table.config.appender(table,rows); + } + + rows = null; + + if(table.config.debug) { benchmark("Rebuilt table:", appendTime); } + + //apply table widgets + applyWidget(table); + + // trigger sortend + setTimeout(function() { + $(table).trigger("sortEnd"); + },0); + + }; + + function buildHeaders(table) { + + if(table.config.debug) { var time = new Date(); } + + var meta = ($.metadata) ? true : false, tableHeadersRows = []; + + for(var i = 0; i < table.tHead.rows.length; i++) { tableHeadersRows[i]=0; }; + + $tableHeaders = $("thead th",table); + + $tableHeaders.each(function(index) { + + this.count = 0; + this.column = index; + this.order = formatSortingOrder(table.config.sortInitialOrder); + + if(checkHeaderMetadata(this) || checkHeaderOptions(table,index)) this.sortDisabled = true; + + if(!this.sortDisabled) { + $(this).addClass(table.config.cssHeader); + } + + // add cell to headerList + table.config.headerList[index]= this; + }); + + if(table.config.debug) { benchmark("Built headers:", time); log($tableHeaders); } + + return $tableHeaders; + + }; + + function checkCellColSpan(table, rows, row) { + var arr = [], r = table.tHead.rows, c = r[row].cells; + + for(var i=0; i < c.length; i++) { + var cell = c[i]; + + if ( cell.colSpan > 1) { + arr = arr.concat(checkCellColSpan(table, headerArr,row++)); + } else { + if(table.tHead.length == 1 || (cell.rowSpan > 1 || !r[row+1])) { + arr.push(cell); + } + //headerArr[row] = (i+row); + } + } + return arr; + }; + + function checkHeaderMetadata(cell) { + if(($.metadata) && ($(cell).metadata().sorter === false)) { return true; }; + return false; + } + + function checkHeaderOptions(table,i) { + if((table.config.headers[i]) && (table.config.headers[i].sorter === false)) { return true; }; + return false; + } + + function applyWidget(table) { + var c = table.config.widgets; + var l = c.length; + for(var i=0; i < l; i++) { + + getWidgetById(c[i]).format(table); + } + + } + + function getWidgetById(name) { + var l = widgets.length; + for(var i=0; i < l; i++) { + if(widgets[i].id.toLowerCase() == name.toLowerCase() ) { + return widgets[i]; + } + } + }; + + function formatSortingOrder(v) { + + if(typeof(v) != "Number") { + i = (v.toLowerCase() == "desc") ? 1 : 0; + } else { + i = (v == (0 || 1)) ? v : 0; + } + return i; + } + + function isValueInArray(v, a) { + var l = a.length; + for(var i=0; i < l; i++) { + if(a[i][0] == v) { + return true; + } + } + return false; + } + + function setHeadersCss(table,$headers, list, css) { + // remove all header information + $headers.removeClass(css[0]).removeClass(css[1]); + + var h = []; + $headers.each(function(offset) { + if(!this.sortDisabled) { + h[this.column] = $(this); + } + }); + + var l = list.length; + for(var i=0; i < l; i++) { + h[list[i][0]].addClass(css[list[i][1]]); + } + } + + function fixColumnWidth(table,$headers) { + var c = table.config; + if(c.widthFixed) { + var colgroup = $('<colgroup>'); + $("tr:first td",table.tBodies[0]).each(function() { + colgroup.append($('<col>').css('width',$(this).width())); + }); + $(table).prepend(colgroup); + }; + } + + function updateHeaderSortCount(table,sortList) { + var c = table.config, l = sortList.length; + for(var i=0; i < l; i++) { + var s = sortList[i], o = c.headerList[s[0]]; + o.count = s[1]; + o.count++; + } + } + + /* sorting methods */ + function multisort(table,sortList,cache) { + + if(table.config.debug) { var sortTime = new Date(); } + + var dynamicExp = "var sortWrapper = function(a,b) {", l = sortList.length; + + for(var i=0; i < l; i++) { + + var c = sortList[i][0]; + var order = sortList[i][1]; + var s = (getCachedSortType(table.config.parsers,c) == "text") ? ((order == 0) ? "sortText" : "sortTextDesc") : ((order == 0) ? "sortNumeric" : "sortNumericDesc"); + + var e = "e" + i; + + dynamicExp += "var " + e + " = " + s + "(a[" + c + "],b[" + c + "]); "; + dynamicExp += "if(" + e + ") { return " + e + "; } "; + dynamicExp += "else { "; + } + + // if value is the same keep orignal order + var orgOrderCol = cache.normalized[0].length - 1; + dynamicExp += "return a[" + orgOrderCol + "]-b[" + orgOrderCol + "];"; + + for(var i=0; i < l; i++) { + dynamicExp += "}; "; + } + + dynamicExp += "return 0; "; + dynamicExp += "}; "; + + eval(dynamicExp); + + cache.normalized.sort(sortWrapper); + + if(table.config.debug) { benchmark("Sorting on " + sortList.toString() + " and dir " + order+ " time:", sortTime); } + + return cache; + }; + + function sortText(a,b) { + return ((a < b) ? -1 : ((a > b) ? 1 : 0)); + }; + + function sortTextDesc(a,b) { + return ((b < a) ? -1 : ((b > a) ? 1 : 0)); + }; + + function sortNumeric(a,b) { + return a-b; + }; + + function sortNumericDesc(a,b) { + return b-a; + }; + + function getCachedSortType(parsers,i) { + return parsers[i].type; + }; + + /* public methods */ + this.construct = function(settings) { + + return this.each(function() { + + if(!this.tHead || !this.tBodies) return; + + var $this, $document,$headers, cache, config, shiftDown = 0, sortOrder; + + this.config = {}; + + config = $.extend(this.config, $.tablesorter.defaults, settings); + + // store common expression for speed + $this = $(this); + + // build headers + $headers = buildHeaders(this); + + // try to auto detect column type, and store in tables config + this.config.parsers = buildParserCache(this,$headers); + + + // build the cache for the tbody cells + cache = buildCache(this); + + // get the css class names, could be done else where. + var sortCSS = [config.cssDesc,config.cssAsc]; + + // fixate columns if the users supplies the fixedWidth option + fixColumnWidth(this); + + // apply event handling to headers + // this is to big, perhaps break it out? + $headers.click(function(e) { + + $this.trigger("sortStart"); + + var totalRows = ($this[0].tBodies[0] && $this[0].tBodies[0].rows.length) || 0; + + if(!this.sortDisabled && totalRows > 0) { + + + // store exp, for speed + var $cell = $(this); + + // get current column index + var i = this.column; + + // get current column sort order + this.order = this.count++ % 2; + + // user only whants to sort on one column + if(!e[config.sortMultiSortKey]) { + + // flush the sort list + config.sortList = []; + + if(config.sortForce != null) { + var a = config.sortForce; + for(var j=0; j < a.length; j++) { + if(a[j][0] != i) { + config.sortList.push(a[j]); + } + } + } + + // add column to sort list + config.sortList.push([i,this.order]); + + // multi column sorting + } else { + // the user has clicked on an all ready sortet column. + if(isValueInArray(i,config.sortList)) { + + // revers the sorting direction for all tables. + for(var j=0; j < config.sortList.length; j++) { + var s = config.sortList[j], o = config.headerList[s[0]]; + if(s[0] == i) { + o.count = s[1]; + o.count++; + s[1] = o.count % 2; + } + } + } else { + // add column to sort list array + config.sortList.push([i,this.order]); + } + }; + setTimeout(function() { + //set css for headers + setHeadersCss($this[0],$headers,config.sortList,sortCSS); + appendToTable($this[0],multisort($this[0],config.sortList,cache)); + },1); + // stop normal event by returning false + return false; + } + // cancel selection + }).mousedown(function() { + if(config.cancelSelection) { + this.onselectstart = function() {return false}; + return false; + } + }); + + // apply easy methods that trigger binded events + $this.bind("update",function() { + + // rebuild parsers. + this.config.parsers = buildParserCache(this,$headers); + + // rebuild the cache map + cache = buildCache(this); + + }).bind("sorton",function(e,list) { + + $(this).trigger("sortStart"); + + config.sortList = list; + + // update and store the sortlist + var sortList = config.sortList; + + // update header count index + updateHeaderSortCount(this,sortList); + + //set css for headers + setHeadersCss(this,$headers,sortList,sortCSS); + + + // sort the table and append it to the dom + appendToTable(this,multisort(this,sortList,cache)); + + }).bind("appendCache",function() { + + appendToTable(this,cache); + + }).bind("applyWidgetId",function(e,id) { + + getWidgetById(id).format(this); + + }).bind("applyWidgets",function() { + // apply widgets + applyWidget(this); + }); + + if($.metadata && ($(this).metadata() && $(this).metadata().sortlist)) { + config.sortList = $(this).metadata().sortlist; + } + // if user has supplied a sort list to constructor. + if(config.sortList.length > 0) { + $this.trigger("sorton",[config.sortList]); + } + + // apply widgets + applyWidget(this); + }); + }; + + this.addParser = function(parser) { + var l = parsers.length, a = true; + for(var i=0; i < l; i++) { + if(parsers[i].id.toLowerCase() == parser.id.toLowerCase()) { + a = false; + } + } + if(a) { parsers.push(parser); }; + }; + + this.addWidget = function(widget) { + widgets.push(widget); + }; + + this.formatFloat = function(s) { + var i = parseFloat(s); + return (isNaN(i)) ? 0 : i; + }; + this.formatInt = function(s) { + var i = parseInt(s); + return (isNaN(i)) ? 0 : i; + }; + + this.isDigit = function(s,config) { + var DECIMAL = '\\' + config.decimal; + var exp = '/(^[+]?0(' + DECIMAL +'0+)?$)|(^([-+]?[1-9][0-9]*)$)|(^([-+]?((0?|[1-9][0-9]*)' + DECIMAL +'(0*[1-9][0-9]*)))$)|(^[-+]?[1-9]+[0-9]*' + DECIMAL +'0+$)/'; + return RegExp(exp).test($.trim(s)); + }; + + this.clearTableBody = function(table) { + if($.browser.msie) { + function empty() { + while ( this.firstChild ) this.removeChild( this.firstChild ); + } + empty.apply(table.tBodies[0]); + } else { + table.tBodies[0].innerHTML = ""; + } + }; + } + }); + + // extend plugin scope + $.fn.extend({ + tablesorter: $.tablesorter.construct + }); + + var ts = $.tablesorter; + + // add default parsers + ts.addParser({ + id: "text", + is: function(s) { + return true; + }, + format: function(s) { + return $.trim(s.toLowerCase()); + }, + type: "text" + }); + + ts.addParser({ + id: "digit", + is: function(s,table) { + var c = table.config; + return $.tablesorter.isDigit(s,c); + }, + format: function(s) { + return $.tablesorter.formatFloat(s); + }, + type: "numeric" + }); + + ts.addParser({ + id: "currency", + is: function(s) { + return /^[£$€?.]/.test(s); + }, + format: function(s) { + return $.tablesorter.formatFloat(s.replace(new RegExp(/[^0-9.]/g),"")); + }, + type: "numeric" + }); + + ts.addParser({ + id: "ipAddress", + is: function(s) { + return /^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.test(s); + }, + format: function(s) { + var a = s.split("."), r = "", l = a.length; + for(var i = 0; i < l; i++) { + var item = a[i]; + if(item.length == 2) { + r += "0" + item; + } else { + r += item; + } + } + return $.tablesorter.formatFloat(r); + }, + type: "numeric" + }); + + ts.addParser({ + id: "url", + is: function(s) { + return /^(https?|ftp|file):\/\/$/.test(s); + }, + format: function(s) { + return jQuery.trim(s.replace(new RegExp(/(https?|ftp|file):\/\//),'')); + }, + type: "text" + }); + + ts.addParser({ + id: "isoDate", + is: function(s) { + return /^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(s); + }, + format: function(s) { + return $.tablesorter.formatFloat((s != "") ? new Date(s.replace(new RegExp(/-/g),"/")).getTime() : "0"); + }, + type: "numeric" + }); + + ts.addParser({ + id: "percent", + is: function(s) { + return /\%$/.test($.trim(s)); + }, + format: function(s) { + return $.tablesorter.formatFloat(s.replace(new RegExp(/%/g),"")); + }, + type: "numeric" + }); + + ts.addParser({ + id: "usLongDate", + is: function(s) { + return s.match(new RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(AM|PM)))$/)); + }, + format: function(s) { + return $.tablesorter.formatFloat(new Date(s).getTime()); + }, + type: "numeric" + }); + + ts.addParser({ + id: "shortDate", + is: function(s) { + return /\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(s); + }, + format: function(s,table) { + var c = table.config; + s = s.replace(/\-/g,"/"); + if(c.dateFormat == "us") { + // reformat the string in ISO format + s = s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/, "$3/$1/$2"); + } else if(c.dateFormat == "uk") { + //reformat the string in ISO format + s = s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/, "$3/$2/$1"); + } else if(c.dateFormat == "dd/mm/yy" || c.dateFormat == "dd-mm-yy") { + s = s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/, "$1/$2/$3"); + } + return $.tablesorter.formatFloat(new Date(s).getTime()); + }, + type: "numeric" + }); + + ts.addParser({ + id: "time", + is: function(s) { + return /^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))$/.test(s); + }, + format: function(s) { + return $.tablesorter.formatFloat(new Date("2000/01/01 " + s).getTime()); + }, + type: "numeric" + }); + + + ts.addParser({ + id: "metadata", + is: function(s) { + return false; + }, + format: function(s,table,cell) { + var c = table.config, p = (!c.parserMetadataName) ? 'sortValue' : c.parserMetadataName; + return $(cell).metadata()[p]; + }, + type: "numeric" + }); + + // add default widgets + ts.addWidget({ + id: "zebra", + format: function(table) { + if(table.config.debug) { var time = new Date(); } + $("tr:visible",table.tBodies[0]) + .filter(':even') + .removeClass(table.config.widgetZebra.css[1]).addClass(table.config.widgetZebra.css[0]) + .end().filter(':odd') + .removeClass(table.config.widgetZebra.css[0]).addClass(table.config.widgetZebra.css[1]); + if(table.config.debug) { $.tablesorter.benchmark("Applying Zebra widget", time); } + } + }); +})(jQuery); diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xsl/jquery.tablesorter.min.js b/profiles/wcm_base/modules/contrib/xmlsitemap/xsl/jquery.tablesorter.min.js new file mode 100644 index 00000000..64c70071 --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xsl/jquery.tablesorter.min.js @@ -0,0 +1,2 @@ + +(function($){$.extend({tablesorter:new function(){var parsers=[],widgets=[];this.defaults={cssHeader:"header",cssAsc:"headerSortUp",cssDesc:"headerSortDown",sortInitialOrder:"asc",sortMultiSortKey:"shiftKey",sortForce:null,sortAppend:null,textExtraction:"simple",parsers:{},widgets:[],widgetZebra:{css:["even","odd"]},headers:{},widthFixed:false,cancelSelection:true,sortList:[],headerList:[],dateFormat:"us",decimal:'.',debug:false};function benchmark(s,d){log(s+","+(new Date().getTime()-d.getTime())+"ms");}this.benchmark=benchmark;function log(s){if(typeof console!="undefined"&&typeof console.debug!="undefined"){console.log(s);}else{alert(s);}}function buildParserCache(table,$headers){if(table.config.debug){var parsersDebug="";}var rows=table.tBodies[0].rows;if(table.tBodies[0].rows[0]){var list=[],cells=rows[0].cells,l=cells.length;for(var i=0;i<l;i++){var p=false;if($.metadata&&($($headers[i]).metadata()&&$($headers[i]).metadata().sorter)){p=getParserById($($headers[i]).metadata().sorter);}else if((table.config.headers[i]&&table.config.headers[i].sorter)){p=getParserById(table.config.headers[i].sorter);}if(!p){p=detectParserForColumn(table,cells[i]);}if(table.config.debug){parsersDebug+="column:"+i+" parser:"+p.id+"\n";}list.push(p);}}if(table.config.debug){log(parsersDebug);}return list;};function detectParserForColumn(table,node){var l=parsers.length;for(var i=1;i<l;i++){if(parsers[i].is($.trim(getElementText(table.config,node)),table,node)){return parsers[i];}}return parsers[0];}function getParserById(name){var l=parsers.length;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==name.toLowerCase()){return parsers[i];}}return false;}function buildCache(table){if(table.config.debug){var cacheTime=new Date();}var totalRows=(table.tBodies[0]&&table.tBodies[0].rows.length)||0,totalCells=(table.tBodies[0].rows[0]&&table.tBodies[0].rows[0].cells.length)||0,parsers=table.config.parsers,cache={row:[],normalized:[]};for(var i=0;i<totalRows;++i){var c=table.tBodies[0].rows[i],cols=[];cache.row.push($(c));for(var j=0;j<totalCells;++j){cols.push(parsers[j].format(getElementText(table.config,c.cells[j]),table,c.cells[j]));}cols.push(i);cache.normalized.push(cols);cols=null;};if(table.config.debug){benchmark("Building cache for "+totalRows+" rows:",cacheTime);}return cache;};function getElementText(config,node){if(!node)return"";var t="";if(config.textExtraction=="simple"){if(node.childNodes[0]&&node.childNodes[0].hasChildNodes()){t=node.childNodes[0].innerHTML;}else{t=node.innerHTML;}}else{if(typeof(config.textExtraction)=="function"){t=config.textExtraction(node);}else{t=$(node).text();}}return t;}function appendToTable(table,cache){if(table.config.debug){var appendTime=new Date()}var c=cache,r=c.row,n=c.normalized,totalRows=n.length,checkCell=(n[0].length-1),tableBody=$(table.tBodies[0]),rows=[];for(var i=0;i<totalRows;i++){rows.push(r[n[i][checkCell]]);if(!table.config.appender){var o=r[n[i][checkCell]];var l=o.length;for(var j=0;j<l;j++){tableBody[0].appendChild(o[j]);}}}if(table.config.appender){table.config.appender(table,rows);}rows=null;if(table.config.debug){benchmark("Rebuilt table:",appendTime);}applyWidget(table);setTimeout(function(){$(table).trigger("sortEnd");},0);};function buildHeaders(table){if(table.config.debug){var time=new Date();}var meta=($.metadata)?true:false,tableHeadersRows=[];for(var i=0;i<table.tHead.rows.length;i++){tableHeadersRows[i]=0;};$tableHeaders=$("thead th",table);$tableHeaders.each(function(index){this.count=0;this.column=index;this.order=formatSortingOrder(table.config.sortInitialOrder);if(checkHeaderMetadata(this)||checkHeaderOptions(table,index))this.sortDisabled=true;if(!this.sortDisabled){$(this).addClass(table.config.cssHeader);}table.config.headerList[index]=this;});if(table.config.debug){benchmark("Built headers:",time);log($tableHeaders);}return $tableHeaders;};function checkCellColSpan(table,rows,row){var arr=[],r=table.tHead.rows,c=r[row].cells;for(var i=0;i<c.length;i++){var cell=c[i];if(cell.colSpan>1){arr=arr.concat(checkCellColSpan(table,headerArr,row++));}else{if(table.tHead.length==1||(cell.rowSpan>1||!r[row+1])){arr.push(cell);}}}return arr;};function checkHeaderMetadata(cell){if(($.metadata)&&($(cell).metadata().sorter===false)){return true;};return false;}function checkHeaderOptions(table,i){if((table.config.headers[i])&&(table.config.headers[i].sorter===false)){return true;};return false;}function applyWidget(table){var c=table.config.widgets;var l=c.length;for(var i=0;i<l;i++){getWidgetById(c[i]).format(table);}}function getWidgetById(name){var l=widgets.length;for(var i=0;i<l;i++){if(widgets[i].id.toLowerCase()==name.toLowerCase()){return widgets[i];}}};function formatSortingOrder(v){if(typeof(v)!="Number"){i=(v.toLowerCase()=="desc")?1:0;}else{i=(v==(0||1))?v:0;}return i;}function isValueInArray(v,a){var l=a.length;for(var i=0;i<l;i++){if(a[i][0]==v){return true;}}return false;}function setHeadersCss(table,$headers,list,css){$headers.removeClass(css[0]).removeClass(css[1]);var h=[];$headers.each(function(offset){if(!this.sortDisabled){h[this.column]=$(this);}});var l=list.length;for(var i=0;i<l;i++){h[list[i][0]].addClass(css[list[i][1]]);}}function fixColumnWidth(table,$headers){var c=table.config;if(c.widthFixed){var colgroup=$('<colgroup>');$("tr:first td",table.tBodies[0]).each(function(){colgroup.append($('<col>').css('width',$(this).width()));});$(table).prepend(colgroup);};}function updateHeaderSortCount(table,sortList){var c=table.config,l=sortList.length;for(var i=0;i<l;i++){var s=sortList[i],o=c.headerList[s[0]];o.count=s[1];o.count++;}}function multisort(table,sortList,cache){if(table.config.debug){var sortTime=new Date();}var dynamicExp="var sortWrapper = function(a,b) {",l=sortList.length;for(var i=0;i<l;i++){var c=sortList[i][0];var order=sortList[i][1];var s=(getCachedSortType(table.config.parsers,c)=="text")?((order==0)?"sortText":"sortTextDesc"):((order==0)?"sortNumeric":"sortNumericDesc");var e="e"+i;dynamicExp+="var "+e+" = "+s+"(a["+c+"],b["+c+"]); ";dynamicExp+="if("+e+") { return "+e+"; } ";dynamicExp+="else { ";}var orgOrderCol=cache.normalized[0].length-1;dynamicExp+="return a["+orgOrderCol+"]-b["+orgOrderCol+"];";for(var i=0;i<l;i++){dynamicExp+="}; ";}dynamicExp+="return 0; ";dynamicExp+="}; ";eval(dynamicExp);cache.normalized.sort(sortWrapper);if(table.config.debug){benchmark("Sorting on "+sortList.toString()+" and dir "+order+" time:",sortTime);}return cache;};function sortText(a,b){return((a<b)?-1:((a>b)?1:0));};function sortTextDesc(a,b){return((b<a)?-1:((b>a)?1:0));};function sortNumeric(a,b){return a-b;};function sortNumericDesc(a,b){return b-a;};function getCachedSortType(parsers,i){return parsers[i].type;};this.construct=function(settings){return this.each(function(){if(!this.tHead||!this.tBodies)return;var $this,$document,$headers,cache,config,shiftDown=0,sortOrder;this.config={};config=$.extend(this.config,$.tablesorter.defaults,settings);$this=$(this);$headers=buildHeaders(this);this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);var sortCSS=[config.cssDesc,config.cssAsc];fixColumnWidth(this);$headers.click(function(e){$this.trigger("sortStart");var totalRows=($this[0].tBodies[0]&&$this[0].tBodies[0].rows.length)||0;if(!this.sortDisabled&&totalRows>0){var $cell=$(this);var i=this.column;this.order=this.count++%2;if(!e[config.sortMultiSortKey]){config.sortList=[];if(config.sortForce!=null){var a=config.sortForce;for(var j=0;j<a.length;j++){if(a[j][0]!=i){config.sortList.push(a[j]);}}}config.sortList.push([i,this.order]);}else{if(isValueInArray(i,config.sortList)){for(var j=0;j<config.sortList.length;j++){var s=config.sortList[j],o=config.headerList[s[0]];if(s[0]==i){o.count=s[1];o.count++;s[1]=o.count%2;}}}else{config.sortList.push([i,this.order]);}};setTimeout(function(){setHeadersCss($this[0],$headers,config.sortList,sortCSS);appendToTable($this[0],multisort($this[0],config.sortList,cache));},1);return false;}}).mousedown(function(){if(config.cancelSelection){this.onselectstart=function(){return false};return false;}});$this.bind("update",function(){this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);}).bind("sorton",function(e,list){$(this).trigger("sortStart");config.sortList=list;var sortList=config.sortList;updateHeaderSortCount(this,sortList);setHeadersCss(this,$headers,sortList,sortCSS);appendToTable(this,multisort(this,sortList,cache));}).bind("appendCache",function(){appendToTable(this,cache);}).bind("applyWidgetId",function(e,id){getWidgetById(id).format(this);}).bind("applyWidgets",function(){applyWidget(this);});if($.metadata&&($(this).metadata()&&$(this).metadata().sortlist)){config.sortList=$(this).metadata().sortlist;}if(config.sortList.length>0){$this.trigger("sorton",[config.sortList]);}applyWidget(this);});};this.addParser=function(parser){var l=parsers.length,a=true;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==parser.id.toLowerCase()){a=false;}}if(a){parsers.push(parser);};};this.addWidget=function(widget){widgets.push(widget);};this.formatFloat=function(s){var i=parseFloat(s);return(isNaN(i))?0:i;};this.formatInt=function(s){var i=parseInt(s);return(isNaN(i))?0:i;};this.isDigit=function(s,config){var DECIMAL='\\'+config.decimal;var exp='/(^[+]?0('+DECIMAL+'0+)?$)|(^([-+]?[1-9][0-9]*)$)|(^([-+]?((0?|[1-9][0-9]*)'+DECIMAL+'(0*[1-9][0-9]*)))$)|(^[-+]?[1-9]+[0-9]*'+DECIMAL+'0+$)/';return RegExp(exp).test($.trim(s));};this.clearTableBody=function(table){if($.browser.msie){function empty(){while(this.firstChild)this.removeChild(this.firstChild);}empty.apply(table.tBodies[0]);}else{table.tBodies[0].innerHTML="";}};}});$.fn.extend({tablesorter:$.tablesorter.construct});var ts=$.tablesorter;ts.addParser({id:"text",is:function(s){return true;},format:function(s){return $.trim(s.toLowerCase());},type:"text"});ts.addParser({id:"digit",is:function(s,table){var c=table.config;return $.tablesorter.isDigit(s,c);},format:function(s){return $.tablesorter.formatFloat(s);},type:"numeric"});ts.addParser({id:"currency",is:function(s){return/^[£$€?.]/.test(s);},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/[^0-9.]/g),""));},type:"numeric"});ts.addParser({id:"ipAddress",is:function(s){return/^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.test(s);},format:function(s){var a=s.split("."),r="",l=a.length;for(var i=0;i<l;i++){var item=a[i];if(item.length==2){r+="0"+item;}else{r+=item;}}return $.tablesorter.formatFloat(r);},type:"numeric"});ts.addParser({id:"url",is:function(s){return/^(https?|ftp|file):\/\/$/.test(s);},format:function(s){return jQuery.trim(s.replace(new RegExp(/(https?|ftp|file):\/\//),''));},type:"text"});ts.addParser({id:"isoDate",is:function(s){return/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(s);},format:function(s){return $.tablesorter.formatFloat((s!="")?new Date(s.replace(new RegExp(/-/g),"/")).getTime():"0");},type:"numeric"});ts.addParser({id:"percent",is:function(s){return/\%$/.test($.trim(s));},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/%/g),""));},type:"numeric"});ts.addParser({id:"usLongDate",is:function(s){return s.match(new RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(AM|PM)))$/));},format:function(s){return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"shortDate",is:function(s){return/\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(s);},format:function(s,table){var c=table.config;s=s.replace(/\-/g,"/");if(c.dateFormat=="us"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$1/$2");}else if(c.dateFormat=="uk"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$2/$1");}else if(c.dateFormat=="dd/mm/yy"||c.dateFormat=="dd-mm-yy"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/,"$1/$2/$3");}return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"time",is:function(s){return/^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))$/.test(s);},format:function(s){return $.tablesorter.formatFloat(new Date("2000/01/01 "+s).getTime());},type:"numeric"});ts.addParser({id:"metadata",is:function(s){return false;},format:function(s,table,cell){var c=table.config,p=(!c.parserMetadataName)?'sortValue':c.parserMetadataName;return $(cell).metadata()[p];},type:"numeric"});ts.addWidget({id:"zebra",format:function(table){if(table.config.debug){var time=new Date();}$("tr:visible",table.tBodies[0]).filter(':even').removeClass(table.config.widgetZebra.css[1]).addClass(table.config.widgetZebra.css[0]).end().filter(':odd').removeClass(table.config.widgetZebra.css[0]).addClass(table.config.widgetZebra.css[1]);if(table.config.debug){$.tablesorter.benchmark("Applying Zebra widget",time);}}});})(jQuery); \ No newline at end of file diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xsl/xmlsitemap.xsl b/profiles/wcm_base/modules/contrib/xmlsitemap/xsl/xmlsitemap.xsl new file mode 100644 index 00000000..284429e9 --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xsl/xmlsitemap.xsl @@ -0,0 +1,137 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- Copyright (c) 2010 Dave Reid <http://drupal.org/user/53892> + + This file is free software: you may copy, redistribute and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation, either version 2 of the License, or (at your + option) any later version. + + This file is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + + This file incorporates work covered by the following copyright and + permission notice: + + Google Sitmaps Stylesheets (GSStylesheets) + Project Home: http://sourceforge.net/projects/gstoolbox + Copyright (c) 2005 Baccou Bonneville SARL (http://www.baccoubonneville.com) + License http://www.gnu.org/copyleft/lesser.html GNU/LGPL --> + +<xsl:stylesheet version="2.0" + xmlns:html="http://www.w3.org/TR/REC-html40" + xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> + <xsl:output method="html" doctype-system="about:legacy-compat" encoding="UTF-8" indent="yes" /> + <!-- Root template --> + <xsl:template match="/"> + <html> + <head> + <title>Sitemap file</title> + <script type="text/javascript" src="[jquery]"></script> + <script type="text/javascript" src="[jquery-tablesort]"></script> + <script type="text/javascript" src="[xsl-js]"></script> + <link href="[xsl-css]" type="text/css" rel="stylesheet"/> + </head> + + <!-- Store in $fileType if we are in a sitemap or in a siteindex --> + <xsl:variable name="fileType"> + <xsl:choose> + <xsl:when test="//sitemap:url">sitemap</xsl:when> + <xsl:otherwise>siteindex</xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <body> + <h1>Sitemap file</h1> + <xsl:choose> + <xsl:when test="$fileType='sitemap'"><xsl:call-template name="sitemapTable"/></xsl:when> + <xsl:otherwise><xsl:call-template name="siteindexTable"/></xsl:otherwise> + </xsl:choose> + + <div id="footer"> + <p>Generated by the <a href="http://drupal.org/project/xmlsitemap">Drupal XML sitemap module</a>.</p> + </div> + </body> + </html> + </xsl:template> + + <!-- siteindexTable template --> + <xsl:template name="siteindexTable"> + <div id="information"> + <p>Number of sitemaps in this index: <xsl:value-of select="count(sitemap:sitemapindex/sitemap:sitemap)"></xsl:value-of></p> + </div> + <table class="tablesorter siteindex"> + <thead> + <tr> + <th>Sitemap URL</th> + <th>Last modification date</th> + </tr> + </thead> + <tbody> + <xsl:apply-templates select="sitemap:sitemapindex/sitemap:sitemap"> + <xsl:sort select="sitemap:lastmod" order="descending"/> + </xsl:apply-templates> + </tbody> + </table> + </xsl:template> + + <!-- sitemapTable template --> + <xsl:template name="sitemapTable"> + <div id="information"> + <p>Number of URLs in this sitemap: <xsl:value-of select="count(sitemap:urlset/sitemap:url)"></xsl:value-of></p> + </div> + <table class="tablesorter sitemap"> + <thead> + <tr> + <th>URL location</th> + <th>Last modification date</th> + <th>Change frequency</th> + <th>Priority</th> + </tr> + </thead> + <tbody> + <xsl:apply-templates select="sitemap:urlset/sitemap:url"> + <xsl:sort select="sitemap:priority" order="descending"/> + </xsl:apply-templates> + </tbody> + </table> + </xsl:template> + + <!-- sitemap:url template --> + <xsl:template match="sitemap:url"> + <tr> + <td> + <xsl:variable name="sitemapURL"><xsl:value-of select="sitemap:loc"/></xsl:variable> + <a href="{$sitemapURL}" ref="nofollow"><xsl:value-of select="$sitemapURL"></xsl:value-of></a> + </td> + <td><xsl:value-of select="sitemap:lastmod"/></td> + <td><xsl:value-of select="sitemap:changefreq"/></td> + <td> + <xsl:choose> + <!-- If priority is not defined, show the default value of 0.5 --> + <xsl:when test="sitemap:priority"> + <xsl:value-of select="sitemap:priority"/> + </xsl:when> + <xsl:otherwise>0.5</xsl:otherwise> + </xsl:choose> + </td> + </tr> + </xsl:template> + + <!-- sitemap:sitemap template --> + <xsl:template match="sitemap:sitemap"> + <tr> + <td> + <xsl:variable name="sitemapURL"><xsl:value-of select="sitemap:loc"/></xsl:variable> + <a href="{$sitemapURL}"><xsl:value-of select="$sitemapURL"></xsl:value-of></a> + </td> + <td><xsl:value-of select="sitemap:lastmod"/></td> + </tr> + </xsl:template> +</xsl:stylesheet> diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xsl/xmlsitemap.xsl.css b/profiles/wcm_base/modules/contrib/xmlsitemap/xsl/xmlsitemap.xsl.css new file mode 100644 index 00000000..48bb9e90 --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xsl/xmlsitemap.xsl.css @@ -0,0 +1,45 @@ + +body { + background-color: #FFF; + font-family: Verdana,sans-serif; + font-size: 10pt; +} +h1 { + font-size: 1.25em; +} +table.tablesorter { + background-color: #CDCDCD; + margin:10px 0pt 15px; + font-size: 8pt; + width: 100%; + text-align: left; +} +table.tablesorter thead tr th, table.tablesorter tfoot tr th { + background-color: #E6EEEE; + border: 1px solid #FFF; + font-size: 8pt; + padding: 3px; +} +table.tablesorter thead tr .header { + cursor: pointer; +} +table.tablesorter tbody td { + color: #3D3D3D; + padding: 3px; + background-color: #FFF; + vertical-align: top; +} +table.tablesorter tbody tr.odd td { + background-color: #EFEFEF; +} +table.tablesorter thead tr .headerSortUp { + background: url(/misc/arrow-asc.png) no-repeat center right; +} +table.tablesorter thead tr .headerSortDown { + background: url(/misc/arrow-desc.png) no-repeat center right; +} +table.tablesorter thead tr .headerSortDown, table.tablesorter thead tr .headerSortUp { + background-color: #5050D3; + color: #FFF; + font-style: italic; +} diff --git a/profiles/wcm_base/modules/contrib/xmlsitemap/xsl/xmlsitemap.xsl.js b/profiles/wcm_base/modules/contrib/xmlsitemap/xsl/xmlsitemap.xsl.js new file mode 100644 index 00000000..a7d30275 --- /dev/null +++ b/profiles/wcm_base/modules/contrib/xmlsitemap/xsl/xmlsitemap.xsl.js @@ -0,0 +1,45 @@ +(function($){ + +$.tablesorter.addParser({ + // set a unique id + id: 'changefreq', + is: function(s) { + return false; + }, + format: function(s) { + switch (s) { + case 'always': + return 0; + case 'hourly': + return 1; + case 'daily': + return 2; + case 'weekly': + return 3; + case 'monthly': + return 4; + case 'yearly': + return 5; + default: + return 6; + } + }, + type: 'numeric' +}); + +$(document).ready(function() { + // Set some location variables. + var h1 = $('h1'); + h1.text(h1.text() + ': ' + location); + document.title = h1.text(); + + $('table').tablesorter({ + sortList: [[0,0]], + headers: { + 2: { sorter: 'changefreq' } + }, + widgets: ['zebra'] + }); +}); + +})(jQuery); diff --git a/profiles/wcm_base/modules/custom/ocio_calendar/ocio_calendar.ds.inc b/profiles/wcm_base/modules/custom/ocio_calendar/ocio_calendar.ds.inc index 2067b2c3..55c4b5f7 100644 --- a/profiles/wcm_base/modules/custom/ocio_calendar/ocio_calendar.ds.inc +++ b/profiles/wcm_base/modules/custom/ocio_calendar/ocio_calendar.ds.inc @@ -17,9 +17,11 @@ function ocio_calendar_ds_field_settings_info() { $ds_fieldsetting->bundle = 'calendar_entry'; $ds_fieldsetting->view_mode = 'full'; $ds_fieldsetting->settings = array( - 'field_location_address' => array( + 'field_date' => array( 'formatter_settings' => array( - 'ft' => array(), + 'ft' => array( + 'prefix' => '<i class="fa fa-calendar" aria-hidden="true"></i>', + ), ), ), ); @@ -44,20 +46,22 @@ function ocio_calendar_ds_layout_settings_info() { $ds_layout->settings = array( 'regions' => array( 'ds_content' => array( - 0 => 'field_date', - 1 => 'group_location', - 2 => 'field_location_building', - 3 => 'field_location_address', - 4 => 'field_ocio_body', + 0 => 'field_location_room_number', + 1 => 'field_location_building', + 2 => 'field_date', + 3 => 'group_location', + 4 => 'field_location_address', + 5 => 'field_ocio_body', ), 'ds_hidden' => array( - 5 => 'field_tags', + 6 => 'field_tags', ), ), 'fields' => array( + 'field_location_room_number' => 'ds_content', + 'field_location_building' => 'ds_content', 'field_date' => 'ds_content', 'group_location' => 'ds_content', - 'field_location_building' => 'ds_content', 'field_location_address' => 'ds_content', 'field_ocio_body' => 'ds_content', 'field_tags' => 'ds_hidden', diff --git a/profiles/wcm_base/modules/custom/ocio_calendar/ocio_calendar.features.field_base.inc b/profiles/wcm_base/modules/custom/ocio_calendar/ocio_calendar.features.field_base.inc index 7e900923..6a4c7547 100644 --- a/profiles/wcm_base/modules/custom/ocio_calendar/ocio_calendar.features.field_base.inc +++ b/profiles/wcm_base/modules/custom/ocio_calendar/ocio_calendar.features.field_base.inc @@ -52,5 +52,26 @@ function ocio_calendar_field_default_field_bases() { 'type' => 'text', ); + // Exported field_base: 'field_location_room_number'. + $field_bases['field_location_room_number'] = array( + 'active' => 1, + 'cardinality' => 1, + 'deleted' => 0, + 'entity_types' => array(), + 'field_name' => 'field_location_room_number', + 'indexes' => array( + 'format' => array( + 0 => 'format', + ), + ), + 'locked' => 0, + 'module' => 'text', + 'settings' => array( + 'max_length' => 60, + ), + 'translatable' => 0, + 'type' => 'text', + ); + return $field_bases; } diff --git a/profiles/wcm_base/modules/custom/ocio_calendar/ocio_calendar.features.field_instance.inc b/profiles/wcm_base/modules/custom/ocio_calendar/ocio_calendar.features.field_instance.inc index 0c3cc3ce..35288545 100644 --- a/profiles/wcm_base/modules/custom/ocio_calendar/ocio_calendar.features.field_instance.inc +++ b/profiles/wcm_base/modules/custom/ocio_calendar/ocio_calendar.features.field_instance.inc @@ -48,7 +48,7 @@ function ocio_calendar_field_default_field_instances() { 'show_remaining_days' => 0, ), 'type' => 'date_default', - 'weight' => 0, + 'weight' => 1, ), 'teaser' => array( 'label' => 'above', @@ -64,9 +64,9 @@ function ocio_calendar_field_default_field_instances() { 'required' => 1, 'settings' => array( 'default_value' => 'now', - 'default_value2' => 'same', + 'default_value2' => 'strtotime', 'default_value_code' => '', - 'default_value_code2' => '', + 'default_value_code2' => '+1 hour', 'user_register_form' => FALSE, ), 'widget' => array( @@ -78,8 +78,9 @@ function ocio_calendar_field_default_field_instances() { 'input_format' => 'M j Y - g:i:sa', 'input_format_custom' => '', 'label_position' => 'above', + 'no_fieldset' => 0, 'text_parts' => array(), - 'year_range' => '-3:+3', + 'year_range' => '-0:+2', ), 'type' => 'date_popup', 'weight' => 1, @@ -117,7 +118,7 @@ function ocio_calendar_field_default_field_instances() { 'zoom_level' => 14, ), 'type' => 'simple_gmap', - 'weight' => 3, + 'weight' => 2, ), 'teaser' => array( 'label' => 'above', @@ -147,7 +148,7 @@ function ocio_calendar_field_default_field_instances() { 'size' => 120, ), 'type' => 'text_textfield', - 'weight' => 4, + 'weight' => 7, ), ); @@ -156,7 +157,7 @@ function ocio_calendar_field_default_field_instances() { 'bundle' => 'calendar_entry', 'default_value' => NULL, 'deleted' => 0, - 'description' => 'Room number and building name, if applicable. ', + 'description' => '', 'display' => array( 'default' => array( 'label' => 'above', @@ -170,7 +171,7 @@ function ocio_calendar_field_default_field_instances() { 'module' => 'text', 'settings' => array(), 'type' => 'text_default', - 'weight' => 2, + 'weight' => 1, ), 'teaser' => array( 'label' => 'above', @@ -200,7 +201,60 @@ function ocio_calendar_field_default_field_instances() { 'size' => 60, ), 'type' => 'text_textfield', - 'weight' => 3, + 'weight' => 6, + ), + ); + + // Exported field_instance: 'node-calendar_entry-field_location_room_number'. + $field_instances['node-calendar_entry-field_location_room_number'] = array( + 'bundle' => 'calendar_entry', + 'default_value' => NULL, + 'deleted' => 0, + 'description' => '', + 'display' => array( + 'default' => array( + 'label' => 'above', + 'module' => 'text', + 'settings' => array(), + 'type' => 'text_default', + 'weight' => 6, + ), + 'full' => array( + 'label' => 'hidden', + 'module' => 'text', + 'settings' => array(), + 'type' => 'text_default', + 'weight' => 0, + ), + 'teaser' => array( + 'label' => 'above', + 'settings' => array(), + 'type' => 'hidden', + 'weight' => 0, + ), + ), + 'ds_extras_field_template' => '', + 'entity_type' => 'node', + 'field_name' => 'field_location_room_number', + 'label' => 'Location Room Number', + 'required' => 0, + 'settings' => array( + 'linkit' => array( + 'button_text' => 'Search', + 'enable' => 0, + 'profile' => '', + ), + 'text_processing' => 0, + 'user_register_form' => FALSE, + ), + 'widget' => array( + 'active' => 1, + 'module' => 'text', + 'settings' => array( + 'size' => 10, + ), + 'type' => 'text_textfield', + 'weight' => 5, ), ); @@ -229,7 +283,7 @@ function ocio_calendar_field_default_field_instances() { 'module' => 'text', 'settings' => array(), 'type' => 'text_default', - 'weight' => 4, + 'weight' => 3, ), 'teaser' => array( 'label' => 'above', @@ -288,7 +342,7 @@ function ocio_calendar_field_default_field_instances() { 'view_mode' => 'default', ), 'type' => 'entityreference_entity_view', - 'weight' => 5, + 'weight' => 4, ), 'teaser' => array( 'label' => 'above', @@ -323,8 +377,8 @@ function ocio_calendar_field_default_field_instances() { t('Description'); t('Location Address'); t('Location Building'); + t('Location Room Number'); t('Optional. This will generate a link to google maps. Plus address in following format: "1050 Carmack Rd., Columbus, OH 43210".'); - t('Room number and building name, if applicable. '); t('Tags'); return $field_instances; diff --git a/profiles/wcm_base/modules/custom/ocio_calendar/ocio_calendar.field_group.inc b/profiles/wcm_base/modules/custom/ocio_calendar/ocio_calendar.field_group.inc index f35fc3e2..80f9d0d0 100644 --- a/profiles/wcm_base/modules/custom/ocio_calendar/ocio_calendar.field_group.inc +++ b/profiles/wcm_base/modules/custom/ocio_calendar/ocio_calendar.field_group.inc @@ -25,6 +25,7 @@ function ocio_calendar_field_group_info() { 'children' => array( 0 => 'field_location_address', 1 => 'field_location_building', + 2 => 'field_location_room_number', ), 'format_type' => 'fieldset', 'format_settings' => array( @@ -50,10 +51,11 @@ function ocio_calendar_field_group_info() { $field_group->parent_name = ''; $field_group->data = array( 'label' => 'Location', - 'weight' => '1', + 'weight' => '2', 'children' => array( 0 => 'field_location_address', 1 => 'field_location_building', + 2 => 'field_location_room_number', ), 'format_type' => 'div', 'format_settings' => array( diff --git a/profiles/wcm_base/modules/custom/ocio_calendar/ocio_calendar.info b/profiles/wcm_base/modules/custom/ocio_calendar/ocio_calendar.info index 43e91a7a..d99bc284 100644 --- a/profiles/wcm_base/modules/custom/ocio_calendar/ocio_calendar.info +++ b/profiles/wcm_base/modules/custom/ocio_calendar/ocio_calendar.info @@ -28,11 +28,13 @@ features[ds_layout_settings][] = node|calendar_entry|full features[features_api][] = api:2 features[field_base][] = field_location_address features[field_base][] = field_location_building +features[field_base][] = field_location_room_number features[field_group][] = group_location|node|calendar_entry|form features[field_group][] = group_location|node|calendar_entry|full features[field_instance][] = node-calendar_entry-field_date features[field_instance][] = node-calendar_entry-field_location_address features[field_instance][] = node-calendar_entry-field_location_building +features[field_instance][] = node-calendar_entry-field_location_room_number features[field_instance][] = node-calendar_entry-field_ocio_body features[field_instance][] = node-calendar_entry-field_tags features[node][] = calendar_entry diff --git a/profiles/wcm_base/modules/custom/ocio_calendar/ocio_calendar.module b/profiles/wcm_base/modules/custom/ocio_calendar/ocio_calendar.module index 9959a9c1..1bfdb3d0 100644 --- a/profiles/wcm_base/modules/custom/ocio_calendar/ocio_calendar.module +++ b/profiles/wcm_base/modules/custom/ocio_calendar/ocio_calendar.module @@ -14,7 +14,7 @@ function ocio_calendar_date_formats() { // Creates a new format for a new, custom format type. array( 'type' => 'ocio_calendar_node', - 'format' => 'F j, Y | g:sa', + 'format' => 'F j, Y | g:ia', 'locales' => array(), ), array( diff --git a/profiles/wcm_base/modules/custom/ocio_calendar/ocio_calendar.strongarm.inc b/profiles/wcm_base/modules/custom/ocio_calendar/ocio_calendar.strongarm.inc index 53cd4ad5..c39c8a31 100644 --- a/profiles/wcm_base/modules/custom/ocio_calendar/ocio_calendar.strongarm.inc +++ b/profiles/wcm_base/modules/custom/ocio_calendar/ocio_calendar.strongarm.inc @@ -21,7 +21,7 @@ function ocio_calendar_strongarm() { $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ $strongarm->api_version = 1; $strongarm->name = 'date_format_ocio_calendar_node'; - $strongarm->value = 'F j, Y | g:sa'; + $strongarm->value = 'F j, Y | g:ia'; $export['date_format_ocio_calendar_node'] = $strongarm; $strongarm = new stdClass(); diff --git a/profiles/wcm_base/modules/custom/ocio_calendar/ocio_calendar.views_default.inc b/profiles/wcm_base/modules/custom/ocio_calendar/ocio_calendar.views_default.inc index 62515f4c..1dfc409f 100644 --- a/profiles/wcm_base/modules/custom/ocio_calendar/ocio_calendar.views_default.inc +++ b/profiles/wcm_base/modules/custom/ocio_calendar/ocio_calendar.views_default.inc @@ -39,6 +39,17 @@ function ocio_calendar_views_default_views() { $handler->display->display_options['style_options']['theme_style'] = '1'; $handler->display->display_options['style_options']['max_items'] = '0'; $handler->display->display_options['row_plugin'] = 'calendar_entity'; + $handler->display->display_options['row_options']['colors']['legend'] = 'type'; + $handler->display->display_options['row_options']['colors']['calendar_colors_type'] = array( + 'basic_page' => '#ffffff', + 'book_page' => '#ffffff', + 'calendar_entry' => '#ffffff', + 'faq' => '#ffffff', + 'featured_slide' => '#ffffff', + 'ocio_landing_page' => '#ffffff', + 'article' => '#ffffff', + 'web_form' => '#ffffff', + ); /* Field: Content: Title */ $handler->display->display_options['fields']['title']['id'] = 'title'; $handler->display->display_options['fields']['title']['table'] = 'node'; @@ -101,6 +112,12 @@ function ocio_calendar_views_default_views() { $handler->display->display_options['sorts']['field_date_value']['id'] = 'field_date_value'; $handler->display->display_options['sorts']['field_date_value']['table'] = 'field_data_field_date'; $handler->display->display_options['sorts']['field_date_value']['field'] = 'field_date_value'; + /* Contextual filter: Content: Date - start date (field_date) */ + $handler->display->display_options['arguments']['field_date_value']['id'] = 'field_date_value'; + $handler->display->display_options['arguments']['field_date_value']['table'] = 'field_data_field_date'; + $handler->display->display_options['arguments']['field_date_value']['field'] = 'field_date_value'; + $handler->display->display_options['arguments']['field_date_value']['default_argument_type'] = 'date'; + $handler->display->display_options['arguments']['field_date_value']['summary']['format'] = 'default_summary'; /* Filter criterion: Content: Published */ $handler->display->display_options['filters']['status']['id'] = 'status'; $handler->display->display_options['filters']['status']['table'] = 'node'; @@ -123,6 +140,7 @@ function ocio_calendar_views_default_views() { $handler->display->display_options['pager']['type'] = 'date_views_pager'; $handler->display->display_options['pager']['options']['date_id'] = 'month'; $handler->display->display_options['pager']['options']['link_format'] = 'clean'; + $handler->display->display_options['pager']['options']['skip_empty_pages'] = 0; $handler->display->display_options['defaults']['style_plugin'] = FALSE; $handler->display->display_options['style_plugin'] = 'calendar_style'; $handler->display->display_options['style_options']['name_size'] = '3'; @@ -135,6 +153,16 @@ function ocio_calendar_views_default_views() { $handler->display->display_options['defaults']['row_plugin'] = FALSE; $handler->display->display_options['row_plugin'] = 'calendar_entity'; $handler->display->display_options['row_options']['colors']['legend'] = 'type'; + $handler->display->display_options['row_options']['colors']['calendar_colors_type'] = array( + 'basic_page' => '#ffffff', + 'book_page' => '#ffffff', + 'calendar_entry' => '#ffffff', + 'faq' => '#ffffff', + 'featured_slide' => '#ffffff', + 'ocio_landing_page' => '#ffffff', + 'article' => '#ffffff', + 'web_form' => '#ffffff', + ); $handler->display->display_options['defaults']['row_options'] = FALSE; $handler->display->display_options['defaults']['arguments'] = FALSE; /* Contextual filter: Date: Date (node) */ @@ -148,17 +176,18 @@ function ocio_calendar_views_default_views() { $handler->display->display_options['arguments']['date_argument']['date_fields'] = array( 'field_data_field_date.field_date_value' => 'field_data_field_date.field_date_value', ); - $handler->display->display_options['path'] = 'calendar/month'; - $handler->display->display_options['menu']['type'] = 'default tab'; + $handler->display->display_options['path'] = 'calendar'; $handler->display->display_options['menu']['title'] = 'Month'; $handler->display->display_options['menu']['weight'] = '0'; $handler->display->display_options['menu']['context'] = 0; + $handler->display->display_options['menu']['context_only_inline'] = 0; $handler->display->display_options['tab_options']['type'] = 'normal'; $handler->display->display_options['tab_options']['title'] = 'Calendar'; $handler->display->display_options['tab_options']['weight'] = '0'; /* Display: Week */ $handler = $view->new_display('page', 'Week', 'page_2'); + $handler->display->display_options['enabled'] = FALSE; $handler->display->display_options['defaults']['hide_admin_links'] = FALSE; $handler->display->display_options['defaults']['pager'] = FALSE; $handler->display->display_options['pager']['type'] = 'date_views_pager'; @@ -198,6 +227,7 @@ function ocio_calendar_views_default_views() { /* Display: Day */ $handler = $view->new_display('page', 'Day', 'page_3'); + $handler->display->display_options['enabled'] = FALSE; $handler->display->display_options['defaults']['hide_admin_links'] = FALSE; $handler->display->display_options['defaults']['pager'] = FALSE; $handler->display->display_options['pager']['type'] = 'date_views_pager'; @@ -236,6 +266,7 @@ function ocio_calendar_views_default_views() { /* Display: Year */ $handler = $view->new_display('page', 'Year', 'page'); + $handler->display->display_options['enabled'] = FALSE; $handler->display->display_options['defaults']['hide_admin_links'] = FALSE; $handler->display->display_options['defaults']['pager'] = FALSE; $handler->display->display_options['pager']['type'] = 'date_views_pager'; @@ -289,6 +320,7 @@ function ocio_calendar_views_default_views() { /* Display: Block */ $handler = $view->new_display('block', 'Block', 'block_1'); + $handler->display->display_options['enabled'] = FALSE; $handler->display->display_options['defaults']['use_ajax'] = FALSE; $handler->display->display_options['use_ajax'] = TRUE; $handler->display->display_options['defaults']['hide_admin_links'] = FALSE; @@ -434,33 +466,74 @@ function ocio_calendar_views_default_views() { $handler->display->display_options['pager']['options']['items_per_page'] = '10'; $handler->display->display_options['pager']['options']['offset'] = '0'; $handler->display->display_options['defaults']['style_plugin'] = FALSE; - $handler->display->display_options['style_plugin'] = 'list'; - $handler->display->display_options['style_options']['grouping'] = array( - 0 => array( - 'field' => 'field_date', - 'rendered' => 1, - 'rendered_strip' => 0, + $handler->display->display_options['style_plugin'] = 'table'; + $handler->display->display_options['style_options']['columns'] = array( + 'title' => 'title', + 'title_1' => 'title_1', + 'field_date' => 'field_date', + 'nid' => 'nid', + 'path' => 'path', + 'nothing' => 'nothing', + 'edit_node' => 'edit_node', + 'field_date_1' => 'field_date_1', + ); + $handler->display->display_options['style_options']['default'] = '-1'; + $handler->display->display_options['style_options']['info'] = array( + 'title' => array( + 'sortable' => 0, + 'default_sort_order' => 'asc', + 'align' => '', + 'separator' => '', + 'empty_column' => 0, + ), + 'title_1' => array( + 'sortable' => 0, + 'default_sort_order' => 'asc', + 'align' => '', + 'separator' => '', + 'empty_column' => 0, + ), + 'field_date' => array( + 'sortable' => 0, + 'default_sort_order' => 'asc', + 'align' => '', + 'separator' => '', + 'empty_column' => 0, + ), + 'nid' => array( + 'sortable' => 0, + 'default_sort_order' => 'asc', + 'align' => '', + 'separator' => '', + 'empty_column' => 0, + ), + 'path' => array( + 'align' => '', + 'separator' => '', + 'empty_column' => 0, + ), + 'nothing' => array( + 'align' => '', + 'separator' => '', + 'empty_column' => 0, + ), + 'edit_node' => array( + 'align' => '', + 'separator' => '', + 'empty_column' => 0, + ), + 'field_date_1' => array( + 'sortable' => 0, + 'default_sort_order' => 'asc', + 'align' => '', + 'separator' => '', + 'empty_column' => 0, ), ); $handler->display->display_options['defaults']['style_options'] = FALSE; $handler->display->display_options['defaults']['row_plugin'] = FALSE; - $handler->display->display_options['row_plugin'] = 'fields'; $handler->display->display_options['defaults']['row_options'] = FALSE; $handler->display->display_options['defaults']['fields'] = FALSE; - /* Field: Content: Title */ - $handler->display->display_options['fields']['title']['id'] = 'title'; - $handler->display->display_options['fields']['title']['table'] = 'node'; - $handler->display->display_options['fields']['title']['field'] = 'title'; - $handler->display->display_options['fields']['title']['label'] = 'First Title'; - $handler->display->display_options['fields']['title']['exclude'] = TRUE; - $handler->display->display_options['fields']['title']['alter']['max_length'] = '15'; - $handler->display->display_options['fields']['title']['link_to_node'] = FALSE; - /* Field: Content: Title */ - $handler->display->display_options['fields']['title_1']['id'] = 'title_1'; - $handler->display->display_options['fields']['title_1']['table'] = 'node'; - $handler->display->display_options['fields']['title_1']['field'] = 'title'; - $handler->display->display_options['fields']['title_1']['exclude'] = TRUE; - $handler->display->display_options['fields']['title_1']['link_to_node'] = FALSE; /* Field: Content: Date */ $handler->display->display_options['fields']['field_date']['id'] = 'field_date'; $handler->display->display_options['fields']['field_date']['table'] = 'field_data_field_date'; @@ -469,14 +542,49 @@ function ocio_calendar_views_default_views() { $handler->display->display_options['fields']['field_date']['exclude'] = TRUE; $handler->display->display_options['fields']['field_date']['element_label_colon'] = FALSE; $handler->display->display_options['fields']['field_date']['settings'] = array( - 'format_type' => 'ocio_calendar_list', - 'custom_date_format' => '', + 'format_type' => 'custom', + 'custom_date_format' => 'M', 'fromto' => 'value', 'multiple_number' => '', 'multiple_from' => '', 'multiple_to' => '', 'show_remaining_days' => 0, ); + /* Field: Content: Date */ + $handler->display->display_options['fields']['field_date_2']['id'] = 'field_date_2'; + $handler->display->display_options['fields']['field_date_2']['table'] = 'field_data_field_date'; + $handler->display->display_options['fields']['field_date_2']['field'] = 'field_date'; + $handler->display->display_options['fields']['field_date_2']['label'] = ''; + $handler->display->display_options['fields']['field_date_2']['alter']['alter_text'] = TRUE; + $handler->display->display_options['fields']['field_date_2']['alter']['text'] = '<div class="month">[field_date]</div> +<div class="day">[field_date_2]</div>'; + $handler->display->display_options['fields']['field_date_2']['element_label_colon'] = FALSE; + $handler->display->display_options['fields']['field_date_2']['settings'] = array( + 'format_type' => 'custom', + 'custom_date_format' => 'j', + 'fromto' => 'both', + 'multiple_number' => '', + 'multiple_from' => '', + 'multiple_to' => '', + 'show_remaining_days' => 0, + ); + /* Field: Content: Location Building */ + $handler->display->display_options['fields']['field_location_building']['id'] = 'field_location_building'; + $handler->display->display_options['fields']['field_location_building']['table'] = 'field_data_field_location_building'; + $handler->display->display_options['fields']['field_location_building']['field'] = 'field_location_building'; + $handler->display->display_options['fields']['field_location_building']['label'] = ''; + $handler->display->display_options['fields']['field_location_building']['exclude'] = TRUE; + $handler->display->display_options['fields']['field_location_building']['alter']['alter_text'] = TRUE; + $handler->display->display_options['fields']['field_location_building']['alter']['text'] = '@ [field_location_building]'; + $handler->display->display_options['fields']['field_location_building']['element_label_colon'] = FALSE; + /* Field: Content: Title */ + $handler->display->display_options['fields']['title_1']['id'] = 'title_1'; + $handler->display->display_options['fields']['title_1']['table'] = 'node'; + $handler->display->display_options['fields']['title_1']['field'] = 'title'; + $handler->display->display_options['fields']['title_1']['label'] = ''; + $handler->display->display_options['fields']['title_1']['alter']['alter_text'] = TRUE; + $handler->display->display_options['fields']['title_1']['alter']['text'] = '[title_1] [field_location_building]'; + $handler->display->display_options['fields']['title_1']['element_label_colon'] = FALSE; /* Field: Content: Nid */ $handler->display->display_options['fields']['nid']['id'] = 'nid'; $handler->display->display_options['fields']['nid']['table'] = 'node'; @@ -495,6 +603,7 @@ function ocio_calendar_views_default_views() { $handler->display->display_options['fields']['nothing']['table'] = 'views'; $handler->display->display_options['fields']['nothing']['field'] = 'nothing'; $handler->display->display_options['fields']['nothing']['label'] = ''; + $handler->display->display_options['fields']['nothing']['exclude'] = TRUE; $handler->display->display_options['fields']['nothing']['alter']['text'] = '<a href="[path]" class="event-popup" id = "event-popup" name="node-[nid]" title="[title_1]">[title]</a>'; $handler->display->display_options['fields']['nothing']['element_label_colon'] = FALSE; /* Field: Content: Edit link */ @@ -513,6 +622,7 @@ function ocio_calendar_views_default_views() { $handler->display->display_options['fields']['field_date_1']['table'] = 'field_data_field_date'; $handler->display->display_options['fields']['field_date_1']['field'] = 'field_date'; $handler->display->display_options['fields']['field_date_1']['label'] = ''; + $handler->display->display_options['fields']['field_date_1']['exclude'] = TRUE; $handler->display->display_options['fields']['field_date_1']['element_label_colon'] = FALSE; $handler->display->display_options['fields']['field_date_1']['settings'] = array( 'format_type' => 'panopoly_time', @@ -579,10 +689,15 @@ function ocio_calendar_views_default_views() { /* Display: Month Pane */ $handler = $view->new_display('panel_pane', 'Month Pane', 'month_pane'); + $handler->display->display_options['defaults']['use_more'] = FALSE; + $handler->display->display_options['defaults']['use_more_always'] = FALSE; + $handler->display->display_options['defaults']['use_more_always'] = FALSE; + $handler->display->display_options['use_more_always'] = FALSE; + $handler->display->display_options['defaults']['use_more_text'] = FALSE; $handler->display->display_options['defaults']['pager'] = FALSE; $handler->display->display_options['pager']['type'] = 'date_views_pager'; - $handler->display->display_options['pager']['options']['date_id'] = 'month-pane'; - $handler->display->display_options['pager']['options']['link_format'] = 'clean'; + $handler->display->display_options['pager']['options']['date_id'] = 'month'; + $handler->display->display_options['pager']['options']['skip_empty_pages'] = 0; $handler->display->display_options['defaults']['style_plugin'] = FALSE; $handler->display->display_options['style_plugin'] = 'calendar_style'; $handler->display->display_options['style_options']['name_size'] = '3'; @@ -597,9 +712,11 @@ function ocio_calendar_views_default_views() { $handler->display->display_options['row_options']['colors']['legend'] = 'type'; $handler->display->display_options['row_options']['colors']['calendar_colors_type'] = array( 'basic_page' => '#ffffff', + 'book_page' => '#ffffff', 'calendar_entry' => '#ffffff', 'faq' => '#ffffff', 'featured_slide' => '#ffffff', + 'ocio_landing_page' => '#ffffff', 'article' => '#ffffff', 'web_form' => '#ffffff', ); @@ -614,43 +731,7 @@ function ocio_calendar_views_default_views() { $handler->display->display_options['arguments']['field_date_value']['summary']['number_of_records'] = '0'; $handler->display->display_options['arguments']['field_date_value']['summary']['format'] = 'default_summary'; $handler->display->display_options['arguments']['field_date_value']['summary_options']['items_per_page'] = '25'; - $handler->display->display_options['defaults']['filter_groups'] = FALSE; - $handler->display->display_options['defaults']['filters'] = FALSE; - /* Filter criterion: Content: Published */ - $handler->display->display_options['filters']['status']['id'] = 'status'; - $handler->display->display_options['filters']['status']['table'] = 'node'; - $handler->display->display_options['filters']['status']['field'] = 'status'; - $handler->display->display_options['filters']['status']['value'] = 1; - $handler->display->display_options['filters']['status']['group'] = 0; - $handler->display->display_options['filters']['status']['expose']['operator'] = FALSE; - /* Filter criterion: Content: Type */ - $handler->display->display_options['filters']['type']['id'] = 'type'; - $handler->display->display_options['filters']['type']['table'] = 'node'; - $handler->display->display_options['filters']['type']['field'] = 'type'; - $handler->display->display_options['filters']['type']['value'] = array( - 'calendar_entry' => 'calendar_entry', - ); - /* Filter criterion: Content: Tags (field_tags) */ - $handler->display->display_options['filters']['field_tags_tid']['id'] = 'field_tags_tid'; - $handler->display->display_options['filters']['field_tags_tid']['table'] = 'field_data_field_tags'; - $handler->display->display_options['filters']['field_tags_tid']['field'] = 'field_tags_tid'; - $handler->display->display_options['filters']['field_tags_tid']['exposed'] = TRUE; - $handler->display->display_options['filters']['field_tags_tid']['expose']['operator_id'] = 'field_tags_tid_op'; - $handler->display->display_options['filters']['field_tags_tid']['expose']['label'] = 'Tags'; - $handler->display->display_options['filters']['field_tags_tid']['expose']['operator'] = 'field_tags_tid_op'; - $handler->display->display_options['filters']['field_tags_tid']['expose']['identifier'] = 'tag'; - $handler->display->display_options['filters']['field_tags_tid']['expose']['remember_roles'] = array( - 2 => '2', - 1 => 0, - 6 => 0, - 5 => 0, - 4 => 0, - 7 => 0, - 8 => 0, - 3 => 0, - ); - $handler->display->display_options['filters']['field_tags_tid']['type'] = 'select'; - $handler->display->display_options['filters']['field_tags_tid']['vocabulary'] = 'ocio_tags'; + $handler->display->display_options['arguments']['field_date_value']['granularity_reset'] = 1; $handler->display->display_options['allow']['use_pager'] = 0; $handler->display->display_options['allow']['items_per_page'] = 0; $handler->display->display_options['allow']['offset'] = 0; @@ -661,6 +742,7 @@ function ocio_calendar_views_default_views() { $handler->display->display_options['allow']['exposed_form'] = 'exposed_form'; $handler->display->display_options['allow']['fields_override'] = 0; $handler->display->display_options['allow']['panopoly_magic_display_type'] = 0; + $handler->display->display_options['link_to_view'] = '0'; $export['calendar'] = $view; return $export; diff --git a/profiles/wcm_base/modules/custom/ocio_main_menu/ocio_main_menu.make b/profiles/wcm_base/modules/custom/ocio_main_menu/ocio_main_menu.make index 461dcaa9..7297fcc1 100644 --- a/profiles/wcm_base/modules/custom/ocio_main_menu/ocio_main_menu.make +++ b/profiles/wcm_base/modules/custom/ocio_main_menu/ocio_main_menu.make @@ -9,8 +9,9 @@ core = 7.x projects[responsive_menus][version] = 1.x-dev projects[responsive_menus][subdir] = contrib -projects[superfish][version] = 1.9 +projects[superfish][version] = 2.0 projects[superfish][subdir] = contrib +projects[superfish][patch][2674280] = http://drupal.org/files/issues/superfish-add_aria_attributes-2674280-6.patch projects[custom_breadcrumbs][version] = 2.0-beta1 projects[custom_breadcrumbs][subdir] = contrib @@ -25,5 +26,6 @@ projects[menu_depth_limit][subdir] = contrib libraries[superfish][directory_name] = superfish libraries[superfish][download][type] = "get" -libraries[superfish][download][url] = https://github.com/mehrpadin/Superfish-for-Drupal/archive/master.zip +libraries[superfish][download][url] = http://github.com/mehrpadin/Superfish-for-Drupal/archive/1.x.zip +libraries[superfish][patch][cb6bb12] = http://github.com/zipymonkey/Superfish-for-Drupal/commit/cb6bb121e596dd948f66400bdf8cf25dd6b0b01c.patch libraries[superfish][destination] = libraries diff --git a/profiles/wcm_base/modules/custom/wcm_front_page/wcm_front_page.strongarm.inc b/profiles/wcm_base/modules/custom/wcm_front_page/wcm_front_page.strongarm.inc index 56bbb545..b7acae7c 100644 --- a/profiles/wcm_base/modules/custom/wcm_front_page/wcm_front_page.strongarm.inc +++ b/profiles/wcm_base/modules/custom/wcm_front_page/wcm_front_page.strongarm.inc @@ -14,7 +14,7 @@ function wcm_front_page_strongarm() { $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ $strongarm->api_version = 1; $strongarm->name = 'site_frontpage'; - $strongarm->value = 'home'; + $strongarm->value = 'node/1'; $export['site_frontpage'] = $strongarm; return $export; diff --git a/profiles/wcm_base/modules/custom/wcm_panels_settings/wcm_panels_settings.features.features_overrides.inc b/profiles/wcm_base/modules/custom/wcm_panels_settings/wcm_panels_settings.features.features_overrides.inc index 80dd524f..8cc0748b 100644 --- a/profiles/wcm_base/modules/custom/wcm_panels_settings/wcm_panels_settings.features.features_overrides.inc +++ b/profiles/wcm_base/modules/custom/wcm_panels_settings/wcm_panels_settings.features.features_overrides.inc @@ -14,8 +14,9 @@ function wcm_panels_settings_features_override_default_overrides() { // Exported overrides for: field_instance $overrides["field_instance.fieldable_panels_pane-image-field_basic_image_image.display|default|settings|image_style"] = 'image_style_full'; $overrides["field_instance.fieldable_panels_pane-image-field_basic_image_image.ds_extras_field_template"] = ''; - $overrides["field_instance.fieldable_panels_pane-image-field_basic_image_image.widget|settings|allowed_schemes|private"]["DELETED"] = TRUE; - $overrides["field_instance.fieldable_panels_pane-image-field_basic_image_image.widget|settings|browser_plugins|media_default--media_browser_my_files"] = 'media_default--media_browser_my_files'; + $overrides["field_instance.fieldable_panels_pane-image-field_basic_image_image.settings|file_directory"] = ''; + $overrides["field_instance.fieldable_panels_pane-image-field_basic_image_image.settings|file_extensions"] = 'png gif jpg jpeg svg'; + $overrides["field_instance.fieldable_panels_pane-image-field_basic_image_image.widget|settings|browser_plugins|youtube"]["DELETED"] = TRUE; $overrides["field_instance.fieldable_panels_pane-image-field_basic_image_image.widget|settings|manualcrop_styles_list|panopoly_image_full"]["DELETED"] = TRUE; // Exported overrides for: page_manager_handlers diff --git a/profiles/wcm_base/modules/custom/wcm_panels_settings/wcm_panels_settings.features.inc b/profiles/wcm_base/modules/custom/wcm_panels_settings/wcm_panels_settings.features.inc index 54c7e873..388fbf3c 100644 --- a/profiles/wcm_base/modules/custom/wcm_panels_settings/wcm_panels_settings.features.inc +++ b/profiles/wcm_base/modules/custom/wcm_panels_settings/wcm_panels_settings.features.inc @@ -20,8 +20,9 @@ function wcm_panels_settings_field_default_field_instances_alter(&$data) { if (isset($data['fieldable_panels_pane-image-field_basic_image_image'])) { $data['fieldable_panels_pane-image-field_basic_image_image']['display']['default']['settings']['image_style'] = 'image_style_full'; /* WAS: 'panopoly_image_full' */ $data['fieldable_panels_pane-image-field_basic_image_image']['ds_extras_field_template'] = ''; /* WAS: '' */ - $data['fieldable_panels_pane-image-field_basic_image_image']['widget']['settings']['browser_plugins']['media_default--media_browser_my_files'] = 'media_default--media_browser_my_files'; /* WAS: 0 */ - unset($data['fieldable_panels_pane-image-field_basic_image_image']['widget']['settings']['allowed_schemes']['private']); + $data['fieldable_panels_pane-image-field_basic_image_image']['settings']['file_directory'] = ''; /* WAS: 'general' */ + $data['fieldable_panels_pane-image-field_basic_image_image']['settings']['file_extensions'] = 'png gif jpg jpeg svg'; /* WAS: 'png gif jpg jpeg' */ + unset($data['fieldable_panels_pane-image-field_basic_image_image']['widget']['settings']['browser_plugins']['youtube']); unset($data['fieldable_panels_pane-image-field_basic_image_image']['widget']['settings']['manualcrop_styles_list']['panopoly_image_full']); } } diff --git a/profiles/wcm_base/modules/custom/wcm_panels_settings/wcm_panels_settings.info b/profiles/wcm_base/modules/custom/wcm_panels_settings/wcm_panels_settings.info index b19a1f5d..f22d694a 100644 --- a/profiles/wcm_base/modules/custom/wcm_panels_settings/wcm_panels_settings.info +++ b/profiles/wcm_base/modules/custom/wcm_panels_settings/wcm_panels_settings.info @@ -21,6 +21,8 @@ features[features_override_items][] = field_instance.fieldable_panels_pane-image features[features_override_items][] = page_manager_handlers.node_edit_panel_context features[features_overrides][] = field_instance.fieldable_panels_pane-image-field_basic_image_image.display|default|settings|image_style features[features_overrides][] = field_instance.fieldable_panels_pane-image-field_basic_image_image.ds_extras_field_template +features[features_overrides][] = field_instance.fieldable_panels_pane-image-field_basic_image_image.settings|file_directory +features[features_overrides][] = field_instance.fieldable_panels_pane-image-field_basic_image_image.settings|file_extensions features[features_overrides][] = field_instance.fieldable_panels_pane-image-field_basic_image_image.widget|settings|allowed_schemes|private features[features_overrides][] = field_instance.fieldable_panels_pane-image-field_basic_image_image.widget|settings|browser_plugins|media_default--media_browser_my_files features[features_overrides][] = field_instance.fieldable_panels_pane-image-field_basic_image_image.widget|settings|manualcrop_styles_list|panopoly_image_full diff --git a/profiles/wcm_base/modules/custom/wcm_search/wcm_search.module b/profiles/wcm_base/modules/custom/wcm_search/wcm_search.module index 21ff76b0..a5e5bcb0 100644 --- a/profiles/wcm_base/modules/custom/wcm_search/wcm_search.module +++ b/profiles/wcm_base/modules/custom/wcm_search/wcm_search.module @@ -64,7 +64,8 @@ function wcm_search_preprocess_block(&$vars) { function wcm_search_form_search_block_form_alter(&$form, &$form_state) { $form['#prefix'] = '<div id="wcm-search">'; $form['search_block_form']['#attributes']['placeholder'] = t('Search'); - $form['actions']['submit']['#value'] = t('Go'); + $form['actions']['submit']['#prefix'] = '<button type="submit" class="form-submit" aria-label="Submit Search">Go'; + $form['actions']['submit']['#suffix'] = '</button>'; $form['#suffix'] = '</div>'; } @@ -76,8 +77,8 @@ function wcm_search_form_alter(&$form, &$form_state, $form_id) { $form['#submit'][] = 'wcm_search_form_submit'; $args = explode('/', current_path()); - if ($args[0] == 'search') { - if ($args[1] == 'files') { + if ($args[0] == 'search' && isset($args[1])) { + if ($args[1] == 'files' && isset($args[2])) { $query = $args[2]; } else { @@ -101,7 +102,8 @@ function wcm_search_form_submit($form, &$form_state) { $args = explode('/', current_path()); - if ($args[1] == 'files') { + $path = ''; + if (isset($args[1]) && $args[1] == 'files') { $path .= 'files/'; } diff --git a/profiles/wcm_base/themes/wcm_omega/css/mail.css b/profiles/wcm_base/themes/wcm_omega/css/mail.css new file mode 100644 index 00000000..2e70af32 --- /dev/null +++ b/profiles/wcm_base/themes/wcm_omega/css/mail.css @@ -0,0 +1,6 @@ +body, +html { + font-family: proximanova, Helvetica, Arial, sans-serif; + font-weight: 300; + font-size: 12px; +} diff --git a/profiles/wcm_base/themes/wcm_omega/css/wcm-omega.styles.css b/profiles/wcm_base/themes/wcm_omega/css/wcm-omega.styles.css index 5d9441c1..ae574e59 100644 --- a/profiles/wcm_base/themes/wcm_omega/css/wcm-omega.styles.css +++ b/profiles/wcm_base/themes/wcm_omega/css/wcm-omega.styles.css @@ -1 +1 @@ -@charset "UTF-8";#block-menu-menu-global-menu h2.block__title,.visuallyhidden{position:absolute;overflow:hidden;clip:rect(0 0 0 0);height:1px;width:1px;margin:-1px;padding:0;border:0}.ui-accordion .ui-accordion-header .ui-accordion-header-icon.ui-icon,.view .ui-accordion.view-content .view-grouping-header{background-image:none;text-indent:0}.ui-accordion .ui-accordion-header .ui-accordion-header-icon.ui-icon:before,.view .ui-accordion.view-content .view-grouping-header:before{background:0 0;content:"\f0da";color:#666;font-family:FontAwesome;font-size:12px;font-weight:400;text-align:center;top:0;right:auto;bottom:0;height:12px;line-height:13px;margin:auto;position:absolute}.align-left,table caption{text-align:left}.ui-accordion .ui-accordion-header .ui-accordion-header-icon.ui-icon.ui-icon:before,.view .ui-accordion.view-content .view-grouping-header.ui-icon:before{left:.6em}.ui-accordion .ui-accordion-header-active .ui-accordion-header-icon.ui-icon:before,.view .ui-accordion.view-content .view-grouping-header.nested-accordion:before{content:"\f0d7";margin-left:-1px}.ui-accordion .ui-accordion-header{background:#ebebeb!important}.ui-accordion .ui-accordion-header-active,.ui-accordion .ui-accordion-header:hover{background:#d2d2d2!important}.ui-accordion .ui-accordion-header p{margin:0}.ui-accordion .ui-accordion-content{background:#fff;border:1px solid #d2d2d2}.ui-accordion .ui-accordion-content h2:first-child,.ui-accordion .ui-accordion-content h3:first-child{margin-top:10px}.ui-accordion .ui-accordion-content ol{padding-left:.6em}.l-main.lt-gray .ui-accordion .ui-accordion-header{background:#e1e1e1!important}.l-main.lt-gray .ui-accordion .ui-accordion-header:hover{background:#d7d7d7!important}.l-main.lt-gray .ui-accordion .ui-accordion-header-active{background:#e1e1e1!important}.l-main.lt-gray .ui-accordion .ui-accordion-content{background:#fff;border:1px solid #e1e1e1}.ui-accordion-header{overflow:auto}body .panels-row.odd .ui-accordion .ui-accordion-header{background:#d7d7d7}body .panels-row.odd .ui-accordion .ui-accordion-content{border-color:#d7d7d7}.ctools-collapsible-container .ctools-toggle{background-image:url(../images/jquery-images/ui-icons_222222_256x240.png);background-position:-64px -15px}.ctools-collapsible-container .ctools-toggle-collapsed{background-position:-32px -15px;background-image:url(../images/jquery-images/ui-icons_222222_256x240.png)}.ctools-collapsible-container .ctools-toggle-collapsed:hover,.nested-accordion:before,.view-grouping-header:before{background-image:url(../images/jquery-images/ui-icons_222222_256x240.png)}ul.breadcrumb{padding:20px 0;margin:0}ul.breadcrumb li{display:inline-block;margin-right:.45em;font-weight:600}ul.breadcrumb li:after{content:"|";color:#b00;font-weight:700;margin-left:.45em}ul.breadcrumb li a{color:#666;text-decoration:none}ul.breadcrumb li a:visited{color:#666}ul.breadcrumb li a:focus{color:#dcaa38}ul.breadcrumb li a:hover{color:#666;text-decoration:underline}ul.breadcrumb li a:active{color:#028da9}ul.breadcrumb li:last-child{margin-right:0}ul.breadcrumb li:last-child:after{content:" "}#edit-preview,#edit-submit,#edit-submit--2,#edit-submit--3,.button-primary,.form-submit,.red-button,.webform-previous,.webform-submit,body.page-user-login .login-box.osu a,html body .button,input[type=button]{font-size:14px;padding:.7em 1.3em .4em;display:inline-block;cursor:pointer;background-color:#b00;border:0;color:#fff;text-transform:uppercase;font-family:proximanova,Helvetica,Arial,sans-serif;letter-spacing:.05em;border-radius:2px;box-shadow:0 3px 0 0 #920000;font-weight:400;margin-right:1.5em}#edit-preview:hover,#edit-submit--2:hover,#edit-submit--3:hover,#edit-submit:hover,.button-primary:hover,.form-submit:hover,.red-button:hover,.webform-previous:hover,.webform-submit:hover,body.page-user-login .login-box.osu a:hover,html body .button:hover,input[type=button]:hover{text-decoration:none;background-color:#a20000}#edit-preview:active,#edit-submit--2:active,#edit-submit--3:active,#edit-submit:active,.button-primary:active,.form-submit:active,.red-button:active,.webform-previous:active,.webform-submit:active,body.page-user-login .login-box.osu a:active,html body .button:active,input[type=button]:active{background-color:#920000}.disabled#edit-preview,.disabled#edit-submit,.disabled#edit-submit--2,.disabled#edit-submit--3,.disabled.button-primary,.disabled.form-submit,.disabled.webform-previous,.disabled.webform-submit,.red-button.disabled,.red-button[disabled],[disabled]#edit-preview,[disabled]#edit-submit,[disabled]#edit-submit--2,[disabled]#edit-submit--3,[disabled].button-primary,[disabled].form-submit,[disabled].webform-previous,[disabled].webform-submit,body.page-user-login .login-box.osu a.disabled,body.page-user-login .login-box.osu a[disabled],html body .disabled.button,html body [disabled].button,input.disabled[type=button],input[disabled][type=button]{opacity:.6;background:false;cursor:default;box-shadow:none}#edit-preview.ext .ext,#edit-submit--2.ext .ext,#edit-submit--3.ext .ext,#edit-submit.ext .ext,.button-primary.ext .ext,.form-submit.ext .ext,.webform-previous.ext .ext,.webform-submit.ext .ext,html body .button.ext .ext,input[type=button].ext .ext{background-image:none;padding:0;width:0}a.button{margin-top:20px}#colorbox #cboxWrapper{border-radius:0;font-size:1.1em}#colorbox #cboxWrapper #cboxClose,#colorbox #cboxWrapper #cboxNext,#colorbox #cboxWrapper #cboxPrevious{background-image:none;text-indent:0;color:transparent;overflow:hidden}#colorbox #cboxWrapper #cboxClose:before,#colorbox #cboxWrapper #cboxNext:before,#colorbox #cboxWrapper #cboxPrevious:before{font-family:FontAwesome;bottom:-3px;position:absolute;color:#000}#colorbox #cboxWrapper #cboxClose:before{content:"\f00d";right:0;font-size:1.2em}#colorbox #cboxWrapper #cboxPrevious:before{content:"\f053"}#colorbox #cboxWrapper #cboxNext:before{content:"\f054"}#colorbox #cboxWrapper #cboxCurrent{bottom:-3px}span.ext{margin-left:2px;margin-right:2px}a[href]:empty{display:none}img.file-icon{height:26px;width:auto;padding-bottom:7px;margin:0 3px 0 6px}.views-exposed-form,.webform-component .description{margin-bottom:30px}input{max-width:100%}input:focus{outline:#999 solid 1px}textarea{resize:none}.webform-component label{text-transform:uppercase;font-weight:600;font-size:14px}.webform-component table .form-text{width:100%}.views-exposed-form label{font-weight:400;font-size:14px;text-transform:uppercase}.views-exposed-form .form-text{height:32px}.views-exposed-form li.search-field{height:29px}.webform-component-fieldset .webform-component label{text-transform:uppercase;font-weight:400;font-size:13px}.webform-component-fieldset,.webform-component-file,.webform-component-grid{margin-bottom:40px}.webform-component-file #edit-submitted-file-upload{max-width:240px}@media (max-width:47.4em){.l-main input:not([type=checkbox]):not([type=radio]),.l-main select,.l-main textarea{width:100%}}form .chosen-container .chosen-choices,form .form-text{padding:4px 6px 2px;border:1px solid #bbb;background-image:none;box-shadow:none;font-size:.9em}form .chosen-container{font-size:1em}form .chosen-container .result-selected{display:none!important}form .chosen-container .chosen-results{font-size:.9em}form .chosen-container .search-field input{width:.5px!important;height:.1px!important}form .chosen-container .chosen-results li{padding:7px 6px 4px;line-height:1em}form .chosen-container .chosen-results li.highlighted{background-image:none}form .chosen-container.chosen-container-active.chosen-with-drop .chosen-single,form .chosen-container.chosen-container-multi .chosen-choices li.search-choice,form .chosen-container.chosen-container-single .chosen-single{border-radius:0;background:#eee;box-shadow:none}form .chosen-container.chosen-container .search-field:after,form .chosen-container.chosen-container-active.chosen-with-drop .chosen-choices li.search-choice+.search-field:after{content:"- Select -";color:#666;cursor:default}form .chosen-container.chosen-container-active .search-field,form .chosen-container.chosen-container-multi .chosen-choices li.search-choice+.search-field{float:none}form .chosen-container.chosen-container-single .chosen-results{margin:0;padding:0}form .chosen-container.chosen-container-single .chosen-drop{border-radius:0}form .chosen-container.chosen-container-single .chosen-single{padding:0 0 0 6px;height:27px}form .chosen-container.chosen-container-single .chosen-single div b{background-size:52px 40px!important}form .chosen-container.chosen-container-multi .chosen-choices{padding:1px 3px 0;cursor:default}form .chosen-container.chosen-container-multi .chosen-choices li.search-choice{display:inline-block;float:none;line-height:1em;margin:2px 4px 2px 0;padding:4px 20px 2px 4px}form .chosen-container.chosen-container-multi .chosen-choices li.search-choice .search-choice-close{top:4px}form .chosen-container.chosen-container-multi .chosen-choices li.search-choice+.search-field:after{content:"+ Add";cursor:pointer}.l-constrained:after,.l-main:after,.l-region--sidebar-1:after,.l-region--sidebar-2:after{content:"";display:table;clear:both}form .chosen-container.chosen-container-multi .chosen-choices li.search-field input[type=text]{margin:1px 0 0 2px;cursor:default}.type-group1 h1,.type-group1 h2,.type-group1 h3,.type-group1 h4,.type-group1 h5,.type-group1 h6,.type-group1-sample h1,.type-group1-sample h2,.type-group1-sample h3,.type-group1-sample h4,.type-group1-sample h5,.type-group1-sample h6{font-family:proximanova,Helvetica,Arial,sans-serif;font-weight:400}.type-group1 h2.block__title,.type-group1 h2.pane-title,.type-group1-sample h2.block__title,.type-group1-sample h2.pane-title{margin-bottom:.6em;text-transform:uppercase;color:#2d2d2d;font-weight:400;line-height:120%}.type-group2 h1,.type-group2 h2,.type-group2 h3,.type-group2 h4,.type-group2 h5,.type-group2 h6,.type-group2-sample h1,.type-group2-sample h2,.type-group2-sample h3,.type-group2-sample h4,.type-group2-sample h5,.type-group2-sample h6{font-family:proximanova,Helvetica,Arial,sans-serif;font-weight:300}.type-group2 h1,.type-group2-sample h1{font-weight:600}.type-group2 h2,.type-group2 h3,.type-group2-sample h2,.type-group2-sample h3{font-family:capita,Georgia,serif;font-weight:100}.type-group2 h3,.type-group2-sample h3{font-style:italic}.type-group2 h4,.type-group2-sample h4{font-weight:400}.type-group2 h2.block__title,.type-group2 h2.pane-title,.type-group2-sample h2.block__title,.type-group2-sample h2.pane-title{font-weight:400;font-family:proximanova,Helvetica,Arial,sans-serif}.type-group3 h1,.type-group3 h2,.type-group3 h3,.type-group3 h4,.type-group3 h5,.type-group3 h6,.type-group3-sample h1,.type-group3-sample h2,.type-group3-sample h3,.type-group3-sample h4,.type-group3-sample h5,.type-group3-sample h6{font-family:capita,Georgia,serif;font-weight:400}.type-group3 h2,.type-group3-sample h2{font-weight:100;font-style:italic}.type-group3 h3,.type-group3 h4,.type-group3-sample h3,.type-group3-sample h4{font-family:proximanova,Helvetica,Arial,sans-serif;font-weight:400}.type-group3 h2.block__title,.type-group3 h2.pane-title,.type-group3-sample h2.block__title,.type-group3-sample h2.pane-title{font-weight:400;font-style:normal}.type-group4 h1,.type-group4 h2,.type-group4 h3,.type-group4 h4,.type-group4 h5,.type-group4 h6,.type-group4-sample h1,.type-group4-sample h2,.type-group4-sample h3,.type-group4-sample h4,.type-group4-sample h5,.type-group4-sample h6{font-family:proximanova,Helvetica,Arial,sans-serif;font-weight:400}.type-group4 h1,.type-group4-sample h1{color:#b00}.type-group4 h2.block__title,.type-group4 h2.pane-title,.type-group4-sample h2.block__title,.type-group4-sample h2.pane-title{margin-bottom:.6em;color:#2d2d2d;font-weight:400;line-height:120%}.l-page img{width:inherit}.image-border,.panopoly-image-featured,.panopoly-image-full,.panopoly-image-half,.panopoly-image-original,.panopoly-image-quarter,.panopoly-image-square,.panopoly-image-thumbnail{border:1px solid #666}.node__content .panopoly-image-featured,.node__content .panopoly-image-full,.node__content .panopoly-image-half,.node__content .panopoly-image-original,.node__content .panopoly-image-quarter,.node__content .panopoly-image-square,.node__content .panopoly-image-thumbnail{float:right;margin:0 0 20px 1.5em}.ui-widget table,.ui-widget td,.ui-widget th,.ui-widget tr{border:0}.ui-widget{font-family:proximanova,Helvetica,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget button,.ui-widget input,.ui-widget select,.ui-widget textarea{font-family:proximanova,Helvetica,Arial,sans-serif;font-size:1em}.ui-widget-content{border:0;background:#ebebeb;color:#2d2d2d}.ui-widget-content a{color:#2d2d2d}.ui-widget-header{border:0;background:#666;color:#fff;font-weight:700}.ui-widget-header a{color:#fff}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:0;background:#fff;font-weight:400;color:#2d2d2d}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#2d2d2d;text-decoration:none}.ui-state-focus,.ui-state-hover,.ui-widget-content .ui-state-focus,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-focus,.ui-widget-header .ui-state-hover{border:0;background:#d2d2d2;font-weight:400;color:#2d2d2d}.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited,.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited{color:#fff;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:0;background:url(../images/jquery-images/ui-bg_flat_65_ffffff_40x100.png) 50% 50% repeat-x #fff;font-weight:400;color:#2d2d2d}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#2d2d2d;text-decoration:none}.ui-corner-all,.ui-corner-left,.ui-corner-tl,.ui-corner-top{border-top-left-radius:0}.ui-corner-all,.ui-corner-right,.ui-corner-top,.ui-corner-tr{border-top-right-radius:0}.ui-corner-all,.ui-corner-bl,.ui-corner-bottom,.ui-corner-left{border-bottom-left-radius:0}.ui-corner-all,.ui-corner-bottom,.ui-corner-br,.ui-corner-right{border-bottom-right-radius:0}#modalBackdrop,.cke_dialog_background_cover,.ui-widget-overlay{background-image:none!important;background-color:#000!important;opacity:.5!important}.ui-dialog .ui-dialog-titlebar{height:auto;line-height:unset;font-weight:700;font-size:13px;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.75);border-bottom:1px solid #999;padding:6px 10px;border-radius:2px 2px 0 0;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:linear-gradient(top,#f5f5f5,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr='#fff5f5f5', endColorstr='#ffcfd1cf')}.messages,.pager>li{background-image:none}#modalBackdrop{z-index:920!important}#modalContent{z-index:930!important}.ui-front{z-index:940!important}.ui-widget-overlay{z-index:950!important}.ui-dialog{z-index:960!important;position:fixed;top:50%!important;left:50%!important;transform:translate(-50%,-50%)}.ui-dialog-titlebar-close{text-indent:-9999em}.l-constrained{margin:0 auto;padding:0 6%}@media (min-width:47.5em){.l-constrained{padding:0 8%}}@media (min-width:82em){.max-width{max-width:70em;margin:0 auto;padding:0}}ol ol,ol ol ol,ul ul,ul ul ul{margin-top:8px}ul.menu{padding:0}ol,ul{padding-left:3em}ul{list-style-type:square;list-style-position:outside}ul ul,ul ul ul{margin-left:20px}ol{list-style-type:decimal}ol ol{list-style-type:lower-alpha}ol ol ol{list-style-type:lower-roman}#block-menu-menu-global-menu ul.menu .leaf,.no-list-style,ul.breadcrumb,ul.menu{list-style:none}.field--name-field-basic-text-text li,.field--name-field-ocio-body li,.ui-accordion-content li{margin-bottom:.6em}.ui-accordion-content ul{padding-left:.6em}.caret-list-type ul,.dot-list-type ul,.page-newsletter-archive .l-region--content ul,.pane-bundle-quick-links ul,.pane-wcm-mailchimp-pane ul{padding-left:0;list-style-image:none;list-style-type:none}.caret-list-type li,.page-newsletter-archive .l-region--content li,.pane-bundle-quick-links li,.pane-wcm-mailchimp-pane li{margin-bottom:10px}.caret-list-type li:before,.page-newsletter-archive .l-region--content li:before,.pane-bundle-quick-links li:before,.pane-wcm-mailchimp-pane li:before{content:"\f0da";font-family:FontAwesome;color:gray;margin-right:10px;margin-left:4px;font-size:85%}.dot-list-type li{margin-bottom:40px}.dot-list-type li:before{content:"\f111";font-family:FontAwesome;color:gray;margin-right:10px;font-size:40%}.media-element{display:block}.media-element img{display:block;width:100%;margin:0}.media-element.file-default,.media-element.file-image-full,.media-element.file-image-large,.media-element.file-image-medium,.media-element.file-image-small{margin:0 0 1em}.media-element.file-image-left{float:left;clear:left;margin:.5em 2em 1em 0;max-width:30%}.media-element.file-image-right{float:right;clear:right;margin:.5em 0 1em 2em;max-width:30%}.media-element.file-image-center{float:none;margin:0 auto;max-width:50%}.media-element.file-image-max{margin:0 0 1em;width:100%}.media-element.file-image-max .content{width:100%}.media-element.file-video-full,.media-element.file-video-large,.media-element.file-video-medium,.media-element.file-video-small{margin:0 0 1em}.media-element.file-video-left{float:left;clear:left;margin:.5em 2em 1em 0;width:50%}.media-element.file-video-right{float:right;clear:right;margin:.5em 0 1em 2em;width:50%}.media-element.file-video-center{float:none;margin:0 auto;width:75%}.media-element.file-video-max{margin:0 0 1em;width:100%}.media-element.file-video-max .content{width:100%}.media.media-element-container{display:block;display:table;table-layout:fixed;max-width:100%;margin-top:0}.media.media-element-container img{display:block;width:100%;margin:0}.media.media-element-container.media-default,.media.media-element-container.media-image_full,.media.media-element-container.media-image_large,.media.media-element-container.media-image_medium,.media.media-element-container.media-image_small{margin:0 0 1em}.media.media-element-container.media-image_left{float:left;clear:left;margin:.5em 2em 1em 0;max-width:30%}.media.media-element-container.media-image_right{float:right;clear:right;margin:.5em 0 1em 2em;max-width:30%}.media.media-element-container.media-image_center{float:none;margin:0 auto;max-width:50%}.media.media-element-container.media-image_max{margin:0 0 1em;width:100%}.media.media-element-container.media-image_max .content{width:100%}.media.media-element-container.media-video_full,.media.media-element-container.media-video_large,.media.media-element-container.media-video_medium,.media.media-element-container.media-video_small{margin:0 0 1em}.media.media-element-container.media-video_left{float:left;clear:left;margin:.5em 2em 1em 0;width:50%}.media.media-element-container.media-video_right{float:right;clear:right;margin:.5em 0 1em 2em;width:50%}.media.media-element-container.media-video_center{float:none;margin:0 auto;width:75%}.media.media-element-container.media-video_max .content,.pane-bundle-table table,table{width:100%}.media.media-element-container.media-video_max{margin:0 0 1em;width:100%}.media.media-element-container .media-element{max-width:100%;float:none;margin-bottom:0}.media.media-element-container .field--name-field-basic-image-caption,.media.media-element-container .field-name-field-basic-image-caption{display:table-caption;caption-side:bottom;font-family:capita,Georgia,serif;font-size:.9em;font-weight:300;font-style:italic;line-height:1.3em;color:#606060}.error,.error .error,.messages--error,.messages--status,.messages--warning,.ok,.warning{color:#2d2d2d}.align-center .media-element.file-default{margin-left:auto;margin-right:auto}.align-right .media-element.file-default{margin-left:auto}img,media{max-width:100%}@media (max-width:47.4em){.field .media-element.media-vimeo-video,.field .media-element.media-youtube-video{width:100%;margin:0;float:none;display:block}.field img.media-element{margin:1em auto;float:none;display:block;max-width:100%}}.messages{margin:1.8em 0;padding:1.2em 1.6em;border:0;background-color:#d9d9d9}.messages ul{margin:0 0 0 1em;padding:0}.messages li{list-style-image:none}.messages--status,tr.ok{border-left:8px solid #d4df48}.messages--warning,tr.warning{border-left:8px solid #dcaa38}.messages--error,tr.error{border-left:8px solid #b00}.pager>li{display:inline;padding:.5em;list-style-type:none}table{margin-bottom:20px;line-height:140%}.ui-accordion-content table a,.ui-tabs-content table a,table .ui-accordion-content a,table .ui-tabs-content a,table a,table li,table p{font-size:15px;font-size:1.5rem;line-height:120%!important}table th{background:#dedede;font-weight:600;border:1px solid #c7c7c7!important;text-transform:uppercase}.ui-accordion-content table td,table tbody,table td,table th{border:1px solid #c7c7c7}.ui-accordion-content table th a,.ui-tabs-content table th a,table th .ui-accordion-content a,table th .ui-tabs-content a,table th a{text-decoration:none}table tbody tr{border-bottom:1px solid #c7c7c7}table tbody tr.odd,table tbody tr:nth-child(odd){background:#f0f0f0}table tbody tr.even,table tbody tr:nth-child(even){background:#fff}table thead+tbody tr.odd,table thead+tbody tr:nth-child(odd){background:#f0f0f0}.panels-row.odd table tbody tr.odd,.panels-row.odd table tbody tr:nth-child(odd),table thead+tbody tr.even,table thead+tbody tr:nth-child(even){background:#fff}table td,table th{padding:.6em 1em}table caption{color:#666;margin-bottom:5px}.panels-row.odd table tbody tr.even,.panels-row.odd table tbody tr:nth-child(even),.panels-row.odd table thead+tbody tr.odd,.panels-row.odd table thead+tbody tr:nth-child(odd){background:#f3f3f3}.pane-bundle-table table tr.odd,.panels-row.odd table thead+tbody tr.even,.panels-row.odd table thead+tbody tr:nth-child(even){background:#fff}table ul{padding-left:3px;list-style-position:inside}.intro-text-alt.align-center,.intro-text.align-center{width:90%;margin-left:auto;margin-right:auto}.pane-bundle-table table tr.even{background:#f3f3f3}.tabs--primary{padding-top:2em}.tabs--primary li{font-weight:400;background:#ebebeb}.tabs--primary li a{text-decoration:none;color:#b00}.tabs--primary li a:visited{color:#b00}.tabs--primary li a:focus{color:#dcaa38}.tabs--primary li a:hover{color:#2d2d2d;background:#d2d2d2}.tabs--primary li a:active{color:#028da9}.tabs--primary li .active{background:#c5c5c5}body,html{font-family:proximanova,Helvetica,Arial,sans-serif;color:#2d2d2d;font-weight:300}p{margin-bottom:14px}em{font-style:italic}@media (max-width:47.4em){html{font-size:58%}.body,.ui-accordion .ui-accordion-content li,.ui-accordion .ui-accordion-content p,body{font-size:18px;font-size:1.8rem;line-height:150%}}@media (min-width:47.5em){html{font-size:60%}.body,.ui-accordion .ui-accordion-content li,.ui-accordion .ui-accordion-content p,body{font-size:17px;font-size:1.7rem;line-height:150%}.width-70{width:85%}}@media (min-width:60em){html{font-size:62.5%}.body,.ui-accordion .ui-accordion-content li,.ui-accordion .ui-accordion-content p,body{font-size:17px;font-size:1.7rem;line-height:150%}}@media (min-width:82em){html{font-size:66%}.body,.ui-accordion .ui-accordion-content li,.ui-accordion .ui-accordion-content p,body{font-size:16px;font-size:1.6rem;line-height:150%}}h1,h2,h3,h4{margin-bottom:10px;line-height:120%}.pane-bundle-text h2,body h2,body h3,body h4,h2.block__title{margin-top:0}h1{font-size:42px;font-size:4.2rem}h2{font-size:32px;font-size:3.2rem}h2.block__title,h2.pane-title{font-size:27px;font-size:2.7rem}h3{font-size:24px;font-size:2.4rem}h4{font-size:20px;font-size:2rem}.block-title-style,.section-tags h1,.views-page h1{text-transform:uppercase;color:#2d2d2d;font-size:27px;font-size:2.7rem}.ui-accordion-content a,.ui-tabs-content a,a{color:#b00;font-weight:500;text-decoration:none}a:visited{color:#b00}a:focus{color:#d4df48}a:hover{color:#028da9;text-decoration:underline}a:active{color:#d65828}.ui-accordion-content strong a,.ui-tabs-content strong a,strong .ui-accordion-content a,strong .ui-tabs-content a,strong a{font-weight:700}.header-links,.pane-node-title a{color:#b00;text-decoration:none}.header-links:visited,.pane-node-title a:visited{color:#b00}.header-links:focus,.pane-node-title a:focus{color:#d4df48}.header-links:hover,.pane-node-title a:hover{color:#2d2d2d;text-decoration:none}.header-links:active,.pane-node-title a:active{color:#d65828}.reverse-links,.reverse-links:visited{color:#ebebeb}.reverse-links:focus{color:#d4df48}.reverse-links:hover{color:#fff}.pipe,.reverse-links:active{color:#b00}.more-link,.more-link a{text-transform:uppercase;font-weight:600;text-decoration:none;margin-top:2em}.pipe{font-weight:600}body .ui-accordion .ui-accordion-header,body .ui-accordion .ui-accordion-header a,body .ui-accordion .ui-accordion-header.ui-state-active,body .ui-accordion .ui-accordion-header.ui-state-active a,body .ui-accordion .ui-accordion-header.ui-state-default,body .ui-accordion .ui-accordion-header.ui-state-default a,body .ui-accordion .ui-accordion-header.ui-state-hover,body .ui-accordion .ui-accordion-header.ui-state-hover a,body .ui-tabs .ui-tabs-nav,body .ui-tabs .ui-tabs-nav a{font-weight:400;color:#2d2d2d}.fine-print,table caption{font-size:12px;font-size:1.2rem;line-height:135%}.labels{font-size:13px;font-size:1.3rem;text-transform:uppercase;font-weight:400}.align-right{text-align:right}.align-center{text-align:center}blockquote{background:#f5f5f5;border-left:4px solid #ddd;padding:1.9em 2em;overflow:hidden}blockquote li,blockquote ol,blockquote p,blockquote ul{margin:.4em 0 0}blockquote div,blockquote h2,blockquote h3,blockquote h4,blockquote h5{margin:0 0 .4em}blockquote.pull-quote{font-size:26px;font-size:2.6rem;background:0 0;border-left:0 none;font-family:capita,Georgia,serif;font-style:italic;line-height:130%;padding:0;margin:1.5em 1.5em 1.5em 2em}blockquote.pull-quote :first-child{margin-top:.3em}blockquote.pull-quote::before{font-size:35px;font-size:3.5rem;color:rgba(0,0,0,.6);content:"\f10d";font-family:FontAwesome;font-style:normal;margin-left:-1.5em;float:left}blockquote.pull-quote cite,body .ui-tabs .ui-tabs-nav{font-family:proximanova,Helvetica,Arial,sans-serif}blockquote.pull-quote cite{font-size:16px;font-size:1.6rem;font-style:normal;display:block;padding-top:.6em}blockquote.pull-quote cite::before{content:"―";margin-right:3px}body .ui-accordion{margin:1em 0;position:relative}body .ui-accordion .accordion-item,body .ui-accordion .views-row{margin:.5em 0}body .ui-accordion .ui-accordion-header{font-size:.9em;padding:.5em 1em .4em 1.9em}body .ui-accordion .ui-accordion-header.cke_widget_editable{padding:.5em 3em .3em 1.9em}body .ui-accordion .ui-accordion-header p{margin:0;color:#2d2d2d}body .ui-accordion .ui-accordion-header,body .ui-accordion .ui-accordion-header.ui-state-active,body .ui-accordion .ui-accordion-header.ui-state-default,body .ui-accordion .ui-accordion-header.ui-state-hover{border:0;background-color:#dedede}body .ui-accordion .ui-accordion-header a,body .ui-accordion .ui-accordion-header.ui-state-active a,body .ui-accordion .ui-accordion-header.ui-state-default a,body .ui-accordion .ui-accordion-header.ui-state-hover a{padding:0}body .ui-accordion .ui-accordion-header.ui-state-active{background-image:none}body .ui-accordion .ui-accordion-content{box-sizing:content-box;background-color:#fff;padding:1.2em 1.9em .5em;border:1px solid #dedede}body .ui-tabs{background-color:transparent;margin:1em 0;position:relative;padding:0;clear:both}body .ui-tabs .ui-tabs-nav{font-size:.9em;padding:.5em 1em 0 0;background-color:transparent}.callout,.intro-text,.intro-text-legacy,.tagline{font-family:capita,Georgia,serif}body .ui-tabs .ui-tabs-nav.cke_widget_editable{background-color:#dedede;padding:.5em 3em .3em 1.9em}body .ui-tabs .ui-tabs-nav li,body .ui-tabs .ui-tabs-nav li.ui-state-active,body .ui-tabs .ui-tabs-nav li.ui-state-default,body .ui-tabs .ui-tabs-nav li.ui-state-hover{border-width:1px 1px 0;border-style:solid;border-color:#dedede}body .ui-tabs .ui-tabs-nav li.ui-state-default,body .ui-tabs .ui-tabs-nav li.ui-state-hover{background-color:#dedede;background-image:none}body .ui-tabs .ui-tabs-nav li.ui-tabs-active{background-color:#fff}body .ui-tabs .ui-tabs-content{box-sizing:content-box;background-color:#fff;padding:1.2em 1.9em .5em;border:1px solid #dedede}body .ui-tabs .ui-tabs-content:after{content:"";display:table;clear:both}body .drulog-panels-accordion .accordion-title{margin-bottom:.5em}body .drulog-panels-accordion .accordion-content{margin-top:-.8em;margin-bottom:.8em}.tagline,h2.underlined,h3.underlined{margin-bottom:20px}.tagline{font-size:32px;font-size:3.2rem;font-weight:100;line-height:130%}.subhead{font-size:22px;font-size:2.2rem;color:#b00;line-height:130%}.underlined{border-bottom:1px solid #c7c7c7;padding-bottom:4px;font-weight:300!important;margin-top:0}h2.underlined{font-size:30px;font-size:3rem}h3.underlined{font-size:26px;font-size:2.6rem}.field--name-field-ocio-body .underlined{padding-top:20px}.field--name-field-ocio-body .underlined:first-child{padding-top:0}.row-tiles .underlined{margin-bottom:30px!important;padding-top:20px!important}.intro-text{font-size:22px;font-size:2.2rem;font-style:italic;font-weight:100;line-height:160%;padding-bottom:20px}.intro-text:last-child{padding-bottom:0}.intro-text-alt{font-size:20px;font-size:2rem;font-weight:300;line-height:160%;padding-bottom:10px}.intro-text-alt:last-child,.intro-text-legacy:last-child{padding-bottom:0}.intro-text-legacy{font-size:20px;font-size:2rem;font-weight:100;line-height:170%;margin-top:.6em;margin-bottom:2em}.intro-text-legacy.align-center{width:85%;margin-left:auto;margin-right:auto}.callout{font-size:36px;font-size:3.6rem;color:#b00;font-weight:300;margin:1em 0 .4em}hr{background-color:#d2d2d2;border:0;height:1px;margin:2em 0}.width-70{margin:10px auto}@media (min-width:60em){.width-70{width:75%}}@media (min-width:82em){.width-70{width:70%}}#block-views-featured-slideshow-block .flexslider{background:#2d2d2d;border:0;border-radius:0;box-shadow:none;margin:0}#block-views-featured-slideshow-block .flexslider .flex-meta{display:block;width:100%;position:absolute;color:#fff;text-align:center;bottom:.6em;padding:.4em 8%;font-size:24px;font-size:2.4rem}#block-views-featured-slideshow-block .flexslider .flex-meta .flex-title{display:block;font-weight:400;line-height:1.1em}#block-views-featured-slideshow-block .flexslider .flex-meta .flex-summary{font-weight:300;font-size:.6em;line-height:1.2em;display:none}@media (min-width:47.5em){#block-views-featured-slideshow-block .flexslider .flex-meta .flex-summary{display:block}#block-views-featured-slideshow-block .flexslider .flex-meta{bottom:.3em;padding:.5em 6%;font-size:32px;font-size:3.2rem}#block-views-featured-slideshow-block .flexslider .flex-meta .flex-title{margin-bottom:.1em}}@media (min-width:60em){#block-views-featured-slideshow-block .flexslider .flex-meta{font-size:34px;font-size:3.4rem}}@media (min-width:82em){#block-views-featured-slideshow-block .flexslider .flex-meta{font-size:40px;font-size:4rem}}#block-views-featured-slideshow-block .flexslider .flex-meta.white{color:#fff}#block-views-featured-slideshow-block .flexslider .flex-meta.white.translucent{bottom:0;background-color:rgba(20,20,20,.6)}#block-views-featured-slideshow-block .flexslider .flex-meta.black.translucent,#block-views-featured-slideshow-block .flexslider .flex-meta.dk-gray.translucent{background-color:rgba(200,200,200,.7);bottom:0}#block-views-featured-slideshow-block .flexslider .flex-meta.dk-gray{color:#2d2d2d}#block-views-featured-slideshow-block .flexslider .flex-meta.black{color:#000}#block-views-featured-slideshow-block .flexslider .flex-direction-nav a{color:rgba(0,0,0,.8);text-decoration:none}#block-views-featured-slideshow-block .flexslider .flex-direction-nav a:before{line-height:1em}#block-views-featured-slideshow-block .lt-ie9 .flexslider a .flex-meta{background-color:transparent;-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#AA000000, endColorstr=#AA000000)"}#block-views-featured-slideshow-block .lt-ie9 .flexslider .flex-direction-nav a{color:#000;filter:alpha(opacity="60")}#block-views-featured-slideshow-block .lt-ie9 .flexslider .flex-direction-nav a:hover{filter:alpha(opacity="80")}#block-views-featured-slideshow-block ul.flex-direction-nav,#block-views-featured-slideshow-block ul.flex-direction-nav:hover{display:none}#block-views-featured-slideshow-block .flex-control-nav{text-align:right;padding-right:1.8em;top:20px;z-index:99;width:100%;height:30px}#block-views-featured-slideshow-block .flex-control-paging li a{background-color:#2d2d2d;text-align:left;width:15px;height:15px;margin-bottom:1em}#block-views-featured-slideshow-block .flex-control-paging li a.flex-active{background-color:#fff}@media (max-width:47.4em){#block-views-featured-slideshow-block .flex-control-paging li a{display:none}}.l-region--hero-wrapper{position:relative;max-height:500px}.l-region--hero-wrapper .views-field-field-basic-image-image{position:relative;top:0;z-index:9;max-height:500px;overflow:hidden}.page-newsletter-archive h1{margin-bottom:25px}.page-newsletter-archive .l-region--content{padding-bottom:20px}.page-newsletter-archive .l-region--content li{margin-bottom:15px}.block--mm-widgets .item,.pane-mm-widgets-live-pane .item{margin:1.8em 0}.block--mm-widgets .item .content,.pane-mm-widgets-live-pane .item .content{margin-bottom:.3em}.block--mm-widgets .item .network .fa,.pane-mm-widgets-live-pane .item .network .fa{margin-right:.6em;position:relative;top:1px;padding:.3em 0 .25em;width:1.6em}.block--mm-widgets .fa,.pane-mm-widgets-live-pane .fa{color:#fff;padding:.55em 0 .5em;text-align:center;width:1.8em}.block--mm-widgets .fa.fa-twitter,.pane-mm-widgets-live-pane .fa.fa-twitter{background-color:#00aced}.block--mm-widgets .fa.fa-facebook-page,.pane-mm-widgets-live-pane .fa.fa-facebook-page{background-color:#3b5998}.block--mm-widgets .fa.fa-facebook-page:before,.pane-mm-widgets-live-pane .fa.fa-facebook-page:before{content:'\f09a'}.block--mm-widgets .fa.fa-instagram,.pane-mm-widgets-live-pane .fa.fa-instagram{background-color:#517fa4;top:2px}.block--mm-widgets .fa.fa-rss,.pane-mm-widgets-live-pane .fa.fa-rss{background-color:#f60}.block--mm-widgets .fa.fa-youtube-playlist,.pane-mm-widgets-live-pane .fa.fa-youtube-playlist{background-color:#b00}.block--mm-widgets .fa.fa-youtube-playlist:before,.pane-mm-widgets-live-pane .fa.fa-youtube-playlist:before{content:'\f16a'}.block--mm-widgets.mm-single-channel .fa.mm-channel,.pane-mm-widgets-live-pane.mm-single-channel .fa.mm-channel{float:left;margin-right:.6em}.block--mm-widgets.mm-single-channel .fa.mm-channel+.pane-title,.pane-mm-widgets-live-pane.mm-single-channel .fa.mm-channel+.pane-title{line-height:1.6em}body.html.footer-dk-gray{background-color:#2d2d2d}body.html.footer-md-gray{background-color:#666}body.html.footer-lt-gray{background-color:#ebebeb}body.html.footer-white{background-color:#fff}form.search-form{margin-top:1em}fieldset.search-advanced{border:0;background-color:#ebebeb;margin-left:0;margin-right:0;padding:.5em 0 0}fieldset.search-advanced legend{margin-top:2.5em}fieldset.search-advanced .criterion{margin-top:1em}fieldset.search-advanced input.form-submit{margin-bottom:1em}p.search-result__snippet{padding-left:0;margin-bottom:.4em}.l-page .l-region--main-menu:hover #search-block-toggle{outline:0!important}.l-page .l-region--main-menu #search-block-toggle{cursor:pointer}.l-page .l-region--main-menu #search-block-toggle:focus{outline:red dotted 1px}.l-page .l-region--main-menu #wcm-search{position:relative}.l-page .l-region--main-menu #wcm-search #search-block-form{z-index:498;position:absolute;right:0;top:100%;background-color:rgba(0,0,0,.8);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#333333, endColorstr=#333333);height:auto;display:none}.l-page .l-region--main-menu #wcm-search #search-block-form *{height:100%}.l-page .l-region--main-menu #wcm-search #search-block-form .container-inline{display:table;padding:1em}.l-page .l-region--main-menu #wcm-search #search-block-form .container-inline .form-item{display:table-cell;vertical-align:middle}.l-page .l-region--main-menu #wcm-search #search-block-form .container-inline .form-item .form-text{border:0;padding:0 6px;font-size:1em}.l-page .l-region--main-menu #wcm-search #search-block-form .container-inline .form-actions{display:table-cell;text-align:center;width:1.9em}#block-menu-menu-global-menu ul.menu span.ext,.book_printer,.node-type-news-client-cached-article .tabs--primary,.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text span.ext{display:none}.l-page .l-region--main-menu #wcm-search #search-block-form .container-inline .form-actions .form-submit{border-radius:0;-webkit-box-sizing:content-box;box-shadow:none;padding:.6em 1.3em .4em;margin:0;height:auto}@media (max-width:47.4em){.l-page .l-region--main-menu #wcm-search #search-block-toggle{position:absolute;right:0;padding:1em;font-size:1.2em;z-index:500;width:auto;margin-top:.25em}.l-page .l-region--main-menu #wcm-search #search-block-form{display:none;height:auto;width:100%;top:4em;z-index:499}.l-page .l-region--main-menu #wcm-search #search-block-form .container-inline{width:100%;clear:both;padding:4%}.l-page .l-region--main-menu #wcm-search #search-block-form .container-inline .form-text{width:100%}}.field--name-field-ocio-body .block--webform{font-size:14px;font-size:1.4rem;margin-bottom:20px}.field--name-field-ocio-body .block--webform .block__title{font-size:22px;font-size:2.2rem;font-weight:400!important;color:#b00!important;padding-top:20px}.field--name-field-ocio-body .block--webform label{font-size:13px;font-size:1.3rem}.field--name-field-ocio-body .block--webform .button-primary{margin-top:10px}div.workbench-info-block{background-color:#d9d9d9;padding:1em 1.5em;margin:1em 0 3em;border:none;color:#2d2d2d;font-size:14px;font-size:1.4rem;border-left:8px solid #d65828}div.workbench-info-block #edit-submit{margin-left:1em;font-size:13px!important;padding:.4em .8em!important}.node-type-calendar-entry .field--name-field-date{font-size:24px;font-size:2.4rem;font-weight:400;margin:1em 0 1.3em}.node-type-calendar-entry .field--name-field-date .pipe{margin:0 10px}.view .date-nav-wrapper .date-prev{border-radius:0;background:#ebebeb;float:none;padding:5px 8px 5px 0}.view .date-nav-wrapper .date-prev:hover{background:#d7d7d7}.view .date-nav-wrapper .date-next{border-radius:0;background:#ebebeb;float:none;padding:5px 0 5px 8px}.view .date-nav-wrapper .date-next:hover{background:#d7d7d7}.view .date-nav-wrapper .date-prev a{margin-left:10px;font-weight:400;font-size:14px}.view .date-nav-wrapper .date-next a{margin-right:10px;font-weight:400;font-size:14px}.calendar-calendar th.days{color:#fff!important;background-color:#2d2d2d!important}.calendar-calendar td{color:#2d2d2d}.calendar-calendar td.empty{background:#ccc;border-color:#ccc;color:#bbb}.calendar-calendar .month-view .full tr td.today,.calendar-calendar .month-view .full tr.even td.today,.calendar-calendar .month-view .full tr.odd td.today{border-left:3px solid #028da9;border-right:3px solid #028da9}.calendar-calendar .month-view .full td.date-box.today{border-width:3px 3px 0;border-color:#028da9}.calendar-calendar .month-view .full tr td.single-day.today{border-bottom:3px solid #028da9}.calendar-calendar td .inner div.calendar div,.calendar-calendar td .inner div.calendar div a{background:0 0!important}.calendar-calendar .day-view .full td.single-day div.dayview,.calendar-calendar .month-view .full td.single-day div.monthview,.calendar-calendar .week-view .full td.single-day div.weekview{background:0 0;padding:0 5px}.ds-2col-stacked-fluid.node--article--full .group-left,.ds-2col-stacked-fluid.node--article--full .group-right,.ds-2col-stacked-fluid.node--news-client-cached-article--full .group-left,.ds-2col-stacked-fluid.node--news-client-cached-article--full .group-right{width:100%;float:none}.ds-2col-stacked-fluid.node--article--full .group-right,.ds-2col-stacked-fluid.node--news-client-cached-article--full .group-right{margin-top:30px;margin-bottom:30px}@media (min-width:60em){.ds-2col-stacked-fluid.node--article--full.has-sidebar .group-left,.ds-2col-stacked-fluid.node--news-client-cached-article--full.has-sidebar .group-left{width:70%;float:left;margin-bottom:30px}.ds-2col-stacked-fluid.node--article--full.has-sidebar .group-right,.ds-2col-stacked-fluid.node--news-client-cached-article--full.has-sidebar .group-right{width:27%;float:right;margin-top:10px}}.node--article,.node--news-client-cached-article{position:relative}.node--article .field--name-field-kicker,.node--article .field--name-news-client-kicker,.node--news-client-cached-article .field--name-field-kicker,.node--news-client-cached-article .field--name-news-client-kicker{text-transform:uppercase;color:#666;font-weight:600;font-size:22px;font-size:2.2rem;margin-bottom:10px}.node--article .field--name-byline,.node--article .field--name-byline-with-date,.node--news-client-cached-article .field--name-byline,.node--news-client-cached-article .field--name-byline-with-date{font-weight:600;padding-top:6px;margin-bottom:12px}.node--article .field--name-field-featured-image,.node--article .field--name-news-client-image-json,.node--news-client-cached-article .field--name-field-featured-image,.node--news-client-cached-article .field--name-news-client-image-json{float:right;max-width:50%;margin:10px 0 40px 40px}.node--article .field--name-field-sidebar,.node--article .field--name-news-client-sidebar,.node--news-client-cached-article .field--name-field-sidebar,.node--news-client-cached-article .field--name-news-client-sidebar{background:#ebebeb;padding:30px 1.8em 20px}.node--article .field--name-field-sidebar h2,.node--article .field--name-field-sidebar h3,.node--article .field--name-field-sidebar h4,.node--article .field--name-news-client-sidebar h2,.node--article .field--name-news-client-sidebar h3,.node--article .field--name-news-client-sidebar h4,.node--news-client-cached-article .field--name-field-sidebar h2,.node--news-client-cached-article .field--name-field-sidebar h3,.node--news-client-cached-article .field--name-field-sidebar h4,.node--news-client-cached-article .field--name-news-client-sidebar h2,.node--news-client-cached-article .field--name-news-client-sidebar h3,.node--news-client-cached-article .field--name-news-client-sidebar h4{margin-top:20px;margin-bottom:20px}.node--article .field--name-field-sidebar h2:first-child,.node--article .field--name-field-sidebar h3:first-child,.node--article .field--name-field-sidebar h4:first-child,.node--article .field--name-news-client-sidebar h2:first-child,.node--article .field--name-news-client-sidebar h3:first-child,.node--article .field--name-news-client-sidebar h4:first-child,.node--news-client-cached-article .field--name-field-sidebar h2:first-child,.node--news-client-cached-article .field--name-field-sidebar h3:first-child,.node--news-client-cached-article .field--name-field-sidebar h4:first-child,.node--news-client-cached-article .field--name-news-client-sidebar h2:first-child,.node--news-client-cached-article .field--name-news-client-sidebar h3:first-child,.node--news-client-cached-article .field--name-news-client-sidebar h4:first-child{margin-top:0}.node--article .field--name-field-learn-more,.node--article .field--name-news-client-links,.node--news-client-cached-article .field--name-field-learn-more,.node--news-client-cached-article .field--name-news-client-links{background:#ebebeb;padding:1em 1.4em;clear:both}.node--article .field--name-field-learn-more .label-above,.node--article .field--name-news-client-links .label-above,.node--news-client-cached-article .field--name-field-learn-more .label-above,.node--news-client-cached-article .field--name-news-client-links .label-above{font-size:17px;font-size:1.7rem;font-weight:600;text-transform:uppercase;padding-bottom:.2em}.node--article .field--name-field-learn-more ul,.node--article .field--name-news-client-links ul,.node--news-client-cached-article .field--name-field-learn-more ul,.node--news-client-cached-article .field--name-news-client-links ul{padding-left:1.2em}.node--article .field--name-field-learn-more ul li,.node--article .field--name-news-client-links ul li,.node--news-client-cached-article .field--name-field-learn-more ul li,.node--news-client-cached-article .field--name-news-client-links ul li{margin:5px 0}.node--article .field--name-field-learn-more ul li.last,.node--article .field--name-news-client-links ul li.last,.node--news-client-cached-article .field--name-field-learn-more ul li.last,.node--news-client-cached-article .field--name-news-client-links ul li.last{margin-bottom:0}.node--article .field--name-field-tags,.node--article .field--name-news-client-tags,.node--news-client-cached-article .field--name-field-tags,.node--news-client-cached-article .field--name-news-client-tags{padding-top:30px}.node--article .field--name-field-tags .field__label,.node--article .field--name-news-client-tags .field__label,.node--news-client-cached-article .field--name-field-tags .field__label,.node--news-client-cached-article .field--name-news-client-tags .field__label{margin-right:5px}.node--article .article-modified,.node--news-client-cached-article .article-modified{margin-top:1em;font-size:13px;font-style:italic}.node--article .article-modified .label-inline,.node--news-client-cached-article .article-modified .label-inline{font-weight:600}.node-type-basic-page h1{margin-bottom:24px}.node-type-basic-page .field--name-field-ocio-body{margin-bottom:20px}.node--basic-page{padding-bottom:2em}.book-navigation{border-top:1px solid #ebebeb;border-bottom:1px solid #ebebeb;padding:.5em 0;margin:2em 0}.book-navigation__links a{color:#2d2d2d;text-transform:uppercase}.book-navigation__links a:hover,.book-navigation__links a:visited:hover{color:#b00;text-decoration:none}.book-navigation__links a:visited{color:#2d2d2d}.book-navigation__links a .fa{color:#b00}.book-navigation__links>.book-navigation__previous .fa{margin-right:10px}.book-navigation__links>.book-navigation__next .fa{margin-left:10px}.book_add_child a{color:#2d2d2d;text-transform:uppercase;min-width:180px}.book_add_child:before{content:"\f067";font-family:FontAwesome;color:#028da9;float:left;margin-right:5px}.node-type-ocio-landing-page .l-region--content{padding-top:20px}.node-type-ocio-landing-page h1{margin-bottom:0}.node-type-ocio-landing-page .l-region--hero-wrapper{position:relative;max-height:500px;overflow:hidden;line-height:0}.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image{position:relative;z-index:9}.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text{position:absolute;width:100%;padding:20px 12%;text-align:center;margin:0 auto;left:0;right:0;z-index:99;font-size:26px;font-size:2.6rem;line-height:120%}.panels-ipe .modal-content .change-layout-display .layout-icon .caption,.panels-ipe .modal-content .panels-choose-layout .layout-link>div{line-height:1.4em}@media (min-width:60em){.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text{font-size:30px;font-size:3rem}}@media (min-width:82em){.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text{padding:20px 14%;font-size:32px;font-size:3.2rem}}@media (min-width:100em){.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text{padding:20px 16%}}@media (min-width:112em){.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text{padding:20px 20%}}@media (min-width:125em){.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text{padding:20px 28%}}.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text a:hover{text-decoration:none}.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.white,.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.white a{color:#fff}.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.white a.translucent,.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.white.translucent{background-color:rgba(20,20,20,.6)}.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.white a.translucent:hover,.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.white.translucent:hover{background-color:rgba(46,46,46,.6);color:#fff}.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.dk-gray,.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.dk-gray a{color:#2d2d2d}.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.dk-gray a.translucent,.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.dk-gray.translucent{background-color:rgba(220,220,220,.7)}.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.dk-gray a.translucent:hover,.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.dk-gray.translucent:hover{background-color:rgba(200,200,200,.7)}.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.black,.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.black a{color:#000}.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.black a.translucent,.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.black.translucent{background-color:rgba(220,220,220,.7)}.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.black a.translucent:hover,.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.black.translucent:hover{background-color:rgba(200,200,200,.7)}.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.center-top{top:0}.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.center-middle{top:24%}@media (min-width:47.5em){.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.center-middle{top:30%}}@media (min-width:60em){.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.center-middle{top:36%}}.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.center-bottom{bottom:0;overflow:hidden}#block-menu-menu-global-menu ul.menu{float:right}#block-menu-menu-global-menu ul.menu a,#block-menu-menu-global-menu ul.menu li{font-size:14px;font-size:1.4rem;font-weight:300}#block-menu-menu-global-menu ul.menu .leaf{float:left}#block-menu-menu-global-menu ul.menu .leaf:after{content:"|";margin:0 .6em;font-weight:100;font-size:16px;font-size:1.6rem;position:relative;bottom:-.1em}#block-menu-menu-global-menu ul.menu .leaf.last{margin-right:0}#block-menu-menu-global-menu ul.menu .leaf.last:after{content:none}.l-region--global-menu{padding-top:.55em;padding-bottom:.5em}.l-region--global-menu,.l-region--global-menu.white{color:#b00;background-image:-owg-linear-gradient(#f0f0f0,#ebebeb 75%,#e6e6e6);background-image:linear-gradient(#f0f0f0,#ebebeb 75%,#e6e6e6)}.l-region--global-menu a,.l-region--global-menu.white a{color:#2d2d2d}.l-region--global-menu a:hover,.l-region--global-menu.white a:hover{color:#b00}.l-region--global-menu a:active,.l-region--global-menu.white a:active{color:#028da9}.l-region--global-menu a:focus,.l-region--global-menu.white a:focus{color:#d65828}.l-region--global-menu.lt-gray{color:#b00;background-image:-owg-linear-gradient(#dedede,#dcdcdc 65%,#d4d4d4);background-image:linear-gradient(#dedede,#dcdcdc 65%,#d4d4d4)}.l-region--global-menu.lt-gray a{color:#2d2d2d}.l-region--global-menu.lt-gray a:hover{color:#b00}.l-region--global-menu.lt-gray a:active{color:#028da9}.l-region--global-menu.lt-gray a:focus{color:#d65828}.l-region--global-menu.md-gray{color:#ababab;background-image:-owg-linear-gradient(#6e6e6e,#757575 75%,#787878);background-image:linear-gradient(#6e6e6e,#757575 75%,#787878)}.l-region--global-menu.md-gray a{color:#fff}.l-region--global-menu.md-gray a:hover{color:#d4df48}.l-region--global-menu.md-gray a:active{color:#dcaa38}.l-region--global-menu.md-gray a:focus{color:#d65828}.l-region--global-menu.dk-gray{color:#b8b8b8;background-image:-owg-linear-gradient(#323232,#3a3a3a 75%,#3c3c3c);background-image:linear-gradient(#323232,#3a3a3a 75%,#3c3c3c)}.l-region--global-menu.dk-gray a{color:#fff}.l-region--global-menu.dk-gray a:hover{color:#028da9}.l-region--global-menu.dk-gray a:active{color:#dcaa38}.l-region--global-menu.dk-gray a:focus{color:#d65828}@media (max-width:47.4em){.l-region--global-menu{padding:.1em 0}ul.menu{float:left!important}}.l-region--main-menu.mean-container .mean-bar,.l-region--main-menu.mean-container .mean-nav{background:0 0}.l-region--main-menu.mean-container .mean-bar{z-index:499;padding:0}.l-region--main-menu.mean-container a.meanmenu-reveal{color:#fff;font-size:1.5em;padding:.9em 1em;text-indent:0;text-align:center;left:0!important;right:auto!important}.l-region--main-menu.mean-container .mean-nav{margin-top:4em}.l-region--main-menu.mean-container .mean-nav ul li{text-transform:uppercase}.l-region--main-menu.mean-container .mean-nav ul li li{display:block;float:left;width:100%;margin:0;text-align:left;font-weight:500;box-sizing:border-box;background:rgba(0,0,0,.1);color:rgba(0,0,0,.9)}.l-region--main-menu.mean-container .mean-nav ul li a,.l-region--main-menu.mean-container .mean-nav ul li span{color:#fff;text-decoration:none;padding:1em 1em .9em 1.2em;border:0;box-sizing:border-box;width:100%;display:block}.l-region--main-menu.mean-container .mean-nav ul li li a{padding-left:3em;box-sizing:border-box;width:100%;color:#222;opacity:1}.l-region--main-menu.mean-container .mean-nav ul li a.mean-expand{border:0!important;padding:.7em .9em 1.55em .8em!important;width:auto;margin:0;background-color:transparent}.l-region--main-menu.mean-container .mean-nav ul li a.mean-expand:hover{background:0 0}body.menu-white .l-region--main-menu.mean-container{background:#fff;border-bottom:1px solid #e6e6e6}body.menu-white .l-region--main-menu.mean-container .mean-nav a,body.menu-white .l-region--main-menu.mean-container .mean-nav span,body.menu-white .l-region--main-menu.mean-container a.meanmenu-reveal{color:#666}body.menu-white .l-region--main-menu.mean-container .mean-bar,body.menu-white .l-region--main-menu.mean-container .mean-nav{background:#fff}body.menu-white .l-region--main-menu.mean-container .mean-nav ul li li{background:#e6e6e6}body.menu-white .l-region--main-menu.mean-container .mean-nav ul li li a,body.menu-white .l-region--main-menu.mean-container .mean-nav ul li li span{color:#1a1a1a}body.menu-lt-gray .l-region--main-menu.mean-container{background:#ebebeb;border-bottom:1px solid #d2d2d2}body.menu-lt-gray .l-region--main-menu.mean-container .mean-nav a,body.menu-lt-gray .l-region--main-menu.mean-container .mean-nav span,body.menu-lt-gray .l-region--main-menu.mean-container a.meanmenu-reveal{color:#2d2d2d}body.menu-lt-gray .l-region--main-menu.mean-container .mean-bar,body.menu-lt-gray .l-region--main-menu.mean-container .mean-nav{background:#ebebeb}body.menu-lt-gray .l-region--main-menu.mean-container .mean-nav ul li li{background:#d2d2d2}body.menu-lt-gray .l-region--main-menu.mean-container .mean-nav ul li li a,body.menu-lt-gray .l-region--main-menu.mean-container .mean-nav ul li li span{color:#000}body.menu-black .l-region--main-menu.mean-container .mean-nav a,body.menu-black .l-region--main-menu.mean-container .mean-nav span,body.menu-black .l-region--main-menu.mean-container .mean-nav ul li li a,body.menu-black .l-region--main-menu.mean-container .mean-nav ul li li span,body.menu-black .l-region--main-menu.mean-container a.meanmenu-reveal,body.menu-dk-gray .l-region--main-menu.mean-container .mean-nav a,body.menu-dk-gray .l-region--main-menu.mean-container .mean-nav span,body.menu-dk-gray .l-region--main-menu.mean-container .mean-nav ul li li a,body.menu-dk-gray .l-region--main-menu.mean-container .mean-nav ul li li span,body.menu-dk-gray .l-region--main-menu.mean-container a.meanmenu-reveal,body.menu-md-gray .l-region--main-menu.mean-container .mean-nav a,body.menu-md-gray .l-region--main-menu.mean-container .mean-nav span,body.menu-md-gray .l-region--main-menu.mean-container .mean-nav ul li li a,body.menu-md-gray .l-region--main-menu.mean-container .mean-nav ul li li span,body.menu-md-gray .l-region--main-menu.mean-container a.meanmenu-reveal,body.menu-red .l-region--main-menu.mean-container .mean-nav a,body.menu-red .l-region--main-menu.mean-container .mean-nav span,body.menu-red .l-region--main-menu.mean-container .mean-nav ul li li a,body.menu-red .l-region--main-menu.mean-container .mean-nav ul li li span,body.menu-red .l-region--main-menu.mean-container a.meanmenu-reveal{color:#fff}body.menu-md-gray .l-region--main-menu.mean-container{background:#666;border-bottom:1px solid #4d4d4d}body.menu-md-gray .l-region--main-menu.mean-container .mean-bar,body.menu-md-gray .l-region--main-menu.mean-container .mean-nav{background:#666}body.menu-md-gray .l-region--main-menu.mean-container .mean-nav ul li li{background:#4d4d4d}body.menu-dk-gray .l-region--main-menu.mean-container{background:#2d2d2d;border-bottom:1px solid #141414}body.menu-dk-gray .l-region--main-menu.mean-container .mean-bar,body.menu-dk-gray .l-region--main-menu.mean-container .mean-nav{background:#2d2d2d}body.menu-dk-gray .l-region--main-menu.mean-container .mean-nav ul li li{background:#535353}body.menu-black .l-region--main-menu.mean-container{background:#000;border-bottom:1px solid #000}body.menu-black .l-region--main-menu.mean-container .mean-bar,body.menu-black .l-region--main-menu.mean-container .mean-nav{background:#000}body.menu-black .l-region--main-menu.mean-container .mean-nav ul li li{background:#262626}body.menu-red .l-region--main-menu.mean-container{background:#b00;border-bottom:1px solid #800}body.menu-red .l-region--main-menu.mean-container .mean-bar,body.menu-red .l-region--main-menu.mean-container .mean-nav{background:#b00}body.menu-red .l-region--main-menu.mean-container .mean-nav ul li li{background:#800}.l-page .l-constrained .mean-container #search-block-toggle,.l-page .l-constrained .mean-container .mean-nav ul li a,.l-page .l-constrained .mean-container .mean-nav ul li span,.l-page .l-constrained .mean-container a.meanmenu-reveal{padding-left:4%;padding-right:4%}.l-page .l-constrained .mean-container .mean-nav a.mean-expand{padding-left:4%!important;padding-right:4%!important;margin-right:-2px}.l-page .l-constrained .mean-container .mean-nav ul li li a{padding-left:8%;padding-right:8%}@media (min-width:47.5em){.l-region--main-menu>*{display:table-cell!important}}@media (max-width:47.4em){.l-region--main-menu-wrapper .l-constrained,.l-region--main-menu-wrapper .l-region--main-menu{padding:0}.l-region--main-menu-wrapper .l-region--main-menu>*{display:block}.l-region--main-menu-second-wrapper{display:none}}#superfish-1-toggle span,.l-region--main-menu h2.block__title,.l-region--main-menu span.ext,.l-region--main-menu-second h2.block__title,.l-region--main-menu-second span.ext,.l-region--sidebar-1 h2.block__title,.l-region--sidebar-1 span.ext{display:none}.l-region--main-menu .menu .collapsed,.l-region--main-menu .menu .expanded,.l-region--main-menu .menu .leaf,.l-region--main-menu-second .menu .collapsed,.l-region--main-menu-second .menu .expanded,.l-region--main-menu-second .menu .leaf,.l-region--sidebar-1 .menu .collapsed,.l-region--sidebar-1 .menu .expanded,.l-region--sidebar-1 .menu .leaf{list-style-image:none;list-style-type:none}.l-region--main-menu>*{display:table-cell;vertical-align:middle;width:100%}.l-region--main-menu ul.sf-menu{float:left;clear:left;margin:0}.l-region--main-menu ul.sf-menu li{float:left;margin:0;padding:.75em 1.6em .75em 0;text-transform:uppercase}.l-region--main-menu ul.sf-menu li a,.l-region--main-menu ul.sf-menu li span{font-weight:500;text-decoration:none}.l-region--main-menu ul.sf-menu li a:hover{text-decoration:none}.menu-style-1 .l-region--main-menu-second-wrapper{display:none}.menu-style-1 .l-region--main-menu ul.sf-menu ul{display:none;position:absolute;z-index:99;margin-top:.7em;margin-left:-.9em}.l-region--main-menu-second .main-menu-second-ul,.menu-style-2 .l-region--main-menu ul.sf-menu{margin-left:-1em}.menu-style-1 .l-region--main-menu ul.sf-menu ul li{padding:0}.menu-style-1 .l-region--main-menu ul.sf-menu ul li a{padding:.75em .9em .65em}.menu-style-1 .l-region--main-menu ul li:hover>ul{display:block}.menu-style-1 .l-region--main-menu ul ul.menu li{float:none;position:relative}.menu-style-1 .sf-menu ul:before{content:' ';height:0;position:absolute;width:0;border:10px solid transparent;top:-19px;left:10px;z-index:2}.menu-style-1 .l-region--main-menu,.menu-style-1 .l-region--main-menu-wrapper,.menu-style-1.menu-white .l-region--main-menu,.menu-style-1.menu-white .l-region--main-menu-wrapper{background:#fff}.menu-style-1 .l-region--main-menu-second-wrapper,.menu-style-1 .main-menu-second-ul,.menu-style-1.menu-lt-gray .l-region--main-menu,.menu-style-1.menu-lt-gray .l-region--main-menu-wrapper,.menu-style-1.menu-white .l-region--main-menu-second-wrapper,.menu-style-1.menu-white .main-menu-second-ul{background:#ebebeb}.menu-style-1 #search-block-toggle,.menu-style-1.menu-white #search-block-toggle{color:#666}.menu-style-1 #search-block-toggle:hover,.menu-style-1.menu-white #search-block-toggle:hover{color:#d4df48}.menu-style-1 #search-block-toggle:active,.menu-style-1.menu-white #search-block-toggle:active{color:#028da9}.menu-style-1 #search-block-toggle:focus,.menu-style-1.menu-white #search-block-toggle:focus{color:#d4df48}.menu-style-1 .sf-menu ul:before,.menu-style-1.menu-white .sf-menu ul:before{border-bottom-color:#ebebeb}.menu-style-1 .main-menu-top-li a,.menu-style-1 .main-menu-top-li span,.menu-style-1.menu-white .main-menu-top-li a,.menu-style-1.menu-white .main-menu-top-li span{color:#666!important}.menu-style-1 .main-menu-top-li a:hover,.menu-style-1 .main-menu-top-li span:hover,.menu-style-1.menu-white .main-menu-top-li a:hover,.menu-style-1.menu-white .main-menu-top-li span:hover{color:#b00!important}.menu-style-1 .main-menu-top-li a:active,.menu-style-1 .main-menu-top-li span:active,.menu-style-1.menu-white .main-menu-top-li a:active,.menu-style-1.menu-white .main-menu-top-li span:active{color:#028da9!important}.menu-style-1 .main-menu-top-li a:focus,.menu-style-1 .main-menu-top-li span:focus,.menu-style-1.menu-white .main-menu-top-li a:focus,.menu-style-1.menu-white .main-menu-top-li span:focus{color:#d4df48!important}.menu-style-1 .main-menu-second-ul a,.menu-style-1 .main-menu-second-ul span,.menu-style-1.menu-white .main-menu-second-ul a,.menu-style-1.menu-white .main-menu-second-ul span{color:#666!important}.menu-style-1 .main-menu-second-ul a:hover,.menu-style-1 .main-menu-second-ul span:hover,.menu-style-1.menu-white .main-menu-second-ul a:hover,.menu-style-1.menu-white .main-menu-second-ul span:hover{color:#b00!important}.menu-style-1 .main-menu-second-ul a:active,.menu-style-1 .main-menu-second-ul span:active,.menu-style-1.menu-white .main-menu-second-ul a:active,.menu-style-1.menu-white .main-menu-second-ul span:active{color:#028da9!important}.menu-style-1 .main-menu-second-ul a:focus,.menu-style-1 .main-menu-second-ul span:focus,.menu-style-1.menu-white .main-menu-second-ul a:focus,.menu-style-1.menu-white .main-menu-second-ul span:focus{color:#d4df48!important}.menu-style-1 .main-menu-second-ul .main-menu-second-li.active a,.menu-style-1 .main-menu-second-ul .main-menu-second-li.active a:hover,.menu-style-1 .main-menu-second-ul .main-menu-second-li.active span,.menu-style-1 .main-menu-second-ul .main-menu-second-li.active span:hover,.menu-style-1 .main-menu-second-ul .main-menu-second-li:hover a,.menu-style-1 .main-menu-second-ul .main-menu-second-li:hover a:hover,.menu-style-1 .main-menu-second-ul .main-menu-second-li:hover span,.menu-style-1 .main-menu-second-ul .main-menu-second-li:hover span:hover,.menu-style-1.menu-white .main-menu-second-ul .main-menu-second-li.active a,.menu-style-1.menu-white .main-menu-second-ul .main-menu-second-li.active a:hover,.menu-style-1.menu-white .main-menu-second-ul .main-menu-second-li.active span,.menu-style-1.menu-white .main-menu-second-ul .main-menu-second-li.active span:hover,.menu-style-1.menu-white .main-menu-second-ul .main-menu-second-li:hover a,.menu-style-1.menu-white .main-menu-second-ul .main-menu-second-li:hover a:hover,.menu-style-1.menu-white .main-menu-second-ul .main-menu-second-li:hover span,.menu-style-1.menu-white .main-menu-second-ul .main-menu-second-li:hover span:hover{color:#b00!important}.menu-style-1 .main-menu-second-ul .main-menu-second-li.active a:active,.menu-style-1 .main-menu-second-ul .main-menu-second-li.active span:active,.menu-style-1 .main-menu-second-ul .main-menu-second-li:hover a:active,.menu-style-1 .main-menu-second-ul .main-menu-second-li:hover span:active,.menu-style-1.menu-white .main-menu-second-ul .main-menu-second-li.active a:active,.menu-style-1.menu-white .main-menu-second-ul .main-menu-second-li.active span:active,.menu-style-1.menu-white .main-menu-second-ul .main-menu-second-li:hover a:active,.menu-style-1.menu-white .main-menu-second-ul .main-menu-second-li:hover span:active{color:#028da9!important}.menu-style-1 .main-menu-second-ul .main-menu-second-li.active a:focus,.menu-style-1 .main-menu-second-ul .main-menu-second-li.active span:focus,.menu-style-1 .main-menu-second-ul .main-menu-second-li:hover a:focus,.menu-style-1 .main-menu-second-ul .main-menu-second-li:hover span:focus,.menu-style-1.menu-white .main-menu-second-ul .main-menu-second-li.active a:focus,.menu-style-1.menu-white .main-menu-second-ul .main-menu-second-li.active span:focus,.menu-style-1.menu-white .main-menu-second-ul .main-menu-second-li:hover a:focus,.menu-style-1.menu-white .main-menu-second-ul .main-menu-second-li:hover span:focus{color:#d4df48!important}.menu-style-1.menu-lt-gray .l-region--main-menu-second-wrapper,.menu-style-1.menu-lt-gray .main-menu-second-ul{background:#d7d7d7}.menu-style-1.menu-lt-gray #search-block-toggle{color:#474747}.menu-style-1.menu-lt-gray #search-block-toggle:hover{color:#d4df48}.menu-style-1.menu-lt-gray #search-block-toggle:active{color:#028da9}.menu-style-1.menu-lt-gray #search-block-toggle:focus{color:#d4df48}.menu-style-1.menu-lt-gray .sf-menu ul:before{border-bottom-color:#d7d7d7}.menu-style-1.menu-lt-gray .main-menu-top-li a,.menu-style-1.menu-lt-gray .main-menu-top-li span{color:#474747!important}.menu-style-1.menu-lt-gray .main-menu-top-li a:hover,.menu-style-1.menu-lt-gray .main-menu-top-li span:hover{color:#b00!important}.menu-style-1.menu-lt-gray .main-menu-top-li a:active,.menu-style-1.menu-lt-gray .main-menu-top-li span:active{color:#028da9!important}.menu-style-1.menu-lt-gray .main-menu-top-li a:focus,.menu-style-1.menu-lt-gray .main-menu-top-li span:focus{color:#d4df48!important}.menu-style-1.menu-lt-gray .main-menu-second-ul a,.menu-style-1.menu-lt-gray .main-menu-second-ul span{color:#4d4d4d!important}.menu-style-1.menu-lt-gray .main-menu-second-ul a:hover,.menu-style-1.menu-lt-gray .main-menu-second-ul span:hover{color:#b00!important}.menu-style-1.menu-lt-gray .main-menu-second-ul a:active,.menu-style-1.menu-lt-gray .main-menu-second-ul span:active{color:#028da9!important}.menu-style-1.menu-lt-gray .main-menu-second-ul a:focus,.menu-style-1.menu-lt-gray .main-menu-second-ul span:focus{color:#d4df48!important}.menu-style-1.menu-lt-gray .main-menu-second-ul .main-menu-second-li.active a,.menu-style-1.menu-lt-gray .main-menu-second-ul .main-menu-second-li.active a:hover,.menu-style-1.menu-lt-gray .main-menu-second-ul .main-menu-second-li.active span,.menu-style-1.menu-lt-gray .main-menu-second-ul .main-menu-second-li.active span:hover,.menu-style-1.menu-lt-gray .main-menu-second-ul .main-menu-second-li:hover a,.menu-style-1.menu-lt-gray .main-menu-second-ul .main-menu-second-li:hover a:hover,.menu-style-1.menu-lt-gray .main-menu-second-ul .main-menu-second-li:hover span,.menu-style-1.menu-lt-gray .main-menu-second-ul .main-menu-second-li:hover span:hover{color:#b00!important}.menu-style-1.menu-lt-gray .main-menu-second-ul .main-menu-second-li.active a:active,.menu-style-1.menu-lt-gray .main-menu-second-ul .main-menu-second-li.active span:active,.menu-style-1.menu-lt-gray .main-menu-second-ul .main-menu-second-li:hover a:active,.menu-style-1.menu-lt-gray .main-menu-second-ul .main-menu-second-li:hover span:active{color:#028da9!important}.menu-style-1.menu-lt-gray .main-menu-second-ul .main-menu-second-li.active a:focus,.menu-style-1.menu-lt-gray .main-menu-second-ul .main-menu-second-li.active span:focus,.menu-style-1.menu-lt-gray .main-menu-second-ul .main-menu-second-li:hover a:focus,.menu-style-1.menu-lt-gray .main-menu-second-ul .main-menu-second-li:hover span:focus{color:#d4df48!important}.menu-style-1.menu-md-gray .l-region--main-menu,.menu-style-1.menu-md-gray .l-region--main-menu-wrapper{background:#666}.menu-style-1.menu-md-gray .l-region--main-menu-second-wrapper,.menu-style-1.menu-md-gray .main-menu-second-ul{background:#4d4d4d}.menu-style-1.menu-md-gray #search-block-toggle{color:#fff}.menu-style-1.menu-md-gray #search-block-toggle:hover{color:#d4df48}.menu-style-1.menu-md-gray #search-block-toggle:active{color:#028da9}.menu-style-1.menu-md-gray #search-block-toggle:focus{color:#d4df48}.menu-style-1.menu-md-gray .sf-menu ul:before{border-bottom-color:#4d4d4d}.menu-style-1.menu-md-gray .main-menu-top-li a,.menu-style-1.menu-md-gray .main-menu-top-li span{color:#fff!important}.menu-style-1.menu-md-gray .main-menu-top-li a:hover,.menu-style-1.menu-md-gray .main-menu-top-li span:hover{color:#d2d2d2!important}.menu-style-1.menu-md-gray .main-menu-top-li a:active,.menu-style-1.menu-md-gray .main-menu-top-li span:active{color:#028da9!important}.menu-style-1.menu-md-gray .main-menu-top-li a:focus,.menu-style-1.menu-md-gray .main-menu-top-li span:focus{color:#d4df48!important}.menu-style-1.menu-md-gray .main-menu-second-ul a,.menu-style-1.menu-md-gray .main-menu-second-ul span{color:#fff!important}.menu-style-1.menu-md-gray .main-menu-second-ul a:hover,.menu-style-1.menu-md-gray .main-menu-second-ul span:hover{color:#d2d2d2!important}.menu-style-1.menu-md-gray .main-menu-second-ul a:active,.menu-style-1.menu-md-gray .main-menu-second-ul span:active{color:#028da9!important}.menu-style-1.menu-md-gray .main-menu-second-ul a:focus,.menu-style-1.menu-md-gray .main-menu-second-ul span:focus{color:#d4df48!important}.menu-style-1.menu-md-gray .main-menu-second-ul .main-menu-second-li.active a,.menu-style-1.menu-md-gray .main-menu-second-ul .main-menu-second-li.active a:hover,.menu-style-1.menu-md-gray .main-menu-second-ul .main-menu-second-li.active span,.menu-style-1.menu-md-gray .main-menu-second-ul .main-menu-second-li.active span:hover,.menu-style-1.menu-md-gray .main-menu-second-ul .main-menu-second-li:hover a,.menu-style-1.menu-md-gray .main-menu-second-ul .main-menu-second-li:hover a:hover,.menu-style-1.menu-md-gray .main-menu-second-ul .main-menu-second-li:hover span,.menu-style-1.menu-md-gray .main-menu-second-ul .main-menu-second-li:hover span:hover{color:#d2d2d2!important}.menu-style-1.menu-md-gray .main-menu-second-ul .main-menu-second-li.active a:active,.menu-style-1.menu-md-gray .main-menu-second-ul .main-menu-second-li.active span:active,.menu-style-1.menu-md-gray .main-menu-second-ul .main-menu-second-li:hover a:active,.menu-style-1.menu-md-gray .main-menu-second-ul .main-menu-second-li:hover span:active{color:#028da9!important}.menu-style-1.menu-md-gray .main-menu-second-ul .main-menu-second-li.active a:focus,.menu-style-1.menu-md-gray .main-menu-second-ul .main-menu-second-li.active span:focus,.menu-style-1.menu-md-gray .main-menu-second-ul .main-menu-second-li:hover a:focus,.menu-style-1.menu-md-gray .main-menu-second-ul .main-menu-second-li:hover span:focus{color:#d4df48!important}.menu-style-1.menu-dk-gray .l-region--main-menu,.menu-style-1.menu-dk-gray .l-region--main-menu-wrapper{background:#2d2d2d}.menu-style-1.menu-dk-gray .l-region--main-menu-second-wrapper,.menu-style-1.menu-dk-gray .main-menu-second-ul{background:#666}.menu-style-1.menu-dk-gray #search-block-toggle{color:#fff}.menu-style-1.menu-dk-gray #search-block-toggle:hover{color:#d4df48}.menu-style-1.menu-dk-gray #search-block-toggle:active{color:#028da9}.menu-style-1.menu-dk-gray #search-block-toggle:focus{color:#d4df48}.menu-style-1.menu-dk-gray .sf-menu ul:before{border-bottom-color:#666}.menu-style-1.menu-dk-gray .main-menu-top-li a,.menu-style-1.menu-dk-gray .main-menu-top-li span{color:#fff!important}.menu-style-1.menu-dk-gray .main-menu-top-li a:hover,.menu-style-1.menu-dk-gray .main-menu-top-li span:hover{color:#d2d2d2!important}.menu-style-1.menu-dk-gray .main-menu-top-li a:active,.menu-style-1.menu-dk-gray .main-menu-top-li span:active{color:#028da9!important}.menu-style-1.menu-dk-gray .main-menu-top-li a:focus,.menu-style-1.menu-dk-gray .main-menu-top-li span:focus{color:#d4df48!important}.menu-style-1.menu-dk-gray .main-menu-second-ul a,.menu-style-1.menu-dk-gray .main-menu-second-ul span{color:#fff!important}.menu-style-1.menu-dk-gray .main-menu-second-ul a:hover,.menu-style-1.menu-dk-gray .main-menu-second-ul span:hover{color:#d2d2d2!important}.menu-style-1.menu-dk-gray .main-menu-second-ul a:active,.menu-style-1.menu-dk-gray .main-menu-second-ul span:active{color:#028da9!important}.menu-style-1.menu-dk-gray .main-menu-second-ul a:focus,.menu-style-1.menu-dk-gray .main-menu-second-ul span:focus{color:#d4df48!important}.menu-style-1.menu-dk-gray .main-menu-second-ul .main-menu-second-li.active a,.menu-style-1.menu-dk-gray .main-menu-second-ul .main-menu-second-li.active a:hover,.menu-style-1.menu-dk-gray .main-menu-second-ul .main-menu-second-li.active span,.menu-style-1.menu-dk-gray .main-menu-second-ul .main-menu-second-li.active span:hover,.menu-style-1.menu-dk-gray .main-menu-second-ul .main-menu-second-li:hover a,.menu-style-1.menu-dk-gray .main-menu-second-ul .main-menu-second-li:hover a:hover,.menu-style-1.menu-dk-gray .main-menu-second-ul .main-menu-second-li:hover span,.menu-style-1.menu-dk-gray .main-menu-second-ul .main-menu-second-li:hover span:hover{color:#d2d2d2!important}.menu-style-1.menu-dk-gray .main-menu-second-ul .main-menu-second-li.active a:active,.menu-style-1.menu-dk-gray .main-menu-second-ul .main-menu-second-li.active span:active,.menu-style-1.menu-dk-gray .main-menu-second-ul .main-menu-second-li:hover a:active,.menu-style-1.menu-dk-gray .main-menu-second-ul .main-menu-second-li:hover span:active{color:#028da9!important}.menu-style-1.menu-dk-gray .main-menu-second-ul .main-menu-second-li.active a:focus,.menu-style-1.menu-dk-gray .main-menu-second-ul .main-menu-second-li.active span:focus,.menu-style-1.menu-dk-gray .main-menu-second-ul .main-menu-second-li:hover a:focus,.menu-style-1.menu-dk-gray .main-menu-second-ul .main-menu-second-li:hover span:focus{color:#d4df48!important}.menu-style-1.menu-black .l-region--main-menu,.menu-style-1.menu-black .l-region--main-menu-wrapper{background:#000}.menu-style-1.menu-black .l-region--main-menu-second-wrapper,.menu-style-1.menu-black .main-menu-second-ul{background:#3a3a3a}.menu-style-1.menu-black #search-block-toggle{color:#fff}.menu-style-1.menu-black #search-block-toggle:hover{color:#d4df48}.menu-style-1.menu-black #search-block-toggle:active{color:#028da9}.menu-style-1.menu-black #search-block-toggle:focus{color:#d4df48}.menu-style-1.menu-black .sf-menu ul:before{border-bottom-color:#3a3a3a}.menu-style-1.menu-red .sf-menu ul:before,.menu-style-2 .sf-menu ul:before,.menu-style-2.menu-white .sf-menu ul:before{border-bottom-color:#ebebeb}.menu-style-1.menu-black .main-menu-top-li a,.menu-style-1.menu-black .main-menu-top-li span{color:#fff!important}.menu-style-1.menu-black .main-menu-top-li a:hover,.menu-style-1.menu-black .main-menu-top-li span:hover{color:#d2d2d2!important}.menu-style-1.menu-black .main-menu-top-li a:active,.menu-style-1.menu-black .main-menu-top-li span:active{color:#028da9!important}.menu-style-1.menu-black .main-menu-top-li a:focus,.menu-style-1.menu-black .main-menu-top-li span:focus{color:#d4df48!important}.menu-style-1.menu-black .main-menu-second-ul a,.menu-style-1.menu-black .main-menu-second-ul span{color:#fff!important}.menu-style-1.menu-black .main-menu-second-ul a:hover,.menu-style-1.menu-black .main-menu-second-ul span:hover{color:#d2d2d2!important}.menu-style-1.menu-black .main-menu-second-ul a:active,.menu-style-1.menu-black .main-menu-second-ul span:active{color:#028da9!important}.menu-style-1.menu-black .main-menu-second-ul a:focus,.menu-style-1.menu-black .main-menu-second-ul span:focus{color:#d4df48!important}.menu-style-1.menu-black .main-menu-second-ul .main-menu-second-li.active a,.menu-style-1.menu-black .main-menu-second-ul .main-menu-second-li.active a:hover,.menu-style-1.menu-black .main-menu-second-ul .main-menu-second-li.active span,.menu-style-1.menu-black .main-menu-second-ul .main-menu-second-li.active span:hover,.menu-style-1.menu-black .main-menu-second-ul .main-menu-second-li:hover a,.menu-style-1.menu-black .main-menu-second-ul .main-menu-second-li:hover a:hover,.menu-style-1.menu-black .main-menu-second-ul .main-menu-second-li:hover span,.menu-style-1.menu-black .main-menu-second-ul .main-menu-second-li:hover span:hover{color:#d2d2d2!important}.menu-style-1.menu-black .main-menu-second-ul .main-menu-second-li.active a:active,.menu-style-1.menu-black .main-menu-second-ul .main-menu-second-li.active span:active,.menu-style-1.menu-black .main-menu-second-ul .main-menu-second-li:hover a:active,.menu-style-1.menu-black .main-menu-second-ul .main-menu-second-li:hover span:active{color:#028da9!important}.menu-style-1.menu-black .main-menu-second-ul .main-menu-second-li.active a:focus,.menu-style-1.menu-black .main-menu-second-ul .main-menu-second-li.active span:focus,.menu-style-1.menu-black .main-menu-second-ul .main-menu-second-li:hover a:focus,.menu-style-1.menu-black .main-menu-second-ul .main-menu-second-li:hover span:focus{color:#d4df48!important}.menu-style-1.menu-red .l-region--main-menu,.menu-style-1.menu-red .l-region--main-menu-wrapper{background:#b00}.menu-style-1.menu-red .l-region--main-menu-second-wrapper,.menu-style-1.menu-red .main-menu-second-ul{background:#ebebeb}.menu-style-1.menu-red #search-block-toggle{color:#fff}.menu-style-1.menu-red #search-block-toggle:hover{color:#d2d2d2}.menu-style-1.menu-red #search-block-toggle:active{color:#d4df48}.menu-style-1.menu-red #search-block-toggle:focus{color:#d2d2d2}.menu-style-1.menu-red .main-menu-top-li a,.menu-style-1.menu-red .main-menu-top-li span{color:#fff!important}.menu-style-1.menu-red .main-menu-top-li a:hover,.menu-style-1.menu-red .main-menu-top-li span:hover{color:#d2d2d2!important}.menu-style-1.menu-red .main-menu-top-li a:active,.menu-style-1.menu-red .main-menu-top-li span:active{color:#d4df48!important}.menu-style-1.menu-red .main-menu-top-li a:focus,.menu-style-1.menu-red .main-menu-top-li span:focus{color:#d2d2d2!important}.menu-style-1.menu-red .main-menu-second-ul a,.menu-style-1.menu-red .main-menu-second-ul span{color:#2d2d2d!important}.menu-style-1.menu-red .main-menu-second-ul a:hover,.menu-style-1.menu-red .main-menu-second-ul span:hover{color:#b00!important}.menu-style-1.menu-red .main-menu-second-ul a:active,.menu-style-1.menu-red .main-menu-second-ul span:active{color:#d4df48!important}.menu-style-1.menu-red .main-menu-second-ul a:focus,.menu-style-1.menu-red .main-menu-second-ul span:focus{color:#d2d2d2!important}.menu-style-1.menu-red .main-menu-second-ul .main-menu-second-li.active a,.menu-style-1.menu-red .main-menu-second-ul .main-menu-second-li.active a:hover,.menu-style-1.menu-red .main-menu-second-ul .main-menu-second-li.active span,.menu-style-1.menu-red .main-menu-second-ul .main-menu-second-li.active span:hover,.menu-style-1.menu-red .main-menu-second-ul .main-menu-second-li:hover a,.menu-style-1.menu-red .main-menu-second-ul .main-menu-second-li:hover a:hover,.menu-style-1.menu-red .main-menu-second-ul .main-menu-second-li:hover span,.menu-style-1.menu-red .main-menu-second-ul .main-menu-second-li:hover span:hover{color:#b00!important}.menu-style-1.menu-red .main-menu-second-ul .main-menu-second-li.active a:active,.menu-style-1.menu-red .main-menu-second-ul .main-menu-second-li.active span:active,.menu-style-1.menu-red .main-menu-second-ul .main-menu-second-li:hover a:active,.menu-style-1.menu-red .main-menu-second-ul .main-menu-second-li:hover span:active{color:#d4df48!important}.menu-style-1.menu-red .main-menu-second-ul .main-menu-second-li.active a:focus,.menu-style-1.menu-red .main-menu-second-ul .main-menu-second-li.active span:focus,.menu-style-1.menu-red .main-menu-second-ul .main-menu-second-li:hover a:focus,.menu-style-1.menu-red .main-menu-second-ul .main-menu-second-li:hover span:focus{color:#d2d2d2!important}.menu-style-2 .l-region--main-menu ul.sf-menu li{padding:.75em 1em}.menu-style-2 .l-region--main-menu ul.sf-menu li.sf-depth-2{display:inline-block;width:auto;padding-top:1em}.l-region--main-menu-second .main-menu-second-ul li{float:left;height:48px;text-transform:uppercase;padding:.75em 1em}.l-region--main-menu-second .main-menu-second-ul li a,.l-region--main-menu-second .main-menu-second-ul li span{font-weight:500;text-decoration:none}.l-region--main-menu-second .main-menu-second-ul li a:hover{text-decoration:none}.menu-style-2 .l-region--main-menu,.menu-style-2 .l-region--main-menu-wrapper,.menu-style-2.menu-white .l-region--main-menu,.menu-style-2.menu-white .l-region--main-menu-wrapper{background:#fff}.menu-style-2 .l-region--main-menu-second-wrapper,.menu-style-2.menu-white .l-region--main-menu-second-wrapper{background:#ebebeb}.menu-style-2 .l-region--main-menu-second-wrapper.menu-hover,.menu-style-2.menu-white .l-region--main-menu-second-wrapper.menu-hover{background:#d9d9d9}.menu-style-2 #search-block-toggle,.menu-style-2.menu-white #search-block-toggle{color:#666}.menu-style-2 #search-block-toggle:hover,.menu-style-2.menu-white #search-block-toggle:hover{color:#d4df48}.menu-style-2 #search-block-toggle:active,.menu-style-2.menu-white #search-block-toggle:active{color:#028da9}.menu-style-2 #search-block-toggle:focus,.menu-style-2.menu-white #search-block-toggle:focus{color:#d4df48}.menu-style-2 .main-menu-top-li a,.menu-style-2 .main-menu-top-li span,.menu-style-2.menu-white .main-menu-top-li a,.menu-style-2.menu-white .main-menu-top-li span{color:#666!important}.menu-style-2 .main-menu-top-li a:hover,.menu-style-2 .main-menu-top-li span:hover,.menu-style-2.menu-white .main-menu-top-li a:hover,.menu-style-2.menu-white .main-menu-top-li span:hover{color:#b00!important}.menu-style-2 .main-menu-top-li a:active,.menu-style-2 .main-menu-top-li span:active,.menu-style-2.menu-white .main-menu-top-li a:active,.menu-style-2.menu-white .main-menu-top-li span:active{color:#028da9!important}.menu-style-2 .main-menu-top-li a:focus,.menu-style-2 .main-menu-top-li span:focus,.menu-style-2.menu-white .main-menu-top-li a:focus,.menu-style-2.menu-white .main-menu-top-li span:focus{color:#d4df48!important}.menu-style-2 .main-menu-top-li.active-trail,.menu-style-2.menu-white .main-menu-top-li.active-trail{background:#ebebeb}.menu-style-2 .main-menu-second-ul,.menu-style-2 .main-menu-top-li:hover,.menu-style-2.menu-white .main-menu-second-ul,.menu-style-2.menu-white .main-menu-top-li:hover{background:#d9d9d9}.menu-style-2 .main-menu-top-li.active-trail a,.menu-style-2 .main-menu-top-li.active-trail a:hover,.menu-style-2 .main-menu-top-li.active-trail span,.menu-style-2 .main-menu-top-li.active-trail span:hover,.menu-style-2.menu-white .main-menu-top-li.active-trail a,.menu-style-2.menu-white .main-menu-top-li.active-trail a:hover,.menu-style-2.menu-white .main-menu-top-li.active-trail span,.menu-style-2.menu-white .main-menu-top-li.active-trail span:hover{color:#b00!important}.menu-style-2 .main-menu-top-li.active-trail a:active,.menu-style-2 .main-menu-top-li.active-trail span:active,.menu-style-2.menu-white .main-menu-top-li.active-trail a:active,.menu-style-2.menu-white .main-menu-top-li.active-trail span:active{color:#028da9!important}.menu-style-2 .main-menu-top-li.active-trail a:focus,.menu-style-2 .main-menu-top-li.active-trail span:focus,.menu-style-2.menu-white .main-menu-top-li.active-trail a:focus,.menu-style-2.menu-white .main-menu-top-li.active-trail span:focus{color:#d4df48!important}.menu-style-2 .main-menu-second-ul a,.menu-style-2 .main-menu-second-ul span,.menu-style-2 .main-menu-top-li:hover a,.menu-style-2 .main-menu-top-li:hover a:hover,.menu-style-2 .main-menu-top-li:hover span,.menu-style-2 .main-menu-top-li:hover span:hover,.menu-style-2.menu-white .main-menu-second-ul a,.menu-style-2.menu-white .main-menu-second-ul span,.menu-style-2.menu-white .main-menu-top-li:hover a,.menu-style-2.menu-white .main-menu-top-li:hover a:hover,.menu-style-2.menu-white .main-menu-top-li:hover span,.menu-style-2.menu-white .main-menu-top-li:hover span:hover{color:#666!important}.menu-style-2 .main-menu-second-ul a:hover,.menu-style-2 .main-menu-second-ul span:hover,.menu-style-2.menu-white .main-menu-second-ul a:hover,.menu-style-2.menu-white .main-menu-second-ul span:hover{color:#b00!important}.menu-style-2 .main-menu-second-ul a:active,.menu-style-2 .main-menu-second-ul span:active,.menu-style-2.menu-white .main-menu-second-ul a:active,.menu-style-2.menu-white .main-menu-second-ul span:active{color:#028da9!important}.menu-style-2 .main-menu-second-ul a:focus,.menu-style-2 .main-menu-second-ul span:focus,.menu-style-2.menu-white .main-menu-second-ul a:focus,.menu-style-2.menu-white .main-menu-second-ul span:focus{color:#d4df48!important}.menu-style-2 .main-menu-second-ul .main-menu-second-li.active a,.menu-style-2 .main-menu-second-ul .main-menu-second-li.active a:hover,.menu-style-2 .main-menu-second-ul .main-menu-second-li.active span,.menu-style-2 .main-menu-second-ul .main-menu-second-li.active span:hover,.menu-style-2 .main-menu-second-ul .main-menu-second-li:hover a,.menu-style-2 .main-menu-second-ul .main-menu-second-li:hover a:hover,.menu-style-2 .main-menu-second-ul .main-menu-second-li:hover span,.menu-style-2 .main-menu-second-ul .main-menu-second-li:hover span:hover,.menu-style-2 .main-menu-second-ul a.active-trail,.menu-style-2 .main-menu-second-ul span.active-trail,.menu-style-2.menu-white .main-menu-second-ul .main-menu-second-li.active a,.menu-style-2.menu-white .main-menu-second-ul .main-menu-second-li.active a:hover,.menu-style-2.menu-white .main-menu-second-ul .main-menu-second-li.active span,.menu-style-2.menu-white .main-menu-second-ul .main-menu-second-li.active span:hover,.menu-style-2.menu-white .main-menu-second-ul .main-menu-second-li:hover a,.menu-style-2.menu-white .main-menu-second-ul .main-menu-second-li:hover a:hover,.menu-style-2.menu-white .main-menu-second-ul .main-menu-second-li:hover span,.menu-style-2.menu-white .main-menu-second-ul .main-menu-second-li:hover span:hover,.menu-style-2.menu-white .main-menu-second-ul a.active-trail,.menu-style-2.menu-white .main-menu-second-ul span.active-trail{color:#b00!important}.menu-style-2 .main-menu-second-ul .main-menu-second-li.active a:active,.menu-style-2 .main-menu-second-ul .main-menu-second-li.active span:active,.menu-style-2 .main-menu-second-ul .main-menu-second-li:hover a:active,.menu-style-2 .main-menu-second-ul .main-menu-second-li:hover span:active,.menu-style-2.menu-white .main-menu-second-ul .main-menu-second-li.active a:active,.menu-style-2.menu-white .main-menu-second-ul .main-menu-second-li.active span:active,.menu-style-2.menu-white .main-menu-second-ul .main-menu-second-li:hover a:active,.menu-style-2.menu-white .main-menu-second-ul .main-menu-second-li:hover span:active{color:#028da9!important}.menu-style-2 .main-menu-second-ul .main-menu-second-li.active a:focus,.menu-style-2 .main-menu-second-ul .main-menu-second-li.active span:focus,.menu-style-2 .main-menu-second-ul .main-menu-second-li:hover a:focus,.menu-style-2 .main-menu-second-ul .main-menu-second-li:hover span:focus,.menu-style-2.menu-white .main-menu-second-ul .main-menu-second-li.active a:focus,.menu-style-2.menu-white .main-menu-second-ul .main-menu-second-li.active span:focus,.menu-style-2.menu-white .main-menu-second-ul .main-menu-second-li:hover a:focus,.menu-style-2.menu-white .main-menu-second-ul .main-menu-second-li:hover span:focus{color:#d4df48!important}.menu-style-2.menu-lt-gray .l-region--main-menu,.menu-style-2.menu-lt-gray .l-region--main-menu-wrapper{background:#ebebeb}.menu-style-2.menu-lt-gray .l-region--main-menu-second-wrapper,.menu-style-2.menu-lt-gray .l-region--main-menu-second-wrapper.menu-hover,.menu-style-2.menu-lt-gray .main-menu-second-ul,.menu-style-2.menu-lt-gray .main-menu-top-li.active-trail,.menu-style-2.menu-lt-gray .main-menu-top-li:hover{background:#d7d7d7}.menu-style-2.menu-lt-gray #search-block-toggle{color:#2d2d2d}.menu-style-2.menu-lt-gray #search-block-toggle:hover{color:#d4df48}.menu-style-2.menu-lt-gray #search-block-toggle:active{color:#028da9}.menu-style-2.menu-lt-gray #search-block-toggle:focus{color:#d4df48}.menu-style-2.menu-lt-gray .sf-menu ul:before{border-bottom-color:#d7d7d7}.menu-style-2.menu-black .sf-menu ul:before,.menu-style-2.menu-dk-gray .sf-menu ul:before,.menu-style-2.menu-md-gray .sf-menu ul:before{border-bottom-color:#ebebeb}.menu-style-2.menu-lt-gray .main-menu-top-li a,.menu-style-2.menu-lt-gray .main-menu-top-li a:hover,.menu-style-2.menu-lt-gray .main-menu-top-li span,.menu-style-2.menu-lt-gray .main-menu-top-li span:hover{color:#2d2d2d!important}.menu-style-2.menu-lt-gray .main-menu-top-li a:active,.menu-style-2.menu-lt-gray .main-menu-top-li span:active{color:#028da9!important}.menu-style-2.menu-lt-gray .main-menu-top-li a:focus,.menu-style-2.menu-lt-gray .main-menu-top-li span:focus{color:#d4df48!important}.menu-style-2.menu-lt-gray .main-menu-top-li.active-trail a,.menu-style-2.menu-lt-gray .main-menu-top-li.active-trail span{color:#2d2d2d!important}.menu-style-2.menu-lt-gray .main-menu-top-li.active-trail a:hover,.menu-style-2.menu-lt-gray .main-menu-top-li.active-trail span:hover{color:#b00!important}.menu-style-2.menu-lt-gray .main-menu-top-li.active-trail a:active,.menu-style-2.menu-lt-gray .main-menu-top-li.active-trail span:active{color:#028da9!important}.menu-style-2.menu-lt-gray .main-menu-top-li.active-trail a:focus,.menu-style-2.menu-lt-gray .main-menu-top-li.active-trail span:focus{color:#d4df48!important}.menu-style-2.menu-lt-gray .main-menu-second-ul a,.menu-style-2.menu-lt-gray .main-menu-second-ul span,.menu-style-2.menu-lt-gray .main-menu-top-li:hover a,.menu-style-2.menu-lt-gray .main-menu-top-li:hover a:hover,.menu-style-2.menu-lt-gray .main-menu-top-li:hover span,.menu-style-2.menu-lt-gray .main-menu-top-li:hover span:hover{color:#2d2d2d!important}.menu-style-2.menu-lt-gray .main-menu-second-ul a:hover,.menu-style-2.menu-lt-gray .main-menu-second-ul span:hover{color:#b00!important}.menu-style-2.menu-lt-gray .main-menu-second-ul a:active,.menu-style-2.menu-lt-gray .main-menu-second-ul span:active{color:#028da9!important}.menu-style-2.menu-lt-gray .main-menu-second-ul a:focus,.menu-style-2.menu-lt-gray .main-menu-second-ul span:focus{color:#d4df48!important}.menu-style-2.menu-lt-gray .main-menu-second-ul .main-menu-second-li.active a,.menu-style-2.menu-lt-gray .main-menu-second-ul .main-menu-second-li.active a:hover,.menu-style-2.menu-lt-gray .main-menu-second-ul .main-menu-second-li.active span,.menu-style-2.menu-lt-gray .main-menu-second-ul .main-menu-second-li.active span:hover,.menu-style-2.menu-lt-gray .main-menu-second-ul .main-menu-second-li:hover a,.menu-style-2.menu-lt-gray .main-menu-second-ul .main-menu-second-li:hover a:hover,.menu-style-2.menu-lt-gray .main-menu-second-ul .main-menu-second-li:hover span,.menu-style-2.menu-lt-gray .main-menu-second-ul .main-menu-second-li:hover span:hover,.menu-style-2.menu-lt-gray .main-menu-second-ul a.active-trail,.menu-style-2.menu-lt-gray .main-menu-second-ul span.active-trail{color:#b00!important}.menu-style-2.menu-lt-gray .main-menu-second-ul .main-menu-second-li.active a:active,.menu-style-2.menu-lt-gray .main-menu-second-ul .main-menu-second-li.active span:active,.menu-style-2.menu-lt-gray .main-menu-second-ul .main-menu-second-li:hover a:active,.menu-style-2.menu-lt-gray .main-menu-second-ul .main-menu-second-li:hover span:active{color:#028da9!important}.menu-style-2.menu-lt-gray .main-menu-second-ul .main-menu-second-li.active a:focus,.menu-style-2.menu-lt-gray .main-menu-second-ul .main-menu-second-li.active span:focus,.menu-style-2.menu-lt-gray .main-menu-second-ul .main-menu-second-li:hover a:focus,.menu-style-2.menu-lt-gray .main-menu-second-ul .main-menu-second-li:hover span:focus{color:#d4df48!important}.menu-style-2.menu-md-gray .l-region--main-menu,.menu-style-2.menu-md-gray .l-region--main-menu-wrapper{background:#666}.menu-style-2.menu-md-gray .l-region--main-menu-second-wrapper{background:#ebebeb}.menu-style-2.menu-md-gray .l-region--main-menu-second-wrapper.menu-hover{background:#dedede}.menu-style-2.menu-md-gray #search-block-toggle{color:#fff}.menu-style-2.menu-md-gray #search-block-toggle:hover{color:#d4df48}.menu-style-2.menu-md-gray #search-block-toggle:active{color:#028da9}.menu-style-2.menu-md-gray #search-block-toggle:focus{color:#d4df48}.menu-style-2.menu-md-gray .main-menu-top-li a,.menu-style-2.menu-md-gray .main-menu-top-li span{color:#fff!important}.menu-style-2.menu-md-gray .main-menu-top-li a:hover,.menu-style-2.menu-md-gray .main-menu-top-li span:hover{color:#4d4d4d!important}.menu-style-2.menu-md-gray .main-menu-top-li a:active,.menu-style-2.menu-md-gray .main-menu-top-li span:active{color:#028da9!important}.menu-style-2.menu-md-gray .main-menu-top-li a:focus,.menu-style-2.menu-md-gray .main-menu-top-li span:focus{color:#d4df48!important}.menu-style-2.menu-md-gray .main-menu-top-li.active-trail{background:#ebebeb}.menu-style-2.menu-md-gray .main-menu-second-ul,.menu-style-2.menu-md-gray .main-menu-top-li:hover{background:#dedede}.menu-style-2.menu-md-gray .main-menu-top-li.active-trail a,.menu-style-2.menu-md-gray .main-menu-top-li.active-trail span{color:#4d4d4d!important}.menu-style-2.menu-md-gray .main-menu-top-li.active-trail a:hover,.menu-style-2.menu-md-gray .main-menu-top-li.active-trail span:hover{color:#b00!important}.menu-style-2.menu-md-gray .main-menu-top-li.active-trail a:active,.menu-style-2.menu-md-gray .main-menu-top-li.active-trail span:active{color:#028da9!important}.menu-style-2.menu-md-gray .main-menu-top-li.active-trail a:focus,.menu-style-2.menu-md-gray .main-menu-top-li.active-trail span:focus{color:#d4df48!important}.menu-style-2.menu-md-gray .main-menu-second-ul a,.menu-style-2.menu-md-gray .main-menu-second-ul span,.menu-style-2.menu-md-gray .main-menu-top-li:hover a,.menu-style-2.menu-md-gray .main-menu-top-li:hover a:hover,.menu-style-2.menu-md-gray .main-menu-top-li:hover span,.menu-style-2.menu-md-gray .main-menu-top-li:hover span:hover{color:#4d4d4d!important}.menu-style-2.menu-md-gray .main-menu-second-ul a:hover,.menu-style-2.menu-md-gray .main-menu-second-ul span:hover{color:#b00!important}.menu-style-2.menu-md-gray .main-menu-second-ul a:active,.menu-style-2.menu-md-gray .main-menu-second-ul span:active{color:#028da9!important}.menu-style-2.menu-md-gray .main-menu-second-ul a:focus,.menu-style-2.menu-md-gray .main-menu-second-ul span:focus{color:#d4df48!important}.menu-style-2.menu-md-gray .main-menu-second-ul .main-menu-second-li.active a,.menu-style-2.menu-md-gray .main-menu-second-ul .main-menu-second-li.active a:hover,.menu-style-2.menu-md-gray .main-menu-second-ul .main-menu-second-li.active span,.menu-style-2.menu-md-gray .main-menu-second-ul .main-menu-second-li.active span:hover,.menu-style-2.menu-md-gray .main-menu-second-ul .main-menu-second-li:hover a,.menu-style-2.menu-md-gray .main-menu-second-ul .main-menu-second-li:hover a:hover,.menu-style-2.menu-md-gray .main-menu-second-ul .main-menu-second-li:hover span,.menu-style-2.menu-md-gray .main-menu-second-ul .main-menu-second-li:hover span:hover,.menu-style-2.menu-md-gray .main-menu-second-ul a.active-trail,.menu-style-2.menu-md-gray .main-menu-second-ul span.active-trail{color:#b00!important}.menu-style-2.menu-md-gray .main-menu-second-ul .main-menu-second-li.active a:active,.menu-style-2.menu-md-gray .main-menu-second-ul .main-menu-second-li.active span:active,.menu-style-2.menu-md-gray .main-menu-second-ul .main-menu-second-li:hover a:active,.menu-style-2.menu-md-gray .main-menu-second-ul .main-menu-second-li:hover span:active{color:#028da9!important}.menu-style-2.menu-md-gray .main-menu-second-ul .main-menu-second-li.active a:focus,.menu-style-2.menu-md-gray .main-menu-second-ul .main-menu-second-li.active span:focus,.menu-style-2.menu-md-gray .main-menu-second-ul .main-menu-second-li:hover a:focus,.menu-style-2.menu-md-gray .main-menu-second-ul .main-menu-second-li:hover span:focus{color:#d4df48!important}.menu-style-2.menu-dk-gray .l-region--main-menu,.menu-style-2.menu-dk-gray .l-region--main-menu-wrapper{background:#2d2d2d}.menu-style-2.menu-dk-gray .l-region--main-menu-second-wrapper{background:#ebebeb}.menu-style-2.menu-dk-gray .l-region--main-menu-second-wrapper.menu-hover{background:#d2d2d2}.menu-style-2.menu-dk-gray #search-block-toggle{color:#fff}.menu-style-2.menu-dk-gray #search-block-toggle:hover{color:#d4df48}.menu-style-2.menu-dk-gray #search-block-toggle:active{color:#028da9}.menu-style-2.menu-dk-gray #search-block-toggle:focus{color:#d4df48}.menu-style-2.menu-dk-gray .main-menu-top-li a,.menu-style-2.menu-dk-gray .main-menu-top-li span{color:#fff!important}.menu-style-2.menu-dk-gray .main-menu-top-li a:hover,.menu-style-2.menu-dk-gray .main-menu-top-li span:hover{color:#2d2d2d!important}.menu-style-2.menu-dk-gray .main-menu-top-li a:active,.menu-style-2.menu-dk-gray .main-menu-top-li span:active{color:#028da9!important}.menu-style-2.menu-dk-gray .main-menu-top-li a:focus,.menu-style-2.menu-dk-gray .main-menu-top-li span:focus{color:#d4df48!important}.menu-style-2.menu-dk-gray .main-menu-top-li.active-trail{background:#ebebeb}.menu-style-2.menu-dk-gray .main-menu-second-ul,.menu-style-2.menu-dk-gray .main-menu-top-li:hover{background:#d2d2d2}.menu-style-2.menu-dk-gray .main-menu-top-li.active-trail a,.menu-style-2.menu-dk-gray .main-menu-top-li.active-trail span{color:#2d2d2d!important}.menu-style-2.menu-dk-gray .main-menu-top-li.active-trail a:hover,.menu-style-2.menu-dk-gray .main-menu-top-li.active-trail span:hover{color:#b00!important}.menu-style-2.menu-dk-gray .main-menu-top-li.active-trail a:active,.menu-style-2.menu-dk-gray .main-menu-top-li.active-trail span:active{color:#028da9!important}.menu-style-2.menu-dk-gray .main-menu-top-li.active-trail a:focus,.menu-style-2.menu-dk-gray .main-menu-top-li.active-trail span:focus{color:#d4df48!important}.menu-style-2.menu-dk-gray .main-menu-second-ul a,.menu-style-2.menu-dk-gray .main-menu-second-ul span,.menu-style-2.menu-dk-gray .main-menu-top-li:hover a,.menu-style-2.menu-dk-gray .main-menu-top-li:hover a:hover,.menu-style-2.menu-dk-gray .main-menu-top-li:hover span,.menu-style-2.menu-dk-gray .main-menu-top-li:hover span:hover{color:#2d2d2d!important}.menu-style-2.menu-dk-gray .main-menu-second-ul a:hover,.menu-style-2.menu-dk-gray .main-menu-second-ul span:hover{color:#b00!important}.menu-style-2.menu-dk-gray .main-menu-second-ul a:active,.menu-style-2.menu-dk-gray .main-menu-second-ul span:active{color:#028da9!important}.menu-style-2.menu-dk-gray .main-menu-second-ul a:focus,.menu-style-2.menu-dk-gray .main-menu-second-ul span:focus{color:#d4df48!important}.menu-style-2.menu-dk-gray .main-menu-second-ul .main-menu-second-li.active a,.menu-style-2.menu-dk-gray .main-menu-second-ul .main-menu-second-li.active a:hover,.menu-style-2.menu-dk-gray .main-menu-second-ul .main-menu-second-li.active span,.menu-style-2.menu-dk-gray .main-menu-second-ul .main-menu-second-li.active span:hover,.menu-style-2.menu-dk-gray .main-menu-second-ul .main-menu-second-li:hover a,.menu-style-2.menu-dk-gray .main-menu-second-ul .main-menu-second-li:hover a:hover,.menu-style-2.menu-dk-gray .main-menu-second-ul .main-menu-second-li:hover span,.menu-style-2.menu-dk-gray .main-menu-second-ul .main-menu-second-li:hover span:hover,.menu-style-2.menu-dk-gray .main-menu-second-ul a.active-trail,.menu-style-2.menu-dk-gray .main-menu-second-ul span.active-trail{color:#b00!important}.menu-style-2.menu-dk-gray .main-menu-second-ul .main-menu-second-li.active a:active,.menu-style-2.menu-dk-gray .main-menu-second-ul .main-menu-second-li.active span:active,.menu-style-2.menu-dk-gray .main-menu-second-ul .main-menu-second-li:hover a:active,.menu-style-2.menu-dk-gray .main-menu-second-ul .main-menu-second-li:hover span:active{color:#028da9!important}.menu-style-2.menu-dk-gray .main-menu-second-ul .main-menu-second-li.active a:focus,.menu-style-2.menu-dk-gray .main-menu-second-ul .main-menu-second-li.active span:focus,.menu-style-2.menu-dk-gray .main-menu-second-ul .main-menu-second-li:hover a:focus,.menu-style-2.menu-dk-gray .main-menu-second-ul .main-menu-second-li:hover span:focus{color:#d4df48!important}.menu-style-2.menu-black .l-region--main-menu,.menu-style-2.menu-black .l-region--main-menu-wrapper{background:#000}.menu-style-2.menu-black .l-region--main-menu-second-wrapper{background:#ebebeb}.menu-style-2.menu-black .l-region--main-menu-second-wrapper.menu-hover{background:#d2d2d2}.menu-style-2.menu-black #search-block-toggle{color:#fff}.menu-style-2.menu-black #search-block-toggle:hover{color:#d4df48}.menu-style-2.menu-black #search-block-toggle:active{color:#028da9}.menu-style-2.menu-black #search-block-toggle:focus{color:#d4df48}.menu-style-2.menu-black .main-menu-top-li a,.menu-style-2.menu-black .main-menu-top-li span{color:#fff!important}.menu-style-2.menu-black .main-menu-top-li a:hover,.menu-style-2.menu-black .main-menu-top-li span:hover{color:#2d2d2d!important}.menu-style-2.menu-black .main-menu-top-li a:active,.menu-style-2.menu-black .main-menu-top-li span:active{color:#028da9!important}.menu-style-2.menu-black .main-menu-top-li a:focus,.menu-style-2.menu-black .main-menu-top-li span:focus{color:#d4df48!important}.menu-style-2.menu-black .main-menu-top-li.active-trail{background:#ebebeb}.menu-style-2.menu-black .main-menu-second-ul,.menu-style-2.menu-black .main-menu-top-li:hover{background:#d2d2d2}.menu-style-2.menu-black .main-menu-top-li.active-trail a,.menu-style-2.menu-black .main-menu-top-li.active-trail span{color:#2d2d2d!important}.menu-style-2.menu-black .main-menu-top-li.active-trail a:hover,.menu-style-2.menu-black .main-menu-top-li.active-trail span:hover{color:#b00!important}.menu-style-2.menu-black .main-menu-top-li.active-trail a:active,.menu-style-2.menu-black .main-menu-top-li.active-trail span:active{color:#028da9!important}.menu-style-2.menu-black .main-menu-top-li.active-trail a:focus,.menu-style-2.menu-black .main-menu-top-li.active-trail span:focus{color:#d4df48!important}.menu-style-2.menu-black .main-menu-second-ul a,.menu-style-2.menu-black .main-menu-second-ul span,.menu-style-2.menu-black .main-menu-top-li:hover a,.menu-style-2.menu-black .main-menu-top-li:hover a:hover,.menu-style-2.menu-black .main-menu-top-li:hover span,.menu-style-2.menu-black .main-menu-top-li:hover span:hover{color:#2d2d2d!important}.menu-style-2.menu-black .main-menu-second-ul a:hover,.menu-style-2.menu-black .main-menu-second-ul span:hover{color:#b00!important}.menu-style-2.menu-black .main-menu-second-ul a:active,.menu-style-2.menu-black .main-menu-second-ul span:active{color:#028da9!important}.menu-style-2.menu-black .main-menu-second-ul a:focus,.menu-style-2.menu-black .main-menu-second-ul span:focus{color:#d4df48!important}.menu-style-2.menu-black .main-menu-second-ul .main-menu-second-li.active a,.menu-style-2.menu-black .main-menu-second-ul .main-menu-second-li.active a:hover,.menu-style-2.menu-black .main-menu-second-ul .main-menu-second-li.active span,.menu-style-2.menu-black .main-menu-second-ul .main-menu-second-li.active span:hover,.menu-style-2.menu-black .main-menu-second-ul .main-menu-second-li:hover a,.menu-style-2.menu-black .main-menu-second-ul .main-menu-second-li:hover a:hover,.menu-style-2.menu-black .main-menu-second-ul .main-menu-second-li:hover span,.menu-style-2.menu-black .main-menu-second-ul .main-menu-second-li:hover span:hover,.menu-style-2.menu-black .main-menu-second-ul a.active-trail,.menu-style-2.menu-black .main-menu-second-ul span.active-trail{color:#b00!important}.menu-style-2.menu-black .main-menu-second-ul .main-menu-second-li.active a:active,.menu-style-2.menu-black .main-menu-second-ul .main-menu-second-li.active span:active,.menu-style-2.menu-black .main-menu-second-ul .main-menu-second-li:hover a:active,.menu-style-2.menu-black .main-menu-second-ul .main-menu-second-li:hover span:active{color:#028da9!important}.menu-style-2.menu-black .main-menu-second-ul .main-menu-second-li.active a:focus,.menu-style-2.menu-black .main-menu-second-ul .main-menu-second-li.active span:focus,.menu-style-2.menu-black .main-menu-second-ul .main-menu-second-li:hover a:focus,.menu-style-2.menu-black .main-menu-second-ul .main-menu-second-li:hover span:focus{color:#d4df48!important}.menu-style-2.menu-red .l-region--main-menu,.menu-style-2.menu-red .l-region--main-menu-wrapper{background:#b00}.menu-style-2.menu-red .l-region--main-menu-second-wrapper{background:#eee}.menu-style-2.menu-red .l-region--main-menu-second-wrapper.menu-hover{background:#dcdcdc}.menu-style-2.menu-red #search-block-toggle{color:#fff}.menu-style-2.menu-red #search-block-toggle:hover{color:#d2d2d2}.menu-style-2.menu-red #search-block-toggle:active{color:#028da9}.menu-style-2.menu-red #search-block-toggle:focus{color:#d2d2d2}.menu-style-2.menu-red .sf-menu ul:before{border-bottom-color:#eee}.menu-style-2.menu-red .main-menu-top-li a,.menu-style-2.menu-red .main-menu-top-li span{color:#fff!important}.menu-style-2.menu-red .main-menu-top-li a:hover,.menu-style-2.menu-red .main-menu-top-li span:hover{color:#2d2d2d!important}.menu-style-2.menu-red .main-menu-top-li a:active,.menu-style-2.menu-red .main-menu-top-li span:active{color:#028da9!important}.menu-style-2.menu-red .main-menu-top-li a:focus,.menu-style-2.menu-red .main-menu-top-li span:focus{color:#d2d2d2!important}.menu-style-2.menu-red .main-menu-top-li.active-trail{background:#eee}.menu-style-2.menu-red .main-menu-second-ul,.menu-style-2.menu-red .main-menu-top-li:hover{background:#dcdcdc}.menu-style-2.menu-red .main-menu-top-li.active-trail a,.menu-style-2.menu-red .main-menu-top-li.active-trail span{color:#2d2d2d!important}.menu-style-2.menu-red .main-menu-top-li.active-trail a:hover,.menu-style-2.menu-red .main-menu-top-li.active-trail span:hover{color:#b00!important}.menu-style-2.menu-red .main-menu-top-li.active-trail a:active,.menu-style-2.menu-red .main-menu-top-li.active-trail span:active{color:#028da9!important}.menu-style-2.menu-red .main-menu-top-li.active-trail a:focus,.menu-style-2.menu-red .main-menu-top-li.active-trail span:focus{color:#d2d2d2!important}.menu-style-2.menu-red .main-menu-second-ul a,.menu-style-2.menu-red .main-menu-second-ul span,.menu-style-2.menu-red .main-menu-top-li:hover a,.menu-style-2.menu-red .main-menu-top-li:hover a:hover,.menu-style-2.menu-red .main-menu-top-li:hover span,.menu-style-2.menu-red .main-menu-top-li:hover span:hover{color:#2d2d2d!important}.panels-ipe .modal-content .panels-choose-layout .layout-link.current-layout,.sidebar-panel{background-color:#ebebeb}.menu-style-2.menu-red .main-menu-second-ul a:hover,.menu-style-2.menu-red .main-menu-second-ul span:hover{color:#b00!important}.menu-style-2.menu-red .main-menu-second-ul a:active,.menu-style-2.menu-red .main-menu-second-ul span:active{color:#028da9!important}.menu-style-2.menu-red .main-menu-second-ul a:focus,.menu-style-2.menu-red .main-menu-second-ul span:focus{color:#d2d2d2!important}.menu-style-2.menu-red .main-menu-second-ul .main-menu-second-li.active a,.menu-style-2.menu-red .main-menu-second-ul .main-menu-second-li.active a:hover,.menu-style-2.menu-red .main-menu-second-ul .main-menu-second-li.active span,.menu-style-2.menu-red .main-menu-second-ul .main-menu-second-li.active span:hover,.menu-style-2.menu-red .main-menu-second-ul .main-menu-second-li:hover a,.menu-style-2.menu-red .main-menu-second-ul .main-menu-second-li:hover a:hover,.menu-style-2.menu-red .main-menu-second-ul .main-menu-second-li:hover span,.menu-style-2.menu-red .main-menu-second-ul .main-menu-second-li:hover span:hover,.menu-style-2.menu-red .main-menu-second-ul a.active-trail,.menu-style-2.menu-red .main-menu-second-ul span.active-trail{color:#b00!important}.menu-style-2.menu-red .main-menu-second-ul .main-menu-second-li.active a:active,.menu-style-2.menu-red .main-menu-second-ul .main-menu-second-li.active span:active,.menu-style-2.menu-red .main-menu-second-ul .main-menu-second-li:hover a:active,.menu-style-2.menu-red .main-menu-second-ul .main-menu-second-li:hover span:active{color:#028da9!important}.menu-style-2.menu-red .main-menu-second-ul .main-menu-second-li.active a:focus,.menu-style-2.menu-red .main-menu-second-ul .main-menu-second-li.active span:focus,.menu-style-2.menu-red .main-menu-second-ul .main-menu-second-li:hover a:focus,.menu-style-2.menu-red .main-menu-second-ul .main-menu-second-li:hover span:focus{color:#d2d2d2!important}.panels-ipe-editing .panels-row.empty{display:block}.panels-ipe .modal-content .panels-choose-layout .layout-link{text-align:center;height:190px}.panels-ipe .modal-content .panels-choose-layout .layout-link img{margin-top:.8em}.panels-ipe .modal-content .panels-choose-layout .layout-link .ajax-progress-throbber{display:block;text-align:center;margin:0 auto}.panels-ipe .modal-content .change-layout-display{display:table;margin:2em auto;text-align:center}.panels-ipe .modal-content .change-layout-display .layout-icon{text-align:center}.panels-ipe .modal-content .change-layout-display>img{padding:5em 2em}.panels-ipe .modal-content #panels-dnd-main div.panel-region h2.label{margin:.5em 0}.panels-ipe-editing .panels-ipe-portlet-content{overflow:visible}.panels-ipe-sort-container>.panels-ipe-portlet-wrapper:first-child .panel-pane{margin-top:20px}.panels-ipe-sort-container>.panels-ipe-portlet-wrapper:last-child .panel-pane{margin-bottom:0}.panel-pane{margin-bottom:40px!important}.panel-pane:last-child{margin-bottom:0!important}.panel-pane.pane-bundle-tile-pane,.panel-pane.pane-bundle-tile-pane-plus-text-area{margin-bottom:30px!important}.panels-ipe-region .panels-ipe-portlet-wrapper .panel-pane{margin-bottom:40px!important}.panels-ipe-region .panels-ipe-portlet-wrapper .panel-pane.pane-bundle-tile-pane,.panels-ipe-region .panels-ipe-portlet-wrapper .panel-pane.pane-bundle-tile-pane-plus-text-area{margin-bottom:20px!important}.panel-pane.title-only{margin-bottom:0!important}.panel-pane.title-only h2.underlined{margin-bottom:10px}.panels-ipe-region .panels-ipe-portlet-wrapper .panel-pane.title-only{margin-bottom:0!important}.panels-ipe-processed .panel-pane{margin-top:0!important}div.pane-bundle-video .media-vimeo-video,div.pane-bundle-video .media-youtube-video{height:auto;padding:0}.sidebar-panel{padding:1em}.sidebar-panel .panel-pane{margin-top:0;margin-bottom:0}.sidebar-panel>.panel-pane:first-child,.sidebar-panel>.panels-ipe-portlet-wrapper:first-child .panel-pane{margin-top:0}.panels-row.active{padding:15px 0}.panels-row.empty{padding:0;display:none}.panels-row.even,.panels-row.odd{padding:30px 0}.panels-row.first{padding-top:7.5px}.panels-row.last{padding-bottom:30px}.node-type-ocio-landing-page .l-main.lt-gray,.node-type-ocio-landing-page .l-main.lt-gray .panels-row.even{background:#ebebeb}.node-type-ocio-landing-page .l-main.lt-gray .panels-row.odd,.node-type-ocio-landing-page .l-main.white,.node-type-ocio-landing-page .l-main.white .panels-row.even{background:#fff}.node-type-ocio-landing-page .l-main.white .panels-row.odd{background:#ebebeb}.panel-pane.pane-bundle-tile-pane,.panel-pane.pane-bundle-tile-pane-plus-text-area{box-shadow:0 1px 1px 0 rgba(0,0,0,.22);padding:0;z-index:9}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane{background:#fff;width:100%;z-index:99}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.tile-pane-linked:hover,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.tile-pane-linked:hover{opacity:.85}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane>a,.panel-pane.pane-bundle-tile-pane .ui-accordion-content .fieldable-panels-pane>a,.panel-pane.pane-bundle-tile-pane .ui-tabs-content .fieldable-panels-pane>a,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane>a,.panel-pane.pane-bundle-tile-pane-plus-text-area .ui-accordion-content .fieldable-panels-pane>a,.panel-pane.pane-bundle-tile-pane-plus-text-area .ui-tabs-content .fieldable-panels-pane>a{text-decoration:none;height:100%;display:block}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane .field--name-field-tile-background-img img,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane .field--name-field-tile-background-img img{display:block;width:100%}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane blockquote.pull-quote li,.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane blockquote.pull-quote p,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane blockquote.pull-quote li,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane blockquote.pull-quote p{font-size:20px;font-size:2rem}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane a,.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane a:visited{color:#b00}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane a:focus{color:#028da9}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane a:hover{color:#666}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane a:active{color:#028da9}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.lt-gray{background:#ebebeb}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.lt-gray a,.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.lt-gray a:visited{color:#2d2d2d}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.lt-gray a:focus{color:#028da9}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.lt-gray a:hover{color:#b00}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.lt-gray a:active{color:#028da9}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.md-gray{background:#666;color:#fff}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.md-gray a,.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.md-gray a:visited{color:#fff}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.md-gray a:focus{color:#028da9}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.md-gray a:hover{color:#ebebeb}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.md-gray a:active{color:#028da9}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.dk-gray{background:#2d2d2d;color:#fff}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.dk-gray a,.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.dk-gray a:visited{color:#fff}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.dk-gray a:focus{color:#028da9}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.dk-gray a:hover{color:#ebebeb}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.dk-gray a:active{color:#028da9}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.black{background:#000;color:#fff}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.black a,.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.black a:visited{color:#fff}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.black a:focus{color:#028da9}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.black a:hover{color:#ebebeb}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.black a:active{color:#028da9}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.red{background:#b60000;color:#fff}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.red a,.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.red a:visited{color:#fff}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.red a:focus{color:#028da9}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.red a:hover{color:#ebebeb}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.red a:active{color:#028da9}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane .title-box{padding:.8em 1em;display:table;width:100%}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane .title-box .title-text{display:table-cell;vertical-align:middle;width:100%;text-align:center;padding:0 1em}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane .title-box .title-text h2{font-size:18px;font-size:1.8rem;font-family:proximanova,Helvetica,Arial,sans-serif!important;line-height:110%;font-weight:300;margin:1px 0 0;padding:0}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane .title-box .title-icon{display:table-cell;vertical-align:middle;font-size:24px;font-size:2.4rem}@media (max-width:47.4em){.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane .text-areas h2,.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane .title-box .title-text h2,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane .text-areas h2,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane .title-box .title-text h2{font-size:24px;font-size:2.4rem}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane .text-areas .title-icon,.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane .title-box .title-text .title-icon,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane .text-areas .title-icon,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane .title-box .title-text .title-icon{font-size:30px;font-size:3rem}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane .field--name-field-tile-text-area li,.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane .field--name-field-tile-text-area p,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane .field--name-field-tile-text-area li,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane .field--name-field-tile-text-area p{font-size:20px;font-size:2rem}}.panel-pane.pane-bundle-tile-pane-plus-text-area{text-align:center;color:#2d2d2d}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane a,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane a:visited{color:#b00}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane a:focus{color:#028da9}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane a:hover{color:#666}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane a:active{color:#028da9}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane h2{color:#b00;font-size:20px;font-size:2rem;font-weight:400;margin-top:0;text-decoration:none}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.lt-gray{background:#ebebeb}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.lt-gray a,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.lt-gray a:visited{color:#2d2d2d}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.lt-gray a:focus{color:#028da9}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.lt-gray a:hover{color:#b00}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.lt-gray a:active{color:#028da9}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.md-gray{background:#666}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.dk-gray{background:#2d2d2d}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.black{background:#000}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.red{background:#b60000}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.black,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.black a,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.black a:visited,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.black h2,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.black li,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.black p,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.dk-gray,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.dk-gray a,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.dk-gray a:visited,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.dk-gray h2,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.dk-gray li,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.dk-gray p,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.md-gray,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.md-gray a,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.md-gray a:visited,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.md-gray h2,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.md-gray li,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.md-gray p,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.red,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.red a,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.red a:visited,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.red h2,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.red li,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.red p{color:#fff}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.black a:focus,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.dk-gray a:focus,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.md-gray a:focus,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.red a:focus{color:#028da9}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.black a:hover,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.dk-gray a:hover,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.md-gray a:hover,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.red a:hover{color:#ebebeb}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.black a:active,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.dk-gray a:active,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.md-gray a:active,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.red a:active{color:#028da9}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane .text-areas{padding:1.6em 1.2em 1.2em}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane li,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane p{font-size:16px;font-size:1.6rem;font-weight:300;line-height:140%}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane ol,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane p,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane ul{margin:1em 0 0}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane li{text-align:left;margin-left:-2em}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane li.align-center{margin-left:-3em;text-align:center}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane li.align-right{text-align:right}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane a li,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane a p{color:#2d2d2d}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane a h2,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane a h2:visited{color:#b00}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane a h2:focus{color:#028da9}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane a h2:hover{color:#b00}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane a h2:active{color:#2d2d2d}.panel-pane.pane-bundle-tile-pane-plus-text-area .tile-image-style-icon{display:block;padding:1.4em 1.4em 1em}.panel-pane.pane-bundle-tile-pane-plus-text-area .tile-image-style-icon .field--name-field-tile-background-img{display:table-cell;vertical-align:middle;width:25%}.panel-pane.pane-bundle-tile-pane-plus-text-area .tile-image-style-icon .field--name-field-tile-background-img img{width:100%}.panel-pane.pane-bundle-tile-pane-plus-text-area .tile-image-style-icon .field--name-field-tile-background-img+h2{display:table-cell;padding-left:.8em;vertical-align:middle;width:75%;text-align:left}.panel-pane.pane-bundle-tile-pane-plus-text-area .tile-image-style-icon .field--name-field-tile-background-img+h2+.text-areas{display:inline-block;width:100%;background:inherit}.panel-pane.pane-bundle-tile-pane-plus-text-area .tile-image-style-icon .text-areas{padding:0}.panel-pane.pane-bundle-tile-pane-plus-text-area .tile-image-style-icon-center{display:block;padding:2em 1em 1em}.panel-pane.pane-bundle-tile-pane-plus-text-area .tile-image-style-icon-center .field--name-field-tile-background-img{width:50%;max-width:110px;margin:0 auto}@media (min-width:47.5em){.tile-5 .panel-pane.pane-bundle-tile-pane-plus-text-area h2{font-size:19px;font-size:1.9rem}.tile-5 .panel-pane.pane-bundle-tile-pane-plus-text-area .field--name-field-tile-text-area li,.tile-5 .panel-pane.pane-bundle-tile-pane-plus-text-area .field--name-field-tile-text-area p{font-size:15px;font-size:1.5rem;line-height:130%}.tile-5 .panel-pane.pane-bundle-tile-pane-plus-text-area .text-areas{padding:1.2em .2em .6em}}#edit-field-tile-background-img .description{font-size:120%;line-height:130%;margin-top:10px}.l-content{min-height:4em}.l-footer-wrapper .l-region{margin-bottom:20px;text-align:left}.l-footer-wrapper .l-region--footer-1 p,.l-footer-wrapper .l-region--footer-3 p{font-size:13px;font-size:1.3rem;line-height:135%;margin:0}.l-footer-wrapper .l-region--footer-2{text-align:right}.l-footer-wrapper .l-region--footer-3{clear:both}.l-footer-wrapper a{font-weight:400}.l-footer-wrapper #osu-wordmark{margin-bottom:10px}.l-footer-wrapper #osu-wordmark img{max-width:300px}.l-footer-wrapper .osu-siteinfo-name{font-weight:600}.l-footer-wrapper .osu-siteinfo-address{float:left;font-style:normal}.l-footer-wrapper .osu-siteinfo-address .pipe{margin:0 2px;color:#b8b8b8}@media (max-width:47.4em){.l-page .l-footer-wrapper .l-region{text-align:center}.l-page .l-footer-wrapper .l-region p{font-size:17px;font-size:1.7rem}.l-page .l-footer-wrapper .l-region>*{float:none;text-align:center}.l-page .l-footer-wrapper .l-region ul{padding:0}.l-page .l-footer-wrapper .l-region ul li:first-child *{margin-left:0}}.footer-dk-gray .l-footer-wrapper{background:#2d2d2d;color:#fff}.footer-dk-gray .l-footer-wrapper a,.footer-dk-gray .l-footer-wrapper a:visited{color:#fff}.footer-dk-gray .l-footer-wrapper a:focus{color:#d4df48}.footer-dk-gray .l-footer-wrapper a:hover{color:#666}.footer-dk-gray .l-footer-wrapper a:active{color:#b00}.footer-dk-gray .l-footer-wrapper .pipe{color:#b8b8b8}.footer-md-gray .l-footer-wrapper{background:#666;color:#fff}.footer-md-gray .l-footer-wrapper a,.footer-md-gray .l-footer-wrapper a:visited{color:#fff}.footer-md-gray .l-footer-wrapper a:focus{color:#d4df48}.footer-md-gray .l-footer-wrapper a:hover{color:#ebebeb}.footer-md-gray .l-footer-wrapper a:active{color:#b00}.footer-md-gray .l-footer-wrapper .pipe{color:#ebebeb}.footer-md-gray .l-footer-wrapper .osu-siteinfo-social li .siteinfo-social-link{color:#666;background-color:#fff}.footer-md-gray .l-footer-wrapper .osu-siteinfo-social li .siteinfo-social-link:focus,.footer-md-gray .l-footer-wrapper .osu-siteinfo-social li .siteinfo-social-link:hover{color:#fff}.footer-lt-gray .l-footer-wrapper{background:#ebebeb;color:#474747}.footer-lt-gray .l-footer-wrapper a{color:#474747}.footer-lt-gray .l-footer-wrapper a:visited{color:#2d2d2d}.footer-lt-gray .l-footer-wrapper a:focus{color:#d4df48}.footer-lt-gray .l-footer-wrapper .pipe,.footer-lt-gray .l-footer-wrapper a:active,.footer-lt-gray .l-footer-wrapper a:hover{color:#b00}.footer-lt-gray .l-footer-wrapper .osu-siteinfo-social li .siteinfo-social-link{background-color:#474747}.footer-white .l-footer-wrapper{background:#fff;color:#666}.footer-white .l-footer-wrapper a,.footer-white .l-footer-wrapper a:visited{color:#666}.footer-white .l-footer-wrapper a:focus{color:#d4df48}.footer-white .l-footer-wrapper .pipe,.footer-white .l-footer-wrapper a:active,.footer-white .l-footer-wrapper a:hover{color:#b00}.l-footer-wrapper .osu-siteinfo-social{margin-top:0;padding-left:0;text-align:right}.l-footer-wrapper .osu-siteinfo-social li{list-style-type:none;display:inline-block}@media (min-width:47.5em) and (max-width:59em){.l-footer-wrapper .osu-siteinfo-social li:nth-last-child(5):first-child:nth-child(4),.l-footer-wrapper .osu-siteinfo-social li:nth-last-child(5):first-child~:nth-child(4){clear:both}.l-footer-wrapper .osu-siteinfo-social li:nth-last-child(5):first-child:nth-child(n+4),.l-footer-wrapper .osu-siteinfo-social li:nth-last-child(5):first-child~:nth-child(n+4){float:right}}.l-footer-wrapper .osu-siteinfo-social li .siteinfo-social-link{color:#fff;background-color:#666;margin:0 0 1em 1em;width:2.55em;padding:.62em 0 .46em;text-align:center;display:block}.l-footer-wrapper .osu-siteinfo-social li .siteinfo-social-link:focus,.l-footer-wrapper .osu-siteinfo-social li .siteinfo-social-link:hover{background-color:#000}.l-footer-wrapper .osu-siteinfo-social li .siteinfo-social-link.link-facebook:focus,.l-footer-wrapper .osu-siteinfo-social li .siteinfo-social-link.link-facebook:hover{background-color:#3b5998}.l-footer-wrapper .osu-siteinfo-social li .siteinfo-social-link.link-twitter:focus,.l-footer-wrapper .osu-siteinfo-social li .siteinfo-social-link.link-twitter:hover{background-color:#00aced}.l-footer-wrapper .osu-siteinfo-social li .siteinfo-social-link.link-youtube:focus,.l-footer-wrapper .osu-siteinfo-social li .siteinfo-social-link.link-youtube:hover{background-color:#b00}.l-footer-wrapper .osu-siteinfo-social li .siteinfo-social-link.link-googleplus:focus,.l-footer-wrapper .osu-siteinfo-social li .siteinfo-social-link.link-googleplus:hover{background-color:#dd4b39}.l-footer-wrapper .osu-siteinfo-social li .siteinfo-social-link.link-photos:focus,.l-footer-wrapper .osu-siteinfo-social li .siteinfo-social-link.link-photos:hover{background-color:#ff0084}.l-footer-wrapper .osu-siteinfo-social li .siteinfo-social-link.link-instagram:focus,.l-footer-wrapper .osu-siteinfo-social li .siteinfo-social-link.link-instagram:hover{background-color:#517fa4}.l-footer-wrapper .osu-siteinfo-social li .siteinfo-social-link.link-linkedin:focus,.l-footer-wrapper .osu-siteinfo-social li .siteinfo-social-link.link-linkedin:hover{background-color:#007bb6}.l-region--hero-wrapper.white{background:#fff}.l-region--hero-wrapper.lt-gray{background:#efefef}.l-main.white{background:#fff}.l-main.lt-gray{background:#efefef}.l-main{padding-bottom:30px}.node-type-ocio-landing-page .l-main{padding-bottom:0}.l-region--masthead{padding:20px 0}@media (min-width:47.5em){.l-footer-wrapper .osu-siteinfo-social{float:right}.l-footer-wrapper .osu-siteinfo-social li{float:left}.l-footer-wrapper .osu-siteinfo-social li:nth-last-child(6):first-child:nth-child(4),.l-footer-wrapper .osu-siteinfo-social li:nth-last-child(6):first-child~:nth-child(4),.l-footer-wrapper .osu-siteinfo-social li:nth-last-child(7):first-child:nth-child(5),.l-footer-wrapper .osu-siteinfo-social li:nth-last-child(7):first-child~:nth-child(5){clear:both}.l-footer-wrapper .osu-siteinfo-social li:nth-last-child(7):first-child:nth-child(n+5),.l-footer-wrapper .osu-siteinfo-social li:nth-last-child(7):first-child~:nth-child(n+5){float:right}.l-region--masthead .l-constrained{width:100%;display:table}}#site-name{display:table-cell;vertical-align:middle;font-size:48px;font-size:4.8rem;max-width:500px}#site-name .site-name-prefix{display:block;font-size:.5em;font-weight:300;color:#666}#site-name .site-name-main{color:#2d2d2d;font-weight:600;display:block;line-height:1em}#site-name a{text-decoration:none;display:block}#site-name .site-name-slogan{font-size:.5em;font-weight:400;color:#666;margin-top:20px}#site-name.site-name-2-lines{font-size:44px;font-size:4.4rem}#site-name.site-name-3-lines{font-size:32px;font-size:3.2rem}#site-name.site-name-4-lines{font-size:30px;font-size:3rem}#site-logo{display:table-cell;vertical-align:middle;text-align:right}#site-logo img{height:140px;width:auto;margin-right:-.5em}@media (max-width:47.4em){#site-logo{display:none}}.l-region--masthead.white{background-color:#fff}.l-region--masthead.dk-gray{background-color:#2d2d2d}.l-region--masthead.dk-gray #site-name .site-name-main{color:#fff}.l-region--masthead.dk-gray #site-name .site-name-prefix,.l-region--masthead.dk-gray #site-name .site-name-slogan{color:#ebebeb}.l-region--masthead.md-gray{background-color:#666}.l-region--masthead.md-gray #site-name .site-name-main{color:#fff}.l-region--masthead.md-gray #site-name .site-name-prefix,.l-region--masthead.md-gray #site-name .site-name-slogan{color:#f3f3f3}.l-region--masthead.lt-gray{background-color:#ebebeb}.l-region--osu-navbar{clear:both;margin:0;padding:0;background:url(../images/osu-navbar/lt-gray/bg-navbar_red.png) left bottom repeat-x #eaeaea;overflow:hidden}#osu_navbar *{font-family:proximanova,'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:13px;line-height:1.4;font-weight:400}#osu_navbar p{margin:0;padding:0}#osu_navbar .univ_info{float:left;padding:.9em 0 1.1em;margin-left:0}#osu_navbar .univ_links{float:right;clear:none;padding:1em 0 0;margin-top:-2px}#osu_navbar .univ_name a{height:16px;width:90px;display:block;text-indent:-9999px;background:url(../images/osu-navbar/lt-gray/osu_name.png) no-repeat;margin-left:0;overflow:hidden}#osu_navbar div.links{float:left;margin-bottom:10px}#osu_navbar div.links ul{margin:0;padding:0}#osu_navbar div.links ul li{list-style:none;float:left;margin-left:1em}#osu_navbar div.links ul li a{color:#333;text-decoration:none;background-position:0 0}#osu_navbar div.links ul li a:hover{text-decoration:underline}.osu-semantic{position:absolute;left:0;top:-500px;width:1px;height:1px;overflow:hidden}a.osu-semantic:active,a.osu-semantic:focus{position:absolute;left:0;top:0;overflow:visible}a#skip:active,a#skip:focus{position:absolute;top:0;left:25%;width:50%;text-align:center;padding:.5em 0 1.5em;display:block;color:#fff;z-index:999999999999999999;text-decoration:none;background:#666;background:rgba(0,0,0,.8);border:1px dotted #ccc;border-top:none;border-radius:0 0 6px 6px}.view,.views-exposed-form,.views-exposed-widgets .views-exposed-.views-exposed-widgets{position:relative}a#skip:active:hover,a#skip:focus:hover{background:#b00;background:rgba(187,0,0,.8)}.l-region--osu-navbar.dk-gray{background:url(../images/osu-navbar/dk-gray/bg-navbar_red.png) left bottom repeat-x #333}.l-region--osu-navbar.dk-gray #osu_navbar .univ_name a{background-image:url(../images/osu-navbar/dk-gray/osu_name.png)}.l-region--osu-navbar.dk-gray #osu_navbar div.links ul li a{color:#fff}@media (max-width:47.4em){#osu_navbar div.links ul{margin-top:-2px}#osu_navbar div.links ul li{list-style:none;float:left;margin-left:.5em}#osu_navbar div.links ul li a{height:23px;width:23px;display:block;overflow:hidden;text-indent:-999px}#osu_navbar div.links ul li a:hover{text-decoration:none}.l-region--osu-navbar #osu_navbar div.links ul li a.help,.l-region--osu-navbar.lt-gray #osu_navbar div.links ul li a.help{background-image:url(../images/osu-navbar/lt-gray/resp-help.png)}.l-region--osu-navbar #osu_navbar div.links ul li a.buckeyelink,.l-region--osu-navbar.lt-gray #osu_navbar div.links ul li a.buckeyelink{background-image:url(../images/osu-navbar/lt-gray/resp-buckeyelink.png)}.l-region--osu-navbar #osu_navbar div.links ul li a.map,.l-region--osu-navbar.lt-gray #osu_navbar div.links ul li a.map{background-image:url(../images/osu-navbar/lt-gray/resp-map.png)}.l-region--osu-navbar #osu_navbar div.links ul li a.findpeople,.l-region--osu-navbar.lt-gray #osu_navbar div.links ul li a.findpeople{background-image:url(../images/osu-navbar/lt-gray/resp-findpeople.png)}.l-region--osu-navbar #osu_navbar div.links ul li a.webmail,.l-region--osu-navbar.lt-gray #osu_navbar div.links ul li a.webmail{background-image:url(../images/osu-navbar/lt-gray/resp-webmail.png)}.l-region--osu-navbar #osu_navbar div.links ul li a.search,.l-region--osu-navbar.lt-gray #osu_navbar div.links ul li a.search{background-image:url(../images/osu-navbar/lt-gray/resp-search.png)}.l-region--osu-navbar.dk-gray #osu_navbar div.links ul li a.help{background-image:url(../images/osu-navbar/dk-gray/resp-help.png)}.l-region--osu-navbar.dk-gray #osu_navbar div.links ul li a.buckeyelink{background-image:url(../images/osu-navbar/dk-gray/resp-buckeyelink.png)}.l-region--osu-navbar.dk-gray #osu_navbar div.links ul li a.map{background-image:url(../images/osu-navbar/dk-gray/resp-map.png)}.l-region--osu-navbar.dk-gray #osu_navbar div.links ul li a.findpeople{background-image:url(../images/osu-navbar/dk-gray/resp-findpeople.png)}.l-region--osu-navbar.dk-gray #osu_navbar div.links ul li a.webmail{background-image:url(../images/osu-navbar/dk-gray/resp-webmail.png)}.l-region--osu-navbar.dk-gray #osu_navbar div.links ul li a.search{background-image:url(../images/osu-navbar/dk-gray/resp-search.png)}}@media only screen and (max-width:720px) and (-webkit-min-device-pixel-ratio:2),only screen and (max-width:720px) and (min--moz-device-pixel-ratio:2),only screen and (max-width:720px) and (-o-min-device-pixel-ratio:2 / 1),only screen and (max-width:720px) and (min-device-pixel-ratio:2){.l-region--osu-navbar.lt-gray #osu_navbar div.links ul li a{background-size:23px}.l-region--osu-navbar.lt-gray #osu_navbar .univ_name a{background-size:contain}.l-region--osu-navbar.lt-gray #osu_navbar div.links ul li a.help{background-image:url(../images/osu-navbar/lt-gray/resp-help@2x.png)}.l-region--osu-navbar.lt-gray #osu_navbar div.links ul li a.buckeyelink{background-image:url(../images/osu-navbar/lt-gray/resp-buckeyelink@2x.png)}.l-region--osu-navbar.lt-gray #osu_navbar div.links ul li a.map{background-image:url(../images/osu-navbar/lt-gray/resp-map@2x.png)}.l-region--osu-navbar.lt-gray #osu_navbar div.links ul li a.findpeople{background-image:url(../images/osu-navbar/lt-gray/resp-findpeople@2x.png)}.l-region--osu-navbar.lt-gray #osu_navbar div.links ul li a.webmail{background-image:url(../images/osu-navbar/lt-gray/resp-webmail@2x.png)}.l-region--osu-navbar.lt-gray #osu_navbar div.links ul li a.search{background-image:url(../images/osu-navbar/lt-gray/resp-search@2x.png)}.l-region--osu-navbar #osu_navbar div.links ul li .ui-accordion-content a,.l-region--osu-navbar #osu_navbar div.links ul li .ui-tabs-content a,.l-region--osu-navbar #osu_navbar div.links ul li a,.l-region--osu-navbar.dk-gray #osu_navbar div.links ul li a,.ui-accordion-content .l-region--osu-navbar #osu_navbar div.links ul li a,.ui-tabs-content .l-region--osu-navbar #osu_navbar div.links ul li a{background-size:23px}.l-region--osu-navbar #osu_navbar .univ_name .ui-accordion-content a,.l-region--osu-navbar #osu_navbar .univ_name .ui-tabs-content a,.l-region--osu-navbar #osu_navbar .univ_name a,.l-region--osu-navbar.dk-gray #osu_navbar .univ_name a,.ui-accordion-content .l-region--osu-navbar #osu_navbar .univ_name a,.ui-tabs-content .l-region--osu-navbar #osu_navbar .univ_name a{background-size:contain}.l-region--osu-navbar #osu_navbar div.links ul li a.help,.l-region--osu-navbar.dk-gray #osu_navbar div.links ul li a.help{background-image:url(../images/osu-navbar/dk-gray/resp-help@2x.png)}.l-region--osu-navbar #osu_navbar div.links ul li a.buckeyelink,.l-region--osu-navbar.dk-gray #osu_navbar div.links ul li a.buckeyelink{background-image:url(../images/osu-navbar/dk-gray/resp-buckeyelink@2x.png)}.l-region--osu-navbar #osu_navbar div.links ul li a.map,.l-region--osu-navbar.dk-gray #osu_navbar div.links ul li a.map{background-image:url(../images/osu-navbar/dk-gray/resp-map@2x.png)}.l-region--osu-navbar #osu_navbar div.links ul li a.findpeople,.l-region--osu-navbar.dk-gray #osu_navbar div.links ul li a.findpeople{background-image:url(../images/osu-navbar/dk-gray/resp-findpeople@2x.png)}.l-region--osu-navbar #osu_navbar div.links ul li a.webmail,.l-region--osu-navbar.dk-gray #osu_navbar div.links ul li a.webmail{background-image:url(../images/osu-navbar/dk-gray/resp-webmail@2x.png)}.l-region--osu-navbar #osu_navbar div.links ul li a.search,.l-region--osu-navbar.dk-gray #osu_navbar div.links ul li a.search{background-image:url(../images/osu-navbar/dk-gray/resp-search@2x.png)}}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min--moz-device-pixel-ratio:2),only screen and (-o-min-device-pixel-ratio:2 / 1),only screen and (min-device-pixel-ratio:2){.l-region--osu-navbar #osu_navbar .univ_name a{background-size:contain}.l-region--osu-navbar.lt-gray #osu_navbar .univ_name a{background-image:url(../images/osu-navbar/lt-gray/osu_name@2x.png)}.l-region--osu-navbar #osu_navbar .univ_name a,.l-region--osu-navbar.dk-gray #osu_navbar .univ_name a{background-image:url(../images/osu-navbar/dk-gray/osu_name@2x.png)}}.l-region--pre-footer-wrapper{line-height:0}.l-region--pre-footer-wrapper.white{background:#fff}.l-region--pre-footer-wrapper.lt-gray{background:#efefef}.field--name-field-pre-footer-banner-image img{display:block;width:100%;margin:0}.section-tags h1{font-weight:600;margin-bottom:1.2em}.section-tags .l-region--content{padding-bottom:40px}.section-tags .node-teaser{border-bottom:1px solid #c7c7c7;margin-bottom:1.5em}.section-tags a.feed-icon{display:none}body.page-user-login .l-main{padding-top:20px}body.page-user-login h1{margin-bottom:20px}body.page-user-login h2{font-family:proximanova,Helvetica,Arial,sans-serif;font-size:20px!important;font-weight:600!important}body.page-user-login .login-box{background:#ebebeb;margin-bottom:2em}body.page-user-login .login-box.osu{padding:20px 30px;margin-bottom:2em}body.page-user-login .login-box.osu h2{margin-bottom:1em}body.page-user-login .login-box.osu a{margin-bottom:10px}body.page-user-login .login-box.non-osu .ui-accordion-content,body.page-user-login .login-box.non-osu .ui-accordion-header{margin:0;background:0 0!important;border:0;padding:20px 30px;overflow:hidden}body.page-user-login .login-box.non-osu .ui-accordion-content .links,body.page-user-login .login-box.non-osu .ui-accordion-header .links{padding:0;margin-bottom:1em}body.page-user-login .login-box.non-osu .ui-accordion-content .links li,body.page-user-login .login-box.non-osu .ui-accordion-header .links li{margin-right:.5em}body.page-user-login .login-box.non-osu .ui-accordion-content .links li:after,body.page-user-login .login-box.non-osu .ui-accordion-header .links li:after{content:"|";margin-left:.5em}body.page-user-login .login-box.non-osu .ui-accordion-content .links li.last:after,body.page-user-login .login-box.non-osu .ui-accordion-header .links li.last:after{content:""}body.page-user-login .login-box.non-osu .ui-accordion-content .links li a,body.page-user-login .login-box.non-osu .ui-accordion-header .links li a{display:inline-block}.view-id-wcm_media_gallery .views-group .views-row:after,.view-id-wcm_media_gallery .views-group:after{display:table;clear:both;content:""}body.page-user-login .login-box.non-osu #edit-actions{margin-top:20px}.user-profile{padding-bottom:20px}.user-profile .field--name-field-job-title{font-size:24px;font-size:2.4rem;font-weight:400;margin-bottom:30px}.user-profile .field--name-field-user-photo{float:right;margin:-40px 0 20px 30px}.user-profile .field--name-email{margin-top:20px}.field--name-field-user-photo img,.views-field-field-user-photo img{border:1px solid #8c8c8c}.view-id-wcm_media_gallery .views-group-header{margin-bottom:.4em;margin-top:1.4em;padding-bottom:.2em;color:#666}.view-id-wcm_media_gallery .views-group{clear:both}.view-id-wcm_media_gallery .views-group .views-row{width:46%;margin-right:8%;float:left;margin-bottom:.75em;margin-top:.75em}.view-id-wcm_media_gallery .views-group .views-row:nth-child(2n+1){clear:left}.view-id-wcm_media_gallery .views-group .views-row:nth-child(2n+2){margin-right:0}@media (min-width:47.5em){.view-id-wcm_media_gallery .views-group .views-row,.view-id-wcm_media_gallery .views-group .views-row:nth-child(3n+1),.view-id-wcm_media_gallery .views-group .views-row:nth-child(3n+2),.view-id-wcm_media_gallery .views-group .views-row:nth-child(3n+3){width:20.5%;margin-right:6%;margin-bottom:1em;margin-top:1em;float:left;clear:none}.view-id-wcm_media_gallery .views-group .views-row:nth-child(4n+1){clear:both}.view-id-wcm_media_gallery .views-group .views-row:nth-child(4n+4){margin-right:0}}@media (min-width:60em){.view-id-wcm_media_gallery .views-group .views-row,.view-id-wcm_media_gallery .views-group .views-row:nth-child(4n+1),.view-id-wcm_media_gallery .views-group .views-row:nth-child(4n+2),.view-id-wcm_media_gallery .views-group .views-row:nth-child(4n+3),.view-id-wcm_media_gallery .views-group .views-row:nth-child(4n+4){width:16%;margin-right:5%;float:left;clear:none}.view-id-wcm_media_gallery .views-group .views-row:nth-child(5n+1){clear:both}.view-id-wcm_media_gallery .views-group .views-row:nth-child(5n+5){margin-right:0}.view-wcm-news-client.view-display-id-teasers_pane .views-row{width:95%}}@media (min-width:82em){.view-id-wcm_media_gallery .views-group .views-row,.view-id-wcm_media_gallery .views-group .views-row:nth-child(4n+1),.view-id-wcm_media_gallery .views-group .views-row:nth-child(4n+2),.view-id-wcm_media_gallery .views-group .views-row:nth-child(4n+3),.view-id-wcm_media_gallery .views-group .views-row:nth-child(4n+4){margin-top:1.3em;margin-bottom:1.3em}}.view-content.ui-accordion h3{font-size:18px;font-size:1.8rem;text-transform:uppercase;color:#666;margin-top:1.2em}.view-content.ui-accordion .view-grouping-header{background:#d2d2d2;color:#2d2d2d;border-radius:0;border-color:#d2d2d2;font-weight:600;font-size:16px;font-size:1.6rem;margin-bottom:1px}.view-content.ui-accordion .view-grouping-header:hover{background:#c2c2c2}.view-content.ui-accordion .view-grouping-header:before{top:14px;left:12px}.view-content.ui-accordion .view-grouping-content{margin-bottom:1px}.view-content.ui-accordion .ui-accordion-header{background:#ebebeb!important;padding-left:2em!important;margin-top:1px!important;margin-bottom:1px}.view-content.ui-accordion .ui-accordion-header a{font-size:16px;font-size:1.6rem;margin-left:16px}.view-content.ui-accordion .ui-accordion-header.ui-state-hover{background-color:#d2d2d2!important}.view-content.ui-accordion .ui-accordion-header .ui-accordion-header-icon{margin-left:18px}.view-content.ui-accordion .ui-accordion .ui-accordion-content{padding:10px 30px 10px 32px!important;border:1px solid #ebebeb!important;background:#fff!important}.view-content.ui-accordion .views-field-title{font-size:16px;font-size:1.6rem;margin-bottom:12px;line-height:120%}.view-content.ui-accordion .views-field-title a.active{color:#b00;text-decoration:underline}.view-content.ui-accordion .views-row-last .views-field-title{margin-bottom:0}.pane-ocio-news-archive-teasers-pane h2.pane-title{margin-bottom:30px}.l-main.lt-gray .view-display-id-archive_listing_block .view-grouping-header{background:#c2c2c2;border-color:#c2c2c2}.l-main.lt-gray .view-display-id-archive_listing_block .view-grouping-header:hover{background:#b8b8b8}.view-wcm-news-client.view-display-id-teasers_pane{margin-bottom:10px;padding-bottom:40px;border-bottom:1px solid #c7c7c7}.view-wcm-news-client.view-display-id-teasers_pane .views-row{margin:30px 0;border-bottom:none}.view-wcm-news-client.view-display-id-teasers_pane .views-row.views-row-last{margin-bottom:0}.node--news-client-cached-article--teaser h3{font-size:30px;font-size:3rem}.node--news-client-cached-article--teaser .more-link{margin-top:10px;margin-bottom:0}.view-ocio-news-archive .field--name-title{margin-bottom:.6em}.view-ocio-news-archive .field--name-node-link{margin-top:1em}.view-ocio-news-archive .view-header .more-link{border-bottom:1px solid #b00;margin-bottom:1.4em;margin-top:0}.view-ocio-news-archive .view-header .more-link a{margin-top:-2em;font-weight:400;color:#2d2d2d;font-size:13px;float:right}.view-ocio-news-archive .view-header .more-link a:hover{text-decoration:none;color:#028da9}.node--article--teaser .field--name-field-featured-image{display:none}@media (min-width:47.5em){.node--article--teaser .field--name-field-featured-image{display:block;float:right;margin:0 0 40px 2em}}.node--article--teaser .more-link{float:left;margin-top:10px;margin-bottom:10px}.view-display-id-page .views-row,.view-display-id-teasers_pane .views-row{border-bottom:1px solid #c7c7c7;margin-bottom:30px}.view-display-id-page .views-row h2,.view-display-id-teasers_pane .views-row h2{font-size:32px;font-size:3.2rem;line-height:110%}.pane-ocio-news-archive-titles-pane .views-row{margin-bottom:.2em}.pane-ocio-news-archive-trio-image-pane h2.pane-title,.pane-ocio-news-archive-trio-pane h2.pane-title{font-size:28px;font-size:2.8rem;margin-bottom:.2em}.pane-ocio-news-archive-trio-image-pane .views-row,.pane-ocio-news-archive-trio-pane .views-row{margin-bottom:3em}.pane-ocio-news-archive-trio-image-pane .views-field-title h3,.pane-ocio-news-archive-trio-pane .views-field-title h3{font-size:22px;font-size:2.2rem;margin-top:.4em;line-height:120%;margin-bottom:.5em}.pane-ocio-news-archive-trio-image-pane .field--name-post-date,.pane-ocio-news-archive-trio-pane .field--name-post-date{font-weight:400;color:#666;font-size:15px;font-size:1.5rem}.pane-ocio-news-archive-trio-image-pane .views-field-field-ocio-body a,.pane-ocio-news-archive-trio-image-pane .views-field-field-ocio-body:hover,.pane-ocio-news-archive-trio-pane .views-field-field-ocio-body a,.pane-ocio-news-archive-trio-pane .views-field-field-ocio-body:hover{color:#2d2d2d;text-decoration:none}@media (min-width:47.5em){.pane-ocio-news-archive-trio-image-pane .views-row,.pane-ocio-news-archive-trio-pane .views-row{margin-bottom:1em;width:33.3%}.pane-ocio-news-archive-trio-image-pane .views-row:nth-child(3n+1),.pane-ocio-news-archive-trio-pane .views-row:nth-child(3n+1){float:left;padding-right:4%;clear:left}.pane-ocio-news-archive-trio-image-pane .views-row:nth-child(3n+2),.pane-ocio-news-archive-trio-pane .views-row:nth-child(3n+2){float:left;padding-left:2%;padding-right:2%}.pane-ocio-news-archive-trio-image-pane .views-row:nth-child(3n+3),.pane-ocio-news-archive-trio-pane .views-row:nth-child(3n+3){float:right;padding-left:4%}}.section-news .l-region--sidebar-2 h2.block__title{padding-top:20px}.view-id-leadership_listing .views-field,.view-id-user_contact .views-field{font-size:15px;font-size:1.5rem;margin-bottom:5px;line-height:120%}.view-id-leadership_listing .views-field-realname h2,.view-id-leadership_listing .views-field-realname h3,.view-id-user_contact .views-field-realname h2,.view-id-user_contact .views-field-realname h3{font-size:21px;font-size:2.1rem}.view-id-leadership_listing .views-field-field-user-photo img,.view-id-user_contact .views-field-field-user-photo img{width:100%;height:auto}.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group-header,.view-id-user_contact.view-display-id-panel_pane_1 .views-group-header{margin-bottom:.4em;margin-top:1.4em;padding-bottom:.2em;color:#666}.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group,.view-id-user_contact.view-display-id-panel_pane_1 .views-group{clear:both}.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group:after,.view-id-user_contact.view-display-id-panel_pane_1 .views-group:after{content:"";display:table;clear:both}.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row,.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row{width:46%;margin-right:8%;float:left;margin-bottom:.75em;margin-top:.75em}.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row:after,.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row:after{content:"";display:table;clear:both}.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row:nth-child(2n+1),.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row:nth-child(2n+1){clear:left}.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row:nth-child(2n+2),.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row:nth-child(2n+2){margin-right:0}@media (min-width:47.5em){.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row,.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row:nth-child(3n+1),.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row:nth-child(3n+2),.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row:nth-child(3n+3),.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row,.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row:nth-child(3n+1),.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row:nth-child(3n+2),.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row:nth-child(3n+3){width:20.5%;margin-right:6%;margin-bottom:1em;margin-top:1em;float:left;clear:none}.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row:nth-child(4n+1),.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row:nth-child(4n+1){clear:both}.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row:nth-child(4n+4),.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row:nth-child(4n+4){margin-right:0}}@media (min-width:60em){.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row,.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row:nth-child(4n+1),.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row:nth-child(4n+2),.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row:nth-child(4n+3),.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row:nth-child(4n+4),.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row,.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row:nth-child(4n+1),.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row:nth-child(4n+2),.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row:nth-child(4n+3),.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row:nth-child(4n+4){width:16%;margin-right:5%;float:left;clear:none}.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row:nth-child(5n+1),.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row:nth-child(5n+1){clear:both}.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row:nth-child(5n+5),.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row:nth-child(5n+5){margin-right:0}}@media (min-width:82em){.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row,.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row:nth-child(4n+1),.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row:nth-child(4n+2),.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row:nth-child(4n+3),.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row:nth-child(4n+4),.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row,.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row:nth-child(4n+1),.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row:nth-child(4n+2),.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row:nth-child(4n+3),.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row:nth-child(4n+4){margin-top:1.3em;margin-bottom:1.3em}}.pane-user-contact-panel-pane-2 .views-row{margin-top:20px;margin-bottom:30px}.pane-leadership-listing-panel-pane-2 .views-row{border-bottom:1px solid #ccc;padding:1em 0 0}.pane-leadership-listing-panel-pane-2 .views-row:after{content:"";display:table;clear:both}.pane-leadership-listing-panel-pane-2 .views-row.views-row-1{border-top:1px solid #ccc;margin-top:0}.pane-leadership-listing-panel-pane-2 .views-field-field-user-photo{margin-bottom:15px}.pane-leadership-listing-panel-pane-2 .views-field-field-user-photo img{width:100%;border:none}.pane-leadership-listing-panel-pane-2 .views-field-realname{font-size:32px;font-size:3.2rem;margin-top:0;margin-bottom:6px}.pane-leadership-listing-panel-pane-2 .views-field-field-job-title{font-size:20px;font-size:2rem;display:block;margin-bottom:8px}.pane-leadership-listing-panel-pane-2 .views-field-field-bio{margin-top:12px}.pane-leadership-listing-panel-pane-2 .more-link{margin-top:15px;font-size:14px}@media (min-width:47.5em){.pane-leadership-listing-panel-pane-2 .views-row{padding:1.5em 0 1em}.pane-leadership-listing-panel-pane-2 .views-row .views-field-field-user-photo{float:right;width:300px;margin:0 0 1em 2em}}@media (min-width:60em){.pane-leadership-listing-panel-pane-2 .views-row .views-field-field-user-photo{width:360px}}@media (min-width:82em){.pane-leadership-listing-panel-pane-2 .views-row{padding:1.8em 0 1em}.pane-leadership-listing-panel-pane-2 .views-row .text-grouping{width:58.5%}.pane-leadership-listing-panel-pane-2 .views-row .views-field-field-user-photo{width:39%;margin:0}.pane-leadership-listing-panel-pane-2 .views-row-odd .text-grouping{float:right}.pane-leadership-listing-panel-pane-2 .views-row-even .text-grouping,.pane-leadership-listing-panel-pane-2 .views-row-odd .views-field-field-user-photo{float:left}.pane-leadership-listing-panel-pane-2 .views-row-even .views-field-field-user-photo{float:right}}.views-table td.views-field *{margin:0}.views-exposed-widgets .views-exposed-widget .form-submit{margin-top:1.6em!important}.views-exposed-widgets .views-exposed-widget.views-submit-button{padding:0}.views-exposed-widgets .form-actions .description,.views-exposed-widgets .form-item .description{display:none}.view .ajax-progress,.views-exposed-form .ajax-progress{bottom:-1.75em;position:absolute;right:50%} \ No newline at end of file +@charset "UTF-8";#block-menu-menu-global-menu h2.block__title,.visuallyhidden{position:absolute;overflow:hidden;clip:rect(0 0 0 0);height:1px;width:1px;margin:-1px;padding:0;border:0}.ui-accordion .ui-accordion-header .ui-accordion-header-icon.ui-icon,.view .ui-accordion.view-content .view-grouping-header{background-image:none;text-indent:0}.ui-accordion .ui-accordion-header .ui-accordion-header-icon.ui-icon:before,.view .ui-accordion.view-content .view-grouping-header:before{background:0 0;content:"\f0da";color:#666;font-family:FontAwesome;font-size:12px;font-weight:400;text-align:center;top:0;right:auto;bottom:0;height:12px;line-height:13px;margin:auto;position:absolute}.align-left,table caption{text-align:left}.ui-accordion .ui-accordion-header .ui-accordion-header-icon.ui-icon.ui-icon:before,.view .ui-accordion.view-content .view-grouping-header.ui-icon:before{left:.6em}.ui-accordion .ui-accordion-header-active .ui-accordion-header-icon.ui-icon:before,.view .ui-accordion.view-content .view-grouping-header.nested-accordion:before{content:"\f0d7";margin-left:-1px}.ui-accordion .ui-accordion-header{background:#ebebeb!important}.ui-accordion .ui-accordion-header-active,.ui-accordion .ui-accordion-header:hover{background:#d2d2d2!important}.ui-accordion .ui-accordion-header p{margin:0}.ui-accordion .ui-accordion-content{background:#fff;border:1px solid #d2d2d2}.ui-accordion .ui-accordion-content h2:first-child,.ui-accordion .ui-accordion-content h3:first-child{margin-top:10px}.ui-accordion .ui-accordion-content ol{padding-left:.6em}.l-main.lt-gray .ui-accordion .ui-accordion-header{background:#e1e1e1!important}.l-main.lt-gray .ui-accordion .ui-accordion-header:hover{background:#d7d7d7!important}.l-main.lt-gray .ui-accordion .ui-accordion-header-active{background:#e1e1e1!important}.l-main.lt-gray .ui-accordion .ui-accordion-content{background:#fff;border:1px solid #e1e1e1}.ui-accordion-header{overflow:auto}body .panels-row.odd .ui-accordion .ui-accordion-header{background:#d7d7d7}body .panels-row.odd .ui-accordion .ui-accordion-content{border-color:#d7d7d7}.ctools-collapsible-container .ctools-toggle{background-image:url(../images/jquery-images/ui-icons_222222_256x240.png);background-position:-64px -15px}.ctools-collapsible-container .ctools-toggle-collapsed{background-position:-32px -15px;background-image:url(../images/jquery-images/ui-icons_222222_256x240.png)}.ctools-collapsible-container .ctools-toggle-collapsed:hover,.nested-accordion:before,.view-grouping-header:before{background-image:url(../images/jquery-images/ui-icons_222222_256x240.png)}ul.breadcrumb{padding:20px 0;margin:0}ul.breadcrumb li{display:inline-block;margin-right:.45em;font-weight:600}ul.breadcrumb li:after{content:"|";color:#b00;font-weight:700;margin-left:.45em}ul.breadcrumb li a{color:#666;text-decoration:none}ul.breadcrumb li a:visited{color:#666}ul.breadcrumb li a:focus{color:#dcaa38}ul.breadcrumb li a:hover{color:#666;text-decoration:underline}ul.breadcrumb li a:active{color:#028da9}ul.breadcrumb li:last-child{margin-right:0}ul.breadcrumb li:last-child:after{content:" "}#edit-preview,#edit-submit,#edit-submit--2,#edit-submit--3,.button-primary,.form-submit,.red-button,.webform-previous,.webform-submit,body.page-user-login .login-box.osu a,button,html body .button,input[type=button]{font-size:14px;padding:.7em 1.3em .4em;display:inline-block;cursor:pointer;background-color:#b00;border:0;color:#fff;text-transform:uppercase;font-family:proximanova,Helvetica,Arial,sans-serif;letter-spacing:.05em;border-radius:2px;box-shadow:0 3px 0 0 #920000;font-weight:400;margin-right:1.5em}#edit-preview:hover,#edit-submit--2:hover,#edit-submit--3:hover,#edit-submit:hover,.button-primary:hover,.form-submit:hover,.red-button:hover,.webform-previous:hover,.webform-submit:hover,body.page-user-login .login-box.osu a:hover,button:hover,html body .button:hover,input[type=button]:hover{text-decoration:none;background-color:#a20000}#edit-preview:active,#edit-submit--2:active,#edit-submit--3:active,#edit-submit:active,.button-primary:active,.form-submit:active,.red-button:active,.webform-previous:active,.webform-submit:active,body.page-user-login .login-box.osu a:active,button:active,html body .button:active,input[type=button]:active{background-color:#920000}.disabled#edit-preview,.disabled#edit-submit,.disabled#edit-submit--2,.disabled#edit-submit--3,.disabled.button-primary,.disabled.form-submit,.disabled.webform-previous,.disabled.webform-submit,.red-button.disabled,.red-button[disabled],[disabled]#edit-preview,[disabled]#edit-submit,[disabled]#edit-submit--2,[disabled]#edit-submit--3,[disabled].button-primary,[disabled].form-submit,[disabled].webform-previous,[disabled].webform-submit,body.page-user-login .login-box.osu a.disabled,body.page-user-login .login-box.osu a[disabled],button.disabled,button[disabled],html body .disabled.button,html body [disabled].button,input.disabled[type=button],input[disabled][type=button]{opacity:.6;background:false;cursor:default;box-shadow:none}#edit-preview.ext .ext,#edit-submit--2.ext .ext,#edit-submit--3.ext .ext,#edit-submit.ext .ext,.button-primary.ext .ext,.form-submit.ext .ext,.webform-previous.ext .ext,.webform-submit.ext .ext,button.ext .ext,html body .button.ext .ext,input[type=button].ext .ext{background-image:none;padding:0;width:0}a.button{margin-top:20px}#colorbox #cboxWrapper{border-radius:0;font-size:1.1em}#colorbox #cboxWrapper #cboxClose,#colorbox #cboxWrapper #cboxNext,#colorbox #cboxWrapper #cboxPrevious{background-image:none;text-indent:0;color:transparent;overflow:hidden}#colorbox #cboxWrapper #cboxClose:before,#colorbox #cboxWrapper #cboxNext:before,#colorbox #cboxWrapper #cboxPrevious:before{font-family:FontAwesome;bottom:-3px;position:absolute;color:#000}#colorbox #cboxWrapper #cboxClose:before{content:"\f00d";right:0;font-size:1.2em}#colorbox #cboxWrapper #cboxPrevious:before{content:"\f053"}#colorbox #cboxWrapper #cboxNext:before{content:"\f054"}#colorbox #cboxWrapper #cboxCurrent{bottom:-3px}span.ext{margin-left:2px;margin-right:2px}a[href]:empty{display:none}img.file-icon{height:26px;width:auto;padding-bottom:7px;margin:0 3px 0 6px}.views-exposed-form,.webform-component .description{margin-bottom:30px}input{max-width:100%}input:focus{outline:#999 solid 1px}textarea{resize:none}.webform-component label{text-transform:uppercase;font-weight:600;font-size:14px}.webform-component table .form-text{width:100%}.views-exposed-form label{font-weight:400;font-size:14px;text-transform:uppercase}.views-exposed-form .form-text{height:32px}.views-exposed-form li.search-field{height:29px}.webform-component-fieldset .webform-component label{text-transform:uppercase;font-weight:400;font-size:13px}.webform-component-fieldset,.webform-component-file,.webform-component-grid{margin-bottom:40px}.webform-component-file #edit-submitted-file-upload{max-width:240px}@media (max-width:47.4em){.l-main input:not([type=checkbox]):not([type=radio]),.l-main select,.l-main textarea{width:100%}}form .chosen-container .chosen-choices,form .form-text{padding:4px 6px 2px;border:1px solid #bbb;background-image:none;box-shadow:none;font-size:.9em}form .chosen-container{font-size:1em}form .chosen-container .result-selected{display:none!important}form .chosen-container .chosen-results{font-size:.9em}form .chosen-container .search-field input{width:.5px!important;height:.1px!important}form .chosen-container .chosen-results li{padding:7px 6px 4px;line-height:1em}form .chosen-container .chosen-results li.highlighted{background-image:none}form .chosen-container.chosen-container-active.chosen-with-drop .chosen-single,form .chosen-container.chosen-container-multi .chosen-choices li.search-choice,form .chosen-container.chosen-container-single .chosen-single{border-radius:0;background:#eee;box-shadow:none}form .chosen-container.chosen-container .search-field:after,form .chosen-container.chosen-container-active.chosen-with-drop .chosen-choices li.search-choice+.search-field:after{content:"- Select -";color:#666;cursor:default}form .chosen-container.chosen-container-active .search-field,form .chosen-container.chosen-container-multi .chosen-choices li.search-choice+.search-field{float:none}form .chosen-container.chosen-container-single .chosen-results{margin:0;padding:0}form .chosen-container.chosen-container-single .chosen-drop{border-radius:0}form .chosen-container.chosen-container-single .chosen-single{padding:0 0 0 6px;height:27px}form .chosen-container.chosen-container-single .chosen-single div b{background-size:52px 40px!important}form .chosen-container.chosen-container-multi .chosen-choices{padding:1px 3px 0;cursor:default}form .chosen-container.chosen-container-multi .chosen-choices li.search-choice{display:inline-block;float:none;line-height:1em;margin:2px 4px 2px 0;padding:4px 20px 2px 4px}form .chosen-container.chosen-container-multi .chosen-choices li.search-choice .search-choice-close{top:4px}form .chosen-container.chosen-container-multi .chosen-choices li.search-choice+.search-field:after{content:"+ Add";cursor:pointer}.l-constrained:after,.l-main:after,.l-region--sidebar-1:after,.l-region--sidebar-2:after{content:"";display:table;clear:both}form .chosen-container.chosen-container-multi .chosen-choices li.search-field input[type=text]{margin:1px 0 0 2px;cursor:default}.type-group1 h1,.type-group1 h2,.type-group1 h3,.type-group1 h4,.type-group1 h5,.type-group1 h6,.type-group1-sample h1,.type-group1-sample h2,.type-group1-sample h3,.type-group1-sample h4,.type-group1-sample h5,.type-group1-sample h6{font-family:proximanova,Helvetica,Arial,sans-serif;font-weight:400}.type-group1 h2.block__title,.type-group1 h2.pane-title,.type-group1-sample h2.block__title,.type-group1-sample h2.pane-title{margin-bottom:.6em;text-transform:uppercase;color:#2d2d2d;font-weight:400;line-height:120%}.type-group2 h1,.type-group2 h2,.type-group2 h3,.type-group2 h4,.type-group2 h5,.type-group2 h6,.type-group2-sample h1,.type-group2-sample h2,.type-group2-sample h3,.type-group2-sample h4,.type-group2-sample h5,.type-group2-sample h6{font-family:proximanova,Helvetica,Arial,sans-serif;font-weight:300}.type-group2 h1,.type-group2-sample h1{font-weight:600}.type-group2 h2,.type-group2 h3,.type-group2-sample h2,.type-group2-sample h3{font-family:capita,Georgia,serif;font-weight:100}.type-group2 h3,.type-group2-sample h3{font-style:italic}.type-group2 h4,.type-group2-sample h4{font-weight:400}.type-group2 h2.block__title,.type-group2 h2.pane-title,.type-group2-sample h2.block__title,.type-group2-sample h2.pane-title{font-weight:400;font-family:proximanova,Helvetica,Arial,sans-serif}.type-group3 h1,.type-group3 h2,.type-group3 h3,.type-group3 h4,.type-group3 h5,.type-group3 h6,.type-group3-sample h1,.type-group3-sample h2,.type-group3-sample h3,.type-group3-sample h4,.type-group3-sample h5,.type-group3-sample h6{font-family:capita,Georgia,serif;font-weight:400}.type-group3 h2,.type-group3-sample h2{font-weight:100;font-style:italic}.type-group3 h3,.type-group3 h4,.type-group3-sample h3,.type-group3-sample h4{font-family:proximanova,Helvetica,Arial,sans-serif;font-weight:400}.type-group3 h2.block__title,.type-group3 h2.pane-title,.type-group3-sample h2.block__title,.type-group3-sample h2.pane-title{font-weight:400;font-style:normal}.type-group4 h1,.type-group4 h2,.type-group4 h3,.type-group4 h4,.type-group4 h5,.type-group4 h6,.type-group4-sample h1,.type-group4-sample h2,.type-group4-sample h3,.type-group4-sample h4,.type-group4-sample h5,.type-group4-sample h6{font-family:proximanova,Helvetica,Arial,sans-serif;font-weight:400}.type-group4 h1,.type-group4-sample h1{color:#b00}.type-group4 h2.block__title,.type-group4 h2.pane-title,.type-group4-sample h2.block__title,.type-group4-sample h2.pane-title{margin-bottom:.6em;color:#2d2d2d;font-weight:400;line-height:120%}.l-page img{width:inherit}.image-border,.panopoly-image-featured,.panopoly-image-full,.panopoly-image-half,.panopoly-image-original,.panopoly-image-quarter,.panopoly-image-square,.panopoly-image-thumbnail{border:1px solid #666}.node__content .panopoly-image-featured,.node__content .panopoly-image-full,.node__content .panopoly-image-half,.node__content .panopoly-image-original,.node__content .panopoly-image-quarter,.node__content .panopoly-image-square,.node__content .panopoly-image-thumbnail{float:right;margin:0 0 20px 1.5em}.ui-widget table,.ui-widget td,.ui-widget th,.ui-widget tr{border:0}.ui-widget{font-family:proximanova,Helvetica,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget button,.ui-widget input,.ui-widget select,.ui-widget textarea{font-family:proximanova,Helvetica,Arial,sans-serif;font-size:1em}.ui-widget-content{border:0;background:#ebebeb;color:#2d2d2d}.ui-widget-content a{color:#2d2d2d}.ui-widget-header{border:0;background:#666;color:#fff;font-weight:700}.ui-widget-header a{color:#fff}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:0;background:#fff;font-weight:400;color:#2d2d2d}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#2d2d2d;text-decoration:none}.ui-state-focus,.ui-state-hover,.ui-widget-content .ui-state-focus,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-focus,.ui-widget-header .ui-state-hover{border:0;background:#d2d2d2;font-weight:400;color:#2d2d2d}.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited,.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited{color:#fff;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:0;background:url(../images/jquery-images/ui-bg_flat_65_ffffff_40x100.png) 50% 50% repeat-x #fff;font-weight:400;color:#2d2d2d}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#2d2d2d;text-decoration:none}.ui-corner-all,.ui-corner-left,.ui-corner-tl,.ui-corner-top{border-top-left-radius:0}.ui-corner-all,.ui-corner-right,.ui-corner-top,.ui-corner-tr{border-top-right-radius:0}.ui-corner-all,.ui-corner-bl,.ui-corner-bottom,.ui-corner-left{border-bottom-left-radius:0}.ui-corner-all,.ui-corner-bottom,.ui-corner-br,.ui-corner-right{border-bottom-right-radius:0}#modalBackdrop,.cke_dialog_background_cover,.ui-widget-overlay{background-image:none!important;background-color:#000!important;opacity:.5!important}.ui-dialog .ui-dialog-titlebar{height:auto;line-height:unset;font-weight:700;font-size:13px;color:#474747;text-shadow:0 1px 0 rgba(255,255,255,.75);border-bottom:1px solid #999;padding:6px 10px;border-radius:2px 2px 0 0;box-shadow:0 1px 0 #fff inset;background:#cfd1cf;background-image:linear-gradient(top,#f5f5f5,#cfd1cf);filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr='#fff5f5f5', endColorstr='#ffcfd1cf')}.messages,.pager>li{background-image:none}#modalBackdrop{z-index:920!important}#modalContent{z-index:930!important}.ui-front{z-index:940!important}.ui-widget-overlay{z-index:950!important}.ui-dialog{z-index:960!important;position:fixed;top:50%!important;left:50%!important;transform:translate(-50%,-50%)}.ui-dialog-titlebar-close{text-indent:-9999em}.l-constrained{margin:0 auto;padding:0 6%}@media (min-width:47.5em){.l-constrained{padding:0 8%}}@media (min-width:82em){.max-width{max-width:70em;margin:0 auto;padding:0}}ol ol,ol ol ol,ul ul,ul ul ul{margin-top:8px}ul.menu{padding:0}ol,ul{padding-left:3em}ul{list-style-type:square;list-style-position:outside}ul ul,ul ul ul{margin-left:20px}ol{list-style-type:decimal}ol ol{list-style-type:lower-alpha}ol ol ol{list-style-type:lower-roman}#block-menu-menu-global-menu ul.menu .leaf,.no-list-style,ul.breadcrumb,ul.menu{list-style:none}.field--name-field-basic-text-text li,.field--name-field-ocio-body li,.ui-accordion-content li{margin-bottom:.6em}.ui-accordion-content ul{padding-left:.6em}.caret-list-type ul,.dot-list-type ul,.page-newsletter-archive .l-region--content ul,.pane-bundle-quick-links ul,.pane-wcm-mailchimp-pane ul{padding-left:0;list-style-image:none;list-style-type:none}.caret-list-type li,.page-newsletter-archive .l-region--content li,.pane-bundle-quick-links li,.pane-wcm-mailchimp-pane li{margin-bottom:10px}.caret-list-type li:before,.page-newsletter-archive .l-region--content li:before,.pane-bundle-quick-links li:before,.pane-wcm-mailchimp-pane li:before{content:"\f0da";font-family:FontAwesome;color:gray;margin-right:10px;margin-left:4px;font-size:85%}.dot-list-type li{margin-bottom:40px}.dot-list-type li:before{content:"\f111";font-family:FontAwesome;color:gray;margin-right:10px;font-size:40%}.media-element{display:block}.media-element img{display:block;width:100%;margin:0}.media-element.file-default,.media-element.file-image-full,.media-element.file-image-large,.media-element.file-image-medium,.media-element.file-image-small{margin:0 0 1em}.media-element.file-image-left{float:left;clear:left;margin:.5em 2em 1em 0;max-width:30%}.media-element.file-image-right{float:right;clear:right;margin:.5em 0 1em 2em;max-width:30%}.media-element.file-image-center{float:none;margin:0 auto;max-width:50%}.media-element.file-image-max{margin:0 0 1em;width:100%}.media-element.file-image-max .content{width:100%}.media-element.file-video-full,.media-element.file-video-large,.media-element.file-video-medium,.media-element.file-video-small{margin:0 0 1em}.media-element.file-video-left{float:left;clear:left;margin:.5em 2em 1em 0;width:50%}.media-element.file-video-right{float:right;clear:right;margin:.5em 0 1em 2em;width:50%}.media-element.file-video-center{float:none;margin:0 auto;width:75%}.media-element.file-video-max{margin:0 0 1em;width:100%}.media-element.file-video-max .content{width:100%}.media.media-element-container{display:block;display:table;table-layout:fixed;max-width:100%;margin-top:0}.media.media-element-container img{display:block;width:100%;margin:0}.media.media-element-container.media-default,.media.media-element-container.media-image_full,.media.media-element-container.media-image_large,.media.media-element-container.media-image_medium,.media.media-element-container.media-image_small{margin:0 0 1em}.media.media-element-container.media-image_left{float:left;clear:left;margin:.5em 2em 1em 0;max-width:30%}.media.media-element-container.media-image_right{float:right;clear:right;margin:.5em 0 1em 2em;max-width:30%}.media.media-element-container.media-image_center{float:none;margin:0 auto;max-width:50%}.media.media-element-container.media-image_max{margin:0 0 1em;width:100%}.media.media-element-container.media-image_max .content{width:100%}.media.media-element-container.media-video_full,.media.media-element-container.media-video_large,.media.media-element-container.media-video_medium,.media.media-element-container.media-video_small{margin:0 0 1em}.media.media-element-container.media-video_left{float:left;clear:left;margin:.5em 2em 1em 0;width:50%}.media.media-element-container.media-video_right{float:right;clear:right;margin:.5em 0 1em 2em;width:50%}.media.media-element-container.media-video_center{float:none;margin:0 auto;width:75%}.media.media-element-container.media-video_max .content,.pane-bundle-table table,table{width:100%}.media.media-element-container.media-video_max{margin:0 0 1em;width:100%}.media.media-element-container .media-element{max-width:100%;float:none;margin-bottom:0}.media.media-element-container .field--name-field-basic-image-caption,.media.media-element-container .field-name-field-basic-image-caption{display:table-caption;caption-side:bottom;font-family:capita,Georgia,serif;font-size:.9em;font-weight:300;font-style:italic;line-height:1.3em;color:#606060}.error,.error .error,.messages--error,.messages--status,.messages--warning,.ok,.warning{color:#2d2d2d}.align-center .media-element.file-default{margin-left:auto;margin-right:auto}.align-right .media-element.file-default{margin-left:auto}img,media{max-width:100%}@media (max-width:47.4em){.field .media-element.media-vimeo-video,.field .media-element.media-youtube-video{width:100%;margin:0;float:none;display:block}.field img.media-element{margin:1em auto;float:none;display:block;max-width:100%}}.messages{margin:1.8em 0;padding:1.2em 1.6em;border:0;background-color:#d9d9d9}.messages ul{margin:0 0 0 1em;padding:0}.messages li{list-style-image:none}.messages--status,tr.ok{border-left:8px solid #d4df48}.messages--warning,tr.warning{border-left:8px solid #dcaa38}.messages--error,tr.error{border-left:8px solid #b00}.pager>li{display:inline;padding:.5em;list-style-type:none}table{margin-bottom:20px;line-height:140%}.ui-accordion-content table a,.ui-tabs-content table a,table .ui-accordion-content a,table .ui-tabs-content a,table a,table li,table p{font-size:15px;font-size:1.5rem;line-height:120%!important}table th{background:#dedede;font-weight:600;border:1px solid #c7c7c7!important;text-transform:uppercase}.ui-accordion-content table td,table tbody,table td,table th{border:1px solid #c7c7c7}.ui-accordion-content table th a,.ui-tabs-content table th a,table th .ui-accordion-content a,table th .ui-tabs-content a,table th a{text-decoration:none}table tbody tr{border-bottom:1px solid #c7c7c7}table tbody tr.odd,table tbody tr:nth-child(odd){background:#f0f0f0}table tbody tr.even,table tbody tr:nth-child(even){background:#fff}table thead+tbody tr.odd,table thead+tbody tr:nth-child(odd){background:#f0f0f0}.panels-row.odd table tbody tr.odd,.panels-row.odd table tbody tr:nth-child(odd),table thead+tbody tr.even,table thead+tbody tr:nth-child(even){background:#fff}table td,table th{padding:.6em 1em}table caption{color:#666;margin-bottom:5px}.panels-row.odd table tbody tr.even,.panels-row.odd table tbody tr:nth-child(even),.panels-row.odd table thead+tbody tr.odd,.panels-row.odd table thead+tbody tr:nth-child(odd){background:#f3f3f3}.pane-bundle-table table tr.odd,.panels-row.odd table thead+tbody tr.even,.panels-row.odd table thead+tbody tr:nth-child(even){background:#fff}table ul{padding-left:3px;list-style-position:inside}.intro-text-alt.align-center,.intro-text.align-center{width:90%;margin-left:auto;margin-right:auto}.pane-bundle-table table tr.even{background:#f3f3f3}.tabs--primary{padding-top:2em}.tabs--primary li{font-weight:400;background:#ebebeb}.tabs--primary li a{text-decoration:none;color:#b00}.tabs--primary li a:visited{color:#b00}.tabs--primary li a:focus{color:#dcaa38}.tabs--primary li a:hover{color:#2d2d2d;background:#d2d2d2}.tabs--primary li a:active{color:#028da9}.tabs--primary li .active{background:#c5c5c5}body,html{font-family:proximanova,Helvetica,Arial,sans-serif;color:#2d2d2d;font-weight:300}p{margin-bottom:14px}em{font-style:italic}@media (max-width:47.4em){html{font-size:58%}.body,.ui-accordion .ui-accordion-content li,.ui-accordion .ui-accordion-content p,body{font-size:18px;font-size:1.8rem;line-height:150%}}@media (min-width:47.5em){html{font-size:60%}.body,.ui-accordion .ui-accordion-content li,.ui-accordion .ui-accordion-content p,body{font-size:17px;font-size:1.7rem;line-height:150%}.width-70{width:85%}}@media (min-width:60em){html{font-size:62.5%}.body,.ui-accordion .ui-accordion-content li,.ui-accordion .ui-accordion-content p,body{font-size:17px;font-size:1.7rem;line-height:150%}}@media (min-width:82em){html{font-size:66%}.body,.ui-accordion .ui-accordion-content li,.ui-accordion .ui-accordion-content p,body{font-size:16px;font-size:1.6rem;line-height:150%}}h1,h2,h3,h4{margin-bottom:10px;line-height:120%}.pane-bundle-text h2,body h2,body h3,body h4,h2.block__title{margin-top:0}h1{font-size:42px;font-size:4.2rem}h2{font-size:32px;font-size:3.2rem}h2.block__title,h2.pane-title{font-size:27px;font-size:2.7rem}h3{font-size:24px;font-size:2.4rem}h4{font-size:20px;font-size:2rem}.block-title-style,.section-tags h1,.views-page h1{text-transform:uppercase;color:#2d2d2d;font-size:27px;font-size:2.7rem}.ui-accordion-content a,.ui-tabs-content a,a{color:#b00;font-weight:500;text-decoration:none}a:visited{color:#b00}a:focus{color:#d4df48}a:hover{color:#028da9;text-decoration:underline}a:active{color:#d65828}.ui-accordion-content strong a,.ui-tabs-content strong a,strong .ui-accordion-content a,strong .ui-tabs-content a,strong a{font-weight:700}.header-links,.pane-node-title a{color:#b00;text-decoration:none}.header-links:visited,.pane-node-title a:visited{color:#b00}.header-links:focus,.pane-node-title a:focus{color:#d4df48}.header-links:hover,.pane-node-title a:hover{color:#2d2d2d;text-decoration:none}.header-links:active,.pane-node-title a:active{color:#d65828}.reverse-links,.reverse-links:visited{color:#ebebeb}.reverse-links:focus{color:#d4df48}.reverse-links:hover{color:#fff}.pipe,.reverse-links:active{color:#b00}.more-link,.more-link a{text-transform:uppercase;font-weight:600;text-decoration:none;margin-top:2em}.pipe{font-weight:600}body .ui-accordion .ui-accordion-header,body .ui-accordion .ui-accordion-header a,body .ui-accordion .ui-accordion-header.ui-state-active,body .ui-accordion .ui-accordion-header.ui-state-active a,body .ui-accordion .ui-accordion-header.ui-state-default,body .ui-accordion .ui-accordion-header.ui-state-default a,body .ui-accordion .ui-accordion-header.ui-state-hover,body .ui-accordion .ui-accordion-header.ui-state-hover a,body .ui-tabs .ui-tabs-nav,body .ui-tabs .ui-tabs-nav a{font-weight:400;color:#2d2d2d}.fine-print,table caption{font-size:12px;font-size:1.2rem;line-height:135%}.labels{font-size:13px;font-size:1.3rem;text-transform:uppercase;font-weight:400}.align-right{text-align:right}.align-center{text-align:center}blockquote{background:#f5f5f5;border-left:4px solid #ddd;padding:1.9em 2em;overflow:hidden}blockquote li,blockquote ol,blockquote p,blockquote ul{margin:.4em 0 0}blockquote div,blockquote h2,blockquote h3,blockquote h4,blockquote h5{margin:0 0 .4em}blockquote.pull-quote{font-size:26px;font-size:2.6rem;background:0 0;border-left:0 none;font-family:capita,Georgia,serif;font-style:italic;line-height:130%;padding:0;margin:1.5em 1.5em 1.5em 2em}blockquote.pull-quote :first-child{margin-top:.3em}blockquote.pull-quote::before{font-size:35px;font-size:3.5rem;color:rgba(0,0,0,.6);content:"\f10d";font-family:FontAwesome;font-style:normal;margin-left:-1.5em;float:left}blockquote.pull-quote cite,body .ui-tabs .ui-tabs-nav{font-family:proximanova,Helvetica,Arial,sans-serif}blockquote.pull-quote cite{font-size:16px;font-size:1.6rem;font-style:normal;display:block;padding-top:.6em}blockquote.pull-quote cite::before{content:"―";margin-right:3px}body .ui-accordion{margin:1em 0;position:relative}body .ui-accordion .accordion-item,body .ui-accordion .views-row{margin:.5em 0}body .ui-accordion .ui-accordion-header{font-size:.9em;padding:.5em 1em .4em 1.9em}body .ui-accordion .ui-accordion-header.cke_widget_editable{padding:.5em 3em .3em 1.9em}body .ui-accordion .ui-accordion-header p{margin:0;color:#2d2d2d}body .ui-accordion .ui-accordion-header,body .ui-accordion .ui-accordion-header.ui-state-active,body .ui-accordion .ui-accordion-header.ui-state-default,body .ui-accordion .ui-accordion-header.ui-state-hover{border:0;background-color:#dedede}body .ui-accordion .ui-accordion-header a,body .ui-accordion .ui-accordion-header.ui-state-active a,body .ui-accordion .ui-accordion-header.ui-state-default a,body .ui-accordion .ui-accordion-header.ui-state-hover a{padding:0}body .ui-accordion .ui-accordion-header.ui-state-active{background-image:none}body .ui-accordion .ui-accordion-content{box-sizing:content-box;background-color:#fff;padding:1.2em 1.9em .5em;border:1px solid #dedede}body .ui-tabs{background-color:transparent;margin:1em 0;position:relative;padding:0;clear:both}body .ui-tabs .ui-tabs-nav{font-size:.9em;padding:.5em 1em 0 0;background-color:transparent}.callout,.intro-text,.intro-text-legacy,.tagline{font-family:capita,Georgia,serif}body .ui-tabs .ui-tabs-nav.cke_widget_editable{background-color:#dedede;padding:.5em 3em .3em 1.9em}body .ui-tabs .ui-tabs-nav li,body .ui-tabs .ui-tabs-nav li.ui-state-active,body .ui-tabs .ui-tabs-nav li.ui-state-default,body .ui-tabs .ui-tabs-nav li.ui-state-hover{border-width:1px 1px 0;border-style:solid;border-color:#dedede}body .ui-tabs .ui-tabs-nav li.ui-state-default,body .ui-tabs .ui-tabs-nav li.ui-state-hover{background-color:#dedede;background-image:none}body .ui-tabs .ui-tabs-nav li.ui-tabs-active{background-color:#fff}body .ui-tabs .ui-tabs-content{box-sizing:content-box;background-color:#fff;padding:1.2em 1.9em .5em;border:1px solid #dedede}body .ui-tabs .ui-tabs-content:after{content:"";display:table;clear:both}body .drulog-panels-accordion .accordion-title{margin-bottom:.5em}body .drulog-panels-accordion .accordion-content{margin-top:-.8em;margin-bottom:.8em}.tagline,h2.underlined,h3.underlined{margin-bottom:20px}.tagline{font-size:32px;font-size:3.2rem;font-weight:100;line-height:130%}.subhead{font-size:22px;font-size:2.2rem;color:#b00;line-height:130%}.underlined{border-bottom:1px solid #c7c7c7;padding-bottom:4px;font-weight:300!important;margin-top:0}h2.underlined{font-size:30px;font-size:3rem}h3.underlined{font-size:26px;font-size:2.6rem}.field--name-field-ocio-body .underlined{padding-top:20px}.field--name-field-ocio-body .underlined:first-child{padding-top:0}.row-tiles .underlined{margin-bottom:30px!important;padding-top:20px!important}.intro-text{font-size:22px;font-size:2.2rem;font-style:italic;font-weight:100;line-height:160%;padding-bottom:20px}.intro-text:last-child{padding-bottom:0}.intro-text-alt{font-size:20px;font-size:2rem;font-weight:300;line-height:160%;padding-bottom:10px}.intro-text-alt:last-child,.intro-text-legacy:last-child{padding-bottom:0}.intro-text-legacy{font-size:20px;font-size:2rem;font-weight:100;line-height:170%;margin-top:.6em;margin-bottom:2em}.intro-text-legacy.align-center{width:85%;margin-left:auto;margin-right:auto}.callout{font-size:36px;font-size:3.6rem;color:#b00;font-weight:300;margin:1em 0 .4em}hr{background-color:#d2d2d2;border:0;height:1px;margin:2em 0}.width-70{margin:10px auto}@media (min-width:60em){.width-70{width:75%}}@media (min-width:82em){.width-70{width:70%}}#block-views-featured-slideshow-block .flexslider{background:#2d2d2d;border:0;border-radius:0;box-shadow:none;margin:0}#block-views-featured-slideshow-block .flexslider .flex-meta{display:block;width:100%;position:absolute;color:#fff;text-align:center;bottom:.6em;padding:.4em 8%;font-size:24px;font-size:2.4rem}#block-views-featured-slideshow-block .flexslider .flex-meta .flex-title{display:block;font-weight:400;line-height:1.1em}#block-views-featured-slideshow-block .flexslider .flex-meta .flex-summary{font-weight:300;font-size:.6em;line-height:1.2em;display:none}@media (min-width:47.5em){#block-views-featured-slideshow-block .flexslider .flex-meta .flex-summary{display:block}#block-views-featured-slideshow-block .flexslider .flex-meta{bottom:.3em;padding:.5em 6%;font-size:32px;font-size:3.2rem}#block-views-featured-slideshow-block .flexslider .flex-meta .flex-title{margin-bottom:.1em}}@media (min-width:60em){#block-views-featured-slideshow-block .flexslider .flex-meta{font-size:34px;font-size:3.4rem}}@media (min-width:82em){#block-views-featured-slideshow-block .flexslider .flex-meta{font-size:40px;font-size:4rem}}#block-views-featured-slideshow-block .flexslider .flex-meta.white{color:#fff}#block-views-featured-slideshow-block .flexslider .flex-meta.white.translucent{bottom:0;background-color:rgba(20,20,20,.6)}#block-views-featured-slideshow-block .flexslider .flex-meta.black.translucent,#block-views-featured-slideshow-block .flexslider .flex-meta.dk-gray.translucent{background-color:rgba(200,200,200,.7);bottom:0}#block-views-featured-slideshow-block .flexslider .flex-meta.dk-gray{color:#2d2d2d}#block-views-featured-slideshow-block .flexslider .flex-meta.black{color:#000}#block-views-featured-slideshow-block .flexslider .flex-direction-nav a{color:rgba(0,0,0,.8);text-decoration:none}#block-views-featured-slideshow-block .flexslider .flex-direction-nav a:before{line-height:1em}#block-views-featured-slideshow-block .lt-ie9 .flexslider a .flex-meta{background-color:transparent;-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#AA000000, endColorstr=#AA000000)"}#block-views-featured-slideshow-block .lt-ie9 .flexslider .flex-direction-nav a{color:#000;filter:alpha(opacity="60")}#block-views-featured-slideshow-block .lt-ie9 .flexslider .flex-direction-nav a:hover{filter:alpha(opacity="80")}#block-views-featured-slideshow-block ul.flex-direction-nav,#block-views-featured-slideshow-block ul.flex-direction-nav:hover{display:none}#block-views-featured-slideshow-block .flex-control-nav{text-align:right;padding-right:1.8em;top:20px;z-index:99;width:100%;height:30px}#block-views-featured-slideshow-block .flex-control-paging li a{background-color:#2d2d2d;text-align:left;width:15px;height:15px;margin-bottom:1em}#block-views-featured-slideshow-block .flex-control-paging li a.flex-active{background-color:#fff}@media (max-width:47.4em){#block-views-featured-slideshow-block .flex-control-paging li a{display:none}}.l-region--hero-wrapper{position:relative;max-height:500px}.l-region--hero-wrapper .views-field-field-basic-image-image{position:relative;top:0;z-index:9;max-height:500px;overflow:hidden}.page-newsletter-archive h1{margin-bottom:25px}.page-newsletter-archive .l-region--content{padding-bottom:20px}.page-newsletter-archive .l-region--content li{margin-bottom:15px}.block--mm-widgets .item,.pane-mm-widgets-live-pane .item{margin:1.8em 0}.block--mm-widgets .item .content,.pane-mm-widgets-live-pane .item .content{margin-bottom:.3em}.block--mm-widgets .item .network .fa,.pane-mm-widgets-live-pane .item .network .fa{margin-right:.6em;position:relative;top:1px;padding:.3em 0 .25em;width:1.6em}.block--mm-widgets .fa,.pane-mm-widgets-live-pane .fa{color:#fff;padding:.55em 0 .5em;text-align:center;width:1.8em}.block--mm-widgets .fa.fa-twitter,.pane-mm-widgets-live-pane .fa.fa-twitter{background-color:#00aced}.block--mm-widgets .fa.fa-facebook-page,.pane-mm-widgets-live-pane .fa.fa-facebook-page{background-color:#3b5998}.block--mm-widgets .fa.fa-facebook-page:before,.pane-mm-widgets-live-pane .fa.fa-facebook-page:before{content:'\f09a'}.block--mm-widgets .fa.fa-instagram,.pane-mm-widgets-live-pane .fa.fa-instagram{background-color:#517fa4;top:2px}.block--mm-widgets .fa.fa-rss,.pane-mm-widgets-live-pane .fa.fa-rss{background-color:#f60}.block--mm-widgets .fa.fa-youtube-playlist,.pane-mm-widgets-live-pane .fa.fa-youtube-playlist{background-color:#b00}.block--mm-widgets .fa.fa-youtube-playlist:before,.pane-mm-widgets-live-pane .fa.fa-youtube-playlist:before{content:'\f16a'}.block--mm-widgets.mm-single-channel .fa.mm-channel,.pane-mm-widgets-live-pane.mm-single-channel .fa.mm-channel{float:left;margin-right:.6em}.block--mm-widgets.mm-single-channel .fa.mm-channel+.pane-title,.pane-mm-widgets-live-pane.mm-single-channel .fa.mm-channel+.pane-title{line-height:1.6em}body.html.footer-dk-gray{background-color:#2d2d2d}body.html.footer-md-gray{background-color:#666}body.html.footer-lt-gray{background-color:#ebebeb}body.html.footer-white{background-color:#fff}form.search-form{margin-top:1em}fieldset.search-advanced{border:0;background-color:#ebebeb;margin-left:0;margin-right:0;padding:.5em 0 0}fieldset.search-advanced legend{margin-top:2.5em}fieldset.search-advanced .criterion{margin-top:1em}fieldset.search-advanced input.form-submit{margin-bottom:1em}p.search-result__snippet{padding-left:0;margin-bottom:.4em}.l-page .l-region--main-menu:hover #search-block-toggle{outline:0!important}.l-page .l-region--main-menu #search-block-toggle{cursor:pointer}.l-page .l-region--main-menu #search-block-toggle:focus{outline:red dotted 1px}.l-page .l-region--main-menu #wcm-search{position:relative}.l-page .l-region--main-menu #wcm-search #search-block-form{z-index:498;position:absolute;right:0;top:100%;background-color:rgba(0,0,0,.8);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#333333, endColorstr=#333333);height:auto;display:none}.l-page .l-region--main-menu #wcm-search #search-block-form .container-inline{display:table;padding:1em}.l-page .l-region--main-menu #wcm-search #search-block-form .container-inline .form-item{display:table-cell;height:100%;width:100%}.l-page .l-region--main-menu #wcm-search #search-block-form .container-inline .form-item .form-text{border:0;display:table-cell;padding:.35em .5em .2em;font-size:1em;border-radius:0;line-height:normal!important}.l-page .l-region--main-menu #wcm-search #search-block-form .container-inline .form-actions{display:table-cell;height:100%;text-align:center;width:0;vertical-align:middle}.l-page .l-region--main-menu #wcm-search #search-block-form .container-inline .form-actions button.form-submit{font-size:1em;line-height:normal!important;border-radius:0;-webkit-box-sizing:content-box;padding:.35em .8em .2em;box-shadow:none;margin:0;display:table-cell}#block-menu-menu-global-menu ul.menu span.ext,.book_printer,.l-page .l-region--main-menu #wcm-search #search-block-form .container-inline .form-actions input.form-submit,.node-type-news-client-cached-article .tabs--primary,.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text span.ext{display:none}@media (max-width:47.4em){.l-page .l-region--main-menu #wcm-search #search-block-toggle{position:absolute;right:0;padding:1em;font-size:1.2em;z-index:500;width:auto;margin-top:.25em}.l-page .l-region--main-menu #wcm-search #search-block-form{display:none;height:auto;width:100%;top:4em;z-index:499}.l-page .l-region--main-menu #wcm-search #search-block-form .container-inline{width:100%;clear:both;padding:4%}.l-page .l-region--main-menu #wcm-search #search-block-form .container-inline .form-text{width:100%}}.field--name-field-ocio-body .block--webform{font-size:14px;font-size:1.4rem;margin-bottom:20px}.field--name-field-ocio-body .block--webform .block__title{font-size:22px;font-size:2.2rem;font-weight:400!important;color:#b00!important;padding-top:20px}.field--name-field-ocio-body .block--webform label{font-size:13px;font-size:1.3rem}.field--name-field-ocio-body .block--webform .button-primary{margin-top:10px}div.workbench-info-block{background-color:#d9d9d9;padding:1em 1.5em;margin:1em 0 3em;border:none;color:#2d2d2d;font-size:14px;font-size:1.4rem;border-left:8px solid #d65828}div.workbench-info-block #edit-submit{margin-left:1em;font-size:13px!important;padding:.4em .8em!important}.node-type-calendar-entry .fa-calendar,.node-type-calendar-entry .fa-map-marker{float:left;margin-right:.75em}.node-type-calendar-entry .fa-calendar{font-size:24px;font-size:2.4rem}.node-type-calendar-entry .field--name-field-date{font-size:21px;font-size:2.1rem;font-weight:400;margin:1.3em 0 1.5em}.node-type-calendar-entry .field--name-field-date .pipe{margin:0 10px}.node-type-calendar-entry .fa-map-marker{font-size:34px;font-size:3.4rem;margin-right:.6em}.node-type-calendar-entry .group-location{font-size:20px;font-size:2rem;font-weight:400;margin-bottom:1.5em}.node-type-calendar-entry .group-location .field--name-field-location-room-number{float:left;margin-right:5px}.pane-calendar-upcoming-pane table tbody,.pane-calendar-upcoming-pane table td,.pane-calendar-upcoming-pane table tr{border:0;background:#fff}.pane-calendar-upcoming-pane table td{vertical-align:middle}.pane-calendar-upcoming-pane table tr{border-top:2px solid #ebebeb}.pane-calendar-upcoming-pane table tr.views-row-last{border-bottom:2px solid #ebebeb}.pane-calendar-upcoming-pane table .views-field-field-date-2{font-weight:600;text-transform:uppercase;text-align:center;font-size:20px;font-size:2rem}.pane-calendar-upcoming-pane table td.views-field-field-date-2{border-right:2px solid #ebebeb;padding:.6em .5em}.pane-calendar-upcoming-pane table .views-field-title-1 a{font-size:20px;font-size:2rem}.view .date-nav-wrapper .date-prev{border-radius:0;background:#ebebeb;float:none;padding:5px 8px 5px 0}.view .date-nav-wrapper .date-prev:hover{background:#d7d7d7}.view .date-nav-wrapper .date-next{border-radius:0;background:#ebebeb;float:none;padding:5px 0 5px 8px}.view .date-nav-wrapper .date-next:hover{background:#d7d7d7}.view .date-nav-wrapper .date-prev a{margin-left:10px;font-weight:400;font-size:14px}.view .date-nav-wrapper .date-next a{margin-right:10px;font-weight:400;font-size:14px}.calendar-calendar th.days{color:#fff!important;background-color:#2d2d2d!important}.calendar-calendar td{color:#2d2d2d}.calendar-calendar td.empty{background:#ccc;border-color:#ccc;color:#bbb}.calendar-calendar .month-view .full tr td.today,.calendar-calendar .month-view .full tr.even td.today,.calendar-calendar .month-view .full tr.odd td.today{border-left:3px solid #028da9;border-right:3px solid #028da9}.calendar-calendar .month-view .full td.date-box.today{border-width:3px 3px 0;border-color:#028da9}.calendar-calendar .month-view .full tr td.single-day.today{border-bottom:3px solid #028da9}.calendar-calendar td .inner div.calendar div,.calendar-calendar td .inner div.calendar div a{background:0 0!important}.calendar-calendar .day-view .full td.single-day div.dayview,.calendar-calendar .month-view .full td.single-day div.monthview,.calendar-calendar .week-view .full td.single-day div.weekview{background:0 0;padding:0 5px}.ds-2col-stacked-fluid.node--article--full .group-left,.ds-2col-stacked-fluid.node--article--full .group-right,.ds-2col-stacked-fluid.node--news-client-cached-article--full .group-left,.ds-2col-stacked-fluid.node--news-client-cached-article--full .group-right{width:100%;float:none}.ds-2col-stacked-fluid.node--article--full .group-right,.ds-2col-stacked-fluid.node--news-client-cached-article--full .group-right{margin-top:30px;margin-bottom:30px}@media (min-width:60em){.ds-2col-stacked-fluid.node--article--full.has-sidebar .group-left,.ds-2col-stacked-fluid.node--news-client-cached-article--full.has-sidebar .group-left{width:70%;float:left;margin-bottom:30px}.ds-2col-stacked-fluid.node--article--full.has-sidebar .group-right,.ds-2col-stacked-fluid.node--news-client-cached-article--full.has-sidebar .group-right{width:27%;float:right;margin-top:10px}}.node--article,.node--news-client-cached-article{position:relative}.node--article .field--name-field-kicker,.node--article .field--name-news-client-kicker,.node--news-client-cached-article .field--name-field-kicker,.node--news-client-cached-article .field--name-news-client-kicker{text-transform:uppercase;color:#666;font-weight:600;font-size:22px;font-size:2.2rem;margin-bottom:10px}.node--article .field--name-byline,.node--article .field--name-byline-with-date,.node--news-client-cached-article .field--name-byline,.node--news-client-cached-article .field--name-byline-with-date{font-weight:600;padding-top:6px;margin-bottom:12px}.node--article .field--name-field-featured-image,.node--article .field--name-news-client-image-json,.node--news-client-cached-article .field--name-field-featured-image,.node--news-client-cached-article .field--name-news-client-image-json{float:right;max-width:50%;margin:10px 0 40px 40px}.node--article .field--name-field-sidebar,.node--article .field--name-news-client-sidebar,.node--news-client-cached-article .field--name-field-sidebar,.node--news-client-cached-article .field--name-news-client-sidebar{background:#ebebeb;padding:30px 1.8em 20px}.node--article .field--name-field-sidebar h2,.node--article .field--name-field-sidebar h3,.node--article .field--name-field-sidebar h4,.node--article .field--name-news-client-sidebar h2,.node--article .field--name-news-client-sidebar h3,.node--article .field--name-news-client-sidebar h4,.node--news-client-cached-article .field--name-field-sidebar h2,.node--news-client-cached-article .field--name-field-sidebar h3,.node--news-client-cached-article .field--name-field-sidebar h4,.node--news-client-cached-article .field--name-news-client-sidebar h2,.node--news-client-cached-article .field--name-news-client-sidebar h3,.node--news-client-cached-article .field--name-news-client-sidebar h4{margin-top:20px;margin-bottom:20px}.node--article .field--name-field-sidebar h2:first-child,.node--article .field--name-field-sidebar h3:first-child,.node--article .field--name-field-sidebar h4:first-child,.node--article .field--name-news-client-sidebar h2:first-child,.node--article .field--name-news-client-sidebar h3:first-child,.node--article .field--name-news-client-sidebar h4:first-child,.node--news-client-cached-article .field--name-field-sidebar h2:first-child,.node--news-client-cached-article .field--name-field-sidebar h3:first-child,.node--news-client-cached-article .field--name-field-sidebar h4:first-child,.node--news-client-cached-article .field--name-news-client-sidebar h2:first-child,.node--news-client-cached-article .field--name-news-client-sidebar h3:first-child,.node--news-client-cached-article .field--name-news-client-sidebar h4:first-child{margin-top:0}.node--article .field--name-field-learn-more,.node--article .field--name-news-client-links,.node--news-client-cached-article .field--name-field-learn-more,.node--news-client-cached-article .field--name-news-client-links{background:#ebebeb;padding:1em 1.4em;clear:both}.node--article .field--name-field-learn-more .label-above,.node--article .field--name-news-client-links .label-above,.node--news-client-cached-article .field--name-field-learn-more .label-above,.node--news-client-cached-article .field--name-news-client-links .label-above{font-size:17px;font-size:1.7rem;font-weight:600;text-transform:uppercase;padding-bottom:.2em}.node--article .field--name-field-learn-more ul,.node--article .field--name-news-client-links ul,.node--news-client-cached-article .field--name-field-learn-more ul,.node--news-client-cached-article .field--name-news-client-links ul{padding-left:1.2em}.node--article .field--name-field-learn-more ul li,.node--article .field--name-news-client-links ul li,.node--news-client-cached-article .field--name-field-learn-more ul li,.node--news-client-cached-article .field--name-news-client-links ul li{margin:5px 0}.node--article .field--name-field-learn-more ul li.last,.node--article .field--name-news-client-links ul li.last,.node--news-client-cached-article .field--name-field-learn-more ul li.last,.node--news-client-cached-article .field--name-news-client-links ul li.last{margin-bottom:0}.node--article .field--name-field-tags,.node--article .field--name-news-client-tags,.node--news-client-cached-article .field--name-field-tags,.node--news-client-cached-article .field--name-news-client-tags{padding-top:30px}.node--article .field--name-field-tags .field__label,.node--article .field--name-news-client-tags .field__label,.node--news-client-cached-article .field--name-field-tags .field__label,.node--news-client-cached-article .field--name-news-client-tags .field__label{margin-right:5px}.node--article .article-modified,.node--news-client-cached-article .article-modified{margin-top:1em;font-size:13px;font-style:italic}.node--article .article-modified .label-inline,.node--news-client-cached-article .article-modified .label-inline{font-weight:600}.node-type-basic-page h1{margin-bottom:24px}.node-type-basic-page .field--name-field-ocio-body{margin-bottom:20px}.node--basic-page{padding-bottom:2em}.book-navigation{border-top:1px solid #ebebeb;border-bottom:1px solid #ebebeb;padding:.5em 0;margin:2em 0}.book-navigation__links a{color:#2d2d2d;text-transform:uppercase}.book-navigation__links a:hover,.book-navigation__links a:visited:hover{color:#b00;text-decoration:none}.book-navigation__links a:visited{color:#2d2d2d}.book-navigation__links a .fa{color:#b00}.book-navigation__links>.book-navigation__previous .fa{margin-right:10px}.book-navigation__links>.book-navigation__next .fa{margin-left:10px}.book_add_child a{color:#2d2d2d;text-transform:uppercase;min-width:180px}.book_add_child:before{content:"\f067";font-family:FontAwesome;color:#028da9;float:left;margin-right:5px}.node-type-ocio-landing-page .l-region--content{padding-top:20px}.node-type-ocio-landing-page h1{margin-bottom:0}.node-type-ocio-landing-page .l-region--hero-wrapper{position:relative;max-height:500px;overflow:hidden;line-height:0}.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image{position:relative;z-index:9}.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text{position:absolute;width:100%;padding:20px 12%;text-align:center;margin:0 auto;left:0;right:0;z-index:99;font-size:26px;font-size:2.6rem;line-height:120%}.panels-ipe .modal-content .change-layout-display .layout-icon .caption,.panels-ipe .modal-content .panels-choose-layout .layout-link>div{line-height:1.4em}@media (min-width:60em){.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text{font-size:30px;font-size:3rem}}@media (min-width:82em){.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text{padding:20px 14%;font-size:32px;font-size:3.2rem}}@media (min-width:100em){.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text{padding:20px 16%}}@media (min-width:112em){.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text{padding:20px 20%}}@media (min-width:125em){.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text{padding:20px 28%}}.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text a:hover{text-decoration:none}.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.white,.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.white a{color:#fff}.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.white a.translucent,.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.white.translucent{background-color:rgba(20,20,20,.6)}.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.white a.translucent:hover,.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.white.translucent:hover{background-color:rgba(46,46,46,.6);color:#fff}.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.dk-gray,.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.dk-gray a{color:#2d2d2d}.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.dk-gray a.translucent,.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.dk-gray.translucent{background-color:rgba(220,220,220,.7)}.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.dk-gray a.translucent:hover,.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.dk-gray.translucent:hover{background-color:rgba(200,200,200,.7)}.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.black,.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.black a{color:#000}.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.black a.translucent,.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.black.translucent{background-color:rgba(220,220,220,.7)}.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.black a.translucent:hover,.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.black.translucent:hover{background-color:rgba(200,200,200,.7)}.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.center-top{top:0}.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.center-middle{top:24%}@media (min-width:47.5em){.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.center-middle{top:30%}}@media (min-width:60em){.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.center-middle{top:36%}}.node-type-ocio-landing-page .l-region--hero-wrapper .field--name-field-banner-image-text.center-bottom{bottom:0;overflow:hidden}#block-menu-menu-global-menu ul.menu{float:right}#block-menu-menu-global-menu ul.menu a,#block-menu-menu-global-menu ul.menu li{font-size:14px;font-size:1.4rem;font-weight:300}#block-menu-menu-global-menu ul.menu .leaf{float:left}#block-menu-menu-global-menu ul.menu .leaf:after{content:"|";margin:0 .6em;font-weight:100;font-size:16px;font-size:1.6rem;position:relative;bottom:-.1em}#block-menu-menu-global-menu ul.menu .leaf.last{margin-right:0}#block-menu-menu-global-menu ul.menu .leaf.last:after{content:none}.l-region--global-menu{padding-top:.55em;padding-bottom:.5em}.l-region--global-menu,.l-region--global-menu.white{color:#b00;background-image:-owg-linear-gradient(#f0f0f0,#ebebeb 75%,#e6e6e6);background-image:linear-gradient(#f0f0f0,#ebebeb 75%,#e6e6e6)}.l-region--global-menu a,.l-region--global-menu.white a{color:#2d2d2d}.l-region--global-menu a:hover,.l-region--global-menu.white a:hover{color:#b00}.l-region--global-menu a:active,.l-region--global-menu.white a:active{color:#028da9}.l-region--global-menu a:focus,.l-region--global-menu.white a:focus{color:#d65828}.l-region--global-menu.lt-gray{color:#b00;background-image:-owg-linear-gradient(#dedede,#dcdcdc 65%,#d4d4d4);background-image:linear-gradient(#dedede,#dcdcdc 65%,#d4d4d4)}.l-region--global-menu.lt-gray a{color:#2d2d2d}.l-region--global-menu.lt-gray a:hover{color:#b00}.l-region--global-menu.lt-gray a:active{color:#028da9}.l-region--global-menu.lt-gray a:focus{color:#d65828}.l-region--global-menu.md-gray{color:#ababab;background-image:-owg-linear-gradient(#6e6e6e,#757575 75%,#787878);background-image:linear-gradient(#6e6e6e,#757575 75%,#787878)}.l-region--global-menu.md-gray a{color:#fff}.l-region--global-menu.md-gray a:hover{color:#d4df48}.l-region--global-menu.md-gray a:active{color:#dcaa38}.l-region--global-menu.md-gray a:focus{color:#d65828}.l-region--global-menu.dk-gray{color:#b8b8b8;background-image:-owg-linear-gradient(#323232,#3a3a3a 75%,#3c3c3c);background-image:linear-gradient(#323232,#3a3a3a 75%,#3c3c3c)}.l-region--global-menu.dk-gray a{color:#fff}.l-region--global-menu.dk-gray a:hover{color:#028da9}.l-region--global-menu.dk-gray a:active{color:#dcaa38}.l-region--global-menu.dk-gray a:focus{color:#d65828}@media (max-width:47.4em){.l-region--global-menu{padding:.1em 0}ul.menu{float:left!important}}.l-region--main-menu.mean-container .mean-bar,.l-region--main-menu.mean-container .mean-nav{background:0 0}.l-region--main-menu.mean-container .mean-bar{z-index:499;padding:0}.l-region--main-menu.mean-container a.meanmenu-reveal{color:#fff;font-size:1.5em;padding:.9em 1em;text-indent:0;text-align:center;left:0!important;right:auto!important}.l-region--main-menu.mean-container .mean-nav{margin-top:4em}.l-region--main-menu.mean-container .mean-nav ul li{text-transform:uppercase}.l-region--main-menu.mean-container .mean-nav ul li li{display:block;float:left;width:100%;margin:0;text-align:left;font-weight:500;box-sizing:border-box;background:rgba(0,0,0,.1);color:rgba(0,0,0,.9)}.l-region--main-menu.mean-container .mean-nav ul li a,.l-region--main-menu.mean-container .mean-nav ul li span{color:#fff;text-decoration:none;padding:1em 1em .9em 1.2em;border:0;box-sizing:border-box;width:100%;display:block}.l-region--main-menu.mean-container .mean-nav ul li li a{padding-left:3em;box-sizing:border-box;width:100%;color:#222;opacity:1}.l-region--main-menu.mean-container .mean-nav ul li a.mean-expand{border:0!important;padding:.7em .9em 1.55em .8em!important;width:auto;margin:0;background-color:transparent}.l-region--main-menu.mean-container .mean-nav ul li a.mean-expand:hover{background:0 0}body.menu-white .l-region--main-menu.mean-container{background:#fff;border-bottom:1px solid #e6e6e6}body.menu-white .l-region--main-menu.mean-container .mean-nav a,body.menu-white .l-region--main-menu.mean-container .mean-nav span,body.menu-white .l-region--main-menu.mean-container a.meanmenu-reveal{color:#666}body.menu-white .l-region--main-menu.mean-container .mean-bar,body.menu-white .l-region--main-menu.mean-container .mean-nav{background:#fff}body.menu-white .l-region--main-menu.mean-container .mean-nav ul li li{background:#e6e6e6}body.menu-white .l-region--main-menu.mean-container .mean-nav ul li li a,body.menu-white .l-region--main-menu.mean-container .mean-nav ul li li span{color:#1a1a1a}body.menu-lt-gray .l-region--main-menu.mean-container{background:#ebebeb;border-bottom:1px solid #d2d2d2}body.menu-lt-gray .l-region--main-menu.mean-container .mean-nav a,body.menu-lt-gray .l-region--main-menu.mean-container .mean-nav span,body.menu-lt-gray .l-region--main-menu.mean-container a.meanmenu-reveal{color:#2d2d2d}body.menu-lt-gray .l-region--main-menu.mean-container .mean-bar,body.menu-lt-gray .l-region--main-menu.mean-container .mean-nav{background:#ebebeb}body.menu-lt-gray .l-region--main-menu.mean-container .mean-nav ul li li{background:#d2d2d2}body.menu-lt-gray .l-region--main-menu.mean-container .mean-nav ul li li a,body.menu-lt-gray .l-region--main-menu.mean-container .mean-nav ul li li span{color:#000}body.menu-black .l-region--main-menu.mean-container .mean-nav a,body.menu-black .l-region--main-menu.mean-container .mean-nav span,body.menu-black .l-region--main-menu.mean-container .mean-nav ul li li a,body.menu-black .l-region--main-menu.mean-container .mean-nav ul li li span,body.menu-black .l-region--main-menu.mean-container a.meanmenu-reveal,body.menu-dk-gray .l-region--main-menu.mean-container .mean-nav a,body.menu-dk-gray .l-region--main-menu.mean-container .mean-nav span,body.menu-dk-gray .l-region--main-menu.mean-container .mean-nav ul li li a,body.menu-dk-gray .l-region--main-menu.mean-container .mean-nav ul li li span,body.menu-dk-gray .l-region--main-menu.mean-container a.meanmenu-reveal,body.menu-md-gray .l-region--main-menu.mean-container .mean-nav a,body.menu-md-gray .l-region--main-menu.mean-container .mean-nav span,body.menu-md-gray .l-region--main-menu.mean-container .mean-nav ul li li a,body.menu-md-gray .l-region--main-menu.mean-container .mean-nav ul li li span,body.menu-md-gray .l-region--main-menu.mean-container a.meanmenu-reveal,body.menu-red .l-region--main-menu.mean-container .mean-nav a,body.menu-red .l-region--main-menu.mean-container .mean-nav span,body.menu-red .l-region--main-menu.mean-container .mean-nav ul li li a,body.menu-red .l-region--main-menu.mean-container .mean-nav ul li li span,body.menu-red .l-region--main-menu.mean-container a.meanmenu-reveal{color:#fff}body.menu-md-gray .l-region--main-menu.mean-container{background:#666;border-bottom:1px solid #4d4d4d}body.menu-md-gray .l-region--main-menu.mean-container .mean-bar,body.menu-md-gray .l-region--main-menu.mean-container .mean-nav{background:#666}body.menu-md-gray .l-region--main-menu.mean-container .mean-nav ul li li{background:#4d4d4d}body.menu-dk-gray .l-region--main-menu.mean-container{background:#2d2d2d;border-bottom:1px solid #141414}body.menu-dk-gray .l-region--main-menu.mean-container .mean-bar,body.menu-dk-gray .l-region--main-menu.mean-container .mean-nav{background:#2d2d2d}body.menu-dk-gray .l-region--main-menu.mean-container .mean-nav ul li li{background:#535353}body.menu-black .l-region--main-menu.mean-container{background:#000;border-bottom:1px solid #000}body.menu-black .l-region--main-menu.mean-container .mean-bar,body.menu-black .l-region--main-menu.mean-container .mean-nav{background:#000}body.menu-black .l-region--main-menu.mean-container .mean-nav ul li li{background:#262626}body.menu-red .l-region--main-menu.mean-container{background:#b00;border-bottom:1px solid #800}body.menu-red .l-region--main-menu.mean-container .mean-bar,body.menu-red .l-region--main-menu.mean-container .mean-nav{background:#b00}body.menu-red .l-region--main-menu.mean-container .mean-nav ul li li{background:#800}.l-page .l-constrained .mean-container #search-block-toggle,.l-page .l-constrained .mean-container .mean-nav ul li a,.l-page .l-constrained .mean-container .mean-nav ul li span,.l-page .l-constrained .mean-container a.meanmenu-reveal{padding-left:4%;padding-right:4%}.l-page .l-constrained .mean-container .mean-nav a.mean-expand{padding-left:4%!important;padding-right:4%!important;margin-right:-2px}.l-page .l-constrained .mean-container .mean-nav ul li li a{padding-left:8%;padding-right:8%}@media (min-width:47.5em){.l-region--main-menu>*{display:table-cell!important}}@media (max-width:47.4em){.l-region--main-menu-wrapper .l-constrained,.l-region--main-menu-wrapper .l-region--main-menu{padding:0}.l-region--main-menu-wrapper .l-region--main-menu>*{display:block}.l-region--main-menu-second-wrapper{display:none}}#superfish-1-toggle span,.l-region--main-menu h2.block__title,.l-region--main-menu span.ext,.l-region--main-menu-second h2.block__title,.l-region--main-menu-second span.ext,.l-region--sidebar-1 h2.block__title,.l-region--sidebar-1 span.ext{display:none}.l-region--main-menu .menu .collapsed,.l-region--main-menu .menu .expanded,.l-region--main-menu .menu .leaf,.l-region--main-menu-second .menu .collapsed,.l-region--main-menu-second .menu .expanded,.l-region--main-menu-second .menu .leaf,.l-region--sidebar-1 .menu .collapsed,.l-region--sidebar-1 .menu .expanded,.l-region--sidebar-1 .menu .leaf{list-style-image:none;list-style-type:none}.l-region--main-menu>*{display:table-cell;vertical-align:middle;width:100%}.l-region--main-menu ul.sf-menu{float:left;clear:left;margin:0}.l-region--main-menu ul.sf-menu li{float:left;margin:0;padding:.75em 1.6em .75em 0;text-transform:uppercase}.l-region--main-menu ul.sf-menu li a,.l-region--main-menu ul.sf-menu li span{font-weight:500;text-decoration:none}.l-region--main-menu ul.sf-menu li a:hover{text-decoration:none}.menu-style-1 .l-region--main-menu-second-wrapper{display:none}.menu-style-1 .l-region--main-menu ul.sf-menu ul{display:none;position:absolute;z-index:99;margin-top:.7em;margin-left:-.9em}.l-region--main-menu-second .main-menu-second-ul,.menu-style-2 .l-region--main-menu ul.sf-menu{margin-left:-1em}.menu-style-1 .l-region--main-menu ul.sf-menu ul li{padding:0}.menu-style-1 .l-region--main-menu ul.sf-menu ul li a{padding:.75em .9em .65em}.menu-style-1 .l-region--main-menu ul li:hover>ul{display:block}.menu-style-1 .l-region--main-menu ul ul.menu li{float:none;position:relative}.menu-style-1 .sf-menu ul:before{content:' ';height:0;position:absolute;width:0;border:10px solid transparent;top:-19px;left:10px;z-index:2}.menu-style-1 .l-region--main-menu,.menu-style-1 .l-region--main-menu-wrapper,.menu-style-1.menu-white .l-region--main-menu,.menu-style-1.menu-white .l-region--main-menu-wrapper{background:#fff}.menu-style-1 .l-region--main-menu-second-wrapper,.menu-style-1 .main-menu-second-ul,.menu-style-1.menu-lt-gray .l-region--main-menu,.menu-style-1.menu-lt-gray .l-region--main-menu-wrapper,.menu-style-1.menu-white .l-region--main-menu-second-wrapper,.menu-style-1.menu-white .main-menu-second-ul{background:#ebebeb}.menu-style-1 #search-block-toggle,.menu-style-1.menu-white #search-block-toggle{color:#666}.menu-style-1 #search-block-toggle:hover,.menu-style-1.menu-white #search-block-toggle:hover{color:#d4df48}.menu-style-1 #search-block-toggle:active,.menu-style-1.menu-white #search-block-toggle:active{color:#028da9}.menu-style-1 #search-block-toggle:focus,.menu-style-1.menu-white #search-block-toggle:focus{color:#d4df48}.menu-style-1 .sf-menu ul:before,.menu-style-1.menu-white .sf-menu ul:before{border-bottom-color:#ebebeb}.menu-style-1 .main-menu-top-li a,.menu-style-1 .main-menu-top-li span,.menu-style-1.menu-white .main-menu-top-li a,.menu-style-1.menu-white .main-menu-top-li span{color:#666!important}.menu-style-1 .main-menu-top-li a:hover,.menu-style-1 .main-menu-top-li span:hover,.menu-style-1.menu-white .main-menu-top-li a:hover,.menu-style-1.menu-white .main-menu-top-li span:hover{color:#b00!important}.menu-style-1 .main-menu-top-li a:active,.menu-style-1 .main-menu-top-li span:active,.menu-style-1.menu-white .main-menu-top-li a:active,.menu-style-1.menu-white .main-menu-top-li span:active{color:#028da9!important}.menu-style-1 .main-menu-top-li a:focus,.menu-style-1 .main-menu-top-li span:focus,.menu-style-1.menu-white .main-menu-top-li a:focus,.menu-style-1.menu-white .main-menu-top-li span:focus{color:#d4df48!important}.menu-style-1 .main-menu-second-ul a,.menu-style-1 .main-menu-second-ul span,.menu-style-1.menu-white .main-menu-second-ul a,.menu-style-1.menu-white .main-menu-second-ul span{color:#666!important}.menu-style-1 .main-menu-second-ul a:hover,.menu-style-1 .main-menu-second-ul span:hover,.menu-style-1.menu-white .main-menu-second-ul a:hover,.menu-style-1.menu-white .main-menu-second-ul span:hover{color:#b00!important}.menu-style-1 .main-menu-second-ul a:active,.menu-style-1 .main-menu-second-ul span:active,.menu-style-1.menu-white .main-menu-second-ul a:active,.menu-style-1.menu-white .main-menu-second-ul span:active{color:#028da9!important}.menu-style-1 .main-menu-second-ul a:focus,.menu-style-1 .main-menu-second-ul span:focus,.menu-style-1.menu-white .main-menu-second-ul a:focus,.menu-style-1.menu-white .main-menu-second-ul span:focus{color:#d4df48!important}.menu-style-1 .main-menu-second-ul .main-menu-second-li.active a,.menu-style-1 .main-menu-second-ul .main-menu-second-li.active a:hover,.menu-style-1 .main-menu-second-ul .main-menu-second-li.active span,.menu-style-1 .main-menu-second-ul .main-menu-second-li.active span:hover,.menu-style-1 .main-menu-second-ul .main-menu-second-li:hover a,.menu-style-1 .main-menu-second-ul .main-menu-second-li:hover a:hover,.menu-style-1 .main-menu-second-ul .main-menu-second-li:hover span,.menu-style-1 .main-menu-second-ul .main-menu-second-li:hover span:hover,.menu-style-1.menu-white .main-menu-second-ul .main-menu-second-li.active a,.menu-style-1.menu-white .main-menu-second-ul .main-menu-second-li.active a:hover,.menu-style-1.menu-white .main-menu-second-ul .main-menu-second-li.active span,.menu-style-1.menu-white .main-menu-second-ul .main-menu-second-li.active span:hover,.menu-style-1.menu-white .main-menu-second-ul .main-menu-second-li:hover a,.menu-style-1.menu-white .main-menu-second-ul .main-menu-second-li:hover a:hover,.menu-style-1.menu-white .main-menu-second-ul .main-menu-second-li:hover span,.menu-style-1.menu-white .main-menu-second-ul .main-menu-second-li:hover span:hover{color:#b00!important}.menu-style-1 .main-menu-second-ul .main-menu-second-li.active a:active,.menu-style-1 .main-menu-second-ul .main-menu-second-li.active span:active,.menu-style-1 .main-menu-second-ul .main-menu-second-li:hover a:active,.menu-style-1 .main-menu-second-ul .main-menu-second-li:hover span:active,.menu-style-1.menu-white .main-menu-second-ul .main-menu-second-li.active a:active,.menu-style-1.menu-white .main-menu-second-ul .main-menu-second-li.active span:active,.menu-style-1.menu-white .main-menu-second-ul .main-menu-second-li:hover a:active,.menu-style-1.menu-white .main-menu-second-ul .main-menu-second-li:hover span:active{color:#028da9!important}.menu-style-1 .main-menu-second-ul .main-menu-second-li.active a:focus,.menu-style-1 .main-menu-second-ul .main-menu-second-li.active span:focus,.menu-style-1 .main-menu-second-ul .main-menu-second-li:hover a:focus,.menu-style-1 .main-menu-second-ul .main-menu-second-li:hover span:focus,.menu-style-1.menu-white .main-menu-second-ul .main-menu-second-li.active a:focus,.menu-style-1.menu-white .main-menu-second-ul .main-menu-second-li.active span:focus,.menu-style-1.menu-white .main-menu-second-ul .main-menu-second-li:hover a:focus,.menu-style-1.menu-white .main-menu-second-ul .main-menu-second-li:hover span:focus{color:#d4df48!important}.menu-style-1.menu-lt-gray .l-region--main-menu-second-wrapper,.menu-style-1.menu-lt-gray .main-menu-second-ul{background:#d7d7d7}.menu-style-1.menu-lt-gray #search-block-toggle{color:#474747}.menu-style-1.menu-lt-gray #search-block-toggle:hover{color:#d4df48}.menu-style-1.menu-lt-gray #search-block-toggle:active{color:#028da9}.menu-style-1.menu-lt-gray #search-block-toggle:focus{color:#d4df48}.menu-style-1.menu-lt-gray .sf-menu ul:before{border-bottom-color:#d7d7d7}.menu-style-1.menu-lt-gray .main-menu-top-li a,.menu-style-1.menu-lt-gray .main-menu-top-li span{color:#474747!important}.menu-style-1.menu-lt-gray .main-menu-top-li a:hover,.menu-style-1.menu-lt-gray .main-menu-top-li span:hover{color:#b00!important}.menu-style-1.menu-lt-gray .main-menu-top-li a:active,.menu-style-1.menu-lt-gray .main-menu-top-li span:active{color:#028da9!important}.menu-style-1.menu-lt-gray .main-menu-top-li a:focus,.menu-style-1.menu-lt-gray .main-menu-top-li span:focus{color:#d4df48!important}.menu-style-1.menu-lt-gray .main-menu-second-ul a,.menu-style-1.menu-lt-gray .main-menu-second-ul span{color:#4d4d4d!important}.menu-style-1.menu-lt-gray .main-menu-second-ul a:hover,.menu-style-1.menu-lt-gray .main-menu-second-ul span:hover{color:#b00!important}.menu-style-1.menu-lt-gray .main-menu-second-ul a:active,.menu-style-1.menu-lt-gray .main-menu-second-ul span:active{color:#028da9!important}.menu-style-1.menu-lt-gray .main-menu-second-ul a:focus,.menu-style-1.menu-lt-gray .main-menu-second-ul span:focus{color:#d4df48!important}.menu-style-1.menu-lt-gray .main-menu-second-ul .main-menu-second-li.active a,.menu-style-1.menu-lt-gray .main-menu-second-ul .main-menu-second-li.active a:hover,.menu-style-1.menu-lt-gray .main-menu-second-ul .main-menu-second-li.active span,.menu-style-1.menu-lt-gray .main-menu-second-ul .main-menu-second-li.active span:hover,.menu-style-1.menu-lt-gray .main-menu-second-ul .main-menu-second-li:hover a,.menu-style-1.menu-lt-gray .main-menu-second-ul .main-menu-second-li:hover a:hover,.menu-style-1.menu-lt-gray .main-menu-second-ul .main-menu-second-li:hover span,.menu-style-1.menu-lt-gray .main-menu-second-ul .main-menu-second-li:hover span:hover{color:#b00!important}.menu-style-1.menu-lt-gray .main-menu-second-ul .main-menu-second-li.active a:active,.menu-style-1.menu-lt-gray .main-menu-second-ul .main-menu-second-li.active span:active,.menu-style-1.menu-lt-gray .main-menu-second-ul .main-menu-second-li:hover a:active,.menu-style-1.menu-lt-gray .main-menu-second-ul .main-menu-second-li:hover span:active{color:#028da9!important}.menu-style-1.menu-lt-gray .main-menu-second-ul .main-menu-second-li.active a:focus,.menu-style-1.menu-lt-gray .main-menu-second-ul .main-menu-second-li.active span:focus,.menu-style-1.menu-lt-gray .main-menu-second-ul .main-menu-second-li:hover a:focus,.menu-style-1.menu-lt-gray .main-menu-second-ul .main-menu-second-li:hover span:focus{color:#d4df48!important}.menu-style-1.menu-md-gray .l-region--main-menu,.menu-style-1.menu-md-gray .l-region--main-menu-wrapper{background:#666}.menu-style-1.menu-md-gray .l-region--main-menu-second-wrapper,.menu-style-1.menu-md-gray .main-menu-second-ul{background:#4d4d4d}.menu-style-1.menu-md-gray #search-block-toggle{color:#fff}.menu-style-1.menu-md-gray #search-block-toggle:hover{color:#d4df48}.menu-style-1.menu-md-gray #search-block-toggle:active{color:#028da9}.menu-style-1.menu-md-gray #search-block-toggle:focus{color:#d4df48}.menu-style-1.menu-md-gray .sf-menu ul:before{border-bottom-color:#4d4d4d}.menu-style-1.menu-md-gray .main-menu-top-li a,.menu-style-1.menu-md-gray .main-menu-top-li span{color:#fff!important}.menu-style-1.menu-md-gray .main-menu-top-li a:hover,.menu-style-1.menu-md-gray .main-menu-top-li span:hover{color:#d2d2d2!important}.menu-style-1.menu-md-gray .main-menu-top-li a:active,.menu-style-1.menu-md-gray .main-menu-top-li span:active{color:#028da9!important}.menu-style-1.menu-md-gray .main-menu-top-li a:focus,.menu-style-1.menu-md-gray .main-menu-top-li span:focus{color:#d4df48!important}.menu-style-1.menu-md-gray .main-menu-second-ul a,.menu-style-1.menu-md-gray .main-menu-second-ul span{color:#fff!important}.menu-style-1.menu-md-gray .main-menu-second-ul a:hover,.menu-style-1.menu-md-gray .main-menu-second-ul span:hover{color:#d2d2d2!important}.menu-style-1.menu-md-gray .main-menu-second-ul a:active,.menu-style-1.menu-md-gray .main-menu-second-ul span:active{color:#028da9!important}.menu-style-1.menu-md-gray .main-menu-second-ul a:focus,.menu-style-1.menu-md-gray .main-menu-second-ul span:focus{color:#d4df48!important}.menu-style-1.menu-md-gray .main-menu-second-ul .main-menu-second-li.active a,.menu-style-1.menu-md-gray .main-menu-second-ul .main-menu-second-li.active a:hover,.menu-style-1.menu-md-gray .main-menu-second-ul .main-menu-second-li.active span,.menu-style-1.menu-md-gray .main-menu-second-ul .main-menu-second-li.active span:hover,.menu-style-1.menu-md-gray .main-menu-second-ul .main-menu-second-li:hover a,.menu-style-1.menu-md-gray .main-menu-second-ul .main-menu-second-li:hover a:hover,.menu-style-1.menu-md-gray .main-menu-second-ul .main-menu-second-li:hover span,.menu-style-1.menu-md-gray .main-menu-second-ul .main-menu-second-li:hover span:hover{color:#d2d2d2!important}.menu-style-1.menu-md-gray .main-menu-second-ul .main-menu-second-li.active a:active,.menu-style-1.menu-md-gray .main-menu-second-ul .main-menu-second-li.active span:active,.menu-style-1.menu-md-gray .main-menu-second-ul .main-menu-second-li:hover a:active,.menu-style-1.menu-md-gray .main-menu-second-ul .main-menu-second-li:hover span:active{color:#028da9!important}.menu-style-1.menu-md-gray .main-menu-second-ul .main-menu-second-li.active a:focus,.menu-style-1.menu-md-gray .main-menu-second-ul .main-menu-second-li.active span:focus,.menu-style-1.menu-md-gray .main-menu-second-ul .main-menu-second-li:hover a:focus,.menu-style-1.menu-md-gray .main-menu-second-ul .main-menu-second-li:hover span:focus{color:#d4df48!important}.menu-style-1.menu-dk-gray .l-region--main-menu,.menu-style-1.menu-dk-gray .l-region--main-menu-wrapper{background:#2d2d2d}.menu-style-1.menu-dk-gray .l-region--main-menu-second-wrapper,.menu-style-1.menu-dk-gray .main-menu-second-ul{background:#666}.menu-style-1.menu-dk-gray #search-block-toggle{color:#fff}.menu-style-1.menu-dk-gray #search-block-toggle:hover{color:#d4df48}.menu-style-1.menu-dk-gray #search-block-toggle:active{color:#028da9}.menu-style-1.menu-dk-gray #search-block-toggle:focus{color:#d4df48}.menu-style-1.menu-dk-gray .sf-menu ul:before{border-bottom-color:#666}.menu-style-1.menu-dk-gray .main-menu-top-li a,.menu-style-1.menu-dk-gray .main-menu-top-li span{color:#fff!important}.menu-style-1.menu-dk-gray .main-menu-top-li a:hover,.menu-style-1.menu-dk-gray .main-menu-top-li span:hover{color:#d2d2d2!important}.menu-style-1.menu-dk-gray .main-menu-top-li a:active,.menu-style-1.menu-dk-gray .main-menu-top-li span:active{color:#028da9!important}.menu-style-1.menu-dk-gray .main-menu-top-li a:focus,.menu-style-1.menu-dk-gray .main-menu-top-li span:focus{color:#d4df48!important}.menu-style-1.menu-dk-gray .main-menu-second-ul a,.menu-style-1.menu-dk-gray .main-menu-second-ul span{color:#fff!important}.menu-style-1.menu-dk-gray .main-menu-second-ul a:hover,.menu-style-1.menu-dk-gray .main-menu-second-ul span:hover{color:#d2d2d2!important}.menu-style-1.menu-dk-gray .main-menu-second-ul a:active,.menu-style-1.menu-dk-gray .main-menu-second-ul span:active{color:#028da9!important}.menu-style-1.menu-dk-gray .main-menu-second-ul a:focus,.menu-style-1.menu-dk-gray .main-menu-second-ul span:focus{color:#d4df48!important}.menu-style-1.menu-dk-gray .main-menu-second-ul .main-menu-second-li.active a,.menu-style-1.menu-dk-gray .main-menu-second-ul .main-menu-second-li.active a:hover,.menu-style-1.menu-dk-gray .main-menu-second-ul .main-menu-second-li.active span,.menu-style-1.menu-dk-gray .main-menu-second-ul .main-menu-second-li.active span:hover,.menu-style-1.menu-dk-gray .main-menu-second-ul .main-menu-second-li:hover a,.menu-style-1.menu-dk-gray .main-menu-second-ul .main-menu-second-li:hover a:hover,.menu-style-1.menu-dk-gray .main-menu-second-ul .main-menu-second-li:hover span,.menu-style-1.menu-dk-gray .main-menu-second-ul .main-menu-second-li:hover span:hover{color:#d2d2d2!important}.menu-style-1.menu-dk-gray .main-menu-second-ul .main-menu-second-li.active a:active,.menu-style-1.menu-dk-gray .main-menu-second-ul .main-menu-second-li.active span:active,.menu-style-1.menu-dk-gray .main-menu-second-ul .main-menu-second-li:hover a:active,.menu-style-1.menu-dk-gray .main-menu-second-ul .main-menu-second-li:hover span:active{color:#028da9!important}.menu-style-1.menu-dk-gray .main-menu-second-ul .main-menu-second-li.active a:focus,.menu-style-1.menu-dk-gray .main-menu-second-ul .main-menu-second-li.active span:focus,.menu-style-1.menu-dk-gray .main-menu-second-ul .main-menu-second-li:hover a:focus,.menu-style-1.menu-dk-gray .main-menu-second-ul .main-menu-second-li:hover span:focus{color:#d4df48!important}.menu-style-1.menu-black .l-region--main-menu,.menu-style-1.menu-black .l-region--main-menu-wrapper{background:#000}.menu-style-1.menu-black .l-region--main-menu-second-wrapper,.menu-style-1.menu-black .main-menu-second-ul{background:#3a3a3a}.menu-style-1.menu-black #search-block-toggle{color:#fff}.menu-style-1.menu-black #search-block-toggle:hover{color:#d4df48}.menu-style-1.menu-black #search-block-toggle:active{color:#028da9}.menu-style-1.menu-black #search-block-toggle:focus{color:#d4df48}.menu-style-1.menu-black .sf-menu ul:before{border-bottom-color:#3a3a3a}.menu-style-1.menu-red .sf-menu ul:before,.menu-style-2 .sf-menu ul:before,.menu-style-2.menu-white .sf-menu ul:before{border-bottom-color:#ebebeb}.menu-style-1.menu-black .main-menu-top-li a,.menu-style-1.menu-black .main-menu-top-li span{color:#fff!important}.menu-style-1.menu-black .main-menu-top-li a:hover,.menu-style-1.menu-black .main-menu-top-li span:hover{color:#d2d2d2!important}.menu-style-1.menu-black .main-menu-top-li a:active,.menu-style-1.menu-black .main-menu-top-li span:active{color:#028da9!important}.menu-style-1.menu-black .main-menu-top-li a:focus,.menu-style-1.menu-black .main-menu-top-li span:focus{color:#d4df48!important}.menu-style-1.menu-black .main-menu-second-ul a,.menu-style-1.menu-black .main-menu-second-ul span{color:#fff!important}.menu-style-1.menu-black .main-menu-second-ul a:hover,.menu-style-1.menu-black .main-menu-second-ul span:hover{color:#d2d2d2!important}.menu-style-1.menu-black .main-menu-second-ul a:active,.menu-style-1.menu-black .main-menu-second-ul span:active{color:#028da9!important}.menu-style-1.menu-black .main-menu-second-ul a:focus,.menu-style-1.menu-black .main-menu-second-ul span:focus{color:#d4df48!important}.menu-style-1.menu-black .main-menu-second-ul .main-menu-second-li.active a,.menu-style-1.menu-black .main-menu-second-ul .main-menu-second-li.active a:hover,.menu-style-1.menu-black .main-menu-second-ul .main-menu-second-li.active span,.menu-style-1.menu-black .main-menu-second-ul .main-menu-second-li.active span:hover,.menu-style-1.menu-black .main-menu-second-ul .main-menu-second-li:hover a,.menu-style-1.menu-black .main-menu-second-ul .main-menu-second-li:hover a:hover,.menu-style-1.menu-black .main-menu-second-ul .main-menu-second-li:hover span,.menu-style-1.menu-black .main-menu-second-ul .main-menu-second-li:hover span:hover{color:#d2d2d2!important}.menu-style-1.menu-black .main-menu-second-ul .main-menu-second-li.active a:active,.menu-style-1.menu-black .main-menu-second-ul .main-menu-second-li.active span:active,.menu-style-1.menu-black .main-menu-second-ul .main-menu-second-li:hover a:active,.menu-style-1.menu-black .main-menu-second-ul .main-menu-second-li:hover span:active{color:#028da9!important}.menu-style-1.menu-black .main-menu-second-ul .main-menu-second-li.active a:focus,.menu-style-1.menu-black .main-menu-second-ul .main-menu-second-li.active span:focus,.menu-style-1.menu-black .main-menu-second-ul .main-menu-second-li:hover a:focus,.menu-style-1.menu-black .main-menu-second-ul .main-menu-second-li:hover span:focus{color:#d4df48!important}.menu-style-1.menu-red .l-region--main-menu,.menu-style-1.menu-red .l-region--main-menu-wrapper{background:#b00}.menu-style-1.menu-red .l-region--main-menu-second-wrapper,.menu-style-1.menu-red .main-menu-second-ul{background:#ebebeb}.menu-style-1.menu-red #search-block-toggle{color:#fff}.menu-style-1.menu-red #search-block-toggle:hover{color:#d2d2d2}.menu-style-1.menu-red #search-block-toggle:active{color:#d4df48}.menu-style-1.menu-red #search-block-toggle:focus{color:#d2d2d2}.menu-style-1.menu-red .main-menu-top-li a,.menu-style-1.menu-red .main-menu-top-li span{color:#fff!important}.menu-style-1.menu-red .main-menu-top-li a:hover,.menu-style-1.menu-red .main-menu-top-li span:hover{color:#d2d2d2!important}.menu-style-1.menu-red .main-menu-top-li a:active,.menu-style-1.menu-red .main-menu-top-li span:active{color:#d4df48!important}.menu-style-1.menu-red .main-menu-top-li a:focus,.menu-style-1.menu-red .main-menu-top-li span:focus{color:#d2d2d2!important}.menu-style-1.menu-red .main-menu-second-ul a,.menu-style-1.menu-red .main-menu-second-ul span{color:#2d2d2d!important}.menu-style-1.menu-red .main-menu-second-ul a:hover,.menu-style-1.menu-red .main-menu-second-ul span:hover{color:#b00!important}.menu-style-1.menu-red .main-menu-second-ul a:active,.menu-style-1.menu-red .main-menu-second-ul span:active{color:#d4df48!important}.menu-style-1.menu-red .main-menu-second-ul a:focus,.menu-style-1.menu-red .main-menu-second-ul span:focus{color:#d2d2d2!important}.menu-style-1.menu-red .main-menu-second-ul .main-menu-second-li.active a,.menu-style-1.menu-red .main-menu-second-ul .main-menu-second-li.active a:hover,.menu-style-1.menu-red .main-menu-second-ul .main-menu-second-li.active span,.menu-style-1.menu-red .main-menu-second-ul .main-menu-second-li.active span:hover,.menu-style-1.menu-red .main-menu-second-ul .main-menu-second-li:hover a,.menu-style-1.menu-red .main-menu-second-ul .main-menu-second-li:hover a:hover,.menu-style-1.menu-red .main-menu-second-ul .main-menu-second-li:hover span,.menu-style-1.menu-red .main-menu-second-ul .main-menu-second-li:hover span:hover{color:#b00!important}.menu-style-1.menu-red .main-menu-second-ul .main-menu-second-li.active a:active,.menu-style-1.menu-red .main-menu-second-ul .main-menu-second-li.active span:active,.menu-style-1.menu-red .main-menu-second-ul .main-menu-second-li:hover a:active,.menu-style-1.menu-red .main-menu-second-ul .main-menu-second-li:hover span:active{color:#d4df48!important}.menu-style-1.menu-red .main-menu-second-ul .main-menu-second-li.active a:focus,.menu-style-1.menu-red .main-menu-second-ul .main-menu-second-li.active span:focus,.menu-style-1.menu-red .main-menu-second-ul .main-menu-second-li:hover a:focus,.menu-style-1.menu-red .main-menu-second-ul .main-menu-second-li:hover span:focus{color:#d2d2d2!important}.menu-style-2 .l-region--main-menu ul.sf-menu li{padding:.75em 1em}.menu-style-2 .l-region--main-menu ul.sf-menu li.sf-depth-2{display:inline-block;width:auto;padding-top:1em}.l-region--main-menu-second .main-menu-second-ul li{float:left;height:48px;text-transform:uppercase;padding:.75em 1em}.l-region--main-menu-second .main-menu-second-ul li a,.l-region--main-menu-second .main-menu-second-ul li span{font-weight:500;text-decoration:none}.l-region--main-menu-second .main-menu-second-ul li a:hover{text-decoration:none}.menu-style-2 .l-region--main-menu,.menu-style-2 .l-region--main-menu-wrapper,.menu-style-2.menu-white .l-region--main-menu,.menu-style-2.menu-white .l-region--main-menu-wrapper{background:#fff}.menu-style-2 .l-region--main-menu-second-wrapper,.menu-style-2.menu-white .l-region--main-menu-second-wrapper{background:#ebebeb}.menu-style-2 .l-region--main-menu-second-wrapper.menu-hover,.menu-style-2.menu-white .l-region--main-menu-second-wrapper.menu-hover{background:#d9d9d9}.menu-style-2 #search-block-toggle,.menu-style-2.menu-white #search-block-toggle{color:#666}.menu-style-2 #search-block-toggle:hover,.menu-style-2.menu-white #search-block-toggle:hover{color:#d4df48}.menu-style-2 #search-block-toggle:active,.menu-style-2.menu-white #search-block-toggle:active{color:#028da9}.menu-style-2 #search-block-toggle:focus,.menu-style-2.menu-white #search-block-toggle:focus{color:#d4df48}.menu-style-2 .main-menu-top-li a,.menu-style-2 .main-menu-top-li span,.menu-style-2.menu-white .main-menu-top-li a,.menu-style-2.menu-white .main-menu-top-li span{color:#666!important}.menu-style-2 .main-menu-top-li a:hover,.menu-style-2 .main-menu-top-li span:hover,.menu-style-2.menu-white .main-menu-top-li a:hover,.menu-style-2.menu-white .main-menu-top-li span:hover{color:#b00!important}.menu-style-2 .main-menu-top-li a:active,.menu-style-2 .main-menu-top-li span:active,.menu-style-2.menu-white .main-menu-top-li a:active,.menu-style-2.menu-white .main-menu-top-li span:active{color:#028da9!important}.menu-style-2 .main-menu-top-li a:focus,.menu-style-2 .main-menu-top-li span:focus,.menu-style-2.menu-white .main-menu-top-li a:focus,.menu-style-2.menu-white .main-menu-top-li span:focus{color:#d4df48!important}.menu-style-2 .main-menu-top-li.active-trail,.menu-style-2.menu-white .main-menu-top-li.active-trail{background:#ebebeb}.menu-style-2 .main-menu-second-ul,.menu-style-2 .main-menu-top-li:hover,.menu-style-2.menu-white .main-menu-second-ul,.menu-style-2.menu-white .main-menu-top-li:hover{background:#d9d9d9}.menu-style-2 .main-menu-top-li.active-trail a,.menu-style-2 .main-menu-top-li.active-trail a:hover,.menu-style-2 .main-menu-top-li.active-trail span,.menu-style-2 .main-menu-top-li.active-trail span:hover,.menu-style-2.menu-white .main-menu-top-li.active-trail a,.menu-style-2.menu-white .main-menu-top-li.active-trail a:hover,.menu-style-2.menu-white .main-menu-top-li.active-trail span,.menu-style-2.menu-white .main-menu-top-li.active-trail span:hover{color:#b00!important}.menu-style-2 .main-menu-top-li.active-trail a:active,.menu-style-2 .main-menu-top-li.active-trail span:active,.menu-style-2.menu-white .main-menu-top-li.active-trail a:active,.menu-style-2.menu-white .main-menu-top-li.active-trail span:active{color:#028da9!important}.menu-style-2 .main-menu-top-li.active-trail a:focus,.menu-style-2 .main-menu-top-li.active-trail span:focus,.menu-style-2.menu-white .main-menu-top-li.active-trail a:focus,.menu-style-2.menu-white .main-menu-top-li.active-trail span:focus{color:#d4df48!important}.menu-style-2 .main-menu-second-ul a,.menu-style-2 .main-menu-second-ul span,.menu-style-2 .main-menu-top-li:hover a,.menu-style-2 .main-menu-top-li:hover a:hover,.menu-style-2 .main-menu-top-li:hover span,.menu-style-2 .main-menu-top-li:hover span:hover,.menu-style-2.menu-white .main-menu-second-ul a,.menu-style-2.menu-white .main-menu-second-ul span,.menu-style-2.menu-white .main-menu-top-li:hover a,.menu-style-2.menu-white .main-menu-top-li:hover a:hover,.menu-style-2.menu-white .main-menu-top-li:hover span,.menu-style-2.menu-white .main-menu-top-li:hover span:hover{color:#666!important}.menu-style-2 .main-menu-second-ul a:hover,.menu-style-2 .main-menu-second-ul span:hover,.menu-style-2.menu-white .main-menu-second-ul a:hover,.menu-style-2.menu-white .main-menu-second-ul span:hover{color:#b00!important}.menu-style-2 .main-menu-second-ul a:active,.menu-style-2 .main-menu-second-ul span:active,.menu-style-2.menu-white .main-menu-second-ul a:active,.menu-style-2.menu-white .main-menu-second-ul span:active{color:#028da9!important}.menu-style-2 .main-menu-second-ul a:focus,.menu-style-2 .main-menu-second-ul span:focus,.menu-style-2.menu-white .main-menu-second-ul a:focus,.menu-style-2.menu-white .main-menu-second-ul span:focus{color:#d4df48!important}.menu-style-2 .main-menu-second-ul .main-menu-second-li.active a,.menu-style-2 .main-menu-second-ul .main-menu-second-li.active a:hover,.menu-style-2 .main-menu-second-ul .main-menu-second-li.active span,.menu-style-2 .main-menu-second-ul .main-menu-second-li.active span:hover,.menu-style-2 .main-menu-second-ul .main-menu-second-li:hover a,.menu-style-2 .main-menu-second-ul .main-menu-second-li:hover a:hover,.menu-style-2 .main-menu-second-ul .main-menu-second-li:hover span,.menu-style-2 .main-menu-second-ul .main-menu-second-li:hover span:hover,.menu-style-2 .main-menu-second-ul a.active-trail,.menu-style-2 .main-menu-second-ul span.active-trail,.menu-style-2.menu-white .main-menu-second-ul .main-menu-second-li.active a,.menu-style-2.menu-white .main-menu-second-ul .main-menu-second-li.active a:hover,.menu-style-2.menu-white .main-menu-second-ul .main-menu-second-li.active span,.menu-style-2.menu-white .main-menu-second-ul .main-menu-second-li.active span:hover,.menu-style-2.menu-white .main-menu-second-ul .main-menu-second-li:hover a,.menu-style-2.menu-white .main-menu-second-ul .main-menu-second-li:hover a:hover,.menu-style-2.menu-white .main-menu-second-ul .main-menu-second-li:hover span,.menu-style-2.menu-white .main-menu-second-ul .main-menu-second-li:hover span:hover,.menu-style-2.menu-white .main-menu-second-ul a.active-trail,.menu-style-2.menu-white .main-menu-second-ul span.active-trail{color:#b00!important}.menu-style-2 .main-menu-second-ul .main-menu-second-li.active a:active,.menu-style-2 .main-menu-second-ul .main-menu-second-li.active span:active,.menu-style-2 .main-menu-second-ul .main-menu-second-li:hover a:active,.menu-style-2 .main-menu-second-ul .main-menu-second-li:hover span:active,.menu-style-2.menu-white .main-menu-second-ul .main-menu-second-li.active a:active,.menu-style-2.menu-white .main-menu-second-ul .main-menu-second-li.active span:active,.menu-style-2.menu-white .main-menu-second-ul .main-menu-second-li:hover a:active,.menu-style-2.menu-white .main-menu-second-ul .main-menu-second-li:hover span:active{color:#028da9!important}.menu-style-2 .main-menu-second-ul .main-menu-second-li.active a:focus,.menu-style-2 .main-menu-second-ul .main-menu-second-li.active span:focus,.menu-style-2 .main-menu-second-ul .main-menu-second-li:hover a:focus,.menu-style-2 .main-menu-second-ul .main-menu-second-li:hover span:focus,.menu-style-2.menu-white .main-menu-second-ul .main-menu-second-li.active a:focus,.menu-style-2.menu-white .main-menu-second-ul .main-menu-second-li.active span:focus,.menu-style-2.menu-white .main-menu-second-ul .main-menu-second-li:hover a:focus,.menu-style-2.menu-white .main-menu-second-ul .main-menu-second-li:hover span:focus{color:#d4df48!important}.menu-style-2.menu-lt-gray .l-region--main-menu,.menu-style-2.menu-lt-gray .l-region--main-menu-wrapper{background:#ebebeb}.menu-style-2.menu-lt-gray .l-region--main-menu-second-wrapper,.menu-style-2.menu-lt-gray .l-region--main-menu-second-wrapper.menu-hover,.menu-style-2.menu-lt-gray .main-menu-second-ul,.menu-style-2.menu-lt-gray .main-menu-top-li.active-trail,.menu-style-2.menu-lt-gray .main-menu-top-li:hover{background:#d7d7d7}.menu-style-2.menu-lt-gray #search-block-toggle{color:#2d2d2d}.menu-style-2.menu-lt-gray #search-block-toggle:hover{color:#d4df48}.menu-style-2.menu-lt-gray #search-block-toggle:active{color:#028da9}.menu-style-2.menu-lt-gray #search-block-toggle:focus{color:#d4df48}.menu-style-2.menu-lt-gray .sf-menu ul:before{border-bottom-color:#d7d7d7}.menu-style-2.menu-black .sf-menu ul:before,.menu-style-2.menu-dk-gray .sf-menu ul:before,.menu-style-2.menu-md-gray .sf-menu ul:before{border-bottom-color:#ebebeb}.menu-style-2.menu-lt-gray .main-menu-top-li a,.menu-style-2.menu-lt-gray .main-menu-top-li a:hover,.menu-style-2.menu-lt-gray .main-menu-top-li span,.menu-style-2.menu-lt-gray .main-menu-top-li span:hover{color:#2d2d2d!important}.menu-style-2.menu-lt-gray .main-menu-top-li a:active,.menu-style-2.menu-lt-gray .main-menu-top-li span:active{color:#028da9!important}.menu-style-2.menu-lt-gray .main-menu-top-li a:focus,.menu-style-2.menu-lt-gray .main-menu-top-li span:focus{color:#d4df48!important}.menu-style-2.menu-lt-gray .main-menu-top-li.active-trail a,.menu-style-2.menu-lt-gray .main-menu-top-li.active-trail span{color:#2d2d2d!important}.menu-style-2.menu-lt-gray .main-menu-top-li.active-trail a:hover,.menu-style-2.menu-lt-gray .main-menu-top-li.active-trail span:hover{color:#b00!important}.menu-style-2.menu-lt-gray .main-menu-top-li.active-trail a:active,.menu-style-2.menu-lt-gray .main-menu-top-li.active-trail span:active{color:#028da9!important}.menu-style-2.menu-lt-gray .main-menu-top-li.active-trail a:focus,.menu-style-2.menu-lt-gray .main-menu-top-li.active-trail span:focus{color:#d4df48!important}.menu-style-2.menu-lt-gray .main-menu-second-ul a,.menu-style-2.menu-lt-gray .main-menu-second-ul span,.menu-style-2.menu-lt-gray .main-menu-top-li:hover a,.menu-style-2.menu-lt-gray .main-menu-top-li:hover a:hover,.menu-style-2.menu-lt-gray .main-menu-top-li:hover span,.menu-style-2.menu-lt-gray .main-menu-top-li:hover span:hover{color:#2d2d2d!important}.menu-style-2.menu-lt-gray .main-menu-second-ul a:hover,.menu-style-2.menu-lt-gray .main-menu-second-ul span:hover{color:#b00!important}.menu-style-2.menu-lt-gray .main-menu-second-ul a:active,.menu-style-2.menu-lt-gray .main-menu-second-ul span:active{color:#028da9!important}.menu-style-2.menu-lt-gray .main-menu-second-ul a:focus,.menu-style-2.menu-lt-gray .main-menu-second-ul span:focus{color:#d4df48!important}.menu-style-2.menu-lt-gray .main-menu-second-ul .main-menu-second-li.active a,.menu-style-2.menu-lt-gray .main-menu-second-ul .main-menu-second-li.active a:hover,.menu-style-2.menu-lt-gray .main-menu-second-ul .main-menu-second-li.active span,.menu-style-2.menu-lt-gray .main-menu-second-ul .main-menu-second-li.active span:hover,.menu-style-2.menu-lt-gray .main-menu-second-ul .main-menu-second-li:hover a,.menu-style-2.menu-lt-gray .main-menu-second-ul .main-menu-second-li:hover a:hover,.menu-style-2.menu-lt-gray .main-menu-second-ul .main-menu-second-li:hover span,.menu-style-2.menu-lt-gray .main-menu-second-ul .main-menu-second-li:hover span:hover,.menu-style-2.menu-lt-gray .main-menu-second-ul a.active-trail,.menu-style-2.menu-lt-gray .main-menu-second-ul span.active-trail{color:#b00!important}.menu-style-2.menu-lt-gray .main-menu-second-ul .main-menu-second-li.active a:active,.menu-style-2.menu-lt-gray .main-menu-second-ul .main-menu-second-li.active span:active,.menu-style-2.menu-lt-gray .main-menu-second-ul .main-menu-second-li:hover a:active,.menu-style-2.menu-lt-gray .main-menu-second-ul .main-menu-second-li:hover span:active{color:#028da9!important}.menu-style-2.menu-lt-gray .main-menu-second-ul .main-menu-second-li.active a:focus,.menu-style-2.menu-lt-gray .main-menu-second-ul .main-menu-second-li.active span:focus,.menu-style-2.menu-lt-gray .main-menu-second-ul .main-menu-second-li:hover a:focus,.menu-style-2.menu-lt-gray .main-menu-second-ul .main-menu-second-li:hover span:focus{color:#d4df48!important}.menu-style-2.menu-md-gray .l-region--main-menu,.menu-style-2.menu-md-gray .l-region--main-menu-wrapper{background:#666}.menu-style-2.menu-md-gray .l-region--main-menu-second-wrapper{background:#ebebeb}.menu-style-2.menu-md-gray .l-region--main-menu-second-wrapper.menu-hover{background:#dedede}.menu-style-2.menu-md-gray #search-block-toggle{color:#fff}.menu-style-2.menu-md-gray #search-block-toggle:hover{color:#d4df48}.menu-style-2.menu-md-gray #search-block-toggle:active{color:#028da9}.menu-style-2.menu-md-gray #search-block-toggle:focus{color:#d4df48}.menu-style-2.menu-md-gray .main-menu-top-li a,.menu-style-2.menu-md-gray .main-menu-top-li span{color:#fff!important}.menu-style-2.menu-md-gray .main-menu-top-li a:hover,.menu-style-2.menu-md-gray .main-menu-top-li span:hover{color:#4d4d4d!important}.menu-style-2.menu-md-gray .main-menu-top-li a:active,.menu-style-2.menu-md-gray .main-menu-top-li span:active{color:#028da9!important}.menu-style-2.menu-md-gray .main-menu-top-li a:focus,.menu-style-2.menu-md-gray .main-menu-top-li span:focus{color:#d4df48!important}.menu-style-2.menu-md-gray .main-menu-top-li.active-trail{background:#ebebeb}.menu-style-2.menu-md-gray .main-menu-second-ul,.menu-style-2.menu-md-gray .main-menu-top-li:hover{background:#dedede}.menu-style-2.menu-md-gray .main-menu-top-li.active-trail a,.menu-style-2.menu-md-gray .main-menu-top-li.active-trail span{color:#4d4d4d!important}.menu-style-2.menu-md-gray .main-menu-top-li.active-trail a:hover,.menu-style-2.menu-md-gray .main-menu-top-li.active-trail span:hover{color:#b00!important}.menu-style-2.menu-md-gray .main-menu-top-li.active-trail a:active,.menu-style-2.menu-md-gray .main-menu-top-li.active-trail span:active{color:#028da9!important}.menu-style-2.menu-md-gray .main-menu-top-li.active-trail a:focus,.menu-style-2.menu-md-gray .main-menu-top-li.active-trail span:focus{color:#d4df48!important}.menu-style-2.menu-md-gray .main-menu-second-ul a,.menu-style-2.menu-md-gray .main-menu-second-ul span,.menu-style-2.menu-md-gray .main-menu-top-li:hover a,.menu-style-2.menu-md-gray .main-menu-top-li:hover a:hover,.menu-style-2.menu-md-gray .main-menu-top-li:hover span,.menu-style-2.menu-md-gray .main-menu-top-li:hover span:hover{color:#4d4d4d!important}.menu-style-2.menu-md-gray .main-menu-second-ul a:hover,.menu-style-2.menu-md-gray .main-menu-second-ul span:hover{color:#b00!important}.menu-style-2.menu-md-gray .main-menu-second-ul a:active,.menu-style-2.menu-md-gray .main-menu-second-ul span:active{color:#028da9!important}.menu-style-2.menu-md-gray .main-menu-second-ul a:focus,.menu-style-2.menu-md-gray .main-menu-second-ul span:focus{color:#d4df48!important}.menu-style-2.menu-md-gray .main-menu-second-ul .main-menu-second-li.active a,.menu-style-2.menu-md-gray .main-menu-second-ul .main-menu-second-li.active a:hover,.menu-style-2.menu-md-gray .main-menu-second-ul .main-menu-second-li.active span,.menu-style-2.menu-md-gray .main-menu-second-ul .main-menu-second-li.active span:hover,.menu-style-2.menu-md-gray .main-menu-second-ul .main-menu-second-li:hover a,.menu-style-2.menu-md-gray .main-menu-second-ul .main-menu-second-li:hover a:hover,.menu-style-2.menu-md-gray .main-menu-second-ul .main-menu-second-li:hover span,.menu-style-2.menu-md-gray .main-menu-second-ul .main-menu-second-li:hover span:hover,.menu-style-2.menu-md-gray .main-menu-second-ul a.active-trail,.menu-style-2.menu-md-gray .main-menu-second-ul span.active-trail{color:#b00!important}.menu-style-2.menu-md-gray .main-menu-second-ul .main-menu-second-li.active a:active,.menu-style-2.menu-md-gray .main-menu-second-ul .main-menu-second-li.active span:active,.menu-style-2.menu-md-gray .main-menu-second-ul .main-menu-second-li:hover a:active,.menu-style-2.menu-md-gray .main-menu-second-ul .main-menu-second-li:hover span:active{color:#028da9!important}.menu-style-2.menu-md-gray .main-menu-second-ul .main-menu-second-li.active a:focus,.menu-style-2.menu-md-gray .main-menu-second-ul .main-menu-second-li.active span:focus,.menu-style-2.menu-md-gray .main-menu-second-ul .main-menu-second-li:hover a:focus,.menu-style-2.menu-md-gray .main-menu-second-ul .main-menu-second-li:hover span:focus{color:#d4df48!important}.menu-style-2.menu-dk-gray .l-region--main-menu,.menu-style-2.menu-dk-gray .l-region--main-menu-wrapper{background:#2d2d2d}.menu-style-2.menu-dk-gray .l-region--main-menu-second-wrapper{background:#ebebeb}.menu-style-2.menu-dk-gray .l-region--main-menu-second-wrapper.menu-hover{background:#d2d2d2}.menu-style-2.menu-dk-gray #search-block-toggle{color:#fff}.menu-style-2.menu-dk-gray #search-block-toggle:hover{color:#d4df48}.menu-style-2.menu-dk-gray #search-block-toggle:active{color:#028da9}.menu-style-2.menu-dk-gray #search-block-toggle:focus{color:#d4df48}.menu-style-2.menu-dk-gray .main-menu-top-li a,.menu-style-2.menu-dk-gray .main-menu-top-li span{color:#fff!important}.menu-style-2.menu-dk-gray .main-menu-top-li a:hover,.menu-style-2.menu-dk-gray .main-menu-top-li span:hover{color:#2d2d2d!important}.menu-style-2.menu-dk-gray .main-menu-top-li a:active,.menu-style-2.menu-dk-gray .main-menu-top-li span:active{color:#028da9!important}.menu-style-2.menu-dk-gray .main-menu-top-li a:focus,.menu-style-2.menu-dk-gray .main-menu-top-li span:focus{color:#d4df48!important}.menu-style-2.menu-dk-gray .main-menu-top-li.active-trail{background:#ebebeb}.menu-style-2.menu-dk-gray .main-menu-second-ul,.menu-style-2.menu-dk-gray .main-menu-top-li:hover{background:#d2d2d2}.menu-style-2.menu-dk-gray .main-menu-top-li.active-trail a,.menu-style-2.menu-dk-gray .main-menu-top-li.active-trail span{color:#2d2d2d!important}.menu-style-2.menu-dk-gray .main-menu-top-li.active-trail a:hover,.menu-style-2.menu-dk-gray .main-menu-top-li.active-trail span:hover{color:#b00!important}.menu-style-2.menu-dk-gray .main-menu-top-li.active-trail a:active,.menu-style-2.menu-dk-gray .main-menu-top-li.active-trail span:active{color:#028da9!important}.menu-style-2.menu-dk-gray .main-menu-top-li.active-trail a:focus,.menu-style-2.menu-dk-gray .main-menu-top-li.active-trail span:focus{color:#d4df48!important}.menu-style-2.menu-dk-gray .main-menu-second-ul a,.menu-style-2.menu-dk-gray .main-menu-second-ul span,.menu-style-2.menu-dk-gray .main-menu-top-li:hover a,.menu-style-2.menu-dk-gray .main-menu-top-li:hover a:hover,.menu-style-2.menu-dk-gray .main-menu-top-li:hover span,.menu-style-2.menu-dk-gray .main-menu-top-li:hover span:hover{color:#2d2d2d!important}.menu-style-2.menu-dk-gray .main-menu-second-ul a:hover,.menu-style-2.menu-dk-gray .main-menu-second-ul span:hover{color:#b00!important}.menu-style-2.menu-dk-gray .main-menu-second-ul a:active,.menu-style-2.menu-dk-gray .main-menu-second-ul span:active{color:#028da9!important}.menu-style-2.menu-dk-gray .main-menu-second-ul a:focus,.menu-style-2.menu-dk-gray .main-menu-second-ul span:focus{color:#d4df48!important}.menu-style-2.menu-dk-gray .main-menu-second-ul .main-menu-second-li.active a,.menu-style-2.menu-dk-gray .main-menu-second-ul .main-menu-second-li.active a:hover,.menu-style-2.menu-dk-gray .main-menu-second-ul .main-menu-second-li.active span,.menu-style-2.menu-dk-gray .main-menu-second-ul .main-menu-second-li.active span:hover,.menu-style-2.menu-dk-gray .main-menu-second-ul .main-menu-second-li:hover a,.menu-style-2.menu-dk-gray .main-menu-second-ul .main-menu-second-li:hover a:hover,.menu-style-2.menu-dk-gray .main-menu-second-ul .main-menu-second-li:hover span,.menu-style-2.menu-dk-gray .main-menu-second-ul .main-menu-second-li:hover span:hover,.menu-style-2.menu-dk-gray .main-menu-second-ul a.active-trail,.menu-style-2.menu-dk-gray .main-menu-second-ul span.active-trail{color:#b00!important}.menu-style-2.menu-dk-gray .main-menu-second-ul .main-menu-second-li.active a:active,.menu-style-2.menu-dk-gray .main-menu-second-ul .main-menu-second-li.active span:active,.menu-style-2.menu-dk-gray .main-menu-second-ul .main-menu-second-li:hover a:active,.menu-style-2.menu-dk-gray .main-menu-second-ul .main-menu-second-li:hover span:active{color:#028da9!important}.menu-style-2.menu-dk-gray .main-menu-second-ul .main-menu-second-li.active a:focus,.menu-style-2.menu-dk-gray .main-menu-second-ul .main-menu-second-li.active span:focus,.menu-style-2.menu-dk-gray .main-menu-second-ul .main-menu-second-li:hover a:focus,.menu-style-2.menu-dk-gray .main-menu-second-ul .main-menu-second-li:hover span:focus{color:#d4df48!important}.menu-style-2.menu-black .l-region--main-menu,.menu-style-2.menu-black .l-region--main-menu-wrapper{background:#000}.menu-style-2.menu-black .l-region--main-menu-second-wrapper{background:#ebebeb}.menu-style-2.menu-black .l-region--main-menu-second-wrapper.menu-hover{background:#d2d2d2}.menu-style-2.menu-black #search-block-toggle{color:#fff}.menu-style-2.menu-black #search-block-toggle:hover{color:#d4df48}.menu-style-2.menu-black #search-block-toggle:active{color:#028da9}.menu-style-2.menu-black #search-block-toggle:focus{color:#d4df48}.menu-style-2.menu-black .main-menu-top-li a,.menu-style-2.menu-black .main-menu-top-li span{color:#fff!important}.menu-style-2.menu-black .main-menu-top-li a:hover,.menu-style-2.menu-black .main-menu-top-li span:hover{color:#2d2d2d!important}.menu-style-2.menu-black .main-menu-top-li a:active,.menu-style-2.menu-black .main-menu-top-li span:active{color:#028da9!important}.menu-style-2.menu-black .main-menu-top-li a:focus,.menu-style-2.menu-black .main-menu-top-li span:focus{color:#d4df48!important}.menu-style-2.menu-black .main-menu-top-li.active-trail{background:#ebebeb}.menu-style-2.menu-black .main-menu-second-ul,.menu-style-2.menu-black .main-menu-top-li:hover{background:#d2d2d2}.menu-style-2.menu-black .main-menu-top-li.active-trail a,.menu-style-2.menu-black .main-menu-top-li.active-trail span{color:#2d2d2d!important}.menu-style-2.menu-black .main-menu-top-li.active-trail a:hover,.menu-style-2.menu-black .main-menu-top-li.active-trail span:hover{color:#b00!important}.menu-style-2.menu-black .main-menu-top-li.active-trail a:active,.menu-style-2.menu-black .main-menu-top-li.active-trail span:active{color:#028da9!important}.menu-style-2.menu-black .main-menu-top-li.active-trail a:focus,.menu-style-2.menu-black .main-menu-top-li.active-trail span:focus{color:#d4df48!important}.menu-style-2.menu-black .main-menu-second-ul a,.menu-style-2.menu-black .main-menu-second-ul span,.menu-style-2.menu-black .main-menu-top-li:hover a,.menu-style-2.menu-black .main-menu-top-li:hover a:hover,.menu-style-2.menu-black .main-menu-top-li:hover span,.menu-style-2.menu-black .main-menu-top-li:hover span:hover{color:#2d2d2d!important}.menu-style-2.menu-black .main-menu-second-ul a:hover,.menu-style-2.menu-black .main-menu-second-ul span:hover{color:#b00!important}.menu-style-2.menu-black .main-menu-second-ul a:active,.menu-style-2.menu-black .main-menu-second-ul span:active{color:#028da9!important}.menu-style-2.menu-black .main-menu-second-ul a:focus,.menu-style-2.menu-black .main-menu-second-ul span:focus{color:#d4df48!important}.menu-style-2.menu-black .main-menu-second-ul .main-menu-second-li.active a,.menu-style-2.menu-black .main-menu-second-ul .main-menu-second-li.active a:hover,.menu-style-2.menu-black .main-menu-second-ul .main-menu-second-li.active span,.menu-style-2.menu-black .main-menu-second-ul .main-menu-second-li.active span:hover,.menu-style-2.menu-black .main-menu-second-ul .main-menu-second-li:hover a,.menu-style-2.menu-black .main-menu-second-ul .main-menu-second-li:hover a:hover,.menu-style-2.menu-black .main-menu-second-ul .main-menu-second-li:hover span,.menu-style-2.menu-black .main-menu-second-ul .main-menu-second-li:hover span:hover,.menu-style-2.menu-black .main-menu-second-ul a.active-trail,.menu-style-2.menu-black .main-menu-second-ul span.active-trail{color:#b00!important}.menu-style-2.menu-black .main-menu-second-ul .main-menu-second-li.active a:active,.menu-style-2.menu-black .main-menu-second-ul .main-menu-second-li.active span:active,.menu-style-2.menu-black .main-menu-second-ul .main-menu-second-li:hover a:active,.menu-style-2.menu-black .main-menu-second-ul .main-menu-second-li:hover span:active{color:#028da9!important}.menu-style-2.menu-black .main-menu-second-ul .main-menu-second-li.active a:focus,.menu-style-2.menu-black .main-menu-second-ul .main-menu-second-li.active span:focus,.menu-style-2.menu-black .main-menu-second-ul .main-menu-second-li:hover a:focus,.menu-style-2.menu-black .main-menu-second-ul .main-menu-second-li:hover span:focus{color:#d4df48!important}.menu-style-2.menu-red .l-region--main-menu,.menu-style-2.menu-red .l-region--main-menu-wrapper{background:#b00}.menu-style-2.menu-red .l-region--main-menu-second-wrapper{background:#eee}.menu-style-2.menu-red .l-region--main-menu-second-wrapper.menu-hover{background:#dcdcdc}.menu-style-2.menu-red #search-block-toggle{color:#fff}.menu-style-2.menu-red #search-block-toggle:hover{color:#d2d2d2}.menu-style-2.menu-red #search-block-toggle:active{color:#028da9}.menu-style-2.menu-red #search-block-toggle:focus{color:#d2d2d2}.menu-style-2.menu-red .sf-menu ul:before{border-bottom-color:#eee}.menu-style-2.menu-red .main-menu-top-li a,.menu-style-2.menu-red .main-menu-top-li span{color:#fff!important}.menu-style-2.menu-red .main-menu-top-li a:hover,.menu-style-2.menu-red .main-menu-top-li span:hover{color:#2d2d2d!important}.menu-style-2.menu-red .main-menu-top-li a:active,.menu-style-2.menu-red .main-menu-top-li span:active{color:#028da9!important}.menu-style-2.menu-red .main-menu-top-li a:focus,.menu-style-2.menu-red .main-menu-top-li span:focus{color:#d2d2d2!important}.menu-style-2.menu-red .main-menu-top-li.active-trail{background:#eee}.menu-style-2.menu-red .main-menu-second-ul,.menu-style-2.menu-red .main-menu-top-li:hover{background:#dcdcdc}.menu-style-2.menu-red .main-menu-top-li.active-trail a,.menu-style-2.menu-red .main-menu-top-li.active-trail span{color:#2d2d2d!important}.menu-style-2.menu-red .main-menu-top-li.active-trail a:hover,.menu-style-2.menu-red .main-menu-top-li.active-trail span:hover{color:#b00!important}.menu-style-2.menu-red .main-menu-top-li.active-trail a:active,.menu-style-2.menu-red .main-menu-top-li.active-trail span:active{color:#028da9!important}.menu-style-2.menu-red .main-menu-top-li.active-trail a:focus,.menu-style-2.menu-red .main-menu-top-li.active-trail span:focus{color:#d2d2d2!important}.menu-style-2.menu-red .main-menu-second-ul a,.menu-style-2.menu-red .main-menu-second-ul span,.menu-style-2.menu-red .main-menu-top-li:hover a,.menu-style-2.menu-red .main-menu-top-li:hover a:hover,.menu-style-2.menu-red .main-menu-top-li:hover span,.menu-style-2.menu-red .main-menu-top-li:hover span:hover{color:#2d2d2d!important}.panels-ipe .modal-content .panels-choose-layout .layout-link.current-layout,.sidebar-panel{background-color:#ebebeb}.menu-style-2.menu-red .main-menu-second-ul a:hover,.menu-style-2.menu-red .main-menu-second-ul span:hover{color:#b00!important}.menu-style-2.menu-red .main-menu-second-ul a:active,.menu-style-2.menu-red .main-menu-second-ul span:active{color:#028da9!important}.menu-style-2.menu-red .main-menu-second-ul a:focus,.menu-style-2.menu-red .main-menu-second-ul span:focus{color:#d2d2d2!important}.menu-style-2.menu-red .main-menu-second-ul .main-menu-second-li.active a,.menu-style-2.menu-red .main-menu-second-ul .main-menu-second-li.active a:hover,.menu-style-2.menu-red .main-menu-second-ul .main-menu-second-li.active span,.menu-style-2.menu-red .main-menu-second-ul .main-menu-second-li.active span:hover,.menu-style-2.menu-red .main-menu-second-ul .main-menu-second-li:hover a,.menu-style-2.menu-red .main-menu-second-ul .main-menu-second-li:hover a:hover,.menu-style-2.menu-red .main-menu-second-ul .main-menu-second-li:hover span,.menu-style-2.menu-red .main-menu-second-ul .main-menu-second-li:hover span:hover,.menu-style-2.menu-red .main-menu-second-ul a.active-trail,.menu-style-2.menu-red .main-menu-second-ul span.active-trail{color:#b00!important}.menu-style-2.menu-red .main-menu-second-ul .main-menu-second-li.active a:active,.menu-style-2.menu-red .main-menu-second-ul .main-menu-second-li.active span:active,.menu-style-2.menu-red .main-menu-second-ul .main-menu-second-li:hover a:active,.menu-style-2.menu-red .main-menu-second-ul .main-menu-second-li:hover span:active{color:#028da9!important}.menu-style-2.menu-red .main-menu-second-ul .main-menu-second-li.active a:focus,.menu-style-2.menu-red .main-menu-second-ul .main-menu-second-li.active span:focus,.menu-style-2.menu-red .main-menu-second-ul .main-menu-second-li:hover a:focus,.menu-style-2.menu-red .main-menu-second-ul .main-menu-second-li:hover span:focus{color:#d2d2d2!important}.panels-ipe-editing .panels-row.empty{display:block}.panels-ipe .modal-content .panels-choose-layout .layout-link{text-align:center;height:190px}.panels-ipe .modal-content .panels-choose-layout .layout-link img{margin-top:.8em}.panels-ipe .modal-content .panels-choose-layout .layout-link .ajax-progress-throbber{display:block;text-align:center;margin:0 auto}.panels-ipe .modal-content .change-layout-display{display:table;margin:2em auto;text-align:center}.panels-ipe .modal-content .change-layout-display .layout-icon{text-align:center}.panels-ipe .modal-content .change-layout-display>img{padding:5em 2em}.panels-ipe .modal-content #panels-dnd-main div.panel-region h2.label{margin:.5em 0}.panels-ipe-editing .panels-ipe-portlet-content{overflow:visible}.panels-ipe-sort-container>.panels-ipe-portlet-wrapper:first-child .panel-pane{margin-top:20px}.panels-ipe-sort-container>.panels-ipe-portlet-wrapper:last-child .panel-pane{margin-bottom:0}.panel-pane{margin-bottom:40px!important}.panel-pane:last-child{margin-bottom:0!important}.panel-pane.pane-bundle-tile-pane,.panel-pane.pane-bundle-tile-pane-plus-text-area{margin-bottom:30px!important}.panels-ipe-region .panels-ipe-portlet-wrapper .panel-pane{margin-bottom:40px!important}.panels-ipe-region .panels-ipe-portlet-wrapper .panel-pane.pane-bundle-tile-pane,.panels-ipe-region .panels-ipe-portlet-wrapper .panel-pane.pane-bundle-tile-pane-plus-text-area{margin-bottom:20px!important}.panel-pane.title-only{margin-bottom:0!important}.panel-pane.title-only h2.underlined{margin-bottom:10px}.panels-ipe-region .panels-ipe-portlet-wrapper .panel-pane.title-only{margin-bottom:0!important}.panels-ipe-processed .panel-pane{margin-top:0!important}div.pane-bundle-video .media-vimeo-video,div.pane-bundle-video .media-youtube-video{height:auto;padding:0}.sidebar-panel{padding:1em}.sidebar-panel .panel-pane{margin-top:0;margin-bottom:0}.sidebar-panel>.panel-pane:first-child,.sidebar-panel>.panels-ipe-portlet-wrapper:first-child .panel-pane{margin-top:0}.panels-row.active{padding:15px 0}.panels-row.empty{padding:0;display:none}.panels-row.even,.panels-row.odd{padding:30px 0}.panels-row.first{padding-top:7.5px}.panels-row.last{padding-bottom:30px}.node-type-ocio-landing-page .l-main.lt-gray,.node-type-ocio-landing-page .l-main.lt-gray .panels-row.even{background:#ebebeb}.node-type-ocio-landing-page .l-main.lt-gray .panels-row.odd,.node-type-ocio-landing-page .l-main.white,.node-type-ocio-landing-page .l-main.white .panels-row.even{background:#fff}.node-type-ocio-landing-page .l-main.white .panels-row.odd{background:#ebebeb}.panel-pane.pane-bundle-tile-pane,.panel-pane.pane-bundle-tile-pane-plus-text-area{box-shadow:0 1px 1px 0 rgba(0,0,0,.22);padding:0;z-index:9}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane{background:#fff;width:100%;z-index:99}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.tile-pane-linked:hover,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.tile-pane-linked:hover{opacity:.85}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane>a,.panel-pane.pane-bundle-tile-pane .ui-accordion-content .fieldable-panels-pane>a,.panel-pane.pane-bundle-tile-pane .ui-tabs-content .fieldable-panels-pane>a,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane>a,.panel-pane.pane-bundle-tile-pane-plus-text-area .ui-accordion-content .fieldable-panels-pane>a,.panel-pane.pane-bundle-tile-pane-plus-text-area .ui-tabs-content .fieldable-panels-pane>a{text-decoration:none;height:100%;display:block}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane .field--name-field-tile-background-img img,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane .field--name-field-tile-background-img img{display:block;width:100%}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane blockquote.pull-quote li,.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane blockquote.pull-quote p,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane blockquote.pull-quote li,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane blockquote.pull-quote p{font-size:20px;font-size:2rem}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane a,.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane a:visited{color:#b00}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane a:focus{color:#028da9}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane a:hover{color:#666}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane a:active{color:#028da9}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.lt-gray{background:#ebebeb}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.lt-gray a,.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.lt-gray a:visited{color:#2d2d2d}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.lt-gray a:focus{color:#028da9}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.lt-gray a:hover{color:#b00}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.lt-gray a:active{color:#028da9}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.md-gray{background:#666;color:#fff}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.md-gray a,.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.md-gray a:visited{color:#fff}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.md-gray a:focus{color:#028da9}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.md-gray a:hover{color:#ebebeb}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.md-gray a:active{color:#028da9}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.dk-gray{background:#2d2d2d;color:#fff}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.dk-gray a,.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.dk-gray a:visited{color:#fff}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.dk-gray a:focus{color:#028da9}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.dk-gray a:hover{color:#ebebeb}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.dk-gray a:active{color:#028da9}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.black{background:#000;color:#fff}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.black a,.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.black a:visited{color:#fff}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.black a:focus{color:#028da9}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.black a:hover{color:#ebebeb}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.black a:active{color:#028da9}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.red{background:#b60000;color:#fff}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.red a,.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.red a:visited{color:#fff}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.red a:focus{color:#028da9}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.red a:hover{color:#ebebeb}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane.red a:active{color:#028da9}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane .title-box{padding:.8em 1em;display:table;width:100%}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane .title-box .title-text{display:table-cell;vertical-align:middle;width:100%;text-align:center;padding:0 1em}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane .title-box .title-text h2{font-size:18px;font-size:1.8rem;font-family:proximanova,Helvetica,Arial,sans-serif!important;line-height:110%;font-weight:300;margin:1px 0 0;padding:0}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane .title-box .title-icon{display:table-cell;vertical-align:middle;font-size:24px;font-size:2.4rem}@media (max-width:47.4em){.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane .text-areas h2,.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane .title-box .title-text h2,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane .text-areas h2,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane .title-box .title-text h2{font-size:24px;font-size:2.4rem}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane .text-areas .title-icon,.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane .title-box .title-text .title-icon,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane .text-areas .title-icon,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane .title-box .title-text .title-icon{font-size:30px;font-size:3rem}.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane .field--name-field-tile-text-area li,.panel-pane.pane-bundle-tile-pane .fieldable-panels-pane .field--name-field-tile-text-area p,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane .field--name-field-tile-text-area li,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane .field--name-field-tile-text-area p{font-size:20px;font-size:2rem}}.panel-pane.pane-bundle-tile-pane-plus-text-area{text-align:center;color:#2d2d2d}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane a,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane a:visited{color:#b00}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane a:focus{color:#028da9}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane a:hover{color:#666}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane a:active{color:#028da9}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane h2{color:#b00;font-size:20px;font-size:2rem;font-weight:400;margin-top:0;text-decoration:none}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.lt-gray{background:#ebebeb}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.lt-gray a,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.lt-gray a:visited{color:#2d2d2d}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.lt-gray a:focus{color:#028da9}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.lt-gray a:hover{color:#b00}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.lt-gray a:active{color:#028da9}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.md-gray{background:#666}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.dk-gray{background:#2d2d2d}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.black{background:#000}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.red{background:#b60000}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.black,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.black a,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.black a:visited,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.black h2,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.black li,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.black p,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.dk-gray,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.dk-gray a,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.dk-gray a:visited,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.dk-gray h2,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.dk-gray li,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.dk-gray p,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.md-gray,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.md-gray a,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.md-gray a:visited,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.md-gray h2,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.md-gray li,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.md-gray p,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.red,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.red a,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.red a:visited,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.red h2,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.red li,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.red p{color:#fff}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.black a:focus,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.dk-gray a:focus,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.md-gray a:focus,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.red a:focus{color:#028da9}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.black a:hover,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.dk-gray a:hover,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.md-gray a:hover,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.red a:hover{color:#ebebeb}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.black a:active,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.dk-gray a:active,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.md-gray a:active,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane.red a:active{color:#028da9}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane .text-areas{padding:1.6em 1.2em 1.2em}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane li,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane p{font-size:16px;font-size:1.6rem;font-weight:300;line-height:140%}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane ol,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane p,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane ul{margin:1em 0 0}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane li{text-align:left;margin-left:-2em}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane li.align-center{margin-left:-3em;text-align:center}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane li.align-right{text-align:right}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane a li,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane a p{color:#2d2d2d}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane a h2,.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane a h2:visited{color:#b00}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane a h2:focus{color:#028da9}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane a h2:hover{color:#b00}.panel-pane.pane-bundle-tile-pane-plus-text-area .fieldable-panels-pane a h2:active{color:#2d2d2d}.panel-pane.pane-bundle-tile-pane-plus-text-area .tile-image-style-icon{display:block;padding:1.4em 1.4em 1em}.panel-pane.pane-bundle-tile-pane-plus-text-area .tile-image-style-icon .field--name-field-tile-background-img{display:table-cell;vertical-align:middle;width:25%}.panel-pane.pane-bundle-tile-pane-plus-text-area .tile-image-style-icon .field--name-field-tile-background-img img{width:100%}.panel-pane.pane-bundle-tile-pane-plus-text-area .tile-image-style-icon .field--name-field-tile-background-img+h2{display:table-cell;padding-left:.8em;vertical-align:middle;width:75%;text-align:left}.panel-pane.pane-bundle-tile-pane-plus-text-area .tile-image-style-icon .field--name-field-tile-background-img+h2+.text-areas{display:inline-block;width:100%;background:inherit}.panel-pane.pane-bundle-tile-pane-plus-text-area .tile-image-style-icon .text-areas{padding:0}.panel-pane.pane-bundle-tile-pane-plus-text-area .tile-image-style-icon-center{display:block;padding:2em 1em 1em}.panel-pane.pane-bundle-tile-pane-plus-text-area .tile-image-style-icon-center .field--name-field-tile-background-img{width:50%;max-width:110px;margin:0 auto}@media (min-width:47.5em){.tile-5 .panel-pane.pane-bundle-tile-pane-plus-text-area h2{font-size:19px;font-size:1.9rem}.tile-5 .panel-pane.pane-bundle-tile-pane-plus-text-area .field--name-field-tile-text-area li,.tile-5 .panel-pane.pane-bundle-tile-pane-plus-text-area .field--name-field-tile-text-area p{font-size:15px;font-size:1.5rem;line-height:130%}.tile-5 .panel-pane.pane-bundle-tile-pane-plus-text-area .text-areas{padding:1.2em .2em .6em}}#edit-field-tile-background-img .description{font-size:120%;line-height:130%;margin-top:10px}.l-content{min-height:4em}.l-footer-wrapper .l-region{margin-bottom:20px;text-align:left}.l-footer-wrapper .l-region--footer-1 p,.l-footer-wrapper .l-region--footer-3 p{font-size:13px;font-size:1.3rem;line-height:135%;margin:0}.l-footer-wrapper .l-region--footer-2{text-align:right}.l-footer-wrapper .l-region--footer-3{clear:both}.l-footer-wrapper a{font-weight:400}.l-footer-wrapper #osu-wordmark{margin-bottom:10px}.l-footer-wrapper #osu-wordmark img{max-width:300px}.l-footer-wrapper .osu-siteinfo-name{font-weight:600}.l-footer-wrapper .osu-siteinfo-address{float:left;font-style:normal}.l-footer-wrapper .osu-siteinfo-address .pipe{margin:0 2px;color:#b8b8b8}@media (max-width:47.4em){.l-page .l-footer-wrapper .l-region{text-align:center}.l-page .l-footer-wrapper .l-region p{font-size:17px;font-size:1.7rem}.l-page .l-footer-wrapper .l-region>*{float:none;text-align:center}.l-page .l-footer-wrapper .l-region ul{padding:0}.l-page .l-footer-wrapper .l-region ul li:first-child *{margin-left:0}}.footer-dk-gray .l-footer-wrapper{background:#2d2d2d;color:#fff}.footer-dk-gray .l-footer-wrapper a,.footer-dk-gray .l-footer-wrapper a:visited{color:#fff}.footer-dk-gray .l-footer-wrapper a:focus{color:#d4df48}.footer-dk-gray .l-footer-wrapper a:hover{color:#666}.footer-dk-gray .l-footer-wrapper a:active{color:#b00}.footer-dk-gray .l-footer-wrapper .pipe{color:#b8b8b8}.footer-md-gray .l-footer-wrapper{background:#666;color:#fff}.footer-md-gray .l-footer-wrapper a,.footer-md-gray .l-footer-wrapper a:visited{color:#fff}.footer-md-gray .l-footer-wrapper a:focus{color:#d4df48}.footer-md-gray .l-footer-wrapper a:hover{color:#ebebeb}.footer-md-gray .l-footer-wrapper a:active{color:#b00}.footer-md-gray .l-footer-wrapper .pipe{color:#ebebeb}.footer-md-gray .l-footer-wrapper .osu-siteinfo-social li .siteinfo-social-link{color:#666;background-color:#fff}.footer-md-gray .l-footer-wrapper .osu-siteinfo-social li .siteinfo-social-link:focus,.footer-md-gray .l-footer-wrapper .osu-siteinfo-social li .siteinfo-social-link:hover{color:#fff}.footer-lt-gray .l-footer-wrapper{background:#ebebeb;color:#474747}.footer-lt-gray .l-footer-wrapper a{color:#474747}.footer-lt-gray .l-footer-wrapper a:visited{color:#2d2d2d}.footer-lt-gray .l-footer-wrapper a:focus{color:#d4df48}.footer-lt-gray .l-footer-wrapper .pipe,.footer-lt-gray .l-footer-wrapper a:active,.footer-lt-gray .l-footer-wrapper a:hover{color:#b00}.footer-lt-gray .l-footer-wrapper .osu-siteinfo-social li .siteinfo-social-link{background-color:#474747}.footer-white .l-footer-wrapper{background:#fff;color:#666}.footer-white .l-footer-wrapper a,.footer-white .l-footer-wrapper a:visited{color:#666}.footer-white .l-footer-wrapper a:focus{color:#d4df48}.footer-white .l-footer-wrapper .pipe,.footer-white .l-footer-wrapper a:active,.footer-white .l-footer-wrapper a:hover{color:#b00}.l-footer-wrapper .osu-siteinfo-social{margin-top:0;padding-left:0;text-align:right}.l-footer-wrapper .osu-siteinfo-social li{list-style-type:none;display:inline-block}@media (min-width:47.5em) and (max-width:59em){.l-footer-wrapper .osu-siteinfo-social li:nth-last-child(5):first-child:nth-child(4),.l-footer-wrapper .osu-siteinfo-social li:nth-last-child(5):first-child~:nth-child(4){clear:both}.l-footer-wrapper .osu-siteinfo-social li:nth-last-child(5):first-child:nth-child(n+4),.l-footer-wrapper .osu-siteinfo-social li:nth-last-child(5):first-child~:nth-child(n+4){float:right}}.l-footer-wrapper .osu-siteinfo-social li .siteinfo-social-link{color:#fff;background-color:#666;margin:0 0 1em 1em;width:2.55em;padding:.62em 0 .46em;text-align:center;display:block}.l-footer-wrapper .osu-siteinfo-social li .siteinfo-social-link:focus,.l-footer-wrapper .osu-siteinfo-social li .siteinfo-social-link:hover{background-color:#000}.l-footer-wrapper .osu-siteinfo-social li .siteinfo-social-link.link-facebook:focus,.l-footer-wrapper .osu-siteinfo-social li .siteinfo-social-link.link-facebook:hover{background-color:#3b5998}.l-footer-wrapper .osu-siteinfo-social li .siteinfo-social-link.link-twitter:focus,.l-footer-wrapper .osu-siteinfo-social li .siteinfo-social-link.link-twitter:hover{background-color:#00aced}.l-footer-wrapper .osu-siteinfo-social li .siteinfo-social-link.link-youtube:focus,.l-footer-wrapper .osu-siteinfo-social li .siteinfo-social-link.link-youtube:hover{background-color:#b00}.l-footer-wrapper .osu-siteinfo-social li .siteinfo-social-link.link-googleplus:focus,.l-footer-wrapper .osu-siteinfo-social li .siteinfo-social-link.link-googleplus:hover{background-color:#dd4b39}.l-footer-wrapper .osu-siteinfo-social li .siteinfo-social-link.link-photos:focus,.l-footer-wrapper .osu-siteinfo-social li .siteinfo-social-link.link-photos:hover{background-color:#ff0084}.l-footer-wrapper .osu-siteinfo-social li .siteinfo-social-link.link-instagram:focus,.l-footer-wrapper .osu-siteinfo-social li .siteinfo-social-link.link-instagram:hover{background-color:#517fa4}.l-footer-wrapper .osu-siteinfo-social li .siteinfo-social-link.link-linkedin:focus,.l-footer-wrapper .osu-siteinfo-social li .siteinfo-social-link.link-linkedin:hover{background-color:#007bb6}.l-region--hero-wrapper.white{background:#fff}.l-region--hero-wrapper.lt-gray{background:#efefef}.l-main.white{background:#fff}.l-main.lt-gray{background:#efefef}.l-main{padding-bottom:30px}.node-type-ocio-landing-page .l-main{padding-bottom:0}.l-region--masthead{padding:20px 0}@media (min-width:47.5em){.l-footer-wrapper .osu-siteinfo-social{float:right}.l-footer-wrapper .osu-siteinfo-social li{float:left}.l-footer-wrapper .osu-siteinfo-social li:nth-last-child(6):first-child:nth-child(4),.l-footer-wrapper .osu-siteinfo-social li:nth-last-child(6):first-child~:nth-child(4),.l-footer-wrapper .osu-siteinfo-social li:nth-last-child(7):first-child:nth-child(5),.l-footer-wrapper .osu-siteinfo-social li:nth-last-child(7):first-child~:nth-child(5){clear:both}.l-footer-wrapper .osu-siteinfo-social li:nth-last-child(7):first-child:nth-child(n+5),.l-footer-wrapper .osu-siteinfo-social li:nth-last-child(7):first-child~:nth-child(n+5){float:right}.l-region--masthead .l-constrained{width:100%;display:table}}#site-name{display:table-cell;vertical-align:middle;font-size:48px;font-size:4.8rem;max-width:500px}#site-name .site-name-prefix{display:block;font-size:.5em;font-weight:300;color:#666}#site-name .site-name-main{color:#2d2d2d;font-weight:600;display:block;line-height:1em}#site-name a{text-decoration:none;display:block}#site-name .site-name-slogan{font-size:.5em;font-weight:400;color:#666;margin-top:20px}#site-name.site-name-2-lines{font-size:44px;font-size:4.4rem}#site-name.site-name-3-lines{font-size:32px;font-size:3.2rem}#site-name.site-name-4-lines{font-size:30px;font-size:3rem}#site-logo{display:table-cell;vertical-align:middle;text-align:right}#site-logo img{height:140px;width:auto;margin-right:-.5em}@media (max-width:47.4em){#site-logo{display:none}}.l-region--masthead.white{background-color:#fff}.l-region--masthead.dk-gray{background-color:#2d2d2d}.l-region--masthead.dk-gray #site-name .site-name-main{color:#fff}.l-region--masthead.dk-gray #site-name .site-name-prefix,.l-region--masthead.dk-gray #site-name .site-name-slogan{color:#ebebeb}.l-region--masthead.md-gray{background-color:#666}.l-region--masthead.md-gray #site-name .site-name-main{color:#fff}.l-region--masthead.md-gray #site-name .site-name-prefix,.l-region--masthead.md-gray #site-name .site-name-slogan{color:#f3f3f3}.l-region--masthead.lt-gray{background-color:#ebebeb}.l-region--osu-navbar{clear:both;margin:0;padding:0;background:url(../images/osu-navbar/lt-gray/bg-navbar_red.png) left bottom repeat-x #eaeaea;overflow:hidden}#osu_navbar *{font-family:proximanova,'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:13px;line-height:1.4;font-weight:400}#osu_navbar p{margin:0;padding:0}#osu_navbar .univ_info{float:left;padding:.9em 0 1.1em;margin-left:0}#osu_navbar .univ_links{float:right;clear:none;padding:1em 0 0;margin-top:-2px}#osu_navbar .univ_name a{height:16px;width:90px;display:block;text-indent:-9999px;background:url(../images/osu-navbar/lt-gray/osu_name.png) no-repeat;margin-left:0;overflow:hidden}#osu_navbar div.links{float:left;margin-bottom:10px}#osu_navbar div.links ul{margin:0;padding:0}#osu_navbar div.links ul li{list-style:none;float:left;margin-left:1em}#osu_navbar div.links ul li a{color:#333;text-decoration:none;background-position:0 0}#osu_navbar div.links ul li a:hover{text-decoration:underline}.osu-semantic{position:absolute;left:0;top:-500px;width:1px;height:1px;overflow:hidden}a.osu-semantic:active,a.osu-semantic:focus{position:absolute;left:0;top:0;overflow:visible}a#skip:active,a#skip:focus{position:absolute;top:0;left:25%;width:50%;text-align:center;padding:.5em 0 1.5em;display:block;color:#fff;z-index:999999999999999999;text-decoration:none;background:#666;background:rgba(0,0,0,.8);border:1px dotted #ccc;border-top:none;border-radius:0 0 6px 6px}.view,.views-exposed-form,.views-exposed-widgets .views-exposed-.views-exposed-widgets{position:relative}a#skip:active:hover,a#skip:focus:hover{background:#b00;background:rgba(187,0,0,.8)}.l-region--osu-navbar.dk-gray{background:url(../images/osu-navbar/dk-gray/bg-navbar_red.png) left bottom repeat-x #333}.l-region--osu-navbar.dk-gray #osu_navbar .univ_name a{background-image:url(../images/osu-navbar/dk-gray/osu_name.png)}.l-region--osu-navbar.dk-gray #osu_navbar div.links ul li a{color:#fff}@media (max-width:47.4em){#osu_navbar div.links ul{margin-top:-2px}#osu_navbar div.links ul li{list-style:none;float:left;margin-left:.5em}#osu_navbar div.links ul li a{height:23px;width:23px;display:block;overflow:hidden;text-indent:-999px}#osu_navbar div.links ul li a:hover{text-decoration:none}.l-region--osu-navbar #osu_navbar div.links ul li a.help,.l-region--osu-navbar.lt-gray #osu_navbar div.links ul li a.help{background-image:url(../images/osu-navbar/lt-gray/resp-help.png)}.l-region--osu-navbar #osu_navbar div.links ul li a.buckeyelink,.l-region--osu-navbar.lt-gray #osu_navbar div.links ul li a.buckeyelink{background-image:url(../images/osu-navbar/lt-gray/resp-buckeyelink.png)}.l-region--osu-navbar #osu_navbar div.links ul li a.map,.l-region--osu-navbar.lt-gray #osu_navbar div.links ul li a.map{background-image:url(../images/osu-navbar/lt-gray/resp-map.png)}.l-region--osu-navbar #osu_navbar div.links ul li a.findpeople,.l-region--osu-navbar.lt-gray #osu_navbar div.links ul li a.findpeople{background-image:url(../images/osu-navbar/lt-gray/resp-findpeople.png)}.l-region--osu-navbar #osu_navbar div.links ul li a.webmail,.l-region--osu-navbar.lt-gray #osu_navbar div.links ul li a.webmail{background-image:url(../images/osu-navbar/lt-gray/resp-webmail.png)}.l-region--osu-navbar #osu_navbar div.links ul li a.search,.l-region--osu-navbar.lt-gray #osu_navbar div.links ul li a.search{background-image:url(../images/osu-navbar/lt-gray/resp-search.png)}.l-region--osu-navbar.dk-gray #osu_navbar div.links ul li a.help{background-image:url(../images/osu-navbar/dk-gray/resp-help.png)}.l-region--osu-navbar.dk-gray #osu_navbar div.links ul li a.buckeyelink{background-image:url(../images/osu-navbar/dk-gray/resp-buckeyelink.png)}.l-region--osu-navbar.dk-gray #osu_navbar div.links ul li a.map{background-image:url(../images/osu-navbar/dk-gray/resp-map.png)}.l-region--osu-navbar.dk-gray #osu_navbar div.links ul li a.findpeople{background-image:url(../images/osu-navbar/dk-gray/resp-findpeople.png)}.l-region--osu-navbar.dk-gray #osu_navbar div.links ul li a.webmail{background-image:url(../images/osu-navbar/dk-gray/resp-webmail.png)}.l-region--osu-navbar.dk-gray #osu_navbar div.links ul li a.search{background-image:url(../images/osu-navbar/dk-gray/resp-search.png)}}@media only screen and (max-width:720px) and (-webkit-min-device-pixel-ratio:2),only screen and (max-width:720px) and (min--moz-device-pixel-ratio:2),only screen and (max-width:720px) and (-o-min-device-pixel-ratio:2 / 1),only screen and (max-width:720px) and (min-device-pixel-ratio:2){.l-region--osu-navbar.lt-gray #osu_navbar div.links ul li a{background-size:23px}.l-region--osu-navbar.lt-gray #osu_navbar .univ_name a{background-size:contain}.l-region--osu-navbar.lt-gray #osu_navbar div.links ul li a.help{background-image:url(../images/osu-navbar/lt-gray/resp-help@2x.png)}.l-region--osu-navbar.lt-gray #osu_navbar div.links ul li a.buckeyelink{background-image:url(../images/osu-navbar/lt-gray/resp-buckeyelink@2x.png)}.l-region--osu-navbar.lt-gray #osu_navbar div.links ul li a.map{background-image:url(../images/osu-navbar/lt-gray/resp-map@2x.png)}.l-region--osu-navbar.lt-gray #osu_navbar div.links ul li a.findpeople{background-image:url(../images/osu-navbar/lt-gray/resp-findpeople@2x.png)}.l-region--osu-navbar.lt-gray #osu_navbar div.links ul li a.webmail{background-image:url(../images/osu-navbar/lt-gray/resp-webmail@2x.png)}.l-region--osu-navbar.lt-gray #osu_navbar div.links ul li a.search{background-image:url(../images/osu-navbar/lt-gray/resp-search@2x.png)}.l-region--osu-navbar #osu_navbar div.links ul li .ui-accordion-content a,.l-region--osu-navbar #osu_navbar div.links ul li .ui-tabs-content a,.l-region--osu-navbar #osu_navbar div.links ul li a,.l-region--osu-navbar.dk-gray #osu_navbar div.links ul li a,.ui-accordion-content .l-region--osu-navbar #osu_navbar div.links ul li a,.ui-tabs-content .l-region--osu-navbar #osu_navbar div.links ul li a{background-size:23px}.l-region--osu-navbar #osu_navbar .univ_name .ui-accordion-content a,.l-region--osu-navbar #osu_navbar .univ_name .ui-tabs-content a,.l-region--osu-navbar #osu_navbar .univ_name a,.l-region--osu-navbar.dk-gray #osu_navbar .univ_name a,.ui-accordion-content .l-region--osu-navbar #osu_navbar .univ_name a,.ui-tabs-content .l-region--osu-navbar #osu_navbar .univ_name a{background-size:contain}.l-region--osu-navbar #osu_navbar div.links ul li a.help,.l-region--osu-navbar.dk-gray #osu_navbar div.links ul li a.help{background-image:url(../images/osu-navbar/dk-gray/resp-help@2x.png)}.l-region--osu-navbar #osu_navbar div.links ul li a.buckeyelink,.l-region--osu-navbar.dk-gray #osu_navbar div.links ul li a.buckeyelink{background-image:url(../images/osu-navbar/dk-gray/resp-buckeyelink@2x.png)}.l-region--osu-navbar #osu_navbar div.links ul li a.map,.l-region--osu-navbar.dk-gray #osu_navbar div.links ul li a.map{background-image:url(../images/osu-navbar/dk-gray/resp-map@2x.png)}.l-region--osu-navbar #osu_navbar div.links ul li a.findpeople,.l-region--osu-navbar.dk-gray #osu_navbar div.links ul li a.findpeople{background-image:url(../images/osu-navbar/dk-gray/resp-findpeople@2x.png)}.l-region--osu-navbar #osu_navbar div.links ul li a.webmail,.l-region--osu-navbar.dk-gray #osu_navbar div.links ul li a.webmail{background-image:url(../images/osu-navbar/dk-gray/resp-webmail@2x.png)}.l-region--osu-navbar #osu_navbar div.links ul li a.search,.l-region--osu-navbar.dk-gray #osu_navbar div.links ul li a.search{background-image:url(../images/osu-navbar/dk-gray/resp-search@2x.png)}}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min--moz-device-pixel-ratio:2),only screen and (-o-min-device-pixel-ratio:2 / 1),only screen and (min-device-pixel-ratio:2){.l-region--osu-navbar #osu_navbar .univ_name a{background-size:contain}.l-region--osu-navbar.lt-gray #osu_navbar .univ_name a{background-image:url(../images/osu-navbar/lt-gray/osu_name@2x.png)}.l-region--osu-navbar #osu_navbar .univ_name a,.l-region--osu-navbar.dk-gray #osu_navbar .univ_name a{background-image:url(../images/osu-navbar/dk-gray/osu_name@2x.png)}}.l-region--pre-footer-wrapper{line-height:0}.l-region--pre-footer-wrapper.white{background:#fff}.l-region--pre-footer-wrapper.lt-gray{background:#efefef}.field--name-field-pre-footer-banner-image img{display:block;width:100%;margin:0}.section-tags h1{font-weight:600;margin-bottom:1.2em}.section-tags .l-region--content{padding-bottom:40px}.section-tags .node-teaser{border-bottom:1px solid #c7c7c7;margin-bottom:1.5em}.section-tags a.feed-icon{display:none}body.page-user-login .l-main{padding-top:20px}body.page-user-login h1{margin-bottom:20px}body.page-user-login h2{font-family:proximanova,Helvetica,Arial,sans-serif;font-size:20px!important;font-weight:600!important}body.page-user-login .login-box{background:#ebebeb;margin-bottom:2em}body.page-user-login .login-box.osu{padding:20px 30px;margin-bottom:2em}body.page-user-login .login-box.osu h2{margin-bottom:1em}body.page-user-login .login-box.osu a{margin-bottom:10px}body.page-user-login .login-box.non-osu .ui-accordion-content,body.page-user-login .login-box.non-osu .ui-accordion-header{margin:0;background:0 0!important;border:0;padding:20px 30px;overflow:hidden}body.page-user-login .login-box.non-osu .ui-accordion-content .links,body.page-user-login .login-box.non-osu .ui-accordion-header .links{padding:0;margin-bottom:1em}body.page-user-login .login-box.non-osu .ui-accordion-content .links li,body.page-user-login .login-box.non-osu .ui-accordion-header .links li{margin-right:.5em}body.page-user-login .login-box.non-osu .ui-accordion-content .links li:after,body.page-user-login .login-box.non-osu .ui-accordion-header .links li:after{content:"|";margin-left:.5em}body.page-user-login .login-box.non-osu .ui-accordion-content .links li.last:after,body.page-user-login .login-box.non-osu .ui-accordion-header .links li.last:after{content:""}body.page-user-login .login-box.non-osu .ui-accordion-content .links li a,body.page-user-login .login-box.non-osu .ui-accordion-header .links li a{display:inline-block}.view-id-wcm_media_gallery .views-group .views-row:after,.view-id-wcm_media_gallery .views-group:after{display:table;clear:both;content:""}body.page-user-login .login-box.non-osu #edit-actions{margin-top:20px}.user-profile{padding-bottom:20px}.user-profile .field--name-field-job-title{font-size:24px;font-size:2.4rem;font-weight:400;margin-bottom:30px}.user-profile .field--name-field-user-photo{float:right;margin:-40px 0 20px 30px}.user-profile .field--name-email{margin-top:20px}.field--name-field-user-photo img,.views-field-field-user-photo img{border:1px solid #8c8c8c}.view-id-wcm_media_gallery .views-group-header{margin-bottom:.4em;margin-top:1.4em;padding-bottom:.2em;color:#666}.view-id-wcm_media_gallery .views-group{clear:both}.view-id-wcm_media_gallery .views-group .views-row{width:46%;margin-right:8%;float:left;margin-bottom:.75em;margin-top:.75em}.view-id-wcm_media_gallery .views-group .views-row:nth-child(2n+1){clear:left}.view-id-wcm_media_gallery .views-group .views-row:nth-child(2n+2){margin-right:0}@media (min-width:47.5em){.view-id-wcm_media_gallery .views-group .views-row,.view-id-wcm_media_gallery .views-group .views-row:nth-child(3n+1),.view-id-wcm_media_gallery .views-group .views-row:nth-child(3n+2),.view-id-wcm_media_gallery .views-group .views-row:nth-child(3n+3){width:20.5%;margin-right:6%;margin-bottom:1em;margin-top:1em;float:left;clear:none}.view-id-wcm_media_gallery .views-group .views-row:nth-child(4n+1){clear:both}.view-id-wcm_media_gallery .views-group .views-row:nth-child(4n+4){margin-right:0}}@media (min-width:60em){.view-id-wcm_media_gallery .views-group .views-row,.view-id-wcm_media_gallery .views-group .views-row:nth-child(4n+1),.view-id-wcm_media_gallery .views-group .views-row:nth-child(4n+2),.view-id-wcm_media_gallery .views-group .views-row:nth-child(4n+3),.view-id-wcm_media_gallery .views-group .views-row:nth-child(4n+4){width:16%;margin-right:5%;float:left;clear:none}.view-id-wcm_media_gallery .views-group .views-row:nth-child(5n+1){clear:both}.view-id-wcm_media_gallery .views-group .views-row:nth-child(5n+5){margin-right:0}.view-wcm-news-client.view-display-id-teasers_pane .views-row{width:95%}}@media (min-width:82em){.view-id-wcm_media_gallery .views-group .views-row,.view-id-wcm_media_gallery .views-group .views-row:nth-child(4n+1),.view-id-wcm_media_gallery .views-group .views-row:nth-child(4n+2),.view-id-wcm_media_gallery .views-group .views-row:nth-child(4n+3),.view-id-wcm_media_gallery .views-group .views-row:nth-child(4n+4){margin-top:1.3em;margin-bottom:1.3em}}.view-content.ui-accordion h3{font-size:18px;font-size:1.8rem;text-transform:uppercase;color:#666;margin-top:1.2em}.view-content.ui-accordion .view-grouping-header{background:#d2d2d2;color:#2d2d2d;border-radius:0;border-color:#d2d2d2;font-weight:600;font-size:16px;font-size:1.6rem;margin-bottom:1px}.view-content.ui-accordion .view-grouping-header:hover{background:#c2c2c2}.view-content.ui-accordion .view-grouping-header:before{top:14px;left:12px}.view-content.ui-accordion .view-grouping-content{margin-bottom:1px}.view-content.ui-accordion .ui-accordion-header{background:#ebebeb!important;padding-left:2em!important;margin-top:1px!important;margin-bottom:1px}.view-content.ui-accordion .ui-accordion-header a{font-size:16px;font-size:1.6rem;margin-left:16px}.view-content.ui-accordion .ui-accordion-header.ui-state-hover{background-color:#d2d2d2!important}.view-content.ui-accordion .ui-accordion-header .ui-accordion-header-icon{margin-left:18px}.view-content.ui-accordion .ui-accordion .ui-accordion-content{padding:10px 30px 10px 32px!important;border:1px solid #ebebeb!important;background:#fff!important}.view-content.ui-accordion .views-field-title{font-size:16px;font-size:1.6rem;margin-bottom:12px;line-height:120%}.view-content.ui-accordion .views-field-title a.active{color:#b00;text-decoration:underline}.view-content.ui-accordion .views-row-last .views-field-title{margin-bottom:0}.pane-ocio-news-archive-teasers-pane h2.pane-title{margin-bottom:30px}.l-main.lt-gray .view-display-id-archive_listing_block .view-grouping-header{background:#c2c2c2;border-color:#c2c2c2}.l-main.lt-gray .view-display-id-archive_listing_block .view-grouping-header:hover{background:#b8b8b8}.view-wcm-news-client.view-display-id-teasers_pane{margin-bottom:10px;padding-bottom:40px;border-bottom:1px solid #c7c7c7}.view-wcm-news-client.view-display-id-teasers_pane .views-row{margin:30px 0;border-bottom:none}.view-wcm-news-client.view-display-id-teasers_pane .views-row.views-row-last{margin-bottom:0}.node--news-client-cached-article--teaser h3{font-size:30px;font-size:3rem}.node--news-client-cached-article--teaser .more-link{margin-top:10px;margin-bottom:0}.view-ocio-news-archive .field--name-title{margin-bottom:.6em}.view-ocio-news-archive .field--name-node-link{margin-top:1em}.view-ocio-news-archive .view-header .more-link{border-bottom:1px solid #b00;margin-bottom:1.4em;margin-top:0}.view-ocio-news-archive .view-header .more-link a{margin-top:-2em;font-weight:400;color:#2d2d2d;font-size:13px;float:right}.view-ocio-news-archive .view-header .more-link a:hover{text-decoration:none;color:#028da9}.node--article--teaser .field--name-field-featured-image{display:none}@media (min-width:47.5em){.node--article--teaser .field--name-field-featured-image{display:block;float:right;margin:0 0 40px 2em}}.node--article--teaser .more-link{float:left;margin-top:10px;margin-bottom:10px}.view-display-id-page .views-row,.view-display-id-teasers_pane .views-row{border-bottom:1px solid #c7c7c7;margin-bottom:30px}.view-display-id-page .views-row h2,.view-display-id-teasers_pane .views-row h2{font-size:32px;font-size:3.2rem;line-height:110%}.pane-ocio-news-archive-titles-pane .views-row{margin-bottom:.2em}.pane-ocio-news-archive-trio-image-pane h2.pane-title,.pane-ocio-news-archive-trio-pane h2.pane-title{font-size:28px;font-size:2.8rem;margin-bottom:.2em}.pane-ocio-news-archive-trio-image-pane .views-row,.pane-ocio-news-archive-trio-pane .views-row{margin-bottom:3em}.pane-ocio-news-archive-trio-image-pane .views-field-title h3,.pane-ocio-news-archive-trio-pane .views-field-title h3{font-size:22px;font-size:2.2rem;margin-top:.4em;line-height:120%;margin-bottom:.5em}.pane-ocio-news-archive-trio-image-pane .field--name-post-date,.pane-ocio-news-archive-trio-pane .field--name-post-date{font-weight:400;color:#666;font-size:15px;font-size:1.5rem}.pane-ocio-news-archive-trio-image-pane .views-field-field-ocio-body a,.pane-ocio-news-archive-trio-image-pane .views-field-field-ocio-body:hover,.pane-ocio-news-archive-trio-pane .views-field-field-ocio-body a,.pane-ocio-news-archive-trio-pane .views-field-field-ocio-body:hover{color:#2d2d2d;text-decoration:none}@media (min-width:47.5em){.pane-ocio-news-archive-trio-image-pane .views-row,.pane-ocio-news-archive-trio-pane .views-row{margin-bottom:1em;width:33.3%}.pane-ocio-news-archive-trio-image-pane .views-row:nth-child(3n+1),.pane-ocio-news-archive-trio-pane .views-row:nth-child(3n+1){float:left;padding-right:4%;clear:left}.pane-ocio-news-archive-trio-image-pane .views-row:nth-child(3n+2),.pane-ocio-news-archive-trio-pane .views-row:nth-child(3n+2){float:left;padding-left:2%;padding-right:2%}.pane-ocio-news-archive-trio-image-pane .views-row:nth-child(3n+3),.pane-ocio-news-archive-trio-pane .views-row:nth-child(3n+3){float:right;padding-left:4%}}.section-news .l-region--sidebar-2 h2.block__title{padding-top:20px}.view-id-leadership_listing .views-field,.view-id-user_contact .views-field{font-size:15px;font-size:1.5rem;margin-bottom:5px;line-height:120%}.view-id-leadership_listing .views-field-realname h2,.view-id-leadership_listing .views-field-realname h3,.view-id-user_contact .views-field-realname h2,.view-id-user_contact .views-field-realname h3{font-size:21px;font-size:2.1rem}.view-id-leadership_listing .views-field-field-user-photo img,.view-id-user_contact .views-field-field-user-photo img{width:100%;height:auto}.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group-header,.view-id-user_contact.view-display-id-panel_pane_1 .views-group-header{margin-bottom:.4em;margin-top:1.4em;padding-bottom:.2em;color:#666}.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group,.view-id-user_contact.view-display-id-panel_pane_1 .views-group{clear:both}.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group:after,.view-id-user_contact.view-display-id-panel_pane_1 .views-group:after{content:"";display:table;clear:both}.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row,.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row{width:46%;margin-right:8%;float:left;margin-bottom:.75em;margin-top:.75em}.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row:after,.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row:after{content:"";display:table;clear:both}.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row:nth-child(2n+1),.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row:nth-child(2n+1){clear:left}.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row:nth-child(2n+2),.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row:nth-child(2n+2){margin-right:0}@media (min-width:47.5em){.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row,.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row:nth-child(3n+1),.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row:nth-child(3n+2),.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row:nth-child(3n+3),.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row,.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row:nth-child(3n+1),.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row:nth-child(3n+2),.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row:nth-child(3n+3){width:20.5%;margin-right:6%;margin-bottom:1em;margin-top:1em;float:left;clear:none}.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row:nth-child(4n+1),.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row:nth-child(4n+1){clear:both}.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row:nth-child(4n+4),.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row:nth-child(4n+4){margin-right:0}}@media (min-width:60em){.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row,.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row:nth-child(4n+1),.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row:nth-child(4n+2),.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row:nth-child(4n+3),.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row:nth-child(4n+4),.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row,.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row:nth-child(4n+1),.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row:nth-child(4n+2),.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row:nth-child(4n+3),.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row:nth-child(4n+4){width:16%;margin-right:5%;float:left;clear:none}.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row:nth-child(5n+1),.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row:nth-child(5n+1){clear:both}.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row:nth-child(5n+5),.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row:nth-child(5n+5){margin-right:0}}@media (min-width:82em){.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row,.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row:nth-child(4n+1),.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row:nth-child(4n+2),.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row:nth-child(4n+3),.view-id-leadership_listing.view-display-id-panel_pane_1 .views-group .views-row:nth-child(4n+4),.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row,.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row:nth-child(4n+1),.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row:nth-child(4n+2),.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row:nth-child(4n+3),.view-id-user_contact.view-display-id-panel_pane_1 .views-group .views-row:nth-child(4n+4){margin-top:1.3em;margin-bottom:1.3em}}.pane-user-contact-panel-pane-2 .views-row{margin-top:20px;margin-bottom:30px}.pane-leadership-listing-panel-pane-2 .views-row{border-bottom:1px solid #ccc;padding:1em 0 0}.pane-leadership-listing-panel-pane-2 .views-row:after{content:"";display:table;clear:both}.pane-leadership-listing-panel-pane-2 .views-row.views-row-1{border-top:1px solid #ccc;margin-top:0}.pane-leadership-listing-panel-pane-2 .views-field-field-user-photo{margin-bottom:15px}.pane-leadership-listing-panel-pane-2 .views-field-field-user-photo img{width:100%;border:none}.pane-leadership-listing-panel-pane-2 .views-field-realname{font-size:32px;font-size:3.2rem;margin-top:0;margin-bottom:6px}.pane-leadership-listing-panel-pane-2 .views-field-field-job-title{font-size:20px;font-size:2rem;display:block;margin-bottom:8px}.pane-leadership-listing-panel-pane-2 .views-field-field-bio{margin-top:12px}.pane-leadership-listing-panel-pane-2 .more-link{margin-top:15px;font-size:14px}@media (min-width:47.5em){.pane-leadership-listing-panel-pane-2 .views-row{padding:1.5em 0 1em}.pane-leadership-listing-panel-pane-2 .views-row .views-field-field-user-photo{float:right;width:300px;margin:0 0 1em 2em}}@media (min-width:60em){.pane-leadership-listing-panel-pane-2 .views-row .views-field-field-user-photo{width:360px}}@media (min-width:82em){.pane-leadership-listing-panel-pane-2 .views-row{padding:1.8em 0 1em}.pane-leadership-listing-panel-pane-2 .views-row .text-grouping{width:58.5%}.pane-leadership-listing-panel-pane-2 .views-row .views-field-field-user-photo{width:39%;margin:0}.pane-leadership-listing-panel-pane-2 .views-row-odd .text-grouping{float:right}.pane-leadership-listing-panel-pane-2 .views-row-even .text-grouping,.pane-leadership-listing-panel-pane-2 .views-row-odd .views-field-field-user-photo{float:left}.pane-leadership-listing-panel-pane-2 .views-row-even .views-field-field-user-photo{float:right}}.views-table td.views-field *{margin:0}.views-exposed-widgets .views-exposed-widget .form-submit{margin-top:1.6em!important}.views-exposed-widgets .views-exposed-widget.views-submit-button{padding:0}.views-exposed-widgets .form-actions .description,.views-exposed-widgets .form-item .description{display:none}.view .ajax-progress,.views-exposed-form .ajax-progress{bottom:-1.75em;position:absolute;right:50%} \ No newline at end of file diff --git a/profiles/wcm_base/themes/wcm_omega/js/wcm-omega-menu.behaviors.js b/profiles/wcm_base/themes/wcm_omega/js/wcm-omega-menu.behaviors.js index 3e9c0cda..b6efe4d3 100644 --- a/profiles/wcm_base/themes/wcm_omega/js/wcm-omega-menu.behaviors.js +++ b/profiles/wcm_base/themes/wcm_omega/js/wcm-omega-menu.behaviors.js @@ -5,6 +5,77 @@ /***************************************************** *** main menu behavior *****************************************************/ + Drupal.behaviors.wcmOmegaAccessibleMenu = { + attach: function (context, settings) { + + function navigate(group, index) { + if (index >= 0 && index < group.length) { + group.get(index).focus(); + } + } + + var items = $('ul#superfish-1 a'); + + items.each(function(index) { + /* START tab key ptions */ + if (index != 0) { + $(this).attr('tabindex', '-1'); + } + + /* (above) Onlu first parent tabbable OR All parents tabbable (below) */ + + // $(this).not('.sf-depth-1').attr('tabindex', '-1'); + + /* END tab key ptions */ + }); + + items.on('keydown', function(e){ + var key = e.which; + + if (key > 36 && key < 41) { + e.preventDefault(); + + // left/right keys + if (key % 2) { + + var parents = items.filter('.sf-depth-1'); + var index = parents.index(this); + + if (index < 0) { + index = parents.index($(this).parents('.sf-depth-1').find('a.sf-depth-1').get(0)); + } + + navigate(parents, index + key - 38); + } + // up/down keys + else { + /* START Up/Down Options */ + + // navigate(items, items.index(this) + key - 39); + + /* (above) Navigate through ALL links OR Only children in current section (below) */ + + var children = $(this).parents('.main-menu-second-ul').find('a'); + if (!children.length){ + children = $(this).next('.main-menu-second-ul').find('a'); + } + + var index = children.index(this) + key - 39; + if (index < 0) { + index = children.length - 1; + } + else if (index >= children.length) { + index = 0; + } + children.get(index).focus(); + + /* END Up/Down Options */ + } + } + }); + } + }; + Drupal.behaviors.wcmOmegaMainMenu = { attach: function (context, settings) { @@ -15,13 +86,13 @@ $('#block-menu-block-custom-1 ul.menu').addClass('main-menu-second-ul'); $('.main-menu-second-ul > li').addClass('main-menu-second-li'); $('.main-menu-second-ul > li > ul > li').addClass('main-menu-third-plus-li').removeClass('main-menu-second-li'); - + //behavior for second-level menu if($('body').hasClass('menu-style-2')) { - + //hides li levels 3 and greater $('.main-menu-third-plus-li').hide(); - + //shifts and adjusts menu based on window size and content var menuShift = function() { diff --git a/profiles/wcm_base/themes/wcm_omega/js/wcm-omega.behaviors.js b/profiles/wcm_base/themes/wcm_omega/js/wcm-omega.behaviors.js index 675ecbae..00cb9d44 100644 --- a/profiles/wcm_base/themes/wcm_omega/js/wcm-omega.behaviors.js +++ b/profiles/wcm_base/themes/wcm_omega/js/wcm-omega.behaviors.js @@ -239,7 +239,13 @@ var pipeSpan = $('.node-type-calendar-entry .field--name-field-date').html().replace(pipe, '<span class="pipe">' + pipe + '</span>'); $('.node-type-calendar-entry .field--name-field-date').html(pipeSpan); - } + + //add font awesome icons + $('.field--name-field-date').before('<i class="fa fa-calendar" aria-hidden="true"></i>'); + $('.group-location').before('<i class="fa fa-map-marker" aria-hidden="true"></i>'); + + + } //end if calendar entry node diff --git a/profiles/wcm_base/themes/wcm_omega/sass/base/_buttons.scss b/profiles/wcm_base/themes/wcm_omega/sass/base/_buttons.scss index 27b2e039..959ffcc4 100644 --- a/profiles/wcm_base/themes/wcm_omega/sass/base/_buttons.scss +++ b/profiles/wcm_base/themes/wcm_omega/sass/base/_buttons.scss @@ -16,6 +16,7 @@ margin-right: 1.5em; } +button, input[type=button], html body .button, .form-submit, diff --git a/profiles/wcm_base/themes/wcm_omega/sass/components/_search.scss b/profiles/wcm_base/themes/wcm_omega/sass/components/_search.scss index 39ada7ca..a7124849 100644 --- a/profiles/wcm_base/themes/wcm_omega/sass/components/_search.scss +++ b/profiles/wcm_base/themes/wcm_omega/sass/components/_search.scss @@ -48,9 +48,6 @@ p.search-result__snippet { position: relative; #search-block-form { - * { - height: 100%; - } z-index: 498; position: absolute; right: 0; @@ -66,29 +63,39 @@ p.search-result__snippet { .form-item { display: table-cell; - vertical-align: middle; + height: 100%; + width: 100%; .form-text { border: 0 none; - padding: 0 6px; + display: table-cell; + padding: 0.35em 0.5em 0.2em; font-size: 1em; + border-radius: 0; + line-height: normal !important; } } .form-actions { display: table-cell; + height: 100%; text-align: center; - width: 1.9em; + width: 0; + vertical-align: middle; - .form-submit { + button.form-submit { + font-size: 1em; + line-height: normal !important; border-radius: 0; -webkit-box-sizing: content-box; - padding-right: 1em; - padding-left: 1em; + padding: 0.35em 0.8em 0.2em; box-shadow: none; - padding: 0.6em 1.3em 0.4em; margin: 0; - height: auto; + display: table-cell; + } + + input.form-submit { + display: none; } } } diff --git a/profiles/wcm_base/themes/wcm_omega/sass/components/calendar/_calendar-entry.scss b/profiles/wcm_base/themes/wcm_omega/sass/components/calendar/_calendar-entry.scss index a43fe396..ae266207 100644 --- a/profiles/wcm_base/themes/wcm_omega/sass/components/calendar/_calendar-entry.scss +++ b/profiles/wcm_base/themes/wcm_omega/sass/components/calendar/_calendar-entry.scss @@ -1,13 +1,38 @@ .node-type-calendar-entry { + //font awesome icons + .fa-calendar, + .fa-map-marker { + float: left; + margin-right: 0.75em; + } - .field--name-field-date { + .fa-calendar { @include font-size(2.4); + } + + .field--name-field-date { + @include font-size(2.1); font-weight: 400; - margin: 1em 0 1.3em 0; - + margin: 1.3em 0 1.5em 0; + .pipe { margin: 0 10px; } + } + + .fa-map-marker { + @include font-size(3.4); + margin-right: 0.6em; + } + + .group-location { + @include font-size(2.0); + font-weight: 400; + margin-bottom: 1.5em; + .field--name-field-location-room-number { + float: left; + margin-right: 5px; + } } } \ No newline at end of file diff --git a/profiles/wcm_base/themes/wcm_omega/sass/components/calendar/_calendar-views.scss b/profiles/wcm_base/themes/wcm_omega/sass/components/calendar/_calendar-views.scss index 995163d7..d8b9dcd0 100644 --- a/profiles/wcm_base/themes/wcm_omega/sass/components/calendar/_calendar-views.scss +++ b/profiles/wcm_base/themes/wcm_omega/sass/components/calendar/_calendar-views.scss @@ -1,5 +1,45 @@ +//upcoming view pane +.pane-calendar-upcoming-pane { + table { + + tbody, td, tr { + border: 0; + background: white; + } + + td { + vertical-align: middle; + } + tr { + border-top: 2px solid $lt-gray; + } + tr.views-row-last { + border-bottom: 2px solid $lt-gray; + } + .views-field-field-date-2 { + font-weight: 600; + text-transform: uppercase; + text-align: center; + @include font-size(2); + } + td.views-field-field-date-2 { + border-right: 2px solid $lt-gray; + padding: .6em .5em; + } + + .views-field-title-1 { + a { + @include font-size(2); + } + } + } +} + + + //override view formatter theming as necessary +//for full page calendar and some mini calendar -- still need to style a bit more of mini calendar //date pager and heading .view .date-nav-wrapper .date-prev { -moz-border-radius: 0; diff --git a/profiles/wcm_base/themes/wcm_omega/templates/mail/mimemail-message.tpl.php b/profiles/wcm_base/themes/wcm_omega/templates/mail/mimemail-message.tpl.php new file mode 100644 index 00000000..9d5c8960 --- /dev/null +++ b/profiles/wcm_base/themes/wcm_omega/templates/mail/mimemail-message.tpl.php @@ -0,0 +1,40 @@ +<?php + +/** + * @file + * Default theme implementation to format an HTML mail. + * + * Copy this file in your default theme folder to create a custom themed mail. + * Rename it to mimemail-message--[module]--[key].tpl.php to override it for a + * specific mail. + * + * Available variables: + * - $recipient: The recipient of the message + * - $subject: The message subject + * - $body: The message body + * - $css: Internal style sheets + * - $module: The sending module + * - $key: The message identifier + * + * @see template_preprocess_mimemail_message() + */ +?> +<html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <?php if ($css): ?> + <style type="text/css"> + <!-- + <?php print $css ?> + --> + </style> + <?php endif; ?> + </head> + <body id="mimemail-body" <?php if ($module && $key): print 'class="'. $module .'-'. $key .'"'; endif; ?>> + <div id="center"> + <div id="main"> + <?php print $body ?> + </div> + </div> + </body> +</html> \ No newline at end of file diff --git a/profiles/wcm_base/themes/wcm_omega/templates/system/html.tpl.php b/profiles/wcm_base/themes/wcm_omega/templates/system/html.tpl.php index 12630f53..ea1fa50c 100644 --- a/profiles/wcm_base/themes/wcm_omega/templates/system/html.tpl.php +++ b/profiles/wcm_base/themes/wcm_omega/templates/system/html.tpl.php @@ -11,7 +11,7 @@ <?php endif; ?> <head> <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible"> - <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- disable phone number detection --> <meta name="format-detection" content="telephone=no"> diff --git a/profiles/wcm_base/wcm_base.info b/profiles/wcm_base/wcm_base.info index 652c2823..7bdf6940 100644 --- a/profiles/wcm_base/wcm_base.info +++ b/profiles/wcm_base/wcm_base.info @@ -71,6 +71,7 @@ dependencies[] = uuid_features dependencies[] = views_bulk_operations dependencies[] = views_conditional dependencies[] = webform +dependencies[] = xmlsitemap dependencies[] = zurb_responsive_tables ; Panopoly Foundation diff --git a/profiles/wcm_base/wcm_base.make b/profiles/wcm_base/wcm_base.make index fcc1f948..30fdea29 100644 --- a/profiles/wcm_base/wcm_base.make +++ b/profiles/wcm_base/wcm_base.make @@ -181,6 +181,9 @@ projects[webform][subdir] = contrib projects[zurb_responsive_tables][version] = 1.x-dev projects[zurb_responsive_tables][subdir] = contrib +projects[xmlsitemap][version] = 2.3 +projects[xmlsitemap][subdir] = contrib + ;themes -- GitLab