Procházet zdrojové kódy

Upgrade to release v4.2.0 fixes #277

Kartik Visweswaran před 10 roky
rodič
revize
f0a2de91ad

+ 2 - 1
CHANGE.md

@@ -1,8 +1,9 @@
 version 4.2.0
 version 4.2.0
 =============
 =============
-**Date**: 05-May-2015
+**Date**: 09-May-2015
 
 
 1. (enh #275): Add Czech & Slovakian translations.
 1. (enh #275): Add Czech & Slovakian translations.
+2. (enh #277): New `language` property to allow configuring multi lang widgets on same page.
 
 
 version 4.1.9
 version 4.1.9
 =============
 =============

+ 4 - 1
README.md

@@ -12,7 +12,7 @@ An enhanced HTML 5 file input for Bootstrap 3.x with file preview for various fi
 
 
 This plugin was initially inspired by [this blog article](http://www.abeautifulsite.net/blog/2013/08/whipping-file-inputs-into-shape-with-bootstrap-3/) and [Jasny's File Input plugin](http://jasny.github.io/bootstrap/javascript/#fileinput). But the plugin has now matured with various additional features and enhancements to be a complete (yet simple) file management tool and solution for web developers. 
 This plugin was initially inspired by [this blog article](http://www.abeautifulsite.net/blog/2013/08/whipping-file-inputs-into-shape-with-bootstrap-3/) and [Jasny's File Input plugin](http://jasny.github.io/bootstrap/javascript/#fileinput). But the plugin has now matured with various additional features and enhancements to be a complete (yet simple) file management tool and solution for web developers. 
 
 
-> NOTE: The latest version of the plugin v4.1.9 has been released. Refer the [CHANGE LOG](https://github.com/kartik-v/bootstrap-fileinput/blob/master/CHANGE.md) for details. 
+> NOTE: The latest version of the plugin v4.2.0 has been released. Refer the [CHANGE LOG](https://github.com/kartik-v/bootstrap-fileinput/blob/master/CHANGE.md) for details. 
 
 
 ## Features  
 ## Features  
 
 
@@ -155,6 +155,9 @@ As shown in the installation section, translations are now enabled with release
 ## Plugin Options
 ## Plugin Options
 The plugin supports these following options:
 The plugin supports these following options:
 
 
+### language
+_string_ language configuration for the plugin to enable the plugin to display messages for your locale (you must set the ISO code for the language). You can have multiple language widgets on the same page. The locale JS file for the language code must be defined as mentioned in the translations section. The file must be loaded after `fileinput.js`.
+
 ### showCaption
 ### showCaption
 _boolean_ whether to display the file caption. Defaults to `true`.
 _boolean_ whether to display the file caption. Defaults to `true`.
 
 

+ 1 - 1
bower.json

@@ -1,6 +1,6 @@
 {
 {
     "name": "bootstrap-fileinput",
     "name": "bootstrap-fileinput",
-    "version": "4.1.9",
+    "version": "4.2.0",
     "homepage": "https://github.com/kartik-v/bootstrap-fileinput",
     "homepage": "https://github.com/kartik-v/bootstrap-fileinput",
     "authors": [
     "authors": [
         "Kartik Visweswaran <[email protected]>"
         "Kartik Visweswaran <[email protected]>"

+ 1 - 1
css/fileinput.css

@@ -1,7 +1,7 @@
 /*!
 /*!
  * @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2015
  * @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2015
  * @package bootstrap-fileinput
  * @package bootstrap-fileinput
- * @version 4.1.9
+ * @version 4.2.0
  *
  *
  * File input styling for Bootstrap 3.0
  * File input styling for Bootstrap 3.0
  * Built for Yii Framework 2.0
  * Built for Yii Framework 2.0

+ 1 - 1
css/fileinput.min.css

@@ -1,7 +1,7 @@
 /*!
 /*!
  * @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2015
  * @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2015
  * @package bootstrap-fileinput
  * @package bootstrap-fileinput
- * @version 4.1.9
+ * @version 4.2.0
  *
  *
  * File input styling for Bootstrap 3.0
  * File input styling for Bootstrap 3.0
  * Built for Yii Framework 2.0
  * Built for Yii Framework 2.0

+ 27 - 2
examples/index.html

@@ -1,5 +1,5 @@
 <!DOCTYPE html>
 <!DOCTYPE html>
-<!-- release v4.1.9, copyright 2014 - 2015 Kartik Visweswaran -->
+<!-- release v4.2.0, copyright 2014 - 2015 Kartik Visweswaran -->
 <html lang="en">
 <html lang="en">
     <head>
     <head>
         <meta charset="UTF-8"/>
         <meta charset="UTF-8"/>
@@ -7,7 +7,9 @@
         <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet">
         <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet">
         <link href="../css/fileinput.css" media="all" rel="stylesheet" type="text/css" />
         <link href="../css/fileinput.css" media="all" rel="stylesheet" type="text/css" />
         <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
         <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
-        <script src="../js/fileinput.js" type="text/javascript"></script>
+        <script src="../js/fileinput.min.js" type="text/javascript"></script>
+        <script src="../js/fileinput_locale_fr.js" type="text/javascript"></script>
+        <script src="../js/fileinput_locale_es.js" type="text/javascript"></script>
         <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js" type="text/javascript"></script>
         <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js" type="text/javascript"></script>
     </head>
     </head>
     <body>
     <body>
@@ -70,9 +72,32 @@
                     <input id="file-5" class="file" type="file" multiple data-preview-file-type="any" data-upload-url="#" data-preview-file-icon="">
                     <input id="file-5" class="file" type="file" multiple data-preview-file-type="any" data-upload-url="#" data-preview-file-icon="">
                 </div>
                 </div>
             </form>
             </form>
+            
+            
+            <hr>
+            <h4>Multi Language Inputs</h4>
+            <form enctype="multipart/form-data">
+                <label>French Input</label>
+                <input id="file-fr" name="file-fr[]" type="file" multiple>
+                <hr style="border: 2px dotted">
+                <label>Spanish Input</label>
+                <input id="file-es" name="file-es[]" type="file" multiple>
+            </form>
+            <hr>
+            <br>
         </div>
         </div>
     </body>
     </body>
 	<script>
 	<script>
+    $('#file-fr').fileinput({
+        language: 'fr',
+        uploadUrl: '#',
+        allowedFileExtensions : ['jpg', 'png','gif'],
+    });
+    $('#file-es').fileinput({
+        language: 'es',
+        uploadUrl: '#',
+        allowedFileExtensions : ['jpg', 'png','gif'],
+    });
     $("#file-0").fileinput({
     $("#file-0").fileinput({
         'allowedFileExtensions' : ['jpg', 'png','gif'],
         'allowedFileExtensions' : ['jpg', 'png','gif'],
     });
     });

+ 0 - 122
examples/index_de.html

@@ -1,122 +0,0 @@
-<!DOCTYPE html>
-<!-- release v4.1.9, copyright 2014 - 2015 Kartik Visweswaran -->
-<html lang="en">
-    <head>
-        <meta charset="UTF-8"/>
-        <title>Krajee JQuery Plugins - &copy; Kartik</title>
-        <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet">
-        <link href="../css/fileinput.css" media="all" rel="stylesheet" type="text/css" />
-        <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
-        <script src="../js/fileinput.js" type="text/javascript"></script>
-        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js" type="text/javascript"></script>
-    </head>
-    <body>
-        <div class="container kv-main">
-            <div class="page-header">
-            <h1>Bootstrap File Input Example <small><a href="https://github.com/kartik-v/bootstrap-fileinput-samples"><i class="glyphicon glyphicon-download"></i> Download Sample Files</a></small></h1>
-            <h3 class="text-success">German Translation Demo</h2>
-            </div>
-            <form enctype="multipart/form-data">
-                <input id="file-0" class="file" type="file" multiple data-min-file-count="1">
-                <br>
-                <button type="submit" class="btn btn-primary">Einreichen</button>
-                    <button type="reset" class="btn btn-default">Erfrischen</button>
-            </form>
-            <br>
-            <form enctype="multipart/form-data">
-                <input id="file-0a" class="file" type="file" multiple data-min-file-count="3">
-                <br>
-                 <div class="form-group">
-                    <input id="file-0b" class="file" type="file">
-                </div>
-                <div class="form-group">
-                    <input id="file-1" type="file" multiple class="file" data-overwrite-initial="false" data-min-file-count="2">
-                </div>
-                <div class="form-group">
-                    <input id="file-2" type="file" class="file" readonly data-show-upload="false">
-                </div> 
-                <div class="form-group">
-                    <label>Vorschau Datei-Icon</label>
-                    <input id="file-3" type="file" multiple=true>
-                </div>
-                <div class="form-group">
-                    <input id="file-4" type="file" class="file" data-upload-url="#">
-                </div>
-                <div class="form-group">
-                    <button class="btn btn-warning" type="button">Deaktivieren Test</button>
-                    <button class="btn btn-info" type="reset">Erfrischen Test</button>
-                    <button class="btn btn-primary">Einreichen</button>
-                    <button class="btn btn-default" type="reset">Rücksetzen</button>
-                </div>
-                <div class="form-group">
-                    <input type="file" class="file" id="test-upload" multiple>
-                    <div id="errorBlock" class="help-block"></div>
-                </div>
-                <div class="form-group">
-                    <input id="file-5" class="file" type="file" multiple data-preview-file-type="any" data-upload-url="#" data-preview-file-icon="">
-                </div>
-            </form>
-        </div>
-    </body>
-	<script>
-    $("#file-0").fileinput({
-        'allowedFileExtensions' : ['jpg', 'png','gif'],
-    });
-    $("#file-1").fileinput({
-        uploadUrl: '#', // you must set a valid URL here else you will get an error
-        allowedFileExtensions : ['jpg', 'png','gif'],
-        overwriteInitial: false,
-        maxFileSize: 1000,
-        maxFilesNum: 10,
-        //allowedFileTypes: ['image', 'video', 'flash'],
-        slugCallback: function(filename) {
-            return filename.replace('(', '_').replace(']', '_');
-        }
-	});
-    /*
-    $(".file").on('fileselect', function(event, n, l) {
-        alert('File Selected. Name: ' + l + ', Num: ' + n);
-    });
-    */
-	$("#file-3").fileinput({
-		showUpload: false,
-		showCaption: false,
-		browseClass: "btn btn-primary btn-lg",
-		fileType: "any",
-        previewFileIcon: "<i class='glyphicon glyphicon-king'></i>"
-	});
-	$("#file-4").fileinput({
-		uploadExtraData: {kvId: '10'}
-	});
-    $(".btn-warning").on('click', function() {
-        if ($('#file-4').attr('disabled')) {
-            $('#file-4').fileinput('enable');
-        } else {
-            $('#file-4').fileinput('disable');
-        }
-    });    
-    $(".btn-info").on('click', function() {
-        $('#file-4').fileinput('refresh', {previewClass:'bg-info'});
-    });
-    /*
-    $('#file-4').on('fileselectnone', function() {
-        alert('Huh! You selected no files.');
-    });
-    $('#file-4').on('filebrowse', function() {
-        alert('File browse clicked for #file-4');
-    });
-    */
-    $(document).ready(function() {
-        $("#test-upload").fileinput({
-            'showPreview' : false,
-            'allowedFileExtensions' : ['jpg', 'png','gif'],
-            'elErrorContainer': '#errorBlock'
-        });
-        /*
-        $("#test-upload").on('fileloaded', function(event, file, previewId, index) {
-            alert('i = ' + index + ', id = ' + previewId + ', file = ' + file.name);
-        });
-        */
-    });
-	</script>
-</html>

+ 0 - 122
examples/index_pl.html

@@ -1,122 +0,0 @@
-<!DOCTYPE html>
-<!-- release v4.1.9, copyright 2014 - 2015 Kartik Visweswaran -->
-<html lang="en">
-    <head>
-        <meta charset="UTF-8"/>
-        <title>Krajee JQuery Plugins - &copy; Kartik</title>
-        <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet">
-        <link href="../css/fileinput.css" media="all" rel="stylesheet" type="text/css" />
-        <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
-        <script src="../js/fileinput.js" type="text/javascript"></script>
-        <script src="../js/fileinput_locale_pl.js" type="text/javascript"></script>
-        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js" type="text/javascript"></script>
-    </head>
-    <body>
-        <div class="container kv-main">
-            <div class="page-header">
-            <h1>Bootstrap File Input - przykład<small><a href="https://github.com/kartik-v/bootstrap-fileinput-samples"><i class="glyphicon glyphicon-download"></i> Lista przykładowych plików</a></small></h1>
-            </div>
-            <form enctype="multipart/form-data">
-                <input id="file-0" class="file" type="file" multiple data-min-file-count="1">
-                <br>
-                <button type="submit" class="btn btn-primary">Wyślij</button>
-                <button type="reset" class="btn btn-default">Wyczyść</button>
-            </form>
-            <br>
-            <form enctype="multipart/form-data">
-                <input id="file-0a" class="file" type="file" multiple data-min-file-count="3">
-                <br>
-                 <div class="form-group">
-                    <input id="file-0b" class="file" type="file">
-                </div>
-                <div class="form-group">
-                    <input id="file-1" type="file" multiple class="file" data-overwrite-initial="false" data-min-file-count="2">
-                </div>
-                <div class="form-group">
-                    <input id="file-2" type="file" class="file" readonly data-show-upload="false">
-                </div> 
-                <div class="form-group">
-                    <label>Preview File Icon</label>
-                    <input id="file-3" type="file" multiple=true>
-                </div>
-                <div class="form-group">
-                    <input id="file-4" type="file" class="file" data-upload-url="#">
-                </div>
-                <div class="form-group">
-                    <button class="btn btn-warning" type="button">Wyłącz test</button>
-                    <button class="btn btn-info" type="reset">Odśwież test</button>
-                    <button class="btn btn-primary">Wyślij</button>
-                    <button class="btn btn-default" type="reset">Wyczyść</button>
-                </div>
-                <div class="form-group">
-                    <input type="file" class="file" id="test-upload" multiple>
-                    <div id="errorBlock" class="help-block"></div>
-                </div>
-                <div class="form-group">
-                    <input id="file-5" class="file" type="file" multiple data-preview-file-type="any" data-upload-url="#" data-preview-file-icon="">
-                </div>
-            </form>
-        </div>
-    </body>
-	<script>
-    $("#file-0").fileinput({
-        'allowedFileExtensions' : ['jpg', 'png','gif'],
-    });
-    $("#file-1").fileinput({
-        uploadUrl: '#', // you must set a valid URL here else you will get an error
-        allowedFileExtensions : ['jpg', 'png','gif'],
-        overwriteInitial: false,
-        maxFileSize: 1000,
-        maxFilesNum: 10,
-        //allowedFileTypes: ['image', 'video', 'flash'],
-        slugCallback: function(filename) {
-            return filename.replace('(', '_').replace(']', '_');
-        }
-	});
-    /*
-    $(".file").on('fileselect', function(event, n, l) {
-        alert('File Selected. Name: ' + l + ', Num: ' + n);
-    });
-    */
-	$("#file-3").fileinput({
-		showUpload: false,
-		showCaption: false,
-		browseClass: "btn btn-primary btn-lg",
-		fileType: "any",
-        previewFileIcon: "<i class='glyphicon glyphicon-king'></i>"
-	});
-	$("#file-4").fileinput({
-		uploadExtraData: {kvId: '10'}
-	});
-    $(".btn-warning").on('click', function() {
-        if ($('#file-4').attr('disabled')) {
-            $('#file-4').fileinput('enable');
-        } else {
-            $('#file-4').fileinput('disable');
-        }
-    });    
-    $(".btn-info").on('click', function() {
-        $('#file-4').fileinput('refresh', {previewClass:'bg-info'});
-    });
-    /*
-    $('#file-4').on('fileselectnone', function() {
-        alert('Huh! You selected no files.');
-    });
-    $('#file-4').on('filebrowse', function() {
-        alert('File browse clicked for #file-4');
-    });
-    */
-    $(document).ready(function() {
-        $("#test-upload").fileinput({
-            'showPreview' : false,
-            'allowedFileExtensions' : ['jpg', 'png','gif'],
-            'elErrorContainer': '#errorBlock'
-        });
-        /*
-        $("#test-upload").on('fileloaded', function(event, file, previewId, index) {
-            alert('i = ' + index + ', id = ' + previewId + ', file = ' + file.name);
-        });
-        */
-    });
-	</script>
-</html>

+ 21 - 15
js/fileinput.js

@@ -1,6 +1,6 @@
 /*!
 /*!
  * @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2015
  * @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2015
- * @version 4.1.9
+ * @version 4.2.0
  *
  *
  * File input styled for Bootstrap 3.0 that utilizes HTML5 File Input's advanced 
  * File input styled for Bootstrap 3.0 that utilizes HTML5 File Input's advanced 
  * features including the FileReader API. 
  * features including the FileReader API. 
@@ -17,6 +17,9 @@
  */
  */
 (function ($) {
 (function ($) {
     "use strict";
     "use strict";
+
+    $.fn.fileinputLocales = {};
+
     String.prototype.repl = function (from, to) {
     String.prototype.repl = function (from, to) {
         return this.split(from).join(to);
         return this.split(from).join(to);
     };
     };
@@ -442,15 +445,15 @@
 
 
     FileInput.prototype = {
     FileInput.prototype = {
         constructor: FileInput,
         constructor: FileInput,
-        validate: function() {
+        validate: function () {
             var self = this, $exception;
             var self = this, $exception;
             if (self.$element.attr('type') === 'file') {
             if (self.$element.attr('type') === 'file') {
                 return true;
                 return true;
             }
             }
             $exception = '<div class="help-block alert alert-warning">' +
             $exception = '<div class="help-block alert alert-warning">' +
-                '<h4>Invalid Input Type</h4>' +
-                'You must set an input <code>type = file</code> for <b>bootstrap-fileinput</b> plugin to initialize.' +
-                '</div>';
+            '<h4>Invalid Input Type</h4>' +
+            'You must set an input <code>type = file</code> for <b>bootstrap-fileinput</b> plugin to initialize.' +
+            '</div>';
             self.$element.after($exception);
             self.$element.after($exception);
             return false;
             return false;
         },
         },
@@ -2039,12 +2042,16 @@
         var args = Array.apply(null, arguments);
         var args = Array.apply(null, arguments);
         args.shift();
         args.shift();
         return this.each(function () {
         return this.each(function () {
-            var $this = $(this),
-                data = $this.data('fileinput'),
-                options = typeof option === 'object' && option;
+            var $this = $(this), data = $this.data('fileinput'), defaults,
+                options = typeof option === 'object' && option,
+                lang = options.language || $this.data('language') || 'en';
 
 
             if (!data) {
             if (!data) {
-                data = new FileInput(this, $.extend({}, $.fn.fileinput.defaults, options, $(this).data()));
+                defaults = $.extend({}, $.fn.fileinput.defaults);
+                if (lang !== 'en' && !isEmpty($.fn.fileinputLocales[lang])) {
+                    defaults = $.extend(defaults, $.fn.fileinputLocales[lang]);
+                }
+                data = new FileInput(this, $.extend(defaults, options, $this.data()));
                 $this.data('fileinput', data);
                 $this.data('fileinput', data);
             }
             }
 
 
@@ -2055,6 +2062,7 @@
     };
     };
 
 
     $.fn.fileinput.defaults = {
     $.fn.fileinput.defaults = {
+        language: 'en',
         showCaption: true,
         showCaption: true,
         showPreview: true,
         showPreview: true,
         showRemove: true,
         showRemove: true,
@@ -2124,9 +2132,7 @@
         showAjaxErrorDetails: true
         showAjaxErrorDetails: true
     };
     };
 
 
-    $.fn.fileinput.locales = {};
-
-    $.fn.fileinput.locales.en = {
+    $.fn.fileinputLocales.en = {
         fileSingle: 'file',
         fileSingle: 'file',
         filePlural: 'files',
         filePlural: 'files',
         browseLabel: 'Browse &hellip;',
         browseLabel: 'Browse &hellip;',
@@ -2154,7 +2160,7 @@
         dropZoneTitle: 'Drag & drop files here &hellip;'
         dropZoneTitle: 'Drag & drop files here &hellip;'
     };
     };
 
 
-    $.extend($.fn.fileinput.defaults, $.fn.fileinput.locales.en);
+    $.extend($.fn.fileinput.defaults, $.fn.fileinputLocales.en);
 
 
     $.fn.fileinput.Constructor = FileInput;
     $.fn.fileinput.Constructor = FileInput;
 
 
@@ -2163,8 +2169,8 @@
      * into a bootstrap fileinput control.
      * into a bootstrap fileinput control.
      */
      */
     $(document).ready(function () {
     $(document).ready(function () {
-        var $input = $('input.file[type=file]'), count = $input.attr('type') ? $input.length : 0;
-        if (count > 0) {
+        var $input = $('input.file[type=file]');
+        if ($input.length) {
             $input.fileinput();
             $input.fileinput();
         }
         }
     });
     });

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
js/fileinput.min.js


+ 1 - 3
js/fileinput_locale_LANG.js

@@ -11,7 +11,7 @@
 (function ($) {
 (function ($) {
     "use strict";
     "use strict";
 
 
-    $.fn.fileinput.locales._LANG_ = {
+    $.fn.fileinputLocales._LANG_ = {
         fileSingle: 'file',
         fileSingle: 'file',
         filePlural: 'files',
         filePlural: 'files',
         browseLabel: 'Browse &hellip;',
         browseLabel: 'Browse &hellip;',
@@ -38,6 +38,4 @@
         msgFoldersNotAllowed: 'Drag & drop files only! Skipped {n} dropped folder(s).',
         msgFoldersNotAllowed: 'Drag & drop files only! Skipped {n} dropped folder(s).',
         dropZoneTitle: 'Drag & drop files here &hellip;'
         dropZoneTitle: 'Drag & drop files here &hellip;'
     };
     };
-
-    $.extend($.fn.fileinput.defaults, $.fn.fileinput.locales._LANG_);
 })(window.jQuery);
 })(window.jQuery);

+ 1 - 3
js/fileinput_locale_cz.js

@@ -11,7 +11,7 @@
 (function ($) {
 (function ($) {
     "use strict";
     "use strict";
 
 
-    $.fn.fileinput.locales.cz = {
+    $.fn.fileinputLocales.cz = {
         fileSingle: 'soubor',
         fileSingle: 'soubor',
         filePlural: 'soubory',
         filePlural: 'soubory',
         browseLabel: 'Vybrat &hellip;',
         browseLabel: 'Vybrat &hellip;',
@@ -38,6 +38,4 @@
         msgFoldersNotAllowed: 'Táhni a pusť pouze soubory! Vynechané {n} pustěné složk(y).',
         msgFoldersNotAllowed: 'Táhni a pusť pouze soubory! Vynechané {n} pustěné složk(y).',
         dropZoneTitle: 'Táhni a pusť soubory sem &hellip;'
         dropZoneTitle: 'Táhni a pusť soubory sem &hellip;'
     };
     };
-
-    $.extend($.fn.fileinput.defaults, $.fn.fileinput.locales.cz);
 })(window.jQuery);
 })(window.jQuery);

+ 2 - 4
js/fileinput_locale_de.js

@@ -9,7 +9,7 @@
 (function ($) {
 (function ($) {
     "use strict";
     "use strict";
 
 
-    $.fn.fileinput.locales.de = {
+    $.fn.fileinputLocales.de = {
         fileSingle: 'Datei',
         fileSingle: 'Datei',
         filePlural: 'Dateien',
         filePlural: 'Dateien',
         browseLabel: 'Auswählen &hellip;',
         browseLabel: 'Auswählen &hellip;',
@@ -36,6 +36,4 @@
         msgFoldersNotAllowed: 'Drag & Drop funktioniert nur bei Dateien! {n} Ordner übersprungen.',
         msgFoldersNotAllowed: 'Drag & Drop funktioniert nur bei Dateien! {n} Ordner übersprungen.',
         dropZoneTitle: 'Dateien hierher ziehen &hellip;'
         dropZoneTitle: 'Dateien hierher ziehen &hellip;'
     };
     };
-
-    $.extend($.fn.fileinput.defaults, $.fn.fileinput.locales.de);
-})(window.jQuery);
+})(window.jQuery);

+ 2 - 4
js/fileinput_locale_es.js

@@ -11,7 +11,7 @@
 (function ($) {
 (function ($) {
     "use strict";
     "use strict";
 
 
-    $.fn.fileinput.locales.es = {
+    $.fn.fileinputLocales.es = {
         fileSingle: 'archivo',
         fileSingle: 'archivo',
         filePlural: 'archivos',
         filePlural: 'archivos',
         browseLabel: 'Buscar &hellip;',
         browseLabel: 'Buscar &hellip;',
@@ -38,6 +38,4 @@
         msgFoldersNotAllowed: 'Arrastre y suelte únicamente archivos! Se omite {n} carpeta(s).',
         msgFoldersNotAllowed: 'Arrastre y suelte únicamente archivos! Se omite {n} carpeta(s).',
         dropZoneTitle: 'Arrastre y suelte los archivos aquí &hellip;'
         dropZoneTitle: 'Arrastre y suelte los archivos aquí &hellip;'
     };
     };
-
-    $.extend($.fn.fileinput.defaults, $.fn.fileinput.locales.es);
-})(window.jQuery);
+})(window.jQuery);

+ 2 - 4
js/fileinput_locale_fr.js

@@ -11,7 +11,7 @@
 (function ($) {
 (function ($) {
     "use strict";
     "use strict";
 
 
-    $.fn.fileinput.locales.fr = {
+    $.fn.fileinputLocales.fr = {
         fileSingle: 'fichier',
         fileSingle: 'fichier',
         filePlural: 'fichiers',
         filePlural: 'fichiers',
         browseLabel: 'Parcourir&hellip;',
         browseLabel: 'Parcourir&hellip;',
@@ -38,6 +38,4 @@
         msgFoldersNotAllowed: 'Glissez et déposez uniquement des fichiers ! {n} répertoire(s) exclu(s).',
         msgFoldersNotAllowed: 'Glissez et déposez uniquement des fichiers ! {n} répertoire(s) exclu(s).',
         dropZoneTitle: 'Glissez et déposez les fichiers ici&hellip;'
         dropZoneTitle: 'Glissez et déposez les fichiers ici&hellip;'
     };
     };
-
-    $.extend($.fn.fileinput.defaults, $.fn.fileinput.locales.fr);
-})(window.jQuery);
+})(window.jQuery);

+ 1 - 3
js/fileinput_locale_hu.js

@@ -11,7 +11,7 @@
 (function ($) {
 (function ($) {
     "use strict";
     "use strict";
 
 
-    $.fn.fileinput.locales.hu = {
+    $.fn.fileinputLocales.hu = {
         fileSingle: 'fájl',
         fileSingle: 'fájl',
         filePlural: 'fájlok',
         filePlural: 'fájlok',
         browseLabel: 'Böngész &hellip;',
         browseLabel: 'Böngész &hellip;',
@@ -38,6 +38,4 @@
         msgFoldersNotAllowed: 'Csak fájlokat húzzon ide! Kihagyva {n} könyvtár.',
         msgFoldersNotAllowed: 'Csak fájlokat húzzon ide! Kihagyva {n} könyvtár.',
         dropZoneTitle: 'Fájlok húzása ide &hellip;'
         dropZoneTitle: 'Fájlok húzása ide &hellip;'
     };
     };
-
-    $.extend($.fn.fileinput.defaults, $.fn.fileinput.locales.hu);
 })(window.jQuery);
 })(window.jQuery);

+ 2 - 4
js/fileinput_locale_it.js

@@ -13,7 +13,7 @@
 (function ($) {
 (function ($) {
     "use strict";
     "use strict";
 
 
-    $.fn.fileinput.locales.it = {
+    $.fn.fileinputLocales.it = {
         fileSingle: 'file',
         fileSingle: 'file',
         filePlural: 'file',
         filePlural: 'file',
         browseLabel: 'Sfoglia&hellip;',
         browseLabel: 'Sfoglia&hellip;',
@@ -40,6 +40,4 @@
         msgFoldersNotAllowed: 'Trascina solo file! Ignorata/e {n} cartella/e.',
         msgFoldersNotAllowed: 'Trascina solo file! Ignorata/e {n} cartella/e.',
         dropZoneTitle: 'Trascina i file qui&hellip;'
         dropZoneTitle: 'Trascina i file qui&hellip;'
     };
     };
-
-    $.extend($.fn.fileinput.defaults, $.fn.fileinput.locales.it);
-})(window.jQuery);
+})(window.jQuery);

+ 1 - 3
js/fileinput_locale_nl.js

@@ -11,7 +11,7 @@
 (function ($) {
 (function ($) {
     "use strict";
     "use strict";
 
 
-    $.fn.fileinput.locales.nl = {
+    $.fn.fileinputLocales.nl = {
         fileSingle: 'bestand',
         fileSingle: 'bestand',
         filePlural: 'bestanden',
         filePlural: 'bestanden',
         browseLabel: 'Zoek &hellip;',
         browseLabel: 'Zoek &hellip;',
@@ -38,6 +38,4 @@
         msgFoldersNotAllowed: 'Drag & drop bestanden alleen! overgeslagen {n} mappen(s).',
         msgFoldersNotAllowed: 'Drag & drop bestanden alleen! overgeslagen {n} mappen(s).',
         dropZoneTitle: 'Drag & drop bestanden hier &hellip;'
         dropZoneTitle: 'Drag & drop bestanden hier &hellip;'
     };
     };
-
-    $.extend($.fn.fileinput.defaults, $.fn.fileinput.locales.nl);
 })(window.jQuery);
 })(window.jQuery);

+ 1 - 3
js/fileinput_locale_pl.js

@@ -11,7 +11,7 @@
 (function ($) {
 (function ($) {
     "use strict";
     "use strict";
 
 
-    $.fn.fileinput.locales.pl = {
+    $.fn.fileinputLocales.pl = {
         fileSingle: 'plik',
         fileSingle: 'plik',
         filePlural: 'pliki',
         filePlural: 'pliki',
         browseLabel: 'Przeglądaj &hellip;',
         browseLabel: 'Przeglądaj &hellip;',
@@ -38,6 +38,4 @@
         msgFoldersNotAllowed: 'Metodą przeciągnij i upuść, można przenosić tylko pliki. Pominięto {n} katalogów.',
         msgFoldersNotAllowed: 'Metodą przeciągnij i upuść, można przenosić tylko pliki. Pominięto {n} katalogów.',
         dropZoneTitle: 'Przeciągnij i upuść pliki tu &hellip;'
         dropZoneTitle: 'Przeciągnij i upuść pliki tu &hellip;'
     };
     };
-
-    $.extend($.fn.fileinput.defaults, $.fn.fileinput.locales.pl);
 })(window.jQuery);
 })(window.jQuery);

+ 1 - 3
js/fileinput_locale_pt.js

@@ -11,7 +11,7 @@
 (function ($) {
 (function ($) {
     "use strict";
     "use strict";
 
 
-    $.fn.fileinput.locales.pt= {
+    $.fn.fileinputLocales.pt= {
         fileSingle: 'ficheiro',
         fileSingle: 'ficheiro',
         filePlural: 'ficheiros',
         filePlural: 'ficheiros',
         browseLabel: 'Procurar &hellip;',
         browseLabel: 'Procurar &hellip;',
@@ -38,6 +38,4 @@
         msgFoldersNotAllowed: 'Arrastar e largar ficheiros apenas! {n} pasta(s) ignoradas.',
         msgFoldersNotAllowed: 'Arrastar e largar ficheiros apenas! {n} pasta(s) ignoradas.',
         dropZoneTitle: 'Arrastar e largar ficheiros aqui &hellip;'
         dropZoneTitle: 'Arrastar e largar ficheiros aqui &hellip;'
     };
     };
-
-    $.extend($.fn.fileinput.defaults, $.fn.fileinput.locales.pt);
 })(window.jQuery);
 })(window.jQuery);

+ 1 - 3
js/fileinput_locale_ru.js

@@ -12,7 +12,7 @@
 (function ($) {
 (function ($) {
     "use strict";
     "use strict";
 
 
-    $.fn.fileinput.locales.ru = {
+    $.fn.fileinputLocales.ru = {
         fileSingle: 'файл',
         fileSingle: 'файл',
         filePlural: 'файлы',
         filePlural: 'файлы',
         browseLabel: 'Выбрать &hellip;',
         browseLabel: 'Выбрать &hellip;',
@@ -39,6 +39,4 @@
         msgFoldersNotAllowed: 'Разрешено только перетаскивание файлов! Пропущено {n} папок.',
         msgFoldersNotAllowed: 'Разрешено только перетаскивание файлов! Пропущено {n} папок.',
         dropZoneTitle: 'Перетащите файлы сюда &hellip;'
         dropZoneTitle: 'Перетащите файлы сюда &hellip;'
     };
     };
-
-    $.extend($.fn.fileinput.defaults, $.fn.fileinput.locales.ru);
 })(window.jQuery);
 })(window.jQuery);

+ 1 - 3
js/fileinput_locale_sk.js

@@ -11,7 +11,7 @@
 (function ($) {
 (function ($) {
     "use strict";
     "use strict";
 
 
-    $.fn.fileinput.locales.sk = {
+    $.fn.fileinputLocales.sk = {
         fileSingle: 'súbor',
         fileSingle: 'súbor',
         filePlural: 'súbory',
         filePlural: 'súbory',
         browseLabel: 'Vybrať &hellip;',
         browseLabel: 'Vybrať &hellip;',
@@ -38,6 +38,4 @@
         msgFoldersNotAllowed: 'Tiahni a pusť iba súbory! Vynechané {n} pustené prečinok(y).',
         msgFoldersNotAllowed: 'Tiahni a pusť iba súbory! Vynechané {n} pustené prečinok(y).',
         dropZoneTitle: 'Tiahni a pusť súbory tu &hellip;'
         dropZoneTitle: 'Tiahni a pusť súbory tu &hellip;'
     };
     };
-
-    $.extend($.fn.fileinput.defaults, $.fn.fileinput.locales.sk);
 })(window.jQuery);
 })(window.jQuery);

+ 1 - 3
js/fileinput_locale_sr.js

@@ -12,7 +12,7 @@
 (function ($) {
 (function ($) {
     "use strict";
     "use strict";
 
 
-    $.fn.fileinput.locales.sr = {
+    $.fn.fileinputLocales.sr = {
         fileSingle: 'datoteka',
         fileSingle: 'datoteka',
         filePlural: 'datoteke',
         filePlural: 'datoteke',
         browseLabel: 'Izaberi &hellip;',
         browseLabel: 'Izaberi &hellip;',
@@ -39,6 +39,4 @@
         msgFoldersNotAllowed: 'Moguće je prevlačiti samo datoteke! Preskočeno je {n} fascikla.',
         msgFoldersNotAllowed: 'Moguće je prevlačiti samo datoteke! Preskočeno je {n} fascikla.',
         dropZoneTitle: 'Prevucite datoteke ovde &hellip;'
         dropZoneTitle: 'Prevucite datoteke ovde &hellip;'
     };
     };
-
-    $.extend($.fn.fileinput.defaults, $.fn.fileinput.locales.sr);
 })(window.jQuery);
 })(window.jQuery);

+ 1 - 3
js/fileinput_locale_th.js

@@ -11,7 +11,7 @@
 (function ($) {
 (function ($) {
     "use strict";
     "use strict";
 
 
-    $.fn.fileinput.locales.th = {
+    $.fn.fileinputLocales.th = {
         fileSingle: 'ไฟล์',
         fileSingle: 'ไฟล์',
         filePlural: 'ไฟล์',
         filePlural: 'ไฟล์',
         browseLabel: 'เลือกดู &hellip;',
         browseLabel: 'เลือกดู &hellip;',
@@ -38,6 +38,4 @@
         msgFoldersNotAllowed: 'Drag & drop เฉพาะไฟล์เท่านั้น! ข้าม dropped folder จำนวน {n}',
         msgFoldersNotAllowed: 'Drag & drop เฉพาะไฟล์เท่านั้น! ข้าม dropped folder จำนวน {n}',
         dropZoneTitle: 'Drag & drop ไฟล์ตรงนี้ &hellip;'
         dropZoneTitle: 'Drag & drop ไฟล์ตรงนี้ &hellip;'
     };
     };
-
-    $.extend($.fn.fileinput.defaults, $.fn.fileinput.locales.th);
 })(window.jQuery);
 })(window.jQuery);

+ 1 - 3
js/fileinput_locale_tr.js

@@ -11,7 +11,7 @@
 (function ($) {
 (function ($) {
     "use strict";
     "use strict";
 
 
-    $.fn.fileinput.locales.tr = {
+    $.fn.fileinputLocales.tr = {
         fileSingle: 'dosya',
         fileSingle: 'dosya',
         filePlural: 'dosyalar',
         filePlural: 'dosyalar',
         browseLabel: 'Gözat &hellip;',
         browseLabel: 'Gözat &hellip;',
@@ -38,6 +38,4 @@
         msgFoldersNotAllowed: 'Yalnızca dosyaları sürükleyip bırakabilirsiniz! {n} dizin(ler) göz ardı edildi.',
         msgFoldersNotAllowed: 'Yalnızca dosyaları sürükleyip bırakabilirsiniz! {n} dizin(ler) göz ardı edildi.',
         dropZoneTitle: 'Dosyaları buraya sürükleyip bırakın &hellip;'
         dropZoneTitle: 'Dosyaları buraya sürükleyip bırakın &hellip;'
     };
     };
-
-    $.extend($.fn.fileinput.defaults, $.fn.fileinput.locales.tr);
 })(window.jQuery);
 })(window.jQuery);

+ 2 - 4
js/fileinput_locale_uk.js

@@ -12,7 +12,7 @@
 (function ($) {
 (function ($) {
     "use strict";
     "use strict";
 
 
-    $.fn.fileinput.locales.uk = {
+    $.fn.fileinputLocales.uk = {
         fileSingle: 'файл',
         fileSingle: 'файл',
         filePlural: 'файли',
         filePlural: 'файли',
         browseLabel: 'Вибрати &hellip;',
         browseLabel: 'Вибрати &hellip;',
@@ -39,6 +39,4 @@
         msgFoldersNotAllowed: 'Дозволено перетягувати тільки файли! Пропущено {n} папок.',
         msgFoldersNotAllowed: 'Дозволено перетягувати тільки файли! Пропущено {n} папок.',
         dropZoneTitle: 'Перетяніть файли сюди &hellip;'
         dropZoneTitle: 'Перетяніть файли сюди &hellip;'
     };
     };
-
-    $.extend($.fn.fileinput.defaults, $.fn.fileinput.locales.uk);
-})(window.jQuery);
+})(window.jQuery);

+ 2 - 4
js/fileinput_locale_zh.js

@@ -12,7 +12,7 @@
 (function ($) {
 (function ($) {
     "use strict";
     "use strict";
 
 
-    $.fn.fileinput.locales.zh = {
+    $.fn.fileinputLocales.zh = {
         fileSingle: '文件',
         fileSingle: '文件',
         filePlural: '多个文件',
         filePlural: '多个文件',
         browseLabel: '选择 &hellip;',
         browseLabel: '选择 &hellip;',
@@ -42,6 +42,4 @@
             return text ? text.split(/(\\|\/)/g).pop().replace(/[^\w\u4e00-\u9fa5\-.\\\/ ]+/g, '') : '';
             return text ? text.split(/(\\|\/)/g).pop().replace(/[^\w\u4e00-\u9fa5\-.\\\/ ]+/g, '') : '';
         }
         }
     };
     };
-
-    $.extend($.fn.fileinput.defaults, $.fn.fileinput.locales.zh);
-})(window.jQuery);
+})(window.jQuery);

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů