Sfoglia il codice sorgente

Upgrade to release v2.9.0

Kartik Visweswaran 10 anni fa
parent
commit
10ba6b4cba
8 ha cambiato i file con 39 aggiunte e 7 eliminazioni
  1. 8 0
      CHANGE.md
  2. 20 2
      README.md
  3. 1 1
      bower.json
  4. 1 1
      css/fileinput.css
  5. 1 1
      css/fileinput.min.css
  6. 6 0
      examples/index.html
  7. 1 1
      js/fileinput.js
  8. 1 1
      js/fileinput.min.js

+ 8 - 0
CHANGE.md

@@ -1,3 +1,11 @@
+version 2.9.0
+=============
+**Date:** 22-Nov-2014
+
+1. (enh #53): Validations and events for right reset of files when browse button is clicked.
+2. (enh #55): Clear the files when file browse dialog is cancelled only if the browser clears the native file input.
+3. (enh #56): Trigger new events `filebrowse` and `fileselectnone`.
+
 version 2.8.0
 =============
 **Date:** 13-Nov-2014

+ 20 - 2
README.md

@@ -7,7 +7,7 @@ wide variety of files i.e. images, text, html, video, audio, flash, and objects.
 
 ![File Input Screenshot](https://lh3.googleusercontent.com/-3FiEmc_okc4/VBw_d2LBAJI/AAAAAAAAAL8/KbVj5X9Dus0/w596-h454-no/FileInput.jpg)
 
-> NOTE: The latest version of the plugin v2.8.0 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 v2.9.0 has been released. Refer the [CHANGE LOG](https://github.com/kartik-v/bootstrap-fileinput/blob/master/CHANGE.md) for details.
 
 ## Features  
 
@@ -715,13 +715,31 @@ This event is triggered when each file image is fully loaded in the preview wind
 
 - `previewId`: the identifier for the preview file container.
 
-
 **Example:**
 ```js
 $('#input-id').on('fileimageloaded', function(event, previewId) {
     console.log("fileimageloaded");
 });
 ```
+#### filebrowse
+This event is triggered when the file browse button is clicked to open the file selection dialog.
+
+**Example:**
+```js
+$('#input-id').on('filebrowse', function(event) {
+    console.log("File browse triggered.");
+});
+```
+
+#### fileselectnone
+This event is triggered when no files are selected by the user for a repeat selection scenario (i.e. on a file input that already contains previously selected files). This event is better applicable for browsers like Google Chrome, which clear the file input when the file selection dialog is cancelled. For other browsers, this event is typically triggered only when one resets the form or clears file input (using the remove button).
+
+**Example:**
+```js
+$('#input-id').on('fileselectnone', function(event) {
+    console.log("Huh! No files were selected.");
+});
+```
 
 ### Plugin Methods
 The plugin supports these methods:

+ 1 - 1
bower.json

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

+ 1 - 1
css/fileinput.css

@@ -1,7 +1,7 @@
 /*!
  * @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014
  * @package bootstrap-fileinput
- * @version 2.8.0
+ * @version 2.9.0
  *
  * File input styling for Bootstrap 3.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
  * @package bootstrap-fileinput
- * @version 2.8.0
+ * @version 2.9.0
  *
  * File input styling for Bootstrap 3.0
  * Built for Yii Framework 2.0

+ 6 - 0
examples/index.html

@@ -62,6 +62,12 @@
             $('#file-4').fileinput('disable');
         }
     });
+    $('#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,

+ 1 - 1
js/fileinput.js

@@ -1,6 +1,6 @@
 /*!
  * @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014
- * @version 2.8.0
+ * @version 2.9.0
  *
  * File input styled for Bootstrap 3.0 that utilizes HTML5 File Input's advanced 
  * features including the FileReader API. 

File diff suppressed because it is too large
+ 1 - 1
js/fileinput.min.js


Some files were not shown because too many files changed in this diff