暂无描述

new.js 541B

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