Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@epages/beyond_canvas

Package Overview
Dependencies
Maintainers
3
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@epages/beyond_canvas - npm Package Compare versions

Comparing version 0.1.0-pre to 0.1.1-pre

27

app/assets/javascripts/beyond_canvas/base.js

@@ -14,7 +14,3 @@ /*

(function($) {
$(document).on("click", '[class^="button"]', function() {
disableActionElements();
showSpinner($(this));
});
$(document).on("ready page:load turbolinks:load", function() {
var onDOMReady = function onDOMReady() {
$('button[class^="button"]').each(function() {

@@ -24,3 +20,3 @@ var button = $(this);

button.data("oldWidth", button.width());
button.prepend('\n <div class="spinner">\n <div class="bounce1"></div>\n <div class="bounce2"></div>\n <div class="bounce3"></div>\n </div>');
button.prepend('\n <div class="spinner">\n <div class="bounce1"></div>\n <div class="bounce2"></div>\n <div class="bounce3"></div>\n </div>');
button.closest("form").on("ajax:success", function() {

@@ -34,3 +30,8 @@ hideSpinner(button);

});
};
$(document).on("click", '[class^="button"]', function() {
disableActionElements();
showSpinner($(this));
});
$(document).ready(onDOMReady).on("ready page:load turbolinks:load", onDOMReady);
})(jQuery);

@@ -60,6 +61,3 @@ function showSpinner(button) {

(function($) {
$(document).on("click", ".flash", function() {
closeAlert();
});
$(document).on("ready page:load turbolinks:load", function() {
var onDOMReady = function onDOMReady() {
$(".flash").each(function() {

@@ -71,3 +69,7 @@ $(this).css("right", -$(this).width() + "px");

}, 100);
};
$(document).on("click", ".flash", function() {
closeAlert();
});
$(document).ready(onDOMReady).on("ready page:load turbolinks:load", onDOMReady);
})(jQuery);

@@ -80,3 +82,3 @@ function closeAlert() {

(function($) {
$(document).on("ready page:load turbolinks:load", function() {
var onDOMReady = function onDOMReady() {
$('input[type="file"]').each(function() {

@@ -95,4 +97,5 @@ var $input = $(this), $label = $(".input__file__text." + $input.attr("id")), labelVal = $label.html();

});
});
};
$(document).ready(onDOMReady).on("ready page:load turbolinks:load", onDOMReady);
})(jQuery);
});
{
"name": "@epages/beyond_canvas",
"version": "0.1.0-pre",
"version": "0.1.1-pre",
"description": "Open-source framework that provides CSS and JS for apps designed and developed for the online shop software Beyond",

@@ -37,2 +37,3 @@ "keywords": [

"dependencies": {
"@fortawesome/fontawesome-free": "^5.6.3",
"bourbon": "^7.0.0",

@@ -39,0 +40,0 @@ "jquery": "^3.5.1",

const SPINNER_ANIMATION_TIMEOUT = 125;
(function($) {
$(document).on('click', '[class^="button"]', function() {
disableActionElements();
showSpinner($(this));
});
$(document).on('ready page:load turbolinks:load', function() {
$('button[class^="button"]').each(function() {
const onDOMReady = function () {
$('button[class^="button"]').each(function () {
var button = $(this);

@@ -19,7 +14,8 @@

button.prepend(`
<div class="spinner">
<div class="bounce1"></div>
<div class="bounce2"></div>
<div class="bounce3"></div>
</div>`);
<div class="spinner">
<div class="bounce1"></div>
<div class="bounce2"></div>
<div class="bounce3"></div>
</div>`
);

@@ -29,7 +25,7 @@ // Bind ajax:success and ajax:error to the form the button belongs to

.closest('form')
.on('ajax:success', function() {
.on('ajax:success', function () {
hideSpinner(button);
enableActionElements();
})
.on('ajax:error', function() {
.on('ajax:error', function () {
hideSpinner(button);

@@ -39,3 +35,12 @@ enableActionElements();

});
};
$(document).on('click', '[class^="button"]', function() {
disableActionElements();
showSpinner($(this));
});
$(document)
.ready(onDOMReady)
.on('ready page:load turbolinks:load', onDOMReady);
})(jQuery);

@@ -42,0 +47,0 @@

(function($) {
$(document).on('click', '.flash', function() {
closeAlert();
});
$(document).on('ready page:load turbolinks:load', function() {
$('.flash').each(function() {
const onDOMReady = function () {
$('.flash').each(function () {
$(this).css('right', -$(this).width() + 'px');
});
setTimeout(function() {
setTimeout(function () {
$('.flash').addClass('flash--shown');
}, 100);
};
$(document).on('click', '.flash', function() {
closeAlert();
});
$(document)
.ready(onDOMReady)
.on('ready page:load turbolinks:load', onDOMReady);
})(jQuery);

@@ -16,0 +20,0 @@

(function($) {
$(document).on('ready page:load turbolinks:load', function() {
$('input[type="file"]').each(function() {
const onDOMReady = function () {
$('input[type="file"]').each(function () {
var $input = $(this),
$label = $(`.input__file__text.${$input.attr('id')}`),
labelVal = $label.html();
$label = $(`.input__file__text.${$input.attr('id')}`),
labelVal = $label.html();
$input.on('change', function(e) {
$input.on('change', function (e) {
var fileName = '';
if (this.files && this.files.length > 1)
fileName = (this.getAttribute('data-multiple-caption') || '').replace('{count}', this.files.length);
else if (e.target.value)
fileName = e.target.value.split('\\').pop();
fileName = (this.getAttribute('data-multiple-caption') || '').replace(
'{count}',
this.files.length
);
else if (e.target.value) fileName = e.target.value.split('\\').pop();
if (fileName)
$label.html(`<i class="far fa-file input__file__icon"></i>${fileName}`);
else
$label.html(labelVal);
$label.html(
`<i class="far fa-file input__file__icon"></i>${fileName}`
);
else $label.html(labelVal);
});

@@ -24,6 +27,14 @@

$input
.on('focus', function() { $input.addClass('has-focus'); })
.on('blur', function() { $input.removeClass('has-focus'); });
.on('focus', function () {
$input.addClass('has-focus');
})
.on('blur', function () {
$input.removeClass('has-focus');
});
});
});
};
$(document)
.ready(onDOMReady)
.on('ready page:load turbolinks:load', onDOMReady);
})(jQuery);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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