Changeset 5021 in subversion


Ignore:
Timestamp:
Aug 4, 2011 4:12:36 AM (22 months ago)
Author:
alec
Message:
  • Add abort_request() function
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/js/app.js

    r5020 r5021  
    34353435      this.gui_objects.qsearchbox.value = ''; 
    34363436 
    3437     if (this.env.qsearch) { 
    3438       this.set_busy(this.env.qsearch.lock, false); 
    3439       this.env.qsearch.request.abort(); 
    3440     } 
     3437    if (this.env.qsearch) 
     3438      this.abort_request(this.env.qsearch); 
    34413439 
    34423440    this.env.qsearch = null; 
     
    37613759      return; 
    37623760 
    3763     for (i=0, len=ac.locks.length; i<len; i++) { 
    3764       this.hide_message(ac.locks[i]); // hide loading message 
    3765       ac.requests[i].abort(); // abort ajax request 
    3766     } 
     3761    for (i=0, len=ac.locks.length; i<len; i++) 
     3762      this.abort_request({request: ac.requests[i], lock: ac.locks[i]}); 
    37673763 
    37683764    this.ksearch_data = null; 
     
    56655661  }; 
    56665662 
     5663  // aborts ajax request 
     5664  this.abort_request = function(r) 
     5665  { 
     5666    if (r.request) 
     5667      r.request.abort(); 
     5668    if (r.lock) 
     5669      this.set_busy(r.lock, false); 
     5670  }; 
     5671 
    56675672  // handle HTTP response 
    56685673  this.http_response = function(response) 
Note: See TracChangeset for help on using the changeset viewer.