Projet

Général

Profil

« Précédent | Suivant » 

Révision 29732bc3

Ajouté par Renato Botelho il y a presque 10 ans

Update csrf-magic to 1.0.4

Voir les différences:

usr/local/www/csrf/csrf-magic.js
142 142
            }
143 143
            return jQuery.csrf_ajax( s );
144 144
        }
145
    } else if (window.Prototype) {
145
    }
146
    if (window.Prototype) {
146 147
        // This works for script.aculo.us too
147 148
        Ajax.csrf_getTransport = Ajax.getTransport;
148 149
        Ajax.getTransport = function() {
149 150
            return new CsrfMagic(Ajax.csrf_getTransport());
150 151
        }
151
    } else if (window.MooTools) {
152
    }
153
    if (window.MooTools) {
152 154
        Browser.csrf_Request = Browser.Request;
153 155
        Browser.Request = function () {
154 156
            return new CsrfMagic(Browser.csrf_Request());
155 157
        }
156
    } else if (window.YAHOO) {
158
    }
159
    if (window.YAHOO) {
160
        // old YUI API
157 161
        YAHOO.util.Connect.csrf_createXhrObject = YAHOO.util.Connect.createXhrObject;
158 162
        YAHOO.util.Connect.createXhrObject = function (transaction) {
159 163
            obj = YAHOO.util.Connect.csrf_createXhrObject(transaction);
160 164
            obj.conn = new CsrfMagic(obj.conn);
161 165
            return obj;
162 166
        }
163
    } else if (window.Ext) {
167
    }
168
    if (window.Ext) {
164 169
        // Ext can use other js libraries as loaders, so it has to come last
165 170
        // Ext's implementation is pretty identical to Yahoo's, but we duplicate
166 171
        // it for comprehensiveness's sake.
......
170 175
            obj.conn = new CsrfMagic(obj.conn);
171 176
            return obj;
172 177
        }
173
    } else if (window.dojo) {
178
    }
179
    if (window.dojo) {
180
        // NOTE: this doesn't work with latest dojo
174 181
        dojo.csrf__xhrObj = dojo._xhrObj;
175 182
        dojo._xhrObj = function () {
176 183
            return new CsrfMagic(dojo.csrf__xhrObj());

Formats disponibles : Unified diff