@regru/jquery-multifile

2.3.1 • Public • Published

#jQuery Multiple File Upload

##Fixes

  • adds Multifile.block object for main block carry
  • adds Multifile.errors object for errors, contains DOM
  • multiple="multiple" attribute fix (disappear on input original change)
  • BEM classes naming
  • restore default .submit() event handler for forms
  • .disableEmpty() strongly changed
  • adds .reset() method to Multifile object
  • adds russian language for basic messages
  • adds showError/removeError methods

##Options

multifileName: 'b-file'     // Custom DOM elements name prefix
                            // also className for entire plugin DOM-block

DOM will be:

b-file
  b-file__list
    b-file__list-item
    b-file__list-item
  b-file__wrap
wrapper: '.className' // specify wrapper className instead of generating DOM
lang: 'en' || 'ru'  // messages language

// and extend it with your own
STRING: {
    ru: {
        remove: 'x',
        denied: 'Нельзя выбрать $ext файл.',
        file: '$file',
        selected: 'Файл выбран: $file',
        duplicate: 'Этот файл уже выбран:\n$file',
        toomuch: 'Общий размер файлов выше допустимого ($size)',
        toolittle: 'Слишком маленький размер файлов ($size)',
        toomany: 'Максимальное кол-во файлов: $max',
        toofew: 'Минимальное кол-во файлов: $max',
        toobig: 'Превышен размер файла ($size)',
        toosmall: 'Слишком маленький размер файла ($size)'
    }
}
showErrors: true // append errors in html, false - calls 'error' function

Readme

Keywords

Package Sidebar

Install

npm i @regru/jquery-multifile

Weekly Downloads

0

Version

2.3.1

License

MIT

Unpacked Size

125 kB

Total Files

17

Last publish

Collaborators

  • dskvr91
  • daniilkadm
  • yushkov.vladimir
  • dreamworker
  • podkot