~ubuntu-branches/debian/jessie/web2py/jessie

« back to all changes in this revision

Viewing changes to applications/admin/static/js/web2py_ajax.js

  • Committer: Package Import Robot
  • Author(s): José L. Redrejo Rodríguez
  • Date: 2011-11-04 10:12:01 UTC
  • mfrom: (1.1.10)
  • Revision ID: package-import@ubuntu.com-20111104101201-ym8q3030ik8sc10u
Tags: 1.99.2.1-1
* Updated upstream sources with real 1.99.2 version
* Ensure python-gtk2 is not needed to run web2py, fixing 
  debian/patches/gtk_gui (Closes: #646931)
* Refreshed debian/patches/avoid_updating patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
function web2py_ajax_init() {
26
26
  jQuery('.hidden').hide();
27
27
  jQuery('.error').hide().slideDown('slow');
28
 
  jQuery('.flash').click(function() { jQuery(this).fadeOut('slow'); return false; });
 
28
  jQuery('.flash').click(function(e) { jQuery(this).fadeOut('slow'); e.preventDefault(); });
29
29
  // jQuery('input[type=submit]').click(function(){var t=jQuery(this);t.hide();t.after('<input class="submit_disabled" disabled="disabled" type="submit" name="'+t.attr("name")+'_dummy" value="'+t.val()+'">')});
30
30
  jQuery('input.integer').live('keyup', function(){this.value=this.value.reverse().replace(/[^0-9\-]|\-(?=.)/g,'').reverse();});
31
31
  jQuery('input.double,input.decimal').live('keyup', function(){this.value=this.value.reverse().replace(/[^0-9\-\.,]|[\-](?=.)|[\.,](?=[0-9]*[\.,])/g,'').reverse();});
55
55
   jQuery('#'+target+' form').each(function(i){
56
56
      var form=jQuery(this);
57
57
      if(!form.hasClass('no_trap'))
58
 
        form.submit(function(obj){
 
58
        form.submit(function(e){
59
59
         jQuery('.flash').hide().html('');
60
60
         web2py_ajax_page('post',action,form.serialize(),target);
61
 
         return false;
 
61
         e.preventDefault();
62
62
      });
63
63
   });
64
64
}