| Age | Commit message (Collapse) | Author |
|
|
|
|
|
The select boxes wouldn't always get populated asynchronously in time
for timetasker to make its selections. Increase the timeout to give it a
little more headroom.
|
|
Include information about recent changes.
|
|
|
|
The checkbox wasn't getting filled in correctly. By some overzealous and
uncaught copy-pasting, I had wrapped the field in the function to
populate a select box. Since this is a checkbox, we want to use its
`.checked` property instead.
Use a timeout also. By default Time Task marks Billable as true/checked.
If the script unchecks the box and then the AJAX select box population
occurs, the check box re-checks itself. Adding a timeout allows it to
remain unchecked if you've set that in the user options.
|
|
Make it a little clearer what's going on in the date picker event
handler.
|
|
|
|
Include some background information about the extension, installation
instructions, and release information.
|
|
|
|
Query the Chrome storage API to get user options for time entry
fields. Replace our hard-coded values with user-entered ones.
This allows the extension to work for others without requiring
modification of the source code.
In order to be able to pull the options, I had to move the main
extension code into a callback function that can be passed to
`chrome.storage.sync.get`.
|
|
Allow a little more breathing room for input content. One option was too
large for the input, which is why I'm increasing the width.
|
|
I had copied this line directly from the Chrome Extension Options page
documentation, but it looks like it has a typo. Fix the syntax error.
|
|
Give ourselves the "storage" permission to enable us to save and
restore user options.
|
|
|
|
Code to save and restore options.
Modified from the options code example shown here:
https://developer.chrome.com/extensions/optionsV2
Having trouble here as I'm getting an error on `chrome.storage` is
undefined. Not sure what's going on with that. Committing what I have
and will have to keep investigating the problem.
|
|
Copy the padding style from the example on the Chrome developer page
(https://developer.chrome.com/extensions/optionsV2) to eliminate the
scrollbar in the dialog.
|
|
Create an HTML page to store configurable options. These will be used
as the defaults when auto-filling fields in time entries.
|
|
That's what I get for doing this while sick.
|
|
Surround the date event and time entry duplication in a timeout. We
need to wait for the select boxes to be filled in before we can
duplicate the time entries, so wait a conservative amount of time to
ensure the first entry is filled in before duplicating it.
The date event listener is also part of this timeout as it fires an
event on load without user interaction. We don't care about that
initial event.
Our date listener will listen for changes to the first time entry's
date field and automatically fill in the four duplicated entries with
subsequent dates increasing by 1 for each entry. This allows us to
select a Monday for the first time entry and have the rest of the week
automatically filled in for us.
|
|
Create four copies of the first entry to fill out a five day week.
|
|
Doing so properly fills in these boxes, leaving them time to populate
their options asynchronously.
|
|
Remove our timeouts for the moment to focus on getting the Module
select box populated.
Fire a change event on the Project select box using the technique
and code described here:
http://stackoverflow.com/questions/2856513/how-can-i-trigger-an-onchange-event-manually/2856602#2856602
|
|
|
|
Rough approach at filling in the first row in the form. Trouble is
that the "module" select box doesn't get populated until the
"project" select box receives click/selection event.
Will need to figure out a way around that.
|
|
|