On late duty.
Three down, four to go.
I now have an object populated by categories and locations, and a page controller which shows the categories. Lots of work going into figuring out how to do what when; sequence is important when we're constructing lots of objects from asynchronous AJAX calls. Discovering differences between FF and Chrome which necessitate changes to the sequences. One emerging temptation is to pre-generate all the AJAX for the entire set of stuff and store it in eXist, then load it as a single object; that would be fastish, but possibly not responsive enough, in that you couldn't selectively load things that people have asked for. Next step is listing all the locations under their categories, then it's on to creating features on the map.
Miraculously seem to have figured out how to get the age_group to be used as a sorting field in the chart display, and to get the text value rather than the id value for the age ranges to show up in the Legend. Have it working in the dev instance. Will test further and then add it to the production instance tomorrow.
classes/Search/Single.php
1) modify
array('c.criminal_id', 'c.surname', 'c.given_name', 'c.age')
to
array('c.criminal_id', 'c.surname', 'c.given_name', 'c.age', 'c.age_group_id_fk')
classes/Search.php
1) modify
public $allowedGroups = array(
'age' => 'age',
'crime' => 'crime_group_text',
'gender' => 'gender_text',
'outcome' => 'outcome_group_text',
'respite' => 'respite_normalized_text'
);
to
public $allowedGroups = array(
'crime' => 'crime_group_text',
'gender' => 'gender_text',
'outcome' => 'outcome_group_text',
'respite' => 'respite_normalized_text',
'age_group' => 'age_group_text'
);
the first argument seems to have to be 'age_group', but I don't know why
the second argument has to match a field name in the selection generated by this object (e.g. if 'age_group_text' is replaced with 'age_group_id' then I get the ids rather than the text values)
2) added to function _prepareCriminals()
$this->_select->joinLeft(
array('ag' => 'age_groups'),
'ag.age_group_id = c.age_group_id_fk',
array('ag.age_group_text')
);
this adds the age_group_text to the generated results, allowing it to be referred to in the line of code that specifies the allowed_groups.
In dev instance:
Modified
- import/classes/Importer.php (importOutcomes function)
- includes/classes/Search/Single.php (to include corpse_treatment fields)
- includes/ajax/record.php (to display corpse_treatment fields)
Added two fields to the outcomes table to accommodate corpse_treatment info
Truncated all the tables that are populated from the data (crimes, criminals, trial_files, trials, outcomes, respites, mercy_appeals) and reset auto-incrementer on each to 1
Uploaded small test data file.
Once that was working, made same changes to production instance, except I uploaded all the data files into the production site rather than just one little test file.
Signed and in the mail for Nov 16-30.
On late duty.
Ported the OL3 example into the dev tree in the MoEML app, and got it working (but using tiles from nfs at the moment, to keep pressure off the web app); finished all the basic JSON/AJAX stuff on the eXist side, and started building the object which is going to handle all the data on the client.
Article #90 copyedited and accepted; agenda for Wednesday editor's meeting done; some back-and-forth with RVDB about embedded OLE objects in Word files; housekeeping on the copyediting workflow.