LocalGround/localground — pull request #12 by vanwars (2014-11-18 16:42:31+00:00)
Title: Table Editor: Extended Spreadsheet Functionality

I've enhanced the spreadsheet to support image and audio datatypes.

### What has been done:
* Server-side: L.G.'s DynamicTable support has been extended to support Foreign Key relationships to Audio and Photo tables.
* The DynamicTable now has a (functioning) display_name so that the user can specify the default display field for "Record" types in the UI (configured here: http://localhost:7777/profile/forms//) using the "display on map?" column.
* Spreadsheet header row is anchored...had to hack the colResizeable third-party script to get column resizing to work with header row anchoring.
* Spreadsheet Photo and Audio Columns are populated by inputing the photo / audio id.

### What still needs to be done:
* Code organization (no Marionette yet)
* Upload directly from spreadsheet
* State management
* A better way to browse for existing photos / audio (like a media browser popup), rather than directly inputting the raw photo / audio id.

### Database updates:
To test, you'll need to add some type records to the site_datatype lookup table.
$ vagrant ssh
$ psql -U postgres -d lg_test_database
(enter "password" as password)
```sql
insert into site_datatype(id, name, sql) values(7, 'Photo', 'integer');
insert into site_datatype(id, name, sql) values(8, 'Audio', 'integer');
```