28 lines
877 B
JavaScript
28 lines
877 B
JavaScript
/**
|
|
* Page-specific Javascript file. Should generally be included as a separate asset bundle in your page template.
|
|
* example: {{ assets.js('js/pages/sign-in-or-register') | raw }}
|
|
*
|
|
* This script depends on widgets/organisations.js, uf-table.js, moment.js, handlebars-helpers.js
|
|
*
|
|
* Target page: /organisations
|
|
*/
|
|
|
|
$(document).ready(function() {
|
|
|
|
$("#widget-organisations").ufTable({
|
|
dataUrl: site.uri.public + "/api/organisations",
|
|
useLoadingTransition: site.uf_table.use_loading_transition
|
|
});
|
|
|
|
// Bind creation button
|
|
bindOrganisationCreationButton($("#widget-organisations"));
|
|
|
|
// Bind registration button
|
|
bindOrganisationRegistrationButton($("#widget-organisations"));
|
|
|
|
// Bind table buttons
|
|
$("#widget-organisations").on("pagerComplete.ufTable", function () {
|
|
bindOrganisationButtons($(this));
|
|
});
|
|
});
|