0

これは、ダウンロードを強制するために次のプラグインを巻きます

jquery.fileDownload.js

drupal 7 を統合したい

そしてtheme.info jquery.fileDownload.jsに入れます

dwnload-force.js に加えて、次のコードが含まれています。

(function ($) {
Drupal.behaviors.MyfunctionTheme = {
attach: function(context, settings) {
$(document).on("click", "b.fileDownloadSimpleRichExperience", function () {
$.fileDownload($(this).prop('href'), {
preparingMessageHtml: "Se esta preparando su descarga, por favor espere un momento...",
failMessageHtml: "Hubo un problema al generar su descarga, porfavor intente de nuevo."
});
return false; //this is critical to stop the click event which will trigger a normal file download!
});
}}
})( jQuery );

firebug は私に次のことを示しています:

TypeError: $(...).on is not a function  

$(document).on("click", "b.fileDownloadSimpleRichExperience", function () {

あなたより

4

0 に答える 0