rendered paste bodyIndex: documents.php
===================================================================
--- documents.php (revisione 7601)
+++ documents.php (copia locale)
@@ -118,7 +118,22 @@
// seuls cas connus : exec=articles_edit ou breves_edit
$script = $type.'s_edit';
-
+ ?>
+ <script type="text/javascript">
+ $(function() {
+ $(".form_upload").submit(function(){
+ return do_async_upload(this);
+ });
+ });
+ function do_async_upload(form) {
+ var jForm = $(form).clone();
+ var iframe = $("<iframe id='upload_frame' frameborder='0' marginwidth='0' marginheight='0' scrolling='no' style='position:absolute'></iframe>")
+ $("body").append(iframe[0]);
+ $("body",iframe[0].contentDocument).append(jForm[0]);
+ return false;
+ }
+ </script>
+ <?php
/// Ajouter nouvelle image
echo "<a name='images'></a>\n";
$titre_cadre = _T('bouton_ajouter_image').aide("ins_img");
Index: joindre.php
===================================================================
--- joindre.php (revisione 7601)
+++ joindre.php (copia locale)
@@ -76,7 +76,7 @@
(intval($id) .'/' .intval($id_document) . "/$mode/$type"),
generer_url_ecrire($script, $args, true),
"$debut$intitule$res$dir_ftp$distant$fin",
- " method='post' enctype='multipart/form-data' style='border: 0px; margin: 0px;'");
+ " method='post' enctype='multipart/form-data' style='border: 0px; margin: 0px;' class='form_upload'");
}