-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevelopment_log.txt
44 lines (33 loc) · 3.19 KB
/
development_log.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Checkbox Toggler
================
.. from morning pages for 2012-11-03:
#. Create the development log file. [Done 2012-11-03 10:26]
#. Create the git repository (which means I need a name for the project, but hopefully that’s not going to be too hard to come up with). “jscheckmate” [Done 2012-11-03 10:30]
#. Write a bookmarklet “hello world”, because I’ve more or less forgotten how to do that. [Done 2012-11-03 10:32]
#. Write the (hopefully trivial) “build scripts” for it, probably something that just puts the contents of the bookmarklet into the clipboard so that I can paste it into the browser’s location bar; I can’t think of a better way to allow easy iteration and testing. (This part is where I found out about Chrome eating the “javascript:” portion of something pasted in, which is kind of annoying; see <http://code.google.com/p/chromium/issues/detail?id=85232>) [Done 2012-11-03 10:42]
#. Load jQuery from Google's CDN (<http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js>)
+ That means using the old “add a script tag to the head element” trick, I think.
[Done 2012-11-03 10:50]
#. Create remote repo. [Done 2012-11-06 16:06]
#. Figure out how to bind and unbind events; I want to bind a function to the mouse down event, and then have that function bind another function to mouse up, and that last function needs to unbind itself and the mouse down one.
+ Alert on mousedown. [Done 2012-11-06 16:10]
+ Alert on mouseup. [Done 2012-11-08 16:53]
Possibly use some of the answers here: <http://stackoverflow.com/questions/11552174/jquery-binding-click-event-best-practices>.
The functions also unbind themselves from the events when they are called.
#. Make a function that gets the coordinates at mouse down and the coordinates at mouse up. These should be page, not screen, coordinates. This might be useful: <http://stackoverflow.com/questions/1280660/given-an-x-y-coordinate-i-need-to-find-all-html-elements-underneath-it>. [Done 2012-11-08 16:54]
#. Make a function that gets all the checkboxes on the page. [Done 2012-11-08 17:47]
#. Make a function that goes through all the checkboxes on the page and gets their coordinates. [Done 2012-11-08 17:47]
#. Make a function that checks all the checkboxes to see which of them are within the rectangle defined by the coordinate pair returned by the mouse down and mouse up functions. [Done 2012-11-08 17:47]
#. Make a function that changes the states of all of the checkboxes from the previous function. [Done 2012-11-08 17:47]
#. Do the cleanup/unbinding. [Done 2012-11-08 17:47]
#. Make a function that makes the rectangle visible while it’s being drawn—harder than it sounds, because while that’s just making a translucent element and putting it on the page, it requires listening for all mouse movement, and that might be more of a pain than it seems. [Done 2012-12-02 22:00]
#. Move repo to github. [Done 2012-12-02 22:40]
.. container:: date
10:26 Saturday 03/11/2012
.. container:: metadata
:Wordcount: []
:Location: [Barista, 1725 NE Alberta Street, Portland, Oregon 97211]
:Tags: []
:Writingtime: [ mins]
:Originalformat: [reStructuredText]
:Version: [1]