Month: November 2010

Custom Categories

I’m moving towards a more customizable interface with this application. Users may now enter their own custom categories into their logger database. Again, the logger has different benefits for different audiences. For the individual interpreter, the Logger data could easily become the beginnings of an automated invoicing system. For agencies, the combined time and geographic data from interpreters in the field might help the agency better plan future resources and account for such information vectors as travel time.

Screen to add and edit custom categories for the TerpLogger

Custom Categories shown in Logger's drop down menu

After a bit of research, I found the wonderful function which appends a new option to the original select menu and update the JQueryUI/Mobile widget.

$('select')
    .append('<option value="First-New-Item-Value">First New Item Label</option>')
    .append('<option value="Second-New-Item-Value">Second New Item Label</option>')
    .selectmenu('refresh', true);

So now, code which handles the drop downs looks like this below. For speed of rendering, I only refresh the select menu once after all of the new items have been appended.

// Extend the drop down
var dropDown = {

    target: {
        selector: "UL.ui-listbox-list",
        defaultLimit:{
			'0' : '-1',
			'1' : '4',
		}
    },

   add: function(stringToAdd, parentElementPosition){
	this.clearCustom(this.target['defaultLimit'][parentElementPosition], parentElementPosition);
        var selectItem = $(this.target['selector'])
			.eq(parseInt(parentElementPosition));
        var arrayToAdd = stringToAdd.split('\n');
		for (item in arrayToAdd) {
			if(arrayToAdd[item].length &gt; 0) {
				$('select')
					.eq(parentElementPosition)
					.append('' + arrayToAdd[item] + '');
			}
		}
		$('select').eq(parentElementPosition).selectmenu('refresh', true);

	},

    clearCustom: function(clearAfterThisPosition, parentElementPosition){
        var selectItem = $(this.target['selector']).eq(parseInt(parentElementPosition));
        selectItem.find('LI:gt(' + clearAfterThisPosition + ')').remove();
		$('select').eq(parentElementPosition).find('option:gt(' + clearAfterThisPosition + ')').remove();
    }
}

Notes from the field

So I’m actually trying to use this application in my daily life. I am writing this from outside of my office and the gps was not on. Therefore no position was captured. The remedy was to turn on gps and refresh. I will have to add a field showing the current location and an option to manually refresh.

GeoLocation Aware

Logger passes GPS data to Google Maps

Logger passes GPS data to Google Maps

When displaying the ten most recent entries, if GPS coordinates where captured, they will be displayed as a link. If viewed from a mobile web browser, the link will render maps.google.com. Android devices may intercept the link and prompt the user to use the native Google Maps application. Either way, you have a record of each place you checked in (logged) during the workday.

TerpTools

Main Screen for Terp Tools

Main Screen for Terp Tools.

I’ve decided to break out functionality between the Timer and Logger. New tools will be added under this main screen. Perhaps we’ll brand this as TerpTools.

This has been a very fun project so far, using jQuery Mobile and many of the newer APIs included around the HTML5 spec: SQLlite, geo-location, and session storage to name a few. At present the most useful, is offline access. That is, even if you don’t have internet connectivity at the moment, this application will still work. It merely requires an initial sync with the browser memory, and it will continue to function (record data).

Though real value may be seen by doing something with your data. That is the next step in this project. Stay tuned for more details.

TerpTimer’s Logger

The TerpTimer Logger area now shows the last 10 entries logged for the workday. It includes a time stamp, GPS coordinate, and activity.

The TerpTimer Logger area now shows the last 10 entries logged for the workday. It includes a time stamp, GPS coordinate, and activity. Activities are still up for debate at the moment. At current they include two main categories Transit and Job Site and sub categories Arrived, In transit, and Departing Future development may lead to custom activities that an interpreter or agency could preset.

The idea is to use this data for a number of things. Once the data is exported and GPS coordinates mapped, a freelance interpreter could reconstruct the workday for easier billing and schedule tracking. Agencies might find use for this data in the arrogate and resource deployment.

Future development will include an export feature to one’s desktop. Other thoughts include  showing the last three to five locations pinned to a map on the handheld.

TerpTimer, progress and screen shots

Various interpreters requested additional features such as

  1. The ability to adjust the time interval between shifts
  2. A method to quickly add or subtract time during the count down
  3. and, a log to keep track of your daily activities for easier billing

As you may see below, I’ve attempted to add these features. The following are screen shots taken from the Android emulator. Because this is designed using HTML5 standards (jQueryMobile and SQLite), this application should work across any modern mobile or desktop browser.

TerpTimer counting down

At this stage, the code is still in development but I hope to have a wider release soon. But the for the time being, I’d still like feed back from other interpreters.