Skip to content
Extraits de code Groupes Projets
Valider c318b026 rédigé par marcimat's avatar marcimat
Parcourir les fichiers

Mise à jour de jquery forms en version 3.51.0 (Francky)

parent d6b94b78
Branches
Étiquettes
Aucune requête de fusion associée trouvée
/*! /*!
* jQuery Form Plugin * jQuery Form Plugin
* version: 3.48.0-2013.12.28 * version: 3.51.0-2014.06.20
* Requires jQuery v1.5 or later * Requires jQuery v1.5 or later
* Copyright (c) 2013 M. Alsup * Copyright (c) 2014 M. Alsup
* Examples and documentation at: http://malsup.com/jquery/form/ * Examples and documentation at: http://malsup.com/jquery/form/
* Project repository: https://github.com/malsup/form * Project repository: https://github.com/malsup/form
* Dual licensed under the MIT and GPL licenses. * Dual licensed under the MIT and GPL licenses.
...@@ -950,13 +950,13 @@ $.fn.formToArray = function(semantic, elements) { ...@@ -950,13 +950,13 @@ $.fn.formToArray = function(semantic, elements) {
var els = semantic ? form.getElementsByTagName('*') : form.elements; var els = semantic ? form.getElementsByTagName('*') : form.elements;
var els2; var els2;
if ( els ) { if (els && !/MSIE [678]/.test(navigator.userAgent)) { // #390
els = $(els).get(); // convert to standard array els = $(els).get(); // convert to standard array
} }
// #386; account for inputs outside the form which use the 'form' attribute // #386; account for inputs outside the form which use the 'form' attribute
if ( formId ) { if ( formId ) {
els2 = $(':input[form=' + formId + ']').get(); els2 = $(':input[form="' + formId + '"]').get(); // hat tip @thet
if ( els2.length ) { if ( els2.length ) {
els = (els || []).concat(els2); els = (els || []).concat(els2);
} }
...@@ -1188,13 +1188,13 @@ $.fn.clearFields = $.fn.clearInputs = function(includeHidden) { ...@@ -1188,13 +1188,13 @@ $.fn.clearFields = $.fn.clearInputs = function(includeHidden) {
else if (tag == 'select') { else if (tag == 'select') {
this.selectedIndex = -1; this.selectedIndex = -1;
} }
else if (t == "file") { else if (t == "file") {
if (/MSIE/.test(navigator.userAgent)) { if (/MSIE/.test(navigator.userAgent)) {
$(this).replaceWith($(this).clone(true)); $(this).replaceWith($(this).clone(true));
} else { } else {
$(this).val(''); $(this).val('');
} }
} }
else if (includeHidden) { else if (includeHidden) {
// includeHidden can be the value true, or it can be a selector string // includeHidden can be the value true, or it can be a selector string
// indicating a special test; for example: // indicating a special test; for example:
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter