diff options
Diffstat (limited to 'jm2l/templates/layout.mako')
-rw-r--r-- | jm2l/templates/layout.mako | 37 |
1 files changed, 3 insertions, 34 deletions
diff --git a/jm2l/templates/layout.mako b/jm2l/templates/layout.mako index 64b60a8..415b5a3 100644 --- a/jm2l/templates/layout.mako +++ b/jm2l/templates/layout.mako @@ -113,46 +113,15 @@ ${helpers.uploader_js()} <script src="/vendor/bootstrap.min.js"></script> <script src="/vendor/fileupload/js/jquery-uploader.min.js"></script> <script src="/vendor/ckeditor/ckeditor.js"></script> + <script src="/js/plugins.js"></script> ${self.jsAddOn()} ## Then Handle Javascript <script> % for jsitem in context._kwargs['postpone_js']: ${jsitem | n} % endfor -$.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)}); - }); - } -); +## Call Control Handler +HandleControls(); </script> <!-- Piwik --> |