Giter Site home page Giter Site logo

Comments (3)

novoj avatar novoj commented on May 31, 2024

Hmm, there is no option to upload file :-(

Index: jquery.ajaxmanager.js

RCS file: /www/CVS/p_java/cps/libs_java/lib_form/lib_form_core/src/main/resources/META-INF/lib_form/globalResources/jQuery/jquery.ajaxmanager.js,v
retrieving revision 1.2
diff -u -r1.2 jquery.ajaxmanager.js
--- jquery.ajaxmanager.js 6 May 2010 14:04:25 -0000 1.2
+++ jquery.ajaxmanager.js 15 Sep 2010 13:13:10 -0000
@@ -114,8 +114,8 @@
if(o.cacheResponse && cache[id]){
that.requests[id] = {};
setTimeout(function(){

  •                   that._complete.call(that, o.context || o, origCom, {}, 'success', id, o);
    
  •                   that._success.call(that, o.context || o, origSuc, cache[id], 'success', {}, o);
    
  •                   that._complete.call(that, o.context || o, origCom, cache[id], 'success', id, o);
    
  •                   that._success.call(that, o.context || o, origSuc, cache[id].responseText, 'success', cache[id], o);
                }, 0);
            } else {
                that.requests[id] = $.ajax(o);
    
    @@ -175,8 +175,24 @@
    that.abort(name);
    });
    }
  •       if(o.cacheResponse && !cache[o.xhrID]){
    
  •           cache[o.xhrID] = data;
    
  •       if(o.cacheResponse && !cache[o.xhrID]){  
    
  •            var parsedHeaders = {};
    
  •            var headers = xhr.getAllResponseHeaders();
    
  •            var headerItems = headers.split("\n");
    
  •            for (var key in headerItems) {
    
  •                var headerItem = headerItems[key];
    
  •                var delimiter = headerItem.indexOf(":");
    
  •                var headerName = headerItem.substr(0, delimiter);
    
  •                parsedHeaders[headerName] = headerItem.substr(delimiter + 2);
    
  •            }
    
  •            cache[o.xhrID] = {
    
  •                status: xhr.status,
    
  •                statusText: xhr.statusText,
    
  •                responseText: xhr.responseText,
    
  •                responseXML: xhr.responseXML,
    
  •                getAllResponseHeaders: function() {return xhr.getAllResponseHeaders();},
    
  •                getResponseHeader: function(name) {return parsedHeaders[name];}
    
  •            };
        }
        origFn.call(context, data, status, xhr, o);
        $.event.trigger(this.name +'AjaxSuccess', [xhr, o, data]);
    

from ajaxmanager.

aFarkas avatar aFarkas commented on May 31, 2024

Hi Jan,

this was intended, but I took your suggestions and commited your changes. I made some tweaks here and there. Note, that I won't return responseText, but the succesData, due to the fact, that jQuery sometimes is processing the answer (json). Please have a look @http://github.com/aFarkas/Ajaxmanager/commit/ddbf0e350b437f6866c90726599dc6ccbdfdc73b and be so kind to review the code/changes, before I release the code.

regards
alex

from ajaxmanager.

novoj avatar novoj commented on May 31, 2024

Hello Alex,

I've tested current Github version with my code and it works well - also all the tweaks you have done seem pretty good. Thank you for adopting the patch.

Regards,
Jan

from ajaxmanager.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.