From 17fde3fe99bf3484439b65d15e44b9a20f53514e Mon Sep 17 00:00:00 2001 From: Phuoc Nguyen Date: Sat, 23 Aug 2014 09:15:39 +0700 Subject: [PATCH] Add jquery.bootstrapvalidator v0.5.1 --- .../0.5.1/css/bootstrapValidator.css | 21 + .../0.5.1/css/bootstrapValidator.min.css | 11 + .../0.5.1/js/bootstrapValidator.js | 6844 +++++++++++++++++ .../0.5.1/js/bootstrapValidator.min.js | 12 + .../0.5.1/js/language/ar_MA.js | 342 + .../0.5.1/js/language/be_NL.js | 342 + .../0.5.1/js/language/bg_BG.js | 342 + .../0.5.1/js/language/cs_CZ.js | 342 + .../0.5.1/js/language/da_DK.js | 342 + .../0.5.1/js/language/de_DE.js | 342 + .../0.5.1/js/language/en_US.js | 342 + .../0.5.1/js/language/es_CL.js | 342 + .../0.5.1/js/language/es_ES.js | 342 + .../0.5.1/js/language/fr_FR.js | 342 + .../0.5.1/js/language/gr_EL.js | 342 + .../0.5.1/js/language/hu_HU.js | 342 + .../0.5.1/js/language/it_IT.js | 342 + .../0.5.1/js/language/nl_NL.js | 342 + .../0.5.1/js/language/pl_PL.js | 342 + .../0.5.1/js/language/pt_BR.js | 342 + .../0.5.1/js/language/tr_TR.js | 342 + .../0.5.1/js/language/vi_VN.js | 342 + .../0.5.1/js/language/zh_CN.js | 342 + .../0.5.1/js/language/zh_TW.js | 342 + .../jquery.bootstrapvalidator/package.json | 2 +- 25 files changed, 13729 insertions(+), 1 deletion(-) create mode 100644 ajax/libs/jquery.bootstrapvalidator/0.5.1/css/bootstrapValidator.css create mode 100644 ajax/libs/jquery.bootstrapvalidator/0.5.1/css/bootstrapValidator.min.css create mode 100644 ajax/libs/jquery.bootstrapvalidator/0.5.1/js/bootstrapValidator.js create mode 100644 ajax/libs/jquery.bootstrapvalidator/0.5.1/js/bootstrapValidator.min.js create mode 100644 ajax/libs/jquery.bootstrapvalidator/0.5.1/js/language/ar_MA.js create mode 100644 ajax/libs/jquery.bootstrapvalidator/0.5.1/js/language/be_NL.js create mode 100644 ajax/libs/jquery.bootstrapvalidator/0.5.1/js/language/bg_BG.js create mode 100644 ajax/libs/jquery.bootstrapvalidator/0.5.1/js/language/cs_CZ.js create mode 100644 ajax/libs/jquery.bootstrapvalidator/0.5.1/js/language/da_DK.js create mode 100644 ajax/libs/jquery.bootstrapvalidator/0.5.1/js/language/de_DE.js create mode 100644 ajax/libs/jquery.bootstrapvalidator/0.5.1/js/language/en_US.js create mode 100644 ajax/libs/jquery.bootstrapvalidator/0.5.1/js/language/es_CL.js create mode 100644 ajax/libs/jquery.bootstrapvalidator/0.5.1/js/language/es_ES.js create mode 100644 ajax/libs/jquery.bootstrapvalidator/0.5.1/js/language/fr_FR.js create mode 100644 ajax/libs/jquery.bootstrapvalidator/0.5.1/js/language/gr_EL.js create mode 100644 ajax/libs/jquery.bootstrapvalidator/0.5.1/js/language/hu_HU.js create mode 100644 ajax/libs/jquery.bootstrapvalidator/0.5.1/js/language/it_IT.js create mode 100644 ajax/libs/jquery.bootstrapvalidator/0.5.1/js/language/nl_NL.js create mode 100644 ajax/libs/jquery.bootstrapvalidator/0.5.1/js/language/pl_PL.js create mode 100644 ajax/libs/jquery.bootstrapvalidator/0.5.1/js/language/pt_BR.js create mode 100644 ajax/libs/jquery.bootstrapvalidator/0.5.1/js/language/tr_TR.js create mode 100644 ajax/libs/jquery.bootstrapvalidator/0.5.1/js/language/vi_VN.js create mode 100644 ajax/libs/jquery.bootstrapvalidator/0.5.1/js/language/zh_CN.js create mode 100644 ajax/libs/jquery.bootstrapvalidator/0.5.1/js/language/zh_TW.js diff --git a/ajax/libs/jquery.bootstrapvalidator/0.5.1/css/bootstrapValidator.css b/ajax/libs/jquery.bootstrapvalidator/0.5.1/css/bootstrapValidator.css new file mode 100644 index 000000000..ebe9522f6 --- /dev/null +++ b/ajax/libs/jquery.bootstrapvalidator/0.5.1/css/bootstrapValidator.css @@ -0,0 +1,21 @@ +/** + * BootstrapValidator (http://bootstrapvalidator.com) + * The best jQuery plugin to validate form fields. Designed to use with Bootstrap 3 + * + * @author http://twitter.com/nghuuphuoc + * @copyright (c) 2013 - 2014 Nguyen Huu Phuoc + * @license MIT + */ + +.bv-form .help-block { + margin-bottom: 0; +} +.bv-form .tooltip-inner { + text-align: left; +} +.nav-tabs li.bv-tab-success > a { + color: #3c763d; +} +.nav-tabs li.bv-tab-error > a { + color: #a94442; +} diff --git a/ajax/libs/jquery.bootstrapvalidator/0.5.1/css/bootstrapValidator.min.css b/ajax/libs/jquery.bootstrapvalidator/0.5.1/css/bootstrapValidator.min.css new file mode 100644 index 000000000..15c0b8dce --- /dev/null +++ b/ajax/libs/jquery.bootstrapvalidator/0.5.1/css/bootstrapValidator.min.css @@ -0,0 +1,11 @@ +/*! + * BootstrapValidator (http://bootstrapvalidator.com) + * The best jQuery plugin to validate form fields. Designed to use with Bootstrap 3 + * + * @version v0.5.1, built on 2014-08-22 4:55:09 PM + * @author https://twitter.com/nghuuphuoc + * @copyright (c) 2013 - 2014 Nguyen Huu Phuoc + * @license MIT + */ + +.bv-form .help-block{margin-bottom:0}.bv-form .tooltip-inner{text-align:left}.nav-tabs li.bv-tab-success>a{color:#3c763d}.nav-tabs li.bv-tab-error>a{color:#a94442} \ No newline at end of file diff --git a/ajax/libs/jquery.bootstrapvalidator/0.5.1/js/bootstrapValidator.js b/ajax/libs/jquery.bootstrapvalidator/0.5.1/js/bootstrapValidator.js new file mode 100644 index 000000000..98fe4e024 --- /dev/null +++ b/ajax/libs/jquery.bootstrapvalidator/0.5.1/js/bootstrapValidator.js @@ -0,0 +1,6844 @@ +/*! + * BootstrapValidator (http://bootstrapvalidator.com) + * The best jQuery plugin to validate form fields. Designed to use with Bootstrap 3 + * + * @version v0.5.1, built on 2014-08-22 4:55:09 PM + * @author https://twitter.com/nghuuphuoc + * @copyright (c) 2013 - 2014 Nguyen Huu Phuoc + * @license MIT + */ +(function($) { + var BootstrapValidator = function(form, options) { + this.$form = $(form); + this.options = $.extend({}, $.fn.bootstrapValidator.DEFAULT_OPTIONS, options); + + this.$invalidFields = $([]); // Array of invalid fields + this.$submitButton = null; // The submit button which is clicked to submit form + this.$hiddenButton = null; + + // Validating status + this.STATUS_NOT_VALIDATED = 'NOT_VALIDATED'; + this.STATUS_VALIDATING = 'VALIDATING'; + this.STATUS_INVALID = 'INVALID'; + this.STATUS_VALID = 'VALID'; + + // Determine the event that is fired when user change the field value + // Most modern browsers supports input event except IE 7, 8. + // IE 9 supports input event but the event is still not fired if I press the backspace key. + // Get IE version + // https://gist.github.com/padolsey/527683/#comment-7595 + var ieVersion = (function() { + var v = 3, div = document.createElement('div'), a = div.all || []; + while (div.innerHTML = '', a[0]) {} + return v > 4 ? v : !v; + }()); + + var el = document.createElement('div'); + this._changeEvent = (ieVersion === 9 || !('oninput' in el)) ? 'keyup' : 'input'; + + // The flag to indicate that the form is ready to submit when a remote/callback validator returns + this._submitIfValid = null; + + // Field elements + this._cacheFields = {}; + + this._init(); + }; + + BootstrapValidator.prototype = { + constructor: BootstrapValidator, + + /** + * Init form + */ + _init: function() { + var that = this, + options = { + excluded: this.$form.attr('data-bv-excluded'), + trigger: this.$form.attr('data-bv-trigger'), + message: this.$form.attr('data-bv-message'), + container: this.$form.attr('data-bv-container'), + group: this.$form.attr('data-bv-group'), + submitButtons: this.$form.attr('data-bv-submitbuttons'), + threshold: this.$form.attr('data-bv-threshold'), + live: this.$form.attr('data-bv-live'), + onSuccess: this.$form.attr('data-bv-onsuccess'), + onError: this.$form.attr('data-bv-onerror'), + fields: {}, + feedbackIcons: { + valid: this.$form.attr('data-bv-feedbackicons-valid'), + invalid: this.$form.attr('data-bv-feedbackicons-invalid'), + validating: this.$form.attr('data-bv-feedbackicons-validating') + }, + events: { + formInit: this.$form.attr('data-bv-events-form-init'), + formError: this.$form.attr('data-bv-events-form-error'), + formSuccess: this.$form.attr('data-bv-events-form-success'), + fieldAdded: this.$form.attr('data-bv-events-field-added'), + fieldRemoved: this.$form.attr('data-bv-events-field-removed'), + fieldInit: this.$form.attr('data-bv-events-field-init'), + fieldError: this.$form.attr('data-bv-events-field-error'), + fieldSuccess: this.$form.attr('data-bv-events-field-success'), + fieldStatus: this.$form.attr('data-bv-events-field-status'), + validatorError: this.$form.attr('data-bv-events-validator-error'), + validatorSuccess: this.$form.attr('data-bv-events-validator-success') + } + }; + + this.$form + // Disable client side validation in HTML 5 + .attr('novalidate', 'novalidate') + .addClass(this.options.elementClass) + // Disable the default submission first + .on('submit.bv', function(e) { + e.preventDefault(); + that.validate(); + }) + .on('click.bv', this.options.submitButtons, function() { + that.$submitButton = $(this); + // The user just click the submit button + that._submitIfValid = true; + }) + // Find all fields which have either "name" or "data-bv-field" attribute + .find('[name], [data-bv-field]') + .each(function() { + var $field = $(this), + field = $field.attr('name') || $field.attr('data-bv-field'), + opts = that._parseOptions($field); + if (opts) { + $field.attr('data-bv-field', field); + options.fields[field] = $.extend({}, opts, options.fields[field]); + } + }); + + this.options = $.extend(true, this.options, options); + + // When pressing Enter on any field in the form, the first submit button will do its job. + // The form then will be submitted. + // I create a first hidden submit button + this.$hiddenButton = $('