Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #8291: Prototype-Authentication.patch

File Prototype-Authentication.patch, 0.8 kB (added by batterseapower, 2 years ago)

Patch to include functionality

  • src/ajax.js

    old new  
    104104      if (this.options.onCreate) this.options.onCreate(this.transport); 
    105105      Ajax.Responders.dispatch('onCreate', this, this.transport); 
    106106     
    107       this.transport.open(this.method.toUpperCase(), this.url,  
    108         this.options.asynchronous); 
     107      if (this.options.username && this.options.password) 
     108        this.transport.open(this.method.toUpperCase(), this.url,  
     109          this.options.asynchronous, this.options.username, this.options.password);   
     110      else 
     111        this.transport.open(this.method.toUpperCase(), this.url,  
     112          this.options.asynchronous); 
    109113 
    110114      if (this.options.asynchronous) this.respondToReadyState.bind(this).defer(1); 
    111115