Current state
This commit is contained in:
83
public/assets/plugins/jquery-validation/test/aria.js
vendored
Normal file
83
public/assets/plugins/jquery-validation/test/aria.js
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
module("aria");
|
||||
|
||||
test("Invalid field adds aria-invalid=true", function() {
|
||||
var ariaInvalidFirstName = $("#ariaInvalidFirstName"),
|
||||
form = $("#ariaInvalid");
|
||||
|
||||
form.validate({
|
||||
rules: {
|
||||
ariaInvalidFirstName: "required"
|
||||
}
|
||||
});
|
||||
ariaInvalidFirstName.val("");
|
||||
ariaInvalidFirstName.valid();
|
||||
equal(ariaInvalidFirstName.attr("aria-invalid"), "true");
|
||||
});
|
||||
|
||||
test("Valid field adds aria-invalid=false", function() {
|
||||
var ariaInvalidFirstName = $("#ariaInvalidFirstName"),
|
||||
form = $("#ariaInvalid");
|
||||
|
||||
form.validate({
|
||||
rules: {
|
||||
ariaInvalidFirstName: "required"
|
||||
}
|
||||
});
|
||||
ariaInvalidFirstName.val("not empty");
|
||||
ariaInvalidFirstName.valid();
|
||||
equal(ariaInvalidFirstName.attr("aria-invalid"), "false");
|
||||
equal($("#ariaInvalid [aria-invalid=false]").length, 1);
|
||||
});
|
||||
|
||||
test("resetForm(): removes all aria-invalid attributes", function() {
|
||||
var ariaInvalidFirstName = $("#ariaInvalidFirstName"),
|
||||
form = $("#ariaInvalid"),
|
||||
validator = form.validate({
|
||||
rules: {
|
||||
ariaInvalidFirstName: "required"
|
||||
}
|
||||
});
|
||||
|
||||
ariaInvalidFirstName.val("not empty");
|
||||
ariaInvalidFirstName.valid();
|
||||
validator.resetForm();
|
||||
equal($("#ariaInvalid [aria-invalid]").length, 0, "resetForm() should remove any aria-invalid attributes");
|
||||
});
|
||||
|
||||
test("Static required field adds aria-required", function() {
|
||||
var ariaRequiredStatic = $("#ariaRequiredStatic"),
|
||||
form = $("#ariaRequired");
|
||||
|
||||
form.validate();
|
||||
equal(ariaRequiredStatic.attr("aria-required"), "true");
|
||||
});
|
||||
|
||||
test("Data required field adds aria-required", function() {
|
||||
var ariaRequiredData = $("#ariaRequiredData"),
|
||||
form = $("#ariaRequired");
|
||||
|
||||
form.validate();
|
||||
equal(ariaRequiredData.attr("aria-required"), "true");
|
||||
});
|
||||
|
||||
test("Class required field adds aria-required", function() {
|
||||
var ariaRequiredClass = $("#ariaRequiredClass"),
|
||||
form = $("#ariaRequired");
|
||||
|
||||
form.validate();
|
||||
equal(ariaRequiredClass.attr("aria-required"), "true");
|
||||
});
|
||||
|
||||
test("Dynamically required field adds aria-required after valid()", function() {
|
||||
var ariaRequiredDynamic = $("#ariaRequiredDynamic"),
|
||||
form = $("#ariaRequired");
|
||||
|
||||
form.resetForm();
|
||||
form.validate({
|
||||
rules: {
|
||||
ariaRequiredDynamic: "required"
|
||||
}
|
||||
});
|
||||
ariaRequiredDynamic.valid();
|
||||
equal(ariaRequiredDynamic.attr("aria-required"), "true");
|
||||
});
|
||||
71
public/assets/plugins/jquery-validation/test/events.html
Normal file
71
public/assets/plugins/jquery-validation/test/events.html
Normal file
@@ -0,0 +1,71 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
||||
<title>Test for jQuery validate() plugin</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="css/screen.css" />
|
||||
<script src="../lib/jquery.js" type="text/javascript"></script>
|
||||
<script src="firebug/firebug.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$().ready(function() {
|
||||
var handler = {
|
||||
focusin: function() {
|
||||
$(this).addClass("focus");
|
||||
},
|
||||
focusout: function() {
|
||||
$(this).removeClass("focus");
|
||||
}
|
||||
}
|
||||
$("#commentForm").delegate("focusin focusout", ":text, textarea", function(event) {
|
||||
/*
|
||||
this.addClass("focus").one("blur", function() {
|
||||
$(this).removeClass("focus");
|
||||
});
|
||||
*/
|
||||
handler[event.type].call(this, arguments);
|
||||
});
|
||||
$("#remove").click(function() {
|
||||
$("#commentForm").unbind("focusin");
|
||||
})
|
||||
});
|
||||
</script>
|
||||
|
||||
<style type="text/css">
|
||||
#commentForm { width: 500px; }
|
||||
#commentForm label { width: 250px; display: block; float: left; }
|
||||
#commentForm label.error, #commentForm input.submit { margin-left: 253px; }
|
||||
.focus { background-color: red; }
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<form class="cmxform" id="commentForm" method="get" action="">
|
||||
<fieldset>
|
||||
<legend>A simple comment form with submit validation and default messages</legend>
|
||||
<p>
|
||||
<label for="cname">Name (required, at least 2 characters)</label>
|
||||
<input id="cname" name="name" class="some other styles {required:true,minLength:2}" />
|
||||
<p>
|
||||
<label for="cemail">E-Mail (required)</label>
|
||||
<input id="cemail" name="email" class="{required:true,email:true}" />
|
||||
</p>
|
||||
<p>
|
||||
<label for="curl">URL (optional)</label>
|
||||
<input id="curl" name="url" class="{url:true}" value="" />
|
||||
</p>
|
||||
<p>
|
||||
<label for="ccomment">Your comment (required)</label>
|
||||
<textarea id="ccomment" name="comment" class="{required:true}"></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<input class="submit" type="submit" value="Submit"/>
|
||||
</p>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<button id="remove">Remove focus handler</button>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 457 B |
209
public/assets/plugins/jquery-validation/test/firebug/firebug.css
Normal file
209
public/assets/plugins/jquery-validation/test/firebug/firebug.css
Normal file
@@ -0,0 +1,209 @@
|
||||
|
||||
html, body {
|
||||
margin: 0;
|
||||
background: #FFFFFF;
|
||||
font-family: Lucida Grande, Tahoma, sans-serif;
|
||||
font-size: 11px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.toolbar {
|
||||
height: 14px;
|
||||
border-top: 1px solid ThreeDHighlight;
|
||||
border-bottom: 1px solid ThreeDShadow;
|
||||
padding: 2px 6px;
|
||||
background: ThreeDFace;
|
||||
}
|
||||
|
||||
.toolbarRight {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
right: 6px;
|
||||
}
|
||||
|
||||
#log {
|
||||
overflow: auto;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#commandLine {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 18px;
|
||||
border: none;
|
||||
border-top: 1px solid ThreeDShadow;
|
||||
}
|
||||
|
||||
/************************************************************************************************/
|
||||
|
||||
.logRow {
|
||||
position: relative;
|
||||
border-bottom: 1px solid #D7D7D7;
|
||||
padding: 2px 4px 1px 6px;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
.logRow-command {
|
||||
font-family: Monaco, monospace;
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.objectBox-null {
|
||||
padding: 0 2px;
|
||||
border: 1px solid #666666;
|
||||
background-color: #888888;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.objectBox-string {
|
||||
font-family: Monaco, monospace;
|
||||
color: red;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.objectBox-number {
|
||||
color: #000088;
|
||||
}
|
||||
|
||||
.objectBox-function {
|
||||
font-family: Monaco, monospace;
|
||||
color: DarkGreen;
|
||||
}
|
||||
|
||||
.objectBox-object {
|
||||
color: DarkGreen;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/************************************************************************************************/
|
||||
|
||||
.logRow-info,
|
||||
.logRow-error,
|
||||
.logRow-warning {
|
||||
background: #FFFFFF no-repeat 2px 2px;
|
||||
padding-left: 20px;
|
||||
padding-bottom: 3px;
|
||||
}
|
||||
|
||||
.logRow-info {
|
||||
background-image: url(infoIcon.png);
|
||||
}
|
||||
|
||||
.logRow-warning {
|
||||
background-color: cyan;
|
||||
background-image: url(warningIcon.png);
|
||||
}
|
||||
|
||||
.logRow-error {
|
||||
background-color: LightYellow;
|
||||
background-image: url(errorIcon.png);
|
||||
}
|
||||
|
||||
.errorMessage {
|
||||
vertical-align: top;
|
||||
color: #FF0000;
|
||||
}
|
||||
|
||||
.objectBox-sourceLink {
|
||||
position: absolute;
|
||||
right: 4px;
|
||||
top: 2px;
|
||||
padding-left: 8px;
|
||||
font-family: Lucida Grande, sans-serif;
|
||||
font-weight: bold;
|
||||
color: #0000FF;
|
||||
}
|
||||
|
||||
/************************************************************************************************/
|
||||
|
||||
.logRow-group {
|
||||
background: #EEEEEE;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.logGroup {
|
||||
background: #EEEEEE;
|
||||
}
|
||||
|
||||
.logGroupBox {
|
||||
margin-left: 24px;
|
||||
border-top: 1px solid #D7D7D7;
|
||||
border-left: 1px solid #D7D7D7;
|
||||
}
|
||||
|
||||
/************************************************************************************************/
|
||||
|
||||
.selectorTag,
|
||||
.selectorId,
|
||||
.selectorClass {
|
||||
font-family: Monaco, monospace;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.selectorTag {
|
||||
color: #0000FF;
|
||||
}
|
||||
|
||||
.selectorId {
|
||||
color: DarkBlue;
|
||||
}
|
||||
|
||||
.selectorClass {
|
||||
color: red;
|
||||
}
|
||||
|
||||
/************************************************************************************************/
|
||||
|
||||
.objectBox-element {
|
||||
font-family: Monaco, monospace;
|
||||
color: #000088;
|
||||
}
|
||||
|
||||
.nodeChildren {
|
||||
margin-left: 16px;
|
||||
}
|
||||
|
||||
.nodeTag {
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.nodeValue {
|
||||
color: #FF0000;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.nodeText,
|
||||
.nodeComment {
|
||||
margin: 0 2px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.nodeText {
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.nodeComment {
|
||||
color: DarkGreen;
|
||||
}
|
||||
|
||||
/************************************************************************************************/
|
||||
|
||||
.propertyNameCell {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.propertyName {
|
||||
font-weight: bold;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<head>
|
||||
<title>Firebug</title>
|
||||
<link rel="stylesheet" type="text/css" href="firebug.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="toolbar" class="toolbar">
|
||||
<a href="#" onclick="parent.console.clear()">Clear</a>
|
||||
<span class="toolbarRight">
|
||||
<a href="#" onclick="parent.console.close()">Close</a>
|
||||
</span>
|
||||
</div>
|
||||
<div id="log"></div>
|
||||
<input type="text" id="commandLine">
|
||||
|
||||
<script>parent.onFirebugReady(document);</script>
|
||||
</body>
|
||||
</html>
|
||||
672
public/assets/plugins/jquery-validation/test/firebug/firebug.js
vendored
Normal file
672
public/assets/plugins/jquery-validation/test/firebug/firebug.js
vendored
Normal file
@@ -0,0 +1,672 @@
|
||||
|
||||
if (!("console" in window) || !("firebug" in console)) {
|
||||
(function()
|
||||
{
|
||||
window.console =
|
||||
{
|
||||
log: function()
|
||||
{
|
||||
logFormatted(arguments, "");
|
||||
},
|
||||
|
||||
debug: function()
|
||||
{
|
||||
logFormatted(arguments, "debug");
|
||||
},
|
||||
|
||||
info: function()
|
||||
{
|
||||
logFormatted(arguments, "info");
|
||||
},
|
||||
|
||||
warn: function()
|
||||
{
|
||||
logFormatted(arguments, "warning");
|
||||
},
|
||||
|
||||
error: function()
|
||||
{
|
||||
logFormatted(arguments, "error");
|
||||
},
|
||||
|
||||
assert: function(truth, message)
|
||||
{
|
||||
if (!truth)
|
||||
{
|
||||
var args = [];
|
||||
for (var i = 1; i < arguments.length; ++i)
|
||||
args.push(arguments[i]);
|
||||
|
||||
logFormatted(args.length ? args : ["Assertion Failure"], "error");
|
||||
throw message ? message : "Assertion Failure";
|
||||
}
|
||||
},
|
||||
|
||||
dir: function(object)
|
||||
{
|
||||
var html = [];
|
||||
|
||||
var pairs = [];
|
||||
for (var name in object)
|
||||
{
|
||||
try
|
||||
{
|
||||
pairs.push([name, object[name]]);
|
||||
}
|
||||
catch (exc)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
pairs.sort(function(a, b) { return a[0] < b[0] ? -1 : 1; });
|
||||
|
||||
html.push('<table>');
|
||||
for (var i = 0; i < pairs.length; ++i)
|
||||
{
|
||||
var name = pairs[i][0], value = pairs[i][1];
|
||||
|
||||
html.push('<tr>',
|
||||
'<td class="propertyNameCell"><span class="propertyName">',
|
||||
escapeHTML(name), '</span></td>', '<td><span class="propertyValue">');
|
||||
appendObject(value, html);
|
||||
html.push('</span></td></tr>');
|
||||
}
|
||||
html.push('</table>');
|
||||
|
||||
logRow(html, "dir");
|
||||
},
|
||||
|
||||
dirxml: function(node)
|
||||
{
|
||||
var html = [];
|
||||
|
||||
appendNode(node, html);
|
||||
logRow(html, "dirxml");
|
||||
},
|
||||
|
||||
group: function()
|
||||
{
|
||||
logRow(arguments, "group", pushGroup);
|
||||
},
|
||||
|
||||
groupEnd: function()
|
||||
{
|
||||
logRow(arguments, "", popGroup);
|
||||
},
|
||||
|
||||
time: function(name)
|
||||
{
|
||||
timeMap[name] = (new Date()).getTime();
|
||||
},
|
||||
|
||||
timeEnd: function(name)
|
||||
{
|
||||
if (name in timeMap)
|
||||
{
|
||||
var delta = (new Date()).getTime() - timeMap[name];
|
||||
logFormatted([name+ ":", delta+"ms"]);
|
||||
delete timeMap[name];
|
||||
}
|
||||
},
|
||||
|
||||
count: function()
|
||||
{
|
||||
this.warn(["count() not supported."]);
|
||||
},
|
||||
|
||||
trace: function()
|
||||
{
|
||||
this.warn(["trace() not supported."]);
|
||||
},
|
||||
|
||||
profile: function()
|
||||
{
|
||||
this.warn(["profile() not supported."]);
|
||||
},
|
||||
|
||||
profileEnd: function()
|
||||
{
|
||||
},
|
||||
|
||||
clear: function()
|
||||
{
|
||||
consoleBody.innerHTML = "";
|
||||
},
|
||||
|
||||
open: function()
|
||||
{
|
||||
toggleConsole(true);
|
||||
},
|
||||
|
||||
close: function()
|
||||
{
|
||||
if (frameVisible)
|
||||
toggleConsole();
|
||||
}
|
||||
};
|
||||
|
||||
// ********************************************************************************************
|
||||
|
||||
var consoleFrame = null;
|
||||
var consoleBody = null;
|
||||
var commandLine = null;
|
||||
|
||||
var frameVisible = false;
|
||||
var messageQueue = [];
|
||||
var groupStack = [];
|
||||
var timeMap = {};
|
||||
|
||||
var clPrefix = ">>> ";
|
||||
|
||||
var isFirefox = navigator.userAgent.indexOf("Firefox") != -1;
|
||||
var isIE = navigator.userAgent.indexOf("MSIE") != -1;
|
||||
var isOpera = navigator.userAgent.indexOf("Opera") != -1;
|
||||
var isSafari = navigator.userAgent.indexOf("AppleWebKit") != -1;
|
||||
|
||||
// ********************************************************************************************
|
||||
|
||||
function toggleConsole(forceOpen)
|
||||
{
|
||||
frameVisible = forceOpen || !frameVisible;
|
||||
if (consoleFrame)
|
||||
consoleFrame.style.visibility = frameVisible ? "visible" : "hidden";
|
||||
else
|
||||
waitForBody();
|
||||
}
|
||||
|
||||
function focusCommandLine()
|
||||
{
|
||||
toggleConsole(true);
|
||||
if (commandLine)
|
||||
commandLine.focus();
|
||||
}
|
||||
|
||||
function waitForBody()
|
||||
{
|
||||
if (document.body)
|
||||
createFrame();
|
||||
else
|
||||
setTimeout(waitForBody, 200);
|
||||
}
|
||||
|
||||
function createFrame()
|
||||
{
|
||||
if (consoleFrame)
|
||||
return;
|
||||
|
||||
window.onFirebugReady = function(doc)
|
||||
{
|
||||
window.onFirebugReady = null;
|
||||
|
||||
var toolbar = doc.getElementById("toolbar");
|
||||
toolbar.onmousedown = onSplitterMouseDown;
|
||||
|
||||
commandLine = doc.getElementById("commandLine");
|
||||
addEvent(commandLine, "keydown", onCommandLineKeyDown);
|
||||
|
||||
addEvent(doc, isIE || isSafari ? "keydown" : "keypress", onKeyDown);
|
||||
|
||||
consoleBody = doc.getElementById("log");
|
||||
layout();
|
||||
flush();
|
||||
}
|
||||
|
||||
var baseURL = getFirebugURL();
|
||||
|
||||
consoleFrame = document.createElement("iframe");
|
||||
consoleFrame.setAttribute("src", baseURL+"/firebug.html");
|
||||
consoleFrame.setAttribute("frameBorder", "0");
|
||||
consoleFrame.style.visibility = (frameVisible ? "visible" : "hidden");
|
||||
consoleFrame.style.zIndex = "2147483647";
|
||||
consoleFrame.style.position = "fixed";
|
||||
consoleFrame.style.width = "100%";
|
||||
consoleFrame.style.left = "0";
|
||||
consoleFrame.style.bottom = "0";
|
||||
consoleFrame.style.height = "200px";
|
||||
document.body.appendChild(consoleFrame);
|
||||
}
|
||||
|
||||
function getFirebugURL()
|
||||
{
|
||||
var scripts = document.getElementsByTagName("script");
|
||||
for (var i = 0; i < scripts.length; ++i)
|
||||
{
|
||||
if (scripts[i].src.indexOf("firebug.js") != -1)
|
||||
{
|
||||
var lastSlash = scripts[i].src.lastIndexOf("/");
|
||||
return scripts[i].src.substr(0, lastSlash);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function evalCommandLine()
|
||||
{
|
||||
var text = commandLine.value;
|
||||
commandLine.value = "";
|
||||
|
||||
logRow([clPrefix, text], "command");
|
||||
|
||||
var value;
|
||||
try
|
||||
{
|
||||
value = eval(text);
|
||||
}
|
||||
catch (exc)
|
||||
{
|
||||
}
|
||||
|
||||
console.log(value);
|
||||
}
|
||||
|
||||
function layout()
|
||||
{
|
||||
var toolbar = consoleBody.ownerDocument.getElementById("toolbar");
|
||||
var height = consoleFrame.offsetHeight - (toolbar.offsetHeight + commandLine.offsetHeight);
|
||||
consoleBody.style.top = toolbar.offsetHeight + "px";
|
||||
consoleBody.style.height = height + "px";
|
||||
|
||||
commandLine.style.top = (consoleFrame.offsetHeight - commandLine.offsetHeight) + "px";
|
||||
}
|
||||
|
||||
function logRow(message, className, handler)
|
||||
{
|
||||
if (consoleBody)
|
||||
writeMessage(message, className, handler);
|
||||
else
|
||||
{
|
||||
messageQueue.push([message, className, handler]);
|
||||
waitForBody();
|
||||
}
|
||||
}
|
||||
|
||||
function flush()
|
||||
{
|
||||
var queue = messageQueue;
|
||||
messageQueue = [];
|
||||
|
||||
for (var i = 0; i < queue.length; ++i)
|
||||
writeMessage(queue[i][0], queue[i][1], queue[i][2]);
|
||||
}
|
||||
|
||||
function writeMessage(message, className, handler)
|
||||
{
|
||||
var isScrolledToBottom =
|
||||
consoleBody.scrollTop + consoleBody.offsetHeight >= consoleBody.scrollHeight;
|
||||
|
||||
if (!handler)
|
||||
handler = writeRow;
|
||||
|
||||
handler(message, className);
|
||||
|
||||
if (isScrolledToBottom)
|
||||
consoleBody.scrollTop = consoleBody.scrollHeight - consoleBody.offsetHeight;
|
||||
}
|
||||
|
||||
function appendRow(row)
|
||||
{
|
||||
var container = groupStack.length ? groupStack[groupStack.length-1] : consoleBody;
|
||||
container.appendChild(row);
|
||||
}
|
||||
|
||||
function writeRow(message, className)
|
||||
{
|
||||
var row = consoleBody.ownerDocument.createElement("div");
|
||||
row.className = "logRow" + (className ? " logRow-"+className : "");
|
||||
row.innerHTML = message.join("");
|
||||
appendRow(row);
|
||||
}
|
||||
|
||||
function pushGroup(message, className)
|
||||
{
|
||||
logFormatted(message, className);
|
||||
|
||||
var groupRow = consoleBody.ownerDocument.createElement("div");
|
||||
groupRow.className = "logGroup";
|
||||
var groupRowBox = consoleBody.ownerDocument.createElement("div");
|
||||
groupRowBox.className = "logGroupBox";
|
||||
groupRow.appendChild(groupRowBox);
|
||||
appendRow(groupRowBox);
|
||||
groupStack.push(groupRowBox);
|
||||
}
|
||||
|
||||
function popGroup()
|
||||
{
|
||||
groupStack.pop();
|
||||
}
|
||||
|
||||
// ********************************************************************************************
|
||||
|
||||
function logFormatted(objects, className)
|
||||
{
|
||||
var html = [];
|
||||
|
||||
var format = objects[0];
|
||||
var objIndex = 0;
|
||||
|
||||
if (typeof(format) != "string")
|
||||
{
|
||||
format = "";
|
||||
objIndex = -1;
|
||||
}
|
||||
|
||||
var parts = parseFormat(format);
|
||||
for (var i = 0; i < parts.length; ++i)
|
||||
{
|
||||
var part = parts[i];
|
||||
if (part && typeof(part) == "object")
|
||||
{
|
||||
var object = objects[++objIndex];
|
||||
part.appender(object, html);
|
||||
}
|
||||
else
|
||||
appendText(part, html);
|
||||
}
|
||||
|
||||
for (var i = objIndex+1; i < objects.length; ++i)
|
||||
{
|
||||
appendText(" ", html);
|
||||
|
||||
var object = objects[i];
|
||||
if (typeof(object) == "string")
|
||||
appendText(object, html);
|
||||
else
|
||||
appendObject(object, html);
|
||||
}
|
||||
|
||||
logRow(html, className);
|
||||
}
|
||||
|
||||
function parseFormat(format)
|
||||
{
|
||||
var parts = [];
|
||||
|
||||
var reg = /((^%|[^\\]%)(\d+)?(\.)([a-zA-Z]))|((^%|[^\\]%)([a-zA-Z]))/;
|
||||
var appenderMap = {s: appendText, d: appendInteger, i: appendInteger, f: appendFloat};
|
||||
|
||||
for (var m = reg.exec(format); m; m = reg.exec(format))
|
||||
{
|
||||
var type = m[8] ? m[8] : m[5];
|
||||
var appender = type in appenderMap ? appenderMap[type] : appendObject;
|
||||
var precision = m[3] ? parseInt(m[3]) : (m[4] == "." ? -1 : 0);
|
||||
|
||||
parts.push(format.substr(0, m[0][0] == "%" ? m.index : m.index+1));
|
||||
parts.push({appender: appender, precision: precision});
|
||||
|
||||
format = format.substr(m.index+m[0].length);
|
||||
}
|
||||
|
||||
parts.push(format);
|
||||
|
||||
return parts;
|
||||
}
|
||||
|
||||
function escapeHTML(value)
|
||||
{
|
||||
function replaceChars(ch)
|
||||
{
|
||||
switch (ch)
|
||||
{
|
||||
case "<":
|
||||
return "<";
|
||||
case ">":
|
||||
return ">";
|
||||
case "&":
|
||||
return "&";
|
||||
case "'":
|
||||
return "'";
|
||||
case '"':
|
||||
return """;
|
||||
}
|
||||
return "?";
|
||||
};
|
||||
return String(value).replace(/[<>&"']/g, replaceChars);
|
||||
}
|
||||
|
||||
function objectToString(object)
|
||||
{
|
||||
try
|
||||
{
|
||||
return object+"";
|
||||
}
|
||||
catch (exc)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// ********************************************************************************************
|
||||
|
||||
function appendText(object, html)
|
||||
{
|
||||
html.push(escapeHTML(objectToString(object)));
|
||||
}
|
||||
|
||||
function appendNull(object, html)
|
||||
{
|
||||
html.push('<span class="objectBox-null">', escapeHTML(objectToString(object)), '</span>');
|
||||
}
|
||||
|
||||
function appendString(object, html)
|
||||
{
|
||||
html.push('<span class="objectBox-string">"', escapeHTML(objectToString(object)),
|
||||
'"</span>');
|
||||
}
|
||||
|
||||
function appendInteger(object, html)
|
||||
{
|
||||
html.push('<span class="objectBox-number">', escapeHTML(objectToString(object)), '</span>');
|
||||
}
|
||||
|
||||
function appendFloat(object, html)
|
||||
{
|
||||
html.push('<span class="objectBox-number">', escapeHTML(objectToString(object)), '</span>');
|
||||
}
|
||||
|
||||
function appendFunction(object, html)
|
||||
{
|
||||
var reName = /function ?(.*?)\(/;
|
||||
var m = reName.exec(objectToString(object));
|
||||
var name = m ? m[1] : "function";
|
||||
html.push('<span class="objectBox-function">', escapeHTML(name), '()</span>');
|
||||
}
|
||||
|
||||
function appendObject(object, html)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (object == undefined)
|
||||
appendNull("undefined", html);
|
||||
else if (object == null)
|
||||
appendNull("null", html);
|
||||
else if (typeof object == "string")
|
||||
appendString(object, html);
|
||||
else if (typeof object == "number")
|
||||
appendInteger(object, html);
|
||||
else if (typeof object == "function")
|
||||
appendFunction(object, html);
|
||||
else if (object.nodeType == 1)
|
||||
appendSelector(object, html);
|
||||
else if (typeof object == "object")
|
||||
appendObjectFormatted(object, html);
|
||||
else
|
||||
appendText(object, html);
|
||||
}
|
||||
catch (exc)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
function appendObjectFormatted(object, html)
|
||||
{
|
||||
var text = objectToString(object);
|
||||
var reObject = /\[object (.*?)\]/;
|
||||
|
||||
var m = reObject.exec(text);
|
||||
html.push('<span class="objectBox-object">', m ? m[1] : text, '</span>')
|
||||
}
|
||||
|
||||
function appendSelector(object, html)
|
||||
{
|
||||
html.push('<span class="objectBox-selector">');
|
||||
|
||||
html.push('<span class="selectorTag">', escapeHTML(object.nodeName.toLowerCase()), '</span>');
|
||||
if (object.id)
|
||||
html.push('<span class="selectorId">#', escapeHTML(object.id), '</span>');
|
||||
if (object.className)
|
||||
html.push('<span class="selectorClass">.', escapeHTML(object.className), '</span>');
|
||||
|
||||
html.push('</span>');
|
||||
}
|
||||
|
||||
function appendNode(node, html)
|
||||
{
|
||||
if (node.nodeType == 1)
|
||||
{
|
||||
html.push(
|
||||
'<div class="objectBox-element">',
|
||||
'<<span class="nodeTag">', node.nodeName.toLowerCase(), '</span>');
|
||||
|
||||
for (var i = 0; i < node.attributes.length; ++i)
|
||||
{
|
||||
var attr = node.attributes[i];
|
||||
if (!attr.specified)
|
||||
continue;
|
||||
|
||||
html.push(' <span class="nodeName">', attr.nodeName.toLowerCase(),
|
||||
'</span>="<span class="nodeValue">', escapeHTML(attr.nodeValue),
|
||||
'</span>"')
|
||||
}
|
||||
|
||||
if (node.firstChild)
|
||||
{
|
||||
html.push('></div><div class="nodeChildren">');
|
||||
|
||||
for (var child = node.firstChild; child; child = child.nextSibling)
|
||||
appendNode(child, html);
|
||||
|
||||
html.push('</div><div class="objectBox-element"></<span class="nodeTag">',
|
||||
node.nodeName.toLowerCase(), '></span></div>');
|
||||
}
|
||||
else
|
||||
html.push('/></div>');
|
||||
}
|
||||
else if (node.nodeType == 3)
|
||||
{
|
||||
html.push('<div class="nodeText">', escapeHTML(node.nodeValue),
|
||||
'</div>');
|
||||
}
|
||||
}
|
||||
|
||||
// ********************************************************************************************
|
||||
|
||||
function addEvent(object, name, handler)
|
||||
{
|
||||
if (document.all)
|
||||
object.attachEvent("on"+name, handler);
|
||||
else
|
||||
object.addEventListener(name, handler, false);
|
||||
}
|
||||
|
||||
function removeEvent(object, name, handler)
|
||||
{
|
||||
if (document.all)
|
||||
object.detachEvent("on"+name, handler);
|
||||
else
|
||||
object.removeEventListener(name, handler, false);
|
||||
}
|
||||
|
||||
function cancelEvent(event)
|
||||
{
|
||||
if (document.all)
|
||||
event.cancelBubble = true;
|
||||
else
|
||||
event.stopPropagation();
|
||||
}
|
||||
|
||||
function onError(msg, href, lineNo)
|
||||
{
|
||||
var html = [];
|
||||
|
||||
var lastSlash = href.lastIndexOf("/");
|
||||
var fileName = lastSlash == -1 ? href : href.substr(lastSlash+1);
|
||||
|
||||
html.push(
|
||||
'<span class="errorMessage">', msg, '</span>',
|
||||
'<div class="objectBox-sourceLink">', fileName, ' (line ', lineNo, ')</div>'
|
||||
);
|
||||
|
||||
logRow(html, "error");
|
||||
};
|
||||
|
||||
function onKeyDown(event)
|
||||
{
|
||||
if (event.keyCode == 123)
|
||||
toggleConsole();
|
||||
else if ((event.keyCode == 108 || event.keyCode == 76) && event.shiftKey
|
||||
&& (event.metaKey || event.ctrlKey))
|
||||
focusCommandLine();
|
||||
else
|
||||
return;
|
||||
|
||||
cancelEvent(event);
|
||||
}
|
||||
|
||||
function onSplitterMouseDown(event)
|
||||
{
|
||||
if (isSafari || isOpera)
|
||||
return;
|
||||
|
||||
addEvent(document, "mousemove", onSplitterMouseMove);
|
||||
addEvent(document, "mouseup", onSplitterMouseUp);
|
||||
|
||||
for (var i = 0; i < frames.length; ++i)
|
||||
{
|
||||
addEvent(frames[i].document, "mousemove", onSplitterMouseMove);
|
||||
addEvent(frames[i].document, "mouseup", onSplitterMouseUp);
|
||||
}
|
||||
}
|
||||
|
||||
function onSplitterMouseMove(event)
|
||||
{
|
||||
var win = document.all
|
||||
? event.srcElement.ownerDocument.parentWindow
|
||||
: event.target.ownerDocument.defaultView;
|
||||
|
||||
var clientY = event.clientY;
|
||||
if (win != win.parent)
|
||||
clientY += win.frameElement ? win.frameElement.offsetTop : 0;
|
||||
|
||||
var height = consoleFrame.offsetTop + consoleFrame.clientHeight;
|
||||
var y = height - clientY;
|
||||
|
||||
consoleFrame.style.height = y + "px";
|
||||
layout();
|
||||
}
|
||||
|
||||
function onSplitterMouseUp(event)
|
||||
{
|
||||
removeEvent(document, "mousemove", onSplitterMouseMove);
|
||||
removeEvent(document, "mouseup", onSplitterMouseUp);
|
||||
|
||||
for (var i = 0; i < frames.length; ++i)
|
||||
{
|
||||
removeEvent(frames[i].document, "mousemove", onSplitterMouseMove);
|
||||
removeEvent(frames[i].document, "mouseup", onSplitterMouseUp);
|
||||
}
|
||||
}
|
||||
|
||||
function onCommandLineKeyDown(event)
|
||||
{
|
||||
if (event.keyCode == 13)
|
||||
evalCommandLine();
|
||||
else if (event.keyCode == 27)
|
||||
commandLine.value = "";
|
||||
}
|
||||
|
||||
window.onerror = onError;
|
||||
addEvent(document, isIE || isSafari ? "keydown" : "keypress", onKeyDown);
|
||||
|
||||
if (document.documentElement.getAttribute("debug") == "true")
|
||||
toggleConsole(true);
|
||||
})();
|
||||
}
|
||||
10
public/assets/plugins/jquery-validation/test/firebug/firebugx.js
vendored
Normal file
10
public/assets/plugins/jquery-validation/test/firebug/firebugx.js
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
if (!("console" in window) || !("firebug" in console))
|
||||
{
|
||||
var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
|
||||
"group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
|
||||
|
||||
window.console = {};
|
||||
for (var i = 0; i < names.length; ++i)
|
||||
window.console[names[i]] = function() {}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 524 B |
Binary file not shown.
|
After Width: | Height: | Size: 516 B |
376
public/assets/plugins/jquery-validation/test/index.html
Normal file
376
public/assets/plugins/jquery-validation/test/index.html
Normal file
@@ -0,0 +1,376 @@
|
||||
<!DOCTYPE html>
|
||||
<html id="html">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery - Validation Test Suite</title>
|
||||
<link rel="stylesheet" href="qunit/qunit.css" />
|
||||
<script src="jquery.js"></script>
|
||||
<script src="../lib/jquery.form.js"></script>
|
||||
<script src="qunit/qunit.js"></script>
|
||||
<script src="../lib/jquery.mockjax.js"></script>
|
||||
<script src="../dist/jquery.validate.js"></script>
|
||||
<script src="../dist/additional-methods.js"></script>
|
||||
<script src="test.js"></script>
|
||||
<script src="rules.js"></script>
|
||||
<script src="messages.js"></script>
|
||||
<script src="methods.js"></script>
|
||||
<script src="aria.js"></script>
|
||||
</head>
|
||||
<body id="body">
|
||||
<h1 id="qunit-header">
|
||||
<a href="http://bassistance.de/jquery-plugins/jquery-plugin-validation/">jQuery Validation Plugin</a> Test Suite
|
||||
<a href="?jquery=1.6.4">jQuery 1.6.4</a>
|
||||
<a href="?jquery=1.7.2">jQuery 1.7.2</a>
|
||||
<a href="?jquery=1.8.3">jQuery 1.8.3</a>
|
||||
<a href="?jquery=1.9.1">jQuery 1.9.1</a>
|
||||
<a href="?jquery=git">jQuery Latest (git)</a>
|
||||
</h1>
|
||||
<div>
|
||||
</div>
|
||||
<h2 id="qunit-banner"></h2>
|
||||
<div id="qunit-testrunner-toolbar"></div>
|
||||
<h2 id="qunit-userAgent"></h2>
|
||||
<ol id="qunit-tests"></ol>
|
||||
|
||||
<!-- Test HTML -->
|
||||
<div id="other" style="display:none;">
|
||||
<input type="password" name="pw1" id="pw1" value="engfeh" />
|
||||
<input type="password" name="pw2" id="pw2" value="" />
|
||||
</div>
|
||||
<div id="qunit-fixture">
|
||||
<p id="firstp">See <a id="simon1" href="http://simon.incutio.com/archive/2003/03/25/#getElementsBySelector" rel="bookmark">this blog entry</a> for more information.</p>
|
||||
<p id="ap">
|
||||
Here are some links in a normal paragraph: <a id="google" href="http://www.google.com/" title="Google!">Google</a>,
|
||||
<a id="groups" href="http://groups.google.com/">Google Groups</a>.
|
||||
This link has <code><a href="#" id="anchor1">class="blog"</a></code>:
|
||||
<a href="http://diveintomark.org/" class="blog" hreflang="en" id="mark">diveintomark</a>
|
||||
|
||||
</p>
|
||||
<div id="foo">
|
||||
<p id="sndp">Everything inside the red border is inside a div with <code>id="foo"</code>.</p>
|
||||
<p lang="en" id="en">This is a normal link: <a id="yahoo" href="http://www.yahoo.com/" class="blogTest">Yahoo</a></p>
|
||||
<p id="sap">This link has <code><a href="#2" id="anchor2">class="blog"</a></code>: <a href="http://simon.incutio.com/" class="blog link" id="simon">Simon Willison's Weblog</a></p>
|
||||
|
||||
</div>
|
||||
<p id="first">Try them out:</p>
|
||||
<ul id="firstUL"></ul>
|
||||
<ol id="empty"></ol>
|
||||
|
||||
<form id="testForm1">
|
||||
<input type="text" data-rule-required="true" data-rule-minlength="2" title="buga" name="firstname" id="firstname" />
|
||||
<label id="errorFirstname" for="firstname" class="error">error for firstname</label>
|
||||
<input type="text" data-rule-required="true" title="buga" name="lastname" id="lastname" />
|
||||
<input type="text" data-rule-required="true" title="something" name="something" id="something" value="something" />
|
||||
</form>
|
||||
|
||||
<form id="testForm1clean">
|
||||
<input title="buga" name="firstname" id="firstnamec" />
|
||||
<label id="errorFirstname" for="firstname" class="error">error for firstname</label>
|
||||
<input title="buga" name="lastname" id="lastnamec" />
|
||||
<input name="username" id="usernamec" />
|
||||
</form>
|
||||
|
||||
<form id="userForm">
|
||||
<input type="text" data-rule-required="true" name="username" id="username" />
|
||||
<input type="submit" name="submitButton" value="submitButtonValue" />
|
||||
</form>
|
||||
|
||||
<form id="signupForm" action="form.php">
|
||||
<input id="user" name="user" title="Please enter your username (at least 3 characters)" data-rule-required="true" data-rule-minlength="3" />
|
||||
<input type="password" name="password" id="password" data-rule-required="true" data-rule-minlength="5" />
|
||||
</form>
|
||||
|
||||
<form id="testForm2">
|
||||
<input data-rule-required="true" type="radio" name="agree" id="agb" />
|
||||
<label for="agree" id="agreeLabel" class="xerror">error for agb</label>
|
||||
</form>
|
||||
|
||||
<form id="testForm3">
|
||||
<select data-rule-required="true" name="meal" id="meal" >
|
||||
<option value="">Please select...</option>
|
||||
<option value="1">Food</option>
|
||||
<option value="2">Milk</option>
|
||||
</select>
|
||||
</form>
|
||||
<div class="error" id="errorContainer">
|
||||
<ul>
|
||||
<li class="error" id="errorWrapper">
|
||||
<label for="meal" id="mealLabel" class="error">error for meal</label>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<form id="testForm4">
|
||||
<input data-rule-foo="true" name="f1" id="f1" />
|
||||
<input data-rule-bar="true" name="f2" id="f2" />
|
||||
</form>
|
||||
|
||||
<form id="testForm5">
|
||||
<input data-rule-equalto="#x2" value="x" name="x1" id="x1" />
|
||||
<input data-rule-equalto="#x1" value="y" name="x2" id="x2" />
|
||||
</form>
|
||||
|
||||
<form id="testForm6">
|
||||
<input data-rule-required="true" data-rule-minlength="2" type="checkbox" name="check" id="form6check1" />
|
||||
<input type="checkbox" name="check" id="form6check2" />
|
||||
</form>
|
||||
|
||||
<form id="testForm7">
|
||||
<select data-rule-required="true" data-rule-minlength="2" name="selectf7" id="selectf7" multiple="multiple">
|
||||
<option id="optionxa" value="0">0</option>
|
||||
<option id="optionxb" value="1">1</option>
|
||||
<option id="optionxc" value="2">2</option>
|
||||
<option id="optionxd" value="3">3</option>
|
||||
</select>
|
||||
</form>
|
||||
|
||||
<form id="dateRangeForm">
|
||||
<input id="fromDate" name="fromDate" class="requiredDateRange" value="x" />
|
||||
<input id="toDate" name="toDate" class="requiredDateRange" value="y" />
|
||||
<span class="errorContainer"></span>
|
||||
</form>
|
||||
|
||||
<form id="testForm8">
|
||||
<input id="form8input" data-rule-required="true" data-rule-number="true" data-rule-rangelength="2,8" name="abc" />
|
||||
<input type="radio" name="radio1"/>
|
||||
</form>
|
||||
|
||||
<form id="testForm9">
|
||||
<input id="testEmail9" data-rule-required="true" data-rule-email="true" data-msg-required="required" data-msg-email="email" />
|
||||
<input id="testGeneric9" data-rule-required="true" data-rule-email="true" data-msg="generic" data-msg-email="email" />
|
||||
</form>
|
||||
|
||||
<form id="testForm10">
|
||||
<input type="radio" name="testForm10Radio" value="1" id="testForm10Radio1" />
|
||||
<input type="radio" name="testForm10Radio" value="2" id="testForm10Radio2" />
|
||||
</form>
|
||||
|
||||
<form id="testForm11">
|
||||
<!-- HTML5 -->
|
||||
<input required type="text" name="testForm11Text" id="testForm11text1" />
|
||||
</form>
|
||||
|
||||
<form id="testForm12">
|
||||
<!-- empty "type" attribute -->
|
||||
<input name="testForm12text" id="testForm12text" data-rule-required="true" />
|
||||
</form>
|
||||
|
||||
<form id="dataMessages">
|
||||
<input name="dataMessagesName" id="dataMessagesName" class="required" data-msg-required="You must enter a value here" />
|
||||
</form>
|
||||
|
||||
<div id="simplecontainer">
|
||||
<h3></h3>
|
||||
</div>
|
||||
|
||||
<div id="container" style="min-height:1px"></div>
|
||||
|
||||
<ol id="labelcontainer"></ol>
|
||||
|
||||
<form id="elementsOrder">
|
||||
<select class="required" name="order1" id="order1"><option value="">none</option></select>
|
||||
<input class="required" name="order2" id="order2"/>
|
||||
<input class="required" name="order3" type="checkbox" id="order3"/>
|
||||
<input class="required" name="order4" id="order4"/>
|
||||
<input class="required" name="order5" type="radio" id="order5"/>
|
||||
<input class="required" name="order6" id="order6"/>
|
||||
<ul id="orderContainer">
|
||||
</ul>
|
||||
</form>
|
||||
|
||||
<form id="form" action="formaction">
|
||||
<input type="text" name="action" value="Test" id="text1"/>
|
||||
<input type="text" name="text2" value=" " id="text1b"/>
|
||||
<input type="text" name="text2" value="T " id="text1c"/>
|
||||
<input type="text" name="text2" value="T" id="text2"/>
|
||||
<input type="text" name="text2" value="TestTestTest" id="text3"/>
|
||||
|
||||
<input type="text" name="action" value="0" id="value1"/>
|
||||
<input type="text" name="text2" value="10" id="value2"/>
|
||||
<input type="text" name="text2" value="1000" id="value3"/>
|
||||
|
||||
<input type="radio" name="radio1" id="radio1"/>
|
||||
<input type="radio" name="radio1" id="radio1a"/>
|
||||
<input type="radio" name="radio2" id="radio2" checked="checked"/>
|
||||
<input type="radio" name="radio" id="radio3"/>
|
||||
<input type="radio" name="radio" id="radio4" checked="checked"/>
|
||||
|
||||
<input type="checkbox" name="check" id="check1" checked="checked"/>
|
||||
<input type="checkbox" name="check" id="check1b" />
|
||||
|
||||
<input type="checkbox" name="check2" id="check2"/>
|
||||
|
||||
<input type="checkbox" name="check3" id="check3" checked="checked"/>
|
||||
<input type="checkbox" name="check3" checked="checked"/>
|
||||
<input type="checkbox" name="check3" checked="checked"/>
|
||||
<input type="checkbox" name="check3" checked="checked"/>
|
||||
<input type="checkbox" name="check3" checked="checked"/>
|
||||
|
||||
<input type="hidden" name="hidden" id="hidden1"/>
|
||||
<input type="text" style="display:none;" name="foo[bar]" id="hidden2"/>
|
||||
|
||||
<input type="text" readonly="readonly" id="name" name="name" value="name" />
|
||||
|
||||
<button name="button">Button</button>
|
||||
|
||||
<textarea id="area1" name="area1">foobar</textarea>
|
||||
|
||||
|
||||
<textarea id="area2" name="area2"></textarea>
|
||||
|
||||
<select name="select1" id="select1">
|
||||
<option id="option1a" value="">Nothing</option>
|
||||
<option id="option1b" value="1">1</option>
|
||||
<option id="option1c" value="2">2</option>
|
||||
<option id="option1d" value="3">3</option>
|
||||
</select>
|
||||
<select name="select2" id="select2">
|
||||
<option id="option2a" value="">Nothing</option>
|
||||
<option id="option2b" value="1">1</option>
|
||||
<option id="option2c" value="2">2</option>
|
||||
<option id="option2d" selected="selected" value="3">3</option>
|
||||
</select>
|
||||
<select name="select3" id="select3" multiple="multiple">
|
||||
<option id="option3a" value="">Nothing</option>
|
||||
<option id="option3b" selected="selected" value="1">1</option>
|
||||
<option id="option3c" selected="selected" value="2">2</option>
|
||||
<option id="option3d" value="3">3</option>
|
||||
</select>
|
||||
<select name="select4" id="select4" multiple="multiple">
|
||||
<option id="option4a" selected="selected" value="1">1</option>
|
||||
<option id="option4b" selected="selected" value="2">2</option>
|
||||
<option id="option4c" selected="selected" value="3">3</option>
|
||||
<option id="option4d" selected="selected" value="4">4</option>
|
||||
<option id="option4e" selected="selected" value="5">5</option>
|
||||
</select>
|
||||
<select name="select5" id="select5" multiple="multiple">
|
||||
<option id="option5a" value="0">0</option>
|
||||
<option id="option5b" value="1">1</option>
|
||||
<option id="option5c" value="2">2</option>
|
||||
<option id="option5d" value="3">3</option>
|
||||
</select>
|
||||
</form>
|
||||
|
||||
<form id="v2">
|
||||
<input id="v2-i1" name="v2-i1" class="required" />
|
||||
<input id="v2-i2" name="v2-i2" class="required email" />
|
||||
<input id="v2-i3" name="v2-i3" class="url" />
|
||||
<input id="v2-i4" name="v2-i4" class="required" minlength="2" />
|
||||
<input id="v2-i5" name="v2-i5" class="required" minlength="2" maxlength="5" customMethod1="123" />
|
||||
<input id="v2-i6" name="v2-i6" class="required customMethod2" data-rule-maxlength="5" data-rule-minlength="2" />
|
||||
<input id="v2-i7" name="v2-i7" />
|
||||
</form>
|
||||
|
||||
<form id="checkables">
|
||||
<input type="checkbox" id="checkable1" name="checkablesgroup" class="required" />
|
||||
<input type="checkbox" id="checkable2" name="checkablesgroup" />
|
||||
<input type="checkbox" id="checkable3" name="checkablesgroup" />
|
||||
</form>
|
||||
|
||||
<form id="subformRequired">
|
||||
<div class="billingAddressControl">
|
||||
<input type="checkbox" id="bill_to_co" name="bill_to_co" class="toggleCheck" checked="checked" style="width: auto;" tabindex="1" />
|
||||
<label for="bill_to_co" style="cursor:pointer">Same as Company Address</label>
|
||||
</div>
|
||||
<div id="subform">
|
||||
<input maxlength="40" class="billingRequired" name="bill_first_name" size="20" type="text" tabindex="2" value="" />
|
||||
</div>
|
||||
<input id="co_name" class="required" maxlength="40" name="co_name" size="20" type="text" tabindex="1" value="" />
|
||||
</form>
|
||||
|
||||
<form id="withTitle">
|
||||
<input class="required" name="hastitle" type="text" title="fromtitle" />
|
||||
</form>
|
||||
|
||||
<form id="ccform" method="get">
|
||||
<input id="cardnumber" name="cardnumber" />
|
||||
</form>
|
||||
|
||||
<form id="productInfo">
|
||||
<input class="productInfo" name="partnumber">
|
||||
<input class="productInfo" name="description">
|
||||
<input class="productInfo" name="color">
|
||||
<input name="supplier">
|
||||
<input class="productInfo" type="checkbox" name="discount" />
|
||||
</form>
|
||||
|
||||
<form id="updateLabel">
|
||||
<input class="required" name="updateLabelInput" id="updateLabelInput" data-msg-required="You must enter a value here" />
|
||||
<label id="targetLabel" class="error" for="updateLabelInput">Some server-side error</label>
|
||||
</form>
|
||||
|
||||
<form id="rangesMinDateInvalid">
|
||||
<input type="date" id="minDateInvalid" name="minDateInvalid" min="2012-12-21" value="2012-11-21"/>
|
||||
</form>
|
||||
<form id="ranges">
|
||||
<input type="date" id="maxDateInvalid" name="maxDateInvalid" max="2012-12-21" value="2013-01-21"/>
|
||||
<input type="date" id="rangeDateInvalidGreater" name="rangeDateInvalidGreater" min="2012-11-21" max="2013-01-21" value="2013-02-21"/>
|
||||
<input type="date" id="rangeDateInvalidLess" name="rangeDateInvalidLess" min="2012-11-21" max="2013-01-21" value="2012-10-21"/>
|
||||
|
||||
<input type="date" id="maxDateValid" name="maxDateValid" max="2013-01-21" value="2012-12-21"/>
|
||||
<input type="date" id="rangeDateValid" name="rangeDateValid" min="2012-11-21" max="2013-01-21" value="2012-12-21"/>
|
||||
|
||||
<!-- input type text is not supposed to have min/max according to html5,
|
||||
but for backward compatibility with 1.10.0 we treat it as number.
|
||||
you can also use type="number", in which case the browser may also
|
||||
do validation, and mobile browsers may offer a numeric keypad to edit
|
||||
the value.
|
||||
Type absent is treated like type="text".
|
||||
-->
|
||||
<input type="text" id="rangeTextInvalidGreater" name="rangeTextInvalidGreater" min="50" max="200" value="1000"/>
|
||||
<input type="text" id="rangeTextInvalidLess" name="rangeTextInvalidLess" min="200" max="1000" value="50"/>
|
||||
<input id="rangeAbsentInvalidGreater" name="rangeAbsentInvalidGreater" min="50" max="200" value="1000"/>
|
||||
<input id="rangeAbsentInvalidLess" name="rangeAbsentInvalidLess" min="200" max="1000" value="50"/>
|
||||
|
||||
<input type="text" id="rangeTextValid" name="rangeTextValid" min="50" max="1000" value="200"/>
|
||||
<input id="rangeAbsentValid" name="rangeAbsentValid" min="50" max="1000" value="200"/>
|
||||
|
||||
<!-- ranges are like numbers in html5, except that browser is not required
|
||||
to demand an exact value. User interface could be a slider.
|
||||
-->
|
||||
<input type="range" id="rangeRangeValid" name="rangeRangeValid" min="50" max="1000" value="200"/>
|
||||
|
||||
<input type="number" id="rangeNumberValid" name="rangeNumberValid" min="50" max="1000" value="200"/>
|
||||
<input type="number" id="rangeNumberInvalidGreater" name="rangeNumberInvalidGreater" min="50" max="200" value="1000"/>
|
||||
<input type="number" id="rangeNumberInvalidLess" name="rangeNumberInvalidLess" min="50" max="200" value="6"/>
|
||||
|
||||
<input type="number" id="rangeMinZeroInvalidLess" name="rangeMinZeroInvalidLess" min="0" value="-1"/>
|
||||
<input type="number" id="rangeMinZeroValidEqual" name="rangeMinZeroValidEqual" min="0" value="0"/>
|
||||
<input type="number" id="rangeMinZeroValidGreater" name="rangeMinZeroValidGreater" min="0" value="1"/>
|
||||
|
||||
</form>
|
||||
<form id="rangeMinDateValid">
|
||||
<input type="date" id="minDateValid" name="minDateValid" min="2012-11-21" value="2012-12-21"/>
|
||||
</form>
|
||||
|
||||
<form id="bypassValidation">
|
||||
<input type="text" name="bypassValidationRequiredInput" required/>
|
||||
<input id="normalSubmit" type="submit" value="submit"/>
|
||||
<input id="bypassSubmitWithCancel" type="submit" class="cancel" value="bypass1"/>
|
||||
<input id="bypassSubmitWithNoValidate1" type="submit" formnovalidate value="bypass1"/>
|
||||
<input id="bypassSubmitWithNoValidate2" type="submit" formnovalidate="formnovalidate" value="bypass2"/>
|
||||
</form>
|
||||
|
||||
<form id="ariaInvalid">
|
||||
<input type="text" name="ariaInvalidFirstName" id="ariaInvalidFirstName" />
|
||||
</form>
|
||||
|
||||
<form id="ariaRequired">
|
||||
<input type="text" name="ariaRequiredDynamic" id="ariaRequiredDynamic" />
|
||||
<input type="text" name="ariaRequiredStatic" id="ariaRequiredStatic" required="" />
|
||||
<input type="text" name="ariaRequiredData" id="ariaRequiredData" data-rule-required="true" />
|
||||
<input type="text" name="ariaRequiredClass" id="ariaRequiredClass" class="required" />
|
||||
</form>
|
||||
|
||||
<form id="ignoredElements">
|
||||
<select id="ss1" class="ignore">
|
||||
<option value="1">option 1</option>
|
||||
<option value="2">option 2</option>
|
||||
</select>
|
||||
<br />
|
||||
<input name="test" class="required" value=""/>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
25
public/assets/plugins/jquery-validation/test/jquery.js
vendored
Normal file
25
public/assets/plugins/jquery-validation/test/jquery.js
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
(function() {
|
||||
|
||||
var parts = document.location.search.slice( 1 ).split( "&" ),
|
||||
length = parts.length,
|
||||
i = 0,
|
||||
current,
|
||||
version = "1.9.1",
|
||||
file = "http://code.jquery.com/jquery-git.js";
|
||||
|
||||
for ( ; i < length; i++ ) {
|
||||
current = parts[ i ].split( "=" );
|
||||
if ( current[ 0 ] === "jquery" ) {
|
||||
version = current[ 1 ];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (version !== "git") {
|
||||
file = "../lib/jquery-" + version + ".js";
|
||||
}
|
||||
|
||||
//jshint -W060
|
||||
document.write( "<script src='" + file + "'></script>" );
|
||||
|
||||
})();
|
||||
188
public/assets/plugins/jquery-validation/test/large.html
Normal file
188
public/assets/plugins/jquery-validation/test/large.html
Normal file
@@ -0,0 +1,188 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
||||
<title>Test for jQuery validate() plugin</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="css/screen.css" />
|
||||
<script src="../lib/jquery.js" type="text/javascript"></script>
|
||||
<script src="../lib/jquery.metadata.js" type="text/javascript"></script>
|
||||
<script src="../lib/jquery.ajaxQueue.js" type="text/javascript"></script>
|
||||
<script src="../dist/jquery.validate.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$().ready(function() {
|
||||
$("#commentForm").validate();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style type="text/css">
|
||||
#commentForm { width: 500px; }
|
||||
#commentForm label { width: 250px; display: block; float: left; }
|
||||
#commentForm label.error, #commentForm input.submit { margin-left: 253px; }
|
||||
.focus { background-color: red; }
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<form class="cmxform" id="commentForm" method="get" action="">
|
||||
<fieldset>
|
||||
<legend>A simple comment form with submit validation and default messages</legend>
|
||||
<p>
|
||||
<label for="cname-x0">Name (required, at least 2 characters)</label>
|
||||
<input id="cname-x0" name="name-x0" class="some other styles {required:true,minLength:2}" />
|
||||
<p>
|
||||
<label for="cemail-x0">E-Mail (required)</label>
|
||||
<input id="cemail-x0" name="email-x0" class="{required:true,email:true}" />
|
||||
</p>
|
||||
<p>
|
||||
<label for="curl-x0">URL (optional)</label>
|
||||
<input id="curl-x0" name="url-x0" class="{url:true}" value="" />
|
||||
</p>
|
||||
<p>
|
||||
<label for="ccomment-x0">Your comment (required)</label>
|
||||
<textarea id="ccomment-x0" name="comment-x0" class="{required:true}"></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<label for="cname-x1">Name (required, at least 2 characters)</label>
|
||||
<input class="some other styles {required:true,minLength:2}" name="name-x1" id="cname-x1"/>
|
||||
</p><p>
|
||||
<label for="cemail-x1">E-Mail (required)</label>
|
||||
<input class="{required:true,email:true}" name="email-x1" id="cemail-x1"/>
|
||||
</p>
|
||||
<p>
|
||||
<label for="curl-x1">URL (optional)</label>
|
||||
<input value="" class="{url:true}" name="url-x1" id="curl-x1"/>
|
||||
</p>
|
||||
<p>
|
||||
<label for="ccomment-x1">Your comment (required)</label>
|
||||
<textarea class="{required:true}" name="comment-x1" id="ccomment-x1"></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<label for="cname-x2">Name (required, at least 2 characters)</label>
|
||||
<input class="some other styles {required:true,minLength:2}" name="name-x2" id="cname-x2"/>
|
||||
</p><p>
|
||||
<label for="cemail-x2">E-Mail (required)</label>
|
||||
<input class="{required:true,email:true}" name="email-x2" id="cemail-x2"/>
|
||||
</p>
|
||||
<p>
|
||||
<label for="curl-x2">URL (optional)</label>
|
||||
<input value="" class="{url:true}" name="url-x2" id="curl-x2"/>
|
||||
</p>
|
||||
<p>
|
||||
<label for="ccomment-x2">Your comment (required)</label>
|
||||
<textarea class="{required:true}" name="comment-x2" id="ccomment-x2"></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<label for="cname-x3">Name (required, at least 2 characters)</label>
|
||||
<input class="some other styles {required:true,minLength:2}" name="name-x3" id="cname-x3"/>
|
||||
</p><p>
|
||||
<label for="cemail-x3">E-Mail (required)</label>
|
||||
<input class="{required:true,email:true}" name="email-x3" id="cemail-x3"/>
|
||||
</p>
|
||||
<p>
|
||||
<label for="curl-x3">URL (optional)</label>
|
||||
<input value="" class="{url:true}" name="url-x3" id="curl-x3"/>
|
||||
</p>
|
||||
<p>
|
||||
<label for="ccomment-x3">Your comment (required)</label>
|
||||
<textarea class="{required:true}" name="comment-x3" id="ccomment-x3"></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<label for="cname-x4">Name (required, at least 2 characters)</label>
|
||||
<input class="some other styles {required:true,minLength:2}" name="name-x4" id="cname-x4"/>
|
||||
</p><p>
|
||||
<label for="cemail-x4">E-Mail (required)</label>
|
||||
<input class="{required:true,email:true}" name="email-x4" id="cemail-x4"/>
|
||||
</p>
|
||||
<p>
|
||||
<label for="curl-x4">URL (optional)</label>
|
||||
<input value="" class="{url:true}" name="url-x4" id="curl-x4"/>
|
||||
</p>
|
||||
<p>
|
||||
<label for="ccomment-x4">Your comment (required)</label>
|
||||
<textarea class="{required:true}" name="comment-x4" id="ccomment-x4"></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<label for="cname-x5">Name (required, at least 2 characters)</label>
|
||||
<input class="some other styles {required:true,minLength:2}" name="name-x5" id="cname-x5"/>
|
||||
</p><p>
|
||||
<label for="cemail-x5">E-Mail (required)</label>
|
||||
<input class="{required:true,email:true}" name="email-x5" id="cemail-x5"/>
|
||||
</p>
|
||||
<p>
|
||||
<label for="curl-x5">URL (optional)</label>
|
||||
<input value="" class="{url:true}" name="url-x5" id="curl-x5"/>
|
||||
</p>
|
||||
<p>
|
||||
<label for="ccomment-x5">Your comment (required)</label>
|
||||
<textarea class="{required:true}" name="comment-x5" id="ccomment-x5"></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<label for="cname-x6">Name (required, at least 2 characters)</label>
|
||||
<input class="some other styles {required:true,minLength:2}" name="name-x6" id="cname-x6"/>
|
||||
</p><p>
|
||||
<label for="cemail-x6">E-Mail (required)</label>
|
||||
<input class="{required:true,email:true}" name="email-x6" id="cemail-x6"/>
|
||||
</p>
|
||||
<p>
|
||||
<label for="curl-x6">URL (optional)</label>
|
||||
<input value="" class="{url:true}" name="url-x6" id="curl-x6"/>
|
||||
</p>
|
||||
<p>
|
||||
<label for="ccomment-x6">Your comment (required)</label>
|
||||
<textarea class="{required:true}" name="comment-x6" id="ccomment-x6"></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<label for="cname-x7">Name (required, at least 2 characters)</label>
|
||||
<input class="some other styles {required:true,minLength:2}" name="name-x7" id="cname-x7"/>
|
||||
</p><p>
|
||||
<label for="cemail-x7">E-Mail (required)</label>
|
||||
<input class="{required:true,email:true}" name="email-x7" id="cemail-x7"/>
|
||||
</p>
|
||||
<p>
|
||||
<label for="curl-x7">URL (optional)</label>
|
||||
<input value="" class="{url:true}" name="url-x7" id="curl-x7"/>
|
||||
</p>
|
||||
<p>
|
||||
<label for="ccomment-x7">Your comment (required)</label>
|
||||
<textarea class="{required:true}" name="comment-x7" id="ccomment-x7"></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<label for="cname-x8">Name (required, at least 2 characters)</label>
|
||||
<input class="some other styles {required:true,minLength:2}" name="name-x8" id="cname-x8"/>
|
||||
</p><p>
|
||||
<label for="cemail-x8">E-Mail (required)</label>
|
||||
<input class="{required:true,email:true}" name="email-x8" id="cemail-x8"/>
|
||||
</p>
|
||||
<p>
|
||||
<label for="curl-x8">URL (optional)</label>
|
||||
<input value="" class="{url:true}" name="url-x8" id="curl-x8"/>
|
||||
</p>
|
||||
<p>
|
||||
<label for="ccomment-x8">Your comment (required)</label>
|
||||
<textarea class="{required:true}" name="comment-x8" id="ccomment-x8"></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<label for="cname-x9">Name (required, at least 2 characters)</label>
|
||||
<input class="some other styles {required:true,minLength:2}" name="name-x9" id="cname-x9"/>
|
||||
</p><p>
|
||||
<label for="cemail-x9">E-Mail (required)</label>
|
||||
<input class="{required:true,email:true}" name="email-x9" id="cemail-x9"/>
|
||||
</p>
|
||||
<p>
|
||||
<label for="curl-x9">URL (optional)</label>
|
||||
<input value="" class="{url:true}" name="url-x9" id="curl-x9"/>
|
||||
</p>
|
||||
<p>
|
||||
<label for="ccomment-x9">Your comment (required)</label>
|
||||
<textarea class="{required:true}" name="comment-x9" id="ccomment-x9"></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<input class="submit" type="submit" value="Submit"/>
|
||||
</p>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
70
public/assets/plugins/jquery-validation/test/messages.js
vendored
Normal file
70
public/assets/plugins/jquery-validation/test/messages.js
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
module("messages");
|
||||
|
||||
test("predefined message not overwritten by addMethod(a, b, undefined)", function() {
|
||||
var message = "my custom message";
|
||||
$.validator.messages.custom = message;
|
||||
$.validator.addMethod("custom", function() {});
|
||||
deepEqual(message, $.validator.messages.custom);
|
||||
delete $.validator.messages.custom;
|
||||
delete $.validator.methods.custom;
|
||||
});
|
||||
|
||||
test("group error messages", function() {
|
||||
$.validator.addClassRules({
|
||||
requiredDateRange: {required:true, date:true, dateRange:true}
|
||||
});
|
||||
$.validator.addMethod("dateRange", function() {
|
||||
return new Date($("#fromDate").val()) < new Date($("#toDate").val());
|
||||
}, "Please specify a correct date range.");
|
||||
var form = $("#dateRangeForm");
|
||||
form.validate({
|
||||
groups: {
|
||||
dateRange: "fromDate toDate"
|
||||
},
|
||||
errorPlacement: function(error) {
|
||||
form.find(".errorContainer").append(error);
|
||||
}
|
||||
});
|
||||
ok( !form.valid() );
|
||||
equal( 1, form.find(".errorContainer *").length );
|
||||
equal( "Please enter a valid date.", form.find(".errorContainer label.error").text() );
|
||||
|
||||
$("#fromDate").val("12/03/2006");
|
||||
$("#toDate").val("12/01/2006");
|
||||
ok( !form.valid() );
|
||||
equal( "Please specify a correct date range.", form.find(".errorContainer label.error").text() );
|
||||
|
||||
$("#toDate").val("12/04/2006");
|
||||
ok( form.valid() );
|
||||
ok( form.find(".errorContainer label.error").is(":hidden") );
|
||||
});
|
||||
|
||||
test("read messages from metadata", function() {
|
||||
var form = $("#testForm9"),
|
||||
e, g;
|
||||
|
||||
form.validate();
|
||||
e = $("#testEmail9");
|
||||
e.valid();
|
||||
equal( form.find("label[for=testEmail9]").text(), "required" );
|
||||
e.val("bla").valid();
|
||||
equal( form.find("label[for=testEmail9]").text(), "email" );
|
||||
|
||||
g = $("#testGeneric9");
|
||||
g.valid();
|
||||
equal( form.find("label[for=testGeneric9]").text(), "generic");
|
||||
g.val("bla").valid();
|
||||
equal( form.find("label[for=testGeneric9]").text(), "email" );
|
||||
});
|
||||
|
||||
|
||||
test("read messages from metadata, with meta option specified, but no metadata in there", function() {
|
||||
var form = $("#testForm1clean");
|
||||
form.validate({
|
||||
meta: "validate",
|
||||
rules: {
|
||||
firstname: "required"
|
||||
}
|
||||
});
|
||||
ok(!form.valid(), "not valid");
|
||||
});
|
||||
1214
public/assets/plugins/jquery-validation/test/methods.js
vendored
Normal file
1214
public/assets/plugins/jquery-validation/test/methods.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
244
public/assets/plugins/jquery-validation/test/qunit/qunit.css
Normal file
244
public/assets/plugins/jquery-validation/test/qunit/qunit.css
Normal file
@@ -0,0 +1,244 @@
|
||||
/**
|
||||
* QUnit v1.11.0 - A JavaScript Unit Testing Framework
|
||||
*
|
||||
* http://qunitjs.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*/
|
||||
|
||||
/** Font Family and Sizes */
|
||||
|
||||
#qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult {
|
||||
font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
#qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }
|
||||
#qunit-tests { font-size: smaller; }
|
||||
|
||||
|
||||
/** Resets */
|
||||
|
||||
#qunit-tests, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult, #qunit-modulefilter {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
||||
/** Header */
|
||||
|
||||
#qunit-header {
|
||||
padding: 0.5em 0 0.5em 1em;
|
||||
|
||||
color: #8699a4;
|
||||
background-color: #0d3349;
|
||||
|
||||
font-size: 1.5em;
|
||||
line-height: 1em;
|
||||
font-weight: normal;
|
||||
|
||||
border-radius: 5px 5px 0 0;
|
||||
-moz-border-radius: 5px 5px 0 0;
|
||||
-webkit-border-top-right-radius: 5px;
|
||||
-webkit-border-top-left-radius: 5px;
|
||||
}
|
||||
|
||||
#qunit-header a {
|
||||
text-decoration: none;
|
||||
color: #c2ccd1;
|
||||
}
|
||||
|
||||
#qunit-header a:hover,
|
||||
#qunit-header a:focus {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#qunit-testrunner-toolbar label {
|
||||
display: inline-block;
|
||||
padding: 0 .5em 0 .1em;
|
||||
}
|
||||
|
||||
#qunit-banner {
|
||||
height: 5px;
|
||||
}
|
||||
|
||||
#qunit-testrunner-toolbar {
|
||||
padding: 0.5em 0 0.5em 2em;
|
||||
color: #5E740B;
|
||||
background-color: #eee;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#qunit-userAgent {
|
||||
padding: 0.5em 0 0.5em 2.5em;
|
||||
background-color: #2b81af;
|
||||
color: #fff;
|
||||
text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-container {
|
||||
float: right;
|
||||
}
|
||||
|
||||
/** Tests: Pass/Fail */
|
||||
|
||||
#qunit-tests {
|
||||
list-style-position: inside;
|
||||
}
|
||||
|
||||
#qunit-tests li {
|
||||
padding: 0.4em 0.5em 0.4em 2.5em;
|
||||
border-bottom: 1px solid #fff;
|
||||
list-style-position: inside;
|
||||
}
|
||||
|
||||
#qunit-tests.hidepass li.pass, #qunit-tests.hidepass li.running {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#qunit-tests li strong {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#qunit-tests li a {
|
||||
padding: 0.5em;
|
||||
color: #c2ccd1;
|
||||
text-decoration: none;
|
||||
}
|
||||
#qunit-tests li a:hover,
|
||||
#qunit-tests li a:focus {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
#qunit-tests li .runtime {
|
||||
float: right;
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
.qunit-assert-list {
|
||||
margin-top: 0.5em;
|
||||
padding: 0.5em;
|
||||
|
||||
background-color: #fff;
|
||||
|
||||
border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
}
|
||||
|
||||
.qunit-collapsed {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#qunit-tests table {
|
||||
border-collapse: collapse;
|
||||
margin-top: .2em;
|
||||
}
|
||||
|
||||
#qunit-tests th {
|
||||
text-align: right;
|
||||
vertical-align: top;
|
||||
padding: 0 .5em 0 0;
|
||||
}
|
||||
|
||||
#qunit-tests td {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
#qunit-tests pre {
|
||||
margin: 0;
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
#qunit-tests del {
|
||||
background-color: #e0f2be;
|
||||
color: #374e0c;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#qunit-tests ins {
|
||||
background-color: #ffcaca;
|
||||
color: #500;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/*** Test Counts */
|
||||
|
||||
#qunit-tests b.counts { color: black; }
|
||||
#qunit-tests b.passed { color: #5E740B; }
|
||||
#qunit-tests b.failed { color: #710909; }
|
||||
|
||||
#qunit-tests li li {
|
||||
padding: 5px;
|
||||
background-color: #fff;
|
||||
border-bottom: none;
|
||||
list-style-position: inside;
|
||||
}
|
||||
|
||||
/*** Passing Styles */
|
||||
|
||||
#qunit-tests li li.pass {
|
||||
color: #3c510c;
|
||||
background-color: #fff;
|
||||
border-left: 10px solid #C6E746;
|
||||
}
|
||||
|
||||
#qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; }
|
||||
#qunit-tests .pass .test-name { color: #366097; }
|
||||
|
||||
#qunit-tests .pass .test-actual,
|
||||
#qunit-tests .pass .test-expected { color: #999999; }
|
||||
|
||||
#qunit-banner.qunit-pass { background-color: #C6E746; }
|
||||
|
||||
/*** Failing Styles */
|
||||
|
||||
#qunit-tests li li.fail {
|
||||
color: #710909;
|
||||
background-color: #fff;
|
||||
border-left: 10px solid #EE5757;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
#qunit-tests > li:last-child {
|
||||
border-radius: 0 0 5px 5px;
|
||||
-moz-border-radius: 0 0 5px 5px;
|
||||
-webkit-border-bottom-right-radius: 5px;
|
||||
-webkit-border-bottom-left-radius: 5px;
|
||||
}
|
||||
|
||||
#qunit-tests .fail { color: #000000; background-color: #EE5757; }
|
||||
#qunit-tests .fail .test-name,
|
||||
#qunit-tests .fail .module-name { color: #000000; }
|
||||
|
||||
#qunit-tests .fail .test-actual { color: #EE5757; }
|
||||
#qunit-tests .fail .test-expected { color: green; }
|
||||
|
||||
#qunit-banner.qunit-fail { background-color: #EE5757; }
|
||||
|
||||
|
||||
/** Result */
|
||||
|
||||
#qunit-testresult {
|
||||
padding: 0.5em 0.5em 0.5em 2.5em;
|
||||
|
||||
color: #2b81af;
|
||||
background-color: #D2E0E6;
|
||||
|
||||
border-bottom: 1px solid white;
|
||||
}
|
||||
#qunit-testresult .module-name {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/** Fixture */
|
||||
|
||||
#qunit-fixture {
|
||||
position: absolute;
|
||||
top: -10000px;
|
||||
left: -10000px;
|
||||
width: 1000px;
|
||||
height: 1000px;
|
||||
}
|
||||
2152
public/assets/plugins/jquery-validation/test/qunit/qunit.js
vendored
Normal file
2152
public/assets/plugins/jquery-validation/test/qunit/qunit.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
298
public/assets/plugins/jquery-validation/test/rules.js
vendored
Normal file
298
public/assets/plugins/jquery-validation/test/rules.js
vendored
Normal file
@@ -0,0 +1,298 @@
|
||||
module("rules");
|
||||
|
||||
test("rules() - internal - input", function() {
|
||||
var element = $("#firstname");
|
||||
|
||||
$("#testForm1").validate();
|
||||
|
||||
deepEqual( element.rules(), { required: true, minlength: 2 } );
|
||||
});
|
||||
|
||||
test("rules(), ignore method:false", function() {
|
||||
var element = $("#firstnamec");
|
||||
|
||||
$("#testForm1clean").validate({
|
||||
rules: {
|
||||
firstname: { required: false, minlength: 2 }
|
||||
}
|
||||
});
|
||||
|
||||
deepEqual( element.rules(), { minlength: 2 } );
|
||||
});
|
||||
|
||||
test("rules() HTML5 required (no value)", function() {
|
||||
var element = $("#testForm11text1");
|
||||
|
||||
$("#testForm11").validate();
|
||||
|
||||
deepEqual( element.rules(), { required: true } );
|
||||
});
|
||||
|
||||
test("rules() - internal - select", function() {
|
||||
var element = $("#meal");
|
||||
|
||||
$("#testForm3").validate();
|
||||
|
||||
deepEqual( element.rules(), {required: true} );
|
||||
});
|
||||
|
||||
test("rules() - external", function() {
|
||||
var element = $("#text1");
|
||||
|
||||
$("#form").validate({
|
||||
rules: {
|
||||
action: {date: true, min: 5}
|
||||
}
|
||||
});
|
||||
|
||||
deepEqual( element.rules(), {date: true, min: 5} );
|
||||
});
|
||||
|
||||
test("rules() - external - complete form", function() {
|
||||
expect(1);
|
||||
|
||||
var methods = $.extend({}, $.validator.methods),
|
||||
messages = $.extend({}, $.validator.messages),
|
||||
v;
|
||||
|
||||
$.validator.addMethod("verifyTest", function() {
|
||||
ok( true, "method executed" );
|
||||
return true;
|
||||
});
|
||||
v = $("#form").validate({
|
||||
rules: {
|
||||
action: {verifyTest: true}
|
||||
}
|
||||
});
|
||||
v.form();
|
||||
|
||||
$.validator.methods = methods;
|
||||
$.validator.messages = messages;
|
||||
});
|
||||
|
||||
test("rules() - internal - input", function() {
|
||||
var element = $("#form8input");
|
||||
|
||||
$("#testForm8").validate();
|
||||
|
||||
deepEqual( element.rules(), {required: true, number: true, rangelength: [2, 8]});
|
||||
});
|
||||
|
||||
test("rules(), merge min/max to range, minlength/maxlength to rangelength", function() {
|
||||
jQuery.validator.autoCreateRanges = true;
|
||||
|
||||
$("#testForm1clean").validate({
|
||||
rules: {
|
||||
firstname: {
|
||||
min: 5,
|
||||
max: 12
|
||||
},
|
||||
lastname: {
|
||||
minlength: 2,
|
||||
maxlength: 8
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
deepEqual( $("#firstnamec").rules(), {range: [5, 12]});
|
||||
|
||||
deepEqual( $("#lastnamec").rules(), {rangelength: [2, 8]} );
|
||||
jQuery.validator.autoCreateRanges = false;
|
||||
});
|
||||
|
||||
test("rules(), guarantee that required is at front", function() {
|
||||
$("#testForm1").validate();
|
||||
var v = $("#v2").validate();
|
||||
$("#subformRequired").validate();
|
||||
function flatRules(element) {
|
||||
var result = [];
|
||||
jQuery.each($(element).rules(), function(key) { result.push(key); });
|
||||
return result.join(" ");
|
||||
}
|
||||
equal( "required minlength", flatRules("#firstname") );
|
||||
equal( "required minlength maxlength", flatRules("#v2-i6") );
|
||||
equal( "required maxlength", flatRules("#co_name") );
|
||||
|
||||
QUnit.reset();
|
||||
jQuery.validator.autoCreateRanges = true;
|
||||
v = $("#v2").validate();
|
||||
equal( "required rangelength", flatRules("#v2-i6") );
|
||||
|
||||
$("#subformRequired").validate({
|
||||
rules: {
|
||||
co_name: "required"
|
||||
}
|
||||
});
|
||||
$("#co_name").removeClass();
|
||||
equal( "required maxlength", flatRules("#co_name") );
|
||||
jQuery.validator.autoCreateRanges = false;
|
||||
});
|
||||
|
||||
test("rules(), evaluate dynamic parameters", function() {
|
||||
expect(2);
|
||||
|
||||
$("#testForm1clean").validate({
|
||||
rules: {
|
||||
firstname: {
|
||||
min: function(element) {
|
||||
equal( $("#firstnamec")[0], element );
|
||||
return 12;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
deepEqual( $("#firstnamec").rules(), {min:12});
|
||||
});
|
||||
|
||||
test("rules(), class and attribute combinations", function() {
|
||||
|
||||
$.validator.addMethod("customMethod1", function() {
|
||||
return false;
|
||||
}, "");
|
||||
$.validator.addMethod("customMethod2", function() {
|
||||
return false;
|
||||
}, "");
|
||||
|
||||
$("#v2").validate({
|
||||
rules: {
|
||||
"v2-i7": {
|
||||
required: true,
|
||||
minlength: 2,
|
||||
customMethod: true
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
deepEqual( $("#v2-i1").rules(), { required: true });
|
||||
deepEqual( $("#v2-i2").rules(), { required: true, email: true });
|
||||
deepEqual( $("#v2-i3").rules(), { url: true });
|
||||
deepEqual( $("#v2-i4").rules(), { required: true, minlength: 2 });
|
||||
deepEqual( $("#v2-i5").rules(), { required: true, minlength: 2, maxlength: 5, customMethod1: "123" });
|
||||
jQuery.validator.autoCreateRanges = true;
|
||||
deepEqual( $("#v2-i5").rules(), { required: true, customMethod1: "123", rangelength: [2, 5] });
|
||||
deepEqual( $("#v2-i6").rules(), { required: true, customMethod2: true, rangelength: [2, 5] });
|
||||
jQuery.validator.autoCreateRanges = false;
|
||||
deepEqual( $("#v2-i7").rules(), { required: true, minlength: 2, customMethod: true });
|
||||
|
||||
delete $.validator.methods.customMethod1;
|
||||
delete $.validator.messages.customMethod1;
|
||||
delete $.validator.methods.customMethod2;
|
||||
delete $.validator.messages.customMethod2;
|
||||
});
|
||||
|
||||
test("rules(), dependency checks", function() {
|
||||
var v = $("#testForm1clean").validate({
|
||||
rules: {
|
||||
firstname: {
|
||||
min: {
|
||||
param: 5,
|
||||
depends: function(el) {
|
||||
return (/^a/).test($(el).val());
|
||||
}
|
||||
}
|
||||
},
|
||||
lastname: {
|
||||
max: {
|
||||
param: 12
|
||||
},
|
||||
email: {
|
||||
depends: function() { return true; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}),
|
||||
rules = $("#firstnamec").rules();
|
||||
|
||||
equal( 0, v.objectLength(rules) );
|
||||
|
||||
$("#firstnamec").val("ab");
|
||||
deepEqual( $("#firstnamec").rules(), {min:5});
|
||||
|
||||
deepEqual( $("#lastnamec").rules(), {max:12, email:true});
|
||||
});
|
||||
|
||||
test("rules(), add and remove", function() {
|
||||
$.validator.addMethod("customMethod1", function() {
|
||||
return false;
|
||||
}, "");
|
||||
$("#v2").validate();
|
||||
var removedAttrs = $("#v2-i5").removeClass("required").removeAttrs("minlength maxlength");
|
||||
deepEqual( $("#v2-i5").rules(), { customMethod1: "123" });
|
||||
|
||||
$("#v2-i5").addClass("required").attr(removedAttrs);
|
||||
deepEqual( $("#v2-i5").rules(), { required: true, minlength: 2, maxlength: 5, customMethod1: "123" });
|
||||
|
||||
$("#v2-i5").addClass("email").attr({min: 5});
|
||||
deepEqual( $("#v2-i5").rules(), { required: true, email: true, minlength: 2, maxlength: 5, min: 5, customMethod1: "123" });
|
||||
|
||||
$("#v2-i5").removeClass("required email").removeAttrs("minlength maxlength customMethod1 min");
|
||||
deepEqual( $("#v2-i5").rules(), {});
|
||||
|
||||
delete $.validator.methods.customMethod1;
|
||||
delete $.validator.messages.customMethod1;
|
||||
});
|
||||
|
||||
test("rules(), add and remove static rules", function() {
|
||||
|
||||
$("#testForm1clean").validate({
|
||||
rules: {
|
||||
firstname: "required date"
|
||||
}
|
||||
});
|
||||
|
||||
deepEqual( $("#firstnamec").rules(), { required: true, date: true } );
|
||||
|
||||
$("#firstnamec").rules("remove", "date");
|
||||
deepEqual( $("#firstnamec").rules(), { required: true } );
|
||||
$("#firstnamec").rules("add", "email");
|
||||
deepEqual( $("#firstnamec").rules(), { required: true, email: true } );
|
||||
|
||||
$("#firstnamec").rules("remove", "required");
|
||||
deepEqual( $("#firstnamec").rules(), { email: true } );
|
||||
|
||||
deepEqual( $("#firstnamec").rules("remove"), { email: true } );
|
||||
deepEqual( $("#firstnamec").rules(), { } );
|
||||
|
||||
$("#firstnamec").rules("add", "required email");
|
||||
deepEqual( $("#firstnamec").rules(), { required: true, email: true } );
|
||||
|
||||
|
||||
deepEqual( $("#lastnamec").rules(), {} );
|
||||
$("#lastnamec").rules("add", "required");
|
||||
$("#lastnamec").rules("add", {
|
||||
minlength: 2
|
||||
});
|
||||
deepEqual( $("#lastnamec").rules(), { required: true, minlength: 2 } );
|
||||
|
||||
|
||||
var removedRules = $("#lastnamec").rules("remove", "required email");
|
||||
deepEqual( $("#lastnamec").rules(), { minlength: 2 } );
|
||||
$("#lastnamec").rules("add", removedRules);
|
||||
deepEqual( $("#lastnamec").rules(), { required: true, minlength: 2 } );
|
||||
});
|
||||
|
||||
test("rules(), add messages", function() {
|
||||
$("#firstnamec").attr("title", null);
|
||||
var v = $("#testForm1clean").validate({
|
||||
rules: {
|
||||
firstname: "required"
|
||||
}
|
||||
});
|
||||
$("#testForm1clean").valid();
|
||||
$("#firstnamec").valid();
|
||||
deepEqual( v.settings.messages.firstname, undefined );
|
||||
|
||||
$("#firstnamec").rules("add", {
|
||||
messages: {
|
||||
required: "required"
|
||||
}
|
||||
});
|
||||
|
||||
$("#firstnamec").valid();
|
||||
deepEqual( v.errorList[0] && v.errorList[0].message, "required" );
|
||||
|
||||
$("#firstnamec").val("test");
|
||||
$("#firstnamec").valid();
|
||||
equal(v.errorList.length, 0);
|
||||
});
|
||||
436
public/assets/plugins/jquery-validation/test/selects/index.html
Normal file
436
public/assets/plugins/jquery-validation/test/selects/index.html
Normal file
@@ -0,0 +1,436 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Fun with jQuery</title>
|
||||
|
||||
<script src="http://www.google.com/jsapi"></script>
|
||||
<script>
|
||||
google.load("jquery", "1");
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$.fn.options = function(selector) {
|
||||
return this.each(function() {
|
||||
function container(select) {
|
||||
if (select.next().is(".option-container")) {
|
||||
return $(select).next();
|
||||
}
|
||||
return $('<select class="option-container" />').append(select.children()).insertAfter(select).hide();
|
||||
}
|
||||
var container = container($(this));
|
||||
$(this).empty().append(container.children(selector).clone());
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
$("#State").hide()
|
||||
|
||||
$("#Country").change(function() {
|
||||
var selected = this.options[this.selectedIndex].value;
|
||||
if (selected == "US") {
|
||||
$("#State").show().options(".state");
|
||||
} else if (selected == "CA") {
|
||||
$("#State").show().options(".province");
|
||||
} else {
|
||||
$("#State").hide();
|
||||
}
|
||||
}).change();
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
Mission:
|
||||
|
||||
<xmp>
|
||||
CODE
|
||||
|
||||
</xmp>
|
||||
|
||||
|
||||
<select size="1" id="Country" name="country">
|
||||
<option value="">Select One</option>
|
||||
|
||||
<option value="US" selected="selected">United States</option>
|
||||
<option value="CA">Canada</option>
|
||||
<option value="">----------</option>
|
||||
<option value="AF">Afghanistan</option>
|
||||
<option value="AL">Albania</option>
|
||||
<option value="DZ">Algeria</option>
|
||||
|
||||
<option value="AS">American Samoa</option>
|
||||
<option value="AD">Andorra</option>
|
||||
<option value="AO">Angola</option>
|
||||
<option value="AI">Anguilla</option>
|
||||
<option value="AQ">Antarctica</option>
|
||||
<option value="AG">Antigua and Barbuda</option>
|
||||
|
||||
<option value="AR">Argentina</option>
|
||||
<option value="AM">Armenia</option>
|
||||
<option value="AW">Aruba</option>
|
||||
<option value="AU">Australia</option>
|
||||
<option value="AT">Austria</option>
|
||||
<option value="AZ">Azerbaidjan</option>
|
||||
|
||||
<option value="BS">Bahamas</option>
|
||||
<option value="BH">Bahrain</option>
|
||||
<option value="BD">Bangladesh</option>
|
||||
<option value="BB">Barbados</option>
|
||||
<option value="BY">Belarus</option>
|
||||
<option value="BE">Belgium</option>
|
||||
|
||||
<option value="BZ">Belize</option>
|
||||
<option value="BJ">Benin</option>
|
||||
<option value="BM">Bermuda</option>
|
||||
<option value="BT">Bhutan</option>
|
||||
<option value="BO">Bolivia</option>
|
||||
<option value="BA">Bosnia-Herzegovina</option>
|
||||
|
||||
<option value="BW">Botswana</option>
|
||||
<option value="BV">Bouvet Island</option>
|
||||
<option value="BR">Brazil</option>
|
||||
<option value="IO">British Indian Ocean Territory</option>
|
||||
<option value="BN">Brunei Darussalam</option>
|
||||
<option value="BG">Bulgaria</option>
|
||||
|
||||
<option value="BF">Burkina Faso</option>
|
||||
<option value="BI">Burundi</option>
|
||||
<option value="KH">Cambodia</option>
|
||||
<option value="CM">Cameroon</option>
|
||||
<option value="CV">Cape Verde</option>
|
||||
<option value="KY">Cayman Islands</option>
|
||||
|
||||
<option value="CF">Central African Republic</option>
|
||||
<option value="TD">Chad</option>
|
||||
<option value="CL">Chile</option>
|
||||
<option value="CN">China</option>
|
||||
<option value="CX">Christmas Island</option>
|
||||
<option value="CC">Cocos (Keeling) Islands</option>
|
||||
|
||||
<option value="CO">Colombia</option>
|
||||
<option value="KM">Comoros</option>
|
||||
<option value="CG">Congo</option>
|
||||
<option value="CK">Cook Islands</option>
|
||||
<option value="CR">Costa Rica</option>
|
||||
<option value="HR">Croatia</option>
|
||||
|
||||
<option value="CU">Cuba</option>
|
||||
<option value="CY">Cyprus</option>
|
||||
<option value="CZ">Czech Republic</option>
|
||||
<option value="DK">Denmark</option>
|
||||
<option value="DJ">Djibouti</option>
|
||||
<option value="DM">Dominica</option>
|
||||
|
||||
<option value="DO">Dominican Republic</option>
|
||||
<option value="TP">East Timor</option>
|
||||
<option value="EC">Ecuador</option>
|
||||
<option value="EG">Egypt</option>
|
||||
<option value="SV">El Salvador</option>
|
||||
<option value="GQ">Equatorial Guinea</option>
|
||||
|
||||
<option value="ER">Eritrea</option>
|
||||
<option value="EE">Estonia</option>
|
||||
<option value="ET">Ethiopia</option>
|
||||
<option value="FK">Falkland Islands</option>
|
||||
<option value="FO">Faroe Islands</option>
|
||||
<option value="FJ">Fiji</option>
|
||||
|
||||
<option value="FI">Finland</option>
|
||||
<option value="CS">Former Czechoslovakia</option>
|
||||
<option value="SU">Former USSR</option>
|
||||
<option value="FR">France</option>
|
||||
<option value="FX">France (European Territory)</option>
|
||||
<option value="GF">French Guyana</option>
|
||||
|
||||
<option value="TF">French Southern Territories</option>
|
||||
<option value="GA">Gabon</option>
|
||||
<option value="GM">Gambia</option>
|
||||
<option value="GE">Georgia</option>
|
||||
<option value="DE">Germany</option>
|
||||
<option value="GH">Ghana</option>
|
||||
|
||||
<option value="GI">Gibraltar</option>
|
||||
<option value="GB">Great Britain</option>
|
||||
<option value="GR">Greece</option>
|
||||
<option value="GL">Greenland</option>
|
||||
<option value="GD">Grenada</option>
|
||||
<option value="GP">Guadeloupe (French)</option>
|
||||
|
||||
<option value="GU">Guam (USA)</option>
|
||||
<option value="GT">Guatemala</option>
|
||||
<option value="GN">Guinea</option>
|
||||
<option value="GW">Guinea Bissau</option>
|
||||
<option value="GY">Guyana</option>
|
||||
<option value="HT">Haiti</option>
|
||||
|
||||
<option value="HM">Heard and McDonald Islands</option>
|
||||
<option value="HN">Honduras</option>
|
||||
<option value="HK">Hong Kong</option>
|
||||
<option value="HU">Hungary</option>
|
||||
<option value="IS">Iceland</option>
|
||||
<option value="IN">India</option>
|
||||
|
||||
<option value="ID">Indonesia</option>
|
||||
<option value="INT">International</option>
|
||||
<option value="IR">Iran</option>
|
||||
<option value="IQ">Iraq</option>
|
||||
<option value="IE">Ireland</option>
|
||||
<option value="IL">Israel</option>
|
||||
|
||||
<option value="IT">Italy</option>
|
||||
<option value="CI">Ivory Coast (Cote D'Ivoire)</option>
|
||||
<option value="JM">Jamaica</option>
|
||||
<option value="JP">Japan</option>
|
||||
<option value="JO">Jordan</option>
|
||||
<option value="KZ">Kazakhstan</option>
|
||||
|
||||
<option value="KE">Kenya</option>
|
||||
<option value="KI">Kiribati</option>
|
||||
<option value="KW">Kuwait</option>
|
||||
<option value="KG">Kyrgyzstan</option>
|
||||
<option value="LA">Laos</option>
|
||||
<option value="LV">Latvia</option>
|
||||
|
||||
<option value="LB">Lebanon</option>
|
||||
<option value="LS">Lesotho</option>
|
||||
<option value="LR">Liberia</option>
|
||||
<option value="LY">Libya</option>
|
||||
<option value="LI">Liechtenstein</option>
|
||||
<option value="LT">Lithuania</option>
|
||||
|
||||
<option value="LU">Luxembourg</option>
|
||||
<option value="MO">Macau</option>
|
||||
<option value="MK">Macedonia</option>
|
||||
<option value="MG">Madagascar</option>
|
||||
<option value="MW">Malawi</option>
|
||||
<option value="MY">Malaysia</option>
|
||||
|
||||
<option value="MV">Maldives</option>
|
||||
<option value="ML">Mali</option>
|
||||
<option value="MT">Malta</option>
|
||||
<option value="MH">Marshall Islands</option>
|
||||
<option value="MQ">Martinique (French)</option>
|
||||
<option value="MR">Mauritania</option>
|
||||
|
||||
<option value="MU">Mauritius</option>
|
||||
<option value="YT">Mayotte</option>
|
||||
<option value="MX">Mexico</option>
|
||||
<option value="FM">Micronesia</option>
|
||||
<option value="MD">Moldavia</option>
|
||||
<option value="MC">Monaco</option>
|
||||
|
||||
<option value="MN">Mongolia</option>
|
||||
<option value="MS">Montserrat</option>
|
||||
<option value="MA">Morocco</option>
|
||||
<option value="MZ">Mozambique</option>
|
||||
<option value="MM">Myanmar</option>
|
||||
<option value="NA">Namibia</option>
|
||||
|
||||
<option value="NR">Nauru</option>
|
||||
<option value="NP">Nepal</option>
|
||||
<option value="NL">Netherlands</option>
|
||||
<option value="AN">Netherlands Antilles</option>
|
||||
<option value="NT">Neutral Zone</option>
|
||||
<option value="NC">New Caledonia (French)</option>
|
||||
|
||||
<option value="NZ">New Zealand</option>
|
||||
<option value="NI">Nicaragua</option>
|
||||
<option value="NE">Niger</option>
|
||||
<option value="NG">Nigeria</option>
|
||||
<option value="NU">Niue</option>
|
||||
<option value="NF">Norfolk Island</option>
|
||||
|
||||
<option value="KP">North Korea</option>
|
||||
<option value="MP">Northern Mariana Islands</option>
|
||||
<option value="NO">Norway</option>
|
||||
<option value="OM">Oman</option>
|
||||
<option value="PK">Pakistan</option>
|
||||
<option value="PW">Palau</option>
|
||||
|
||||
<option value="PA">Panama</option>
|
||||
<option value="PG">Papua New Guinea</option>
|
||||
<option value="PY">Paraguay</option>
|
||||
<option value="PE">Peru</option>
|
||||
<option value="PH">Philippines</option>
|
||||
<option value="PN">Pitcairn Island</option>
|
||||
|
||||
<option value="PL">Poland</option>
|
||||
<option value="PF">Polynesia (French)</option>
|
||||
<option value="PT">Portugal</option>
|
||||
<option value="PR">Puerto Rico</option>
|
||||
<option value="QA">Qatar</option>
|
||||
<option value="RE">Reunion (French)</option>
|
||||
|
||||
<option value="RO">Romania</option>
|
||||
<option value="RU">Russian Federation</option>
|
||||
<option value="RW">Rwanda</option>
|
||||
<option value="GS">S. Georgia & S. Sandwich Isls.</option>
|
||||
<option value="SH">Saint Helena</option>
|
||||
<option value="KN">Saint Kitts & Nevis Anguilla</option>
|
||||
|
||||
<option value="LC">Saint Lucia</option>
|
||||
<option value="PM">Saint Pierre and Miquelon</option>
|
||||
<option value="ST">Saint Tome (Sao Tome) and Principe</option>
|
||||
<option value="VC">Saint Vincent & Grenadines</option>
|
||||
<option value="WS">Samoa</option>
|
||||
<option value="SM">San Marino</option>
|
||||
|
||||
<option value="SA">Saudi Arabia</option>
|
||||
<option value="SN">Senegal</option>
|
||||
<option value="SC">Seychelles</option>
|
||||
<option value="SL">Sierra Leone</option>
|
||||
<option value="SG">Singapore</option>
|
||||
<option value="SK">Slovak Republic</option>
|
||||
|
||||
<option value="SI">Slovenia</option>
|
||||
<option value="SB">Solomon Islands</option>
|
||||
<option value="SO">Somalia</option>
|
||||
<option value="ZA">South Africa</option>
|
||||
<option value="KR">South Korea</option>
|
||||
<option value="ES">Spain</option>
|
||||
|
||||
<option value="LK">Sri Lanka</option>
|
||||
<option value="SD">Sudan</option>
|
||||
<option value="SR">Suriname</option>
|
||||
<option value="SJ">Svalbard and Jan Mayen Islands</option>
|
||||
<option value="SZ">Swaziland</option>
|
||||
<option value="SE">Sweden</option>
|
||||
|
||||
<option value="CH">Switzerland</option>
|
||||
<option value="SY">Syria</option>
|
||||
<option value="TJ">Tadjikistan</option>
|
||||
<option value="TW">Taiwan</option>
|
||||
<option value="TZ">Tanzania</option>
|
||||
<option value="TH">Thailand</option>
|
||||
|
||||
<option value="TG">Togo</option>
|
||||
<option value="TK">Tokelau</option>
|
||||
<option value="TO">Tonga</option>
|
||||
<option value="TT">Trinidad and Tobago</option>
|
||||
<option value="TN">Tunisia</option>
|
||||
<option value="TR">Turkey</option>
|
||||
|
||||
<option value="TM">Turkmenistan</option>
|
||||
<option value="TC">Turks and Caicos Islands</option>
|
||||
<option value="TV">Tuvalu</option>
|
||||
<option value="UG">Uganda</option>
|
||||
<option value="UA">Ukraine</option>
|
||||
<option value="AE">United Arab Emirates</option>
|
||||
|
||||
<option value="GB">United Kingdom</option>
|
||||
<option value="UY">Uruguay</option>
|
||||
<option value="MIL">USA Military</option>
|
||||
<option value="UM">USA Minor Outlying Islands</option>
|
||||
<option value="UZ">Uzbekistan</option>
|
||||
<option value="VU">Vanuatu</option>
|
||||
|
||||
<option value="VA">Vatican City State</option>
|
||||
<option value="VE">Venezuela</option>
|
||||
<option value="VN">Vietnam</option>
|
||||
<option value="VG">Virgin Islands (British)</option>
|
||||
<option value="VI">Virgin Islands (USA)</option>
|
||||
<option value="WF">Wallis and Futuna Islands</option>
|
||||
|
||||
<option value="EH">Western Sahara</option>
|
||||
<option value="YE">Yemen</option>
|
||||
<option value="YU">Yugoslavia</option>
|
||||
<option value="ZR">Zaire</option>
|
||||
<option value="ZM">Zambia</option>
|
||||
<option value="ZW">Zimbabwe</option>
|
||||
|
||||
</select>
|
||||
<br />
|
||||
|
||||
<select id="State" name="State">
|
||||
|
||||
<option value="" class="selectone">Select One</option>
|
||||
<option value="AB" class="province">Alberta</option>
|
||||
<option value="BC" class="province">British Columbia</option>
|
||||
<option value="MB" class="province">Manitoba</option>
|
||||
|
||||
<option value="NB" class="province">New Brunswick</option>
|
||||
<option value="NF" class="province">Newfoundland</option>
|
||||
<option value="NT" class="province">Northwest Territories</option>
|
||||
<option value="NS" class="province">Nova Scotia</option>
|
||||
<option value="NU" class="province">Nunavut</option>
|
||||
<option value="ON" class="province">Ontario</option>
|
||||
|
||||
<option value="PE" class="province">Prince Edward Island</option>
|
||||
<option value="QC" class="province">Quebec</option>
|
||||
<option value="SK" class="province">Saskatchewan</option>
|
||||
<option value="YT" class="province">Yukon Territory</option>
|
||||
|
||||
<option value="AK" class="state">Alaska</option>
|
||||
<option value="AL" class="state">Alabama</option>
|
||||
|
||||
<option value="AR" class="state">Arkansas</option>
|
||||
<option value="AZ" class="state">Arizona</option>
|
||||
<option value="CA" class="state">California</option>
|
||||
<option value="CO" class="state">Colorado</option>
|
||||
<option value="CT" class="state">Connecticut</option>
|
||||
<option value="DC" class="state">District of Columbia</option>
|
||||
|
||||
<option value="DE" class="state">Delaware</option>
|
||||
<option value="FL" class="state">Florida</option>
|
||||
<option value="GA" class="state">Georgia</option>
|
||||
<option value="HI" class="state">Hawaii</option>
|
||||
<option value="IA" class="state">Iowa</option>
|
||||
<option value="ID" class="state">Idaho</option>
|
||||
|
||||
<option value="IL" class="state">Illinois</option>
|
||||
<option value="IN" class="state">Indiana</option>
|
||||
<option value="KS" class="state">Kansas</option>
|
||||
<option value="KY" class="state">Kentucky</option>
|
||||
<option value="LA" class="state">Louisiana</option>
|
||||
<option value="MA" class="state">Massachusetts</option>
|
||||
|
||||
<option value="MD" class="state">Maryland</option>
|
||||
<option value="ME" class="state">Maine</option>
|
||||
<option value="MI" class="state">Michigan</option>
|
||||
<option value="MN" class="state">Minnesota</option>
|
||||
<option value="MO" class="state">Missouri</option>
|
||||
<option value="MS" class="state">Mississippi</option>
|
||||
|
||||
<option value="MT" class="state">Montana</option>
|
||||
<option value="NC" class="state">North Carolina</option>
|
||||
<option value="ND" class="state">North Dakota</option>
|
||||
<option value="NE" class="state">Nebraska</option>
|
||||
<option value="NH" class="state">New Hampshire</option>
|
||||
<option value="NJ" class="state">New Jersey</option>
|
||||
|
||||
<option value="NM" class="state">New Mexico</option>
|
||||
<option value="NV" class="state">Nevada</option>
|
||||
<option value="NY" class="state">New York</option>
|
||||
<option value="OH" class="state">Ohio</option>
|
||||
<option value="OK" class="state">Oklahoma</option>
|
||||
<option value="OR" class="state">Oregon</option>
|
||||
|
||||
<option value="PA" class="state">Pennsylvania</option>
|
||||
<option value="PR" class="state">Puerto Rico</option>
|
||||
<option value="RI" class="state">Rhode Island</option>
|
||||
<option value="SC" class="state">South Carolina</option>
|
||||
<option value="SD" class="state">South Dakota</option>
|
||||
<option value="TN" class="state">Tennessee</option>
|
||||
|
||||
<option value="TX" class="state">Texas</option>
|
||||
<option value="UT" class="state">Utah</option>
|
||||
<option value="VA" class="state">Virginia</option>
|
||||
<option value="VT" class="state">Vermont</option>
|
||||
<option value="WA" class="state">Washington</option>
|
||||
<option value="WI" class="state">Wisconsin</option>
|
||||
|
||||
<option value="WV" class="state">West Virginia</option>
|
||||
<option value="WY" class="state">Wyoming</option>
|
||||
</select>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
77
public/assets/plugins/jquery-validation/test/tabs.html
Normal file
77
public/assets/plugins/jquery-validation/test/tabs.html
Normal file
@@ -0,0 +1,77 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test for jQuery validate() plugin</title>
|
||||
|
||||
<link rel="stylesheet" media="screen" href="../demo/css/screen.css">
|
||||
<link rel="stylesheet" href="../../../themes/flora/flora.all.css" media="screen" title="Flora (Default)">
|
||||
|
||||
<script src="../lib/jquery.js"></script>
|
||||
<script src="../../../ui/current/ui.tabs.js"></script>
|
||||
<script src="../dist/jquery.validate.js"></script>
|
||||
<script src="firebug/firebug.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
$().ready(function() {
|
||||
$("#commentForm").validate({debug:true});
|
||||
$("#example > ul").tabs();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
form.cmxform { width: 470px; }
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<form class="cmxform" id="commentForm" method="get" action="">
|
||||
|
||||
<div id="example" class="flora">
|
||||
<ul>
|
||||
|
||||
<li><a href="#fragment-1"><span>One</span></a></li>
|
||||
<li><a href="#fragment-2"><span>Two</span></a></li>
|
||||
<li><a href="#fragment-3"><span>Three</span></a></li>
|
||||
</ul>
|
||||
<div id="fragment-1">
|
||||
<fieldset>
|
||||
<legend>A simple comment form with submit validation and default messages</legend>
|
||||
<p>
|
||||
<label for="cname">Name (required, at least 2 characters)</label>
|
||||
<input id="cname" name="name" required minlength="2">
|
||||
<p>
|
||||
<label for="cemail">E-Mail (required)</label>
|
||||
<input id="cemail" name="email" required type="email">
|
||||
</p>
|
||||
<p>
|
||||
<label for="curl">URL (optional)</label>
|
||||
<input id="curl" name="url" type="url" value="">
|
||||
</p>
|
||||
<p>
|
||||
<label for="ccomment">Your comment (required)</label>
|
||||
<textarea id="ccomment" name="comment" required></textarea>
|
||||
</p>
|
||||
</fieldset>
|
||||
|
||||
</div>
|
||||
<div id="fragment-2">
|
||||
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
|
||||
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
|
||||
</div>
|
||||
<div id="fragment-3">
|
||||
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
|
||||
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
|
||||
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
<input class="submit" type="submit" value="Submit">
|
||||
</p>
|
||||
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
1709
public/assets/plugins/jquery-validation/test/test.js
vendored
Normal file
1709
public/assets/plugins/jquery-validation/test/test.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user