autosubmit.js 647 B

123456789101112131415161718192021222324
  1. ///import core
  2. ///commands 自动提交
  3. ///commandsName autosubmit
  4. ///commandsTitle 自动提交
  5. UE.plugins['autosubmit'] = function(){
  6. var me = this;
  7. me.commands['autosubmit'] = {
  8. execCommand:function () {
  9. var me=this,
  10. form = domUtils.findParentByTagName(me.iframe,"form", false);
  11. if (form) {
  12. if(me.fireEvent("beforesubmit")===false){
  13. return;
  14. }
  15. me.sync();
  16. form.submit();
  17. }
  18. }
  19. };
  20. //快捷键
  21. me.addshortcutkey({
  22. "autosubmit" : "ctrl+13" //手动提交
  23. });
  24. };