diff options
author | tr4ck3ur <tr4ck3ur@style-python.fr> | 2015-02-15 18:10:48 +0100 |
---|---|---|
committer | tr4ck3ur <tr4ck3ur@style-python.fr> | 2015-02-15 18:10:48 +0100 |
commit | a9318f7fd31eed8fa14d08a92277ba795efbb36c (patch) | |
tree | e7d4c1a2190b1b5eb77783141831a7198c140085 /jm2l/static/js/plugins.js | |
parent | 6f97a3895e862c3ba4d71a7da409b9d20c50336c (diff) | |
download | jm2l-a9318f7fd31eed8fa14d08a92277ba795efbb36c.tar.gz jm2l-a9318f7fd31eed8fa14d08a92277ba795efbb36c.tar.bz2 jm2l-a9318f7fd31eed8fa14d08a92277ba795efbb36c.tar.xz jm2l-a9318f7fd31eed8fa14d08a92277ba795efbb36c.zip |
Corrigé les images
Ajouté la gestion de password
Corrigé le slug des users à la création
Diffstat (limited to 'jm2l/static/js/plugins.js')
-rw-r--r-- | jm2l/static/js/plugins.js | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/jm2l/static/js/plugins.js b/jm2l/static/js/plugins.js index f887480..78eecbf 100644 --- a/jm2l/static/js/plugins.js +++ b/jm2l/static/js/plugins.js @@ -22,3 +22,40 @@ }()); // Place any jQuery/helper plugins in here. +function HandleControls() { +// Trig some javascript to handle New Dialog content + $.each( $('.fileupload'), + function( NumCtrl, Ctrl ) { + $("#"+Ctrl.id).fileupload({ + // Uncomment the following to send cross-domain cookies: + //xhrFields: {withCredentials: true}, + //url: '/uploader/proceed/' + url: this.action + }); + // Enable iframe cross-domain access via redirect option: + $("#"+Ctrl.id).fileupload( + 'option', + 'redirect', + window.location.href.replace( + /\/[^\/]*$/, + '/cors/result.html?%s' + ) + ); + $("#"+Ctrl.id).addClass('fileupload-processing'); + $.ajax({ + // Uncomment the following to send cross-domain cookies: + //xhrFields: {withCredentials: true}, + //url: this.action, + url: $("#"+Ctrl.id).fileupload('option', 'url'), + //url: "uploader/proceed/", + dataType: 'json', + context: $("#"+Ctrl.id)[0] + }).always(function () { + $(this).removeClass('fileupload-processing'); + }).done(function (result) { + $(this).fileupload('option', 'done') + .call(this, $.Event('done'), {result: result}); //$(this)}); + }); + } + ); +}
\ No newline at end of file |