These are chat archives for rmariuzzo/checkboxes.js

12th
Dec 2014
Rubens Mariuzzo
@rmariuzzo
Dec 12 2014 01:04
Así es.
I'm currently looking into rmariuzzo/checkboxes.js#7
I'm thinking on a workaround for the range selection in Firefox.
Any idea?
Irving A.J. Rivas Z.
@iajrz
Dec 12 2014 03:36
the issue also happens in chrome and ie
Rubens Mariuzzo
@rmariuzzo
Dec 12 2014 03:37
We should provide a workaround, but we have to determine how to tackle this particular issue.
There are several ways, we should choose wisely.
Irving A.J. Rivas Z.
@iajrz
Dec 12 2014 03:44
i only replicated the bug; haven't read the code.
Rubens Mariuzzo
@rmariuzzo
Dec 12 2014 03:45
The code take in account the checkboxes, it has nothing to do with labels.
I think we should change the way we handle events for this particular feature, so it can crossbrowser, and try to avoid a:
if (ie || firefox) { ... } else { ... }
Irving A.J. Rivas Z.
@iajrz
Dec 12 2014 03:47
aye; in any case I've replicated the issue in chrome, too... it's in the #7
maybe the event should be attached to the label and take those into account?
Rubens Mariuzzo
@rmariuzzo
Dec 12 2014 03:50
Maybe, but we should take in consideration the fact that not everybody will use labels. And those who do it, may use in different forms such as:
<label> Apple
  <input type="checkbox">
</label>
Others:
<label for="apple">Apple</label>
<input type="checkbox" id="apple">
Irving A.J. Rivas Z.
@iajrz
Dec 12 2014 03:51
idiosyncratic works fast. assume one way and solve for it.
Rubens Mariuzzo
@rmariuzzo
Dec 12 2014 03:51
The worst case would be:
<label>Foo</label>
<input type="checkbox">
Irving A.J. Rivas Z.
@iajrz
Dec 12 2014 03:51
I'd assume the first one, and supporting the second one is trivial also.
the third one... well, if it's documented it ain't a bug, but a feature. "Not supported", and done.
Rubens Mariuzzo
@rmariuzzo
Dec 12 2014 03:53
I agree with you on the third scenario. But at least, the third scenario should support the feature in the checkboxes itself, no the labels because they are unrelated.
Irving A.J. Rivas Z.
@iajrz
Dec 12 2014 03:57
aye. So it's a matter of having the element be ...
var element = null;
if(parent is label) {
element = parent
} elseif (sibling label has attribute for = this input's name){
element = sibling
} else {
element = checkbox
}
element.click = bla bla
Rubens Mariuzzo
@rmariuzzo
Dec 12 2014 03:58
Yup! That sounds good.
While discussing with someone else, the issues looks simpler than I though.
Irving A.J. Rivas Z.
@iajrz
Dec 12 2014 04:00
I still can't see where in the code the click event listener is attached, so I can only help up to here.
Irving A.J. Rivas Z.
@iajrz
Dec 12 2014 04:01
need to get around to learning jquery, maybe.
Rubens Mariuzzo
@rmariuzzo
Dec 12 2014 04:02
:smile:
It's not too complicated, after you get familiar with the basics of jQuery, if you want, I can let you try to take down this issue.
Irving A.J. Rivas Z.
@iajrz
Dec 12 2014 04:03
I am assuming that $context is provided by jQuery. Is that correct?
Rubens Mariuzzo
@rmariuzzo
Dec 12 2014 04:03
Nope, the $context is a property set when constructing a Checkboxes object.
Irving A.J. Rivas Z.
@iajrz
Dec 12 2014 04:04
So I need to learn basic javascript, not jQuery :P
Irving A.J. Rivas Z.
@iajrz
Dec 12 2014 04:04
I saw the constructor; noticed the options aren't being used.
Rubens Mariuzzo
@rmariuzzo
Dec 12 2014 04:05
I though you were familiar with JS that's why I didn't mention it :smirk:
Irving A.J. Rivas Z.
@iajrz
Dec 12 2014 04:05
I am. Not dealt with it deeply, though. Much of what's happening there is black magic to me.
Rubens Mariuzzo
@rmariuzzo
Dec 12 2014 04:05
I'm stupid!
Irving A.J. Rivas Z.
@iajrz
Dec 12 2014 04:06
what's up?
Rubens Mariuzzo
@rmariuzzo
Dec 12 2014 04:06
Kids, that's what happen when you don't use a lint tool. :smile:
Unused variables, everywhere!
Irving A.J. Rivas Z.
@iajrz
Dec 12 2014 04:06
lol :) first thing I noticed was that.
Rubens Mariuzzo
@rmariuzzo
Dec 12 2014 04:07
@iajrz I'm glad to be discussing with you about that issue the source code.
Irving A.J. Rivas Z.
@iajrz
Dec 12 2014 04:07
fresh eyes :P
Rubens Mariuzzo
@rmariuzzo
Dec 12 2014 04:07
;)
I will file a new issue to add more code comments.
So anyone that want to join and contribute can easily get familiar with the project.
Also, I have to add a lint tool with Grunt (if not yet added)
Irving A.J. Rivas Z.
@iajrz
Dec 12 2014 04:09
it's tiny. anyone can see what's up fairly easily if they know their way around javascript. Hell, I could wrap my head around most of it.
more comments won't likely do anyone any good.
Rubens Mariuzzo
@rmariuzzo
Dec 12 2014 04:10
Thanks for feedback.
Well, I'm going off! :sleepy:
Talk to you later @iajrz !
Irving A.J. Rivas Z.
@iajrz
Dec 12 2014 04:11
alright, ttyl
Rubens Mariuzzo
@rmariuzzo
Dec 12 2014 04:11
Thanks for all your help!
Irving A.J. Rivas Z.
@iajrz
Dec 12 2014 04:11
I didn't do shit :P
Rubens Mariuzzo
@rmariuzzo
Dec 12 2014 04:11
I really appreciate it.
Irving A.J. Rivas Z.
@iajrz
Dec 12 2014 04:11
but that's OK, I guess. no prob
Rubens Mariuzzo
@rmariuzzo
Dec 12 2014 04:12
You didn't code, but we discussed about an issue and we talked about the project. For a lone wolf like me, that's really important. So thanks for that.
Ciao!
Victor Justo V.
@vjustov
Dec 12 2014 04:14
Entonce', todo el mundo aquí es dominicano y se habla en ingles? :worried:
Irving A.J. Rivas Z.
@iajrz
Dec 12 2014 04:14
esto es un chat publico
lo puede ver todo el que use el repo
como todo lo que se hace para exportacion, este chat tambien dice "Made In Dominican Republic" en vez de "Hecho En Republica Dominicana" ;)
Rubens Mariuzzo
@rmariuzzo
Dec 12 2014 04:15
Exactamente, por eso entiendo que es mejor hablar en inglés.
:P
Victor Justo V.
@vjustov
Dec 12 2014 04:15
Yo se era Gadejo. xD
Rubens Mariuzzo
@rmariuzzo
Dec 12 2014 04:15
Hahaha!
Victor Justo V.
@vjustov
Dec 12 2014 04:15
Hello Mr. Rubens
Rubens Mariuzzo
@rmariuzzo
Dec 12 2014 04:15
Además, uno privando y echando cosa.
Victor Justo V.
@vjustov
Dec 12 2014 04:15
xD
Rubens Mariuzzo
@rmariuzzo
Dec 12 2014 04:15
Well, gotta go! :sleeping:
ttyl
Victor Justo V.
@vjustov
Dec 12 2014 04:15
sleep tight.
Rubens Mariuzzo
@rmariuzzo
Dec 12 2014 12:18
Morning!
Rubens Mariuzzo
@rmariuzzo
Dec 12 2014 15:01
I'm currently working in develop branch. Will merge some minor changes briefly.
Rubens Mariuzzo
@rmariuzzo
Dec 12 2014 15:18
Brace yourself, changes are coming, along new version 1.0.6
rmariuzzo/checkboxes.js#12
Rubens Mariuzzo
@rmariuzzo
Dec 12 2014 15:24
Rubens Mariuzzo
@rmariuzzo
Dec 12 2014 15:50
I'm going off for a while. ttyl.
Rubens Mariuzzo
@rmariuzzo
Dec 12 2014 16:43
Back!
Enmanuel Toribio
@eatskolnikov
Dec 12 2014 17:11
derp