From f42fa03f921b721b150e5428c27193215e743124 Mon Sep 17 00:00:00 2001 From: "Carney, Sarah A" Date: Mon, 30 Jan 2017 14:58:57 -0600 Subject: [PATCH 01/19] LUGG-939 Wrap X in span For easier styling. --- template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template.php b/template.php index 2770193..5d85444 100644 --- a/template.php +++ b/template.php @@ -26,7 +26,7 @@ function suitcase_interim_theme($existing, $type, $theme, $path) { } function suitcase_interim_facetapi_deactivate_widget($variables) { - return ' ×'; + return '×'; } /* From e98dfcc9d8501587ee72c66ce9466619d1d3a0f7 Mon Sep 17 00:00:00 2001 From: "Carney, Sarah A" Date: Mon, 30 Jan 2017 14:59:46 -0600 Subject: [PATCH 02/19] LUGG-939 Put active label back inside the link. --- template.php | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/template.php b/template.php index 5d85444..8c07127 100644 --- a/template.php +++ b/template.php @@ -261,3 +261,51 @@ function suitcase_interim_date_display_range($variables) { // Add remaining message and return. return $output . $show_remaining_days; } + +/** + * Implements theme_facetapi_link_active(). + * + * Modified version of theme_facetapi_link_active + * + * ------------------------------------------------------------------------- + * + * Returns HTML for an active facet item. + * + * @param $variables + * An associative array containing the keys 'text', 'path', and 'options'. See + * the l() function for information about these variables. + * + * @see l() + * + * @ingroup themeable + * + * ------------------------------------------------------------------------- + * + * Modifications: + * + * - Includes the tag name in the link text instead of appending after the link + * + */ +function suitcase_interim_facetapi_link_active($variables) { + + // Sanitizes the link text if necessary. + $sanitize = empty($variables['options']['html']); + $link_text = ($sanitize) ? check_plain($variables['text']) : $variables['text']; + + // Theme function variables fro accessible markup. + // @see http://drupal.org/node/1316580 + $accessible_vars = array( + 'text' => $variables['text'], + 'active' => TRUE, + ); + + // Builds link, passes through t() which gives us the ability to change the + // position of the widget on a per-language basis. + $replacements = array( + '!facetapi_deactivate_widget' => theme('facetapi_deactivate_widget', $variables), + '!facetapi_accessible_markup' => theme('facetapi_accessible_markup', $accessible_vars), + ); + $variables['text'] = t('!facetapi_deactivate_widget !facetapi_accessible_markup', $replacements) . $link_text; + $variables['options']['html'] = TRUE; + return theme_link($variables); +} From 806fde020d195e022ff767482803ce930530a348 Mon Sep 17 00:00:00 2001 From: "Carney, Sarah A" Date: Mon, 30 Jan 2017 15:53:57 -0600 Subject: [PATCH 03/19] LUGG-939 Restyled facet taxonomy Lots of new styling to refine how the search taxonomy looks. --- css/suitcase.css | 127 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 116 insertions(+), 11 deletions(-) diff --git a/css/suitcase.css b/css/suitcase.css index 55e08d2..f952dda 100644 --- a/css/suitcase.css +++ b/css/suitcase.css @@ -1287,17 +1287,6 @@ nav.navigation .secondary-menu>li a.active-trail { overflow: hidden; } -.panel-pane .views-field-title a.facetapi-active, -.panel-pane .pane-content .item-list li a.facetapi-active, -.region-sidebar-first .block .content .item-list li a.facetapi-active, -.region-sidebar-second .block .content .item-list li a.facetapi-active { - display: inline; - margin-right: 12px; - padding: 0; - vertical-align: text-bottom; - background: none; -} - .panel-pane .views-field-created > .field-content { color: #555555; } .panel-pane .views-field { margin-bottom: 5px; } @@ -1739,6 +1728,122 @@ footer.submitted > span .placeholder { white-space: nowrap; } +/* -------------------- */ +/* ## FACETS TAGS +/* -------------------- */ + +/* All items */ +.block-facetapi .content .item-list li a, +.block-facetapi .content .item-list li a.facetapi-active { + display: block; + position: relative; + padding: 0.25rem 0.5rem; + padding-left: 2rem; + border-radius: 3px; + margin-right: 0.25rem; + text-decoration: none !important; + font-size: 0.95rem; + color: #333; + transition: all 100ms ease; +} + + /* Hover */ + .block-facetapi .content .item-list li a:hover { + color: #ffffff; + background: #7A99AC; + border-color: #7A99AC; + } + +/* Indicators */ +.block-facetapi .content .item-list ul li a:before { + content: ''; + position: absolute; + top: 0.45rem; left: 0.5rem; + height: 1rem; + width: 1rem; + margin-right: 5px; + padding-top: 2px; + font-size: 0.75rem; + line-height: 1; + text-align: center; + border: 1px solid #ddd; + border-radius: 2px; +} + +.block-facetapi .content .item-list ul li a.facetapi-active:before, +.block-facetapi .content .item-list ul li a:hover:before { + content: '✓'; +} + +.block-facetapi .content .item-list ul li a.facetapi-active:hover:before { + content: '✕'; +} + +/* Just tags */ +.block-facetapi .content .item-list .facetapi-facet-im-field-tags li a:not(.facetapi-active) { + display: inline-block; + padding-left: 0.5rem; + border: 1px solid #ddd; +} + +.block-facetapi .content .item-list .facetapi-facet-im-field-tags li a:not(.facetapi-active):before { + display: none; +} + +.block-facetapi .content .item-list .facetapi-facet-im-field-tags li { + float: left; +} + +/* Active */ +.block-facetapi .content .item-list .facetapi-facet-im-field-tags li a.facetapi-active, +.block-facetapi .content .item-list li a.facetapi-active { + color: #ffffff; + font-weight: 700; + background: #7A99AC; + border-color: #7A99AC; +} + + /* Hover */ + .block-facetapi .content .item-list li a.facetapi-active:hover { + color: #000; + background: #eee; + border-color: #ddd; + } + +.facetapi-x { + display: none; +} + +/* Show More/Less */ + +.block-facetapi .content .item-list .facetapi-facet-im-field-tags:after { + content: ''; + display: block; + clear: both; +} + +a.facetapi-limit-link { + display: inline-block; + padding: 0.25rem 0.5rem; + color: #000; + font-size: 0.9rem; + text-decoration: none; + background: #ddd; + border-radius: 3px; +} + +a.facetapi-limit-link:hover { + background: #ccc; + text-decoration: none; +} + +a.facetapi-limit-link:not(.open):after { + content: ' +'; +} +a.facetapi-limit-link.open:after { + content: ' -'; +} + /* -------------------- */ /* ## FACETS SIDEBAR From a34db033df2ffd11c58f40121e39adb101b27388 Mon Sep 17 00:00:00 2001 From: "Carney, Sarah A" Date: Tue, 31 Jan 2017 09:25:10 -0600 Subject: [PATCH 04/19] LUGG-940 Recolor social links in footer Targeting menus in the footer, which should suffice for now. --- css/suitcase.css | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/css/suitcase.css b/css/suitcase.css index 55e08d2..60e38b7 100644 --- a/css/suitcase.css +++ b/css/suitcase.css @@ -807,6 +807,14 @@ nav.navigation .secondary-menu>li a.active-trail { text-decoration: underline; } +/* ------------------- */ +/* Footer Menus */ + +#section-footer ul.menu a { + color: #333; + text-decoration: none; +} + /* -------------------- */ /* ## CARETS /* -------------------- */ From 2681a1fd49bd54d48f78f8c5f83e5d76ccd78ebe Mon Sep 17 00:00:00 2001 From: "Carney, Sarah A" Date: Tue, 31 Jan 2017 09:49:52 -0600 Subject: [PATCH 05/19] LUGG-942 Clearfix panel panes --- css/suitcase.css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/css/suitcase.css b/css/suitcase.css index 55e08d2..9d07d64 100644 --- a/css/suitcase.css +++ b/css/suitcase.css @@ -1238,6 +1238,8 @@ nav.navigation .secondary-menu>li a.active-trail { /* ## PANELS /* -------------------- */ +.panel-pane { clear: both; } + .panel-pane-nostyle { padding: 0; box-shadow: none; From bf1f4c1d9e20d08b0f4f6fc131f4878caa49869f Mon Sep 17 00:00:00 2001 From: "Carney, Sarah A" Date: Tue, 31 Jan 2017 10:03:00 -0600 Subject: [PATCH 06/19] LUGG-943 All ul/ol in .pane-content A reset was breaking ul/ol in regular content. --- css/suitcase.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/css/suitcase.css b/css/suitcase.css index 55e08d2..5253f6b 100644 --- a/css/suitcase.css +++ b/css/suitcase.css @@ -141,6 +141,9 @@ ul.right { text-align: right; } ul.hlist > li { float: left; } +.pane-content ul, +.pane-content ol { padding-left: 40px; } + /* --------------------- */ /* Description Lists */ @@ -1256,6 +1259,8 @@ nav.navigation .secondary-menu>li a.active-trail { .panel-panel .pane-content p { padding: 0; } +.pane-content .item-list ul { padding-left: 0; } + .panel-panel .pane-content .views-row { padding: 0; } /* Enable overflow on front panel panes From 42746dd7f90a2d7e63c6dfcb2335a8a447adfc3b Mon Sep 17 00:00:00 2001 From: "Carney, Sarah A" Date: Tue, 31 Jan 2017 10:18:17 -0600 Subject: [PATCH 07/19] LUGG-944 Match Events block to News block Removed extra rules that caused Events to look different from News. --- css/suitcase.css | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/css/suitcase.css b/css/suitcase.css index 5253f6b..dd5e511 100644 --- a/css/suitcase.css +++ b/css/suitcase.css @@ -1317,13 +1317,12 @@ nav.navigation .secondary-menu>li a.active-trail { float: left; } -.panel-pane .view-events .views-field-when-tiny-left .date-display-single { - color: #777777; +span.date-display-single { + color: #555555; } -.panel-pane .view-events .views-field-title { - font-size: 14px; - font-weight: 700; +.panel-pane .view-events .views-field-when-tiny-left .date-display-single { + color: #777777; } .panel-panel .pane-content > p { padding: 0 10px; } @@ -1377,15 +1376,8 @@ nav.navigation .secondary-menu>li a.active-trail { word-break: break-word; } - .front .panel-pane > h2.pane-title { display: block; } -.front .panel-pane .pane-content .item-list li { - margin-top: 8px; - padding-bottom: 8px; - border-bottom: 1px solid #eeeeee; -} - .front .item-list { display: block; } .front .view-about-front-page .field-content li { From beb075078c33c3a02d3e51b80b755add0e8d0108 Mon Sep 17 00:00:00 2001 From: Nick Booher Date: Tue, 31 Jan 2017 14:07:20 -0600 Subject: [PATCH 08/19] LUGG-929 Add social menu --- theme-settings.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/theme-settings.php b/theme-settings.php index 2c32d72..685f1b3 100644 --- a/theme-settings.php +++ b/theme-settings.php @@ -238,6 +238,34 @@ function suitcase_interim_config_form_submit($form, &$form_state) { } + // Create social menu + + if (module_exists('menu')) { + + $menu = array( + 'menu_name' => 'menu-social', + 'title' => 'Social Menu', + 'description' => 'Social media links for this site', + ); + + $menu_exists = (bool) db_query_range('SELECT 1 FROM {menu_custom} WHERE menu_name = :menu_name', 0, 1, array(':menu_name' => $menu['menu_name']))->fetchField(); + + if (!$menu_exists) { + + menu_save($menu); + + $item = array( + 'link_title' => 'Facebook', + 'link_path' => 'https://www.facebook.com/', + 'menu_name' => 'menu-social', + ); + + menu_link_save($item); + + } + + } + } From ae71ad2cf900caed40df32f7a4ac6d2976e28f09 Mon Sep 17 00:00:00 2001 From: Nick Booher Date: Tue, 31 Jan 2017 15:49:39 -0600 Subject: [PATCH 09/19] LUGG-929 Place social menu block in footer --- theme-settings.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/theme-settings.php b/theme-settings.php index 685f1b3..632db09 100644 --- a/theme-settings.php +++ b/theme-settings.php @@ -249,8 +249,9 @@ function suitcase_interim_config_form_submit($form, &$form_state) { ); $menu_exists = (bool) db_query_range('SELECT 1 FROM {menu_custom} WHERE menu_name = :menu_name', 0, 1, array(':menu_name' => $menu['menu_name']))->fetchField(); + $link_exists = db_query_range('SELECT 1 FROM {menu_links} WHERE menu_name = :menu_name', 0, 1, array(':menu_name' => $menu['menu_name']))->fetchField(); - if (!$menu_exists) { + if (!$menu_exists && !$link_exists) { menu_save($menu); @@ -262,6 +263,19 @@ function suitcase_interim_config_form_submit($form, &$form_state) { menu_link_save($item); + db_insert('block')->fields(array( + 'module' => 'menu', + 'delta' => 'menu-social', + 'theme' => 'suitcase_interim', + 'status' => 1, + 'weight' => '-28', + 'region' => 'footer_fourth', + 'visibility' => BLOCK_VISIBILITY_NOTLISTED, + 'pages' => '', + 'title' => '', + 'cache' => DRUPAL_NO_CACHE, + ))->execute(); + } } From d1ac9dbbc37d4c23d7a4d1010298d43c99e0b9a5 Mon Sep 17 00:00:00 2001 From: Nick Booher Date: Tue, 31 Jan 2017 15:51:38 -0600 Subject: [PATCH 10/19] LUGG-929 Add font awesome icon for known social media sites --- template.php | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/template.php b/template.php index 2770193..1af2d40 100644 --- a/template.php +++ b/template.php @@ -261,3 +261,60 @@ function suitcase_interim_date_display_range($variables) { // Add remaining message and return. return $output . $show_remaining_days; } + +/* + * Implements theme_menu_link() + * + * Modified version of theme_menu_link + * + * ------------------------------------------------------------------------- + * + * Returns HTML for a menu link and submenu. + * + * @param $variables + * An associative array containing: + * - element: Structured array data for a menu link. + * + * @ingroup themeable + * + * ------------------------------------------------------------------------- + * + * Modifications: + * + * - Prepends a font awesome icon for known social media websites to the link text + * + */ +function suitcase_interim_menu_link__menu_social($variables) { + + $element = $variables['element']; + + $sub_menu = ''; + if ($element['#below']) { + $sub_menu = drupal_render($element['#below']); + } + + $font_awesome_icons = array( + 'facebook' => 'fa-facebook-official', + 'twitter' => 'fa-twitter-square' + ); + + $font_awesome_icon = ''; + + foreach ($font_awesome_icons as $pattern => $icon) { + if (strpos($element['#href'], $pattern) !== FALSE) { + $font_awesome_icon = $icon; + break; + } + } + + if (!empty($font_awesome_icon)) { + $element['#title'] = ' ' . $element['#title']; + $element['#localized_options']['html'] = TRUE; + } + + + $output = l($element['#title'], $element['#href'], $element['#localized_options']); + + return '' . $output . $sub_menu . "\n"; + +} \ No newline at end of file From 1b93d0bb2c82acd4d0d1ac522f1ea349d2cb02e7 Mon Sep 17 00:00:00 2001 From: Angela McMahon Date: Wed, 1 Feb 2017 15:27:24 -0600 Subject: [PATCH 11/19] LUGG-929 Added more social media links --- template.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/template.php b/template.php index d568656..c99fe70 100644 --- a/template.php +++ b/template.php @@ -343,7 +343,12 @@ function suitcase_interim_menu_link__menu_social($variables) { $font_awesome_icons = array( 'facebook' => 'fa-facebook-official', - 'twitter' => 'fa-twitter-square' + 'twitter' => 'fa-twitter-square', + 'youtube' => 'fa-youtube-square', + 'instagram' => 'fa-instagram', + 'pinterest' => 'fa-pinterest-square', + 'github' => 'fa-github-square', + 'rss' => 'fa-rss-square' ); $font_awesome_icon = ''; @@ -365,4 +370,4 @@ function suitcase_interim_menu_link__menu_social($variables) { return '' . $output . $sub_menu . "\n"; -} \ No newline at end of file +} From 51ce3e338f515d7535e9a5ac972f397ec08edcee Mon Sep 17 00:00:00 2001 From: "Carney, Sarah A" Date: Thu, 2 Feb 2017 16:06:07 -0600 Subject: [PATCH 12/19] LUGG-939 Support for nested categories --- css/suitcase.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/css/suitcase.css b/css/suitcase.css index f952dda..28124df 100644 --- a/css/suitcase.css +++ b/css/suitcase.css @@ -1732,6 +1732,11 @@ footer.submitted > span .placeholder { /* ## FACETS TAGS /* -------------------- */ +.block-facetapi .content .item-list ul ul { + margin-top: 0; + margin-left: 1rem; +} + /* All items */ .block-facetapi .content .item-list li a, .block-facetapi .content .item-list li a.facetapi-active { From 7dc4d2c174fe633b76ac674ec90b2795a5ea12e5 Mon Sep 17 00:00:00 2001 From: "Carney, Sarah A" Date: Mon, 6 Feb 2017 13:36:59 -0600 Subject: [PATCH 13/19] LUGG-950 Styles for floated images and images with captions Styled images with captions (figure/figcaption) and add styles for images floated right/left. --- css/suitcase.css | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/css/suitcase.css b/css/suitcase.css index c376da7..8c9dda5 100644 --- a/css/suitcase.css +++ b/css/suitcase.css @@ -302,8 +302,6 @@ input[type="submit"] { /* ## FIGURES and IMAGES /* -------------------- */ -figure figcaption { color: #818a91; } - figure .insert-default-image-styling + figcaption { margin: 0 10px; } @@ -317,6 +315,42 @@ a img:focus { border: 2px #F1BE48; } +/* CK Editor Enhanced Images */ + +figure.image { + display: table; +} + +figure.image img { + max-width: 100%; + display: block; + margin: 0; +} + +figure.image figcaption { + display: table-caption; + caption-side: bottom; + padding: 0.5rem; + color: #333; + font-size: 0.85rem; + font-weight: 500; + border: 1px solid #ddd; + border-top: 0; + background-color: #eee; +} + +figure.image br { + display: none; +} + +.floated-left { + margin: 0.25rem 1rem 0.25rem 0; +} + +.floated-right { + margin: 0.25rem 0 0.25rem 1rem; +} + /* -------------------- */ /* ## UTILITY /* -------------------- */ From 39590d81b5cb9b90a971c8db90aa6f764fb79c28 Mon Sep 17 00:00:00 2001 From: "Carney, Sarah A" Date: Mon, 6 Feb 2017 13:56:19 -0600 Subject: [PATCH 14/19] LUGG-950 jQuery for adding classes to floated images and figures --- js/suitcase_image_floats.js | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 js/suitcase_image_floats.js diff --git a/js/suitcase_image_floats.js b/js/suitcase_image_floats.js new file mode 100644 index 0000000..4677d5f --- /dev/null +++ b/js/suitcase_image_floats.js @@ -0,0 +1,32 @@ +/** + * Function for adding the appropriate margins to floated images + * And floated images with captions. + */ + +(function($) { + + $('figure.image') + .filter(function() { + return $(this).css('float') == 'left'; + }) + .addClass('floated-left'); + + $('figure.image') + .filter(function() { + return $(this).css('float') =='right'; + }) + .addClass('floated-right'); + + $('.content img') + .filter(function() { + return $(this).css('float') == 'left'; + }) + .addClass('floated-left'); + + $('.content img') + .filter(function() { + return $(this).css('float') == 'right'; + }) + .addClass('floated-right'); + +})(jQuery); \ No newline at end of file From 93aa540d6547bda3a2c442dd2cc068c60fcc45f8 Mon Sep 17 00:00:00 2001 From: "Carney, Sarah A" Date: Mon, 6 Feb 2017 13:59:54 -0600 Subject: [PATCH 15/19] LUGG-950 Added jQuery for image floats --- suitcase_interim.info | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/suitcase_interim.info b/suitcase_interim.info index 133d650..07ce403 100644 --- a/suitcase_interim.info +++ b/suitcase_interim.info @@ -406,4 +406,5 @@ libraries[suitcase_jquery_smart_menu][css][1][options][weight] = '30' libraries[suitcase_smart_menu_init][name] = 'Suitcase SmartMenu Init' libraries[suitcase_smart_menu_init][description] = 'Initializes jQuery SmartMenus for Suitcase' libraries[suitcase_smart_menu_init][js][0][file] = 'suitcase_smart_menu.js' -libraries[suitcase_smart_menu_init][js][0][options][weight] = '-10' \ No newline at end of file +libraries[suitcase_smart_menu_init][js][0][options][weight] = '-10' +libraries[suitcase_image_floats_init][js][0][file] = 'suitcase_image_floats.js' \ No newline at end of file From f1213fcc25614ca22ef56d2568284f96baf061b6 Mon Sep 17 00:00:00 2001 From: "Carney, Sarah A" Date: Mon, 6 Feb 2017 14:24:25 -0600 Subject: [PATCH 16/19] LUGG-950 Small image margin in case there is no js --- css/suitcase.css | 1 + 1 file changed, 1 insertion(+) diff --git a/css/suitcase.css b/css/suitcase.css index 8c9dda5..f6392a7 100644 --- a/css/suitcase.css +++ b/css/suitcase.css @@ -309,6 +309,7 @@ figure .insert-default-image-styling + figcaption { .region-content img { height: auto !important; max-width: 100%; + margin: 0.5rem; } a img:focus { From 6f070ed6130fdcbc31ec8984b166f9360e32bc97 Mon Sep 17 00:00:00 2001 From: Angela McMahon Date: Mon, 6 Feb 2017 14:40:39 -0600 Subject: [PATCH 17/19] LUGG-950 Changed suitcase_interim.info file --- suitcase_interim.info | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/suitcase_interim.info b/suitcase_interim.info index 07ce403..967584a 100644 --- a/suitcase_interim.info +++ b/suitcase_interim.info @@ -88,6 +88,7 @@ settings[alpha_libraries][suitcase_sticky_menu] = 'suitcase_sticky_menu' settings[alpha_libraries][suitcase_gridheight] = 'suitcase_gridheight' settings[alpha_libraries][suitcase_jquery_smart_menu] = 'suitcase_jquery_smart_menu' settings[alpha_libraries][suitcase_smart_menu_init] = 'suitcase_smart_menu_init' +settings[alpha_libraries][suitcase_image_floats] = 'suitcase_image_floats' settings[alpha_css][alpha-reset.css] = 'alpha-reset.css' settings[alpha_css][alpha-mobile.css] = 'alpha-mobile.css' settings[alpha_css][alpha-alpha.css] = 'alpha-alpha.css' @@ -407,4 +408,7 @@ libraries[suitcase_smart_menu_init][name] = 'Suitcase SmartMenu Init' libraries[suitcase_smart_menu_init][description] = 'Initializes jQuery SmartMenus for Suitcase' libraries[suitcase_smart_menu_init][js][0][file] = 'suitcase_smart_menu.js' libraries[suitcase_smart_menu_init][js][0][options][weight] = '-10' -libraries[suitcase_image_floats_init][js][0][file] = 'suitcase_image_floats.js' \ No newline at end of file +libraries[suitcase_image_floats][name] = 'Suitcase Image Floats' +libraries[suitcase_image_floats][description] = 'Provides a javascript library that adds a class to floated images' +libraries[suitcase_image_floats][js][0][file] = 'suitcase_image_floats.js' +libraries[suitcase_image_floats][js][0][options][weight] = '30' From b49d4299af8439622ba3c736335da179c755a060 Mon Sep 17 00:00:00 2001 From: "Carney, Sarah A" Date: Mon, 6 Feb 2017 14:58:22 -0600 Subject: [PATCH 18/19] LUGG-950 --- css/suitcase.css | 12 ++++++------ js/suitcase_image_floats.js | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/css/suitcase.css b/css/suitcase.css index f6392a7..daf29f7 100644 --- a/css/suitcase.css +++ b/css/suitcase.css @@ -320,6 +320,7 @@ a img:focus { figure.image { display: table; + margin: 0; } figure.image img { @@ -344,13 +345,12 @@ figure.image br { display: none; } -.floated-left { - margin: 0.25rem 1rem 0.25rem 0; -} +figure.image.floated-left { margin: 0.25rem 1rem 0.25rem 0; } -.floated-right { - margin: 0.25rem 0 0.25rem 1rem; -} +figure.image.floated-right { margin: 0.25rem 0 0.25rem 1rem; } + +figure.image.floated-left img, +figure.image.floated-right img { margin: 0; } /* -------------------- */ /* ## UTILITY diff --git a/js/suitcase_image_floats.js b/js/suitcase_image_floats.js index 4677d5f..621c5c1 100644 --- a/js/suitcase_image_floats.js +++ b/js/suitcase_image_floats.js @@ -3,7 +3,7 @@ * And floated images with captions. */ -(function($) { +jQuery(document).ready(function($) { $('figure.image') .filter(function() { @@ -26,7 +26,7 @@ $('.content img') .filter(function() { return $(this).css('float') == 'right'; - }) - .addClass('floated-right'); + }) + .addClass('floated-right'); })(jQuery); \ No newline at end of file From 2cd6c68f4a2e1eac112281d15d1e29236681f508 Mon Sep 17 00:00:00 2001 From: Angela McMahon Date: Mon, 6 Feb 2017 16:33:37 -0600 Subject: [PATCH 19/19] LUGG-950 jQuery wrapper/code standards fix --- js/suitcase_image_floats.js | 48 ++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/js/suitcase_image_floats.js b/js/suitcase_image_floats.js index 621c5c1..1c391ca 100644 --- a/js/suitcase_image_floats.js +++ b/js/suitcase_image_floats.js @@ -3,30 +3,30 @@ * And floated images with captions. */ -jQuery(document).ready(function($) { +(function($) { + $(document).ready( function() { + $('figure.image') + .filter(function() { + return $(this).css('float') == 'left'; + }) + .addClass('floated-left'); - $('figure.image') - .filter(function() { - return $(this).css('float') == 'left'; - }) - .addClass('floated-left'); + $('figure.image') + .filter(function() { + return $(this).css('float') =='right'; + }) + .addClass('floated-right'); - $('figure.image') - .filter(function() { - return $(this).css('float') =='right'; - }) - .addClass('floated-right'); + $('.content img') + .filter(function() { + return $(this).css('float') == 'left'; + }) + .addClass('floated-left'); - $('.content img') - .filter(function() { - return $(this).css('float') == 'left'; - }) - .addClass('floated-left'); - - $('.content img') - .filter(function() { - return $(this).css('float') == 'right'; - }) - .addClass('floated-right'); - -})(jQuery); \ No newline at end of file + $('.content img') + .filter(function() { + return $(this).css('float') == 'right'; + }) + .addClass('floated-right'); + }); +})(jQuery);