暂无描述

edit.js 573B

12345678910111213141516171819202122
  1. ;spa_define(function() {
  2. return $.use(["spa","form"], function(spa,fb) {
  3. return {
  4. modal : function(data) {
  5. var root = spa.findInModal(".sys_dict_edit")
  6. var form = fb.build(root.find(".newForm"));
  7. root.find(".modal-ctrl .icon-times").on("click", function() {
  8. spa.closeModal();
  9. });
  10. form.val(data.data);
  11. root.find(".opt-save").on("click", function() {
  12. form.doPut("../ajax/sys/dict/info", function() {
  13. spa.closeModal();
  14. if (data.hand) {
  15. data.hand();
  16. }
  17. }, {});
  18. });
  19. }
  20. };
  21. });
  22. });