Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Gridster with Gridstack and clean up styling #1

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Mbuckley0
Copy link
Owner

No description provided.

widget.find('.widget-hotness').removeClass('hotness2');
widget.find('.widget-hotness').removeClass('hotness3');
widget.find('.widget-hotness').removeClass('hotness4');
widget.find('.widget-temperature').removeClass('temperature0');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removeClass can take many arguments, so this could be

widget.find('.widget-temperature').removeClass("temperature0", "temperature1", ...);

var min = widget.find('.widget-hotness')[0].getAttribute('data-min');
var max = widget.find('.widget-hotness')[0].getAttribute('data-max');
var min = widget.find('.widget-temperature')[0].getAttribute('data-min');
var max = widget.find('.widget-temperature')[0].getAttribute('data-max');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably best to store widget.find('.widget-temperature') into a variable, as you use it many times (and dom lookups are quite expensive).

@@ -0,0 +1,1738 @@
/**

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this library (and the other 3rd party stuff) avaliable as gems/npm that you can reference, rather than include?

This will make staying up to date much easier.

@@ -0,0 +1,304 @@
/*!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, pretty sure this is available as a gem


resizeWidgets: function () {
if (window.innerWidth < $('.grid-stack').width()) {
var grid = $('.grid-stack').data('gridstack');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

multiple $('.grid-stack')s ... and other duplicates

@Mbuckley0 Mbuckley0 force-pushed the change-from-gridster-to-gridstack branch from f90fb6e to 1d8eda3 Compare October 21, 2016 05:17
@Mbuckley0 Mbuckley0 force-pushed the change-from-gridster-to-gridstack branch from 1d8eda3 to 9a40a16 Compare October 21, 2016 09:49
@Mbuckley0 Mbuckley0 force-pushed the change-from-gridster-to-gridstack branch from 3e15d5b to 2289831 Compare January 3, 2017 07:02
@Mbuckley0 Mbuckley0 force-pushed the change-from-gridster-to-gridstack branch 2 times, most recently from 5562510 to 7fcc89a Compare April 11, 2017 10:09
@Mbuckley0 Mbuckley0 force-pushed the change-from-gridster-to-gridstack branch from 7fcc89a to 44ed8bb Compare April 11, 2017 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants