config.js 682 B

12345678910111213141516171819202122
  1. define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
  2. var Controller = {
  3. index: function () {
  4. $("form.edit-form").data("validator-options", {
  5. display: function (elem) {
  6. return $(elem).closest('tr').find("td:first").text();
  7. }
  8. });
  9. Form.api.bindevent($("form.edit-form"));
  10. },
  11. edit: function () {
  12. Controller.api.bindevent();
  13. },
  14. api: {
  15. bindevent: function () {
  16. Form.api.bindevent($("form[role=form]"));
  17. }
  18. }
  19. };
  20. return Controller;
  21. });