Changeset 88816 in spip-zone


Ignore:
Timestamp:
Apr 26, 2015, 3:34:55 PM (5 years ago)
Author:
p@…
Message:

Utiliser jQuery pour initializer DropZone?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/uploadhtml5/trunk/formulaires/uploadhtml5.html

    r88806 r88816  
    22
    33  [<p class="reponse_formulaire reponse_formulaire_erreur">
    4     (#ENV*{message_erreur})
     4  (#ENV*{message_erreur})
    55  </p>]
    66  [<p class="reponse_formulaire reponse_formulaire_ok">
     
    1717
    1818  <script type="text/javascript">
    19    Dropzone.options.dropzonespip = {
     19     var options = {
    2020
    21      maxFilesize: #CONFIG{uploadhtml5/max_file_size},
    22      maxFiles: [(#CONFIG{uploadhtml5/max_file}|>{0}|?{
    23      #CONFIG{uploadhtml5/max_file},
    24      null})],
     21       maxFilesize: #CONFIG{uploadhtml5/max_file_size},
     22       maxFiles: [(#CONFIG{uploadhtml5/max_file}|>{0}|?{
     23         #CONFIG{uploadhtml5/max_file},
     24         null})],
    2525
    26      [(#REM|test_espace_prive|oui)
    27      success: function(file, response) {
    28        ajaxReload("documents");
    29      },]
     26       [(#REM|test_espace_prive|oui)
     27           success: function(file, response) {
     28             ajaxReload("documents");
     29           },
     30       ]
    3031
    31      // Traduire dropzone
    32      dictDefaultMessage: "<:uploadhtml5:drop_ici:>",
    33      dictFallbackMessage: "<:uploadhtml5:drop_no_support:>",
    34      dictFallbackText: "<:uploadhtml5:drop_fallbacktext:>",
    35      dictInvalidFileType: "<:uploadhtml5:drop_fichier_invalide:>",
    36      dictFileTooBig: "<:uploadhtml5:drop_fichier_trop_gros:>",
    37      dictCancelUpload: "<:uploadhtml5:drop_annuler:>",
    38      dictCancelUploadConfirmation: "<:uploadhtml5:drop_annuler_confirm:>",
    39      dictMaxFilesExceeded: "<:uploadhtml5:drop_max_file:>"
    40    }
     32       // Traduire dropzone
     33       dictDefaultMessage: "<:uploadhtml5:drop_ici:>",
     34       dictFallbackMessage: "<:uploadhtml5:drop_no_support:>",
     35       dictFallbackText: "<:uploadhtml5:drop_fallbacktext:>",
     36       dictInvalidFileType: "<:uploadhtml5:drop_fichier_invalide:>",
     37       dictFileTooBig: "<:uploadhtml5:drop_fichier_trop_gros:>",
     38       dictCancelUpload: "<:uploadhtml5:drop_annuler:>",
     39       dictCancelUploadConfirmation: "<:uploadhtml5:drop_annuler_confirm:>",
     40       dictMaxFilesExceeded: "<:uploadhtml5:drop_max_file:>"
     41     };
     42
     43   $("#dropzonespip").dropzone(options);
     44
    4145  </script>
    4246  ]
Note: See TracChangeset for help on using the changeset viewer.