Socket
Socket
Sign inDemoInstall

aluminum-components

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aluminum-components - npm Package Compare versions

Comparing version 0.2.15 to 0.2.16

37

assets/js/drupal/ReadMoreContainer.js

@@ -30,2 +30,23 @@ (function ($) {

function setReadMoreContainerAttributes(readMoreContainer) {
var item = $(readMoreContainer);
var height = item.data('height') || '13em';
var content = getReadMoreContent(item);
var bottom = getReadMoreBottom(item);
var originalHeight = content.height();
content.css({height: height});
var newHeight = content.height();
if (newHeight > originalHeight - 30) {
content.css({height: 'auto'});
item.addClass('is-disabled');
}
else {
item.data('originalHeight', originalHeight + 'px');
bottom.css({display: 'block'});
item.toggleClass('is-closed', true);
}
}
Drupal.behaviors.readMoreContainer = {

@@ -37,17 +58,11 @@ attach: function (context, settings) {

var item = $(this);
var height = item.data('height') || '13em';
var content = getReadMoreContent(item);
var bottom = getReadMoreBottom(item);
var originalHeight = content.height();
content.css({height: height});
var newHeight = content.height();
if (newHeight > originalHeight - 30) {
content.css({height: 'auto'});
item.addClass('is-disabled');
if (originalHeight) {
setReadMoreContainerAttributes(item);
} else {
item.data('originalHeight', originalHeight + 'px');
bottom.css({display: 'block'});
item.toggleClass('is-closed', true);
setTimeout(function () {
setReadMoreContainerAttributes(item);
}, 500);
}

@@ -54,0 +69,0 @@ });

{
"name": "aluminum-components",
"version": "0.2.15",
"version": "0.2.16",
"description": "A set of reusable web components (JS, SCSS mixins and styles, and template examples) for quickly building custom themes and web applications.",

@@ -5,0 +5,0 @@ "license": "MIT",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc