bootstrap.js 853 B

1234567891011121314151617181920212223242526
  1. require.config({
  2. paths: {
  3. 'editable': '../libs/bootstrap-table/dist/extensions/editable/bootstrap-table-editable.min',
  4. 'x-editable': '../addons/editable/js/bootstrap-editable.min',
  5. },
  6. shim: {
  7. 'editable': {
  8. deps: ['x-editable', 'bootstrap-table']
  9. },
  10. "x-editable": {
  11. deps: ["css!../addons/editable/css/bootstrap-editable.css"],
  12. }
  13. }
  14. });
  15. if ($("table.table").size() > 0) {
  16. require(['editable', 'table'], function (Editable, Table) {
  17. $.fn.bootstrapTable.defaults.onEditableSave = function (field, row, oldValue, $el) {
  18. var data = {};
  19. data["row[" + field + "]"] = row[field];
  20. Fast.api.ajax({
  21. url: this.extend.edit_url + "/ids/" + row[this.pk],
  22. data: data
  23. });
  24. };
  25. });
  26. }