Everyone -

I'm grateful to the builders and supporters of Simile Exhibit. I've
just released a website using Exhibit 2.2 to make an overview of
Whitehouse.gov petitions much more interactive.

I'm a first-time Exhibiter, and it mostly went quite smoothly. The big
learnings along the way:

1. how to set fields to particular value types, so that ex:formats can
kick in (inferred from 
http://simile-widgets.org/wiki/Exhibit/Template_JSON_Data_File)

2. a hack to tweak display of date fields when they're used for
grouping (see javascript below), building off ex:onshow

3. Using the "Facet Selections" capability to "bookmark" particularly
facet settings.

Big fun, thanks.

Chris Berendes
@citizentools

PS. the site: http://wethepeople.govopener.net

PPS. the javascript hack to reformat date headings for grouping:

function massage_ymd(yyyy_mm_dd)
{
        if (-1 === yyyy_mm_dd.search(/\d\d\d\d-\d\d-\d\d/)) {return
yyyy_mm_dd;}
        var components = yyyy_mm_dd.substring(0,10).split('-');
        var year = components.shift();
        if ('2012'!== year) {components = components.concat([year]);}
        return components.join('/');

}

function reformat_group_dates()
{
        $(".exhibit-collectionView-group").children ("h1, h2, h3, h4,
h5").each
        (
                function(i,e)
                {
                        e.innerHTML = massage_ymd(e.innerHTML);
                }
        );
}
/*requires Jquery, but that's included with Simile Exhibit anyway */

-- 
You received this message because you are subscribed to the Google Groups 
"SIMILE Widgets" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/simile-widgets?hl=en.

Reply via email to