Changeset 92702 in spip-zone


Ignore:
Timestamp:
Nov 6, 2015, 7:09:00 PM (4 years ago)
Author:
p@…
Message:

On va séparer la dropZone seul et la dropzone de saisie

Location:
_plugins_/uploadhtml5/trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/uploadhtml5/trunk/javascript/spip.dropzone.js.html

    r92701 r92702  
    33
    44<script type="text/javascript">
     5
     6 var processSaisieUpload = function (event) {
     7   // Activer l'autoProcess
     8   event.data.dropzone.options.autoProcessQueue = true;
     9   // Lancer l'upload
     10   event.data.dropzone.processQueue();
     11   // Ne pas submit vraiment le formulaire
     12   event.preventDefault();
     13 }
     14
    515 var options = {
    616   [url: "(#ENV*{url})",]
     
    818   maxFilesize: #CONFIG{uploadhtml5/max_file_size},
    919   maxFiles: #GET{maxFiles},
    10    parallelUploads: 1,
    11 
    12    [autoProcessQueue: (#ENV{autoProcessQueue, true}),]
    1320
    1421   [acceptedFiles: "(#ENV{acceptedFiles})",]
    15 
    16    init: function () {
    17      var dropzone = this;
    18      $("\##ENV{id}").parents("form").submit(function (event) {
    19        event.preventDefault();
    20        dropzone.processQueue();
    21      });
    22    },
    2322
    2423   [success: function(file, response) {
     
    2625   },]
    2726
    28    // queuecomplete: function () {
    29    //   alert('submit');
    30    //   $("\##ENV{id}").parents("form").submit();
    31    // },
    3227
    3328   [complete: function (file, response) {
  • _plugins_/uploadhtml5/trunk/saisies/upload.html

    r92693 r92702  
    33<div id="#GET{id}" class="dropzone"></div>
    44
    5 <INCLURE{fond=javascript/spip.dropzone.js, id=#GET{id}, url=#GET{url}, autoProcessQueue=false, init=#GET{init}} />
     5<INCLURE{fond=javascript/spip.dropzone_saisie.js, id=#GET{id}, url=#GET{url}} />
Note: See TracChangeset for help on using the changeset viewer.