Skip to content

Instantly share code, notes, and snippets.

@dcolthorp
Created June 17, 2011 13:07
Show Gist options
  • Save dcolthorp/1031378 to your computer and use it in GitHub Desktop.
Save dcolthorp/1031378 to your computer and use it in GitHub Desktop.
var $body = $(document.body);
var loadDataSets = function () { $body.trigger("allDataSetsArrived"); };
if (EmployerGroupReporting.PredefinedDataSets) {
loadDataSets = _(EmployerGroupReporting.PredefinedDataSets).
reduceRight(function (rest, dataSet) {
return function () {
EmployerGroupReporting.DataSets[dataSet.Id] = dataSet;
$body.trigger("dataSetArrived", [dataSet]);
_.defer(rest);
};
},
loadDataSets);
}
loadDataSets();
$(document.body).delegate("#drewbox .dismiss", "click", $.drewbox.close);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment