-
Notifications
You must be signed in to change notification settings - Fork 1
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
base: master
Are you sure you want to change the base?
Conversation
widget.find('.widget-hotness').removeClass('hotness2'); | ||
widget.find('.widget-hotness').removeClass('hotness3'); | ||
widget.find('.widget-hotness').removeClass('hotness4'); | ||
widget.find('.widget-temperature').removeClass('temperature0'); |
There was a problem hiding this comment.
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'); |
There was a problem hiding this comment.
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 @@ | |||
/** |
There was a problem hiding this comment.
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 @@ | |||
/*! |
There was a problem hiding this comment.
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
app/assets/javascripts/kiteboard.js
Outdated
|
||
resizeWidgets: function () { | ||
if (window.innerWidth < $('.grid-stack').width()) { | ||
var grid = $('.grid-stack').data('gridstack'); |
There was a problem hiding this comment.
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
f90fb6e
to
1d8eda3
Compare
1d8eda3
to
9a40a16
Compare
3e15d5b
to
2289831
Compare
5562510
to
7fcc89a
Compare
7fcc89a
to
44ed8bb
Compare
No description provided.