diff options
Diffstat (limited to 'script')
66 files changed, 5054 insertions, 0 deletions
diff --git a/script/jquery-steps/jquery.steps.js b/script/jquery-steps/jquery.steps.js new file mode 100644 index 0000000..4d0525a --- /dev/null +++ b/script/jquery-steps/jquery.steps.js @@ -0,0 +1,2042 @@ +/*! + * jQuery Steps v1.1.0 - 09/04/2014 + * Copyright (c) 2014 Rafael Staib (http://www.jquery-steps.com) + * Licensed under MIT http://www.opensource.org/licenses/MIT + */ +;(function ($, undefined) +{ +$.fn.extend({ + _aria: function (name, value) + { + return this.attr("aria-" + name, value); + }, + + _removeAria: function (name) + { + return this.removeAttr("aria-" + name); + }, + + _enableAria: function (enable) + { + return (enable == null || enable) ? + this.removeClass("disabled")._aria("disabled", "false") : + this.addClass("disabled")._aria("disabled", "true"); + }, + + _showAria: function (show) + { + return (show == null || show) ? + this.show()._aria("hidden", "false") : + this.hide()._aria("hidden", "true"); + }, + + _selectAria: function (select) + { + return (select == null || select) ? + this.addClass("current")._aria("selected", "true") : + this.removeClass("current")._aria("selected", "false"); + }, + + _id: function (id) + { + return (id) ? this.attr("id", id) : this.attr("id"); + } +}); + +if (!String.prototype.format) +{ + String.prototype.format = function() + { + var args = (arguments.length === 1 && $.isArray(arguments[0])) ? arguments[0] : arguments; + var formattedString = this; + for (var i = 0; i < args.length; i++) + { + var pattern = new RegExp("\\{" + i + "\\}", "gm"); + formattedString = formattedString.replace(pattern, args[i]); + } + return formattedString; + }; +} + +/** + * A global unique id count. + * + * @static + * @private + * @property _uniqueId + * @type Integer + **/ +var _uniqueId = 0; + +/** + * The plugin prefix for cookies. + * + * @final + * @private + * @property _cookiePrefix + * @type String + **/ +var _cookiePrefix = "jQu3ry_5teps_St@te_"; + +/** + * Suffix for the unique tab id. + * + * @final + * @private + * @property _tabSuffix + * @type String + * @since 0.9.7 + **/ +var _tabSuffix = "-t-"; + +/** + * Suffix for the unique tabpanel id. + * + * @final + * @private + * @property _tabpanelSuffix + * @type String + * @since 0.9.7 + **/ +var _tabpanelSuffix = "-p-"; + +/** + * Suffix for the unique title id. + * + * @final + * @private + * @property _titleSuffix + * @type String + * @since 0.9.7 + **/ +var _titleSuffix = "-h-"; + +/** + * An error message for an "index out of range" error. + * + * @final + * @private + * @property _indexOutOfRangeErrorMessage + * @type String + **/ +var _indexOutOfRangeErrorMessage = "Index out of range."; + +/** + * An error message for an "missing corresponding element" error. + * + * @final + * @private + * @property _missingCorrespondingElementErrorMessage + * @type String + **/ +var _missingCorrespondingElementErrorMessage = "One or more corresponding step {0} are missing."; + +/** + * Adds a step to the cache. + * + * @static + * @private + * @method addStepToCache + * @param wizard {Object} A jQuery wizard object + * @param step {Object} The step object to add + **/ +function addStepToCache(wizard, step) +{ + getSteps(wizard).push(step); +} + +function analyzeData(wizard, options, state) +{ + var stepTitles = wizard.children(options.headerTag), + stepContents = wizard.children(options.bodyTag); + + // Validate content + if (stepTitles.length > stepContents.length) + { + throwError(_missingCorrespondingElementErrorMessage, "contents"); + } + else if (stepTitles.length < stepContents.length) + { + throwError(_missingCorrespondingElementErrorMessage, "titles"); + } + + var startIndex = options.startIndex; + + state.stepCount = stepTitles.length; + + // Tries to load the saved state (step position) + if (options.saveState && $.cookie) + { + var savedState = $.cookie(_cookiePrefix + getUniqueId(wizard)); + // Sets the saved position to the start index if not undefined or out of range + var savedIndex = parseInt(savedState, 0); + if (!isNaN(savedIndex) && savedIndex < state.stepCount) + { + startIndex = savedIndex; + } + } + + state.currentIndex = startIndex; + + stepTitles.each(function (index) + { + var item = $(this), // item == header + content = stepContents.eq(index), + modeData = content.data("mode"), + mode = (modeData == null) ? contentMode.html : getValidEnumValue(contentMode, + (/^\s*$/.test(modeData) || isNaN(modeData)) ? modeData : parseInt(modeData, 0)), + contentUrl = (mode === contentMode.html || content.data("url") === undefined) ? + "" : content.data("url"), + contentLoaded = (mode !== contentMode.html && content.data("loaded") === "1"), + step = jQuery.extend({}, stepModel, { + title: item.html(), + content: (mode === contentMode.html) ? content.html() : "", + contentUrl: contentUrl, + contentMode: mode, + contentLoaded: contentLoaded + }); + + addStepToCache(wizard, step); + }); +} + +/** + * Triggers the onCanceled event. + * + * @static + * @private + * @method cancel + * @param wizard {Object} The jQuery wizard object + **/ +function cancel(wizard) +{ + wizard.triggerHandler("canceled"); +} + +function decreaseCurrentIndexBy(state, decreaseBy) +{ + return state.currentIndex - decreaseBy; +} + +/** + * Removes the control functionality completely and transforms the current state to the initial HTML structure. + * + * @static + * @private + * @method destroy + * @param wizard {Object} A jQuery wizard object + **/ +function destroy(wizard, options) +{ + var eventNamespace = getEventNamespace(wizard); + + // Remove virtual data objects from the wizard + wizard.unbind(eventNamespace).removeData("uid").removeData("options") + .removeData("state").removeData("steps").removeData("eventNamespace") + .find(".actions a").unbind(eventNamespace); + + // Remove attributes and CSS classes from the wizard + wizard.removeClass(options.clearFixCssClass + " vertical"); + + var contents = wizard.find(".content > *"); + + // Remove virtual data objects from panels and their titles + contents.removeData("loaded").removeData("mode").removeData("url"); + + // Remove attributes, CSS classes and reset inline styles on all panels and their titles + contents.removeAttr("id").removeAttr("role").removeAttr("tabindex") + .removeAttr("class").removeAttr("style")._removeAria("labelledby") + ._removeAria("hidden"); + + // Empty panels if the mode is set to 'async' or 'iframe' + wizard.find(".content > [data-mode='async'],.content > [data-mode='iframe']").empty(); + + var wizardSubstitute = $("<{0} class=\"{1}\"></{0}>".format(wizard.get(0).tagName, wizard.attr("class"))); + + var wizardId = wizard._id(); + if (wizardId != null && wizardId !== "") + { + wizardSubstitute._id(wizardId); + } + + wizardSubstitute.html(wizard.find(".content").html()); + wizard.after(wizardSubstitute); + wizard.remove(); + + return wizardSubstitute; +} + +/** + * Triggers the onFinishing and onFinished event. + * + * @static + * @private + * @method finishStep + * @param wizard {Object} The jQuery wizard object + * @param state {Object} The state container of the current wizard + **/ +function finishStep(wizard, state) +{ + var currentStep = wizard.find(".steps li").eq(state.currentIndex); + + if (wizard.triggerHandler("finishing", [state.currentIndex])) + { + currentStep.addClass("done").removeClass("error"); + wizard.triggerHandler("finished", [state.currentIndex]); + } + else + { + currentStep.addClass("error"); + } +} + +/** + * Gets or creates if not exist an unique event namespace for the given wizard instance. + * + * @static + * @private + * @method getEventNamespace + * @param wizard {Object} A jQuery wizard object + * @return {String} Returns the unique event namespace for the given wizard + */ +function getEventNamespace(wizard) +{ + var eventNamespace = wizard.data("eventNamespace"); + + if (eventNamespace == null) + { + eventNamespace = "." + getUniqueId(wizard); + wizard.data("eventNamespace", eventNamespace); + } + + return eventNamespace; +} + +function getStepAnchor(wizard, index) +{ + var uniqueId = getUniqueId(wizard); + + return wizard.find("#" + uniqueId + _tabSuffix + index); +} + +function getStepPanel(wizard, index) +{ + var uniqueId = getUniqueId(wizard); + + return wizard.find("#" + uniqueId + _tabpanelSuffix + index); +} + +function getStepTitle(wizard, index) +{ + var uniqueId = getUniqueId(wizard); + + return wizard.find("#" + uniqueId + _titleSuffix + index); +} + +function getOptions(wizard) +{ + return wizard.data("options"); +} + +function getState(wizard) +{ + return wizard.data("state"); +} + +function getSteps(wizard) +{ + return wizard.data("steps"); +} + +/** + * Gets a specific step object by index. + * + * @static + * @private + * @method getStep + * @param index {Integer} An integer that belongs to the position of a step + * @return {Object} A specific step object + **/ +function getStep(wizard, index) +{ + var steps = getSteps(wizard); + + if (index < 0 || index >= steps.length) + { + throwError(_indexOutOfRangeErrorMessage); + } + + return steps[index]; +} + +/** + * Gets or creates if not exist an unique id from the given wizard instance. + * + * @static + * @private + * @method getUniqueId + * @param wizard {Object} A jQuery wizard object + * @return {String} Returns the unique id for the given wizard + */ +function getUniqueId(wizard) +{ + var uniqueId = wizard.data("uid"); + + if (uniqueId == null) + { + uniqueId = wizard._id(); + if (uniqueId == null) + { + uniqueId = "steps-uid-".concat(_uniqueId); + wizard._id(uniqueId); + } + + _uniqueId++; + wizard.data("uid", uniqueId); + } + + return uniqueId; +} + +/** + * Gets a valid enum value by checking a specific enum key or value. + * + * @static + * @private + * @method getValidEnumValue + * @param enumType {Object} Type of enum + * @param keyOrValue {Object} Key as `String` or value as `Integer` to check for + */ +function getValidEnumValue(enumType, keyOrValue) +{ + validateArgument("enumType", enumType); + validateArgument("keyOrValue", keyOrValue); + + // Is key + if (typeof keyOrValue === "string") + { + var value = enumType[keyOrValue]; + if (value === undefined) + { + throwError("The enum key '{0}' does not exist.", keyOrValue); + } + + return value; + } + // Is value + else if (typeof keyOrValue === "number") + { + for (var key in enumType) + { + if (enumType[key] === keyOrValue) + { + return keyOrValue; + } + } + + throwError("Invalid enum value '{0}'.", keyOrValue); + } + // Type is not supported + else + { + throwError("Invalid key or value type."); + } +} + +/** + * Routes to the next step. + * + * @static + * @private + * @method goToNextStep + * @param wizard {Object} The jQuery wizard object + * @param options {Object} Settings of the current wizard + * @param state {Object} The state container of the current wizard + * @return {Boolean} Indicates whether the action executed + **/ +function goToNextStep(wizard, options, state) +{ + return paginationClick(wizard, options, state, increaseCurrentIndexBy(state, 1)); +} + +/** + * Routes to the previous step. + * + * @static + * @private + * @method goToPreviousStep + * @param wizard {Object} The jQuery wizard object + * @param options {Object} Settings of the current wizard + * @param state {Object} The state container of the current wizard + * @return {Boolean} Indicates whether the action executed + **/ +function goToPreviousStep(wizard, options, state) +{ + return paginationClick(wizard, options, state, decreaseCurrentIndexBy(state, 1)); +} + +/** + * Routes to a specific step by a given index. + * + * @static + * @private + * @method goToStep + * @param wizard {Object} The jQuery wizard object + * @param options {Object} Settings of the current wizard + * @param state {Object} The state container of the current wizard + * @param index {Integer} The position (zero-based) to route to + * @return {Boolean} Indicates whether the action succeeded or failed + **/ +function goToStep(wizard, options, state, index) +{ + if (index < 0 || index >= state.stepCount) + { + throwError(_indexOutOfRangeErrorMessage); + } + + if (options.forceMoveForward && index < state.currentIndex) + { + return; + } + + var oldIndex = state.currentIndex; + if (wizard.triggerHandler("stepChanging", [state.currentIndex, index])) + { + // Save new state + state.currentIndex = index; + saveCurrentStateToCookie(wizard, options, state); + + // Change visualisation + refreshStepNavigation(wizard, options, state, oldIndex); + refreshPagination(wizard, options, state); + loadAsyncContent(wizard, options, state); + startTransitionEffect(wizard, options, state, index, oldIndex, function() + { + wizard.triggerHandler("stepChanged", [index, oldIndex]); + }); + } + else + { + wizard.find(".steps li").eq(oldIndex).addClass("error"); + } + + return true; +} + +function increaseCurrentIndexBy(state, increaseBy) +{ + return state.currentIndex + increaseBy; +} + +/** + * Initializes the component. + * + * @static + * @private + * @method initialize + * @param options {Object} The component settings + **/ +function initialize(options) +{ + /*jshint -W040 */ + var opts = jQuery.extend(true, {}, defaults, options); + + return this.each(function () + { + var wizard = $(this); + var state = { + currentIndex: opts.startIndex, + currentStep: null, + stepCount: 0, + transitionElement: null + }; + + // Create data container + wizard.data("options", opts); + wizard.data("state", state); + wizard.data("steps", []); + + analyzeData(wizard, opts, state); + render(wizard, opts, state); + registerEvents(wizard, opts); + + // Trigger focus + if (opts.autoFocus && _uniqueId === 0) + { + getStepAnchor(wizard, opts.startIndex).focus(); + } + + wizard.triggerHandler("init", [opts.startIndex]); + }); +} + +/** + * Inserts a new step to a specific position. + * + * @static + * @private + * @method insertStep + * @param wizard {Object} The jQuery wizard object + * @param options {Object} Settings of the current wizard + * @param state {Object} The state container of the current wizard + * @param index {Integer} The position (zero-based) to add + * @param step {Object} The step object to add + * @example + * $("#wizard").steps().insert(0, { + * title: "Title", + * content: "", // optional + * contentMode: "async", // optional + * contentUrl: "/Content/Step/1" // optional + * }); + * @chainable + **/ +function insertStep(wizard, options, state, index, step) +{ + if (index < 0 || index > state.stepCount) + { + throwError(_indexOutOfRangeErrorMessage); + } + + // TODO: Validate step object + + // Change data + step = jQuery.extend({}, stepModel, step); + insertStepToCache(wizard, index, step); + if (state.currentIndex !== state.stepCount && state.currentIndex >= index) + { + state.currentIndex++; + saveCurrentStateToCookie(wizard, options, state); + } + state.stepCount++; + + var contentContainer = wizard.find(".content"), + header = $("<{0}>{1}</{0}>".format(options.headerTag, step.title)), + body = $("<{0}></{0}>".format(options.bodyTag)); + + if (step.contentMode == null || step.contentMode === contentMode.html) + { + body.html(step.content); + } + + if (index === 0) + { + contentContainer.prepend(body).prepend(header); + } + else + { + getStepPanel(wizard, (index - 1)).after(body).after(header); + } + + renderBody(wizard, state, body, index); + renderTitle(wizard, options, state, header, index); + refreshSteps(wizard, options, state, index); + if (index === state.currentIndex) + { + refreshStepNavigation(wizard, options, state); + } + refreshPagination(wizard, options, state); + + return wizard; +} + +/** + * Inserts a step object to the cache at a specific position. + * + * @static + * @private + * @method insertStepToCache + * @param wizard {Object} A jQuery wizard object + * @param index {Integer} The position (zero-based) to add + * @param step {Object} The step object to add + **/ +function insertStepToCache(wizard, index, step) +{ + getSteps(wizard).splice(index, 0, step); +} + +/** + * Handles the keyup DOM event for pagination. + * + * @static + * @private + * @event keyup + * @param event {Object} An event object + */ +function keyUpHandler(event) +{ + var wizard = $(this), + options = getOptions(wizard), + state = getState(wizard); + + if (options.suppressPaginationOnFocus && wizard.find(":focus").is(":input")) + { + event.preventDefault(); + return false; + } + + var keyCodes = { left: 37, right: 39 }; + if (event.keyCode === keyCodes.left) + { + event.preventDefault(); + goToPreviousStep(wizard, options, state); + } + else if (event.keyCode === keyCodes.right) + { + event.preventDefault(); + goToNextStep(wizard, options, state); + } +} + +/** + * Loads and includes async content. + * + * @static + * @private + * @method loadAsyncContent + * @param wizard {Object} A jQuery wizard object + * @param options {Object} Settings of the current wizard + * @param state {Object} The state container of the current wizard + */ +function loadAsyncContent(wizard, options, state) +{ + if (state.stepCount > 0) + { + var currentIndex = state.currentIndex, + currentStep = getStep(wizard, currentIndex); + + if (!options.enableContentCache || !currentStep.contentLoaded) + { + switch (getValidEnumValue(contentMode, currentStep.contentMode)) + { + case contentMode.iframe: + wizard.find(".content > .body").eq(state.currentIndex).empty() + .html("<iframe src=\"" + currentStep.contentUrl + "\" frameborder=\"0\" scrolling=\"no\" />") + .data("loaded", "1"); + break; + + case contentMode.async: + var currentStepContent = getStepPanel(wizard, currentIndex)._aria("busy", "true") + .empty().append(renderTemplate(options.loadingTemplate, { text: options.labels.loading })); + + $.ajax({ url: currentStep.contentUrl, cache: false }).done(function (data) + { + currentStepContent.empty().html(data)._aria("busy", "false").data("loaded", "1"); + wizard.triggerHandler("contentLoaded", [currentIndex]); + }); + break; + } + } + } +} + +/** + * Fires the action next or previous click event. + * + * @static + * @private + * @method paginationClick + * @param wizard {Object} The jQuery wizard object + * @param options {Object} Settings of the current wizard + * @param state {Object} The state container of the current wizard + * @param index {Integer} The position (zero-based) to route to + * @return {Boolean} Indicates whether the event fired successfully or not + **/ +function paginationClick(wizard, options, state, index) +{ + var oldIndex = state.currentIndex; + + if (index >= 0 && index < state.stepCount && !(options.forceMoveForward && index < state.currentIndex)) + { + var anchor = getStepAnchor(wizard, index), + parent = anchor.parent(), + isDisabled = parent.hasClass("disabled"); + + // Enable the step to make the anchor clickable! + parent._enableAria(); + anchor.click(); + + // An error occured + if (oldIndex === state.currentIndex && isDisabled) + { + // Disable the step again if current index has not changed; prevents click action. + parent._enableAria(false); + return false; + } + + return true; + } + + return false; +} + +/** + * Fires when a pagination click happens. + * + * @static + * @private + * @event click + * @param event {Object} An event object + */ +function paginationClickHandler(event) +{ + event.preventDefault(); + + var anchor = $(this), + wizard = anchor.parent().parent().parent().parent(), + options = getOptions(wizard), + state = getState(wizard), + href = anchor.attr("href"); + + switch (href.substring(href.lastIndexOf("#") + 1)) + { + case "cancel": + cancel(wizard); + break; + + case "finish": + finishStep(wizard, state); + break; + + case "next": + goToNextStep(wizard, options, state); + break; + + case "previous": + goToPreviousStep(wizard, options, state); + break; + } +} + +/** + * Refreshs the visualization state for the entire pagination. + * + * @static + * @private + * @method refreshPagination + * @param wizard {Object} A jQuery wizard object + * @param options {Object} Settings of the current wizard + * @param state {Object} The state container of the current wizard + */ +function refreshPagination(wizard, options, state) +{ + if (options.enablePagination) + { + var finish = wizard.find(".actions a[href$='#finish']").parent(), + next = wizard.find(".actions a[href$='#next']").parent(); + + if (!options.forceMoveForward) + { + var previous = wizard.find(".actions a[href$='#previous']").parent(); + previous._enableAria(state.currentIndex > 0); + } + + if (options.enableFinishButton && options.showFinishButtonAlways) + { + finish._enableAria(state.stepCount > 0); + next._enableAria(state.stepCount > 1 && state.stepCount > (state.currentIndex + 1)); + } + else + { + finish._showAria(options.enableFinishButton && state.stepCount === (state.currentIndex + 1)); + next._showAria(state.stepCount === 0 || state.stepCount > (state.currentIndex + 1)). + _enableAria(state.stepCount > (state.currentIndex + 1) || !options.enableFinishButton); + } + } +} + +/** + * Refreshs the visualization state for the step navigation (tabs). + * + * @static + * @private + * @method refreshStepNavigation + * @param wizard {Object} A jQuery wizard object + * @param options {Object} Settings of the current wizard + * @param state {Object} The state container of the current wizard + * @param [oldIndex] {Integer} The index of the prior step + */ +function refreshStepNavigation(wizard, options, state, oldIndex) +{ + var currentOrNewStepAnchor = getStepAnchor(wizard, state.currentIndex), + currentInfo = $("<span class=\"current-info audible\">" + options.labels.current + " </span>"), + stepTitles = wizard.find(".content > .title"); + + if (oldIndex != null) + { + var oldStepAnchor = getStepAnchor(wizard, oldIndex); + oldStepAnchor.parent().addClass("done").removeClass("error")._selectAria(false); + stepTitles.eq(oldIndex).removeClass("current").next(".body").removeClass("current"); + currentInfo = oldStepAnchor.find(".current-info"); + currentOrNewStepAnchor.focus(); + } + + currentOrNewStepAnchor.prepend(currentInfo).parent()._selectAria().removeClass("done")._enableAria(); + stepTitles.eq(state.currentIndex).addClass("current").next(".body").addClass("current"); +} + +/** + * Refreshes step buttons and their related titles beyond a certain position. + * + * @static + * @private + * @method refreshSteps + * @param wizard {Object} A jQuery wizard object + * @param options {Object} Settings of the current wizard + * @param state {Object} The state container of the current wizard + * @param index {Integer} The start point for refreshing ids + */ +function refreshSteps(wizard, options, state, index) +{ + var uniqueId = getUniqueId(wizard); + + for (var i = index; i < state.stepCount; i++) + { + var uniqueStepId = uniqueId + _tabSuffix + i, + uniqueBodyId = uniqueId + _tabpanelSuffix + i, + uniqueHeaderId = uniqueId + _titleSuffix + i, + title = wizard.find(".title").eq(i)._id(uniqueHeaderId); + + wizard.find(".steps a").eq(i)._id(uniqueStepId) + ._aria("controls", uniqueBodyId).attr("href", "#" + uniqueHeaderId) + .html(renderTemplate(options.titleTemplate, { index: i + 1, title: title.html() })); + wizard.find(".body").eq(i)._id(uniqueBodyId) + ._aria("labelledby", uniqueHeaderId); + } +} + +function registerEvents(wizard, options) +{ + var eventNamespace = getEventNamespace(wizard); + + wizard.bind("canceled" + eventNamespace, options.onCanceled); + wizard.bind("contentLoaded" + eventNamespace, options.onContentLoaded); + wizard.bind("finishing" + eventNamespace, options.onFinishing); + wizard.bind("finished" + eventNamespace, options.onFinished); + wizard.bind("init" + eventNamespace, options.onInit); + wizard.bind("stepChanging" + eventNamespace, options.onStepChanging); + wizard.bind("stepChanged" + eventNamespace, options.onStepChanged); + + if (options.enableKeyNavigation) + { + wizard.bind("keyup" + eventNamespace, keyUpHandler); + } + + wizard.find(".actions a").bind("click" + eventNamespace, paginationClickHandler); +} + +/** + * Removes a specific step by an given index. + * + * @static + * @private + * @method removeStep + * @param wizard {Object} A jQuery wizard object + * @param options {Object} Settings of the current wizard + * @param state {Object} The state container of the current wizard + * @param index {Integer} The position (zero-based) of the step to remove + * @return Indecates whether the item is removed. + **/ +function removeStep(wizard, options, state, index) +{ + // Index out of range and try deleting current item will return false. + if (index < 0 || index >= state.stepCount || state.currentIndex === index) + { + return false; + } + + // Change data + removeStepFromCache(wizard, index); + if (state.currentIndex > index) + { + state.currentIndex--; + saveCurrentStateToCookie(wizard, options, state); + } + state.stepCount--; + + getStepTitle(wizard, index).remove(); + getStepPanel(wizard, index).remove(); + getStepAnchor(wizard, index).parent().remove(); + + // Set the "first" class to the new first step button + if (index === 0) + { + wizard.find(".steps li").first().addClass("first"); + } + + // Set the "last" class to the new last step button + if (index === state.stepCount) + { + wizard.find(".steps li").eq(index).addClass("last"); + } + + refreshSteps(wizard, options, state, index); + refreshPagination(wizard, options, state); + + return true; +} + +function removeStepFromCache(wizard, index) +{ + getSteps(wizard).splice(index, 1); +} + +/** + * Transforms the base html structure to a more sensible html structure. + * + * @static + * @private + * @method render + * @param wizard {Object} A jQuery wizard object + * @param options {Object} Settings of the current wizard + * @param state {Object} The state container of the current wizard + **/ +function render(wizard, options, state) +{ + // Create a content wrapper and copy HTML from the intial wizard structure + var wrapperTemplate = "<{0} class=\"{1}\">{2}</{0}>", + orientation = getValidEnumValue(stepsOrientation, options.stepsOrientation), + verticalCssClass = (orientation === stepsOrientation.vertical) ? " vertical" : "", + contentWrapper = $(wrapperTemplate.format(options.contentContainerTag, "content " + options.clearFixCssClass, wizard.html())), + stepsWrapper = $(wrapperTemplate.format(options.stepsContainerTag, "steps " + options.clearFixCssClass, "<ul role=\"tablist\"></ul>")), + stepTitles = contentWrapper.children(options.headerTag), + stepContents = contentWrapper.children(options.bodyTag); + + // Transform the wizard wrapper and remove the inner HTML + wizard.attr("role", "application").empty().append(stepsWrapper).append(contentWrapper) + .addClass(options.cssClass + " " + options.clearFixCssClass + verticalCssClass); + + // Add WIA-ARIA support + stepContents.each(function (index) + { + renderBody(wizard, state, $(this), index); + }); + + stepTitles.each(function (index) + { + renderTitle(wizard, options, state, $(this), index); + }); + + refreshStepNavigation(wizard, options, state); + renderPagination(wizard, options, state); +} + +/** + * Transforms the body to a proper tabpanel. + * + * @static + * @private + * @method renderBody + * @param wizard {Object} A jQuery wizard object + * @param body {Object} A jQuery body object + * @param index {Integer} The position of the body + */ +function renderBody(wizard, state, body, index) +{ + var uniqueId = getUniqueId(wizard), + uniqueBodyId = uniqueId + _tabpanelSuffix + index, + uniqueHeaderId = uniqueId + _titleSuffix + index; + + body._id(uniqueBodyId).attr("role", "tabpanel")._aria("labelledby", uniqueHeaderId) + .addClass("body")._showAria(state.currentIndex === index); +} + +/** + * Renders a pagination if enabled. + * + * @static + * @private + * @method renderPagination + * @param wizard {Object} A jQuery wizard object + * @param options {Object} Settings of the current wizard + * @param state {Object} The state container of the current wizard + */ +function renderPagination(wizard, options, state) +{ + if (options.enablePagination) + { + var pagination = "<{0} class=\"actions {1}\"><ul role=\"menu\" aria-label=\"{2}\">{3}</ul></{0}>", + buttonTemplate = "<li><a href=\"#{0}\" role=\"menuitem\">{1}</a></li>", + buttons = ""; + + if (!options.forceMoveForward) + { + buttons += buttonTemplate.format("previous", options.labels.previous); + } + + buttons += buttonTemplate.format("next", options.labels.next); + + if (options.enableFinishButton) + { + buttons += buttonTemplate.format("finish", options.labels.finish); + } + + if (options.enableCancelButton) + { + buttons += buttonTemplate.format("cancel", options.labels.cancel); + } + + wizard.append(pagination.format(options.actionContainerTag, options.clearFixCssClass, + options.labels.pagination, buttons)); + + refreshPagination(wizard, options, state); + loadAsyncContent(wizard, options, state); + } +} + +/** + * Renders a template and replaces all placeholder. + * + * @static + * @private + * @method renderTemplate + * @param template {String} A template + * @param substitutes {Object} A list of substitute + * @return {String} The rendered template + */ +function renderTemplate(template, substitutes) +{ + var matches = template.match(/#([a-z]*)#/gi); + + for (var i = 0; i < matches.length; i++) + { + var match = matches[i], + key = match.substring(1, match.length - 1); + + if (substitutes[key] === undefined) + { + throwError("The key '{0}' does not exist in the substitute collection!", key); + } + + template = template.replace(match, substitutes[key]); + } + + return template; +} + +/** + * Transforms the title to a step item button. + * + * @static + * @private + * @method renderTitle + * @param wizard {Object} A jQuery wizard object + * @param options {Object} Settings of the current wizard + * @param state {Object} The state container of the current wizard + * @param header {Object} A jQuery header object + * @param index {Integer} The position of the header + */ +function renderTitle(wizard, options, state, header, index) +{ + var uniqueId = getUniqueId(wizard), + uniqueStepId = uniqueId + _tabSuffix + index, + uniqueBodyId = uniqueId + _tabpanelSuffix + index, + uniqueHeaderId = uniqueId + _titleSuffix + index, + stepCollection = wizard.find(".steps > ul"), + title = renderTemplate(options.titleTemplate, { + index: index + 1, + title: header.html() + }), + stepItem = $("<li role=\"tab\"><a id=\"" + uniqueStepId + "\" href=\"#" + uniqueHeaderId + + "\" aria-controls=\"" + uniqueBodyId + "\">" + title + "</a></li>"); + + stepItem._enableAria(options.enableAllSteps || state.currentIndex > index); + + if (state.currentIndex > index) + { + stepItem.addClass("done"); + } + + header._id(uniqueHeaderId).attr("tabindex", "-1").addClass("title"); + + if (index === 0) + { + stepCollection.prepend(stepItem); + } + else + { + stepCollection.find("li").eq(index - 1).after(stepItem); + } + + // Set the "first" class to the new first step button + if (index === 0) + { + stepCollection.find("li").removeClass("first").eq(index).addClass("first"); + } + + // Set the "last" class to the new last step button + if (index === (state.stepCount - 1)) + { + stepCollection.find("li").removeClass("last").eq(index).addClass("last"); + } + + // Register click event + stepItem.children("a").bind("click" + getEventNamespace(wizard), stepClickHandler); +} + +/** + * Saves the current state to a cookie. + * + * @static + * @private + * @method saveCurrentStateToCookie + * @param wizard {Object} A jQuery wizard object + * @param options {Object} Settings of the current wizard + * @param state {Object} The state container of the current wizard + */ +function saveCurrentStateToCookie(wizard, options, state) +{ + if (options.saveState && $.cookie) + { + $.cookie(_cookiePrefix + getUniqueId(wizard), state.currentIndex); + } +} + +function startTransitionEffect(wizard, options, state, index, oldIndex, doneCallback) +{ + var stepContents = wizard.find(".content > .body"), + effect = getValidEnumValue(transitionEffect, options.transitionEffect), + effectSpeed = options.transitionEffectSpeed, + newStep = stepContents.eq(index), + currentStep = stepContents.eq(oldIndex); + + switch (effect) + { + case transitionEffect.fade: + case transitionEffect.slide: + var hide = (effect === transitionEffect.fade) ? "fadeOut" : "slideUp", + show = (effect === transitionEffect.fade) ? "fadeIn" : "slideDown"; + + state.transitionElement = newStep; + currentStep[hide](effectSpeed, function () + { + var wizard = $(this)._showAria(false).parent().parent(), + state = getState(wizard); + + if (state.transitionElement) + { + state.transitionElement[show](effectSpeed, function () + { + $(this)._showAria(); + }).promise().done(doneCallback); + state.transitionElement = null; + } + }); + break; + + case transitionEffect.slideLeft: + var outerWidth = currentStep.outerWidth(true), + posFadeOut = (index > oldIndex) ? -(outerWidth) : outerWidth, + posFadeIn = (index > oldIndex) ? outerWidth : -(outerWidth); + + $.when(currentStep.animate({ left: posFadeOut }, effectSpeed, + function () { $(this)._showAria(false); }), + newStep.css("left", posFadeIn + "px")._showAria() + .animate({ left: 0 }, effectSpeed)).done(doneCallback); + break; + + default: + $.when(currentStep._showAria(false), newStep._showAria()) + .done(doneCallback); + break; + } +} + +/** + * Fires when a step click happens. + * + * @static + * @private + * @event click + * @param event {Object} An event object + */ +function stepClickHandler(event) +{ + event.preventDefault(); + + var anchor = $(this), + wizard = anchor.parent().parent().parent().parent(), + options = getOptions(wizard), + state = getState(wizard), + oldIndex = state.currentIndex; + + if (anchor.parent().is(":not(.disabled):not(.current)")) + { + var href = anchor.attr("href"), + position = parseInt(href.substring(href.lastIndexOf("-") + 1), 0); + + goToStep(wizard, options, state, position); + } + + // If nothing has changed + if (oldIndex === state.currentIndex) + { + getStepAnchor(wizard, oldIndex).focus(); + return false; + } +} + +function throwError(message) +{ + if (arguments.length > 1) + { + message = message.format(Array.prototype.slice.call(arguments, 1)); + } + + throw new Error(message); +} + +/** + * Checks an argument for null or undefined and throws an error if one check applies. + * + * @static + * @private + * @method validateArgument + * @param argumentName {String} The name of the given argument + * @param argumentValue {Object} The argument itself + */ +function validateArgument(argumentName, argumentValue) +{ + if (argumentValue == null) + { + throwError("The argument '{0}' is null or undefined.", argumentName); + } +} + +/** + * Represents a jQuery wizard plugin. + * + * @class steps + * @constructor + * @param [method={}] The name of the method as `String` or an JSON object for initialization + * @param [params=]* {Array} Additional arguments for a method call + * @chainable + **/ +$.fn.steps = function (method) +{ + if ($.fn.steps[method]) + { + return $.fn.steps[method].apply(this, Array.prototype.slice.call(arguments, 1)); + } + else if (typeof method === "object" || !method) + { + return initialize.apply(this, arguments); + } + else + { + $.error("Method " + method + " does not exist on jQuery.steps"); + } +}; + +/** + * Adds a new step. + * + * @method add + * @param step {Object} The step object to add + * @chainable + **/ +$.fn.steps.add = function (step) +{ + var state = getState(this); + return insertStep(this, getOptions(this), state, state.stepCount, step); +}; + +/** + * Removes the control functionality completely and transforms the current state to the initial HTML structure. + * + * @method destroy + * @chainable + **/ +$.fn.steps.destroy = function () +{ + return destroy(this, getOptions(this)); +}; + +/** + * Triggers the onFinishing and onFinished event. + * + * @method finish + **/ +$.fn.steps.finish = function () +{ + finishStep(this, getState(this)); +}; + +/** + * Gets the current step index. + * + * @method getCurrentIndex + * @return {Integer} The actual step index (zero-based) + * @for steps + **/ +$.fn.steps.getCurrentIndex = function () +{ + return getState(this).currentIndex; +}; + +/** + * Gets the current step object. + * + * @method getCurrentStep + * @return {Object} The actual step object + **/ +$.fn.steps.getCurrentStep = function () +{ + return getStep(this, getState(this).currentIndex); +}; + +/** + * Gets a specific step object by index. + * + * @method getStep + * @param index {Integer} An integer that belongs to the position of a step + * @return {Object} A specific step object + **/ +$.fn.steps.getStep = function (index) +{ + return getStep(this, index); +}; + +/** + * Inserts a new step to a specific position. + * + * @method insert + * @param index {Integer} The position (zero-based) to add + * @param step {Object} The step object to add + * @example + * $("#wizard").steps().insert(0, { + * title: "Title", + * content: "", // optional + * contentMode: "async", // optional + * contentUrl: "/Content/Step/1" // optional + * }); + * @chainable + **/ +$.fn.steps.insert = function (index, step) +{ + return insertStep(this, getOptions(this), getState(this), index, step); +}; + +/** + * Routes to the next step. + * + * @method next + * @return {Boolean} Indicates whether the action executed + **/ +$.fn.steps.next = function () +{ + return goToNextStep(this, getOptions(this), getState(this)); +}; + +/** + * Routes to the previous step. + * + * @method previous + * @return {Boolean} Indicates whether the action executed + **/ +$.fn.steps.previous = function () +{ + return goToPreviousStep(this, getOptions(this), getState(this)); +}; + +/** + * Removes a specific step by an given index. + * + * @method remove + * @param index {Integer} The position (zero-based) of the step to remove + * @return Indecates whether the item is removed. + **/ +$.fn.steps.remove = function (index) +{ + return removeStep(this, getOptions(this), getState(this), index); +}; + +/** + * Sets a specific step object by index. + * + * @method setStep + * @param index {Integer} An integer that belongs to the position of a step + * @param step {Object} The step object to change + **/ +$.fn.steps.setStep = function (index, step) +{ + throw new Error("Not yet implemented!"); +}; + +/** + * Skips an certain amount of steps. + * + * @method skip + * @param count {Integer} The amount of steps that should be skipped + * @return {Boolean} Indicates whether the action executed + **/ +$.fn.steps.skip = function (count) +{ + throw new Error("Not yet implemented!"); +}; + +/** + * An enum represents the different content types of a step and their loading mechanisms. + * + * @class contentMode + * @for steps + **/ +var contentMode = $.fn.steps.contentMode = { + /** + * HTML embedded content + * + * @readOnly + * @property html + * @type Integer + * @for contentMode + **/ + html: 0, + + /** + * IFrame embedded content + * + * @readOnly + * @property iframe + * @type Integer + * @for contentMode + **/ + iframe: 1, + + /** + * Async embedded content + * + * @readOnly + * @property async + * @type Integer + * @for contentMode + **/ + async: 2 +}; + +/** + * An enum represents the orientation of the steps navigation. + * + * @class stepsOrientation + * @for steps + **/ +var stepsOrientation = $.fn.steps.stepsOrientation = { + /** + * Horizontal orientation + * + * @readOnly + * @property horizontal + * @type Integer + * @for stepsOrientation + **/ + horizontal: 0, + + /** + * Vertical orientation + * + * @readOnly + * @property vertical + * @type Integer + * @for stepsOrientation + **/ + vertical: 1 +}; + +/** + * An enum that represents the various transition animations. + * + * @class transitionEffect + * @for steps + **/ +var transitionEffect = $.fn.steps.transitionEffect = { + /** + * No transition animation + * + * @readOnly + * @property none + * @type Integer + * @for transitionEffect + **/ + none: 0, + + /** + * Fade in transition + * + * @readOnly + * @property fade + * @type Integer + * @for transitionEffect + **/ + fade: 1, + + /** + * Slide up transition + * + * @readOnly + * @property slide + * @type Integer + * @for transitionEffect + **/ + slide: 2, + + /** + * Slide left transition + * + * @readOnly + * @property slideLeft + * @type Integer + * @for transitionEffect + **/ + slideLeft: 3 +}; + +var stepModel = $.fn.steps.stepModel = { + title: "", + content: "", + contentUrl: "", + contentMode: contentMode.html, + contentLoaded: false +}; + +/** + * An object that represents the default settings. + * There are two possibities to override the sub-properties. + * Either by doing it generally (global) or on initialization. + * + * @static + * @class defaults + * @for steps + * @example + * // Global approach + * $.steps.defaults.headerTag = "h3"; + * @example + * // Initialization approach + * $("#wizard").steps({ headerTag: "h3" }); + **/ +var defaults = $.fn.steps.defaults = { + /** + * The header tag is used to find the step button text within the declared wizard area. + * + * @property headerTag + * @type String + * @default "h1" + * @for defaults + **/ + headerTag: "h1", + + /** + * The body tag is used to find the step content within the declared wizard area. + * + * @property bodyTag + * @type String + * @default "div" + * @for defaults + **/ + bodyTag: "div", + + /** + * The content container tag which will be used to wrap all step contents. + * + * @property contentContainerTag + * @type String + * @default "div" + * @for defaults + **/ + contentContainerTag: "div", + + /** + * The action container tag which will be used to wrap the pagination navigation. + * + * @property actionContainerTag + * @type String + * @default "div" + * @for defaults + **/ + actionContainerTag: "div", + + /** + * The steps container tag which will be used to wrap the steps navigation. + * + * @property stepsContainerTag + * @type String + * @default "div" + * @for defaults + **/ + stepsContainerTag: "div", + + /** + * The css class which will be added to the outer component wrapper. + * + * @property cssClass + * @type String + * @default "wizard" + * @for defaults + * @example + * <div class="wizard"> + * ... + * </div> + **/ + cssClass: "wizard", + + /** + * The css class which will be used for floating scenarios. + * + * @property clearFixCssClass + * @type String + * @default "clearfix" + * @for defaults + **/ + clearFixCssClass: "clearfix", + + /** + * Determines whether the steps are vertically or horizontally oriented. + * + * @property stepsOrientation + * @type stepsOrientation + * @default horizontal + * @for defaults + * @since 1.0.0 + **/ + stepsOrientation: stepsOrientation.horizontal, + + /* + * Tempplates + */ + + /** + * The title template which will be used to create a step button. + * + * @property titleTemplate + * @type String + * @default "<span class=\"number\">#index#.</span> #title#" + * @for defaults + **/ + titleTemplate: "<span class=\"number\">#index#.</span> #title#", + + /** + * The loading template which will be used to create the loading animation. + * + * @property loadingTemplate + * @type String + * @default "<span class=\"spinner\"></span> #text#" + * @for defaults + **/ + loadingTemplate: "<span class=\"spinner\"></span> #text#", + + /* + * Behaviour + */ + + /** + * Sets the focus to the first wizard instance in order to enable the key navigation from the begining if `true`. + * + * @property autoFocus + * @type Boolean + * @default false + * @for defaults + * @since 0.9.4 + **/ + autoFocus: false, + + /** + * Enables all steps from the begining if `true` (all steps are clickable). + * + * @property enableAllSteps + * @type Boolean + * @default false + * @for defaults + **/ + enableAllSteps: false, + + /** + * Enables keyboard navigation if `true` (arrow left and arrow right). + * + * @property enableKeyNavigation + * @type Boolean + * @default true + * @for defaults + **/ + enableKeyNavigation: true, + + /** + * Enables pagination if `true`. + * + * @property enablePagination + * @type Boolean + * @default true + * @for defaults + **/ + enablePagination: true, + + /** + * Suppresses pagination if a form field is focused. + * + * @property suppressPaginationOnFocus + * @type Boolean + * @default true + * @for defaults + **/ + suppressPaginationOnFocus: true, + + /** + * Enables cache for async loaded or iframe embedded content. + * + * @property enableContentCache + * @type Boolean + * @default true + * @for defaults + **/ + enableContentCache: true, + + /** + * Shows the cancel button if enabled. + * + * @property enableCancelButton + * @type Boolean + * @default false + * @for defaults + **/ + enableCancelButton: false, + + /** + * Shows the finish button if enabled. + * + * @property enableFinishButton + * @type Boolean + * @default true + * @for defaults + **/ + enableFinishButton: true, + + /** + * Not yet implemented. + * + * @property preloadContent + * @type Boolean + * @default false + * @for defaults + **/ + preloadContent: false, + + /** + * Shows the finish button always (on each step; right beside the next button) if `true`. + * Otherwise the next button will be replaced by the finish button if the last step becomes active. + * + * @property showFinishButtonAlways + * @type Boolean + * @default false + * @for defaults + **/ + showFinishButtonAlways: false, + + /** + * Prevents jumping to a previous step. + * + * @property forceMoveForward + * @type Boolean + * @default false + * @for defaults + **/ + forceMoveForward: false, + + /** + * Saves the current state (step position) to a cookie. + * By coming next time the last active step becomes activated. + * + * @property saveState + * @type Boolean + * @default false + * @for defaults + **/ + saveState: false, + + /** + * The position to start on (zero-based). + * + * @property startIndex + * @type Integer + * @default 0 + * @for defaults + **/ + startIndex: 0, + + /* + * Animation Effect Configuration + */ + + /** + * The animation effect which will be used for step transitions. + * + * @property transitionEffect + * @type transitionEffect + * @default none + * @for defaults + **/ + transitionEffect: transitionEffect.none, + + /** + * Animation speed for step transitions (in milliseconds). + * + * @property transitionEffectSpeed + * @type Integer + * @default 200 + * @for defaults + **/ + transitionEffectSpeed: 200, + + /* + * Events + */ + + /** + * Fires before the step changes and can be used to prevent step changing by returning `false`. + * Very useful for form validation. + * + * @property onStepChanging + * @type Event + * @default function (event, currentIndex, newIndex) { return true; } + * @for defaults + **/ + onStepChanging: function (event, currentIndex, newIndex) { return true; }, + + /** + * Fires after the step has change. + * + * @property onStepChanged + * @type Event + * @default function (event, currentIndex, priorIndex) { } + * @for defaults + **/ + onStepChanged: function (event, currentIndex, priorIndex) { }, + + /** + * Fires after cancelation. + * + * @property onCanceled + * @type Event + * @default function (event) { } + * @for defaults + **/ + onCanceled: function (event) { }, + + /** + * Fires before finishing and can be used to prevent completion by returning `false`. + * Very useful for form validation. + * + * @property onFinishing + * @type Event + * @default function (event, currentIndex) { return true; } + * @for defaults + **/ + onFinishing: function (event, currentIndex) { return true; }, + + /** + * Fires after completion. + * + * @property onFinished + * @type Event + * @default function (event, currentIndex) { } + * @for defaults + **/ + onFinished: function (event, currentIndex) { }, + + /** + * Fires after async content is loaded. + * + * @property onContentLoaded + * @type Event + * @default function (event, index) { } + * @for defaults + **/ + onContentLoaded: function (event, currentIndex) { }, + + /** + * Fires when the wizard is initialized. + * + * @property onInit + * @type Event + * @default function (event) { } + * @for defaults + **/ + onInit: function (event, currentIndex) { }, + + /** + * Contains all labels. + * + * @property labels + * @type Object + * @for defaults + **/ + labels: { + /** + * Label for the cancel button. + * + * @property cancel + * @type String + * @default "Cancel" + * @for defaults + **/ + cancel: "Cancel", + + /** + * This label is important for accessability reasons. + * Indicates which step is activated. + * + * @property current + * @type String + * @default "current step:" + * @for defaults + **/ + current: "current step:", + + /** + * This label is important for accessability reasons and describes the kind of navigation. + * + * @property pagination + * @type String + * @default "Pagination" + * @for defaults + * @since 0.9.7 + **/ + pagination: "Pagination", + + /** + * Label for the finish button. + * + * @property finish + * @type String + * @default "Finish" + * @for defaults + **/ + finish: "Finish", + + /** + * Label for the next button. + * + * @property next + * @type String + * @default "Next" + * @for defaults + **/ + next: "Next", + + /** + * Label for the previous button. + * + * @property previous + * @type String + * @default "Previous" + * @for defaults + **/ + previous: "Previous", + + /** + * Label for the loading animation. + * + * @property loading + * @type String + * @default "Loading ..." + * @for defaults + **/ + loading: "Loading ..." + } +}; +})(jQuery);
\ No newline at end of file diff --git a/script/jquery-steps/jquery.steps.min.js b/script/jquery-steps/jquery.steps.min.js new file mode 100644 index 0000000..755aedf --- /dev/null +++ b/script/jquery-steps/jquery.steps.min.js @@ -0,0 +1,6 @@ +/*! + * jQuery Steps v1.1.0 - 09/04/2014 + * Copyright (c) 2014 Rafael Staib (http://www.jquery-steps.com) + * Licensed under MIT http://www.opensource.org/licenses/MIT + */ +!function(a,b){function c(a,b){o(a).push(b)}function d(d,e,f){var g=d.children(e.headerTag),h=d.children(e.bodyTag);g.length>h.length?R(Z,"contents"):g.length<h.length&&R(Z,"titles");var i=e.startIndex;if(f.stepCount=g.length,e.saveState&&a.cookie){var j=a.cookie(U+q(d)),k=parseInt(j,0);!isNaN(k)&&k<f.stepCount&&(i=k)}f.currentIndex=i,g.each(function(e){var f=a(this),g=h.eq(e),i=g.data("mode"),j=null==i?$.html:r($,/^\s*$/.test(i)||isNaN(i)?i:parseInt(i,0)),k=j===$.html||g.data("url")===b?"":g.data("url"),l=j!==$.html&&"1"===g.data("loaded"),m=a.extend({},bb,{title:f.html(),content:j===$.html?g.html():"",contentUrl:k,contentMode:j,contentLoaded:l});c(d,m)})}function e(a){a.triggerHandler("canceled")}function f(a,b){return a.currentIndex-b}function g(b,c){var d=i(b);b.unbind(d).removeData("uid").removeData("options").removeData("state").removeData("steps").removeData("eventNamespace").find(".actions a").unbind(d),b.removeClass(c.clearFixCssClass+" vertical");var e=b.find(".content > *");e.removeData("loaded").removeData("mode").removeData("url"),e.removeAttr("id").removeAttr("role").removeAttr("tabindex").removeAttr("class").removeAttr("style")._removeAria("labelledby")._removeAria("hidden"),b.find(".content > [data-mode='async'],.content > [data-mode='iframe']").empty();var f=a('<{0} class="{1}"></{0}>'.format(b.get(0).tagName,b.attr("class"))),g=b._id();return null!=g&&""!==g&&f._id(g),f.html(b.find(".content").html()),b.after(f),b.remove(),f}function h(a,b){var c=a.find(".steps li").eq(b.currentIndex);a.triggerHandler("finishing",[b.currentIndex])?(c.addClass("done").removeClass("error"),a.triggerHandler("finished",[b.currentIndex])):c.addClass("error")}function i(a){var b=a.data("eventNamespace");return null==b&&(b="."+q(a),a.data("eventNamespace",b)),b}function j(a,b){var c=q(a);return a.find("#"+c+V+b)}function k(a,b){var c=q(a);return a.find("#"+c+W+b)}function l(a,b){var c=q(a);return a.find("#"+c+X+b)}function m(a){return a.data("options")}function n(a){return a.data("state")}function o(a){return a.data("steps")}function p(a,b){var c=o(a);return(0>b||b>=c.length)&&R(Y),c[b]}function q(a){var b=a.data("uid");return null==b&&(b=a._id(),null==b&&(b="steps-uid-".concat(T),a._id(b)),T++,a.data("uid",b)),b}function r(a,c){if(S("enumType",a),S("keyOrValue",c),"string"==typeof c){var d=a[c];return d===b&&R("The enum key '{0}' does not exist.",c),d}if("number"==typeof c){for(var e in a)if(a[e]===c)return c;R("Invalid enum value '{0}'.",c)}else R("Invalid key or value type.")}function s(a,b,c){return B(a,b,c,v(c,1))}function t(a,b,c){return B(a,b,c,f(c,1))}function u(a,b,c,d){if((0>d||d>=c.stepCount)&&R(Y),!(b.forceMoveForward&&d<c.currentIndex)){var e=c.currentIndex;return a.triggerHandler("stepChanging",[c.currentIndex,d])?(c.currentIndex=d,O(a,b,c),E(a,b,c,e),D(a,b,c),A(a,b,c),P(a,b,c,d,e,function(){a.triggerHandler("stepChanged",[d,e])})):a.find(".steps li").eq(e).addClass("error"),!0}}function v(a,b){return a.currentIndex+b}function w(b){var c=a.extend(!0,{},cb,b);return this.each(function(){var b=a(this),e={currentIndex:c.startIndex,currentStep:null,stepCount:0,transitionElement:null};b.data("options",c),b.data("state",e),b.data("steps",[]),d(b,c,e),J(b,c,e),G(b,c),c.autoFocus&&0===T&&j(b,c.startIndex).focus(),b.triggerHandler("init",[c.startIndex])})}function x(b,c,d,e,f){(0>e||e>d.stepCount)&&R(Y),f=a.extend({},bb,f),y(b,e,f),d.currentIndex!==d.stepCount&&d.currentIndex>=e&&(d.currentIndex++,O(b,c,d)),d.stepCount++;var g=b.find(".content"),h=a("<{0}>{1}</{0}>".format(c.headerTag,f.title)),i=a("<{0}></{0}>".format(c.bodyTag));return(null==f.contentMode||f.contentMode===$.html)&&i.html(f.content),0===e?g.prepend(i).prepend(h):k(b,e-1).after(i).after(h),K(b,d,i,e),N(b,c,d,h,e),F(b,c,d,e),e===d.currentIndex&&E(b,c,d),D(b,c,d),b}function y(a,b,c){o(a).splice(b,0,c)}function z(b){var c=a(this),d=m(c),e=n(c);if(d.suppressPaginationOnFocus&&c.find(":focus").is(":input"))return b.preventDefault(),!1;var f={left:37,right:39};b.keyCode===f.left?(b.preventDefault(),t(c,d,e)):b.keyCode===f.right&&(b.preventDefault(),s(c,d,e))}function A(b,c,d){if(d.stepCount>0){var e=d.currentIndex,f=p(b,e);if(!c.enableContentCache||!f.contentLoaded)switch(r($,f.contentMode)){case $.iframe:b.find(".content > .body").eq(d.currentIndex).empty().html('<iframe src="'+f.contentUrl+'" frameborder="0" scrolling="no" />').data("loaded","1");break;case $.async:var g=k(b,e)._aria("busy","true").empty().append(M(c.loadingTemplate,{text:c.labels.loading}));a.ajax({url:f.contentUrl,cache:!1}).done(function(a){g.empty().html(a)._aria("busy","false").data("loaded","1"),b.triggerHandler("contentLoaded",[e])})}}}function B(a,b,c,d){var e=c.currentIndex;if(d>=0&&d<c.stepCount&&!(b.forceMoveForward&&d<c.currentIndex)){var f=j(a,d),g=f.parent(),h=g.hasClass("disabled");return g._enableAria(),f.click(),e===c.currentIndex&&h?(g._enableAria(!1),!1):!0}return!1}function C(b){b.preventDefault();var c=a(this),d=c.parent().parent().parent().parent(),f=m(d),g=n(d),i=c.attr("href");switch(i.substring(i.lastIndexOf("#")+1)){case"cancel":e(d);break;case"finish":h(d,g);break;case"next":s(d,f,g);break;case"previous":t(d,f,g)}}function D(a,b,c){if(b.enablePagination){var d=a.find(".actions a[href$='#finish']").parent(),e=a.find(".actions a[href$='#next']").parent();if(!b.forceMoveForward){var f=a.find(".actions a[href$='#previous']").parent();f._enableAria(c.currentIndex>0)}b.enableFinishButton&&b.showFinishButtonAlways?(d._enableAria(c.stepCount>0),e._enableAria(c.stepCount>1&&c.stepCount>c.currentIndex+1)):(d._showAria(b.enableFinishButton&&c.stepCount===c.currentIndex+1),e._showAria(0===c.stepCount||c.stepCount>c.currentIndex+1)._enableAria(c.stepCount>c.currentIndex+1||!b.enableFinishButton))}}function E(b,c,d,e){var f=j(b,d.currentIndex),g=a('<span class="current-info audible">'+c.labels.current+" </span>"),h=b.find(".content > .title");if(null!=e){var i=j(b,e);i.parent().addClass("done").removeClass("error")._selectAria(!1),h.eq(e).removeClass("current").next(".body").removeClass("current"),g=i.find(".current-info"),f.focus()}f.prepend(g).parent()._selectAria().removeClass("done")._enableAria(),h.eq(d.currentIndex).addClass("current").next(".body").addClass("current")}function F(a,b,c,d){for(var e=q(a),f=d;f<c.stepCount;f++){var g=e+V+f,h=e+W+f,i=e+X+f,j=a.find(".title").eq(f)._id(i);a.find(".steps a").eq(f)._id(g)._aria("controls",h).attr("href","#"+i).html(M(b.titleTemplate,{index:f+1,title:j.html()})),a.find(".body").eq(f)._id(h)._aria("labelledby",i)}}function G(a,b){var c=i(a);a.bind("canceled"+c,b.onCanceled),a.bind("contentLoaded"+c,b.onContentLoaded),a.bind("finishing"+c,b.onFinishing),a.bind("finished"+c,b.onFinished),a.bind("init"+c,b.onInit),a.bind("stepChanging"+c,b.onStepChanging),a.bind("stepChanged"+c,b.onStepChanged),b.enableKeyNavigation&&a.bind("keyup"+c,z),a.find(".actions a").bind("click"+c,C)}function H(a,b,c,d){return 0>d||d>=c.stepCount||c.currentIndex===d?!1:(I(a,d),c.currentIndex>d&&(c.currentIndex--,O(a,b,c)),c.stepCount--,l(a,d).remove(),k(a,d).remove(),j(a,d).parent().remove(),0===d&&a.find(".steps li").first().addClass("first"),d===c.stepCount&&a.find(".steps li").eq(d).addClass("last"),F(a,b,c,d),D(a,b,c),!0)}function I(a,b){o(a).splice(b,1)}function J(b,c,d){var e='<{0} class="{1}">{2}</{0}>',f=r(_,c.stepsOrientation),g=f===_.vertical?" vertical":"",h=a(e.format(c.contentContainerTag,"content "+c.clearFixCssClass,b.html())),i=a(e.format(c.stepsContainerTag,"steps "+c.clearFixCssClass,'<ul role="tablist"></ul>')),j=h.children(c.headerTag),k=h.children(c.bodyTag);b.attr("role","application").empty().append(i).append(h).addClass(c.cssClass+" "+c.clearFixCssClass+g),k.each(function(c){K(b,d,a(this),c)}),j.each(function(e){N(b,c,d,a(this),e)}),E(b,c,d),L(b,c,d)}function K(a,b,c,d){var e=q(a),f=e+W+d,g=e+X+d;c._id(f).attr("role","tabpanel")._aria("labelledby",g).addClass("body")._showAria(b.currentIndex===d)}function L(a,b,c){if(b.enablePagination){var d='<{0} class="actions {1}"><ul role="menu" aria-label="{2}">{3}</ul></{0}>',e='<li><a href="#{0}" role="menuitem">{1}</a></li>',f="";b.forceMoveForward||(f+=e.format("previous",b.labels.previous)),f+=e.format("next",b.labels.next),b.enableFinishButton&&(f+=e.format("finish",b.labels.finish)),b.enableCancelButton&&(f+=e.format("cancel",b.labels.cancel)),a.append(d.format(b.actionContainerTag,b.clearFixCssClass,b.labels.pagination,f)),D(a,b,c),A(a,b,c)}}function M(a,c){for(var d=a.match(/#([a-z]*)#/gi),e=0;e<d.length;e++){var f=d[e],g=f.substring(1,f.length-1);c[g]===b&&R("The key '{0}' does not exist in the substitute collection!",g),a=a.replace(f,c[g])}return a}function N(b,c,d,e,f){var g=q(b),h=g+V+f,j=g+W+f,k=g+X+f,l=b.find(".steps > ul"),m=M(c.titleTemplate,{index:f+1,title:e.html()}),n=a('<li role="tab"><a id="'+h+'" href="#'+k+'" aria-controls="'+j+'">'+m+"</a></li>");n._enableAria(c.enableAllSteps||d.currentIndex>f),d.currentIndex>f&&n.addClass("done"),e._id(k).attr("tabindex","-1").addClass("title"),0===f?l.prepend(n):l.find("li").eq(f-1).after(n),0===f&&l.find("li").removeClass("first").eq(f).addClass("first"),f===d.stepCount-1&&l.find("li").removeClass("last").eq(f).addClass("last"),n.children("a").bind("click"+i(b),Q)}function O(b,c,d){c.saveState&&a.cookie&&a.cookie(U+q(b),d.currentIndex)}function P(b,c,d,e,f,g){var h=b.find(".content > .body"),i=r(ab,c.transitionEffect),j=c.transitionEffectSpeed,k=h.eq(e),l=h.eq(f);switch(i){case ab.fade:case ab.slide:var m=i===ab.fade?"fadeOut":"slideUp",o=i===ab.fade?"fadeIn":"slideDown";d.transitionElement=k,l[m](j,function(){var b=a(this)._showAria(!1).parent().parent(),c=n(b);c.transitionElement&&(c.transitionElement[o](j,function(){a(this)._showAria()}).promise().done(g),c.transitionElement=null)});break;case ab.slideLeft:var p=l.outerWidth(!0),q=e>f?-p:p,s=e>f?p:-p;a.when(l.animate({left:q},j,function(){a(this)._showAria(!1)}),k.css("left",s+"px")._showAria().animate({left:0},j)).done(g);break;default:a.when(l._showAria(!1),k._showAria()).done(g)}}function Q(b){b.preventDefault();var c=a(this),d=c.parent().parent().parent().parent(),e=m(d),f=n(d),g=f.currentIndex;if(c.parent().is(":not(.disabled):not(.current)")){var h=c.attr("href"),i=parseInt(h.substring(h.lastIndexOf("-")+1),0);u(d,e,f,i)}return g===f.currentIndex?(j(d,g).focus(),!1):void 0}function R(a){throw arguments.length>1&&(a=a.format(Array.prototype.slice.call(arguments,1))),new Error(a)}function S(a,b){null==b&&R("The argument '{0}' is null or undefined.",a)}a.fn.extend({_aria:function(a,b){return this.attr("aria-"+a,b)},_removeAria:function(a){return this.removeAttr("aria-"+a)},_enableAria:function(a){return null==a||a?this.removeClass("disabled")._aria("disabled","false"):this.addClass("disabled")._aria("disabled","true")},_showAria:function(a){return null==a||a?this.show()._aria("hidden","false"):this.hide()._aria("hidden","true")},_selectAria:function(a){return null==a||a?this.addClass("current")._aria("selected","true"):this.removeClass("current")._aria("selected","false")},_id:function(a){return a?this.attr("id",a):this.attr("id")}}),String.prototype.format||(String.prototype.format=function(){for(var b=1===arguments.length&&a.isArray(arguments[0])?arguments[0]:arguments,c=this,d=0;d<b.length;d++){var e=new RegExp("\\{"+d+"\\}","gm");c=c.replace(e,b[d])}return c});var T=0,U="jQu3ry_5teps_St@te_",V="-t-",W="-p-",X="-h-",Y="Index out of range.",Z="One or more corresponding step {0} are missing.";a.fn.steps=function(b){return a.fn.steps[b]?a.fn.steps[b].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof b&&b?void a.error("Method "+b+" does not exist on jQuery.steps"):w.apply(this,arguments)},a.fn.steps.add=function(a){var b=n(this);return x(this,m(this),b,b.stepCount,a)},a.fn.steps.destroy=function(){return g(this,m(this))},a.fn.steps.finish=function(){h(this,n(this))},a.fn.steps.getCurrentIndex=function(){return n(this).currentIndex},a.fn.steps.getCurrentStep=function(){return p(this,n(this).currentIndex)},a.fn.steps.getStep=function(a){return p(this,a)},a.fn.steps.insert=function(a,b){return x(this,m(this),n(this),a,b)},a.fn.steps.next=function(){return s(this,m(this),n(this))},a.fn.steps.previous=function(){return t(this,m(this),n(this))},a.fn.steps.remove=function(a){return H(this,m(this),n(this),a)},a.fn.steps.setStep=function(){throw new Error("Not yet implemented!")},a.fn.steps.skip=function(){throw new Error("Not yet implemented!")};var $=a.fn.steps.contentMode={html:0,iframe:1,async:2},_=a.fn.steps.stepsOrientation={horizontal:0,vertical:1},ab=a.fn.steps.transitionEffect={none:0,fade:1,slide:2,slideLeft:3},bb=a.fn.steps.stepModel={title:"",content:"",contentUrl:"",contentMode:$.html,contentLoaded:!1},cb=a.fn.steps.defaults={headerTag:"h1",bodyTag:"div",contentContainerTag:"div",actionContainerTag:"div",stepsContainerTag:"div",cssClass:"wizard",clearFixCssClass:"clearfix",stepsOrientation:_.horizontal,titleTemplate:'<span class="number">#index#.</span> #title#',loadingTemplate:'<span class="spinner"></span> #text#',autoFocus:!1,enableAllSteps:!1,enableKeyNavigation:!0,enablePagination:!0,suppressPaginationOnFocus:!0,enableContentCache:!0,enableCancelButton:!1,enableFinishButton:!0,preloadContent:!1,showFinishButtonAlways:!1,forceMoveForward:!1,saveState:!1,startIndex:0,transitionEffect:ab.none,transitionEffectSpeed:200,onStepChanging:function(){return!0},onStepChanged:function(){},onCanceled:function(){},onFinishing:function(){return!0},onFinished:function(){},onContentLoaded:function(){},onInit:function(){},labels:{cancel:"Cancel",current:"current step:",pagination:"Pagination",finish:"Finish",next:"Next",previous:"Previous",loading:"Loading ..."}}}(jQuery);
\ No newline at end of file diff --git a/script/jquery-validate/jquery.validate.js b/script/jquery-validate/jquery.validate.js new file mode 100644 index 0000000..3606d39 --- /dev/null +++ b/script/jquery-validate/jquery.validate.js @@ -0,0 +1,1365 @@ +/*! + * jQuery Validation Plugin v1.13.1 + * + * http://jqueryvalidation.org/ + * + * Copyright (c) 2014 Jörn Zaefferer + * Released under the MIT license + */ +(function( factory ) { + if ( typeof define === "function" && define.amd ) { + define( ["jquery"], factory ); + } else { + factory( jQuery ); + } +}(function( $ ) { + +jQuery.extend($.fn, { + // http://jqueryvalidation.org/validate/ + validate: function( options ) { + + // if nothing is selected, return nothing; can't chain anyway + if ( !this.length ) { + if ( options && options.debug && window.console ) { + console.warn( "Nothing selected, can't validate, returning nothing." ); + } + return; + } + + // check if a validator for this form was already created + var validator = $.data( this[ 0 ], "validator" ); + if ( validator ) { + return validator; + } + + // Add novalidate tag if HTML5. + this.attr( "novalidate", "novalidate" ); + + validator = new $.validator( options, this[ 0 ] ); + $.data( this[ 0 ], "validator", validator ); + + if ( validator.settings.onsubmit ) { + + this.validateDelegate( ":submit", "click", function( event ) { + if ( validator.settings.submitHandler ) { + validator.submitButton = event.target; + } + // allow suppressing validation by adding a cancel class to the submit button + if ( $( event.target ).hasClass( "cancel" ) ) { + validator.cancelSubmit = true; + } + + // allow suppressing validation by adding the html5 formnovalidate attribute to the submit button + if ( $( event.target ).attr( "formnovalidate" ) !== undefined ) { + validator.cancelSubmit = true; + } + }); + + // validate the form on submit + this.submit( function( event ) { + if ( validator.settings.debug ) { + // prevent form submit to be able to see console output + event.preventDefault(); + } + function handle() { + var hidden, result; + if ( validator.settings.submitHandler ) { + if ( validator.submitButton ) { + // insert a hidden input as a replacement for the missing submit button + hidden = $( "<input type='hidden'/>" ) + .attr( "name", validator.submitButton.name ) + .val( $( validator.submitButton ).val() ) + .appendTo( validator.currentForm ); + } + result = validator.settings.submitHandler.call( validator, validator.currentForm, event ); + if ( validator.submitButton ) { + // and clean up afterwards; thanks to no-block-scope, hidden can be referenced + hidden.remove(); + } + if ( result !== undefined ) { + return result; + } + return false; + } + return true; + } + + // prevent submit for invalid forms or custom submit handlers + if ( validator.cancelSubmit ) { + validator.cancelSubmit = false; + return handle(); + } + if ( validator.form() ) { + if ( validator.pendingRequest ) { + validator.formSubmitted = true; + return false; + } + return handle(); + } else { + validator.focusInvalid(); + return false; + } + }); + } + + return validator; + }, + // http://jqueryvalidation.org/valid/ + valid: function() { + var valid, validator; + + if ( $( this[ 0 ] ).is( "form" ) ) { + valid = this.validate().form(); + } else { + valid = true; + validator = $( this[ 0 ].form ).validate(); + this.each( function() { + valid = validator.element( this ) && valid; + }); + } + return valid; + }, + // attributes: space separated list of attributes to retrieve and remove + removeAttrs: function( attributes ) { + var result = {}, + $element = this; + $.each( attributes.split( /\s/ ), function( index, value ) { + result[ value ] = $element.attr( value ); + $element.removeAttr( value ); + }); + return result; + }, + // http://jqueryvalidation.org/rules/ + rules: function( command, argument ) { + var element = this[ 0 ], + settings, staticRules, existingRules, data, param, filtered; + + if ( command ) { + settings = $.data( element.form, "validator" ).settings; + staticRules = settings.rules; + existingRules = $.validator.staticRules( element ); + switch ( command ) { + case "add": + jQuery.extend( existingRules, $.validator.normalizeRule( argument ) ); + // remove messages from rules, but allow them to be set separately + delete existingRules.messages; + staticRules[ element.name ] = existingRules; + if ( argument.messages ) { + settings.messages[ element.name ] = jQuery.extend( settings.messages[ element.name ], argument.messages ); + } + break; + case "remove": + if ( !argument ) { + delete staticRules[ element.name ]; + return existingRules; + } + filtered = {}; + $.each( argument.split( /\s/ ), function( index, method ) { + filtered[ method ] = existingRules[ method ]; + delete existingRules[ method ]; + if ( method === "required" ) { + $( element ).removeAttr( "aria-required" ); + } + }); + return filtered; + } + } + + data = $.validator.normalizeRules( + jQuery.extend( + {}, + $.validator.classRules( element ), + $.validator.attributeRules( element ), + $.validator.dataRules( element ), + $.validator.staticRules( element ) + ), element ); + + // make sure required is at front + if ( data.required ) { + param = data.required; + delete data.required; + data = jQuery.extend( { required: param }, data ); + $( element ).attr( "aria-required", "true" ); + } + + // make sure remote is at back + if ( data.remote ) { + param = data.remote; + delete data.remote; + data = jQuery.extend( data, { remote: param }); + } + + return data; + } +}); + +// Custom selectors +jQuery.extend( $.expr[ ":" ], { + // http://jqueryvalidation.org/blank-selector/ + blank: function( a ) { + return !$.trim( "" + $( a ).val() ); + }, + // http://jqueryvalidation.org/filled-selector/ + filled: function( a ) { + return !!$.trim( "" + $( a ).val() ); + }, + // http://jqueryvalidation.org/unchecked-selector/ + unchecked: function( a ) { + return !$( a ).prop( "checked" ); + } +}); + +// constructor for validator +$.validator = function( options, form ) { + this.settings = jQuery.extend( true, {}, $.validator.defaults, options ); + this.currentForm = form; + this.init(); +}; + +// http://jqueryvalidation.org/jQuery.validator.format/ +$.validator.format = function( source, params ) { + if ( arguments.length === 1 ) { + return function() { + var args = $.makeArray( arguments ); + args.unshift( source ); + return $.validator.format.apply( this, args ); + }; + } + if ( arguments.length > 2 && params.constructor !== Array ) { + params = $.makeArray( arguments ).slice( 1 ); + } + if ( params.constructor !== Array ) { + params = [ params ]; + } + $.each( params, function( i, n ) { + source = source.replace( new RegExp( "\\{" + i + "\\}", "g" ), function() { + return n; + }); + }); + return source; +}; + +jQuery.extend( $.validator, { + + defaults: { + messages: {}, + groups: {}, + rules: {}, + errorClass: "error", + validClass: "valid", + errorElement: "label", + focusCleanup: false, + focusInvalid: true, + errorContainer: $( [] ), + errorLabelContainer: $( [] ), + onsubmit: true, + ignore: ":hidden", + ignoreTitle: false, + onfocusin: function( element ) { + this.lastActive = element; + + // Hide error label and remove error class on focus if enabled + if ( this.settings.focusCleanup ) { + if ( this.settings.unhighlight ) { + this.settings.unhighlight.call( this, element, this.settings.errorClass, this.settings.validClass ); + } + this.hideThese( this.errorsFor( element ) ); + } + }, + onfocusout: function( element ) { + if ( !this.checkable( element ) && ( element.name in this.submitted || !this.optional( element ) ) ) { + this.element( element ); + } + }, + onkeyup: function( element, event ) { + if ( event.which === 9 && this.elementValue( element ) === "" ) { + return; + } else if ( element.name in this.submitted || element === this.lastElement ) { + this.element( element ); + } + }, + onclick: function( element ) { + // click on selects, radiobuttons and checkboxes + if ( element.name in this.submitted ) { + this.element( element ); + + // or option elements, check parent select in that case + } else if ( element.parentNode.name in this.submitted ) { + this.element( element.parentNode ); + } + }, + highlight: function( element, errorClass, validClass ) { + if ( element.type === "radio" ) { + this.findByName( element.name ).addClass( errorClass ).removeClass( validClass ); + } else { + $( element ).addClass( errorClass ).removeClass( validClass ); + } + }, + unhighlight: function( element, errorClass, validClass ) { + if ( element.type === "radio" ) { + this.findByName( element.name ).removeClass( errorClass ).addClass( validClass ); + } else { + $( element ).removeClass( errorClass ).addClass( validClass ); + } + } + }, + + // http://jqueryvalidation.org/jQuery.validator.setDefaults/ + setDefaults: function( settings ) { + jQuery.extend( $.validator.defaults, settings ); + }, + + messages: { + required: "This field is required.", + remote: "Please fix this field.", + email: "Please enter a valid email address.", + url: "Please enter a valid URL.", + date: "Please enter a valid date.", + dateISO: "Please enter a valid date ( ISO ).", + number: "Please enter a valid number.", + digits: "Please enter only digits.", + creditcard: "Please enter a valid credit card number.", + equalTo: "Please enter the same value again.", + maxlength: $.validator.format( "Please enter no more than {0} characters." ), + minlength: $.validator.format( "Please enter at least {0} characters." ), + rangelength: $.validator.format( "Please enter a value between {0} and {1} characters long." ), + range: $.validator.format( "Please enter a value between {0} and {1}." ), + max: $.validator.format( "Please enter a value less than or equal to {0}." ), + min: $.validator.format( "Please enter a value greater than or equal to {0}." ) + }, + + autoCreateRanges: false, + + prototype: { + + init: function() { + this.labelContainer = $( this.settings.errorLabelContainer ); + this.errorContext = this.labelContainer.length && this.labelContainer || $( this.currentForm ); + this.containers = $( this.settings.errorContainer ).add( this.settings.errorLabelContainer ); + this.submitted = {}; + this.valueCache = {}; + this.pendingRequest = 0; + this.pending = {}; + this.invalid = {}; + this.reset(); + + var groups = ( this.groups = {} ), + rules; + $.each( this.settings.groups, function( key, value ) { + if ( typeof value === "string" ) { + value = value.split( /\s/ ); + } + $.each( value, function( index, name ) { + groups[ name ] = key; + }); + }); + rules = this.settings.rules; + $.each( rules, function( key, value ) { + rules[ key ] = $.validator.normalizeRule( value ); + }); + + function delegate( event ) { + var validator = $.data( this[ 0 ].form, "validator" ), + eventType = "on" + event.type.replace( /^validate/, "" ), + settings = validator.settings; + if ( settings[ eventType ] && !this.is( settings.ignore ) ) { + settings[ eventType ].call( validator, this[ 0 ], event ); + } + } + $( this.currentForm ) + .validateDelegate( ":text, [type='password'], [type='file'], select, textarea, " + + "[type='number'], [type='search'] ,[type='tel'], [type='url'], " + + "[type='email'], [type='datetime'], [type='date'], [type='month'], " + + "[type='week'], [type='time'], [type='datetime-local'], " + + "[type='range'], [type='color'], [type='radio'], [type='checkbox']", + "focusin focusout keyup", delegate) + // Support: Chrome, oldIE + // "select" is provided as event.target when clicking a option + .validateDelegate("select, option, [type='radio'], [type='checkbox']", "click", delegate); + + if ( this.settings.invalidHandler ) { + $( this.currentForm ).bind( "invalid-form.validate", this.settings.invalidHandler ); + } + + // Add aria-required to any Static/Data/Class required fields before first validation + // Screen readers require this attribute to be present before the initial submission http://www.w3.org/TR/WCAG-TECHS/ARIA2.html + $( this.currentForm ).find( "[required], [data-rule-required], .required" ).attr( "aria-required", "true" ); + }, + + // http://jqueryvalidation.org/Validator.form/ + form: function() { + this.checkForm(); + jQuery.extend( this.submitted, this.errorMap ); + this.invalid = jQuery.extend({}, this.errorMap ); + if ( !this.valid() ) { + $( this.currentForm ).triggerHandler( "invalid-form", [ this ]); + } + this.showErrors(); + return this.valid(); + }, + + checkForm: function() { + this.prepareForm(); + for ( var i = 0, elements = ( this.currentElements = this.elements() ); elements[ i ]; i++ ) { + this.check( elements[ i ] ); + } + return this.valid(); + }, + + // http://jqueryvalidation.org/Validator.element/ + element: function( element ) { + var cleanElement = this.clean( element ), + checkElement = this.validationTargetFor( cleanElement ), + result = true; + + this.lastElement = checkElement; + + if ( checkElement === undefined ) { + delete this.invalid[ cleanElement.name ]; + } else { + this.prepareElement( checkElement ); + this.currentElements = $( checkElement ); + + result = this.check( checkElement ) !== false; + if ( result ) { + delete this.invalid[ checkElement.name ]; + } else { + this.invalid[ checkElement.name ] = true; + } + } + // Add aria-invalid status for screen readers + $( element ).attr( "aria-invalid", !result ); + + if ( !this.numberOfInvalids() ) { + // Hide error containers on last error + this.toHide = this.toHide.add( this.containers ); + } + this.showErrors(); + return result; + }, + + // http://jqueryvalidation.org/Validator.showErrors/ + showErrors: function( errors ) { + if ( errors ) { + // add items to error list and map + jQuery.extend( this.errorMap, errors ); + this.errorList = []; + for ( var name in errors ) { + this.errorList.push({ + message: errors[ name ], + element: this.findByName( name )[ 0 ] + }); + } + // remove items from success list + this.successList = $.grep( this.successList, function( element ) { + return !( element.name in errors ); + }); + } + if ( this.settings.showErrors ) { + this.settings.showErrors.call( this, this.errorMap, this.errorList ); + } else { + this.defaultShowErrors(); + } + }, + + // http://jqueryvalidation.org/Validator.resetForm/ + resetForm: function() { + if ( $.fn.resetForm ) { + $( this.currentForm ).resetForm(); + } + this.submitted = {}; + this.lastElement = null; + this.prepareForm(); + this.hideErrors(); + this.elements() + .removeClass( this.settings.errorClass ) + .removeData( "previousValue" ) + .removeAttr( "aria-invalid" ); + }, + + numberOfInvalids: function() { + return this.objectLength( this.invalid ); + }, + + objectLength: function( obj ) { + /* jshint unused: false */ + var count = 0, + i; + for ( i in obj ) { + count++; + } + return count; + }, + + hideErrors: function() { + this.hideThese( this.toHide ); + }, + + hideThese: function( errors ) { + errors.not( this.containers ).text( "" ); + this.addWrapper( errors ).hide(); + }, + + valid: function() { + return this.size() === 0; + }, + + size: function() { + return this.errorList.length; + }, + + focusInvalid: function() { + if ( this.settings.focusInvalid ) { + try { + $( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || []) + .filter( ":visible" ) + .focus() + // manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find + .trigger( "focusin" ); + } catch ( e ) { + // ignore IE throwing errors when focusing hidden elements + } + } + }, + + findLastActive: function() { + var lastActive = this.lastActive; + return lastActive && $.grep( this.errorList, function( n ) { + return n.element.name === lastActive.name; + }).length === 1 && lastActive; + }, + + elements: function() { + var validator = this, + rulesCache = {}; + + // select all valid inputs inside the form (no submit or reset buttons) + return $( this.currentForm ) + .find( "input, select, textarea" ) + .not( ":submit, :reset, :image, [disabled], [readonly]" ) + .not( this.settings.ignore ) + .filter( function() { + if ( !this.name && validator.settings.debug && window.console ) { + console.error( "%o has no name assigned", this ); + } + + // select only the first element for each name, and only those with rules specified + if ( this.name in rulesCache || !validator.objectLength( $( this ).rules() ) ) { + return false; + } + + rulesCache[ this.name ] = true; + return true; + }); + }, + + clean: function( selector ) { + return $( selector )[ 0 ]; + }, + + errors: function() { + var errorClass = this.settings.errorClass.split( " " ).join( "." ); + return $( this.settings.errorElement + "." + errorClass, this.errorContext ); + }, + + reset: function() { + this.successList = []; + this.errorList = []; + this.errorMap = {}; + this.toShow = $( [] ); + this.toHide = $( [] ); + this.currentElements = $( [] ); + }, + + prepareForm: function() { + this.reset(); + this.toHide = this.errors().add( this.containers ); + }, + + prepareElement: function( element ) { + this.reset(); + this.toHide = this.errorsFor( element ); + }, + + elementValue: function( element ) { + var val, + $element = $( element ), + type = element.type; + + if ( type === "radio" || type === "checkbox" ) { + return $( "input[name='" + element.name + "']:checked" ).val(); + } else if ( type === "number" && typeof element.validity !== "undefined" ) { + return element.validity.badInput ? false : $element.val(); + } + + val = $element.val(); + if ( typeof val === "string" ) { + return val.replace(/\r/g, "" ); + } + return val; + }, + + check: function( element ) { + element = this.validationTargetFor( this.clean( element ) ); + + var rules = $( element ).rules(), + rulesCount = $.map( rules, function( n, i ) { + return i; + }).length, + dependencyMismatch = false, + val = this.elementValue( element ), + result, method, rule; + + for ( method in rules ) { + rule = { method: method, parameters: rules[ method ] }; + try { + + result = $.validator.methods[ method ].call( this, val, element, rule.parameters ); + + // if a method indicates that the field is optional and therefore valid, + // don't mark it as valid when there are no other rules + if ( result === "dependency-mismatch" && rulesCount === 1 ) { + dependencyMismatch = true; + continue; + } + dependencyMismatch = false; + + if ( result === "pending" ) { + this.toHide = this.toHide.not( this.errorsFor( element ) ); + return; + } + + if ( !result ) { + this.formatAndAdd( element, rule ); + return false; + } + } catch ( e ) { + if ( this.settings.debug && window.console ) { + console.log( "Exception occurred when checking element " + element.id + ", check the '" + rule.method + "' method.", e ); + } + throw e; + } + } + if ( dependencyMismatch ) { + return; + } + if ( this.objectLength( rules ) ) { + this.successList.push( element ); + } + return true; + }, + + // return the custom message for the given element and validation method + // specified in the element's HTML5 data attribute + // return the generic message if present and no method specific message is present + customDataMessage: function( element, method ) { + return $( element ).data( "msg" + method.charAt( 0 ).toUpperCase() + + method.substring( 1 ).toLowerCase() ) || $( element ).data( "msg" ); + }, + + // return the custom message for the given element name and validation method + customMessage: function( name, method ) { + var m = this.settings.messages[ name ]; + return m && ( m.constructor === String ? m : m[ method ]); + }, + + // return the first defined argument, allowing empty strings + findDefined: function() { + for ( var i = 0; i < arguments.length; i++) { + if ( arguments[ i ] !== undefined ) { + return arguments[ i ]; + } + } + return undefined; + }, + + defaultMessage: function( element, method ) { + return this.findDefined( + this.customMessage( element.name, method ), + this.customDataMessage( element, method ), + // title is never undefined, so handle empty string as undefined + !this.settings.ignoreTitle && element.title || undefined, + $.validator.messages[ method ], + "<strong>Warning: No message defined for " + element.name + "</strong>" + ); + }, + + formatAndAdd: function( element, rule ) { + var message = this.defaultMessage( element, rule.method ), + theregex = /\$?\{(\d+)\}/g; + if ( typeof message === "function" ) { + message = message.call( this, rule.parameters, element ); + } else if ( theregex.test( message ) ) { + message = $.validator.format( message.replace( theregex, "{$1}" ), rule.parameters ); + } + this.errorList.push({ + message: message, + element: element, + method: rule.method + }); + + this.errorMap[ element.name ] = message; + this.submitted[ element.name ] = message; + }, + + addWrapper: function( toToggle ) { + if ( this.settings.wrapper ) { + toToggle = toToggle.add( toToggle.parent( this.settings.wrapper ) ); + } + return toToggle; + }, + + defaultShowErrors: function() { + var i, elements, error; + for ( i = 0; this.errorList[ i ]; i++ ) { + error = this.errorList[ i ]; + if ( this.settings.highlight ) { + this.settings.highlight.call( this, error.element, this.settings.errorClass, this.settings.validClass ); + } + this.showLabel( error.element, error.message ); + } + if ( this.errorList.length ) { + this.toShow = this.toShow.add( this.containers ); + } + if ( this.settings.success ) { + for ( i = 0; this.successList[ i ]; i++ ) { + this.showLabel( this.successList[ i ] ); + } + } + if ( this.settings.unhighlight ) { + for ( i = 0, elements = this.validElements(); elements[ i ]; i++ ) { + this.settings.unhighlight.call( this, elements[ i ], this.settings.errorClass, this.settings.validClass ); + } + } + this.toHide = this.toHide.not( this.toShow ); + this.hideErrors(); + this.addWrapper( this.toShow ).show(); + }, + + validElements: function() { + return this.currentElements.not( this.invalidElements() ); + }, + + invalidElements: function() { + return $( this.errorList ).map(function() { + return this.element; + }); + }, + + showLabel: function( element, message ) { + var place, group, errorID, + error = this.errorsFor( element ), + elementID = this.idOrName( element ), + describedBy = $( element ).attr( "aria-describedby" ); + if ( error.length ) { + // refresh error/success class + error.removeClass( this.settings.validClass ).addClass( this.settings.errorClass ); + // replace message on existing label + error.html( message ); + } else { + // create error element + error = $( "<" + this.settings.errorElement + ">" ) + .attr( "id", elementID + "-error" ) + .addClass( this.settings.errorClass ) + .html( message || "" ); + + // Maintain reference to the element to be placed into the DOM + place = error; + if ( this.settings.wrapper ) { + // make sure the element is visible, even in IE + // actually showing the wrapped element is handled elsewhere + place = error.hide().show().wrap( "<" + this.settings.wrapper + "/>" ).parent(); + } + if ( this.labelContainer.length ) { + this.labelContainer.append( place ); + } else if ( this.settings.errorPlacement ) { + this.settings.errorPlacement( place, $( element ) ); + } else { + place.insertAfter( element ); + } + + // Link error back to the element + if ( error.is( "label" ) ) { + // If the error is a label, then associate using 'for' + error.attr( "for", elementID ); + } else if ( error.parents( "label[for='" + elementID + "']" ).length === 0 ) { + // If the element is not a child of an associated label, then it's necessary + // to explicitly apply aria-describedby + + errorID = error.attr( "id" ).replace( /(:|\.|\[|\])/g, "\\$1"); + // Respect existing non-error aria-describedby + if ( !describedBy ) { + describedBy = errorID; + } else if ( !describedBy.match( new RegExp( "\\b" + errorID + "\\b" ) ) ) { + // Add to end of list if not already present + describedBy += " " + errorID; + } + $( element ).attr( "aria-describedby", describedBy ); + + // If this element is grouped, then assign to all elements in the same group + group = this.groups[ element.name ]; + if ( group ) { + $.each( this.groups, function( name, testgroup ) { + if ( testgroup === group ) { + $( "[name='" + name + "']", this.currentForm ) + .attr( "aria-describedby", error.attr( "id" ) ); + } + }); + } + } + } + if ( !message && this.settings.success ) { + error.text( "" ); + if ( typeof this.settings.success === "string" ) { + error.addClass( this.settings.success ); + } else { + this.settings.success( error, element ); + } + } + this.toShow = this.toShow.add( error ); + }, + + errorsFor: function( element ) { + var name = this.idOrName( element ), + describer = $( element ).attr( "aria-describedby" ), + selector = "label[for='" + name + "'], label[for='" + name + "'] *"; + + // aria-describedby should directly reference the error element + if ( describer ) { + selector = selector + ", #" + describer.replace( /\s+/g, ", #" ); + } + return this + .errors() + .filter( selector ); + }, + + idOrName: function( element ) { + return this.groups[ element.name ] || ( this.checkable( element ) ? element.name : element.id || element.name ); + }, + + validationTargetFor: function( element ) { + + // If radio/checkbox, validate first element in group instead + if ( this.checkable( element ) ) { + element = this.findByName( element.name ); + } + + // Always apply ignore filter + return $( element ).not( this.settings.ignore )[ 0 ]; + }, + + checkable: function( element ) { + return ( /radio|checkbox/i ).test( element.type ); + }, + + findByName: function( name ) { + return $( this.currentForm ).find( "[name='" + name + "']" ); + }, + + getLength: function( value, element ) { + switch ( element.nodeName.toLowerCase() ) { + case "select": + return $( "option:selected", element ).length; + case "input": + if ( this.checkable( element ) ) { + return this.findByName( element.name ).filter( ":checked" ).length; + } + } + return value.length; + }, + + depend: function( param, element ) { + return this.dependTypes[typeof param] ? this.dependTypes[typeof param]( param, element ) : true; + }, + + dependTypes: { + "boolean": function( param ) { + return param; + }, + "string": function( param, element ) { + return !!$( param, element.form ).length; + }, + "function": function( param, element ) { + return param( element ); + } + }, + + optional: function( element ) { + var val = this.elementValue( element ); + return !$.validator.methods.required.call( this, val, element ) && "dependency-mismatch"; + }, + + startRequest: function( element ) { + if ( !this.pending[ element.name ] ) { + this.pendingRequest++; + this.pending[ element.name ] = true; + } + }, + + stopRequest: function( element, valid ) { + this.pendingRequest--; + // sometimes synchronization fails, make sure pendingRequest is never < 0 + if ( this.pendingRequest < 0 ) { + this.pendingRequest = 0; + } + delete this.pending[ element.name ]; + if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) { + $( this.currentForm ).submit(); + this.formSubmitted = false; + } else if (!valid && this.pendingRequest === 0 && this.formSubmitted ) { + $( this.currentForm ).triggerHandler( "invalid-form", [ this ]); + this.formSubmitted = false; + } + }, + + previousValue: function( element ) { + return $.data( element, "previousValue" ) || $.data( element, "previousValue", { + old: null, + valid: true, + message: this.defaultMessage( element, "remote" ) + }); + } + + }, + + classRuleSettings: { + required: { required: true }, + email: { email: true }, + url: { url: true }, + date: { date: true }, + dateISO: { dateISO: true }, + number: { number: true }, + digits: { digits: true }, + creditcard: { creditcard: true } + }, + + addClassRules: function( className, rules ) { + if ( className.constructor === String ) { + this.classRuleSettings[ className ] = rules; + } else { + jQuery.extend( this.classRuleSettings, className ); + } + }, + + classRules: function( element ) { + var rules = {}, + classes = $( element ).attr( "class" ); + + if ( classes ) { + $.each( classes.split( " " ), function() { + if ( this in $.validator.classRuleSettings ) { + jQuery.extend( rules, $.validator.classRuleSettings[ this ]); + } + }); + } + return rules; + }, + + attributeRules: function( element ) { + var rules = {}, + $element = $( element ), + type = element.getAttribute( "type" ), + method, value; + + for ( method in $.validator.methods ) { + + // support for <input required> in both html5 and older browsers + if ( method === "required" ) { + value = element.getAttribute( method ); + // Some browsers return an empty string for the required attribute + // and non-HTML5 browsers might have required="" markup + if ( value === "" ) { + value = true; + } + // force non-HTML5 browsers to return bool + value = !!value; + } else { + value = $element.attr( method ); + } + + // convert the value to a number for number inputs, and for text for backwards compability + // allows type="date" and others to be compared as strings + if ( /min|max/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) { + value = Number( value ); + } + + if ( value || value === 0 ) { + rules[ method ] = value; + } else if ( type === method && type !== "range" ) { + // exception: the jquery validate 'range' method + // does not test for the html5 'range' type + rules[ method ] = true; + } + } + + // maxlength may be returned as -1, 2147483647 ( IE ) and 524288 ( safari ) for text inputs + if ( rules.maxlength && /-1|2147483647|524288/.test( rules.maxlength ) ) { + delete rules.maxlength; + } + + return rules; + }, + + dataRules: function( element ) { + var method, value, + rules = {}, $element = $( element ); + for ( method in $.validator.methods ) { + value = $element.data( "rule" + method.charAt( 0 ).toUpperCase() + method.substring( 1 ).toLowerCase() ); + if ( value !== undefined ) { + rules[ method ] = value; + } + } + return rules; + }, + + staticRules: function( element ) { + var rules = {}, + validator = $.data( element.form, "validator" ); + + if ( validator.settings.rules ) { + rules = $.validator.normalizeRule( validator.settings.rules[ element.name ] ) || {}; + } + return rules; + }, + + normalizeRules: function( rules, element ) { + // handle dependency check + $.each( rules, function( prop, val ) { + // ignore rule when param is explicitly false, eg. required:false + if ( val === false ) { + delete rules[ prop ]; + return; + } + if ( val.param || val.depends ) { + var keepRule = true; + switch ( typeof val.depends ) { + case "string": + keepRule = !!$( val.depends, element.form ).length; + break; + case "function": + keepRule = val.depends.call( element, element ); + break; + } + if ( keepRule ) { + rules[ prop ] = val.param !== undefined ? val.param : true; + } else { + delete rules[ prop ]; + } + } + }); + + // evaluate parameters + $.each( rules, function( rule, parameter ) { + rules[ rule ] = $.isFunction( parameter ) ? parameter( element ) : parameter; + }); + + // clean number parameters + $.each([ "minlength", "maxlength" ], function() { + if ( rules[ this ] ) { + rules[ this ] = Number( rules[ this ] ); + } + }); + $.each([ "rangelength", "range" ], function() { + var parts; + if ( rules[ this ] ) { + if ( $.isArray( rules[ this ] ) ) { + rules[ this ] = [ Number( rules[ this ][ 0 ]), Number( rules[ this ][ 1 ] ) ]; + } else if ( typeof rules[ this ] === "string" ) { + parts = rules[ this ].replace(/[\[\]]/g, "" ).split( /[\s,]+/ ); + rules[ this ] = [ Number( parts[ 0 ]), Number( parts[ 1 ] ) ]; + } + } + }); + + if ( $.validator.autoCreateRanges ) { + // auto-create ranges + if ( rules.min != null && rules.max != null ) { + rules.range = [ rules.min, rules.max ]; + delete rules.min; + delete rules.max; + } + if ( rules.minlength != null && rules.maxlength != null ) { + rules.rangelength = [ rules.minlength, rules.maxlength ]; + delete rules.minlength; + delete rules.maxlength; + } + } + + return rules; + }, + + // Converts a simple string to a {string: true} rule, e.g., "required" to {required:true} + normalizeRule: function( data ) { + if ( typeof data === "string" ) { + var transformed = {}; + $.each( data.split( /\s/ ), function() { + transformed[ this ] = true; + }); + data = transformed; + } + return data; + }, + + // http://jqueryvalidation.org/jQuery.validator.addMethod/ + addMethod: function( name, method, message ) { + $.validator.methods[ name ] = method; + $.validator.messages[ name ] = message !== undefined ? message : $.validator.messages[ name ]; + if ( method.length < 3 ) { + $.validator.addClassRules( name, $.validator.normalizeRule( name ) ); + } + }, + + methods: { + + // http://jqueryvalidation.org/required-method/ + required: function( value, element, param ) { + // check if dependency is met + if ( !this.depend( param, element ) ) { + return "dependency-mismatch"; + } + if ( element.nodeName.toLowerCase() === "select" ) { + // could be an array for select-multiple or a string, both are fine this way + var val = $( element ).val(); + return val && val.length > 0; + } + if ( this.checkable( element ) ) { + return this.getLength( value, element ) > 0; + } + return $.trim( value ).length > 0; + }, + + // http://jqueryvalidation.org/email-method/ + email: function( value, element ) { + // From http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#e-mail-state-%28type=email%29 + // Retrieved 2014-01-14 + // If you have a problem with this implementation, report a bug against the above spec + // Or use custom methods to implement your own email validation + return this.optional( element ) || /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test( value ); + }, + + // http://jqueryvalidation.org/url-method/ + url: function( value, element ) { + // contributed by Scott Gonzalez: http://projects.scottsplayground.com/iri/ + return this.optional( element ) || /^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test( value ); + }, + + // http://jqueryvalidation.org/date-method/ + date: function( value, element ) { + return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() ); + }, + + // http://jqueryvalidation.org/dateISO-method/ + dateISO: function( value, element ) { + return this.optional( element ) || /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test( value ); + }, + + // http://jqueryvalidation.org/number-method/ + number: function( value, element ) { + return this.optional( element ) || /^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test( value ); + }, + + // http://jqueryvalidation.org/digits-method/ + digits: function( value, element ) { + return this.optional( element ) || /^\d+$/.test( value ); + }, + + // http://jqueryvalidation.org/creditcard-method/ + // based on http://en.wikipedia.org/wiki/Luhn/ + creditcard: function( value, element ) { + if ( this.optional( element ) ) { + return "dependency-mismatch"; + } + // accept only spaces, digits and dashes + if ( /[^0-9 \-]+/.test( value ) ) { + return false; + } + var nCheck = 0, + nDigit = 0, + bEven = false, + n, cDigit; + + value = value.replace( /\D/g, "" ); + + // Basing min and max length on + // http://developer.ean.com/general_info/Valid_Credit_Card_Types + if ( value.length < 13 || value.length > 19 ) { + return false; + } + + for ( n = value.length - 1; n >= 0; n--) { + cDigit = value.charAt( n ); + nDigit = parseInt( cDigit, 10 ); + if ( bEven ) { + if ( ( nDigit *= 2 ) > 9 ) { + nDigit -= 9; + } + } + nCheck += nDigit; + bEven = !bEven; + } + + return ( nCheck % 10 ) === 0; + }, + + // http://jqueryvalidation.org/minlength-method/ + minlength: function( value, element, param ) { + var length = $.isArray( value ) ? value.length : this.getLength( value, element ); + return this.optional( element ) || length >= param; + }, + + // http://jqueryvalidation.org/maxlength-method/ + maxlength: function( value, element, param ) { + var length = $.isArray( value ) ? value.length : this.getLength( value, element ); + return this.optional( element ) || length <= param; + }, + + // http://jqueryvalidation.org/rangelength-method/ + rangelength: function( value, element, param ) { + var length = $.isArray( value ) ? value.length : this.getLength( value, element ); + return this.optional( element ) || ( length >= param[ 0 ] && length <= param[ 1 ] ); + }, + + // http://jqueryvalidation.org/min-method/ + min: function( value, element, param ) { + return this.optional( element ) || value >= param; + }, + + // http://jqueryvalidation.org/max-method/ + max: function( value, element, param ) { + return this.optional( element ) || value <= param; + }, + + // http://jqueryvalidation.org/range-method/ + range: function( value, element, param ) { + return this.optional( element ) || ( value >= param[ 0 ] && value <= param[ 1 ] ); + }, + + // http://jqueryvalidation.org/equalTo-method/ + equalTo: function( value, element, param ) { + // bind to the blur event of the target in order to revalidate whenever the target field is updated + // TODO find a way to bind the event just once, avoiding the unbind-rebind overhead + var target = $( param ); + if ( this.settings.onfocusout ) { + target.unbind( ".validate-equalTo" ).bind( "blur.validate-equalTo", function() { + $( element ).valid(); + }); + } + return value === target.val(); + }, + + // http://jqueryvalidation.org/remote-method/ + remote: function( value, element, param ) { + if ( this.optional( element ) ) { + return "dependency-mismatch"; + } + + var previous = this.previousValue( element ), + validator, data; + + if (!this.settings.messages[ element.name ] ) { + this.settings.messages[ element.name ] = {}; + } + previous.originalMessage = this.settings.messages[ element.name ].remote; + this.settings.messages[ element.name ].remote = previous.message; + + param = typeof param === "string" && { url: param } || param; + + if ( previous.old === value ) { + return previous.valid; + } + + previous.old = value; + validator = this; + this.startRequest( element ); + data = {}; + data[ element.name ] = value; + $.ajax( jQuery.extend( true, { + url: param, + mode: "abort", + port: "validate" + element.name, + dataType: "json", + data: data, + context: validator.currentForm, + success: function( response ) { + var valid = response === true || response === "true", + errors, message, submitted; + + validator.settings.messages[ element.name ].remote = previous.originalMessage; + if ( valid ) { + submitted = validator.formSubmitted; + validator.prepareElement( element ); + validator.formSubmitted = submitted; + validator.successList.push( element ); + delete validator.invalid[ element.name ]; + validator.showErrors(); + } else { + errors = {}; + message = response || validator.defaultMessage( element, "remote" ); + errors[ element.name ] = previous.message = $.isFunction( message ) ? message( value ) : message; + validator.invalid[ element.name ] = true; + validator.showErrors( errors ); + } + previous.valid = valid; + validator.stopRequest( element, valid ); + } + }, param ) ); + return "pending"; + } + + } + +}); + +$.format = function deprecated() { + throw "$.format has been deprecated. Please use $.validator.format instead."; +}; + +// ajax mode: abort +// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]}); +// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort() + +var pendingRequests = {}, + ajax; +// Use a prefilter if available (1.5+) +if ( $.ajaxPrefilter ) { + $.ajaxPrefilter(function( settings, _, xhr ) { + var port = settings.port; + if ( settings.mode === "abort" ) { + if ( pendingRequests[port] ) { + pendingRequests[port].abort(); + } + pendingRequests[port] = xhr; + } + }); +} else { + // Proxy ajax + ajax = $.ajax; + $.ajax = function( settings ) { + var mode = ( "mode" in settings ? settings : $.ajaxSettings ).mode, + port = ( "port" in settings ? settings : $.ajaxSettings ).port; + if ( mode === "abort" ) { + if ( pendingRequests[port] ) { + pendingRequests[port].abort(); + } + pendingRequests[port] = ajax.apply(this, arguments); + return pendingRequests[port]; + } + return ajax.apply(this, arguments); + }; +} + +// provides delegate(type: String, delegate: Selector, handler: Callback) plugin for easier event delegation +// handler is only called when $(event.target).is(delegate), in the scope of the jquery-object for event.target + +jQuery.extend($.fn, { + validateDelegate: function( delegate, type, handler ) { + return this.bind(type, function( event ) { + var target = $(event.target); + if ( target.is(delegate) ) { + return handler.apply(target, arguments); + } + }); + } +}); + +}));
\ No newline at end of file diff --git a/script/jquery-validate/jquery.validate.min.js b/script/jquery-validate/jquery.validate.min.js new file mode 100644 index 0000000..3a8cdb2 --- /dev/null +++ b/script/jquery-validate/jquery.validate.min.js @@ -0,0 +1,4 @@ +/*! jQuery Validation Plugin - v1.13.1 - 10/14/2014 + * http://jqueryvalidation.org/ + * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */ +!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.validateDelegate(":submit","click",function(b){c.settings.submitHandler&&(c.submitButton=b.target),a(b.target).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(b.target).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.submit(function(b){function d(){var d,e;return c.settings.submitHandler?(c.submitButton&&(d=a("<input type='hidden'/>").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),e=c.settings.submitHandler.call(c,c.currentForm,b),c.submitButton&&d.remove(),void 0!==e?e:!1):!0}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c;return a(this[0]).is("form")?b=this.validate().form():(b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b})),b},removeAttrs:function(b){var c={},d=this;return a.each(b.split(/\s/),function(a,b){c[b]=d.attr(b),d.removeAttr(b)}),c},rules:function(b,c){var d,e,f,g,h,i,j=this[0];if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(b,c){i[c]=f[c],delete f[c],"required"===c&&a(j).removeAttr("aria-required")}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g),a(j).attr("aria-required","true")),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}),a.extend(a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){return!!a.trim(""+a(b).val())},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(a,b){(9!==b.which||""!==this.elementValue(a))&&(a.name in this.submitted||a===this.lastElement)&&this.element(a)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date ( ISO ).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c=a.data(this[0].form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!this.is(e.ignore)&&e[d].call(c,this[0],b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).validateDelegate(":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox']","focusin focusout keyup",b).validateDelegate("select, option, [type='radio'], [type='checkbox']","click",b),this.settings.invalidHandler&&a(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler),a(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true")},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c=this.clean(b),d=this.validationTargetFor(c),e=!0;return this.lastElement=d,void 0===d?delete this.invalid[c.name]:(this.prepareElement(d),this.currentElements=a(d),e=this.check(d)!==!1,e?delete this.invalid[d.name]:this.invalid[d.name]=!0),a(b).attr("aria-invalid",!e),this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),e},showErrors:function(b){if(b){a.extend(this.errorMap,b),this.errorList=[];for(var c in b)this.errorList.push({message:b[c],element:this.findByName(c)[0]});this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors(),this.elements().removeClass(this.settings.errorClass).removeData("previousValue").removeAttr("aria-invalid")},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled], [readonly]").not(this.settings.ignore).filter(function(){return!this.name&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in c||!b.objectLength(a(this).rules())?!1:(c[this.name]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([]),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d=a(b),e=b.type;return"radio"===e||"checkbox"===e?a("input[name='"+b.name+"']:checked").val():"number"===e&&"undefined"!=typeof b.validity?b.validity.badInput?!1:d.val():(c=d.val(),"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f=a(b).rules(),g=a.map(f,function(a,b){return b}).length,h=!1,i=this.elementValue(b);for(d in f){e={method:d,parameters:f[d]};try{if(c=a.validator.methods[d].call(this,i,b,e.parameters),"dependency-mismatch"===c&&1===g){h=!0;continue}if(h=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(j){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",j),j}}if(!h)return this.objectLength(f)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;a<arguments.length;a++)if(void 0!==arguments[a])return arguments[a];return void 0},defaultMessage:function(b,c){return this.findDefined(this.customMessage(b.name,c),this.customDataMessage(b,c),!this.settings.ignoreTitle&&b.title||void 0,a.validator.messages[c],"<strong>Warning: No message defined for "+b.name+"</strong>")},formatAndAdd:function(b,c){var d=this.defaultMessage(b,c.method),e=/\$?\{(\d+)\}/g;"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),this.errorList.push({message:d,element:b,method:c.method}),this.errorMap[b.name]=d,this.submitted[b.name]=d},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g=this.errorsFor(b),h=this.idOrName(b),i=a(b).attr("aria-describedby");g.length?(g.removeClass(this.settings.validClass).addClass(this.settings.errorClass),g.html(c)):(g=a("<"+this.settings.errorElement+">").attr("id",h+"-error").addClass(this.settings.errorClass).html(c||""),d=g,this.settings.wrapper&&(d=g.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement(d,a(b)):d.insertAfter(b),g.is("label")?g.attr("for",h):0===g.parents("label[for='"+h+"']").length&&(f=g.attr("id").replace(/(:|\.|\[|\])/g,"\\$1"),i?i.match(new RegExp("\\b"+f+"\\b"))||(i+=" "+f):i=f,a(b).attr("aria-describedby",i),e=this.groups[b.name],e&&a.each(this.groups,function(b,c){c===e&&a("[name='"+b+"']",this.currentForm).attr("aria-describedby",g.attr("id"))}))),!c&&this.settings.success&&(g.text(""),"string"==typeof this.settings.success?g.addClass(this.settings.success):this.settings.success(g,b)),this.toShow=this.toShow.add(g)},errorsFor:function(b){var c=this.idOrName(b),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+d.replace(/\s+/g,", #")),this.errors().filter(e)},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+b+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):!0},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(a){this.pending[a.name]||(this.pendingRequest++,this.pending[a.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,"remote")})}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),/min|max/.test(c)&&(null===g||/number|range|text/.test(g))&&(d=Number(d)),d||0===d?e[c]=d:g===c&&"range"!==g&&(e[c]=!0);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b);for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),void 0!==d&&(e[c]=d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0!==e.param?e.param:!0:delete b[d]}}),a.each(b,function(d,e){b[d]=a.isFunction(e)?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:a.trim(b).length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},creditcard:function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||d>=e},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||c>=a},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d){if(this.optional(c))return"dependency-mismatch";var e,f,g=this.previousValue(c);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),g.originalMessage=this.settings.messages[c.name].remote,this.settings.messages[c.name].remote=g.message,d="string"==typeof d&&{url:d}||d,g.old===b?g.valid:(g.old=b,e=this,this.startRequest(c),f={},f[c.name]=b,a.ajax(a.extend(!0,{url:d,mode:"abort",port:"validate"+c.name,dataType:"json",data:f,context:e.currentForm,success:function(d){var f,h,i,j=d===!0||"true"===d;e.settings.messages[c.name].remote=g.originalMessage,j?(i=e.formSubmitted,e.prepareElement(c),e.formSubmitted=i,e.successList.push(c),delete e.invalid[c.name],e.showErrors()):(f={},h=d||e.defaultMessage(c,"remote"),f[c.name]=g.message=a.isFunction(h)?h(b):h,e.invalid[c.name]=!0,e.showErrors(f)),g.valid=j,e.stopRequest(c,j)}},d)),"pending")}}}),a.format=function(){throw"$.format has been deprecated. Please use $.validator.format instead."};var b,c={};a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)}),a.extend(a.fn,{validateDelegate:function(b,c,d){return this.bind(c,function(c){var e=a(c.target);return e.is(b)?d.apply(e,arguments):void 0})}})});
\ No newline at end of file diff --git a/script/jquery-validate/localization/messages_ar.js b/script/jquery-validate/localization/messages_ar.js new file mode 100644 index 0000000..4485716 --- /dev/null +++ b/script/jquery-validate/localization/messages_ar.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: AR (Arabic; العربية) + */ +jQuery.extend( jQuery.validator.messages, { + required: "هذا الحقل إلزامي", + remote: "يرجى تصحيح هذا الحقل للمتابعة", + email: "رجاء إدخال عنوان بريد إلكتروني صحيح", + url: "رجاء إدخال عنوان موقع إلكتروني صحيح", + date: "رجاء إدخال تاريخ صحيح", + dateISO: "رجاء إدخال تاريخ صحيح (ISO)", + number: "رجاء إدخال عدد بطريقة صحيحة", + digits: "رجاء إدخال أرقام فقط", + creditcard: "رجاء إدخال رقم بطاقة ائتمان صحيح", + equalTo: "رجاء إدخال نفس القيمة", + extension: "رجاء إدخال ملف بامتداد موافق عليه", + maxlength: jQuery.validator.format( "الحد الأقصى لعدد الحروف هو {0}" ), + minlength: jQuery.validator.format( "الحد الأدنى لعدد الحروف هو {0}" ), + rangelength: jQuery.validator.format( "عدد الحروف يجب أن يكون بين {0} و {1}" ), + range: jQuery.validator.format( "رجاء إدخال عدد قيمته بين {0} و {1}" ), + max: jQuery.validator.format( "رجاء إدخال عدد أقل من أو يساوي (0}" ), + min: jQuery.validator.format( "رجاء إدخال عدد أكبر من أو يساوي (0}" ) +} ); diff --git a/script/jquery-validate/localization/messages_bg.js b/script/jquery-validate/localization/messages_bg.js new file mode 100644 index 0000000..d5ba6f6 --- /dev/null +++ b/script/jquery-validate/localization/messages_bg.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: BG (Bulgarian; български език) + */ +jQuery.extend( jQuery.validator.messages, { + required: "Полето е задължително.", + remote: "Моля, въведете правилната стойност.", + email: "Моля, въведете валиден email.", + url: "Моля, въведете валидно URL.", + date: "Моля, въведете валидна дата.", + dateISO: "Моля, въведете валидна дата (ISO).", + number: "Моля, въведете валиден номер.", + digits: "Моля, въведете само цифри.", + creditcard: "Моля, въведете валиден номер на кредитна карта.", + equalTo: "Моля, въведете същата стойност отново.", + extension: "Моля, въведете стойност с валидно разширение.", + maxlength: jQuery.validator.format( "Моля, въведете повече от {0} символа." ), + minlength: jQuery.validator.format( "Моля, въведете поне {0} символа." ), + rangelength: jQuery.validator.format( "Моля, въведете стойност с дължина между {0} и {1} символа." ), + range: jQuery.validator.format( "Моля, въведете стойност между {0} и {1}." ), + max: jQuery.validator.format( "Моля, въведете стойност по-малка или равна на {0}." ), + min: jQuery.validator.format( "Моля, въведете стойност по-голяма или равна на {0}." ) +} ); diff --git a/script/jquery-validate/localization/messages_bn_BD.js b/script/jquery-validate/localization/messages_bn_BD.js new file mode 100644 index 0000000..29450d4 --- /dev/null +++ b/script/jquery-validate/localization/messages_bn_BD.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: bn_BD (Bengali, Bangladesh) + */ +jQuery.extend( jQuery.validator.messages, { + required: "এই তথ্যটি আবশ্যক।", + remote: "এই তথ্যটি ঠিক করুন।", + email: "অনুগ্রহ করে একটি সঠিক মেইল ঠিকানা লিখুন।", + url: "অনুগ্রহ করে একটি সঠিক লিঙ্ক দিন।", + date: "তারিখ সঠিক নয়।", + dateISO: "অনুগ্রহ করে একটি সঠিক (ISO) তারিখ লিখুন।", + number: "অনুগ্রহ করে একটি সঠিক নম্বর লিখুন।", + digits: "এখানে শুধু সংখ্যা ব্যবহার করা যাবে।", + creditcard: "অনুগ্রহ করে একটি ক্রেডিট কার্ডের সঠিক নম্বর লিখুন।", + equalTo: "একই মান আবার লিখুন।", + extension: "সঠিক ধরনের ফাইল আপলোড করুন।", + maxlength: jQuery.validator.format( "{0}টির বেশি অক্ষর লেখা যাবে না।" ), + minlength: jQuery.validator.format( "{0}টির কম অক্ষর লেখা যাবে না।" ), + rangelength: jQuery.validator.format( "{0} থেকে {1} টি অক্ষর সম্বলিত মান লিখুন।" ), + range: jQuery.validator.format( "{0} থেকে {1} এর মধ্যে একটি মান ব্যবহার করুন।" ), + max: jQuery.validator.format( "অনুগ্রহ করে {0} বা তার চাইতে কম মান ব্যবহার করুন।" ), + min: jQuery.validator.format( "অনুগ্রহ করে {0} বা তার চাইতে বেশি মান ব্যবহার করুন।" ) +} ); diff --git a/script/jquery-validate/localization/messages_ca.js b/script/jquery-validate/localization/messages_ca.js new file mode 100644 index 0000000..4713b7f --- /dev/null +++ b/script/jquery-validate/localization/messages_ca.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: CA (Catalan; català) + */ +jQuery.extend( jQuery.validator.messages, { + required: "Aquest camp és obligatori.", + remote: "Si us plau, omple aquest camp.", + email: "Si us plau, escriu una adreça de correu-e vàlida", + url: "Si us plau, escriu una URL vàlida.", + date: "Si us plau, escriu una data vàlida.", + dateISO: "Si us plau, escriu una data (ISO) vàlida.", + number: "Si us plau, escriu un número enter vàlid.", + digits: "Si us plau, escriu només dígits.", + creditcard: "Si us plau, escriu un número de tarjeta vàlid.", + equalTo: "Si us plau, escriu el mateix valor de nou.", + extension: "Si us plau, escriu un valor amb una extensió acceptada.", + maxlength: jQuery.validator.format( "Si us plau, no escriguis més de {0} caracters." ), + minlength: jQuery.validator.format( "Si us plau, no escriguis menys de {0} caracters." ), + rangelength: jQuery.validator.format( "Si us plau, escriu un valor entre {0} i {1} caracters." ), + range: jQuery.validator.format( "Si us plau, escriu un valor entre {0} i {1}." ), + max: jQuery.validator.format( "Si us plau, escriu un valor menor o igual a {0}." ), + min: jQuery.validator.format( "Si us plau, escriu un valor major o igual a {0}." ) +} ); diff --git a/script/jquery-validate/localization/messages_cs.js b/script/jquery-validate/localization/messages_cs.js new file mode 100644 index 0000000..d4b040b --- /dev/null +++ b/script/jquery-validate/localization/messages_cs.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: CS (Czech; čeština, český jazyk) + */ +jQuery.extend( jQuery.validator.messages, { + required: "Tento údaj je povinný.", + remote: "Prosím, opravte tento údaj.", + email: "Prosím, zadejte platný e-mail.", + url: "Prosím, zadejte platné URL.", + date: "Prosím, zadejte platné datum.", + dateISO: "Prosím, zadejte platné datum (ISO).", + number: "Prosím, zadejte číslo.", + digits: "Prosím, zadávejte pouze číslice.", + creditcard: "Prosím, zadejte číslo kreditní karty.", + equalTo: "Prosím, zadejte znovu stejnou hodnotu.", + extension: "Prosím, zadejte soubor se správnou příponou.", + maxlength: jQuery.validator.format( "Prosím, zadejte nejvíce {0} znaků." ), + minlength: jQuery.validator.format( "Prosím, zadejte nejméně {0} znaků." ), + rangelength: jQuery.validator.format( "Prosím, zadejte od {0} do {1} znaků." ), + range: jQuery.validator.format( "Prosím, zadejte hodnotu od {0} do {1}." ), + max: jQuery.validator.format( "Prosím, zadejte hodnotu menší nebo rovnu {0}." ), + min: jQuery.validator.format( "Prosím, zadejte hodnotu větší nebo rovnu {0}." ) +} ); diff --git a/script/jquery-validate/localization/messages_da.js b/script/jquery-validate/localization/messages_da.js new file mode 100644 index 0000000..40d3ae4 --- /dev/null +++ b/script/jquery-validate/localization/messages_da.js @@ -0,0 +1,20 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: DA (Danish; dansk) + */ +jQuery.extend( jQuery.validator.messages, { + required: "Dette felt er påkrævet.", + maxlength: jQuery.validator.format( "Indtast højst {0} tegn." ), + minlength: jQuery.validator.format( "Indtast mindst {0} tegn." ), + rangelength: jQuery.validator.format( "Indtast mindst {0} og højst {1} tegn." ), + email: "Indtast en gyldig email-adresse.", + url: "Indtast en gyldig URL.", + date: "Indtast en gyldig dato.", + number: "Indtast et tal.", + digits: "Indtast kun cifre.", + equalTo: "Indtast den samme værdi igen.", + range: jQuery.validator.format( "Angiv en værdi mellem {0} og {1}." ), + max: jQuery.validator.format( "Angiv en værdi der højst er {0}." ), + min: jQuery.validator.format( "Angiv en værdi der mindst er {0}." ), + creditcard: "Indtast et gyldigt kreditkortnummer." +} ); diff --git a/script/jquery-validate/localization/messages_de.js b/script/jquery-validate/localization/messages_de.js new file mode 100644 index 0000000..554f1e1 --- /dev/null +++ b/script/jquery-validate/localization/messages_de.js @@ -0,0 +1,20 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: DE (German, Deutsch) + */ +jQuery.extend( jQuery.validator.messages, { + required: "Dieses Feld ist ein Pflichtfeld.", + maxlength: jQuery.validator.format( "Geben Sie bitte maximal {0} Zeichen ein." ), + minlength: jQuery.validator.format( "Geben Sie bitte mindestens {0} Zeichen ein." ), + rangelength: jQuery.validator.format( "Geben Sie bitte mindestens {0} und maximal {1} Zeichen ein." ), + email: "Geben Sie bitte eine gültige E-Mail Adresse ein.", + url: "Geben Sie bitte eine gültige URL ein.", + date: "Bitte geben Sie ein gültiges Datum ein.", + number: "Geben Sie bitte eine Nummer ein.", + digits: "Geben Sie bitte nur Ziffern ein.", + equalTo: "Bitte denselben Wert wiederholen.", + range: jQuery.validator.format( "Geben Sie bitte einen Wert zwischen {0} und {1} ein." ), + max: jQuery.validator.format( "Geben Sie bitte einen Wert kleiner oder gleich {0} ein." ), + min: jQuery.validator.format( "Geben Sie bitte einen Wert größer oder gleich {0} ein." ), + creditcard: "Geben Sie bitte eine gültige Kreditkarten-Nummer ein." +} ); diff --git a/script/jquery-validate/localization/messages_el.js b/script/jquery-validate/localization/messages_el.js new file mode 100644 index 0000000..00cd062 --- /dev/null +++ b/script/jquery-validate/localization/messages_el.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: EL (Greek; ελληνικά) + */ +jQuery.extend( jQuery.validator.messages, { + required: "Αυτό το πεδίο είναι υποχρεωτικό.", + remote: "Παρακαλώ διορθώστε αυτό το πεδίο.", + email: "Παρακαλώ εισάγετε μια έγκυρη διεύθυνση email.", + url: "Παρακαλώ εισάγετε ένα έγκυρο URL.", + date: "Παρακαλώ εισάγετε μια έγκυρη ημερομηνία.", + dateISO: "Παρακαλώ εισάγετε μια έγκυρη ημερομηνία (ISO).", + number: "Παρακαλώ εισάγετε έναν έγκυρο αριθμό.", + digits: "Παρακαλώ εισάγετε μόνο αριθμητικά ψηφία.", + creditcard: "Παρακαλώ εισάγετε έναν έγκυρο αριθμό πιστωτικής κάρτας.", + equalTo: "Παρακαλώ εισάγετε την ίδια τιμή ξανά.", + extension: "Παρακαλώ εισάγετε μια τιμή με έγκυρη επέκταση αρχείου.", + maxlength: jQuery.validator.format( "Παρακαλώ εισάγετε μέχρι και {0} χαρακτήρες." ), + minlength: jQuery.validator.format( "Παρακαλώ εισάγετε τουλάχιστον {0} χαρακτήρες." ), + rangelength: jQuery.validator.format( "Παρακαλώ εισάγετε μια τιμή με μήκος μεταξύ {0} και {1} χαρακτήρων." ), + range: jQuery.validator.format( "Παρακαλώ εισάγετε μια τιμή μεταξύ {0} και {1}." ), + max: jQuery.validator.format( "Παρακαλώ εισάγετε μια τιμή μικρότερη ή ίση του {0}." ), + min: jQuery.validator.format( "Παρακαλώ εισάγετε μια τιμή μεγαλύτερη ή ίση του {0}." ) +} ); diff --git a/script/jquery-validate/localization/messages_es.js b/script/jquery-validate/localization/messages_es.js new file mode 100644 index 0000000..44b5d95 --- /dev/null +++ b/script/jquery-validate/localization/messages_es.js @@ -0,0 +1,26 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: ES (Spanish; Español) + */ +jQuery.extend( jQuery.validator.messages, { + required: "Este campo es obligatorio.", + remote: "Por favor, rellena este campo.", + email: "Por favor, escribe una dirección de correo válida.", + url: "Por favor, escribe una URL válida.", + date: "Por favor, escribe una fecha válida.", + dateISO: "Por favor, escribe una fecha (ISO) válida.", + number: "Por favor, escribe un número válido.", + digits: "Por favor, escribe sólo dígitos.", + creditcard: "Por favor, escribe un número de tarjeta válido.", + equalTo: "Por favor, escribe el mismo valor de nuevo.", + extension: "Por favor, escribe un valor con una extensión aceptada.", + maxlength: jQuery.validator.format( "Por favor, no escribas más de {0} caracteres." ), + minlength: jQuery.validator.format( "Por favor, no escribas menos de {0} caracteres." ), + rangelength: jQuery.validator.format( "Por favor, escribe un valor entre {0} y {1} caracteres." ), + range: jQuery.validator.format( "Por favor, escribe un valor entre {0} y {1}." ), + max: jQuery.validator.format( "Por favor, escribe un valor menor o igual a {0}." ), + min: jQuery.validator.format( "Por favor, escribe un valor mayor o igual a {0}." ), + nifES: "Por favor, escribe un NIF válido.", + nieES: "Por favor, escribe un NIE válido.", + cifES: "Por favor, escribe un CIF válido." +} ); diff --git a/script/jquery-validate/localization/messages_es_AR.js b/script/jquery-validate/localization/messages_es_AR.js new file mode 100644 index 0000000..e3b72fb --- /dev/null +++ b/script/jquery-validate/localization/messages_es_AR.js @@ -0,0 +1,27 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: ES (Spanish; Español) + * Region: AR (Argentina) + */ +jQuery.extend( jQuery.validator.messages, { + required: "Este campo es obligatorio.", + remote: "Por favor, completá este campo.", + email: "Por favor, escribí una dirección de correo válida.", + url: "Por favor, escribí una URL válida.", + date: "Por favor, escribí una fecha válida.", + dateISO: "Por favor, escribí una fecha (ISO) válida.", + number: "Por favor, escribí un número entero válido.", + digits: "Por favor, escribí sólo dígitos.", + creditcard: "Por favor, escribí un número de tarjeta válido.", + equalTo: "Por favor, escribí el mismo valor de nuevo.", + extension: "Por favor, escribí un valor con una extensión aceptada.", + maxlength: jQuery.validator.format( "Por favor, no escribas más de {0} caracteres." ), + minlength: jQuery.validator.format( "Por favor, no escribas menos de {0} caracteres." ), + rangelength: jQuery.validator.format( "Por favor, escribí un valor entre {0} y {1} caracteres." ), + range: jQuery.validator.format( "Por favor, escribí un valor entre {0} y {1}." ), + max: jQuery.validator.format( "Por favor, escribí un valor menor o igual a {0}." ), + min: jQuery.validator.format( "Por favor, escribí un valor mayor o igual a {0}." ), + nifES: "Por favor, escribí un NIF válido.", + nieES: "Por favor, escribí un NIE válido.", + cifES: "Por favor, escribí un CIF válido." +} ); diff --git a/script/jquery-validate/localization/messages_es_PE.js b/script/jquery-validate/localization/messages_es_PE.js new file mode 100644 index 0000000..61e92a6 --- /dev/null +++ b/script/jquery-validate/localization/messages_es_PE.js @@ -0,0 +1,27 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: ES (Spanish; Español) + * Region: PE (Perú) + */ +jQuery.extend( jQuery.validator.messages, { + required: "Este campo es obligatorio.", + remote: "Por favor, llene este campo.", + email: "Por favor, escriba un correo electrónico válido.", + url: "Por favor, escriba una URL válida.", + date: "Por favor, escriba una fecha válida.", + dateISO: "Por favor, escriba una fecha (ISO) válida.", + number: "Por favor, escriba un número válido.", + digits: "Por favor, escriba sólo dígitos.", + creditcard: "Por favor, escriba un número de tarjeta válido.", + equalTo: "Por favor, escriba el mismo valor de nuevo.", + extension: "Por favor, escriba un valor con una extensión permitida.", + maxlength: jQuery.validator.format( "Por favor, no escriba más de {0} caracteres." ), + minlength: jQuery.validator.format( "Por favor, no escriba menos de {0} caracteres." ), + rangelength: jQuery.validator.format( "Por favor, escriba un valor entre {0} y {1} caracteres." ), + range: jQuery.validator.format( "Por favor, escriba un valor entre {0} y {1}." ), + max: jQuery.validator.format( "Por favor, escriba un valor menor o igual a {0}." ), + min: jQuery.validator.format( "Por favor, escriba un valor mayor o igual a {0}." ), + nifES: "Por favor, escriba un NIF válido.", + nieES: "Por favor, escriba un NIE válido.", + cifES: "Por favor, escriba un CIF válido." +} ); diff --git a/script/jquery-validate/localization/messages_et.js b/script/jquery-validate/localization/messages_et.js new file mode 100644 index 0000000..4806051 --- /dev/null +++ b/script/jquery-validate/localization/messages_et.js @@ -0,0 +1,21 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: ET (Estonian; eesti, eesti keel) + */ +jQuery.extend( jQuery.validator.messages, { + required: "See väli peab olema täidetud.", + maxlength: jQuery.validator.format( "Palun sisestage vähem kui {0} tähemärki." ), + minlength: jQuery.validator.format( "Palun sisestage vähemalt {0} tähemärki." ), + rangelength: jQuery.validator.format( "Palun sisestage väärtus vahemikus {0} kuni {1} tähemärki." ), + email: "Palun sisestage korrektne e-maili aadress.", + url: "Palun sisestage korrektne URL.", + date: "Palun sisestage korrektne kuupäev.", + dateISO: "Palun sisestage korrektne kuupäev (YYYY-MM-DD).", + number: "Palun sisestage korrektne number.", + digits: "Palun sisestage ainult numbreid.", + equalTo: "Palun sisestage sama väärtus uuesti.", + range: jQuery.validator.format( "Palun sisestage väärtus vahemikus {0} kuni {1}." ), + max: jQuery.validator.format( "Palun sisestage väärtus, mis on väiksem või võrdne arvuga {0}." ), + min: jQuery.validator.format( "Palun sisestage väärtus, mis on suurem või võrdne arvuga {0}." ), + creditcard: "Palun sisestage korrektne krediitkaardi number." +} ); diff --git a/script/jquery-validate/localization/messages_eu.js b/script/jquery-validate/localization/messages_eu.js new file mode 100644 index 0000000..dead1b7 --- /dev/null +++ b/script/jquery-validate/localization/messages_eu.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: EU (Basque; euskara, euskera) + */ +jQuery.extend( jQuery.validator.messages, { + required: "Eremu hau beharrezkoa da.", + remote: "Mesedez, bete eremu hau.", + email: "Mesedez, idatzi baliozko posta helbide bat.", + url: "Mesedez, idatzi baliozko URL bat.", + date: "Mesedez, idatzi baliozko data bat.", + dateISO: "Mesedez, idatzi baliozko (ISO) data bat.", + number: "Mesedez, idatzi baliozko zenbaki oso bat.", + digits: "Mesedez, idatzi digituak soilik.", + creditcard: "Mesedez, idatzi baliozko txartel zenbaki bat.", + equalTo: "Mesedez, idatzi berdina berriro ere.", + extension: "Mesedez, idatzi onartutako luzapena duen balio bat.", + maxlength: jQuery.validator.format( "Mesedez, ez idatzi {0} karaktere baino gehiago." ), + minlength: jQuery.validator.format( "Mesedez, ez idatzi {0} karaktere baino gutxiago." ), + rangelength: jQuery.validator.format( "Mesedez, idatzi {0} eta {1} karaktere arteko balio bat." ), + range: jQuery.validator.format( "Mesedez, idatzi {0} eta {1} arteko balio bat." ), + max: jQuery.validator.format( "Mesedez, idatzi {0} edo txikiagoa den balio bat." ), + min: jQuery.validator.format( "Mesedez, idatzi {0} edo handiagoa den balio bat." ) +} ); diff --git a/script/jquery-validate/localization/messages_fa.js b/script/jquery-validate/localization/messages_fa.js new file mode 100644 index 0000000..9e38477 --- /dev/null +++ b/script/jquery-validate/localization/messages_fa.js @@ -0,0 +1,26 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: FA (Persian; فارسی) + */ +jQuery.extend( jQuery.validator.messages, { + required: "تکمیل این فیلد اجباری است.", + remote: "لطفا این فیلد را تصحیح کنید.", + email: ".لطفا یک ایمیل صحیح وارد کنید", + url: "لطفا آدرس صحیح وارد کنید.", + date: "لطفا یک تاریخ صحیح وارد کنید", + dateFA: "لطفا یک تاریخ صحیح وارد کنید", + dateISO: "لطفا تاریخ صحیح وارد کنید (ISO).", + number: "لطفا عدد صحیح وارد کنید.", + digits: "لطفا تنها رقم وارد کنید", + creditcard: "لطفا کریدیت کارت صحیح وارد کنید.", + equalTo: "لطفا مقدار برابری وارد کنید", + extension: "لطفا مقداری وارد کنید که ", + maxlength: jQuery.validator.format( "لطفا بیشتر از {0} حرف وارد نکنید." ), + minlength: jQuery.validator.format( "لطفا کمتر از {0} حرف وارد نکنید." ), + rangelength: jQuery.validator.format( "لطفا مقداری بین {0} تا {1} حرف وارد کنید." ), + range: jQuery.validator.format( "لطفا مقداری بین {0} تا {1} حرف وارد کنید." ), + max: jQuery.validator.format( "لطفا مقداری کمتر از {0} حرف وارد کنید." ), + min: jQuery.validator.format( "لطفا مقداری بیشتر از {0} حرف وارد کنید." ), + minWords: jQuery.validator.format( "لطفا حداقل {0} کلمه وارد کنید." ), + maxWords: jQuery.validator.format( "لطفا حداکثر {0} کلمه وارد کنید." ) +} ); diff --git a/script/jquery-validate/localization/messages_fi.js b/script/jquery-validate/localization/messages_fi.js new file mode 100644 index 0000000..7daddee --- /dev/null +++ b/script/jquery-validate/localization/messages_fi.js @@ -0,0 +1,21 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: FI (Finnish; suomi, suomen kieli) + */ +jQuery.extend( jQuery.validator.messages, { + required: "Tämä kenttä on pakollinen.", + email: "Syötä oikea sähköpostiosoite.", + url: "Syötä oikea URL-osoite.", + date: "Syötä oikea päivämäärä.", + dateISO: "Syötä oikea päivämäärä muodossa VVVV-KK-PP.", + number: "Syötä luku.", + creditcard: "Syötä voimassa oleva luottokorttinumero.", + digits: "Syötä pelkästään numeroita.", + equalTo: "Syötä sama arvo uudestaan.", + maxlength: jQuery.validator.format( "Voit syöttää enintään {0} merkkiä." ), + minlength: jQuery.validator.format( "Vähintään {0} merkkiä." ), + rangelength: jQuery.validator.format( "Syötä vähintään {0} ja enintään {1} merkkiä." ), + range: jQuery.validator.format( "Syötä arvo väliltä {0}–{1}." ), + max: jQuery.validator.format( "Syötä arvo, joka on enintään {0}." ), + min: jQuery.validator.format( "Syötä arvo, joka on vähintään {0}." ) +} ); diff --git a/script/jquery-validate/localization/messages_fr.js b/script/jquery-validate/localization/messages_fr.js new file mode 100644 index 0000000..69aa226 --- /dev/null +++ b/script/jquery-validate/localization/messages_fr.js @@ -0,0 +1,49 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: FR (French; français) + */ +jQuery.extend( jQuery.validator.messages, { + required: "Ce champ est obligatoire.", + remote: "Veuillez corriger ce champ.", + email: "Veuillez fournir une adresse électronique valide.", + url: "Veuillez fournir une adresse URL valide.", + date: "Veuillez fournir une date valide.", + dateISO: "Veuillez fournir une date valide (ISO).", + number: "Veuillez fournir un numéro valide.", + digits: "Veuillez fournir seulement des chiffres.", + creditcard: "Veuillez fournir un numéro de carte de crédit valide.", + equalTo: "Veuillez fournir encore la même valeur.", + extension: "Veuillez fournir une valeur avec une extension valide.", + maxlength: jQuery.validator.format( "Veuillez fournir au plus {0} caractères." ), + minlength: jQuery.validator.format( "Veuillez fournir au moins {0} caractères." ), + rangelength: jQuery.validator.format( "Veuillez fournir une valeur qui contient entre {0} et {1} caractères." ), + range: jQuery.validator.format( "Veuillez fournir une valeur entre {0} et {1}." ), + max: jQuery.validator.format( "Veuillez fournir une valeur inférieure ou égale à {0}." ), + min: jQuery.validator.format( "Veuillez fournir une valeur supérieure ou égale à {0}." ), + maxWords: jQuery.validator.format( "Veuillez fournir au plus {0} mots." ), + minWords: jQuery.validator.format( "Veuillez fournir au moins {0} mots." ), + rangeWords: jQuery.validator.format( "Veuillez fournir entre {0} et {1} mots." ), + letterswithbasicpunc: "Veuillez fournir seulement des lettres et des signes de ponctuation.", + alphanumeric: "Veuillez fournir seulement des lettres, nombres, espaces et soulignages.", + lettersonly: "Veuillez fournir seulement des lettres.", + nowhitespace: "Veuillez ne pas inscrire d'espaces blancs.", + ziprange: "Veuillez fournir un code postal entre 902xx-xxxx et 905-xx-xxxx.", + integer: "Veuillez fournir un nombre non décimal qui est positif ou négatif.", + vinUS: "Veuillez fournir un numéro d'identification du véhicule (VIN).", + dateITA: "Veuillez fournir une date valide.", + time: "Veuillez fournir une heure valide entre 00:00 et 23:59.", + phoneUS: "Veuillez fournir un numéro de téléphone valide.", + phoneUK: "Veuillez fournir un numéro de téléphone valide.", + mobileUK: "Veuillez fournir un numéro de téléphone mobile valide.", + strippedminlength: jQuery.validator.format( "Veuillez fournir au moins {0} caractères." ), + email2: "Veuillez fournir une adresse électronique valide.", + url2: "Veuillez fournir une adresse URL valide.", + creditcardtypes: "Veuillez fournir un numéro de carte de crédit valide.", + ipv4: "Veuillez fournir une adresse IP v4 valide.", + ipv6: "Veuillez fournir une adresse IP v6 valide.", + require_from_group: "Veuillez fournir au moins {0} de ces champs.", + nifES: "Veuillez fournir un numéro NIF valide.", + nieES: "Veuillez fournir un numéro NIE valide.", + cifES: "Veuillez fournir un numéro CIF valide.", + postalCodeCA: "Veuillez fournir un code postal valide." +} ); diff --git a/script/jquery-validate/localization/messages_ge.js b/script/jquery-validate/localization/messages_ge.js new file mode 100644 index 0000000..f96ece2 --- /dev/null +++ b/script/jquery-validate/localization/messages_ge.js @@ -0,0 +1,23 @@ +/** + * @author @tatocaster <kutaliatato@gmail.com> + * Translated default messages for the jQuery validation plugin. + * Locale: GE (Georgian; ქართული) + */ +jQuery.extend( jQuery.validator.messages, { + required: "ეს ველი სავალდებულოა", + remote: "გთხოვთ შეასწოროთ.", + email: "გთხოვთ შეიყვანოთ სწორი ფორმატით.", + url: "გთხოვთ შეიყვანოთ სწორი ფორმატით.", + date: "გთხოვთ შეიყვანოთ სწორი თარიღი.", + dateISO: "გთხოვთ შეიყვანოთ სწორი ფორმატით ( ISO ).", + number: "გთხოვთ შეიყვანოთ რიცხვი.", + digits: "დაშვებულია მხოლოდ ციფრები.", + creditcard: "გთხოვთ შეიყვანოთ სწორი ფორმატის ბარათის კოდი.", + equalTo: "გთხოვთ შეიყვანოთ იგივე მნიშვნელობა.", + maxlength: jQuery.validator.format( "გთხოვთ შეიყვანოთ არა უმეტეს {0} სიმბოლოსი." ), + minlength: jQuery.validator.format( "შეიყვანეთ მინიმუმ {0} სიმბოლო." ), + rangelength: jQuery.validator.format( "გთხოვთ შეიყვანოთ {0} -დან {1} -მდე რაოდენობის სიმბოლოები." ), + range: jQuery.validator.format( "შეიყვანეთ {0} -სა {1} -ს შორის." ), + max: jQuery.validator.format( "გთხოვთ შეიყვანოთ მნიშვნელობა ნაკლები ან ტოლი {0} -ს." ), + min: jQuery.validator.format( "გთხოვთ შეიყვანოთ მნიშვნელობა მეტი ან ტოლი {0} -ს." ) +} ); diff --git a/script/jquery-validate/localization/messages_gl.js b/script/jquery-validate/localization/messages_gl.js new file mode 100644 index 0000000..9dad78b --- /dev/null +++ b/script/jquery-validate/localization/messages_gl.js @@ -0,0 +1,28 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: GL (Galician; Galego) + */ +( function( $ ) { + jQuery.extend( jQuery.validator.messages, { + required: "Este campo é obrigatorio.", + remote: "Por favor, cubre este campo.", + email: "Por favor, escribe unha dirección de correo válida.", + url: "Por favor, escribe unha URL válida.", + date: "Por favor, escribe unha data válida.", + dateISO: "Por favor, escribe unha data (ISO) válida.", + number: "Por favor, escribe un número válido.", + digits: "Por favor, escribe só díxitos.", + creditcard: "Por favor, escribe un número de tarxeta válido.", + equalTo: "Por favor, escribe o mesmo valor de novo.", + extension: "Por favor, escribe un valor cunha extensión aceptada.", + maxlength: jQuery.validator.format( "Por favor, non escribas máis de {0} caracteres." ), + minlength: jQuery.validator.format( "Por favor, non escribas menos de {0} caracteres." ), + rangelength: jQuery.validator.format( "Por favor, escribe un valor entre {0} e {1} caracteres." ), + range: jQuery.validator.format( "Por favor, escribe un valor entre {0} e {1}." ), + max: jQuery.validator.format( "Por favor, escribe un valor menor ou igual a {0}." ), + min: jQuery.validator.format( "Por favor, escribe un valor maior ou igual a {0}." ), + nifES: "Por favor, escribe un NIF válido.", + nieES: "Por favor, escribe un NIE válido.", + cifES: "Por favor, escribe un CIF válido." + } ); +}( jQuery ) ); diff --git a/script/jquery-validate/localization/messages_he.js b/script/jquery-validate/localization/messages_he.js new file mode 100644 index 0000000..c139ef7 --- /dev/null +++ b/script/jquery-validate/localization/messages_he.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: HE (Hebrew; עברית) + */ +jQuery.extend( jQuery.validator.messages, { + required: "השדה הזה הינו שדה חובה", + remote: "נא לתקן שדה זה", + email: "נא למלא כתובת דוא\"ל חוקית", + url: "נא למלא כתובת אינטרנט חוקית", + date: "נא למלא תאריך חוקי", + dateISO: "נא למלא תאריך חוקי (ISO)", + number: "נא למלא מספר", + digits: "נא למלא רק מספרים", + creditcard: "נא למלא מספר כרטיס אשראי חוקי", + equalTo: "נא למלא את אותו ערך שוב", + extension: "נא למלא ערך עם סיומת חוקית", + maxlength: jQuery.validator.format( ".נא לא למלא יותר מ- {0} תווים" ), + minlength: jQuery.validator.format( "נא למלא לפחות {0} תווים" ), + rangelength: jQuery.validator.format( "נא למלא ערך בין {0} ל- {1} תווים" ), + range: jQuery.validator.format( "נא למלא ערך בין {0} ל- {1}" ), + max: jQuery.validator.format( "נא למלא ערך קטן או שווה ל- {0}" ), + min: jQuery.validator.format( "נא למלא ערך גדול או שווה ל- {0}" ) +} ); diff --git a/script/jquery-validate/localization/messages_hr.js b/script/jquery-validate/localization/messages_hr.js new file mode 100644 index 0000000..aaf0080 --- /dev/null +++ b/script/jquery-validate/localization/messages_hr.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: HR (Croatia; hrvatski jezik) + */ +jQuery.extend( jQuery.validator.messages, { + required: "Ovo polje je obavezno.", + remote: "Ovo polje treba popraviti.", + email: "Unesite ispravnu e-mail adresu.", + url: "Unesite ispravan URL.", + date: "Unesite ispravan datum.", + dateISO: "Unesite ispravan datum (ISO).", + number: "Unesite ispravan broj.", + digits: "Unesite samo brojeve.", + creditcard: "Unesite ispravan broj kreditne kartice.", + equalTo: "Unesite ponovo istu vrijednost.", + extension: "Unesite vrijednost sa ispravnom ekstenzijom.", + maxlength: jQuery.validator.format( "Maksimalni broj znakova je {0} ." ), + minlength: jQuery.validator.format( "Minimalni broj znakova je {0} ." ), + rangelength: jQuery.validator.format( "Unesite vrijednost između {0} i {1} znakova." ), + range: jQuery.validator.format( "Unesite vrijednost između {0} i {1}." ), + max: jQuery.validator.format( "Unesite vrijednost manju ili jednaku {0}." ), + min: jQuery.validator.format( "Unesite vrijednost veću ili jednaku {0}." ) +} ); diff --git a/script/jquery-validate/localization/messages_hu.js b/script/jquery-validate/localization/messages_hu.js new file mode 100644 index 0000000..3442c5f --- /dev/null +++ b/script/jquery-validate/localization/messages_hu.js @@ -0,0 +1,22 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: HU (Hungarian; Magyar) + */ +jQuery.extend( jQuery.validator.messages, { + required: "Kötelező megadni.", + maxlength: jQuery.validator.format( "Legfeljebb {0} karakter hosszú legyen." ), + minlength: jQuery.validator.format( "Legalább {0} karakter hosszú legyen." ), + rangelength: jQuery.validator.format( "Legalább {0} és legfeljebb {1} karakter hosszú legyen." ), + email: "Érvényes e-mail címnek kell lennie.", + url: "Érvényes URL-nek kell lennie.", + date: "Dátumnak kell lennie.", + number: "Számnak kell lennie.", + digits: "Csak számjegyek lehetnek.", + equalTo: "Meg kell egyeznie a két értéknek.", + range: jQuery.validator.format( "{0} és {1} közé kell esnie." ), + max: jQuery.validator.format( "Nem lehet nagyobb, mint {0}." ), + min: jQuery.validator.format( "Nem lehet kisebb, mint {0}." ), + creditcard: "Érvényes hitelkártyaszámnak kell lennie.", + remote: "Kérem javítsa ki ezt a mezőt.", + dateISO: "Kérem írjon be egy érvényes dátumot (ISO)." +} ); diff --git a/script/jquery-validate/localization/messages_hy_AM.js b/script/jquery-validate/localization/messages_hy_AM.js new file mode 100644 index 0000000..9adfbe9 --- /dev/null +++ b/script/jquery-validate/localization/messages_hy_AM.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: HY_AM (Armenian; հայերեն լեզու) + */ +jQuery.extend( jQuery.validator.messages, { + required: "Պարտադիր լրացման դաշտ", + remote: "Ներմուծեք ճիշտ արժեքը", + email: "Ներմուծեք վավեր էլեկտրոնային փոստի հասցե", + url: "Ներմուծեք վավեր URL", + date: "Ներմուծեք վավեր ամսաթիվ", + dateISO: "Ներմուծեք ISO ֆորմատով վավեր ամսաթիվ։", + number: "Ներմուծեք թիվ", + digits: "Ներմուծեք միայն թվեր", + creditcard: "Ներմուծեք ճիշտ բանկային քարտի համար", + equalTo: "Ներմուծեք միևնուն արժեքը ևս մեկ անգամ", + extension: "Ընտրեք ճիշտ ընդլանումով ֆայլ", + maxlength: jQuery.validator.format( "Ներմուծեք ոչ ավել քան {0} նիշ" ), + minlength: jQuery.validator.format( "Ներմուծեք ոչ պակաս քան {0} նիշ" ), + rangelength: jQuery.validator.format( "Ներմուծեք {0}֊ից {1} երկարությամբ արժեք" ), + range: jQuery.validator.format( "Ներմուծեք թիվ {0}֊ից {1} միջակայքում" ), + max: jQuery.validator.format( "Ներմուծեք թիվ, որը փոքր կամ հավասար է {0}֊ին" ), + min: jQuery.validator.format( "Ներմուծեք թիվ, որը մեծ կամ հավասար է {0}֊ին" ) +} ); diff --git a/script/jquery-validate/localization/messages_id.js b/script/jquery-validate/localization/messages_id.js new file mode 100644 index 0000000..b6d0a93 --- /dev/null +++ b/script/jquery-validate/localization/messages_id.js @@ -0,0 +1,22 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: ID (Indonesia; Indonesian) + */ +jQuery.extend( jQuery.validator.messages, { + required: "Kolom ini diperlukan.", + remote: "Harap benarkan kolom ini.", + email: "Silakan masukkan format email yang benar.", + url: "Silakan masukkan format URL yang benar.", + date: "Silakan masukkan format tanggal yang benar.", + dateISO: "Silakan masukkan format tanggal(ISO) yang benar.", + number: "Silakan masukkan angka yang benar.", + digits: "Harap masukan angka saja.", + creditcard: "Harap masukkan format kartu kredit yang benar.", + equalTo: "Harap masukkan nilai yg sama dengan sebelumnya.", + maxlength: jQuery.validator.format( "Input dibatasi hanya {0} karakter." ), + minlength: jQuery.validator.format( "Input tidak kurang dari {0} karakter." ), + rangelength: jQuery.validator.format( "Panjang karakter yg diizinkan antara {0} dan {1} karakter." ), + range: jQuery.validator.format( "Harap masukkan nilai antara {0} dan {1}." ), + max: jQuery.validator.format( "Harap masukkan nilai lebih kecil atau sama dengan {0}." ), + min: jQuery.validator.format( "Harap masukkan nilai lebih besar atau sama dengan {0}." ) +} ); diff --git a/script/jquery-validate/localization/messages_is.js b/script/jquery-validate/localization/messages_is.js new file mode 100644 index 0000000..6d5ebea --- /dev/null +++ b/script/jquery-validate/localization/messages_is.js @@ -0,0 +1,21 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: IS (Icelandic; íslenska) + */ +jQuery.extend( jQuery.validator.messages, { + required: "Þessi reitur er nauðsynlegur.", + remote: "Lagaðu þennan reit.", + maxlength: jQuery.validator.format( "Sláðu inn mest {0} stafi." ), + minlength: jQuery.validator.format( "Sláðu inn minnst {0} stafi." ), + rangelength: jQuery.validator.format( "Sláðu inn minnst {0} og mest {1} stafi." ), + email: "Sláðu inn gilt netfang.", + url: "Sláðu inn gilda vefslóð.", + date: "Sláðu inn gilda dagsetningu.", + number: "Sláðu inn tölu.", + digits: "Sláðu inn tölustafi eingöngu.", + equalTo: "Sláðu sama gildi inn aftur.", + range: jQuery.validator.format( "Sláðu inn gildi milli {0} og {1}." ), + max: jQuery.validator.format( "Sláðu inn gildi sem er minna en eða jafnt og {0}." ), + min: jQuery.validator.format( "Sláðu inn gildi sem er stærra en eða jafnt og {0}." ), + creditcard: "Sláðu inn gilt greiðslukortanúmer." +} ); diff --git a/script/jquery-validate/localization/messages_it.js b/script/jquery-validate/localization/messages_it.js new file mode 100644 index 0000000..43bfa4e --- /dev/null +++ b/script/jquery-validate/localization/messages_it.js @@ -0,0 +1,27 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: IT (Italian; Italiano) + */ +jQuery.extend( jQuery.validator.messages, { + required: "Campo obbligatorio", + remote: "Controlla questo campo", + email: "Inserisci un indirizzo email valido", + url: "Inserisci un indirizzo web valido", + date: "Inserisci una data valida", + dateISO: "Inserisci una data valida (ISO)", + number: "Inserisci un numero valido", + digits: "Inserisci solo numeri", + creditcard: "Inserisci un numero di carta di credito valido", + equalTo: "Il valore non corrisponde", + extension: "Inserisci un valore con un'estensione valida", + maxlength: jQuery.validator.format( "Non inserire più di {0} caratteri" ), + minlength: jQuery.validator.format( "Inserisci almeno {0} caratteri" ), + rangelength: jQuery.validator.format( "Inserisci un valore compreso tra {0} e {1} caratteri" ), + range: jQuery.validator.format( "Inserisci un valore compreso tra {0} e {1}" ), + max: jQuery.validator.format( "Inserisci un valore minore o uguale a {0}" ), + min: jQuery.validator.format( "Inserisci un valore maggiore o uguale a {0}" ), + nifES: "Inserisci un NIF valido", + nieES: "Inserisci un NIE valido", + cifES: "Inserisci un CIF valido", + currency: "Inserisci una valuta valida" +} ); diff --git a/script/jquery-validate/localization/messages_ja.js b/script/jquery-validate/localization/messages_ja.js new file mode 100644 index 0000000..2426988 --- /dev/null +++ b/script/jquery-validate/localization/messages_ja.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: JA (Japanese; 日本語) + */ +jQuery.extend( jQuery.validator.messages, { + required: "このフィールドは必須です。", + remote: "このフィールドを修正してください。", + email: "有効なEメールアドレスを入力してください。", + url: "有効なURLを入力してください。", + date: "有効な日付を入力してください。", + dateISO: "有効な日付(ISO)を入力してください。", + number: "有効な数字を入力してください。", + digits: "数字のみを入力してください。", + creditcard: "有効なクレジットカード番号を入力してください。", + equalTo: "同じ値をもう一度入力してください。", + extension: "有効な拡張子を含む値を入力してください。", + maxlength: jQuery.validator.format( "{0} 文字以内で入力してください。" ), + minlength: jQuery.validator.format( "{0} 文字以上で入力してください。" ), + rangelength: jQuery.validator.format( "{0} 文字から {1} 文字までの値を入力してください。" ), + range: jQuery.validator.format( "{0} から {1} までの値を入力してください。" ), + max: jQuery.validator.format( "{0} 以下の値を入力してください。" ), + min: jQuery.validator.format( "{0} 以上の値を入力してください。" ) +} ); diff --git a/script/jquery-validate/localization/messages_ka.js b/script/jquery-validate/localization/messages_ka.js new file mode 100644 index 0000000..57ca995 --- /dev/null +++ b/script/jquery-validate/localization/messages_ka.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: KA (Georgian; ქართული) + */ +jQuery.extend( jQuery.validator.messages, { + required: "ამ ველის შევსება აუცილებელია.", + remote: "გთხოვთ მიუთითოთ სწორი მნიშვნელობა.", + email: "გთხოვთ მიუთითოთ ელ-ფოსტის კორექტული მისამართი.", + url: "გთხოვთ მიუთითოთ კორექტული URL.", + date: "გთხოვთ მიუთითოთ კორექტული თარიღი.", + dateISO: "გთხოვთ მიუთითოთ კორექტული თარიღი ISO ფორმატში.", + number: "გთხოვთ მიუთითოთ ციფრი.", + digits: "გთხოვთ მიუთითოთ მხოლოდ ციფრები.", + creditcard: "გთხოვთ მიუთითოთ საკრედიტო ბარათის კორექტული ნომერი.", + equalTo: "გთხოვთ მიუთითოთ ასეთივე მნიშვნელობა კიდევ ერთხელ.", + extension: "გთხოვთ აირჩიოთ ფაილი კორექტული გაფართოებით.", + maxlength: jQuery.validator.format( "დასაშვებია არაუმეტეს {0} სიმბოლო." ), + minlength: jQuery.validator.format( "აუცილებელია შეიყვანოთ მინიმუმ {0} სიმბოლო." ), + rangelength: jQuery.validator.format( "ტექსტში სიმბოლოების რაოდენობა უნდა იყოს {0}-დან {1}-მდე." ), + range: jQuery.validator.format( "გთხოვთ შეიყვანოთ ციფრი {0}-დან {1}-მდე." ), + max: jQuery.validator.format( "გთხოვთ შეიყვანოთ ციფრი რომელიც ნაკლებია ან უდრის {0}-ს." ), + min: jQuery.validator.format( "გთხოვთ შეიყვანოთ ციფრი რომელიც მეტია ან უდრის {0}-ს." ) +} ); diff --git a/script/jquery-validate/localization/messages_kk.js b/script/jquery-validate/localization/messages_kk.js new file mode 100644 index 0000000..55aa6a0 --- /dev/null +++ b/script/jquery-validate/localization/messages_kk.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: KK (Kazakh; қазақ тілі) + */ +jQuery.extend( jQuery.validator.messages, { + required: "Бұл өрісті міндетті түрде толтырыңыз.", + remote: "Дұрыс мағына енгізуіңізді сұраймыз.", + email: "Нақты электронды поштаңызды енгізуіңізді сұраймыз.", + url: "Нақты URL-ды енгізуіңізді сұраймыз.", + date: "Нақты URL-ды енгізуіңізді сұраймыз.", + dateISO: "Нақты ISO форматымен сәйкес датасын енгізуіңізді сұраймыз.", + number: "Күнді енгізуіңізді сұраймыз.", + digits: "Тек қана сандарды енгізуіңізді сұраймыз.", + creditcard: "Несие картасының нөмірін дұрыс енгізуіңізді сұраймыз.", + equalTo: "Осы мәнді қайта енгізуіңізді сұраймыз.", + extension: "Файлдың кеңейтуін дұрыс таңдаңыз.", + maxlength: jQuery.validator.format( "Ұзындығы {0} символдан көр болмасын." ), + minlength: jQuery.validator.format( "Ұзындығы {0} символдан аз болмасын." ), + rangelength: jQuery.validator.format( "Ұзындығы {0}-{1} дейін мән енгізуіңізді сұраймыз." ), + range: jQuery.validator.format( "Пожалуйста, введите число от {0} до {1}. - {0} - {1} санын енгізуіңізді сұраймыз." ), + max: jQuery.validator.format( "{0} аз немесе тең санын енгізуіңіді сұраймыз." ), + min: jQuery.validator.format( "{0} көп немесе тең санын енгізуіңізді сұраймыз." ) +} ); diff --git a/script/jquery-validate/localization/messages_ko.js b/script/jquery-validate/localization/messages_ko.js new file mode 100644 index 0000000..66eb037 --- /dev/null +++ b/script/jquery-validate/localization/messages_ko.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: KO (Korean; 한국어) + */ +jQuery.extend( jQuery.validator.messages, { + required: "필수 항목입니다.", + remote: "항목을 수정하세요.", + email: "유효하지 않은 E-Mail주소입니다.", + url: "유효하지 않은 URL입니다.", + date: "올바른 날짜를 입력하세요.", + dateISO: "올바른 날짜(ISO)를 입력하세요.", + number: "유효한 숫자가 아닙니다.", + digits: "숫자만 입력 가능합니다.", + creditcard: "신용카드 번호가 바르지 않습니다.", + equalTo: "같은 값을 다시 입력하세요.", + extension: "올바른 확장자가 아닙니다.", + maxlength: jQuery.validator.format( "{0}자를 넘을 수 없습니다. " ), + minlength: jQuery.validator.format( "{0}자 이상 입력하세요." ), + rangelength: jQuery.validator.format( "문자 길이가 {0} 에서 {1} 사이의 값을 입력하세요." ), + range: jQuery.validator.format( "{0} 에서 {1} 사이의 값을 입력하세요." ), + max: jQuery.validator.format( "{0} 이하의 값을 입력하세요." ), + min: jQuery.validator.format( "{0} 이상의 값을 입력하세요." ) +} ); diff --git a/script/jquery-validate/localization/messages_lt.js b/script/jquery-validate/localization/messages_lt.js new file mode 100644 index 0000000..81be3d7 --- /dev/null +++ b/script/jquery-validate/localization/messages_lt.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: LT (Lithuanian; lietuvių kalba) + */ +jQuery.extend( jQuery.validator.messages, { + required: "Šis laukas yra privalomas.", + remote: "Prašau pataisyti šį lauką.", + email: "Prašau įvesti teisingą elektroninio pašto adresą.", + url: "Prašau įvesti teisingą URL.", + date: "Prašau įvesti teisingą datą.", + dateISO: "Prašau įvesti teisingą datą (ISO).", + number: "Prašau įvesti teisingą skaičių.", + digits: "Prašau naudoti tik skaitmenis.", + creditcard: "Prašau įvesti teisingą kreditinės kortelės numerį.", + equalTo: "Prašau įvestį tą pačią reikšmę dar kartą.", + extension: "Prašau įvesti reikšmę su teisingu plėtiniu.", + maxlength: jQuery.validator.format( "Prašau įvesti ne daugiau kaip {0} simbolių." ), + minlength: jQuery.validator.format( "Prašau įvesti bent {0} simbolius." ), + rangelength: jQuery.validator.format( "Prašau įvesti reikšmes, kurių ilgis nuo {0} iki {1} simbolių." ), + range: jQuery.validator.format( "Prašau įvesti reikšmę intervale nuo {0} iki {1}." ), + max: jQuery.validator.format( "Prašau įvesti reikšmę mažesnę arba lygią {0}." ), + min: jQuery.validator.format( "Prašau įvesti reikšmę didesnę arba lygią {0}." ) +} ); diff --git a/script/jquery-validate/localization/messages_lv.js b/script/jquery-validate/localization/messages_lv.js new file mode 100644 index 0000000..2507197 --- /dev/null +++ b/script/jquery-validate/localization/messages_lv.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: LV (Latvian; latviešu valoda) + */ +jQuery.extend( jQuery.validator.messages, { + required: "Šis lauks ir obligāts.", + remote: "Lūdzu, pārbaudiet šo lauku.", + email: "Lūdzu, ievadiet derīgu e-pasta adresi.", + url: "Lūdzu, ievadiet derīgu URL adresi.", + date: "Lūdzu, ievadiet derīgu datumu.", + dateISO: "Lūdzu, ievadiet derīgu datumu (ISO).", + number: "Lūdzu, ievadiet derīgu numuru.", + digits: "Lūdzu, ievadiet tikai ciparus.", + creditcard: "Lūdzu, ievadiet derīgu kredītkartes numuru.", + equalTo: "Lūdzu, ievadiet to pašu vēlreiz.", + extension: "Lūdzu, ievadiet vērtību ar derīgu paplašinājumu.", + maxlength: jQuery.validator.format( "Lūdzu, ievadiet ne vairāk kā {0} rakstzīmes." ), + minlength: jQuery.validator.format( "Lūdzu, ievadiet vismaz {0} rakstzīmes." ), + rangelength: jQuery.validator.format( "Lūdzu ievadiet {0} līdz {1} rakstzīmes." ), + range: jQuery.validator.format( "Lūdzu, ievadiet skaitli no {0} līdz {1}." ), + max: jQuery.validator.format( "Lūdzu, ievadiet skaitli, kurš ir mazāks vai vienāds ar {0}." ), + min: jQuery.validator.format( "Lūdzu, ievadiet skaitli, kurš ir lielāks vai vienāds ar {0}." ) +} ); diff --git a/script/jquery-validate/localization/messages_my.js b/script/jquery-validate/localization/messages_my.js new file mode 100644 index 0000000..1b1ec39 --- /dev/null +++ b/script/jquery-validate/localization/messages_my.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: MY (Malay; Melayu) + */ +jQuery.extend( jQuery.validator.messages, { + required: "Medan ini diperlukan.", + remote: "Sila betulkan medan ini.", + email: "Sila masukkan alamat emel yang betul.", + url: "Sila masukkan URL yang betul.", + date: "Sila masukkan tarikh yang betul.", + dateISO: "Sila masukkan tarikh(ISO) yang betul.", + number: "Sila masukkan nombor yang betul.", + digits: "Sila masukkan nilai digit sahaja.", + creditcard: "Sila masukkan nombor kredit kad yang betul.", + equalTo: "Sila masukkan nilai yang sama semula.", + extension: "Sila masukkan nilai yang telah diterima.", + maxlength: jQuery.validator.format( "Sila masukkan tidak lebih dari {0} aksara." ), + minlength: jQuery.validator.format( "Sila masukkan sekurang-kurangnya {0} aksara." ), + rangelength: jQuery.validator.format( "Sila masukkan antara {0} dan {1} panjang aksara." ), + range: jQuery.validator.format( "Sila masukkan nilai antara {0} dan {1} aksara." ), + max: jQuery.validator.format( "Sila masukkan nilai yang kurang atau sama dengan {0}." ), + min: jQuery.validator.format( "Sila masukkan nilai yang lebih atau sama dengan {0}." ) +} ); diff --git a/script/jquery-validate/localization/messages_nl.js b/script/jquery-validate/localization/messages_nl.js new file mode 100644 index 0000000..786f974 --- /dev/null +++ b/script/jquery-validate/localization/messages_nl.js @@ -0,0 +1,33 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: NL (Dutch; Nederlands, Vlaams) + */ +jQuery.extend( jQuery.validator.messages, { + required: "Dit is een verplicht veld.", + remote: "Controleer dit veld.", + email: "Vul hier een geldig e-mailadres in.", + url: "Vul hier een geldige URL in.", + date: "Vul hier een geldige datum in.", + dateISO: "Vul hier een geldige datum in (ISO-formaat).", + number: "Vul hier een geldig getal in.", + digits: "Vul hier alleen getallen in.", + creditcard: "Vul hier een geldig creditcardnummer in.", + equalTo: "Vul hier dezelfde waarde in.", + extension: "Vul hier een waarde in met een geldige extensie.", + maxlength: jQuery.validator.format( "Vul hier maximaal {0} tekens in." ), + minlength: jQuery.validator.format( "Vul hier minimaal {0} tekens in." ), + rangelength: jQuery.validator.format( "Vul hier een waarde in van minimaal {0} en maximaal {1} tekens." ), + range: jQuery.validator.format( "Vul hier een waarde in van minimaal {0} en maximaal {1}." ), + max: jQuery.validator.format( "Vul hier een waarde in kleiner dan of gelijk aan {0}." ), + min: jQuery.validator.format( "Vul hier een waarde in groter dan of gelijk aan {0}." ), + + // For validations in additional-methods.js + iban: "Vul hier een geldig IBAN in.", + dateNL: "Vul hier een geldige datum in.", + phoneNL: "Vul hier een geldig Nederlands telefoonnummer in.", + mobileNL: "Vul hier een geldig Nederlands mobiel telefoonnummer in.", + postalcodeNL: "Vul hier een geldige postcode in.", + bankaccountNL: "Vul hier een geldig bankrekeningnummer in.", + giroaccountNL: "Vul hier een geldig gironummer in.", + bankorgiroaccountNL: "Vul hier een geldig bank- of gironummer in." +} ); diff --git a/script/jquery-validate/localization/messages_no.js b/script/jquery-validate/localization/messages_no.js new file mode 100644 index 0000000..fee6589 --- /dev/null +++ b/script/jquery-validate/localization/messages_no.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: NO (Norwegian; Norsk) + */ +jQuery.extend( jQuery.validator.messages, { + required: "Dette feltet er obligatorisk.", + maxlength: jQuery.validator.format( "Maksimalt {0} tegn." ), + minlength: jQuery.validator.format( "Minimum {0} tegn." ), + rangelength: jQuery.validator.format( "Angi minimum {0} og maksimum {1} tegn." ), + email: "Oppgi en gyldig epostadresse.", + url: "Angi en gyldig URL.", + date: "Angi en gyldig dato.", + dateISO: "Angi en gyldig dato (&ARING;&ARING;&ARING;&ARING;-MM-DD).", + dateSE: "Angi en gyldig dato.", + number: "Angi et gyldig nummer.", + numberSE: "Angi et gyldig nummer.", + digits: "Skriv kun tall.", + equalTo: "Skriv samme verdi igjen.", + range: jQuery.validator.format( "Angi en verdi mellom {0} og {1}." ), + max: jQuery.validator.format( "Angi en verdi som er mindre eller lik {0}." ), + min: jQuery.validator.format( "Angi en verdi som er større eller lik {0}." ), + creditcard: "Angi et gyldig kredittkortnummer." +} ); diff --git a/script/jquery-validate/localization/messages_pl.js b/script/jquery-validate/localization/messages_pl.js new file mode 100644 index 0000000..f9b8ab6 --- /dev/null +++ b/script/jquery-validate/localization/messages_pl.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: PL (Polish; język polski, polszczyzna) + */ +jQuery.extend( jQuery.validator.messages, { + required: "To pole jest wymagane.", + remote: "Proszę o wypełnienie tego pola.", + email: "Proszę o podanie prawidłowego adresu email.", + url: "Proszę o podanie prawidłowego URL.", + date: "Proszę o podanie prawidłowej daty.", + dateISO: "Proszę o podanie prawidłowej daty (ISO).", + number: "Proszę o podanie prawidłowej liczby.", + digits: "Proszę o podanie samych cyfr.", + creditcard: "Proszę o podanie prawidłowej karty kredytowej.", + equalTo: "Proszę o podanie tej samej wartości ponownie.", + extension: "Proszę o podanie wartości z prawidłowym rozszerzeniem.", + maxlength: jQuery.validator.format( "Proszę o podanie nie więcej niż {0} znaków." ), + minlength: jQuery.validator.format( "Proszę o podanie przynajmniej {0} znaków." ), + rangelength: jQuery.validator.format( "Proszę o podanie wartości o długości od {0} do {1} znaków." ), + range: jQuery.validator.format( "Proszę o podanie wartości z przedziału od {0} do {1}." ), + max: jQuery.validator.format( "Proszę o podanie wartości mniejszej bądź równej {0}." ), + min: jQuery.validator.format( "Proszę o podanie wartości większej bądź równej {0}." ) +} ); diff --git a/script/jquery-validate/localization/messages_pt_BR.js b/script/jquery-validate/localization/messages_pt_BR.js new file mode 100644 index 0000000..6f874bf --- /dev/null +++ b/script/jquery-validate/localization/messages_pt_BR.js @@ -0,0 +1,75 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: PT (Portuguese; português) + * Region: BR (Brazil) + */ +jQuery.extend( jQuery.validator.messages, { + + // Core + required: "Este campo é requerido.", + remote: "Por favor, corrija este campo.", + email: "Por favor, forneça um endereço de email válido.", + url: "Por favor, forneça uma URL válida.", + date: "Por favor, forneça uma data válida.", + dateISO: "Por favor, forneça uma data válida (ISO).", + number: "Por favor, forneça um número válido.", + digits: "Por favor, forneça somente dígitos.", + creditcard: "Por favor, forneça um cartão de crédito válido.", + equalTo: "Por favor, forneça o mesmo valor novamente.", + maxlength: jQuery.validator.format( "Por favor, forneça não mais que {0} caracteres." ), + minlength: jQuery.validator.format( "Por favor, forneça ao menos {0} caracteres." ), + rangelength: jQuery.validator.format( "Por favor, forneça um valor entre {0} e {1} caracteres de comprimento." ), + range: jQuery.validator.format( "Por favor, forneça um valor entre {0} e {1}." ), + max: jQuery.validator.format( "Por favor, forneça um valor menor ou igual a {0}." ), + min: jQuery.validator.format( "Por favor, forneça um valor maior ou igual a {0}." ), + + // Metodos Adicionais + maxWords: jQuery.validator.format( "Por favor, forneça com {0} palavras ou menos." ), + minWords: jQuery.validator.format( "Por favor, forneça pelo menos {0} palavras." ), + rangeWords: jQuery.validator.format( "Por favor, forneça entre {0} e {1} palavras." ), + accept: "Por favor, forneça um tipo válido.", + alphanumeric: "Por favor, forneça somente com letras, números e sublinhados.", + bankaccountNL: "Por favor, forneça com um número de conta bancária válida.", + bankorgiroaccountNL: "Por favor, forneça um banco válido ou número de conta.", + bic: "Por favor, forneça um código BIC válido.", + cifES: "Por favor, forneça um código CIF válido.", + creditcardtypes: "Por favor, forneça um número de cartão de crédito válido.", + currency: "Por favor, forneça uma moeda válida.", + dateFA: "Por favor, forneça uma data correta.", + dateITA: "Por favor, forneça uma data correta.", + dateNL: "Por favor, forneça uma data correta.", + extension: "Por favor, forneça um valor com uma extensão válida.", + giroaccountNL: "Por favor, forneça um número de conta corrente válido.", + iban: "Por favor, forneça um código IBAN válido.", + integer: "Por favor, forneça um número não decimal.", + ipv4: "Por favor, forneça um IPv4 válido.", + ipv6: "Por favor, forneça um IPv6 válido.", + lettersonly: "Por favor, forneça apenas com letras.", + letterswithbasicpunc: "Por favor, forneça apenas letras ou pontuações.", + mobileNL: "Por favor, forneceça um número válido de telefone.", + mobileUK: "Por favor, forneceça um número válido de telefone.", + nieES: "Por favor, forneça um NIE válido.", + nifES: "Por favor, forneça um NIF válido.", + nowhitespace: "Por favor, não utilize espaços em branco.", + pattern: "O formato fornenecido é inválido.", + phoneNL: "Por favor, forneceça um número de telefone válido.", + phoneUK: "Por favor, forneceça um número de telefone válido.", + phoneUS: "Por favor, forneceça um número de telefone válido.", + phonesUK: "Por favor, forneceça um número de telefone válido.", + postalCodeCA: "Por favor, forneceça um número de código postal válido.", + postalcodeIT: "Por favor, forneceça um número de código postal válido.", + postalcodeNL: "Por favor, forneceça um número de código postal válido.", + postcodeUK: "Por favor, forneceça um número de código postal válido.", + postalcodeBR: "Por favor, forneça um CEP válido.", + require_from_group: jQuery.validator.format( "Por favor, forneça pelo menos {0} destes campos." ), + skip_or_fill_minimum: jQuery.validator.format( "Por favor, optar entre ignorar esses campos ou preencher pelo menos {0} deles." ), + stateUS: "Por favor, forneça um estado válido.", + strippedminlength: jQuery.validator.format( "Por favor, forneça pelo menos {0} caracteres." ), + time: "Por favor, forneça um horário válido, no intervado de 00:00 e 23:59.", + time12h: "Por favor, forneça um horário válido, no intervado de 01:00 e 12:59 am/pm.", + url2: "Por favor, forneceça uma URL válida.", + vinUS: "O número de identificação de veículo informada (VIN) é inválido.", + zipcodeUS: "Por favor, forneceça um código postal americano válido.", + ziprange: "O código postal deve estar entre 902xx-xxxx e 905xx-xxxx", + cpfBR: "Por favor, forneça um CPF válido." +} ); diff --git a/script/jquery-validate/localization/messages_pt_PT.js b/script/jquery-validate/localization/messages_pt_PT.js new file mode 100644 index 0000000..45a964f --- /dev/null +++ b/script/jquery-validate/localization/messages_pt_PT.js @@ -0,0 +1,27 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: PT (Portuguese; português) + * Region: PT (Portugal) + */ +jQuery.extend( jQuery.validator.messages, { + required: "Campo de preenchimento obrigatório.", + remote: "Por favor, corrija este campo.", + email: "Por favor, introduza um endereço eletrónico válido.", + url: "Por favor, introduza um URL válido.", + date: "Por favor, introduza uma data válida.", + dateISO: "Por favor, introduza uma data válida (ISO).", + number: "Por favor, introduza um número válido.", + digits: "Por favor, introduza apenas dígitos.", + creditcard: "Por favor, introduza um número de cartão de crédito válido.", + equalTo: "Por favor, introduza de novo o mesmo valor.", + extension: "Por favor, introduza um ficheiro com uma extensão válida.", + maxlength: jQuery.validator.format( "Por favor, não introduza mais do que {0} caracteres." ), + minlength: jQuery.validator.format( "Por favor, introduza pelo menos {0} caracteres." ), + rangelength: jQuery.validator.format( "Por favor, introduza entre {0} e {1} caracteres." ), + range: jQuery.validator.format( "Por favor, introduza um valor entre {0} e {1}." ), + max: jQuery.validator.format( "Por favor, introduza um valor menor ou igual a {0}." ), + min: jQuery.validator.format( "Por favor, introduza um valor maior ou igual a {0}." ), + nifES: "Por favor, introduza um NIF válido.", + nieES: "Por favor, introduza um NIE válido.", + cifES: "Por favor, introduza um CIF válido." +} ); diff --git a/script/jquery-validate/localization/messages_ro.js b/script/jquery-validate/localization/messages_ro.js new file mode 100644 index 0000000..50b405a --- /dev/null +++ b/script/jquery-validate/localization/messages_ro.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: RO (Romanian, limba română) + */ +jQuery.extend( jQuery.validator.messages, { + required: "Acest câmp este obligatoriu.", + remote: "Te rugăm să completezi acest câmp.", + email: "Te rugăm să introduci o adresă de email validă", + url: "Te rugăm sa introduci o adresă URL validă.", + date: "Te rugăm să introduci o dată corectă.", + dateISO: "Te rugăm să introduci o dată (ISO) corectă.", + number: "Te rugăm să introduci un număr întreg valid.", + digits: "Te rugăm să introduci doar cifre.", + creditcard: "Te rugăm să introduci un numar de carte de credit valid.", + equalTo: "Te rugăm să reintroduci valoarea.", + extension: "Te rugăm să introduci o valoare cu o extensie validă.", + maxlength: jQuery.validator.format( "Te rugăm să nu introduci mai mult de {0} caractere." ), + minlength: jQuery.validator.format( "Te rugăm să introduci cel puțin {0} caractere." ), + rangelength: jQuery.validator.format( "Te rugăm să introduci o valoare între {0} și {1} caractere." ), + range: jQuery.validator.format( "Te rugăm să introduci o valoare între {0} și {1}." ), + max: jQuery.validator.format( "Te rugăm să introduci o valoare egal sau mai mică decât {0}." ), + min: jQuery.validator.format( "Te rugăm să introduci o valoare egal sau mai mare decât {0}." ) +} ); diff --git a/script/jquery-validate/localization/messages_ru.js b/script/jquery-validate/localization/messages_ru.js new file mode 100644 index 0000000..2b8c2f7 --- /dev/null +++ b/script/jquery-validate/localization/messages_ru.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: RU (Russian; русский язык) + */ +jQuery.extend( jQuery.validator.messages, { + required: "Это поле необходимо заполнить.", + remote: "Пожалуйста, введите правильное значение.", + email: "Пожалуйста, введите корректный адрес электронной почты.", + url: "Пожалуйста, введите корректный URL.", + date: "Пожалуйста, введите корректную дату.", + dateISO: "Пожалуйста, введите корректную дату в формате ISO.", + number: "Пожалуйста, введите число.", + digits: "Пожалуйста, вводите только цифры.", + creditcard: "Пожалуйста, введите правильный номер кредитной карты.", + equalTo: "Пожалуйста, введите такое же значение ещё раз.", + extension: "Пожалуйста, выберите файл с правильным расширением.", + maxlength: jQuery.validator.format( "Пожалуйста, введите не больше {0} символов." ), + minlength: jQuery.validator.format( "Пожалуйста, введите не меньше {0} символов." ), + rangelength: jQuery.validator.format( "Пожалуйста, введите значение длиной от {0} до {1} символов." ), + range: jQuery.validator.format( "Пожалуйста, введите число от {0} до {1}." ), + max: jQuery.validator.format( "Пожалуйста, введите число, меньшее или равное {0}." ), + min: jQuery.validator.format( "Пожалуйста, введите число, большее или равное {0}." ) +} ); diff --git a/script/jquery-validate/localization/messages_si.js b/script/jquery-validate/localization/messages_si.js new file mode 100644 index 0000000..b172028 --- /dev/null +++ b/script/jquery-validate/localization/messages_si.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: SI (Slovenian) + */ +jQuery.extend( jQuery.validator.messages, { + required: "To polje je obvezno.", + remote: "Vpis v tem polju ni v pravi obliki.", + email: "Prosimo, vnesite pravi email naslov.", + url: "Prosimo, vnesite pravi URL.", + date: "Prosimo, vnesite pravi datum.", + dateISO: "Prosimo, vnesite pravi datum (ISO).", + number: "Prosimo, vnesite pravo številko.", + digits: "Prosimo, vnesite samo številke.", + creditcard: "Prosimo, vnesite pravo številko kreditne kartice.", + equalTo: "Prosimo, ponovno vnesite enako vsebino.", + extension: "Prosimo, vnesite vsebino z pravo končnico.", + maxlength: jQuery.validator.format( "Prosimo, da ne vnašate več kot {0} znakov." ), + minlength: jQuery.validator.format( "Prosimo, vnesite vsaj {0} znakov." ), + rangelength: jQuery.validator.format( "Prosimo, vnesite od {0} do {1} znakov." ), + range: jQuery.validator.format( "Prosimo, vnesite vrednost med {0} in {1}." ), + max: jQuery.validator.format( "Prosimo, vnesite vrednost manjšo ali enako {0}." ), + min: jQuery.validator.format( "Prosimo, vnesite vrednost večjo ali enako {0}." ) +} ); diff --git a/script/jquery-validate/localization/messages_sk.js b/script/jquery-validate/localization/messages_sk.js new file mode 100644 index 0000000..b2ea1cb --- /dev/null +++ b/script/jquery-validate/localization/messages_sk.js @@ -0,0 +1,20 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: SK (Slovak; slovenčina, slovenský jazyk) + */ +jQuery.extend( jQuery.validator.messages, { + required: "Povinné zadať.", + maxlength: jQuery.validator.format( "Maximálne {0} znakov." ), + minlength: jQuery.validator.format( "Minimálne {0} znakov." ), + rangelength: jQuery.validator.format( "Minimálne {0} a Maximálne {1} znakov." ), + email: "E-mailová adresa musí byť platná.", + url: "URL musí byť platný.", + date: "Musí byť dátum.", + number: "Musí byť číslo.", + digits: "Môže obsahovať iba číslice.", + equalTo: "Dva hodnoty sa musia rovnať.", + range: jQuery.validator.format( "Musí byť medzi {0} a {1}." ), + max: jQuery.validator.format( "Nemôže byť viac ako{0}." ), + min: jQuery.validator.format( "Nemôže byť menej ako{0}." ), + creditcard: "Číslo platobnej karty musí byť platné." +} ); diff --git a/script/jquery-validate/localization/messages_sl.js b/script/jquery-validate/localization/messages_sl.js new file mode 100644 index 0000000..d5364cc --- /dev/null +++ b/script/jquery-validate/localization/messages_sl.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Language: SL (Slovenian; slovenski jezik) + */ +jQuery.extend( jQuery.validator.messages, { + required: "To polje je obvezno.", + remote: "Prosimo popravite to polje.", + email: "Prosimo vnesite veljaven email naslov.", + url: "Prosimo vnesite veljaven URL naslov.", + date: "Prosimo vnesite veljaven datum.", + dateISO: "Prosimo vnesite veljaven ISO datum.", + number: "Prosimo vnesite veljavno število.", + digits: "Prosimo vnesite samo števila.", + creditcard: "Prosimo vnesite veljavno številko kreditne kartice.", + equalTo: "Prosimo ponovno vnesite vrednost.", + extension: "Prosimo vnesite vrednost z veljavno končnico.", + maxlength: jQuery.validator.format( "Prosimo vnesite največ {0} znakov." ), + minlength: jQuery.validator.format( "Prosimo vnesite najmanj {0} znakov." ), + rangelength: jQuery.validator.format( "Prosimo vnesite najmanj {0} in največ {1} znakov." ), + range: jQuery.validator.format( "Prosimo vnesite vrednost med {0} in {1}." ), + max: jQuery.validator.format( "Prosimo vnesite vrednost manjše ali enako {0}." ), + min: jQuery.validator.format( "Prosimo vnesite vrednost večje ali enako {0}." ) +} ); diff --git a/script/jquery-validate/localization/messages_sr.js b/script/jquery-validate/localization/messages_sr.js new file mode 100644 index 0000000..0d940cc --- /dev/null +++ b/script/jquery-validate/localization/messages_sr.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: SR (Serbian; српски језик) + */ +jQuery.extend( jQuery.validator.messages, { + required: "Поље је обавезно.", + remote: "Средите ово поље.", + email: "Унесите исправну и-мејл адресу.", + url: "Унесите исправан URL.", + date: "Унесите исправан датум.", + dateISO: "Унесите исправан датум (ISO).", + number: "Унесите исправан број.", + digits: "Унесите само цифе.", + creditcard: "Унесите исправан број кредитне картице.", + equalTo: "Унесите исту вредност поново.", + extension: "Унесите вредност са одговарајућом екстензијом.", + maxlength: jQuery.validator.format( "Унесите мање од {0} карактера." ), + minlength: jQuery.validator.format( "Унесите барем {0} карактера." ), + rangelength: jQuery.validator.format( "Унесите вредност дугачку између {0} и {1} карактера." ), + range: jQuery.validator.format( "Унесите вредност између {0} и {1}." ), + max: jQuery.validator.format( "Унесите вредност мању или једнаку {0}." ), + min: jQuery.validator.format( "Унесите вредност већу или једнаку {0}." ) +} ); diff --git a/script/jquery-validate/localization/messages_sr_lat.js b/script/jquery-validate/localization/messages_sr_lat.js new file mode 100644 index 0000000..23e41bf --- /dev/null +++ b/script/jquery-validate/localization/messages_sr_lat.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: SR (Serbian - Latin alphabet; srpski jezik - latinica) + */ +jQuery.extend( jQuery.validator.messages, { + required: "Polje je obavezno.", + remote: "Sredite ovo polje.", + email: "Unesite ispravnu e-mail adresu", + url: "Unesite ispravan URL.", + date: "Unesite ispravan datum.", + dateISO: "Unesite ispravan datum (ISO).", + number: "Unesite ispravan broj.", + digits: "Unesite samo cifre.", + creditcard: "Unesite ispravan broj kreditne kartice.", + equalTo: "Unesite istu vrednost ponovo.", + extension: "Unesite vrednost sa odgovarajućom ekstenzijom.", + maxlength: jQuery.validator.format( "Unesite manje od {0} karaktera." ), + minlength: jQuery.validator.format( "Unesite barem {0} karaktera." ), + rangelength: jQuery.validator.format( "Unesite vrednost dugačku između {0} i {1} karaktera." ), + range: jQuery.validator.format( "Unesite vrednost između {0} i {1}." ), + max: jQuery.validator.format( "Unesite vrednost manju ili jednaku {0}." ), + min: jQuery.validator.format( "Unesite vrednost veću ili jednaku {0}." ) +} ); diff --git a/script/jquery-validate/localization/messages_sv.js b/script/jquery-validate/localization/messages_sv.js new file mode 100644 index 0000000..f88dd89 --- /dev/null +++ b/script/jquery-validate/localization/messages_sv.js @@ -0,0 +1,21 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: SV (Swedish; Svenska) + */ +jQuery.extend( jQuery.validator.messages, { + required: "Detta fält är obligatoriskt.", + maxlength: jQuery.validator.format( "Du får ange högst {0} tecken." ), + minlength: jQuery.validator.format( "Du måste ange minst {0} tecken." ), + rangelength: jQuery.validator.format( "Ange minst {0} och max {1} tecken." ), + email: "Ange en korrekt e-postadress.", + url: "Ange en korrekt URL.", + date: "Ange ett korrekt datum.", + dateISO: "Ange ett korrekt datum (ÅÅÅÅ-MM-DD).", + number: "Ange ett korrekt nummer.", + digits: "Ange endast siffror.", + equalTo: "Ange samma värde igen.", + range: jQuery.validator.format( "Ange ett värde mellan {0} och {1}." ), + max: jQuery.validator.format( "Ange ett värde som är mindre eller lika med {0}." ), + min: jQuery.validator.format( "Ange ett värde som är större eller lika med {0}." ), + creditcard: "Ange ett korrekt kreditkortsnummer." +} ); diff --git a/script/jquery-validate/localization/messages_th.js b/script/jquery-validate/localization/messages_th.js new file mode 100644 index 0000000..7802195 --- /dev/null +++ b/script/jquery-validate/localization/messages_th.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: TH (Thai; ไทย) + */ +jQuery.extend( jQuery.validator.messages, { + required: "โปรดระบุ", + remote: "โปรดแก้ไขให้ถูกต้อง", + email: "โปรดระบุที่อยู่อีเมล์ที่ถูกต้อง", + url: "โปรดระบุ URL ที่ถูกต้อง", + date: "โปรดระบุวันที่ ที่ถูกต้อง", + dateISO: "โปรดระบุวันที่ ที่ถูกต้อง (ระบบ ISO).", + number: "โปรดระบุทศนิยมที่ถูกต้อง", + digits: "โปรดระบุจำนวนเต็มที่ถูกต้อง", + creditcard: "โปรดระบุรหัสบัตรเครดิตที่ถูกต้อง", + equalTo: "โปรดระบุค่าเดิมอีกครั้ง", + extension: "โปรดระบุค่าที่มีส่วนขยายที่ถูกต้อง", + maxlength: jQuery.validator.format( "โปรดอย่าระบุค่าที่ยาวกว่า {0} อักขระ" ), + minlength: jQuery.validator.format( "โปรดอย่าระบุค่าที่สั้นกว่า {0} อักขระ" ), + rangelength: jQuery.validator.format( "โปรดอย่าระบุค่าความยาวระหว่าง {0} ถึง {1} อักขระ" ), + range: jQuery.validator.format( "โปรดระบุค่าระหว่าง {0} และ {1}" ), + max: jQuery.validator.format( "โปรดระบุค่าน้อยกว่าหรือเท่ากับ {0}" ), + min: jQuery.validator.format( "โปรดระบุค่ามากกว่าหรือเท่ากับ {0}" ) +} ); diff --git a/script/jquery-validate/localization/messages_tj.js b/script/jquery-validate/localization/messages_tj.js new file mode 100644 index 0000000..1b2b36e --- /dev/null +++ b/script/jquery-validate/localization/messages_tj.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: TJ (Tajikistan; Забони тоҷикӣ) + */ +jQuery.extend( jQuery.validator.messages, { + required: "Ворид кардани ин филд маҷбури аст.", + remote: "Илтимос, маълумоти саҳеҳ ворид кунед.", + email: "Илтимос, почтаи электронии саҳеҳ ворид кунед.", + url: "Илтимос, URL адреси саҳеҳ ворид кунед.", + date: "Илтимос, таърихи саҳеҳ ворид кунед.", + dateISO: "Илтимос, таърихи саҳеҳи (ISO)ӣ ворид кунед.", + number: "Илтимос, рақамҳои саҳеҳ ворид кунед.", + digits: "Илтимос, танҳо рақам ворид кунед.", + creditcard: "Илтимос, кредит карди саҳеҳ ворид кунед.", + equalTo: "Илтимос, миқдори баробар ворид кунед.", + extension: "Илтимос, қофияи файлро дуруст интихоб кунед", + maxlength: jQuery.validator.format( "Илтимос, бештар аз {0} рамз ворид накунед." ), + minlength: jQuery.validator.format( "Илтимос, камтар аз {0} рамз ворид накунед." ), + rangelength: jQuery.validator.format( "Илтимос, камтар аз {0} ва зиёда аз {1} рамз ворид кунед." ), + range: jQuery.validator.format( "Илтимос, аз {0} то {1} рақам зиёд ворид кунед." ), + max: jQuery.validator.format( "Илтимос, бештар аз {0} рақам ворид накунед." ), + min: jQuery.validator.format( "Илтимос, камтар аз {0} рақам ворид накунед." ) +} ); diff --git a/script/jquery-validate/localization/messages_tr.js b/script/jquery-validate/localization/messages_tr.js new file mode 100644 index 0000000..9c13481 --- /dev/null +++ b/script/jquery-validate/localization/messages_tr.js @@ -0,0 +1,24 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: TR (Turkish; Türkçe) + */ +jQuery.extend( jQuery.validator.messages, { + required: "Bu alanın doldurulması zorunludur.", + remote: "Lütfen bu alanı düzeltin.", + email: "Lütfen geçerli bir e-posta adresi giriniz.", + url: "Lütfen geçerli bir web adresi (URL) giriniz.", + date: "Lütfen geçerli bir tarih giriniz.", + dateISO: "Lütfen geçerli bir tarih giriniz(ISO formatında)", + number: "Lütfen geçerli bir sayı giriniz.", + digits: "Lütfen sadece sayısal karakterler giriniz.", + creditcard: "Lütfen geçerli bir kredi kartı giriniz.", + equalTo: "Lütfen aynı değeri tekrar giriniz.", + extension: "Lütfen geçerli uzantıya sahip bir değer giriniz.", + maxlength: jQuery.validator.format( "Lütfen en fazla {0} karakter uzunluğunda bir değer giriniz." ), + minlength: jQuery.validator.format( "Lütfen en az {0} karakter uzunluğunda bir değer giriniz." ), + rangelength: jQuery.validator.format( "Lütfen en az {0} ve en fazla {1} uzunluğunda bir değer giriniz." ), + range: jQuery.validator.format( "Lütfen {0} ile {1} arasında bir değer giriniz." ), + max: jQuery.validator.format( "Lütfen {0} değerine eşit ya da daha küçük bir değer giriniz." ), + min: jQuery.validator.format( "Lütfen {0} değerine eşit ya da daha büyük bir değer giriniz." ), + require_from_group: "Lütfen bu alanların en az {0} tanesini doldurunuz." +} ); diff --git a/script/jquery-validate/localization/messages_uk.js b/script/jquery-validate/localization/messages_uk.js new file mode 100644 index 0000000..5cc3473 --- /dev/null +++ b/script/jquery-validate/localization/messages_uk.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: UK (Ukrainian; українська мова) + */ +jQuery.extend( jQuery.validator.messages, { + required: "Це поле необхідно заповнити.", + remote: "Будь ласка, введіть правильне значення.", + email: "Будь ласка, введіть коректну адресу електронної пошти.", + url: "Будь ласка, введіть коректний URL.", + date: "Будь ласка, введіть коректну дату.", + dateISO: "Будь ласка, введіть коректну дату у форматі ISO.", + number: "Будь ласка, введіть число.", + digits: "Вводите потрібно лише цифри.", + creditcard: "Будь ласка, введіть правильний номер кредитної карти.", + equalTo: "Будь ласка, введіть таке ж значення ще раз.", + extension: "Будь ласка, виберіть файл з правильним розширенням.", + maxlength: jQuery.validator.format( "Будь ласка, введіть не більше {0} символів." ), + minlength: jQuery.validator.format( "Будь ласка, введіть не менше {0} символів." ), + rangelength: jQuery.validator.format( "Будь ласка, введіть значення довжиною від {0} до {1} символів." ), + range: jQuery.validator.format( "Будь ласка, введіть число від {0} до {1}." ), + max: jQuery.validator.format( "Будь ласка, введіть число, менше або рівно {0}." ), + min: jQuery.validator.format( "Будь ласка, введіть число, більше або рівно {0}." ) +} ); diff --git a/script/jquery-validate/localization/messages_vi.js b/script/jquery-validate/localization/messages_vi.js new file mode 100644 index 0000000..ba7c975 --- /dev/null +++ b/script/jquery-validate/localization/messages_vi.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: VI (Vietnamese; Tiếng Việt) + */ +jQuery.extend( jQuery.validator.messages, { + required: "Hãy nhập.", + remote: "Hãy sửa cho đúng.", + email: "Hãy nhập email.", + url: "Hãy nhập URL.", + date: "Hãy nhập ngày.", + dateISO: "Hãy nhập ngày (ISO).", + number: "Hãy nhập số.", + digits: "Hãy nhập chữ số.", + creditcard: "Hãy nhập số thẻ tín dụng.", + equalTo: "Hãy nhập thêm lần nữa.", + extension: "Phần mở rộng không đúng.", + maxlength: jQuery.validator.format( "Hãy nhập từ {0} kí tự trở xuống." ), + minlength: jQuery.validator.format( "Hãy nhập từ {0} kí tự trở lên." ), + rangelength: jQuery.validator.format( "Hãy nhập từ {0} đến {1} kí tự." ), + range: jQuery.validator.format( "Hãy nhập từ {0} đến {1}." ), + max: jQuery.validator.format( "Hãy nhập từ {0} trở xuống." ), + min: jQuery.validator.format( "Hãy nhập từ {1} trở lên." ) +} ); diff --git a/script/jquery-validate/localization/messages_zh.js b/script/jquery-validate/localization/messages_zh.js new file mode 100644 index 0000000..3aa26db --- /dev/null +++ b/script/jquery-validate/localization/messages_zh.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: ZH (Chinese, 中文 (Zhōngwén), 汉语, 漢語) + */ +jQuery.extend( jQuery.validator.messages, { + required: "这是必填字段", + remote: "请修正此字段", + email: "请输入有效的电子邮件地址", + url: "请输入有效的网址", + date: "请输入有效的日期", + dateISO: "请输入有效的日期 (YYYY-MM-DD)", + number: "请输入有效的数字", + digits: "只能输入数字", + creditcard: "请输入有效的信用卡号码", + equalTo: "你的输入不相同", + extension: "请输入有效的后缀", + maxlength: jQuery.validator.format( "最多可以输入 {0} 个字符" ), + minlength: jQuery.validator.format( "最少要输入 {0} 个字符" ), + rangelength: jQuery.validator.format( "请输入长度在 {0} 到 {1} 之间的字符串" ), + range: jQuery.validator.format( "请输入范围在 {0} 到 {1} 之间的数值" ), + max: jQuery.validator.format( "请输入不大于 {0} 的数值" ), + min: jQuery.validator.format( "请输入不小于 {0} 的数值" ) +} ); diff --git a/script/jquery-validate/localization/messages_zh_TW.js b/script/jquery-validate/localization/messages_zh_TW.js new file mode 100644 index 0000000..b162477 --- /dev/null +++ b/script/jquery-validate/localization/messages_zh_TW.js @@ -0,0 +1,24 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: ZH (Chinese; 中文 (Zhōngwén), 汉语, 漢語) + * Region: TW (Taiwan) + */ +jQuery.extend( jQuery.validator.messages, { + required: "必須填寫", + remote: "請修正此欄位", + email: "請輸入有效的電子郵件", + url: "請輸入有效的網址", + date: "請輸入有效的日期", + dateISO: "請輸入有效的日期 (YYYY-MM-DD)", + number: "請輸入正確的數值", + digits: "只可輸入數字", + creditcard: "請輸入有效的信用卡號碼", + equalTo: "請重複輸入一次", + extension: "請輸入有效的後綴", + maxlength: jQuery.validator.format( "最多 {0} 個字" ), + minlength: jQuery.validator.format( "最少 {0} 個字" ), + rangelength: jQuery.validator.format( "請輸入長度為 {0} 至 {1} 之間的字串" ), + range: jQuery.validator.format( "請輸入 {0} 至 {1} 之間的數值" ), + max: jQuery.validator.format( "請輸入不大於 {0} 的數值" ), + min: jQuery.validator.format( "請輸入不小於 {0} 的數值" ) +} ); diff --git a/script/jquery-validate/localization/methods_de.js b/script/jquery-validate/localization/methods_de.js new file mode 100644 index 0000000..34f6578 --- /dev/null +++ b/script/jquery-validate/localization/methods_de.js @@ -0,0 +1,12 @@ +/* + * Localized default methods for the jQuery validation plugin. + * Locale: DE + */ +jQuery.extend( jQuery.validator.methods, { + date: function( value, element ) { + return this.optional( element ) || /^\d\d?\.\d\d?\.\d\d\d?\d?$/.test( value ); + }, + number: function( value, element ) { + return this.optional( element ) || /^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test( value ); + } +} ); diff --git a/script/jquery-validate/localization/methods_es_CL.js b/script/jquery-validate/localization/methods_es_CL.js new file mode 100644 index 0000000..5904fa1 --- /dev/null +++ b/script/jquery-validate/localization/methods_es_CL.js @@ -0,0 +1,12 @@ +/* + * Localized default methods for the jQuery validation plugin. + * Locale: ES_CL + */ +jQuery.extend( jQuery.validator.methods, { + date: function( value, element ) { + return this.optional( element ) || /^\d\d?\-\d\d?\-\d\d\d?\d?$/.test( value ); + }, + number: function( value, element ) { + return this.optional( element ) || /^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test( value ); + } +} ); diff --git a/script/jquery-validate/localization/methods_fi.js b/script/jquery-validate/localization/methods_fi.js new file mode 100644 index 0000000..5209357 --- /dev/null +++ b/script/jquery-validate/localization/methods_fi.js @@ -0,0 +1,12 @@ +/* + * Localized default methods for the jQuery validation plugin. + * Locale: FI + */ +jQuery.extend( jQuery.validator.methods, { + date: function( value, element ) { + return this.optional( element ) || /^\d{1,2}\.\d{1,2}\.\d{4}$/.test( value ); + }, + number: function( value, element ) { + return this.optional( element ) || /^-?(?:\d+)(?:,\d+)?$/.test( value ); + } +} ); diff --git a/script/jquery-validate/localization/methods_nl.js b/script/jquery-validate/localization/methods_nl.js new file mode 100644 index 0000000..b07768b --- /dev/null +++ b/script/jquery-validate/localization/methods_nl.js @@ -0,0 +1,9 @@ +/* + * Localized default methods for the jQuery validation plugin. + * Locale: NL + */ +jQuery.extend( jQuery.validator.methods, { + date: function( value, element ) { + return this.optional( element ) || /^\d\d?[\.\/\-]\d\d?[\.\/\-]\d\d\d?\d?$/.test( value ); + } +} ); diff --git a/script/jquery-validate/localization/methods_pt.js b/script/jquery-validate/localization/methods_pt.js new file mode 100644 index 0000000..ce915e0 --- /dev/null +++ b/script/jquery-validate/localization/methods_pt.js @@ -0,0 +1,9 @@ +/* + * Localized default methods for the jQuery validation plugin. + * Locale: PT_BR + */ +jQuery.extend( jQuery.validator.methods, { + date: function( value, element ) { + return this.optional( element ) || /^\d\d?\/\d\d?\/\d\d\d?\d?$/.test( value ); + } +} ); diff --git a/script/postman-admin-pointer.js b/script/postman-admin-pointer.js new file mode 100644 index 0000000..6b6f76e --- /dev/null +++ b/script/postman-admin-pointer.js @@ -0,0 +1,20 @@ +jQuery(document).ready(function() { + wptuts_open_pointer(0); + function wptuts_open_pointer(i) { + pointer = postman_admin_pointer.pointers[i]; + options = jQuery.extend(pointer.options, { + close : function() { + jQuery.post(ajaxurl, { + pointer : pointer.pointer_id, + action : 'dismiss-wp-pointer' + }).fail(function(response) { + //ajaxFailed(response); + }); + } + }); + + if (typeof (jQuery().pointer) != 'undefined') { + jQuery(pointer.target).pointer(options).pointer('open'); + } + } +});
\ No newline at end of file diff --git a/script/postman.js b/script/postman.js new file mode 100644 index 0000000..f019dbb --- /dev/null +++ b/script/postman.js @@ -0,0 +1,247 @@ +var redirectUrlWarning = false; +if (!console) + console = { + log : function() { + } + } +function disable(identifier) { + var el = jQuery(identifier); + console.debug('disabling ' + identifier); + el.attr('disabled', 'disabled'); +} +function enable(identifier) { + var el = jQuery(identifier); + console.debug('enabling ' + identifier); + el.removeAttr('disabled'); +} +function hide(identifier) { + var el = jQuery(identifier); + console.debug('hiding ' + identifier); + el.hide("fast"); +} +function show(identifier) { + var el = jQuery(identifier); + console.debug('showing ' + identifier); + el.show("fast"); +} +function writeable(identifier) { + var el = jQuery(identifier); + el.prop("readonly", false); +} +function readonly(identifier) { + var el = jQuery(identifier); + el.prop("readonly", true); +} +function hideLoaderIcon() { + hide('.ajax-loader'); +} +function showLoaderIcon() { + show('.ajax-loader'); +} +function handleConfigurationResponse(response) { + response = response.data; + if (response.display_auth == 'oauth2') { + show('p#wizard_oauth2_help'); + jQuery('p#wizard_oauth2_help').html(response.help_text); + jQuery(postman_redirect_url_el).val(response.redirect_url); + jQuery('#input_oauth_callback_domain').val(response.callback_domain); + jQuery('#client_id').html(response.client_id_label); + jQuery('#client_secret').html(response.client_secret_label); + jQuery('#redirect_url').html(response.redirect_url_label); + jQuery('#callback_domain').html(response.callback_domain_label); + } +} +// add an event on the authentication input field +// on user changing the auth type, determine whether to show +// password or oauth section +jQuery(document).ready(function() { + jQuery('a#show-diagnostics').click(function() { + show('#diagnostic-text'); + }); +}); + +// http://www.electrictoolbox.com/toggle-password-field-text-password/ +function setupPasswordToggle(passwordFieldId, togglePasswordFieldId) { + try { + /** + * switch the password field to text, then back to password to see if it + * supports changing the field type (IE9+, and all other browsers do). + * then switch it back. + */ + passwordField = document.getElementById(passwordFieldId); + for (var i = 0, len = passwordField.value.length; i < len; i++) { + if (passwordField.value[i] == '*') + return false; + } + passwordField.type = 'text'; + passwordField.type = 'password'; + + /** + * if it does support changing the field type then add the event handler + * and make the button visible. if the browser doesn't support it, then + * this is bypassed and code execution continues in the catch() section + * below + */ + togglePasswordField = document.getElementById(togglePasswordFieldId); + togglePasswordField.addEventListener('click', + togglePasswordFieldClicked, false); + togglePasswordField.style.visibility = 'visible'; + + return true; + } + + catch (err) { + return true; + } + +} + +function togglePasswordFieldClicked() { + + // var passwordField = document.getElementById('passwordField'); + var value = passwordField.value; + + if (passwordField.type == 'password') { + passwordField.type = 'text'; + togglePasswordField.disabled = true; + } else { + // nah, let's not toggle it back + // passwordField.type = 'password'; + } + passwordField.value = value; + +} + +// password toggle +showPassword = false; + +function enablePasswordDisplayOnEntry($el1, $el2) { + // http://stackoverflow.com/questions/1948332/detect-all-changes-to-a-input-type-text-immediately-using-jquery + console.debug('in enablePasswordDisplayEntryOn'); + jQuery('#' + $el1).each( + function() { + var elem = jQuery(this); + + // Save current value of element + elem.data('oldVal', elem.val()); + + // Look for changes in the value + elem.bind("propertychange change click keyup input paste", + function(event) { + + // If value has changed... + if (elem.data('oldVal') != elem.val()) { + // Updated stored value + elem.data('oldVal', elem.val()); + + if (!showPassword) + showPassword = setupPasswordToggle($el1, + $el2); + } + }); + }); + +} + +jQuery('body').ajaxStart(function() { + jQuery(this).css({ + 'cursor' : 'wait' + }); +}).ajaxStop(function() { + jQuery(this).css({ + 'cursor' : 'default' + }); +}); + +function ajaxFailed(response) { + if (response.responseText) { + alert(postman_ajax_msg.bad_response + " " + + JSON.stringify(response, null, 4)); + } +} + +// Production steps of ECMA-262, Edition 5, 15.4.4.18 +// Reference: http://es5.github.io/#x15.4.4.18 +if (!Array.prototype.forEach) { + + Array.prototype.forEach = function(callback, thisArg) { + + var T, k; + + if (this == null) { + throw new TypeError(' this is null or not defined'); + } + + // 1. Let O be the result of calling ToObject passing the |this| value + // as the argument. + var O = Object(this); + + // 2. Let lenValue be the result of calling the Get internal method of O + // with the argument "length". + // 3. Let len be ToUint32(lenValue). + var len = O.length >>> 0; + + // 4. If IsCallable(callback) is false, throw a TypeError exception. + // See: http://es5.github.com/#x9.11 + if (typeof callback !== "function") { + throw new TypeError(callback + ' is not a function'); + } + + // 5. If thisArg was supplied, let T be thisArg; else let T be + // undefined. + if (arguments.length > 1) { + T = thisArg; + } + + // 6. Let k be 0 + k = 0; + + // 7. Repeat, while k < len + while (k < len) { + + var kValue; + + // a. Let Pk be ToString(k). + // This is implicit for LHS operands of the in operator + // b. Let kPresent be the result of calling the HasProperty internal + // method of O with argument Pk. + // This step can be combined with c + // c. If kPresent is true, then + if (k in O) { + + // i. Let kValue be the result of calling the Get internal + // method of O with argument Pk. + kValue = O[k]; + + // ii. Call the Call internal method of callback with T as the + // this value and + // argument list containing kValue, k, and O. + callback.call(T, kValue, k, O); + } + // d. Increase k by 1. + k++; + } + // 8. return undefined + }; +} +function postmanValidateAjaxResponse(response) { + if (response.data == undefined) { + // handle corrupt response + jQuery('#postman_test_message_status').html( + postman_email_test.ajax_error); + jQuery('#postman_test_message_status').css('color', 'red'); + jQuery('#postman_test_message_error_message').val( + postman_ajax_msg.corrupt_response + ":\n\n" + response); + jQuery('li + li').removeClass('disabled'); + return false; + } + return true; +} +function postmanValidateAjaxResponseWithPopup(response) { + if (response.data == undefined) { + alert(postman_ajax_msg.corrupt_response + ":\n\n" + + JSON.stringify(response, null, 4)); + return false; + } + return true; +}
\ No newline at end of file diff --git a/script/postman_resend_email_sript.js b/script/postman_resend_email_sript.js new file mode 100644 index 0000000..1905bc5 --- /dev/null +++ b/script/postman_resend_email_sript.js @@ -0,0 +1,17 @@ +function postman_resend_email(emailId) { + var data = { + 'action' : 'postman_resend_mail', + 'email' : emailId + }; + + jQuery.post(ajaxurl, data, function(response) { + if (response.success) { + alert(response.data.message); +// jQuery('span#resend-' + emailId).text(postman_js_resend_label); + } else { + alert(sprintf(postman_js_email_not_resent, response.data.message)); + } + }).fail(function(response) { + ajaxFailed(response); + }); +} diff --git a/script/sprintf/sprintf.min.js b/script/sprintf/sprintf.min.js new file mode 100644 index 0000000..d5bcd09 --- /dev/null +++ b/script/sprintf/sprintf.min.js @@ -0,0 +1,4 @@ +/*! sprintf-js | Alexandru Marasteanu <hello@alexei.ro> (http://alexei.ro/) | BSD-3-Clause */ + +!function(a){function b(){var a=arguments[0],c=b.cache;return c[a]&&c.hasOwnProperty(a)||(c[a]=b.parse(a)),b.format.call(null,c[a],arguments)}function c(a){return Object.prototype.toString.call(a).slice(8,-1).toLowerCase()}function d(a,b){return Array(b+1).join(a)}var e={not_string:/[^s]/,number:/[dief]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fiosuxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[\+\-]/};b.format=function(a,f){var g,h,i,j,k,l,m,n=1,o=a.length,p="",q=[],r=!0,s="";for(h=0;o>h;h++)if(p=c(a[h]),"string"===p)q[q.length]=a[h];else if("array"===p){if(j=a[h],j[2])for(g=f[n],i=0;i<j[2].length;i++){if(!g.hasOwnProperty(j[2][i]))throw new Error(b("[sprintf] property '%s' does not exist",j[2][i]));g=g[j[2][i]]}else g=j[1]?f[j[1]]:f[n++];if("function"==c(g)&&(g=g()),e.not_string.test(j[8])&&"number"!=c(g)&&isNaN(g))throw new TypeError(b("[sprintf] expecting number but found %s",c(g)));switch(e.number.test(j[8])&&(r=g>=0),j[8]){case"b":g=g.toString(2);break;case"c":g=String.fromCharCode(g);break;case"d":case"i":g=parseInt(g,10);break;case"e":g=j[7]?g.toExponential(j[7]):g.toExponential();break;case"f":g=j[7]?parseFloat(g).toFixed(j[7]):parseFloat(g);break;case"o":g=g.toString(8);break;case"s":g=(g=String(g))&&j[7]?g.substring(0,j[7]):g;break;case"u":g>>>=0;break;case"x":g=g.toString(16);break;case"X":g=g.toString(16).toUpperCase()}!e.number.test(j[8])||r&&!j[3]?s="":(s=r?"+":"-",g=g.toString().replace(e.sign,"")),l=j[4]?"0"===j[4]?"0":j[4].charAt(1):" ",m=j[6]-(s+g).length,k=j[6]&&m>0?d(l,m):"",q[q.length]=j[5]?s+g+k:"0"===l?s+k+g:k+s+g}return q.join("")},b.cache={},b.parse=function(a){for(var b=a,c=[],d=[],f=0;b;){if(null!==(c=e.text.exec(b)))d[d.length]=c[0];else if(null!==(c=e.modulo.exec(b)))d[d.length]="%";else{if(null===(c=e.placeholder.exec(b)))throw new SyntaxError("[sprintf] unexpected placeholder");if(c[2]){f|=1;var g=[],h=c[2],i=[];if(null===(i=e.key.exec(h)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(g[g.length]=i[1];""!==(h=h.substring(i[0].length));)if(null!==(i=e.key_access.exec(h)))g[g.length]=i[1];else{if(null===(i=e.index_access.exec(h)))throw new SyntaxError("[sprintf] failed to parse named argument key");g[g.length]=i[1]}c[2]=g}else f|=2;if(3===f)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");d[d.length]=c}b=b.substring(c[0].length)}return d};var f=function(a,c,d){return d=(c||[]).slice(0),d.splice(0,0,a),b.apply(null,d)};"undefined"!=typeof exports?(exports.sprintf=b,exports.vsprintf=f):(a.sprintf=b,a.vsprintf=f,"function"==typeof define&&define.amd&&define(function(){return{sprintf:b,vsprintf:f}}))}("undefined"==typeof window?this:window); +//# sourceMappingURL=sprintf.min.map
\ No newline at end of file diff --git a/script/sprintf/sprintf.min.map b/script/sprintf/sprintf.min.map new file mode 100644 index 0000000..33fe163 --- /dev/null +++ b/script/sprintf/sprintf.min.map @@ -0,0 +1 @@ +{"version":3,"file":"sprintf.min.js","sources":["../src/sprintf.js"],"names":["window","sprintf","key","arguments","cache","hasOwnProperty","parse","format","call","get_type","variable","Object","prototype","toString","slice","toLowerCase","str_repeat","input","multiplier","Array","join","re","not_string","number","text","modulo","placeholder","key_access","index_access","sign","parse_tree","argv","arg","i","k","match","pad","pad_character","pad_length","cursor","tree_length","length","node_type","output","is_positive","Error","test","isNaN","TypeError","String","fromCharCode","parseInt","toExponential","parseFloat","toFixed","substring","toUpperCase","replace","charAt","fmt","_fmt","arg_names","exec","SyntaxError","field_list","replacement_field","field_match","vsprintf","_argv","splice","apply","exports","define","amd","this"],"mappings":";;CAAA,SAAUA,GAaN,QAASC,KACL,GAAIC,GAAMC,UAAU,GAAIC,EAAQH,EAAQG,KAIxC,OAHMA,GAAMF,IAAQE,EAAMC,eAAeH,KACrCE,EAAMF,GAAOD,EAAQK,MAAMJ,IAExBD,EAAQM,OAAOC,KAAK,KAAMJ,EAAMF,GAAMC,WAoJjD,QAASM,GAASC,GACd,MAAOC,QAAOC,UAAUC,SAASL,KAAKE,GAAUI,MAAM,EAAG,IAAIC,cAGjE,QAASC,GAAWC,EAAOC,GACvB,MAAOC,OAAMD,EAAa,GAAGE,KAAKH,GA1KtC,GAAII,IACAC,WAAY,OACZC,OAAQ,SACRC,KAAM,YACNC,OAAQ,WACRC,YAAa,wFACbxB,IAAK,sBACLyB,WAAY,wBACZC,aAAc,aACdC,KAAM,UAWV5B,GAAQM,OAAS,SAASuB,EAAYC,GAClC,GAAiEC,GAAkBC,EAAGC,EAAGC,EAAOC,EAAKC,EAAeC,EAAhHC,EAAS,EAAGC,EAAcV,EAAWW,OAAQC,EAAY,GAASC,KAA0DC,GAAc,EAAMf,EAAO,EAC3J,KAAKI,EAAI,EAAOO,EAAJP,EAAiBA,IAEzB,GADAS,EAAYjC,EAASqB,EAAWG,IACd,WAAdS,EACAC,EAAOA,EAAOF,QAAUX,EAAWG,OAElC,IAAkB,UAAdS,EAAuB,CAE5B,GADAP,EAAQL,EAAWG,GACfE,EAAM,GAEN,IADAH,EAAMD,EAAKQ,GACNL,EAAI,EAAGA,EAAIC,EAAM,GAAGM,OAAQP,IAAK,CAClC,IAAKF,EAAI3B,eAAe8B,EAAM,GAAGD,IAC7B,KAAM,IAAIW,OAAM5C,EAAQ,yCAA0CkC,EAAM,GAAGD,IAE/EF,GAAMA,EAAIG,EAAM,GAAGD,QAIvBF,GADKG,EAAM,GACLJ,EAAKI,EAAM,IAGXJ,EAAKQ,IAOf,IAJqB,YAAjB9B,EAASuB,KACTA,EAAMA,KAGNX,EAAGC,WAAWwB,KAAKX,EAAM,KAAyB,UAAjB1B,EAASuB,IAAoBe,MAAMf,GACpE,KAAM,IAAIgB,WAAU/C,EAAQ,0CAA2CQ,EAASuB,IAOpF,QAJIX,EAAGE,OAAOuB,KAAKX,EAAM,MACrBS,EAAcZ,GAAO,GAGjBG,EAAM,IACV,IAAK,IACDH,EAAMA,EAAInB,SAAS,EACvB,MACA,KAAK,IACDmB,EAAMiB,OAAOC,aAAalB,EAC9B,MACA,KAAK,IACL,IAAK,IACDA,EAAMmB,SAASnB,EAAK,GACxB,MACA,KAAK,IACDA,EAAMG,EAAM,GAAKH,EAAIoB,cAAcjB,EAAM,IAAMH,EAAIoB,eACvD,MACA,KAAK,IACDpB,EAAMG,EAAM,GAAKkB,WAAWrB,GAAKsB,QAAQnB,EAAM,IAAMkB,WAAWrB,EACpE,MACA,KAAK,IACDA,EAAMA,EAAInB,SAAS,EACvB,MACA,KAAK,IACDmB,GAAQA,EAAMiB,OAAOjB,KAASG,EAAM,GAAKH,EAAIuB,UAAU,EAAGpB,EAAM,IAAMH,CAC1E,MACA,KAAK,IACDA,KAAc,CAClB,MACA,KAAK,IACDA,EAAMA,EAAInB,SAAS,GACvB,MACA,KAAK,IACDmB,EAAMA,EAAInB,SAAS,IAAI2C,eAG3BnC,EAAGE,OAAOuB,KAAKX,EAAM,KAASS,IAAeT,EAAM,GAKnDN,EAAO,IAJPA,EAAOe,EAAc,IAAM,IAC3BZ,EAAMA,EAAInB,WAAW4C,QAAQpC,EAAGQ,KAAM,KAK1CQ,EAAgBF,EAAM,GAAkB,MAAbA,EAAM,GAAa,IAAMA,EAAM,GAAGuB,OAAO,GAAK,IACzEpB,EAAaH,EAAM,IAAMN,EAAOG,GAAKS,OACrCL,EAAMD,EAAM,IAAMG,EAAa,EAAItB,EAAWqB,EAAeC,GAAoB,GACjFK,EAAOA,EAAOF,QAAUN,EAAM,GAAKN,EAAOG,EAAMI,EAAyB,MAAlBC,EAAwBR,EAAOO,EAAMJ,EAAMI,EAAMP,EAAOG,EAGvH,MAAOW,GAAOvB,KAAK,KAGvBnB,EAAQG,SAERH,EAAQK,MAAQ,SAASqD,GAErB,IADA,GAAIC,GAAOD,EAAKxB,KAAYL,KAAiB+B,EAAY,EAClDD,GAAM,CACT,GAAqC,QAAhCzB,EAAQd,EAAGG,KAAKsC,KAAKF,IACtB9B,EAAWA,EAAWW,QAAUN,EAAM,OAErC,IAAuC,QAAlCA,EAAQd,EAAGI,OAAOqC,KAAKF,IAC7B9B,EAAWA,EAAWW,QAAU,QAE/B,CAAA,GAA4C,QAAvCN,EAAQd,EAAGK,YAAYoC,KAAKF,IAgClC,KAAM,IAAIG,aAAY,mCA/BtB,IAAI5B,EAAM,GAAI,CACV0B,GAAa,CACb,IAAIG,MAAiBC,EAAoB9B,EAAM,GAAI+B,IACnD,IAAuD,QAAlDA,EAAc7C,EAAGnB,IAAI4D,KAAKG,IAe3B,KAAM,IAAIF,aAAY,+CAbtB,KADAC,EAAWA,EAAWvB,QAAUyB,EAAY,GACwC,MAA5ED,EAAoBA,EAAkBV,UAAUW,EAAY,GAAGzB,UACnE,GAA8D,QAAzDyB,EAAc7C,EAAGM,WAAWmC,KAAKG,IAClCD,EAAWA,EAAWvB,QAAUyB,EAAY,OAE3C,CAAA,GAAgE,QAA3DA,EAAc7C,EAAGO,aAAakC,KAAKG,IAIzC,KAAM,IAAIF,aAAY,+CAHtBC,GAAWA,EAAWvB,QAAUyB,EAAY,GAUxD/B,EAAM,GAAK6B,MAGXH,IAAa,CAEjB,IAAkB,IAAdA,EACA,KAAM,IAAIhB,OAAM,4EAEpBf,GAAWA,EAAWW,QAAUN,EAKpCyB,EAAOA,EAAKL,UAAUpB,EAAM,GAAGM,QAEnC,MAAOX,GAGX,IAAIqC,GAAW,SAASR,EAAK5B,EAAMqC,GAG/B,MAFAA,IAASrC,OAAYjB,MAAM,GAC3BsD,EAAMC,OAAO,EAAG,EAAGV,GACZ1D,EAAQqE,MAAM,KAAMF,GAiBR,oBAAZG,UACPA,QAAQtE,QAAUA,EAClBsE,QAAQJ,SAAWA,IAGnBnE,EAAOC,QAAUA,EACjBD,EAAOmE,SAAWA,EAEI,kBAAXK,SAAyBA,OAAOC,KACvCD,OAAO,WACH,OACIvE,QAASA,EACTkE,SAAUA,OAKT,mBAAXnE,QAAyB0E,KAAO1E"}
\ No newline at end of file |