aboutsummaryrefslogtreecommitdiffhomepage
path: root/main/app/sprinkles/admin/assets/userfrosting/js/pages/roles.js
diff options
context:
space:
mode:
Diffstat (limited to 'main/app/sprinkles/admin/assets/userfrosting/js/pages/roles.js')
-rwxr-xr-xmain/app/sprinkles/admin/assets/userfrosting/js/pages/roles.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/main/app/sprinkles/admin/assets/userfrosting/js/pages/roles.js b/main/app/sprinkles/admin/assets/userfrosting/js/pages/roles.js
new file mode 100755
index 0000000..b1febb2
--- /dev/null
+++ b/main/app/sprinkles/admin/assets/userfrosting/js/pages/roles.js
@@ -0,0 +1,24 @@
+/**
+ * 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/roles.js, uf-table.js, moment.js, handlebars-helpers.js
+ *
+ * Target page: /roles
+ */
+
+$(document).ready(function() {
+ // Set up table of roles
+ $("#widget-roles").ufTable({
+ dataUrl: site.uri.public + "/api/roles",
+ useLoadingTransition: site.uf_table.use_loading_transition
+ });
+
+ // Bind creation button
+ bindRoleCreationButton($("#widget-roles"));
+
+ // Bind table buttons
+ $("#widget-roles").on("pagerComplete.ufTable", function () {
+ bindRoleButtons($(this));
+ });
+});