Version Description
- Added Custom Feedback Form
Download this release
Release Info
Developer | spicethemes |
Plugin | Spice Box |
Version | 1.0.3 |
Comparing to | |
See all releases |
Code changes from version 1.0.2 to 1.0.3
- custom.js +8 -0
- inc/css/custom-one.css +60 -0
- inc/css/custom-two.css +840 -0
- inc/css/form-submit-button-light.css +55 -0
- inc/css/formCss.css +186 -0
- inc/css/jot_from.css +982 -0
- inc/css/nova.css +520 -0
- inc/feedback-pop-up-form.php +98 -51
- inc/js/custom-js.js +8 -29
- inc/js/jotform.forms.js +1272 -0
- inc/js/prototype.forms.js +612 -0
- readme.txt +5 -2
- spicebox.php +34 -2
custom.js
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
JotForm.init(function(){
|
2 |
+
JotForm.clearFieldOnHide="disable";
|
3 |
+
/*INIT-END*/
|
4 |
+
});
|
5 |
+
|
6 |
+
JotForm.prepareCalculationsOnTheFly([null,{"name":"quickFeedback","qid":"1","text":"QUICK FEEDBACK","type":"control_head"},{"name":"submitForm","qid":"2","text":"Submit Feedback","type":"control_button"},{"name":"feedbackType","qid":"3","text":"Feedback Type","type":"control_radio"}]);
|
7 |
+
setTimeout(function() {
|
8 |
+
JotForm.paymentExtrasOnTheFly([null,{"name":"quickFeedback","qid":"1","text":"QUICK FEEDBACK","type":"control_head"},{"name":"submitForm","qid":"2","text":"Submit Feedback","type":"control_button"},{"name":"feedbackType","qid":"3","text":"Feedback Type","type":"control_radio"}]);}, 20);
|
inc/css/custom-one.css
ADDED
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.form-label-left{
|
2 |
+
width:150px;
|
3 |
+
}
|
4 |
+
.form-line{
|
5 |
+
padding-top:12px;
|
6 |
+
padding-bottom:12px;
|
7 |
+
}
|
8 |
+
.form-label-right{
|
9 |
+
width:150px;
|
10 |
+
}
|
11 |
+
body, html{
|
12 |
+
margin:0;
|
13 |
+
padding:0;
|
14 |
+
background:#fff;
|
15 |
+
}
|
16 |
+
|
17 |
+
.form-all{
|
18 |
+
margin:0px auto;
|
19 |
+
padding-top:20px;
|
20 |
+
width:690px;
|
21 |
+
color:#555 !important;
|
22 |
+
font-family:"Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Verdana, sans-serif;
|
23 |
+
font-size:14px;
|
24 |
+
}
|
25 |
+
.form-radio-item label, .form-checkbox-item label, .form-grading-label, .form-header{
|
26 |
+
color: Black;
|
27 |
+
}
|
28 |
+
.jotform-form label{
|
29 |
+
cursor: default;
|
30 |
+
}
|
31 |
+
|
32 |
+
@media (max-width: 768px){
|
33 |
+
.jotform-form{
|
34 |
+
height: 100%;
|
35 |
+
width: 100%;
|
36 |
+
position: absolute;
|
37 |
+
z-index: 1;
|
38 |
+
overflow: auto;
|
39 |
+
}
|
40 |
+
}
|
41 |
+
|
42 |
+
|
43 |
+
.jotform-form input[type=radio] {
|
44 |
+
-webkit-appearance: unset;
|
45 |
+
}
|
46 |
+
|
47 |
+
@media screen and (max-width: 782px){
|
48 |
+
input[type=radio] {
|
49 |
+
height: 15px !important;
|
50 |
+
width: 10px !important;
|
51 |
+
|
52 |
+
}input[type=radio]:checked:before {
|
53 |
+
width: 5px !important;
|
54 |
+
height: 5px !important;
|
55 |
+
margin: 4px !important;
|
56 |
+
border-radius: 50% !important;
|
57 |
+
}}
|
58 |
+
|
59 |
+
|
60 |
+
|
inc/css/custom-two.css
ADDED
@@ -0,0 +1,840 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@import "//www.jotform.com/themes/css/buttons/form-submit-button-light.css";
|
2 |
+
.form-all:after {
|
3 |
+
content: "";
|
4 |
+
display: table;
|
5 |
+
clear: both;
|
6 |
+
}
|
7 |
+
.form-all {
|
8 |
+
font-family: "Lucida Grande", sans-serif;
|
9 |
+
}
|
10 |
+
.form-all {
|
11 |
+
width: 690px;
|
12 |
+
}
|
13 |
+
.form-label-left,
|
14 |
+
.form-label-right {
|
15 |
+
width: 150px;
|
16 |
+
}
|
17 |
+
.form-label {
|
18 |
+
white-space: normal;
|
19 |
+
}
|
20 |
+
.form-label.form-label-auto {
|
21 |
+
display: block;
|
22 |
+
float: none;
|
23 |
+
text-align: left;
|
24 |
+
}
|
25 |
+
.form-label-left {
|
26 |
+
display: inline-block;
|
27 |
+
white-space: normal;
|
28 |
+
float: left;
|
29 |
+
text-align: left;
|
30 |
+
}
|
31 |
+
.form-label-right {
|
32 |
+
display: inline-block;
|
33 |
+
white-space: normal;
|
34 |
+
float: left;
|
35 |
+
text-align: right;
|
36 |
+
}
|
37 |
+
.form-label-top {
|
38 |
+
white-space: normal;
|
39 |
+
display: block;
|
40 |
+
float: none;
|
41 |
+
text-align: left;
|
42 |
+
}
|
43 |
+
.form-radio-item label:before {
|
44 |
+
top: 0;
|
45 |
+
}
|
46 |
+
.form-all {
|
47 |
+
font-size: 14px;
|
48 |
+
}
|
49 |
+
.form-label {
|
50 |
+
font-weight: bold;
|
51 |
+
}
|
52 |
+
.form-checkbox-item label,
|
53 |
+
.form-radio-item label {
|
54 |
+
font-weight: normal;
|
55 |
+
}
|
56 |
+
.supernova {
|
57 |
+
background-color: #ffffff;
|
58 |
+
background-color: rgba(0, 0, 0, 0.32);
|
59 |
+
}
|
60 |
+
.supernova body {
|
61 |
+
background-color: transparent;
|
62 |
+
}
|
63 |
+
/*
|
64 |
+
@width30: (unit(@formWidth, px) + 60px);
|
65 |
+
@width60: (unit(@formWidth, px)+ 120px);
|
66 |
+
@width90: (unit(@formWidth, px)+ 180px);
|
67 |
+
*/
|
68 |
+
/* | */
|
69 |
+
@media screen and (min-width: 480px) {
|
70 |
+
.supernova .form-all {
|
71 |
+
border: 1px solid rgba(0, 0, 0, 0.32);
|
72 |
+
-webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.1);
|
73 |
+
-moz-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.1);
|
74 |
+
box-shadow: 0 3px 9px rgba(0, 0, 0, 0.1);
|
75 |
+
}
|
76 |
+
}
|
77 |
+
/* | */
|
78 |
+
/* | */
|
79 |
+
@media screen and (max-width: 480px) {
|
80 |
+
.jotform-form .form-all {
|
81 |
+
margin: 0;
|
82 |
+
width: 100%;
|
83 |
+
}
|
84 |
+
}
|
85 |
+
/* | */
|
86 |
+
/* | */
|
87 |
+
@media screen and (min-width: 480px) and (max-width: 767px) {
|
88 |
+
.jotform-form .form-all {
|
89 |
+
margin: 0;
|
90 |
+
width: 100%;
|
91 |
+
}
|
92 |
+
}
|
93 |
+
/* | */
|
94 |
+
/* | */
|
95 |
+
@media screen and (min-width: 480px) and (max-width: 689px) {
|
96 |
+
.jotform-form .form-all {
|
97 |
+
margin: 0;
|
98 |
+
width: 100%;
|
99 |
+
}
|
100 |
+
}
|
101 |
+
/* | */
|
102 |
+
/* | */
|
103 |
+
@media screen and (min-width: 768px) {
|
104 |
+
.jotform-form {
|
105 |
+
padding: 60px 0;
|
106 |
+
}
|
107 |
+
}
|
108 |
+
/* | */
|
109 |
+
/* | */
|
110 |
+
@media screen and (max-width: 689px) {
|
111 |
+
.jotform-form .form-all {
|
112 |
+
margin: 0;
|
113 |
+
width: 100%;
|
114 |
+
}
|
115 |
+
}
|
116 |
+
/* | */
|
117 |
+
.supernova .form-all,
|
118 |
+
.form-all {
|
119 |
+
background-color: #ffffff;
|
120 |
+
border: 1px solid transparent;
|
121 |
+
}
|
122 |
+
.form-header-group {
|
123 |
+
border-color: #e6e6e6;
|
124 |
+
}
|
125 |
+
.form-matrix-table tr {
|
126 |
+
border-color: #e6e6e6;
|
127 |
+
}
|
128 |
+
.form-matrix-table tr:nth-child(2n) {
|
129 |
+
background-color: #f2f2f2;
|
130 |
+
}
|
131 |
+
.form-all {
|
132 |
+
color: #555555;
|
133 |
+
}
|
134 |
+
.form-header-group .form-header {
|
135 |
+
color: #555555;
|
136 |
+
}
|
137 |
+
.form-header-group .form-subHeader {
|
138 |
+
color: #6f6f6f;
|
139 |
+
}
|
140 |
+
.form-sub-label {
|
141 |
+
color: #6f6f6f;
|
142 |
+
}
|
143 |
+
.form-label-top,
|
144 |
+
.form-label-left,
|
145 |
+
.form-label-right,
|
146 |
+
.form-html {
|
147 |
+
color: #555555;
|
148 |
+
}
|
149 |
+
.form-checkbox-item label,
|
150 |
+
.form-radio-item label {
|
151 |
+
color: #6f6f6f;
|
152 |
+
}
|
153 |
+
.form-line.form-line-active {
|
154 |
+
-webkit-transition-property: all;
|
155 |
+
-moz-transition-property: all;
|
156 |
+
-ms-transition-property: all;
|
157 |
+
-o-transition-property: all;
|
158 |
+
transition-property: all;
|
159 |
+
-webkit-transition-duration: 0.3s;
|
160 |
+
-moz-transition-duration: 0.3s;
|
161 |
+
-ms-transition-duration: 0.3s;
|
162 |
+
-o-transition-duration: 0.3s;
|
163 |
+
transition-duration: 0.3s;
|
164 |
+
-webkit-transition-timing-function: ease;
|
165 |
+
-moz-transition-timing-function: ease;
|
166 |
+
-ms-transition-timing-function: ease;
|
167 |
+
-o-transition-timing-function: ease;
|
168 |
+
transition-timing-function: ease;
|
169 |
+
background-color: #ffffe0;
|
170 |
+
}
|
171 |
+
/* omer */
|
172 |
+
.form-radio-item,
|
173 |
+
.form-checkbox-item {
|
174 |
+
padding-bottom: 0px !important;
|
175 |
+
}
|
176 |
+
.form-radio-item:last-child,
|
177 |
+
.form-checkbox-item:last-child {
|
178 |
+
padding-bottom: 0;
|
179 |
+
}
|
180 |
+
/* omer */
|
181 |
+
.form-single-column .form-checkbox-item,
|
182 |
+
.form-single-column .form-radio-item {
|
183 |
+
width: 100%;
|
184 |
+
}
|
185 |
+
.form-checkbox-item .editor-container div,
|
186 |
+
.form-radio-item .editor-container div {
|
187 |
+
position: relative;
|
188 |
+
}
|
189 |
+
.form-checkbox-item .editor-container div:before,
|
190 |
+
.form-radio-item .editor-container div:before {
|
191 |
+
display: inline-block;
|
192 |
+
vertical-align: middle;
|
193 |
+
-moz-box-sizing: border-box;
|
194 |
+
-webkit-box-sizing: border-box;
|
195 |
+
box-sizing: border-box;
|
196 |
+
left: 0;
|
197 |
+
width: 18px;
|
198 |
+
height: 18px;
|
199 |
+
}
|
200 |
+
.supernova {
|
201 |
+
height: 100%;
|
202 |
+
background-repeat: no-repeat;
|
203 |
+
background-attachment: scroll;
|
204 |
+
background-position: center top;
|
205 |
+
background-repeat: repeat;
|
206 |
+
}
|
207 |
+
.supernova {
|
208 |
+
background-image: none;
|
209 |
+
}
|
210 |
+
#stage {
|
211 |
+
background-image: none;
|
212 |
+
}
|
213 |
+
/* | */
|
214 |
+
.form-all {
|
215 |
+
background-repeat: no-repeat;
|
216 |
+
background-attachment: scroll;
|
217 |
+
background-position: center top;
|
218 |
+
background-repeat: repeat;
|
219 |
+
}
|
220 |
+
.form-header-group {
|
221 |
+
background-repeat: no-repeat;
|
222 |
+
background-attachment: scroll;
|
223 |
+
background-position: center top;
|
224 |
+
}
|
225 |
+
.form-line {
|
226 |
+
margin-top: 12px;
|
227 |
+
margin-bottom: 12px;
|
228 |
+
}
|
229 |
+
.form-line {
|
230 |
+
padding: 12px 36px;
|
231 |
+
}
|
232 |
+
.form-all .form-textbox,
|
233 |
+
.form-all .form-radio-other-input,
|
234 |
+
.form-all .form-checkbox-other-input,
|
235 |
+
.form-all .form-captcha input,
|
236 |
+
.form-all .form-spinner input,
|
237 |
+
.form-all .form-pagebreak-back,
|
238 |
+
.form-all .form-pagebreak-next,
|
239 |
+
.form-all .qq-upload-button,
|
240 |
+
.form-all .form-error-message {
|
241 |
+
-webkit-border-radius: 6px;
|
242 |
+
-moz-border-radius: 6px;
|
243 |
+
border-radius: 6px;
|
244 |
+
}
|
245 |
+
.form-all .form-sub-label {
|
246 |
+
margin-left: 3px;
|
247 |
+
}
|
248 |
+
.form-all .form-textarea {
|
249 |
+
-webkit-border-radius: 6px;
|
250 |
+
-moz-border-radius: 6px;
|
251 |
+
border-radius: 6px;
|
252 |
+
}
|
253 |
+
.form-all .qq-upload-button,
|
254 |
+
.form-all .form-submit-button,
|
255 |
+
.form-all .form-submit-reset,
|
256 |
+
.form-all .form-submit-print {
|
257 |
+
width: 80px;
|
258 |
+
font-size: 1em;
|
259 |
+
padding: 9px 15px;
|
260 |
+
font-family: "Lucida Grande", sans-serif;
|
261 |
+
font-size: 14px;
|
262 |
+
font-weight: normal;
|
263 |
+
}
|
264 |
+
.form-all .form-pagebreak-back,
|
265 |
+
.form-all .form-pagebreak-next {
|
266 |
+
font-size: 1em;
|
267 |
+
padding: 9px 15px;
|
268 |
+
font-family: "Lucida Grande", sans-serif;
|
269 |
+
font-size: 14px;
|
270 |
+
font-weight: normal;
|
271 |
+
}
|
272 |
+
/*
|
273 |
+
& when ( @buttonFontType = google ) {
|
274 |
+
@import (css) "@{buttonFontLink}";
|
275 |
+
}
|
276 |
+
*/
|
277 |
+
h2.form-header {
|
278 |
+
line-height: 1.618em;
|
279 |
+
font-size: 1.714em;
|
280 |
+
}
|
281 |
+
h2 ~ .form-subHeader {
|
282 |
+
line-height: 1.5em;
|
283 |
+
font-size: 1.071em;
|
284 |
+
}
|
285 |
+
.form-header-group {
|
286 |
+
text-align: left;
|
287 |
+
}
|
288 |
+
/*.form-dropdown,
|
289 |
+
.form-radio-item,
|
290 |
+
.form-checkbox-item,
|
291 |
+
.form-radio-other-input,
|
292 |
+
.form-checkbox-other-input,*/
|
293 |
+
.form-captcha input,
|
294 |
+
.form-spinner input,
|
295 |
+
.form-error-message {
|
296 |
+
padding: 4px 3px 2px 3px;
|
297 |
+
}
|
298 |
+
.form-header-group {
|
299 |
+
font-family: "Lucida Grande", sans-serif;
|
300 |
+
}
|
301 |
+
.form-section {
|
302 |
+
padding: 0px 0px 0px 0px;
|
303 |
+
}
|
304 |
+
.form-header-group {
|
305 |
+
margin: 12px 36px 12px 36px;
|
306 |
+
}
|
307 |
+
.form-header-group {
|
308 |
+
padding: 24px 0px 24px 0px;
|
309 |
+
}
|
310 |
+
.form-textbox,
|
311 |
+
.form-textarea {
|
312 |
+
padding: 4px 3px 2px 3px;
|
313 |
+
}
|
314 |
+
.form-textbox,
|
315 |
+
.form-textarea,
|
316 |
+
.form-radio-other-input,
|
317 |
+
.form-checkbox-other-input,
|
318 |
+
.form-captcha input,
|
319 |
+
.form-spinner input {
|
320 |
+
background-color: #ffffff;
|
321 |
+
}
|
322 |
+
.form-textbox {
|
323 |
+
height: 30px;
|
324 |
+
}
|
325 |
+
.form-textarea {
|
326 |
+
height: 100px;
|
327 |
+
}
|
328 |
+
.form-textbox,
|
329 |
+
.form-textarea {
|
330 |
+
width: 100%;
|
331 |
+
max-width: 400px;
|
332 |
+
-moz-box-sizing: border-box;
|
333 |
+
-webkit-box-sizing: border-box;
|
334 |
+
box-sizing: border-box;
|
335 |
+
}
|
336 |
+
[data-type="control_textbox"] .form-input,
|
337 |
+
[data-type="control_textarea"] .form-input,
|
338 |
+
[data-type="control_fullname"] .form-input,
|
339 |
+
[data-type="control_phone"] .form-input,
|
340 |
+
[data-type="control_datetime"] .form-input,
|
341 |
+
[data-type="control_address"] .form-input,
|
342 |
+
[data-type="control_email"] .form-input,
|
343 |
+
[data-type="control_passwordbox"] .form-input,
|
344 |
+
[data-type="control_autocomp"] .form-input,
|
345 |
+
[data-type="control_textbox"] .form-input-wide,
|
346 |
+
[data-type="control_textarea"] .form-input-wide,
|
347 |
+
[data-type="control_fullname"] .form-input-wide,
|
348 |
+
[data-type="control_phone"] .form-input-wide,
|
349 |
+
[data-type="control_datetime"] .form-input-wide,
|
350 |
+
[data-type="control_address"] .form-input-wide,
|
351 |
+
[data-type="control_email"] .form-input-wide,
|
352 |
+
[data-type="control_passwordbox"] .form-input-wide,
|
353 |
+
[data-type="control_autocomp"] .form-input-wide {
|
354 |
+
width: 100%;
|
355 |
+
max-width: 400px;
|
356 |
+
}
|
357 |
+
[data-type="control_fullname"] .form-sub-label-container {
|
358 |
+
-moz-box-sizing: border-box;
|
359 |
+
-webkit-box-sizing: border-box;
|
360 |
+
box-sizing: border-box;
|
361 |
+
width: 48%;
|
362 |
+
margin-right: 0;
|
363 |
+
float: left;
|
364 |
+
}
|
365 |
+
[data-type="control_fullname"] .form-sub-label-container:first-child {
|
366 |
+
margin-right: 4%;
|
367 |
+
}
|
368 |
+
[data-type="control_phone"] .form-sub-label-container {
|
369 |
+
width: 62.5%;
|
370 |
+
margin-left: 2.5%;
|
371 |
+
margin-right: 0;
|
372 |
+
float: left;
|
373 |
+
position: relative;
|
374 |
+
}
|
375 |
+
[data-type="control_phone"] .form-sub-label-container:first-child {
|
376 |
+
width: 32.5%;
|
377 |
+
margin-right: 2.5%;
|
378 |
+
margin-left: 0;
|
379 |
+
}
|
380 |
+
[data-type="control_phone"] .form-sub-label-container:first-child [data-component=areaCode] {
|
381 |
+
width: 93%;
|
382 |
+
float: left;
|
383 |
+
}
|
384 |
+
[data-type="control_phone"] .form-sub-label-container:first-child [data-component=areaCode] ~ .form-sub-label {
|
385 |
+
display: inline-block;
|
386 |
+
}
|
387 |
+
[data-type="control_phone"] .form-sub-label-container:first-child .phone-separate {
|
388 |
+
position: absolute;
|
389 |
+
top: 0;
|
390 |
+
right: -16%;
|
391 |
+
width: 24%;
|
392 |
+
text-align: center;
|
393 |
+
text-indent: -4px;
|
394 |
+
}
|
395 |
+
[data-type="control_phone"] .form-sub-label-container .date-separate {
|
396 |
+
visibility: hidden;
|
397 |
+
}
|
398 |
+
.form-matrix-table {
|
399 |
+
width: 100%;
|
400 |
+
max-width: 400px;
|
401 |
+
}
|
402 |
+
.form-address-table {
|
403 |
+
width: 100%;
|
404 |
+
max-width: 400px;
|
405 |
+
}
|
406 |
+
.form-address-table td .form-dropdown {
|
407 |
+
width: 100%;
|
408 |
+
}
|
409 |
+
.form-address-table td .form-sub-label-container {
|
410 |
+
width: 96%;
|
411 |
+
}
|
412 |
+
.form-address-table td:last-child .form-sub-label-container {
|
413 |
+
margin-left: 4%;
|
414 |
+
}
|
415 |
+
.form-address-table td[colspan="2"] .form-sub-label-container {
|
416 |
+
width: 100%;
|
417 |
+
margin: 0;
|
418 |
+
}
|
419 |
+
[data-type="control_dropdown"] .form-input,
|
420 |
+
[data-type="control_dropdown"] .form-input-wide {
|
421 |
+
width: 150px;
|
422 |
+
}
|
423 |
+
.form-buttons-wrapper {
|
424 |
+
margin-left: 0 !important;
|
425 |
+
text-align: left;
|
426 |
+
}
|
427 |
+
.form-label {
|
428 |
+
font-family: "Lucida Grande", sans-serif;
|
429 |
+
}
|
430 |
+
li[data-type="control_image"] div {
|
431 |
+
text-align: left;
|
432 |
+
}
|
433 |
+
li[data-type="control_image"] img {
|
434 |
+
border: none;
|
435 |
+
border-width: 0px !important;
|
436 |
+
border-style: solid !important;
|
437 |
+
border-color: false !important;
|
438 |
+
}
|
439 |
+
.form-line-column {
|
440 |
+
width: auto;
|
441 |
+
}
|
442 |
+
.form-line-error {
|
443 |
+
overflow: hidden;
|
444 |
+
-webkit-transition-property: none;
|
445 |
+
-moz-transition-property: none;
|
446 |
+
-ms-transition-property: none;
|
447 |
+
-o-transition-property: none;
|
448 |
+
transition-property: none;
|
449 |
+
-webkit-transition-duration: 0.3s;
|
450 |
+
-moz-transition-duration: 0.3s;
|
451 |
+
-ms-transition-duration: 0.3s;
|
452 |
+
-o-transition-duration: 0.3s;
|
453 |
+
transition-duration: 0.3s;
|
454 |
+
-webkit-transition-timing-function: ease;
|
455 |
+
-moz-transition-timing-function: ease;
|
456 |
+
-ms-transition-timing-function: ease;
|
457 |
+
-o-transition-timing-function: ease;
|
458 |
+
transition-timing-function: ease;
|
459 |
+
background-color: #fff4f4;
|
460 |
+
}
|
461 |
+
.form-line-error .form-error-message {
|
462 |
+
background-color: #ff3200;
|
463 |
+
clear: both;
|
464 |
+
float: none;
|
465 |
+
}
|
466 |
+
.form-line-error .form-error-message .form-error-arrow {
|
467 |
+
border-bottom-color: #ff3200;
|
468 |
+
}
|
469 |
+
.form-line-error input:not(#coupon-input),
|
470 |
+
.form-line-error textarea,
|
471 |
+
.form-line-error .form-validation-error {
|
472 |
+
border: 1px solid #ff3200;
|
473 |
+
-webkit-box-shadow: 0 0 3px #ff3200;
|
474 |
+
-moz-box-shadow: 0 0 3px #ff3200;
|
475 |
+
box-shadow: 0 0 3px #ff3200;
|
476 |
+
}
|
477 |
+
.form-all {
|
478 |
+
position: relative;
|
479 |
+
}
|
480 |
+
.form-all:before {
|
481 |
+
content: "";
|
482 |
+
background-image: url("https://www.jotform.com/uploads/webriti/form_files/logo-1.5d0c7f0e4f2840.99535272.png");
|
483 |
+
display: inline-block;
|
484 |
+
height: 49px;
|
485 |
+
position: absolute;
|
486 |
+
background-size: 191px 49px;
|
487 |
+
background-repeat: no-repeat;
|
488 |
+
width: 100%;
|
489 |
+
}
|
490 |
+
.form-all {
|
491 |
+
margin-top: 59px !important;
|
492 |
+
}
|
493 |
+
.form-all:before {
|
494 |
+
top: -59px;
|
495 |
+
background-position: top center;
|
496 |
+
}
|
497 |
+
.ie-8 .form-all {
|
498 |
+
margin-top: auto;
|
499 |
+
margin-top: initial;
|
500 |
+
}
|
501 |
+
.ie-8 .form-all:before {
|
502 |
+
display: none;
|
503 |
+
}
|
504 |
+
[data-type="control_clear"] {
|
505 |
+
display: none;
|
506 |
+
}
|
507 |
+
/* | */
|
508 |
+
@media screen and (max-width: 480px), screen and (max-device-width: 767px) and (orientation: portrait), screen and (max-device-width: 415px) and (orientation: landscape) {
|
509 |
+
.testOne {
|
510 |
+
letter-spacing: 0;
|
511 |
+
}
|
512 |
+
.form-all {
|
513 |
+
border: 0;
|
514 |
+
max-width: initial;
|
515 |
+
}
|
516 |
+
.form-sub-label-container {
|
517 |
+
width: 100%;
|
518 |
+
margin: 0;
|
519 |
+
margin-right: 0;
|
520 |
+
float: left;
|
521 |
+
-moz-box-sizing: border-box;
|
522 |
+
-webkit-box-sizing: border-box;
|
523 |
+
box-sizing: border-box;
|
524 |
+
}
|
525 |
+
span.form-sub-label-container + span.form-sub-label-container {
|
526 |
+
margin-right: 0;
|
527 |
+
}
|
528 |
+
.form-sub-label {
|
529 |
+
white-space: normal;
|
530 |
+
}
|
531 |
+
.form-address-table td,
|
532 |
+
.form-address-table th {
|
533 |
+
padding: 0 1px 10px;
|
534 |
+
}
|
535 |
+
.form-submit-button,
|
536 |
+
.form-submit-print,
|
537 |
+
.form-submit-reset {
|
538 |
+
width: 100%;
|
539 |
+
margin-left: 0!important;
|
540 |
+
}
|
541 |
+
div[id*=at_] {
|
542 |
+
font-size: 14px;
|
543 |
+
font-weight: 700;
|
544 |
+
height: 8px;
|
545 |
+
margin-top: 6px;
|
546 |
+
}
|
547 |
+
.showAutoCalendar {
|
548 |
+
width: 20px;
|
549 |
+
}
|
550 |
+
img.form-image {
|
551 |
+
max-width: 100%;
|
552 |
+
height: auto;
|
553 |
+
}
|
554 |
+
.form-matrix-row-headers {
|
555 |
+
width: 100%;
|
556 |
+
word-break: break-all;
|
557 |
+
min-width: 40px;
|
558 |
+
}
|
559 |
+
.form-collapse-table,
|
560 |
+
.form-header-group {
|
561 |
+
margin: 0;
|
562 |
+
}
|
563 |
+
.form-collapse-table {
|
564 |
+
height: 100%;
|
565 |
+
display: inline-block;
|
566 |
+
width: 100%;
|
567 |
+
}
|
568 |
+
.form-collapse-hidden {
|
569 |
+
display: none !important;
|
570 |
+
}
|
571 |
+
.form-input {
|
572 |
+
width: 100%;
|
573 |
+
}
|
574 |
+
.form-label {
|
575 |
+
width: 100% !important;
|
576 |
+
}
|
577 |
+
.form-label-left,
|
578 |
+
.form-label-right {
|
579 |
+
display: block;
|
580 |
+
float: none;
|
581 |
+
text-align: left;
|
582 |
+
width: auto!important;
|
583 |
+
}
|
584 |
+
.form-line,
|
585 |
+
.form-line.form-line-column {
|
586 |
+
padding: 2% 5%;
|
587 |
+
-moz-box-sizing: border-box;
|
588 |
+
-webkit-box-sizing: border-box;
|
589 |
+
box-sizing: border-box;
|
590 |
+
}
|
591 |
+
input[type=text],
|
592 |
+
input[type=email],
|
593 |
+
input[type=tel],
|
594 |
+
textarea {
|
595 |
+
width: 100%;
|
596 |
+
-moz-box-sizing: border-box;
|
597 |
+
-webkit-box-sizing: border-box;
|
598 |
+
box-sizing: border-box;
|
599 |
+
max-width: initial !important;
|
600 |
+
}
|
601 |
+
.form-radio-other-input,
|
602 |
+
.form-checkbox-other-input {
|
603 |
+
max-width: 55% !important;
|
604 |
+
}
|
605 |
+
.form-dropdown,
|
606 |
+
.form-textarea,
|
607 |
+
.form-textbox {
|
608 |
+
width: 100%!important;
|
609 |
+
-moz-box-sizing: border-box;
|
610 |
+
-webkit-box-sizing: border-box;
|
611 |
+
box-sizing: border-box;
|
612 |
+
}
|
613 |
+
.form-input,
|
614 |
+
.form-input-wide,
|
615 |
+
.form-textarea,
|
616 |
+
.form-textbox,
|
617 |
+
.form-dropdown {
|
618 |
+
max-width: initial!important;
|
619 |
+
}
|
620 |
+
.form-checkbox-item:not(#foo),
|
621 |
+
.form-radio-item:not(#foo) {
|
622 |
+
width: 100%;
|
623 |
+
}
|
624 |
+
.form-address-city,
|
625 |
+
.form-address-line,
|
626 |
+
.form-address-postal,
|
627 |
+
.form-address-state,
|
628 |
+
.form-address-table,
|
629 |
+
.form-address-table .form-sub-label-container,
|
630 |
+
.form-address-table select,
|
631 |
+
.form-input {
|
632 |
+
width: 100%;
|
633 |
+
}
|
634 |
+
div.form-header-group {
|
635 |
+
padding: 24px 0px !important;
|
636 |
+
margin: 0 12px 2% !important;
|
637 |
+
margin-left: 5%!important;
|
638 |
+
margin-right: 5%!important;
|
639 |
+
-moz-box-sizing: border-box;
|
640 |
+
-webkit-box-sizing: border-box;
|
641 |
+
box-sizing: border-box;
|
642 |
+
}
|
643 |
+
div.form-header-group.hasImage img {
|
644 |
+
max-width: 100%;
|
645 |
+
}
|
646 |
+
[data-type="control_button"] {
|
647 |
+
margin-bottom: 0 !important;
|
648 |
+
}
|
649 |
+
[data-type=control_fullname] .form-sub-label-container {
|
650 |
+
width: 48%;
|
651 |
+
}
|
652 |
+
[data-type=control_fullname] .form-sub-label-container:first-child {
|
653 |
+
margin-right: 4%;
|
654 |
+
}
|
655 |
+
[data-type=control_phone] .form-sub-label-container {
|
656 |
+
width: 65%;
|
657 |
+
margin-right: 0;
|
658 |
+
margin-left: 0;
|
659 |
+
float: left;
|
660 |
+
}
|
661 |
+
[data-type=control_phone] .form-sub-label-container:first-child {
|
662 |
+
width: 31%;
|
663 |
+
margin-right: 4%;
|
664 |
+
}
|
665 |
+
[data-type=control_datetime] .allowTime-container {
|
666 |
+
width: 100%;
|
667 |
+
}
|
668 |
+
[data-type=control_datetime] .form-sub-label-container:first-child {
|
669 |
+
width: 10%!important;
|
670 |
+
margin-left: 0;
|
671 |
+
margin-right: 0;
|
672 |
+
}
|
673 |
+
[data-type=control_datetime] .form-sub-label-container + .form-sub-label-container {
|
674 |
+
width: 24%!important;
|
675 |
+
margin-left: 6%;
|
676 |
+
margin-right: 0;
|
677 |
+
}
|
678 |
+
[data-type=control_datetime] span + span + span > span:first-child {
|
679 |
+
display: block;
|
680 |
+
width: 100% !important;
|
681 |
+
}
|
682 |
+
[data-type=control_birthdate] .form-sub-label-container,
|
683 |
+
[data-type=control_time] .form-sub-label-container {
|
684 |
+
width: 27.3%!important;
|
685 |
+
margin-right: 6% !important;
|
686 |
+
}
|
687 |
+
[data-type=control_time] .form-sub-label-container:last-child {
|
688 |
+
width: 33.3%!important;
|
689 |
+
margin-right: 0 !important;
|
690 |
+
}
|
691 |
+
.form-pagebreak-back-container,
|
692 |
+
.form-pagebreak-next-container {
|
693 |
+
min-height: 1px;
|
694 |
+
width: 50% !important;
|
695 |
+
}
|
696 |
+
.form-pagebreak-back,
|
697 |
+
.form-pagebreak-next,
|
698 |
+
.form-product-item.hover-product-item {
|
699 |
+
width: 100%;
|
700 |
+
}
|
701 |
+
.form-pagebreak-back-container {
|
702 |
+
padding: 0;
|
703 |
+
text-align: right;
|
704 |
+
}
|
705 |
+
.form-pagebreak-next-container {
|
706 |
+
padding: 0;
|
707 |
+
text-align: left;
|
708 |
+
}
|
709 |
+
.form-pagebreak {
|
710 |
+
margin: 0 auto;
|
711 |
+
}
|
712 |
+
.form-buttons-wrapper {
|
713 |
+
margin: 0!important;
|
714 |
+
margin-left: 0!important;
|
715 |
+
}
|
716 |
+
.form-buttons-wrapper button {
|
717 |
+
width: 100%;
|
718 |
+
}
|
719 |
+
.form-buttons-wrapper .form-submit-print {
|
720 |
+
margin: 0 !important;
|
721 |
+
}
|
722 |
+
table {
|
723 |
+
width: 100%!important;
|
724 |
+
max-width: initial!important;
|
725 |
+
}
|
726 |
+
table td + td {
|
727 |
+
padding-left: 3%;
|
728 |
+
}
|
729 |
+
.form-checkbox-item,
|
730 |
+
.form-radio-item {
|
731 |
+
white-space: normal!important;
|
732 |
+
}
|
733 |
+
.form-checkbox-item input,
|
734 |
+
.form-radio-item input {
|
735 |
+
width: auto;
|
736 |
+
}
|
737 |
+
.form-collapse-table {
|
738 |
+
margin: 0 5%;
|
739 |
+
display: block;
|
740 |
+
zoom: 1;
|
741 |
+
width: auto;
|
742 |
+
}
|
743 |
+
.form-collapse-table:before,
|
744 |
+
.form-collapse-table:after {
|
745 |
+
display: table;
|
746 |
+
content: '';
|
747 |
+
line-height: 0;
|
748 |
+
}
|
749 |
+
.form-collapse-table:after {
|
750 |
+
clear: both;
|
751 |
+
}
|
752 |
+
.fb-like-box {
|
753 |
+
width: 98% !important;
|
754 |
+
}
|
755 |
+
.form-error-message {
|
756 |
+
clear: both;
|
757 |
+
bottom: -10px;
|
758 |
+
}
|
759 |
+
.date-separate,
|
760 |
+
.phone-separate {
|
761 |
+
display: none;
|
762 |
+
}
|
763 |
+
.custom-field-frame,
|
764 |
+
.direct-embed-widgets,
|
765 |
+
.signature-pad-wrapper {
|
766 |
+
width: 100% !important;
|
767 |
+
}
|
768 |
+
}
|
769 |
+
/* | */
|
770 |
+
|
771 |
+
/*__INSPECT_SEPERATOR__*/
|
772 |
+
#91673332832458 div.form-all {
|
773 |
+
background-color : #353839;
|
774 |
+
margin-bottom : 0px;
|
775 |
+
padding-bottom : 0px;
|
776 |
+
}
|
777 |
+
|
778 |
+
.form-radio-other-input.form-textbox {
|
779 |
+
width : 400px;
|
780 |
+
height : 60px;
|
781 |
+
}
|
782 |
+
|
783 |
+
#id_2 {
|
784 |
+
background-color : #eaeaea;
|
785 |
+
width : 50%;
|
786 |
+
margin-bottom : 0px;
|
787 |
+
}
|
788 |
+
@media screen and (max-width: 480px){
|
789 |
+
#id_2 {
|
790 |
+
height: 20% !important;
|
791 |
+
}
|
792 |
+
#id_5 {
|
793 |
+
height: 20% !important;
|
794 |
+
}
|
795 |
+
}
|
796 |
+
|
797 |
+
.form-submit-button {
|
798 |
+
width : 100%;
|
799 |
+
}
|
800 |
+
|
801 |
+
#text_5 {
|
802 |
+
float : right;
|
803 |
+
}
|
804 |
+
|
805 |
+
#id_5 {
|
806 |
+
float : right;
|
807 |
+
width : 50%;
|
808 |
+
background-color : #eaeaea;
|
809 |
+
height : 84px;
|
810 |
+
margin-bottom : 0px;
|
811 |
+
}
|
812 |
+
|
813 |
+
.form-html {
|
814 |
+
vertical-align : center;
|
815 |
+
}
|
816 |
+
|
817 |
+
#id_3 {
|
818 |
+
padding-top : 0px;
|
819 |
+
}
|
820 |
+
|
821 |
+
.form-section.page-section {
|
822 |
+
|
823 |
+
}
|
824 |
+
|
825 |
+
#id_4 {
|
826 |
+
padding-bottom : 0px;
|
827 |
+
}
|
828 |
+
|
829 |
+
.form-radio-item label {
|
830 |
+
|
831 |
+
}
|
832 |
+
|
833 |
+
.form-radio-item {
|
834 |
+
line-height : 25px;
|
835 |
+
}
|
836 |
+
|
837 |
+
#input_2 {
|
838 |
+
width : 80%;
|
839 |
+
}
|
840 |
+
|
inc/css/form-submit-button-light.css
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/********* Light **********/
|
2 |
+
|
3 |
+
.form-submit-button-light{
|
4 |
+
|
5 |
+
cursor: pointer;
|
6 |
+
|
7 |
+
-moz-border-radius:.3em;
|
8 |
+
-webkit-border-radius:.3em;
|
9 |
+
border-radius:.3em;
|
10 |
+
|
11 |
+
padding:6px 18px;
|
12 |
+
|
13 |
+
color: #7c868d;
|
14 |
+
font-family: Arial, Helvetica, sans-serif;
|
15 |
+
font-size: 12px;
|
16 |
+
font-weight: bold;
|
17 |
+
|
18 |
+
text-shadow:1px 1px 0px #ffffff;
|
19 |
+
|
20 |
+
border:1px solid #dfdfdf;
|
21 |
+
|
22 |
+
-moz-box-shadow:inset 0 1px 0 0 #ffffff, 0 1px 1px 0 rgba(0, 0, 0, 0.40);
|
23 |
+
-webkit-box-shadow:inset 0 1px 0 0 #ffffff, 0 1px 1px 0 rgba(0, 0, 0, 0.40);
|
24 |
+
box-shadow:inset 0 1px 0 0 #ffffff, 0 1px 1px 0 rgba(0, 0, 0, 0.40);
|
25 |
+
|
26 |
+
background: #eaeaea; /* old browsers */
|
27 |
+
background: -moz-linear-gradient(top, #fafafa 0%, #eaeaea 100%); /* firefox */
|
28 |
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fafafa), color-stop(100%,#eaeaea)); /* webkit */
|
29 |
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fafafa', endColorstr='#eaeaea',GradientType=0 ); /* ie */
|
30 |
+
background: linear-gradient(top, #fafafa 0%, #eaeaea 100%); /* W3C */
|
31 |
+
}
|
32 |
+
|
33 |
+
.form-submit-button-light:hover{
|
34 |
+
color: #7c868d !important;
|
35 |
+
border:1px solid #dfdfdf !important;
|
36 |
+
background: #f4f4f4; /* old browsers */
|
37 |
+
background: -moz-linear-gradient(top, #ffffff 0%, #f4f4f4 100%); /* firefox */
|
38 |
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#f4f4f4)); /* webkit */
|
39 |
+
background: linear-gradient(top, #ffffff 0%, #f4f4f4 100%); /* W3C */
|
40 |
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#f4f4f4',GradientType=0 ); /* ie */
|
41 |
+
}
|
42 |
+
|
43 |
+
.form-submit-button-light:active{
|
44 |
+
color: #7c868d !important;
|
45 |
+
border:1px solid #dfdfdf !important;
|
46 |
+
-moz-box-shadow:inset 0 2px 2px 0 #c7c7c7;
|
47 |
+
-webkit-box-shadow:inset 0 2px 2px 0 #c7c7c7;
|
48 |
+
box-shadow:inset 0 2px 2px 0 #c7c7c7;
|
49 |
+
|
50 |
+
background: #f0f0f0; /* old browsers */
|
51 |
+
background: -moz-linear-gradient(top, #f0f0f0 0%, #f9f9f9 100%); /* firefox */
|
52 |
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f0f0f0), color-stop(100%,#f9f9f9)); /* webkit */
|
53 |
+
background: linear-gradient(top, #f0f0f0 0%, #f9f9f9 100%); /* W3C */
|
54 |
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f0f0f0', endColorstr='#f9f9f9',GradientType=0 ); /* ie */
|
55 |
+
}
|
inc/css/formCss.css
ADDED
@@ -0,0 +1,186 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.form-all{list-style:none;list-style-position:outside;margin:0px;font-family:Verdana;font-size:12px}.form-line .form-radio-item:not(#foo) .form-radio-other + label , .form-line .form-checkbox-item .form-checkbox-other+label{width:auto}.form-line .form-radio-item .form-radio-other.form-textbox + label, .form-line .form-checkbox-item .form-checkbox-other.form-textbox+label{display:none !important}.form-line .form-radio-item:not(#foo) .form-radio-other-input.form-textbox:not([style*="margin-left: 26px"] ), .form-line .form-checkbox-item:not(#foo) .form-checkbox-other-input.form-textbox:not([style*="margin-left: 26px"] ){margin-left:0px}.form-line .form-radio-item .form-radio-other.form-textbox + label:not([style="display:block"]), .form-line .form-checkbox-item .form-checkbox-other.form-textbox+label:not([style="display:block"]){display:none}.form-captcha{border:1px
|
2 |
+
solid #ccc;background:#f5f5f5;padding:6px;width:152px;-moz-border-radius:4px 4px 4px 4px;-webkit-border-radius:4px;border-radius:4px 4px 4px 4px}.underlined{text-decoration:underline}#payment_total{display:inline-block}.form-payment-label{color:#999;display:block;font-size:9px}.form-payment-subtotal,.form-payment-shipping,.form-payment-tax{font-size:0.9em;max-width:325px;overflow:visible}.form-payment-tax.form-payment-label>span:nth-child(1){width:100%;max-width:225px !important;float:left;display:inline-block;word-wrap:break-word}.form-payment-tax.form-payment-label:after{content:"";display:table;clear:both}.form-payment-shipping.form-payment-label>span:nth-child(1){width:100%;max-width:225px !important;float:left;display:inline-block;word-wrap:break-word}.form-payment-shipping.form-payment-label:after{content:"";display:table;clear:both}.form-payment-divider{display:block;border-bottom:1px solid lightgrey;max-width:325px}.form-payment-total,.form-payment-discount{max-width:325px;display:block;overflow:visible;margin:10px
|
3 |
+
0}.form-payment-discount{font-size:10px}.form-payment-price{float:right}.form-product-custom_quantity{width:30px;padding-left:4px}#coupon-message{font-size:10px;font-weight:normal;white-space:normal}.form-captcha:hover{border:1px
|
4 |
+
solid #aaa}.form-captcha-image{border:1px
|
5 |
+
solid #aaa;-moz-border-radius:4px 4px 4px 4px;-webkit-border-radius:4px;border-radius:4px 4px 4px 4px}.form-collapse-table{height:58px;border:1px
|
6 |
+
solid #ccc;background:#f5f5f5 url(/images/soft-grad.png) repeat-x;position:relative}.form-list{padding:3px;border:1px
|
7 |
+
solid #CCC;-moz-box-shadow:0 1px 1px rgba(0, 0, 0, 0.2) inset;-webkit-box-shadow:0 1px 1px rgba(0, 0, 0, 0.2) inset;box-shadow:0 1px 1px rgba(0, 0, 0, 0.2) inset}.form-list
|
8 |
+
option{padding:2px}.form-list option:nth-child(2n+1){background:#f5f5f5}.form-textarea{font-family:"Lucida Grande",Verdana;white-space:pre-wrap}.form-textarea-limit{}.form-textarea-limit>span{display:inline-block}.form-textarea-limit
|
9 |
+
textarea{overflow:auto}.form-textarea-limit textarea:focus{outline:none !important}.form-textarea-limit-indicator{color:#666;font-size:9px;margin-top: -1px;padding:2px;text-align:right}.form-textarea-limit-indicator-error{color:red}.nicEdit-main{background-color:white}.form-line-column .nicEdit-main{white-space:normal}.form-line-column .form-sub-label{white-space:normal}.form-datetime-validation-error{background:#FAA;color:#fff}li[data-type="control_datetime"] input.form-textbox{padding:3px
|
10 |
+
3px 4px 30px;margin:0}li[data-type="control_datetime"] .form-input-wide{position:relative}li.form-line-column+li[data-type="control_head"]{display:inline-block;width:100%}li[data-type="control_datetime"] .form-input-wide .form-sub-label-container:nth-child(2) img{vertical-align:unset !important;display:block;position:absolute;left:5px;top:4px;margin:0
|
11 |
+
!important}.form-collapse-mid{text-shadow:0px 2px 0px #fff;float:left;font-size:18px;margin:16px
|
12 |
+
45px 16px 20px}.form-product-item{display:inline-block;padding:5px
|
13 |
+
5px 5px 10px;position:relative;overflow:hidden;overflow-y:auto}.form-product-item
|
14 |
+
img{display:block;position:static;margin:0
|
15 |
+
12px 0 0;float:left;-moz-border-radius:3px 3px;-webkit-border-radius:3px 3px;border-radius:3px 3px}.form-product-custom_price{text-align:right;width:70px;border:1px
|
16 |
+
solid gray;margin:0
|
17 |
+
2px;padding:2px
|
18 |
+
4px}.hover-product-item:hover{background:#f5f5f5;color:#000}.form-product-item label, .form-product-item .form-radio, .form-product-item .form-checkbox{cursor:pointer}.form-special-subtotal{display:block;font-size:10px;margin:5px
|
19 |
+
0 12px 8px;height:12px;float:left}.form-product-image,.form-product-image-with-options{margin:5px;margin-left:10px}.form-product-image-with-options{position:absolute;top:15px;-moz-border-radius:5px 5px;-webkit-border-radius:5px 5px;border-radius:5px 5px}.form-radio,.form-checkbox{vertical-align:middle !important;margin-right:10px !important;padding:0px !important}.form-radio-item,.form-checkbox-item{margin-top:5px;float:left;display:inline-flex;display: -webkit-inline-flex;display: -ms-inline-flexbox}.form-single-column .form-radio-item ,.form-single-column .form-checkbox-item{display:flex;align-items:flex-start}.form-multiple-column .form-radio-item, .form-multiple-column .form-checkbox-item{display:inline-flex;display: -webkit-inline-flex;display: -ms-inline-flexbox}.form-multiple-column[data-columncount="2"] .form-radio-item,
|
20 |
+
.form-multiple-column[data-columncount="2"] .form-checkbox-item{width:50%}.form-multiple-column[data-columncount="3"] .form-radio-item,
|
21 |
+
.form-multiple-column[data-columncount="3"] .form-checkbox-item{width:33%}.form-multiple-column[data-columncount="4"] .form-radio-item,
|
22 |
+
.form-multiple-column[data-columncount="4"] .form-checkbox-item{width:25%}.form-multiple-column[data-columncount="5"] .form-radio-item,
|
23 |
+
.form-multiple-column[data-columncount="5"] .form-checkbox-item{width:20%}.form-radio-item br, .form-checkbox-item
|
24 |
+
br{clear:left}.form-submit-button,.form-submit-reset,.form-submit-print,.form-screen-button{margin:0px;overflow:visible;padding:1px
|
25 |
+
6px;width:auto}.form-submit-button::-moz-focus-inner,.form-submit-reset::-moz-focus-inner{border:0px;padding:1px
|
26 |
+
6px}.form-submit-button.conditionallyDisabled{opacity:0.4;cursor:default;pointer-events:none}.form-button-red{border:1px
|
27 |
+
solid red}.form-button-magenta{border:1px
|
28 |
+
solid magenta}.form-screen-message{width:260px;height:100px}.form-screen-button
|
29 |
+
div{background-image:url("/images/photo.png");background-position:center;background-repeat:no-repeat;height:50px;width:50px}.form-screen-button{position:absolute;top:1px;margin:0px;margin-left:10px;padding:0px;background:#fdc000;background: -moz-linear-gradient(top, #fdc000 0%, #fe8900 100%);background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fdc000), color-stop(100%,#fe8900));background: -webkit-linear-gradient(top, #fdc000 0%,#fe8900 100%);background: -o-linear-gradient(top, #fdc000 0%,#fe8900 100%);background: -ms-linear-gradient(top, #fdc000 0%,#fe8900 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#fdc000', endColorstr='#fe8900',GradientType=0 );background:linear-gradient(top, #fdc000 0%,#fe8900 100%);-moz-box-shadow:0 1px 0 rgba(255, 255, 255, .6), 0 1px 0 rgba(255,255,255,.6) inset;-webkit-box-shadow:0 1px 0 rgba(255, 255, 255, .6), 0 1px 0 rgba(255,255,255,.6) inset;box-shadow:0 1px 0 rgba(255, 255, 255, .6), 0 1px 0 rgba(255,255,255,.6) inset;border:1px
|
30 |
+
solid #ae5d00;border-radius:5px}.form-screen-button:hover{background:#fcc932;background: -moz-linear-gradient(top, #fcc932 0%, #fc9e32 100%);background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fcc932), color-stop(100%,#fc9e32));background: -webkit-linear-gradient(top, #fcc932 0%,#fc9e32 100%);background: -o-linear-gradient(top, #fcc932 0%,#fc9e32 100%);background: -ms-linear-gradient(top, #fcc932 0%,#fc9e32 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#fcc932', endColorstr='#fc9e32',GradientType=0 );background:linear-gradient(top, #fcc932 0%,#fc9e32 100%);border:1px
|
31 |
+
solid #ae5d00}.form-screen-button:active{background:#fe8900;background: -moz-linear-gradient(top, #fe8900 0%, #fdc000 100%);background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fe8900), color-stop(100%,#fdc000));background: -webkit-linear-gradient(top, #fe8900 0%,#fdc000 100%);background: -o-linear-gradient(top, #fe8900 0%,#fdc000 100%);background: -ms-linear-gradient(top, #fe8900 0%,#fdc000 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#fe8900', endColorstr='#fdc000',GradientType=0 );background:linear-gradient(top, #fe8900 0%,#fdc000 100%);border:1px
|
32 |
+
solid #C56600;-moz-box-shadow:0 1px 0 rgba(255, 255, 255, .6), 0 -1px 0 rgba(255,255,255,.6) inset;-webkit-box-shadow:0 1px 0 rgba(255, 255, 255, .6), 0 -1px 0 rgba(255,255,255,.6) inset;box-shadow:0 1px 0 rgba(255, 255, 255, .6), 0 -1px 0 rgba(255,255,255,.6) inset}.form-screenshot-plate{background:url("/images/noises/defaultdesktop.png") repeat scroll 0 0 transparent;border:2px
|
33 |
+
solid #545454;border-radius:3px 3px 3px 3px;box-shadow:0 0 5px rgba(0, 0, 0, 0.7) inset;margin:10px
|
34 |
+
0;text-align:center}.form-screenshot-img{box-shadow:0 0 5px rgba(0, 0, 0, 0.7);margin:14px
|
35 |
+
0;display:inline-block}.form-screenshot-img
|
36 |
+
img{}.form-submit-print::-moz-focus-inner{padding:0px
|
37 |
+
6px}.form-submit-print{padding:1px
|
38 |
+
6px}.form-submit-print
|
39 |
+
img{margin-left: -14px;margin-right:3px;margin-top: -3px}.form-submit-print{margin-bottom: -4px;margin-top: -6px;margin-left: -6px;margin-right:5px}.form-submit-button-img{border:none !important;margin:0
|
40 |
+
!important;padding:0
|
41 |
+
!important;background:none !important;cursor:pointer !important;max-width:100%}.icon-encrypt~.form-submit-reset{margin-left:32px}.form-collapse-right{position:absolute;right:0px;height:58px;width:40px}.form-collapse-right-show{background:url(/images/arrow-open.png) no-repeat center}.form-collapse-right-hide{background:url(/images/arrow-closed.png) no-repeat center}.form-collapse-hidden{display:none}.form-grading-item{margin-bottom:3px}.form-header{margin:0px}.form-footer{margin:0px;text-align:center;font-size:9px;color:#999;font-weight:300}.form-subHeader{border-top:1px solid #ccc;font-style:italic}.form-header-group{background:#f5f5f5;border-bottom:1px solid #ccc;padding:12px;clear:both}.form-header-group.hasImage>.header-logo{display:table-cell}.form-header-group.hasImage>.header-text{display:table-cell;width:100%}.httal{text-align:left}.httac{text-align:center}.httar{text-align:right}.htvat{vertical-align:top}.htvam{vertical-align:middle}.htvab{vertical-align:bottom}.header-logo-left{margin-right:1em}.header-logo-right{margin-left:1em}.form-footer-group{padding:12px;clear:both}.form-line .form-label.form-label-auto.label-top{width:auto}.form-label-top{margin-bottom:6px;display:block;white-space:normal}.form-label-left{float:left;display:inline-block;text-align:left;padding:3px;white-space:normal}.form-label-right{float:left;display:inline-block;text-align:right;margin-bottom:6px;padding:3px;white-space:normal}.form-label-right+.form-input,.form-label-left+.form-input{display:inline-block}.form-section,.form-section-closed{list-style:none;list-style-position:outside;margin:0px;padding:0px;position:relative;zoom:1;clear:both}.form-section-closed{overflow:hidden;height:60px}.time-dropdown{box-shadow:0 1px 2px #eee inset;border:1px
|
42 |
+
solid #ccc;background-color:#fff}.form-line{clear:both;padding:10px;margin:0px;display:block;width:97%;width:-moz-available;position:relative}li[data-type="control_checkbox"],[data-type="control_radio"]{display:inline-block}.form-line-column{clear:none;width:auto}.form-line.form-line-column{display:inline-block}.form-line-column-clear{clear:left;width:auto}.form-line-active{background-color:#FFFFE0;color:#333}.form-matrix-table{border-collapse:collapse;font-size:10px;margin-bottom:5px}.form-matrix-column-headers{border:1px
|
43 |
+
solid #ccc;background:#ddd;color:inherit;text-align:center}.form-matrix-row-headers{border:1px
|
44 |
+
solid #ccc;background:#ddd}.form-matrix-values{border:1px
|
45 |
+
solid #ccc;background:#f5f5f5}.form-pagebreak{border-top:1px solid #ccc;background:#f5f5f5;height:60px;clear:left}.form-pagebreak-back-container,.form-pagebreak-next-container{float:left;padding:10px;padding-top:14px}.form-pagebreak-next-container{padding-left:0px}.form-pagebreak-back,.form-pagebreak-next{-webkit-border-radius:5px 5px;-webkit-box-shadow:0px 1px 2px #aaa;-moz-border-radius:5px 5px;-moz-box-shadow:0px 1px 2px #aaa;border-radius:5px 5px;box-shadow:0px 1px 2px #aaa;border:1px
|
46 |
+
solid #999;background:#ddd;padding:5px;margin:0px;font-size:14px}.form-pagebreak-next{margin:0
|
47 |
+
0 0 20px}div.form-pagebreak .form-pagebreak-back-container button.button-hidden , div.form-pagebreak .form-pagebreak-next-container button.button-hidden{display:none}.form-required{margin-left:5px;color:red}.form-scale-table{font-size:12px}.form-scale-table
|
48 |
+
th{border-bottom:1px solid #ccc;color:#999}.form-product-details{font-size:0.8em;color:inherit;font-style:normal}.form-product-options-text,.form-product-child-label{font-weight:normal;word-wrap:break-word}.form-product-child-table{margin-top:4px}.form-product-child-table td, .form-product-child-table
|
49 |
+
th{padding:2px
|
50 |
+
6px}.form-product-child-price{font-size:0.786em;font-weight:bold;font-style:italic;color:#999;min-width:80px ! important}.form-address-table{width:330px}.form-address-line{width:310px}.form-address-city,.form-address-state{width:144px}.form-address-table td, .form-address-table
|
51 |
+
th{padding-bottom:10px}.form-address-table
|
52 |
+
select{width:155px}.form-button-error{color:#FF4E5D;display:inline;text-align:center}.form-pagebreak>.form-button-error{padding:14px
|
53 |
+
10px 10px;display:block}.form-line-error{background:#FAA;color:#333}li.form-line-error input:not(#coupon-input),
|
54 |
+
li.form-line-error select,
|
55 |
+
li.form-line-error textarea,
|
56 |
+
li.form-line-error .form-validation-error{border:1px
|
57 |
+
solid #FF4E5D;box-shadow:none}.form-validation-error.form-input{border:none}.form-line-active .form-error-message{display:none}.form-error-message{z-index:900;position:absolute;max-width:130px;right:0px;top:0px;color:#333;padding:3px;font-size:10px;border:4px
|
58 |
+
solid #d88;box-shadow:0px 2px 4px rgba(102, 102, 102, 0.5);border-radius:6px 6px;background:#FCC}.form-error-arrow{position:absolute;top:-16px;left:10px;height:0px;width:0px;border:8px
|
59 |
+
solid transparent;border-bottom-color:#666;border-bottom:8px solid rgba(102,102,102,0.3)}.form-error-arrow-inner{position:absolute;top:1px;height:0px;width:0px;border:10px
|
60 |
+
solid transparent;border-bottom-color:#FCC;border-bottom-width:11px;left:-10px;top:-10px}.form-input .form-error-message, .form-input-wide .form-error-message{bottom:-5px;font-size:11px;position:relative;z-index:900;right:auto;top:auto;color:#333;padding:3px;max-width:100%;padding-bottom:3px;font-size:12px;border:none;box-shadow:0px 2px 4px rgba(102, 102, 102, 0.5);border-radius:6px 6px;background:#FCC}.form-description{z-index:1000;position:absolute;right:7px;max-width:150px;top:6px;border:4px
|
61 |
+
solid #ccc;border-radius:6px 6px;box-shadow:0px 2px 4px #666;background:#f5f5f5;white-space:normal}.form-description-content{padding:10px;font-size:10px;color:#333}.form-description-arrow{border-color:transparent #CCC transparent transparent;border-style:solid;border-width:10px;height:0;width:0;left:-24px;top:7px;position:absolute}.form-description-arrow-small{border-color:transparent #F5F5F5 transparent transparent;border-style:solid;border-width:7px;height:0;width:0;left:-14px;top:10px;position:absolute}.right{right:33px !important;float:none !important}.form-line:hover .form-description-indicator, .form-line-active .form-description-indicator{display:block}.form-description-indicator{display:none;height:100%;position:absolute;right:0;top:0;width:25px;background:url(/images/s-info.png) no-repeat center}.right .form-description-arrow{border-color:transparent transparent transparent #CCC;left:auto;right:-24px}.right .form-description-arrow-small{border-color:transparent transparent transparent #F5F5F5;left:auto;right:-14px}.form-autocomplete-list{font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px;background:#333;background:rgba(26,58,81,0.8);border:1px
|
62 |
+
solid #eee;border-top:none;padding:5px
|
63 |
+
0;-moz-border-radius-bottomright:10px 10px;-moz-border-radius-bottomleft:10px 10px;-moz-box-shadow:0px 5px 10px rgba(0,0,0,0.6);-webkit-border-bottom-right-radius:10px 10px;-webkit-border-bottom-left-radius:10px 10px;-webkit-box-shadow:0px 5px 10px rgba(0,0,0,0.6);border-radius-bottom-right:10px 10px;border-radius-bottom-left:10px 10px;box-shadow:0px 5px 10px rgba(0,0,0,0.6)}.form-autocomplete-list-item{margin:0
|
64 |
+
5px;border:1px
|
65 |
+
solid transparent;color:#fff;padding:3px;-moz-border-radius:5px 5px;-webkit-border-radius:5px;border-radius:5px 5px;text-shadow:1px 1px 3px #000;cursor:pointer}.form-autocomplete-list-item-selected,.form-autocomplete-list-item:hover{box-shadow:0 0 4px #333;border:1px
|
66 |
+
solid #1a3a51;background:#4295D1}.form-autocomplete-list-item:hover{border:1px
|
67 |
+
solid #ccc}.form-sub-label-container{display:inline-block;margin-right:5px}.form-sub-label{color:#999;display:block;font-size:9px;margin-bottom:3px;word-wrap:break-word}.form-html{padding:3px;white-space:normal}[data-type="control_text"] .form-html
|
68 |
+
img{max-width:100%;height:auto}.form-radio-other-input,.form-checkbox-other-input{width:100px}.form-radio-item label , .form-checkbox-item
|
69 |
+
label{width:100%}.form-spinner-input-td{white-space:normal}.form-spinner-input-td input[type="number"]::-webkit-inner-spin-button,
|
70 |
+
.form-spinner-input-td input[type="number"]::-webkit-outer-spin-button{display:none}.edit-hover{display:none}.form-custom-hint{color:#aaa !important;overflow:hidden !important}.filePicker-button{border-style:solid;border-width:1px;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);cursor:pointer;display:inline-block;vertical-align:middle;padding:9px
|
71 |
+
24px;margin-bottom:0;font-size:13px;line-height:18px;text-align:center;color:#FFF;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background:#0074CC;background: -moz-linear-gradient(top, #08c 0%, #05c 100%);background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#0088cc), color-stop(100%,#0055cc));background: -webkit-linear-gradient(top, #08c 0%,#05c 100%);background: -o-linear-gradient(top, #08c 0%,#05c 100%);background: -ms-linear-gradient(top, #08c 0%,#05c 100%);background:linear-gradient(to bottom, #08c 0%,#05c 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#0088cc', endColorstr='#0055cc',GradientType=0 );-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;-moz-box-shadow:0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 2px rgba(0, 0, 0, 0.05);-webkit-box-shadow:0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 2px rgba(0,0,0,0.05)}.filePicker-button:hover{background:#00a0f0;background: -moz-linear-gradient(top, #00a0f0 0%, #0064f0 100%);background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#00a0f0), color-stop(100%,#0064f0));background: -webkit-linear-gradient(top, #00a0f0 0%,#0064f0 100%);background: -o-linear-gradient(top, #00a0f0 0%,#0064f0 100%);background: -ms-linear-gradient(top, #00a0f0 0%,#0064f0 100%);background:linear-gradient(to bottom, #00a0f0 0%,#0064f0 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#00a0f0', endColorstr='#0064f0',GradientType=0 )}.filePicker-button:active{background:#0064f0;background: -moz-linear-gradient(top, #0064f0 0%, #00a0f0 100%);background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#0064f0), color-stop(100%,#00a0f0));background: -webkit-linear-gradient(top, #0064f0 0%,#00a0f0 100%);background: -o-linear-gradient(top, #0064f0 0%,#00a0f0 100%);background: -ms-linear-gradient(top, #0064f0 0%,#00a0f0 100%);background:linear-gradient(to bottom, #0064f0 0%,#00a0f0 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#0064f0', endColorstr='#00a0f0',GradientType=0 )}.qq-uploader{position:relative;width:224px}.qq-upload-button{background:#ffa84c;background: -moz-linear-gradient(top, #FBCB5D 0%, #EFA003 100%);background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#FBCB5D), color-stop(100%,#EFA003));filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#FBCB5D', endColorstr='#EFA003',GradientType=0 );color:#FFF;display:block;font-size:16px;padding:8px
|
72 |
+
0;text-align:center;text-shadow:0 -1px #C64F00;border:1px
|
73 |
+
solid #C64F00;-moz-border-radius:5px 5px;-webkit-border-radius:5px 5px;border-radius:5px 5px}.qq-upload-button-hover{background:#ff7b0d;background: -moz-linear-gradient(top, #ff7b0d 0%, #ffa84c 100%);background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ff7b0d), color-stop(100%,#ffa84c));filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#ff7b0d', endColorstr='#ffa84c',GradientType=0 )}.qq-upload-button-focus{outline:1px
|
74 |
+
dotted black}.qq-upload-delete{display:none;top:0px;position:absolute;background:#f85032;background: -moz-linear-gradient(top, #f85032 0%, #f16f5c 50%, #f6290c 51%, #f02f17 71%, #e73827 100%);background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f85032), color-stop(50%,#f16f5c), color-stop(51%,#f6290c), color-stop(71%,#f02f17), color-stop(100%,#e73827));filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#f85032', endColorstr='#e73827',GradientType=0 );width:20px;height:100%;right:0px;color:#fff;line-height:20px;text-align:center;text-shadow:0 -1px 0px #000;-moz-border-radius:0px 5px 5px 0px;-webkit-border-radius:0px 5px 5px 0px;border-radius:0px 5px 5px 0px;border-left:1px solid #aaa;cursor:pointer;box-sizing:border-box}.qq-upload-delete:hover{background:#ffb76b;background: -moz-linear-gradient(top, #ffb76b 0%, #ffa73d 50%, #ff7c00 51%, #ff7f04 100%);background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffb76b), color-stop(50%,#ffa73d), color-stop(51%,#ff7c00), color-stop(100%,#ff7f04));filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffb76b', endColorstr='#ff7f04',GradientType=0 )}.qq-upload-list li:hover{border:1px
|
75 |
+
solid #aaa}.qq-upload-success:hover .qq-upload-delete{display:block}.qq-upload-fail:hover .qq-upload-delete{display:block}.qq-upload-drop-area{position:absolute;top:0;left:0;width:100%;height:100%;min-height:54px;z-index:2;background:#F5F5F5;background:rgba(240, 240, 240, 0.9);text-align:center;color:#B1B1B1;border:2px
|
76 |
+
dashed #c5c5c5;-moz-border-radius:5px 5px;-webkit-border-radius:5px 5px;border-radius:5px 5px}.qq-upload-drop-area
|
77 |
+
span{display:block;position:absolute;top:50%;width:100%;margin-top:-10px;font-size:16px}.qq-upload-drop-area-active{background:lightyellow;background:rgba(222,255,210,0.9)}.qq-upload-list{margin:10px
|
78 |
+
0;padding:0;list-style:none}.qq-upload-list
|
79 |
+
li{position:relative;font-size:11px;margin:8px
|
80 |
+
0;color:#5E5B5B;padding:2px
|
81 |
+
4px;background:#EEE;-moz-border-radius:5px 5px;-webkit-border-radius:5px 5px;border-radius:5px 5px;white-space:normal;border:1px
|
82 |
+
solid transparent}.qq-upload-file,.qq-upload-spinner,.qq-upload-size,.qq-upload-cancel,.qq-upload-failed-text{font-size:0.8em;line-height:16px}.qq-file-uploading{display:inline-block;overflow:hidden;white-space:nowrap;width:80px}.qq-upload-failed-text{float:right}.qq-upload-fail{background:#FF927D !important;color:#fff !important}.qq-upload-fail .qq-upload-size{display:none !important}.qq-upload-file{}.qq-upload-spinner{display:inline-block;background:url("/images/loading.gif");width:15px;height:15px;vertical-align:text-bottom;margin-bottom:3px;margin-left:2px}.qq-upload-size,.qq-upload-cancel{float:right;margin-left:4px}.qq-upload-failed-text{display:none}.qq-upload-fail .qq-upload-failed-text{display:inline}.fb-login-label{color:#888;font-size:11px;line-height:23px}.braintree-hosted-fields{background:rgb(255, 255, 255) none repeat scroll 0% 0% / auto padding-box border-box;display:inline-block;width:147px;height:17px;border:1px
|
83 |
+
solid lightgrey;padding:3px;box-shadow:0 1px 2px #eee inset}.braintree-hosted-fields-focused{border:1px
|
84 |
+
solid #FFD300 !important;box-shadow:0px 0px 3px #FFF0AA}.square-hosted-fields{background:rgb(255, 255, 255) none repeat scroll 0% 0% / auto padding-box border-box;display:inline-block;width:147px;height:17px;border:1px
|
85 |
+
solid lightgrey;padding:3px}@media screen and (-webkit-min-device-pixel-ratio:0){.braintree-hosted-fields-focused{outline:rgb(59, 153, 252) auto 5px;border:1px
|
86 |
+
solid lightgrey !important}}.braintree-addons-box{border-radius:5px;background-color:#efefef;padding:5px;margin:6px
|
87 |
+
0 0 18px;font-size:12px;line-height:16px}.paypalpro_img{width:40px;height:26px;padding-right:7px}.paypalpro_visa{background:url('/images/credit-card-logo.png') no-repeat 0 0}.paypalpro_mc{background:url('/images/credit-card-logo.png') no-repeat -47px 0}.paypalpro_amex{background:url('/images/credit-card-logo.png') no-repeat -94px 0}.paypalpro_dc{background:url('/images/credit-card-logo.png') no-repeat -141px 0}.payment-form-deposits-table{width:100%;padding:40px
|
88 |
+
35px;box-sizing:border-box}.payment-form-deposits-table.active{display:block!important}.payment-form-deposits-table
|
89 |
+
th{font-size:22px;border-bottom:1px solid #e6e6e6;padding-bottom:15px}.payment-form-deposits-table tbody tr:nth-child(2) td{padding-bottom:30px}.payment-form-deposits-table tbody .deposits td:first-child{width:200px}.payment-form-deposits-table .deposit-b
|
90 |
+
td{border-bottom:1px solid #e6e6e6;padding-bottom:30px}.payment-form-deposits-table .deposits td:nth-of-type(2){position:relative}.payment-form-deposits-table .deposits td:nth-of-type(2)::after{content:'$';display:block;position:absolute;left:4px;top:0%;transform:translateY(5px);font-size:14px;opacity:0.6}.payment-form-deposits-table .deposits
|
91 |
+
input{padding-left:18px}.payment-form-deposits-table .verifyButtonTr
|
92 |
+
td{padding-left:156px;padding-top:34px}.payment-form-deposits-table
|
93 |
+
.verifyButton{padding:9px
|
94 |
+
15px;font-family:"Lucida Grande",sans-serif;font-size:14px;font-weight:normal;display:block;border:1px
|
95 |
+
solid #ccc;color:#666;text-shadow:0 1px #fff;cursor:pointer;border-radius:3px 3px;box-shadow:0 1px #fff inset, 0 1px #ddd;background:#f5f5f5;background:linear-gradient(top, #f5f5f5 0%,#eee 100%)}.payment-form-deposits-table .verifyButton:hover{background:#fff;background:linear-gradient(top, #fff 0%,#f5f5f5 100%)}@media only screen and (max-device-width: 550px){.payment-form-deposits-table .deposits
|
96 |
+
td{display:block}.payment-form-deposits-table .deposit-b td:nth-of-type(1){padding-bottom:10px;border-bottom:0}}#recaptcha_logo{display:none}#recaptcha_tagline{display:none}#recaptcha_table{border:none !important}.recaptchatable .recaptcha_image_cell,#recaptcha_table{background-color:transparent !important}#recaptcha_table
|
97 |
+
td{padding-left:0px !important}.always-hidden{display:none !important}.dropdown-match-height{min-height:24px}.signature-pad-passive,.signature-pad-wrapper{border:1px
|
98 |
+
solid #9D9D9D;color:#444;position:relative}.signature-pad-passive .signature-line{border:1px
|
99 |
+
solid #444;width:80%;position:absolute;bottom:50px;left:10%;right:10%}.signature-pad-wrapper .clear-pad-btn{cursor:pointer;text-decoration:underline;float:right;font-weight:bold;font-size:12px}.form-single-column
|
100 |
+
.clearfix{display:inline-block}.form-single-column
|
101 |
+
.clearfix{display:block}@media only screen and (max-device-width: 550px){body{font-size:18px}.form-all{width:auto !important}.form-label-left{float:none;display:block}.form-buttons-wrapper{margin:5px
|
102 |
+
!important;text-align:center}.form-textarea{width:94% !important;white-space:pre-wrap}span .time-dropdown{box-shadow:0 1px 2px #eee inset;border:1px
|
103 |
+
solid #ccc;background-color:#fff}.form-textbox,.form-textarea,.form-dropdown,.form-list{border:1px
|
104 |
+
solid #555;padding:4px;-webkit-border-radius:5px 5px;-webkit-box-shadow:0 2px 4px rgba(0,0,0, 0.4) inset;-moz-border-radius:5px 5px;-moz-box-shadow:0 2px 4px rgba(0,0,0, 0.4) inset;border-radius:5px 5px;box-shadow:0 2px 4px rgba(0,0,0, 0.4) inset}.form-address-table{width:300px}.form-address-line{width:280px}.form-address-city,.form-address-state{width:130px}.form-address-table td, .form-address-table
|
105 |
+
th{padding-bottom:10px}.form-address-table
|
106 |
+
select{width:120px}.form-spinner{max-width:100% !important;overflow:hidden;padding-right:105px !important;border-radius:5px}.form-spinner-up{margin-right:1px}[class*="form-spinner-"] img{width:10px !important;height:8px !important;margin: -4px 0 0 -5px !important}.form-spinner-up,.form-spinner-down{display:inline-block !important;width:52px !important;height:100% !important}div.form-spinner-input-td
|
107 |
+
input{padding:9px
|
108 |
+
6px !important;background:none}.form-sub-label-container img[id*="pick"]{}div.form-header-group{margin:0px
|
109 |
+
!important}div.form-pagebreak .form-label-left{display:inline-block !important;float:left}.form-submit-button,.form-submit-reset{font-size:18px;line-height:30px}.form-captcha{border:1px
|
110 |
+
solid #555}.form-captcha
|
111 |
+
input{width:120px !important}.custom-field-frame,.direct-embed-widgets,.signature-pad-wrapper{width:100% !important}.u-responsive-lightbox{width:90%!important}.u-responsive-lightbox .jt-title,
|
112 |
+
.u-responsive-lightbox .jt-content,
|
113 |
+
.u-responsive-lightbox .js-form-content{width:100%!important}.form-product-custom_price{width:35px}}.clearfix2:before,.clearfix2:after{content:" ";display:table}.clearfix2:after{clear:both}input[type=number]{-moz-appearance:textfield}input[id*="_donation"]{width:46px}input[type=number]::-webkit-outer-spin-button,input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.form-submit-button.icon-encrypt{position:relative}.form-submit-button.icon-encrypt+button{margin-left:25px}.form-submit-button.icon-encrypt:before{content:url("/images/security-icon.png");display:inline-block;position:absolute;width:32px;height:32px;right: -36px;top:50%;margin-top: -16px;box-sizing:border-box;padding-top:4px}.form-submit-button.icon-encrypt:after{content:"This form is encrypted";display:none;position:absolute;width:128px;background-color:rgba(0, 0, 0, 0.85);text-shadow:none;color:#eee;font-size:10px;top:50%;right: -166px;padding:5px
|
114 |
+
0 4px;border-radius:2px;-moz-border-radius:2px;-webkit-border-radius:2px;line-height:15px;margin-top: -12px}.form-submit-button.icon-encrypt:hover:after{display:inline-block}.jotform-ad{background:red;display:block !important;visibility:visible !important}.jotform-ad>a{text-decoration:none !important;color:#aaa !important}.jotform-ad>a+a{color:#f38632 !important}.jf-branding:hover{color:orange !important;opacity:1 !important}.overlay{position:fixed;width:100%;height:100%;background:rgba(0,0,0,.5);top:0;left:0;z-index:1001}.overlay-content{position:absolute;display:inline-block;transform:translate(-50%, -50%);left:50%;top:50%;background:#fff;padding:20px;box-shadow:0 3px 5px 0 rgba(0,0,0,.2)}.img-wrapper
|
115 |
+
img{display:block}.lb-prev-button,.lb-next-button{position:absolute;width:70px;height:70px;top:50%;margin-top: -35px;color:transparent;cursor:pointer;opacity:0;transition:opacity .15s ease;background-repeat:no-repeat;background-position:center center}.lb-prev-button{left: -70px;background-image:url(https://cdn.jotfor.ms/assets/img/v3/lightbox/prev.png)}.lb-next-button{right: -70px;background-image:url(https://cdn.jotfor.ms/assets/img/v3/lightbox/next.png)}.lb-close-button{display:none;position:absolute;width:40px;height:40px;top: -40px;right: -4px;color:transparent;cursor:pointer;background:url(https://cdn.jotfor.ms/assets/img/v3/lightbox/close.png) center center no-repeat}.overlay-content:hover .lb-prev-button,
|
116 |
+
.overlay-content:hover .lb-next-button{opacity:1}.new-file{position:relative;width:240px}.new-file-button{display:none}.new-file-droparea{background:rgba(240,240,240,0.9);border-color:rgba(180,180,180,0.9)}.new-file-droparea:hover{background:rgba(255,255,255,0.9);border-color:rgba(210,210,210,0.9)}.new-file-list{list-style:none;padding:0;max-width:300px}.new-file-list
|
117 |
+
li{max-width:280px;font-size:0.875em;line-height:2em;padding:6px
|
118 |
+
60px 6px 6px;position:relative;border-bottom:1px solid #eee;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.new-file-list li:first-child{border-top:1px solid #eee;margin-top:12px}.new-file-progress-bar{position:absolute;bottom: -1px;left:0;height:2px;background-color:#3f91f7}.new-file-abort{position:absolute;top:50%;right:0;font-size:10px;width:18px;height:18px;margin-top: -10px;line-height:17px;text-align:center;border-radius:50%;cursor:pointer;border:1px
|
119 |
+
solid #aaa;color:#aaa;display:none}.new-file-list li:hover .new-file-abort{display:block}.new-file-list li:hover .new-file-size{display:none}.new-file-abort:hover{border-color:#fd6847;color:#fd6847;transition:all 0.3s ease}.new-file-size{position:absolute;top:50%;right:0;line-height:18px;margin-top: -9px;text-align:center;font-weight:700}.new-file-progress-number{display:none}.form-html
|
120 |
+
ul{list-style:disc outside}.form-html
|
121 |
+
ol{list-style:decimal}.embed-dropdown{cursor:pointer;position:relative;display:inline-block;font-size:12px;margin-top:12px;margin-left:12px;float:right;background:#FC7C01;color:white;line-height:16px;text-decoration:none;padding:6px
|
122 |
+
0;border:none;box-shadow:0px 0px 4px black}.embed-dropdown:after{content:'';position:absolute;right:6px;top:12px;display:inline-block;width:0;height:0;vertical-align:middle;border-top:4px dashed;border-right:4px solid transparent;border-left:4px solid transparent}.embed-dropdown label:nth-of-type(1){cursor:pointer}.embed-dropdown .btn-dropdown{padding:6px
|
123 |
+
20px 6px 10px}.embed-dropdown-open{display:none}.embed-dropdown-overlay{display:none !important;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1}.embed-dropdown-inner{list-style:none;position:absolute;opacity:0;visibility:hidden;z-index:2;margin:6px
|
124 |
+
0 0 -14px;padding:10px;background:#FFF;border:1px
|
125 |
+
solid rgba(0,0,0,.15)}.embed-dropdown-inner
|
126 |
+
li{margin-bottom:5px}.embed-dropdown-inner
|
127 |
+
a{display:block;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap;text-decoration:none;text-align:left;padding:0
|
128 |
+
5px}.embed-dropdown-inner a:hover{color:#fc7c01}.embed-dropdown-open:checked~.embed-dropdown-inner{opacity:1;visibility:visible}.embed-dropdown-open:checked~.embed-dropdown-overlay{display:block !important}@media screen and (max-device-width:40em){div.form-all:before{background-size:contain}.fb-like-box{width:98%!important}.form-checkbox-item,.form-radio-item{white-space:normal!important}.form-line,.form-line.form-line-column{padding:12px;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.form-radio-item .form-radio-other-input.form-textbox , .form-checkbox-item .form-checkbox-other-input.form-textbox{width:77% !important}.form-dropdown,.form-textarea,.form-textbox{width:100%!important;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}div .form-label-left,div .form-label-right{display:block;float:none;width:auto!important}.form-label-right{text-align:right !important}div.form-label-left{text-align:left !important}.form-buttons-wrapper{margin-left:0!important}.form-all{width:95%}span.form-sub-label-container+span.form-sub-label-container{margin-right:0}.form-address-table td,.form-address-table
|
129 |
+
th{padding:0
|
130 |
+
1px 10px}.form-submit-button,.form-submit-print,.form-submit-reset{width:100%;margin-left:0!important}div[id*=at_]{font-size:14px;font-weight:700;height:8px;margin-top:6px}.showAutoCalendar{width:20px}img.form-image{max-width:100%;height:auto}.form-matrix-row-headers{width:100%;word-break:break-all;min-width:40px}.form-collapse-table,.form-header-group{margin:0}.form-collapse-table{height:100%;display:inline-block;width:100%}.form-collapse-hidden{display:none!important}.form-address-city,.form-address-line,.form-address-postal,.form-address-state,.form-address-table,.form-address-table .form-sub-label-container,.form-address-table select,.form-input{width:100%}.form-sub-label{white-space:normal}.form-pagebreak-back-container,.form-pagebreak-next-container{width:50%!important}.form-pagebreak-back,.form-pagebreak-next,.form-product-item.hover-product-item{width:100%}.form-pagebreak-back-container{padding:0;text-align:right}.form-pagebreak-next-container{padding:0;text-align:left}.form-pagebreak{margin:0
|
131 |
+
auto}.form-sub-label-container{margin-right:0;float:left;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}[data-type=control_fullname] .form-sub-label-container:first-child{margin-right:4%}[data-type=control_fullname] .form-sub-label-container{width:48%}[data-type=control_phone] .form-sub-label-container:first-child{width:31%;margin-right:4%}[data-type=control_phone] .form-sub-label-container{width:65%}[data-type=control_datetime] .form-sub-label-container+.form-sub-label-container,[data-type=control_datetime] .form-sub-label-container:first-child{width:27.3%;margin-right:6%}[data-type=control_datetime] .form-sub-label-container+.form-sub-label-container+.form-sub-label-container{width:33.3%;margin-right:0}[data-type=control_datetime] span+span+span>span:first-child{display:block;width:100%!important}li[data-type=control_birthdate] .form-sub-label-container,li[data-type=control_datetime] span+span+span>span:first-child+span+span,li[data-type=control_time] .form-sub-label-container{width:16%!important;margin-right:4%!important}li[data-type=control_birthdate] .form-sub-label-container:last-child,li[data-type=control_time] .form-sub-label-container:last-child{width:16%!important;margin-right:0!important}.form-error-message{clear:both;bottom:-10px}.date-separate,.phone-separate{display:none}.custom-field-frame,.direct-embed-widgets,.signature-pad-wrapper{width:100%!important}}@media
|
132 |
+
print{.supernova,body{height:auto !important}.form-all{-webkit-print-color-adjust:exact}.formFooter{display:none}}.formFooter-heightMask{height:56px}.formFooter{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";position:fixed;left:0;right:0;bottom:0;color:#eee;padding:11px
|
133 |
+
10px 11px 141px;background-color:#414247;text-align:left;z-index:901}.formFooter-rightSide{width:100%;text-align:right}.formFooter-logoLink{position:absolute;z-index:3;left:10px;top:50%;margin-top: -22px}.formFooter-logo{display:block;width:auto;margin:0
|
134 |
+
auto}.formFooter-text{vertical-align:middle;color:#bfbfbf;font-size:12px;display:inline-block}.formFooter-button{display:inline-block;background-color:#63c453;text-align:center;vertical-align:middle;padding:10px
|
135 |
+
18px;color:#fff;border-radius:3px;margin-left:15px;font-size:14px;line-height:1;text-decoration:none;transition:background-color .3s}.formFooter-button:hover{background-color:#52bf41}@media screen and (min-width: 981px){.formFooter-text{font-size:14px}.formFooter-button{font-size:16px}}@media screen and (max-width: 640px){.formFooter-button{margin-left:0;padding:10px
|
136 |
+
12px;font-size:12px}}@media screen and (max-width: 480px) and (min-width: 280px){.allowTime-container{width:100%}.formFooter-heightMask{height:76px}.form-header-group.hasImage>.header-text{width:auto}}@media screen and (max-width: 400px){.formFooter.formFooter-new .formFooter-button{font-size:11px}.form-description{right:7px !important}}@media screen and (max-width: 348px){.formFooter.formFooter-new .formFooter-logoLink{width:27px;overflow:hidden}}@media screen and (max-width: 279px){.formFooter-heightMask{height:45px}.formFooter-button{margin-left:0;padding:10px
|
137 |
+
12px;font-size:12px}.formFooter.formFooter-new .formFooter-button{font-size:12px}.form-header-group.hasImage>.header-text{width:auto}}@media screen and (max-width: 641px){.formFooter-rightSide:before{left:147px}}@media screen and (max-width: 380px){.formFooter{padding-left:10px}.formFooter-logoLink{display:none}.formFooter-rightSide{text-align:center}}.translate-popup:after{content:'';position:fixed;width:100%;height:100%;background:rgba(0,0,0,0.75);top:0;left:0;z-index:10001}.footerTranslationLink,.footerTranslationLink:hover{border:none;background:transparent;color:#f90;text-decoration:none;font-size:12px;margin:8px
|
138 |
+
0 0 0;padding:0}.translate-footer-popup{position:fixed;width:506px;height:440px;top:50%;left:50%;margin: -220px 0 0 -253px;-moz-box-shadow:0 0 10px 1px rgba(0,0,0,.5);-webkit-box-shadow:0 0 10px 1px rgba(0,0,0,.5);box-shadow:0 0 10px 1px rgba(0,0,0,.5);-moz-transition:none;-webkit-transition:none;-o-transition:color 0 ease-in;transition:none;z-index:10002}.translate-footer-popup
|
139 |
+
.ts_title{position:relative}.translate-footer-popup .ts_title
|
140 |
+
button{border:none;position:absolute;top:18px;right:18px;background:#ccc;color:#fff;font-size:15px;font-weight:700;text-align:center;line-height:20px;width:24px;height:24px;cursor:pointer;text-shadow:0 1px 0 #bbb;-moz-box-shadow:0 1px 1px rgba(0,0,0,.1) inset;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.1) inset;box-shadow:0 1px 1px rgba(0,0,0,.1) inset;-moz-border-radius:100%;-webkit-border-radius:100%;border-radius:100%;text-decoration:none;min-width:initial}.translate-footer-popup
|
141 |
+
iframe{width:100%;height:100%;border:none;background:#FFF}li[data-type="control_mixed"] .form-input , li[data-type="control_mixed"] .form-input>div{width:320px}li[data-type="control_mixed"] .form-sub-label-container{float:left;margin-right:10px}li[data-type="control_mixed"] .form-sub-label-container[data-colsize="1"], li[data-type="control_mixed"] .form-sub-label-container input, li[data-type="control_mixed"] .form-sub-label-container
|
142 |
+
select{width:100%;box-sizing:border-box}li[data-type="control_mixed"] .form-sub-label-container[data-colsize="2"]{width:150px}li[data-type="control_mixed"] .form-sub-label-container[data-colsize="1"] input, li[data-type="control_mixed"] .form-sub-label-container[data-colsize="1"] select{width:310px}.jfRadio-label{display:inline-block}.jfRadio-labelText{margin-top:5px;display:inline-block}.jfRadio-image{width:60px;height:60px;background-size:cover;background-position:center;background-repeat:no-repeat}.jfRadio-input.form-radio{margin:25px
|
143 |
+
5px 0 0;position:relative}.black-friday-2018{display:none}.eoy-2018{display:none;background-color:#04003F;overflow:hidden}.eoy-2018 .formFooter-content::before{content:'';position:absolute;width:98vw;height:90px;border-radius:100%;top:0;z-index:2;left:110px;background:#0c0a5e;-ms-transform:translateY(-60%) translateX(-5vw);transform:translateY(-60%) translateX(-5vw)}.eoy-2018 .formFooter-rightSide .formFooter-text .formFooter-text-left{display:inline-block;vertical-align:middle}.eoy-2018 .formFooter-rightSide .formFooter-text .formFooter-text-right{display:inline-block;vertical-align:middle;padding-left:16px}.eoy-2018 .formFooter-rightSide .formFooter-text .formFooter-text-left
|
144 |
+
svg{height:20px;max-width:auto}.eoy-2018 .formFooter-rightSide{z-index:3;position:relative}.eoy-2018 .formFooter-rightSide .formFooter-button-container{display:inline-block;vertical-align:middle}.eoy-2018 .formFooter-rightSide .formFooter-button-container .formFooter-button{background-color:#35c300;font-weight:bold;border-radius:20px;padding:8px
|
145 |
+
22px;margin:4px
|
146 |
+
0 4px 15px}@media screen and (max-width: 780px){.eoy-2018 .formFooter-rightSide .formFooter-text{text-align:center;width:auto}.eoy-2018 .formFooter-rightSide .formFooter-text .formFooter-text-left{display:block;padding-top:0;padding-bottom:4px}.eoy-2018 .formFooter-rightSide .formFooter-text .formFooter-text-right{display:block;padding-left:0}.eoy-2018 .formFooter-rightSide .formFooter-button-container{padding-top:8px}}@media screen and (max-width: 550px){.eoy-2018 .formFooter-rightSide .formFooter-text .formFooter-text-left
|
147 |
+
svg{height:13px;width:auto}.eoy-2018 .formFooter-rightSide .formFooter-text .formFooter-text-right
|
148 |
+
svg{height:20px;width:auto}.formFooter .formFooter-text{margin-bottom:6px}}@media screen and (max-width: 480px){.eoy-2018 .formFooter-rightSide .formFooter-text{display:inline-block}.eoy-2018 .formFooter-rightSide .formFooter-button-container{padding-top:0px}}@media screen and (max-width: 430px){.eoy-2018 .formFooter-logoLink{display:none}}@media screen and (max-width: 640px){.form-header-group.hasImage{text-align:center;margin:0
|
149 |
+
auto}.header-logo-left{margin-right:0}.form-header-group.hasImage>.header-logo{display:block}.form-header-group.hasImage>.header-text{text-align:center}.form-header-group.hasImage>.header-text{text-align:center}.form-header-group .form-header{font-size:130%}}.jHabit{display:block;padding:0;margin: -10px auto}.jHabit-wrapper{display:flex;align-items:stretch}.jHabit-wrapper
|
150 |
+
span{display:block;font-size:15px;color:#fff;opacity: .65}.jHabit-wrapper .jHabit-icon{display:flex;align-items:center;justify-content:center;width:100px}.jHabit-wrapper .jHabit-icon
|
151 |
+
.iconSvg{width:70px;height:70px;background:#fff;display:flex;align-items:center;justify-content:center;border-radius:4px}.jHabit-wrapper .jHabit-icon .iconSvg
|
152 |
+
svg{display:block;width:70px}.isMobile .jHabit-wrapper .jHabit-icon{display:none}.jHabit-wrapper .jHabit-name{position:relative;flex:1;display:inherit;color:#fff;font-size:16px;overflow:hidden;flex-direction:column;justify-content:center}.jHabit-wrapper .jHabit-name
|
153 |
+
span{width:100%;text-align:left}.isMobile .jHabit-wrapper .jHabit-name{padding-left:20px;font-size:14px}.jHabit-wrapper .jHabit-name .editor-container{z-index:1}.jHabit-wrapper .jHabit-name
|
154 |
+
.iconSvg{position:absolute;right: -30px;top: -27px;width:180px}.isMobile .jHabit-wrapper .jHabit-name
|
155 |
+
.iconSvg{width:70px;left: -20px;top:0}.jHabit-wrapper .jHabit-status{position:relative;display:inherit;align-items:center;justify-content:center;width:100px;height:100px;flex-direction:column}.jHabit-wrapper .jHabit-status
|
156 |
+
span{margin-bottom:5px}.jHabit-wrapper .jHabit-status
|
157 |
+
input{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);width:40px;height:40px;opacity:0;margin:0;cursor:pointer;z-index:3}.jHabit-wrapper .jHabit-status input:checked+.statusIcon{background:url(https://cdn.jotfor.ms/assets/img/builder/daily-habit-tracker/done_white.svg) no-repeat center;animation:habitScale .3s linear}.jHabit-wrapper .jHabit-status input:checked+.statusIcon:after{animation:habitBlink .7s linear}.jHabit-wrapper .jHabit-status input+.statusIcon{background:url(https://cdn.jotfor.ms/assets/img/builder/daily-habit-tracker/waiting_white.svg) no-repeat center}.jHabit-wrapper .jHabit-status input:disabled+.statusIcon{background:url(https://cdn.jotfor.ms/assets/img/builder/daily-habit-tracker/waiting_white.svg) no-repeat center;animation:habitScale .3s linear}.jHabit-wrapper .jHabit-status input.past+.statusIcon{background:url(https://cdn.jotfor.ms/assets/img/builder/daily-habit-tracker/undone_white.svg) no-repeat center;animation:habitScale .3s linear}.jHabit-wrapper .jHabit-status
|
158 |
+
.statusIcon{position:relative;width:40px;height:40px;z-index:2}.jHabit-wrapper .jHabit-status .statusIcon:after{content:'';position:absolute;background-color:rgba(255, 255, 255, 0.6);border-radius:50%;z-index:1}.isMobile .jHabit-wrapper .jHabit-status{width:70px;height:70px}.jHabit-wrapper.green{background-color:#A1C32F}.jHabit-wrapper.green .jHabit-status{background-color:#90ae2a}.jHabit-wrapper.green .jHabit-icon
|
159 |
+
.iconSvg{fill:#A1C32F}.jHabit-wrapper.green .jHabit-name
|
160 |
+
.iconSvg{fill:#90ae2a}.jHabit-wrapper.orange{background-color:#F1AC44}.jHabit-wrapper.orange .jHabit-status{background-color:#efa12c}.jHabit-wrapper.orange .jHabit-icon
|
161 |
+
.iconSvg{fill:#F1AC44}.jHabit-wrapper.orange .jHabit-name
|
162 |
+
.iconSvg{fill:#efa12c}.jHabit-wrapper.blue{background-color:#4B73DD}.jHabit-wrapper.blue .jHabit-status{background-color:#3662d9}.jHabit-wrapper.blue .jHabit-icon
|
163 |
+
.iconSvg{fill:#4B73DD}.jHabit-wrapper.blue .jHabit-name
|
164 |
+
.iconSvg{fill:#3662d9}.jHabit-wrapper.purple{background-color:#AF53EC}.jHabit-wrapper.purple .jHabit-status{background-color:#a43ce9}.jHabit-wrapper.purple .jHabit-icon
|
165 |
+
.iconSvg{fill:#AF53EC}.jHabit-wrapper.purple .jHabit-name
|
166 |
+
.iconSvg{fill:#a43ce9}.jHabit-wrapper.pink{background-color:#E75DA9}.jHabit-wrapper.pink .jHabit-status{background-color:#e4479d}.jHabit-wrapper.pink .jHabit-icon
|
167 |
+
.iconSvg{fill:#E75DA9}.jHabit-wrapper.pink .jHabit-name
|
168 |
+
.iconSvg{fill:#e4479d}@keyframes
|
169 |
+
habitBlink{0%{opacity:0;left:50%;top:50%;width:0;height:0;z-index:1}25%{opacity: .5;left:calc(50% - 15px);top:calc(50% - 15px);width:30px;height:30px;z-index:1}50%{opacity: .8;left:calc(50% - 30px);top:calc(50% - 30px);width:60px;height:60px;z-index:1}75%{opacity: .5;left:calc(50% - 25px);top:calc(50% - 25px);width:50px;height:50px;z-index:1}100%{opacity:0;left:calc(50% - 20px);top:calc(50% - 20px);width:40px;height:40px;z-index:1}}@keyframes
|
170 |
+
habitScale{0%{opacity:0;transform:scale(0)}70%{opacity:1;transform:scale(1.1)}100%{opacity:1;transform:scale(1)}}div.calendar{color:#000;font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;-moz-box-shadow:0px 0px 8px rgba(0, 0, 0, 0.5);-webkit-box-shadow:0px 0px 8px rgba(0, 0, 0, 0.5);box-shadow:0px 0px 8px rgba(0,0,0,0.5)}div.calendar.popup{margin-left: -40px;margin-top: -100px;z-index:100000}div.calendar
|
171 |
+
td.weekend{background:#b5cfe9}div.calendar
|
172 |
+
.today{background:#f9621a !important}div.calendar .title, div.calendar
|
173 |
+
.button{color:#f9621a}div.calendar
|
174 |
+
table{background-color:#eee;border:1px
|
175 |
+
solid #aaa;border-collapse:collapse}div.calendar
|
176 |
+
thead{background-color:white}div.calendar td,
|
177 |
+
div.calendar
|
178 |
+
th{font-size:11px;padding:3px;text-align:center}div.calendar
|
179 |
+
td.title{font-weight:bold}div.calendar
|
180 |
+
th{background:#ddd;border-bottom:1px solid #ccc;border-top:1px solid #ccc;font-weight:bold;color:#555}div.calendar tr.days
|
181 |
+
td{width:2em;color:#555;text-align:center;cursor:pointer}div.calendar tr.days td:hover:not(.unselectable),
|
182 |
+
div.calendar td.button:hover:not(.unselectable){background-color:#34ABFA;cursor:pointer}.unselectable{cursor:default !important}div.calendar tr.days td:active
|
183 |
+
div.calendar td.button:active{background-color:#cde}div.calendar tr.days
|
184 |
+
td.selected{font-weight:bold;background-color:#fff;color:#000}div.calendar tr.days
|
185 |
+
td.today{font-weight:bold;color:#D50000}div.calendar tr.days
|
186 |
+
td.otherDay{color:#bbb}
|
inc/css/jot_from.css
ADDED
@@ -0,0 +1,982 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.form-all:after {
|
2 |
+
content: "";
|
3 |
+
display: table;
|
4 |
+
clear: both;
|
5 |
+
}
|
6 |
+
.form-all {
|
7 |
+
font-family: "Tahoma", sans-serif;
|
8 |
+
}
|
9 |
+
.form-all {
|
10 |
+
width: 690px;
|
11 |
+
}
|
12 |
+
.form-label-left,
|
13 |
+
.form-label-right {
|
14 |
+
width: 150px;
|
15 |
+
}
|
16 |
+
.form-label {
|
17 |
+
white-space: normal;
|
18 |
+
}
|
19 |
+
.form-label.form-label-auto {
|
20 |
+
display: inline-block;
|
21 |
+
float: left;
|
22 |
+
text-align: left;
|
23 |
+
width: 150px;
|
24 |
+
}
|
25 |
+
.form-label-left {
|
26 |
+
display: inline-block;
|
27 |
+
white-space: normal;
|
28 |
+
float: left;
|
29 |
+
text-align: left;
|
30 |
+
}
|
31 |
+
.form-label-right {
|
32 |
+
display: inline-block;
|
33 |
+
white-space: normal;
|
34 |
+
float: left;
|
35 |
+
text-align: right;
|
36 |
+
}
|
37 |
+
.form-label-top {
|
38 |
+
white-space: normal;
|
39 |
+
display: block;
|
40 |
+
float: none;
|
41 |
+
text-align: left;
|
42 |
+
}
|
43 |
+
.form-radio-item label:before {
|
44 |
+
top: 0;
|
45 |
+
}
|
46 |
+
.form-all {
|
47 |
+
font-size: 14px;
|
48 |
+
}
|
49 |
+
.form-label {
|
50 |
+
font-weight: normal;
|
51 |
+
font-size: 0.95em;
|
52 |
+
}
|
53 |
+
.supernova {
|
54 |
+
background-color: #cfccc8;
|
55 |
+
background-color: #8f8a83;
|
56 |
+
}
|
57 |
+
.supernova body {
|
58 |
+
background-color: transparent;
|
59 |
+
}
|
60 |
+
/*
|
61 |
+
@width30: (unit(@formWidth, px) + 60px);
|
62 |
+
@width60: (unit(@formWidth, px)+ 120px);
|
63 |
+
@width90: (unit(@formWidth, px)+ 180px);
|
64 |
+
*/
|
65 |
+
/* | */
|
66 |
+
@media screen and (min-width: 480px) {
|
67 |
+
.supernova .form-all {
|
68 |
+
border: 1px solid #75706a;
|
69 |
+
-webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.1);
|
70 |
+
-moz-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.1);
|
71 |
+
box-shadow: 0 3px 9px rgba(0, 0, 0, 0.1);
|
72 |
+
}
|
73 |
+
}
|
74 |
+
/* | */
|
75 |
+
/* | */
|
76 |
+
@media screen and (max-width: 480px) {
|
77 |
+
.jotform-form .form-all {
|
78 |
+
margin: 0;
|
79 |
+
width: 100%;
|
80 |
+
}
|
81 |
+
}
|
82 |
+
/* | */
|
83 |
+
/* | */
|
84 |
+
@media screen and (min-width: 480px) and (max-width: 767px) {
|
85 |
+
.jotform-form .form-all {
|
86 |
+
margin: 0;
|
87 |
+
width: 100%;
|
88 |
+
}
|
89 |
+
}
|
90 |
+
/* | */
|
91 |
+
/* | */
|
92 |
+
@media screen and (min-width: 480px) and (max-width: 689px) {
|
93 |
+
.jotform-form .form-all {
|
94 |
+
margin: 0;
|
95 |
+
width: 100%;
|
96 |
+
}
|
97 |
+
}
|
98 |
+
/* | */
|
99 |
+
/* | */
|
100 |
+
@media screen and (min-width: 768px) {
|
101 |
+
.jotform-form {
|
102 |
+
padding: 60px 0;
|
103 |
+
}
|
104 |
+
}
|
105 |
+
/* | */
|
106 |
+
/* | */
|
107 |
+
@media screen and (max-width: 689px) {
|
108 |
+
.jotform-form .form-all {
|
109 |
+
margin: 0;
|
110 |
+
width: 100%;
|
111 |
+
}
|
112 |
+
}
|
113 |
+
/* | */
|
114 |
+
.supernova .form-all,
|
115 |
+
.form-all {
|
116 |
+
background-color: #cfccc8;
|
117 |
+
border: 1px solid transparent;
|
118 |
+
}
|
119 |
+
.form-header-group {
|
120 |
+
border-color: #b7b3ad;
|
121 |
+
}
|
122 |
+
.form-matrix-table tr {
|
123 |
+
border-color: #b7b3ad;
|
124 |
+
}
|
125 |
+
.form-matrix-table tr:nth-child(2n) {
|
126 |
+
background-color: #c3bfba;
|
127 |
+
}
|
128 |
+
.form-all {
|
129 |
+
color: #555555;
|
130 |
+
}
|
131 |
+
.form-header-group .form-header {
|
132 |
+
color: #555555;
|
133 |
+
}
|
134 |
+
.form-header-group .form-subHeader {
|
135 |
+
color: #6f6f6f;
|
136 |
+
}
|
137 |
+
.form-sub-label {
|
138 |
+
color: #6f6f6f;
|
139 |
+
}
|
140 |
+
.form-label-top,
|
141 |
+
.form-label-left,
|
142 |
+
.form-label-right,
|
143 |
+
.form-html {
|
144 |
+
color: #6f6f6f;
|
145 |
+
}
|
146 |
+
.form-checkbox-item label,
|
147 |
+
.form-radio-item label {
|
148 |
+
color: #555555;
|
149 |
+
}
|
150 |
+
.form-line.form-line-active {
|
151 |
+
-webkit-transition-property: all;
|
152 |
+
-moz-transition-property: all;
|
153 |
+
-ms-transition-property: all;
|
154 |
+
-o-transition-property: all;
|
155 |
+
transition-property: all;
|
156 |
+
-webkit-transition-duration: 0.3s;
|
157 |
+
-moz-transition-duration: 0.3s;
|
158 |
+
-ms-transition-duration: 0.3s;
|
159 |
+
-o-transition-duration: 0.3s;
|
160 |
+
transition-duration: 0.3s;
|
161 |
+
-webkit-transition-timing-function: ease;
|
162 |
+
-moz-transition-timing-function: ease;
|
163 |
+
-ms-transition-timing-function: ease;
|
164 |
+
-o-transition-timing-function: ease;
|
165 |
+
transition-timing-function: ease;
|
166 |
+
background-color: #ffffe0;
|
167 |
+
}
|
168 |
+
/* omer */
|
169 |
+
.form-radio-item,
|
170 |
+
.form-checkbox-item {
|
171 |
+
padding-bottom: 0px !important;
|
172 |
+
}
|
173 |
+
.form-radio-item:last-child,
|
174 |
+
.form-checkbox-item:last-child {
|
175 |
+
padding-bottom: 0;
|
176 |
+
}
|
177 |
+
/* omer */
|
178 |
+
.form-single-column .form-checkbox-item,
|
179 |
+
.form-single-column .form-radio-item {
|
180 |
+
width: 100%;
|
181 |
+
}
|
182 |
+
.form-checkbox-item .editor-container div,
|
183 |
+
.form-radio-item .editor-container div {
|
184 |
+
position: relative;
|
185 |
+
}
|
186 |
+
.form-checkbox-item .editor-container div:before,
|
187 |
+
.form-radio-item .editor-container div:before {
|
188 |
+
display: inline-block;
|
189 |
+
vertical-align: middle;
|
190 |
+
-moz-box-sizing: border-box;
|
191 |
+
-webkit-box-sizing: border-box;
|
192 |
+
box-sizing: border-box;
|
193 |
+
left: 0;
|
194 |
+
width: 18px;
|
195 |
+
height: 18px;
|
196 |
+
}
|
197 |
+
.supernova {
|
198 |
+
height: 100%;
|
199 |
+
background-repeat: no-repeat;
|
200 |
+
background-attachment: scroll;
|
201 |
+
background-position: center top;
|
202 |
+
background-repeat: repeat;
|
203 |
+
}
|
204 |
+
.supernova {
|
205 |
+
background-image: none;
|
206 |
+
}
|
207 |
+
#stage {
|
208 |
+
background-image: none;
|
209 |
+
}
|
210 |
+
/* | */
|
211 |
+
.form-all {
|
212 |
+
background-image: url("https://www.jotform.com/images/noises/noise.png");
|
213 |
+
background-repeat: no-repeat;
|
214 |
+
background-attachment: scroll;
|
215 |
+
background-position: center top;
|
216 |
+
background-repeat: repeat;
|
217 |
+
}
|
218 |
+
.form-header-group {
|
219 |
+
background-repeat: no-repeat;
|
220 |
+
background-attachment: scroll;
|
221 |
+
background-position: center top;
|
222 |
+
}
|
223 |
+
.form-line {
|
224 |
+
margin-top: 0px;
|
225 |
+
margin-bottom: 0px;
|
226 |
+
}
|
227 |
+
.form-line {
|
228 |
+
padding: 12px 16px;
|
229 |
+
}
|
230 |
+
.form-all {
|
231 |
+
-webkit-border-radius: 6px;
|
232 |
+
-moz-border-radius: 6px;
|
233 |
+
border-radius: 6px;
|
234 |
+
}
|
235 |
+
.form-section:first-child {
|
236 |
+
-webkit-border-radius: 6px 6px 0 0;
|
237 |
+
-moz-border-radius: 6px 6px 0 0;
|
238 |
+
border-radius: 6px 6px 0 0;
|
239 |
+
}
|
240 |
+
.form-section:last-child {
|
241 |
+
-webkit-border-radius: 0 0 6px 6px;
|
242 |
+
-moz-border-radius: 0 0 6px 6px;
|
243 |
+
border-radius: 0 0 6px 6px;
|
244 |
+
}
|
245 |
+
.form-all .qq-upload-button,
|
246 |
+
.form-all .form-submit-button,
|
247 |
+
.form-all .form-submit-reset,
|
248 |
+
.form-all .form-submit-print {
|
249 |
+
font-size: 1em;
|
250 |
+
padding: 9px 15px;
|
251 |
+
font-family: "Tahoma", sans-serif;
|
252 |
+
font-size: 14px;
|
253 |
+
font-weight: normal;
|
254 |
+
}
|
255 |
+
.form-all .form-pagebreak-back,
|
256 |
+
.form-all .form-pagebreak-next {
|
257 |
+
font-size: 1em;
|
258 |
+
padding: 9px 15px;
|
259 |
+
font-family: "Tahoma", sans-serif;
|
260 |
+
font-size: 14px;
|
261 |
+
font-weight: normal;
|
262 |
+
}
|
263 |
+
/*
|
264 |
+
& when ( @buttonFontType = google ) {
|
265 |
+
@import (css) "@{buttonFontLink}";
|
266 |
+
}
|
267 |
+
*/
|
268 |
+
h2.form-header {
|
269 |
+
line-height: 1.618em;
|
270 |
+
font-size: 1.714em;
|
271 |
+
}
|
272 |
+
h2 ~ .form-subHeader {
|
273 |
+
line-height: 1.5em;
|
274 |
+
font-size: 1.071em;
|
275 |
+
}
|
276 |
+
.form-header-group {
|
277 |
+
text-align: left;
|
278 |
+
}
|
279 |
+
/*.form-dropdown,
|
280 |
+
.form-radio-item,
|
281 |
+
.form-checkbox-item,
|
282 |
+
.form-radio-other-input,
|
283 |
+
.form-checkbox-other-input,*/
|
284 |
+
.form-captcha input,
|
285 |
+
.form-spinner input,
|
286 |
+
.form-error-message {
|
287 |
+
padding: 4px 3px 2px 3px;
|
288 |
+
}
|
289 |
+
.form-header-group {
|
290 |
+
font-family: "Tahoma", sans-serif;
|
291 |
+
}
|
292 |
+
.form-section {
|
293 |
+
padding: 0px 0px 0px 0px;
|
294 |
+
}
|
295 |
+
.form-header-group {
|
296 |
+
margin: 0px 0px 0px 0px;
|
297 |
+
}
|
298 |
+
.form-header-group {
|
299 |
+
padding: 24px 0px 24px 0px;
|
300 |
+
}
|
301 |
+
.form-header-group .form-header,
|
302 |
+
.form-header-group .form-subHeader {
|
303 |
+
color: #fd8f29;
|
304 |
+
}
|
305 |
+
.form-textbox,
|
306 |
+
.form-textarea {
|
307 |
+
padding: 4px 6px 2px 6px;
|
308 |
+
}
|
309 |
+
[data-type="control_dropdown"] .form-input,
|
310 |
+
[data-type="control_dropdown"] .form-input-wide {
|
311 |
+
width: 150px;
|
312 |
+
}
|
313 |
+
.form-label {
|
314 |
+
font-family: "Tahoma", sans-serif;
|
315 |
+
}
|
316 |
+
li[data-type="control_image"] div {
|
317 |
+
text-align: left;
|
318 |
+
}
|
319 |
+
li[data-type="control_image"] img {
|
320 |
+
border: none;
|
321 |
+
border-width: 0px !important;
|
322 |
+
border-style: solid !important;
|
323 |
+
border-color: false !important;
|
324 |
+
}
|
325 |
+
.form-line-column {
|
326 |
+
width: auto;
|
327 |
+
}
|
328 |
+
.form-line-error {
|
329 |
+
overflow: hidden;
|
330 |
+
-webkit-transition-property: none;
|
331 |
+
-moz-transition-property: none;
|
332 |
+
-ms-transition-property: none;
|
333 |
+
-o-transition-property: none;
|
334 |
+
transition-property: none;
|
335 |
+
-webkit-transition-duration: 0.3s;
|
336 |
+
-moz-transition-duration: 0.3s;
|
337 |
+
-ms-transition-duration: 0.3s;
|
338 |
+
-o-transition-duration: 0.3s;
|
339 |
+
transition-duration: 0.3s;
|
340 |
+
-webkit-transition-timing-function: ease;
|
341 |
+
-moz-transition-timing-function: ease;
|
342 |
+
-ms-transition-timing-function: ease;
|
343 |
+
-o-transition-timing-function: ease;
|
344 |
+
transition-timing-function: ease;
|
345 |
+
background-color: #fff4f4;
|
346 |
+
}
|
347 |
+
.form-line-error .form-error-message {
|
348 |
+
background-color: #ff3200;
|
349 |
+
clear: both;
|
350 |
+
float: none;
|
351 |
+
}
|
352 |
+
.form-line-error .form-error-message .form-error-arrow {
|
353 |
+
border-bottom-color: #ff3200;
|
354 |
+
}
|
355 |
+
.form-line-error input:not(#coupon-input),
|
356 |
+
.form-line-error textarea,
|
357 |
+
.form-line-error .form-validation-error {
|
358 |
+
border: 1px solid #ff3200;
|
359 |
+
-webkit-box-shadow: 0 0 3px #ff3200;
|
360 |
+
-moz-box-shadow: 0 0 3px #ff3200;
|
361 |
+
box-shadow: 0 0 3px #ff3200;
|
362 |
+
}
|
363 |
+
.ie-8 .form-all {
|
364 |
+
margin-top: auto;
|
365 |
+
margin-top: initial;
|
366 |
+
}
|
367 |
+
.ie-8 .form-all:before {
|
368 |
+
display: none;
|
369 |
+
}
|
370 |
+
[data-type="control_clear"] {
|
371 |
+
display: none;
|
372 |
+
}
|
373 |
+
/* | */
|
374 |
+
@media screen and (max-width: 480px), screen and (max-device-width: 767px) and (orientation: portrait), screen and (max-device-width: 415px) and (orientation: landscape) {
|
375 |
+
.testOne {
|
376 |
+
letter-spacing: 0;
|
377 |
+
}
|
378 |
+
.form-all {
|
379 |
+
border: 0;
|
380 |
+
max-width: initial;
|
381 |
+
}
|
382 |
+
.form-sub-label-container {
|
383 |
+
width: 100%;
|
384 |
+
margin: 0;
|
385 |
+
margin-right: 0;
|
386 |
+
float: left;
|
387 |
+
-moz-box-sizing: border-box;
|
388 |
+
-webkit-box-sizing: border-box;
|
389 |
+
box-sizing: border-box;
|
390 |
+
}
|
391 |
+
span.form-sub-label-container + span.form-sub-label-container {
|
392 |
+
margin-right: 0;
|
393 |
+
}
|
394 |
+
.form-sub-label {
|
395 |
+
white-space: normal;
|
396 |
+
}
|
397 |
+
.form-address-table td,
|
398 |
+
.form-address-table th {
|
399 |
+
padding: 0 1px 10px;
|
400 |
+
}
|
401 |
+
.form-submit-button,
|
402 |
+
.form-submit-print,
|
403 |
+
.form-submit-reset {
|
404 |
+
width: 100%;
|
405 |
+
margin-left: 0!important;
|
406 |
+
}
|
407 |
+
div[id*=at_] {
|
408 |
+
font-size: 14px;
|
409 |
+
font-weight: 700;
|
410 |
+
height: 8px;
|
411 |
+
margin-top: 6px;
|
412 |
+
}
|
413 |
+
.showAutoCalendar {
|
414 |
+
width: 20px;
|
415 |
+
}
|
416 |
+
img.form-image {
|
417 |
+
max-width: 100%;
|
418 |
+
height: auto;
|
419 |
+
}
|
420 |
+
.form-matrix-row-headers {
|
421 |
+
width: 100%;
|
422 |
+
word-break: break-all;
|
423 |
+
min-width: 40px;
|
424 |
+
}
|
425 |
+
.form-collapse-table,
|
426 |
+
.form-header-group {
|
427 |
+
margin: 0;
|
428 |
+
}
|
429 |
+
.form-collapse-table {
|
430 |
+
height: 100%;
|
431 |
+
display: inline-block;
|
432 |
+
width: 100%;
|
433 |
+
}
|
434 |
+
.form-collapse-hidden {
|
435 |
+
display: none !important;
|
436 |
+
}
|
437 |
+
.form-input {
|
438 |
+
width: 100%;
|
439 |
+
}
|
440 |
+
.form-label {
|
441 |
+
width: 100% !important;
|
442 |
+
}
|
443 |
+
.form-label-left,
|
444 |
+
.form-label-right {
|
445 |
+
display: block;
|
446 |
+
float: none;
|
447 |
+
text-align: left;
|
448 |
+
width: auto!important;
|
449 |
+
}
|
450 |
+
.form-line,
|
451 |
+
.form-line.form-line-column {
|
452 |
+
padding: 2% 5%;
|
453 |
+
-moz-box-sizing: border-box;
|
454 |
+
-webkit-box-sizing: border-box;
|
455 |
+
box-sizing: border-box;
|
456 |
+
}
|
457 |
+
input[type=text],
|
458 |
+
input[type=email],
|
459 |
+
input[type=tel],
|
460 |
+
textarea {
|
461 |
+
width: 100%;
|
462 |
+
-moz-box-sizing: border-box;
|
463 |
+
-webkit-box-sizing: border-box;
|
464 |
+
box-sizing: border-box;
|
465 |
+
max-width: initial !important;
|
466 |
+
}
|
467 |
+
.form-radio-other-input,
|
468 |
+
.form-checkbox-other-input {
|
469 |
+
max-width: 55% !important;
|
470 |
+
}
|
471 |
+
.form-dropdown,
|
472 |
+
.form-textarea,
|
473 |
+
.form-textbox {
|
474 |
+
width: 100%!important;
|
475 |
+
-moz-box-sizing: border-box;
|
476 |
+
-webkit-box-sizing: border-box;
|
477 |
+
box-sizing: border-box;
|
478 |
+
}
|
479 |
+
.form-input,
|
480 |
+
.form-input-wide,
|
481 |
+
.form-textarea,
|
482 |
+
.form-textbox,
|
483 |
+
.form-dropdown {
|
484 |
+
max-width: initial!important;
|
485 |
+
}
|
486 |
+
.form-checkbox-item:not(#foo),
|
487 |
+
.form-radio-item:not(#foo) {
|
488 |
+
width: 100%;
|
489 |
+
}
|
490 |
+
.form-address-city,
|
491 |
+
.form-address-line,
|
492 |
+
.form-address-postal,
|
493 |
+
.form-address-state,
|
494 |
+
.form-address-table,
|
495 |
+
.form-address-table .form-sub-label-container,
|
496 |
+
.form-address-table select,
|
497 |
+
.form-input {
|
498 |
+
width: 100%;
|
499 |
+
}
|
500 |
+
div.form-header-group {
|
501 |
+
padding: 24px 0px !important;
|
502 |
+
padding-left: 5%!important;
|
503 |
+
padding-right: 5%!important;
|
504 |
+
margin: 0 0px 2% !important;
|
505 |
+
margin-left: 5%!important;
|
506 |
+
margin-right: 5%!important;
|
507 |
+
-moz-box-sizing: border-box;
|
508 |
+
-webkit-box-sizing: border-box;
|
509 |
+
box-sizing: border-box;
|
510 |
+
}
|
511 |
+
div.form-header-group.hasImage img {
|
512 |
+
max-width: 100%;
|
513 |
+
}
|
514 |
+
[data-type="control_button"] {
|
515 |
+
margin-bottom: 0 !important;
|
516 |
+
}
|
517 |
+
[data-type=control_fullname] .form-sub-label-container {
|
518 |
+
width: 48%;
|
519 |
+
}
|
520 |
+
[data-type=control_fullname] .form-sub-label-container:first-child {
|
521 |
+
margin-right: 4%;
|
522 |
+
}
|
523 |
+
[data-type=control_phone] .form-sub-label-container {
|
524 |
+
width: 65%;
|
525 |
+
margin-right: 0;
|
526 |
+
margin-left: 0;
|
527 |
+
float: left;
|
528 |
+
}
|
529 |
+
[data-type=control_phone] .form-sub-label-container:first-child {
|
530 |
+
width: 31%;
|
531 |
+
margin-right: 4%;
|
532 |
+
}
|
533 |
+
[data-type=control_datetime] .allowTime-container {
|
534 |
+
width: 100%;
|
535 |
+
}
|
536 |
+
[data-type=control_datetime] .form-sub-label-container:first-child {
|
537 |
+
width: 10%!important;
|
538 |
+
margin-left: 0;
|
539 |
+
margin-right: 0;
|
540 |
+
}
|
541 |
+
[data-type=control_datetime] .form-sub-label-container + .form-sub-label-container {
|
542 |
+
width: 24%!important;
|
543 |
+
margin-left: 6%;
|
544 |
+
margin-right: 0;
|
545 |
+
}
|
546 |
+
[data-type=control_datetime] span + span + span > span:first-child {
|
547 |
+
display: block;
|
548 |
+
width: 100% !important;
|
549 |
+
}
|
550 |
+
[data-type=control_birthdate] .form-sub-label-container,
|
551 |
+
[data-type=control_time] .form-sub-label-container {
|
552 |
+
width: 27.3%!important;
|
553 |
+
margin-right: 6% !important;
|
554 |
+
}
|
555 |
+
[data-type=control_time] .form-sub-label-container:last-child {
|
556 |
+
width: 33.3%!important;
|
557 |
+
margin-right: 0 !important;
|
558 |
+
}
|
559 |
+
.form-pagebreak-back-container,
|
560 |
+
.form-pagebreak-next-container {
|
561 |
+
min-height: 1px;
|
562 |
+
width: 50% !important;
|
563 |
+
}
|
564 |
+
.form-pagebreak-back,
|
565 |
+
.form-pagebreak-next,
|
566 |
+
.form-product-item.hover-product-item {
|
567 |
+
width: 100%;
|
568 |
+
}
|
569 |
+
.form-pagebreak-back-container {
|
570 |
+
padding: 0;
|
571 |
+
text-align: right;
|
572 |
+
}
|
573 |
+
.form-pagebreak-next-container {
|
574 |
+
padding: 0;
|
575 |
+
text-align: left;
|
576 |
+
}
|
577 |
+
.form-pagebreak {
|
578 |
+
margin: 0 auto;
|
579 |
+
}
|
580 |
+
.form-buttons-wrapper {
|
581 |
+
margin: 0!important;
|
582 |
+
margin-left: 0!important;
|
583 |
+
}
|
584 |
+
.form-buttons-wrapper button {
|
585 |
+
width: 100%;
|
586 |
+
}
|
587 |
+
.form-buttons-wrapper .form-submit-print {
|
588 |
+
margin: 0 !important;
|
589 |
+
}
|
590 |
+
table {
|
591 |
+
width: 100%!important;
|
592 |
+
max-width: initial!important;
|
593 |
+
}
|
594 |
+
table td + td {
|
595 |
+
padding-left: 3%;
|
596 |
+
}
|
597 |
+
.form-checkbox-item,
|
598 |
+
.form-radio-item {
|
599 |
+
white-space: normal!important;
|
600 |
+
}
|
601 |
+
.form-checkbox-item input,
|
602 |
+
.form-radio-item input {
|
603 |
+
width: auto;
|
604 |
+
}
|
605 |
+
.form-collapse-table {
|
606 |
+
margin: 0 5%;
|
607 |
+
display: block;
|
608 |
+
zoom: 1;
|
609 |
+
width: auto;
|
610 |
+
}
|
611 |
+
.form-collapse-table:before,
|
612 |
+
.form-collapse-table:after {
|
613 |
+
display: table;
|
614 |
+
content: '';
|
615 |
+
line-height: 0;
|
616 |
+
}
|
617 |
+
.form-collapse-table:after {
|
618 |
+
clear: both;
|
619 |
+
}
|
620 |
+
.fb-like-box {
|
621 |
+
width: 98% !important;
|
622 |
+
}
|
623 |
+
.form-error-message {
|
624 |
+
clear: both;
|
625 |
+
bottom: -10px;
|
626 |
+
}
|
627 |
+
.date-separate,
|
628 |
+
.phone-separate {
|
629 |
+
display: none;
|
630 |
+
}
|
631 |
+
.custom-field-frame,
|
632 |
+
.direct-embed-widgets,
|
633 |
+
.signature-pad-wrapper {
|
634 |
+
width: 100% !important;
|
635 |
+
}
|
636 |
+
}
|
637 |
+
/* | */
|
638 |
+
|
639 |
+
/*__INSPECT_SEPERATOR__*/
|
640 |
+
/*
|
641 |
+
* Over all form style, just like body tag
|
642 |
+
*/
|
643 |
+
.form-all {
|
644 |
+
color : #524B3A;
|
645 |
+
font-family : Tahoma;
|
646 |
+
font-size : 13px;
|
647 |
+
line-height : 18px;
|
648 |
+
text-shadow : 0 1px 0 #eee;
|
649 |
+
}
|
650 |
+
|
651 |
+
/**
|
652 |
+
* Change sub label colors
|
653 |
+
*/
|
654 |
+
.form-sub-label {
|
655 |
+
color : #777;
|
656 |
+
font-size : 10px;
|
657 |
+
padding-left : 3px;
|
658 |
+
}
|
659 |
+
|
660 |
+
/**
|
661 |
+
* Line highlight styling
|
662 |
+
*/
|
663 |
+
.form-line-active {
|
664 |
+
background : rgba(255, 255, 255, 0.3);
|
665 |
+
color : #524B3A;
|
666 |
+
}
|
667 |
+
|
668 |
+
/* Unify all headers , pagings and collapses */
|
669 |
+
.form-header-group, .form-collapse-table, .form-pagebreak {
|
670 |
+
background : #333333;
|
671 |
+
/* old browsers */
|
672 |
+
background : -moz-linear-gradient(top, #333333 0%, #4A4A4A 100%);
|
673 |
+
/* firefox */
|
674 |
+
background : -webkit-gradient(linear, left top, left bottom, color-stop(0%,#333333), color-stop(100%,#4A4A4A));
|
675 |
+
/* webkit */
|
676 |
+
filter : progid:DXImageTransform.Microsoft.gradient( startColorstr='#333333', endColorstr='#4A4A4A',GradientType=0 );
|
677 |
+
/* ie */
|
678 |
+
color : #FD8F29 !important;
|
679 |
+
text-shadow : 0 2px 2px #000000;
|
680 |
+
border-bottom : 1px solid #F8F8F8;
|
681 |
+
}
|
682 |
+
|
683 |
+
/* Custom styles for headers */
|
684 |
+
.form-header-group {
|
685 |
+
font-family : Georgia, times, serif;
|
686 |
+
margin-bottom : 10px;
|
687 |
+
padding : 20px 16px;
|
688 |
+
-webkit-border-radius : 6px 6px 0 0;
|
689 |
+
-moz-border-radius : 6px 6px 0 0;
|
690 |
+
border-radius : 6px 6px 0 0;
|
691 |
+
}
|
692 |
+
|
693 |
+
.form-header-group h1 {
|
694 |
+
font-size : 26px;
|
695 |
+
line-height : 36px;
|
696 |
+
}
|
697 |
+
|
698 |
+
.form-header-group h2 {
|
699 |
+
font-size : 22px;
|
700 |
+
}
|
701 |
+
|
702 |
+
.form-header-group h3 {
|
703 |
+
font-size : 18px;
|
704 |
+
}
|
705 |
+
|
706 |
+
.form-subHeader {
|
707 |
+
border : none;
|
708 |
+
color : #FD8F29;
|
709 |
+
}
|
710 |
+
|
711 |
+
.form-textbox,
|
712 |
+
.form-textarea {
|
713 |
+
line-height : normal;
|
714 |
+
}
|
715 |
+
|
716 |
+
/* Custom styles for collapse bars */
|
717 |
+
.form-collapse-table {
|
718 |
+
border : none;
|
719 |
+
height : 45px;
|
720 |
+
border-bottom : 1px solid #f8f8f8;
|
721 |
+
}
|
722 |
+
|
723 |
+
.form-collapse-mid {
|
724 |
+
text-shadow : 0 1px 1px #000;
|
725 |
+
font-family : Georgia, times, serif;
|
726 |
+
margin : 15px 45px 16px 20px;
|
727 |
+
}
|
728 |
+
|
729 |
+
.form-collapse-right {
|
730 |
+
height : 45px;
|
731 |
+
}
|
732 |
+
|
733 |
+
/**
|
734 |
+
* Input styles
|
735 |
+
*/
|
736 |
+
.form-textbox, .form-textarea, .form-dropdown, .form-radio-other-input,.form-checkbox-other-input, .form-captcha input, .form-list {
|
737 |
+
-moz-border-radius : 5px;
|
738 |
+
-webkit-border-radius : 5px;
|
739 |
+
border-radius : 5px;
|
740 |
+
-moz-box-shadow : 0 2px 3px rgba(0, 0, 0, 0.2) inset, 0 1px 0 rgba(255, 255, 255, 0.75);
|
741 |
+
-webkit-box-shadow : 0 2px 3px rgba(0, 0, 0, 0.2) inset, 0 1px 0 rgba(255, 255, 255, 0.75);
|
742 |
+
box-shadow : 0 2px 3px rgba(0, 0, 0, 0.2) inset, 0 1px 0 rgba(255, 255, 255, 0.75);
|
743 |
+
background-color : #FFFFFF;
|
744 |
+
border : 1px solid #999;
|
745 |
+
padding : 3px 6px;
|
746 |
+
}
|
747 |
+
|
748 |
+
.form-textarea {
|
749 |
+
white-space : pre-wrap;
|
750 |
+
}
|
751 |
+
|
752 |
+
.form-list {
|
753 |
+
padding : 3px;
|
754 |
+
}
|
755 |
+
|
756 |
+
.form-captcha input {
|
757 |
+
margin-top : 3px;
|
758 |
+
width : 120px !important;
|
759 |
+
-moz-border-radius : 3px;
|
760 |
+
-webkit-border-radius : 3px;
|
761 |
+
border-radius : 3px;
|
762 |
+
}
|
763 |
+
|
764 |
+
/* Multiple upload button */
|
765 |
+
.qq-upload-button {
|
766 |
+
-moz-box-shadow : 0 1px 0 rgba(255, 255, 255, 0.75);
|
767 |
+
-webkit-box-shadow : 0 1px 0 rgba(255, 255, 255, 0.75);
|
768 |
+
box-shadow : 0 1px 0 rgba(255, 255, 255, 0.75);
|
769 |
+
background : -moz-linear-gradient(center top , #F8F8F8 0%, #D6D6D6 100%);
|
770 |
+
/* firefox */
|
771 |
+
background : -webkit-gradient(linear, left top, left bottom, color-stop(0%,#F8F8F8), color-stop(100%,#D6D6D6));
|
772 |
+
/* webkit */
|
773 |
+
filter : progid:DXImageTransform.Microsoft.gradient( startColorstr='#F8F8F8', endColorstr='#D6D6D6',GradientType=0 );
|
774 |
+
/* ie */
|
775 |
+
text-shadow : 0 1px 0 #fff;
|
776 |
+
border : 1px solid #999;
|
777 |
+
color : #848484;
|
778 |
+
}
|
779 |
+
|
780 |
+
.qq-upload-button-hover {
|
781 |
+
background : -moz-linear-gradient(center top , #FFFFFF 0%, #DeDeDe 100%);
|
782 |
+
/* firefox */
|
783 |
+
background : -webkit-gradient(linear, left top, left bottom, color-stop(0%,#FFFFFF), color-stop(100%,#DeDeDe));
|
784 |
+
/* webkit */
|
785 |
+
filter : progid:DXImageTransform.Microsoft.gradient( startColorstr='#FFFFFF', endColorstr='#DeDeDe',GradientType=0 );
|
786 |
+
/* ie */
|
787 |
+
border : 1px solid #888;
|
788 |
+
}
|
789 |
+
|
790 |
+
.qq-upload-list li {
|
791 |
+
padding : 1px 4px;
|
792 |
+
}
|
793 |
+
|
794 |
+
/**
|
795 |
+
* When inputs got focus
|
796 |
+
*/
|
797 |
+
.form-textbox:focus, .form-textarea:focus, .form-dropdown:focus, .form-checkbox-other-input:focus,.form-radio-other-input:focus, .form-captcha input:focus {
|
798 |
+
border-color : #F4AD33;
|
799 |
+
}
|
800 |
+
|
801 |
+
/* Validation errors */
|
802 |
+
.form-line-error {
|
803 |
+
background : none repeat scroll 0 0 #FF7A6C;
|
804 |
+
color : #FFFEFE;
|
805 |
+
text-shadow : 0 -1px 0 #C85757;
|
806 |
+
}
|
807 |
+
|
808 |
+
.form-validation-error {
|
809 |
+
border-color : red !important;
|
810 |
+
}
|
811 |
+
|
812 |
+
.form-line-error .form-sub-label {
|
813 |
+
color : #fff;
|
814 |
+
}
|
815 |
+
|
816 |
+
.form-line-error .form-error-message {
|
817 |
+
color : #333;
|
818 |
+
text-shadow : none;
|
819 |
+
}
|
820 |
+
|
821 |
+
/**
|
822 |
+
* All Buttons and their states
|
823 |
+
*/
|
824 |
+
.form-submit-button,
|
825 |
+
.form-submit-reset,
|
826 |
+
.form-submit-print,
|
827 |
+
.form-pagebreak-back,
|
828 |
+
.form-pagebreak-next {
|
829 |
+
-moz-border-radius : 4px 4px;
|
830 |
+
-webkit-border-radius : 4px 4px;
|
831 |
+
border-radius : 4px 4px;
|
832 |
+
-moz-box-shadow : 0 1px 0 rgba(255, 255, 255, 0.75);
|
833 |
+
-webkit-box-shadow : 0 1px 0 rgba(255, 255, 255, 0.75);
|
834 |
+
box-shadow : 0 1px 0 rgba(255, 255, 255, 0.75);
|
835 |
+
text-shadow : 0 -1px 0px #C64F00;
|
836 |
+
padding : 6px 18px;
|
837 |
+
border : 1px solid #C64F00;
|
838 |
+
color : #fff;
|
839 |
+
font-size : 12px;
|
840 |
+
background : #f9c667;
|
841 |
+
/* old browsers */
|
842 |
+
background : -moz-linear-gradient(top, #FAA84C 0%, #FF7B0D 100%);
|
843 |
+
/* firefox */
|
844 |
+
background : -webkit-gradient(linear, left top, left bottom, color-stop(0%,#FAA84C), color-stop(100%,#FF7B0D));
|
845 |
+
/* webkit */
|
846 |
+
filter : progid:DXImageTransform.Microsoft.gradient( startColorstr='#FAA84C', endColorstr='#FF7B0D',GradientType=0 );
|
847 |
+
/* ie */;
|
848 |
+
}
|
849 |
+
|
850 |
+
/* onmouseoverDISABLEDDISABLED */
|
851 |
+
.form-submit-button:hover,
|
852 |
+
.form-submit-reset:hover,
|
853 |
+
.form-submit-print:hover,
|
854 |
+
.form-pagebreak-back:hover,
|
855 |
+
.form-pagebreak-next:hover {
|
856 |
+
background : #FFDFA2;
|
857 |
+
/* old browsers */
|
858 |
+
background : -moz-linear-gradient(top, #FBCB5D 0%, #EFA003 100%);
|
859 |
+
/* firefox */
|
860 |
+
background : -webkit-gradient(linear, left top, left bottom, color-stop(0%,#FBCB5D), color-stop(100%,#EFA003));
|
861 |
+
/* webkit */
|
862 |
+
filter : progid:DXImageTransform.Microsoft.gradient( startColorstr='#FBCB5D', endColorstr='#EFA003',GradientType=0 );
|
863 |
+
/* ie */
|
864 |
+
border-color : #D08A01;
|
865 |
+
}
|
866 |
+
|
867 |
+
/* mousedown */
|
868 |
+
.form-submit-button:active,
|
869 |
+
.form-submit-reset:active,
|
870 |
+
.form-submit-print:active,
|
871 |
+
.form-pagebreak-back:active,
|
872 |
+
.form-pagebreak-next:active {
|
873 |
+
background : #CD7410;
|
874 |
+
/* old browsers */
|
875 |
+
background : -moz-linear-gradient(top, #EFA003 0%, #FBCB5D 100%);
|
876 |
+
/* firefox */
|
877 |
+
background : -webkit-gradient(linear, left top, left bottom, color-stop(0%,#EFA003), color-stop(100%,#FBCB5D));
|
878 |
+
/* webkit */
|
879 |
+
filter : progid:DXImageTransform.Microsoft.gradient( startColorstr='#EFA003', endColorstr='#FBCB5D',GradientType=0 );
|
880 |
+
/* ie */
|
881 |
+
border-color : #D08A01;
|
882 |
+
-moz-box-shadow : 0 1px 0 rgba(255, 255, 255, 0.75), 0 2px 4px rgba(0,0,0,.1) inset;
|
883 |
+
-webkit-box-shadow : 0 1px 0 rgba(255, 255, 255, 0.75), 0 2px 4px rgba(0,0,0,.1) inset;
|
884 |
+
box-shadow : 0 1px 0 rgba(255, 255, 255, 0.75), 0 2px 4px rgba(0,0,0,.1) inset;
|
885 |
+
}
|
886 |
+
|
887 |
+
/* form-spinner and form-range element styles */
|
888 |
+
.form-spinner {
|
889 |
+
border : 1px solid #999 !important;
|
890 |
+
-moz-border-radius : 5px;
|
891 |
+
-webkit-border-radius : 5px;
|
892 |
+
border-radius : 5px;
|
893 |
+
-moz-box-shadow : 0 2px 3px rgba(0, 0, 0, 0.2) inset, 0 1px 0 rgba(255, 255, 255, 0.75);
|
894 |
+
-webkit-box-shadow : 0 2px 3px rgba(0, 0, 0, 0.2) inset, 0 1px 0 rgba(255, 255, 255, 0.75);
|
895 |
+
box-shadow : 0 2px 3px rgba(0, 0, 0, 0.2) inset, 0 1px 0 rgba(255, 255, 255, 0.75);
|
896 |
+
border-collapse : separate !important;
|
897 |
+
}
|
898 |
+
|
899 |
+
.form-spinner-input-td {
|
900 |
+
padding-right : 3px !important;
|
901 |
+
}
|
902 |
+
|
903 |
+
.form-spinner input {
|
904 |
+
-moz-box-shadow : none;
|
905 |
+
-webkit-box-shadow : none;
|
906 |
+
box-shadow : none;
|
907 |
+
background : none !important;
|
908 |
+
font-size : 11px !important;
|
909 |
+
padding : 4px 0 !important;
|
910 |
+
}
|
911 |
+
|
912 |
+
.form-spinner-up, .form-spinner-down {
|
913 |
+
border : none !important;
|
914 |
+
border-left : 1px solid #999 !important;
|
915 |
+
padding-right : 4px !important;
|
916 |
+
}
|
917 |
+
|
918 |
+
.form-spinner-up {
|
919 |
+
-moz-border-radius-topright : 5px;
|
920 |
+
-webkit-border-top-right-radius : 5px;
|
921 |
+
border-top-right-radius : 5px;
|
922 |
+
background : #f5f5f5 url("../../images/dropdown-arrows.png") no-repeat scroll 4px 1px !important;
|
923 |
+
}
|
924 |
+
|
925 |
+
.form-spinner-down {
|
926 |
+
-moz-border-radius-bottomright : 5px;
|
927 |
+
-webkit-border-bottom-right-radius : 5px;
|
928 |
+
border-bottom-right-radius : 5px;
|
929 |
+
background : #f5f5f5 url("../../images/dropdown-arrows.png") no-repeat scroll 4px -9px !important;
|
930 |
+
}
|
931 |
+
|
932 |
+
.form-spinner-up img, .form-spinner-down img {
|
933 |
+
display : none;
|
934 |
+
}
|
935 |
+
|
936 |
+
.form-spinner-up:hover, .form-spinner-down:hover {
|
937 |
+
background-color : #ccc !important;
|
938 |
+
}
|
939 |
+
|
940 |
+
/* align date-time picker icon */
|
941 |
+
.form-sub-label-container img {
|
942 |
+
margin-bottom : 4px;
|
943 |
+
}
|
944 |
+
|
945 |
+
/* matrix style */
|
946 |
+
.form-matrix-table, .form-matrix-column-headers, .form-matrix-row-headers, .form-matrix-values {
|
947 |
+
border : none;
|
948 |
+
border-collapse : separate;
|
949 |
+
background : none;
|
950 |
+
}
|
951 |
+
|
952 |
+
.form-matrix-table {
|
953 |
+
border-top : 1px solid #ABABAB;
|
954 |
+
border-bottom : 1px solid #EBE7E7;
|
955 |
+
margin-bottom : 10px;
|
956 |
+
}
|
957 |
+
|
958 |
+
.form-matrix-table td, .form-matrix-table th {
|
959 |
+
padding : 10px 0px;
|
960 |
+
}
|
961 |
+
|
962 |
+
.form-matrix-table td, .form-matrix-table th {
|
963 |
+
border-bottom : 1px solid #ABABAB !important;
|
964 |
+
border-top : 1px solid #EBE7E7 !important;
|
965 |
+
}
|
966 |
+
|
967 |
+
/* Product item hover status */
|
968 |
+
.hover-product-item:hover {
|
969 |
+
-moz-border-radius : 5px;
|
970 |
+
-webkit-border-radius : 5px;
|
971 |
+
border-radius : 5px;
|
972 |
+
background : rgba(255,255,255,0.3);
|
973 |
+
}
|
974 |
+
|
975 |
+
/* Capthca box */
|
976 |
+
.form-captcha {
|
977 |
+
border : 1px solid #999;
|
978 |
+
background : #ffffff;
|
979 |
+
-moz-box-shadow : 0 2px 3px rgba(0, 0, 0, 0.2) inset, 0 1px 0 rgba(255, 255, 255, 0.75);
|
980 |
+
-webkit-box-shadow : 0 2px 3px rgba(0, 0, 0, 0.2) inset, 0 1px 0 rgba(255, 255, 255, 0.75);
|
981 |
+
box-shadow : 0 2px 3px rgba(0, 0, 0, 0.2) inset, 0 1px 0 rgba(255, 255, 255, 0.75);
|
982 |
+
}
|
inc/css/nova.css
ADDED
@@ -0,0 +1,520 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.form-all {
|
2 |
+
font-size:14px;
|
3 |
+
color:#000;
|
4 |
+
font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Verdana, Tahoma, sans-serif;
|
5 |
+
background-repeat: no-repeat;
|
6 |
+
}
|
7 |
+
|
8 |
+
.form-line {
|
9 |
+
/* Don't conver these into shorthand */
|
10 |
+
padding-top:12px;
|
11 |
+
padding-bottom:12px;
|
12 |
+
padding-left:36px;
|
13 |
+
padding-right:36px;
|
14 |
+
margin:6px 0;
|
15 |
+
width:100%;
|
16 |
+
box-sizing: border-box;
|
17 |
+
}
|
18 |
+
|
19 |
+
.form-label-top,
|
20 |
+
.form-label-left,
|
21 |
+
.form-label-right {
|
22 |
+
font-weight: bold;
|
23 |
+
margin-bottom: 9px;
|
24 |
+
}
|
25 |
+
|
26 |
+
.form-label-right {
|
27 |
+
margin-right:0;
|
28 |
+
padding-right:15px;
|
29 |
+
box-sizing:border-box;
|
30 |
+
}
|
31 |
+
|
32 |
+
.form-textbox,
|
33 |
+
.form-textarea,
|
34 |
+
.form-captcha input {
|
35 |
+
padding:3px;
|
36 |
+
margin-left: 0;
|
37 |
+
border:1px solid #ccc;
|
38 |
+
font-size:1em; /*14px*/
|
39 |
+
line-height:1.071em; /*15px*/
|
40 |
+
-moz-box-shadow: 0 1px 2px #eee inset;
|
41 |
+
-webkit-box-shadow: 0 1px 2px #eee inset;
|
42 |
+
box-shadow: 0 1px 2px #eee inset;
|
43 |
+
}
|
44 |
+
|
45 |
+
.form-spinner input { padding:3px !important; }
|
46 |
+
|
47 |
+
.form-all .form-upload {
|
48 |
+
border:none;
|
49 |
+
-moz-box-shadow: none;
|
50 |
+
-webkit-box-shadow: none;
|
51 |
+
box-shadow: none;
|
52 |
+
}
|
53 |
+
|
54 |
+
.form-sub-label {
|
55 |
+
font-size:0.786em; /*11px*/
|
56 |
+
margin-top:3px;
|
57 |
+
}
|
58 |
+
|
59 |
+
.form-dropdown {
|
60 |
+
padding: 2px;
|
61 |
+
font-size:0.857em;/*12px*/
|
62 |
+
|
63 |
+
}
|
64 |
+
|
65 |
+
.form-radio,
|
66 |
+
.form-checkbox {
|
67 |
+
vertical-align: top !important;
|
68 |
+
margin-top: 4px !important;
|
69 |
+
}
|
70 |
+
|
71 |
+
.form-radio-item label,
|
72 |
+
.form-checkbox-item label,
|
73 |
+
.form-grading-label {
|
74 |
+
font-size:1em; /*14px*/
|
75 |
+
color:#000;
|
76 |
+
}
|
77 |
+
.form-radio-item,
|
78 |
+
.form-checkbox-item {
|
79 |
+
margin-top:0;
|
80 |
+
margin-bottom: 6px;
|
81 |
+
}
|
82 |
+
|
83 |
+
|
84 |
+
|
85 |
+
/* HEADING FIELD
|
86 |
+
------------------------------*/
|
87 |
+
|
88 |
+
.form-header-group {
|
89 |
+
background: transparent; /* For overriding */
|
90 |
+
border: none; /* For overriding */
|
91 |
+
padding: 24px 0;
|
92 |
+
margin: 12px 36px 18px;
|
93 |
+
border-bottom: 1px solid #e3e3e3;
|
94 |
+
border-top: 1px solid #e3e3e3;
|
95 |
+
}
|
96 |
+
|
97 |
+
li:first-child .form-header-group,
|
98 |
+
.form-header-group + .form-header-group {
|
99 |
+
border-top:0;
|
100 |
+
}
|
101 |
+
|
102 |
+
h1.form-header {
|
103 |
+
font-size: 2.143em; /*30px*/
|
104 |
+
}
|
105 |
+
|
106 |
+
h2.form-header {
|
107 |
+
font-size: 1.714em; /*24px*/
|
108 |
+
}
|
109 |
+
|
110 |
+
h3.form-header {
|
111 |
+
font-size: 1.5em; /*21px*/
|
112 |
+
}
|
113 |
+
|
114 |
+
.form-header{
|
115 |
+
color:#000;
|
116 |
+
}
|
117 |
+
.form-subHeader {
|
118 |
+
border-top:none;
|
119 |
+
font-size: 1.071em; /*15px*/
|
120 |
+
line-height:1.5em; /*21px*/
|
121 |
+
font-style: normal;
|
122 |
+
margin:3px 0 0;
|
123 |
+
}
|
124 |
+
|
125 |
+
|
126 |
+
|
127 |
+
/* BUTTONS
|
128 |
+
------------------------------*/
|
129 |
+
|
130 |
+
.form-pagebreak-back,
|
131 |
+
.form-pagebreak-next,
|
132 |
+
.qq-upload-button,
|
133 |
+
.form-submit-button,
|
134 |
+
.form-submit-reset,
|
135 |
+
.form-submit-print {
|
136 |
+
border:1px solid #ccc;
|
137 |
+
padding:6px 12px;
|
138 |
+
color:#666;
|
139 |
+
text-shadow:0 1px #fff;
|
140 |
+
cursor:pointer;
|
141 |
+
border-radius: 3px 3px;
|
142 |
+
box-shadow: 0 1px #fff inset, 0 1px #ddd;
|
143 |
+
|
144 |
+
background: #f5f5f5; /* Old browsers */
|
145 |
+
background: -moz-linear-gradient(top, #f5f5f5 0%, #eeeeee 100%); /* FF3.6+ */
|
146 |
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f5f5f5), color-stop(100%,#eeeeee)); /* Chrome,Safari4+ */
|
147 |
+
background: -webkit-linear-gradient(top, #f5f5f5 0%,#eeeeee 100%); /* Chrome10+,Safari5.1+ */
|
148 |
+
background: -o-linear-gradient(top, #f5f5f5 0%,#eeeeee 100%); /* Opera 11.10+ */
|
149 |
+
background: -ms-linear-gradient(top, #f5f5f5 0%,#eeeeee 100%); /* IE10+ */
|
150 |
+
background: linear-gradient(to top, #f5f5f5 0%, #eeeeee 100%);
|
151 |
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f5f5f5', endColorstr='#eeeeee',GradientType=0 ); /* IE6-9 */
|
152 |
+
}
|
153 |
+
|
154 |
+
.form-pagebreak-back:hover,
|
155 |
+
.form-pagebreak-next:hover,
|
156 |
+
.form-submit-button:hover,
|
157 |
+
.qq-upload-button:hover,
|
158 |
+
.form-submit-reset:hover,
|
159 |
+
.form-submit-print:hover {
|
160 |
+
background: #ffffff;
|
161 |
+
background: -moz-linear-gradient(top, #ffffff 0%, #f5f5f5 100%);
|
162 |
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#f5f5f5));
|
163 |
+
background: -webkit-linear-gradient(top, #ffffff 0%,#f5f5f5 100%);
|
164 |
+
background: -o-linear-gradient(top, #ffffff 0%,#f5f5f5 100%);
|
165 |
+
background: -ms-linear-gradient(top, #ffffff 0%,#f5f5f5 100%);
|
166 |
+
background: linear-gradient(top, #ffffff 0%,#f5f5f5 100%);
|
167 |
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#f5f5f5',GradientType=0 );
|
168 |
+
}
|
169 |
+
|
170 |
+
.form-pagebreak-back:active,
|
171 |
+
.form-pagebreak-next:active,
|
172 |
+
.form-submit-button:active,
|
173 |
+
.qq-upload-button:active,
|
174 |
+
.form-submit-reset:active,
|
175 |
+
.form-submit-print:active {
|
176 |
+
background: #eeeeee;
|
177 |
+
background: -moz-linear-gradient(top, #eeeeee 0%, #f5f5f5 100%);
|
178 |
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#eeeeee), color-stop(100%,#f5f5f5));
|
179 |
+
background: -webkit-linear-gradient(top, #eeeeee 0%,#f5f5f5 100%);
|
180 |
+
background: -o-linear-gradient(top, #eeeeee 0%,#f5f5f5 100%);
|
181 |
+
background: -ms-linear-gradient(top, #eeeeee 0%,#f5f5f5 100%);
|
182 |
+
background: linear-gradient(top, #eeeeee 0%,#f5f5f5 100%);
|
183 |
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#f5f5f5',GradientType=0 );
|
184 |
+
|
185 |
+
-moz-box-shadow: 0 1px #fff inset;
|
186 |
+
-webkit-box-shadow: 0 1px #fff inset;
|
187 |
+
box-shadow: 0 1px #fff inset;
|
188 |
+
}
|
189 |
+
|
190 |
+
.form-submit-button,
|
191 |
+
.form-submit-reset,
|
192 |
+
.form-submit-print {
|
193 |
+
color:#333;
|
194 |
+
font-size:1em; /*14px*/
|
195 |
+
margin-top:12px;
|
196 |
+
margin-bottom:12px;
|
197 |
+
}
|
198 |
+
|
199 |
+
.form-submit-reset,
|
200 |
+
.form-submit-print {
|
201 |
+
font-size:0.857em; /*12px*/
|
202 |
+
padding:4px 8px;
|
203 |
+
}
|
204 |
+
|
205 |
+
.form-submit-print img {
|
206 |
+
margin:-4px 3px 0 -7px;
|
207 |
+
}
|
208 |
+
|
209 |
+
.qq-upload-button {
|
210 |
+
padding:8px 0;
|
211 |
+
|
212 |
+
-moz-border-radius: 6px 6px;
|
213 |
+
-webkit-border-radius: 6px 6px;
|
214 |
+
border-radius: 6px 6px;
|
215 |
+
}
|
216 |
+
|
217 |
+
|
218 |
+
/* Phone areaCode & Phone Number in the payment field
|
219 |
+
------------------------------*/
|
220 |
+
li:not([data-type="control_phone"]) input[data-component="areaCode"] {
|
221 |
+
width: 30px;
|
222 |
+
}
|
223 |
+
|
224 |
+
li:not([data-type="control_phone"]) input[data-component="phone"] {
|
225 |
+
width: 83px;
|
226 |
+
}
|
227 |
+
|
228 |
+
|
229 |
+
/* FORM-LINE ACTIVE
|
230 |
+
------------------------------*/
|
231 |
+
|
232 |
+
|
233 |
+
.form-line-active {
|
234 |
+
background: #FFFBEA;
|
235 |
+
}
|
236 |
+
|
237 |
+
.form-line-active input:focus,
|
238 |
+
.form-line-active textarea:focus {
|
239 |
+
border:1px solid #FFD300;
|
240 |
+
|
241 |
+
-moz-box-shadow: 0 0 3px #FFF0AA;
|
242 |
+
-webkit-box-shadow: 0 0 3px #FFF0AA;
|
243 |
+
box-shadow: 0 0 3px #FFF0AA;
|
244 |
+
}
|
245 |
+
|
246 |
+
|
247 |
+
|
248 |
+
/* ERROR MESSAGES
|
249 |
+
------------------------------*/
|
250 |
+
|
251 |
+
.form-line-error {
|
252 |
+
background: #fff4f4;
|
253 |
+
}
|
254 |
+
|
255 |
+
|
256 |
+
li.form-line-error .form-error-message {
|
257 |
+
background:#FF4E5D;
|
258 |
+
color:#fff;
|
259 |
+
padding:9px 6px 9px 36px;
|
260 |
+
}
|
261 |
+
|
262 |
+
li.form-line-error .form-error-message img {
|
263 |
+
position: absolute;
|
264 |
+
margin-top: -10px;
|
265 |
+
left: 8px; top: 49%;
|
266 |
+
width: 20px; height: 20px;
|
267 |
+
}
|
268 |
+
|
269 |
+
li.form-line-error .form-error-message .form-error-arrow {
|
270 |
+
border-bottom-color: #FF4E5D;
|
271 |
+
}
|
272 |
+
|
273 |
+
.form-error-arrow-inner {
|
274 |
+
display: none;
|
275 |
+
}
|
276 |
+
|
277 |
+
|
278 |
+
|
279 |
+
/* SURVEY TOOLS
|
280 |
+
------------------------------*/
|
281 |
+
|
282 |
+
/*----- Matrix Field -----*/
|
283 |
+
|
284 |
+
.form-matrix-table {
|
285 |
+
font-size:1em;
|
286 |
+
}
|
287 |
+
|
288 |
+
.form-matrix-row-headers,
|
289 |
+
.form-matrix-column-headers {
|
290 |
+
font-size:0.786em; /*11px*/
|
291 |
+
font-weight: normal;
|
292 |
+
/*color:#444;*/
|
293 |
+
}
|
294 |
+
|
295 |
+
.form-scale-table th,
|
296 |
+
.form-scale-table td {
|
297 |
+
padding:9px 6px;
|
298 |
+
}
|
299 |
+
|
300 |
+
.form-scale-table label {
|
301 |
+
/*color:#666;*/
|
302 |
+
}
|
303 |
+
|
304 |
+
.form-grading-item {
|
305 |
+
margin-bottom: 6px;
|
306 |
+
}
|
307 |
+
|
308 |
+
/*----- Form Collapse -----*/
|
309 |
+
|
310 |
+
.form-collapse-table {
|
311 |
+
margin: 0 36px;
|
312 |
+
border:1px solid #ccc;
|
313 |
+
cursor:pointer;
|
314 |
+
|
315 |
+
-moz-border-radius: 3px 3px;
|
316 |
+
-webkit-border-radius: 3px 3px;
|
317 |
+
border-radius: 3px 3px;
|
318 |
+
|
319 |
+
-moz-box-shadow: 0 1px #fff inset, 0 1px #ddd;
|
320 |
+
-webkit-box-shadow: 0 1px #fff inset, 0 1px #ddd;
|
321 |
+
box-shadow: 0 1px #fff inset, 0 1px #ddd;
|
322 |
+
|
323 |
+
background: #f5f5f5; /* Old browsers */
|
324 |
+
background: -moz-linear-gradient(top, #f5f5f5 0%, #eeeeee 100%); /* FF3.6+ */
|
325 |
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f5f5f5), color-stop(100%,#eeeeee)); /* Chrome,Safari4+ */
|
326 |
+
background: -webkit-linear-gradient(top, #f5f5f5 0%,#eeeeee 100%); /* Chrome10+,Safari5.1+ */
|
327 |
+
background: -o-linear-gradient(top, #f5f5f5 0%,#eeeeee 100%); /* Opera 11.10+ */
|
328 |
+
background: -ms-linear-gradient(top, #f5f5f5 0%,#eeeeee 100%); /* IE10+ */
|
329 |
+
background: linear-gradient(top, #f5f5f5 0%,#eeeeee 100%); /* W3C */
|
330 |
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f5f5f5', endColorstr='#eeeeee',GradientType=0 ); /* IE6-9 */
|
331 |
+
}
|
332 |
+
|
333 |
+
.form-collapse-table:hover {
|
334 |
+
background: #ffffff;
|
335 |
+
background: -moz-linear-gradient(top, #ffffff 0%, #f5f5f5 100%);
|
336 |
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#f5f5f5));
|
337 |
+
background: -webkit-linear-gradient(top, #ffffff 0%,#f5f5f5 100%);
|
338 |
+
background: -o-linear-gradient(top, #ffffff 0%,#f5f5f5 100%);
|
339 |
+
background: -ms-linear-gradient(top, #ffffff 0%,#f5f5f5 100%);
|
340 |
+
background: linear-gradient(top, #ffffff 0%,#f5f5f5 100%);
|
341 |
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#f5f5f5',GradientType=0 );
|
342 |
+
}
|
343 |
+
|
344 |
+
.form-collapse-table:active {
|
345 |
+
background: #eeeeee;
|
346 |
+
background: -moz-linear-gradient(top, #eeeeee 0%, #f5f5f5 100%);
|
347 |
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#eeeeee), color-stop(100%,#f5f5f5));
|
348 |
+
background: -webkit-linear-gradient(top, #eeeeee 0%,#f5f5f5 100%);
|
349 |
+
background: -o-linear-gradient(top, #eeeeee 0%,#f5f5f5 100%);
|
350 |
+
background: -ms-linear-gradient(top, #eeeeee 0%,#f5f5f5 100%);
|
351 |
+
background: linear-gradient(top, #eeeeee 0%,#f5f5f5 100%);
|
352 |
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#f5f5f5',GradientType=0 );
|
353 |
+
|
354 |
+
-moz-box-shadow: 0 1px #fff inset;
|
355 |
+
-webkit-box-shadow: 0 1px #fff inset;
|
356 |
+
box-shadow: 0 1px #fff inset;
|
357 |
+
}
|
358 |
+
|
359 |
+
/*----- Page Break Field -----*/
|
360 |
+
|
361 |
+
.form-pagebreak {
|
362 |
+
margin:0 36px;
|
363 |
+
border-top:1px solid #e3e3e3;
|
364 |
+
background:transparent;
|
365 |
+
height: auto;
|
366 |
+
overflow: hidden;
|
367 |
+
}
|
368 |
+
|
369 |
+
.form-pagebreak-back-container {
|
370 |
+
padding:24px 3px 24px 0;
|
371 |
+
}
|
372 |
+
|
373 |
+
.form-pagebreak-next-container {
|
374 |
+
padding:24px 0 24px 3px;
|
375 |
+
}
|
376 |
+
|
377 |
+
.form-pagebreak-next {
|
378 |
+
margin-left: 0;
|
379 |
+
}
|
380 |
+
|
381 |
+
|
382 |
+
|
383 |
+
/* PAYMENT FIELDS
|
384 |
+
------------------------------*/
|
385 |
+
|
386 |
+
.form-product-item {
|
387 |
+
padding:6px;
|
388 |
+
overflow:hidden;
|
389 |
+
margin: 0 0 9px;
|
390 |
+
|
391 |
+
-moz-border-radius: 6px 6px;
|
392 |
+
-webkit-border-radius: 6px 6px;
|
393 |
+
border-radius: 6px 6px;
|
394 |
+
|
395 |
+
width: 100%;
|
396 |
+
}
|
397 |
+
|
398 |
+
.hover-product-item:hover {
|
399 |
+
background:none;
|
400 |
+
-ms-filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#19969696,endColorstr=#19969696);
|
401 |
+
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#19969696,endColorstr=#19969696);
|
402 |
+
zoom: 1;
|
403 |
+
background: rgba(150,150,150,0.1);
|
404 |
+
}
|
405 |
+
|
406 |
+
.form-product-item br + br {
|
407 |
+
display: none;
|
408 |
+
}
|
409 |
+
|
410 |
+
.form-product-item img {
|
411 |
+
display:block;
|
412 |
+
position: static;
|
413 |
+
margin: 0 12px 0 0;
|
414 |
+
float:left;
|
415 |
+
|
416 |
+
-moz-border-radius: 3px 3px;
|
417 |
+
-webkit-border-radius: 3px 3px;
|
418 |
+
border-radius: 3px 3px;
|
419 |
+
}
|
420 |
+
|
421 |
+
.form-product-item .form-sub-label-container {
|
422 |
+
margin: 9px 15px 0 0;
|
423 |
+
}
|
424 |
+
|
425 |
+
.form-product-item .form-sub-label-container:last-of-type {
|
426 |
+
margin: 9px 0 0 0;
|
427 |
+
}
|
428 |
+
|
429 |
+
.form-product-name {
|
430 |
+
font-size: 15px;
|
431 |
+
}
|
432 |
+
|
433 |
+
.form-product-container {
|
434 |
+
margin-bottom: 6px;
|
435 |
+
display: inline;
|
436 |
+
width: 94%;
|
437 |
+
width: calc(100% - 20px);
|
438 |
+
}
|
439 |
+
|
440 |
+
#app .form-product-container {
|
441 |
+
margin: 0 0 6px 4px;
|
442 |
+
}
|
443 |
+
|
444 |
+
.form-product-item .form-sub-label {
|
445 |
+
display: inline;
|
446 |
+
height: 25px;
|
447 |
+
vertical-align: top;
|
448 |
+
margin-right: 6px;
|
449 |
+
line-height: 24px;
|
450 |
+
font-size: 12px;
|
451 |
+
}
|
452 |
+
|
453 |
+
.form-product-item > .form-product-item-detail {
|
454 |
+
position: static;
|
455 |
+
float: left;
|
456 |
+
width: 100%;
|
457 |
+
}
|
458 |
+
|
459 |
+
.form-product-item > img + .form-product-item-detail {
|
460 |
+
position: static;
|
461 |
+
float: left;
|
462 |
+
width: 84%;
|
463 |
+
width: calc(100% - 66px);
|
464 |
+
}
|
465 |
+
|
466 |
+
|
467 |
+
.form-product-item .form-dropdown { height: 25px; }
|
468 |
+
|
469 |
+
.form-product-details { font-size:0.857em; /*12px*/}
|
470 |
+
.form-payment-total b > span > span > span,
|
471 |
+
.form-product-details b > span > span {
|
472 |
+
margin-left: -3px;
|
473 |
+
}
|
474 |
+
|
475 |
+
.app .form-payment-total b > span > span > span,
|
476 |
+
.app .form-product-details b > span > span {
|
477 |
+
margin-left: 0;
|
478 |
+
}
|
479 |
+
|
480 |
+
.app .form-product-details {
|
481 |
+
margin-left: 5px;
|
482 |
+
}
|
483 |
+
/* Subscription */
|
484 |
+
|
485 |
+
.form-product-item .form-radio,
|
486 |
+
.form-product-item .form-checkbox {
|
487 |
+
margin-right: 2px;
|
488 |
+
}
|
489 |
+
|
490 |
+
|
491 |
+
/* SHRINK & TO NEW LINE
|
492 |
+
------------------------------*/
|
493 |
+
|
494 |
+
.form-line-column {
|
495 |
+
clear: none;
|
496 |
+
width: auto;
|
497 |
+
max-width: 100%; /*ie-11 fix*/
|
498 |
+
}
|
499 |
+
|
500 |
+
.form-line-column-clear {
|
501 |
+
clear:left;
|
502 |
+
width:auto;
|
503 |
+
max-width: 100%; /*ie-11 fix*/
|
504 |
+
}
|
505 |
+
|
506 |
+
/* ------------- */
|
507 |
+
/* MEDIA QUERIES */
|
508 |
+
/* ------------- */
|
509 |
+
@media screen and (max-width: 480px),
|
510 |
+
screen and (max-device-width: 768px) and (orientation: portrait),
|
511 |
+
screen and (max-device-width: 415px) and (orientation: landscape) {
|
512 |
+
|
513 |
+
/* User defined amount width */
|
514 |
+
input[id*="_donation"] {
|
515 |
+
width: 25% !important;
|
516 |
+
}
|
517 |
+
th.form-matrix-column-headers {
|
518 |
+
min-width: 75px;
|
519 |
+
}
|
520 |
+
}
|
inc/feedback-pop-up-form.php
CHANGED
@@ -1,55 +1,102 @@
|
|
|
|
1 |
<div class="dialog-widget dialog-lightbox-widget dialog-type-buttons dialog-type-lightbox" id="spicepress-deactivate-feedback-modal" style="display: block;">
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
require ABSPATH . 'wp-admin/themes.php';
|
54 |
|
55 |
?>
|
1 |
+
<?php error_reporting(0);?>
|
2 |
<div class="dialog-widget dialog-lightbox-widget dialog-type-buttons dialog-type-lightbox" id="spicepress-deactivate-feedback-modal" style="display: block;">
|
3 |
+
|
4 |
+
<form class="jotform-form" action="https://submit.jotform.me/submit/91673332832458/" method="post" name="form_91673332832458" id="91673332832458" accept-charset="utf-8">
|
5 |
+
<input type="hidden" name="formID" value="91673332832458" />
|
6 |
+
<div role="main" class="form-all">
|
7 |
+
<ul class="form-section page-section">
|
8 |
+
<li class="form-line" data-type="control_text" id="id_4">
|
9 |
+
<div id="cid_4" class="form-input-wide">
|
10 |
+
<div id="text_4" class="form-html" data-component="text">
|
11 |
+
<p><span style="font-family: helvetica, arial, sans-serif;"><strong><span style="font-size: 18pt;"><?php _e('Quick Feedback','spicepress');?></span></strong></span></p>
|
12 |
+
<p><span style="font-size: 10pt; font-family: helvetica, arial, sans-serif;"><?php _e('Your feedback is valuable to us.','spicepress');?></span></p>
|
13 |
+
</div>
|
14 |
+
</div>
|
15 |
+
</li>
|
16 |
+
<li class="form-line" data-type="control_radio" id="id_3">
|
17 |
+
<label class="form-label form-label-top" id="label_3" for="input_3"> </label>
|
18 |
+
<div id="cid_3" class="form-input-wide">
|
19 |
+
<div class="form-single-column" data-component="radio">
|
20 |
+
<span class="form-radio-item" style="clear:left">
|
21 |
+
<span class="dragger-item">
|
22 |
+
</span>
|
23 |
+
<input type="radio" class="form-radio" id="input_3_0" name="q3_input3" value="I found a better theme" />
|
24 |
+
<label id="label_input_3_0" for="input_3_0"> <?php _e('I found a better theme','spicepress');?> </label>
|
25 |
+
</span>
|
26 |
+
<span class="form-radio-item" style="clear:left">
|
27 |
+
<span class="dragger-item">
|
28 |
+
</span>
|
29 |
+
<input type="radio" class="form-radio" id="input_3_1" name="q3_input3" value="It's a temporary deactivation. I'm just debugging an issue." />
|
30 |
+
<label id="label_input_3_1" for="input_3_1"> <?php _e("It's a temporary deactivation. I'm just debugging an issue.","spicepress");?> </label>
|
31 |
+
</span>
|
32 |
+
<span class="form-radio-item" style="clear:left">
|
33 |
+
<span class="dragger-item">
|
34 |
+
</span>
|
35 |
+
<input type="radio" class="form-radio" id="input_3_2" name="q3_input3" value="It does not have a feature I require. If possible, mention them in text box." />
|
36 |
+
<label id="label_input_3_2" for="input_3_2"> <?php _e('It does not have a feature I require. If possible, mention them in text box.','spicepress');?> </label>
|
37 |
+
</span>
|
38 |
+
</div>
|
39 |
+
</div>
|
40 |
+
</li>
|
41 |
+
<li class="form-line" data-type="control_textarea" id="id_6">
|
42 |
+
<label class="form-label form-label-top form-label-auto" id="label_6" for="input_6"> <?php _e('Others','spicepress');?> </label>
|
43 |
+
<div id="cid_6" class="form-input-wide">
|
44 |
+
<span class="form-sub-label-container" style="vertical-align:top">
|
45 |
+
<textarea id="input_6" class="form-textarea" name="q6_others" cols="40" rows="6" data-component="textarea" aria-labelledby="label_6 sublabel_input_6"></textarea>
|
46 |
+
<label class="form-sub-label" for="input_6" id="sublabel_input_6" style="min-height:13px"> <?php _e('Your feedback means a lot to us','spicepress');?> </label>
|
47 |
+
</span>
|
48 |
+
</div>
|
49 |
+
</li>
|
50 |
+
<li class="form-line form-line-column form-col-1" data-type="control_button" id="id_2">
|
51 |
+
<div id="cid_2" class="form-input-wide">
|
52 |
+
<div style="text-align:left" class="form-buttons-wrapper">
|
53 |
+
<button id="input_2" type="submit" class="form-submit-button" data-component="button">
|
54 |
+
<?php _e('Submit Feedback','spicepress');?>
|
55 |
+
</button>
|
56 |
+
</div>
|
57 |
+
</div>
|
58 |
+
</li>
|
59 |
+
<li class="form-line form-line-column form-col-2" data-type="control_text" id="id_5">
|
60 |
+
<div id="cid_5" class="form-input-wide">
|
61 |
+
<div id="text_5" class="form-html" data-component="text">
|
62 |
+
<p><a class="form-deactivation" href="#" rel="nofollow" onclick="window.location.reload()"><?php _e('Skip & Deactive','spicepress');?></a></p>
|
63 |
+
</div>
|
64 |
+
</div>
|
65 |
+
</li>
|
66 |
+
|
67 |
+
<li style="display:none">
|
68 |
+
Should be Empty:
|
69 |
+
<input type="text" name="website" value="" />
|
70 |
+
</li>
|
71 |
+
</ul>
|
72 |
+
</div>
|
73 |
+
<script>
|
74 |
+
JotForm.showJotFormPowered = "new_footer";
|
75 |
+
</script>
|
76 |
+
<input type="hidden" id="simple_spc" name="simple_spc" value="91673332832458" />
|
77 |
+
<script type="text/javascript">
|
78 |
+
document.getElementById("si" + "mple" + "_spc").value = "91673332832458-91673332832458";
|
79 |
+
</script>
|
80 |
+
<div class="formFooter-heightMask">
|
81 |
+
</div>
|
82 |
+
<div class="formFooter f6">
|
83 |
+
<a href="https://www.jotform.com/pricing?utm_source=formfooter&utm_medium=banner&utm_term=91673332832458&utm_content=jotform_logo&utm_campaign=powered_by_jotform_le" target="_blank" class="formFooter-logoLink"><img class="formFooter-logo" src="https://cdn.jotfor.ms/assets/img/logo/logo-new@1x.png" alt="" style="height: 44px;"></a>
|
84 |
+
<div class="formFooter-rightSide">
|
85 |
+
<span class="formFooter-text">
|
86 |
+
<?php _e("Now create your own JotForm - It's free!","spicepress");?>
|
87 |
+
</span>
|
88 |
+
<a class="formFooter-button" href="https://www.jotform.com/?utm_source=formfooter&utm_medium=banner&utm_term=91673332832458&utm_content=jotform_button&utm_campaign=powered_by_jotform_le" target="_blank"><?php _e('Create your own JotForm','spicepress');?></a>
|
89 |
+
</div>
|
90 |
+
</div>
|
91 |
+
<input type="hidden" id="input_7" name="q7_typeA" class="form-hidden" value="<?php
|
92 |
+
global $wp;
|
93 |
+
echo home_url( $wp->request ).'/wp-admin/themes.php';
|
94 |
+
?>" data-component="hidden" />
|
95 |
+
</form>
|
96 |
+
</div>
|
97 |
+
|
98 |
+
<?php
|
99 |
+
unset( $_GET['action'] );
|
100 |
require ABSPATH . 'wp-admin/themes.php';
|
101 |
|
102 |
?>
|
inc/js/custom-js.js
CHANGED
@@ -1,30 +1,9 @@
|
|
1 |
-
(function(
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
var SiteAdminEmail = $('#admin_mail').val();
|
7 |
-
var SiteUrl = $('#plugin_site').val();
|
8 |
-
var reasontext = '';
|
9 |
-
if(resaon=="I want to try a new design, I don't like Spicepress style"){
|
10 |
-
reasontext = $('#reason_found_a_better_plugin').val();
|
11 |
-
}else if(resaon == 'Other'){
|
12 |
-
reasontext = $('#reason_other').val();
|
13 |
-
} else if(resaon == 'Is not working with a plugin that I need'){
|
14 |
-
reasontext = $('#reason_not_working_with_needed_plugin').val();
|
15 |
-
}
|
16 |
-
var dataString = 'Resason='+resaon+'&TextReason='+reasontext+'&SiteUrl='+SiteUrl+'&SiteAdminEmail='+SiteAdminEmail;
|
17 |
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
url:ajaxurl,
|
22 |
-
success:function(data) {
|
23 |
-
location.reload();
|
24 |
-
|
25 |
-
}
|
26 |
-
});
|
27 |
-
|
28 |
-
});
|
29 |
-
});
|
30 |
-
}(jQuery));
|
1 |
+
JotForm.init(function(){
|
2 |
+
JotForm.highlightInputs = false;
|
3 |
+
JotForm.clearFieldOnHide="disable";
|
4 |
+
/*INIT-END*/
|
5 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
+
JotForm.prepareCalculationsOnTheFly([null,null,{"name":"submitForm","qid":"2","text":"Submit Feedback","type":"control_button"},{"name":"input3","qid":"3","text":"","type":"control_radio"},{"name":"clickTo","qid":"4","text":"Quick Feedback\nYour feedback is valuable to us.","type":"control_text"},{"name":"clickTo5","qid":"5","text":"Skip & Deactive","type":"control_text"},{"description":"","name":"others","qid":"6","subLabel":"Your feedback means a lot to us","text":"Others","type":"control_textarea"}]);
|
8 |
+
setTimeout(function() {
|
9 |
+
JotForm.paymentExtrasOnTheFly([null,null,{"name":"submitForm","qid":"2","text":"Submit Feedback","type":"control_button"},{"name":"input3","qid":"3","text":"","type":"control_radio"},{"name":"clickTo","qid":"4","text":"Quick Feedback\nYour feedback is valuable to us.","type":"control_text"},{"name":"clickTo5","qid":"5","text":"Skip & Deactive","type":"control_text"},{"description":"","name":"others","qid":"6","subLabel":"Your feedback means a lot to us","text":"Others","type":"control_textarea"}]);}, 20);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/js/jotform.forms.js
ADDED
@@ -0,0 +1,1272 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
if(window.console===undefined){if(!window.console||!console.firebug){(function(m,i){window.console={};var e=function(){};while(i--){window.console[m[i]]=e;}})('log debug info warn error assert dir dirxml trace group groupEnd time timeEnd profile profileEnd count'.split(' '),16);}
|
2 |
+
window.console.error=function(e){throw(e);};}
|
3 |
+
window.requestAnimFrame=(function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(callback){window.setTimeout(callback,1000/60);};})();if(window.Prototype===undefined){throw("Error:prototype.js is required by protoplus.js. Go to prototypejs.org and download lates version.");}
|
4 |
+
Protoplus={Version:"0.9.9",exec:function(code){return eval(code);},REFIDCOUNT:100,references:{},getIEVersion:function(){var rv=-1;if(navigator.appName=='Microsoft Internet Explorer')
|
5 |
+
{var ua=navigator.userAgent;var re=new RegExp("MSIE ([0-9]{1,}[\\.0-9]{0,})");if(re.exec(ua)!==null){rv=parseFloat(RegExp.$1);}}
|
6 |
+
return rv;},Transitions:{linear:function(x){return x;},sineIn:function(x){return 1-Math.cos(x*Math.PI/2);},sineOut:function(x){return Math.sin(x*Math.PI/2);},sineInOut:function(x){return 0.5-Math.cos(x*Math.PI)/2;},backIn:function(b){var a=1.70158;return(b)*b*((a+1)*b-a);},backOut:function(b){var a=1.70158;return(b=b-1)*b*((a+1)*b+a)+1;},backInOut:function(b){var a=1.70158;if((b/=0.5)<1){return 0.5*(b*b*(((a*=(1.525))+1)*b-a));}return 0.5*((b-=2)*b*(((a*=(1.525))+1)*b+a)+2);},cubicIn:function(x){return Math.pow(x,3);},cubicOut:function(x){return 1+Math.pow(x-1,3);},cubicInOut:function(x){return x<0.5?4*Math.pow(x,3):1+4*Math.pow(x-1,3);},quadIn:function(x){return Math.pow(x,2);},quadOut:function(x){return 1-Math.pow(x-1,2);},quadInOut:function(x){return x<0.5?2*Math.pow(x,2):1-2*Math.pow(x-1,2);},quartIn:function(x){return Math.pow(x,4);},quartOut:function(x){return 1-Math.pow(x-1,4);},quartInOut:function(x){return x<0.5?8*Math.pow(x,4):1-8*Math.pow(x-1,4);},quintIn:function(x){return Math.pow(x,5);},quintOut:function(x){return 1+Math.pow(x-1,5);},quintInOut:function(x){return x<0.5?16*Math.pow(x,5):1+16*Math.pow(x-1,5);},circIn:function(x){return 1-Math.sqrt(1-Math.pow(x,2));},circOut:function(x){return Math.sqrt(1-Math.pow(x-1,2));},circInOut:function(x){return x<0.5?0.5-Math.sqrt(1-Math.pow(2*x,2))*0.5:0.5+Math.sqrt(1-Math.pow(2*x-2,2))*0.5;},expoIn:function(x){return Math.pow(2,10*(x-1));},expoOut:function(x){return 1-Math.pow(2,-10*x);},expoInOut:function(x){x=2*x-1;return x<0?Math.pow(2,10*x)/2:1-Math.pow(2,-10*x)/2;},swingFrom:function(b){var a=1.70158;return b*b*((a+1)*b-a);},swingTo:function(b){var a=1.70158;return(b-=1)*b*((a+1)*b+a)+1;},swingFromTo:function(b){var a=1.70158;return((b/=0.5)<1)?0.5*(b*b*(((a*=(1.525))+1)*b-a)):0.5*((b-=2)*b*(((a*=(1.525))+1)*b+a)+2);},easeFrom:function(a){return Math.pow(a,4);},easeTo:function(a){return Math.pow(a,0.25);},easeFromTo:function(a){if((a/=0.5)<1){return 0.5*Math.pow(a,4);}return-0.5*((a-=2)*Math.pow(a,3)-2);},pulse:function(x,n){if(!n){n=1;}return 0.5-Math.cos(x*n*2*Math.PI)/2;},wobble:function(x,n){if(!n){n=3;}return 0.5-Math.cos((2*n-1)*x*x*Math.PI)/2;},elastic:function(x,e){var a;if(!e){a=30;}else{e=Math.round(Math.max(1,Math.min(10,e)));a=(11-e)*5;}return 1-Math.cos(x*8*Math.PI)/(a*x+1)*(1-x);},bounce:function(x,n){n=n?Math.round(n):4;var c=3-Math.pow(2,2-n);var m=-1,d=0,i=0;while(m/c<x){d=Math.pow(2,1-i++);m+=d;}if(m-d>0){x-=((m-d)+d/2)/c;}return c*c*Math.pow(x,2)+(1-Math.pow(0.25,i-1));},bouncePast:function(a){if(a<(1/2.75)){return(7.5625*a*a);}else{if(a<(2/2.75)){return 2-(7.5625*(a-=(1.5/2.75))*a+0.75);}else{if(a<(2.5/2.75)){return 2-(7.5625*(a-=(2.25/2.75))*a+0.9375);}else{return 2-(7.5625*(a-=(2.625/2.75))*a+0.984375);}}}}},Colors:{colorNames:{"Black":"#000000","MidnightBlue":"#191970","Navy":"#000080","DarkBlue":"#00008B","MediumBlue":"#0000CD","Blue":"#0000FF","DodgerBlue":"#1E90FF","RoyalBlue":"#4169E1","SlateBlue":"#6A5ACD","SteelBlue":"#4682B4","CornflowerBlue":"#6495ED","Teal":"#008080","DarkCyan":"#008B8B","MediumSlateBlue":"#7B68EE","CadetBlue":"#5F9EA0","DeepSkyBlue":"#00BFFF","DarkTurquoise":"#00CED1","MediumAquaMarine":"#66CDAA","MediumTurquoise":"#48D1CC","Turquoise":"#40E0D0","LightSkyBlue":"#87CEFA","SkyBlue":"#87CEEB","Aqua":"#00FFFF","Cyan":"#00FFFF","Aquamarine":"#7FFFD4","PaleTurquoise":"#AFEEEE","PowderBlue":"#B0E0E6","LightBlue":"#ADD8E6","LightSteelBlue":"#B0C4DE","Salmon":"#FA8072","LightSalmon":"#FFA07A","Coral":"#FF7F50","Brown":"#A52A2A","Sienna":"#A0522D","Tomato":"#FF6347","Maroon":"#800000","DarkRed":"#8B0000","Red":"#FF0000","OrangeRed":"#FF4500","Darkorange":"#FF8C00","DarkGoldenRod":"#B8860B","GoldenRod":"#DAA520","Orange":"#FFA500","Gold":"#FFD700","Yellow":"#FFFF00","LemonChiffon":"#FFFACD","LightGoldenRodYellow":"#FAFAD2","LightYellow":"#FFFFE0","DarkOliveGreen":"#556B2F","DarkSeaGreen":"#8FBC8F","DarkGreen":"#006400","MediumSeaGreen":"#3CB371","DarkKhaki":"#BDB76B","Green":"#008000","Olive":"#808000","OliveDrab":"#6B8E23","ForestGreen":"#228B22","LawnGreen":"#7CFC00","Lime":"#00FF00","YellowGreen":"#9ACD32","LimeGreen":"#32CD32","Chartreuse":"#7FFF00","GreenYellow":"#ADFF2F","LightSeaGreen":"#20B2AA","SeaGreen":"#2E8B57","SandyBrown":"#F4A460","DarkSlateGray":"#2F4F4F","DimGray":"#696969","Gray":"#808080","SlateGray":"#708090","LightSlateGray":"#778899","DarkGray":"#A9A9A9","Silver":"#C0C0C0","Indigo":"#4B0082","Purple":"#800080","DarkMagenta":"#8B008B","BlueViolet":"#8A2BE2","DarkOrchid":"#9932CC","DarkViolet":"#9400D3","DarkSlateBlue":"#483D8B","MediumPurple":"#9370D8","MediumOrchid":"#BA55D3","Fuchsia":"#FF00FF","Magenta":"#FF00FF","Orchid":"#DA70D6","Violet":"#EE82EE","DeepPink":"#FF1493","Pink":"#FFC0CB","MistyRose":"#FFE4E1","LightPink":"#FFB6C1","Plum":"#DDA0DD","HotPink":"#FF69B4","SpringGreen":"#00FF7F","MediumSpringGreen":"#00FA9A","LightGreen":"#90EE90","PaleGreen":"#98FB98","RosyBrown":"#BC8F8F","MediumVioletRed":"#C71585","IndianRed":"#CD5C5C","SaddleBrown":"#8B4513","Peru":"#CD853F","Chocolate":"#D2691E","Tan":"#D2B48C","LightGrey":"#D3D3D3","PaleVioletRed":"#D87093","Thistle":"#D8BFD8","Crimson":"#DC143C","FireBrick":"#B22222","Gainsboro":"#DCDCDC","BurlyWood":"#DEB887","LightCoral":"#F08080","DarkSalmon":"#E9967A","Lavender":"#E6E6FA","LavenderBlush":"#FFF0F5","SeaShell":"#FFF5EE","Linen":"#FAF0E6","Khaki":"#F0E68C","PaleGoldenRod":"#EEE8AA","Wheat":"#F5DEB3","NavajoWhite":"#FFDEAD","Moccasin":"#FFE4B5","PeachPuff":"#FFDAB9","Bisque":"#FFE4C4","BlanchedAlmond":"#FFEBCD","AntiqueWhite":"#FAEBD7","PapayaWhip":"#FFEFD5","Beige":"#F5F5DC","OldLace":"#FDF5E6","Cornsilk":"#FFF8DC","Ivory":"#FFFFF0","FloralWhite":"#FFFAF0","HoneyDew":"#F0FFF0","WhiteSmoke":"#F5F5F5","AliceBlue":"#F0F8FF","LightCyan":"#E0FFFF","GhostWhite":"#F8F8FF","MintCream":"#F5FFFA","Azure":"#F0FFFF","Snow":"#FFFAFA","White":"#FFFFFF"},getPalette:function(){var generated={};var cr=['00','44','77','99','BB','EE','FF'];var i=0;for(var r=0;r<cr.length;r++){for(var g=0;g<cr.length;g++){for(var b=0;b<cr.length;b++){generated[(i++)+"_"]='#'+cr[r]+cr[g]+cr[b];}}}
|
7 |
+
return generated;},getRGBarray:function(color){if(typeof color=="string"){if(color.indexOf("rgb")>-1){color=color.replace(/rgb\(|\).*?$/g,"").split(/,\s*/,3);}else{color=color.replace("#","");if(color.length==3){color=color.replace(/(.)/g,function(n){return parseInt(n+n,16)+", ";}).replace(/,\s*$/,"").split(/,\s+/);}else{color=color.replace(/(..)/g,function(n){return parseInt(n,16)+", ";}).replace(/,\s*$/,"").split(/,\s+/);}}}
|
8 |
+
for(var x=0;x<color.length;x++){color[x]=Number(color[x]);}
|
9 |
+
return color;},rgbToHex:function(){var ret=[];var ret2=[];for(var i=0;i<arguments.length;i++){ret.push((arguments[i]<16?"0":"")+Math.round(arguments[i]).toString(16));}
|
10 |
+
return"#"+ret.join('').toUpperCase();},hexToRgb:function(str){str=str.replace("#","");var ret=[];if(str.length==3){str.replace(/(.)/g,function(str){ret.push(parseInt(str+str,16));});}else{str.replace(/(..)/g,function(str){ret.push(parseInt(str,16));});}
|
11 |
+
return ret;},invert:function(hex){var rgb=Protoplus.Colors.hexToRgb(hex);return Protoplus.Colors.rgbToHex(255-rgb[0],255-rgb[1],255-rgb[2]);}},Profiler:{stimes:{},start:function(title){Protoplus.Profiler.stimes[title]=(new Date()).getTime();},end:function(title,ret){var res=(((new Date()).getTime()-Protoplus.Profiler.stimes[title])/1000).toFixed(3);if(ret){return res;}
|
12 |
+
msg=title+' took '+res;if('console'in window){console.log(msg);}}}};Object.extend(Hash.prototype,{debug:function(opts){opts=opts?opts:{};node=this._object;text=opts.text?opts.text+"\n":"";for(var e in node){if(typeof node[e]=="function"&&!opts.showFunctions){continue;}
|
13 |
+
if(opts.skipBlanks&&(node[e]===""||node[e]===undefined)){continue;}
|
14 |
+
var stophere=confirm(text+e+" => "+node[e]);if(stophere){return node[e];}}}});Object.extend(Object,{deepClone:function(obj){if(typeof obj!=='object'||obj===null){return obj;}
|
15 |
+
var clone=Object.isArray(obj)?[]:{};for(var i in obj){var node=obj[i];if(typeof node=='object'){if(Object.isArray(node)){clone[i]=[];for(var j=0;j<node.length;j++){if(typeof node[j]!='object'){clone[i].push(node[j]);}else{clone[i].push(this.deepClone(node[j]));}}}else{clone[i]=this.deepClone(node);}}else{clone[i]=node;}}
|
16 |
+
return clone;},isBoolean:function(bool){return(bool===true||bool===false);},isRegExp:function(obj){return!!(obj&&obj.test&&obj.exec&&(obj.ignoreCase||obj.ignoreCase===false));}});Object.extend(String.prototype,{cleanJSON:function(){return this.replace(/(\"?)(\:|\,)\s+(\"?)/g,'$1$2$3');},shorten:function(length,closure){length=length?length:"30";closure=closure?closure:"...";var sh=this.substr(0,length);sh+=(this.length>length)?closure:"";return sh;},squeeze:function(length){length=length?length:"30";var join="...";if((length-join.length)>=this.length){return this;}
|
17 |
+
var l=Math.floor((length-join.length)/2);var start=this.substr(0,l+1);var end=this.substr(-(l),l);return start+join+end;},printf:function(){var args=arguments;var word=this.toString(),i=0;return word.replace(/(\%(\w))/gim,function(word,match,tag,count){var s=args[i]!==undefined?args[i]:'';i++;switch(tag){case"f":return parseFloat(s).toFixed(2);case"d":return parseInt(s,10);case"x":return s.toString(16);case"X":return s.toString(16).toUpperCase();case"s":return s;default:return match;}});},sanitize:function(){var str=this;return(str+'').replace(/[\\"']/g,'\\$&').replace(/\u0000/g,'\\0');},nl2br:function(is_xhtml){var str=this;var breakTag=(is_xhtml||typeof is_xhtml==='undefined')?'<br />':'<br>';return(str+'').replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g,'$1'+breakTag+'');},stripslashes:function(){var str=this;return(str+'').replace(/\\(.?)/g,function(s,n1){switch(n1){case'\\':return'\\';case'0':return'\u0000';case'':return'';default:return n1;}});},turkishToUpper:function(){var string=this;var letters={"i":"İ","ş":"Ş","ğ":"Ğ","ü":"Ü","ö":"Ö","ç":"Ç","ı":"I"};string=string.replace(/([iışğüçö])+/g,function(letter){return letters[letter];});return string.toUpperCase();},turkishToLower:function(){var string=this;var letters={"İ":"i","I":"ı","Ş":"ş","Ğ":"ğ","Ü":"ü","Ö":"ö","Ç":"ç"};string=string.replace(/([İIŞĞÜÇÖ])+/g,function(letter){return letters[letter];});return string.toLowerCase();},toCamelCase:function(){var str=this;newStr=str.replace(/\s+/g,'_');strArr=newStr.split('_');if(strArr.length===0){return newStr;}
|
18 |
+
newStr="";for(var i=0;i<strArr.length;i++){newStr+=strArr[i][0].toUpperCase();newStr+=strArr[i].substr(1);}
|
19 |
+
return newStr;},fixUTF:function(){var lowerCase={"a":"00E1:0103:01CE:00E2:00E4:0227:1EA1:0201:00E0:1EA3:0203:0101:0105:1D8F:1E9A:00E5:1E01:2C65:00E3:0251:1D90","b":"1E03:1E05:0253:1E07:1D6C:1D80:0180:0183","c":"0107:010D:00E7:0109:0255:010B:0188:023C","d":"010F:1E11:1E13:0221:1E0B:1E0D:0257:1E0F:1D6D:1D81:0111:0256:018C","e":"00E9:0115:011B:0229:00EA:1E19:00EB:0117:1EB9:0205:00E8:1EBB:0207:0113:2C78:0119:1D92:0247:1EBD:1E1B","f":"1E1F:0192:1D6E:1D82","g":"01F5:011F:01E7:0123:011D:0121:0260:1E21:1D83:01E5","h":"1E2B:021F:1E29:0125:2C68:1E27:1E23:1E25:0266:1E96:0127","i":"0131:00ED:012D:01D0:00EE:00EF:1ECB:0209:00EC:1EC9:020B:012B:012F:1D96:0268:0129:1E2D","j":"01F0:0135:029D:0249","k":"1E31:01E9:0137:2C6A:A743:1E33:0199:1E35:1D84:A741","l":"013A:019A:026C:013E:013C:1E3D:0234:1E37:2C61:A749:1E3B:0140:026B:1D85:026D:0142:0269:1D7C","m":"1E3F:1E41:1E43:0271:1D6F:1D86","n":"0144:0148:0146:1E4B:0235:1E45:1E47:01F9:0272:1E49:019E:1D70:1D87:0273:00F1","o":"00F3:014F:01D2:00F4:00F6:022F:1ECD:0151:020D:00F2:1ECF:01A1:020F:A74B:A74D:2C7A:014D:01EB:00F8:00F5","p":"1E55:1E57:A753:01A5:1D71:1D88:A755:1D7D:A751","q":"A759:02A0:024B:A757","r":"0155:0159:0157:1E59:1E5B:0211:027E:0213:1E5F:027C:1D72:1D89:024D:027D","s":"015B:0161:015F:015D:0219:1E61:1E63:0282:1D74:1D8A:023F","t":"0165:0163:1E71:021B:0236:1E97:2C66:1E6B:1E6D:01AD:1E6F:1D75:01AB:0288:0167","u":"00FA:016D:01D4:00FB:1E77:00FC:1E73:1EE5:0171:0215:00F9:1EE7:01B0:0217:016B:0173:1D99:016F:0169:1E75:1D1C:1D7E","v":"2C74:A75F:1E7F:028B:1D8C:2C71:1E7D","w":"1E83:0175:1E85:1E87:1E89:1E81:2C73:1E98","x":"1E8D:1E8B:1D8D","y":"00FD:0177:00FF:1E8F:1EF5:1EF3:01B4:1EF7:1EFF:0233:1E99:024F:1EF9","z":"017A:017E:1E91:0291:2C6C:017C:1E93:0225:1E95:1D76:1D8E:0290:01B6:0240","ae":"00E6:01FD:01E3","dz":"01F3:01C6","3":"0292:01EF:0293:1D9A:01BA:01B7:01EE"};var upperCase={"A":"00C1:0102:01CD:00C2:00C4:0226:1EA0:0200:00C0:1EA2:0202:0100:0104:00C5:1E00:023A:00C3","B":"1E02:1E04:0181:1E06:0243:0182","C":"0106:010C:00C7:0108:010A:0187:023B","D":"010E:1E10:1E12:1E0A:1E0C:018A:1E0E:0110:018B","E":"00C9:0114:011A:0228:00CA:1E18:00CB:0116:1EB8:0204:00C8:1EBA:0206:0112:0118:0246:1EBC:1E1A","F":"1E1E:0191","G":"01F4:011E:01E6:0122:011C:0120:0193:1E20:01E4:0262:029B","H":"1E2A:021E:1E28:0124:2C67:1E26:1E22:1E24:0126","I":"00CD:012C:01CF:00CE:00CF:0130:1ECA:0208:00CC:1EC8:020A:012A:012E:0197:0128:1E2C:026A:1D7B","J":"0134:0248","K":"1E30:01E8:0136:2C69:A742:1E32:0198:1E34:A740","L":"0139:023D:013D:013B:1E3C:1E36:2C60:A748:1E3A:013F:2C62:0141:029F:1D0C","M":"1E3E:1E40:1E42:2C6E","N":"0143:0147:0145:1E4A:1E44:1E46:01F8:019D:1E48:0220:00D1","O":"00D3:014E:01D1:00D4:00D6:022E:1ECC:0150:020C:00D2:1ECE:01A0:020E:A74A:A74C:014C:019F:01EA:00D8:00D5","P":"1E54:1E56:A752:01A4:A754:2C63:A750","Q":"A758:A756","R":"0154:0158:0156:1E58:1E5A:0210:0212:1E5E:024C:2C64","S":"015A:0160:015E:015C:0218:1E60:1E62","T":"0164:0162:1E70:021A:023E:1E6A:1E6C:01AC:1E6E:01AE:0166","U":"00DA:016C:01D3:00DB:1E76:00DC:1E72:1EE4:0170:0214:00D9:1EE6:01AF:0216:016A:0172:016E:0168:1E74","V":"A75E:1E7E:01B2:1E7C","W":"1E82:0174:1E84:1E86:1E88:1E80:2C72","X":"1E8C:1E8A","Y":"00DD:0176:0178:1E8E:1EF4:1EF2:01B3:1EF6:1EFE:0232:024E:1EF8","Z":"0179:017D:1E90:2C6B:017B:1E92:0224:1E94:01B5","AE":"00C6:01FC:01E2","DZ":"01F1:01C4"};var str=this.toString();for(var lk in lowerCase){var lvalue='\\u'+lowerCase[lk].split(':').join('|\\u');str=str.replace(new RegExp(lvalue,'gm'),lk);}
|
20 |
+
for(var uk in upperCase){var uvalue='\\u'+upperCase[uk].split(':').join('|\\u');str=str.replace(new RegExp(uvalue,'gm'),uk);}
|
21 |
+
return str;},ucFirst:function(){return this.charAt(0).toUpperCase()+this.substr(1,this.length+1);}});var __result=document.URL.toQueryParams();Object.extend(document,{createCSS:function(selector,declaration){var id="style-"+selector.replace(/\W/gim,'');if($(id)){$(id).remove();}
|
22 |
+
var ua=navigator.userAgent.toLowerCase();var isIE=(/msie/.test(ua))&&!(/opera/.test(ua))&&(/win/.test(ua));var style_node=document.createElement("style");style_node.id=id;style_node.setAttribute("type","text/css");style_node.setAttribute("media","screen");if(!isIE){style_node.appendChild(document.createTextNode(selector+" {"+declaration+"}"));}
|
23 |
+
document.getElementsByTagName("head")[0].appendChild(style_node);if(isIE&&document.styleSheets&&document.styleSheets.length>0){var last_style_node=document.styleSheets[document.styleSheets.length-1];if(typeof(last_style_node.addRule)=="object"){last_style_node.addRule(selector,declaration);}}},selectRadioOption:function(options,value){options.each(function(ele){if(ele.value===value)
|
24 |
+
{ele.checked=true;}});},preloadImages:function(images){var args=arguments;if(Object.isArray(images)){args=images;}
|
25 |
+
var i=0;for(i=0,images=[];(src=args[i]);i++){images.push(new Image());images.last().src=src;}},readRadioOption:function(options){for(var i=0;i<options.length;i++){var ele=options[i];if(ele.checked===true)
|
26 |
+
{return ele.value;}}
|
27 |
+
return false;},getEvent:function(ev){if(!ev){ev=window.event;}
|
28 |
+
if(!ev.keyCode&&ev.keyCode!==0){ev.keyCode=ev.which;}
|
29 |
+
return ev;},parameters:__result,get:__result,ready:function(func){document.observe("dom:loaded",func);},getUnderneathElement:function(e){var pointX=(Prototype.Browser.WebKit)?Event.pointerX(e):e.clientX;var pointY=(Prototype.Browser.WebKit)?Event.pointerY(e):e.clientY;return document.elementFromPoint(pointX,pointY);},createCookie:function(name,value,days,path){path=path?path:"/";var expires="";if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));expires=";expires="+date.toGMTString();}
|
30 |
+
document.cookie=name+"="+escape(value)+expires+";path="+path;},readCookie:function(name){var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' '){c=c.substring(1,c.length);}
|
31 |
+
if(c.indexOf(nameEQ)===0){return decodeURIComponent(c.substring(nameEQ.length,c.length));}}
|
32 |
+
return null;},eraseCookie:function(name){document.createCookie(name,"",-1);},storeJsonCookie:function(name,value,days){var val=Object.toJSON(value).cleanJSON();document.createCookie(name,val,days);},readJsonCookie:function(name){if(document.readCookie(name)){return document.readCookie(name).toString().evalJSON();}else{return{};}},getClientDimensions:function(){var head=document.body.parentNode;return{height:head.scrollHeight,width:head.scrollWidth};},keyboardMap:function(map){document.keyMap=map;var shortcut={'all_shortcuts':{},'add':function(shortcut_combination,callback,opt){var default_options={'type':'keydown','propagate':false,'disable_in_input':false,'target':document,'keycode':false};if(!opt){opt=default_options;}else{for(var dfo in default_options){if(typeof opt[dfo]=='undefined'){opt[dfo]=default_options[dfo];}}}var ele=opt.target;if(typeof opt.target=='string'){ele=document.getElementById(opt.target);}var ths=this;shortcut_combination=shortcut_combination.toLowerCase();var func=function(e){e=e||window.event;if(opt.disable_in_input){var element;if(e.target){element=e.target;}else if(e.srcElement){element=e.srcElement;}if(element.nodeType==3){element=element.parentNode;}if(element.tagName=='INPUT'||element.tagName=='TEXTAREA'||element.readAttribute('contenteditable')||document._onedit){return;}}if(e.keyCode){code=e.keyCode;}else if(e.which){code=e.which;}var character=String.fromCharCode(code).toLowerCase();if(code==188){character=",";}if(code==190){character=".";}var keys=shortcut_combination.split("+");var kp=0;var shift_nums={"`":"~","1":"!","2":"@","3":"#","4":"$","5":"%","6":"^","7":"&","8":"*","9":"(","0":")","-":"_","=":"+",";":":","'":"\"",",":"<",".":">","/":"?","\\":"|"};var special_keys={'esc':27,'escape':27,'tab':9,'space':32,'return':13,'enter':13,'backspace':8,'scrolllock':145,'scroll_lock':145,'scroll':145,'capslock':20,'caps_lock':20,'caps':20,'numlock':144,'num_lock':144,'num':144,'pause':19,'break':19,'insert':45,'home':36,'delete':46,'end':35,'pageup':33,'page_up':33,'pu':33,'pagedown':34,'page_down':34,'pd':34,'left':37,'up':38,'right':39,'down':40,'f1':112,'f2':113,'f3':114,'f4':115,'f5':116,'f6':117,'f7':118,'f8':119,'f9':120,'f10':121,'f11':122,'f12':123};var modifiers={shift:{wanted:false,pressed:false},ctrl:{wanted:false,pressed:false},alt:{wanted:false,pressed:false},meta:{wanted:false,pressed:false}};if(e.ctrlKey){modifiers.ctrl.pressed=true;}if(e.shiftKey){modifiers.shift.pressed=true;}if(e.altKey){modifiers.alt.pressed=true;}if(e.metaKey){modifiers.meta.pressed=true;}for(var i=0;i<keys.length;i++){k=keys[i];if(k=='ctrl'||k=='control'){kp++;modifiers.ctrl.wanted=true;}else if(k=='shift'){kp++;modifiers.shift.wanted=true;}else if(k=='alt'){kp++;modifiers.alt.wanted=true;}else if(k=='meta'){kp++;modifiers.meta.wanted=true;}else if(k.length>1){if(special_keys[k]==code){kp++;}}else if(opt.keycode){if(opt.keycode==code){kp++;}}else{if(character==k){kp++;}else{if(shift_nums[character]&&e.shiftKey){character=shift_nums[character];if(character==k){kp++;}}}}}if(kp==keys.length&&modifiers.ctrl.pressed==modifiers.ctrl.wanted&&modifiers.shift.pressed==modifiers.shift.wanted&&modifiers.alt.pressed==modifiers.alt.wanted&&modifiers.meta.pressed==modifiers.meta.wanted){callback(e);if(!opt.propagate){e.cancelBubble=true;e.returnValue=false;if(e.stopPropagation){e.stopPropagation();e.preventDefault();}return false;}}};this.all_shortcuts[shortcut_combination]={'callback':func,'target':ele,'event':opt.type};if(ele.addEventListener){ele.addEventListener(opt.type,func,false);}else if(ele.attachEvent){ele.attachEvent('on'+opt.type,func);}else{ele['on'+opt.type]=func;}},'remove':function(shortcut_combination){shortcut_combination=shortcut_combination.toLowerCase();var binding=this.all_shortcuts[shortcut_combination];delete(this.all_shortcuts[shortcut_combination]);if(!binding){return;}var type=binding.event;var ele=binding.target;var callback=binding.callback;if(ele.detachEvent){ele.detachEvent('on'+type,callback);}else if(ele.removeEventListener){ele.removeEventListener(type,callback,false);}else{ele['on'+type]=false;}}};$H(map).each(function(pair){var key=pair.key;var opts=pair.value;shortcut.add(key,opts.handler,{disable_in_input:opts.disableOnInputs});});},checkDocType:function(){if(document.doctype===null){return false;}
|
33 |
+
var publicId=document.doctype.publicId.toLowerCase();return(publicId.indexOf("html 4")>0)||(publicId.indexOf("xhtml")>0);}});Object.extend(Event,{mousewheel:Prototype.Browser.Gecko?'DOMMouseScroll':'mousewheel',wheel:function(event){var delta=0;if(!event){event=window.event;}
|
34 |
+
if(event.wheelDelta){delta=event.wheelDelta/120;if(window.opera){delta=-delta;}}else if(event.detail){delta=-event.detail/3;}
|
35 |
+
return Math.round(delta);},isInput:function(e){var element;if(e.target){element=e.target;}else if(e.srcElement){element=e.srcElement;}
|
36 |
+
if(element.nodeType==3){element=element.parentNode;}
|
37 |
+
if(element.tagName=='INPUT'||element.tagName=='TEXTAREA'){return true;}
|
38 |
+
return false;},isRightClick:function(event){var _isButton;if(Prototype.Browser.IE){var buttonMap={0:1,1:4,2:2};_isButton=function(event,code){return event.button===buttonMap[code];};}else if(Prototype.Browser.WebKit){_isButton=function(event,code){switch(code){case 0:return event.which==1&&!event.metaKey;case 1:return event.which==1&&event.metaKey;case 2:return event.which==3&&!event.metaKey;default:return false;}};}else{_isButton=function(event,code){return event.which?(event.which===code+1):(event.button===code);};}
|
39 |
+
return _isButton(event,2);}});Protoplus.utils={cloneElem:function(element){if(Prototype.Browser.IE){var div=document.createElement('div');div.innerHTML=element.outerHTML;return $(div.firstChild);}
|
40 |
+
return element.cloneNode(true);},openInNewTab:function(element,link){element.observe('mouseover',function(e){if(!element.tabLink){var a=new Element('a',{href:link,target:'_blank'}).insert(' ');a.setStyle('opacity:0; z-index:100000; height:5px; width:5px; position:absolute; top:'+(Event.pointerY(e)-2.5)+'px;left:'+(Event.pointerX(e)-2.5)+'px');a.observe('click',function(){element.tabLinked=false;a.remove();});$(document.body).insert(a);element.tabLink=a;element.observe('mousemove',function(e){element.tabLink.setStyle('top:'+(Event.pointerY(e)-2.5)+'px;left:'+(Event.pointerX(e)-2.5)+'px');});}});return element;},hasFixedContainer:function(element){var result=false;element.ancestors().each(function(el){if(result){return;}
|
41 |
+
if(el.style.position=="fixed"){result=true;}});return result;},getCurrentStyle:function(element,name){if(element.style[name]){return element.style[name];}else if(element.currentStyle){return element.currentStyle[name];}
|
42 |
+
else if(document.defaultView&&document.defaultView.getComputedStyle){name=name.replace(/([A-Z])/g,"-$1");name=name.toLowerCase();s=document.defaultView.getComputedStyle(element,"");return s&&s.getPropertyValue(name);}else{return null;}},isOverflow:function(element){if(element.resized){element.hideHandlers();}
|
43 |
+
var curOverflow=element.style.overflow;if(!curOverflow||curOverflow==="visible"){element.style.overflow="hidden";}
|
44 |
+
var leftOverflowing=element.clientWidth<element.scrollWidth;var topOverflowing=element.clientHeight<element.scrollHeight;var isOverflowing=leftOverflowing||topOverflowing;element.style.overflow=curOverflow;if(element.resized){element.showHandlers();}
|
45 |
+
return isOverflowing?{top:topOverflowing?element.scrollHeight:false,left:leftOverflowing?element.scrollWidth:false,both:leftOverflowing&&topOverflowing}:false;},setUnselectable:function(target){if(typeof target.style.MozUserSelect!="undefined"&&target.className=="form-section-closed"){target.style.MozUserSelect="normal";}
|
46 |
+
else if(typeof target.onselectstart!="undefined"){target.onselectstart=function(){return false;};}
|
47 |
+
else if(typeof target.style.MozUserSelect!="undefined"){target.style.MozUserSelect="none";}
|
48 |
+
else{target.onmousedown=function(){return false;};}
|
49 |
+
target.__oldCursor=target.style.cursor;target.style.cursor='default';return target;},setSelectable:function(target){if(typeof target.onselectstart!="undefined"){target.onselectstart=document.createElement("div").onselectstart;}
|
50 |
+
else if(typeof target.style.MozUserSelect!="undefined"){target.style.MozUserSelect=document.createElement("div").style.MozUserSelect;}
|
51 |
+
else{target.onmousedown="";}
|
52 |
+
if(target.__oldCursor){target.style.cursor=target.__oldCursor;}else{target.style.cursor='';}
|
53 |
+
return target;},selectText:function(element){var r1="";if(document.selection){r1=document.body.createTextRange();r1.moveToElementText(element);r1.setEndPoint("EndToEnd",r1);r1.moveStart('character',4);r1.moveEnd('character',8);r1.select();}
|
54 |
+
else{s=window.getSelection();r1=document.createRange();r1.setStartBefore(element);r1.setEndAfter(element);s.addRange(r1);}
|
55 |
+
return element;},hover:function(elem,over,out){$(elem).observe("mouseover",function(evt){if(typeof over=="function"){if(elem.innerHTML){if(elem.descendants().include(evt.relatedTarget)){return true;}}
|
56 |
+
over(elem,evt);}else if(typeof over=="string"){$(elem).addClassName(over);}});$(elem).observe("mouseout",function(evt){if(typeof out=="function"){if(elem.innerHTML){if(elem.descendants().include(evt.relatedTarget)){return true;}}
|
57 |
+
out(elem,evt);}else if(typeof over=="string"){$(elem).removeClassName(over);}});return elem;},mouseEnter:function(elem,over,out){$(elem).observe("mouseenter",function(evt){if(typeof over=="function"){over(elem,evt);}else if(typeof over=="string"){$(elem).addClassName(over);}});$(elem).observe("mouseleave",function(evt){if(typeof out=="function"){out(elem,evt);}else if(typeof over=="string"){$(elem).removeClassName(over);}});return elem;},setScroll:function(element,amounts){if(amounts.x!==undefined){element.scrollLeft=amounts.x;}
|
58 |
+
if(amounts.y!==undefined){element.scrollTop=amounts.y;}},scrollInto:function(element,options){options=Object.extend({offset:[100,100],direction:'bottom'},options||{});element=$(element);var pos=Element.cumulativeOffset(element);var vp=document.viewport.getDimensions();var ed=Element.getDimensions(element);switch(options.direction){case'bottom':if(pos[1]+options.offset[1]>=vp.height+window.scrollY){window.scrollTo(window.scrollX,(pos[1]+options.offset[1])-vp.height);}else if(window.scrollY!==0&&(pos[1]+options.offset[1]<=Math.abs(vp.height-window.scrollY))){window.scrollTo(window.scrollX,(pos[1]+options.offset[1])-vp.height);}
|
59 |
+
break;case"top":var height=element.getHeight();if(window.scrollY!==0&&pos[1]<=window.scrollY+options.offset[1]){window.scrollTo(window.scrollX,pos[1]-options.offset[1]);}else if(window.scrollY!==0&&(pos[1]+options.offset[1]<=Math.abs(vp.height-window.scrollY))){window.scrollTo(window.scrollX,pos[1]-options.offset[1]);}
|
60 |
+
break;}
|
61 |
+
return element;},getScroll:function(element){return{x:parseFloat(element.scrollLeft),y:parseFloat(element.scrollTop)};},setText:function(element,value){element.innerHTML=value;return element;},putValue:function(element,value){if(element.clearHint){element.clearHint();}
|
62 |
+
element.value=value;return element;},resetUpload:function(element){if(Prototype.Browser.IE){var p=element.parentNode;var c=element.cloneNode(true);p.replaceChild(c,element);return c;}
|
63 |
+
element.value='';return element;},run:function(element,event){if(event.include(':')){element.fire(event);}else{var evt;var disabled=element.hasClassName('form-dropdown')&&element.disabled?!!(element.enable()):false;if(document.createEventObject&&!Prototype.Browser.IE9&&!Prototype.Browser.IE10){evt=document.createEventObject();element.fireEvent('on'+event,evt);}else{evt=document.createEvent("HTMLEvents");evt.initEvent(event,true,true);if(disabled){setTimeout(function(){element.dispatchEvent(evt);element.disable();},0);}else{element.dispatchEvent(evt);}}}
|
64 |
+
return element;},setCSSBorderRadius:function(element,value){return element.setStyle({MozBorderRadius:value,borderRadius:value,'-webkit-border-radius':value});},getSelected:function(element){if(!element.options){if(element.innerHTML){return element.innerHTML;}
|
65 |
+
else{return element.value;}}
|
66 |
+
var selected=element.selectedIndex>=0?element.options[element.selectedIndex]:element;return selected;},selectOption:function(element,val){if(!val){return element;}
|
67 |
+
var match_found=false;$A(element.options).each(function(option){if(Object.isRegExp(val)&&(val.test(option.value))){option.selected=true;throw $break;}
|
68 |
+
if(val==option.value){option.selected=true;match_found=true;}});if(match_found==false){$A(element.options).each(function(option){if(Object.isRegExp(val)&&(val.test(option.text))){option.selected=true;throw $break;}
|
69 |
+
if(val==option.text){option.selected=true;}});}
|
70 |
+
element.run('change');return element;},stopAnimation:function(element){element.__stopAnimation=true;return element;},shift:function(element,options){options=Object.extend({duration:1,onEnd:Prototype.K,onStart:Prototype.K,onStep:Prototype.K,onCreate:Prototype.K,delay:0,link:'cancel',transparentColor:'#ffffff',remove:false,easingCustom:false,propertyEasings:{},easing:Protoplus.Transitions.sineOut},options||{});if(!element.queue){element.queue=[];}
|
71 |
+
options.onCreate(element,options);if(options.link=="ignore"&&element.timer){return element;}else if((options.link=="chain"||options.link=="queue")&&element.timer){element.queue.push(options);return element;}
|
72 |
+
if(element.timer){clearInterval(element.timer);}
|
73 |
+
if(element.delayTime){clearTimeout(element.delayTime);}
|
74 |
+
if(typeof options.easing=='string'){if(options.easing in Protoplus.Transitions){options.easing=Protoplus.Transitions[options.easing];}else{options.easing=Protoplus.Transitions.sineOut;}}else if(typeof options.easing=='object'){options.propertyEasings=options.easing;options.easing=Protoplus.Transitions.sineOut;}else if(typeof options.easing!='function'){options.easing=Protoplus.Transitions.sineOut;}
|
75 |
+
options.duration*=1000;options.delay*=1000;element.timer=false;var properties={},begin,end,init=function(){begin=new Date().getTime();end=begin+options.duration;options.onStart(element);};for(var x in options){if(!["duration","onStart","onStep","transparentColor","onEnd","onCreate","remove","easing","link","delay","easingCustom","propertyEasings"].include(x)&&options[x]!==false){properties[x]=options[x];}}
|
76 |
+
var unitRex=/\d+([a-zA-Z%]+)$/;for(var i in properties){var okey=i,oval=properties[i];var to,from,key,unit,s=[],easing=options.easing;if(["scrollX","scrollLeft","scrollY","scrollTop"].include(okey)){to=parseFloat(oval);key=(okey=="scrollX")?"scrollLeft":(okey=="scrollY")?"scrollTop":okey;if(element.tagName=="BODY"){from=(okey=="scrollX"||okey=="scrollLeft")?window.scrollX:window.scrollY;}else{from=(okey=="scrollX"||okey=="scrollLeft")?element.scrollLeft:element.scrollTop;}
|
77 |
+
unit='';}else if(okey=="rotate"){to=parseFloat(oval);key="-webkit-transform";from=Element.getStyle(element,'-webkit-transform')?parseInt(Element.getStyle(element,'-webkit-transform').replace(/rotate\(|\)/gim,""),10):0;unit='deg';}else if(["background","color","borderColor","backgroundColor"].include(okey)){if(oval=='transparent'){oval=options.transparentColor;}
|
78 |
+
to=Protoplus.Colors.hexToRgb(oval);key=okey=="background"?"backgroundColor":okey;var bgcolor=Element.getStyle(element,key);if(!bgcolor||bgcolor=='transparent'){bgcolor=options.transparentColor;}
|
79 |
+
from=Protoplus.Colors.getRGBarray(bgcolor);unit='';}else if(okey=="opacity"){to=(typeof oval=="string")?parseInt(oval,10):oval;key=okey;from=Element.getStyle(element,okey);unit='';from=parseFloat(from);}else{to=(typeof oval=="string")?parseInt(oval,10):oval;key=okey;from=Element.getStyle(element,okey.replace("-webkit-","").replace("-moz-",""))||"0px";unit=okey=='opacity'?'':(unitRex.test(from))?from.match(unitRex)[1]:'px';from=parseFloat(from);}
|
80 |
+
if(okey in options.propertyEasings){easing=Protoplus.Transitions[options.propertyEasings[okey]];}
|
81 |
+
if(!to&&to!==0){try{s[key]=oval;element.style[key]=oval;}catch(e){}}else{properties[okey]={key:key,to:to,from:from,unit:unit,easing:easing};}}
|
82 |
+
var fn=function(ease,option,arr){var val=0;if(arr!==false){return Math.round(option.from[arr]+ease*(option.to[arr]-option.from[arr]));}
|
83 |
+
return(option.from+ease*(option.to-option.from));};element.__stopAnimation=false;var step=function(){var time=new Date().getTime(),okey,oval,rgb;if(element.__stopAnimation===true){clearInterval(element.timer);element.timer=false;element.__stopAnimation=false;return;}
|
84 |
+
if(time>=end){clearInterval(element.timer);element.timer=false;var valTo=(options.easing=="pulse"||options.easing==Protoplus.Transitions.pulse)?"from":"to";for(okey in properties){oval=properties[okey];if(["scrollX","scrollLeft","scrollY","scrollTop"].include(okey)){if(element.tagName.toUpperCase()=="BODY"){if(oval.key=="scrollLeft"){window.scrollTo(oval[valTo],window.scrollY);}else{window.scrollTo(window.scrollX,oval[valTo]);}}else{element[oval.key]=oval[valTo]+oval.unit;}}else if(["background","color","borderColor","backgroundColor"].include(okey)){element.style[oval.key]='rgb('+oval[valTo].join(', ')+")";}else if(okey=="opacity"){Element.setOpacity(element,oval[valTo]);}else if(okey=="rotate"){element.style[okey]="rotate("+oval[valTo]+oval.unit+")";}else{element.style[okey]=oval[valTo]+oval.unit;}}
|
85 |
+
if(options.onEnd){options.onEnd(element);}
|
86 |
+
if(options.remove){element.remove();}
|
87 |
+
if(element.queue.length>0){var que=element.queue.splice(0,1);element.shift(que[0]);}
|
88 |
+
return element;}
|
89 |
+
if(options.onStep){options.onStep(element);}
|
90 |
+
for(okey in properties){oval=properties[okey];if(oval.key=="scrollLeft"||oval.key=="scrollTop"){if(element.tagName.toUpperCase()=="BODY"){var scroll=parseInt(fn(oval.easing((time-begin)/options.duration,options.easingCustom),oval,false),10)+oval.unit;if(oval.key=="scrollLeft"){window.scrollTo(scroll,window.scrollY);}else{window.scrollTo(window.scrollX,scroll);}}else{element[oval.key]=parseInt(fn(oval.easing((time-begin)/options.duration,options.easingCustom),oval,false),10)+oval.unit;}}else if(okey=="background"||okey=="color"||okey=="borderColor"||okey=="backgroundColor"){rgb=[];for(var x=0;x<3;x++){rgb[x]=fn(oval.easing((time-begin)/options.duration,options.easingCustom),oval,x);}
|
91 |
+
element.style[oval.key]='rgb('+rgb.join(', ')+')';}else if(okey=="opacity"){Element.setOpacity(element,fn(oval.easing((time-begin)/options.duration,options.easingCustom),oval,false));}else if(okey=="rotate"){element.style[oval.key]="rotate("+fn(oval.easing((time-begin)/options.duration,options.easingCustom),oval,false)+oval.unit+")";}else{element.style[okey]=fn(oval.easing((time-begin)/options.duration,options.easingCustom),oval,false)+oval.unit;}}};if(options.delay){element.delayTime=setTimeout(function(){init();element.timer=setInterval(step,10);},options.delay);}else{init();element.timer=setInterval(step,10);}
|
92 |
+
return element;},fade:function(element,options){options=Object.extend({duration:0.5,onEnd:function(e){e.setStyle({display:"none"});},onStart:Prototype.K,opacity:0},options||{});element.shift(options);},appear:function(element,options){options=Object.extend({duration:0.5,onEnd:Prototype.K,onStart:Prototype.K,opacity:1},options||{});element.setStyle({opacity:0,display:"block"});element.shift(options);},disable:function(element){element=$(element);element.disabled=true;return element;},enable:function(element){element=$(element);element.disabled=false;return element;},setReference:function(element,name,reference){if(!element.REFID){element.REFID=Protoplus.REFIDCOUNT++;}
|
93 |
+
if(!Protoplus.references[element.REFID]){Protoplus.references[element.REFID]={};}
|
94 |
+
Protoplus.references[element.REFID][name]=$(reference);return element;},getReference:function(element,name){if(!element.REFID){return false;}
|
95 |
+
return Protoplus.references[element.REFID][name];},remove:function(element){if(element.REFID){delete Protoplus.references[element.REFID];}
|
96 |
+
if(element.parentNode){element.parentNode.removeChild(element);}
|
97 |
+
return element;}};(function(emile,container){var parseEl=document.createElement('div'),props=('backgroundColor borderBottomColor borderBottomWidth borderLeftColor borderLeftWidth '+'borderRightColor borderRightWidth borderSpacing borderTopColor borderTopWidth bottom color fontSize '+'fontWeight height left letterSpacing lineHeight marginBottom marginLeft marginRight marginTop maxHeight '+'maxWidth minHeight minWidth opacity outlineColor outlineOffset outlineWidth paddingBottom paddingLeft '+'paddingRight paddingTop right textIndent top width wordSpacing zIndex').split(' ');function interpolate(source,target,pos){return(source+(target-source)*pos).toFixed(3);}
|
98 |
+
function s(str,p,c){return str.substr(p,c||1);}
|
99 |
+
function color(source,target,pos){var i=2,j=3,c,tmp,v=[],r=[];j=3;c=arguments[i-1];while(i--){if(s(c,0)=='r'){c=c.match(/\d+/g);while(j--){v.push(~~c[j]);}}else{if(c.length==4){c='#'+s(c,1)+s(c,1)+s(c,2)+s(c,2)+s(c,3)+s(c,3);}
|
100 |
+
while(j--){v.push(parseInt(s(c,1+j*2,2),16));}}
|
101 |
+
j=3;c=arguments[i-1];}
|
102 |
+
while(j--){tmp=~~(v[j+3]+(v[j]-v[j+3])*pos);r.push(tmp<0?0:tmp>255?255:tmp);}
|
103 |
+
return'rgb('+r.join(',')+')';}
|
104 |
+
function parse(prop){var p=parseFloat(prop),q=prop.replace(/^[\-\d\.]+/,'');return isNaN(p)?{v:q,f:color,u:''}:{v:p,f:interpolate,u:q};}
|
105 |
+
function normalize(style){var css,rules={},i=props.length,v;parseEl.innerHTML='<div style="'+style+'"></div>';css=parseEl.childNodes[0].style;while(i--){v=css[props[i]];if(v){rules[props[i]]=parse(v);}}
|
106 |
+
return rules;}
|
107 |
+
container[emile]=function(el,style,opts){el=typeof el=='string'?document.getElementById(el):el;opts=opts||{};var target=normalize(style),comp=el.currentStyle?el.currentStyle:getComputedStyle(el,null),prop,current={},start=+new Date(),dur=opts.duration||200,finish=start+dur,interval,easing=opts.easing||function(pos){return(-Math.cos(pos*Math.PI)/2)+0.5;};for(prop in target){current[prop]=parse(comp[prop]);}
|
108 |
+
interval=setInterval(function(){var time=+new Date(),pos=time>finish?1:(time-start)/dur;for(var prop in target){el.style[prop]=target[prop].f(current[prop].v,target[prop].v,easing(pos))+target[prop].u;}
|
109 |
+
if(time>finish){clearInterval(interval);if(opts.after){opts.after();}}},10);};})('emile',Protoplus.utils);Element.addMethods(Protoplus.utils);Event.observe(window,'unload',function(){Protoplus=null;});Ajax=Object.extend(Ajax,{Jsonp:function(url,options){this.options=Object.extend({method:'post',timeout:60,parameters:'',force:false,onComplete:Prototype.K,onSuccess:Prototype.K,onFail:Prototype.K},options||{});var parameterString=url.match(/\?/)?'&':'?';this.response=false;var callback_id=new Date().getTime();Ajax["callback_"+callback_id]=function(response){this.response=response;}.bind(this);this.callback=Ajax.callback;if(typeof this.options.parameters=="string"){parameterString+=this.options.parameters;}else{$H(this.options.parameters).each(function(p){parameterString+=p.key+'='+encodeURIComponent(p.value)+'&';});}
|
110 |
+
var matches=/^(\w+:)?\/\/([^\/?#]+)/.exec(url);var sameDomain=(matches&&(matches[1]&&matches[1]!=location.protocol||matches[2]!=location.host));if(!sameDomain&&this.options.force===false){return new Ajax.Request(url,this.options);}
|
111 |
+
this.url=url+parameterString+'callbackName=Ajax.callback_'+callback_id+'&nocache='+new Date().getTime();this.script=new Element('script',{type:'text/javascript',src:this.url});var errored=false;this.onError=function(e,b,c){errored=true;this.options.onComplete({success:false,error:e||"Not Found"});this.options.onFail({success:false,error:e||"Not Found",args:[e,b,c]});this.script.remove();window.onerror=null;this.response=false;}.bind(this);this.onLoad=function(e){if(errored){return;}
|
112 |
+
clearTimeout(timer);this.script.onreadystatechange=null;this.script.onload=null;var res=this.script;this.script.remove();window.onerror=null;if(this.response){setTimeout(function(){this.options.onComplete({responseJSON:this.response});this.options.onSuccess({responseJSON:this.response});}.bind(this),20);}else{this.onError({error:'Callback error'});}}.bind(this);this.readyState=function(e){var rs=this.script.readyState;if(rs=='loaded'||rs=='complete'){this.onLoad();}}.bind(this);var timer=setTimeout(this.onError,this.options.timeout*1000);this.script.onreadystatechange=this.readyState;this.script.onload=this.onLoad;window.onerror=function(e,b,c){clearTimeout(timer);this.onError(e,b,c);return true;}.bind(this);$$('head')[0].appendChild(this.script);return this;}});var _alert=window.alert;if(!location.pathname.match(/^\/answers\/.+/)){window.alert=function(){var args=arguments;var i=1;var first=args[0];if(typeof first=="object"){$H(first).debug();return first;}else if(typeof first=="string"){var msg=first.replace(/(\%s)/gim,function(e){return args[i++]||"";});_alert(msg);return true;}
|
113 |
+
_alert(first);};}
|
114 |
+
var rand=function(min,max){return Math.floor(Math.random()*(max-min))+min;};if("__protoinit"in window){document.ready(function(e){$A(__protoinit).each(function(f){f(e);});});}
|
115 |
+
(function(){if(Prototype.Browser.WebKit){var FIX_WEBKIT_FOCUS=function(e){if(e.target&&e.target.focus){e.target.focus();}};document.addEventListener('DOMNodeInserted',function(e){if(e.target.tagName==='BUTTON'||(e.target.tagName==='INPUT'&&e.target.type!=='text')){e.target.observe('click',FIX_WEBKIT_FOCUS);}},false);document.observe('dom:loaded',function(){$$('button, input:not([type="text"])').invoke('observe','click',FIX_WEBKIT_FOCUS);});}})();;if(window.Protoplus===undefined){throw("Error: ProtoPlus is required by ProtoPlus-UI.js");}
|
116 |
+
Object.extend(document,{getViewPortDimensions:function(){var height;var width;if(typeof window.innerWidth!='undefined')
|
117 |
+
{width=window.innerWidth;height=window.innerHeight;}else if(typeof document.documentElement!='undefined'&&typeof document.documentElement.clientWidth!='undefined'&&document.documentElement.clientWidth!==0){width=document.documentElement.clientWidth;height=document.documentElement.clientHeight;}else{width=document.getElementsByTagName('body')[0].clientWidth;height=document.getElementsByTagName('body')[0].clientHeight;}
|
118 |
+
return{height:height,width:width};},stopTooltips:function(){document.stopTooltip=true;$$(".pp_tooltip_").each(function(t){t.remove();});return true;},startTooltips:function(){document.stopTooltip=false;}});Protoplus.ui={isVisible:function(element){element=$(element);if(!element.parentNode){return false;}
|
119 |
+
if(element&&element.tagName=="BODY"){return true;}
|
120 |
+
if(element.style.display=="none"||element.style.visibility=="hidden"){return false;}
|
121 |
+
return Protoplus.ui.isVisible(element.parentNode);},setDraggable:function(element,options){options=Object.extend({dragClass:"",handler:false,dragFromOriginal:false,onStart:Prototype.K,changeClone:Prototype.K,onDrag:Prototype.K,onDragEnd:Prototype.K,onEnd:Prototype.K,dragEffect:false,revert:false,clone:false,snap:false,cursor:"move",offset:false,constraint:false,constrainLeft:false,constrainRight:false,constrainTop:false,constrainBottom:false,constrainOffset:false,constrainViewport:false,constrainParent:false,dynamic:true},options||{});if(options.snap&&(typeof options.snap=="number"||typeof options.snap=="string")){options.snap=[options.snap,options.snap];}
|
122 |
+
var mouseUp="mouseup",mouseDown="mousedown",mouseMove="mousemove";if(options.constrainOffset){if(options.constrainOffset.length==4){options.constrainTop=options.constrainTop?options.constrainTop:options.constrainOffset[0];options.constrainRight=options.constrainRight?options.constrainRight:options.constrainOffset[1];options.constrainBottom=options.constrainBottom?options.constrainBottom:options.constrainOffset[2];options.constrainLeft=options.constrainLeft?options.constrainLeft:options.constrainOffset[3];}}
|
123 |
+
var handler;var stopDragTimer=false;var drag=function(e){Event.stop(e);if(mouseMove=="touchmove"){e=e.touches[0];}
|
124 |
+
if(options.onDrag(drag_element,handler,e)===false){return;}
|
125 |
+
var top=startY+(Number(Event.pointerY(e)-mouseY));var left=startX+(Number(Event.pointerX(e)-mouseX));if(options.offset){top=options.offset[1]+Event.pointerY(e);left=options.offset[0]+Event.pointerX(e);}
|
126 |
+
if(options.snap){top=(top/options.snap[1]).round()*options.snap[1];left=(left/options.snap[0]).round()*options.snap[0];}
|
127 |
+
top=(options.constrainBottom!==false&&top>=options.constrainBottom)?options.constrainBottom:top;top=(options.constrainTop!==false&&top<=options.constrainTop)?options.constrainTop:top;left=(options.constrainRight!==false&&left>=options.constrainRight)?options.constrainRight:left;left=(options.constrainLeft!==false&&left<=options.constrainLeft)?options.constrainLeft:left;if(options.constraint=="vertical"){drag_element.setStyle({top:top+"px"});}else if(options.constraint=="horizontal"){drag_element.setStyle({left:left+"px"});}else{drag_element.setStyle({top:top+"px",left:left+"px"});}
|
128 |
+
if(stopDragTimer){clearTimeout(stopDragTimer);}
|
129 |
+
options.onDrag(drag_element,handler,e);stopDragTimer=setTimeout(function(){options.onDragEnd(drag_element,handler,e);},50);};var mouseup=function(ev){Event.stop(ev);if(mouseUp=="touchend"){ev=e.touches[0];}
|
130 |
+
if(options.dynamic!==true){document.temp.setStyle({top:element.getStyle('top'),left:element.getStyle('left')});element.parentNode.replaceChild(document.temp,element);document.temp.oldZIndex=element.oldZIndex;element=document.temp;}
|
131 |
+
if(options.onEnd(drag_element,handler,ev)!==false){if(element.oldZIndex){drag_element.setStyle({zIndex:element.oldZIndex});}else{drag_element.setStyle({zIndex:''});}
|
132 |
+
if(options.revert){if(options.revert===true){options.revert={easing:"sineIn",duration:0.5};}
|
133 |
+
options.revert=Object.extend({left:drag_element.startX,top:drag_element.startY,opacity:1,duration:0.5,easing:'sineIn'},options.revert||{});drag_element.shift(options.revert);drag_element.startX=false;drag_element.startY=false;}else{if(options.dragEffect){drag_element.shift({opacity:1,duration:0.2});}}}
|
134 |
+
element.__dragging=false;drag_element.removeClassName(options.dragClass);handler.setSelectable();drag_element.setSelectable();$(document.body).setSelectable();document.stopObserving(mouseMove,drag);document.stopObserving(mouseUp,mouseup);};if(options.handler){if(typeof options.handler=="string"){handler=(options.handler.startsWith("."))?element.descendants().find(function(h){return h.className==options.handler.replace(/^\./,"");}):$(options.handler);}else{handler=$(options.handler);}}else{handler=element;}
|
135 |
+
handler.setStyle({cursor:options.cursor});handler.observe(mouseDown,function(e){Event.stop(e);var evt=e;if(mouseDown=="touchstart"){e=e.touches[0];}
|
136 |
+
element.__dragging=true;if(document.stopDrag){return true;}
|
137 |
+
if(options.dragFromOriginal&&e.target!=handler){return false;}
|
138 |
+
var vdim=false,voff=false;if(options.constrainElement){voff=(Prototype.Browser.IE)?{top:0,left:0}:$(options.constrainElement).cumulativeOffset();vdim=$(options.constrainElement).getDimensions();}
|
139 |
+
if(options.constrainParent){if($(element.parentNode).getStyle('position')=="relative"||$(element.parentNode).getStyle('position')=="absolute"){voff={top:0,left:0};}else{voff=(Prototype.Browser.IE)?{top:0,left:0}:$(element.parentNode).cumulativeOffset();}
|
140 |
+
vdim=$(element.parentNode).getDimensions();}
|
141 |
+
if(options.constrainViewport){voff=$(document.body).cumulativeScrollOffset();vdim=document.viewport.getDimensions();}
|
142 |
+
if(vdim){vdim.height+=voff.top;vdim.width+=voff.left;options.constrainTop=voff.top+1;options.constrainBottom=vdim.height-(element.getHeight()+3);options.constrainRight=vdim.width-(element.getWidth()+3);options.constrainLeft=voff.left+1;}
|
143 |
+
var temp_div;if(options.dynamic!==true){try{document.temp=element;temp_div=new Element('div').setStyle({height:element.getHeight()+"px",width:element.getWidth()+"px",border:'1px dashed black',top:element.getStyle('top')||0,left:element.getStyle('left')||0,zIndex:element.getStyle('zIndex')||0,position:element.getStyle('position'),background:'#f5f5f5',opacity:0.3});}catch(err){}
|
144 |
+
element.parentNode.replaceChild(temp_div,element);element=temp_div;}
|
145 |
+
if(["relative","absolute"].include($(element.parentNode).getStyle('position'))){startX=element.getStyle("left")?parseInt(element.getStyle("left"),10):element.offsetLeft;startY=element.getStyle("top")?parseInt(element.getStyle("top"),10):element.offsetTop;}else{var eloff=element.cumulativeOffset();startX=eloff.left;startY=eloff.top;}
|
146 |
+
mouseX=Number(Event.pointerX(e));mouseY=Number(Event.pointerY(e));if(options.clone){drag_element=options.changeClone(element.cloneNode({deep:true}),startX,startY);$(document.body).insert(drag_element);}else{drag_element=element;}
|
147 |
+
options.onStart(drag_element,handler,e);drag_element.addClassName(options.dragClass);element.oldZIndex=element.getStyle("z-index")||0;if(options.dragEffect){drag_element.shift({opacity:0.7,duration:0.2});}
|
148 |
+
drag_element.setStyle({position:"absolute",zIndex:99998});if(options.revert&&!drag_element.startX&&!drag_element.startY){drag_element.startX=startX;drag_element.startY=startY;}
|
149 |
+
drag_element.setUnselectable();handler.setUnselectable();$(document.body).setUnselectable();document.observe(mouseMove,drag);document.observe(mouseUp,mouseup);});return element;},tooltip:function(element,text,options){element=$(element);if('Prototip'in window){options=Object.extend({delay:0.01},options||{});var T=new Tip(element,text,options);return element;}
|
150 |
+
if(typeof text!="string"){return element;}
|
151 |
+
options=Object.extend({className:false,fixed:false,opacity:1,title:false,width:200,height:100,offset:false,zIndex:100000,delay:false,duration:false,fadeIn:false,fadeOut:false,shadow:false},options||{});text=(options.title)?"<b>"+options.title+"</b><br>"+text:text;element.hover(function(el,evt){var vpd=document.viewport.getDimensions();var getBoxLocation=function(e){var offTop=options.offset.top?options.offset.top:15;var offLeft=options.offset.left?options.offset.left:15;var top=(Event.pointerY(e)+offTop);var left=(Event.pointerX(e)+offLeft);var dim=tooldiv.getDimensions();if(left+dim.width>(vpd.width-20)){left-=dim.width+20+offLeft;}
|
152 |
+
if(top+dim.height>(vpd.height-20)){top-=dim.height+offTop;}
|
153 |
+
return{top:top,left:left};};if(document.stopTooltip){$$(".pp_tooltip_").each(function(t){t.remove();});return true;}
|
154 |
+
outer=new Element("div",{className:'pp_tooltip_'}).setStyle({opacity:options.opacity,position:"absolute",zIndex:options.zIndex});if(options.className){tooldiv=new Element("div",{className:options.className}).setStyle({position:"relative",top:"0px",left:"0px",zIndex:10}).update(text);}else{tooldiv=new Element("div").setStyle({padding:"4px",background:"#eee",width:(options.width=="auto"?"auto":options.width+"px"),border:"1px solid #333",position:"absolute",top:"0px",left:"0px",zIndex:10}).update(text);tooldiv.setCSSBorderRadius('5px');}
|
155 |
+
if(options.shadow){shadTop=options.shadow.top?parseInt(options.shadow.top,10):4;shadLeft=options.shadow.left?parseInt(options.shadow.left,10):4;shadBack=options.shadow.back?options.shadow.back:"#000";shadOp=options.shadow.opacity?options.shadow.opacity:0.2;if(options.className){shadow=new Element("div",{className:options.className||""}).setStyle({position:"absolute",borderColor:"#000",color:"#000",top:shadTop+"px",left:shadLeft+"px",zIndex:9,background:shadBack,opacity:shadOp});shadow.update(text);}else{shadow=new Element("div",{className:options.className||""}).setStyle({padding:"4px",border:"1px solid black",color:"#000",width:options.width+"px",position:"absolute",top:shadTop+"px",left:shadLeft+"px",zIndex:9,background:shadBack,opacity:shadOp});shadow.setCSSBorderRadius('5px');shadow.update(text);}
|
156 |
+
outer.appendChild(shadow);}
|
157 |
+
outer.appendChild(tooldiv);var makeItAppear=function(){if(options.fixed){var fixTop=options.fixed.top?parseInt(options.fixed.top,10):element.getHeight();var fixLeft=options.fixed.left?parseInt(options.fixed.left,10):element.getWidth()-50;outer.setStyle({top:fixTop+"px",left:fixLeft+"px"});}else{element.observe("mousemove",function(e){if(document.stopTooltip){$$(".pp_tooltip_").each(function(t){t.remove();});return true;}
|
158 |
+
var loc=getBoxLocation(e);outer.setStyle({top:loc.top+"px",left:loc.left+"px"});});}};outer.delay=setTimeout(function(){if(options.fadeIn){document.body.appendChild(outer);var fl=getBoxLocation(evt);outer.setStyle({opacity:0,top:fl.top+"px",left:fl.left+"px"});dur=options.fadeIn.duration?options.fadeIn.duration:1;outer.appear({duration:dur,onEnd:makeItAppear()});}else{document.body.appendChild(outer);var l=getBoxLocation(evt);outer.setStyle({top:l.top+"px",left:l.left+"px"});setTimeout(makeItAppear,100);}
|
159 |
+
if(options.duration){outer.duration=setTimeout(function(){if(options.fadeOut){dur=options.fadeOut.duration?options.fadeOut.duration:1;outer.fade({duration:dur,onEnd:function(){if(outer.parentNode){outer.remove();}}});}else{if(outer.parentNode){outer.remove();}}},options.duration*1000||0);}},options.delay*1000||0);},function(){if(document.stopTooltip){$$(".pp_tooltip_").each(function(t){t.remove();});return true;}
|
160 |
+
if(outer){clearTimeout(outer.delay);clearTimeout(outer.duration);}
|
161 |
+
if(options.fadeOut){dur=options.fadeOut.duration?options.fadeOut.duration:0.2;outer.fade({duration:dur,onEnd:function(){if(outer.parentNode){outer.remove();}}});}else{if(outer.parentNode){outer.remove();}}});return element;},rating:function(element,options){element=$(element);options=Object.extend({imagePath:"stars.png",onRate:Prototype.K,resetButtonImage:false,resetButtonTitle:'Cancel Your Rating',resetButton:true,inputClassName:'',titles:[],disable:false,disabled:element.getAttribute("disabled")?element.getAttribute("disabled"):false,stars:element.getAttribute("stars")?element.getAttribute("stars"):5,name:element.getAttribute("name")?element.getAttribute("name"):"rating",value:element.getAttribute("value")?element.getAttribute("value"):0,cleanFirst:false},options||{});if(element.converted){return element;}
|
162 |
+
element.converted=true;element.addClassName('form-star-rating');var image={blank:"0px 0px",over:"-16px 0px",clicked:"-32px 0px",half:"-48px 0px"};var hidden=new Element("input",{type:"hidden",name:options.name,className:options.inputClassName});var stardivs=$A([]);element.disabled=(options.disabled=="true"||options.disabled===true)?true:false;element.setStyle({display:'inline-block',width:((parseInt(options.stars,10)+(options.resetButton?1:0))*20)+"px",cursor:options.disabled?"default":"pointer"});element.setUnselectable();if(options.cleanFirst){element.update();}
|
163 |
+
var setStar=function(i){var elval=i;i=i||0;var desc=$A(element.descendants());desc.each(function(e){e.setStyle({backgroundPosition:image.blank}).removeClassName("rated");});desc.each(function(e,c){if(c<i){e.setStyle({backgroundPosition:image.clicked}).addClassName("rated");}});hidden.value=i||"";if(options.disable){element.disabled=true;element.setStyle({cursor:"default"});}
|
164 |
+
element.value=elval;options.onRate(element,options.name,i);element.run('keyup');hidden.run('change');if(options.resetButton){cross[(i===0)?"hide":"show"]();}};element.setRating=setStar;$A($R(1,options.stars)).each(function(i){var star=new Element("div").setStyle({height:"16px",width:"16px",margin:"0.5px",cssFloat:"left",backgroundImage:"url("+options.imagePath+")"});star.observe("mouseover",function(){if(!element.disabled){var desc=$A(element.descendants());desc.each(function(e,c){if(c<i){e.setStyle({backgroundPosition:e.hasClassName("rated")?image.clicked:image.over});}});}}).observe("click",function(){if(!element.disabled){setStar(i);}});if(options.titles&&options.titles[i-1]){star.title=options.titles[i-1];}
|
165 |
+
stardivs.push(star);});if(!options.disabled){element.observe("mouseout",function(){element.descendants().each(function(e){e.setStyle({backgroundPosition:e.hasClassName("rated")?image.clicked:image.blank});});});}
|
166 |
+
if(options.resetButton){var cross=new Element("div").setStyle({height:"16px",width:"16px",margin:"0.5px",cssFloat:"left",color:'#999',fontSize:'12px',textAlign:'center'});if(options.resetButtonImage){cross.insert(new Element('img',{src:options.resetButtonImage,align:'absmiddle'}));}else{cross.insert(' x ');}
|
167 |
+
cross.title=options.resetButtonTitle;cross.hide();cross.observe('click',function(){setStar(undefined);});stardivs.push(cross);}
|
168 |
+
stardivs.each(function(star){element.insert(star);});element.insert(hidden);if(options.value>0){element.descendants().each(function(e,c){c++;if(c<=options.value){e.setStyle({backgroundPosition:image.clicked}).addClassName("rated");}
|
169 |
+
if(options.value>c-1&&options.value<c){e.setStyle({backgroundPosition:image.half}).addClassName("rated");}});hidden.value=options.value;}
|
170 |
+
return element;},slider:function(element,options){element=$(element);options=Object.extend({width:100,onUpdate:Prototype.K,maxValue:100,value:0,buttonBack:'url("../images/ball.png") no-repeat scroll 0px 0px transparent'},options||{});if("JotForm"in window&&"url"in JotForm){options.buttonBack='url("'+JotForm.url+'/images/ball.png") no-repeat scroll 0px 0px transparent';}
|
171 |
+
var valueToPixel=function(value){var val=(value*100/options.maxValue)*barWidth/100;val=val<3?3:val;return Math.round(val);};var sliderOut=new Element('div',{tabindex:1});var sliderBar=new Element('div');var sliderButton=new Element('div',{id:new Date().getTime()});var sliderTable=new Element('table',{cellpadding:0,cellspacing:1,border:0,width:options.width,className:element.className});var tbody=new Element('tbody');var tr=new Element('tr');var tr2=new Element('tr');var sliderTD=new Element('td',{colspan:3});var startTD=new Element('td',{align:'center',width:20}).insert('0');var statTD=new Element('td',{align:'center',width:options.width-40}).insert(options.value).setStyle('font-weight:bold');var endTD=new Element('td',{align:'center',width:20}).insert(options.maxValue);var barWidth=options.width-18;var defaultValue=options.value;options.value=valueToPixel(options.value);var moveLEFT=function(amount){var l=parseInt(sliderButton.getStyle('left'),10)-amount;l=(l<=3)?3:l;sliderButton.setStyle({left:l+"px"});updateValue(l);};var moveRIGTH=function(amount){var l=parseInt(sliderButton.getStyle('left'),10)+amount;l=(l>=barWidth)?barWidth:l;sliderButton.setStyle({left:l+"px"});updateValue(l);};var sliderKeys=function(e){e=document.getEvent(e);if(e.keyCode==37){moveLEFT(5);}else if(e.keyCode==39){moveRIGTH(5);}};var sliderWheel=function(e){if(!sliderOut.__hasFocus){return true;}
|
172 |
+
e.stop();sliderOut.focus();var w=Event.wheel(e);if(w>0){moveRIGTH(5);}else if(w<0){moveLEFT(5);}};var updateValue=function(pos){var total=barWidth;if(parseInt(pos,10)<=3){element.value=0;}else{var a=Math.round((parseInt(pos,10)*options.maxValue)/total);element.value=parseInt(a,10);}
|
173 |
+
sliderOut.value=element.value===0?"":element.value;sliderTable.value=sliderOut.value;options.onUpdate(element.value);statTD.innerHTML=element.value;element.run('keyup');return element.value;};sliderOut.setStyle({width:options.width+'px',position:'relative',overflow:'hidden',outline:'none'});sliderBar.setStyle({border:'1px solid #999',background:'#eee',margin:'8px',overflow:'hidden',height:'3px'}).setCSSBorderRadius('4px');sliderButton.setStyle({position:'absolute',height:'13px',width:'13px',background:options.buttonBack,overflow:'hidden',border:'1px solid transparent',top:'3px',left:options.value+'px'}).setCSSBorderRadius('8px');startTD.setStyle({fontFamily:'Verdana',fontSize:'9px'});statTD.setStyle({fontFamily:'Verdana',fontSize:'9px'});endTD.setStyle({fontFamily:'Verdana',fontSize:'9px'});sliderOut.insert(sliderBar).insert(sliderButton);sliderTable.insert(tbody.insert(tr).insert(tr2));sliderTD.insert(sliderOut);tr.insert(sliderTD);tr2.insert(startTD).insert(statTD).insert(endTD);sliderButton.setDraggable({constraint:'horizontal',dragEffect:false,cursor:'default',constrainLeft:3,constrainRight:barWidth,onDrag:function(i){updateValue(i.getStyle('left'));}});sliderOut.observe('focus',function(){sliderOut.__hasFocus=true;sliderOut.setStyle({borderColor:'#333'});}).observe('blur',function(){sliderOut.__hasFocus=false;sliderOut.setStyle({borderColor:'#ccc'});});sliderOut.observe('keypress',sliderKeys).observe(Event.mousewheel,sliderWheel);sliderOut.observe('click',function(e){if(e.target.id==sliderButton.id){return false;}
|
174 |
+
var l=(Event.pointerX(e)-sliderBar.cumulativeOffset().left);l=l<3?3:l;l=l>barWidth?barWidth:l;sliderButton.shift({left:l,duration:0.5});updateValue(l);});var hidden=new Element('input',{type:'hidden',className:'form-slider '+element.className,name:element.name,value:defaultValue,id:element.id});element.parentNode.replaceChild(hidden,element);element=hidden;$(hidden.parentNode).insert(sliderTable.setUnselectable());hidden.setSliderValue=function(val){var v=valueToPixel(val);sliderButton.shift({left:v,duration:0.5});updateValue(v);};return hidden;},spinner:function(element,options){element=$(element);options=Object.extend({width:60,cssFloat:false,allowNegative:false,addAmount:1,maxValue:false,minValue:false,readonly:false,value:false,size:5,iconPath:'/assets/img/builder/flat_arrow.svg',onChange:Prototype.K},options||{});element.size=options.size;if(options.value===false){element.value=parseFloat(element.value)||'0';}else{element.value=options.value;}
|
175 |
+
if(options.minValue)
|
176 |
+
{if(parseFloat(element.value)<parseFloat(options.minValue))
|
177 |
+
{element.value=options.minValue;}}
|
178 |
+
else if(!options.allowNegative&&parseFloat(element.value)<0)
|
179 |
+
{element.value='0';}
|
180 |
+
element.writeAttribute('autocomplete','off');var buttonStyles={height:'50%',width:'20px',position:'relative',background:'#E6E7EA',boxSizing:'border-box'};var imgStyles={width:'8px',height:'6px',position:'absolute',margin:'-3px 0 0 -4px',top:'50%',left:'50%'};var spinnerContainer=new Element('div',{tabindex:'1'});if(options.cssFloat){spinnerContainer.setStyle({cssFloat:options.cssFloat,marginRight:'5px'});}
|
181 |
+
var spinnerTable,arrowCont,inputCont,upTD,downTD,upArrow,downArrow;spinnerTable=new Element('div',{className:'form-spinner'});spinnerContainer.insert(spinnerTable);element.parentNode.replaceChild(spinnerContainer,element);spinnerTable.insert(inputCont=new Element('div',{className:'form-spinner-input-td'}).insert(element));spinnerTable.insert(arrowCont=new Element('div',{className:'form-spinner-button-container'}));arrowCont.insert(upTD=new Element('div',{className:'form-spinner-up'}).insert(upArrow=new Element('img',{src:options.iconPath,alt:'up arrow'})));arrowCont.insert(downTD=new Element('div',{className:'form-spinner-down'}).insert(downArrow=new Element('img',{src:options.iconPath,style:'transform: rotate(180deg);',alt:'down arrow'})));spinnerTable.setStyle({border:'1px solid #ccc',display:'inline-block',background:'#fff',maxWidth:'180px',position:'relative',width:'100%',paddingRight:'20px',boxSizing:'border-box'});upArrow.setStyle(imgStyles);downArrow.setStyle(imgStyles);upTD.setStyle(buttonStyles);downTD.setStyle(buttonStyles);arrowCont.setStyle({position:'absolute',right:0,top:0,height:'100%'});element.setStyle({width:'100%',border:'none',boxSizing:'border-box',textAlign:'right',outline:'none'});var numberUP=function(e){if(element.hasAttribute("disabled")){return;}
|
182 |
+
if(!parseFloat(element.value)){element.value=0;}
|
183 |
+
if(options.maxValue&&Number(element.value)>=Number(options.maxValue)){return;}
|
184 |
+
var elementValueDP=parseInt(element.value)===parseFloat(element.value)?0:(element.value+'').split('.')[1].length;var addAmountDP=parseFloat(options.addAmount)===parseInt(options.addAmount)?0:(options.addAmount+'').split('.')[1].length;var decimalPoints=elementValueDP>addAmountDP?elementValueDP:addAmountDP;element.value=(parseFloat(element.value)+parseFloat(options.addAmount)).toFixed(decimalPoints);options.onChange(element.value);};var numberDOWN=function(e){if(element.hasAttribute("disabled")){return;}
|
185 |
+
if(!parseFloat(element.value)){element.value=0;}
|
186 |
+
var elementValueDP=parseInt(element.value)===parseFloat(element.value)?0:(element.value+'').split('.')[1].length;var addAmountDP=parseFloat(options.addAmount)===parseInt(options.addAmount)?0:(options.addAmount+'').split('.')[1].length;var decimalPoints=elementValueDP>addAmountDP?elementValueDP:addAmountDP;var newValue=(parseFloat(element.value)-parseFloat(options.addAmount)).toFixed(decimalPoints);if(options.minValue){if(Number(newValue)<Number(options.minValue)){return;}}
|
187 |
+
else if(!options.allowNegative&&newValue<0){return;}
|
188 |
+
element.value=newValue;options.onChange(element.value);};var spinnerKeys=function(e,mode){if(e.target.tagName=="INPUT"&&mode==2){return;}
|
189 |
+
e=document.getEvent(e);if(e.keyCode==38){numberUP(e);e.stop();}else if(e.keyCode==40){numberDOWN(e);e.stop();}};upTD.observe('click',function(e){numberUP(e);element.run('keyup');}).setUnselectable();downTD.observe('click',function(e){numberDOWN(e);element.run('keyup');}).setUnselectable();element.observe(Prototype.Browser.Gecko?'keypress':'keydown',function(e){spinnerKeys(e,1);});spinnerContainer.observe(Prototype.Browser.Gecko?'keypress':'keydown',function(e){spinnerKeys(e,2);});if(options.readonly){element.writeAttribute('readonly',"readonly");}
|
190 |
+
element.observe('change',function(){options.onChange(element.value);});return element;},miniLabel:function(element,label,options){options=Object.extend({position:'bottom',color:'#666',size:9,text:'',nobr:false},options||{});element.wrap('span');span=$(element.parentNode);span.setStyle({whiteSpace:'nowrap',cssFloat:'left',marginRight:'5px'});var labelStyle={paddingLeft:'1px',fontSize:options.size+"px",color:options.color,cursor:'default'};var labelClick=function(){element.focus();};var br='<br>';if(options.nobr){br='';}
|
191 |
+
if(options.position=="top"){element.insert({before:new Element('span').setText(label+br).setStyle(labelStyle).observe('click',labelClick)}).insert({after:options.text});}else{element.insert({after:new Element('span').setText(br+label).setStyle(labelStyle).observe('click',labelClick)}).insert({after:options.text});}
|
192 |
+
return span;},hint:function(element,value,options){element=$(element);if("placeholder"in element){element.writeAttribute('placeholder',value);return element;}
|
193 |
+
if(element.type=='number'){element.value="0";return element;}
|
194 |
+
if(element.removeHint){return element.hintClear();}
|
195 |
+
options=Object.extend({hintColor:'#bbb'},options||{});var color=element.getStyle('color')||'#000';if(element.value===''){element.setStyle({color:options.hintColor});element.value=value;element.hinted=true;}
|
196 |
+
var focus=function(){if(element.value==value){element.value="";element.setStyle({color:color}).hinted=false;}else if(element.readAttribute("masked")=="true"){element.setStyle({color:color}).hinted=false;}};var blur=function(){setTimeout(function(){if(element.value===""){element.value=value;element.setStyle({color:options.hintColor}).hinted=true;}},element.readAttribute("masked")=="true"?10:0);};if(element.readAttribute("masked")=="true"){element.observe('mouseleave',blur);}
|
197 |
+
var submit=function(){if(element.value==value){element.value="";element.hinted=false;}};element.observe('focus',focus);element.observe('blur',blur);if(element.form){$(element.form).observe('submit',submit);}
|
198 |
+
element.runHint=blur;element.clearHint=function(){element.value="";element.setStyle({color:color}).hinted=false;};element.hintClear=function(){element.value=value;element.setStyle({color:options.hintColor}).hinted=true;return element;};element.removeHint=function(){element.setStyle({color:color});if(element.value==value){element.value="";}
|
199 |
+
element.hintClear=undefined;element.hinted=undefined;element.removeHint=undefined;element.stopObserving('focus',focus);element.stopObserving('blur',blur);if(element.form){$(element.form).stopObserving('submit',submit);}
|
200 |
+
return element;};return element;}};Element.addMethods(Protoplus.ui);;var JotForm={url:"//www.jotform.com/",server:"//www.jotform.com/server.php",conditions:{},calculations:{},condValues:{},progressBar:false,forms:[],saveForm:false,imageFiles:["png","jpg","jpeg","ico","tiff","bmp","gif","apng","jp2","jfif"],autoCompletes:{},defaultValues:{},debug:false,highlightInputs:true,noJump:false,initializing:true,lastFocus:false,payment:false,fieldsToPreserve:[],saving:false,loadingPendingSubmission:false,sessionID:null,submissionToken:null,submissionID:null,texts:{confirmEmail:'E-mail does not match',pleaseWait:'Please wait...',validateEmail:'You need to validate this e-mail',confirmClearForm:'Are you sure you want to clear the form',lessThan:'Your score should be less than or equal to',incompleteFields:'There are incomplete required fields. Please complete them.',required:'This field is required.',requireOne:'At least one field required.',requireEveryRow:'Every row is required.',requireEveryCell:'Every cell is required.',email:'Enter a valid e-mail address',alphabetic:'This field can only contain letters',numeric:'This field can only contain numeric values',alphanumeric:'This field can only contain letters and numbers.',cyrillic:'This field can only contain cyrillic characters',url:'This field can only contain a valid URL',currency:'This field can only contain currency values.',fillMask:'Field value must fill mask.',uploadExtensions:'You can only upload following files:',noUploadExtensions:'File has no extension file type (e.g. .txt, .png, .jpeg)',uploadFilesize:'File size cannot be bigger than:',uploadFilesizemin:'File size cannot be smaller than:',gradingScoreError:'Score total should only be less than or equal to',inputCarretErrorA:'Input should not be less than the minimum value:',inputCarretErrorB:'Input should not be greater than the maximum value:',maxDigitsError:'The maximum digits allowed is',freeEmailError:'Free email accounts are not allowed',minSelectionsError:'The minimum required number of selections is ',maxSelectionsError:'The maximum number of selections allowed is ',pastDatesDisallowed:'Date must not be in the past.',dateLimited:'This date is unavailable.',dateInvalid:'This date is not valid. The date format is {format}',dateInvalidSeparate:'This date is not valid. Enter a valid {element}.',ageVerificationError:'You must be older than {minAge} years old to submit this form.',multipleFileUploads_typeError:'{file} has invalid extension. Only {extensions} are allowed.',multipleFileUploads_sizeError:'{file} is too large, maximum file size is {sizeLimit}.',multipleFileUploads_minSizeError:'{file} is too small, minimum file size is {minSizeLimit}.',multipleFileUploads_emptyError:'{file} is empty, please select files again without it.',multipleFileUploads_uploadFailed:'File upload failed, please remove it and upload the file again.',multipleFileUploads_onLeave:'The files are being uploaded, if you leave now the upload will be cancelled.',multipleFileUploads_fileLimitError:'Only {fileLimit} file uploads allowed.',generalError:'There are errors on the form. Please fix them before continuing.',generalPageError:'There are errors on this page. Please fix them before continuing.',wordLimitError:'Too many words. The limit is',wordMinLimitError:'Too few words. The minimum is',characterLimitError:'Too many Characters. The limit is',characterMinLimitError:'Too few characters. The minimum is',ccInvalidNumber:'Credit Card Number is invalid.',ccInvalidCVC:'CVC number is invalid.',ccInvalidExpireDate:'Expire date is invalid.',ccMissingDetails:'Please fill up the credit card details.',ccMissingProduct:'Please select at least one product.',ccMissingDonation:'Please enter numeric values for donation amount.',disallowDecimals:'Please enter a whole number.',restrictedDomain:'This domain is not allowed',ccDonationMinLimitError:'Minimum amount is {minAmount} {currency}'},paymentTexts:{couponApply:'Apply',couponChange:'Change',couponEnter:'Enter Coupon',couponExpired:'Coupon is expired. Please try another one.',couponInvalid:'Coupon is invalid. Please try another one.',couponValid:'Coupon is valid.',couponBlank:'Please enter a coupon.',shippingShipping:'Shipping',totalTotal:'Total',totalSubtotal:'Subtotal',taxTax:'Tax'},validationRegexes:{email:/^\S[a-z0-9\/.!#$%&'*+\/=?\^_`{|}~\-]*(?:\.[a-z0-9!#$%&'*+\/=?\^_`{|}~\-]+)*@(?:[a-z0-9](?:[a-z0-9\-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9\-]*[a-z0-9])$/i,alphanumeric:/^[\u00C0-\u1FFF\u2C00-\uD7FFa-zA-Z0-9\s]+$/,numeric:/^(-?\d+[\.\,]?)+$/,numericDotStart:/^([\.]\d+)+$/,currency:/^-?[\$\£\€]?\d*,?\d*,?\d*(\.\d\d)?Â¥?$/,alphabetic:/^[\u00C0-\u1FFF\u2C00-\uD7FFa-zA-Z\s]+$/,cyrillic:/^[абвгдеёжзийклмнопрÑтуфхцчшщьыъÑÑŽÑÐБВГДЕÐЖЗИЙКЛМÐОПРСТУФХЦЧШЩЬЫЪÐЮЯ\s]*$/,url:/(http|ftp|https){0,1}:{0,1}[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?/},freeEmailAddresses:['gmail','aim','outlook','hotmail','yahoo','mail','inbox'],paymentFields:['control_2co','control_authnet','control_bluepay','control_bluesnap','control_boxpayment','control_braintree','control_cardconnect','control_chargify','control_clickbank','control_dwolla','control_echeck','control_eway','control_firstdata','control_paypalInvoicing','control_gocardless','control_googleco','control_moneris','control_onebip','control_pagseguro','control_payjunction','control_payment','control_paymill','control_paysafe','control_paypal','control_paypalexpress','control_paypalpro','control_payu','control_sofort','control_skrill','control_square','control_stripe','control_stripeACH','control_stripeACHManual','control_wepay','control_worldpay','control_payoneer','control_paypalSPB'],isEncrypted:false,tempUploadFolderInjected:false,disableSubmitButton:false,disableSubmitButtonMessage:'',encryptAll:function(e,callback){e.stop();var ignoredFields=['control_captcha','control_paypal','control_stripe','control_stripeACH','control_stripeACHManual','control_2co','control_paypalexpress','control_authnet','control_paypalpro','control_paymill','control_braintree','control_dwolla','control_payment','control_paymentwall','control_square','control_boxpayment','control_eway','control_bluepay','control_worldpay','control_firstdata','control_paypalInvoicing','control_payjunction','control_worldpayus','control_wepay','control_chargify','control_cardconnect','control_echeck','control_bluesnap','control_payu','control_pagseguro','control_moneris','control_sofort','control_skrill','control_payoneer','control_paysafe','control_gocardless','control_paypalSPB'];var sendAsHiddenField=["control_number","control_spinner","control_email","control_dropdown","control_datetime","control_matrix","control_birthdate","control_time","control_scale","control_rating",];var selfSubmitFields=["control_stripe","control_braintree","control_square","control_eway","control_bluepay","control_wepay"];var submitFormAfterEncrypt=true;var alreadyEncrypted=[];$$('.form-textbox, .form-textarea, .form-radio, .form-checkbox, .form-dropdown, .form-number-input').each(function(field){var fieldLine=field.up('li.form-line');if(!fieldLine){return;}
|
201 |
+
var fieldType=fieldLine.readAttribute('data-type');var fieldId=field.id.replace(/[^_]+_(\d+)(.+)?/,'$1');var encryptedFieldName=field.name;var isMultipleSelectionInput=['checkbox','radio'].include(field.type);if(selfSubmitFields.indexOf(fieldType)>-1&&JotForm.paymentTotal>0){submitFormAfterEncrypt=false;}
|
202 |
+
if(ignoredFields.indexOf(fieldType)!==-1){return;}
|
203 |
+
if(['form-checkbox','form-radio'].include(field.className)){if(!field.checked){return;}
|
204 |
+
encryptedFieldName=field.name+'_'+field.id.replace(/.+_([0-9]+$)/,'$1');}
|
205 |
+
if(fieldType=='control_matrix'&&isMultipleSelectionInput){return;}
|
206 |
+
if((!isMultipleSelectionInput&&alreadyEncrypted.indexOf(encryptedFieldName)!==-1)&&(!field.up().hasClassName('form-matrix-values')&&!field.up(1).hasClassName('form-matrix-values'))||field.value===undefined||(field.value.length>300&&field.value.indexOf('==')==field.value.length-2))
|
207 |
+
{return;}
|
208 |
+
var isUniqueField=JotForm.uniqueField&&JotForm.uniqueField==field.id.replace(/\w+_(\d+)(.+)?/,'$1');if(JotForm.fieldsToPreserve.indexOf(fieldId)>-1||isUniqueField){var name=field.name.replace(/(\w+)(\[\w+\])?/,"$1_unencrypted$2");JotForm.forms[0].insert(new Element('input',{type:'hidden',name:name}).putValue(field.value));}
|
209 |
+
var encryptedAnswer=JotEncrypted.encrypt(field.value);alreadyEncrypted.push(encryptedFieldName);if(fieldType=="control_textarea"){var allFields=$$('[name="'+field.name+'"]');for(x=0;x<allFields.length;x++){allFields[x].value=encryptedAnswer;}
|
210 |
+
return;}
|
211 |
+
var isMixedEmailType=fieldType==='control_mixed'&&field.type==='email';if(sendAsHiddenField.indexOf(fieldType)!==-1||field.tagName=="SELECT"||isMixedEmailType){if(fieldType=="control_scale"&&!field.checked){alreadyEncrypted=alreadyEncrypted.filter(function(enc){return enc!==field.name});return;}
|
212 |
+
var form=$$('.jotform-form')[0];form.insert(new Element('input',{type:'hidden',name:field.name}).putValue(encryptedAnswer));if(fieldType=='control_matrix'){field.name="";}
|
213 |
+
return;}
|
214 |
+
if(field.getAttribute('data-masked')){var maskValue=field.getAttribute('maskvalue');JotForm.setQuestionMasking(field,'',maskValue,true);}
|
215 |
+
if(field.type==='number'){field.type='text';}
|
216 |
+
field.value=encryptedAnswer;});callback(submitFormAfterEncrypt);},getServerURL:function(){var form=$$('.jotform-form')[0];var action;var origin=window.location.origin||(window.location.protocol+'//'+window.location.hostname);if(form){if(origin.include('.jotform.pro')){this.server=origin+"/server.php";this.url=origin;return;}
|
217 |
+
if((action=form.readAttribute('action'))){if(action.include('submit.php')||action.include('server.php')){var n=!action.include('server.php')?"submit":"server";this.server=action.replace(n+'.php','server.php');this.url=action.replace(n+'.php','');}else{var d=action.replace(/\/submit\/.*?$/,'/');if(action.include('pci.jotform.com')){d=d.replace('pci.','submit.');}
|
218 |
+
this.server=d+'server.php';this.url=d;}}}},alterTexts:function(newTexts,payment){if(payment&&!!newTexts){Object.extend(this.paymentTexts,newTexts);this.changePaymentStrings(newTexts);}else{Object.extend(this.texts,newTexts||{});}},ie:function(){var undef,v=3,div=document.createElement('div'),all=div.getElementsByTagName('i');while(div.innerHTML='<!--[if gt IE '+(++v)+']><i></i><![endif]-->',all[0]);return v>4?v:undef;},createConsole:function(){var consoleFunc=['log','info','warn','error'];$A(consoleFunc).each(function(c){this[c]=function(){if(JotForm.debug){if('console'in window){try{console[c].apply(this,arguments);}catch(e){if(typeof arguments[0]=="string"){console.log(c.toUpperCase()+": "+$A(arguments).join(', '));}else{if(Prototype.Browser.IE){alert(c+": "+arguments[0]);}else{console[c](arguments[0]);}}}}}};}.bind(this));if(JotForm.debug){JotForm.debugOptions=document.readJsonCookie('debug_options');}},init:function(callback){var ready=function(){try{this.populateGet();if(document.get.debug=="1"){this.debug=true;}
|
219 |
+
this.createConsole();this.getServerURL();this.checkJSON();if(callback){callback();}
|
220 |
+
if(window.location.href.indexOf("/edit/")!==-1){document.get.sid=window.location.href.split("/").last();this.editMode();}
|
221 |
+
if((document.get.mode=="edit"||document.get.mode=="inlineEdit"||document.get.mode=='submissionToPDF'||document.get.offline_forms=='true')&&document.get.sid){this.editMode();}
|
222 |
+
this.noJump=("nojump"in document.get);this.uniqueID=this.uniqid();this.sessionID=('session'in document.get)&&(document.get.session.length>0)?document.get.session:false;this.submissionToken=('stoken'in document.get)&&(document.get.stoken.length>0)?document.get.stoken:false;this.submissionID=('sid'in document.get)&&(document.get.sid.length>0)?document.get.sid:false;this.handleSavedForm();this.setHTMLClass();this.getDefaults();if(this.noJump){window.parent.postMessage("removeIframeOnloadAttr",'*');}
|
223 |
+
if($$('input[name="simple_fpc"]').length>0){this.payment=$$('input[name="simple_fpc"]')[0].getAttribute('data-payment_type');}
|
224 |
+
if(!!$$('.form-product-custom_price').length){this.handleSubscriptionPrice();}
|
225 |
+
if(this.payment==="paypalpro"){this.handlePaypalPro();}
|
226 |
+
if(this.payment==="braintree"){this.handleBraintree();}
|
227 |
+
if(this.payment==="pagseguro"){this.handlePagseguro();}
|
228 |
+
if(this.payment==="square"){this.handleSquare();}
|
229 |
+
if(this.payment==="stripeACH"){this.handleStripeACH();}
|
230 |
+
if(this.payment==="authnet"){this.handleAuthNet();}
|
231 |
+
if(this.payment==="paypalexpress"){this.handlePaypalExpress();}
|
232 |
+
if(this.payment==="paypalSPB"){var interval=setInterval(function(){if(typeof __paypalSPB!=="undefined"&&typeof paypal!=="undefined"){clearInterval(interval);this.handlePaypalSPB();}}.bind(this),100);}
|
233 |
+
if($('coupon-button')){this.handleCoupon();}
|
234 |
+
if($$('.paypal-button').length>0&&$('use_paypal_button')){this.handlePaypalButtons();}
|
235 |
+
this.handleFormCollapse();this.handlePages();this.checkEmbed();if($$('.form-product-has-subproducts').length>0){this.handlePaymentSubProducts();}
|
236 |
+
if(window.location.hash==="#hw-izmir"){$(document.body).addClassName('hw-izmir');}
|
237 |
+
if(window.parent&&window.parent!=window){var queryString=document.referrer&&document.referrer.split('?')[1]||'';if(queryString.indexOf('disableSmartEmbed')>-1||!this.jsForm){$$('.isSmartEmbed').each(function(el){el.removeClassName('isSmartEmbed');});}
|
238 |
+
this.setIFrameDeviceType();this.handleIFrameHeight();if(!!$$('li[data-type="control_captcha"]').length){var captchaInterval=setInterval(function(){if($('recaptcha_challenge_image')){clearInterval(captchaInterval);JotForm.handleIFrameHeight();}},500);}}else{$$('.isSmartEmbed').each(function(el){el.removeClassName('isSmartEmbed');});}
|
239 |
+
Element.prototype.triggerEvent=function(eventName){var disabled=this.hasClassName('form-dropdown')&&this.disabled?!!(this.enable()):false;if(document.createEvent){var evt=document.createEvent('HTMLEvents');evt.initEvent(eventName,true,true);this.dispatchEvent(evt);}else if(this.fireEvent){this.fireEvent('on'+eventName);}
|
240 |
+
if(disabled){this.disable();}}
|
241 |
+
this.jumpToPage();this.highLightLines();this.setButtonActions();this.initGradingInputs();this.initSpinnerInputs();this.initNumberInputs();this.setConditionEvents();this.setCalculationEvents();this.runAllCalculations();this.setCalculationResultReadOnly();this.prePopulations();this.handleAutoCompletes();this.handleTextareaLimits();this.handleDateTimeChecks();this.handleOtherOptions();this.setFocusEvents();this.disableAcceptonChrome();this.handleScreenshot();$A(document.forms).each(function(form){if(form.name=="form_"+form.id||form.name=="q_form_"+form.id){this.forms.push(form);}}.bind(this));var hasCaptcha=$$('div[id^=recaptcha_input]').length;if(!hasCaptcha||$$('*[class*="validate"]').length>hasCaptcha){this.validator();}
|
242 |
+
this.fixIESubmitURL();this.disableHTML5FormValidation();if($('progressBar')){this.setupProgressBar();}
|
243 |
+
if($$('input[id*="_donation"]').length>0){this.handleDonationAmount();}
|
244 |
+
if(getQuerystring('nosubmit')){$$('.form-submit-button').each(function(b){b.disable();});}
|
245 |
+
if(getQuerystring('displayAllSections')){var sections=$$('.form-section');sections.each(function(section){section.setStyle({display:'block'});});}
|
246 |
+
if(!!navigator.userAgent.match(/iPhone|iPad/g)){window.onpageshow=function(e){if(e.persisted){JotForm.enableButtons();}}}
|
247 |
+
var isPreview=getQuerystring('preview');isPreview=isPreview?isPreview==='true':false;if(isPreview){this.handlePreview(getQuerystring('filled')==='true');}else if(this.initializing){this.track();}
|
248 |
+
this.additionalActionsFormEmbedded();var constructSubmitBanner=function(){var button=document.querySelector('.form-submit-button');if(button!==null){var _form=$$('.jotform-form')[0];var _formID=_form.getAttribute('id');var buttonWrapper=button.parentNode;var banner=document.createElement('a');banner.target='_blank';banner.href='https://www.jotform.com/?utm_source=powered_by_jotform&utm_medium=banner&utm_term='+_formID+'&utm_content=powered_by_jotform_text&utm_campaign=powered_by_jotform_signup_hp';banner.setText('Powered by JotForm');banner.style.display='inline-block';banner.style.textDecoration='none';var fontColor='#000000';var fontFamily='';var sampleLabel=document.querySelector('.form-label');if(sampleLabel!==null){fontColor=getComputedStyle(document.querySelector('.form-label')).color;fontFamily=getComputedStyle(document.querySelector('.form-label')).fontFamily;}
|
249 |
+
banner.style.opacity=0.8;banner.style.webkitFontSmoothing='antialiased';banner.style.color=fontColor;banner.style.fontFamily=fontFamily;banner.style.fontSize='11px';banner.className='jf-branding';var brEl=document.createElement('br');buttonWrapper.appendChild(brEl);buttonWrapper.appendChild(banner);if(getComputedStyle(buttonWrapper).textAlign!=='center'){var linkDimensions=banner.getBoundingClientRect();var buttonDimensions=button.getBoundingClientRect();var mr=Math.abs((linkDimensions.width-buttonDimensions.width)/2);if(linkDimensions.width>buttonDimensions.width){banner.style.marginLeft='-'+mr+'px';}else{banner.style.marginLeft=mr+'px';}}}}
|
250 |
+
if(JotForm.showHIPAABadge){var button=document.querySelector('.form-submit-button');var buttonWrapper=button.parentNode;var banner=new Element('img',{src:'https://cdn.jotfor.ms/assets/img/uncategorized/hipaa_badge.png',style:'display:block;width:160px;',});buttonWrapper.appendChild(banner);}else if(JotForm.showJotFormPowered=="old_footer"){constructSubmitBanner();}
|
251 |
+
if(typeof JotForm.enterprise!=="undefined"&&JotForm.enterprise){var form=document.querySelector('.jotform-form');var enterpriseServer=new Element('input',{id:'enterprise_server',type:'hidden',name:'enterprise_server',value:JotForm.enterprise});form.appendChild(enterpriseServer);}
|
252 |
+
if(JotForm.hipaa){var form=document.querySelector('.jotform-form');var fileServer=new Element('input',{id:'file_server',type:'hidden',name:'file_server',value:'hipaa-app1'});form.appendChild(fileServer);}}catch(err){JotForm.error(err);}
|
253 |
+
var form=$$('.jotform-form')[0];if(form){form.addEventListener('submit',function(e){var fields=$$('input[type="email"]');if(typeof punycode!=="undefined"){fields.forEach(function(field){field.value=punycode.toASCII(field.value);})}});}
|
254 |
+
this.initializing=false;}.bind(this);if(document.readyState=='complete'||(this.jsForm&&(document.readyState===undefined||document.readyState==='interactive'))){ready();}else{document.ready(ready);}},browserIs:{userAgent:'navigator'in window&&'userAgent'in navigator&&navigator.userAgent.toLowerCase()||'',vendor:'navigator'in window&&'vendor'in navigator&&navigator.vendor.toLowerCase()||'',appVersion:'navigator'in window&&'appVersion'in navigator&&navigator.appVersion.toLowerCase()||'',chrome:function(){return /chrome|chromium/i.test(this.userAgent)&&/google inc/.test(this.vendor)},firefox:function(){return /firefox/i.test(this.userAgent)},ie:function(){return /msie/i.test(this.userAgent)||"ActiveXObject"in window||/edge\//i.test(this.userAgent)},safari:function(){return /safari/i.test(this.userAgent)&&/apple computer/i.test(this.vendor)},operabrowser:function(){return this.userAgent.indexOf("Opera")>-1},iphone:function(){return /iphone/i.test(this.userAgent)||/iphone/i.test(this.appVersion)},ipad:function(){return /ipad/i.test(this.userAgent)||/ipad/i.test(this.appVersion)},ios:function(){return this.iphone()||this.ipad()},android:function(){return /android/i.test(this.userAgent)},androidPhone:function(){return this.android()&&/mobile/i.test(this.userAgent)},androidTablet:function(){return this.android()&&!this.androidPhone()},blackberry:function(){return /blackberry/i.test(this.userAgent)||/BB10/i.test(this.userAgent)},linux:function(){return /linux/i.test(this.appVersion)},mac:function(){return /mac/i.test(this.appVersion)},windows:function(){return /win/i.test(this.appVersion)},windowsPhone:function(){return this.windows()&&/phone/i.test(this.userAgent)},windowsTablet:function(){return this.windows()&&!this.windowsPhone()&&/touch/i.test(this.userAgent)},mobile:function(){return this.iphone()||this.androidPhone()||this.blackberry()||this.windowsPhone();},tablet:function(){return this.ipad()||this.androidTablet()||this.windowsTablet()},desktop:function(){return!this.mobile()&&!this.tablet()}},iframeRezizeTimeout:null,iframeHeightCaller:function(){if(window.parent&&window.parent!=window){clearTimeout(this.iframeRezizeTimeout);this.iframeRezizeTimeout=setTimeout((function(){this.handleIFrameHeight();}).bind(this),50);}},setIFrameDeviceType:function(){if(window.FORM_MODE!=='cardform'){return;}
|
255 |
+
window.parent.postMessage('setDeviceType:'+window.CardLayout.layoutParams.deviceType+':','*');},handleIFrameHeight:function(){var form=$$('.jotform-form').length>0?$$('.jotform-form')[0]:$$('body')[0];var height=Math.max(form.getHeight(),form.scrollHeight,form.offsetHeight);var formWrapper=document.querySelector('.form-all');var margin=parseInt(getComputedStyle(formWrapper).marginTop,10);if(!isNaN(margin)){height+=margin;}
|
256 |
+
height=(document.title==='Please Complete')?300:height;if(window.FORM_MODE==='cardform'){$(document.body).addClassName('isEmbed');var nextHeight=0;var hasWelcome=$(document.body).hasClassName('welcomeMode');var welcomeModeHeight=0;if(hasWelcome){var welcomeModeWrapper=$$('.welcomeMode .jfWelcome-wrapper');if(welcomeModeWrapper.length>0){welcomeModeHeight=welcomeModeWrapper[0].getHeight();var additionalPadding=100;welcomeModeHeight=welcomeModeHeight+additionalPadding;}}
|
257 |
+
var welcomeDescriptionHeight=0;var welcomeModeWrapper=$$('.welcomeMode');if(welcomeModeWrapper.length>0&&window.innerWidth>768){welcomeDescriptionHeight=60;}
|
258 |
+
var formModeWrapperHeight=welcomeDescriptionHeight;var formModeWrapper=$$('.jfWelcome-header');if(formModeWrapper.length>0){formModeWrapperHeight+=(formModeWrapper[0]).getHeight();}
|
259 |
+
var maxQFieldsHeight=0;$$('.jfQuestion-fields').each(function(field){maxQFieldsHeight=Math.max(field.getHeight(),maxQFieldsHeight);});var maxCardHeight=0;$$('.jfCard').forEach(function(card){var children=card.getElementsBySelector('.jfQuestion-label, .jfQuestion-description');var childrenHeight=0;children.forEach(function(child){childrenHeight=childrenHeight+child.getHeight();});return Math.max(maxCardHeight,childrenHeight);},0);var jfCard=document.querySelector('jfCard');if(jfCard){var emInPx=jfCard.getStyle("fontSize").slice(0,-2);var approxSpacingsInEm=8.725;var spacingsInPx=emInPx*approxSpacingsInEm;var formHeight=(((formModeWrapperHeight*2)+maxCardHeight)+spacingsInPx)*(50/29);}
|
260 |
+
var isSmartEmbed=$(document.body).hasClassName('isSmartEmbed');height=isSmartEmbed?464:640;try{var formFrame=window.parent.document.querySelector('[id="'+form.id+'"], [id="JotFormIFrame-'+form.id+'"]');if(formFrame&&formFrame.hasAttribute('data-frameHeight')){height=formFrame.getAttribute('data-frameHeight');}}catch(e){}}
|
261 |
+
if("console"in window){if("log"in console&&JotForm.debug){console.log('Debug : setting height to ',height,' from iframe');}}
|
262 |
+
window.parent.postMessage('setHeight:'+height+':'+form.id,'*');},removeCover:function(){$$('.form-cover-wrapper').each(function(el){el.remove();});$$('.form-all').each(function(el){el.removeClassName('top-cover').removeClassName('left-cover').removeClassName('right-cover');});},fixIESubmitURL:function(){try{if(this.ie()<=8&&navigator.appVersion.indexOf('NT 5.')){$A(this.forms).each(function(form){if(form.action.include("s://submit.")){form.action=form.action.replace(/\/\/submit\..*?\//,"//secure.jotform.com/");}});}}catch(e){}},screenshot:false,passive:false,onprogress:false,compact:false,imageSaved:false,handleScreenshot:function(){var $this=this;setTimeout(function(){$$('.form-screen-button').each(function(button){if(window.parent&&window.parent.JotformFeedbackManager){$this.getContainer(button).show();button.observe('click',function(){$this.passive=false;try{$this.takeScreenShot(button.id.replace('button_',''));}catch(e){console.error(e);}});setTimeout(function(){$this.passive=!window.parent.wishboxInstantLoad;$this.takeScreenShot(button.id.replace('button_',''));},0);}});},300);},getCharset:function(doc){if(!doc){doc=document;}
|
263 |
+
return doc.characterSet||doc.defaultCharset||doc.charset||'UTF-8';},bytesToSize:function(bytes,precision){var sizes=['B','KB','MB','GB','TB'];var posttxt=0;if(bytes==0)return'n/a';if(bytes<1024){return Number(bytes)+" "+sizes[posttxt];}
|
264 |
+
while(bytes>=1024){posttxt++;bytes=bytes/1024;}
|
265 |
+
return bytes.toFixed(precision||2)+" "+sizes[posttxt];},disableHTML5FormValidation:function(){$$("form").each(function(f){f.setAttribute("novalidate",true);});},takeScreenShot:function(id){var p=window.parent;var pleaseWait='<div id="js_loading" '+'style="position:fixed; z-index:10000000; text-align:center; '+'background:#333; border-radius:5px; top: 20px; right: 20px; '+'padding:10px; box-shadow:0 0 5 rgba(0,0,0,0.5);">'+'<img src="'+this.url+'images/loader-black.gif" />'+'<div style="font-family:verdana; font-size:12px;color:#fff;">'+'Please Wait'+'</div></div>';if(this.onprogress){p.$jot(pleaseWait).appendTo('body');return;}
|
266 |
+
if(p.wishboxCompactLoad){this.compact=true;}
|
267 |
+
if(this.screenshot){if(this.compact){p.$jot('.jt-dimmer').hide();}else{p.$jot('.jt-dimmer, .jotform-feedback-link, .jt-feedback').hide();}
|
268 |
+
p.jotformScreenshotURL=this.screenshot.data;this.injectEditor(this.screenshot.data,this.screenshot.shotURL);return;}
|
269 |
+
this.scuniq=JotForm.uniqid();this.scID=id;var f=JotForm.getForm($('button_'+this.scID));this.sformID=f.formID.value;this.onprogress=true;var $this=this;this.wishboxServer='https://screenshots.jotform.com/wishbox-server.php';var form=new Element('form',{action:this.wishboxServer,target:'screen_frame',id:'screen_form',method:'post',"accept-charset":'utf-8'}).hide();var doc='<!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" xml:lang="en" lang="en" >';p.$jot('.jt-dimmer, .jotform-feedback-link, .jt-feedback').hide();p.$jot('.hide-on-screenshot, .hide-on-screenshot *').css({'visibility':'hidden'});var parentSource=p.document.getElementsByTagName('html')[0].innerHTML;parentSource=parentSource.replace(/(<noscript\b[^>]*>.*?<\/noscript>)+/gim,'');parentSource=parentSource.replace(/(<noscript\b[^>]*>(\s+.*\s+)+)+<\/noscript>/gim,'');p.$jot('.hide-on-screenshot, .hide-on-screenshot *').css({'visibility':'visible'});parentSource=parentSource.replace(/(\<\/head\>)/gim,"<style>body,html{ min-height: 800px; }</style>$1");var ie=$this.ie();if(ie!==undefined&&ie<9){parentSource=parentSource.replace(/(\<\/head\>)/gim,"<style>*{ border-radius:0 !important; text-shadow:none !important; box-shadow:none !important; }</style>$1");}
|
270 |
+
if(this.passive){p.$jot('.jt-dimmer, .jotform-feedback-link, .jt-feedback').show();}else{p.$jot('.jotform-feedback-link').show();p.$jot(pleaseWait).appendTo('body');}
|
271 |
+
var html=new Element('textarea',{name:'html'});var nozip=this.getCharset(p.document).toLowerCase()!=='utf-8';if(nozip){html.value=encodeURIComponent(doc+parentSource+"</html>");form.insert(new Element('input',{type:'hidden',name:'nozip'}).putValue("1"));}else{form.insert(new Element('input',{type:'hidden',name:'nozip'}).putValue("0"));html.value=encodeURIComponent(p.$jot.jSEND((doc+parentSource+"</html>")));}
|
272 |
+
var charset=new Element('input',{type:'hidden',name:'charset'}).putValue(this.getCharset(p.document));var height=new Element('input',{type:'hidden',name:'height'}).putValue(parseFloat(p.$jot(p).height()));var scrollTop=new Element('input',{type:'hidden',name:'scrollTop'}).putValue(p.$jot(p).scrollTop());var url=new Element('input',{type:'hidden',name:'url'}).putValue(p.location.href);var uid=new Element('input',{type:'hidden',name:'uniqID'}).putValue(this.scuniq);var fid=new Element('input',{type:'hidden',name:'formID'}).putValue(this.sformID);var action=new Element('input',{type:'hidden',name:'action'}).putValue("getScreenshot");var iframe=new Element('iframe',{name:'screen_frame',id:'screen_frame_id'}).hide();iframe.observe('load',function(){$this.checkScreenShot();});if(p.wishboxInstantLoad&&(ie===undefined||ie>8)){this.injectEditor(false,false);}
|
273 |
+
form.insert(html).insert(height).insert(scrollTop).insert(action).insert(uid).insert(url).insert(fid).insert(charset);$(document.body).insert(form).insert(iframe);form.submit();},checkJSON:function(){if(typeof JSON!=='object'){var script=document.createElement('script');script.type="text/javascript";script.src="/js/vendor/json2.js";$(document.body).appendChild(script);}},checkScreenShot:function(){var $this=this;var p=window.parent;var count=10;p.$jot.getJSON('https://screenshots.jotform.com/queue/'+this.scuniq+'?callback=?',function(data){if(data.success===true){p.$jot.getJSON(data.dataURL+'?callback=?',function(res){if($this.passive===false){p.jotformScreenshotURL=res.data;$this.injectEditor(res.data,res.shotURL);}
|
274 |
+
$this.screenshot=res;$this.onprogress=false;$('screen_form')&&$('screen_form').remove();$('screen_frame_id')&&$('screen_frame_id').remove();});}else{if((data.status=='waiting'||data.status=='working')&&--count){setTimeout(function(){$this.checkScreenShot();},1000);}else{alert('We are under heavy load right now. Please try again later.');p.$jot('.jt-dimmer, .jotform-feedback-link').show();p.$jot('.jt-feedback').show('slow');}}});},injectEditor:function(data,url){if(this.injected){return;}
|
275 |
+
this.injected=true;var $this=this;var p=window.parent;p.$jot('#js_loading').remove();p.$jot.getJSON(this.server+'?callback=?',{action:'getScreenEditorTemplate',compact:this.compact},function(res){var iff='<iframe allowtransparency="true" id="wishbox-frame" src="" '+'frameborder="0" style="display:none;border:none;display:block; ';if(!$this.compact){iff+='position:fixed;top:0;width:100%;height:100%;left:0;z-index:100000000;';}else{iff+=('position:absolute;left:0;top:10px;height:'+(p.$jot(p).height()-120)+'px;width:'+((p.$jot(p).width()-100)-p.$jot('#js-form-content').width())+'px;');}
|
276 |
+
iff+='" scrolling="no"></iframe>';var editorFrame;p.iframeWidth=((p.$jot(p).width()-100)-p.$jot('#js-form-content').width());p.iframeHeight=(p.$jot(p).height()-120);if($this.compact){editorFrame=p.$jot(iff).insertBefore('#js-form-content');}else{editorFrame=p.$jot(iff).appendTo('body');}
|
277 |
+
if($this.compact){p.$jot('#js-form-content').css({'float':'right'});}
|
278 |
+
var ie=$this.ie();if(ie!==undefined&&ie<9){editorFrame.attr('src','https://screenshots.jotform.com/opt/templates/screen_editor.html?shot='+url+'&uniq='+$this.scuniq);var b=p.$jot('<button style="color:#fff;font-size:14px;background:#F59202;border:1px solid #Fa98a2;font-weight:bold;position:fixed;top:5px;right:40px;width:100px;z-index:100000001;">Close Editor</button>').appendTo('body');b.click(function(){p.$jot.getJSON('https://screenshots.jotform.com/wishbox-server.php?callback=?',{action:'getImage',uniqID:$this.scuniq},function(res){if(!res.success){if(confirm('You haven\'t save your edits. Are you sure you want to close the editor?')){closeFrame();b.remove();}}else{closeFrame();b.remove();putImageOnForm(res.data,res.shotURL);}});});}else{var e=editorFrame[0];var frameDocument=(e.contentWindow)?e.contentWindow:(e.contentDocument.document)?e.contentDocument.document:e.contentDocument;frameDocument.document.open();frameDocument.document.write(res.template);setTimeout(function(){frameDocument.document.close();},200);p.jotformScreenshotURL=data;}
|
279 |
+
var closeFrame=function(){if($this.compact){editorFrame.remove();p.$jot('#js-form-content').css('width','100%');}else{editorFrame.hide('slow',function(){editorFrame.remove();});}
|
280 |
+
$this.injected=false;p.$jot('.jt-dimmer, .jotform-feedback-link').show();p.$jot('.jt-feedback').show('slow');};var putImageOnForm=function(image,url){$('screen_'+$this.scID).update('<img width="100%" align="center" src="'+(url?url:image)+'" />');$('data_'+$this.scID).value=image;$('screen_'+$this.scID).up().show();};p.JotformCancelEditor=function(){closeFrame();};p.JotformFinishEditing=function(image){closeFrame();putImageOnForm(image);$this.imageSaved=true;if($this.compact){setTimeout(function(){$(document).fire('image:loaded');},100);}};});},populateGet:function(){try{if('FrameBuilder'in window.parent&&"get"in window.parent.FrameBuilder&&window.parent.FrameBuilder.get!=[]){var outVals={};var getVals=window.parent.FrameBuilder.get;$H(getVals).each(function(pair){if(typeof pair[1]==='object'){for(prop in pair[1]){outVals[pair[0]+"["+prop+"]"]=pair[1][prop];}}else{outVals[pair[0]]=pair[1];}});document.get=Object.extend(document.get,outVals);}}catch(e){}},uniqid:function(prefix,more_entropy){if(typeof prefix=='undefined'){prefix="";}
|
281 |
+
var retId;var formatSeed=function(seed,reqWidth){seed=parseInt(seed,10).toString(16);if(reqWidth<seed.length){return seed.slice(seed.length-reqWidth);}
|
282 |
+
if(reqWidth>seed.length){return Array(1+(reqWidth-seed.length)).join('0')+seed;}
|
283 |
+
return seed;};if(!this.php_js){this.php_js={};}
|
284 |
+
if(!this.php_js.uniqidSeed){this.php_js.uniqidSeed=Math.floor(Math.random()*0x75bcd15);}
|
285 |
+
this.php_js.uniqidSeed++;retId=prefix;retId+=formatSeed(parseInt(new Date().getTime()/1000,10),8);retId+=formatSeed(this.php_js.uniqidSeed,5);if(more_entropy){retId+=(Math.random()*10).toFixed(8).toString();}
|
286 |
+
return retId;},initMultipleUploads:function(){var self=this;if(JotForm.browserIs.mobile()&&!JotForm.isJotFormNext){var loadingNoSleepScript=true;JotForm.loadScript(window.location.protocol+'//'+window.location.host+'/js/vendor/NoSleep.min.js?v_'+(new Date()).getTime(),function(){loadingNoSleepScript=false;});var toggleNoSleep=function(){if(loadingNoSleepScript||typeof NoSleep==='undefined'){return;}
|
287 |
+
var noSleep=new NoSleep();noSleep.enable();document.removeEventListener('click',toggleNoSleep,true);};document.addEventListener('click',toggleNoSleep,true);}
|
288 |
+
$$('.form-upload-multiple').each(function(file){var parent=file.up('div');var f=JotForm.getForm(file);var formID=f.formID.value;var uniq=formID+"_"+JotForm.uniqueID;parent.addClassName('validate[multipleUpload]');var className=file.className;if(className.include("validate[required]")){if(parent.className.indexOf("validate[required]")===-1){parent.addClassName("validate[required]");}}
|
289 |
+
parent.validateInput=function(){if(!JotForm.isVisible(parent)){JotForm.corrected(parent);return true;}
|
290 |
+
var fileList=parent.select('.qq-upload-list li:not(.file-deleted)');if(fileList.length<1){if(parent.match('[class*=validate[required]]')){JotForm.corrected(parent);return JotForm.errored(parent,JotForm.texts.required);}else{JotForm.corrected(parent);return true;}}else{var status=true;fileList.each(function(elem){if(elem.getAttribute('class')&&elem.getAttribute('class').indexOf('fail')>=0){status=false;}});if(status){JotForm.corrected(parent);return true;}else{JotForm.errored(parent,JotForm.texts.multipleFileUploads_uploadFailed);return false;}}}
|
291 |
+
if(!this.tempUploadFolderInjected){var hidden=new Element('input',{type:'hidden',name:'temp_upload_folder'}).setValue(uniq);f.insert({top:hidden});this.tempUploadFolderInjected=true;}
|
292 |
+
var exts=(file.readAttribute('data-file-accept')||file.readAttribute('file-accept')||"").strip();exts=(exts!=='*')?exts.split(', '):[];var n,subLabel="";if((n=file.next())&&n.hasClassName('form-sub-label')){subLabel=n.innerHTML;}
|
293 |
+
var m,buttonText,cancelText,ofText;if(m=file.previous('.qq-uploader-buttonText-value')){buttonText=m.innerHTML;}
|
294 |
+
if(!buttonText){buttonText="Upload a File";}
|
295 |
+
if(subLabel){if(m=parent.querySelector(".cancelText")){cancelText=m.innerText;}
|
296 |
+
if(m=parent.querySelector(".ofText")){ofText=m.innerText;}}
|
297 |
+
else{if(m=parent.siblings().find(function(el){return el.className==='cancelText'})){cancelText=m.innerText;}
|
298 |
+
if(m=parent.siblings().find(function(el){return el.className==='ofText'})){ofText=m.innerText;}}
|
299 |
+
var classNames=file.className.split(' ');var buttonStyle='';$A(classNames).each(function(className){if(className.indexOf('form-submit-button-')===0){buttonStyle=className;}});try{var isOfflineForm=getQuerystring('offline_forms');isOfflineForm=isOfflineForm?isOfflineForm==='true':false;var uploader=isOfflineForm?false:new qq.FileUploader({debug:JotForm.debug,element:parent,action:JotForm.server,subLabel:subLabel,buttonText:buttonText,buttonStyle:buttonStyle,fileLimit:file.readAttribute('data-file-limit')||file.readAttribute('file-limit'),sizeLimit:parseInt((file.readAttribute('data-file-maxsize')||file.readAttribute('file-maxsize')),10)*1024,minSizeLimit:parseInt((file.readAttribute('data-file-minsize')||file.readAttribute('file-minsize')),10)*1024,allowedExtensions:exts,cancelText:cancelText,ofText:ofText,messages:{typeError:self.texts.multipleFileUploads_typeError,sizeError:self.texts.multipleFileUploads_sizeError,minSizeError:self.texts.multipleFileUploads_minSizeError,emptyError:self.texts.multipleFileUploads_emptyError,onLeave:self.texts.multipleFileUploads_onLeave,fileLimitError:self.texts.multipleFileUploads_fileLimitError},onComplete:function(id,filename,response){console.log('onComplete',arguments);if(response.success){var qFolder=file.name.replace('[]','');var uploadHiddenID=[uniq,qFolder,filename].join('_');var uploadHidden=$(uploadHiddenID);if(!uploadHidden){uploadHidden=new Element('input',{id:uploadHiddenID,type:'hidden',name:'temp_upload['+qFolder+'][]'});f.insert({top:uploadHidden});}
|
300 |
+
uploadHidden.setValue(response.message);var $fileServer=$('file_server');if(!$fileServer){$fileServer=new Element('input',{id:'file_server',type:'hidden',name:'file_server'});f.insert({top:$fileServer});}
|
301 |
+
$fileServer.setValue(response.fileServer);parent.value='uploaded';JotForm.corrected(parent);}},onDelete:function(folder,field,filename){var id=[folder,field,filename].join('_');if($(id)){$(id).remove();}},showMessage:function(message){console.log('showMessage',arguments);JotForm.corrected(parent);JotForm.errored(parent,message);},params:{action:'multipleUpload',field:file.name.replace('[]',''),origin:window.location.origin||(window.location.protocol+'//'+window.location.hostname),folder:uniq}});}catch(e){console.log(e);}});},initNewMultipleUploads:function(){var self=this;$$('.form-upload-multiple-new').each(function(file){var parent=file.up('div');var f=JotForm.getForm(file);var formID=f.formID.value;var uniq=formID+"_"+JotForm.uniqueID;var className=file.className;if(className.include("validate[required]")){if(parent.className.indexOf("validate[required]")===-1){parent.addClassName("validate[required]");}
|
302 |
+
parent.validateInput=function(){if(!JotForm.isVisible(parent)){JotForm.corrected(parent);return true;}
|
303 |
+
if(parent.select('.new-file-list li').length<1){JotForm.errored(parent,JotForm.texts.required);return false;}else{JotForm.corrected(parent);return true;}};}
|
304 |
+
if(!this.tempUploadFolderInjected){var hidden=new Element('input',{type:'hidden',name:'temp_upload_folder'}).setValue(uniq);f.insert({top:hidden});this.tempUploadFolderInjected=true;window.setFolder();}
|
305 |
+
var exts=(file.readAttribute('data-file-accept')||file.readAttribute('file-accept')||"").strip();exts=(exts!=='*')?exts.split(', '):[];var n,subLabel="";if((n=file.next())&&n.hasClassName('form-sub-label')){subLabel=n.innerHTML;}
|
306 |
+
var m,buttonText;if(m=file.previous('.qq-uploader-buttonText-value')){buttonText=m.innerHTML;}
|
307 |
+
if(!buttonText){buttonText="Upload a File";}});},hiddenSubmit:function(frm,options){if(JotForm.currentSection){JotForm.currentSection.select('.form-pagebreak')[0].insert(new Element('div',{className:'form-saving-indicator'}).setStyle('float:right;padding:21px 12px 10px').update('<img src="'+JotForm.url+'images/ajax-loader.gif" align="absmiddle" /> Saving...'));}
|
308 |
+
setTimeout(function(){JotForm.saving=true;JotForm.disableButtons();},10);var isCardForm=window.FORM_MODE=='cardform';if(!$('hidden_submit_form')){var iframe=new Element('iframe',{name:'hidden_submit',id:'hidden_submit_form'}).hide();iframe.observe('load',function(){if(!isCardForm){JotForm.makeUploadChecks();}
|
309 |
+
$$('.form-saving-indicator').invoke('remove');JotForm.saving=false;JotForm.enableButtons();});$(document.body).insert(iframe);}
|
310 |
+
$$('.form-radio-other,.form-checkbox-other').each(function(el){if(!el.checked&&JotForm.getOptionOtherInput(el)){JotForm.getOptionOtherInput(el).disable();}});$$('.custom-hint-group').each(function(elem){elem.hideCustomPlaceHolder();});if($('current_page')){$('current_page').value=JotForm.currentSection.pagesIndex;}
|
311 |
+
frm.writeAttribute('target','hidden_submit');frm.insert({top:new Element('input',{type:'hidden',name:'hidden_submission',id:'hidden_submission'}).putValue("1")});if(isCardForm){frm.insert({top:new Element('input',{type:'hidden',name:'continueLater',id:'continueLater'}).putValue("1")});}
|
312 |
+
if(options&&!!options.async){$(frm).request({onCreate:function(response){var t=response.transport;t.setRequestHeader=t.setRequestHeader.wrap(function(original,k,v){if(/^(accept|accept-language|content-language)$/i.test(k))
|
313 |
+
return original(k,v);if(/^content-type$/i.test(k)&&/^(application\/x-www-form-urlencoded|multipart\/form-data|text\/plain)(;.+)?$/i.test(v))
|
314 |
+
return original(k,v);return;});},onComplete:function(response){if(isCardForm){JotForm.saving=false;JotForm.enableButtons();}
|
315 |
+
if(200===response.status){if(options.onSuccessCb)options.onSuccessCb(response);}else{if(options.onFailureCb)options.onFailureCb();}
|
316 |
+
if(options.onCompleteCb)options.onCompleteCb();frm.writeAttribute('target','');if(isCardForm){$('continueLater')&&$('continueLater').remove();}
|
317 |
+
$('hidden_submission')&&$('hidden_submission').remove();$$('.custom-hint-group').each(function(elem){elem.showCustomPlaceHolder();});$$('.form-radio-other,.form-checkbox-other').each(function(el){if(!el.checked&&JotForm.getOptionOtherInput(el)){JotForm.getOptionOtherInput(el).enable();}});}});}else{frm.submit();frm.writeAttribute('target','');if(isCardForm){$('continueLater').remove();}
|
318 |
+
$('hidden_submission').remove();$$('.custom-hint-group').each(function(elem){elem.showCustomPlaceHolder();});$$('.form-radio-other,.form-checkbox-other').each(function(el){if(!el.checked&&JotForm.getOptionOtherInput(el)){JotForm.getOptionOtherInput(el).enable();}});}},makeUploadChecks:function(){var formIDField=$$('input[name="formID"]')[0];var parameters={action:'getSavedUploadResults',formID:formIDField.value,sessionID:this.sessionID};if(this.submissionID){parameters.submissionID=this.submissionID;}
|
319 |
+
if(this.submissionToken){parameters.submissionToken=this.submissionToken;}
|
320 |
+
var a=new Ajax.Jsonp(JotForm.server,{parameters:parameters,evalJSON:'force',onComplete:function(t){var res=t.responseJSON;if(res&&res.success){if(res.submissionID&&!$('submission_id')){if(!JotForm.submissionID){JotForm.setSubmissionID(res.submissionID);}
|
321 |
+
formIDField.insert({after:new Element('input',{type:'hidden',name:'submission_id',id:'submission_id'}).putValue(res.submissionID)});}
|
322 |
+
if(window.FORM_MODE==='cardform'){JotForm.editMode(res,true,null,true);}else{JotForm.editMode(res,true);}}}});},handleSavedForm:function(){if(!JotForm.sessionID){return;}
|
323 |
+
JotForm.saveForm=true;var isCardForm=window.FORM_MODE=='cardform';var formIDField=$$('input[name="formID"]')[0];var sessionIDField=document.getElementById('session');if(!sessionIDField){formIDField.insert({after:new Element('input',{type:'hidden',name:'session_id',id:"session"}).putValue(JotForm.sessionID)});}
|
324 |
+
if(!isCardForm){formIDField.insert({after:new Element('input',{type:'hidden',id:'current_page',name:'current_page'}).putValue(0)});}
|
325 |
+
JotForm.loadingPendingSubmission=true;var parameters={action:'getSavedSubmissionResults',formID:formIDField.value,sessionID:this.sessionID,URLparams:window.location.href};if(this.submissionID){parameters.submissionID=this.submissionID;}
|
326 |
+
if(this.submissionToken){parameters.submissionToken=this.submissionToken;}
|
327 |
+
var a=new Ajax.Jsonp(JotForm.url+'/server.php',{parameters:parameters,evalJSON:'force',onComplete:function(t){var res=t.responseJSON;if(res.success){if(res.submissionID){if(!$('submission_id')){formIDField.insert({after:new Element('input',{type:'hidden',name:'submission_id',id:'submission_id'}).putValue(res.submissionID)});if(!JotForm.submissionID){JotForm.setSubmissionID(res.submissionID);}}
|
328 |
+
try{JotForm.editMode(res);}catch(e){JotForm.loadingPendingSubmission=false;console.error(e);}
|
329 |
+
JotForm.openInitially=res.currentPage-1;}}
|
330 |
+
JotForm.loadingPendingSubmission=false;}});},setSubmissionID:function(submissionID){this.submissionID=submissionID;},setHTMLClass:function(){var ie=this.ie();if(ie){$$('html')[0].addClassName('ie-'+ie);}},setFocusEvents:function(){$$('.form-radio, .form-checkbox').each(function(input){input.observe('mousedown',function(){JotForm.lastFocus=input;})});$$('.form-textbox, .form-password, .form-textarea, .form-upload, .form-dropdown').each(function(input){input.observe('focus',function(){JotForm.lastFocus=input;});});},disableAcceptonChrome:function(){if(!Prototype.Browser.WebKit){return;}
|
331 |
+
$$('.form-upload').each(function(input){if(input.hasAttribute('accept')){var r=input.readAttribute('accept');input.writeAttribute('accept','');input.writeAttribute('data-file-accept',r);input.writeAttribute('file-accept',r);}});},populateBrowserInfo:function(id){var is=JotForm.browserIs;function OS(){if(is.android())return"Android";else if(is.windows())return"Windows";else if(is.blackberry())return"Blackberry";else if(is.linux())return"Linux";else if(is.ios())return"iOS";else if(is.mac()&&!is.ios())return"MacOS";return"Unknown OS";}
|
332 |
+
function device(){if(is.mobile()){if(is.windowsPhone()||is.androidPhone()||is.blackberry())return"Mobile";else if(is.ios())return"iPhone";}
|
333 |
+
else if(is.tablet()){if(is.windowsTablet()||is.androidTablet())return"Tablet";else if(is.ios())return"iPad";}
|
334 |
+
else if(is.desktop())return"Desktop";return"Unknown Device";}
|
335 |
+
function browser(){if(is.ie())return"Internet Explorer";else if(is.firefox())return"Firefox";else if(is.chrome())return"Chrome";else if(is.safari())return"Safari";else if(is.operabrowser())return"Opera";return"Unknown Browser";}
|
336 |
+
var offset=new Date().getTimezoneOffset();var sign=(offset<0)?"+":"";var timeZone='GMT '+sign+-(offset/60);var lang=navigator.language||navigator.browserLanguage||navigator.userLanguage;var val=['BROWSER: '+browser(),'OS: '+OS(),'DEVICE: '+device(),'LANGUAGE: '+lang,'RESOLUTION: '+screen.width+"*"+screen.height,'TIMEZONE: '+timeZone,'USER AGENT: '+navigator.userAgent].join('\n');setTimeout(function(){if($(id).getValue().length>0){val=[$(id).getValue(),val].join('\n');}
|
337 |
+
$(id).setValue(val);},20);},displayTimeRangeDuration:function(id){var displayDuration=function(){if($('input_'+id+'_hourSelectRange')){var sHour=$('input_'+id+'_hourSelect').value;var sMin=$('input_'+id+'_minuteSelect').value;var sAMPM=$('input_'+id+'_ampm')?$('input_'+id+'_ampm').value:'no';var eHour=$('input_'+id+'_hourSelectRange').value;var eMin=$('input_'+id+'_minuteSelectRange').value;var eAMPM=$('input_'+id+'_ampmRange')?$('input_'+id+'_ampmRange').value:'no';var lab=$('input_'+id+'_ampmRange')?'_ampmRange':'_dummy';var durationLabel=$$('label[for=input_'+id+lab+']').first();if(window.FORM_MODE==='cardform'){if(lab=='_ampmRange'){durationLabel=$$('label[for=input_'+id+lab+']').first();}else{durationLabel=$$('#input_'+id+lab).first();}}
|
338 |
+
if(sHour.length>0&&sMin.length>0&&eHour.length>0&&eMin.length>0){if(sAMPM=='PM'&&sHour!=12)sHour=parseInt(sHour)+12;if(sAMPM=='AM'&&sHour==12)sHour=0;if(eAMPM=='PM'&&eHour!=12)eHour=parseInt(eHour)+12;if(eAMPM=='AM'&&eHour==12)eHour=0;var start=new Date(0,0,0,sHour,sMin,0);var end=new Date(0,0,0,eHour,eMin,0);var diff=end.getTime()-start.getTime();if(diff<0){end=new Date(0,0,1,eHour,eMin,0);diff=end.getTime()-start.getTime();}
|
339 |
+
var hours=Math.floor(diff/1000/60/60);diff-=hours*1000*60*60;var min=Math.floor(diff/1000/60);if(min<10)min='0'+min;durationLabel.update('<b>Total '+hours+':'+min+'</b>');durationLabel.setStyle({'color':'black'});$$('input[id=duration_'+id+'_ampmRange][type="hidden"]').first().setValue(hours+':'+min);}else{durationLabel.update(' ');}}};$('input_'+id+'_hourSelect').observe('change',displayDuration);$('input_'+id+'_minuteSelect').observe('change',displayDuration);$('input_'+id+'_hourSelectRange').observe('change',displayDuration);$('input_'+id+'_minuteSelectRange').observe('change',displayDuration);if($('input_'+id+'_ampm')&&$('input_'+id+'_ampmRange')){$('input_'+id+'_ampm').observe('change',displayDuration);$('input_'+id+'_ampmRange').observe('change',displayDuration);}
|
340 |
+
displayDuration();},displayLocalTime:function(hh,ii,ampm){if($(hh)&&!$(hh).hasClassName('noDefault')){var date=new Date();var hour=date.getHours();var currentAmpm="";var twentyFour=true;if($(ampm)){twentyFour=false;currentAmpm=(hour>11)?'PM':'AM';hour=(hour>12)?hour-12:hour;hour=(hour==0)?12:hour;}
|
341 |
+
var min=date.getMinutes();var step=Number($(ii).options[2].value)-Number($(ii).options[1].value);min=Math.round(min/step)*step;min=this.addZeros(min,2);if(min>=60){min="00";hour++;if(twentyFour){if(hour==24)hour=0;}else{if(currentAmpm=='AM'&&hour==12)currentAmpm='PM';else if(currentAmpm=='PM'&&hour==12)currentAmpm='AM';else if(hour==13)hour=1;}}
|
342 |
+
if(hour<10&&$(hh).options[1].value.length>1){hour='0'+hour;}
|
343 |
+
$(hh).value=hour;$(ii).value=min;if($(hh+'Range')){$(hh+'Range').value=hour;$(ii+'Range').value=min;}
|
344 |
+
if($(ampm)){if(currentAmpm=='PM'){if($(ampm).select('option[value="PM"]').length>0)$(ampm).value='PM';if($(ampm+'Range')&&$(ampm+'Range').select('option[value="PM"]').length>0)$(ampm+'Range').value='PM';}else{if($(ampm).select('option[value="AM"]').length>0)$(ampm).value='AM';if($(ampm+'Range')&&$(ampm+'Range').select('option[value="AM"]').length>0)$(ampm+'Range').value='AM';}}}},displayDynamicDate:function(id,dynamic){var offset=parseInt(dynamic.split('today')[1])||0;var dynamicDate=new Date();dynamicDate.setDate(dynamicDate.getDate()+offset);JotForm.formatDate({date:dynamicDate,dateField:$("id_"+id)});},dateLimits:{},setCalendar:function(id,startOnMonday,limits,parent){try{JotForm.dateLimits[id]=limits;var field=$('id_'+id);var calendar=Calendar.setup({triggerElement:"input_"+id+"_pick",dateField:"year_"+id,parentElement:parent,closeHandler:function(){JotForm.calendarClose.apply(this,arguments);},selectHandler:function(){JotForm.formatDate.apply(this,arguments);},startOnMonday:startOnMonday,limits:limits});field.observe('keyup',function(){field.fire('date:changed');});var clearDate=function(){$("month_"+id).value=$("day_"+id).value=$("year_"+id).value="";}
|
345 |
+
var invalidDate=function(invalidDate,calendar){invalidDate.addClassName("invalidDate");clearDate();}
|
346 |
+
if($('lite_mode_'+id)){$('lite_mode_'+id).dateChanged=function(e,calendar){var lite_mode=e.currentTarget;var seperator=lite_mode.readAttribute('seperator')||lite_mode.readAttribute('data-seperator');var format=(lite_mode.readAttribute('format')||lite_mode.readAttribute('data-format')).toLowerCase();lite_mode.removeClassName("invalidDate");if(lite_mode.value===""){field.fire('date:changed');return clearDate();}
|
347 |
+
if(lite_mode.value.length==((seperator.length*2)+format.length)){var _yIn=format.indexOf("yy");var _mIn=format.indexOf("mm");var _dIn=format.indexOf("dd");var _sorter=new Array(_yIn,_mIn,_dIn);_sorter=_sorter.sort();var _sortIndex={year:_sorter.indexOf(_yIn),month:_sorter.indexOf(_mIn),day:_sorter.indexOf(_dIn)}
|
348 |
+
var year=parseInt(lite_mode.value.split(seperator)[_sortIndex.year]);var month=parseInt(lite_mode.value.split(seperator)[_sortIndex.month])-1;var day=parseInt(lite_mode.value.split(seperator)[_sortIndex.day]);var _tempDate=new Date(year,month,day);if(!_tempDate||!_tempDate.getDate()){invalidDate(lite_mode,calendar);}else{calendar.date=_tempDate;calendar.selectHandler(calendar);}}else{invalidDate(lite_mode,calendar);}
|
349 |
+
if(lite_mode.hasClassName("invalidDate")){JotForm.errored(lite_mode,'Enter a valid date');field.addClassName('form-line-error');field.addClassName('form-datetime-validation-error');}}
|
350 |
+
$('lite_mode_'+id).observe('keyup',function(e){e.stopPropagation();e.currentTarget.dateChanged(e,calendar);return false;});$('lite_mode_'+id).observe('blur',function(e){e.stopPropagation();e.currentTarget.dateChanged(e,calendar);e.currentTarget.setAttribute("date-val",calendar.date.getTime());return false;});}
|
351 |
+
if(!parent){var openCalendar=function(){var ele=this;setTimeout(function(){calendar.showAtElement(ele);},50);};if($('input_'+id+'_pick').hasClassName('showAutoCalendar')){var _selectors=[('#day_'+id),('#month_'+id),('#year_'+id),('#lite_mode_'+id)];$$(_selectors.join(',')).each(function(elem){elem.observe('focus',openCalendar);elem.observe('click',openCalendar);});}
|
352 |
+
$("year_"+id).observe("blur",function(){calendar.hide();});}}catch(e){JotForm.error(e);}},currentDateReadonly:function(){},calendarClose:function(calendar){var calendarFields=$$('input[id*="'+calendar.dateField.id.match(/_[0-9]+/)[0]+'"]');var validations=calendar.dateField.className.replace(/.*validate\[(.*)\].*/,'$1').split(/\s*,\s*/);var incomplete=calendarFields.any(function(c){return c.value.empty()});if((validations.include("required")||validations.include("disallowPast"))&&incomplete){calendar.dateField.validateInput();}
|
353 |
+
if(validations.include("required")&&!incomplete){JotForm.corrected($('id_'+calendar.id));}
|
354 |
+
calendar.hide();},getDefaults:function(){$$('.form-textbox, .form-dropdown, .form-textarea').each(function(input){if(input.hinted||input.value===""){return;}
|
355 |
+
JotForm.defaultValues[input.id]=input.value;});$$('.form-radio, .form-checkbox').each(function(input){if(!input.checked){return;}
|
356 |
+
JotForm.defaultValues[input.id]=input.value;});},handleOtherOptions:function(){$$('.form-radio-other-input, .form-checkbox-other-input').each(function(inp){inp.hint(inp.getAttribute('data-otherhint')||'Other');});$$('.form-radio, .form-checkbox').each(function(input){var id=input.id.replace(/input_(\d+)_\d+/gim,'$1');if(id.match('other_')){id=input.id.replace(/other_(\d+)/,'$1');}
|
357 |
+
var other=$('other_'+id);if(other){var other_input=$('input_'+id);other_input.observe('keyup',function(){other.value=other_input.value;var willInputBeChecked=other_input.value!=='';var isInputChecked=other.checked;if(!isInputChecked&&willInputBeChecked){other_input.click();}
|
358 |
+
setTimeout(function(){other.checked=willInputBeChecked;});});other_input.observe('click',function(e){other_input.value=other_input.value===other_input.getAttribute('data-otherhint')?'':other_input.value;if(!other.checked){other.checked=true;}});other.observe('click',function(event){if(other.getAttribute('class').indexOf('[required]')>-1){other_input.value=other_input.value===other_input.getAttribute('data-otherhint')?'':other_input.value;}else{other_input.value=other_input.value!==''?other_input.value:other_input.getAttribute('data-otherhint');}
|
359 |
+
if(other.checked){other_input.select();}else{if(other_input.hintClear){other_input.hintClear();}}});input.observe('click',function(e){if(input!==other&&input.checked&&!other.checked){other_input.value='';}});}});},shuffleOptions:function(id){var type=JotForm.calculationType(id);if(type==="radio"||type==="checkbox"){try{var options=$("id_"+id).select('.form-'+type+'-item');var length=$("id_"+id).down('.form-'+type+'-other-input')?options.length-1:options.length;for(var i=0;i<length-1;i++){var toSwap=$("id_"+id).select('.form-'+type+'-item')[i];var randy=Math.floor(Math.random()*length);var swappedOut=options[randy].replace(toSwap);var next=toSwap.next();var insertAfter=(next&&next!==options[length])?next:toSwap;insertAfter.insert({after:swappedOut});}
|
360 |
+
if($("id_"+id).down('.form-multiple-column')){var columnCount=$("id_"+id).down('.form-multiple-column').readAttribute("data-columncount");$("id_"+id).select('.form-'+type+'-item').each(function(item,i){item.setStyle({'clear':(i%columnCount==0)?'left':'none'});});}}catch(e){console.log(e);}}else if(type==="select"){try{var clone=$('input_'+id).clone(true);$('input_'+id).update("");var length=clone.length;$('input_'+id).insert(clone[0].clone(true));for(var i=1;i<length;i++){var randy=Math.floor(Math.random()*(clone.length-1))+1;$('input_'+id).insert(clone[randy].clone(true));clone[randy].remove();}}catch(e){console.log(e);}}else if(type==="matrix"){try{var rows=$("id_"+id).select('tr');var len=rows.length
|
361 |
+
for(var i=1;i<len;i++){var randy=Math.floor(Math.random()*(len-1))+1;var swappedOut=rows[randy].replace(rows[i]);var insertAfter=rows[i].next()?rows[i].next():rows[i];insertAfter.insert({after:swappedOut});}}catch(e){console.log(e);}}},handleDateTimeChecks:function(){try{$$('[name$=\[month\]]').each(function(monthElement){var isBirthdate=monthElement.type!=="tel"&&monthElement.type!=="text";var questionId=isBirthdate?monthElement.id.replace(new RegExp('.*?([0-9]+).*','gim'),'$1'):monthElement.id.split('month_').last();var dateElement=$('id_'+questionId);if(!dateElement)
|
362 |
+
return;var dayElement=dateElement.down('[id*=day]');var yearElement=dateElement.down('[id*=year]');var hourElement=dateElement.select('#hour_'+questionId).first();var minElement=dateElement.select('#min_'+questionId).first();var ampmElement=dateElement.select('#ampm_'+questionId).first();monthElement.dateTimeCheck=function(e){var erroredElement=null;var ignoreBirthdate=isBirthdate&&(monthElement.value===""||dayElement.value===""||yearElement.value==="");if(!ignoreBirthdate&&(monthElement.value!=""||dayElement.value!=""||yearElement.value!="")){var month=isBirthdate?monthElement.selectedIndex:monthElement.value;month=parseInt(month,10);var day=+dayElement.value;var year=+yearElement.value;if(isNaN(year)||year<1){erroredElement=yearElement;}else if(isNaN(month)||month<1||month>12){erroredElement=monthElement;}else if((isNaN(day)||day<1)){erroredElement=dayElement;}else{switch(month){case 2:if((year%4==0)?day>29:day>28){erroredElement=dayElement;}
|
363 |
+
break;case 4:case 6:case 9:case 11:if(day>30){erroredElement=dayElement;}
|
364 |
+
break;default:if(day>31){erroredElement=dayElement;}
|
365 |
+
break;}}}
|
366 |
+
var isTargetActive=e&&e.target&&e.target===document.activeElement;if(window.FORM_MODE==='cardform'&&typeof document.activeElement!=='undefined'&&document.activeElement&&typeof document.activeElement.up==='function'&&monthElement){isTargetActive=monthElement.up('.jfCard-question')===document.activeElement.up('.jfCard-question');}
|
367 |
+
if(!erroredElement&&hourElement&&minElement&&(hourElement.value!=""||minElement.value!="")&&!isTargetActive)
|
368 |
+
{var hour=(hourElement.value.strip()=='')?-1:+hourElement.value;var min=(minElement.value.strip()=='')?-1:+minElement.value;if(isNaN(hour)||(ampmElement?(hour<0||hour>12):(hour<0||hour>23))){erroredElement=hourElement;}else if(isNaN(min)||min<0||min>59){erroredElement=minElement;}}
|
369 |
+
var active=document.activeElement;if(erroredElement&&active!=yearElement&&active!=monthElement&&active!=dayElement){if(erroredElement===hourElement||erroredElement===minElement){erroredElement.errored=false;JotForm.errored(erroredElement,'Enter a valid time');}else{erroredElement.errored=false;var errorTxt=JotForm.texts.dateInvalidSeparate.replace('{element}',erroredElement.id.replace("_"+questionId,""))
|
370 |
+
JotForm.errored(erroredElement,errorTxt);}
|
371 |
+
dateElement.addClassName('form-line-error');dateElement.addClassName('form-datetime-validation-error');return false;}else{JotForm.corrected(monthElement);JotForm.corrected(dayElement);JotForm.corrected(yearElement);if(hourElement&&minElement){JotForm.corrected(hourElement);JotForm.corrected(minElement);}
|
372 |
+
dateElement.removeClassName('form-line-error');dateElement.removeClassName('form-datetime-validation-error');}
|
373 |
+
return true;};if(hourElement&&minElement){hourElement.observe('change',function(e){monthElement.dateTimeCheck(e)});minElement.observe('change',function(e){monthElement.dateTimeCheck(e)});}});}catch(e){console.error(e);}},handleTextareaLimits:function(){$$('.form-textarea-limit-indicator span').each(function(el){var inpID=el.id.split('-')[0];if(!$(inpID)){return;}
|
374 |
+
var minimum=el.readAttribute('data-minimum');var limit=el.readAttribute('data-limit');var input=$(inpID);var count;var countText=function(firstRun){if(input.value===""||input.hasClassName('form-custom-hint')){$(el.parentNode).removeClassName('form-textarea-limit-indicator-error');el.update("0/"+(minimum>-1?minimum:limit));return JotForm.corrected(el);}
|
375 |
+
var contents;if(input.hasClassName("form-textarea")&&input.up('div').down('.nicEdit-main')){contents=input.value.stripTags(' ').replace(/ /g,' ');}else{contents=input.value;}
|
376 |
+
var cleaned_contents=contents.replace(/<.[^<>]*?>/g,' ').replace(/ | /gi,' ');$(el.parentNode).removeClassName('form-textarea-limit-indicator-error');JotForm.corrected(el.up('.form-line').down('textarea'));var limitByType=function(type){var limitType=type=="min"?el.readAttribute('data-typeminimum'):el.readAttribute('type');if(limitType=='Words'){count=$A(cleaned_contents.split(/\s+/)).without("").length;}else if(limitType=='Letters'){count=cleaned_contents.length;}
|
377 |
+
var limiting=false;if(((type=="min"&&count<minimum)||(type=="max"&&count>limit))&&!(firstRun===true)){$(el.parentNode).addClassName('form-textarea-limit-indicator-error');var minMax=type=="min"?"Min":"";var lim=type=="min"?minimum:limit;var lettersWords=limitType==="Words"?"word":"character";var msg=JotForm.texts[lettersWords+minMax+"LimitError"]+" "+lim;JotForm.errored(el.up('.form-line').down('textarea'),msg+'.');limiting=true;}
|
378 |
+
el.update(count+"/"+((minimum&&count<minimum&&type=="min")||limit==-1?minimum:limit));return limiting;}
|
379 |
+
var runMax=true;if(minimum&&minimum>0){runMax=!limitByType("min")}
|
380 |
+
if(limit&&limit>0&&runMax){limitByType("max");}};countText(true);input.observe('change',countText);input.observe('focus',countText);input.observe('keyup',countText);if(input.hasClassName("form-textarea")&&input.up('div').down('.nicEdit-main')){var cEditable=input.up('div').down('.nicEdit-main');var runCount=function(){input.value=cEditable.innerHTML;countText();};cEditable.observe('keyup',runCount);cEditable.observe('blur',function(){setTimeout(runCount,0);});}});},handleAutoCompletes:function(){var editModeFirst=[];$H(JotForm.autoCompletes).each(function(pair){var el=$(pair.key);el.writeAttribute('autocomplete','off');var parent=$(el.parentNode);var pairs=pair.value.split(/\r\n|\r|\n|\|/g);var values=$A(pairs);var lastValue;var selectCount=0;var liHeight=0;var list=new Element('div',{className:'form-autocomplete-list'}).setStyle({listStyle:'none',listStylePosition:'outside',position:'absolute',zIndex:'10000'}).hide();var render=function(){var isCardForm=window.FORM_MODE==='cardform';if(isCardForm){var ebcr=el.getBoundingClientRect();var top=((ebcr.top+ebcr.height))-5+'px';var left=(ebcr.left)+'px';var width=(ebcr.width<1?100:ebcr.width)+'px';list.setStyle({top:top,left:left,width:width});list.show();}else{var dims=el.getDimensions();var offs=el.cumulativeOffset();list.setStyle({top:((dims.height+offs[1]))+'px',left:offs[0]+'px',width:((dims.width<1?100:dims.width)-2)+'px'});list.show();}};$(document.body).insert(list);list.close=function(){list.update();list.hide();selectCount=0;};el.observe('blur',function(){list.close();});el.observe('keyup',function(e){var word=el.value;if(lastValue==word){return;}
|
381 |
+
lastValue=word;list.update();if(!word){list.close();return;}
|
382 |
+
var fuzzy=el.readAttribute('data-fuzzySearch')=='Yes';var matches;if(fuzzy){matches=values.collect(function(v){if(v.toLowerCase().include(word.toLowerCase())){return v;}}).compact();}else{matches=values.collect(function(v){if(v.toLowerCase().indexOf(word.toLowerCase())==0){return v;}}).compact();}
|
383 |
+
var maxMatches=el.readAttribute('data-maxMatches');if(maxMatches>0)matches=matches.slice(0,maxMatches);if(matches.length>0){matches.each(function(match){var li=new Element('li',{className:'form-autocomplete-list-item'});var val=match;li.val=val;try{val=match.replace(new RegExp('('+word+')','gim'),'<b>$1</b>');}
|
384 |
+
catch(e){JotForm.error(e);}
|
385 |
+
li.insert(val);li.onmousedown=function(){el.value=JotForm.decodeHtmlEntities(match);list.close();};list.insert(li);});render();liHeight=liHeight||$(list.firstChild).getHeight()+(parseInt($(list.firstChild).getStyle('padding'),10)||0)+(parseInt($(list.firstChild).getStyle('margin'),10)||0);list.setStyle({height:(liHeight*((matches.length>9)?10:matches.length)+4)+'px',overflow:'auto'});if(JotForm.isEditMode()&&editModeFirst.indexOf(el.id)===-1){list.hide();editModeFirst.push(el.id);}}else{list.close();}});el.observe('keydown',function(e){var selected;if(!list.visible()||!list.firstChild){return;}
|
386 |
+
selected=list.select('.form-autocomplete-list-item-selected')[0];if(selected){selected.removeClassName('form-autocomplete-list-item-selected');}
|
387 |
+
switch(e.keyCode){case Event.KEY_UP:if(selected&&selected.previousSibling){$(selected.previousSibling).addClassName('form-autocomplete-list-item-selected');}else{$(list.lastChild).addClassName('form-autocomplete-list-item-selected');}
|
388 |
+
if(selectCount<=1){if(selected&&selected.previousSibling){$(selected.previousSibling).scrollIntoView(true);selectCount=0;}else{$(list.lastChild).scrollIntoView(false);selectCount=10;}}else{selectCount--;}
|
389 |
+
break;case Event.KEY_DOWN:if(selected&&selected.nextSibling){$(selected.nextSibling).addClassName('form-autocomplete-list-item-selected');}else{$(list.firstChild).addClassName('form-autocomplete-list-item-selected');}
|
390 |
+
if(selectCount>=9){if(selected&&selected.nextSibling){$(selected.nextSibling).scrollIntoView(false);selectCount=10;}else{$(list.firstChild).scrollIntoView(true);selectCount=0;}}else{selectCount++;}
|
391 |
+
break;case Event.KEY_ESC:list.close();break;case Event.KEY_TAB:case Event.KEY_RETURN:if(selected){el.value=selected.val;lastValue=el.value;}
|
392 |
+
list.close();if(e.keyCode==Event.KEY_RETURN){e.stop();}
|
393 |
+
break;default:return;}});list.close();});},decodeHtmlEntities:function(str){var textarea=document.createElement('textarea');textarea.innerHTML=str;return textarea.value;},getFileExtension:function(filename){return(/[.]/.exec(filename))?(/[^.]+$/.exec(filename))[0]:undefined;},prePopulations:function(){$H(document.get).each(function(pair){if(pair.key.match(/[\s\S]+;/))pair.key=pair.key.replace(/[\s\S]+;/,'');var stricterMatch=pair.key.length<3?true:false;var n=stricterMatch?'[name$="_'+pair.key+'"]':'[name*="_'+pair.key+'"]';var strict='[name$="_'+pair.key+'"]';var input;if(window.FORM_MODE!=='cardform'){input=$$('.form-star-rating'+n)[0];if(input){input.setRating(parseInt(pair.value));return;}}
|
394 |
+
if(typeof pair.value==='object'){pair.value=pair.value[0]||"";}
|
395 |
+
input=$$('.form-slider'+n)[0];if(input){input.setSliderValue(parseInt(pair.value));return;}
|
396 |
+
if(pair.key=="coupon-input"&&$('coupon-input')){$('coupon-input').setValue(pair.value);$('coupon-button').triggerEvent('click');$(window).scrollTo(0,0);return;}
|
397 |
+
input=$$('.form-textbox%s, .form-dropdown%s, .form-textarea%s, .form-hidden%s'.replace(/\%s/gim,strict))[0];if(!input){input=$$('.form-textbox%s, .form-dropdown%s, .form-textarea%s, .form-hidden%s'.replace(/\%s/gim,n))[0];}
|
398 |
+
if(!input&&pair.key.indexOf("[")>0){var name=pair.key.substr(0,pair.key.lastIndexOf('['));if(name.length>0&&$$("select[name*="+name+"], input[name*="+name+"]").length>0){var index=pair.key.substr(pair.key.lastIndexOf('[')+1).replace("]","");if($$("select[name*="+name+"], input[name*="+name+"]").length>index){var type=$$("select[name*="+name+"]").length>0?"select":$$("input[name*="+name+"]")[index].type;switch(type){case"select":$$("select[name*="+name+"]")[index].value=pair.value.replace(/\+/g,' ');break;case"text":case"tel":case"number":$$("input[name*="+name+"]")[index].value=pair.value.replace(/\+/g,' ');break;case"radio":case"checkbox":try{if((pair.value=="true"||pair.value==1)&&$$("input[name*="+name+"]")[index]&&!($$("input[name*="+name+"]").first().up('.form-line').readAttribute('data-type')==='control_matrix'&&name.indexOf('[')<0)){$$("input[name*="+name+"]")[index].click();}}catch(e){console.log(e);}
|
399 |
+
break;}}}}
|
400 |
+
if(input&&input.readAttribute('data-type')=='input-grading'){var grades=pair.value.split(',');var stub=input.id.substr(0,input.id.lastIndexOf('_')+1);for(var i=0;i<grades.length;i++){if($(stub+i))$(stub+i).value=grades[i];}}else if(input&&(input.hasClassName('form-checkbox-other-input')||input.hasClassName('form-radio-other-input'))){if(n.indexOf('[other]')>-1){input.value=pair.value.replace(/\+/g,' ');JotForm.defaultValues[input.id]=input.value;}else{try{var valuesArray=input.up('.form-line').readAttribute('data-type')==="control_checkbox"?pair.value.split(','):[pair.value];for(var i=0;i<valuesArray.length;i++){var normalInputWithValue=input.up('.form-input').select('input[type="radio"], input[type="checkbox"]').any(function(inp){return valuesArray[i]===inp.value;});if(!normalInputWithValue){input.value=valuesArray[i];valuesArray[i]="other";}}
|
401 |
+
pair.value=valuesArray.join(",");}catch(e){console.error(e);}}}else if(input&&input.hasClassName("form-textarea")&&input.up('div').down('.nicEdit-main')){input.up('div').down('.nicEdit-main').update(pair.value.replace(/\+/g,' '));}else if(input&&input.hasClassName("form-dropdown")){var val=pair.value.replace(/\+/g,' ');var arr=input.readAttribute("multiple")?val.split(","):[val];var options=input.select('option');input.value=arr;$A(options).each(function(option){option.writeAttribute("selected",arr.include(option.value)?"selected":false);});}else if(input){input.value=pair.value.replace(/\{\+\}/g,'{plusSign}').replace(/\+/g,' ').replace(/\{plusSign\}/g,'+');if(document.referrer.match(/jotform/)||input.getAttribute('type')==='email'){input.value=pair.value;}
|
402 |
+
JotForm.defaultValues[input.id]=input.value;try{var formLine=input.up('.form-line');if(formLine&&formLine.readAttribute('data-type')=="control_datetime"){var year=formLine.down('input[id*="year_"]').value;var month=formLine.down('input[id*="month_"]').value;var day=formLine.down('input[id*="day_"]').value;if(year!=""&&month!=""&&day!=""){JotForm.formatDate({date:new Date(year,month-1,day),dateField:formLine});var dateInput=formLine.down('input[id*="input_"]');var liteModeInput=formLine.down('input[id*="lite_mode_"]');if(dateInput){var ISODate=year+'-'+month+'-'+day;JotForm.defaultValues[dateInput.id]=ISODate;dateInput.value=ISODate;}
|
403 |
+
if(liteModeInput){JotForm.defaultValues[liteModeInput.id]=liteModeInput.value;}}}}catch(e){console.log(e)}}
|
404 |
+
$$('.form-textbox%s, .form-textarea%s, .form-hidden%s'.replace(/\%s/gim,n)).each(function(input){input.triggerEvent('keyup');});$$('.form-dropdown%s'.replace(/\%s/gim,n)).each(function(input){input.triggerEvent('change');});$$('.form-checkbox%s, .form-radio%s'.replace(/\%s/gim,n)).each(function(input){var disabled=input.disabled?!!(input.enable()):false;var value=pair.value.replace(/\{\+\}/g,'{plusSign}').replace(/\+/g,' ').replace(/\{plusSign\}/g,'+');if(value==input.value||$A(value.split(',')).include(input.value)||$A(value.split('<br>')).include(input.value)){if(!input.checked){if(input.disabled){input.enable();input.click();input.disable();}else{input.click();}
|
405 |
+
JotForm.defaultValues[input.id]=input.value;}}else if($A(pair.value.split(',')).include('other')){if((input.name.indexOf('[other]')>-1)||(input.id&&input.id.indexOf('other_')>-1)){input.click();}}
|
406 |
+
if(disabled)setTimeout(function(){input.disable();});});if(input&&input.hasClassName('form-textarea')&&input.hasClassName('form-custom-hint')&&input.hasContent){input.removeClassName('form-custom-hint');}});setTimeout(function(){JotForm.runAllConditions();},200);},resetForm:function(frm){var hiddens=$(frm).select('input[type="hidden"], #input_language');hiddens.each(function(h){h.__defaultValue=h.value;});$(frm).reset();hiddens.each(function(h){h.value=h.__defaultValue;});return frm;},editMode:function(data,noreset,skipField,skipCardIndex){var preLink="";if(!JotForm.debug){if(this.url.search("https")==-1){preLink="http://cdn.jotfor.ms/";}else{preLink="https://cdn.jotfor.ms/";}}
|
407 |
+
if(document.get.offline_forms=='true'&&document.get.jotformNext==1){preLink=window.location.pathname.replace('/index.html','');}
|
408 |
+
var self=this;if(!window.editModeFunction){this.loadScript(preLink+'/js/form.edit.mode.js?v_'+(new Date()).getTime(),function(){self.editMode=editModeFunction;if(JotForm.sessionID&&data){data.fromSession=true;}
|
409 |
+
self.editMode(data,noreset,skipField,skipCardIndex);});}else{self.editMode(data,noreset,skipField,skipCardIndex);}},isEditMode:function(){if(window.FORM_MODE==='cardform'){return(typeof window.editModeFunction!=='undefined')&&CardForm.layoutParams.isEditMode;}
|
410 |
+
return(typeof window.editModeFunction!=='undefined')||window.location.pathname.match(/^\/edit\//)||window.location.pathname.match(/^\/\/edit/)||window.location.href.match(/mode=inlineEdit/)||window.location.href.match(/mode=submissionToPDF/);},setConditions:function(conditions){conditions.reverse();JotForm.conditions=conditions;conditions.each(function(condition){condition.action=[].concat(condition.action);});},setCalculations:function(calculations){if(!JotForm.calculations||Object.keys(JotForm.calculations).length===0){JotForm.calculations=calculations;}else{Object.values(calculations).forEach(function(calculation){JotForm.calculations.push(calculation);});}},prepareCalculationsOnTheFly:function(questions){var questions_by_name=[];function transpose(a){return a[0].map(function(val,c){return a.map(function(r){return r[c];});});}
|
411 |
+
if(questions.length>0){if(Object.keys(JotForm.calculations).length<=0){JotForm.calculations=[];}
|
412 |
+
questions.each(function(question){if(question){questions_by_name[question.name]=question.qid;}});questions.each(function(question){if(question){var values=[];switch(question.type){case'control_textbox':question.text!==''?values.push(question.text):void(0);question.subLabel!==''?values.push(question.subLabel):void(0);question.description!==''?values.push(question.description):void(0);break;case'control_image':question.labelText!==''?values.push(question.labelText):void(0);break;default:question.text!==''?values.push(question.text):void(0);question.description!==''?values.push(question.description):void(0);}
|
413 |
+
for(var value;value=values.shift();){var regex=/\{([^\}]*)\}/gim;for(var questions=[];result=regex.exec(value);questions.push(result));if(questions.length>0){questions=transpose(questions);questions[1].forEach(function(question_name){var qname;if(question_name.indexOf(':')>-1){qname=questions_by_name[question_name.split(':')[0]]}else{qname=questions_by_name[question_name.split('[')[0]];}
|
414 |
+
var multilineFieldRegex=/\[(.*?)\]/gi;var multilineFieldResult=multilineFieldRegex.exec(question_name);var multilineFieldEquation=multilineFieldResult?qname+'|'+multilineFieldResult[1]:'';JotForm.calculations.push({decimalPlaces:"2",defaultValue:"",equation:"{"+(multilineFieldEquation||qname)+"}",ignoreHiddenFields:"",insertAsText:"1",isLabel:question.type==="control_text"?"":"1",newCalculationType:"1",operands:qname,readOnly:"",replaceText:question_name,resultField:question.qid,showBeforeInput:"",tagReplacement:"1",useCommasForDecimals:""});});}}}});}},runConditionForId:function(id){$H(JotForm.fieldConditions).each(function(pair){var conds=pair.value.conditions;$A(conds).each(function(cond){$A(cond.terms).each(function(term){if(term.field===id){JotForm.checkCondition(cond);}});});});},otherConditionTrue:function(field,visibility){visibility=visibility.replace(/multiple/,"");var otherConditionTrue=false;$H(JotForm.fieldConditions).each(function(pair){var conds=pair.value.conditions;$A(conds).each(function(cond){$A(cond.action).each(function(action){if(action.fields){action.fields.each(function(multiField){if(multiField===field&&action.visibility&&action.visibility.toLowerCase().replace(/multiple/,"")===visibility&&action.hasOwnProperty('currentlyTrue')&&action.currentlyTrue){otherConditionTrue=true;return;}});}
|
415 |
+
if(action.field===field&&action.visibility&&action.visibility.toLowerCase()===visibility&&action.hasOwnProperty('currentlyTrue')&&action.currentlyTrue){otherConditionTrue=true;}});});});return otherConditionTrue;},showField:function(field,multiple){if(JotForm.otherConditionTrue(field,'hide'))return;var element=null;var idField=$('id_'+field);var cidField=$('cid_'+field);var sectionField=$('section_'+field);if(sectionField&&cidField){element=sectionField;}else if(cidField&&!idField){element=cidField;}else{element=idField;}
|
416 |
+
if(!element){var productField=$$('input[name*="q'+field+'"][type="hidden"]');if(productField.length>0){productField[0].setAttribute('selected',true);}
|
417 |
+
return element;}
|
418 |
+
var wasHidden=element.hasClassName('form-field-hidden')||element.hasClassName('always-hidden');element.removeClassName('form-field-hidden');element.removeClassName('always-hidden');if(!(element.hasClassName("form-section")||element.hasClassName("form-section-closed"))&&element.down(".always-hidden")){element.down(".always-hidden").removeClassName('always-hidden');}
|
419 |
+
if(JotForm.paymentFields.indexOf(element.getAttribute('data-type'))>-1&&$('hiddenPaymentField')){$('hiddenPaymentField').remove();}
|
420 |
+
if(sectionField){if(element.hasClassName('form-section-closed')){if(element.select('.form-collapse-table')[0].hasClassName('form-collapse-hidden')){element.removeClassName('form-section-closed');element.addClassName('form-section');element.setStyle({height:"auto",overflow:"visible"});}else{element.setStyle({overflow:"hidden"});}}else{element.setStyle({height:"auto",overflow:"visible"});}}
|
421 |
+
if(JotForm.getInputType(field)==='html'&&$('text_'+field).innerHTML.match(/google.*maps/gi)){$('text_'+field).innerHTML=$('text_'+field).innerHTML;}
|
422 |
+
var elemShown=element.show();if(JotForm.getInputType(field)==='widget'){JotForm.showWidget(field);}else if(JotForm.getInputType(field)==='signature'){JotForm.showAndResizeESignature(field);}
|
423 |
+
if(JotForm.getInputType(field)==='collapse'){if(sectionField&&!element.hasClassName('form-section-closed')){element.select('li.form-line').each(function(node,i){var id=node.id.split('_')[1];if(JotForm.getInputType(id)==='widget'){JotForm.showWidget(id);}else if(JotForm.getInputType(id)==='signature'){JotForm.showAndResizeESignature(id);}});}}
|
424 |
+
if(window.FORM_MODE=='cardform'&&wasHidden&&($('id_'+field)&&$('id_'+field).readAttribute('data-type')=='control_matrix')){JotForm.setMatrixLayout(field,false);}
|
425 |
+
if(JotForm.donationField&&element.down('[data-component="paymentDonation"][data-custom-amount-field]')){JotForm.updateDonationAmount();}
|
426 |
+
return elemShown;},showWidget:function(id){var referrer=document.getElementById("customFieldFrame_"+id)?document.getElementById("customFieldFrame_"+id).src:false;if(referrer){var frame=(navigator.userAgent.indexOf("Firefox")!=-1&&typeof getIframeWindow!=='undefined')?getIframeWindow(window.frames["customFieldFrame_"+id]):window.frames["customFieldFrame_"+id];var isFrameXDready=(!$("customFieldFrame_"+id).hasClassName('frame-xd-ready')&&!$("customFieldFrame_"+id).retrieve('frame-xd-ready'))?false:true;if(frame&&isFrameXDready){XD.postMessage(JSON.stringify({type:"show",qid:id}),referrer,frame);if(typeof window.JCFServerCommon!=='undefined'){if(JotForm.isVisible(JotForm.getSection($("id_"+id)))&&JotForm.isVisible($("id_"+id))){if(window.JCFServerCommon.frames.hasOwnProperty(id)){window.JCFServerCommon.frames[id].sendReadyMessage(id);}}}}}},reloadWidget:function(id){var referrer=document.getElementById("customFieldFrame_"+id)?document.getElementById("customFieldFrame_"+id).src:false;if(referrer){var frame=(navigator.userAgent.indexOf("Firefox")!=-1&&typeof getIframeWindow!=='undefined')?getIframeWindow(window.frames["customFieldFrame_"+id]):window.frames["customFieldFrame_"+id];var isFrameXDready=(!$("customFieldFrame_"+id).hasClassName('frame-xd-ready')&&!$("customFieldFrame_"+id).retrieve('frame-xd-ready'))?false:true;if(frame&&isFrameXDready){XD.postMessage(JSON.stringify({type:"reload",qid:id}),referrer,frame);}}},shouldWidgetSkipSubmit:function(){if(JotForm.isEncrypted||JotForm.disableSubmitButton){return true;}
|
427 |
+
var selfSubmittingPayments=["stripe","braintree","square","eway","bluepay"];if(!JotForm.isEditMode()&&JotForm.isPaymentSelected()&&selfSubmittingPayments.indexOf(JotForm.payment)>-1){return JotForm.paymentTotal>0||(JotForm.payment=='stripe'&&window.paymentType=='subscription');}
|
428 |
+
return false;},showAndResizeESignature:function(id){var element=$('id_'+id);if(element&&JotForm.isVisible(element)&&element.select('.pad').length>0){element.select('.pad').first().fire('on:sigresize');}},hideField:function(field,multiple,dontClear){if(JotForm.otherConditionTrue(field,'show'))return;var idPrefix='id_';if($('cid_'+field)&&!$('id_'+field)){idPrefix='cid_';}
|
429 |
+
if($('cid_'+field)&&$('section_'+field)){idPrefix='section_';}
|
430 |
+
var element=$(idPrefix+field);if(element){element.addClassName('form-field-hidden');if(JotForm.paymentFields.indexOf(element.getAttribute('data-type'))>-1&&!$('hiddenPaymentField')){$$('form')[0].insert(new Element('input',{type:'hidden',name:'hiddenPaymentField',id:'hiddenPaymentField',value:1}));}
|
431 |
+
if(JotForm.clearFieldOnHide=="enable"&&!dontClear&&!JotForm.ignoreInsertionCondition){try{JotForm.clearField(field);}catch(e){console.log(e);}}
|
432 |
+
if(element.style.setProperty){element.style.setProperty('display','none','important');}else{element.hide();}
|
433 |
+
if(JotForm.donationField&&element.down('[data-component="paymentDonation"][data-custom-amount-field]')){JotForm.updateDonationAmount(0);}
|
434 |
+
JotForm.corrected(element);return element;}
|
435 |
+
var productField=$$('input[name*="q'+field+'"][type="hidden"]');if(productField.length>0){productField[0].setAttribute('selected',false);}},clearField:function(field,subfield,dontTrigger){var type=JotForm.calculationType(field);if(!type)return;var defaultValue="input_"+field in JotForm.defaultValues?JotForm.defaultValues["input_"+field]:"";if(type=="collapse"){$("section_"+field).select(".form-line").each(function(el){var id=el.id.replace("id_","");JotForm.clearField(id);});return;}
|
436 |
+
if(type==="matrix"&&subfield&&$(subfield)){$(subfield).value="";if(!dontTrigger&&$(subfield).triggerEvent){$(subfield).triggerEvent('keyup');}}else if(type==="matrix"){$('id_'+field).select('input[type="text"], input[type="tel"], input[type="number"]').each(function(el){el.value=(el.id in JotForm.defaultValues)?JotForm.defaultValues[el.id]:"";});$("id_"+field).select('input[type="radio"], input[type="checkbox"]').each(function(input){if(!JotForm.defaultValues[input.id]){input.checked=false;}});$('id_'+field).select('select').each(function(el){if(el.id in JotForm.defaultValues){el.value=JotForm.defaultValues[el.id];}else{el.selectedIndex=0;}});if($('id_'+field).select('input, select').length===0)return;var firstField=$('id_'+field).select('input, select').first();if(firstField&&firstField.triggerEvent){var eventType;if(firstField.nodeName.toLowerCase()==='input'){if(firstField.type==="checkbox"||firstField.type==="radio"){firstField.up().triggerEvent('click');}else{firstField.triggerEvent('keyup');}}else{firstField.triggerEvent('change');}}}else if(["address","combined","datetime","time"].include(type)){if($('id_'+field).readAttribute('data-type')==='control_mixed'){$('id_'+field).select('.jfField').each(function(el){if(el.readAttribute('data-type')==='mixed-dropdown'){var dropdownID=el.querySelector('select').id;if(el.querySelector('input')){el.querySelector('input').value=(dropdownID in JotForm.defaultValues)?JotForm.defaultValues[dropdownID]:"";}}})}else{$('id_'+field).select('input').each(function(el){el.value=(el.id in JotForm.defaultValues)?JotForm.defaultValues[el.id]:"";});}
|
437 |
+
$('id_'+field).select('select').each(function(el){if(el.id in JotForm.defaultValues){el.value=JotForm.defaultValues[el.id];}else{el.selectedIndex=0;}});var triggerMe=$('input_'+field)?$('input_'+field):$('id_'+field).select('input').first();if(triggerMe&&triggerMe.triggerEvent){triggerMe.triggerEvent('keyup');}
|
438 |
+
if($('input_'+field+'_full')&&$('input_'+field+'_full').readAttribute("data-masked")=="true"){JotForm.setQuestionMasking("#input_"+field+"_full","textMasking",$('input_'+field+'_full').readAttribute("maskValue"));}}else if(["braintree","stripe","paypalpro","authnet"].include(type)){$('id_'+field).select('input[type="text"], .form-address-country').each(function(el){el.value=(el.id in JotForm.defaultValues)?JotForm.defaultValues[el.id]:"";});}else if(type==="html"){try{$('id_'+field).select(".replaceTag").each(function(span){var def=span.readAttribute("default");span.update(def);});}catch(e){console.log(e);}}else if(type=="textarea"){$('input_'+field).value=defaultValue;if($('input_'+field).triggerEvent&&!dontTrigger)$('input_'+field).triggerEvent("keyup");if($('input_'+field).showCustomPlaceHolder){$('input_'+field).showCustomPlaceHolder();}
|
439 |
+
var richArea=$("id_"+field).down('.nicEdit-main');if(richArea){richArea.innerHTML=defaultValue;if($('input_'+field).hasClassName('custom-hint-group')&&!$('input_'+field).hasContent){richArea.setStyle({'color':'#babbc0'});}}}else{if(type=="checkbox"||type=="radio"){$("id_"+field).select('input[type="radio"], input[type="checkbox"]').each(function(input){if(input.id in JotForm.defaultValues){input.checked=true;}else{input.checked=false;}});if($('id_'+field).triggerEvent&&!dontTrigger)$('id_'+field).triggerEvent('click');}else if(type=="select"){if($('input_'+field)){$('input_'+field).value=defaultValue;if($('input_'+field).triggerEvent&&!dontTrigger)$('input_'+field).triggerEvent('change');}else{$("id_"+field).select('select').each(function(element){if(element.readAttribute('data-component')!=='mixed-dropdown'){element.value='';if(element.triggerEvent&&!dontTrigger)element.triggerEvent('change');}});}}else if($('input_'+field)){$('input_'+field).value=defaultValue;if($('input_'+field).triggerEvent&&!dontTrigger){if(type=="widget"){var widgetEl=$('input_'+field);widgetEl.fire('widget:clear',{qid:parseInt(widgetEl.id.split('_')[1])});widgetEl.triggerEvent('change');}else{$('input_'+field).triggerEvent('keyup');}}
|
440 |
+
if(defaultValue===""&&$('input_'+field).hintClear){$('input_'+field).hintClear();}
|
441 |
+
if($('input_'+field).readAttribute("data-masked")=="true"){JotForm.setQuestionMasking("#input_"+field,"textMasking",$('input_'+field).readAttribute("maskValue"));}
|
442 |
+
if($('input_'+field).hasClassName("form-star-rating")&&$('input_'+field).setRating){$('input_'+field).setRating(0);}}}},checkValueByOperator:function(operator,condValueOrg,fieldValueOrg){try{if(typeof condValueOrg=="string"&&condValueOrg.indexOf("{")>-1&&condValueOrg.indexOf("}")>-1){condValueOrg=condValueOrg.replace(/\{.*?\}/gi,function(match,contents,offset,s){var stripped=match.replace(/[\{\}]/g,"");var elements=$$('input[name$="_'+stripped+'"]');if(elements.length>0){var element=elements.first();if(element&&element.value){return element.value;}}
|
443 |
+
return match;});}}catch(e){console.log(e);}
|
444 |
+
var fieldValue=Object.isBoolean(fieldValueOrg)?fieldValueOrg:fieldValueOrg.toString().strip().toLowerCase();var condValue=Object.isBoolean(condValueOrg)?condValueOrg:condValueOrg.toString().strip().toLowerCase();switch(operator){case"equals":case"quantityEquals":case"equalDate":return fieldValue==condValue;case"equalDay":return JotForm.getDayOfWeek(fieldValue)==condValue;case"notEquals":case"notEqualDate":case"quantityNotEquals":return fieldValue!=condValue;case"notEqualDay":return JotForm.getDayOfWeek(fieldValue)!=condValue;case"endsWith":return fieldValue.endsWith(condValue);case"notEndsWith":return!fieldValue.endsWith(condValue);case"startsWith":return fieldValue.startsWith(condValue);case"notStartsWith":return!fieldValue.startsWith(condValue);case"contains":condValues=condValue.split(",");return $A(condValues).any(function(cv){return fieldValue.include(cv.replace(/^\s+|\s+$/g,''));});case"notContains":condValues=condValue.split(",");return!$A(condValues).any(function(cv){return fieldValue.include(cv.replace(/^\s+|\s+$/g,''));});case"greaterThan":case"quantityGreater":return(parseFloat(fieldValue,10)||0)>(parseFloat(condValue,10)||0);case"lessThan":case"quantityLess":if(fieldValue.length){return(parseFloat(fieldValue,10)||0)<(parseFloat(condValue,10)||0);}else{return false;}
|
445 |
+
case"isEmpty":if(Object.isBoolean(fieldValue)){return!fieldValue;}
|
446 |
+
return fieldValue.empty();case"isFilled":if(Object.isBoolean(fieldValue)){return fieldValue;}
|
447 |
+
return!fieldValue.empty();case"before":return fieldValueOrg<condValueOrg;case"after":return fieldValueOrg>condValueOrg;default:JotForm.error("Could not find this operator",operator);}
|
448 |
+
return false;},getDayOfWeek:function(date){date=new Date(date);var days=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];return days[date.getDay()];},typeCache:{},getInputType:function(id){if(JotForm.typeCache[id]){return JotForm.typeCache[id];}
|
449 |
+
if(typeof id==='string'&&id.indexOf('|')>-1){var tempField=id.split('|');id=tempField[0]+'_field_'+tempField[1];}
|
450 |
+
var type="other";if($('id_'+id)&&$('id_'+id).readAttribute('data-type')=="control_text"){type='html';}else if($('input_'+id+'_pick')||($('id_'+id)&&$('id_'+id).readAttribute('data-type')=="control_datetime")){type='datetime';}else if($('input_'+id)){type=$('input_'+id).nodeName.toLowerCase()=='input'?$('input_'+id).readAttribute('type').toLowerCase():$('input_'+id).nodeName.toLowerCase();if($('input_'+id).hasClassName("form-radio-other-input")){type="radio";}
|
451 |
+
if($('input_'+id).hasClassName("js-forMixed")){type="mixed";}
|
452 |
+
if($('input_'+id).hasClassName("form-checkbox-other-input")){type="checkbox";}
|
453 |
+
if($('input_'+id).hasClassName('form-autocomplete')){type="autocomplete";}
|
454 |
+
if($$('#id_'+id+' .pad').length>0){type='signature';}
|
455 |
+
if($('input_'+id).hasClassName('form-slider')){type='slider';}
|
456 |
+
if($('input_'+id).hasClassName('form-widget')){type='widget';}
|
457 |
+
if($('input_'+id).hasClassName('form-star-rating')){type="rating";}}else if($('input_'+id+'_month')){type='birthdate';}else if($('input_'+id+'_hourSelect')){type='time';}else if($("cid_"+id)&&$("cid_"+id).getAttribute("data-type")=="control_collapse"){return'collapse';}else if($$('#id_'+id+' .form-product-item').length>0){type=$$('#id_'+id+' .form-product-item')[0].select('input')[0].readAttribute('type').toLowerCase();}else if($$('#id_'+id+' .form-address-table').length>0){type='address';}else if($$('input[id^=input_'+id+'_]')[0]&&$$('input[id^=input_'+id+'_]')[0].hasClassName('form-grading-input')){type='grading';}else{if($$('#id_'+id+' input')[0]){type=$$('#id_'+id+' input')[0].readAttribute('type').toLowerCase();if(type=="text"||type=='tel'||type==='number'){type="combined";}}else if($$('#id_'+id+' select')[0]){type="select";}}
|
458 |
+
JotForm.typeCache[id]=type;return type;},strToDate:function(str){var invalid=new Date(undefined);var match=/(\d{4})\-(\d{2})-(\d{2})T?(\d{2})?\:?(\d{2})?/gim;if(str.empty()){return invalid;}
|
459 |
+
if(!match.test(str)){return invalid;}
|
460 |
+
var d=new Date();str.replace(match,function(all,year,month,day,hour,minutes){if(hour){d=new Date(parseInt(year,10),parseInt(month,10)-1,parseInt(day,10),parseInt(hour,10),parseInt(minutes,10));}else{d=new Date(parseInt(year,10),parseInt(month,10)-1,parseInt(day,10));}
|
461 |
+
return all;});return d;},getBirthDate:function(id){var day=$('input_'+id+'_day').getValue()||"%empty%";var month=$('input_'+id+'_month').selectedIndex||"%empty%";month=String(month);var year=$('input_'+id+'_year').getValue()||"%empty%";var date=year+"-"+(month.length==1?'0'+month:month)+"-"+(day.length==1?'0'+day:day);if(date.include("%empty%"))return"";return date;},get24HourTime:function(id){var hour=$('input_'+id+'_hourSelect').getValue();if(hour=="")return"";var minute=$('input_'+id+'_minuteSelect').getValue();if(minute.length==0)minute="00";var ampm=($('input_'+id+'_ampm'))?$('input_'+id+'_ampm').getValue():'';hour=Number(hour);if(ampm=='PM'&&hour!=12){hour+=12;}else if(ampm=='AM'&&hour==12){hour=0;}
|
462 |
+
hour=(hour<10)?"0"+hour:String(hour);return hour+minute;},getDateValue:function(id){var date="";if($('year_'+id)){date+=($('year_'+id).value||"%empty%");}
|
463 |
+
if($('month_'+id)){var mm=$('month_'+id).value?($('month_'+id).value.length>1?$('month_'+id).value:"0"+$('month_'+id).value):"%empty%";date+="-"+mm;}
|
464 |
+
if($('day_'+id)){var dd=$('day_'+id).value?($('day_'+id).value.length>1?$('day_'+id).value:"0"+$('day_'+id).value):"%empty%";date+="-"+dd;}
|
465 |
+
if(date.include("%empty%")){JotForm.info("Wrong date: "+date);return"";}
|
466 |
+
var h="";if($('ampm_'+id)){if($('hour_'+id)){h=$('hour_'+id).value;if($('ampm_'+id).value=='pm'){h=parseInt(h,10)+12;}
|
467 |
+
if(h=="24"){h=0;}
|
468 |
+
date+="T"+((h.length==1?"0"+h:h)||"00");}}else{if($('hour_'+id)){h=$('hour_'+id).value;date+="T"+((h.length==1?"0"+h:h)||"00");}}
|
469 |
+
if($('min_'+id)){date+=":"+($('min_'+id).value||"00");}
|
470 |
+
if(h===""){date+="T00:00";}
|
471 |
+
return date;},hidePages:{},checkCondition:function(condition){var any=false,all=true;var filled;var anyCalculationForMultiInput={notEquals:[],equals:[],equalsCount:0,notEqualsCount:0};$A(condition.terms).each(function(term){var value;var anotherField=JotForm.getFieldIdFromFieldRef(term.value);term.field=String(term.field);try{var fieldType=JotForm.getInputType(term.field);switch(fieldType){case"combined":if(['isEmpty','isFilled'].include(term.operator)){filled=$$('#id_'+term.field+' input').collect(function(e){return e.value;}).any();if(JotForm.checkValueByOperator(term.operator,term.value,filled)){any=true;}else{all=false;}
|
472 |
+
return;}else{value=$$('#id_'+term.field+' input').collect(function(e){return e.value;});if(JotForm.checkValueByOperator(term.operator,term.value,value)){any=true;}else{all=false;}}
|
473 |
+
break;case"address":if(['isEmpty','isFilled'].include(term.operator)){filled=$$('#id_'+term.field+' input').collect(function(e){return e.value;}).any();if(JotForm.checkValueByOperator(term.operator,term.value,filled)){any=true;}else{all=false;}}else{var option;var termValue=term.value;if(anotherField){termValue=$('input_'+anotherField+'_country').value;}
|
474 |
+
$('input_'+term.field+'_country').select("option").each(function(opt){if(termValue===opt.value){option=opt;throw $break;}});if(option){if(term.operator=='equalCountry'){if(option.selected){any=true;}else{all=false;}}else if(term.operator=='notEqualCountry'){if(!option.selected){any=true;}else{all=false;}}}}
|
475 |
+
break;case"birthdate":case"datetime":value=(fieldType=="datetime")?JotForm.getDateValue(term.field):JotForm.getBirthDate(term.field);if(value===undefined){return;}
|
476 |
+
if(['isEmpty','isFilled'].include(term.operator)){if(JotForm.checkValueByOperator(term.operator,term.value,value)){any=true;}else{all=false;}}else{var termValue=term.value;termValue=term.value.toLowerCase().replace(/\s/g,"");if(termValue.indexOf('today')>-1){var offset=parseInt(termValue.split('today')[1])||0;var comparativeDate=new Date();comparativeDate.setDate(comparativeDate.getDate()+offset);var year=comparativeDate.getFullYear();var month=comparativeDate.getMonth()+1;month=(month<10)?'0'+month:month;var day=comparativeDate.getDate();day=(day<10)?'0'+day:day;termValue=year+"-"+month+"-"+day;}else if(anotherField){var year=$("year_"+anotherField).value;var month=$("month_"+anotherField).value;var day=$("day_"+anotherField).value;if(term.operator==="equalDay"||term.operator==="notEqualDay"){termValue=JotForm.getDayOfWeek(JotForm.strToDate(year+"-"+month+"-"+day));}else{termValue=year+"-"+month+"-"+day;}}
|
477 |
+
if(['equalDate','notEqualDate','after'].include(term.operator)){if(JotForm.checkValueByOperator(term.operator,JotForm.strToDate(termValue),JotForm.strToDate(value.split('T')[0]))){any=true;}else{all=false;}}else if(['equalDay','notEqualDay'].include(term.operator)){if(JotForm.checkValueByOperator(term.operator,termValue,JotForm.strToDate(value))){any=true;}else{all=false;}}else{if(JotForm.checkValueByOperator(term.operator,JotForm.strToDate(termValue),JotForm.strToDate(value))){any=true;}else{all=false;}}}
|
478 |
+
break;case"time":value=JotForm.get24HourTime(term.field);var termValue=(!term.value)?"":term.value.replace(/:/,"");if(anotherField){termValue=JotForm.get24HourTime(anotherField);}
|
479 |
+
if(termValue.length==3)termValue="0"+termValue;if(term.operator=='before'&&value.empty()){all=false;}else{if(JotForm.checkValueByOperator(term.operator,termValue,value))
|
480 |
+
any=true;else
|
481 |
+
all=false;}
|
482 |
+
break;case"checkbox":case"radio":if(['isEmpty','isFilled'].include(term.operator)){filled=$$('#id_'+term.field+' input').collect(function(e){return e.checked;}).any();if(JotForm.checkValueByOperator(term.operator,term.value,filled)){any=true;}else{all=false;}
|
483 |
+
return;}
|
484 |
+
if(term.value)term.value=term.value.replace(/&/g,'&').replace(/>/g,'>').replace(/</g,'<');if(['lessThan','greaterThan'].include(term.operator)){var localResult=false;$$('#id_'+term.field+' input').each(function(input){value=input.checked?input.value:'';if(JotForm.checkValueByOperator(term.operator,term.value,value)){any=true;localResult=true;}});if(!localResult)all=false;return;}
|
485 |
+
var otherValue=$('id_'+term.field).down(".form-"+fieldType+"-other-input")?$('id_'+term.field).down(".form-"+fieldType+"-other-input").getAttribute('data-otherhint'):"";if(term.operator=='notEquals'||term.operator=='equals'){anyCalculationForMultiInput[term.operator+'Count']++;}
|
486 |
+
$$('#id_'+term.field+' input').each(function(input){if(input.hasClassName('form-'+fieldType+'-other')&&input.checked){value='-- '+otherValue+' --';}else{value=input.checked?input.value:'';value=value.replace(/_expanded/,'');}
|
487 |
+
var termValue=term.value.strip();var checkResult=JotForm.checkValueByOperator(term.operator,termValue,value);if(term.operator=='notEquals'||term.operator=='equals'){anyCalculationForMultiInput[term.operator].push(checkResult)}
|
488 |
+
if(checkResult){any=true;}else{if(term.operator=='notEquals'&&termValue==value){all=false;if(condition.link.toLowerCase()=='all'){throw $break;}}else if(input.value==termValue||(input.hasClassName('form-'+fieldType+'-other')&&termValue=='-- '+otherValue+' --')){all=false;}}});break;case"select":if(term.value){term.value=term.value.replace(/&/g,'&');}
|
489 |
+
var tempInput='';if(term.field.indexOf('|')>-1){var tempSplit=term.field.split('|');tempInput='input_'+tempSplit[0]+'_field_'+tempSplit[1];}else{tempInput='input_'+term.field;}
|
490 |
+
if($(tempInput)&&$(tempInput).multiple){if(term.operator=='equals'){var option=$(tempInput).select('option[value='+term.value+']');if(option.length>0&&option[0].selected){any=true;}else{all=false;}}else if(term.operator=='notEquals'){var option=$(tempInput).select('option[value='+term.value+']');if(option.length>0&&!option[0].selected){any=true;}else{all=false;}}else if(['isEmpty','isFilled'].include(term.operator)){var selected=false;var arr=$(tempInput).options;for(var i=0;i<arr.length;i++){if(!arr[i].value.empty()&&arr[i].selected==true){selected=true;}}
|
491 |
+
if(term.operator=='isEmpty'){if(!selected)any=true;else all=false;}
|
492 |
+
if(term.operator=='isFilled'){if(selected)any=true;else all=false;}}}else if($(tempInput)){value=$(tempInput).value;if(value===undefined){return;}
|
493 |
+
if(JotForm.checkValueByOperator(term.operator,term.value,value)){any=true;}else{all=false;}}else{filled=$$('#id_'+term.field+' select').collect(function(e){return e.value;}).any();if(JotForm.checkValueByOperator(term.operator,term.value,filled)){any=true;}else{all=false;}}
|
494 |
+
break;case"grading":if(['isEmpty','isFilled'].include(term.operator)){filled=$$('input[id^=input_'+term.field+'_]').collect(function(e){return e.value;}).any();if(JotForm.checkValueByOperator(term.operator,term.value,filled)){any=true;}else{all=false;}}else{value=$('grade_point_'+term.field).innerHTML.stripTags();if(JotForm.checkValueByOperator(term.operator,term.value,value)){any=true;}else{all=false;}}
|
495 |
+
break;case"file":if($('id_'+term.field).select('.qq-uploader').length>0){value=$('id_'+term.field).select('.qq-upload-file').length>0;}else{if($('input_'+term.field).uploadMarked){value=$('input_'+term.field).uploadMarked;}else{value=$('input_'+term.field).value;}}
|
496 |
+
if(value===undefined){return;}
|
497 |
+
if(JotForm.checkValueByOperator(term.operator,term.value,value,term.field)){any=true;}else{all=false;}
|
498 |
+
break;case"textarea":value=$('input_'+term.field).value;if($('input_'+term.field).hinted||$('input_'+term.field).hasClassName('form-custom-hint')){value="";}
|
499 |
+
if(value===undefined){return;}
|
500 |
+
var rich=$('id_'+term.field).down('.nicEdit-main');if(rich){value=value.stripTags().replace(/\s/g,' ').replace(/ /g,' ');}
|
501 |
+
if(JotForm.checkValueByOperator(term.operator,term.value,value,term.field)){any=true;}else{all=false;}
|
502 |
+
break;case"widget":value=$('input_'+term.field).value;if(value===undefined){return;}
|
503 |
+
if(value.indexOf("widget_metadata")>-1){try{value=JSON.parse(value).widget_metadata.value;var matchingItem=false;for(var i=0;i<value.length;i++){var obj=value[i];for(var item in obj){if(JotForm.checkValueByOperator(term.operator,term.value,obj[item],term.field)){any=true;matchingItem=true;}}}
|
504 |
+
if(!matchingItem)all=false;}catch(e){console.log(e);}}else{value=(term.operator==="greaterThan"||term.operator==="lessThan")&&typeof value==="string"?value.replace(/,/g,''):value;if(JotForm.checkValueByOperator(term.operator,term.value,value,term.field)){any=true;}else{all=false;}}
|
505 |
+
break;case"hidden":if($('input_'+term.field+"_donation")){value=$('input_'+term.field+"_donation").value;}else{value=$('input_'+term.field).value;}
|
506 |
+
if(JotForm.checkValueByOperator(term.operator,term.value,value,term.field)){any=true;}else{all=false;}
|
507 |
+
break;case"rating":value=$('input_'+term.field).value||'';if(JotForm.checkValueByOperator(term.operator,term.value,value,term.field)){any=true;}else{all=false;}
|
508 |
+
break;default:var tempInput='';if(term.field.indexOf('|')>-1){var tempSplit=term.field.split('|');tempInput='input_'+tempSplit[0]+'_field_'+tempSplit[1];}else{tempInput='input_'+term.field;}
|
509 |
+
if(!$(tempInput)){return;}
|
510 |
+
value=$(tempInput).value;if($(tempInput).hinted){value="";}
|
511 |
+
if(value===undefined){return;}
|
512 |
+
if(JotForm.checkValueByOperator(term.operator,term.value,value,term.field)){any=true;}else{all=false;}}}catch(e){JotForm.error(e);}});if(condition.link.toLowerCase()=='any'&&any){if(condition.terms.length==anyCalculationForMultiInput.notEqualsCount+anyCalculationForMultiInput.equalsCount){anyLengthNotEquals=anyCalculationForMultiInput.notEquals.reduce(function(prev,curr){if(!curr)prev++;return prev;},0);anyLengthEquals=anyCalculationForMultiInput.equals.reduce(function(prev,curr){if(curr)prev++;return prev;},0);if((anyCalculationForMultiInput.equalsCount&&!anyLengthEquals)||(anyCalculationForMultiInput.notEqualsCount&&anyLengthNotEquals&&anyLengthNotEquals===anyCalculationForMultiInput.notEqualsCount)){any=false;}}}
|
513 |
+
var conditionInfiniteLoop=function(){var timestamp=new Date().getTime();var msPart=timestamp%1000;if(msPart<500){msPart="0";}else{msPart="1";}
|
514 |
+
var secPart=parseInt(timestamp/1000);var antiLoopKey=condition.id+'-'+secPart+'-'+msPart;if(!("__antiConditionLoopCache"in window)){window.__antiConditionLoopCache={};}
|
515 |
+
if(antiLoopKey in window.__antiConditionLoopCache){window.__antiConditionLoopCache[antiLoopKey]++;if(window.__antiConditionLoopCache[antiLoopKey]>19){return true;}}else{window.__antiConditionLoopCache[antiLoopKey]=1;}
|
516 |
+
return false;}
|
517 |
+
if(conditionInfiniteLoop())return;if(condition.type=='field'){var isConditionValid=(condition.link.toLowerCase()=='any'&&any)||(condition.link.toLowerCase()=='all'&&all);if(condition.disabled==true)return;condition.action.each(function(action){var matchingTermAction=condition.terms.any(function(term){return term.field==action.field;});if(isConditionValid){action.currentlyTrue=true;if(action.visibility.toLowerCase()=='show'){JotForm.showField(action.field);}else if(action.visibility.toLowerCase()=='hide'){JotForm.hideField(action.field,false,matchingTermAction);}else if(action.visibility.toLowerCase()=='showmultiple'&&action.fields){action.fields.each(function(field){JotForm.showField(field,true);});}else if(action.visibility.toLowerCase()=='hidemultiple'&&action.fields){action.fields.each(function(field){JotForm.hideField(field,true,matchingTermAction);});}}else{action.currentlyTrue=false;if(action.visibility.toLowerCase()=='show'){JotForm.hideField(action.field,false,matchingTermAction);}else if(action.visibility.toLowerCase()=='hide'){JotForm.showField(action.field);}else if(action.visibility.toLowerCase()=='showmultiple'&&action.fields){action.fields.each(function(field){JotForm.hideField(field,true,matchingTermAction);});}else if(action.visibility.toLowerCase()=='hidemultiple'&&action.fields){action.fields.each(function(field){JotForm.showField(field,true);});}}
|
518 |
+
if(window.FORM_MODE!=='cardform')JotForm.iframeHeightCaller();if($('section_'+action.field)||('fields'in action)){JotForm.runAllCalculations(true);}
|
519 |
+
if($('input_'+action.field)&&$('input_'+action.field).triggerEvent){if(!matchingTermAction&&$('input_'+action.field).className.indexOf("-other-")<0){$('input_'+action.field).triggerEvent('keyup');}}});}else if(condition.type=='require'){var isConditionValid=(condition.link.toLowerCase()=='any'&&any)||(condition.link.toLowerCase()=='all'&&all);condition.action.each(function(action){action.currentlyTrue=isConditionValid;if(action.visibility.toLowerCase()=='require'){JotForm.requireField(action.field,isConditionValid);}else if(action.visibility.toLowerCase()=='unrequire'){JotForm.requireField(action.field,!isConditionValid);}else if(action.visibility.toLowerCase()=='requiremultiple'&&action.fields){action.fields.each(function(field){JotForm.requireField(field,isConditionValid);});}else if(action.visibility.toLowerCase()=='unrequiremultiple'&&action.fields){action.fields.each(function(field){JotForm.requireField(field,!isConditionValid);});}else if(action.visibility.toLowerCase()=='enable'){JotForm.enableDisableField(action.field,isConditionValid);}else if(action.visibility.toLowerCase()=='disable'){JotForm.enableDisableField(action.field,!isConditionValid);}else if(action.visibility.toLowerCase()=='disablesubmit'){JotForm.disableSubmitForCard(action,isConditionValid);}});}else if(condition.type=='mask'){try{condition.action.each(function(action){if((condition.link.toLowerCase()=='any'&&any)||(condition.link.toLowerCase()=='all'&&all)){condition.conditionTrue=true;JotForm.setQuestionMasking("#input_"+action.field,"textMasking",action.mask);$("input_"+action.field).writeAttribute('masked',"true");}else{condition.conditionTrue=false;var removeMask=true;$A(JotForm.conditions).each(function(cond){if(cond.disabled==true)return;if(cond.type!=='mask')return;if(!cond.conditionTrue)return;$A(cond.action).each(function(act){if(act.field==action.field){removeMask=false;}});});if(removeMask){JotForm.setQuestionMasking("#input_"+action.field,"","",true);$("input_"+action.field).writeAttribute('masked',"false");}}});}catch(error){console.log(error);}}else if(condition.type=='calculation'){var tempResultField=condition.action[0].resultField;var tempInput=$("id_"+tempResultField);if(tempResultField.indexOf('|')>-1){var slicedQid=tempResultField.split('|');var qid=slicedQid[0];var fieldId=slicedQid[1];tempResultField='input_'+qid+'_field_'+fieldId;tempInput=$(tempResultField);}
|
520 |
+
if(!tempInput){return;}
|
521 |
+
var calcs=JotForm.calculations;var cond=null;for(var i=0;i<calcs.length;i++){if(calcs[i].conditionId===condition.id){calc=calcs[i];}}
|
522 |
+
if((condition.link.toLowerCase()=='any'&&any)||(condition.link.toLowerCase()=='all'&&all)){calc.conditionTrue=true;if(JotForm.ignoreInsertionCondition)return;JotForm.checkCalculation(calc);}else{calc.conditionTrue=false;if(JotForm.ignoreInsertionCondition)return;setTimeout(function(calc){var matchForThisResult={};var subfield;for(var i=0;i<calcs.length;i++){if((condition.action[0].resultField==calcs[i].resultField&&calcs[i].hasOwnProperty('conditionTrue')&&calcs[i].conditionTrue)&&!(JotForm.getInputType(condition.action[0].resultField)==="html"&&condition.action[0].replaceText!==calcs[i].replaceText)){subfield=calcs[i].resultSubField||"";matchForThisResult[calcs[i].resultField+subfield]=true;}}
|
523 |
+
subfield="resultSubField"in condition.action[0]?condition.action[0].resultSubField:"";if(!matchForThisResult[condition.action[0].resultField+subfield]){try{var dontTrigger=condition.terms.map(function(term){return term.field===condition.action[0].resultField;}).any();if(!dontTrigger){dontTrigger=condition.action[0].operands&&condition.action[0].operands.split(',').include(condition.action[0].resultField);}
|
524 |
+
var toBeClearField=condition.action[0].resultField;JotForm.clearField(toBeClearField,subfield,dontTrigger);if(typeof window.__antiLoopCache==="object"&&toBeClearField in window.__antiLoopCache){delete window.__antiLoopCache[toBeClearField];}}catch(e){console.log(e);}}},50,calc);}}else if(condition.type=='url'){return(condition.link.toLowerCase()=='any'&&any)||(condition.link.toLowerCase()=='all'&&all);}else{if($A(condition.action).length>0&&condition.action.first().skipHide==='hidePage'){var action=condition.action.first();if(window.FORM_MODE=='cardform'){if((condition.link.toLowerCase()=='any'&&any)||(condition.link.toLowerCase()=='all'&&all)){JotForm.hideField(action.skipTo);}else{JotForm.showField(action.skipTo);}}else{if((condition.link.toLowerCase()=='any'&&any)||(condition.link.toLowerCase()=='all'&&all)){JotForm.hidePages[parseInt(action.skipTo.replace('page-',''),10)]=true;}else{JotForm.hidePages[parseInt(action.skipTo.replace('page-',''),10)]=false;}}
|
525 |
+
return;}
|
526 |
+
if(JotForm.nextPage){return;}
|
527 |
+
if((condition.link.toLowerCase()=='any'&&any)||(condition.link.toLowerCase()=='all'&&all)){var action=condition.action[0];var sections;if(window.FORM_MODE=='cardform'){sections=$$('.form-all > .form-line');}else{sections=$$('.form-all > .page-section');}
|
528 |
+
if(window.FORM_MODE=='cardform'){if(action.skipTo=='end'){JotForm.nextPage=sections[sections.length-1];}else{try{var allQuestions=window.CardLayout.layoutParams.allQuestions;var nextQuestionIndex=allQuestions.findIndex(function(q){return(q.id===action.skipTo||q.id===action.skipTo.replace('page-',''));});for(var i=nextQuestionIndex;i<allQuestions.length;i++){if(allQuestions[nextQuestionIndex]&&allQuestions[nextQuestionIndex].type==='control_head'){nextQuestionIndex++;}}
|
529 |
+
action.skipTo=allQuestions[nextQuestionIndex].id;var next=sections.find(function(section){return section.id==='id_'+action.skipTo;});if(next){JotForm.nextPage=sections.find(function(section){return section.id==='id_'+action.skipTo;});JotForm.prevPage=sections.find(function(section){return section.className.indexOf('form-line-active')>-1;});}}catch(error){console.log(error);}}}else{if(action.skipTo=='end'){JotForm.nextPage=sections[sections.length-1];}else{JotForm.nextPage=sections[parseInt(action.skipTo.replace('page-',''),10)-1];}}}else{JotForm.info('Fail: Skip To: page-'+JotForm.currentPage+1);JotForm.nextPage=false;}}
|
530 |
+
if(JotForm.nextPage&&JotForm.isEditMode()){if(window.FORM_MODE!=='cardform'){var currentPageIndex=$$('.page-section').indexOf(JotForm.currentSection);var skipCondition=function(){if(condition.link.toLowerCase()=='any'){return condition.terms.every(function(term){return $$('.page-section').indexOf($('id_'+term.field).up('.page-section'))>currentPageIndex;});}
|
531 |
+
return condition.terms.some(function(term){return $$('.page-section').indexOf($('id_'+term.field).up('.page-section'))>currentPageIndex;});}
|
532 |
+
JotForm.nextPage=skipCondition()?false:JotForm.nextPage;}}
|
533 |
+
JotForm.enableDisableButtonsInMultiForms();},currentPage:false,nextPage:false,previousPage:false,fieldConditions:{},setFieldConditions:function(field,event,condition){var tempField='';if(field.indexOf('|')>-1){var fieldSplit=field.split('|');tempField=fieldSplit[0]+'_field_'+fieldSplit[1];}else{tempField=field;}
|
534 |
+
if(!JotForm.fieldConditions[tempField]){JotForm.fieldConditions[tempField]={event:event,conditions:[]};}
|
535 |
+
JotForm.fieldConditions[tempField].conditions.push(condition);},widgetsAsCalculationOperands:[],requireField:function(qid,req){if(!$('id_'+qid))return;if(JotForm.otherConditionTrue(qid,req?'unrequire':'require'))return;$$('#id_'+qid+' input, #id_'+qid+' textarea, #id_'+qid+' select').each(function(el){if(el.id==='coupon-input'||(el.type==='hidden'&&!el.up('.form-star-rating')&&!el.hasClassName('form-widget'))||el.hasClassName('form-checkbox-other-input')||el.hasClassName('form-radio-other-input')||el.hasClassName('jfModal-input')||$A(['prefix','middle','suffix','addr_line2']).any(function(name){return el.name.indexOf("["+name+"]")>-1;})||el.hasClassName('jfDropdown-search')){return;}
|
536 |
+
var validations=[];if(el.className.indexOf('validate[')>-1){validations=el.className.substr(el.className.indexOf('validate[')+9);validations=validations.substr(0,validations.indexOf(']')).split(/\s*,\s*/);}else{validations=[];}
|
537 |
+
if(JotForm.getInputType(qid)=="file"&&el.getAttribute("multiple")=="multiple"&&el.up('[class*=validate[multipleUpload]]')){var uploadWrapper=el.up('[class*=validate[multipleUpload]]');uploadWrapper.className=uploadWrapper.className.replace(/validate\[required\]/gi,'');if(req){uploadWrapper.addClassName("validate[required]");}else{uploadWrapper.removeClassName("form-validation-error");}}
|
538 |
+
el.className=el.className.replace(/validate\[.*\]/,'');for(var i=validations.length-1;i>=0;i--){if(validations[i]==='required'){validations.splice(i,1);}}
|
539 |
+
if(req){validations.push('required');if(el.hasClassName('form-widget')){el.addClassName('widget-required');}}else{el.removeClassName('form-validation-error');el.removeClassName('widget-required');}
|
540 |
+
if(validations.length>0){el.addClassName('validate['+validations.join(',')+']');}
|
541 |
+
JotForm.setFieldValidation(el);});if($$('div.pad#sig_pad_'+qid)[0]){$$('div.pad#sig_pad_'+qid)[0].setAttribute('data-required',req);}
|
542 |
+
if(req){if($('label_'+qid)&&!$('label_'+qid).down('.form-required')){$('label_'+qid).insert('<span class="form-required">*</span>');}}else{if($('label_'+qid)&&$('label_'+qid).down('.form-required')){$('label_'+qid).down('.form-required').remove();}
|
543 |
+
if($("id_"+qid).down('.form-error-message')){$("id_"+qid).down('.form-error-message').remove();}
|
544 |
+
$("id_"+qid).removeClassName('form-line-error');if($$('.form-line-error').length==0){JotForm.hideButtonMessage();}}},enableDisableField:function(qid,enable){if(!$('id_'+qid))return;try{$('id_'+qid).select("input, textarea, select, button").each(function(input){if(enable){input.removeClassName("conditionallyDisabled");if(!JotForm.isEditMode()){input.enable();return;}
|
545 |
+
switch(input.tagName){case'SELECT':$$('#'+input.id+' > option').each(function(opt){opt.enable();});break;default:input.removeAttribute('readonly');input.enable();break;}
|
546 |
+
return;}
|
547 |
+
input.addClassName("conditionallyDisabled");if(!JotForm.isEditMode()){input.disable();return;}
|
548 |
+
switch(input.tagName){case'SELECT':$$('#'+input.id+' > option:not(:selected)').each(function(opt){opt.disable();});break;case'INPUT':if((['checkbox','radio'].include(input.type)&&!input.checked)||input.type==='file'||(['year_'+qid,'month_'+qid,'day_'+qid,'lite_mode_'+qid]).include(input.id))
|
549 |
+
{input.disable();}
|
550 |
+
default:input.setAttribute('readonly','');break;}});}catch(e){console.log(e);}},triggerWidgetCalculation:function(id){if(JotForm.widgetsAsCalculationOperands.include(id)){if(document.createEvent){var evt=document.createEvent('HTMLEvents');evt.initEvent('change',true,true);$('input_'+id).dispatchEvent(evt);}else if($('input_'+id).fireEvent){return $('input_'+id).fireEvent('onchange');}}},setCalculationResultReadOnly:function(){$A(JotForm.calculations).each(function(calc,index){if((calc.readOnly&&calc.readOnly!="0")&&$('input_'+calc.resultField)!=null){$('input_'+calc.resultField).setAttribute('readOnly','true');}});},setCalculationEvents:function(){var setCalculationListener=function(el,ev,calc){$(el).observe(ev,function(){if(ev==="paste"){setTimeout(function(){el.addClassName('calculatedOperand');JotForm.checkCalculation(calc);},10);}else{el.addClassName('calculatedOperand');JotForm.checkCalculation(calc);}});};$A(JotForm.calculations).each(function(calc,index){if(!calc.operands)return;var ops=calc.operands.split(',');for(var i=0;i<ops.length;i++){var opField=ops[i];var mixedOpField='';if(opField.indexOf('|')>-1){mixedOpField='input_'+opField.split('|')[0]+'_field_'+opField.split('|')[1];}
|
551 |
+
if(!opField||opField.empty()||(!$('id_'+opField)&&!$(mixedOpField)))continue;var type=JotForm.calculationType(opField),ev;switch(type){case"mixed":setCalculationListener($(mixedOpField),'change',calc,index);setCalculationListener($(mixedOpField),'blur',calc,index);setCalculationListener($(mixedOpField),'keyup',calc,index);setCalculationListener($(mixedOpField),'paste',calc,index);break;case"widget":setCalculationListener($('id_'+opField),'change',calc);JotForm.widgetsAsCalculationOperands.push(opField);break;case'radio':case'checkbox':setCalculationListener($('id_'+opField),'click',calc);if($('input_'+opField)){setCalculationListener($('id_'+opField),'keyup',calc);}
|
552 |
+
break;case'select':case'file':if(Protoplus&&Protoplus.getIEVersion&&Protoplus.getIEVersion()==8){setCalculationListener($('id_'+opField),'click',calc);}else{setCalculationListener($('id_'+opField),'change',calc);}
|
553 |
+
break;case'datetime':setCalculationListener($('id_'+opField),'date:changed',calc);$$("#id_"+opField+' select').each(function(el){setCalculationListener($(el),'change',calc);});break;case'time':case'birthdate':$$("#id_"+opField+' select').each(function(el){setCalculationListener($(el),'change',calc,index);});break;case'address':setCalculationListener($('id_'+opField),'change',calc,index);setCalculationListener($('id_'+opField),'blur',calc,index);setCalculationListener($('id_'+opField),'keyup',calc,index);$$("#id_"+opField+' select').each(function(el){setCalculationListener($(el),'change',calc,index);});break;case'number':setCalculationListener($('id_'+opField),'keyup',calc,index);setCalculationListener($('id_'+opField),'paste',calc,index);setCalculationListener($('id_'+opField),'click',calc,index);break;default:setCalculationListener($('id_'+opField),'change',calc,index);setCalculationListener($('id_'+opField),'blur',calc,index);setCalculationListener($('id_'+opField),'keyup',calc,index);setCalculationListener($('id_'+opField),'paste',calc,index);break;}}});},runAllCalculations:function(ignoreEditable,htmlOnly){$A(JotForm.calculations).each(function(calc,index){if(htmlOnly&&JotForm.getInputType(calc.resultField)!=="html")return;if(!(ignoreEditable&&(!calc.readOnly||calc.readOnly=="0"))&&!!calc.equation){JotForm.checkCalculation(calc);}});},calculationType:function(id){var paymentTypes=['control_stripe','control_stripeACH','control_stripeACHManual','control_paymill','control_payment','control_paymentwall','control_paypal','control_paypalexpress','control_paypalpro','control_clickbank','control_2co','control_googleco','control_worldpay','control_onebip','control_authnet','control_dwolla','control_braintree','control_square','control_boxpayment','control_eway','control_bluepay','control_firstdata','control_paypalInvoicing','control_payjunction','control_chargify','control_cardconnect','control_echeck','control_bluesnap','control_payu','control_pagseguro','control_moneris','control_sofort','control_skrill','control_payoneer','control_paysafe','control_gocardless','control_paypalSPB'];if($('id_'+id)&&$('id_'+id).readAttribute('data-type')&&paymentTypes.include($('id_'+id).readAttribute('data-type'))){return $('id_'+id).readAttribute('data-type').replace("control_","");}else if($('id_'+id)&&$('id_'+id).readAttribute('data-type')=='control_matrix'){return'matrix';}else{return JotForm.getInputType(id);}},checkCalculation:function(calc){if(!calc.resultField||(calc.hasOwnProperty('conditionTrue')&&!calc.conditionTrue)){return'';}
|
554 |
+
var result=calc.resultField;var mixedResult=false;if(result.indexOf('|')>-1){mixedResult='input_'+result.split('|')[0]+'_field_'+result.split('|')[1];}
|
555 |
+
var showBeforeInput=(calc.showBeforeInput&&calc.showBeforeInput!="0")?calc.showBeforeInput:false;var ignoreHidden=(calc.ignoreHiddenFields&&calc.ignoreHiddenFields!="0")?calc.ignoreHiddenFields:false;var useCommasForDecimals=(calc.useCommasForDecimals&&calc.useCommasForDecimals!="0")?calc.useCommasForDecimals:false;if(!$('id_'+result)&&!$(mixedResult))return;try{if(!['text','email','textarea','calculation','combined','address','datetime','time','html','authnet','paypalpro','number','radio','checkbox','select','matrix','widget','signature','braintree','stripe','square','eway','bluepay','firstdata','chargify','echeck','payu','pagseguro','moneris','paypal','dwolla','bluesnap','paymentwall','payment','paypalexpress','payjunction','2co','cardconnect','clickbank','onebip','worldpay','rating','hidden','file','other','mixed','sofort','payoneer','paysafe','gocardless','stripeACH','paypalSPB'].include(JotForm.calculationType(result)))return;}catch(e){console.log(e);}
|
556 |
+
var combinedObject={};var getValue=function(data,numeric){var subField="";if(data.indexOf("_")>-1){subField=data.substring(data.indexOf("_"));data=data.substring(0,data.indexOf("_"));}
|
557 |
+
var hasMixedTypeChar=false;if(data.indexOf("|")>-1){hasMixedTypeChar=true;}
|
558 |
+
if(hasMixedTypeChar==false){if(!$('id_'+data)){return'';}
|
559 |
+
if(!$('id_'+data).hasClassName('calculatedOperand')&&showBeforeInput)return'';if(ignoreHidden&&($('id_'+data).hasClassName("form-field-hidden")||($('id_'+data).up(".form-section")&&$('id_'+data).up(".form-section").hasClassName("form-field-hidden")))){return numeric?0:'';}}
|
560 |
+
var type=JotForm.calculationType(data);var val='';switch(type){case'matrix':if($("id_"+data).down('.form-radio')){$$('input[id^="input_'+data+subField+'_"]').each(function(radio){if(radio.checked){val=radio.readAttribute('data-calcvalue')?radio.readAttribute('data-calcvalue'):radio.value;}});}else{if($("input_"+data+subField)){if($("input_"+data+subField).type=="checkbox"){if($("input_"+data+subField).checked){var chk=$("input_"+data+subField);if(chk.readAttribute('data-calcvalue')){val=chk.readAttribute('data-calcvalue');}else{val=chk.value;}}}else{val=$("input_"+data+subField).value;}}}
|
561 |
+
break;case'mixed':var tempFieldId;var slicedQid;var fieldId;if(data.indexOf('|')>-1){slicedQid=data.split('|');questionId=slicedQid[0];fieldId=slicedQid[1];}
|
562 |
+
var tempInput=$('input_'+questionId+'_field_'+fieldId);if(tempInput&&typeof tempInput.value!=='undefined'){val=tempInput.value;}
|
563 |
+
break;case'2co':case'authnet':case'bluepay':case'bluesnap':case'boxpayment':case'braintree':case'cardconnect':case'chargify':case'clickbank':case'dwolla':case'echeck':case'eway':case'firstdata':case'gocardless':case'googleco':case'moneris':case'onebip':case'pagseguro':case'payjunction':case'payment':case'paymill':case'paysafe':case'payoneer':case'paypal':case'paypalexpress':case'paypalSPB':case'paypalpro':case'payu':case'square':case'sofort':case'stripe':case'stripeACH':case'wepay':case'worldpay':if($("id_"+data).down('#payment_total')){val=$("id_"+data).down('#payment_total').innerHTML;}else if($('input_'+data+'_donation')){val=$('input_'+data+'_donation').value;}
|
564 |
+
if(JotForm.currencyFormat&&JotForm.currencyFormat.dSeparator===","){val=val.replace(/\./g,"").replace(/\,/g,".");}
|
565 |
+
break;case'radio':$$("#id_"+data+' input[type="radio"]').each(function(rad,i){if(rad.checked){if(rad.readAttribute('data-calcvalue')){val=rad.readAttribute('data-calcvalue');}else{var otherOption=JotForm.getOptionOtherInput(rad);if(typeof FormTranslation!=='undefined'&&otherOption&&otherOption.innerHTML){val=JotForm.getOptionOtherInput(rad).innerHTML;}else{val=rad.value;}}}});break;case'checkbox':var valArr=[];$$("#id_"+data+' input[type="checkbox"]').each(function(chk,i){if(chk.checked){if(chk.readAttribute('data-calcvalue')){valArr.push(chk.readAttribute('data-calcvalue'));}else{if(typeof FormTranslation!=='undefined'&&chk.next()&&chk.next().innerHTML){valArr.push(chk.next().innerHTML);}else{valArr.push(chk.value);}}}});if(numeric){val=valArr.inject(0,function(accum,thisVal){return accum+(parseFloat(thisVal.replace(/-?([^0-9])/g,"$1").replace(/[^0-9\.-]/g,""))||0);});}else{val=valArr.join();}
|
566 |
+
break;case'select':var optionValue=function(option){if(option.textContent)return option.textContent.replace(/^\s+|\s+$/g,'');return option.innerText.replace(/^\s+|\s+$/g,'');};if(numeric)val=0;var tempInput;if(data.indexOf('|')>-1){slicedQid=data.split('|');var questionId=slicedQid[0];var fieldId=slicedQid[1];tempInput=$('input_'+questionId+'_field_'+fieldId);}else{tempInput=$('input_'+data);}
|
567 |
+
tempInput.select('option').each(function(option,ind){var option=tempInput.options[ind];if(option&&option.selected){var current=option.readAttribute('data-calcvalue')&&(!calc.hasOwnProperty('insertAsText')||(calc.hasOwnProperty('insertAsText')&&(calc.insertAsText==false||calc.insertAsText==='0')))?option.readAttribute('data-calcvalue'):optionValue(option);if(numeric){if(/\d/.test(current)){val+=(current==="")?0:parseFloat(current.replace(/[^\-0-9.]/g,""));}else{val+=0;}}else{val+=current;}}});break;case'number':if($$("#id_"+data+' input[type="number"]').length>1){var valArr=[];$$("#id_"+data+' input[type="number"]').each(function(el){valArr.push(el.value);});val=valArr.join(' ');}else{if(!$('input_'+data).value.empty()&&!isNaN($('input_'+data).value)){val=parseFloat($('input_'+data).value);}}
|
568 |
+
break;case'combined':case'grading':var valArr=[];combinedObject={};$$("#id_"+data+' input[type="text"]').each(function(el){if(!el.value.empty()){valArr.push(el.value);}
|
569 |
+
var id=el.id.replace(/_.*/,"");combinedObject[id]=el.value;});$$("#id_"+data+' input[type="tel"]').each(function(el){if(!el.value.empty()){valArr.push(el.value);}
|
570 |
+
var id=el.id.replace(/input_[0-9].*_+/,"");combinedObject[id]=el.value;});val=valArr.join(' ');break;case'datetime':var valArr=[];if(numeric){valArr.push($("month_"+data).value);valArr.push($("day_"+data).value);valArr.push($("year_"+data).value);}else{$$("#id_"+data+' input[type="tel"]').each(function(el){valArr.push(el.value);var id=el.id.replace(/_.*/,"");combinedObject[id]=el.value;});$$("#id_"+data+' select').each(function(el){var id=el.id.replace(/_.*/,"");combinedObject[id]=el.value;});}
|
571 |
+
$$("#id_"+data+' select').each(function(el){valArr.push(el.value);});if(numeric){if(!valArr[0].empty()&&!valArr[1].empty()&&!valArr[2].empty()){var hours=mins=ampm='';if(valArr.length>4&&!valArr[3].empty()&&!valArr[4].empty()){hours=parseInt(valArr[3]);if(valArr.length==6&&!valArr[5].empty()){ampm=valArr[5];if(ampm=='PM'&&hours!=12){hours+=12;}else if(ampm=='AM'&&hours==12){hours=0;}}
|
572 |
+
mins=valArr[4];}
|
573 |
+
var millis=Date.UTC(valArr[2],valArr[0]-1,valArr[1],hours,mins);val=millis/60/60/24/1000;}else{val=0;}}else{if(valArr.length>2&&!valArr[0].empty()&&!valArr[1].empty()&&!valArr[0].empty()){var separator="/";var separatorEl=$$("#id_"+data+" span[class=date-separate]").first();if(separatorEl){separator=separatorEl.innerHTML.replace(/[^\/\-\.]/g,'');}
|
574 |
+
val=valArr[0]+separator+valArr[1]+separator+valArr[2];}
|
575 |
+
if(valArr.length>4&&!valArr[3].empty()&&!valArr[4].empty()){val+=' '+valArr[3]+':'+valArr[4];if(valArr.length==6&&!valArr[5].empty())val+=' '+valArr[5];}}
|
576 |
+
break;case'time':if($('until_'+data)&&$("duration_"+data+"_ampmRange")){if(numeric){var duration=$("duration_"+data+"_ampmRange").value;if(duration.indexOf(":")>-1){var time=duration.split(":");var hours=time[0]||0;var mins=time[1]||0;var millis=Date.UTC('1970','0','1',hours,mins);val=millis/60/60/1000;}}else{val=$("duration_"+data+"_ampmRange").value;}
|
577 |
+
break;}
|
578 |
+
var valArr=[];combinedObject={};if(numeric){$$("#id_"+data+' select').each(function(el){valArr.push(el.value);});var hour,mins,ampm='';hours=parseInt(valArr[0])||0;if(valArr.length==3&&!valArr[2].empty()){ampm=valArr[2];if(ampm=='PM'&&hours!=12){hours+=12;}else if(ampm=='AM'&&hours==12){hours=0;}}
|
579 |
+
mins=valArr[1];var millis=Date.UTC('1970','0','1',hours,mins);val=millis/60/60/1000;}else{if($("input_"+data+"_hourSelect")&&!$("input_"+data+"_hourSelect").value.empty()&&$("input_"+data+"_minuteSelect")&&!$("input_"+data+"_minuteSelect").value.empty()){val=$("input_"+data+"_hourSelect").value+":"+$("input_"+data+"_minuteSelect").value;if($("input_"+data+"_ampm")){val+=" "+$("input_"+data+"_ampm").value;}}
|
580 |
+
if($("input_"+data+"_hourSelectRange")&&!$("input_"+data+"_hourSelectRange").value.empty()&&$("input_"+data+"_minuteSelectRange")&&!$("input_"+data+"_minuteSelectRange").value.empty()){val+=" - "+$("input_"+data+"_hourSelectRange").value+":"+$("input_"+data+"_minuteSelectRange").value;if($("input_"+data+"_ampmRange")){val+=" "+$("input_"+data+"_ampmRange").value;}
|
581 |
+
if($("duration_"+data+"_ampmRange")&&!$("duration_"+data+"_ampmRange").value.empty()){val+=" ("+$("duration_"+data+"_ampmRange").value+")";}}
|
582 |
+
$$("#id_"+data+' select').each(function(el){var id=el.id.replace(/.*_.*_/,"");combinedObject[id]=el.value;});}
|
583 |
+
break;case'birthdate':var valArr=[];if(numeric){try{var monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"]
|
584 |
+
var months=monthNames.indexOf($("input_"+data+"_month").value);var days=$("input_"+data+"_day").value;var years=$("input_"+data+"_year").value;var millis=new Date(years,months,days).getTime();val=millis/60/60/24/1000;}catch(e){console.log("birthdate error");console.log(e);}}else{$$("#id_"+data+' select').each(function(el){valArr.push(el.value);});if(!valArr[0].empty()&&!valArr[1].empty()&&!valArr[2].empty()){val=valArr[0]+' '+valArr[1]+' '+valArr[2];}}
|
585 |
+
break;case'address':var valArr=[];combinedObject={};$$("#id_"+data+' input[type="text"]').each(function(el){if(!el.value.empty()){valArr.push(el.value);}
|
586 |
+
var id=el.id.replace(/input_[0-9].*?_+/,"");combinedObject[id]=el.value;});$$("#id_"+data+' select').each(function(el){if(!el.value.empty()){valArr.push(el.value);}
|
587 |
+
var id=el.id.replace(/input_[0-9].*_+/,"");combinedObject[id]=el.value;});val=valArr.join(', ');break;case'file':val=$('input_'+data).value;val=val.substring(val.lastIndexOf("\\")+1);break;case'textarea':if($('input_'+data)&&typeof $('input_'+data).value!=='undefined'){val=$('input_'+data).value;var rich=$('id_'+data).down('.nicEdit-main');if(rich){val=val.stripTags().replace(/\s/g,' ').replace(/ /g,' ');}}
|
588 |
+
break;case'widget':var widgetType=JotForm.getWidgetType(data);switch(widgetType){case"timer":case"fancyTimer":if(numeric){val=$('input_'+data).value;}else{var seconds=$('input_'+data).value;var minutes=Math.floor(seconds/60);seconds=seconds-(minutes*60);seconds=JotForm.addZeros(seconds,2);val=minutes+":"+seconds;}
|
589 |
+
break;case"configurableList":case"dynMatrix":var br=JotForm.calculationType(result)==="html"?"<br/>":"\n";var json=$('input_'+data).value;try{json=JSON.parse(json);for(var i=0;i<json.length;i++){var valArr=[];for(line in json[i]){if(!json[i].hasOwnProperty(line))continue;if(!json[i][line].empty()){valArr.push(json[i][line]);}}
|
590 |
+
val+=valArr.join(",")+br;}}catch(e){console.log($('input_'+data).value);console.log(calc)}
|
591 |
+
break;case"giftRegistry":val=$('input_'+data).value;if(JotForm.calculationType(result)==="html"){val=val.replace(/\n/g,"<br/>");}
|
592 |
+
break;case"imagelinks":case"links":var br=JotForm.calculationType(result)==="html"?"<br/>":"\n";var json=JSON.parse($('input_'+data).value).widget_metadata.value;for(var i=0;i<json.length;i++){if(json[i].url.replace(/\s/g,"").empty())continue;var showName=json[i].name&&!json[i].name.replace(/\s/g,"").empty();if(JotForm.calculationType(result)==="html"){if(widgetType==="imagelinks"){val+='<a href="'+json[i].url+'"><img src="'+json[i].url+'" /></a>';}else{val+='<a href="'+json[i].url+'">'+(showName?json[i].name:json[i].url)+'</a>';}}else{val+=showName?json[i].name+": ":"";val+=json[i].url+br;}}
|
593 |
+
break;case"htmltext":var b64=JSON.parse($('input_'+data).value).widget_metadata.value;val=window.atob?window.atob(b64):"";if(JotForm.calculationType(result)!=="html"){val=val.strip().replace(/<br>/g,"\n").stripTags().replace(/ /g,' ');}
|
594 |
+
break;case"drivingDistance":val=$('input_'+data).value;if(val.indexOf("Distance")>-1){var matches=val.match(/Distance(.*)/);if(matches.length>1){val=matches[1];}}
|
595 |
+
break;case"pickers":var val=$('input_'+data).value;if(numeric&&$('customFieldFrame_'+data).src.indexOf('datepicker.html')!==-1){var valArr=val.split("/");var millis=Date.UTC(valArr[2],valArr[0]-1,valArr[1],0,0);val=millis/60/60/24/1000;}
|
596 |
+
break;default:val=$('input_'+data).value;break;}
|
597 |
+
break;default:if($('input_'+data)&&typeof $('input_'+data).value!=='undefined'){val=$('input_'+data).value;}
|
598 |
+
break;}
|
599 |
+
if(numeric&&typeof val!=='number'){if(useCommasForDecimals){if(/\..*\,/.test(val)){val=val.replace(/\./g,"");}
|
600 |
+
val=val.replace(",",".");}
|
601 |
+
val=val.replace(/-?([^0-9])/g,"$1").replace(/[^0-9\.-]/g,"");}
|
602 |
+
if(numeric&&val<0){val='('+val+')';}
|
603 |
+
if(numeric&&val===''){val=0;}
|
604 |
+
return val;};var calculate=function(equation,numeric){var out='';var acceptableFunctions={"abs":Math.abs,"acos":Math.acos,"acosh":Math.acosh,"asin":Math.asin,"asinh":Math.asinh,"atan":Math.atan,"atanh":Math.atanh,"atan2":Math.atan2,"cbrt":Math.cbrt,"ceil":Math.ceil,"cos":Math.cos,"cosh":Math.cosh,"exp":Math.exp,"expm1":Math.expm1,"floor":Math.floor,"fround":Math.fround,"hypot":Math.hypot,"imul":Math.imul,"log":Math.log,"log1p":Math.log1p,"log10":Math.log10,"log2":Math.log2,"max":Math.max,"min":Math.min,"pow":Math.pow,"random":Math.random,"round":Math.round,"sign":Math.sign,"sin":Math.sin,"sinh":Math.sinh,"sqrt":Math.sqrt,"tan":Math.tan,"tanh":Math.tanh,"toSource":Math.toSource,"trunc":Math.trunc,"E":Math.E,"LN2":Math.LN2,"LN10":Math.LN10,"LOG2E":Math.LOG2E,"LOG10E":Math.LOG10E,"PI":Math.PI,"SQRT1_2":Math.SQRT1_2,"SQRT2":Math.SQRT2};for(var i=0;i<equation.length;i++){character=equation.charAt(i);if(character==='['&&!numeric){var end=equation.indexOf(']',i);try{var num=calculate(equation.substring(i+1,end),true);if(num){if(num.indexOf(",")==-1){num=new MathProcessor().parse(num);if(JotForm.getInputType(calc.resultField)!=="datetime"){num=num.toFixed(calc.decimalPlaces);if(!calc.showEmptyDecimals||calc.showEmptyDecimals=="0"){num=parseFloat(num);if(num%1!==0){num=num.toFixed(calc.decimalPlaces||2);}}}
|
605 |
+
if(!isFinite(num)){num=0;}}
|
606 |
+
if(useCommasForDecimals){num=num.toString().replace(".",",");}
|
607 |
+
out+=num;}}catch(e){console.log('exception in '+calc.conditionId+" : "+num+"("+equation+")");}
|
608 |
+
i=end;}else if(equation.substr(i,3)==='|*|'){try{i+=3;var end=equation.indexOf('|*|',i);if(end===-1)continue;var specOp=equation.substring(i,end);i+=end+2-i;if(equation.charAt(i+1)==='('||(equation.charAt(i+1)==='['&&equation.charAt(i+2)==='(')){i+=(equation.charAt(i+1)==='[')?3:2;var endSpecial=-1;var balance=1;for(var k=i;k<equation.length;k++){if(equation.charAt(k)===')'){balance--;if(balance===0){endSpecial=k;break;}}else if(equation.charAt(k)==='('){balance++;}}
|
609 |
+
if(endSpecial===-1)continue;var args=equation.substring(i,endSpecial);args=args.split(',');var originalArgs=args.slice(0);for(var j=0;j<args.length;j++){args[j]=calculate(args[j],true);if(args[j]){args[j]=new MathProcessor().parse(args[j]);}}
|
610 |
+
i+=endSpecial-i;if(specOp==='dateString'){var millis=args[0]*24*60*60*1000+30000;var date=new Date(millis);var getUTCStringDate=function(date){var monthNames=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var dayNames=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];var day=dayNames[date.getUTCDay()];var month=monthNames[date.getUTCMonth()];var dayOfMonth=JotForm.addZeros(date.getUTCDate(),2);var year=date.getUTCFullYear();return day+" "+month+" "+dayOfMonth+" "+year;};out+=getUTCStringDate(date);if(equation.charAt(i)===']'){i++;}else{equation=equation.substr(0,i+1)+'['+equation.substr(i+1);}}else if(specOp==='date'){if(args.length>2){var millis=Date.UTC(args[0],args[1]-1,args[2]);out+=millis/60/60/24/1000;}}else if(specOp==='nth'){var n=args[0];args=args.splice(1);args=args.sort(function(a,b){if(parseInt(a)>parseInt(b))return 1;if(parseInt(b)>parseInt(a))return-1;return 0;});args=args.reverse();out+=args[parseInt(n)-1];}else if(specOp==='avg'||specOp==='avgNoZero'){var len=sum=0;for(var j=0;j<args.length;j++){if(parseFloat(args[j])>0){len++;sum+=parseFloat(args[j]);}}
|
611 |
+
out+=specOp==='avg'?sum/args.length:sum/len;}else if(specOp==='count'){var field=originalArgs[0];field=field.replace(/[\{\}]/g,'');var type=JotForm.getInputType(field);var len=$$("#id_"+field+' input[type="'+type+'"]:checked').length;out+=len;}else if(specOp==='commaSeparate'){if(typeof args[0]=="number"){args[0]=args[0].toFixed(calc.decimalPlaces);var parts=args[0].toString().split(".");parts[0]=parts[0].replace(/\B(?=(\d{3})+(?!\d))/g,",");out+=parts.join(".");}else{out+=args[0];}}else{out+=acceptableFunctions[specOp].apply(undefined,args);}}else if(specOp==='random'){out+=Math.random();}else{out+=acceptableFunctions[specOp];}}catch(e){console.log(e);}}else if(character==='{'){var end=equation.indexOf('}',i);var qid=equation.substring(i+1,end);try{var val=getValue(qid,numeric);}catch(e){console.log("error catching value");console.log(e);}
|
612 |
+
if(val===''&&numeric)return false;out+=val;i+=end-i;}else{out+=character;}}
|
613 |
+
return out;};var output=calculate(calc.equation);if(!(typeof output=="string"&&output.length>1)&&parseFloat(output)===0&&$('input_'+result)&&($('input_'+result).readAttribute('defaultValue')!=null||$('input_'+result).readAttribute('data-defaultvalue')!=null)){output=$('input_'+result).readAttribute('defaultValue')||$('input_'+result).readAttribute('data-defaultvalue');}
|
614 |
+
var resultFieldType=calc.isLabel?"html":JotForm.calculationType(result);switch(resultFieldType){case"html":try{if(!calc.replaceText)calc.replaceText="";if(calc.replaceText.indexOf(":")>-1){var subfield=calc.replaceText.substr(calc.replaceText.indexOf(":")+1);if(subfield in combinedObject){output=combinedObject[subfield];}}
|
615 |
+
if(output.empty()&&calc.defaultValue){output=calc.defaultValue;}
|
616 |
+
var className=result+"_"+calc.replaceText.replace(/\[/g,"_field_").replace(/\:/g,"_");;className=className.replace(']','');var spans=$$("."+className);var subLabel=[];if(window.FORM_MODE=='cardform'){subLabel=$$('.'+'jfField-sublabel').filter(function(el){return el.htmlFor=='input_'+result;});}
|
617 |
+
else{subLabel=$$('.'+'form-sub-label').filter(function(el){return el.htmlFor=='input_'+result;});}
|
618 |
+
var replaceRegex=calc.replaceText.replace('[','\\[');var re=new RegExp("\{"+replaceRegex+"\}","g");var def=calc.defaultValue||"";if(spans.length==0){var contents=calc.isLabel?$('label_'+result).innerHTML:$('text_'+result).innerHTML;contents=contents.replace(re,'<span class="replaceTag '+className+'" default="'+def+'">'+output+'</span>');calc.isLabel?$('label_'+result).update(contents):$('text_'+result).update(contents);}else{spans.each(function(span){span.update(output);});}
|
619 |
+
subLabel.each(function(subl){var content=subl.innerHTML.replace(re,'<span class="replaceTag '+className+'" default="'+def+'">'+output+'</span>');subl.update(content);});var description=$('input_'+result+'_description');if(description){var descriptionContent=description.innerHTML;if(descriptionContent.indexOf(calc.replaceText)>-1){descriptionContent=descriptionContent.replace(re,'<span class="replaceTag '+className+'" default="'+def+'">'+output+'</span>');description.update(descriptionContent);}}}catch(e){console.log(e);}
|
620 |
+
break;case"address":case"authnet":case"paypalpro":case"combined":case"time":case"braintree":case"stripe":for(var inputId in combinedObject){if(inputId!==""){if($('id_'+result).select('input[id*='+inputId+'], select[id*='+inputId+']').length>0){$('id_'+result).select('input[id*='+inputId+'], select[id*='+inputId+']').first().value=combinedObject[inputId];if(combinedObject[inputId]){$('id_'+result).select('input[id*='+inputId+'], select[id*='+inputId+']').first().parentNode.addClassName('isFilled');}}}}
|
621 |
+
if($('input_'+result+'_full')&&$('input_'+result+'_full').readAttribute("masked")=="true"){JotForm.setQuestionMasking('#input_'+result+'_full',"textMasking",$('input_'+result+'_full').readAttribute("maskValue"));}
|
622 |
+
break;case"datetime":if(combinedObject&&"year"in combinedObject){for(var inputId in combinedObject){if($('id_'+result).select('input[id*='+inputId+'], select[id*='+inputId+']').length>0){$('id_'+result).select('input[id*='+inputId+'], select[id*='+inputId+']').first().value=combinedObject[inputId];}}}else{try{if((typeof output=="number"&&output>0)||(typeof output=="string"&&output.replace(/\s/g,"").length>0&&output!=="0")){if(!isNaN(output)){output=Math.round(output*60*60*24*1000);}
|
623 |
+
var date=new Date(output);var year=date.getFullYear();var month=JotForm.addZeros(date.getMonth()+1,2);var day=JotForm.addZeros(date.getDate(),2);if($('input_'+result)){$('input_'+result).value=year+'-'+month+'-'+day;if(!isNaN(year))$$('#cid_'+result+' .jfField[data-type="year"] input')[0].value=year;if(!isNaN(month))$$('#cid_'+result+' .jfField[data-type="month"] input')[0].value=month;if(!isNaN(day))$$('#cid_'+result+' .jfField[data-type="day"] input')[0].value=day;}else{if(!isNaN(year))$("year_"+result).value=year;if(!isNaN(month))$("month_"+result).value=month;if(!isNaN(day))$("day_"+result).value=day;}}}catch(e){console.log(e);}}
|
624 |
+
if($('lite_mode_'+result)){var date=new Date($("year_"+result).value,($("month_"+result).value-1),$("day_"+result).value);if(date.getTime()){JotForm.formatDate({date:date,dateField:$('id_'+result)});}}
|
625 |
+
break;case"number":output=output.replace(/[^\-0-9\.]/g,"");$('input_'+result).value=output;break;case"radio":var radios=$$("#id_"+result+' input[type="radio"]');$A(radios).each(function(rad){rad.checked=false;if(rad.value==output.strip()){rad.checked=true;}});break;case"checkbox":var sources=$$('#id_'+calc.operands+' input[type="checkbox"]:checked');var outputs=sources.length?sources.collect(function(out){return out.value.strip();}):output.split(',').collect(function(out){return out.strip();});var checks=$$("#id_"+result+' input[type="checkbox"]');$A(checks).each(function(chk){if(!JotForm.defaultValues[chk.id]){chk.checked=false;}
|
626 |
+
if(outputs.include(chk.value)){chk.checked=true;}});break;case"select":try{var source=$$('#id_'+calc.operands+' select');var out=(source[0]?source[0].value:output);if(result.indexOf('|')>0){$('input_'+result.split('|').join('_field_')).setValue(out.strip());}else{$('input_'+result).setValue(out.strip());}
|
627 |
+
break;}catch(error){console.log(error);}
|
628 |
+
case"matrix":if("resultSubField"in calc){if($(calc.resultSubField)){$(calc.resultSubField).value=output;}}
|
629 |
+
break;case"textarea":output=output.replace(/<br>|<br\/>/gi,"\r\n");if(output&&output.length>0){$('input_'+result).removeClassName('form-custom-hint').removeAttribute('spellcheck');}
|
630 |
+
var richAreaSelector=window.FORM_MODE=='cardform'?"#input_"+result+"_editor":".nicEdit-main"
|
631 |
+
var richArea=$("id_"+result).down(richAreaSelector);if(richArea){richArea.innerHTML=output;richArea.setStyle({'color':''});}
|
632 |
+
$('input_'+result).value=output;break;case"mixed":if($(mixedResult)){$(mixedResult).value=output;var parent=$(mixedResult).up();if(window.FORM_MODE=='cardform'&&parent&&!parent.hasClassName('isFilled')){parent.addClassName('isFilled');}}
|
633 |
+
break;default:try{if($('input_'+result)&&$('input_'+result).hinted===true){$('input_'+result).clearHint();}
|
634 |
+
if($('input_'+result)){$('input_'+result).value=output;}
|
635 |
+
if($('input_'+result)&&output&&output.length===0&&$('input_'+result).hintClear){$('input_'+result).hintClear();}
|
636 |
+
if($('input_'+result)&&$('input_'+result).readAttribute("data-masked")=="true"){JotForm.setQuestionMasking("#input_"+result,"textMasking",$('input_'+result).readAttribute("maskValue"));}
|
637 |
+
if(resultFieldType==='widget'){var widgetEl=$('input_'+result);if(widgetEl){widgetEl.fire('widget:populate',{qid:result,value:output});widgetEl.triggerEvent('change');}}
|
638 |
+
break;}catch(error){console.log(error);}}
|
639 |
+
var infiniteLoop=function(){var checkVal=typeof output==='object'?JSON.stringify(output):output;var checkField=calc.resultSubField||calc.resultField;if(!("__antiLoopCache"in window)){window.__antiLoopCache={};}
|
640 |
+
if(window.__antiLoopCache[checkField]===checkVal){return true;}
|
641 |
+
window.__antiLoopCache[checkField]=checkVal;return false;}
|
642 |
+
if(infiniteLoop()){return;}
|
643 |
+
if(!mixedResult&&$('id_'+result).hasClassName("form-line-error")){$('id_'+result).select("select[class*='required'], textarea[class*='required'], input[class*='required']").each(function(el){if(el.validateInput){el.validateInput();}});}
|
644 |
+
var triggerMe;var eventType;if(resultFieldType=="checkbox"||resultFieldType=="radio"){eventType="click";triggerMe=$('id_'+result)}else if(resultFieldType=="select"){eventType="change";if(result.indexOf('|')>0){if($('input_'+result.split('|').join('_field_'))){triggerMe=$('input_'+result.split('|').join('_field_'));}}else{if($('input_'+result)){triggerMe=$('input_'+result);}}}else{eventType="keyup";if($(mixedResult)){triggerMe=$(mixedResult);}else if(!calc.isLabel){triggerMe=$('input_'+result)?$('input_'+result):$('id_'+result).select('input').first();}}
|
645 |
+
if(!triggerMe)return;if(document.createEvent){var evt=document.createEvent('HTMLEvents');evt.initEvent(eventType,true,true);triggerMe.dispatchEvent(evt);}
|
646 |
+
if(triggerMe.fireEvent){triggerMe.fireEvent('on'+eventType);}},getWidgetType:function(qid){try{if(!$("id_"+qid||$("id_"+qid).down("iframe")))return false;if($('input_'+qid).value.indexOf("widget_metadata")>1){return JSON.parse($('input_'+qid).value).widget_metadata.type;}
|
647 |
+
var iframe=$("id_"+qid).down("iframe");var src=iframe.src;var reg=new RegExp('jotform.io/(.*)/');var widget=reg.exec(src);if(!widget||widget.length<2||!widget[1])return false;return widget[1];}catch(e){console.error("get widget type error");return false;}},widgetsWithConditions:[],triggerWidgetCondition:function(id){if(JotForm.widgetsWithConditions.include(id)){if(document.createEvent){var evt=document.createEvent('HTMLEvents');evt.initEvent('change',true,true);$('input_'+id).dispatchEvent(evt);}else if($('input_'+id).fireEvent){return $('input_'+id).fireEvent('onchange');}}},getFieldIdFromFieldRef:function(ref){try{if(typeof ref==="string"&&ref.indexOf("{")>-1&&ref.indexOf("}")>-1){var stripped=ref.strip().replace(/[\{\}]/g,"");var inputs=$$('input[name*="_'+stripped+'["\],select[name*="_'+stripped+'\["]')
|
648 |
+
if(!inputs||inputs.length==0){inputs=$$('input[name*="_'+stripped+'"],select[name*="_'+stripped+'"]');}
|
649 |
+
if(inputs.length>0){var field=inputs.first().up(".form-line");if(field){return field.id.replace(/.*id_/,"");}}}}catch(e){console.log(e);}
|
650 |
+
return false;},setConditionEvents:function(){try{$A(JotForm.conditions).each(function(condition){if(condition.disabled==true)return;if(condition.type=='field'||condition.type=='calculation'||condition.type=='require'||condition.type=='mask'||($A(condition.action).length>0&&condition.action.first().skipHide==='hidePage')){var fields=[];$A(condition.terms).each(function(term){term.field=String(term.field);var tempField='';if(term.field.indexOf('|')>-1){var fieldSplit=term.field.split('|');tempField=fieldSplit[0]+'_field_'+fieldSplit[1];}else{tempField=term.field;}
|
651 |
+
fields.push(tempField);var otherFieldRef=JotForm.getFieldIdFromFieldRef(term.value)
|
652 |
+
if(otherFieldRef){fields.push(otherFieldRef);}});$A(fields).each(function(id){var inputTypeTemp=JotForm.getInputType(id);switch(inputTypeTemp){case"widget":case"signature":JotForm.setFieldConditions('input_'+id,'change',condition);JotForm.widgetsWithConditions.push(id);break;case"combined":case"email":if(id.indexOf('_field_')>-1){JotForm.setFieldConditions('input_'+id,'autofill',condition);}else{JotForm.setFieldConditions('id_'+id,'autofill',condition);}
|
653 |
+
break;case"address":JotForm.setFieldConditions('id_'+id,'autofill',condition);JotForm.setFieldConditions('input_'+id+'_country','change',condition);break;case"datetime":JotForm.setFieldConditions('id_'+id,'date:changed',condition);break;case"birthdate":JotForm.setFieldConditions('input_'+id+'_day','change',condition);JotForm.setFieldConditions('input_'+id+'_month','change',condition);JotForm.setFieldConditions('input_'+id+'_year','change',condition);break;case"time":JotForm.setFieldConditions('input_'+id+'_hourSelect','change',condition);JotForm.setFieldConditions('input_'+id+'_minuteSelect','change',condition);JotForm.setFieldConditions('input_'+id+'_ampm','change',condition);case"select":case"file":if($('input_'+id)){JotForm.setFieldConditions('input_'+id,'change',condition);}else{$('id_'+id).select('select').each(function(el){JotForm.setFieldConditions(el.id,'change',condition);});}
|
654 |
+
break;case"checkbox":case"radio":JotForm.setFieldConditions('id_'+id,'click',condition);break;case"number":JotForm.setFieldConditions('input_'+id,'number',condition);break;case"autocomplete":JotForm.setFieldConditions('input_'+id,'autocomplete',condition);break;case"grading":JotForm.setFieldConditions('id_'+id,'keyup',condition);break;case"text":JotForm.setFieldConditions('input_'+id,'autofill',condition);break;case"hidden":if($('input_'+id+"_donation")){JotForm.setFieldConditions('input_'+id+"_donation",'keyup',condition);}else{JotForm.setFieldConditions('input_'+id,'keyup',condition);}
|
655 |
+
break;case"mixed":if(id.indexOf('_field_')>-1){var idSplit=id.split('_field_');var tempQid=idSplit[0];var tempQuestion;this.CardLayout.layoutParams.allQuestions.forEach(function(question){if(question.id==tempQid){tempQuestion=question;}});if(tempQuestion&&tempQuestion.fields){tempQuestion.fields.forEach(function(field){var tempSelector='input_'+tempQid+'_field_'+field.fieldID;JotForm.setFieldConditions(tempSelector,'change',condition);JotForm.widgetsWithConditions.push(tempSelector);});}}
|
656 |
+
break;default:JotForm.setFieldConditions('input_'+id,'keyup',condition);}});}else{$A(condition.terms).each(function(term){var id=term.field.toString();if(id.indexOf("_")!==-1){id=id.split("_")[0];}
|
657 |
+
if(id.indexOf("|")!==-1){id=id.split("|")[0];}
|
658 |
+
if(!$('id_'+id)){return;}
|
659 |
+
if($('id_'+id).getAttribute('data-type')==='control_widget'){if($('input_'+id)&&$('input_'+id).type==='hidden'&&$$("#jfCard-welcome-start")){var startButton=$$("#jfCard-welcome-start").first();if(startButton){startButton.observe('mousedown',function(){JotForm.checkCondition(condition);});}}}
|
660 |
+
var nextButton;if(window.FORM_MODE==='cardform'){nextButton=$('id_'+id).select('.forNext')[0];}else{nextButton=JotForm.getSection($('id_'+id)).select('.form-pagebreak-next')[0];}
|
661 |
+
if(!nextButton){return;}
|
662 |
+
nextButton.observe('mousedown',function(){JotForm.checkCondition(condition);});});}});$H(JotForm.fieldConditions).each(function(pair){var field=pair.key;var event=pair.value.event;var conds=pair.value.conditions;if(!$(field)){return;}
|
663 |
+
if(event=="autocomplete"){$(field).observe('blur',function(){$A(conds).each(function(cond){JotForm.checkCondition(cond);});}).run('blur');$(field).observe('keyup',function(){$A(conds).each(function(cond){JotForm.checkCondition(cond);});}).run('keyup');}else if(event=="number"){$(field).observe('change',function(){$A(conds).each(function(cond){JotForm.checkCondition(cond);});}).run('change');$(field).observe('keyup',function(){$A(conds).each(function(cond){JotForm.checkCondition(cond);});}).run('keyup');}else if(event=="autofill"){$(field).observe('blur',function(){$A(conds).each(function(cond){JotForm.checkCondition(cond);});}).run('blur');$(field).observe('keyup',function(){$A(conds).each(function(cond){JotForm.checkCondition(cond);});}).run('keyup');if(!(!Prototype.Browser.IE9&&!Prototype.Browser.IE10&&Prototype.Browser.IE)){$(field).observe('change',function(){$A(conds).each(function(cond){JotForm.checkCondition(cond);});}).run('change');}}else{$(field).observe(event,function(){$A(conds).each(function(cond){JotForm.checkCondition(cond);});});if(!$(field).id.match(/input_[0-9]+_quantity_[0-9]+_[0-9]+/)){$(field).run(event);}else{JotForm.runConditionForId(field.replace('input_',''));}}});}catch(e){JotForm.error(e);}},setFieldsToPreserve:function(preset){var gateways=["braintree","dwolla","stripe","paypal","paypalpro","paypalexpress","authnet"];var getPaymentFields=$$('input[name="simple_fpc"]').length>0&&gateways.indexOf($$('input[name="simple_fpc"]')[0].getAttribute('data-payment_type'))>-1;var paymentExtras=[{type:"phone",pattern:/Phone|Contact/i},{type:"email",pattern:/email|mail|e-mail/i},{type:"company",pattern:/company|organization/i}];var eligibleFields=$$('.form-line[data-type*="email"],'+'.form-line[data-type*="textbox"],'+'.form-line[data-type*="phone"],'+'.form-line[data-type*="dropdown"],'+'.form-line[data-type*="radio"]');sortedFields=eligibleFields.sort(function(a,b){return Number(a.id.replace("id_",""))-Number(b.id.replace("id_",""));});var paymentFieldsToPreserve={};sortedFields.each(function(field){var fieldId=field.id.replace('id_','');var fieldName=field.down('input, select').name.replace(/q\d+_/,"");var fieldType=field.getAttribute('data-type').replace('control_','');if(getPaymentFields&&Object.keys(paymentFieldsToPreserve).length<3){paymentExtras.each(function(extra){if(fieldType=='textbox'||fieldType==extra.type){var label=field.down('label').innerHTML.strip();if(extra.pattern.exec(label)&&!paymentFieldsToPreserve[extra.type]){paymentFieldsToPreserve[extra.type]=fieldId;if(JotForm.fieldsToPreserve.indexOf(fieldId)===-1){JotForm.fieldsToPreserve.push(fieldId);}}}});}
|
664 |
+
if(preset&&JotForm.fieldsToPreserve.indexOf(fieldId)&&(preset.indexOf(fieldName)>-1||preset.indexOf(fieldId)>-1))
|
665 |
+
{JotForm.fieldsToPreserve.push(fieldId);}});},changePaymentStrings:function(text){if($('coupon-header')&&text.couponEnter){$('coupon-header').innerHTML=text.couponEnter;}
|
666 |
+
if($('shipping-text')&&text.shippingShipping){$('shipping-text').innerHTML=text.shippingShipping;}
|
667 |
+
if($('tax-text')&&text.taxTax){$('tax-text').innerHTML=text.taxTax;}
|
668 |
+
if($('subtotal-text')&&text.totalSubtotal){$('subtotal-text').innerHTML=text.totalSubtotal;}
|
669 |
+
if($('total-text')&&text.totalTotal){$('total-text').innerHTML=text.totalTotal;}},handleSubscriptionPrice:function(){if(navigator.userAgent.toLowerCase().indexOf('safari/')>-1){$$('.form-product-custom_price').each(function(inp){inp.onclick=function(e){e.preventDefault();};})}
|
670 |
+
var inputs=$$('input[data-price-source]');if(inputs.length<1){return;}
|
671 |
+
var priceSources=[];var events={};inputs.each(function(inp){var sourceId=inp.getAttribute('data-price-source');var source=$('input_'+sourceId);if(!source){return;}
|
672 |
+
if(!events[sourceId]){events[sourceId]=[];}
|
673 |
+
var getVal=function(){var val=source.value;if(typeof val!=='number'){val=val.replace(/[^0-9\.]/gi,"");}
|
674 |
+
return!isNaN(val)&&val>0?val:0;}
|
675 |
+
priceSources.push(source);events[sourceId].push(function(){inp.value=getVal();});});priceSources.each(function(source){var id=source.id.replace('input_','');source.onkeyup=function(){events[id].each(function(evt){evt();});JotForm.countTotal();};});},handleDonationAmount:function(){var donationField=JotForm.donationField=$$('input[id*="_donation"]')[0];JotForm.paymentTotal=donationField.value||0;donationField.observe('keyup',function(){JotForm.paymentTotal=this.value=this.value.replace(/[^.0-9]+/g,"");});donationField.observe('change',function(){JotForm.paymentTotal=this.value;})
|
676 |
+
if($$('input[id*="_donation"]')[0].getAttribute('data-custom-amount-field')>0){JotForm.donationSourceField=$('input_'+donationField.getAttribute('data-custom-amount-field'));if(!JotForm.donationSourceField){$$('input[id*="_donation"]')[0].removeAttribute('readonly');return;}
|
677 |
+
setTimeout(function(){JotForm.updateDonationAmount();donationField.triggerEvent('keyup');},1000);JotForm.donationSourceField.observe('keyup',JotForm.updateDonationAmount);JotForm.donationSourceField.observe('change',JotForm.updateDonationAmount);}else if(donationField.hasAttribute('data-min-amount')){var currency=donationField.nextSibling.textContent.strip();var minAmount=parseFloat(donationField.readAttribute('data-min-amount'));donationField.validateMinimum=function(){var val=this.getValue();if(isNaN(val)||val<minAmount){var errorTxt=JotForm.texts.ccDonationMinLimitError.replace('{minAmount}',minAmount).replace('{currency}',currency);return JotForm.errored(donationField,errorTxt);}else{return JotForm.corrected(donationField);}};}},updateDonationAmount:function(amount){if(!JotForm.donationSourceField||JotForm.donationField.up('.form-line.form-field-hidden')||JotForm.donationField.up('ul.form-field-hidden'))
|
678 |
+
{return;}
|
679 |
+
if(['undefined','object'].indexOf(typeof amount)===-1){JotForm.donationField.value=JotForm.paymentTotal=amount;return;}
|
680 |
+
var getVal=function(){var val=JotForm.donationSourceField.value;var sourceFieldUsesCommaForDecimal=JotForm.calculations.filter(function(c){return c.resultField===JotForm.donationSourceField.id.split("_")[1];})[0].useCommasForDecimals==="1";if(sourceFieldUsesCommaForDecimal){val=val.replace(",",".");}
|
681 |
+
if(typeof val!=='number'){val=val.replace(/[^0-9\.]/gi,"");}
|
682 |
+
return!isNaN(val)&&val>0?val:0;}
|
683 |
+
JotForm.donationField.value=JotForm.paymentTotal=getVal();if(window.FORM_MODE&&window.FORM_MODE=='cardform'){JotForm.donationField.parentNode.addClassName('isFilled');}},isPaymentSelected:function(){var selected=false;var paymentFieldId=$$('input[name="simple_fpc"]')[0]&&$$('input[name="simple_fpc"]')[0].value;var paymentField=$('id_'+paymentFieldId);if(!paymentField){return!!$$('input[name="simple_fpc"]')[0];}
|
684 |
+
if(paymentField.hasClassName('form-field-hidden')||paymentField.up('ul.form-section').hasClassName('form-field-hidden')||(paymentField.up('ul.form-section-closed')&&paymentField.up('ul.form-section-closed').hasClassName('form-field-hidden')))
|
685 |
+
{return false;}
|
686 |
+
if($$('input[name="simple_fpc"]').length<1){return false;}
|
687 |
+
if(paymentField&&(paymentField.getStyle('display')==="none"||!JotForm.isVisible(paymentField)&&JotForm.getSection(paymentField).id)){return false;}
|
688 |
+
if(window.productID){$H(window.productID).each(function(pair){var elem=$(pair.value);if(elem&&elem.checked){var quantityField=elem.up().select('select[id*="_quantity_"],input[id*="_quantity_"]');selected=quantityField.length===0||(quantityField.length===1&&quantityField[0].getValue()>0);if(quantityField.length>1){selected=quantityField.any(function(qty){return qty.getValue()>0;});}
|
689 |
+
if(selected){throw $break;}}});}else if($('input_'+paymentFieldId+'_donation')){var elem=$('input_'+paymentFieldId+'_donation');if(/^\d+(?:\.\d+)?$/.test(elem.getValue())){selected=elem.getValue()>0;}}else{var productField=$$('input[name*="q'+paymentFieldId+'"][type="hidden"]');if(productField.length<1){return false;}
|
690 |
+
if(productField[0].readAttribute('selected')==='false'){productField[0].remove();return false;}
|
691 |
+
return true;}
|
692 |
+
return selected;},togglePaypalButtons:function(show){var paymentFieldId=$$('input[name="simple_fpc"]')[0].value;if($('input_'+paymentFieldId+'_paymentType_express')&&!$('input_'+paymentFieldId+'_paymentType_express').checked){show=false;}
|
693 |
+
if($$('.paypal-button').length<1||!$('use_paypal_button')){return;}
|
694 |
+
$$('.form-submit-button').each(function(btn){if(show){if(btn.up().down('.paypal-button')){btn.up().down('.paypal-button').show();btn.hide();}}else{if(btn.up().down('.paypal-button')){btn.up().down('.paypal-button').hide();}
|
695 |
+
btn.show();}});},handlePaypalButtons:function(){var products=window.productID;var requiredPayment=false;var paymentFieldId=$$('input[name="simple_fpc"]')[0].value;if(products){$H(products).each(function(p){if($(p.value).getAttribute('class').indexOf('[required]')>-1){requiredPayment=true;throw $break;}});}else if($('input_'+paymentFieldId+'_donation')){requiredPayment=$('input_'+paymentFieldId+'_donation').getAttribute('class').indexOf('required')>-1;}
|
696 |
+
JotForm.togglePaypalButtons(requiredPayment||JotForm.isPaymentSelected());if(!requiredPayment){$H(products).each(function(p){$(p.value).observe('click',function(){JotForm.togglePaypalButtons(JotForm.isPaymentSelected());});});}},checkEmbed:function(){var form=$$('.jotform-form')[0];if(window!==window.top){form.insert(new Element('input',{type:'hidden',name:'embedUrl'}).putValue(document.referrer));if(JotForm.debug){console.log(document.referrer);}}},handlePaypalExpress:function(){if(typeof _paypalExpress!=="function"||$('express_category').getAttribute('data-digital_goods')==="No"){return;}
|
697 |
+
var paypalExpress=new _paypalExpress();paypalExpress.init();},handleBraintree:function(){if(window.location.pathname.match(/^\/edit/)||(["edit","inlineEdit","submissionToPDF"].indexOf(document.get.mode)>-1&&document.get.sid)){return;}
|
698 |
+
if(typeof __braintree!=="function"){alert("Braintree payment script didn't work properly. Form will be reloaded");location.reload();return;}
|
699 |
+
JotForm.braintree=__braintree();JotForm.braintree.init();},handlePagseguro:function(){if(window.location.pathname.match(/^\/edit/)||(["edit","inlineEdit","submissionToPDF"].indexOf(document.get.mode)>-1&&document.get.sid)){return;}
|
700 |
+
if(typeof __pagseguro!=="function"){alert("PagSeguro payment script didn't work properly. Form will be reloaded");location.reload();return;}
|
701 |
+
JotForm.pagseguro=__pagseguro();JotForm.pagseguro.init();},handleSquare:function(){if((window.location.href.match(/mode=inlineEdit/)||window.location.pathname.match(/^\/\/edit/)||window.location.pathname.match(/^\/edit/)||window.location.href.match(/mode=submissionToPDF/))&&document.get.sid){return;}
|
702 |
+
if(window===window.top){if(window.location.protocol!=='https:'){window.location.href=window.location.href.replace('http','https');return;}}
|
703 |
+
if(typeof __square!=="function"){alert("Square payment script didn't work properly. Form will be reloaded");location.reload();return;}
|
704 |
+
JotForm.squarePayment=__square();JotForm.squarePayment.init();},handleStripeACH:function(){if(JotForm.isEditMode())return;if(typeof __stripeACH==="undefined"){alert("Stripe ACH payments script didn't work properly. Form will be reloaded. ");location.reload();return;}
|
705 |
+
JotForm.stripeACH=__stripeACH;JotForm.stripeACH.init();},handlePaypalSPB:function(){JotForm.paypalSPB=__paypalSPB;try{JotForm.paypalSPB.init();JotForm.paypalSPB.render();}catch(e){console.error(e);if(typeof e==='string'){alert(e);return;}
|
706 |
+
alert("There was a problem with PayPal Smart Payment Buttons integration.");}},handlePaymentSubProducts:function(){var heights=[];var optionValues=[];var sections=$$('.form-section');var productPage=false;$$('.form-product-has-subproducts').each(function(sp){var wasHidden=(sp.up(".form-line")&&sp.up(".form-line").hasClassName("form-field-hidden"))?sp.up(".form-line").show():false;if(sections.length>1){productPage=productPage?productPage:sections.filter(function(p){return sp.descendantOf(p)&&sp.up('.form-section')===p;})[0];if(!productPage.isVisible()){productPage.setStyle({'display':'block'});heights[sp.id]=[sp.parentNode.getHeight(),$$('label[for="'+sp.id+'"]')[0].getHeight()];productPage.setStyle({'display':'none'});}else{heights[sp.id]=[sp.parentNode.getHeight(),$$('label[for="'+sp.id+'"]')[0].getHeight()];}}else{heights[sp.id]=[sp.parentNode.getHeight(),$$('label[for="'+sp.id+'"]')[0].getHeight()];}
|
707 |
+
showSubProducts(sp);sp.observe('click',function(){showSubProducts(this);});if(wasHidden){sp.up(".form-line").hide();}});function showSubProducts(el){var productSpan=el.parentNode;if(!el.checked){productSpan.shift({height:heights[el.id][1],duration:0.3,onEnd:JotForm.handleIFrameHeight});optionValues[el.id]=[];$$('#'+el.id+'_subproducts select,'+'#'+el.id+'_subproducts input[type="text"]').each(function(field,i){var fieldValue=field.tagName==="select"?field.getSelected().value:field.value;if(fieldValue){optionValues[el.id].push([field.id,fieldValue]);}
|
708 |
+
field.stopObserving();if(field.tagName==="SELECT"){field.selectedIndex=0;}else{field.value=0;}});}else{productSpan.shift({height:heights[el.id][0]-10,duration:0.3,onEnd:JotForm.handleIFrameHeight});if(optionValues[el.id]&&optionValues[el.id].length>0){optionValues[el.id].each(function(vv){$(vv[0]).stopObserving();$$("#"+vv[0]+".form-product-custom_quantity").each(function(el,i){el.observe('blur',function(){isNaN(this.value)||this.value<1?this.value='0':this.value=parseInt(this.value)})});$$("#"+vv[0]+".form-product-custom_quantity").each(function(el,i){el.observe('focus',function(){this.value==0?this.value='':this.value})});;if($(vv[0]).tagName==="SELECT"){$(vv[0]).selectOption(vv[1]);}else{$(vv[0]).value=vv[1];}});}}
|
709 |
+
setTimeout(function(){JotForm.totalCounter(JotForm.prices)},300);};},handleProductLightbox:function(){$$('.form-product-image-with-options').forEach(function(image,i){image.observe('click',function(){onProductImageClicked(i);});});},setCurrencyFormat:function(curr,useDecimal,decimalMark){var noDecimal=['BIF','CLP','DJF','GNF','JPY','KMF','KRW','MGA','PYG','RWF','VUV','XAF','XOF','XPF'];var decimalPlaces=noDecimal.indexOf(curr)>-1||!useDecimal?0:2;this.currencyFormat={curr:curr,dSeparator:decimalMark=="comma"?",":".",tSeparator:decimalMark=="comma"?".":",",decimal:decimalPlaces};},countTotal:function(prices){var prices=prices||JotForm.prices;var discounted=false;if(Object.keys(JotForm.discounts).length>0){discounted=true;if(JotForm.discounts.total||JotForm.discounts.shipping){var type=JotForm.discounts.type,rate=JotForm.discounts.rate,minimum=JotForm.discounts.minimum,code=JotForm.discounts.code;}else{for(var pid in prices){for(var kkey in JotForm.discounts){if(pid.indexOf(kkey)!==-1){prices[pid].discount=JotForm.discounts[kkey];}}}}}else{$H(prices).each(function(p){delete prices[p.key].discount;});}
|
710 |
+
var total=0;var totalWithoutDiscount=0;var subTotal=0;var subTotalWithoutDiscount=0;var itemSubTotal=[];var shippingTotal=0;var taxTotal=0;var taxTotalWithoutDiscount=0;var otherTotal=0;var otherTotalWithoutDiscount=0;var taxRate=0;var currency=JotForm.currencyFormat.curr;var decimal=JotForm.currencyFormat.decimal;var dSeparator=JotForm.currencyFormat.dSeparator;var tSeparator=JotForm.currencyFormat.tSeparator;var flatShipping=0;var products=0;var pricingInformations=[];$H(prices).each(function(pair){var parsedPair=pair.key.split("_");var label=parsedPair[0]+'_'+parsedPair[1]+'_'+parsedPair[2];var itemName=$$('#'+label+'+ label')[0]&&$$('#'+label+'+ label .form-product-name')[0].textContent.trim();if(!itemName){itemName=$$('#'+label+'+ .product__header')[0]&&$$('#'+label+'+ .product__header .product__title')[0].textContent.trim();}
|
711 |
+
if(pair.value.price=="custom"){if($(pair.key)&&$(pair.key).checked){subTotal=parseFloat($(pair.key+'_custom_price').getValue());}
|
712 |
+
return;}
|
713 |
+
if($(pair.value.quantityField)){if(pair.value.quantityField&&!(parseInt($(pair.value.quantityField).getValue())>0)){if(!$(pair.value.quantityField).hasClassName('form-subproduct-quantity')){return;}}
|
714 |
+
try{var parentSelector=pair.key.split("_").slice(0,-1).join("_");if($(parentSelector)&&$(parentSelector).type==="radio"&&!$(parentSelector).checked){if($(pair.value.quantityField).value>0){$(pair.value.quantityField).value=0;if($(parentSelector+'_item_subtotal')){$(parentSelector+'_item_subtotal').update("0.00");}}
|
715 |
+
if(window.FORM_MODE==="cardform"){$$("ul.products")[0]&&$$("ul.products")[0].querySelector('li[data-input="'+parentSelector+'"]')&&$$("ul.products")[0].querySelector('li[data-input="'+parentSelector+'"]').classList.remove("product--selected");$(pair.value.quantityField).up().querySelector(".jfDropdown-chip.isSingle").innerText=0;}
|
716 |
+
return;}}catch(e){console.warn(e);}}
|
717 |
+
var isSetupFee=pair.value.recurring?true:false;var isStripe=typeof Stripe==="function";total=parseFloat(total);var productShipping=0;var price=parseFloat(pair.value.price)||0;var priceWithoutDiscount=price;var taxAmount=0;var taxAmountWithoutDiscount=0;var subproduct=false;var parentProductKey;var recur=pair.value.recurring;var isSpecialPricing=false;var quantity=1;var specialName=[];if(pair.key.split('_').length===4){subproduct=true;parentProductKey=pair.key.split('_');parentProductKey.pop();parentProductKey=parentProductKey.join("_");itemSubTotal[parentProductKey]=itemSubTotal[parentProductKey]||0;}else{parentProductKey=pair.key;}
|
718 |
+
if($(pair.value.specialPriceField)){var specialPriceField=$(pair.value.specialPriceField);if(pair.value.child&&pair.value.specialPriceField.split("_").length===4){var idx=pair.value.specialPriceField.split("_")[3];price=parseFloat(pair.value.specialPriceList[idx]);}else{if(isNaN($(specialPriceField).options[0].value)||$(specialPriceField).options[0].value>0||$(specialPriceField.options[0].innerHTML.strip()!="")){priceIndex=specialPriceField.getSelected().index;}else{priceIndex=specialPriceField.getSelected().index-1}
|
719 |
+
var item=null;if($(pair.value.quantityField)&&$(pair.value.quantityField).closest("tr")){item=$(pair.value.quantityField).closest("tr").querySelector("th").textContent.trim();}else{item=document.querySelector('label[for='+pair.value.specialPriceField+']').textContent.trim();}
|
720 |
+
if(item){specialName.push({name:item,value:$(specialPriceField).getSelected().value});}
|
721 |
+
if(priceIndex>-1){price=parseFloat(pair.value.specialPriceList[priceIndex]);if($(pair.key+'_price')){$(pair.key+'_price').siblings('.freeCurr').each(function(el){el.style.display='inline';});}}else{var defaultSpecial=pair.value.specialPriceList[priceIndex+1];price=0;}}
|
722 |
+
isSpecialPricing=true;}
|
723 |
+
priceWithoutDiscount=price;if(pair.value.discount){var discount=pair.value.discount.split('-');priceWithoutDiscount=price;if(!discount[2]){price=price-((discount[1]==='fixed')?discount[0]:price*(discount[0]/100));price=price<0?0:price;}else{if(discount[2]==="all"||discount[2]==="product"){if(isSetupFee){recur=recur-((discount[1]==='fixed')?discount[0]:recur*(discount[0]/100));recur=recur<0?0:recur;}
|
724 |
+
price=price-((discount[1]==='fixed')?discount[0]:price*(discount[0]/100));price=price<0?0:price;}else if(discount[2]==="first"){if(isSetupFee){price=price-((discount[1]==='fixed')?discount[0]:price*(discount[0]/100));price=price<0?0:price;}}else if(discount[2]==="stripe_native"){if(isSetupFee){var setupFee=price-recur;price=recur-((discount[1]==='fixed')?discount[0]:recur*(discount[0]/100));if(!discount[3]){recur=price;}
|
725 |
+
price+=Number(setupFee);}else{price=price-((discount[1]==='fixed')?discount[0]:price*(discount[0]/100));price=price<0?0:price;}}}}
|
726 |
+
if(!pair.value.recurring){var priceText=$(pair.key+'_price')?$(pair.key+'_price'):$(pair.key.replace(pair.key.substring(pair.key.lastIndexOf("_")),"")+'_price')||null;if(priceText){var oldPriceText=priceText.innerHTML;if(price=="0"&&pair.value.specialPriceList&&defaultSpecial){$(priceText).update(parseFloat(defaultSpecial||0).formatMoney(decimal,dSeparator,tSeparator));}else if(pair.value.price=="0"&&!pair.value.specialPriceList){$(priceText).update(' Free');}else{$(priceText).parentNode.show();$(priceText).update(parseFloat(price).formatMoney(decimal,dSeparator,tSeparator));}}}else{var setupfeeText=$(pair.key+'_setupfee');priceText=$(pair.key+'_price');if(priceText){var priceAmount=isSetupFee?recur:price;$(priceText).update(parseFloat(priceAmount).formatMoney(decimal,dSeparator,tSeparator));}
|
727 |
+
if(setupfeeText){$(setupfeeText).update(parseFloat(price).formatMoney(decimal,dSeparator,tSeparator));}}
|
728 |
+
if(pair.value.tax){var tax=pair.value.tax;taxRate=parseFloat(tax.rate)||0;var locationField=$$('select[id*="input_'+tax.surcharge.field+'"], input#input_'+tax.surcharge.field)[0]||false;if(locationField&&!!locationField.value){$H(tax.surcharge.rates).each(function(rate){if(typeof rate.value==='object'){var location=rate.value[1],surcharge=rate.value[0];if(location.toLowerCase()===locationField.value.toLowerCase()){taxRate+=Number(surcharge);throw $break;}}});}}
|
729 |
+
if(pair.value.addons){price+=pair.value.addons;}
|
730 |
+
if($(pair.key)&&$(pair.key).checked){products++;if($(pair.value.quantityField)||$(pair.value.specialPriceField)){if($(pair.value.quantityField)&&(pair.value.specialPriceField!==pair.value.quantityField)){if($(pair.value.quantityField).readAttribute('type')=="text"){price=$(pair.value.quantityField).value?price*Math.abs(parseInt($(pair.value.quantityField).value,10)):0;priceWithoutDiscount=$(pair.value.quantityField).value?priceWithoutDiscount*Math.abs(parseInt($(pair.value.quantityField).value,10)):0;quantity=Math.abs(parseInt($(pair.value.quantityField).value,10));}
|
731 |
+
else{price=price*parseInt(($(pair.value.quantityField).getSelected().text||0),10);priceWithoutDiscount=priceWithoutDiscount*parseInt(($(pair.value.quantityField).getSelected().text||0),10);quantity=parseFloat($(pair.value.quantityField).getSelected().text);}
|
732 |
+
specialName.push({name:"Quantity",value:quantity,});if(document.querySelector('#'+parentProductKey+'_subproducts')){specialName.push({name:document.querySelector('#'+parentProductKey+'_subproducts th:first-child').textContent.trim(),value:$(pair.value.quantityField).closest("tr").querySelector("th").textContent.trim()});}}
|
733 |
+
if(subproduct){itemSubTotal[parentProductKey]+=price;}
|
734 |
+
if($(parentProductKey+'_item_subtotal')&&!isNaN(price)){if(!subproduct){$(parentProductKey+'_item_subtotal').update(parseFloat(price).formatMoney(decimal,dSeparator,tSeparator));}else{$(parentProductKey+'_item_subtotal').update(parseFloat(itemSubTotal[parentProductKey]).formatMoney(decimal,dSeparator,tSeparator));}}
|
735 |
+
if($(pair.value.quantityField)){if($(pair.value.quantityField).nodeName==="INPUT"){quantity=Math.abs(parseInt($(pair.value.quantityField).value,10));}else if($(pair.value.quantityField).nodeName==="SELECT"){quantity=parseFloat($(pair.value.quantityField).getSelected().text);}}}
|
736 |
+
if(pair.value.tax){taxAmount=price*(taxRate/100);taxAmountWithoutDiscount=priceWithoutDiscount*(taxRate/100);}
|
737 |
+
if(pair.value.shipping){var shipping=pair.value.shipping;if(shipping.firstItem){var qty=$(pair.value.quantityField)?($(pair.value.quantityField).readAttribute('type')==="text"?parseInt($(pair.value.quantityField).value):parseInt($(pair.value.quantityField).getSelected().text||0)):1;if(qty===1){productShipping=parseFloat(shipping.firstItem);}
|
738 |
+
if(qty>1){productShipping=!parseFloat(shipping.addItem)?parseFloat(shipping.firstItem):parseFloat(shipping.firstItem)+parseFloat(shipping.addItem)*(qty-1);}}else if(flatShipping==0&&shipping.flatRate){shippingTotal=flatShipping=parseFloat(shipping.flatRate);}}
|
739 |
+
taxTotal+=taxAmount;taxTotalWithoutDiscount+=taxAmountWithoutDiscount;if(!flatShipping){shippingTotal+=productShipping;}
|
740 |
+
subTotal+=price;subTotalWithoutDiscount+=priceWithoutDiscount;otherTotal+=productShipping+taxAmount;otherTotalWithoutDiscount+=productShipping+taxAmountWithoutDiscount;}else{if($(pair.key+'_item_subtotal')){$(pair.key+'_item_subtotal').update("0.00");}}
|
741 |
+
if($(pair.key)){if($('coupon-button')&&$(pair.key).checked===true&&window.paymentType==='subscription'&&Array.from(document.querySelectorAll('.jfCard')).filter(function(el){return el.dataset.type==='control_stripe'}).length>0){selected_product_id=$(pair.key).value;JotForm.checkCouponAppliedProducts();};}
|
742 |
+
if($(pair.key).checked&&price>0){var amount=isSpecialPricing?priceWithoutDiscount:parseFloat(pair.value.price);var description="";if(isSpecialPricing){specialName.forEach(function(text){description+=text.name+':'+text.value+' ';});}
|
743 |
+
pricingInformations.push({name:itemName,unit_amount:Number(amount),quantity:isSpecialPricing?1:quantity,description:description.substr(0,124)});}});if($('coupon-button')){var couponInput=$($('coupon-button').getAttribute('data-qid')+'_coupon');}
|
744 |
+
if(JotForm.discounts.total){if(subTotal>=minimum){var reduce=type==="fixed"?rate:(rate/100)*parseFloat(subTotal);subTotal=subTotal>reduce?subTotal-reduce:0;couponInput.value=code;}else{reduce=0;couponInput.value='';}
|
745 |
+
var paymentTotal=document.querySelector('.form-payment-total');if(paymentTotal){paymentTotal.parentNode.insertBefore(JotForm.discounts.container,paymentTotal);$('discount_total').update(parseFloat(reduce).formatMoney(decimal,dSeparator,tSeparator));}}
|
746 |
+
if(JotForm.payment==="paypalSPB"){otherTotal=parsePriceWithoutComma(otherTotal);otherTotalWithoutDiscount=parsePriceWithoutComma(otherTotalWithoutDiscount);}
|
747 |
+
total=subTotal+otherTotal;totalWithoutDiscount=subTotalWithoutDiscount+otherTotalWithoutDiscount;total=flatShipping>0?total+flatShipping:total;totalWithoutDiscount=flatShipping>0?totalWithoutDiscount+flatShipping:totalWithoutDiscount;if(total===0||isNaN(total)){total="0.00";totalWithoutDiscount="0.00";}
|
748 |
+
if(JotForm.discounts.shipping&&shippingTotal>0&&subTotal>=minimum){var reduce=type==="fixed"?rate:(rate/100)*parseFloat(shippingTotal);var oldShippingTotal=shippingTotal;shippingTotal=shippingTotal>reduce?shippingTotal-reduce:0;total=total-(oldShippingTotal-shippingTotal);totalWithoutDiscount=totalWithoutDiscount-(oldShippingTotal-shippingTotal);}
|
749 |
+
this.paymentTotal=Number(total);if($('creditCardTable')){if(products>0&&this.paymentTotal===0&&discounted){JotForm.setCreditCardVisibility(false);}else if($$('input[id*="paymentType_credit"]').length>0&&$$('input[id*="paymentType_credit"]')[0].checked){JotForm.setCreditCardVisibility(true);}}
|
750 |
+
if($("payment_subtotal")){$("payment_subtotal").update(parseFloat(subTotal).formatMoney(decimal,dSeparator,tSeparator));}
|
751 |
+
if($("payment_tax")){$("payment_tax").update(parseFloat(taxTotal).formatMoney(decimal,dSeparator,tSeparator));}
|
752 |
+
if($("payment_shipping")){$("payment_shipping").update(parseFloat(shippingTotal).formatMoney(decimal,dSeparator,tSeparator));}
|
753 |
+
if($("payment_total")){$("payment_total").update(parseFloat(total).formatMoney(decimal,dSeparator,tSeparator));if($("payment_total").up(".form-line")&&$("payment_total").up(".form-line").triggerEvent){$("payment_total").up(".form-line").triggerEvent("keyup");}}
|
754 |
+
if($("payment_footer_total")){$("payment_footer_total").update(parseFloat(total).formatMoney(decimal,dSeparator,tSeparator));}
|
755 |
+
var itemTotal=parsePriceWithoutComma(subTotalWithoutDiscount);var shipping=parsePriceWithoutComma(shippingTotal);totalWithoutDiscount=parsePriceWithoutComma(totalWithoutDiscount)||0;total=parsePriceWithoutComma(total)||0;taxTotalWithoutDiscount=parsePriceWithoutComma(taxTotalWithoutDiscount);taxTotal=parsePriceWithoutComma(taxTotal);var count=0;for(var propt in JotForm.discounts){count++;}
|
756 |
+
var isDiscount=count>0;var discount=parsePriceWithoutComma(Math.abs((itemTotal+shipping+taxTotal)-total));discount=isDiscount?discount:0;JotForm.pricingInformations={items:pricingInformations,general:{net_amount:total,total_amount:totalWithoutDiscount,item_total:itemTotal,tax_total:taxTotal,shipping:shipping,discount:discount,currency:currency}};function parsePriceWithoutComma(price){return parseFloat(parseFloat(price).formatMoney(decimal,dSeparator,""));}},prices:{},setCreditCardVisibility:function(show){if(show){$('creditCardTable').show();}else{$('creditCardTable').hide();}},totalCounter:function(prices){if(!Number.prototype.formatMoney){Number.prototype.formatMoney=function(c,d,t){var temp=(typeof this.toString().split('.')[1]!=='undefined'&&this.toString().split('.')[1].length>c&&this.toString().charAt(this.toString().length-1)==='5')?this.toString()+'1':this.toString();var n=parseFloat(temp),c=isNaN(c=Math.abs(c))?2:c,d=d===undefined?".":d,t=t===undefined?",":t,s=n<0?"-":"",i=parseInt(n=Math.abs(+n||0).toFixed(c))+"",j=(j=i.length)>3?j%3:0;return s+(j?i.substr(0,j)+t:"")+i.substr(j).replace(/(\d{3})(?=\d)/g,"$1"+t)+(c?d+Math.abs(n-i).toFixed(c).slice(2):"");};}
|
757 |
+
JotForm.prices=prices;document.observe('dom:loaded',JotForm.countTotal(prices));$H(prices).each(function(pair){if($(pair.key)){$(pair.key).observe('click',function(){JotForm.countTotal(prices);});}
|
758 |
+
if(pair.value.price=="custom"){$(pair.key+'_custom_price').stopObserving('keyup');$(pair.key+'_custom_price').observe('keyup',function(){JotForm.countTotal(prices);});}
|
759 |
+
if(pair.value.tax){var surcharge=pair.value.tax.surcharge;if($$('select[id*="input_'+surcharge.field+'"]').length>0){$$('select[id*="input_'+surcharge.field+'"]')[0].stopObserving('change');$$('select[id*="input_'+surcharge.field+'"]')[0].observe('change',function(){setTimeout(JotForm.countTotal(),500);});}
|
760 |
+
if($$('input[id="input_'+surcharge.field+'"]').length>0){$$('input[id="input_'+surcharge.field+'"]')[0].stopObserving('keyup');$$('input[id="input_'+surcharge.field+'"]')[0].observe('keyup',function(){setTimeout(JotForm.countTotal(),500);});}}
|
761 |
+
var triggerAssociatedElement=function(el){var prodID=$(el).id.match(/input_([0-9]*)_quantity_/)||$(el).id.match(/input_([0-9]*)_custom_/);setTimeout(function(){if(prodID&&$('id_'+prodID[1])){$('id_'+prodID[1]).triggerEvent('click');}
|
762 |
+
var productItem=el.up(".form-product-item");if(productItem&&productItem.down("input")&&productItem.down("input").validateInput){productItem.down("input").validateInput();}},100);};if($(pair.value.quantityField)){function countQuantityTotal(){if(JotForm.isVisible($(pair.value.quantityField))){if($(pair.value.quantityField).tagName!=='SELECT'||$(pair.value.quantityField).getSelected().index>0||$(pair.value.quantityField).getValue()==="0")
|
763 |
+
{var productWithSubProducts=$(pair.value.quantityField).up('.form-product-item').down('.form-product-has-subproducts');if(productWithSubProducts){productWithSubProducts.checked=false;$H(prices).each(function(pr){if(pr.key.indexOf(productWithSubProducts.id)!==-1&&!($(pr.value.quantityField).getValue()<=0)){productWithSubProducts.checked=true;}})}else{if($(pair.key)){$(pair.key).checked=!($(pair.value.quantityField).getValue()<=0)?true:false;}}}
|
764 |
+
JotForm.countTotal(prices);}}
|
765 |
+
$(pair.value.quantityField).observe('change',function(){setTimeout(countQuantityTotal,50);triggerAssociatedElement(this);});$(pair.value.quantityField).observe('keyup',function(){setTimeout(countQuantityTotal,50);triggerAssociatedElement(this);});}
|
766 |
+
if($(pair.value.specialPriceField)){function countSpecialTotal(){if(JotForm.isVisible($(pair.value.specialPriceField))){if($(pair.value.specialPriceField).tagName!=='SELECT'||$(pair.value.specialPriceField).getSelected().index>0){if($(pair.key)){$(pair.key).checked=true;}}
|
767 |
+
JotForm.countTotal(prices);}}
|
768 |
+
$(pair.value.specialPriceField).observe('change',function(){setTimeout(countSpecialTotal,50);triggerAssociatedElement(this);});$(pair.value.specialPriceField).observe('keyup',function(){setTimeout(countSpecialTotal,50);});}});},discounts:{},handleCoupon:function(){var $this=this;JotForm.countTotal(JotForm.prices);if($('coupon-button')){var cb=$('coupon-button'),cl=$('coupon-loader'),cm=$('coupon-message'),ci=$('coupon-input');cb.innerHTML=this.paymentTexts.couponApply;var formID=$$('input[name="formID"]')[0].value;ci.observe('keypress',function(e){if(e.keyCode===13){e.preventDefault();cb.click();ci.blur();}});ci.enable();$$('input[name="coupon"]')[0].value="";cb.observe('click',function(){if(ci.value){cb.hide();cl.show();ci.value=ci.value.replace(/\s/g,"");cb.disable();var isStripe=((ci.hasAttribute('stripe')||ci.hasAttribute('data-stripe'))&&window.paymentType==='subscription');var a=new Ajax.Jsonp(JotForm.server,{parameters:{action:'checkCoupon',coupon:ci.value,formID:formID,stripe:isStripe,editMode:JotForm.isEditMode(),paymentID:$$('input[name="simple_fpc"]')[0].value},evalJSON:'force',onComplete:function(t){t=t.responseJSON||t;if(t.success){if(t.message.indexOf('{')===-1){if(t.message==="expired"){cm.innerHTML=$this.paymentTexts.couponExpired;}else{cm.innerHTML=$this.paymentTexts.couponInvalid;}
|
769 |
+
cm.removeClassName('valid');cm.addClassName('invalid');ci.select();cl.hide();cb.show();cb.enable();}else{cl.hide();cb.show();cm.innerHTML=$this.paymentTexts.couponValid;cm.removeClassName('invalid')
|
770 |
+
cm.addClassName('valid');JotForm.applyCoupon(t.message);}}}});}else{$('coupon-message').innerHTML=$this.paymentTexts.couponBlank;}}.bind(this));}},checkCouponAppliedProducts:function(){var cb=$('coupon-button'),cm=$('coupon-message');if(window.discounted_products){var discounted_products=Array.from(window.discounted_products);cleared_discounted_products=[];discounted_products.forEach(function(element,index){if(typeof(element)==="string"||typeof(element)==="number"){cleared_discounted_products[index]=element.toString();if(cleared_discounted_products.includes(selected_product_id)===true||cleared_discounted_products[0]==="all"){cb.innerHTML='Change';cm.innerHTML="Coupon is valid.";}else{cb.enable();var coupon_code_entered=document.querySelectorAll('div#coupon-container > div#coupon-table > div.jfField.isFilled').length;if(coupon_code_entered&&coupon_code_entered!==0){cm.innerHTML="<span style='color:red; '>Coupon code is not valid for this product.</span>";};}
|
771 |
+
$('coupon-button').addEventListener('click',function(){cm.innerHTML="";});}});}},applyCoupon:function(discount){var $this=this;discount=JSON.parse(discount);window.discounted_products=[];if(discount.products&&discount.products[0]){discount.products.forEach(function(element,index){window.discounted_products[index]=element;});}
|
772 |
+
JotForm.discounts={};var cb=$('coupon-button'),cl=$('coupon-loader'),cm=$('coupon-message'),ci=$('coupon-input'),cf=$(cb.getAttribute('data-qid')+'_coupon');cb.stopObserving('click');if(cf){cf.value=discount.code;}
|
773 |
+
cb.enable();ci.disable();cb.innerHTML=this.paymentTexts.couponChange||'Change';cb.observe('click',function(){if(JotForm.isEditMode()){return;}
|
774 |
+
cf.value='';$H(oldPrices).each(function(pair){pair[1].remove();});if(JotForm.discounts.container){JotForm.discounts.container.remove();}
|
775 |
+
$$('span[id*="_price"]').each(function(field,id){$(field).removeClassName('underlined');});$$('span[id*="_setupfee"]').each(function(field,id){$(field).removeClassName('underlined');});JotForm.discounts={};cb.stopObserving('click');cm.innerHTML="";cb.innerHTML=$this.paymentTexts.couponApply;ci.enable();ci.select();JotForm.handleCoupon();});var pair=[],oldPrices={};var displayOldPrice=function(container,id){oldPrices[id]=new Element('span');var span=new Element('span',{style:'text-decoration:line-through; display:inline-block;'});span.insert(container.innerHTML.replace("price","price_old"));oldPrices[id].insert({top:' '});oldPrices[id].insert(span);oldPrices[id].insert({bottom:' '});container.insert({top:oldPrices[id]});}
|
776 |
+
if(discount.products&&discount.products.length>0){if(discount.products.include('all')){discount.products=[];for(var key in productID){discount.products.push(productID[key].slice(-4));}}}
|
777 |
+
if(!discount.paymentType||(discount.paymentType&&discount.paymentType==="product")){if(discount.apply==="product"){$A(discount.products).each(function(pid){JotForm.discounts[pid]=discount.rate+'-'+discount.type;$$('span[id*="_price"]').each(function(field,id){if(field.id.indexOf(pid)>-1){$(field).addClassName('underlined');}});if($$('label[for*="'+pid+'"] span.form-product-details b')[0]){displayOldPrice($$('label[for*="'+pid+'"] span.form-product-details b')[0],pid);}
|
778 |
+
if($$('[id*='+pid+'_subproducts]').length>0&&$$('[id*='+pid+'_subproducts]')[0].down('.form-product-child-price')){$$('#'+$$('[id*='+pid+'_subproducts]')[0].id+' .form-product-child-price').each(function(field,id){displayOldPrice(field,pid+'_'+id);});}});}else if(discount.apply==="total"){JotForm.discounts={total:true,code:discount.code,minimum:discount.minimum,type:discount.type,rate:discount.rate};var totalContainer=document.querySelector('.form-payment-total');if(totalContainer){var discountHTML=totalContainer.innerHTML.replace('Total:','Discount:').replace('payment_total','discount_total').replace('<span>','<span> - ');JotForm.discounts.container=new Element('span',{'class':'form-payment-discount'}).insert(discountHTML);}}else{JotForm.discounts={shipping:true,code:discount.code,minimum:discount.minimum,type:discount.type,rate:discount.rate};}}else{$A(discount.products).each(function(pid){JotForm.discounts[pid]=discount.rate+'-'+discount.type;if(discount.apply){JotForm.discounts[pid]+="-"+discount.apply;}
|
779 |
+
if(discount.duration&&discount.duration===1){JotForm.discounts[pid]+="-once";}
|
780 |
+
$$('span[id*="_price"]').each(function(field,id){if(field.id.indexOf(pid)>-1&&$$('span[id*="'+pid+'_setupfee"]').length>0&&discount.apply==="all"){$(field).addClassName('underlined');throw $break;}});$$('span[id*="_setupfee"]').each(function(field,id){if(field.id.indexOf(pid)>-1){$(field).addClassName('underlined');throw $break;}});});}
|
781 |
+
JotForm.countTotal(JotForm.prices);},setStripeSettings:function(pubkey,add_qid){if(JotForm.isEditMode()||document.get.sid){return;}
|
782 |
+
if((pubkey||add_qid)&&typeof Stripe==='function'&&typeof Stripe.setPublishableKey==='function'&&typeof _StripeValidation==='function'){var clean_pubkey=pubkey.replace(/\s+/g,'');if(clean_pubkey==''){console.log('Stripe publishable key is empty. You need to connect your form using Stripe connect.');return;}
|
783 |
+
Stripe.setPublishableKey(clean_pubkey);var stripeV=new _StripeValidation();stripeV.setAddress_qid(add_qid);stripeV.init();}},setFilePickerIOUpload:function(options){if(options&&typeof filepicker==="object"&&typeof _JF_filepickerIO==="function"){var fp=new _JF_filepickerIO(options);fp.init();}else{console.error("filepicker OR _JF_filepickerIO object library are missing");}},initCaptcha:function(id){setTimeout(function(){var UA=navigator.userAgent.toLowerCase(),IE=(UA.indexOf('msie')!=-1)?parseInt(UA.split('msie')[1],10):false;if(IE&&IE<9){if(UA.indexOf('windows nt 5.1')!=-1||UA.indexOf('windows xp')!=-1||UA.indexOf('windows nt 5.2')!=-1){JotForm.server="https://www.jotform.com/server.php";}}
|
784 |
+
var a=new Ajax.Jsonp(JotForm.url+"captcha",{evalJSON:'force',onComplete:function(t){t=t.responseJSON||t;if(t.success){$(id+'_captcha').src=t.img;$(id+'_captcha_id').value=t.num;}}});},150);},reloadCaptcha:function(id){$(id+'_captcha').src=JotForm.url+'images/blank.gif';JotForm.initCaptcha(id);},addZeros:function(n,totalDigits){n=n.toString();var pd='';if(totalDigits>n.length){for(i=0;i<(totalDigits-n.length);i++){pd+='0';}}
|
785 |
+
return pd+n.toString();},formatDate:function(d){var date=d.date;var month=JotForm.addZeros(date.getMonth()+1,2);var day=JotForm.addZeros(date.getDate(),2);var year=date.getYear()<1000?date.getYear()+1900:date.getYear();var id=d.dateField.id.replace(/\w+\_/gim,'');$('month_'+id).value=month;$('day_'+id).value=day;$('year_'+id).value=year;if($('lite_mode_'+id)){var lite_mode=$('lite_mode_'+id);var seperator=lite_mode.readAttribute('seperator')||lite_mode.readAttribute('data-seperator');var format=lite_mode.readAttribute('format')||lite_mode.readAttribute('data-format');var newValue=month+seperator+day+seperator+year;if(format=='ddmmyyyy'){newValue=day+seperator+month+seperator+year;}else if(format=='yyyymmdd'){newValue=year+seperator+month+seperator+day;}
|
786 |
+
lite_mode.value=newValue;}
|
787 |
+
$('id_'+id).fire('date:changed');},highLightLines:function(){$$('.form-line').each(function(l,i){l.select('input, select, textarea, div, table div, button').each(function(i){i.observe('focus',function(){if(JotForm.isCollapsed(l)){JotForm.getCollapseBar(l).run('click');}
|
788 |
+
if(!JotForm.highlightInputs){return;}
|
789 |
+
l.addClassName('form-line-active');if(l.__classAdded){l.__classAdded=false;}}).observe('blur',function(){if(!JotForm.highlightInputs){return;}
|
790 |
+
l.removeClassName('form-line-active');});});});},getForm:function(element){element=$(element);if(!element.parentNode){return false;}
|
791 |
+
if(element&&element.tagName=="BODY"){return false;}
|
792 |
+
if(element.tagName=="FORM"){return $(element);}
|
793 |
+
return JotForm.getForm(element.parentNode);},getContainer:function(element){element=$(element);if(!element.parentNode){return false;}
|
794 |
+
if(element&&element.tagName=="BODY"){return false;}
|
795 |
+
if(element.hasClassName("form-line")){return $(element);}
|
796 |
+
return JotForm.getContainer(element.parentNode);},getSection:function(element){element=$(element);if(!element.parentNode){return false;}
|
797 |
+
if(element&&element.tagName=="BODY"){return false;}
|
798 |
+
if((element.hasClassName("form-section-closed")||element.hasClassName("form-section"))&&!element.id.match(/^section_/)){return element;}
|
799 |
+
return JotForm.getSection(element.parentNode);},getCollapseBar:function(element){element=$(element);if(!element.parentNode){return false;}
|
800 |
+
if(element&&element.tagName=="BODY"){return false;}
|
801 |
+
if(element.hasClassName("form-section-closed")||element.hasClassName("form-section")){return element.select('.form-collapse-table')[0];}
|
802 |
+
return JotForm.getCollapseBar(element.parentNode);},isCollapsed:function(element){element=$(element);if(!element.parentNode){return false;}
|
803 |
+
if(element&&element.tagName=="BODY"){return false;}
|
804 |
+
if(element.className=="form-section-closed"){return true;}
|
805 |
+
return JotForm.isCollapsed(element.parentNode);},isVisible:function(element){element=$(element);if(!element.parentNode){return false;}
|
806 |
+
if(element.hasClassName('always-hidden')){return false;}
|
807 |
+
if(element&&element.tagName=="BODY"){return true;}
|
808 |
+
if(element.hasClassName("form-textarea")&&element.up('div').down('.nicEdit-main')&&(element.up('.form-line')&&JotForm.isVisible(element.up('.form-line')))){return true;}
|
809 |
+
if(element.style.display=="none"||element.style.visibility=="hidden"||element.hasClassName('js-non-displayed-page')){return false;}
|
810 |
+
return JotForm.isVisible(element.parentNode);},sectionHasVisibleiFrameWidgets:function(section){var elements=section.select('.custom-field-frame');var hasVisible=false;elements.each(function(el){if(JotForm.isVisible(el)){hasVisible=true;throw $break;}});return hasVisible;},enableDisableButtonsInMultiForms:function(){var allButtons=$$('.form-submit-button');allButtons.each(function(b){if(b.up('ul.form-section')){if(b.up('ul.form-section').style.display=="none"||b.up('ul.form-section').hasClassName('js-non-displayed-page')){b.disable();}else{if(b.className.indexOf("disabled")==-1&&!b.hasClassName("conditionallyDisabled")){b.enable();}}}});},enableButtons:function(){setTimeout(function(){$$('.form-submit-button').each(function(b){if(!b.hasClassName("conditionallyDisabled")){b.enable();}
|
811 |
+
if(b.innerHTML.indexOf('<img')===-1&&b.type==='submit'){b.innerHTML=b.oldText||'Submit';}});},60);},disableButtons:function(){setTimeout(function(){$$('.form-submit-button').each(function(b){if(b.innerHTML.indexOf('<img')===-1){b.innerHTML=JotForm.texts.pleaseWait;}
|
812 |
+
b.addClassName('lastDisabled');b.disable();});},60);},setButtonActions:function(){$$('.form-submit-button:not(.forReviewButton)').each(function(b){b.oldText=b.innerHTML;b.enable();if(getQuerystring('qp')===""){b.observe('click',function(){setTimeout(function(){if(!$$('.form-error-message')[0]&&!$$('.form-textarea-limit-indicator-error')[0]){var allButtons=$$('.form-submit-button');allButtons.each(function(bu){if(true){if(bu.innerHTML.indexOf('<img')===-1&&bu.type==='submit'){bu.innerHTML=JotForm.texts.pleaseWait;}
|
813 |
+
bu.addClassName('lastDisabled');bu.disable();}});}},50);});}});$$('.form-submit-reset').each(function(b){b.onclick=function(){if(!confirm(JotForm.texts.confirmClearForm)){return false;}else{if(JotForm.payment&&$$('span[id*="_item_subtotal"]').length>0){var zeroValue='0';if(!!JotForm.currencyFormat.decimal){zeroValue='0'+JotForm.currencyFormat.dSeparator+'00';}
|
814 |
+
$$('span[id*="_item_subtotal"]').each(function(el){el.update(zeroValue);});}
|
815 |
+
if(/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())&&$('coupon-button')){setTimeout(function(){if($('payment_total')){JotForm.totalCounter(JotForm.prices);}},40);return true;}}
|
816 |
+
$$(".form-line-error").each(function(tmp){tmp.removeClassName("form-line-error");});$$(".form-error-message",".form-button-error").each(function(tmp){tmp.remove();});$$(".form-textarea-limit-indicator > span").each(function(tmp){var raw=tmp.innerHTML;tmp.innerHTML=raw.replace(raw.substring(0,raw.indexOf("/")),"0");});$$("span[id^=grade_point_]").each(function(tmp){tmp.innerHTML=0;});$$(".form-grading-error").each(function(tmp){tmp.innerHTML="";});var autofill=$$('form')[0].readAttribute('data-autofill');if(autofill){setTimeout(function(){for(var inputId in JotForm.defaultValues){var input=$(inputId);if(input&&(input.type=="radio"||input.type=="checkbox")){input.checked=true;}}
|
817 |
+
var formID=$$('form').first().readAttribute('id')+$$('form').first().readAttribute('name');var autoFillInstance=AutoFill.getInstance(formID);if(autoFillInstance){if(window.location.href.indexOf('jotform.pro')===-1){autoFillInstance.saveAllData();}}},40);}
|
818 |
+
setTimeout(function(){$$('.custom-hint-group').each(function(element){element.hasContent=(element.value&&element.value.replace(/\n/gim,"<br>")!=element.readAttribute('data-customhint'))?true:false;element.showCustomPlaceHolder();});},30);setTimeout(function(){$$('.nicEdit-main').each(function(richArea){var txtarea=richArea.up('.form-line').down('textarea');if(txtarea){if(txtarea.hasClassName('custom-hint-group')&&!txtarea.hasContent){richArea.setStyle({'color':'#babbc0'});}else{richArea.setStyle({'color':''});}
|
819 |
+
richArea.innerHTML=txtarea.value;}});},40);setTimeout(function(){if($('coupon-button')&&$('coupon-button').triggerEvent){$('coupon-button').triggerEvent("click");}
|
820 |
+
if($('payment_total')){JotForm.totalCounter(JotForm.prices);}},40);setTimeout(function(){$$('input.form-widget').each(function(node){node.value='';node.fire('widget:clear',{qid:parseInt(node.id.split('_')[1])});});},40);setTimeout(function(){$$('.currentDate').each(function(el){var id=el.id.replace(/day_/,"");JotForm.formatDate({date:(new Date()),dateField:$('id_'+id)});});$$('.currentTime').each(function(el){if(el.up(".form-line")){var id=el.up(".form-line").id.replace("id_","");if($("hour_"+id)){JotForm.displayLocalTime("hour_"+id,"min_"+id,"ampm_"+id);}else{JotForm.displayLocalTime("input_"+id+"_hourSelect","input_"+id+"_minuteSelect","input_"+id+"_ampm")}}});},40);setTimeout(function(){JotForm.runAllConditions();},50);};});$$('.form-submit-print').each(function(print_button){print_button.observe("click",function(){$(print_button.parentNode).hide();var hidden_nicedits_arr=[];var nicedit_textarea_to_hide=[];$$('.form-textarea, .form-textbox').each(function(el){if(!el.type){el.value=el.value||'0';}
|
821 |
+
var dateSeparate;if(dateSeparate=el.next('.date-separate')){dateSeparate.hide();}
|
822 |
+
var elWidth="";if(el.value.length<el.size){elWidth="width:"+el.size*9+"px;";}
|
823 |
+
if(el.id.indexOf("_area")!=-1||el.id.indexOf("_phone")!=-1||(el.id.indexOf("_country")!=-1&&el.readAttribute('type')=='tel')){elWidth+=" display:inline-block;"}
|
824 |
+
if(el.hasClassName("form-textarea")&&"nicEditors"in window){$$("#cid_"+el.id.split("_")[1]+" > div:nth-child(1)").each(function(tmpel){if(tmpel.readAttribute("unselectable")=="on"){$$("#cid_"+el.id.split("_")[1]+" > div")[0].hide();$$("#cid_"+el.id.split("_")[1]+" > div")[1].setStyle({borderTopStyle:'solid',borderWidth:'1px',borderTopColor:'rgb(204, 204, 204)'});hidden_nicedits_arr.push($$("#cid_"+el.id.split("_")[1]+" > div")[0]);nicedit_textarea_to_hide.push(el);}});}});window.print();for(var i=0;i<hidden_nicedits_arr.length;i++){hidden_nicedits_arr[i].show();}
|
825 |
+
for(var i=0;i<nicedit_textarea_to_hide.length;i++){nicedit_textarea_to_hide[i].hide();}
|
826 |
+
$(print_button.parentNode).show();});});},hasHiddenValidationConflicts:function(input){var hiddenOBJ=input.up('li.form-line');return hiddenOBJ&&(hiddenOBJ.hasClassName('form-field-hidden')||hiddenOBJ.up('ul.form-section').hasClassName('form-field-hidden'));},initGradingInputs:function(){var _this=this;$$('.form-grading-input').each(function(item){item.observe('blur',function(){item.validateGradingInputs();});item.observe('keyup',function(){item.validateGradingInputs();});item.validateGradingInputs=function(){var item=this,id=item.id.replace(/input_(\d+)_\d+/,"$1"),total=0,_parentNode=$(item.parentNode.parentNode),numeric=/^(\d+[\.]?)+$/,isNotNumeric=false;if(window.FORM_MODE==='cardform'){_parentNode=_parentNode.parentNode;}
|
827 |
+
item.errored=false;_parentNode.select(".form-grading-input").each(function(sibling){if(sibling.value&&!numeric.test(sibling.value)){isNotNumeric=true;throw $break;}
|
828 |
+
total+=parseFloat(sibling.value)||0;});if(_this.hasHiddenValidationConflicts(item))return JotForm.corrected(item);if(isNotNumeric){return JotForm.errored(item,JotForm.texts.numeric);}
|
829 |
+
if($("grade_total_"+id)){$("grade_error_"+id).innerHTML="";var allowed_total=parseFloat($("grade_total_"+id).innerHTML);$("grade_point_"+id).innerHTML=total;if(total>allowed_total){$("grade_error_"+id).innerHTML=' '+JotForm.texts.lessThan+' <b>'+allowed_total+'</b>.';return JotForm.errored(item,JotForm.texts.gradingScoreError+" "+allowed_total);}
|
830 |
+
else{return JotForm.corrected(item);}}else{return JotForm.corrected(item);}}});},initSpinnerInputs:function(){var _this=this;$$('.form-spinner-input').each(function(item){item.observe('blur',function(){item.validateSpinnerInputs();}).observe('change',function(){item.validateSpinnerInputs();});var c_parent=item.up('.form-spinner'),c_up=c_parent.select('.form-spinner-up')[0],c_down=c_parent.select('.form-spinner-down')[0];c_up.observe('click',function(e){item.validateSpinnerInputs();});c_down.observe('click',function(e){item.validateSpinnerInputs();});item.validateSpinnerInputs=function(){var item=this,id=item.id.replace(/input_(\d+)_\d+/,"$1"),numeric=/^(-?\d+[\.]?)+$/,numericDotStart=/^([\.]\d+)+$/,userInput=item.value||0;item.errored=false;if(!JotForm.isVisible(item))return JotForm.corrected(item);if(userInput&&!numeric.test(userInput)&&!numericDotStart.test(userInput)){return JotForm.errored(item,JotForm.texts.numeric);}
|
831 |
+
if(item.hasClassName("disallowDecimals")&&userInput%1!=0){return JotForm.errored(item,JotForm.texts.disallowDecimals);}
|
832 |
+
var min_val=parseInt(item.readAttribute('data-spinnermin'))||false,max_val=parseInt(item.readAttribute('data-spinnermax'))||false;if(min_val&&userInput<min_val){return JotForm.errored(item,JotForm.texts.inputCarretErrorA+" "+min_val);}
|
833 |
+
else if(max_val&&userInput>max_val){return JotForm.errored(item,JotForm.texts.inputCarretErrorB+" "+max_val);}
|
834 |
+
else{return JotForm.corrected(item);}}});},initNumberInputs:function(){var _this=this;$$('.form-number-input').each(function(item){item.observe('blur',function(){item.validateNumberInputs();}).observe('change',function(){item.validateNumberInputs();}).observe('keyup',function(){item.validateNumberInputs();}).observe('keypress',function(event){if(event.metaKey||event.ctrlKey){return;}
|
835 |
+
var controlKeys=[8,9,13,35,36,37,39];var isControlKey=controlKeys.join(",").match(new RegExp(event.which));if(!event.which||(48<=event.which&&event.which<=57)||(46==event.which)||(45==event.which)||(43==event.which)||isControlKey){if(event.which!=8&&event.which!=0&&event.which!=13&&(parseInt(this.value.length)>=parseInt(item.readAttribute('maxlength'))||(event.which<45||event.which>57))){event.preventDefault();}else{return;}}else{event.preventDefault();}});item.validateNumberInputs=function(){var item=this,id=item.id.replace(/input_(\d+)_\d+/,"$1"),numeric=/^-?(\d+[\.]?)+$|([\.]\d+)+$/;item.errored=false;if(!JotForm.isVisible(item))return JotForm.corrected(item);if(item.value!==''&&!numeric.test(item.value)&&item.hinted!==true){return JotForm.errored(item,JotForm.texts.numeric);}
|
836 |
+
var min_val=parseInt(item.readAttribute('data-numbermin')),max_val=parseInt(item.readAttribute('data-numbermax')),max_len=parseInt(item.readAttribute('maxlength'));if(max_len&&item.value&&item.value.length>max_len){return JotForm.errored(item,JotForm.texts.maxDigitsError+" "+max_len);}
|
837 |
+
else if((min_val||min_val==0)&&parseInt(item.value)<min_val){return JotForm.errored(item,JotForm.texts.inputCarretErrorA+" "+min_val);}
|
838 |
+
else if((max_val||max_val==0)&&parseInt(item.value)>max_val){return JotForm.errored(item,JotForm.texts.inputCarretErrorB+" "+max_val);}
|
839 |
+
else{var error=false
|
840 |
+
if(item.up('.form-matrix-table')){item.up('.form-matrix-table').select('input').each(function(el){if((el!==item)&&el.hasClassName('form-validation-error')){error=true;}});}
|
841 |
+
if(!error){return JotForm.corrected(item);}}}});},backStack:[],currentSection:false,autoNext:function(id){if(!$("cid_"+id))return;var prev=$("cid_"+id).previous();if(!prev)return;var type=prev.readAttribute('data-type');if(type!=='control_radio'&&type!=='control_dropdown')return;prev.observe("change",function(e){if(!JotForm.isVisible(prev)||e.target.value===''){return;}
|
842 |
+
var nextButton=$("cid_"+id).down('.form-pagebreak-next')
|
843 |
+
if(nextButton&&nextButton.triggerEvent){nextButton.focus();nextButton.setStyle({'fontWeight':'bold'});setTimeout(function(){nextButton.setStyle({'fontWeight':'inherit'})
|
844 |
+
nextButton.triggerEvent('mousedown');nextButton.triggerEvent('click');},800);}});},handlePages:function(){var $this=this;var pages=[];var last;if($$('.form-label-left').length>0){var labelWidth=parseInt($$('.form-label-left')[0].getStyle('width')),formWidth=parseInt($$('.form-all')[0].getStyle('width')),backButtonWidth=labelWidth>formWidth/2?formWidth/2:labelWidth;$$('.form-pagebreak-back-container').each(function(back){if(back.style.width===''){back.style.width=(backButtonWidth-14)+'px';}});}
|
845 |
+
$$('.form-pagebreak').each(function(page,i){var section=$(page.parentNode.parentNode);if(i>=1){section.hide();}else{JotForm.currentSection=section;}
|
846 |
+
pages.push(section);section.pagesIndex=i+1;function stopEnterKey(evt){var evt=(evt)?evt:((event)?event:null);var node=(evt.target)?evt.target:((evt.srcElement)?evt.srcElement:null);if(evt.keyCode==13&&["text","radio","checkbox","select-one","select-multiple"].include(node.type)){return false;}
|
847 |
+
if((evt.keyCode==13||evt.which==32)&&evt.target.hasClassName('form-pagebreak-next')&&evt.target.triggerEvent){evt.target.triggerEvent('mousedown');}}
|
848 |
+
document.onkeypress=stopEnterKey;var checkLanguageDropdownPage=function(){if(typeof FormTranslation!=='undefined'&&FormTranslation.properties&&FormTranslation.properties.firstPageOnly==='1'){var dd=$$(".language-dd").length>0?$$(".language-dd").first():false;if(!dd)return;JotForm.currentSection===pages.first()?dd.show():dd.hide();}}
|
849 |
+
var form=JotForm.getForm(section)
|
850 |
+
section.select('.form-pagebreak-next').invoke('observe','click',function(){if(JotForm.saving||JotForm.loadingPendingSubmission){return;}
|
851 |
+
if(JotForm.validateAll(form,section)||getQuerystring('qp')!==""){if(!$this.noJump&&window.parent&&window.parent!=window){window.parent.postMessage('scrollIntoView::'+form.id,'*');}
|
852 |
+
if(!JotForm.nextPage){var sections=$$('.form-all > .page-section');for(var i=sections.indexOf(section);i<sections.length;i++){if(JotForm.hidePages[parseInt(i,10)+2]===true){continue;}
|
853 |
+
JotForm.nextPage=sections[parseInt(i,10)+1];break;}}
|
854 |
+
if(JotForm.nextPage){JotForm.backStack.push(JotForm.hideFormSection(section));JotForm.currentSection=JotForm.showFormSection(JotForm.nextPage);if(!$this.noJump){JotForm.currentSection.scrollIntoView(true);}
|
855 |
+
JotForm.enableDisableButtonsInMultiForms();}else if(section.next()){JotForm.backStack.push(JotForm.hideFormSection(section));JotForm.currentSection=JotForm.showFormSection(section.next());if(!$this.noJump&&window.parent==window){JotForm.currentSection.scrollIntoView(true);}
|
856 |
+
JotForm.enableDisableButtonsInMultiForms();}
|
857 |
+
JotForm.nextPage=false;if(JotForm.saveForm){JotForm.hiddenSubmit(JotForm.getForm(section));}
|
858 |
+
JotForm.iframeHeightCaller();JotForm.runAllCalculations(true);checkLanguageDropdownPage();if(JotForm.currentSection){JotForm.currentSection.select(".form-html").each(function(textEl){if(textEl.innerHTML.match(/google.*maps/gi)){textEl.innerHTML=textEl.innerHTML;}});}}else{try{$$('.form-button-error').invoke('remove');$$('.form-pagebreak-next').each(function(nextButton){var errorBox=new Element('div',{className:'form-button-error'});errorBox.insert(JotForm.texts.generalPageError);$(nextButton.parentNode.parentNode).insert(errorBox);});}catch(e){}}});section.select('.form-pagebreak-back').invoke('observe','click',function(){if(!$this.noJump&&window.parent&&window.parent!=window){window.parent.postMessage('scrollIntoView::'+form.id,'*');}
|
859 |
+
if(JotForm.saving||JotForm.loadingPendingSubmission){return;}
|
860 |
+
JotForm.hideFormSection(section);var sections=$$('.form-all > .page-section');var prevPage=JotForm.backStack.pop();while(JotForm.backStack.length>0){var pageNumber=sections.indexOf(prevPage)+1;if(JotForm.hidePages[pageNumber]===true){prevPage=JotForm.backStack.pop();continue;}
|
861 |
+
break;}
|
862 |
+
JotForm.currentSection=JotForm.showFormSection(prevPage);if(!$this.noJump&&window.parent==window){JotForm.currentSection.scrollIntoView(true);}
|
863 |
+
JotForm.nextPage=false;JotForm.enableDisableButtonsInMultiForms();if(JotForm.saveForm){JotForm.hiddenSubmit(JotForm.getForm(section));}
|
864 |
+
$$('.form-button-error').invoke('remove');JotForm.iframeHeightCaller();checkLanguageDropdownPage();setTimeout(function(){JotForm.runAllCalculations(true);},10);});});if(pages.length>0){var allSections=$$('.form-section:not([id^=section_])');if(allSections.length>0){last=allSections[allSections.length-1];}
|
865 |
+
if(last){last.pagesIndex=allSections.length;pages.push(last);last.hide();var li=new Element('li',{className:'form-input-wide'});var cont=new Element('div',{className:'form-pagebreak'});var backCont=new Element('div',{className:'form-pagebreak-back-container'});var back=$$('.form-pagebreak-back-container')[0].select('button')[0];back.observe('click',function(){if(JotForm.saving){return;}
|
866 |
+
last.hide();JotForm.nextPage=false;});backCont.insert(back);cont.insert(backCont);li.insert(cont);last.insert(li);}}},jumpToPage:function(){var page=document.get.jumpToPage;var sections=$$('.form-section:not([id^=section_])');if(!(page&&page>1)||page>sections.length)return;JotForm.hideFormSection(sections[0]);JotForm.showFormSection(sections[page-1]);if(page>1)JotForm.backStack=sections.splice(0,page-1);JotForm.runAllCalculations(true);},hideFormSection:function(section){section.addClassName('js-non-displayed-page');section.style.display='';section.style.position='absolute';section.style.top='-9999px';section.style.left='-9999px';return section;},showFormSection:function(section){section.removeClassName('js-non-displayed-page');section.style.display='';section.style.position='';section.style.top='';section.style.left='';return section;},handleFormCollapse:function(){var $this=this;var openBar=false;var openCount=0;$$('.form-collapse-table').each(function(bar){var section=$(bar.parentNode.parentNode);if(section.className=="form-section-closed"){section.closed=true;}else{if(section.select('.form-collapse-hidden').length<0){openBar=section;openCount++;}}
|
867 |
+
bar.observe('click',function(){if(section.closed){section.setStyle('overflow:visible; height:auto');var h=section.getHeight();if(openBar&&openBar!=section&&openCount<=1){openBar.className="form-section-closed";openBar.shift({height:60,duration:0.5});openBar.select('.form-collapse-right-show').each(function(e){e.addClassName('form-collapse-right-hide').removeClassName('form-collapse-right-show');});openBar.setStyle("overflow:hidden;");openBar.closed=true;}
|
868 |
+
openBar=section;section.setStyle('overflow:hidden; height:60px');setTimeout(function(){section.scrollTop=0;section.className="form-section";},1);section.shift({height:h,duration:0.5,onStart:function(){section.select('.form-line[data-type=control_widget]').each(function(e){var field=e.id.split('_').last();JotForm.showWidget(field);});},onEnd:function(e){e.scrollTop=0;e.setStyle("height:auto; overflow:visible;");if(!$this.noJump){e.scrollIntoView();}},onStep:function(e){if(window.parent&&window.parent!=window){window.parent.postMessage('setHeight:'+$$('body')[0].getHeight(),'*');}}});section.select('.form-collapse-right-hide').each(function(e){e.addClassName('form-collapse-right-show').removeClassName('form-collapse-right-hide');});section.closed=false;if(bar.errored){bar.select(".form-collapse-mid")[0].setStyle({color:''}).select('img')[0].remove();bar.errored=false;}}else{section.scrollTop=0;section.shift({height:60,duration:0.5,onEnd:function(e){e.className="form-section-closed";},onStep:function(e){if(window.parent&&window.parent!=window){window.parent.postMessage('setHeight:'+$$('body')[0].getHeight(),'*');}}});section.setStyle("overflow:hidden;");if(openBar){openBar.select('.form-collapse-right-show').each(function(e){e.addClassName('form-collapse-right-hide').removeClassName('form-collapse-right-show');});}
|
869 |
+
section.closed=true;}
|
870 |
+
setTimeout(function(){$this.handleIFrameHeight();},510);});});},handleAuthNet:function(){var thisForm=$$('.jotform-form')[0];var paymentFieldId=$$('input[name="simple_fpc"]')[0].value;Event.observe(thisForm,'submit',function(event){JotForm.corrected($$('.cc_firstName')[0]);if(JotForm.isEditMode()){return true;}
|
871 |
+
if(JotForm.isPaymentSelected()&&JotForm.paymentTotal>0){var errors;$$('#id_'+paymentFieldId+' [class*="cc"]').each(function(cc){if(!cc.getValue()){errors=JotForm.texts.ccMissingDetails;throw $break;}});if(errors){Event.stop(event);setTimeout(function(){JotForm.errored($$('.cc_firstName')[0],errors);var cc_number=$$('.cc_number')[0];if(!cc_number.isVisible()&&!cc_number.up('li').hasClassName('form-field-hidden')&&!cc_number.up('ul').hasClassName('form-field-hidden')&&$$('ul.form-section.page-section').length>1)
|
872 |
+
{var visibleButtons=[];$$('.form-submit-button').each(function(btn){if(btn.isVisible()){visibleButtons.push(btn);}});if(visibleButtons.length<1){return;}
|
873 |
+
var lastButton=visibleButtons[visibleButtons.length-1];$$('.form-authnet-error').invoke('remove');var errorBox=new Element('div',{className:'form-button-error form-authnet-error'});errorBox.insert('<p>'+errors+'</p>');$(lastButton.parentNode.parentNode).insert(errorBox);}
|
874 |
+
JotForm.enableButtons();},500);}else{JotForm.corrected($$('.cc_firstName')[0]);}}});},handlePaypalPro:function(){if($('creditCardTable')){var thisForm=$$('.jotform-form')[0];var paymentFieldId=$$('input[name="simple_fpc"]')[0].value;Event.observe(thisForm,'submit',function(event){if(JotForm.isEditMode()){return true;}
|
875 |
+
if(JotForm.isPaymentSelected()&&JotForm.paymentTotal>0){var errors="";JotForm.corrected($$('.paymentTypeRadios')[0]);if(!$$('.paymentTypeRadios')[0].checked&&!$$('.paymentTypeRadios')[1].checked){errors="You must select a payment method";}
|
876 |
+
if($('input_'+paymentFieldId+'_paymentType_credit').checked){$$('#id_'+paymentFieldId+' [class*="cc"]').each(function(cc){if(!cc.getValue()){errors="All fields are required";throw $break;}});}
|
877 |
+
if(errors){JotForm.errored($$('.paymentTypeRadios')[0],errors);Event.stop(event);}else{JotForm.corrected($$('.paymentTypeRadios')[0]);}}});$$('.paymentTypeRadios').each(function(radio){radio.observe('click',function(){if(radio.checked&&radio.value==="express"){JotForm.setCreditCardVisibility(false);}
|
878 |
+
if(radio.checked&&radio.value==="credit"&&(JotForm.paymentTotal>0||Object.keys(JotForm.discounts).length===0)){JotForm.setCreditCardVisibility(true);}
|
879 |
+
JotForm.corrected($$('.paymentTypeRadios')[0]);JotForm.togglePaypalButtons(radio.checked&&radio.value==="express");});});}},description:function(input,message){if(message=="20"){return;}
|
880 |
+
var lineDescription=false;if(!$(input)){var id=input.replace(/[^\d]/gim,'');if($("id_"+id)){input=$("id_"+id);lineDescription=true;}else if($('section_'+id)){input=$('section_'+id);lineDescription=true;}else{return;}}
|
881 |
+
if($(input).setSliderValue){input=$($(input).parentNode);}
|
882 |
+
var cont=JotForm.getContainer(input);if(!cont){return;}
|
883 |
+
var right=false;var bubble=new Element('div',{className:'form-description'});var arrow=new Element('div',{className:'form-description-arrow'});var arrowsmall=new Element('div',{className:'form-description-arrow-small'});var content=new Element('div',{className:'form-description-content'});var indicator;if("desc"in document.get&&document.get.desc=='v2'){right=true;cont.insert(indicator=new Element('div',{className:'form-description-indicator'}));bubble.addClassName('right');}
|
884 |
+
content.insert(message);bubble.insert(arrow).insert(arrowsmall).insert(content).hide();cont.insert(bubble);if((cont.getWidth()/2)<bubble.getWidth()){bubble.setStyle('right: -'+(cont.getWidth()-(right?100:20))+'px');}
|
885 |
+
if(right){var h=indicator.measure('height');arrow.setStyle('top:'+((h/2)-20)+'px');arrowsmall.setStyle('top:'+((h/2)-17)+'px');$(cont).mouseEnter(function(){cont.setStyle('z-index:10000');if(!cont.hasClassName('form-line-active')){cont.addClassName('form-line-active');cont.__classAdded=true;}
|
886 |
+
bubble.show();},function(){if(cont.__classAdded){cont.removeClassName('form-line-active');cont.__classAdded=false;}
|
887 |
+
cont.setStyle('z-index:0');bubble.hide();});$(input).observe('keydown',function(){cont.setStyle('z-index:0');bubble.hide();});}else{if(lineDescription){$(input).addEventListener('touchstart',function(){cont.setStyle('z-index:10000');bubble.show();})
|
888 |
+
$(input).mouseEnter(function(){cont.setStyle('z-index:10000');bubble.show();})
|
889 |
+
$(input).addEventListener('mouseleave',function(){cont.setStyle('z-index:0');bubble.hide();})}else{$(cont).mouseEnter(function(){cont.setStyle('z-index:10000');bubble.show();},function(){cont.setStyle('z-index:0');bubble.hide();});$(input).observe('keyup',function(){cont.setStyle('z-index:0');bubble.hide();});$(input).observe('focus',function(){cont.setStyle('z-index:10000');bubble.show();});$(input).observe('blur',function(){cont.setStyle('z-index:0');bubble.hide();});}}},validateAll:function(form,scopeSelector){var _log=function(){if(window.location.href.indexOf('stripeDebug')!==-1){console.log.apply(console,arguments);}}
|
890 |
+
if(getQuerystring('qp')!==""){return true;}
|
891 |
+
var ret=true;if(scopeSelector==undefined){scopeSelector=$$('body')[0];}
|
892 |
+
scopeSelector.select('.form-textarea-limit-indicator-error').each(function(limitErr){if(JotForm.isVisible(limitErr)){_log('set to false because .form-textarea-limit-indicator-error');ret=false;}});if(scopeSelector.select('.form-datetime-validation-error').first()){_log('set to false because .form-datetime-validation-error');ret=false;}
|
893 |
+
var spinnerNumberInputs=scopeSelector.select('.form-spinner-input, .form-number-input, .form-grading-input');if(spinnerNumberInputs.length>0){spinnerNumberInputs.each(function(input){var qid=input.id.split('_')[1];var type=input.readAttribute('data-type');switch(type){case'input-number':ret=(!input.validateNumberInputs())?false:ret;break;case'input-spinner':ret=(!input.validateSpinnerInputs())?false:ret;break;case'input-grading':ret=(!input.validateGradingInputs())?false:ret;break;}});}
|
894 |
+
if(window.signatureForm){_log('signature form');var pads=jQuery(".pad");for(var i=0;i<pads.length;i++){var pad=pads[i];if(jQuery(pad).attr("data-required")==="true"){var formLine=jQuery('#id_'+jQuery(pad).attr('data-id'));if(formLine.is(':visible')&&jQuery(pad).jSignature('getData','base30')[1].length==0&&!jQuery(pad).hasClass('edit-signature')){ret=false;JotForm.errored(pad,JotForm.texts.required);}else{JotForm.corrected(pad);}}}}
|
895 |
+
if(window.JCFServerCommon!==undefined){_log('widgets detected');var widgetInputs=$$('.widget-required, .widget-errored');widgetInputs.each(function(el){if(JotForm.isVisible(el)){var isReplacedWidget=el.hasClassName('widget-replaced');if(isReplacedWidget&&el.errored){JotForm.corrected(el);}
|
896 |
+
var section=el.up('.form-section');if(section.visible()&§ion.style.top!=='-9999px'){if(el.getValue().length===0){ret=(isReplacedWidget)?JotForm.errored(el,JotForm.texts.required):false;}}}});}
|
897 |
+
var c="";if(form&&form.id){c="#"+form.id+" ";}
|
898 |
+
$$(c+'*[class*="validate"]').each(function(input){if(JotForm.payment&&input.up('.form-line')){var dataType=input.up('.form-line').getAttribute('data-type');if(dataType=="control_"+JotForm.payment){var container=JotForm.getContainer(input);var isFirstProduct=container.select('input[class*="validate"],select[class*="validate"]').first()==input;if(!input.name.match('cc_')&&!isFirstProduct){return;}}}
|
899 |
+
_log('looping inputs with validation :');_log(input);if(input.validateInput===undefined){_log('no required continuing');return;}
|
900 |
+
if(!(!!input.validateInput&&input.validateInput())){ret=JotForm.hasHiddenValidationConflicts(input);if(scopeSelector.tagName!=='BODY'&&input.id&&scopeSelector.select('#'+input.id).length===0){ret=true;}
|
901 |
+
_log('ret setted '+ret);}});_log('final ret value '+ret);return ret;},errored:function(input,message){input=$(input);if(input.errored){return false;}
|
902 |
+
if(input.runHint){input.runHint();}
|
903 |
+
if(this.url.search("https")==-1){var preLink="http://cdn.jotfor.ms/";}else{var preLink="https://cdn.jotfor.ms/";}
|
904 |
+
if(JotForm.isCollapsed(input)){var collapse=JotForm.getCollapseBar(input);if(!collapse.errored){collapse.select(".form-collapse-mid")[0].insert({top:'<img src="'+preLink+'images/exclamation-octagon.png"> '}).setStyle({color:'red'});collapse.errored=true;}}
|
905 |
+
var container=JotForm.getContainer(input);input.errored=true;input.addClassName('form-validation-error');container.addClassName('form-line-error');var insertEl=container;insertEl=container.select('.form-input')[0];if(!insertEl){insertEl=container.select('.form-input-wide')[0];}
|
906 |
+
if(!insertEl){insertEl=container;}
|
907 |
+
insertEl.select('.form-error-message').invoke('remove');insertEl.insert(new Element('div',{className:'form-error-message'}).insert('<img src="'+preLink+'images/exclamation-octagon.png"> '+message).insert(new Element('div',{className:'form-error-arrow'}).insert(new Element('div',{className:'form-error-arrow-inner'}))));JotForm.iframeHeightCaller();return false;},corrected:function(input){input=$(input);input.errored=false;var container=JotForm.getContainer(input);if(!container){return true;}
|
908 |
+
var inputs=container.select('*[class*="validate"]');inputs.each(function(subInput){subInput.errored=false;});container.select(".form-validation-error").invoke('removeClassName','form-validation-error');container.removeClassName('form-line-error');container.select('.form-error-message').invoke('remove');if(JotForm.isCollapsed(input)){var collapse=JotForm.getCollapseBar(input);if(collapse.errored&&(collapse.up('.form-section-closed')&&collapse.up('.form-section-closed').select('.form-validation-error').length==0)){collapse.select(".form-collapse-mid")[0].setStyle({color:''}).select('img')[0].remove();collapse.errored=false;}}
|
909 |
+
setTimeout(function(){if($$('.form-validation-error').length==0){JotForm.hideButtonMessage();}},100);JotForm.iframeHeightCaller();return true;},hideButtonMessage:function(){if(window.FORM_MODE=='cardform'){$$('.form-submit-button').each(function(button){var buttonParentNode=button.parentNode.parentNode;var errorBox=buttonParentNode.select('.form-button-error')[0];if(errorBox&&buttonParentNode.hasClassName('jfCard')){var buttonParentNodeRect=buttonParentNode.getBoundingClientRect();var errorBoxRect=errorBox.getBoundingClientRect();var qContainer=buttonParentNode.select('.jfCard-question')[0];if(qContainer){var qContainerRect=qContainer.getBoundingClientRect(qContainer);buttonParentNode.style.maxHeight=buttonParentNodeRect.height+errorBoxRect.height;qContainer.style.maxHeight=qContainerRect.height+errorBoxRect.height;buttonParentNode.parentNode.style.paddingBottom='unset';}}});}
|
910 |
+
$$('.form-button-error').invoke('remove');},showButtonMessage:function(txt){this.hideButtonMessage();$$('.form-submit-button').each(function(button){var errorBox=new Element('div',{className:'form-button-error'});errorBox.insert('<p>'+(typeof txt!=="undefined"?txt:JotForm.texts.generalError)+'</p>');var buttonParentNode=button.parentNode.parentNode;$(buttonParentNode).insert(errorBox);if(buttonParentNode.hasClassName('jfCard')){var buttonParentNodeRect=buttonParentNode.getBoundingClientRect();var progressWrapper=document.querySelector('#cardProgress');var progressRect=progressWrapper.getBoundingClientRect();var errorBoxRect=errorBox.getBoundingClientRect();if(errorBoxRect.bottom>progressRect.top&&getComputedStyle(progressWrapper).display!=='none'){var qContainer=buttonParentNode.select('.jfCard-question')[0];if(qContainer){var qContainerRect=qContainer.getBoundingClientRect(qContainer);buttonParentNode.style.maxHeight=buttonParentNodeRect.height-errorBoxRect.height;qContainer.style.maxHeight=qContainerRect.height-errorBoxRect.height;buttonParentNode.parentNode.style.paddingBottom=errorBoxRect.height;}}}});},disableGoButton:function(){if(navigator.appVersion.indexOf("iPhone")!=-1||navigator.appVersion.indexOf("iPad")!=-1||navigator.appVersion.indexOf("Android")!=-1){$$('input').each(function(input){input.observe('keypress',function(e){var code=(e.keyCode?e.keyCode:e.which);if(code===13){e.preventDefault();}});});}},disableSubmitForCard:function(action,isConditionMatch){if(window.FORM_MODE!=='cardform'||!window.CardForm||!window.CardForm.cards)return;JotForm.disableSubmitButton=isConditionMatch;JotForm.disableSubmitButtonMessage=(action&&action.disableSubmitErrorMessage)?action.disableSubmitErrorMessage:'You are not eligible to submit this form.';if(!isConditionMatch){JotForm.toggleDisableSubmitMessage();}},toggleDisableSubmitMessage:function(){var submitButtonCardIndex=window.CardForm.getLastVisibleIndex();if(submitButtonCardIndex&&document.getElementsByClassName('jfCard-disableSubmitError')){var disableSubmitErrorMessageElement=document.getElementsByClassName('jfCard-disableSubmitError')[submitButtonCardIndex];if(!disableSubmitErrorMessageElement)return;disableSubmitErrorMessageElement.innerHTML='<p>'+JotForm.disableSubmitButtonMessage+'</p>';disableSubmitErrorMessageElement.style.display=JotForm.disableSubmitButton?'block':'none';}},validator:function(){if(this.debugOptions&&this.debugOptions.stopValidations){this.info('Validations stopped by debug parameter');return true;}
|
911 |
+
var $this=this;$A(JotForm.forms).each(function(form){if(form.validationSet){return;}
|
912 |
+
form.validationSet=true;form.observe('submit',function(e){try{if($('payment_total_checksum')){$('payment_total_checksum').value=JotForm.paymentTotal;}
|
913 |
+
if($$('.form-submit-button')&&$$('.form-submit-button').length>0){var aSubmitIsVisible=false;$$('.form-submit-button').each(function(el){if(JotForm.isVisible(el.parentNode)){aSubmitIsVisible=true;return;}});if(!aSubmitIsVisible){JotForm.enableButtons();e.stop();}}
|
914 |
+
if(JotForm.disableSubmitButton){JotForm.toggleDisableSubmitMessage();JotForm.enableButtons();e.stop();return;}
|
915 |
+
if(!JotForm.validateAll(form)){JotForm.enableButtons();JotForm.showButtonMessage();if(JotForm.submitError){if(JotForm.submitError=="jumpToSubmit"){var visSubmit=[];$$('.form-submit-button').each(function(but){if(JotForm.isVisible(but)){visSubmit.push(but);}});if(visSubmit.length>0){if(visSubmit[visSubmit.length-1].up('.form-line')){visSubmit[visSubmit.length-1].up('.form-line').scrollIntoView(false);}else{visSubmit[visSubmit.length-1].scrollIntoView(false);}}}else if(JotForm.submitError=="jumpToFirstError"){setTimeout(function(){var firstError=$$('.form-error-message').first();if(firstError){if(JotForm.isCollapsed(firstError)){JotForm.getCollapseBar(firstError).run('click');}
|
916 |
+
if(!JotForm.noJump&&firstError.up('.form-line')){firstError.up('.form-line').scrollIntoView();var firstInput=firstError.up('.form-line').down('input,select,textarea');if(firstInput){firstInput.focus();}}}},100);}}
|
917 |
+
$$('.custom-hint-group').each(function(elem){elem.showCustomPlaceHolder();});e.stop();return;}
|
918 |
+
$$('.form-radio-other,.form-checkbox-other').each(function(el){if(!el.checked&&JotForm.getOptionOtherInput(el)){JotForm.getOptionOtherInput(el).disable();}});JotForm.runAllCalculations(true);$$('textarea.form-textarea:first-child').each(function(el){if(el.value){function escapeHtml(text){return text.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'");}
|
919 |
+
el.value=escapeHtml(el.value);textEl=el.clone();textEl.writeAttribute("disabled","true");textEl.innerHTML=el.value;el.up().appendChild(textEl);el.hide();}});if($$('input, select, textarea').length>900){$$('.form-matrix-table').each(function(matrixTable){var matrixObject={};matrixTable.select("input, select").each(function(input){var ids=input.id.split("_");var x=ids[2];var y=ids[3];if(input.type=="radio"){if(input.checked){matrixObject[x]=input.value;}else if(!(x in matrixObject)){matrixObject[x]=false;}}else{if(!(x in matrixObject)){matrixObject[x]={};}
|
920 |
+
if(input.type=="checkbox"){matrixObject[x][y]=input.checked?input.value:false;}else{matrixObject[x][y]=input.value;}}
|
921 |
+
input.writeAttribute("disabled","true");});try{var name=matrixTable.down('input, select').readAttribute("name").split("[")[0];var matrixArea=new Element("textarea").setStyle({display:'none'});matrixTable.insert({after:matrixArea});matrixArea.value=JSON.stringify(matrixObject);matrixArea.writeAttribute("name",name);}catch(e){console.log(e);}});}
|
922 |
+
if(JotForm.autoFillDeployed&&!JotForm.payment){if(typeof window.localStorage!=='undefined'){var formID=$$('form').first().readAttribute('id')+$$('form').first().readAttribute('name');AutoFill.getInstance(formID).stopSavingData();window.localStorage.clear();}}}catch(err){JotForm.error(err);e.stop();return;}
|
923 |
+
$$('.time-dropdown').each(function(el){el.enable();});$$('.form-checkbox, .form-radio').each(function(el){if(el.up('.form-product-item')&&el.disabled&&el.checked){el.observe('click',function(e){e.preventDefault();setTimeout(JotForm.countTotal,20);});}
|
924 |
+
el.enable();});$$('.conditionallyDisabled').each(function(el){el.enable();});if(JotForm.clearFieldOnHide!=="dontClear"){$$('.form-field-hidden input','.form-field-hidden select','.form-field-hidden textarea').each(function(input){if(input.name=="simple_fpc"){return;}
|
925 |
+
if(input.tagName=='INPUT'&&['checkbox','radio'].include(input.type)){input.checked=false;}else{input.clear();}});}
|
926 |
+
if(JotForm.compact&&JotForm.imageSaved==false){e.stop();window.parent.saveAsImage();$(document).observe('image:loaded',function(){var block;$(document.body).insert(block=new Element('div').setStyle('position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.85);'));block.insert('<table height="100%" width="100%"><tr><td align="center" valign="middle" style="font-family:Verdana;color:#fff;font-size:16px;">Please Wait...</td></tr></table>');setTimeout(function(){form.submit();},1000);});return;}
|
927 |
+
if(window.FORM_MODE=='cardform'&&Array.prototype.forEach&&CardForm&&CardForm.cards){if(window.toMarkdown){Array.prototype.forEach.call(CardForm.cards,function(card,index){if(card.markdownEditor&&card.markdownEditor.setMarkdownFromHtml){card.markdownEditor.setMarkdownFromHtml();}});}}
|
928 |
+
if(JotForm.isEncrypted){var redirectConditions={};$A(JotForm.conditions).each(function(condition){if(!condition.disabled&&condition.type==='url'){redirectConditions[condition.id]=JotForm.checkCondition(condition);}});JotForm.encryptAll(e,function(submitForm){if(submitForm){if(Object.keys(redirectConditions).length>0){form.insert(new Element('input',{type:'hidden',name:'redirectConditions'}).putValue(JSON.stringify(redirectConditions)));}
|
929 |
+
form.submit();}});}});$$('#'+form.id+' *[class*="validate"]').each(function(input){JotForm.setFieldValidation(input);});$$('.form-upload').each(function(upload){try{var required=!!upload.validateInput;var exVal=upload.validateInput||Prototype.K;upload.validateInput=function(){upload.errored=false;if(exVal()!==false){if(!upload.files){return true;}
|
930 |
+
var acceptString=upload.readAttribute('accept')||upload.readAttribute('data-file-accept')||upload.readAttribute('file-accept')||"";var maxsizeString=upload.readAttribute('maxsize')||upload.readAttribute('data-file-maxsize')||upload.readAttribute('file-maxsize')||"";var minsizeString=upload.readAttribute('minsize')||upload.readAttribute('data-file-minsize')||upload.readAttribute('file-minsize')||"";var accept=acceptString.strip().toLowerCase().split(/\s*\,\s*/gim);for(var key in accept){if(typeof accept[key]==='string'){accept[key]=accept[key].slice(0,1)==='.'?accept[key].slice(1):accept[key];}}
|
931 |
+
var maxsize=parseInt(maxsizeString,10)*1024;var minsize=parseInt(minsizeString,10)*1024;var file=upload.files[0];if(!file){return true;}
|
932 |
+
if(!file.fileName){file.fileName=file.name;}
|
933 |
+
var ext="";if(JotForm.getFileExtension(file.fileName)){ext=JotForm.getFileExtension(file.fileName);}
|
934 |
+
if(acceptString!="*"&&!accept.include(ext)&&!accept.include(ext.toLowerCase())){return JotForm.errored(upload,JotForm.texts.uploadExtensions+'<br/>'+acceptString);}
|
935 |
+
var validateImage=upload.readAttribute('data-imagevalidate')||false;var validatedImageExt="jpeg, jpg, png, gif, bmp";if((accept.include(ext)||accept.include(ext.toLowerCase()))&&validateImage&&(validateImage==='yes'||validateImage==='true')&&(validatedImageExt.include(ext)||validatedImageExt.include(ext.toLowerCase()))&&typeof window.FileReader!='undefined'){var binary_reader=new FileReader();binary_reader.onloadend=function(e){function ab2str(buf){var binaryString='',bytes=new Uint8Array(buf),length=bytes.length;for(var i=0;i<length;i++){binaryString+=String.fromCharCode(bytes[i]);}
|
936 |
+
return binaryString;}
|
937 |
+
var args={filename:file.name,size:file.size,binary:ab2str(e.target.result)};ImageInfo.loadInfo(args,function(){var info=ImageInfo.getAllFields(file.name);if(info.format==='UNKNOWN'){return JotForm.errored(upload,"You have uploaded an invalid image file type.");}});}
|
938 |
+
binary_reader.readAsArrayBuffer(file);}
|
939 |
+
if(!file.fileSize){file.fileSize=file.size;}
|
940 |
+
if(file.fileSize>maxsize&&maxsize!==0){return JotForm.errored(upload,JotForm.texts.uploadFilesize+' '+maxsizeString+'Kb');}
|
941 |
+
if(file.fileSize<minsize){return JotForm.errored(upload,JotForm.texts.uploadFilesizemin+' '+minsizeString+'Kb');}
|
942 |
+
return JotForm.corrected(upload);}};if(!required){upload.addClassName('validate[upload]');upload.observe('blur',upload.validateInput);}}catch(e){JotForm.error(e);}});});},dateFromField:function(field){var offset="";if(field.indexOf("-")>-1||field.indexOf("+")>-1){offset=field.split(/[\+\-]/)[1];offset=field.indexOf("-")>-1?"-"+offset:""+offset;field=field.split(/[\+\-]/)[0];}
|
943 |
+
field=field.replace(/[{}]/g,'');if(!$('year_'+field)||!$('year_'+field).value)return false;var year=$('year_'+field).value;;var month=$('month_'+field).value;var day=$('day_'+field).value;var date=new Date(year,month-1,day);if(offset.length){date.setDate(date.getDate()+parseInt(offset,10));}
|
944 |
+
return date;},getInputValidations:function(input){if(input){return input.className.replace(/.*validate\[(.*)\].*/,'$1').split(/\s*,\s*/);}
|
945 |
+
return[];},setFieldValidation:function(input){var $this=this;var reg=JotForm.validationRegexes;var validations=JotForm.getInputValidations(input);input.validateInput=function(deep,dontShowMessage){if(document.get.ignoreValidation&&document.get.ignoreValidation==="true"){return true;}
|
946 |
+
if(!JotForm.isVisible(input)&&!input.hasClassName('g-recaptcha-response')){return true;}
|
947 |
+
if(JotForm.getContainer(input).getAttribute('data-type')==="control_datetime"&&!JotForm.getContainer(input).down('input[id*="month_"]').dateTimeCheck(false)){return false;}
|
948 |
+
if(!$(input.parentNode).hasClassName('form-matrix-values')&&!input.hasClassName('form-subproduct-option')&&!input.hasClassName('time-dropdown')&&!(input.id.match(/_quantity_/)||input.id.match(/_custom_/)))
|
949 |
+
{JotForm.corrected(input);}
|
950 |
+
var vals=validations;if(input.hinted===true){input.clearHint();setTimeout(function(){input.hintClear();},150);}
|
951 |
+
if(typeof input.overridenValidateInput==='function'){return input.overridenValidateInput(input,deep,dontShowMessage);}
|
952 |
+
if(input.readAttribute('data-type')==='input-spinner'&&input.value){return input.validateSpinnerInputs();}
|
953 |
+
else if(input.readAttribute('data-type')==='input-grading'&&input.value){return input.validateGradingInputs();}
|
954 |
+
else if(input.readAttribute('data-type')==='input-number'&&input.value){return input.validateNumberInputs();}
|
955 |
+
else if(input.readAttribute('data-min-amount')){return input.validateMinimum();}
|
956 |
+
if(input.limitValidation&&input.classList.contains('mdInput')){var errorText=input.limitValidation();if(errorText!==false){return JotForm.errored(input,errorText);}}
|
957 |
+
if(input.up('.form-line')&&input.up('.form-line').down('.form-textarea-limit-indicator-error')){input.triggerEvent('change');return;}
|
958 |
+
if(vals.include('disallowFree')){for(var i=0;i<JotForm.freeEmailAddresses.length;i++){if(input.value.toLowerCase().indexOf("@"+JotForm.freeEmailAddresses[i]+".")>-1){return JotForm.errored(input,JotForm.texts.freeEmailError,dontShowMessage);}}}
|
959 |
+
if(vals.include('minSelection')||vals.include('minselection')){var minSelection=parseInt(input.readAttribute('data-minselection'));var numberChecked=0;input.up('.form-line').select('input[type=checkbox]').each(function(check){if(check.checked)numberChecked++;});if(numberChecked>0&&numberChecked<minSelection){return JotForm.errored(input,(JotForm.texts.minSelectionsError.replace(/\s*$/,"")+" ")+minSelection+'.',dontShowMessage);}}
|
960 |
+
if(vals.include('maxselection')){var maxSelection=parseInt(input.readAttribute('data-maxselection'));var numberChecked=0;input.up('.form-line').select('input[type=checkbox]').each(function(check){if(check.checked)numberChecked++;});if(numberChecked>maxSelection){return JotForm.errored(input,(JotForm.texts.maxSelectionsError.replace(/\s*$/,"")+" ")+maxSelection+'.',dontShowMessage);}}
|
961 |
+
if(vals.include('disallowPast')){var id=input.id.split('_').last();var inputtedDate=JotForm.getDateValue(id).split('T')[0];var dat=new Date();var month=(dat.getMonth()+1<10)?'0'+(dat.getMonth()+1):dat.getMonth()+1;var day=(dat.getDate()<10)?'0'+dat.getDate():dat.getDate();var currentDate=dat.getFullYear()+"-"+month+"-"+day;if(JotForm.checkValueByOperator('before',JotForm.strToDate(currentDate),JotForm.strToDate(inputtedDate))){return JotForm.errored(input,JotForm.texts.pastDatesDisallowed,dontShowMessage);}}
|
962 |
+
if(JotForm.getContainer(input).getAttribute('data-type')==="control_datetime"&&input.readAttribute('data-age')&&input.value){var minAge=input.readAttribute('data-age');var today=new Date();var birthDate=new Date(input.value);var dateParts=input.value.split(input.readAttribute('data-seperator'));if(input.readAttribute('data-format')==='ddmmyyyy'){birthDate=new Date(dateParts[2],parseInt(dateParts[1],10)-1,dateParts[0]);}else if(input.readAttribute('data-format')==='mmddyyyy'){birthDate=new Date(dateParts[2],parseInt(dateParts[0],10)-1,dateParts[1]);}else if(input.readAttribute('data-format')==='yyyymmdd'){birthDate=new Date(dateParts[0],parseInt(dateParts[1],10)-1,dateParts[2]);}
|
963 |
+
var age=today.getFullYear()-birthDate.getFullYear();var m=today.getMonth()-birthDate.getMonth();if(m<0||(m===0&&today.getDate()<birthDate.getDate())){age--;}
|
964 |
+
if(age<minAge){var errorTxt=JotForm.texts.ageVerificationError.replace('{minAge}',minAge)
|
965 |
+
JotForm.errored(input,errorTxt);return false;}}
|
966 |
+
if(vals.include('limitDate')){try{var id=input.id.split('_').last();var lim=JotForm.dateLimits[id];if(lim!==false&&!($("year_"+id).value==""||$("month_"+id).value==""||$("day_"+id).value=="")){if("custom"in lim&&lim.custom!==false&&Array.isArray(lim.custom)){for(var j=0;j<lim.custom.length;j++){if(!lim.custom[j])continue;var year=$("year_"+id).value;var month=JotForm.addZeros($("month_"+id).value,2);var day=JotForm.addZeros($("day_"+id).value,2);if(lim.custom[j].indexOf("{")>-1){var custom=JotForm.dateFromField(lim.custom[j]);custom=JotForm.addZeros(custom.getFullYear(),2)+"-"+JotForm.addZeros(custom.getMonth()+1,2)+"-"+JotForm.addZeros(custom.getDate(),2);if(custom===year+"-"+month+"-"+day)return JotForm.errored(input,JotForm.texts.dateLimited,dontShowMessage);return;}
|
967 |
+
if((lim.custom[j]===year+"-"+month+"-"+day)||(typeof lim.custom[j]=="string"&&lim.custom[j].length===5&&lim.custom[j]===(month+"-"+day))||(typeof lim.custom[j]=="string"&&lim.custom[j].length===2&&lim.custom[j]==day)){return JotForm.errored(input,JotForm.texts.dateLimited,dontShowMessage);}}}
|
968 |
+
var date=new Date($("year_"+id).value,($("month_"+id).value-1),$("day_"+id).value);if("ranges"in lim&&lim.ranges!==false&&Array.isArray(lim.ranges)){for(var j=0;j<lim.ranges.length;j++){if(!lim.ranges[j]||lim.ranges[j].indexOf(">")===-1)continue;var range=lim.ranges[j].split(">");var startDate;if(range[0].indexOf("{")>-1){startDate=JotForm.dateFromField(range[0]);}else{var start=range[0].split("-");startDate=new Date(start[0],parseInt(start[1])-1,start[2]);}
|
969 |
+
var endDate;if(range[1].indexOf("{")>-1){endDate=JotForm.dateFromField(range[1]);}else{var end=range[1].split("-");endDate=new Date(end[0],parseInt(end[1])-1,end[2]);}
|
970 |
+
if(endDate){endDate.setDate(endDate.getDate()+1);if(date.getTime()>=startDate.getTime()&&date.getTime()<endDate.getTime()){return JotForm.errored(input,JotForm.texts.dateLimited,dontShowMessage);}}}}
|
971 |
+
var dayOfWeek=JotForm.getDayOfWeek(date);if("days"in lim,dayOfWeek in lim.days&&lim.days[dayOfWeek]==false){return JotForm.errored(input,JotForm.texts.dateLimited,dontShowMessage);}
|
972 |
+
if("future"in lim&&lim.future===false){var now=new Date();if(date>now){return JotForm.errored(input,JotForm.texts.dateLimited,dontShowMessage);}}
|
973 |
+
if("past"in lim&&lim.past===false){var now=new Date();var yesterday=new Date();yesterday.setDate(now.getDate()-1);if(date<yesterday){return JotForm.errored(input,JotForm.texts.dateLimited,dontShowMessage);}}
|
974 |
+
if("start"in lim&&lim.start!=false&&lim.start!=""){var start=lim.start.split("-");if(start.length==3){var startDate=new Date(start[0],start[1]-1,start[2]);if(date<startDate){return JotForm.errored(input,JotForm.texts.dateLimited,dontShowMessage);}}else if(lim.start.indexOf('{')>-1){var startDate=JotForm.dateFromField(lim.start);if(date<startDate){return JotForm.errored(input,JotForm.texts.dateLimited,dontShowMessage);}}}
|
975 |
+
if("end"in lim&&lim.end!=false&&lim.end!=""){var end=lim.end.split("-");if(end.length==3){var endDate=new Date(end[0],end[1]-1,end[2]);if(date>endDate){return JotForm.errored(input,JotForm.texts.dateLimited,dontShowMessage);}}else if(lim.end.indexOf('{')>-1){var endDate=JotForm.dateFromField(lim.end);if(date>endDate){return JotForm.errored(input,JotForm.texts.dateLimited,dontShowMessage);}}}}}catch(e){console.log(e);}}
|
976 |
+
if(vals.include('validateLiteDate')){if(input.hasClassName("invalidDate")){var format=input.readAttribute("placeholder")
|
977 |
+
return JotForm.errored(input,JotForm.texts.dateInvalid.replace("{format}",format),dontShowMessage);}}
|
978 |
+
if(vals.include("Email_Confirm")){var idEmail=input.id.replace(/.*_(\d+)(?:_confirm)?/gim,'$1');if(($('input_'+idEmail).value!=$('input_'+idEmail+'_confirm').value)){return JotForm.errored(input,JotForm.texts.confirmEmail,dontShowMessage);}else if(($('input_'+idEmail+'_confirm').value)&&(!reg.email.test($('input_'+idEmail+'_confirm').value))){return JotForm.errored(input,JotForm.texts.email,dontShowMessage);}}
|
979 |
+
if(vals.include("required")){if(JotForm.getContainer(input).getAttribute('data-type')=='control_signature'){var pad=input
|
980 |
+
if(jQuery(pad).attr("data-required")==="true"){var formLine=jQuery('#id_'+jQuery(pad).attr('data-id'));if(formLine.is(':visible')){if(jQuery(pad).jSignature('getData','base30')[1].length==0&&!jQuery(pad).hasClass('edit-signature')){return JotForm.errored(input,JotForm.texts.required,dontShowMessage);}else{return JotForm.corrected(input);}}}}
|
981 |
+
if(input.tagName=='INPUT'&&input.readAttribute('type')=="file"){var formInput=input.up('.form-input')||input.up('.form-input-wide');var isMultiple=input.readAttribute('multiple')==='multiple';if(!isMultiple){if(input.value.empty()&&!(input.uploadMarked||(formInput&&formInput.uploadMarked))){return JotForm.errored(input,JotForm.texts.required,dontShowMessage);}else{return JotForm.corrected(input);}}else{return input.up('div[class*=validate[multipleUpload]]').validateInput();}}else if(input.tagName=="INPUT"&&(input.readAttribute('type')=="radio"||input.readAttribute('type')=="checkbox")){if($(input.parentNode).hasClassName('form-matrix-values')){var ty=input.readAttribute('type');var matrixRows={};var oneChecked=false;var oneEmpty=false;var upperElement=input.up('table')?input.up('table'):input.up('.jfMatrix');upperElement.select('input').each(function(e){if(!(e.name in matrixRows)){matrixRows[e.name]=false;}
|
982 |
+
if(matrixRows[e.name]!==true){matrixRows[e.name]=e.checked;}
|
983 |
+
if(matrixRows[e.name]===true){oneChecked=true;}
|
984 |
+
if('value'in e&&e.value.strip(" ").empty()){oneEmpty=true;}});if(vals.include("requireOneAnswer")){if(!oneChecked)
|
985 |
+
return JotForm.errored(input,JotForm.texts.requireOne,dontShowMessage);}else if(vals.include('requireEveryCell')&&oneEmpty){return JotForm.errored(input,JotForm.texts.requireEveryCell,dontShowMessage);}else if(!$H(matrixRows).values().all()){return JotForm.errored(input,JotForm.texts.requireEveryRow,dontShowMessage);}else{return JotForm.corrected(input);}}else{var otherInput=input.up(".form-"+input.type+"-item")?input.up(".form-"+input.type+"-item").down(".form-"+input.type+"-other-input"):null;if(otherInput){if(input.checked&&otherInput.value==""){return JotForm.errored(input,JotForm.texts.required);}}
|
986 |
+
var baseInputName=input.name.substr(0,input.name.indexOf('['));var otherInputName=baseInputName+'[other]';var checkboxArray=[];if(document.getElementsByName(otherInputName)[0]){checkboxArray=$A(document.getElementsByName(baseInputName+'[]'));checkboxArray[checkboxArray.length]=document.getElementsByName(otherInputName)[0];if(!checkboxArray.map(function(e){return e.checked;}).any()){return JotForm.errored(input,JotForm.texts.required,dontShowMessage);}}else{var cont=JotForm.getContainer(input);if(JotForm.payment&&cont.getAttribute('data-type').match(JotForm.payment)){if(!$A(document.getElementsByName(input.name)).map(function(e){if(JotForm.isVisible(e)){if(e.readAttribute('type')==="checkbox"&&e.value.indexOf('_expanded')>-1){if(!e.checked){return false;}else{return $A($$('#'+e.id+'_subproducts .form-subproduct-quantity')).map(function(cb){return cb.getSelected().value>0||cb.value>0;}).any();}}else if($(e.id+'_custom_price')){return e.checked&&$(e.id+'_custom_price').getValue()>0;}else{var qty=e.up('.form-product-item')?e.up('.form-product-item').down('select[id*="quantity"], input[id*="quantity"]'):false;if(qty){return e.checked&&qty.getValue()>0;}
|
987 |
+
return e.checked;}}else{if(JotForm.productPages&&JotForm.productPages.totalPage>1&&cont.select('.product--selected').length>0){JotForm.corrected(e);return true;}}}).any()||(window.FORM_MODE==='cardform'&&cont.select('.product--selected').length===0))
|
988 |
+
{if(input.hasClassName('paymentTypeRadios')){return JotForm.errored(input,"Please select payment method.",dontShowMessage);}
|
989 |
+
return JotForm.errored(input,JotForm.texts.required,dontShowMessage);}else{$A(cont.querySelectorAll('select[id*="quantity"], input[id*="quantity"]')).forEach(function(q){if(q.getValue()>0)JotForm.corrected(q);})}}else{if(cont.select("input:checked").length===0){return JotForm.errored(input,JotForm.texts.required,dontShowMessage);}}}}}else if((input.tagName=="INPUT"||input.tagName=="SELECT")&&($(input).up().hasClassName('form-matrix-values')||$(input).up(1).hasClassName('form-matrix-values'))){var matrixRows={};var oneEntry=false;var oneEmpty=false;var upperElement=input.up('table')?input.up('table'):input.up('.jfMatrix');upperElement.select(input.tagName).each(function(e){if(!(e.name in matrixRows)){matrixRows[e.name]=false;}
|
990 |
+
if(matrixRows[e.name]!==true){matrixRows[e.name]=(e.value&&!e.value.strip(" ").empty());}
|
991 |
+
if(matrixRows[e.name]===true){oneEntry=true;}
|
992 |
+
if('value'in e&&e.value.strip(" ").empty()){oneEmpty=true;}});if(vals.include("requireEveryRow")&&!$H(matrixRows).values().all()){return JotForm.errored(input,JotForm.texts.requireEveryRow,dontShowMessage);}else if(vals.include("requireOneAnswer")&&!oneEntry){return JotForm.errored(input,JotForm.texts.requireOne,dontShowMessage);}else if(vals.include('requireEveryCell')&&oneEmpty){return JotForm.errored(input,JotForm.texts.requireEveryCell,dontShowMessage);}else{return JotForm.corrected(input);}}else if((input.tagName==="INPUT"||input.tagName==="SELECT")&&input.hasClassName('form-subproduct-option')){if(input.hasClassName('form-subproduct-quantity')){var qID=input.id.replace(/_[0-9]*_[0-9]*$/,'');if($(qID.replace(/_quantity/,'')).checked){if($A($$('[id*="'+qID+'"]')).map(function(vl){return(vl.getSelected().value>0||vl.value>0);}).any()){return JotForm.corrected(input);}else{return JotForm.errored(input,JotForm.texts.required,dontShowMessage);}}}}else if(input.name&&input.name.include("[")){try{var isDisabledMatrix=$(input).getAttribute('data-component')==='matrix'&&($(input).up().hasClassName('form-matrix-values-disabled')||$(input).up(1).hasClassName('form-matrix-values-disabled'))
|
993 |
+
if(isDisabledMatrix){return true;}
|
994 |
+
var cont=$this.getContainer(input);if(input.hasClassName('form-address-search')&&cont.select('.jfQuestion-clean').length>0){inputs=[input];}else{inputs=cont.select('input,select[name*='+input.name.replace(/\[.*$/,'')+']');}
|
995 |
+
var checkValues=inputs.map(function(e){if(e.hasClassName('form-address-state')){var country=cont.select('.form-address-country')[0].value;if(country!='United States'&&country!='Canada'&&country!=""){e.removeClassName('form-validation-error');e.__skipField=true;return false;}}else{if(e.__skipField){e.__skipField=false;}}
|
996 |
+
if(e.id.match(/_donation/)){return e.getValue()==0;}
|
997 |
+
if(window.FORM_MODE!=='cardform'){if(e.name&&e.name.match(/cc_/)){return JotForm.paymentTotal==0;}}
|
998 |
+
if(e.id.match(/input_[0-9]+_quantity_[0-9]+_[0-9]+/)){var cb=$(((e.id.replace('_quantity','')).match(/input_[0-9]+_[0-9]+/))[0]);var allProducts=$$('[id*="'+e.id.match(/input_[0-9]*/)[0]+'"][type="'+cb.getAttribute('type')+'"]');if(e.id.split("_").length===6){var subProductQty=$$('[id*="'+e.id.replace(/_[0-9]*_[0-9]*$/,"")+'"]');}
|
999 |
+
if((cb.checked&&!subProductQty&&(isNaN(e.value)||e.value==0||e.value.empty()))||(!allProducts.map(function(c){return c.checked}).any())||(cb.checked&&subProductQty&&!subProductQty.map(function(q){return q.value>0}).any())){e.addClassName('form-validation-error');return true;}}
|
1000 |
+
var innerVals=e.className.replace(/.*validate\[(.*)\].*/,'$1').split(/\s*,\s*/);if(innerVals.include('required')&&JotForm.isVisible(e)){if(e.value.empty()||e.value.strip()=='Please Select'){if(window.FORM_MODE!="cardform"&&e.hasClassName("form-dropdown")&&e.hasAttribute("multiple")){var count=0,emptyOption=0;for(var i=1;i<e.length;i++){if(e[i].selected){count++;}
|
1001 |
+
if(e[i].selected&&e[i].value.empty()){emptyOption++;}}
|
1002 |
+
if(count==0){return true;}else if(count>=1){if(count>emptyOption){return false;}else{return true;}}}
|
1003 |
+
if(!dontShowMessage){e.addClassName('form-validation-error');}
|
1004 |
+
return true;}else{if(JotForm.getContainer(e).hasClassName("form-datetime-validation-error")){return JotForm.errored(input,'Enter a valid date',dontShowMessage);}}}
|
1005 |
+
if(!e.hasClassName('js-forMixed')){e.removeClassName('form-validation-error');}
|
1006 |
+
return false;});if(JotForm.payment&&cont.getAttribute('data-type').match(JotForm.payment)&&JotForm.isEditMode()){return JotForm.corrected(input);}
|
1007 |
+
if(checkValues.any()){if(JotForm.payment&&cont.getAttribute('data-type').match(JotForm.payment)){if(JotForm.isPaymentSelected()&&JotForm.paymentTotal==0){return JotForm.corrected(input);}}
|
1008 |
+
if(input.hasClassName('form-address-search')&&cont.select('.jfQuestion-clean').length<1){return JotForm.corrected(input);}
|
1009 |
+
var isErrorExists=false;var errorMessage=JotForm.texts.required;checkValues.map(function(isErrored,index){if(isErrored){var input=inputs[index];if(input.hasClassName('js-forMixed')){errorMessage=JotForm.texts.incompleteFields;if(input.hasClassName('forEmail')&&typeof input.validateEmailField==='function'){errorMessage=JotForm.texts.email;input.validateEmailField();}}
|
1010 |
+
isErrorExists=true;return JotForm.errored(inputs[index],errorMessage,dontShowMessage);}});return!isErrorExists;}else{JotForm.corrected(input);}}catch(e){JotForm.error(e);return JotForm.corrected(input);}}
|
1011 |
+
if(input.__skipField){return JotForm.corrected(input);}
|
1012 |
+
if(input.tagName.toLowerCase()==='textarea'&&input.hasClassName('form-custom-hint')&&!input.up('div').down('.nicEdit-main')){return JotForm.errored(input,JotForm.texts.required,dontShowMessage);}
|
1013 |
+
if(input.hasClassName("form-textarea")&&input.up('div').down('.nicEdit-main')){var val=input.up('div').down('.nicEdit-main').innerHTML.stripTags().replace(/\s/g,'').replace(/ /g,'');if(val.empty()||(input.readAttribute("data-customhint")&&input.readAttribute("data-customhint")==input.up('div').down('.nicEdit-main').innerHTML)){return JotForm.errored(input,JotForm.texts.required,dontShowMessage);}}else if(JotForm.getContainer(input).getAttribute('data-type')==="control_datetime"){if(!input.value||input.value.strip(" ").empty()){return JotForm.errored(input,JotForm.texts.required,dontShowMessage);}
|
1014 |
+
if(input.id&&input.id.indexOf("lite_mode_")>-1){var seperator=input.readAttribute('seperator')||input.readAttribute('data-seperator');var format=(input.readAttribute('format')||input.readAttribute('data-format')).toLowerCase();if(input.value.length!==((seperator.length*2)+format.length)){return JotForm.errored(input,JotForm.texts.dateInvalid.replace("{format}",format),dontShowMessage);}}
|
1015 |
+
if(JotForm.getContainer(input).hasClassName("form-datetime-validation-error")){return JotForm.errored(input,'Enter a valid date',dontShowMessage);}}else if((!input.value||input.value.strip(" ").empty()||input.value.replace('<br>','').empty()||input.value=='Please Select')&&!(input.readAttribute('type')=="radio"||input.readAttribute('type')=="checkbox")&&!$(input.parentNode).hasClassName('form-matrix-values')&&JotForm.getContainer(input).getAttribute('data-type')!=="control_address"){if(window.FORM_MODE!="cardform"&&input.hasClassName("form-dropdown")&&input.hasAttribute("multiple")){var count=0,emptyOption=0;for(var i=1;i<input.length;i++){if(input[i].selected){count++;}
|
1016 |
+
if(input[i].selected&&input[i].value.empty()){emptyOption++;}}
|
1017 |
+
if(count==0){return JotForm.errored(input,JotForm.texts.required,dontShowMessage);}else if(count>=1){if(count>emptyOption){return JotForm.corrected(input);}else{return JotForm.errored(input,JotForm.texts.required,dontShowMessage);}}}
|
1018 |
+
if(input.hasClassName('form-dropdown')&&$$('.jfDropdown-search:focus').length>0){return JotForm.corrected(input);}
|
1019 |
+
return JotForm.errored(input,JotForm.texts.required,dontShowMessage);}
|
1020 |
+
vals=vals.without("required");}else if(input.value.empty()){return true;}
|
1021 |
+
if(!vals[0]){return true;}
|
1022 |
+
switch(vals[0]){case"Email":input.value=input.value.replace(/^\s+|\s+$/g,'');var value=(typeof punycode!=="undefined")?punycode.toASCII(input.value):input.value;if(!reg.email.test(value)){return JotForm.errored(input,JotForm.texts.email,dontShowMessage);}
|
1023 |
+
break;case"Alphabetic":if(!reg.alphabetic.test(input.value)){return JotForm.errored(input,JotForm.texts.alphabetic,dontShowMessage);}
|
1024 |
+
break;case"Numeric":if(!reg.numeric.test(input.value)&&!reg.numericDotStart.test(input.value)){return JotForm.errored(input,JotForm.texts.numeric,dontShowMessage);}
|
1025 |
+
break;case"AlphaNumeric":if(!reg.alphanumeric.test(input.value)){return JotForm.errored(input,JotForm.texts.alphanumeric,dontShowMessage);}
|
1026 |
+
break;case"Cyrillic":if(!reg.cyrillic.test(input.value)){return JotForm.errored(input,JotForm.texts.cyrillic,dontShowMessage);}
|
1027 |
+
break;case"Url":case"URL":if(!reg.url.test(input.value)){return JotForm.errored(input,JotForm.texts.url,dontShowMessage);}
|
1028 |
+
break;case"Currency":if(input.up(".form-matrix-table")){if(input.up(".form-matrix-table").select("input").collect(function(inp){return!reg.currency.test(inp.value)}).any()){return JotForm.errored(input,JotForm.texts.currency,dontShowMessage);}}else{if(!reg.currency.test(input.value)){return JotForm.errored(input,JotForm.texts.currency,dontShowMessage);}}
|
1029 |
+
break;case"Fill Mask":if(input.readAttribute("data-masked")=="true"&&!jQuery(input).inputmask("isComplete")){if(!!input.value&&input.value!==input.readAttribute('maskvalue').replace(/\#|\@/g,'_')){return JotForm.errored(input,JotForm.texts.fillMask,dontShowMessage);}}
|
1030 |
+
break;default:}
|
1031 |
+
return JotForm.corrected(input);};var validatorEvent=function(e){setTimeout(function(){try{var inputContainer=$this.getContainer(input);var requiredFields=inputContainer.select('[class*=validate]');var lastRequiredField=requiredFields[requiredFields.length-1];var isLastRequiredField=($this.getContainer($this.lastFocus)==$this.getContainer(input)&&lastRequiredField==input);var isPrefix=input&&input.getAttribute('data-component')==='prefix';if($this.lastFocus&&(($this.lastFocus==input||$this.getContainer($this.lastFocus)!=$this.getContainer(input))||isLastRequiredField)&&(!isPrefix)&&(!(window.FORM_MODE==='cardform'&&inputContainer.dataset.type==='control_fullname'))){input.validateInput();}else if(input.type=="hidden"||input.type=='file'){input.validateInput();}else if(inputContainer.dataset.type==='control_address'){input.validateInput();}else if(input.hasClassName("form-textarea")&&input.up('div').down('.nicEdit-main')){input.validateInput();}else if(input.hasClassName("pad")){input.validateInput();}}catch(e){console.log(e);}},10);};if(input.type=='hidden'||input.type=='file'){input.observe('change',validatorEvent);}else{input.observe('blur',validatorEvent);}
|
1032 |
+
if(input.type=='checkbox'||input.type=='radio'){input.observe('keyup',function(){input.validateInput();});if(JotForm.getOptionOtherInput(input)){var otherInput=JotForm.getOptionOtherInput(input);otherInput.observe('keyup',function(){input.validateInput();});}}
|
1033 |
+
if(input.hasClassName("pad")){jQuery(input).bind('change',validatorEvent);}
|
1034 |
+
if(input.hasClassName("form-textarea")&&input.up('div').down('.nicEdit-main')){input.up('div').down('.nicEdit-main').observe('blur',validatorEvent);}
|
1035 |
+
if(input.up('.form-spinner')){var spinnerEvent=function(){input.validateInput();};input.up('.form-spinner').down('.form-spinner-up').observe('click',spinnerEvent);input.up('.form-spinner').down('.form-spinner-down').observe('click',spinnerEvent);}},FBInit:function(){JotForm.FBNoSubmit=true;FB.getLoginStatus(function(response){if(response.authResponse){JotForm.FBCollectInformation(response.authResponse.userID);}else{FB.Event.subscribe('auth.login',function(response){JotForm.FBCollectInformation(response.authResponse.userID);});}});},FBCollectInformation:function(id){JotForm.FBNoSubmit=false;var fls=$$('.form-helper').collect(function(el){var f="";var d=el.readAttribute('data-info').replace("user_","");switch(d){case"can_be_anyvalue":f="place correct one here";break;case"sex":f="gender";break;case"about_me":f="bio";break;default:f=d;}
|
1036 |
+
return[f,el.id];});var fields={};var getPhoto=false;$A(fls).each(function(p){if(p[0]=="pic_with_logo"){getPhoto={fieldID:p[1]};}
|
1037 |
+
if(p[0]!=="username"){fields[p[0]]=p[1];}});var params=$H(fields).keys().without("pic_with_logo");var callback=function(input,user_id){JotForm.bringOldFBSubmissionBack(id);var hidden=new Element('input',{type:'hidden',name:'fb_user_id'}).setValue(id);var form=JotForm.getForm(input);form.insert({top:hidden});};try{FB.api('/'+id,{fields:params},function(res){var input;$H(res).each(function(pair){if($(fields[pair.key])){input=$(fields[pair.key]);switch(pair.key){case"location":input.value=pair.value.name;break;case"website":input.value=pair.value.split(/\s+/).join(", ");break;default:input.value=pair.value;}}});if(getPhoto){FB.api('/'+id+'/picture',function(res){if(res.data.url&&$(getPhoto.fieldID)){$(getPhoto.fieldID).value=res.data.url;}
|
1038 |
+
callback(input,id);});}else{callback(input,id);}});}catch(e){console.error(e);}
|
1039 |
+
$$('.fb-login-buttons').invoke('show');$$('.fb-login-label').invoke('hide');},bringOldFBSubmissionBack:function(id){var formIDField=$$('input[name="formID"]')[0];var a=new Ajax.Jsonp(JotForm.url+'server.php',{parameters:{action:'bringOldFBSubmissionBack',formID:formIDField.value,fbid:id},evalJSON:'force',onComplete:function(t){var res=t.responseJSON;if(res.success){JotForm.editMode(res,true,['control_helper','control_fileupload']);}}});},setCustomHint:function(elem,value){var element=$(elem)||null,new_value=value.replace(/<br>/gim,"\n")||"";element.addClassName('custom-hint-group').writeAttribute('data-customhint',value).writeAttribute('customhinted',"true");element.hasContent=(element.value&&element.value.replace(/\n/gim,"<br>")!=value)?true:false;element.showCustomPlaceHolder=function(){if(!this.hasContent){this.placeholder=new_value;this.writeAttribute("spellcheck","false").addClassName('form-custom-hint');}};element.hideCustomPlaceHolder=function(){if(!this.hasContent){this.placeholder="";this.removeClassName('form-custom-hint').removeAttribute('spellcheck');}};element.observe('focus',function(e){if(!this.hasContent){this.removeClassName('form-custom-hint').removeAttribute('spellcheck');}}).observe('blur',function(e){this.showCustomPlaceHolder();}).observe('keyup',function(e){this.hasContent=(this.value.length>0&&this.value!==new_value)?true:false;}).observe('paste',function(e){$this=this;setTimeout(function(){$this.hasContent=($this.value.length>0&&$this.value!==new_value)?true:false;},2);});if(element&&element.type==="textarea"&&element.hasAttribute('data-richtext')){setTimeout(function(){var editor=$$('#id_'+element.id.replace('input_','')+' .nicEdit-main')[0]||null;var editorInstance=nicEditors.findEditor(element.id);if(editor){if(!element.hasContent){editor.setStyle({'color':'#babbc0'});}
|
1040 |
+
editor.observe('blur',function(){if(!editorInstance.getContent()||editorInstance.getContent()==="<br>"){editor.setStyle({'color':'#babbc0'});editorInstance.setContent(new_value);element.writeAttribute("spellcheck","false").addClassName('form-custom-hint');}});editor.observe('focus',function(){editor.setStyle({'color':''});element.removeClassName('form-custom-hint').removeAttribute('spellcheck');if(editorInstance.getContent()===new_value){editorInstance.setContent('');};});}},1000);}
|
1041 |
+
element.up('form.jotform-form').observe('submit',function(){this.select('.custom-hint-group').each(function(elem){elem.hideCustomPlaceHolder();});});element.showCustomPlaceHolder();},fieldHasContent:function(id){if($('id_'+id).hasClassName('form-line-error'))return false;if($('id_'+id).select('.form-custom-hint').length>0)return false;var type=JotForm.getInputType(id);switch(type){case"address":case"combined":return $$('#id_'+id+' input').collect(function(e){return e.value;}).any();case"number":return $$('#id_'+id+' input').collect(function(e){return e.value.length>0;}).any();case"birthdate":return JotForm.getBirthDate(id);case"datetime":var date=JotForm.getDateValue(id);return!(date=="T00:00"||date=='');case"time":return JotForm.get24HourTime(id);case"checkbox":case"radio":return $$('#id_'+id+' input').collect(function(e){return e.checked;}).any();case"select":return $$('#id_'+id+' select').collect(function(e){return e.value;}).any();case"grading":return $$('input[id^=input_'+id+'_]').collect(function(e){return e.value;}).any();case"signature":return jQuery("#id_"+id).find(".pad").jSignature('getData','base30')[1].length>0;case"slider":return $('input_'+id).value>0;case"file":if($$('#id_'+id+' input')[0].readAttribute('multiple')==='multiple'||$$('#id_'+id+' input')[0].readAttribute('multiple')===''){var fileList=$('id_'+id).select('.qq-upload-list li');if(fileList.length>0){var status=true;fileList.each(function(elem){if(elem.getAttribute('class')&&elem.getAttribute('class').indexOf('fail')>0){status=false;}});return status;}
|
1042 |
+
return true;}else{return $('input_'+id).value;}
|
1043 |
+
break;default:if($('input_'+id)&&$('input_'+id).value){return $('input_'+id).value;}else{return false;}}},setupProgressBar:function(){JotForm.progressBar=new ProgressBar("progressBar",{'height':'20px','width':'95%'});var countFields=['select','radio','checkbox','file','combined','email','address','combined','datetime','time','birthdate','number','radio','number','radio','autocomplete','radio','text','textarea','signature','div','slider'];var totalFields=0;var completedFields=0;var updateProgress=function(){completedFields=0;$$('.form-line').each(function(el){var id=el.id.split("_")[1];var type=JotForm.getInputType(id);if($A(countFields).include(type)){if(JotForm.fieldHasContent(id)){completedFields++;}}});var percentage=parseInt(100/totalFields*completedFields);if(isNaN(percentage))percentage=0;JotForm.progressBar.setPercent(percentage);$('progressPercentage').update(percentage+'% ');$('progressCompleted').update(completedFields);if(percentage==100){$('progressSubmissionReminder').show();}else{$('progressSubmissionReminder').hide();}};var setListener=function(el,ev){$(el).observe(ev,function(){updateProgress();});};$$('.form-line').each(function(el){var id=el.id.split("_")[1];var type=JotForm.getInputType(id);if(!countFields.include(type)){return;}
|
1044 |
+
totalFields++;switch(type){case'radio':case'checkbox':setListener($('id_'+id),'click');break;case'select':case'file':setListener($('id_'+id),'change');break;case'datetime':setListener($('id_'+id),'date:changed');$$("#id_"+id+' select').each(function(el){setListener($(el),'change');});break;case'time':case'birthdate':$$("#id_"+id+' select').each(function(el){setListener($(el),'change');});break;case'address':setListener($('id_'+id),'keyup');break;case'number':setListener($('id_'+id),'keyup');setListener($('id_'+id),'click');break;case'signature':setListener($('id_'+id),'click');break;default:setListener($('id_'+id),'keyup');break;}});$('progressTotal').update(totalFields);updateProgress();},setupRichArea:function(qid){if(!(!Prototype.Browser.IE9&&!Prototype.Browser.IE10&&Prototype.Browser.IE)){var field='id_'+qid;var isFieldHidden=$(field).hasClassName('always-hidden')||$(field).style.display==='none'||$(field).style.display==='hidden';if(!JotForm.isVisible(field)){$(field).up('.form-section')&&$(field).up('.form-section').show();JotForm.showField(qid);}
|
1045 |
+
new nicEditor({iconsPath:location.protocol+'//www.jotform.com/images/nicEditorIcons.gif?v2'}).panelInstance('input_'+qid);JotForm.updateAreaFromRich(field);if(isFieldHidden){this.hideField(qid);}}},updateAreaFromRich:function(field){try{var rich=$(field).down('.nicEdit-main');var txtarea=$(field).down('textarea');if(rich&&txtarea){rich.observe('keyup',function(){txtarea.value=rich.innerHTML;if(txtarea.triggerEvent)txtarea.triggerEvent('keyup');});}}catch(e){console.error(e);}},autoFillInitialize:function(params){if(this.isEditMode()){return;}
|
1046 |
+
var formID=$$('input[name="formID"]')[0].value;params.name='form_'+formID;var _form='form#'+formID;var form=$$(_form)[0];var excludeFields=["formID","simple_spc","temp_upload_folder"];form.writeAttribute('data-autofill','true');var _conflicts={_handleCustomHint:function(data){var pfields=data.protectedfields;var pfieldsdata=data.protectedfieldsdata;var inc=0;$H(pfieldsdata).each(function(_fielddata){var _field=pfields[inc];var field=$(_field);var fieldata=_fielddata[1];var value=(fieldata.newinputvalue)?fieldata.newinputvalue.replace(/\n/gim,"<br>"):false;if(field.hasAttribute('data-customhint')||field.hasAttribute('customhinted')){var hint=field.readAttribute('data-customhint');if(hint&&value&&hint!=value){field.removeClassName('form-custom-hint');field.hasContent=true;}}
|
1047 |
+
else if(field.hasAttribute('hinted')||field.hinted)
|
1048 |
+
{var hint=(fieldata.oldinputvalue)?fieldata.oldinputvalue.replace(/\n/gim,"<br>"):false;if(hint&&value&&hint!=value){field.setStyle({color:"#000"});}}
|
1049 |
+
inc++;});},_handleGradingTotal:function(data){if($$('.form-grading-input').length>0&&$("grade_total_"+id)){var total=0,id=null;$$('.form-grading-input').each(function(input){id=input.id.replace(/input_(\d+)_\d+/,"$1"),total+=parseFloat(input.value)||0;});$("grade_point_"+id).innerHTML=total;}},_handleRichText:function(data){$$('.nicEdit-main').each(function(richArea){var txtarea=richArea.up('.form-line').down('textarea');if(txtarea){richArea.innerHTML=txtarea.value;}});},_handleStarRating:function(data){$$(".form-star-rating").each(function(rating){if(rating.setRating==='function')rating.setRating(rating.down("input").value);});},_handlePaymentTotal:function(){if($('payment_total')){JotForm.totalCounter(JotForm.prices);}}};if(JotForm.payment&&$$('.form-product-item > input.form-product-has-subproducts').length>0){$$('.form-line[data-type="control_authnet"] select, .form-line[data-type="control_authnet"] input').each(function(input){if(input.id){excludeFields.push(input.id);}});}
|
1050 |
+
var timeout=Number(params.timeout)>0?params.timeout:4;var fieldAmount=$$('input, select, textarea').length;if(fieldAmount>200){timeout=Math.floor(fieldAmount/10);}
|
1051 |
+
jQuery(_form).autoFill({timeout:timeout,sessionID:JotForm.sessionID,excludeFields:excludeFields,ttl:params.ttl,allowBindOnChange:(params.bindChange&¶ms.bindChange=='on')?true:false,onBeforeSave:function(){},onSave:function(){},onRelease:function(){},onBeforeRestore:function(){},onRestore:function(data){var restoredDatas=this.restoredData[0];if(restoredDatas){_conflicts._handleCustomHint(restoredDatas);_conflicts._handleGradingTotal(restoredDatas);_conflicts._handleRichText(restoredDatas);_conflicts._handleStarRating(restoredDatas);_conflicts._handlePaymentTotal(restoredDatas);}}});this.runAllConditions();this.autoFillDeployed=true;},runAllConditions:function(){$H(JotForm.fieldConditions).each(function(pair){var field=pair.key;var event=pair.value.event;if(!$(field)){return;}
|
1052 |
+
if(["autofill","number","autocomplete"].include(event))event="keyup";$(field).run(event);});if(JotForm.isEditMode()){JotForm.ignoreInsertionCondition=null;}},hasQuestion:function(questions,questionType){var questions_by_name=[];function transpose(a){return a[0].map(function(val,c){return a.map(function(r){return r[c];});});}
|
1053 |
+
var field=false;if(questions.length>0){questions.some(function(question){if(question){if(question.type===questionType){return field=question;}}});}
|
1054 |
+
return field;},paymentExtrasOnTheFly:function(questions){var $this=this;var questions_by_name=[];function transpose(a){return a[0].map(function(val,c){return a.map(function(r){return r[c];});});}
|
1055 |
+
if(questions.length>0){questions.each(function(question){if(question){switch(question.type){case'control_chargify':var email=$this.hasQuestion(questions,'control_email');if(email!==false){var emails=$$('input[type="email"]');emails[0].observe('blur',function(e){if(e.target.value){$$('.cc_email')[0].value=e.target.value;};});}
|
1056 |
+
break;case'control_wepay':var email=$this.hasQuestion(questions,'control_email');if(email!==false){var emails=$$('input[type="email"]');emails[0].observe('blur',function(e){if(e.target.value){$$('.cc_email')[0].value=e.target.value;};});}
|
1057 |
+
var address=$this.hasQuestion(questions,'control_address');if(address!==false){var address=$$('.form-address-postal');address[0].observe('blur',function(e){if(e.target.value){$$('.cc_zipcode')[0].value=e.target.value;};});}
|
1058 |
+
break;default:}}});}},setQuestionMasking:function(toSelector,type,maskValue,unmask){if(!maskValue&&!unmask)return;maskValue=maskValue.replace(/'/g,"'");var unmask=(unmask)?unmask:false;maskValue=maskValue.replace(/\\/g,'');var placeholder=maskValue.replace(/#/g,'_').replace(/\[|\]/g,'');maskValue=maskValue.replace(/9/g,'\\9').replace(/a/g,'\\a').replace(/A/g,'\\A');var definitions={"#":{validator:"[0-9]"}}
|
1059 |
+
if(type==="textMasking"){Object.extend(definitions,{"@":{validator:"[A-Za-z\u0410-\u044F\u0401\u0451\u4E00-\u9FFF]",},"*":{validator:"[0-9A-Za-z\u0410-\u044F\u0401\u0451\u4E00-\u9FFF]"}});placeholder=placeholder.replace(/\*|@/g,'_');}
|
1060 |
+
try{var jqObject=jQuery(toSelector);if(unmask){jqObject.inputmask('remove').off('blur').attr('placeholder','');}
|
1061 |
+
else{jqObject.inputmask(maskValue,{placeholder:"_",autoclear:false,definitions:definitions}).on('blur',function(e){e.target.triggerEvent('change');}).attr('maskValue',maskValue).attr('placeholder',placeholder);var caretPos=jqObject.val().indexOf('_');jqObject.caret(caretPos);}}catch(error){console.log(error);}},setInputTextMasking:function(elem,maskValue,unmask){setTimeout(function(){JotForm.setQuestionMasking("#"+elem,'textMasking',maskValue,unmask);},10);},setPhoneMaskingValidator:function(elem,maskValue,unmask){setTimeout(function(){JotForm.setQuestionMasking("#"+elem,'phoneMasking',maskValue,unmask);},10);},loadScript:function(){var toLoad=arguments.length;var callback;var hasCallback=arguments[toLoad-1]instanceof Function;var script;function onloaded(){toLoad--;if(!toLoad){callback();}}
|
1062 |
+
if(hasCallback){toLoad--;callback=arguments[arguments.length-1];}else{callback=function(){};}
|
1063 |
+
for(var i=0;i<toLoad;i++){script=document.createElement('script');script.src=arguments[i];if(typeof(script.addEventListener)!='undefined'){script.addEventListener('load',callback,false);}else{var handleScriptStateChangeIE8=function(){if(script.readyState=='loaded'){callback();}}
|
1064 |
+
script.attachEvent('onreadystatechange',handleScriptStateChangeIE8);}
|
1065 |
+
(document.head||document.getElementsByTagName('head')[0]).appendChild(script);}},loadStyleSheet:function(url,onLoad){var link=document.createElement('link');link.setAttribute('id','form-css');link.setAttribute('type','text/css');link.setAttribute('rel','stylesheet');link.setAttribute('href',url);(document.head||document.getElementsByTagName('head')[0]).appendChild(link);if(link.readyState){link.onreadystatechange=function(){if(link.readyState=="loaded"||link.readyState=="complete"){link.onreadystatechange=null;onLoad&&onLoad();}};}else{if(navigator.userAgent.match(/safari/i)&&!navigator.userAgent.match(/chrome/i)){onLoad&&onLoad();}else{link.onload=function(){onLoad&&onLoad();};}}},isStyleSheetLoaded:function(stlesheetName){var found=false;var styleSheets=document.styleSheets;for(var s in styleSheets){var styleSheet=styleSheets[s];if(styleSheet.href&&!!~styleSheet.href.indexOf(stlesheetName)){found=true;break;}}
|
1066 |
+
return found;},track:function(w,d){var self=this;if($$('#event_tracking_image').length>0){return;}
|
1067 |
+
var _form=$$('.jotform-form')[0];var _formID=_form.getAttribute('id');var _referer;var _location;try{_referer=encodeURIComponent(document.referrer);}catch(e){_referer='undefined'}
|
1068 |
+
try{_location=encodeURIComponent(window.top.location.href);}catch(e){_location='undefined'}
|
1069 |
+
var _screenHeight=window.screen.height;var _screenWidth=window.screen.width;if(!_formID){return false;}
|
1070 |
+
if(_form){if(location&&location.href&&location.href.indexOf('&nofs')==-1&&location.href.indexOf('&sid')==-1){var uuid=generateUUID();insertAfter(createImageEl(uuid),_form);createEventID(uuid);}}
|
1071 |
+
function insertAfter(newNode,referenceNode){referenceNode.parentNode.insertBefore(newNode,referenceNode.nextSibling);}
|
1072 |
+
function createImageEl(uuid){var base='//events.jotform.com/';if(typeof JotForm.enterprise!=="undefined"&&JotForm.enterprise){base='/events/';}
|
1073 |
+
if(self.jsForm){base=base+'jsform/';}else{base=base+'form/';}
|
1074 |
+
var src=base+_formID+'/';var resolutionStr;if(_screenHeight&&_screenWidth){resolutionStr=_screenWidth+'x'+_screenHeight;}
|
1075 |
+
src=src+'?ref='+encodeURIComponent(_referer);if(resolutionStr){src=src+'&res='+encodeURIComponent(resolutionStr);}
|
1076 |
+
if(uuid){src=src+'&eventID='+encodeURIComponent(uuid);}
|
1077 |
+
src=src+'&loc='+encodeURIComponent(_location);var img=new Image();img.id="event_tracking_image";img.src=src;img.alt="jftr";img.style.display='none';img.width=1;img.height=1;return img;}
|
1078 |
+
function createEventID(uuid){var inputEl=document.createElement('input');inputEl.setAttribute('type','hidden');inputEl.setAttribute('name','event_id');inputEl.value=uuid;_form.appendChild(inputEl);}
|
1079 |
+
function generateUUID(){return 1*new Date()+'_'+_formID+'_'+randomString(7);}
|
1080 |
+
function randomString(len){charSet='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';var randomString='';for(var i=0;i<len;i++){var randomPoz=Math.floor(Math.random()*charSet.length);randomString+=charSet.substring(randomPoz,randomPoz+1);}
|
1081 |
+
return randomString;}},additionalActionsFormEmbedded:function(){var self=this;var integration=getQuerystring('embeddedvia');if(integration){if(integration==='weebly'&&!(window.FORM_MODE&&window.FORM_MODE=='cardform')){if(!self.isStyleSheetLoaded('mobile.responsive.min.css')){var styleSheetUrl='https://widgets.jotform.io/mobileResponsive/mobile.responsive.min.css';self.loadStyleSheet(styleSheetUrl,function(){self.handleIFrameHeight();});}}}},changeSubmitURL:function(submitURL){if(submitURL.length>0){for(var i=this.forms.length-1;i>=0;i--){var form=this.forms[i];form.action=form.action.replace(/\/\/submit\..*?\//,'//'+submitURL+'/');};}},handleChinaCensorship:function(){this.getClientCountry(function(location){var country=location.country;if((country.length>0&&country.toLowerCase()==='cn')){this.changeSubmitURL('china.jotfor.ms');}}.bind(this));},handlePreview:function(filled){$$('body')[0].setStyle({overflowX:'hidden'});$A(JotForm.forms).each(function(form){var previewInput=document.createElement('input');previewInput.setAttribute('type','hidden');previewInput.setAttribute('name','preview');previewInput.value='true';form.appendChild(previewInput);if(filled===true){var script=document.createElement('script');script.setAttribute('type','text/javascript');script.setAttribute('src','//cdn.jotfor.ms/js/form-tester.js?rev='+new Date().getTime());form.appendChild(script);}});},getClientCountry:function(callback){new Ajax.Request('//china.jotfor.ms/opt/geo.ip.php',{evalJSON:'force',onComplete:function(res){if(res.status===200){callback(res.responseJSON);}else{callback({country:''});}}});},updateMatrixInputs:function(id,target){var matrix=document.getElementById("matrix_"+id);var dataType=matrix.getAttribute('data-type');var desktopWrapper=$(matrix).select('.forDesktop')[0];var mobileWrapper=$(matrix).select('.forMobile')[0];if(target==='mobile'){var hiddenMatrix=mobileWrapper;var visibleMatrix=desktopWrapper;}else{var hiddenMatrix=desktopWrapper;var visibleMatrix=mobileWrapper}
|
1082 |
+
var hiddenWrappers=$(hiddenMatrix).select('.form-matrix-values');hiddenWrappers.each(function(i){$(i).removeClassName('form-matrix-values');$(i).addClassName('form-matrix-values-disabled');});var hiddenInputs=$(hiddenMatrix).select('input, select');hiddenInputs.each(function(i){if(i.id.indexOf('disabled')<0){i.id+='_disabled';i.setAttribute('data-name',i.getAttribute('name'));i.removeAttribute('name');}});var visibleWrapper=$(visibleMatrix).select('.form-matrix-values');visibleWrapper.each(function(i){$(i).removeClassName('form-matrix-values-disabled');$(i).addClassName('form-matrix-values');});var visibleInputs=$(visibleMatrix).select('input');visibleInputs.each(function(i){i.id=i.id.replace('_disabled','');if(i.getAttribute('data-name')){i.setAttribute('name',i.getAttribute('data-name'));i.removeAttribute('data-name');}});$(hiddenMatrix).addClassName('hidden-matrix');$(visibleMatrix).removeClassName('hidden-matrix');},setMatrixLayout:function(id,passive,mobileActiveQuestionOrder){var matrix=document.getElementById("matrix_"+id);if(!$(matrix))return;var desktopVersion=$(matrix).select('.forDesktop')[0];var mobileVersion=$(matrix).select('.forMobile')[0];var dataType=matrix.getAttribute('data-type');if(!passive){if((desktopVersion&&desktopVersion.getStyle('display')!=='none')&&mobileVersion){this.updateMatrixInputs(id,'mobile');}else if((mobileVersion&&mobileVersion.getStyle('display')!=='none')&&desktopVersion){this.updateMatrixInputs(id,'desktop');}}
|
1083 |
+
if(['Slider','Emoji Slider','Yes No'].indexOf(dataType)>-1){if(desktopVersion){var matrixLabelListItems=desktopVersion.getElementsByClassName('jfMatrixLabelList-item');var matrixInputListItems=desktopVersion.getElementsByClassName('jfMatrixInputList-item');if(Array.prototype.forEach){Array.prototype.forEach.call(matrixLabelListItems,function(matrixLabel,index){var matrixInput=matrixInputListItems[index];if(matrixInput&&matrixLabel){matrixInput.style.height=matrixLabel.offsetHeight+'px';}});}}}
|
1084 |
+
var hasMobile=$(matrix).select('.forMobile').length>0;var isSlider=['Slider','Emoji Slider'].indexOf(dataType)>-1;if(isSlider&&hasMobile){var mobileSlider=$(matrix).select('.slider')[0];var mobileNext=$(matrix).select('.jfMobileMatrix-nextRow')[0];var mobilePrev=$(matrix).select('.jfMobileMatrix-prevRow')[0];var rowList=$(matrix).select('.jfMobileMatrix-row');var bulletList=$(matrix).select('.jfMobileMatrix-columnDot');var rowLength=rowList.length;var currentRow=$(matrix).select('.jfMobileMatrix-row.isSelected')[0];var currIndex=parseInt(currentRow.readAttribute('data-order'),10);var newIndex=false;var newEl=false;if(bulletList[currIndex]){bulletList[currIndex].addClassName('isActive');}
|
1085 |
+
var mobileItems=mobileSlider.querySelectorAll('.jfMatrixInputList-item');$(matrix).select('.jfMobileMatrix-prevRow')[0].observe('click',function(){handleMobilePrevClick();});$(matrix).select('.jfMobileMatrix-nextRow')[0].observe('click',function(){handleMobileNextClick();});var setActiveSlider=function(){mobileItems[newIndex].removeClassName('isHidden');mobileItems[currIndex].addClassName('isHidden');bulletList[currIndex].removeClassName('isActive');bulletList[newIndex].addClassName('isActive');currentRow=newEl;currIndex=newIndex;};var handleMobileNextClick=function(){newIndex=currIndex+1;if(newIndex!==rowLength){newEl=rowList[newIndex];newEl.addClassName('isSelected');currentRow.removeClassName('isSelected');if(newIndex>0){mobilePrev.disabled=false;}
|
1086 |
+
if(newIndex+1===rowLength){mobileNext.disabled=true;}
|
1087 |
+
setActiveSlider();}};var handleMobilePrevClick=function(){if(currIndex!==0){newIndex=currIndex-1;newEl=rowList[newIndex];newEl.addClassName('isSelected');currentRow.removeClassName('isSelected');if(newIndex===0){mobilePrev.disabled=true;}
|
1088 |
+
if(newIndex>=rowLength){mobileNext.disabled=true;}
|
1089 |
+
if(newIndex<rowLength-1){mobileNext.disabled=false;}
|
1090 |
+
setActiveSlider();}};}
|
1091 |
+
if(!isSlider){if($(matrix).select('.forDesktop').length>0){var headerItems=matrix.getElementsByClassName('jfMatrixHeader-item');var tableCells=matrix.getElementsByClassName('jfMatrixTable-cell');for(var i=1;i<headerItems.length;i++){var cell=tableCells[i].down();if(headerItems[i].getElementsByTagName('div')[0].getLayout().get('width')<5){var cellWidth=80;}else{var cellWidth=headerItems[i].getElementsByTagName('div')[0].getLayout().get('padding-box-width');}
|
1092 |
+
cell.style.width=cellWidth+'px';}
|
1093 |
+
if(headerItems&&headerItems.length){headerItems[0].getElementsByTagName('div')[0].style.width=tableCells[0].getElementsByTagName('div')[0].getLayout().get('padding-box-width')+'px';var matrixTable=matrix.getElementsByClassName('jfMatrixTable')[0];var matrixHeader=matrix.getElementsByClassName('jfMatrixHeader')[0];matrixTable.addEventListener('scroll',function(){matrixHeader.scrollLeft=matrixTable.scrollLeft;});}}
|
1094 |
+
if(hasMobile){var setActiveQuestion=function(activeQuestionOrder){var questions=$(matrix).select('.jfMatrix-question');var bullets=$(matrix).select('.jfMobileMatrix-columnDot');var isNextEnabled=isBackEnabled=true;questions.each(function(q){q.removeClassName('isActive');if(q.readAttribute('data-order')==activeQuestionOrder){$(q).addClassName('isActive');}});if(bullets){bullets.each(function(q){q.removeClassName('isActive');if(q.readAttribute('data-order')==activeQuestionOrder){$(q).addClassName('isActive');}});}
|
1095 |
+
var choices=$(matrix).select('.jfMatrix-choiceWrapper');choices.each(function(c){c.removeClassName('isActive');if(c.readAttribute('data-order')==activeQuestionOrder){$(c).addClassName('isActive');}});if(parseInt(activeQuestionOrder,10)===questions.length-1){isNextEnabled=false;}else if(parseInt(activeQuestionOrder,10)===0){isBackEnabled=false;}
|
1096 |
+
if($(matrix).select('.forMatrixPrev').length>0){$(matrix).select('.forMatrixPrev')[0].disabled=!isBackEnabled;}
|
1097 |
+
if($(matrix).select('.forMatrixNext').length>0){$(matrix).select('.forMatrixNext')[0].disabled=!isNextEnabled;}
|
1098 |
+
$(matrix).select('.jfMatrixProgress-text span')[0].innerHTML=activeQuestionOrder+1;}
|
1099 |
+
if(mobileActiveQuestionOrder){setActiveQuestion(mobileActiveQuestionOrder);}
|
1100 |
+
var handleNextButtonClick=function(){$(this).stopObserving('click');var questions=$(matrix).select('.jfMatrix-question');var activeQuestionOrder=parseInt($(matrix).select('.jfMatrix-question.isActive')[0].readAttribute('data-order'));activeQuestionOrder=parseInt(activeQuestionOrder,10)+1;setActiveQuestion(activeQuestionOrder);$(this).observe('click',handleNextButtonClick);};var handlePrevButtonClick=function(){$(this).stopObserving('click');var questions=$(matrix).select('.jfMatrix-question');var activeQuestionOrder=parseInt($(matrix).select('.jfMatrix-question.isActive')[0].readAttribute('data-order'));activeQuestionOrder=parseInt(activeQuestionOrder,10)-1;setActiveQuestion(activeQuestionOrder);$(this).observe('click',handlePrevButtonClick);};$(matrix).select('.forMatrixNext').length>0&&$(matrix).select('.forMatrixNext')[0].observe("click",handleNextButtonClick);$(matrix).select('.forMatrixPrev').length>0&&$(matrix).select('.forMatrixPrev')[0].observe("click",handlePrevButtonClick);var findAncestor=function(el,cls){while((el=el.parentElement)&&!el.classList.contains(cls));return el;}
|
1101 |
+
if(!passive&&!mobileVersion.hasClassName('hidden-matrix')){$(matrix).select('input').each(function(input){if(input.type=='radio'&&dataType!=='Yes No'){var showNextQuestion=function(){$(this).stopObserving('click');if(mobileVersion.hasClassName('hidden-matrix')){return;}
|
1102 |
+
var activeTable=findAncestor(this,'jfMatrixChoice-table');if($(activeTable)&&$(activeTable).select('.jfMatrixChoice-row.isSelected')&&$(activeTable).select('.jfMatrixChoice-row.isSelected').length>0){var selectedRow=$(activeTable).select('.jfMatrixChoice-row.isSelected')[0];selectedRow.removeClassName('isSelected');}
|
1103 |
+
var activeRow=findAncestor(this,'jfMatrixChoice-row');activeRow.addClassName('isSelected');setTimeout(function(){var nextButton=$(matrix).select('.jfMatrixProgress-button.forMatrixNext')[0];if($(nextButton)&&$(nextButton).readAttribute('disabled')==null){$(nextButton).triggerEvent('click');}},500);$(this).observe('click',showNextQuestion);};input.observe('click',showNextQuestion);}});}}}},setRatingLayout:function(id){if(document.getElementById('stage')){return null;}
|
1104 |
+
if(typeof CardForm==="object"&&CardForm.layoutParams&&CardForm.layoutParams.hasTouch===false){JotForm.setRatingClickTransfer(id);}
|
1105 |
+
var rating=document.getElementById('rating_'+id);if(!$(rating))return;var ratingHiddenInput=$(rating).select('.jfRating-shortcut-input')[0];var ratingItems=$(rating).select('.jfRating-items')[0];var ratingInputs=$(rating).select('.jfRating-input');var ratingBefore=null;if(!JotForm['ratingFnQueues']){JotForm['ratingFnQueues']=[];}
|
1106 |
+
JotForm['ratingFnQueues']['fnQueue_'+id]=[];ratingItems.addEventListener('click',function(evt){if(typeof CardForm==="object"&&CardForm.layoutParams&&CardForm.layoutParams.hasTouch===false){ratingHiddenInput&&ratingHiddenInput.focus();}});ratingHiddenInput.addEventListener('keyup',function(evt){var value=this.value;if(value){if($(rating).select('.jfRating-input:checked').length){var ratingBefore=$(rating).select('.jfRating-input:checked')[0].value;}
|
1107 |
+
if(value==="-"){value=parseInt(ratingBefore)-1;}
|
1108 |
+
if(value==="+"){value=parseInt(ratingBefore)+1;}
|
1109 |
+
value=value.toString();var ratingTargetInput=$(rating).select('.jfRating-input[value='+value+']')[0];if(ratingTargetInput){ratingTargetInput.checked='checked';JotForm.setRatingItemsChecked(id,value,ratingBefore);}}
|
1110 |
+
this.value='';});ratingInputs.each(function(ratingInput){ratingInput.addEventListener('mouseenter',function(){$(this).up('.jfRating-item').addClassName('indicate');var ratingItemEach=$(rating).select('.jfRating-items .jfRating-item.jfRating-selection');ratingItemEach.each(function(ratingItem){if($(ratingItem).hasClassName('indicate')){throw $break;}else{$(ratingItem).addClassName('indicate');}});});ratingInput.addEventListener('mouseleave',function(){ratingInputs.each(function(ratingInput){ratingInput.up('.jfRating-item').removeClassName('indicate');});});ratingInput.addEventListener('change',function(){JotForm.setRatingItemsChecked(id,this.value);});})},setRatingItemsChecked:function(id,value,ratingBefore){if(!JotForm['ratingFnQueues']){JotForm['ratingFnQueues']=[];}
|
1111 |
+
if(!JotForm['ratingFnQueues']['fnQueue_'+id]){JotForm['ratingFnQueues']['fnQueue_'+id]=[];}
|
1112 |
+
var rating=document.getElementById('rating_'+id);var ratingSelection=$(rating).select('.jfRating-selection');var selectedValue=!isNaN(value)&&parseInt(value);var ratingBefore=!isNaN(ratingBefore)&&parseInt(ratingBefore)||null;var ratingInputs=$(rating).select('.jfRating-input');var stack=JotForm['ratingFnQueues']['fnQueue_'+id];var timer=null;var queueProcessInterval=33;if(!ratingBefore&&rating.dataset.oldValue){ratingBefore=rating.dataset.oldValue;}
|
1113 |
+
rating.dataset.oldValue=value;var queueProcessor={enqueue:function(fnCall){stack.push(fnCall);if(timer===null){timer=setInterval(function(){queueProcessor.processQueue();},queueProcessInterval);}},processQueue:function(){typeof stack[0]==='function'&&stack[0]();stack.shift();if(stack.length===0){clearInterval(timer);timer=null;}}}
|
1114 |
+
ratingInputs.each(function(ratingInput){ratingInput.up('.jfRating-item').removeClassName('indicate');});if(ratingBefore<selectedValue||ratingBefore===null){ratingSelection.each(function(ratingItem,key){if(ratingItem.dataset){var itemValue=ratingItem.dataset.value;if(itemValue){queueProcessor.enqueue(function(){ratingItem.classList.add('checked');});if(itemValue===this.value){throw $break;}}}},{value:value});}
|
1115 |
+
if(ratingBefore&&ratingBefore>selectedValue){ratingSelection.reverse();ratingSelection.each(function(ratingItem,key){if(ratingItem.dataset){var itemValue=ratingItem.dataset.value;if(itemValue){if(itemValue===this.value){throw $break;}
|
1116 |
+
queueProcessor.enqueue(function(){ratingItem.classList.remove('checked');});}}},{value:value});}
|
1117 |
+
$('input_'+id).value=value;var hiddenInput=rating.select('.form-textbox')[0];hiddenInput.value=parseInt(value,10);JotForm.runConditionForId(id.toString());},setRatingClickTransfer:function(id){document.body.addEventListener('click',function(){var eventTarget=document.querySelector('.jfCard-wrapper.isVisible #rating_'+id+' input');eventTarget&&eventTarget.focus();});},getScrollbarWidth:function(matrix){var outer=document.createElement("div");outer.style.visibility="hidden";outer.style.width="100px";outer.style.msOverflowStyle="scrollbar";matrix.appendChild(outer);var widthNoScroll=outer.offsetWidth;outer.style.overflow="scroll";var inner=document.createElement("div");inner.style.width="100%";outer.appendChild(inner);var widthWithScroll=inner.offsetWidth;outer.parentNode.removeChild(outer);return widthNoScroll-widthWithScroll;},getOptionOtherInput:function(option){if(option){var parentWrapper=option.up('.form-'+option.type+'-item');if(parentWrapper){var otherSelector='.form-'+option.type+'-other-input';return parentWrapper.down(otherSelector);}}
|
1118 |
+
return null;},setFullNameAutoFocus:function(id){var prefixDropdown=$$('#prefix_'+id)[0];prefixDropdown.observe('change',function(){setTimeout(function(){var firstNameInput=$$('#first_'+id)[0];firstNameInput.focus();},500);});},initShoppingBag:function(){},initProductPages:function(){},initDonation:function(){},customToQueryParams:function(text,separator){var match=text.strip().match(/[^#&?]*?=[^#&?]*/g);if(!match||!match[1])return{};return match[1].split(separator||'&').inject({},function(hash,pair){if((pair=pair.split('='))[0]){var key=decodeURIComponent(pair.shift()),value=pair.length>1?pair.join('='):pair[0];if(value!=undefined)try{value=decodeURIComponent(value)}catch(e){value=unescape(value)}
|
1119 |
+
if(key in hash){if(!Object.isArray(hash[key]))hash[key]=[hash[key]];hash[key].push(value);}
|
1120 |
+
else hash[key]=value;}
|
1121 |
+
return hash;});},loadEmbedStyle:function(formID,styles){try{styles=JSON.parse(styles);}catch(e){styles={};}
|
1122 |
+
var isEmbed=window.parent!==window;if(!isEmbed){return;}
|
1123 |
+
if(window.location.href.indexOf('disableSmartEmbed')>-1){return;}
|
1124 |
+
var formCSS=document.getElementById('form-css');if(!formCSS){return;}
|
1125 |
+
var parser=document.createElement('a');parser.href=formCSS.href;var params=parser.search.toQueryParams();var embedUrl=params.embedUrl||document.URL;var referrerHash=getMD5(embedUrl);['resetSmartStyle','clearSmartStyle','clearInlineStyle'].each(function(key){var regexPattern=new RegExp('&?'+key+'(?:=[0-9]*)?');var matches=regexPattern.exec(embedUrl);if(matches&&matches[0]){embedUrl=embedUrl.replace(matches[0],'');var keyValue=matches[0].replace('&','').split('=');params[keyValue[0]]=keyValue[1]!==undefined?keyValue[1]:'1';}});if(params.embedUrl){delete(params.embedUrl);}
|
1126 |
+
params=Object.toQueryString(params);params+=(params!==''?'&':'')+'embedUrl='+embedUrl;pathname=parser.pathname.split('.css')[0]+'/'+referrerHash+'.css';var nextHref=parser.protocol+'//'+parser.hostname+'/'+pathname+'?'+params;this.loadStyleSheet(nextHref,function(){var inlineStyle=((styles[referrerHash]||{})['inlineStyle']||{});if(typeof inlineStyle['embedHeight']!=='undefined'){window.parent.postMessage('setHeight:'+inlineStyle['embedHeight']+':'+formID,'*');}
|
1127 |
+
formCSS.remove();});},initOwnerView:function(formID){if(!this.jsForm){return;}
|
1128 |
+
var url=this.url;if(!this.url.include('.jotform.pro')){url='https://www.jotform.com'}
|
1129 |
+
var src=url+'/ownerView.php?id='+formID;window.parent.postMessage(['loadScript',src,formID].join(':'),'*');}};function getMD5(s){function L(k,d){return(k<<d)|(k>>>(32-d))}function K(G,k){var I,d,F,H,x;F=(G&2147483648);H=(k&2147483648);I=(G&1073741824);d=(k&1073741824);x=(G&1073741823)+(k&1073741823);if(I&d){return(x^2147483648^F^H)}if(I|d){if(x&1073741824){return(x^3221225472^F^H)}else{return(x^1073741824^F^H)}}else{return(x^F^H)}}function r(d,F,k){return(d&F)|((~d)&k)}function q(d,F,k){return(d&k)|(F&(~k))}function p(d,F,k){return(d^F^k)}function n(d,F,k){return(F^(d|(~k)))}function u(G,F,aa,Z,k,H,I){G=K(G,K(K(r(F,aa,Z),k),I));return K(L(G,H),F)}function f(G,F,aa,Z,k,H,I){G=K(G,K(K(q(F,aa,Z),k),I));return K(L(G,H),F)}function D(G,F,aa,Z,k,H,I){G=K(G,K(K(p(F,aa,Z),k),I));return K(L(G,H),F)}function t(G,F,aa,Z,k,H,I){G=K(G,K(K(n(F,aa,Z),k),I));return K(L(G,H),F)}function e(G){var Z;var F=G.length;var x=F+8;var k=(x-(x%64))/64;var I=(k+1)*16;var aa=Array(I-1);var d=0;var H=0;while(H<F){Z=(H-(H%4))/4;d=(H%4)*8;aa[Z]=(aa[Z]|(G.charCodeAt(H)<<d));H++}Z=(H-(H%4))/4;d=(H%4)*8;aa[Z]=aa[Z]|(128<<d);aa[I-2]=F<<3;aa[I-1]=F>>>29;return aa}function B(x){var k="",F="",G,d;for(d=0;d<=3;d++){G=(x>>>(d*8))&255;F="0"+G.toString(16);k=k+F.substr(F.length-2,2)}return k}function J(k){k=k.replace(/rn/g,"n");var d="";for(var F=0;F<k.length;F++){var x=k.charCodeAt(F);if(x<128){d+=String.fromCharCode(x)}else{if((x>127)&&(x<2048)){d+=String.fromCharCode((x>>6)|192);d+=String.fromCharCode((x&63)|128)}else{d+=String.fromCharCode((x>>12)|224);d+=String.fromCharCode(((x>>6)&63)|128);d+=String.fromCharCode((x&63)|128)}}}return d}var C=Array();var P,h,E,v,g,Y,X,W,V;var S=7,Q=12,N=17,M=22;var A=5,z=9,y=14,w=20;var o=4,m=11,l=16,j=23;var U=6,T=10,R=15,O=21;s=J(s);C=e(s);Y=1732584193;X=4023233417;W=2562383102;V=271733878;for(P=0;P<C.length;P+=16){h=Y;E=X;v=W;g=V;Y=u(Y,X,W,V,C[P+0],S,3614090360);V=u(V,Y,X,W,C[P+1],Q,3905402710);W=u(W,V,Y,X,C[P+2],N,606105819);X=u(X,W,V,Y,C[P+3],M,3250441966);Y=u(Y,X,W,V,C[P+4],S,4118548399);V=u(V,Y,X,W,C[P+5],Q,1200080426);W=u(W,V,Y,X,C[P+6],N,2821735955);X=u(X,W,V,Y,C[P+7],M,4249261313);Y=u(Y,X,W,V,C[P+8],S,1770035416);V=u(V,Y,X,W,C[P+9],Q,2336552879);W=u(W,V,Y,X,C[P+10],N,4294925233);X=u(X,W,V,Y,C[P+11],M,2304563134);Y=u(Y,X,W,V,C[P+12],S,1804603682);V=u(V,Y,X,W,C[P+13],Q,4254626195);W=u(W,V,Y,X,C[P+14],N,2792965006);X=u(X,W,V,Y,C[P+15],M,1236535329);Y=f(Y,X,W,V,C[P+1],A,4129170786);V=f(V,Y,X,W,C[P+6],z,3225465664);W=f(W,V,Y,X,C[P+11],y,643717713);X=f(X,W,V,Y,C[P+0],w,3921069994);Y=f(Y,X,W,V,C[P+5],A,3593408605);V=f(V,Y,X,W,C[P+10],z,38016083);W=f(W,V,Y,X,C[P+15],y,3634488961);X=f(X,W,V,Y,C[P+4],w,3889429448);Y=f(Y,X,W,V,C[P+9],A,568446438);V=f(V,Y,X,W,C[P+14],z,3275163606);W=f(W,V,Y,X,C[P+3],y,4107603335);X=f(X,W,V,Y,C[P+8],w,1163531501);Y=f(Y,X,W,V,C[P+13],A,2850285829);V=f(V,Y,X,W,C[P+2],z,4243563512);W=f(W,V,Y,X,C[P+7],y,1735328473);X=f(X,W,V,Y,C[P+12],w,2368359562);Y=D(Y,X,W,V,C[P+5],o,4294588738);V=D(V,Y,X,W,C[P+8],m,2272392833);W=D(W,V,Y,X,C[P+11],l,1839030562);X=D(X,W,V,Y,C[P+14],j,4259657740);Y=D(Y,X,W,V,C[P+1],o,2763975236);V=D(V,Y,X,W,C[P+4],m,1272893353);W=D(W,V,Y,X,C[P+7],l,4139469664);X=D(X,W,V,Y,C[P+10],j,3200236656);Y=D(Y,X,W,V,C[P+13],o,681279174);V=D(V,Y,X,W,C[P+0],m,3936430074);W=D(W,V,Y,X,C[P+3],l,3572445317);X=D(X,W,V,Y,C[P+6],j,76029189);Y=D(Y,X,W,V,C[P+9],o,3654602809);V=D(V,Y,X,W,C[P+12],m,3873151461);W=D(W,V,Y,X,C[P+15],l,530742520);X=D(X,W,V,Y,C[P+2],j,3299628645);Y=t(Y,X,W,V,C[P+0],U,4096336452);V=t(V,Y,X,W,C[P+7],T,1126891415);W=t(W,V,Y,X,C[P+14],R,2878612391);X=t(X,W,V,Y,C[P+5],O,4237533241);Y=t(Y,X,W,V,C[P+12],U,1700485571);V=t(V,Y,X,W,C[P+3],T,2399980690);W=t(W,V,Y,X,C[P+10],R,4293915773);X=t(X,W,V,Y,C[P+1],O,2240044497);Y=t(Y,X,W,V,C[P+8],U,1873313359);V=t(V,Y,X,W,C[P+15],T,4264355552);W=t(W,V,Y,X,C[P+6],R,2734768916);X=t(X,W,V,Y,C[P+13],O,1309151649);Y=t(Y,X,W,V,C[P+4],U,4149444226);V=t(V,Y,X,W,C[P+11],T,3174756917);W=t(W,V,Y,X,C[P+2],R,718787259);X=t(X,W,V,Y,C[P+9],O,3951481745);Y=K(Y,h);X=K(X,E);W=K(W,v);V=K(V,g)}var i=B(Y)+B(X)+B(W)+B(V);return i.toLowerCase()};function getQuerystring(key,default_){if(default_==null)default_="";key=key.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");var regex=new RegExp("[\\?&]"+key+"=([^&#]*)");var qs=regex.exec(window.location.href);if(qs==null)
|
1130 |
+
return default_;else
|
1131 |
+
return qs[1];}
|
1132 |
+
function onProductImageClicked(index){var imageUrls;if(window.getAllProperties&&window.getAllProperties().form_products){imageUrls=window.getAllProperties().form_products.map(function(p){return p.icon}).filter(function(p){return p});}else if(document.querySelectorAll){imageUrls=Array.prototype.map.call(document.querySelectorAll('.form-product-item img'),function(p){return p.src});}
|
1133 |
+
if(!imageUrls||!imageUrls.length)return;var divOverlay=document.createElement('div');var divOverlayContent=document.createElement('div');var divImgWrapper=document.createElement('div');divOverlay.id='productImageOverlay';divOverlay.className='overlay';divOverlay.tabIndex=-1;divOverlayContent.className='overlay-content';divImgWrapper.className='img-wrapper';divOverlay.appendChild(divOverlayContent);divOverlayContent.appendChild(divImgWrapper);var prevButton=document.createElement('span');var nextButton=document.createElement('span');var closeButton=document.createElement('span');prevButton.innerText='prev';nextButton.innerText='next';closeButton.innerText='( X )';prevButton.className='lb-prev-button';nextButton.className='lb-next-button';closeButton.className='lb-close-button';divOverlayContent.appendChild(prevButton);divOverlayContent.appendChild(nextButton);divOverlayContent.appendChild(closeButton);imageUrls=imageUrls.filter(function(imageUrl){return!imageUrl.includes("noImage-placeholder.svg");});var images=imageUrls.map(function(url){var img=document.createElement('img');img.style.display='none';img.src=url;return img;});images[index].style.display='block';images.each(function(p){divImgWrapper.appendChild(p);});var visibleIndex=index;var imgLength=images.length;var displayPrevious=function(){images[visibleIndex].style.display='none';visibleIndex-=1;if(visibleIndex==-1)visibleIndex=imgLength-1;images[visibleIndex].style.display='block';arrangeImageSize();}
|
1134 |
+
prevButton.onclick=displayPrevious;var displayNext=function(){images[visibleIndex].style.display='none';visibleIndex+=1;if(visibleIndex==imgLength)visibleIndex=0;images[visibleIndex].style.display='block';arrangeImageSize();}
|
1135 |
+
nextButton.onclick=displayNext;divOverlayContent.onclick=function(e){e.stopPropagation();}
|
1136 |
+
var close=function(){window.onresize=null;divOverlay.remove();}
|
1137 |
+
closeButton.onclick=close;divOverlay.onclick=close;var arrangeImageSize=function(){var width=window.innerWidth;var height=window.innerHeight;var maxSize=(Math.min(width,height)*0.75)+'px';var size=width<height?{maxWidth:maxSize,height:'auto',width:'auto',maxHeight:'none'}:{width:'auto',maxHeight:maxSize,height:'auto',maxWidth:'none'};divOverlayContent.style.maxWidth=size.maxWidth;divOverlayContent.style.maxHeight=size.maxHeight;divOverlayContent.style.width=size.width;divOverlayContent.style.height=size.height;images[visibleIndex].style.maxHeight=size.maxHeight;images[visibleIndex].style.maxWidth=size.maxWidth;images[visibleIndex].style.width=size.width;images[visibleIndex].style.height=size.height;}
|
1138 |
+
var resizeCallback=function(e){arrangeImageSize();}
|
1139 |
+
window.onresize=resizeCallback;divOverlay.onkeydown=function(e){e.stopPropagation();e.preventDefault();if(e.keyCode==37||e.keyCode==38){displayPrevious();}else if(e.keyCode==39||e.keyCode==40){displayNext();}else if(e.keyCode==27){divOverlay.remove();}}
|
1140 |
+
document.body.appendChild(divOverlay);divOverlay.focus();arrangeImageSize();}
|
1141 |
+
window.fbAsyncInit=JotForm.FBInit.bind(JotForm);;var Calendar=Class.create();Calendar.VERSION='1.2';Calendar.DAY_NAMES=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'];Calendar.SHORT_DAY_NAMES=['S','M','T','W','T','F','S','S'];Calendar.MONTH_NAMES=['January','February','March','April','May','June','July','August','September','October','November','December'];Calendar.TODAY="Today";Calendar.SHORT_MONTH_NAMES=['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];Calendar.NAV_PREVIOUS_YEAR=-2;Calendar.NAV_PREVIOUS_MONTH=-1;Calendar.NAV_TODAY=0;Calendar.NAV_NEXT_MONTH=1;Calendar.NAV_NEXT_YEAR=2;Calendar._checkCalendar=function(event){if(!window._popupCalendar){return false;}
|
1142 |
+
if(Element.descendantOf(Event.element(event),window._popupCalendar.container)){return;}
|
1143 |
+
window._popupCalendar.callCloseHandler();return Event.stop(event);};Calendar.handleMouseDownEvent=function(event)
|
1144 |
+
{Event.observe(document,'mouseup',Calendar.handleMouseUpEvent);Event.stop(event);};Calendar.handleMouseUpEvent=function(event)
|
1145 |
+
{var el=Event.element(event);var calendar=el.calendar;var isNewDate=false;if(!calendar){return false;}
|
1146 |
+
calendar.shouldClose=false;if(el.hasClassName("unselectable")){return false;}
|
1147 |
+
if(typeof el.navAction=='undefined')
|
1148 |
+
{if(calendar.currentDateElement){Element.removeClassName(calendar.currentDateElement,'selected');Element.addClassName(el,'selected');calendar.shouldClose=(calendar.currentDateElement==el);if(!calendar.shouldClose){calendar.currentDateElement=el;}}
|
1149 |
+
calendar.date.setDateOnly(el.date);isNewDate=true;calendar.shouldClose=!el.hasClassName('otherDay');var isOtherMonth=!calendar.shouldClose;if(isOtherMonth){calendar.update(calendar.date);}}
|
1150 |
+
else
|
1151 |
+
{var date=new Date(calendar.date);if(el.navAction==Calendar.NAV_TODAY){date.setDateOnly(new Date());}
|
1152 |
+
var year=date.getFullYear();var mon=date.getMonth();function setMonth(m){var day=date.getDate();var max=date.getMonthDays(m);if(day>max){date.setDate(max);}
|
1153 |
+
date.setMonth(m);}
|
1154 |
+
switch(el.navAction){case Calendar.NAV_PREVIOUS_YEAR:if(year>calendar.minYear){date.setFullYear(year-1);}
|
1155 |
+
break;case Calendar.NAV_PREVIOUS_MONTH:if(mon>0){setMonth(mon-1);}
|
1156 |
+
else if(year-->calendar.minYear){date.setFullYear(year);setMonth(11);}
|
1157 |
+
break;case Calendar.NAV_TODAY:break;case Calendar.NAV_NEXT_MONTH:if(mon<11){setMonth(mon+1);}
|
1158 |
+
else if(year<calendar.maxYear){date.setFullYear(year+1);setMonth(0);}
|
1159 |
+
break;case Calendar.NAV_NEXT_YEAR:if(year<calendar.maxYear){date.setFullYear(year+1);}
|
1160 |
+
break;}
|
1161 |
+
if(!date.equalsTo(calendar.date)){calendar.setDate(date);isNewDate=true;}else if(el.navAction===0){isNewDate=(calendar.shouldClose=true);}
|
1162 |
+
calendar.checkPastAndFuture();}
|
1163 |
+
if(isNewDate){event&&calendar.callSelectHandler();}
|
1164 |
+
if(calendar.shouldClose){event&&calendar.callCloseHandler();}
|
1165 |
+
Event.stopObserving(document,'mouseup',Calendar.handleMouseUpEvent);return Event.stop(event);};Calendar.defaultSelectHandler=function(calendar)
|
1166 |
+
{if(!calendar.dateField){return false;}
|
1167 |
+
if(calendar.dateField.tagName=='DIV'){Element.update(calendar.dateField,calendar.date.print(calendar.dateFormat));}else if(calendar.dateField.tagName=='INPUT'){calendar.dateField.value=calendar.date.print(calendar.dateFormat);}
|
1168 |
+
if(typeof calendar.dateField.onchange=='function'){calendar.dateField.onchange();}
|
1169 |
+
if(calendar.shouldClose){calendar.callCloseHandler();}};Calendar.defaultCloseHandler=function(calendar)
|
1170 |
+
{calendar.hide();};Calendar.setup=function(params)
|
1171 |
+
{function param_default(name,def){if(!params[name]){params[name]=def;}}
|
1172 |
+
param_default('dateField',null);param_default('triggerElement',null);param_default('parentElement',null);param_default('selectHandler',null);param_default('closeHandler',null);if(params.parentElement)
|
1173 |
+
{var calendar=new Calendar(params.parentElement);calendar.setSelectHandler(params.selectHandler||Calendar.defaultSelectHandler);if(params.dateFormat){calendar.setDateFormat(params.dateFormat);}
|
1174 |
+
if(params.dateField){calendar.setDateField(params.dateField);calendar.parseDate(calendar.dateField.innerHTML||calendar.dateField.value);}
|
1175 |
+
if(params.startOnMonday){calendar.startOnMonday=true;calendar.create($(params.parentElement));}
|
1176 |
+
calendar.limits=params.limits;if(calendar.limits){calendar.fixCustomLimits();calendar.setDynamicLimits();calendar.update(calendar.date);calendar.checkPastAndFuture();}
|
1177 |
+
calendar.show();}
|
1178 |
+
else
|
1179 |
+
{var triggerElement=$(params.triggerElement||params.dateField);var calendar=new Calendar();calendar.limits=params.limits;if(calendar.limits){calendar.fixCustomLimits();calendar.setDynamicLimits();}
|
1180 |
+
calendar.setSelectHandler(params.selectHandler||Calendar.defaultSelectHandler);calendar.setCloseHandler(params.closeHandler||Calendar.defaultCloseHandler);calendar.startOnMonday=params.startOnMonday;if(params.dateFormat){calendar.setDateFormat(params.dateFormat);}
|
1181 |
+
if(params.dateField){calendar.setDateField(params.dateField);calendar.parseDate(calendar.dateField.innerHTML||calendar.dateField.value);}
|
1182 |
+
if(params.dateField){Date.parseDate(calendar.dateField.value||calendar.dateField.innerHTML,calendar.dateFormat);}
|
1183 |
+
triggerElement.onclick=function(){if(calendar.dateField&&(calendar.dateField.disabled||calendar.dateField.hasClassName('conditionallyDisabled'))){return false;}
|
1184 |
+
calendar.showAtElement(triggerElement);return calendar;};if(calendar.limits){calendar.update(calendar.date);calendar.checkPastAndFuture();}
|
1185 |
+
if(calendar.startOnMonday){calendar.update(calendar.date);calendar.create();}}
|
1186 |
+
try{var getDateFromField=function(){if(calendar.dateField.id){var id=calendar.dateField.id.replace("year_","");if(!$('month_'+id))return new Date();if(id){calendar.id=id;}
|
1187 |
+
var month=$('month_'+id)?parseInt($('month_'+id).value)-1:-1;var day=$('day_'+id).value;var year=$('year_'+id).value;if(month>-1&&day&&day!==""&&year&&year!==""){var dat=new Date(year,month,day,0,0,0);if(!calendar.date.equalsTo(dat)){calendar.date=dat;calendar.update(calendar.date);}}}};getDateFromField();calendar.dateField.up("li").observe("date:changed",function(){getDateFromField();});}catch(e){console.log(e);}
|
1188 |
+
return calendar;};Calendar.prototype={container:null,selectHandler:null,closeHandler:null,id:null,minYear:1900,maxYear:2100,dateFormat:'%Y-%m-%d',date:new Date(),currentDateElement:null,shouldClose:false,isPopup:true,dateField:null,startOnMonday:false,initialize:function(parent)
|
1189 |
+
{if(parent){this.create($(parent));}
|
1190 |
+
else{this.create();}},fixCustomLimits:function(){var fixDate=function(date){if(date.indexOf('today')>-1){return date;}
|
1191 |
+
var arr=date.toString().split("-");date="";if(arr.length>2){date+=(arr[0].length===2?"20"+arr[0]:arr[0])+"-";}
|
1192 |
+
if(arr.length>1){date+=JotForm.addZeros(arr[arr.length-2],2)+"-";}
|
1193 |
+
date+=JotForm.addZeros(arr[arr.length-1],2);return date;}
|
1194 |
+
var lim=this.limits;if("custom"in lim&&lim.custom!==false&&lim.custom instanceof Array){for(var i=0;i<lim.custom.length;i++){if(!lim.custom[i])continue;lim.custom[i]=fixDate(lim.custom[i]);}}
|
1195 |
+
if("ranges"in lim&&lim.ranges!==false&&lim.ranges instanceof Array){for(var i=0;i<lim.ranges.length;i++){if(!lim.ranges[i]||lim.ranges[i].indexOf(">")===-1)continue;var range=lim.ranges[i].split(">");var start=fixDate(range[0]);var end=fixDate(range[1]);lim.ranges[i]=start+">"+end;}}},setDynamicLimits:function(){var getComparativeDate=function(dat){if(dat.indexOf('today')>-1){var comp=new Date();var offset=parseInt(dat.replace(/\s/g,"").split('today')[1])||0;comp.setDate(comp.getDate()+offset);return comp.getFullYear()+"-"+JotForm.addZeros(comp.getMonth()+1,2)+"-"+JotForm.addZeros(comp.getDate(),2);}else{return dat;}}
|
1196 |
+
var lim=this.limits
|
1197 |
+
lim.start=getComparativeDate(lim.start);lim.end=getComparativeDate(lim.end);if("custom"in lim&&lim.custom!==false&&lim.custom instanceof Array){for(var i=0;i<lim.custom.length;i++){if(!lim.custom[i])continue;lim.custom[i]=getComparativeDate(lim.custom[i]);}}
|
1198 |
+
if("ranges"in lim&&lim.ranges!==false&&lim.ranges instanceof Array){for(var i=0;i<lim.ranges.length;i++){if(!lim.ranges[i]||lim.ranges[i].indexOf(">")===-1)continue;var range=lim.ranges[i].split(">");start=getComparativeDate(range[0]);end=getComparativeDate(range[1]);lim.ranges[i]=start+">"+end;}}},update:function(date)
|
1199 |
+
{var calendar=this;var today=new Date();var thisYear=today.getFullYear();var thisMonth=today.getMonth();var thisDay=today.getDate();var month=date.getMonth();var dayOfMonth=date.getDate();if(date.getFullYear()<this.minYear){date.setFullYear(this.minYear);}
|
1200 |
+
else if(date.getFullYear()>this.maxYear){date.setFullYear(this.maxYear);}
|
1201 |
+
this.date=new Date(date);date.setDate(1);if(calendar.startOnMonday){date.setDate(-(date.getDay())-5);}else{date.setDate(-(date.getDay())+1);}
|
1202 |
+
setTimeout((function(){if(this.id){this.container.setAttribute('id','calendar_'+this.id);}}).bind(this),0);Element.getElementsBySelector(this.container,'tbody tr').each(function(row,i){var rowHasDays=false;row.immediateDescendants().each(function(cell,j){var day=date.getDate();var dayOfWeek=date.getDay();var isCurrentMonth=(date.getMonth()==month);cell.className='';cell.date=new Date(date);cell.update(day);if(!isCurrentMonth){cell.addClassName('otherDay');}
|
1203 |
+
else{rowHasDays=true;}
|
1204 |
+
if(isCurrentMonth&&day==dayOfMonth){cell.addClassName('selected');calendar.currentDateElement=cell;}
|
1205 |
+
var allDays=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];var makeUnselectable=function(){if(date.getFullYear()==thisYear&&date.getMonth()==thisMonth&&day==thisDay&&$$('.todayButton').length>0){$$('.todayButton').first().setStyle({color:"white"});$$('.todayButton').first().addClassName("unselectable");}
|
1206 |
+
cell.setOpacity(0.5);cell.addClassName("unselectable");};var makeSelectable=function(){cell.setOpacity(1);cell.removeClassName("unselectable");};if(calendar.limits){var lim=calendar.limits;makeSelectable();if(allDays[i]in lim.days&&lim.days[allDays[dayOfWeek]]==false){makeUnselectable();}
|
1207 |
+
if("future"in lim&&lim.future===false){var now=new Date();if(date>now){makeUnselectable();}}
|
1208 |
+
if("past"in lim&&lim.past===false){var now=new Date();var yesterday=new Date();yesterday.setDate(now.getDate()-1);if(date<yesterday){makeUnselectable();}}
|
1209 |
+
if("start"in lim&&lim.start!=false&&lim.start!=""){var startDate=false
|
1210 |
+
if(lim.start.indexOf("{")>-1){startDate=JotForm.dateFromField(lim.start);}else{var start=lim.start.split("-");if(start.length==3){startDate=new Date(start[0],start[1]-1,start[2]);}}
|
1211 |
+
if(date<startDate)makeUnselectable();}
|
1212 |
+
if("end"in lim&&lim.end!=false&&lim.end!=""){var endDate;if(lim.end.indexOf("{")>-1){endDate=JotForm.dateFromField(lim.end);}else{var end=lim.end.split("-");if(end.length==3){var endDate=new Date(end[0],end[1]-1,end[2]);}}
|
1213 |
+
if(endDate){var nextDay=new Date(endDate);nextDay.setDate(endDate.getDate()+1);if(date>=nextDay){makeUnselectable();}}}
|
1214 |
+
if("custom"in lim&&lim.custom!==false&&lim.custom instanceof Array){for(var j=0;j<lim.custom.length;j++){if(!lim.custom[j])continue;var m=date.getMonth()+1;m=m<10?"0"+m:m;var d=day<10?"0"+day:day;if(lim.custom[j].indexOf("{")>-1){var custom=JotForm.dateFromField(lim.custom[j]);custom=JotForm.addZeros(custom.getFullYear(),2)+"-"+JotForm.addZeros(custom.getMonth()+1,2)+"-"+JotForm.addZeros(custom.getDate(),2);if(custom===date.getFullYear()+"-"+m+"-"+d)makeUnselectable();}
|
1215 |
+
if((lim.custom[j]===date.getFullYear()+"-"+m+"-"+d)||(typeof lim.custom[j]=="string"&&lim.custom[j].length===5&&lim.custom[j]===(m+"-"+d))||(typeof lim.custom[j]=="string"&&lim.custom[j].length===2&&lim.custom[j]==d)){makeUnselectable();}}}
|
1216 |
+
if("ranges"in lim&&lim.ranges!==false&&lim.ranges instanceof Array){for(var j=0;j<lim.ranges.length;j++){if(!lim.ranges[j]||lim.ranges[j].indexOf(">")===-1)continue;var range=lim.ranges[j].split(">");var start=range[0];var end=range[1];var startDate;if(start.indexOf("{")>-1){startDate=JotForm.dateFromField(start);}else{startDate=start.split("-");startDate=new Date(startDate[0],startDate[1]-1,startDate[2],0,0,0);}
|
1217 |
+
var endDate;if(end.indexOf("{")>-1){endDate=JotForm.dateFromField(end);}else{endDate=end.split("-");endDate=new Date(endDate[0],endDate[1]-1,endDate[2],0,0,0);}
|
1218 |
+
if(endDate){endDate.setDate(endDate.getDate()+1);if(date>=startDate&&date<endDate){makeUnselectable();}}}}}
|
1219 |
+
if(date.getFullYear()==thisYear&&date.getMonth()==thisMonth&&day==thisDay){cell.addClassName('today');}
|
1220 |
+
if([0,6].indexOf(dayOfWeek)!=-1){cell.addClassName('weekend');}
|
1221 |
+
date.setDate(day+1);});rowHasDays?row.show():row.hide();});this.container.getElementsBySelector('td.title')[0].update(Calendar.MONTH_NAMES[month]+' '+this.date.getFullYear());},checkPastAndFuture:function(){var now=new Date();var thisYear=now.getFullYear();var thisMonth=now.getMonth();var selectedYear=this.date.getFullYear();var selectedMonth=this.date.getMonth();var unselectable=function(el){el.setStyle({color:"white"});el.addClassName("unselectable");}
|
1222 |
+
var selectable=function(el){el.setStyle({color:"#f9621a"});el.removeClassName("unselectable");}
|
1223 |
+
if(this.limits){if("future"in this.limits&&this.limits.future===false){if(selectedYear>=thisYear){unselectable(this.container.down(".nextYear"));}else{selectable(this.container.down(".nextYear"));}
|
1224 |
+
if(selectedYear>=thisYear&&selectedMonth>=thisMonth){unselectable(this.container.down(".nextMonth"));}else{selectable(this.container.down(".nextMonth"));}}
|
1225 |
+
if("past"in this.limits&&this.limits.past===false){if(selectedYear<=thisYear){unselectable(this.container.down(".previousYear"));}else{selectable(this.container.down(".previousYear"));}
|
1226 |
+
if(selectedYear<=thisYear&&selectedMonth<=thisMonth){unselectable(this.container.down(".previousMonth"));}else{selectable(this.container.down(".previousMonth"));}}}},setNames:function(){Calendar.MONTH_NAMES=JotForm.calendarMonthsTranslated||JotForm.calendarMonths||Calendar.MONTH_NAMES;Calendar.DAY_NAMES=JotForm.calendarDaysTranslated||JotForm.calendarDays||Calendar.DAY_NAMES;for(var i=0;i<=7;i++){Calendar.SHORT_DAY_NAMES[i]=Calendar.DAY_NAMES[i].substring(0,1).toUpperCase();}
|
1227 |
+
if(JotForm.calendarTodayTranslated){Calendar.TODAY=JotForm.calendarTodayTranslated;}else if(JotForm.calendarOther&&JotForm.calendarOther.today){Calendar.TODAY=JotForm.calendarOther.today;}},create:function(parent)
|
1228 |
+
{this.setNames();if(!parent){parent=document.getElementsByTagName('body')[0];this.isPopup=true;}else{this.isPopup=false;}
|
1229 |
+
var table=this.table?this.table.update(""):new Element('table');table.setAttribute('summary','Datepicker Popup');this.table=table;var thead=new Element('thead');table.appendChild(thead);var row=new Element('tr');var cell=new Element('td',{colSpan:7});cell.addClassName('title');row.appendChild(cell);thead.appendChild(row);row=new Element('tr');this._drawButtonCell(row,'«',1,Calendar.NAV_PREVIOUS_YEAR,"previousYear");this._drawButtonCell(row,'‹',1,Calendar.NAV_PREVIOUS_MONTH,"previousMonth");this._drawButtonCell(row,Calendar.TODAY,3,Calendar.NAV_TODAY,"todayButton");this._drawButtonCell(row,'›',1,Calendar.NAV_NEXT_MONTH,"nextMonth");this._drawButtonCell(row,'»',1,Calendar.NAV_NEXT_YEAR,"nextYear");thead.appendChild(row);row=new Element('tr');var startDay=(this.startOnMonday)?1:0;var endDay=(this.startOnMonday)?7:6;for(var i=startDay;i<=endDay;++i){cell=new Element('th').update(Calendar.SHORT_DAY_NAMES[i]);if(i===startDay||i==endDay){cell.addClassName('weekend');}
|
1230 |
+
row.appendChild(cell);}
|
1231 |
+
thead.appendChild(row);var tbody=table.appendChild(new Element('tbody'));for(i=7;i>0;--i){row=tbody.appendChild(new Element('tr'));row.addClassName('days');for(var j=7;j>0;--j){cell=row.appendChild(new Element('td'));cell.calendar=this;}}
|
1232 |
+
this.container=new Element('div');this.container.setAttribute('aria-hidden',true);this.container.addClassName('calendar');if(this.isPopup){this.container.setStyle({position:'absolute',display:'none'});this.container.addClassName('popup');}
|
1233 |
+
this.container.appendChild(table);this.update(this.date);Event.observe(this.container,'mousedown',Calendar.handleMouseDownEvent);parent.appendChild(this.container);},_drawButtonCell:function(parent,text,colSpan,navAction,extraClass)
|
1234 |
+
{var cell=new Element('td');if(colSpan>1){cell.colSpan=colSpan;}
|
1235 |
+
cell.className='button'+(extraClass?" "+extraClass:"");cell.calendar=this;cell.navAction=navAction;cell.innerHTML=text;cell.unselectable='on';parent.appendChild(cell);return cell;},callSelectHandler:function()
|
1236 |
+
{if(this.selectHandler){this.selectHandler(this,this.date.print(this.dateFormat));}},callCloseHandler:function()
|
1237 |
+
{if(this.closeHandler){this.closeHandler(this);}},show:function()
|
1238 |
+
{this.container.show();if(this.isPopup){window._popupCalendar=this;Event.observe(document,'mousedown',Calendar._checkCalendar);}},showAt:function(x,y)
|
1239 |
+
{this.show();this.container.setStyle({left:x+'px',top:y+'px'});},showAtElement:function(element)
|
1240 |
+
{var firstElement=element.up('div').down('input');if(firstElement.up('div').visible()===false){firstElement=element;}
|
1241 |
+
var firstPos=Position.cumulativeOffset(firstElement);var x=firstPos[0]+40;var y=firstPos[1]+100+firstElement.getHeight();if(element.id.match(/_pick$/)){var elPos=Position.cumulativeOffset(element);var elX=elPos[0]-140;if(elX>x)x=elX;y=elPos[1]+100+element.getHeight();}
|
1242 |
+
this.showAt(x,y);},hide:function()
|
1243 |
+
{if(this.isPopup){Event.stopObserving(document,'mousedown',Calendar._checkCalendar);}
|
1244 |
+
this.container.hide();},parseDate:function(str,format)
|
1245 |
+
{if(!format){format=this.dateFormat;}
|
1246 |
+
this.setDate(Date.parseDate(str,format));},setSelectHandler:function(selectHandler)
|
1247 |
+
{this.selectHandler=selectHandler;},setCloseHandler:function(closeHandler)
|
1248 |
+
{this.closeHandler=closeHandler;},setDate:function(date)
|
1249 |
+
{if(!date.equalsTo(this.date)){this.update(date);}},setDateFormat:function(format)
|
1250 |
+
{this.dateFormat=format;},setDateField:function(field)
|
1251 |
+
{this.dateField=$(field);},setRange:function(minYear,maxYear)
|
1252 |
+
{this.minYear=minYear;this.maxYear=maxYear;}};window._popupCalendar=null;Date.DAYS_IN_MONTH=[31,28,31,30,31,30,31,31,30,31,30,31];Date.SECOND=1000;Date.MINUTE=60*Date.SECOND;Date.HOUR=60*Date.MINUTE;Date.DAY=24*Date.HOUR;Date.WEEK=7*Date.DAY;Date.parseDate=function(str,fmt){var today=new Date();var y=0;var m=-1;var d=0;var a=str.split(/\W+/);var b=fmt.match(/%./g);var i=0,j=0;var hr=0;var min=0;for(i=0;i<a.length;++i){if(!a[i]){continue;}
|
1253 |
+
switch(b[i]){case"%d":case"%e":d=parseInt(a[i],10);break;case"%m":m=parseInt(a[i],10)-1;break;case"%Y":case"%y":y=parseInt(a[i],10);(y<100)&&(y+=(y>29)?1900:2000);break;case"%b":case"%B":for(j=0;j<12;++j){if(Calendar.MONTH_NAMES[j].substr(0,a[i].length).toLowerCase()==a[i].toLowerCase()){m=j;break;}}
|
1254 |
+
break;case"%H":case"%I":case"%k":case"%l":hr=parseInt(a[i],10);break;case"%P":case"%p":if(/pm/i.test(a[i])&&hr<12){hr+=12;}
|
1255 |
+
else if(/am/i.test(a[i])&&hr>=12){hr-=12;}
|
1256 |
+
break;case"%M":min=parseInt(a[i],10);break;}}
|
1257 |
+
if(isNaN(y)){y=today.getFullYear();}
|
1258 |
+
if(isNaN(m)){m=today.getMonth();}
|
1259 |
+
if(isNaN(d)){d=today.getDate();}
|
1260 |
+
if(isNaN(hr)){hr=today.getHours();}
|
1261 |
+
if(isNaN(min)){min=today.getMinutes();}
|
1262 |
+
if(y!=0&&m!=-1&&d!=0){return new Date(y,m,d,hr,min,0);}
|
1263 |
+
y=0;m=-1;d=0;for(i=0;i<a.length;++i){if(a[i].search(/[a-zA-Z]+/)!=-1){var t=-1;for(j=0;j<12;++j){if(Calendar.MONTH_NAMES[j].substr(0,a[i].length).toLowerCase()==a[i].toLowerCase()){t=j;break;}}
|
1264 |
+
if(t!=-1){if(m!=-1){d=m+1;}
|
1265 |
+
m=t;}}else if(parseInt(a[i],10)<=12&&m==-1){m=a[i]-1;}else if(parseInt(a[i],10)>31&&y==0){y=parseInt(a[i],10);(y<100)&&(y+=(y>29)?1900:2000);}else if(d==0){d=a[i];}}
|
1266 |
+
if(y==0){y=today.getFullYear();}
|
1267 |
+
if(m!=-1&&d!=0){return new Date(y,m,d,hr,min,0);}
|
1268 |
+
return today;};Date.prototype.getMonthDays=function(month){var year=this.getFullYear();if(typeof month=="undefined"){month=this.getMonth();}
|
1269 |
+
if(((0==(year%4))&&((0!=(year%100))||(0==(year%400))))&&month==1){return 29;}
|
1270 |
+
else{return Date.DAYS_IN_MONTH[month];}};Date.prototype.getDayOfYear=function(){var now=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);var then=new Date(this.getFullYear(),0,0,0,0,0);var time=now-then;return Math.floor(time/Date.DAY);};Date.prototype.getWeekNumber=function(){var d=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);var DoW=d.getDay();d.setDate(d.getDate()-(DoW+6)%7+3);var ms=d.valueOf();d.setMonth(0);d.setDate(4);return Math.round((ms-d.valueOf())/(7*864e5))+1;};Date.prototype.equalsTo=function(date){return((this.getFullYear()==date.getFullYear())&&(this.getMonth()==date.getMonth())&&(this.getDate()==date.getDate())&&(this.getHours()==date.getHours())&&(this.getMinutes()==date.getMinutes()));};Date.prototype.setDateOnly=function(date){var tmp=new Date(date);this.setDate(1);this.setFullYear(tmp.getFullYear());this.setMonth(tmp.getMonth());this.setDate(tmp.getDate());};Date.prototype.print=function(str){var m=this.getMonth();var d=this.getDate();var y=this.getFullYear();var wn=this.getWeekNumber();var w=this.getDay();var s={};var hr=this.getHours();var pm=(hr>=12);var ir=(pm)?(hr-12):hr;var dy=this.getDayOfYear();if(ir==0){ir=12;}
|
1271 |
+
var min=this.getMinutes();var sec=this.getSeconds();s["%a"]=Calendar.SHORT_DAY_NAMES[w];s["%A"]=Calendar.DAY_NAMES[w];s["%b"]=Calendar.SHORT_MONTH_NAMES[m];s["%B"]=Calendar.MONTH_NAMES[m];s["%C"]=1+Math.floor(y/100);s["%d"]=(d<10)?("0"+d):d;s["%e"]=d;s["%H"]=(hr<10)?("0"+hr):hr;s["%I"]=(ir<10)?("0"+ir):ir;s["%j"]=(dy<100)?((dy<10)?("00"+dy):("0"+dy)):dy;s["%k"]=hr;s["%l"]=ir;s["%m"]=(m<9)?("0"+(1+m)):(1+m);s["%M"]=(min<10)?("0"+min):min;s["%n"]="\n";s["%p"]=pm?"PM":"AM";s["%P"]=pm?"pm":"am";s["%s"]=Math.floor(this.getTime()/1000);s["%S"]=(sec<10)?("0"+sec):sec;s["%t"]="\t";s["%U"]=s["%W"]=s["%V"]=(wn<10)?("0"+wn):wn;s["%u"]=w+1;s["%w"]=w;s["%y"]=(''+y).substr(2,2);s["%Y"]=y;s["%%"]="%";return str.gsub(/%./,function(match){return s[match]||match;});};Date.prototype.__msh_oldSetFullYear=Date.prototype.setFullYear;Date.prototype.setFullYear=function(y){var d=new Date(this);d.__msh_oldSetFullYear(y);if(d.getMonth()!=this.getMonth()){this.setDate(28);}
|
1272 |
+
this.__msh_oldSetFullYear(y);};
|
inc/js/prototype.forms.js
ADDED
@@ -0,0 +1,612 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var Prototype={Version:'1.7',Browser:(function(){var ua=navigator.userAgent;var isOpera=Object.prototype.toString.call(window.opera)=='[object Opera]';return{IE:!!window.attachEvent&&!isOpera,IE9:('documentMode'in document)&&document.documentMode==9,IE10:('documentMode'in document)&&document.documentMode==10,Opera:isOpera,WebKit:ua.indexOf('AppleWebKit/')>-1,Gecko:ua.indexOf('Gecko')>-1&&ua.indexOf('KHTML')===-1,MobileSafari:/Apple.*Mobile/.test(ua)}})(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){var constructor=window.Element||window.HTMLElement;return!!(constructor&&constructor.prototype);})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=='undefined')
|
2 |
+
return true;var div=document.createElement('div'),form=document.createElement('form'),isSupported=false;if(div['__proto__']&&(div['__proto__']!==form['__proto__'])){isSupported=true;}
|
3 |
+
div=form=null;return isSupported;})()},jsInlineEvents:['onabort','onactivate','onafterprint','onafterscriptexecute','onafterupdate','onbeforeactivate','onbeforecopy','onbeforecut','onbeforedeactivate','onbeforeeditfocus','onbeforepaste','onbeforeprint','onbeforescriptexecute','onbeforeunload','onbeforeupdate','onbegin','onblur','onbounce','oncancel','oncanplay','oncanplaythrough','oncellchange','onchange','onclick','onclose','oncontextmenu','oncontrolselect','oncopy','onctextmenu','oncuechange','oncut','ondataavailable','ondatasetchanged','ondatasetcomplete','ondblclick','ondeactivate','ondrag','ondragdrop','ondragend','ondragenter','ondragleave','ondragover','ondragstart','ondrop','ondurationchange','onemptied','onend','onended','onerror','onerrorupdate','onfilterchange','onfinish','onfocus','onfocusin','onfocusout','onhashchange','onhelp','oninput','oninvalid','onkeydown','onkeypress','onkeyup','onlayoutcomplete','onload','onloadeddata','onloadedmetadata','onloadstart','onlosecapture','onmediacomplete','onmediaerror','onmessage','onmousedown','onmouseenter','onmouseleave','onmousemove','onmouseout','onmouseover','onmouseup','onmousewheel','onmove','onmoveend','onmovestart','onoffline','ononline','onoutofsync','onpagehide','onpageshow','onpaste','onpause','onplay','onplaying','onpopstate','onprogress','onpropertychange','onratechange','onreadystatechange','onredo','onrepeat','onreset','onresize','onresizeend','onresizestart','onresume','onreverse','onrowdelete','onrowexit','onrowinserted','onrowsenter','onscroll','onsearch','onseek','onseeked','onseeking','onselect','onselectionchange','onselectstart','onshow','onstalled','onstart','onstop','onstorage','onsubmit','onsuspend','onsyncrestored','ontimeerror','ontimeupdate','ontoggle','ontouchcancel','ontouchend','ontouchmove','ontouchstart','ontrackchange','onundo','onunload','onurlflip','onvolumechange','onwaiting','onwheel'],ScriptFragment:'<script[^>]*>([\\S\\s]*?)<\/script>|prompt\s*[(]|alert\s*[(]|',JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(x){return x}};if(Prototype.Browser.MobileSafari)
|
4 |
+
Prototype.BrowserFeatures.SpecificElementExtensions=false;var Abstract={};var Try={these:function(){var returnValue;for(var i=0,length=arguments.length;i<length;i++){var lambda=arguments[i];try{returnValue=lambda();break;}catch(e){}}
|
5 |
+
return returnValue;}};var Class=(function(){var IS_DONTENUM_BUGGY=(function(){for(var p in{toString:1}){if(p==='toString')return false;}
|
6 |
+
return true;})();function subclass(){};function create(){var parent=null,properties=$A(arguments);if(Object.isFunction(properties[0]))
|
7 |
+
parent=properties.shift();function klass(){this.initialize.apply(this,arguments);}
|
8 |
+
Object.extend(klass,Class.Methods);klass.superclass=parent;klass.subclasses=[];if(parent){subclass.prototype=parent.prototype;klass.prototype=new subclass;parent.subclasses.push(klass);}
|
9 |
+
for(var i=0,length=properties.length;i<length;i++)
|
10 |
+
klass.addMethods(properties[i]);if(!klass.prototype.initialize)
|
11 |
+
klass.prototype.initialize=Prototype.emptyFunction;klass.prototype.constructor=klass;return klass;}
|
12 |
+
function addMethods(source){var ancestor=this.superclass&&this.superclass.prototype,properties=Object.keys(source);if(IS_DONTENUM_BUGGY){if(source.toString!=Object.prototype.toString)
|
13 |
+
properties.push("toString");if(source.valueOf!=Object.prototype.valueOf)
|
14 |
+
properties.push("valueOf");}
|
15 |
+
for(var i=0,length=properties.length;i<length;i++){var property=properties[i],value=source[property];if(ancestor&&Object.isFunction(value)&&value.argumentNames()[0]=="$super"){var method=value;value=(function(m){return function(){return ancestor[m].apply(this,arguments);};})(property).wrap(method);value.valueOf=method.valueOf.bind(method);value.toString=method.toString.bind(method);}
|
16 |
+
this.prototype[property]=value;}
|
17 |
+
return this;}
|
18 |
+
return{create:create,Methods:{addMethods:addMethods}};})();(function(){var _toString=Object.prototype.toString,NULL_TYPE='Null',UNDEFINED_TYPE='Undefined',BOOLEAN_TYPE='Boolean',NUMBER_TYPE='Number',STRING_TYPE='String',OBJECT_TYPE='Object',FUNCTION_CLASS='[object Function]',BOOLEAN_CLASS='[object Boolean]',NUMBER_CLASS='[object Number]',STRING_CLASS='[object String]',ARRAY_CLASS='[object Array]',DATE_CLASS='[object Date]',NATIVE_JSON_STRINGIFY_SUPPORT=window.JSON&&typeof JSON.stringify==='function'&&JSON.stringify(0)==='0'&&typeof JSON.stringify(Prototype.K)==='undefined';function Type(o){switch(o){case null:return NULL_TYPE;case(void 0):return UNDEFINED_TYPE;}
|
19 |
+
var type=typeof o;switch(type){case'boolean':return BOOLEAN_TYPE;case'number':return NUMBER_TYPE;case'string':return STRING_TYPE;}
|
20 |
+
return OBJECT_TYPE;}
|
21 |
+
function extend(destination,source){for(var property in source)
|
22 |
+
destination[property]=source[property];return destination;}
|
23 |
+
function inspect(object){try{if(isUndefined(object))return'undefined';if(object===null)return'null';return object.inspect?object.inspect():String(object);}catch(e){if(e instanceof RangeError)return'...';throw e;}}
|
24 |
+
function toJSON(value){return Str('',{'':value},[]);}
|
25 |
+
function Str(key,holder,stack){var value=holder[key],type=typeof value;if(Type(value)===OBJECT_TYPE&&typeof value.toJSON==='function'){value=value.toJSON(key);}
|
26 |
+
var _class=_toString.call(value);switch(_class){case NUMBER_CLASS:case BOOLEAN_CLASS:case STRING_CLASS:value=value.valueOf();}
|
27 |
+
switch(value){case null:return'null';case true:return'true';case false:return'false';}
|
28 |
+
type=typeof value;switch(type){case'string':return value.inspect(true);case'number':return isFinite(value)?String(value):'null';case'object':for(var i=0,length=stack.length;i<length;i++){if(stack[i]===value){throw new TypeError();}}
|
29 |
+
stack.push(value);var partial=[];if(_class===ARRAY_CLASS){for(var i=0,length=value.length;i<length;i++){var str=Str(i,value,stack);partial.push(typeof str==='undefined'?'null':str);}
|
30 |
+
partial='['+partial.join(',')+']';}else{var keys=Object.keys(value);for(var i=0,length=keys.length;i<length;i++){var key=keys[i],str=Str(key,value,stack);if(typeof str!=="undefined"){partial.push(key.inspect(true)+':'+str);}}
|
31 |
+
partial='{'+partial.join(',')+'}';}
|
32 |
+
stack.pop();return partial;}}
|
33 |
+
function stringify(object){return JSON.stringify(object);}
|
34 |
+
function toQueryString(object){return $H(object).toQueryString();}
|
35 |
+
function toHTML(object){return object&&object.toHTML?object.toHTML():String.interpret(object);}
|
36 |
+
function keys(object){if(Type(object)!==OBJECT_TYPE){throw new TypeError();}
|
37 |
+
var results=[];for(var property in object){if(object.hasOwnProperty(property)){results.push(property);}}
|
38 |
+
return results;}
|
39 |
+
function values(object){var results=[];for(var property in object)
|
40 |
+
results.push(object[property]);return results;}
|
41 |
+
function clone(object){return extend({},object);}
|
42 |
+
function isElement(object){return!!(object&&object.nodeType==1);}
|
43 |
+
function isArray(object){return _toString.call(object)===ARRAY_CLASS;}
|
44 |
+
var hasNativeIsArray=(typeof Array.isArray=='function')&&Array.isArray([])&&!Array.isArray({});if(hasNativeIsArray){isArray=Array.isArray;}
|
45 |
+
function isHash(object){return object instanceof Hash;}
|
46 |
+
function isFunction(object){return _toString.call(object)===FUNCTION_CLASS;}
|
47 |
+
function isString(object){return _toString.call(object)===STRING_CLASS;}
|
48 |
+
function isNumber(object){return _toString.call(object)===NUMBER_CLASS;}
|
49 |
+
function isDate(object){return _toString.call(object)===DATE_CLASS;}
|
50 |
+
function isUndefined(object){return typeof object==="undefined";}
|
51 |
+
extend(Object,{extend:extend,inspect:inspect,toJSON:NATIVE_JSON_STRINGIFY_SUPPORT?stringify:toJSON,toQueryString:toQueryString,toHTML:toHTML,keys:Object.keys||keys,values:values,clone:clone,isElement:isElement,isArray:isArray,isHash:isHash,isFunction:isFunction,isString:isString,isNumber:isNumber,isDate:isDate,isUndefined:isUndefined});})();Object.extend(Function.prototype,(function(){var slice=Array.prototype.slice;function update(array,args){var arrayLength=array.length,length=args.length;while(length--)array[arrayLength+length]=args[length];return array;}
|
52 |
+
function merge(array,args){array=slice.call(array,0);return update(array,args);}
|
53 |
+
function argumentNames(){var names=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\//g,'').replace(/\s+/g,'').split(',');return names.length==1&&!names[0]?[]:names;}
|
54 |
+
function bind(context){if(arguments.length<2&&Object.isUndefined(arguments[0]))return this;var __method=this,args=slice.call(arguments,1);return function(){var a=merge(args,arguments);return __method.apply(context,a);}}
|
55 |
+
function bindAsEventListener(context){var __method=this,args=slice.call(arguments,1);return function(event){var a=update([event||window.event],args);return __method.apply(context,a);}}
|
56 |
+
function curry(){if(!arguments.length)return this;var __method=this,args=slice.call(arguments,0);return function(){var a=merge(args,arguments);return __method.apply(this,a);}}
|
57 |
+
function delay(timeout){var __method=this,args=slice.call(arguments,1);timeout=timeout*1000;return window.setTimeout(function(){return __method.apply(__method,args);},timeout);}
|
58 |
+
function defer(){var args=update([0.01],arguments);return this.delay.apply(this,args);}
|
59 |
+
function wrap(wrapper){var __method=this;return function(){var a=update([__method.bind(this)],arguments);return wrapper.apply(this,a);}}
|
60 |
+
function methodize(){if(this._methodized)return this._methodized;var __method=this;return this._methodized=function(){var a=update([this],arguments);return __method.apply(null,a);};}
|
61 |
+
return{argumentNames:argumentNames,bind:bind,bindAsEventListener:bindAsEventListener,curry:curry,delay:delay,p_defer:defer,wrap:wrap,methodize:methodize}})());(function(proto){function toISOString(){return this.getUTCFullYear()+'-'+
|
62 |
+
(this.getUTCMonth()+1).toPaddedString(2)+'-'+
|
63 |
+
this.getUTCDate().toPaddedString(2)+'T'+
|
64 |
+
this.getUTCHours().toPaddedString(2)+':'+
|
65 |
+
this.getUTCMinutes().toPaddedString(2)+':'+
|
66 |
+
this.getUTCSeconds().toPaddedString(2)+'Z';}
|
67 |
+
function toJSON(){return this.toISOString();}
|
68 |
+
if(!proto.toISOString)proto.toISOString=toISOString;if(!proto.toJSON)proto.toJSON=toJSON;})(Date.prototype);RegExp.prototype.match=RegExp.prototype.test;RegExp.escape=function(str){return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g,'\\$1');};var PeriodicalExecuter=Class.create({initialize:function(callback,frequency){this.callback=callback;this.frequency=frequency;this.currentlyExecuting=false;this.registerCallback();},registerCallback:function(){this.timer=setInterval(this.onTimerEvent.bind(this),this.frequency*1000);},execute:function(){this.callback(this);},stop:function(){if(!this.timer)return;clearInterval(this.timer);this.timer=null;},onTimerEvent:function(){if(!this.currentlyExecuting){try{this.currentlyExecuting=true;this.execute();this.currentlyExecuting=false;}catch(e){this.currentlyExecuting=false;throw e;}}}});Object.extend(String,{interpret:function(value){return value==null?'':String(value);},specialChar:{'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','\\':'\\\\'}});Object.extend(String.prototype,(function(){var NATIVE_JSON_PARSE_SUPPORT=window.JSON&&typeof JSON.parse==='function'&&JSON.parse('{"test": true}').test;function prepareReplacement(replacement){if(Object.isFunction(replacement))return replacement;var template=new Template(replacement);return function(match){return template.evaluate(match)};}
|
69 |
+
function gsub(pattern,replacement){var result='',source=this,match;replacement=prepareReplacement(replacement);if(Object.isString(pattern))
|
70 |
+
pattern=RegExp.escape(pattern);if(!(pattern.length||pattern.source)){replacement=replacement('');return replacement+source.split('').join(replacement)+replacement;}
|
71 |
+
while(source.length>0){if(match=source.match(pattern)){result+=source.slice(0,match.index);result+=String.interpret(replacement(match));source=source.slice(match.index+match[0].length);}else{result+=source,source='';}}
|
72 |
+
return result;}
|
73 |
+
function sub(pattern,replacement,count){replacement=prepareReplacement(replacement);count=Object.isUndefined(count)?1:count;return this.gsub(pattern,function(match){if(--count<0)return match[0];return replacement(match);});}
|
74 |
+
function scan(pattern,iterator){this.gsub(pattern,iterator);return String(this);}
|
75 |
+
function truncate(length,truncation){length=length||30;truncation=Object.isUndefined(truncation)?'...':truncation;return this.length>length?this.slice(0,length-truncation.length)+truncation:String(this);}
|
76 |
+
function strip(){return this.replace(/^\s+/,'').replace(/\s+$/,'');}
|
77 |
+
function stripTags(separator){return this.replace(/<\w+(\s+("[^"]*"|'[^']*'|[^>])+)?>|<\/\w+>/gi,separator||'');}
|
78 |
+
function stripScripts(){return this.replace(new RegExp(Prototype.ScriptFragment,'img'),'');}
|
79 |
+
function stripEvents(){return this.replace(new RegExp(Prototype.jsInlineEvents.join('|'),'img'),'');}
|
80 |
+
function extractScripts(){var matchAll=new RegExp(Prototype.ScriptFragment,'img'),matchOne=new RegExp(Prototype.ScriptFragment,'im');return(this.match(matchAll)||[]).map(function(scriptTag){return(scriptTag.match(matchOne)||['',''])[1];});}
|
81 |
+
function evalScripts(){return this.extractScripts().map(function(script){return eval(script)});}
|
82 |
+
function escapeHTML(){return this.replace(/&/g,'&').replace(/&amp;/g,'&').replace(/</g,'<').replace(/>/g,'>');}
|
83 |
+
function unescapeHTML(){return this.stripTags().replace(/</g,'<').replace(/>/g,'>').replace(/&/g,'&');}
|
84 |
+
function toQueryParams(separator){var match=this.strip().match(/([^?#]*)(#.*)?$/);if(!match)return{};return match[1].split(separator||'&').inject({},function(hash,pair){if((pair=pair.split('='))[0]){var key=decodeURIComponent(pair.shift()),value=pair.length>1?pair.join('='):pair[0];if(value!=undefined)try{value=decodeURIComponent(value)}catch(e){value=unescape(value)}
|
85 |
+
if(key in hash){if(!Object.isArray(hash[key]))hash[key]=[hash[key]];hash[key].push(value);}
|
86 |
+
else hash[key]=value;}
|
87 |
+
return hash;});}
|
88 |
+
function toArray(){return this.split('');}
|
89 |
+
function succ(){return this.slice(0,this.length-1)+
|
90 |
+
String.fromCharCode(this.charCodeAt(this.length-1)+1);}
|
91 |
+
function times(count){return count<1?'':new Array(count+1).join(this);}
|
92 |
+
function camelize(){return this.replace(/-+(.)?/g,function(match,chr){return chr?chr.toUpperCase():'';});}
|
93 |
+
function capitalize(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase();}
|
94 |
+
function underscore(){return this.replace(/::/g,'/').replace(/([A-Z]+)([A-Z][a-z])/g,'$1_$2').replace(/([a-z\d])([A-Z])/g,'$1_$2').replace(/-/g,'_').toLowerCase();}
|
95 |
+
function dasherize(){return this.replace(/_/g,'-');}
|
96 |
+
function inspect(useDoubleQuotes){var escapedString=this.replace(/[\x00-\x1f\\]/g,function(character){if(character in String.specialChar){return String.specialChar[character];}
|
97 |
+
return'\\u00'+character.charCodeAt().toPaddedString(2,16);});if(useDoubleQuotes)return'"'+escapedString.replace(/"/g,'\\"')+'"';return"'"+escapedString.replace(/'/g,'\\\'')+"'";}
|
98 |
+
function unfilterJSON(filter){return this.replace(filter||Prototype.JSONFilter,'$1');}
|
99 |
+
function isJSON(){var str=this;if(str.blank())return false;str=str.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,'@');str=str.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']');str=str.replace(/(?:^|:|,)(?:\s*\[)+/g,'');return(/^[\],:{}\s]*$/).test(str);}
|
100 |
+
function evalJSON(sanitize){var json=this.unfilterJSON(),cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;if(cx.test(json)){json=json.replace(cx,function(a){return'\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4);});}
|
101 |
+
try{if(!sanitize||json.isJSON())return eval('('+json+')');}catch(e){}
|
102 |
+
throw new SyntaxError('Badly formed JSON string: '+this.inspect());}
|
103 |
+
function parseJSON(){var json=this.unfilterJSON();return JSON.parse(json);}
|
104 |
+
function include(pattern){return this.indexOf(pattern)>-1;}
|
105 |
+
function startsWith(pattern){return this.lastIndexOf(pattern,0)===0;}
|
106 |
+
function endsWith(pattern){var d=this.length-pattern.length;return d>=0&&this.indexOf(pattern,d)===d;}
|
107 |
+
function empty(){return this=='';}
|
108 |
+
function blank(){return /^\s*$/.test(this);}
|
109 |
+
function interpolate(object,pattern){return new Template(this,pattern).evaluate(object);}
|
110 |
+
return{gsub:gsub,sub:sub,scan:scan,truncate:truncate,strip:String.prototype.trim||strip,stripTags:stripTags,stripScripts:stripScripts,stripEvents:stripEvents,extractScripts:extractScripts,evalScripts:evalScripts,escapeHTML:escapeHTML,unescapeHTML:unescapeHTML,toQueryParams:toQueryParams,parseQuery:toQueryParams,toArray:toArray,succ:succ,times:times,camelize:camelize,capitalize:capitalize,underscore:underscore,dasherize:dasherize,inspect:inspect,unfilterJSON:unfilterJSON,isJSON:isJSON,evalJSON:NATIVE_JSON_PARSE_SUPPORT?parseJSON:evalJSON,include:include,startsWith:startsWith,endsWith:endsWith,empty:empty,blank:blank,interpolate:interpolate};})());var Template=Class.create({initialize:function(template,pattern){this.template=template.toString();this.pattern=pattern||Template.Pattern;},evaluate:function(object){if(object&&Object.isFunction(object.toTemplateReplacements))
|
111 |
+
object=object.toTemplateReplacements();return this.template.gsub(this.pattern,function(match){if(object==null)return(match[1]+'');var before=match[1]||'';if(before=='\\')return match[2];var ctx=object,expr=match[3],pattern=/^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/;match=pattern.exec(expr);if(match==null)return before;while(match!=null){var comp=match[1].startsWith('[')?match[2].replace(/\\\\]/g,']'):match[1];ctx=ctx[comp];if(null==ctx||''==match[3])break;expr=expr.substring('['==match[3]?match[1].length:match[0].length);match=pattern.exec(expr);}
|
112 |
+
return before+String.interpret(ctx);});}});Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;var $break={};var Enumerable=(function(){function each(iterator,context){var index=0;try{this._each(function(value){iterator.call(context,value,index++);});}catch(e){if(e!=$break)throw e;}
|
113 |
+
return this;}
|
114 |
+
function eachSlice(number,iterator,context){var index=-number,slices=[],array=this.toArray();if(number<1)return array;while((index+=number)<array.length)
|
115 |
+
slices.push(array.slice(index,index+number));return slices.collect(iterator,context);}
|
116 |
+
function all(iterator,context){iterator=iterator||Prototype.K;var result=true;this.each(function(value,index){result=result&&!!iterator.call(context,value,index);if(!result)throw $break;});return result;}
|
117 |
+
function any(iterator,context){iterator=iterator||Prototype.K;var result=false;this.each(function(value,index){if(result=!!iterator.call(context,value,index))
|
118 |
+
throw $break;});return result;}
|
119 |
+
function collect(iterator,context){iterator=iterator||Prototype.K;var results=[];this.each(function(value,index){results.push(iterator.call(context,value,index));});return results;}
|
120 |
+
function detect(iterator,context){var result;this.each(function(value,index){if(iterator.call(context,value,index)){result=value;throw $break;}});return result;}
|
121 |
+
function findAll(iterator,context){var results=[];this.each(function(value,index){if(iterator.call(context,value,index))
|
122 |
+
results.push(value);});return results;}
|
123 |
+
function grep(filter,iterator,context){iterator=iterator||Prototype.K;var results=[];if(Object.isString(filter))
|
124 |
+
filter=new RegExp(RegExp.escape(filter));this.each(function(value,index){if(filter.match(value))
|
125 |
+
results.push(iterator.call(context,value,index));});return results;}
|
126 |
+
function include(object){if(Object.isFunction(this.indexOf))
|
127 |
+
if(this.indexOf(object)!=-1)return true;var found=false;this.each(function(value){if(value==object){found=true;throw $break;}});return found;}
|
128 |
+
function inGroupsOf(number,fillWith){fillWith=Object.isUndefined(fillWith)?null:fillWith;return this.eachSlice(number,function(slice){while(slice.length<number)slice.push(fillWith);return slice;});}
|
129 |
+
function inject(memo,iterator,context){this.each(function(value,index){memo=iterator.call(context,memo,value,index);});return memo;}
|
130 |
+
function invoke(method){var args=$A(arguments).slice(1);return this.map(function(value){return value[method].apply(value,args);});}
|
131 |
+
function max(iterator,context){iterator=iterator||Prototype.K;var result;this.each(function(value,index){value=iterator.call(context,value,index);if(result==null||value>=result)
|
132 |
+
result=value;});return result;}
|
133 |
+
function min(iterator,context){iterator=iterator||Prototype.K;var result;this.each(function(value,index){value=iterator.call(context,value,index);if(result==null||value<result)
|
134 |
+
result=value;});return result;}
|
135 |
+
function partition(iterator,context){iterator=iterator||Prototype.K;var trues=[],falses=[];this.each(function(value,index){(iterator.call(context,value,index)?trues:falses).push(value);});return[trues,falses];}
|
136 |
+
function pluck(property){var results=[];this.each(function(value){results.push(value[property]);});return results;}
|
137 |
+
function reject(iterator,context){var results=[];this.each(function(value,index){if(!iterator.call(context,value,index))
|
138 |
+
results.push(value);});return results;}
|
139 |
+
function sortBy(iterator,context){return this.map(function(value,index){return{value:value,criteria:iterator.call(context,value,index)};}).sort(function(left,right){var a=left.criteria,b=right.criteria;return a<b?-1:a>b?1:0;}).pluck('value');}
|
140 |
+
function toArray(){return this.map();}
|
141 |
+
function zip(){var iterator=Prototype.K,args=$A(arguments);if(Object.isFunction(args.last()))
|
142 |
+
iterator=args.pop();var collections=[this].concat(args).map($A);return this.map(function(value,index){return iterator(collections.pluck(index));});}
|
143 |
+
function size(){return this.toArray().length;}
|
144 |
+
function inspect(){return'#<Enumerable:'+this.toArray().inspect()+'>';}
|
145 |
+
return{each:each,eachSlice:eachSlice,all:all,every:all,any:any,some:any,collect:collect,map:collect,detect:detect,findAll:findAll,select:findAll,filter:findAll,grep:grep,include:include,member:include,inGroupsOf:inGroupsOf,inject:inject,invoke:invoke,max:max,min:min,partition:partition,pluck:pluck,reject:reject,sortBy:sortBy,toArray:toArray,entries:toArray,zip:zip,size:size,inspect:inspect,find:detect};})();function $A(iterable){if(!iterable)return[];if('toArray'in Object(iterable))return iterable.toArray();var length=iterable.length||0,results=new Array(length);while(length--)results[length]=iterable[length];return results;}
|
146 |
+
function $w(string){if(!Object.isString(string))return[];string=string.strip();return string?string.split(/\s+/):[];}
|
147 |
+
Array.from=$A;(function(){var arrayProto=Array.prototype,slice=arrayProto.slice,_each=arrayProto.forEach;function each(iterator,context){for(var i=0,length=this.length>>>0;i<length;i++){if(i in this)iterator.call(context,this[i],i,this);}}
|
148 |
+
if(!_each)_each=each;function clear(){this.length=0;return this;}
|
149 |
+
function first(){return this[0];}
|
150 |
+
function last(){return this[this.length-1];}
|
151 |
+
function compact(){return this.select(function(value){return value!=null;});}
|
152 |
+
function flatten(){return this.inject([],function(array,value){if(Object.isArray(value))
|
153 |
+
return array.concat(value.flatten());array.push(value);return array;});}
|
154 |
+
function without(){var values=slice.call(arguments,0);return this.select(function(value){return!values.include(value);});}
|
155 |
+
function reverse(inline){return(inline===false?this.toArray():this)._reverse();}
|
156 |
+
function uniq(sorted){return this.inject([],function(array,value,index){if(0==index||(sorted?array.last()!=value:!array.include(value)))
|
157 |
+
array.push(value);return array;});}
|
158 |
+
function intersect(array){return this.uniq().findAll(function(item){return array.indexOf(item)!==-1;});}
|
159 |
+
function clone(){return slice.call(this,0);}
|
160 |
+
function size(){return this.length;}
|
161 |
+
function inspect(){return'['+this.map(Object.inspect).join(', ')+']';}
|
162 |
+
function indexOf(item,i){if(this==null)throw new TypeError();var array=Object(this),length=array.length>>>0;if(length===0)return-1;i=Number(i);if(isNaN(i)){i=0;}else if(i!==0&&isFinite(i)){i=(i>0?1:-1)*Math.floor(Math.abs(i));}
|
163 |
+
if(i>length)return-1;var k=i>=0?i:Math.max(length-Math.abs(i),0);for(;k<length;k++)
|
164 |
+
if(k in array&&array[k]===item)return k;return-1;}
|
165 |
+
function lastIndexOf(item,i){if(this==null)throw new TypeError();var array=Object(this),length=array.length>>>0;if(length===0)return-1;if(!Object.isUndefined(i)){i=Number(i);if(isNaN(i)){i=0;}else if(i!==0&&isFinite(i)){i=(i>0?1:-1)*Math.floor(Math.abs(i));}}else{i=length;}
|
166 |
+
var k=i>=0?Math.min(i,length-1):length-Math.abs(i);for(;k>=0;k--)
|
167 |
+
if(k in array&&array[k]===item)return k;return-1;}
|
168 |
+
function concat(_){var array=[],items=slice.call(arguments,0),item,n=0;items.unshift(this);for(var i=0,length=items.length;i<length;i++){item=items[i];if(Object.isArray(item)&&!('callee'in item)){for(var j=0,arrayLength=item.length;j<arrayLength;j++){if(j in item)array[n]=item[j];n++;}}else{array[n++]=item;}}
|
169 |
+
array.length=n;return array;}
|
170 |
+
function wrapNative(method){return function(){if(arguments.length===0){return method.call(this,Prototype.K);}else if(arguments[0]===undefined){var args=slice.call(arguments,1);args.unshift(Prototype.K);return method.apply(this,args);}else{return method.apply(this,arguments);}};}
|
171 |
+
function map(iterator){if(this==null)throw new TypeError();iterator=iterator||Prototype.K;var object=Object(this);var results=[],context=arguments[1],n=0;for(var i=0,length=object.length>>>0;i<length;i++){if(i in object){results[n]=iterator.call(context,object[i],i,object);}
|
172 |
+
n++;}
|
173 |
+
results.length=n;return results;}
|
174 |
+
if(arrayProto.map){map=wrapNative(Array.prototype.map);}
|
175 |
+
function filter(iterator){if(this==null||!Object.isFunction(iterator))
|
176 |
+
throw new TypeError();var object=Object(this);var results=[],context=arguments[1],value;for(var i=0,length=object.length>>>0;i<length;i++){if(i in object){value=object[i];if(iterator.call(context,value,i,object)){results.push(value);}}}
|
177 |
+
return results;}
|
178 |
+
if(arrayProto.filter){filter=Array.prototype.filter;}
|
179 |
+
function some(iterator){if(this==null)throw new TypeError();iterator=iterator||Prototype.K;var context=arguments[1];var object=Object(this);for(var i=0,length=object.length>>>0;i<length;i++){if(i in object&&iterator.call(context,object[i],i,object)){return true;}}
|
180 |
+
return false;}
|
181 |
+
if(arrayProto.some){some=wrapNative(Array.prototype.some);}
|
182 |
+
function every(iterator){if(this==null)throw new TypeError();iterator=iterator||Prototype.K;var context=arguments[1];var object=Object(this);for(var i=0,length=object.length>>>0;i<length;i++){if(i in object&&!iterator.call(context,object[i],i,object)){return false;}}
|
183 |
+
return true;}
|
184 |
+
if(arrayProto.every){every=wrapNative(Array.prototype.every);}
|
185 |
+
Object.extend(arrayProto,Enumerable);if(arrayProto.entries===Enumerable.entries){delete arrayProto.entries;}
|
186 |
+
if(!arrayProto._reverse)
|
187 |
+
arrayProto._reverse=arrayProto.reverse;Object.extend(arrayProto,{_each:_each,map:map,collect:map,select:filter,filter:filter,findAll:filter,some:some,any:some,every:every,all:every,clear:clear,first:first,last:last,compact:compact,flatten:flatten,without:without,reverse:reverse,uniq:uniq,intersect:intersect,clone:clone,toArray:clone,size:size,inspect:inspect});var CONCAT_ARGUMENTS_BUGGY=(function(){return[].concat(arguments)[0][0]!==1;})(1,2);if(CONCAT_ARGUMENTS_BUGGY)arrayProto.concat=concat;if(!arrayProto.indexOf)arrayProto.indexOf=indexOf;if(!arrayProto.lastIndexOf)arrayProto.lastIndexOf=lastIndexOf;})();function $H(object){return new Hash(object);};var Hash=Class.create(Enumerable,(function(){function initialize(object){this._object=Object.isHash(object)?object.toObject():Object.clone(object);}
|
188 |
+
function _each(iterator){for(var key in this._object){var value=this._object[key],pair=[key,value];pair.key=key;pair.value=value;iterator(pair);}}
|
189 |
+
function set(key,value){return this._object[key]=value;}
|
190 |
+
function get(key){if(this._object[key]!==Object.prototype[key])
|
191 |
+
return this._object[key];}
|
192 |
+
function unset(key){var value=this._object[key];delete this._object[key];return value;}
|
193 |
+
function toObject(){return Object.clone(this._object);}
|
194 |
+
function keys(){return this.pluck('key');}
|
195 |
+
function values(){return this.pluck('value');}
|
196 |
+
function index(value){var match=this.detect(function(pair){return pair.value===value;});return match&&match.key;}
|
197 |
+
function merge(object){return this.clone().update(object);}
|
198 |
+
function update(object){return new Hash(object).inject(this,function(result,pair){result.set(pair.key,pair.value);return result;});}
|
199 |
+
function toQueryPair(key,value){if(Object.isUndefined(value))return key;return key+'='+encodeURIComponent(String.interpret(value));}
|
200 |
+
function toQueryString(){return this.inject([],function(results,pair){var key=encodeURIComponent(pair.key),values=pair.value;if(values&&typeof values=='object'){if(Object.isArray(values)){var queryValues=[];for(var i=0,len=values.length,value;i<len;i++){value=values[i];queryValues.push(toQueryPair(key,value));}
|
201 |
+
return results.concat(queryValues);}}else results.push(toQueryPair(key,values));return results;}).join('&');}
|
202 |
+
function inspect(){return'#<Hash:{'+this.map(function(pair){return pair.map(Object.inspect).join(': ');}).join(', ')+'}>';}
|
203 |
+
function clone(){return new Hash(this);}
|
204 |
+
return{initialize:initialize,_each:_each,set:set,get:get,unset:unset,toObject:toObject,toTemplateReplacements:toObject,keys:keys,values:values,index:index,merge:merge,update:update,toQueryString:toQueryString,inspect:inspect,toJSON:toObject,clone:clone};})());Hash.from=$H;Object.extend(Number.prototype,(function(){function toColorPart(){return this.toPaddedString(2,16);}
|
205 |
+
function succ(){return this+1;}
|
206 |
+
function times(iterator,context){$R(0,this,true).each(iterator,context);return this;}
|
207 |
+
function toPaddedString(length,radix){var string=this.toString(radix||10);return'0'.times(length-string.length)+string;}
|
208 |
+
function abs(){return Math.abs(this);}
|
209 |
+
function round(){return Math.round(this);}
|
210 |
+
function ceil(){return Math.ceil(this);}
|
211 |
+
function floor(){return Math.floor(this);}
|
212 |
+
return{toColorPart:toColorPart,succ:succ,times:times,toPaddedString:toPaddedString,abs:abs,round:round,ceil:ceil,floor:floor};})());function $R(start,end,exclusive){return new ObjectRange(start,end,exclusive);}
|
213 |
+
var ObjectRange=Class.create(Enumerable,(function(){function initialize(start,end,exclusive){this.start=start;this.end=end;this.exclusive=exclusive;}
|
214 |
+
function _each(iterator){var value=this.start;while(this.include(value)){iterator(value);value=value.succ();}}
|
215 |
+
function include(value){if(value<this.start)
|
216 |
+
return false;if(this.exclusive)
|
217 |
+
return value<this.end;return value<=this.end;}
|
218 |
+
return{initialize:initialize,_each:_each,include:include};})());var Ajax={getTransport:function(){return Try.these(function(){return new XMLHttpRequest()},function(){return new ActiveXObject('Msxml2.XMLHTTP')},function(){return new ActiveXObject('Microsoft.XMLHTTP')})||false;},activeRequestCount:0};Ajax.Responders={responders:[],_each:function(iterator){this.responders._each(iterator);},register:function(responder){if(!this.include(responder))
|
219 |
+
this.responders.push(responder);},unregister:function(responder){this.responders=this.responders.without(responder);},dispatch:function(callback,request,transport,json){this.each(function(responder){if(Object.isFunction(responder[callback])){try{responder[callback].apply(responder,[request,transport,json]);}catch(e){}}});}};Object.extend(Ajax.Responders,Enumerable);Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++},onComplete:function(){Ajax.activeRequestCount--}});Ajax.Base=Class.create({initialize:function(options){this.options={method:'post',asynchronous:true,contentType:'application/x-www-form-urlencoded',encoding:'UTF-8',parameters:'',evalJSON:true,evalJS:true};Object.extend(this.options,options||{});this.options.method=this.options.method.toLowerCase();if(Object.isHash(this.options.parameters))
|
220 |
+
this.options.parameters=this.options.parameters.toObject();}});Ajax.Request=Class.create(Ajax.Base,{_complete:false,initialize:function($super,url,options){$super(options);this.transport=Ajax.getTransport();this.request(url);},request:function(url){this.url=url;this.method=this.options.method;var params=Object.isString(this.options.parameters)?this.options.parameters:Object.toQueryString(this.options.parameters);if(!['get','post'].include(this.method)){params+=(params?'&':'')+"_method="+this.method;this.method='post';}
|
221 |
+
if(params&&this.method==='get'){this.url+=(this.url.include('?')?'&':'?')+params;}
|
222 |
+
this.parameters=params.toQueryParams();try{var response=new Ajax.Response(this);if(this.options.onCreate)this.options.onCreate(response);Ajax.Responders.dispatch('onCreate',this,response);this.transport.open(this.method.toUpperCase(),this.url,this.options.asynchronous);if(this.options.asynchronous)this.respondToReadyState.bind(this).p_defer(1);this.transport.onreadystatechange=this.onStateChange.bind(this);this.setRequestHeaders();this.body=this.method=='post'?(this.options.postBody||params):null;this.transport.send(this.body);if(!this.options.asynchronous&&this.transport.overrideMimeType)
|
223 |
+
this.onStateChange();}
|
224 |
+
catch(e){this.dispatchException(e);}},onStateChange:function(){var readyState=this.transport.readyState;if(readyState>1&&!((readyState==4)&&this._complete))
|
225 |
+
this.respondToReadyState(this.transport.readyState);},setRequestHeaders:function(){var headers={'X-Requested-With':'XMLHttpRequest','X-Prototype-Version':Prototype.Version,'Accept':'text/javascript, text/html, application/xml, text/xml, */*'};if(this.method=='post'){headers['Content-type']=this.options.contentType+
|
226 |
+
(this.options.encoding?'; charset='+this.options.encoding:'');if(this.transport.overrideMimeType&&(navigator.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]<2005)
|
227 |
+
headers['Connection']='close';}
|
228 |
+
if(typeof this.options.requestHeaders=='object'){var extras=this.options.requestHeaders;if(Object.isFunction(extras.push))
|
229 |
+
for(var i=0,length=extras.length;i<length;i+=2)
|
230 |
+
headers[extras[i]]=extras[i+1];else
|
231 |
+
$H(extras).each(function(pair){headers[pair.key]=pair.value});}
|
232 |
+
for(var name in headers)
|
233 |
+
this.transport.setRequestHeader(name,headers[name]);},success:function(){var status=this.getStatus();return!status||(status>=200&&status<300)||status==304;},getStatus:function(){try{if(this.transport.status===1223)return 204;return this.transport.status||0;}catch(e){return 0}},respondToReadyState:function(readyState){var state=Ajax.Request.Events[readyState],response=new Ajax.Response(this);if(state=='Complete'){try{this._complete=true;(this.options['on'+response.status]||this.options['on'+(this.success()?'Success':'Failure')]||Prototype.emptyFunction)(response,response.headerJSON);}catch(e){this.dispatchException(e);}
|
234 |
+
var contentType=response.getHeader('Content-type');if(this.options.evalJS=='force'||(this.options.evalJS&&this.isSameOrigin()&&contentType&&contentType.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i)))
|
235 |
+
this.evalResponse();}
|
236 |
+
try{(this.options['on'+state]||Prototype.emptyFunction)(response,response.headerJSON);Ajax.Responders.dispatch('on'+state,this,response,response.headerJSON);}catch(e){this.dispatchException(e);}
|
237 |
+
if(state=='Complete'){this.transport.onreadystatechange=Prototype.emptyFunction;}},isSameOrigin:function(){var m=this.url.match(/^\s*https?:\/\/[^\/]*/);return!m||(m[0]=='#{protocol}//#{domain}#{port}'.interpolate({protocol:location.protocol,domain:document.domain,port:location.port?':'+location.port:''}));},getHeader:function(name){try{return this.transport.getResponseHeader(name)||null;}catch(e){return null;}},evalResponse:function(){try{return eval((this.transport.responseText||'').unfilterJSON());}catch(e){this.dispatchException(e);}},dispatchException:function(exception){(this.options.onException||Prototype.emptyFunction)(this,exception);Ajax.Responders.dispatch('onException',this,exception);}});Ajax.Request.Events=['Uninitialized','Loading','Loaded','Interactive','Complete'];Ajax.Response=Class.create({initialize:function(request){this.request=request;var transport=this.transport=request.transport,readyState=this.readyState=transport.readyState;if((readyState>2&&!Prototype.Browser.IE)||readyState==4){this.status=this.getStatus();this.statusText=this.getStatusText();this.responseText=String.interpret(transport.responseText);this.headerJSON=this._getHeaderJSON();}
|
238 |
+
if(readyState==4){var xml=transport.responseXML;this.responseXML=Object.isUndefined(xml)?null:xml;this.responseJSON=this._getResponseJSON();}},status:0,statusText:'',getStatus:Ajax.Request.prototype.getStatus,getStatusText:function(){try{return this.transport.statusText||'';}catch(e){return''}},getHeader:Ajax.Request.prototype.getHeader,getAllHeaders:function(){try{return this.getAllResponseHeaders();}catch(e){return null}},getResponseHeader:function(name){return this.transport.getResponseHeader(name);},getAllResponseHeaders:function(){return this.transport.getAllResponseHeaders();},_getHeaderJSON:function(){var json=this.getHeader('X-JSON');if(!json)return null;json=decodeURIComponent(escape(json));try{return json.evalJSON(this.request.options.sanitizeJSON||!this.request.isSameOrigin());}catch(e){this.request.dispatchException(e);}},_getResponseJSON:function(){var options=this.request.options;if(!options.evalJSON||(options.evalJSON!='force'&&!(this.getHeader('Content-type')||'').include('application/json'))||this.responseText.blank())
|
239 |
+
return null;try{return this.responseText.evalJSON(options.sanitizeJSON||!this.request.isSameOrigin());}catch(e){this.request.dispatchException(e);}}});Ajax.Updater=Class.create(Ajax.Request,{initialize:function($super,container,url,options){this.container={success:(container.success||container),failure:(container.failure||(container.success?null:container))};options=Object.clone(options);var onComplete=options.onComplete;options.onComplete=(function(response,json){this.updateContent(response.responseText);if(Object.isFunction(onComplete))onComplete(response,json);}).bind(this);$super(url,options);},updateContent:function(responseText){var receiver=this.container[this.success()?'success':'failure'],options=this.options;if(!options.evalScripts)responseText=responseText.stripScripts();if(receiver=$(receiver)){if(options.insertion){if(Object.isString(options.insertion)){var insertion={};insertion[options.insertion]=responseText;receiver.insert(insertion);}
|
240 |
+
else options.insertion(receiver,responseText);}
|
241 |
+
else receiver.update(responseText);}}});Ajax.PeriodicalUpdater=Class.create(Ajax.Base,{initialize:function($super,container,url,options){$super(options);this.onComplete=this.options.onComplete;this.frequency=(this.options.frequency||2);this.decay=(this.options.decay||1);this.updater={};this.container=container;this.url=url;this.start();},start:function(){this.options.onComplete=this.updateComplete.bind(this);this.onTimerEvent();},stop:function(){this.updater.options.onComplete=undefined;clearTimeout(this.timer);(this.onComplete||Prototype.emptyFunction).apply(this,arguments);},updateComplete:function(response){if(this.options.decay){this.decay=(response.responseText==this.lastText?this.decay*this.options.decay:1);this.lastText=response.responseText;}
|
242 |
+
this.timer=this.onTimerEvent.bind(this).delay(this.decay*this.frequency);},onTimerEvent:function(){this.updater=new Ajax.Updater(this.container,this.url,this.options);}});function $(element){if(arguments.length>1){for(var i=0,elements=[],length=arguments.length;i<length;i++)
|
243 |
+
elements.push($(arguments[i]));return elements;}
|
244 |
+
if(Object.isString(element))
|
245 |
+
element=document.getElementById(element);return Element.extend(element);}
|
246 |
+
if(Prototype.BrowserFeatures.XPath){document._getElementsByXPath=function(expression,parentElement){var results=[];var query=document.evaluate(expression,$(parentElement)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(var i=0,length=query.snapshotLength;i<length;i++)
|
247 |
+
results.push(Element.extend(query.snapshotItem(i)));return results;};}
|
248 |
+
if(!Node)var Node={};if(!Node.ELEMENT_NODE){Object.extend(Node,{ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12});}
|
249 |
+
(function(global){function shouldUseCache(tagName,attributes){if(tagName==='select')return false;if('type'in attributes)return false;return true;}
|
250 |
+
var HAS_EXTENDED_CREATE_ELEMENT_SYNTAX=(function(){try{var el=document.createElement('<input name="x">');return el.tagName.toLowerCase()==='input'&&el.name==='x';}
|
251 |
+
catch(err){return false;}})();var element=global.Element;global.Element=function(tagName,attributes){attributes=attributes||{};tagName=tagName.toLowerCase();var cache=Element.cache;if(HAS_EXTENDED_CREATE_ELEMENT_SYNTAX&&attributes.name){tagName='<'+tagName+' name="'+attributes.name+'">';delete attributes.name;return Element.writeAttribute(document.createElement(tagName),attributes);}
|
252 |
+
if(!cache[tagName])cache[tagName]=Element.extend(document.createElement(tagName));var node=shouldUseCache(tagName,attributes)?cache[tagName].cloneNode(false):document.createElement(tagName);return Element.writeAttribute(node,attributes);};Object.extend(global.Element,element||{});if(element)global.Element.prototype=element.prototype;})(this);Element.idCounter=1;Element.cache={};Element._purgeElement=function(element){var uid=element._prototypeUID;if(uid){Element.stopObserving(element);element._prototypeUID=void 0;delete Element.Storage[uid];}}
|
253 |
+
Element.Methods={visible:function(element){return $(element).style.display!='none';},toggle:function(element){element=$(element);Element[Element.visible(element)?'hide':'show'](element);return element;},hide:function(element){element=$(element);element.style.display='none';return element;},show:function(element){element=$(element);element.style.display='';return element;},remove:function(element){element=$(element);element.parentNode.removeChild(element);return element;},update:(function(){var SELECT_ELEMENT_INNERHTML_BUGGY=(function(){var el=document.createElement("select"),isBuggy=true;el.innerHTML="<option value=\"test\">test</option>";if(el.options&&el.options[0]){isBuggy=el.options[0].nodeName.toUpperCase()!=="OPTION";}
|
254 |
+
el=null;return isBuggy;})();var TABLE_ELEMENT_INNERHTML_BUGGY=(function(){try{var el=document.createElement("table");if(el&&el.tBodies){el.innerHTML="<tbody><tr><td>test</td></tr></tbody>";var isBuggy=typeof el.tBodies[0]=="undefined";el=null;return isBuggy;}}catch(e){return true;}})();var LINK_ELEMENT_INNERHTML_BUGGY=(function(){try{var el=document.createElement('div');el.innerHTML="<link>";var isBuggy=(el.childNodes.length===0);el=null;return isBuggy;}catch(e){return true;}})();var ANY_INNERHTML_BUGGY=SELECT_ELEMENT_INNERHTML_BUGGY||TABLE_ELEMENT_INNERHTML_BUGGY||LINK_ELEMENT_INNERHTML_BUGGY;var SCRIPT_ELEMENT_REJECTS_TEXTNODE_APPENDING=(function(){var s=document.createElement("script"),isBuggy=false;try{s.appendChild(document.createTextNode(""));isBuggy=!s.firstChild||s.firstChild&&s.firstChild.nodeType!==3;}catch(e){isBuggy=true;}
|
255 |
+
s=null;return isBuggy;})();function update(element,content){element=$(element);var purgeElement=Element._purgeElement;var descendants=element.getElementsByTagName('*'),i=descendants.length;while(i--)purgeElement(descendants[i]);if(content&&content.toElement)
|
256 |
+
content=content.toElement();if(Object.isElement(content))
|
257 |
+
return element.update().insert(content);content=Object.toHTML(content);var tagName=element.tagName.toUpperCase();if(tagName==='SCRIPT'&&SCRIPT_ELEMENT_REJECTS_TEXTNODE_APPENDING){element.text=content;return element;}
|
258 |
+
if(ANY_INNERHTML_BUGGY){if(tagName in Element._insertionTranslations.tags){while(element.firstChild){element.removeChild(element.firstChild);}
|
259 |
+
Element._getContentFromAnonymousElement(tagName,content.stripScripts()).each(function(node){element.appendChild(node)});}else if(LINK_ELEMENT_INNERHTML_BUGGY&&Object.isString(content)&&content.indexOf('<link')>-1){while(element.firstChild){element.removeChild(element.firstChild);}
|
260 |
+
var nodes=Element._getContentFromAnonymousElement(tagName,content.stripScripts(),true);nodes.each(function(node){element.appendChild(node)});}
|
261 |
+
else{element.innerHTML=content.stripScripts();}}
|
262 |
+
else{element.innerHTML=content.stripScripts();}
|
263 |
+
content.evalScripts.bind(content).p_defer();return element;}
|
264 |
+
return update;})(),replace:function(element,content){element=$(element);if(content&&content.toElement)content=content.toElement();else if(!Object.isElement(content)){content=Object.toHTML(content);var range=element.ownerDocument.createRange();range.selectNode(element);content.evalScripts.bind(content).p_defer();content=range.createContextualFragment(content.stripScripts());}
|
265 |
+
element.parentNode.replaceChild(content,element);return element;},insert:function(element,insertions){element=$(element);if(Object.isString(insertions)||Object.isNumber(insertions)||Object.isElement(insertions)||(insertions&&(insertions.toElement||insertions.toHTML)))
|
266 |
+
insertions={bottom:insertions};var content,insert,tagName,childNodes;for(var position in insertions){content=insertions[position];position=position.toLowerCase();insert=Element._insertionTranslations[position];if(content&&content.toElement)content=content.toElement();if(Object.isElement(content)){insert(element,content);continue;}
|
267 |
+
content=Object.toHTML(content);tagName=((position=='before'||position=='after')?element.parentNode:element).tagName.toUpperCase();childNodes=Element._getContentFromAnonymousElement(tagName,content.stripScripts());if(position=='top'||position=='after')childNodes.reverse();childNodes.each(insert.curry(element));content.evalScripts.bind(content).p_defer();}
|
268 |
+
return element;},wrap:function(element,wrapper,attributes){element=$(element);if(Object.isElement(wrapper))
|
269 |
+
$(wrapper).writeAttribute(attributes||{});else if(Object.isString(wrapper))wrapper=new Element(wrapper,attributes);else wrapper=new Element('div',wrapper);if(element.parentNode)
|
270 |
+
element.parentNode.replaceChild(wrapper,element);wrapper.appendChild(element);return wrapper;},inspect:function(element){element=$(element);var result='<'+element.tagName.toLowerCase();$H({'id':'id','className':'class'}).each(function(pair){var property=pair.first(),attribute=pair.last(),value=(element[property]||'').toString();if(value)result+=' '+attribute+'='+value.inspect(true);});return result+'>';},recursivelyCollect:function(element,property,maximumLength){element=$(element);maximumLength=maximumLength||-1;var elements=[];while(element=element[property]){if(element.nodeType==1)
|
271 |
+
elements.push(Element.extend(element));if(elements.length==maximumLength)
|
272 |
+
break;}
|
273 |
+
return elements;},ancestors:function(element){return Element.recursivelyCollect(element,'parentNode');},descendants:function(element){return Element.select(element,"*");},firstDescendant:function(element){element=$(element).firstChild;while(element&&element.nodeType!=1)element=element.nextSibling;return $(element);},immediateDescendants:function(element){var results=[],child=$(element).firstChild;while(child){if(child.nodeType===1){results.push(Element.extend(child));}
|
274 |
+
child=child.nextSibling;}
|
275 |
+
return results;},previousSiblings:function(element,maximumLength){return Element.recursivelyCollect(element,'previousSibling');},nextSiblings:function(element){return Element.recursivelyCollect(element,'nextSibling');},siblings:function(element){element=$(element);return Element.previousSiblings(element).reverse().concat(Element.nextSiblings(element));},match:function(element,selector){element=$(element);if(Object.isString(selector))
|
276 |
+
return Prototype.Selector.match(element,selector);return selector.match(element);},up:function(element,expression,index){element=$(element);if(arguments.length==1)return $(element.parentNode);var ancestors=Element.ancestors(element);return Object.isNumber(expression)?ancestors[expression]:Prototype.Selector.find(ancestors,expression,index);},down:function(element,expression,index){element=$(element);if(arguments.length==1)return Element.firstDescendant(element);return Object.isNumber(expression)?Element.descendants(element)[expression]:Element.select(element,expression)[index||0];},previous:function(element,expression,index){element=$(element);if(Object.isNumber(expression))index=expression,expression=false;if(!Object.isNumber(index))index=0;if(expression){return Prototype.Selector.find(element.previousSiblings(),expression,index);}else{return element.recursivelyCollect("previousSibling",index+1)[index];}},next:function(element,expression,index){element=$(element);if(Object.isNumber(expression))index=expression,expression=false;if(!Object.isNumber(index))index=0;if(expression){return Prototype.Selector.find(element.nextSiblings(),expression,index);}else{var maximumLength=Object.isNumber(index)?index+1:1;return element.recursivelyCollect("nextSibling",index+1)[index];}},select:function(element){element=$(element);var expressions=Array.prototype.slice.call(arguments,1).join(', ');return Prototype.Selector.select(expressions,element);},adjacent:function(element){element=$(element);var expressions=Array.prototype.slice.call(arguments,1).join(', ');return Prototype.Selector.select(expressions,element.parentNode).without(element);},identify:function(element){element=$(element);var id=Element.readAttribute(element,'id');if(id)return id;do{id='anonymous_element_'+Element.idCounter++}while($(id));Element.writeAttribute(element,'id',id);return id;},readAttribute:function(element,name){element=$(element);if(Prototype.Browser.IE){var t=Element._attributeTranslations.read;if(t.values[name])return t.values[name](element,name);if(t.names[name])name=t.names[name];if(name.include(':')){return(!element.attributes||!element.attributes[name])?null:element.attributes[name].value;}}
|
277 |
+
return element.getAttribute(name);},writeAttribute:function(element,name,value){element=$(element);var attributes={},t=Element._attributeTranslations.write;if(typeof name=='object')attributes=name;else attributes[name]=Object.isUndefined(value)?true:value;for(var attr in attributes){name=t.names[attr]||attr;value=attributes[attr];if(t.values[attr])name=t.values[attr](element,value);if(value===false||value===null)
|
278 |
+
element.removeAttribute(name);else if(value===true)
|
279 |
+
element.setAttribute(name,name);else element.setAttribute(name,value);}
|
280 |
+
return element;},getHeight:function(element){return Element.getDimensions(element).height;},getWidth:function(element){return Element.getDimensions(element).width;},classNames:function(element){return new Element.ClassNames(element);},hasClassName:function(element,className){if(!(element=$(element)))return;var elementClassName=element.className;return(elementClassName.length>0&&(elementClassName==className||new RegExp("(^|\\s)"+className+"(\\s|$)").test(elementClassName)));},addClassName:function(element,className){if(!(element=$(element)))return;if(!Element.hasClassName(element,className))
|
281 |
+
element.className+=(element.className?' ':'')+className;return element;},removeClassName:function(element,className){if(!(element=$(element)))return;element.className=element.className.replace(new RegExp("(^|\\s+)"+className+"(\\s+|$)"),' ').strip();return element;},toggleClassName:function(element,className){if(!(element=$(element)))return;return Element[Element.hasClassName(element,className)?'removeClassName':'addClassName'](element,className);},cleanWhitespace:function(element){element=$(element);var node=element.firstChild;while(node){var nextNode=node.nextSibling;if(node.nodeType==3&&!/\S/.test(node.nodeValue))
|
282 |
+
element.removeChild(node);node=nextNode;}
|
283 |
+
return element;},empty:function(element){return $(element).innerHTML.blank();},descendantOf:function(element,ancestor){element=$(element),ancestor=$(ancestor);if(element.compareDocumentPosition)
|
284 |
+
return(element.compareDocumentPosition(ancestor)&8)===8;if(ancestor.contains)
|
285 |
+
return ancestor.contains(element)&&ancestor!==element;while(element=element.parentNode)
|
286 |
+
if(element==ancestor)return true;return false;},scrollTo:function(element){element=$(element);var pos=Element.cumulativeOffset(element);window.scrollTo(pos[0],pos[1]);return element;},getStyle:function(element,style){element=$(element);style=style=='float'?'cssFloat':style.camelize();var value=element.style[style];if(!value||value=='auto'){var css=document.defaultView.getComputedStyle(element,null);value=css?css[style]:null;}
|
287 |
+
if(style=='opacity')return value?parseFloat(value):1.0;return value=='auto'?null:value;},getOpacity:function(element){return $(element).getStyle('opacity');},setStyle:function(element,styles){element=$(element);var elementStyle=element.style,match;if(Object.isString(styles)){element.style.cssText+=';'+styles;return styles.include('opacity')?element.setOpacity(styles.match(/opacity:\s*(\d?\.?\d*)/)[1]):element;}
|
288 |
+
for(var property in styles)
|
289 |
+
if(property=='opacity')element.setOpacity(styles[property]);else
|
290 |
+
elementStyle[(property=='float'||property=='cssFloat')?(Object.isUndefined(elementStyle.styleFloat)?'cssFloat':'styleFloat'):property]=styles[property];return element;},setOpacity:function(element,value){element=$(element);element.style.opacity=(value==1||value==='')?'':(value<0.00001)?0:value;return element;},makePositioned:function(element){element=$(element);var pos=Element.getStyle(element,'position');if(pos=='static'||!pos){element._madePositioned=true;element.style.position='relative';if(Prototype.Browser.Opera){element.style.top=0;element.style.left=0;}}
|
291 |
+
return element;},undoPositioned:function(element){element=$(element);if(element._madePositioned){element._madePositioned=undefined;element.style.position=element.style.top=element.style.left=element.style.bottom=element.style.right='';}
|
292 |
+
return element;},makeClipping:function(element){element=$(element);if(element._overflow)return element;element._overflow=Element.getStyle(element,'overflow')||'auto';if(element._overflow!=='hidden')
|
293 |
+
element.style.overflow='hidden';return element;},undoClipping:function(element){element=$(element);if(!element._overflow)return element;element.style.overflow=element._overflow=='auto'?'':element._overflow;element._overflow=null;return element;},clonePosition:function(element,source){var options=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});source=$(source);var p=Element.viewportOffset(source),delta=[0,0],parent=null;element=$(element);if(Element.getStyle(element,'position')=='absolute'){parent=Element.getOffsetParent(element);delta=Element.viewportOffset(parent);}
|
294 |
+
if(parent==document.body){delta[0]-=document.body.offsetLeft;delta[1]-=document.body.offsetTop;}
|
295 |
+
if(options.setLeft)element.style.left=(p[0]-delta[0]+options.offsetLeft)+'px';if(options.setTop)element.style.top=(p[1]-delta[1]+options.offsetTop)+'px';if(options.setWidth)element.style.width=source.offsetWidth+'px';if(options.setHeight)element.style.height=source.offsetHeight+'px';return element;}};Object.extend(Element.Methods,{getElementsBySelector:Element.Methods.select,childElements:Element.Methods.immediateDescendants});Element._attributeTranslations={write:{names:{className:'class',htmlFor:'for'},values:{}}};if(Prototype.Browser.Opera){Element.Methods.getStyle=Element.Methods.getStyle.wrap(function(proceed,element,style){switch(style){case'height':case'width':if(!Element.visible(element))return null;var dim=parseInt(proceed(element,style),10);if(dim!==element['offset'+style.capitalize()])
|
296 |
+
return dim+'px';var properties;if(style==='height'){properties=['border-top-width','padding-top','padding-bottom','border-bottom-width'];}
|
297 |
+
else{properties=['border-left-width','padding-left','padding-right','border-right-width'];}
|
298 |
+
return properties.inject(dim,function(memo,property){var val=proceed(element,property);return val===null?memo:memo-parseInt(val,10);})+'px';default:return proceed(element,style);}});Element.Methods.readAttribute=Element.Methods.readAttribute.wrap(function(proceed,element,attribute){if(attribute==='title')return element.title;return proceed(element,attribute);});}
|
299 |
+
else if(Prototype.Browser.IE){Element.Methods.getStyle=function(element,style){element=$(element);style=(style=='float'||style=='cssFloat')?'styleFloat':style.camelize();var value=element.style[style];if(!value&&element.currentStyle)value=element.currentStyle[style];if(style=='opacity'){if(value=(element.getStyle('filter')||'').match(/alpha\(opacity=(.*)\)/))
|
300 |
+
if(value[1])return parseFloat(value[1])/100;return 1.0;}
|
301 |
+
if(value=='auto'){if((style=='width'||style=='height')&&(element.getStyle('display')!='none'))
|
302 |
+
return element['offset'+style.capitalize()]+'px';return null;}
|
303 |
+
return value;};Element.Methods.setOpacity=function(element,value){function stripAlpha(filter){return filter.replace(/alpha\([^\)]*\)/gi,'');}
|
304 |
+
element=$(element);var currentStyle=element.currentStyle;if((currentStyle&&!currentStyle.hasLayout)||(!currentStyle&&element.style.zoom=='normal'))
|
305 |
+
element.style.zoom=1;var filter=element.getStyle('filter'),style=element.style;if(value==1||value===''){(filter=stripAlpha(filter))?style.filter=filter:style.removeAttribute('filter');return element;}else if(value<0.00001)value=0;style.filter=stripAlpha(filter)+'alpha(opacity='+(value*100)+')';return element;};Element._attributeTranslations=(function(){var classProp='className',forProp='for',el=document.createElement('div');el.setAttribute(classProp,'x');if(el.className!=='x'){el.setAttribute('class','x');if(el.className==='x'){classProp='class';}}
|
306 |
+
el=null;el=document.createElement('label');el.setAttribute(forProp,'x');if(el.htmlFor!=='x'){el.setAttribute('htmlFor','x');if(el.htmlFor==='x'){forProp='htmlFor';}}
|
307 |
+
el=null;return{read:{names:{'class':classProp,'className':classProp,'for':forProp,'htmlFor':forProp},values:{_getAttr:function(element,attribute){return element.getAttribute(attribute);},_getAttr2:function(element,attribute){return element.getAttribute(attribute,2);},_getAttrNode:function(element,attribute){var node=element.getAttributeNode(attribute);return node?node.value:"";},_getEv:(function(){var el=document.createElement('div'),f;el.onclick=Prototype.emptyFunction;var value=el.getAttribute('onclick');if(String(value).indexOf('{')>-1){f=function(element,attribute){attribute=element.getAttribute(attribute);if(!attribute)return null;attribute=attribute.toString();attribute=attribute.split('{')[1];attribute=attribute.split('}')[0];return attribute.strip();};}
|
308 |
+
else if(value===''){f=function(element,attribute){attribute=element.getAttribute(attribute);if(!attribute)return null;return attribute.strip();};}
|
309 |
+
el=null;return f;})(),_flag:function(element,attribute){return $(element).hasAttribute(attribute)?attribute:null;},style:function(element){return element.style.cssText.toLowerCase();},title:function(element){return element.title;}}}}})();Element._attributeTranslations.write={names:Object.extend({cellpadding:'cellPadding',cellspacing:'cellSpacing'},Element._attributeTranslations.read.names),values:{checked:function(element,value){element.checked=!!value;},style:function(element,value){element.style.cssText=value?value:'';}}};Element._attributeTranslations.has={};$w('colSpan rowSpan vAlign dateTime accessKey tabIndex '+'encType maxLength readOnly longDesc frameBorder').each(function(attr){Element._attributeTranslations.write.names[attr.toLowerCase()]=attr;Element._attributeTranslations.has[attr.toLowerCase()]=attr;});(function(v){Object.extend(v,{href:v._getAttr2,src:v._getAttr2,type:v._getAttr,action:v._getAttrNode,disabled:v._flag,checked:v._flag,readonly:v._flag,multiple:v._flag,onload:v._getEv,onunload:v._getEv,onclick:v._getEv,ondblclick:v._getEv,onmousedown:v._getEv,onmouseup:v._getEv,onmouseover:v._getEv,onmousemove:v._getEv,onmouseout:v._getEv,onfocus:v._getEv,onblur:v._getEv,onkeypress:v._getEv,onkeydown:v._getEv,onkeyup:v._getEv,onsubmit:v._getEv,onreset:v._getEv,onselect:v._getEv,onchange:v._getEv});})(Element._attributeTranslations.read.values);if(Prototype.BrowserFeatures.ElementExtensions){(function(){function _descendants(element){var nodes=element.getElementsByTagName('*'),results=[];for(var i=0,node;node=nodes[i];i++)
|
310 |
+
if(node.tagName!=="!")
|
311 |
+
results.push(node);return results;}
|
312 |
+
Element.Methods.down=function(element,expression,index){element=$(element);if(arguments.length==1)return element.firstDescendant();return Object.isNumber(expression)?_descendants(element)[expression]:Element.select(element,expression)[index||0];}})();}}
|
313 |
+
else if(Prototype.Browser.Gecko&&/rv:1\.8\.0/.test(navigator.userAgent)){Element.Methods.setOpacity=function(element,value){element=$(element);element.style.opacity=(value==1)?0.999999:(value==='')?'':(value<0.00001)?0:value;return element;};}
|
314 |
+
else if(Prototype.Browser.WebKit){Element.Methods.setOpacity=function(element,value){element=$(element);element.style.opacity=(value==1||value==='')?'':(value<0.00001)?0:value;if(value==1)
|
315 |
+
if(element.tagName.toUpperCase()=='IMG'&&element.width){element.width++;element.width--;}else try{var n=document.createTextNode(' ');element.appendChild(n);element.removeChild(n);}catch(e){}
|
316 |
+
return element;};}
|
317 |
+
if('outerHTML'in document.documentElement){Element.Methods.replace=function(element,content){element=$(element);if(content&&content.toElement)content=content.toElement();if(Object.isElement(content)){element.parentNode.replaceChild(content,element);return element;}
|
318 |
+
content=Object.toHTML(content);var parent=element.parentNode,tagName=parent.tagName.toUpperCase();if(Element._insertionTranslations.tags[tagName]){var nextSibling=element.next(),fragments=Element._getContentFromAnonymousElement(tagName,content.stripScripts());parent.removeChild(element);if(nextSibling)
|
319 |
+
fragments.each(function(node){parent.insertBefore(node,nextSibling)});else
|
320 |
+
fragments.each(function(node){parent.appendChild(node)});}
|
321 |
+
else element.outerHTML=content.stripScripts();content.evalScripts.bind(content).p_defer();return element;};}
|
322 |
+
Element._returnOffset=function(l,t){var result=[l,t];result.left=l;result.top=t;return result;};Element._getContentFromAnonymousElement=function(tagName,html,force){var div=new Element('div'),t=Element._insertionTranslations.tags[tagName];var workaround=false;if(t)workaround=true;else if(force){workaround=true;t=['','',0];}
|
323 |
+
if(workaround){div.innerHTML=' '+t[0]+html+t[1];div.removeChild(div.firstChild);for(var i=t[2];i--;){div=div.firstChild;}}
|
324 |
+
else{div.innerHTML=html;}
|
325 |
+
return $A(div.childNodes);};Element._insertionTranslations={before:function(element,node){element.parentNode.insertBefore(node,element);},top:function(element,node){element.insertBefore(node,element.firstChild);},bottom:function(element,node){element.appendChild(node);},after:function(element,node){element.parentNode.insertBefore(node,element.nextSibling);},tags:{TABLE:['<table>','</table>',1],TBODY:['<table><tbody>','</tbody></table>',2],TR:['<table><tbody><tr>','</tr></tbody></table>',3],TD:['<table><tbody><tr><td>','</td></tr></tbody></table>',4],SELECT:['<select>','</select>',1]}};(function(){var tags=Element._insertionTranslations.tags;Object.extend(tags,{THEAD:tags.TBODY,TFOOT:tags.TBODY,TH:tags.TD});})();Element.Methods.Simulated={hasAttribute:function(element,attribute){attribute=Element._attributeTranslations.has[attribute]||attribute;var node=$(element).getAttributeNode(attribute);return!!(node&&node.specified);}};Element.Methods.ByTag={};Object.extend(Element,Element.Methods);(function(div){if(!Prototype.BrowserFeatures.ElementExtensions&&div['__proto__']){window.HTMLElement={};window.HTMLElement.prototype=div['__proto__'];Prototype.BrowserFeatures.ElementExtensions=true;}
|
326 |
+
div=null;})(document.createElement('div'));Element.extend=(function(){function checkDeficiency(tagName){if(typeof window.Element!='undefined'){var proto=window.Element.prototype;if(proto){var id='_'+(Math.random()+'').slice(2),el=document.createElement(tagName);proto[id]='x';var isBuggy=(el[id]!=='x');delete proto[id];el=null;return isBuggy;}}
|
327 |
+
return false;}
|
328 |
+
function extendElementWith(element,methods){for(var property in methods){var value=methods[property];if(Object.isFunction(value)&&!(property in element))
|
329 |
+
element[property]=value.methodize();}}
|
330 |
+
var HTMLOBJECTELEMENT_PROTOTYPE_BUGGY=checkDeficiency('object');if(Prototype.BrowserFeatures.SpecificElementExtensions){if(HTMLOBJECTELEMENT_PROTOTYPE_BUGGY){return function(element){if(element&&typeof element._extendedByPrototype=='undefined'){var t=element.tagName;if(t&&(/^(?:object|applet|embed)$/i.test(t))){extendElementWith(element,Element.Methods);extendElementWith(element,Element.Methods.Simulated);extendElementWith(element,Element.Methods.ByTag[t.toUpperCase()]);}}
|
331 |
+
return element;}}
|
332 |
+
return Prototype.K;}
|
333 |
+
var Methods={},ByTag=Element.Methods.ByTag;var extend=Object.extend(function(element){if(!element||typeof element._extendedByPrototype!='undefined'||element.nodeType!=1||element==window)return element;var methods=Object.clone(Methods),tagName=element.tagName.toUpperCase();if(ByTag[tagName])Object.extend(methods,ByTag[tagName]);extendElementWith(element,methods);element._extendedByPrototype=Prototype.emptyFunction;return element;},{refresh:function(){if(!Prototype.BrowserFeatures.ElementExtensions){Object.extend(Methods,Element.Methods);Object.extend(Methods,Element.Methods.Simulated);}}});extend.refresh();return extend;})();if(document.documentElement.hasAttribute){Element.hasAttribute=function(element,attribute){return element.hasAttribute(attribute);};}
|
334 |
+
else{Element.hasAttribute=Element.Methods.Simulated.hasAttribute;}
|
335 |
+
Element.addMethods=function(methods){var F=Prototype.BrowserFeatures,T=Element.Methods.ByTag;if(!methods){Object.extend(Form,Form.Methods);Object.extend(Form.Element,Form.Element.Methods);Object.extend(Element.Methods.ByTag,{"FORM":Object.clone(Form.Methods),"INPUT":Object.clone(Form.Element.Methods),"SELECT":Object.clone(Form.Element.Methods),"TEXTAREA":Object.clone(Form.Element.Methods),"BUTTON":Object.clone(Form.Element.Methods)});}
|
336 |
+
if(arguments.length==2){var tagName=methods;methods=arguments[1];}
|
337 |
+
if(!tagName)Object.extend(Element.Methods,methods||{});else{if(Object.isArray(tagName))tagName.each(extend);else extend(tagName);}
|
338 |
+
function extend(tagName){tagName=tagName.toUpperCase();if(!Element.Methods.ByTag[tagName])
|
339 |
+
Element.Methods.ByTag[tagName]={};Object.extend(Element.Methods.ByTag[tagName],methods);}
|
340 |
+
function copy(methods,destination,onlyIfAbsent){onlyIfAbsent=onlyIfAbsent||false;for(var property in methods){var value=methods[property];if(!Object.isFunction(value))continue;if(!onlyIfAbsent||!(property in destination))
|
341 |
+
destination[property]=value.methodize();}}
|
342 |
+
function findDOMClass(tagName){var klass;var trans={"OPTGROUP":"OptGroup","TEXTAREA":"TextArea","P":"Paragraph","FIELDSET":"FieldSet","UL":"UList","OL":"OList","DL":"DList","DIR":"Directory","H1":"Heading","H2":"Heading","H3":"Heading","H4":"Heading","H5":"Heading","H6":"Heading","Q":"Quote","INS":"Mod","DEL":"Mod","A":"Anchor","IMG":"Image","CAPTION":"TableCaption","COL":"TableCol","COLGROUP":"TableCol","THEAD":"TableSection","TFOOT":"TableSection","TBODY":"TableSection","TR":"TableRow","TH":"TableCell","TD":"TableCell","FRAMESET":"FrameSet","IFRAME":"IFrame"};if(trans[tagName])klass='HTML'+trans[tagName]+'Element';if(window[klass])return window[klass];klass='HTML'+tagName+'Element';if(window[klass])return window[klass];klass='HTML'+tagName.capitalize()+'Element';if(window[klass])return window[klass];var element=document.createElement(tagName),proto=element['__proto__']||element.constructor.prototype;element=null;return proto;}
|
343 |
+
var elementPrototype=window.HTMLElement?HTMLElement.prototype:Element.prototype;if(F.ElementExtensions){copy(Element.Methods,elementPrototype);copy(Element.Methods.Simulated,elementPrototype,true);}
|
344 |
+
if(F.SpecificElementExtensions){for(var tag in Element.Methods.ByTag){var klass=findDOMClass(tag);if(Object.isUndefined(klass))continue;copy(T[tag],klass.prototype);}}
|
345 |
+
Object.extend(Element,Element.Methods);delete Element.ByTag;if(Element.extend.refresh)Element.extend.refresh();Element.cache={};};document.viewport={getDimensions:function(){return{width:this.getWidth(),height:this.getHeight()};},getScrollOffsets:function(){return Element._returnOffset(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft,window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop);}};(function(viewport){var B=Prototype.Browser,doc=document,element,property={};function getRootElement(){if(B.WebKit&&!doc.evaluate)
|
346 |
+
return document;if(B.Opera&&window.parseFloat(window.opera.version())<9.5)
|
347 |
+
return document.body;return document.documentElement;}
|
348 |
+
function define(D){if(!element)element=getRootElement();property[D]='client'+D;viewport['get'+D]=function(){return element[property[D]]};return viewport['get'+D]();}
|
349 |
+
viewport.getWidth=define.curry('Width');viewport.getHeight=define.curry('Height');})(document.viewport);Element.Storage={UID:1};Element.addMethods({getStorage:function(element){if(!(element=$(element)))return;var uid;if(element===window){uid=0;}else{if(typeof element._prototypeUID==="undefined")
|
350 |
+
element._prototypeUID=Element.Storage.UID++;uid=element._prototypeUID;}
|
351 |
+
if(!Element.Storage[uid])
|
352 |
+
Element.Storage[uid]=$H();return Element.Storage[uid];},store:function(element,key,value){if(!(element=$(element)))return;if(arguments.length===2){Element.getStorage(element).update(key);}else{Element.getStorage(element).set(key,value);}
|
353 |
+
return element;},retrieve:function(element,key,defaultValue){if(!(element=$(element)))return;var hash=Element.getStorage(element),value=hash.get(key);if(Object.isUndefined(value)){hash.set(key,defaultValue);value=defaultValue;}
|
354 |
+
return value;},clone:function(element,deep){if(!(element=$(element)))return;var clone=element.cloneNode(deep);clone._prototypeUID=void 0;if(deep){var descendants=Element.select(clone,'*'),i=descendants.length;while(i--){descendants[i]._prototypeUID=void 0;}}
|
355 |
+
return Element.extend(clone);},purge:function(element){if(!(element=$(element)))return;var purgeElement=Element._purgeElement;purgeElement(element);var descendants=element.getElementsByTagName('*'),i=descendants.length;while(i--)purgeElement(descendants[i]);return null;}});(function(){function toDecimal(pctString){var match=pctString.match(/^(\d+)%?$/i);if(!match)return null;return(Number(match[1])/100);}
|
356 |
+
function getPixelValue(value,property,context){var element=null;if(Object.isElement(value)){element=value;value=element.getStyle(property);}
|
357 |
+
if(value===null){return null;}
|
358 |
+
if((/^(?:-)?\d+(\.\d+)?(px)?$/i).test(value)){return window.parseFloat(value);}
|
359 |
+
var isPercentage=value.include('%'),isViewport=(context===document.viewport);if(/\d/.test(value)&&element&&element.runtimeStyle&&!(isPercentage&&isViewport)){var style=element.style.left,rStyle=element.runtimeStyle.left;element.runtimeStyle.left=element.currentStyle.left;element.style.left=value||0;value=element.style.pixelLeft;element.style.left=style;element.runtimeStyle.left=rStyle;return value;}
|
360 |
+
if(element&&isPercentage){context=context||element.parentNode;var decimal=toDecimal(value);var whole=null;var position=element.getStyle('position');var isHorizontal=property.include('left')||property.include('right')||property.include('width');var isVertical=property.include('top')||property.include('bottom')||property.include('height');if(context===document.viewport){if(isHorizontal){whole=document.viewport.getWidth();}else if(isVertical){whole=document.viewport.getHeight();}}else{if(isHorizontal){whole=$(context).measure('width');}else if(isVertical){whole=$(context).measure('height');}}
|
361 |
+
return(whole===null)?0:whole*decimal;}
|
362 |
+
return 0;}
|
363 |
+
function toCSSPixels(number){if(Object.isString(number)&&number.endsWith('px')){return number;}
|
364 |
+
return number+'px';}
|
365 |
+
function isDisplayed(element){var originalElement=element;while(element&&element.parentNode){var display=element.getStyle('display');if(display==='none'){return false;}
|
366 |
+
element=$(element.parentNode);}
|
367 |
+
return true;}
|
368 |
+
var hasLayout=Prototype.K;if('currentStyle'in document.documentElement){hasLayout=function(element){if(!element.currentStyle.hasLayout){element.style.zoom=1;}
|
369 |
+
return element;};}
|
370 |
+
function cssNameFor(key){if(key.include('border'))key=key+'-width';return key.camelize();}
|
371 |
+
Element.Layout=Class.create(Hash,{initialize:function($super,element,preCompute){$super();this.element=$(element);Element.Layout.PROPERTIES.each(function(property){this._set(property,null);},this);if(preCompute){this._preComputing=true;this._begin();Element.Layout.PROPERTIES.each(this._compute,this);this._end();this._preComputing=false;}},_set:function(property,value){return Hash.prototype.set.call(this,property,value);},set:function(property,value){throw"Properties of Element.Layout are read-only.";},get:function($super,property){var value=$super(property);return value===null?this._compute(property):value;},_begin:function(){if(this._prepared)return;var element=this.element;if(isDisplayed(element)){this._prepared=true;return;}
|
372 |
+
var originalStyles={position:element.style.position||'',width:element.style.width||'',visibility:element.style.visibility||'',display:element.style.display||''};element.store('prototype_original_styles',originalStyles);var position=element.getStyle('position'),width=element.getStyle('width');if(width==="0px"||width===null){element.style.display='block';width=element.getStyle('width');}
|
373 |
+
var context=(position==='fixed')?document.viewport:element.parentNode;element.setStyle({position:'absolute',visibility:'hidden',display:'block'});var positionedWidth=element.getStyle('width');var newWidth;if(width&&(positionedWidth===width)){newWidth=getPixelValue(element,'width',context);}else if(position==='absolute'||position==='fixed'){newWidth=getPixelValue(element,'width',context);}else{var parent=element.parentNode,pLayout=$(parent).getLayout();newWidth=pLayout.get('width')-
|
374 |
+
this.get('margin-left')-
|
375 |
+
this.get('border-left')-
|
376 |
+
this.get('padding-left')-
|
377 |
+
this.get('padding-right')-
|
378 |
+
this.get('border-right')-
|
379 |
+
this.get('margin-right');}
|
380 |
+
element.setStyle({width:newWidth+'px'});this._prepared=true;},_end:function(){var element=this.element;var originalStyles=element.retrieve('prototype_original_styles');element.store('prototype_original_styles',null);element.setStyle(originalStyles);this._prepared=false;},_compute:function(property){var COMPUTATIONS=Element.Layout.COMPUTATIONS;if(!(property in COMPUTATIONS)){throw"Property not found.";}
|
381 |
+
return this._set(property,COMPUTATIONS[property].call(this,this.element));},toObject:function(){var args=$A(arguments);var keys=(args.length===0)?Element.Layout.PROPERTIES:args.join(' ').split(' ');var obj={};keys.each(function(key){if(!Element.Layout.PROPERTIES.include(key))return;var value=this.get(key);if(value!=null)obj[key]=value;},this);return obj;},toHash:function(){var obj=this.toObject.apply(this,arguments);return new Hash(obj);},toCSS:function(){var args=$A(arguments);var keys=(args.length===0)?Element.Layout.PROPERTIES:args.join(' ').split(' ');var css={};keys.each(function(key){if(!Element.Layout.PROPERTIES.include(key))return;if(Element.Layout.COMPOSITE_PROPERTIES.include(key))return;var value=this.get(key);if(value!=null)css[cssNameFor(key)]=value+'px';},this);return css;},inspect:function(){return"#<Element.Layout>";}});Object.extend(Element.Layout,{PROPERTIES:$w('height width top left right bottom border-left border-right border-top border-bottom padding-left padding-right padding-top padding-bottom margin-top margin-bottom margin-left margin-right padding-box-width padding-box-height border-box-width border-box-height margin-box-width margin-box-height cumulative-left cumulative-top'),COMPOSITE_PROPERTIES:$w('padding-box-width padding-box-height margin-box-width margin-box-height border-box-width border-box-height'),COMPUTATIONS:{'height':function(element){if(!this._preComputing)this._begin();var bHeight=this.get('border-box-height');if(bHeight<=0){if(!this._preComputing)this._end();return 0;}
|
382 |
+
var bTop=this.get('border-top'),bBottom=this.get('border-bottom');var pTop=this.get('padding-top'),pBottom=this.get('padding-bottom');if(!this._preComputing)this._end();return bHeight-bTop-bBottom-pTop-pBottom;},'width':function(element){if(!this._preComputing)this._begin();var bWidth=this.get('border-box-width');if(bWidth<=0){if(!this._preComputing)this._end();return 0;}
|
383 |
+
var bLeft=this.get('border-left'),bRight=this.get('border-right');var pLeft=this.get('padding-left'),pRight=this.get('padding-right');if(!this._preComputing)this._end();return bWidth-bLeft-bRight-pLeft-pRight;},'padding-box-height':function(element){var height=this.get('height'),pTop=this.get('padding-top'),pBottom=this.get('padding-bottom');return height+pTop+pBottom;},'padding-box-width':function(element){var width=this.get('width'),pLeft=this.get('padding-left'),pRight=this.get('padding-right');return width+pLeft+pRight;},'border-box-height':function(element){if(!this._preComputing)this._begin();var height=element.offsetHeight;if(!this._preComputing)this._end();return height;},'cumulative-left':function(element){return element.cumulativeOffset().left;},'cumulative-top':function(element){return element.cumulativeOffset().top;},'border-box-width':function(element){if(!this._preComputing)this._begin();var width=element.offsetWidth;if(!this._preComputing)this._end();return width;},'margin-box-height':function(element){var bHeight=this.get('border-box-height'),mTop=this.get('margin-top'),mBottom=this.get('margin-bottom');if(bHeight<=0)return 0;return bHeight+mTop+mBottom;},'margin-box-width':function(element){var bWidth=this.get('border-box-width'),mLeft=this.get('margin-left'),mRight=this.get('margin-right');if(bWidth<=0)return 0;return bWidth+mLeft+mRight;},'top':function(element){var offset=element.positionedOffset();return offset.top;},'bottom':function(element){var offset=element.positionedOffset(),parent=element.getOffsetParent(),pHeight=parent.measure('height');var mHeight=this.get('border-box-height');return pHeight-mHeight-offset.top;},'left':function(element){var offset=element.positionedOffset();return offset.left;},'right':function(element){var offset=element.positionedOffset(),parent=element.getOffsetParent(),pWidth=parent.measure('width');var mWidth=this.get('border-box-width');return pWidth-mWidth-offset.left;},'padding-top':function(element){return getPixelValue(element,'paddingTop');},'padding-bottom':function(element){return getPixelValue(element,'paddingBottom');},'padding-left':function(element){return getPixelValue(element,'paddingLeft');},'padding-right':function(element){return getPixelValue(element,'paddingRight');},'border-top':function(element){return getPixelValue(element,'borderTopWidth');},'border-bottom':function(element){return getPixelValue(element,'borderBottomWidth');},'border-left':function(element){return getPixelValue(element,'borderLeftWidth');},'border-right':function(element){return getPixelValue(element,'borderRightWidth');},'margin-top':function(element){return getPixelValue(element,'marginTop');},'margin-bottom':function(element){return getPixelValue(element,'marginBottom');},'margin-left':function(element){return getPixelValue(element,'marginLeft');},'margin-right':function(element){return getPixelValue(element,'marginRight');}}});if('getBoundingClientRect'in document.documentElement){Object.extend(Element.Layout.COMPUTATIONS,{'right':function(element){var parent=hasLayout(element.getOffsetParent());var rect=element.getBoundingClientRect(),pRect=parent.getBoundingClientRect();return(pRect.right-rect.right).round();},'bottom':function(element){var parent=hasLayout(element.getOffsetParent());var rect=element.getBoundingClientRect(),pRect=parent.getBoundingClientRect();return(pRect.bottom-rect.bottom).round();}});}
|
384 |
+
Element.Offset=Class.create({initialize:function(left,top){this.left=left.round();this.top=top.round();this[0]=this.left;this[1]=this.top;},relativeTo:function(offset){return new Element.Offset(this.left-offset.left,this.top-offset.top);},inspect:function(){return"#<Element.Offset left: #{left} top: #{top}>".interpolate(this);},toString:function(){return"[#{left}, #{top}]".interpolate(this);},toArray:function(){return[this.left,this.top];}});function getLayout(element,preCompute){return new Element.Layout(element,preCompute);}
|
385 |
+
function measure(element,property){return $(element).getLayout().get(property);}
|
386 |
+
function getDimensions(element){element=$(element);var display=Element.getStyle(element,'display');if(display&&display!=='none'){return{width:element.offsetWidth,height:element.offsetHeight};}
|
387 |
+
var style=element.style;var originalStyles={visibility:style.visibility,position:style.position,display:style.display};var newStyles={visibility:'hidden',display:'block'};if(originalStyles.position!=='fixed')
|
388 |
+
newStyles.position='absolute';Element.setStyle(element,newStyles);var dimensions={width:element.offsetWidth,height:element.offsetHeight};Element.setStyle(element,originalStyles);return dimensions;}
|
389 |
+
function getOffsetParent(element){element=$(element);if(isDocument(element)||isDetached(element)||isBody(element)||isHtml(element))
|
390 |
+
return $(document.body);var isInline=(Element.getStyle(element,'display')==='inline');if(!isInline&&element.offsetParent)return $(element.offsetParent);while((element=element.parentNode)&&element!==document.body){if(Element.getStyle(element,'position')!=='static'){return isHtml(element)?$(document.body):$(element);}}
|
391 |
+
return $(document.body);}
|
392 |
+
function cumulativeOffset(element){element=$(element);var valueT=0,valueL=0;if(element.parentNode){do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;element=element.offsetParent;}while(element);}
|
393 |
+
return new Element.Offset(valueL,valueT);}
|
394 |
+
function positionedOffset(element){element=$(element);var layout=element.getLayout();var valueT=0,valueL=0;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;element=element.offsetParent;if(element){if(isBody(element))break;var p=Element.getStyle(element,'position');if(p!=='static')break;}}while(element);valueL-=layout.get('margin-top');valueT-=layout.get('margin-left');return new Element.Offset(valueL,valueT);}
|
395 |
+
function cumulativeScrollOffset(element){var valueT=0,valueL=0;if(isBody(element)&&navigator.userAgent.indexOf('Chrome/32')>-1){element=document.documentElement};do{valueT+=element.scrollTop||0;valueL+=element.scrollLeft||0;element=element.parentNode;}while(element);return new Element.Offset(valueL,valueT);}
|
396 |
+
function viewportOffset(forElement){element=$(element);var valueT=0,valueL=0,docBody=document.body;var element=forElement;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;if(element.offsetParent==docBody&&Element.getStyle(element,'position')=='absolute')break;}while(element=element.offsetParent);element=forElement;do{if(element!=docBody){valueT-=element.scrollTop||0;valueL-=element.scrollLeft||0;}}while(element=element.parentNode);return new Element.Offset(valueL,valueT);}
|
397 |
+
function absolutize(element){element=$(element);if(Element.getStyle(element,'position')==='absolute'){return element;}
|
398 |
+
var offsetParent=getOffsetParent(element);var eOffset=element.viewportOffset(),pOffset=offsetParent.viewportOffset();var offset=eOffset.relativeTo(pOffset);var layout=element.getLayout();element.store('prototype_absolutize_original_styles',{left:element.getStyle('left'),top:element.getStyle('top'),width:element.getStyle('width'),height:element.getStyle('height')});element.setStyle({position:'absolute',top:offset.top+'px',left:offset.left+'px',width:layout.get('width')+'px',height:layout.get('height')+'px'});return element;}
|
399 |
+
function relativize(element){element=$(element);if(Element.getStyle(element,'position')==='relative'){return element;}
|
400 |
+
var originalStyles=element.retrieve('prototype_absolutize_original_styles');if(originalStyles)element.setStyle(originalStyles);return element;}
|
401 |
+
if(Prototype.Browser.IE){getOffsetParent=getOffsetParent.wrap(function(proceed,element){element=$(element);if(isDocument(element)||isDetached(element)||isBody(element)||isHtml(element))
|
402 |
+
return $(document.body);var position=element.getStyle('position');if(position!=='static')return proceed(element);element.setStyle({position:'relative'});var value=proceed(element);element.setStyle({position:position});return value;});positionedOffset=positionedOffset.wrap(function(proceed,element){element=$(element);if(!element.parentNode)return new Element.Offset(0,0);var position=element.getStyle('position');if(position!=='static')return proceed(element);var offsetParent=element.getOffsetParent();if(offsetParent&&offsetParent.getStyle('position')==='fixed')
|
403 |
+
hasLayout(offsetParent);element.setStyle({position:'relative'});var value=proceed(element);element.setStyle({position:position});return value;});}else if(Prototype.Browser.Webkit){cumulativeOffset=function(element){element=$(element);var valueT=0,valueL=0;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;if(element.offsetParent==document.body)
|
404 |
+
if(Element.getStyle(element,'position')=='absolute')break;element=element.offsetParent;}while(element);return new Element.Offset(valueL,valueT);};}
|
405 |
+
Element.addMethods({getLayout:getLayout,measure:measure,getDimensions:getDimensions,getOffsetParent:getOffsetParent,cumulativeOffset:cumulativeOffset,positionedOffset:positionedOffset,cumulativeScrollOffset:cumulativeScrollOffset,viewportOffset:viewportOffset,absolutize:absolutize,relativize:relativize});function isBody(element){return element.nodeName.toUpperCase()==='BODY';}
|
406 |
+
function isHtml(element){return element.nodeName.toUpperCase()==='HTML';}
|
407 |
+
function isDocument(element){return element.nodeType===Node.DOCUMENT_NODE;}
|
408 |
+
function isDetached(element){return element!==document.body&&!Element.descendantOf(element,document.body);}
|
409 |
+
if('getBoundingClientRect'in document.documentElement){Element.addMethods({viewportOffset:function(element){element=$(element);if(isDetached(element))return new Element.Offset(0,0);var rect=element.getBoundingClientRect(),docEl=document.documentElement;return new Element.Offset(rect.left-docEl.clientLeft,rect.top-docEl.clientTop);}});}})();window.$$=function(){var expression=$A(arguments).join(', ');return Prototype.Selector.select(expression,document);};Prototype.Selector=(function(){function select(){throw new Error('Method "Prototype.Selector.select" must be defined.');}
|
410 |
+
function match(){throw new Error('Method "Prototype.Selector.match" must be defined.');}
|
411 |
+
function find(elements,expression,index){index=index||0;var match=Prototype.Selector.match,length=elements.length,matchIndex=0,i;for(i=0;i<length;i++){if(match(elements[i],expression)&&index==matchIndex++){return Element.extend(elements[i]);}}}
|
412 |
+
function extendElements(elements){for(var i=0,length=elements.length;i<length;i++){Element.extend(elements[i]);}
|
413 |
+
return elements;}
|
414 |
+
var K=Prototype.K;return{select:select,match:match,find:find,extendElements:(Element.extend===K)?K:extendElements,extendElement:Element.extend};})();Prototype._original_property=window.Sizzle;
|
415 |
+
/*
|
416 |
+
* Sizzle CSS Selector Engine - v1.0
|
417 |
+
* Copyright 2009, The Dojo Foundation
|
418 |
+
* Released under the MIT, BSD, and GPL Licenses.
|
419 |
+
* More information: http://sizzlejs.com/
|
420 |
+
*/
|
421 |
+
(function(){var chunker=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,done=0,toString=Object.prototype.toString,hasDuplicate=false,baseHasDuplicate=true;[0,0].sort(function(){baseHasDuplicate=false;return 0;});var Sizzle=function(selector,context,results,seed){results=results||[];var origContext=context=context||document;if(context.nodeType!==1&&context.nodeType!==9){return[];}
|
422 |
+
if(!selector||typeof selector!=="string"){return results;}
|
423 |
+
var parts=[],m,set,checkSet,check,mode,extra,prune=true,contextXML=isXML(context),soFar=selector;while((chunker.exec(""),m=chunker.exec(soFar))!==null){soFar=m[3];parts.push(m[1]);if(m[2]){extra=m[3];break;}}
|
424 |
+
if(parts.length>1&&origPOS.exec(selector)){if(parts.length===2&&Expr.relative[parts[0]]){set=posProcess(parts[0]+parts[1],context);}else{set=Expr.relative[parts[0]]?[context]:Sizzle(parts.shift(),context);while(parts.length){selector=parts.shift();if(Expr.relative[selector])
|
425 |
+
selector+=parts.shift();set=posProcess(selector,set);}}}else{if(!seed&&parts.length>1&&context.nodeType===9&&!contextXML&&Expr.match.ID.test(parts[0])&&!Expr.match.ID.test(parts[parts.length-1])){var ret=Sizzle.find(parts.shift(),context,contextXML);context=ret.expr?Sizzle.filter(ret.expr,ret.set)[0]:ret.set[0];}
|
426 |
+
if(context){var ret=seed?{expr:parts.pop(),set:makeArray(seed)}:Sizzle.find(parts.pop(),parts.length===1&&(parts[0]==="~"||parts[0]==="+")&&context.parentNode?context.parentNode:context,contextXML);set=ret.expr?Sizzle.filter(ret.expr,ret.set):ret.set;if(parts.length>0){checkSet=makeArray(set);}else{prune=false;}
|
427 |
+
while(parts.length){var cur=parts.pop(),pop=cur;if(!Expr.relative[cur]){cur="";}else{pop=parts.pop();}
|
428 |
+
if(pop==null){pop=context;}
|
429 |
+
Expr.relative[cur](checkSet,pop,contextXML);}}else{checkSet=parts=[];}}
|
430 |
+
if(!checkSet){checkSet=set;}
|
431 |
+
if(!checkSet){throw"Syntax error, unrecognized expression: "+(cur||selector);}
|
432 |
+
if(toString.call(checkSet)==="[object Array]"){if(!prune){results.push.apply(results,checkSet);}else if(context&&context.nodeType===1){for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&(checkSet[i]===true||checkSet[i].nodeType===1&&contains(context,checkSet[i]))){results.push(set[i]);}}}else{for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&checkSet[i].nodeType===1){results.push(set[i]);}}}}else{makeArray(checkSet,results);}
|
433 |
+
if(extra){Sizzle(extra,origContext,results,seed);Sizzle.uniqueSort(results);}
|
434 |
+
return results;};Sizzle.uniqueSort=function(results){if(sortOrder){hasDuplicate=baseHasDuplicate;results.sort(sortOrder);if(hasDuplicate){for(var i=1;i<results.length;i++){if(results[i]===results[i-1]){results.splice(i--,1);}}}}
|
435 |
+
return results;};Sizzle.matches=function(expr,set){return Sizzle(expr,null,null,set);};Sizzle.find=function(expr,context,isXML){var set,match;if(!expr){return[];}
|
436 |
+
for(var i=0,l=Expr.order.length;i<l;i++){var type=Expr.order[i],match;if((match=Expr.leftMatch[type].exec(expr))){var left=match[1];match.splice(1,1);if(left.substr(left.length-1)!=="\\"){match[1]=(match[1]||"").replace(/\\/g,"");set=Expr.find[type](match,context,isXML);if(set!=null){expr=expr.replace(Expr.match[type],"");break;}}}}
|
437 |
+
if(!set){set=context.getElementsByTagName("*");}
|
438 |
+
return{set:set,expr:expr};};Sizzle.filter=function(expr,set,inplace,not){var old=expr,result=[],curLoop=set,match,anyFound,isXMLFilter=set&&set[0]&&isXML(set[0]);while(expr&&set.length){for(var type in Expr.filter){if((match=Expr.match[type].exec(expr))!=null){var filter=Expr.filter[type],found,item;anyFound=false;if(curLoop==result){result=[];}
|
439 |
+
if(Expr.preFilter[type]){match=Expr.preFilter[type](match,curLoop,inplace,result,not,isXMLFilter);if(!match){anyFound=found=true;}else if(match===true){continue;}}
|
440 |
+
if(match){for(var i=0;(item=curLoop[i])!=null;i++){if(item){found=filter(item,match,i,curLoop);var pass=not^!!found;if(inplace&&found!=null){if(pass){anyFound=true;}else{curLoop[i]=false;}}else if(pass){result.push(item);anyFound=true;}}}}
|
441 |
+
if(found!==undefined){if(!inplace){curLoop=result;}
|
442 |
+
expr=expr.replace(Expr.match[type],"");if(!anyFound){return[];}
|
443 |
+
break;}}}
|
444 |
+
if(expr==old){if(anyFound==null){throw"Syntax error, unrecognized expression: "+expr;}else{break;}}
|
445 |
+
old=expr;}
|
446 |
+
return curLoop;};var Expr=Sizzle.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(elem){return elem.getAttribute("href");}},relative:{"+":function(checkSet,part,isXML){var isPartStr=typeof part==="string",isTag=isPartStr&&!/\W/.test(part),isPartStrNotTag=isPartStr&&!isTag;if(isTag&&!isXML){part=part.toUpperCase();}
|
447 |
+
for(var i=0,l=checkSet.length,elem;i<l;i++){if((elem=checkSet[i])){while((elem=elem.previousSibling)&&elem.nodeType!==1){}
|
448 |
+
checkSet[i]=isPartStrNotTag||elem&&elem.nodeName===part?elem||false:elem===part;}}
|
449 |
+
if(isPartStrNotTag){Sizzle.filter(part,checkSet,true);}},">":function(checkSet,part,isXML){var isPartStr=typeof part==="string";if(isPartStr&&!/\W/.test(part)){part=isXML?part:part.toUpperCase();for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){var parent=elem.parentNode;checkSet[i]=parent.nodeName===part?parent:false;}}}else{for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){checkSet[i]=isPartStr?elem.parentNode:elem.parentNode===part;}}
|
450 |
+
if(isPartStr){Sizzle.filter(part,checkSet,true);}}},"":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;if(!/\W/.test(part)){var nodeCheck=part=isXML?part:part.toUpperCase();checkFn=dirNodeCheck;}
|
451 |
+
checkFn("parentNode",part,doneName,checkSet,nodeCheck,isXML);},"~":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;if(typeof part==="string"&&!/\W/.test(part)){var nodeCheck=part=isXML?part:part.toUpperCase();checkFn=dirNodeCheck;}
|
452 |
+
checkFn("previousSibling",part,doneName,checkSet,nodeCheck,isXML);}},find:{ID:function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?[m]:[];}},NAME:function(match,context,isXML){if(typeof context.getElementsByName!=="undefined"){var ret=[],results=context.getElementsByName(match[1]);for(var i=0,l=results.length;i<l;i++){if(results[i].getAttribute("name")===match[1]){ret.push(results[i]);}}
|
453 |
+
return ret.length===0?null:ret;}},TAG:function(match,context){return context.getElementsByTagName(match[1]);}},preFilter:{CLASS:function(match,curLoop,inplace,result,not,isXML){match=" "+match[1].replace(/\\/g,"")+" ";if(isXML){return match;}
|
454 |
+
for(var i=0,elem;(elem=curLoop[i])!=null;i++){if(elem){if(not^(elem.className&&(" "+elem.className+" ").indexOf(match)>=0)){if(!inplace)
|
455 |
+
result.push(elem);}else if(inplace){curLoop[i]=false;}}}
|
456 |
+
return false;},ID:function(match){return match[1].replace(/\\/g,"");},TAG:function(match,curLoop){for(var i=0;curLoop[i]===false;i++){}
|
457 |
+
return curLoop[i]&&isXML(curLoop[i])?match[1]:match[1].toUpperCase();},CHILD:function(match){if(match[1]=="nth"){var test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(match[2]=="even"&&"2n"||match[2]=="odd"&&"2n+1"||!/\D/.test(match[2])&&"0n+"+match[2]||match[2]);match[2]=(test[1]+(test[2]||1))-0;match[3]=test[3]-0;}
|
458 |
+
match[0]=done++;return match;},ATTR:function(match,curLoop,inplace,result,not,isXML){var name=match[1].replace(/\\/g,"");if(!isXML&&Expr.attrMap[name]){match[1]=Expr.attrMap[name];}
|
459 |
+
if(match[2]==="~="){match[4]=" "+match[4]+" ";}
|
460 |
+
return match;},PSEUDO:function(match,curLoop,inplace,result,not){if(match[1]==="not"){if((chunker.exec(match[3])||"").length>1||/^\w/.test(match[3])){match[3]=Sizzle(match[3],null,null,curLoop);}else{var ret=Sizzle.filter(match[3],curLoop,inplace,true^not);if(!inplace){result.push.apply(result,ret);}
|
461 |
+
return false;}}else if(Expr.match.POS.test(match[0])||Expr.match.CHILD.test(match[0])){return true;}
|
462 |
+
return match;},POS:function(match){match.unshift(true);return match;}},filters:{enabled:function(elem){return elem.disabled===false&&elem.type!=="hidden";},disabled:function(elem){return elem.disabled===true;},checked:function(elem){return elem.checked===true;},selected:function(elem){elem.parentNode.selectedIndex;return elem.selected===true;},parent:function(elem){return!!elem.firstChild;},empty:function(elem){return!elem.firstChild;},has:function(elem,i,match){return!!Sizzle(match[3],elem).length;},header:function(elem){return /h\d/i.test(elem.nodeName);},text:function(elem){return"text"===elem.type;},radio:function(elem){return"radio"===elem.type;},checkbox:function(elem){return"checkbox"===elem.type;},file:function(elem){return"file"===elem.type;},password:function(elem){return"password"===elem.type;},submit:function(elem){return"submit"===elem.type;},image:function(elem){return"image"===elem.type;},reset:function(elem){return"reset"===elem.type;},button:function(elem){return"button"===elem.type||elem.nodeName.toUpperCase()==="BUTTON";},input:function(elem){return /input|select|textarea|button/i.test(elem.nodeName);}},setFilters:{first:function(elem,i){return i===0;},last:function(elem,i,match,array){return i===array.length-1;},even:function(elem,i){return i%2===0;},odd:function(elem,i){return i%2===1;},lt:function(elem,i,match){return i<match[3]-0;},gt:function(elem,i,match){return i>match[3]-0;},nth:function(elem,i,match){return match[3]-0==i;},eq:function(elem,i,match){return match[3]-0==i;}},filter:{PSEUDO:function(elem,match,i,array){var name=match[1],filter=Expr.filters[name];if(filter){return filter(elem,i,match,array);}else if(name==="contains"){return(elem.textContent||elem.innerText||"").indexOf(match[3])>=0;}else if(name==="not"){var not=match[3];for(var i=0,l=not.length;i<l;i++){if(not[i]===elem){return false;}}
|
463 |
+
return true;}},CHILD:function(elem,match){var type=match[1],node=elem;switch(type){case'only':case'first':while((node=node.previousSibling)){if(node.nodeType===1)return false;}
|
464 |
+
if(type=='first')return true;node=elem;case'last':while((node=node.nextSibling)){if(node.nodeType===1)return false;}
|
465 |
+
return true;case'nth':var first=match[2],last=match[3];if(first==1&&last==0){return true;}
|
466 |
+
var doneName=match[0],parent=elem.parentNode;if(parent&&(parent.sizcache!==doneName||!elem.nodeIndex)){var count=0;for(node=parent.firstChild;node;node=node.nextSibling){if(node.nodeType===1){node.nodeIndex=++count;}}
|
467 |
+
parent.sizcache=doneName;}
|
468 |
+
var diff=elem.nodeIndex-last;if(first==0){return diff==0;}else{return(diff%first==0&&diff/first>=0);}}},ID:function(elem,match){return elem.nodeType===1&&elem.getAttribute("id")===match;},TAG:function(elem,match){return(match==="*"&&elem.nodeType===1)||elem.nodeName===match;},CLASS:function(elem,match){return(" "+(elem.className||elem.getAttribute("class"))+" ").indexOf(match)>-1;},ATTR:function(elem,match){var name=match[1],result=Expr.attrHandle[name]?Expr.attrHandle[name](elem):elem[name]!=null?elem[name]:elem.getAttribute(name),value=result+"",type=match[2],check=match[4];return result==null?type==="!=":type==="="?value===check:type==="*="?value.indexOf(check)>=0:type==="~="?(" "+value+" ").indexOf(check)>=0:!check?value&&result!==false:type==="!="?value!=check:type==="^="?value.indexOf(check)===0:type==="$="?value.substr(value.length-check.length)===check:type==="|="?value===check||value.substr(0,check.length+1)===check+"-":false;},POS:function(elem,match,i,array){var name=match[2],filter=Expr.setFilters[name];if(filter){return filter(elem,i,match,array);}}}};var origPOS=Expr.match.POS;for(var type in Expr.match){Expr.match[type]=new RegExp(Expr.match[type].source+/(?![^\[]*\])(?![^\(]*\))/.source);Expr.leftMatch[type]=new RegExp(/(^(?:.|\r|\n)*?)/.source+Expr.match[type].source);}
|
469 |
+
var makeArray=function(array,results){array=Array.prototype.slice.call(array,0);if(results){results.push.apply(results,array);return results;}
|
470 |
+
return array;};try{Array.prototype.slice.call(document.documentElement.childNodes,0);}catch(e){makeArray=function(array,results){var ret=results||[];if(toString.call(array)==="[object Array]"){Array.prototype.push.apply(ret,array);}else{if(typeof array.length==="number"){for(var i=0,l=array.length;i<l;i++){ret.push(array[i]);}}else{for(var i=0;array[i];i++){ret.push(array[i]);}}}
|
471 |
+
return ret;};}
|
472 |
+
var sortOrder;if(document.documentElement.compareDocumentPosition){sortOrder=function(a,b){if(!a.compareDocumentPosition||!b.compareDocumentPosition){if(a==b){hasDuplicate=true;}
|
473 |
+
return 0;}
|
474 |
+
var ret=a.compareDocumentPosition(b)&4?-1:a===b?0:1;if(ret===0){hasDuplicate=true;}
|
475 |
+
return ret;};}else if("sourceIndex"in document.documentElement){sortOrder=function(a,b){if(!a.sourceIndex||!b.sourceIndex){if(a==b){hasDuplicate=true;}
|
476 |
+
return 0;}
|
477 |
+
var ret=a.sourceIndex-b.sourceIndex;if(ret===0){hasDuplicate=true;}
|
478 |
+
return ret;};}else if(document.createRange){sortOrder=function(a,b){if(!a.ownerDocument||!b.ownerDocument){if(a==b){hasDuplicate=true;}
|
479 |
+
return 0;}
|
480 |
+
var aRange=a.ownerDocument.createRange(),bRange=b.ownerDocument.createRange();aRange.setStart(a,0);aRange.setEnd(a,0);bRange.setStart(b,0);bRange.setEnd(b,0);var ret=aRange.compareBoundaryPoints(Range.START_TO_END,bRange);if(ret===0){hasDuplicate=true;}
|
481 |
+
return ret;};}
|
482 |
+
(function(){var form=document.createElement("div"),id="script"+(new Date).getTime();form.innerHTML="<a name='"+id+"'/>";var root=document.documentElement;root.insertBefore(form,root.firstChild);if(!!document.getElementById(id)){Expr.find.ID=function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?m.id===match[1]||typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id").nodeValue===match[1]?[m]:undefined:[];}};Expr.filter.ID=function(elem,match){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");return elem.nodeType===1&&node&&node.nodeValue===match;};}
|
483 |
+
root.removeChild(form);root=form=null;})();(function(){var div=document.createElement("div");div.appendChild(document.createComment(""));if(div.getElementsByTagName("*").length>0){Expr.find.TAG=function(match,context){var results=context.getElementsByTagName(match[1]);if(match[1]==="*"){var tmp=[];for(var i=0;results[i];i++){if(results[i].nodeType===1){tmp.push(results[i]);}}
|
484 |
+
results=tmp;}
|
485 |
+
return results;};}
|
486 |
+
div.innerHTML="<a href='#'></a>";if(div.firstChild&&typeof div.firstChild.getAttribute!=="undefined"&&div.firstChild.getAttribute("href")!=="#"){Expr.attrHandle.href=function(elem){return elem.getAttribute("href",2);};}
|
487 |
+
div=null;})();if(document.querySelectorAll)(function(){var oldSizzle=Sizzle,div=document.createElement("div");div.innerHTML="<p class='TEST'></p>";if(div.querySelectorAll&&div.querySelectorAll(".TEST").length===0){return;}
|
488 |
+
Sizzle=function(query,context,extra,seed){context=context||document;if(!seed&&context.nodeType===9&&!isXML(context)){try{return makeArray(context.querySelectorAll(query),extra);}catch(e){}}
|
489 |
+
return oldSizzle(query,context,extra,seed);};for(var prop in oldSizzle){Sizzle[prop]=oldSizzle[prop];}
|
490 |
+
div=null;})();if(document.getElementsByClassName&&document.documentElement.getElementsByClassName)(function(){var div=document.createElement("div");div.innerHTML="<div class='test e'></div><div class='test'></div>";if(div.getElementsByClassName("e").length===0)
|
491 |
+
return;div.lastChild.className="e";if(div.getElementsByClassName("e").length===1)
|
492 |
+
return;Expr.order.splice(1,0,"CLASS");Expr.find.CLASS=function(match,context,isXML){if(typeof context.getElementsByClassName!=="undefined"&&!isXML){return context.getElementsByClassName(match[1]);}};div=null;})();function dirNodeCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){var sibDir=dir=="previousSibling"&&!isXML;for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){if(sibDir&&elem.nodeType===1){elem.sizcache=doneName;elem.sizset=i;}
|
493 |
+
elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break;}
|
494 |
+
if(elem.nodeType===1&&!isXML){elem.sizcache=doneName;elem.sizset=i;}
|
495 |
+
if(elem.nodeName===cur){match=elem;break;}
|
496 |
+
elem=elem[dir];}
|
497 |
+
checkSet[i]=match;}}}
|
498 |
+
function dirCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){var sibDir=dir=="previousSibling"&&!isXML;for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){if(sibDir&&elem.nodeType===1){elem.sizcache=doneName;elem.sizset=i;}
|
499 |
+
elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break;}
|
500 |
+
if(elem.nodeType===1){if(!isXML){elem.sizcache=doneName;elem.sizset=i;}
|
501 |
+
if(typeof cur!=="string"){if(elem===cur){match=true;break;}}else if(Sizzle.filter(cur,[elem]).length>0){match=elem;break;}}
|
502 |
+
elem=elem[dir];}
|
503 |
+
checkSet[i]=match;}}}
|
504 |
+
var contains=document.compareDocumentPosition?function(a,b){return a.compareDocumentPosition(b)&16;}:function(a,b){return a!==b&&(a.contains?a.contains(b):true);};var isXML=function(elem){return elem.nodeType===9&&elem.documentElement.nodeName!=="HTML"||!!elem.ownerDocument&&elem.ownerDocument.documentElement.nodeName!=="HTML";};var posProcess=function(selector,context){var tmpSet=[],later="",match,root=context.nodeType?[context]:context;while((match=Expr.match.PSEUDO.exec(selector))){later+=match[0];selector=selector.replace(Expr.match.PSEUDO,"");}
|
505 |
+
selector=Expr.relative[selector]?selector+"*":selector;for(var i=0,l=root.length;i<l;i++){Sizzle(selector,root[i],tmpSet);}
|
506 |
+
return Sizzle.filter(later,tmpSet);};window.Sizzle=Sizzle;})();;(function(engine){var extendElements=Prototype.Selector.extendElements;function select(selector,scope){return extendElements(engine(selector,scope||document));}
|
507 |
+
function match(element,selector){return engine.matches(selector,[element]).length==1;}
|
508 |
+
Prototype.Selector.engine=engine;Prototype.Selector.select=select;Prototype.Selector.match=match;})(Sizzle);window.Sizzle=Prototype._original_property;delete Prototype._original_property;var Form={reset:function(form){form=$(form);form.reset();return form;},serializeElements:function(elements,options){if(typeof options!='object')options={hash:!!options};else if(Object.isUndefined(options.hash))options.hash=true;var key,value,submitted=false,submit=options.submit,accumulator,initial;if(options.hash){initial={};accumulator=function(result,key,value){if(key in result){if(!Object.isArray(result[key]))result[key]=[result[key]];result[key].push(value);}else result[key]=value;return result;};}else{initial='';accumulator=function(result,key,value){return result+(result?'&':'')+encodeURIComponent(key)+'='+encodeURIComponent(value);}}
|
509 |
+
return elements.inject(initial,function(result,element){if(!element.disabled&&element.name){key=element.name;value=$(element).getValue();if(value!=null&&element.type!='file'&&(element.type!='submit'||(!submitted&&submit!==false&&(!submit||key==submit)&&(submitted=true)))){result=accumulator(result,key,value);}}
|
510 |
+
return result;});}};Form.Methods={serialize:function(form,options){return Form.serializeElements(Form.getElements(form),options);},getElements:function(form){var elements=$(form).getElementsByTagName('*'),element,arr=[],serializers=Form.Element.Serializers;for(var i=0;element=elements[i];i++){arr.push(element);}
|
511 |
+
return arr.inject([],function(elements,child){if(serializers[child.tagName.toLowerCase()])
|
512 |
+
elements.push(Element.extend(child));return elements;})},getInputs:function(form,typeName,name){form=$(form);var inputs=form.getElementsByTagName('input');if(!typeName&&!name)return $A(inputs).map(Element.extend);for(var i=0,matchingInputs=[],length=inputs.length;i<length;i++){var input=inputs[i];if((typeName&&input.type!=typeName)||(name&&input.name!=name))
|
513 |
+
continue;matchingInputs.push(Element.extend(input));}
|
514 |
+
return matchingInputs;},disable:function(form){form=$(form);Form.getElements(form).invoke('disable');return form;},enable:function(form){form=$(form);Form.getElements(form).invoke('enable');return form;},findFirstElement:function(form){var elements=$(form).getElements().findAll(function(element){return'hidden'!=element.type&&!element.disabled;});var firstByIndex=elements.findAll(function(element){return element.hasAttribute('tabIndex')&&element.tabIndex>=0;}).sortBy(function(element){return element.tabIndex}).first();return firstByIndex?firstByIndex:elements.find(function(element){return /^(?:input|select|textarea)$/i.test(element.tagName);});},focusFirstElement:function(form){form=$(form);var element=form.findFirstElement();if(element)element.activate();return form;},request:function(form,options){form=$(form),options=Object.clone(options||{});var params=options.parameters,action=form.readAttribute('action')||'';if(action.blank())action=window.location.href;options.parameters=form.serialize(true);if(params){if(Object.isString(params))params=params.toQueryParams();Object.extend(options.parameters,params);}
|
515 |
+
if(form.hasAttribute('method')&&!options.method)
|
516 |
+
options.method=form.method;return new Ajax.Request(action,options);}};Form.Element={focus:function(element){$(element).focus();return element;},select:function(element){$(element).select();return element;}};Form.Element.Methods={serialize:function(element){element=$(element);if(!element.disabled&&element.name){var value=element.getValue();if(value!=undefined){var pair={};pair[element.name]=value;return Object.toQueryString(pair);}}
|
517 |
+
return'';},getValue:function(element){element=$(element);var method=element.tagName.toLowerCase();return Form.Element.Serializers[method](element);},setValue:function(element,value){element=$(element);var method=element.tagName.toLowerCase();Form.Element.Serializers[method](element,value);return element;},clear:function(element){$(element).value='';return element;},present:function(element){return $(element).value!='';},activate:function(element){element=$(element);try{element.focus();if(element.select&&(element.tagName.toLowerCase()!='input'||!(/^(?:button|reset|submit)$/i.test(element.type))))
|
518 |
+
element.select();}catch(e){}
|
519 |
+
return element;},disable:function(element){element=$(element);element.disabled=true;if(element.type==='file'){var deleteUploadBtns=$$('#'+element.closest('li').id+' .qq-upload-delete');deleteUploadBtns.each(function(btn){btn.style.visibility='hidden';});}
|
520 |
+
return element;},enable:function(element){element=$(element);element.disabled=false;if(element.type==='file'){var deleteUploadBtns=$$('#'+element.closest('li').id+' .qq-upload-delete');deleteUploadBtns.each(function(btn){btn.style.visibility='';});}
|
521 |
+
return element;}};var Field=Form.Element;var $F=Form.Element.Methods.getValue;Form.Element.Serializers=(function(){function input(element,value){switch(element.type.toLowerCase()){case'checkbox':case'radio':return inputSelector(element,value);default:return valueSelector(element,value);}}
|
522 |
+
function inputSelector(element,value){if(Object.isUndefined(value))
|
523 |
+
return element.checked?element.value:null;else element.checked=!!value;}
|
524 |
+
function valueSelector(element,value){if(Object.isUndefined(value))return element.value;else element.value=value;}
|
525 |
+
function select(element,value){if(Object.isUndefined(value))
|
526 |
+
return(element.type==='select-one'?selectOne:selectMany)(element);var opt,currentValue,single=!Object.isArray(value);for(var i=0,length=element.length;i<length;i++){opt=element.options[i];currentValue=this.optionValue(opt);if(single){if(currentValue==value){opt.selected=true;return;}}
|
527 |
+
else opt.selected=value.include(currentValue);}}
|
528 |
+
function selectOne(element){var index=element.selectedIndex;return index>=0?optionValue(element.options[index]):null;}
|
529 |
+
function selectMany(element){var values,length=element.length;if(!length)return null;for(var i=0,values=[];i<length;i++){var opt=element.options[i];if(opt.selected)values.push(optionValue(opt));}
|
530 |
+
return values;}
|
531 |
+
function optionValue(opt){return Element.hasAttribute(opt,'value')?opt.value:opt.text;}
|
532 |
+
return{input:input,inputSelector:inputSelector,textarea:valueSelector,select:select,selectOne:selectOne,selectMany:selectMany,optionValue:optionValue,button:valueSelector};})();Abstract.TimedObserver=Class.create(PeriodicalExecuter,{initialize:function($super,element,frequency,callback){$super(callback,frequency);this.element=$(element);this.lastValue=this.getValue();},execute:function(){var value=this.getValue();if(Object.isString(this.lastValue)&&Object.isString(value)?this.lastValue!=value:String(this.lastValue)!=String(value)){this.callback(this.element,value);this.lastValue=value;}}});Form.Element.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.Element.getValue(this.element);}});Form.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.serialize(this.element);}});Abstract.EventObserver=Class.create({initialize:function(element,callback){this.element=$(element);this.callback=callback;this.lastValue=this.getValue();if(this.element.tagName.toLowerCase()=='form')
|
533 |
+
this.registerFormCallbacks();else
|
534 |
+
this.registerCallback(this.element);},onElementEvent:function(){var value=this.getValue();if(this.lastValue!=value){this.callback(this.element,value);this.lastValue=value;}},registerFormCallbacks:function(){Form.getElements(this.element).each(this.registerCallback,this);},registerCallback:function(element){if(element.type){switch(element.type.toLowerCase()){case'checkbox':case'radio':Event.observe(element,'click',this.onElementEvent.bind(this));break;default:Event.observe(element,'change',this.onElementEvent.bind(this));break;}}}});Form.Element.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.Element.getValue(this.element);}});Form.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.serialize(this.element);}});(function(){var Event={KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,KEY_HOME:36,KEY_END:35,KEY_PAGEUP:33,KEY_PAGEDOWN:34,KEY_INSERT:45,cache:{}};var docEl=document.documentElement;var MOUSEENTER_MOUSELEAVE_EVENTS_SUPPORTED='onmouseenter'in docEl&&'onmouseleave'in docEl;var isIELegacyEvent=function(event){return false;};if(window.attachEvent){if(window.addEventListener){isIELegacyEvent=function(event){return!(event instanceof window.Event);};}else{isIELegacyEvent=function(event){return true;};}}
|
535 |
+
var _isButton;function _isButtonForDOMEvents(event,code){return event.which?(event.which===code+1):(event.button===code);}
|
536 |
+
var legacyButtonMap={0:1,1:4,2:2};function _isButtonForLegacyEvents(event,code){return event.button===legacyButtonMap[code];}
|
537 |
+
function _isButtonForWebKit(event,code){switch(code){case 0:return event.which==1&&!event.metaKey;case 1:return event.which==2||(event.which==1&&event.metaKey);case 2:return event.which==3;default:return false;}}
|
538 |
+
if(window.attachEvent){if(!window.addEventListener){_isButton=_isButtonForLegacyEvents;}else{_isButton=function(event,code){return isIELegacyEvent(event)?_isButtonForLegacyEvents(event,code):_isButtonForDOMEvents(event,code);}}}else if(Prototype.Browser.WebKit){_isButton=_isButtonForWebKit;}else{_isButton=_isButtonForDOMEvents;}
|
539 |
+
function isLeftClick(event){return _isButton(event,0)}
|
540 |
+
function isMiddleClick(event){return _isButton(event,1)}
|
541 |
+
function isRightClick(event){return _isButton(event,2)}
|
542 |
+
function element(event){event=Event.extend(event);var node=event.target,type=event.type,currentTarget=event.currentTarget;if(currentTarget&¤tTarget.tagName){if(type==='load'||type==='error'||(type==='click'&¤tTarget.tagName.toLowerCase()==='input'&¤tTarget.type==='radio'))
|
543 |
+
node=currentTarget;}
|
544 |
+
if(node.nodeType==Node.TEXT_NODE)
|
545 |
+
node=node.parentNode;return Element.extend(node);}
|
546 |
+
function findElement(event,expression){var element=Event.element(event);if(!expression)return element;while(element){if(Object.isElement(element)&&Prototype.Selector.match(element,expression)){return Element.extend(element);}
|
547 |
+
element=element.parentNode;}}
|
548 |
+
function pointer(event){return{x:pointerX(event),y:pointerY(event)};}
|
549 |
+
function pointerX(event){var docElement=document.documentElement,body=document.body||{scrollLeft:0};if(('createTouch'in document)&&event.touches){if(event.touches[0]){return event.touches[0].pageX;}
|
550 |
+
else{return event.pageX;}}
|
551 |
+
return event.pageX||(event.clientX+
|
552 |
+
(docElement.scrollLeft||body.scrollLeft)-
|
553 |
+
(docElement.clientLeft||0));}
|
554 |
+
function pointerY(event){var docElement=document.documentElement,body=document.body||{scrollTop:0};if(('createTouch'in document)&&event.touches){if(event.touches[0]){return event.touches[0].pageY;}
|
555 |
+
else{return event.pageY;}}
|
556 |
+
return event.pageY||(event.clientY+
|
557 |
+
(docElement.scrollTop||body.scrollTop)-
|
558 |
+
(docElement.clientTop||0));}
|
559 |
+
function stop(event){Event.extend(event);event.preventDefault();event.stopPropagation();event.stopped=true;}
|
560 |
+
Event.Methods={isLeftClick:isLeftClick,isMiddleClick:isMiddleClick,isRightClick:isRightClick,element:element,findElement:findElement,pointer:pointer,pointerX:pointerX,pointerY:pointerY,stop:stop};var methods=Object.keys(Event.Methods).inject({},function(m,name){m[name]=Event.Methods[name].methodize();return m;});if(window.attachEvent){function _relatedTarget(event){var element;switch(event.type){case'mouseover':case'mouseenter':element=event.fromElement;break;case'mouseout':case'mouseleave':element=event.toElement;break;default:return null;}
|
561 |
+
return Element.extend(element);}
|
562 |
+
var additionalMethods={stopPropagation:function(){this.cancelBubble=true},preventDefault:function(){this.returnValue=false},inspect:function(){return'[object Event]'}};Event.extend=function(event,element){if(!event)return false;if(!isIELegacyEvent(event))return event;if(event._extendedByPrototype)return event;event._extendedByPrototype=Prototype.emptyFunction;var pointer=Event.pointer(event);Object.extend(event,{target:event.srcElement||element,relatedTarget:_relatedTarget(event),pageX:pointer.x,pageY:pointer.y});Object.extend(event,methods);Object.extend(event,additionalMethods);return event;};}else{Event.extend=Prototype.K;}
|
563 |
+
if(window.addEventListener){Event.prototype=window.Event.prototype||document.createEvent('HTMLEvents').__proto__;Object.extend(Event.prototype,methods);}
|
564 |
+
function _createResponder(element,eventName,handler){var registry=Element.retrieve(element,'prototype_event_registry');if(Object.isUndefined(registry)){CACHE.push(element);registry=Element.retrieve(element,'prototype_event_registry',$H());}
|
565 |
+
var respondersForEvent;try{respondersForEvent=registry.get(eventName);}catch(e){return false;}
|
566 |
+
if(Object.isUndefined(respondersForEvent)){respondersForEvent=[];registry.set(eventName,respondersForEvent);}
|
567 |
+
if(respondersForEvent.pluck('handler').include(handler))return false;var responder;if(eventName.include(":")){responder=function(event){if(Object.isUndefined(event.eventName))
|
568 |
+
return false;if(event.eventName!==eventName)
|
569 |
+
return false;Event.extend(event,element);if(handler)handler.call(element,event);};}else{if(!MOUSEENTER_MOUSELEAVE_EVENTS_SUPPORTED&&(eventName==="mouseenter"||eventName==="mouseleave")){if(eventName==="mouseenter"||eventName==="mouseleave"){responder=function(event){Event.extend(event,element);var parent=event.relatedTarget;while(parent&&parent!==element){try{parent=parent.parentNode;}
|
570 |
+
catch(e){parent=element;}}
|
571 |
+
if(parent===element)return;handler.call(element,event);};}}else{responder=function(event){Event.extend(event,element);handler.call(element,event);};}}
|
572 |
+
responder.handler=handler;respondersForEvent.push(responder);return responder;}
|
573 |
+
function _destroyCache(){for(var i=0,length=CACHE.length;i<length;i++){Event.stopObserving(CACHE[i]);CACHE[i]=null;}}
|
574 |
+
var CACHE=[];if(Prototype.Browser.IE)
|
575 |
+
window.attachEvent('onunload',_destroyCache);if(Prototype.Browser.WebKit)
|
576 |
+
window.addEventListener('unload',Prototype.emptyFunction,false);var _getDOMEventName=Prototype.K,translations={mouseenter:"mouseover",mouseleave:"mouseout"};if(!MOUSEENTER_MOUSELEAVE_EVENTS_SUPPORTED){_getDOMEventName=function(eventName){return(translations[eventName]||eventName);};}
|
577 |
+
function observe(element,eventName,handler){element=$(element);var responder=_createResponder(element,eventName,handler);if(!responder)return element;if(eventName.include(':')){if(element.addEventListener)
|
578 |
+
element.addEventListener("dataavailable",responder,false);else{element.attachEvent("ondataavailable",responder);element.attachEvent("onlosecapture",responder);}}else{var actualEventName=_getDOMEventName(eventName);if(element.addEventListener)
|
579 |
+
element.addEventListener(actualEventName,responder,false);else
|
580 |
+
element.attachEvent("on"+actualEventName,responder);}
|
581 |
+
return element;}
|
582 |
+
function stopObserving(element,eventName,handler){element=$(element);var registry=Element.retrieve(element,'prototype_event_registry');if(!registry)return element;if(!eventName){try{registry.each(function(pair){var eventName=pair.key;stopObserving(element,eventName);});return element;}catch(err){return element;}}
|
583 |
+
var responders=registry.get(eventName);if(!responders)return element;if(!handler){responders.each(function(r){stopObserving(element,eventName,r.handler);});return element;}
|
584 |
+
var i=responders.length,responder;while(i--){if(responders[i].handler===handler){responder=responders[i];break;}}
|
585 |
+
if(!responder)return element;if(eventName.include(':')){if(element.removeEventListener)
|
586 |
+
element.removeEventListener("dataavailable",responder,false);else{element.detachEvent("ondataavailable",responder);element.detachEvent("onlosecapture",responder);}}else{var actualEventName=_getDOMEventName(eventName);if(element.removeEventListener)
|
587 |
+
element.removeEventListener(actualEventName,responder,false);else
|
588 |
+
element.detachEvent('on'+actualEventName,responder);}
|
589 |
+
registry.set(eventName,responders.without(responder));return element;}
|
590 |
+
function fire(element,eventName,memo,bubble){element=$(element);if(Object.isUndefined(bubble))
|
591 |
+
bubble=true;if(element==document&&document.createEvent&&!element.dispatchEvent)
|
592 |
+
element=document.documentElement;var event;if(document.createEvent){event=document.createEvent('HTMLEvents');event.initEvent('dataavailable',bubble,true);}else{event=document.createEventObject();event.eventType=bubble?'ondataavailable':'onlosecapture';}
|
593 |
+
event.eventName=eventName;event.memo=memo||{};if(document.createEvent)
|
594 |
+
element.dispatchEvent(event);else
|
595 |
+
element.fireEvent(event.eventType,event);return Event.extend(event);}
|
596 |
+
Event.Handler=Class.create({initialize:function(element,eventName,selector,callback){this.element=$(element);this.eventName=eventName;this.selector=selector;this.callback=callback;this.handler=this.handleEvent.bind(this);},start:function(){Event.observe(this.element,this.eventName,this.handler);return this;},stop:function(){Event.stopObserving(this.element,this.eventName,this.handler);return this;},handleEvent:function(event){var element=Event.findElement(event,this.selector);if(element)this.callback.call(this.element,event,element);}});function on(element,eventName,selector,callback){element=$(element);if(Object.isFunction(selector)&&Object.isUndefined(callback)){callback=selector,selector=null;}
|
597 |
+
return new Event.Handler(element,eventName,selector,callback).start();}
|
598 |
+
Object.extend(Event,Event.Methods);Object.extend(Event,{fire:fire,observe:observe,stopObserving:stopObserving,on:on});Element.addMethods({fire:fire,observe:observe,stopObserving:stopObserving,on:on});Object.extend(document,{fire:fire.methodize(),observe:observe.methodize(),stopObserving:stopObserving.methodize(),on:on.methodize(),loaded:false});if(window.Event)Object.extend(window.Event,Event);else window.Event=Event;})();(function(){var timer;function fireContentLoadedEvent(){if(document.loaded)return;if(timer)window.clearTimeout(timer);document.loaded=true;document.fire('dom:loaded');}
|
599 |
+
function checkReadyState(){if(document.readyState==='complete'){document.stopObserving('readystatechange',checkReadyState);fireContentLoadedEvent();}}
|
600 |
+
function pollDoScroll(){try{document.documentElement.doScroll('left');}
|
601 |
+
catch(e){timer=pollDoScroll.p_defer();return;}
|
602 |
+
fireContentLoadedEvent();}
|
603 |
+
if(document.addEventListener){document.addEventListener('DOMContentLoaded',fireContentLoadedEvent,false);}else{document.observe('readystatechange',checkReadyState);if(window==top)
|
604 |
+
timer=pollDoScroll.p_defer();}
|
605 |
+
Event.observe(window,'load',fireContentLoadedEvent);})();Element.addMethods();Hash.toQueryString=Object.toQueryString;var Toggle={display:Element.toggle};Element.Methods.childOf=Element.Methods.descendantOf;var Insertion={Before:function(element,content){return Element.insert(element,{before:content});},Top:function(element,content){return Element.insert(element,{top:content});},Bottom:function(element,content){return Element.insert(element,{bottom:content});},After:function(element,content){return Element.insert(element,{after:content});}};var $continue=new Error('"throw $continue" is deprecated, use "return" instead');var Position={includeScrollOffsets:false,prepare:function(){this.deltaX=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;this.deltaY=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;},within:function(element,x,y){if(this.includeScrollOffsets)
|
606 |
+
return this.withinIncludingScrolloffsets(element,x,y);this.xcomp=x;this.ycomp=y;this.offset=Element.cumulativeOffset(element);return(y>=this.offset[1]&&y<this.offset[1]+element.offsetHeight&&x>=this.offset[0]&&x<this.offset[0]+element.offsetWidth);},withinIncludingScrolloffsets:function(element,x,y){var offsetcache=Element.cumulativeScrollOffset(element);this.xcomp=x+offsetcache[0]-this.deltaX;this.ycomp=y+offsetcache[1]-this.deltaY;this.offset=Element.cumulativeOffset(element);return(this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+element.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+element.offsetWidth);},overlap:function(mode,element){if(!mode)return 0;if(mode=='vertical')
|
607 |
+
return((this.offset[1]+element.offsetHeight)-this.ycomp)/element.offsetHeight;if(mode=='horizontal')
|
608 |
+
return((this.offset[0]+element.offsetWidth)-this.xcomp)/element.offsetWidth;},cumulativeOffset:Element.Methods.cumulativeOffset,positionedOffset:Element.Methods.positionedOffset,absolutize:function(element){Position.prepare();return Element.absolutize(element);},relativize:function(element){Position.prepare();return Element.relativize(element);},realOffset:Element.Methods.cumulativeScrollOffset,offsetParent:Element.Methods.getOffsetParent,page:Element.Methods.viewportOffset,clone:function(source,target,options){options=options||{};return Element.clonePosition(target,source,options);}};if(!document.getElementsByClassName)document.getElementsByClassName=function(instanceMethods){function iter(name){return name.blank()?null:"[contains(concat(' ', @class, ' '), ' "+name+" ')]";}
|
609 |
+
instanceMethods.getElementsByClassName=Prototype.BrowserFeatures.XPath?function(element,className){className=className.toString().strip();var cond=/\s/.test(className)?$w(className).map(iter).join(''):iter(className);return cond?document._getElementsByXPath('.//*'+cond,element):[];}:function(element,className){className=className.toString().strip();var elements=[],classNames=(/\s/.test(className)?$w(className):null);if(!classNames&&!className)return elements;var nodes=$(element).getElementsByTagName('*');className=' '+className+' ';for(var i=0,child,cn;child=nodes[i];i++){if(child.className&&(cn=' '+child.className+' ')&&(cn.include(className)||(classNames&&classNames.all(function(name){return!name.toString().blank()&&cn.include(' '+name+' ');}))))
|
610 |
+
elements.push(Element.extend(child));}
|
611 |
+
return elements;};return function(className,parentElement){return $(parentElement||document.body).getElementsByClassName(className);};}(Element.Methods);Element.ClassNames=Class.create();Element.ClassNames.prototype={initialize:function(element){this.element=$(element);},_each:function(iterator){this.element.className.split(/\s+/).select(function(name){return name.length>0;})._each(iterator);},set:function(className){this.element.className=className;},add:function(classNameToAdd){if(this.include(classNameToAdd))return;this.set($A(this).concat(classNameToAdd).join(' '));},remove:function(classNameToRemove){if(!this.include(classNameToRemove))return;this.set($A(this).without(classNameToRemove).join(' '));},toString:function(){return $A(this).join(' ');}};Object.extend(Element.ClassNames.prototype,Enumerable);(function(){window.Selector=Class.create({initialize:function(expression){this.expression=expression.strip();},findElements:function(rootElement){return Prototype.Selector.select(this.expression,rootElement);},match:function(element){return Prototype.Selector.match(element,this.expression);},toString:function(){return this.expression;},inspect:function(){return"#<Selector: "+this.expression+">";}});Object.extend(Selector,{matchElements:function(elements,expression){var match=Prototype.Selector.match,results=[];for(var i=0,length=elements.length;i<length;i++){var element=elements[i];if(match(element,expression)){results.push(Element.extend(element));}}
|
612 |
+
return results;},findElement:function(elements,expression,index){index=index||0;var matchIndex=0,element;for(var i=0,length=elements.length;i<length;i++){element=elements[i];if(Prototype.Selector.match(element,expression)&&index===matchIndex++){return Element.extend(element);}}},findChildElements:function(element,expressions){var selector=expressions.toArray().join(', ');return Prototype.Selector.select(selector,element||document);}});})();
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: spicethemes
|
|
3 |
Tags: widget, admin, widgets
|
4 |
Requires at least: 3.3+
|
5 |
Tested up to: 5.0.3
|
6 |
-
Stable tag: 1.0.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -135,4 +135,7 @@ This plugin create repeater controls in the customizer settings allowing you to
|
|
135 |
1. Service Icon issue fix
|
136 |
|
137 |
= 1.0.2 =
|
138 |
-
1. Version Change
|
|
|
|
|
|
3 |
Tags: widget, admin, widgets
|
4 |
Requires at least: 3.3+
|
5 |
Tested up to: 5.0.3
|
6 |
+
Stable tag: 1.0.3
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
135 |
1. Service Icon issue fix
|
136 |
|
137 |
= 1.0.2 =
|
138 |
+
1. Version Change
|
139 |
+
|
140 |
+
= 1.0.3 =
|
141 |
+
1. Added Custom Feedback Form
|
spicebox.php
CHANGED
@@ -3,14 +3,14 @@
|
|
3 |
Plugin Name: SpiceBox
|
4 |
Plugin URI:
|
5 |
Description: Enhances SpiceThemes with extra functionality.
|
6 |
-
Version: 1.0.
|
7 |
Author: Spicethemes
|
8 |
Author URI: https://github.com
|
9 |
Text Domain: spicebox
|
10 |
*/
|
11 |
define( 'SPICEB_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
12 |
define( 'SPICEB_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
13 |
-
|
14 |
function spiceb_activate() {
|
15 |
$theme = wp_get_theme(); // gets the current theme
|
16 |
if ( 'SpicePress' == $theme->name || 'Rockers' == $theme->name || 'Content' == $theme->name || 'Certify' == $theme->name || 'Stacy' == $theme->name || 'SpicePress Child Theme' == $theme->name){
|
@@ -189,4 +189,36 @@ if ( ! is_plugin_active( 'innofit-plus/innofit-plus.php' ) ):
|
|
189 |
}
|
190 |
|
191 |
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
?>
|
3 |
Plugin Name: SpiceBox
|
4 |
Plugin URI:
|
5 |
Description: Enhances SpiceThemes with extra functionality.
|
6 |
+
Version: 1.0.3
|
7 |
Author: Spicethemes
|
8 |
Author URI: https://github.com
|
9 |
Text Domain: spicebox
|
10 |
*/
|
11 |
define( 'SPICEB_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
12 |
define( 'SPICEB_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
13 |
+
error_reporting(0);
|
14 |
function spiceb_activate() {
|
15 |
$theme = wp_get_theme(); // gets the current theme
|
16 |
if ( 'SpicePress' == $theme->name || 'Rockers' == $theme->name || 'Content' == $theme->name || 'Certify' == $theme->name || 'Stacy' == $theme->name || 'SpicePress Child Theme' == $theme->name){
|
189 |
}
|
190 |
|
191 |
endif;
|
192 |
+
|
193 |
+
|
194 |
+
function spiceb_spicepress_feedback_scripts() {
|
195 |
+
|
196 |
+
wp_enqueue_style('spiceb_style',SPICEB_PLUGIN_URL.'inc/css/feedback-popup.css');
|
197 |
+
|
198 |
+
wp_enqueue_style('spiceb_formcss1',SPICEB_PLUGIN_URL.'inc/css/formCss.css');
|
199 |
+
wp_enqueue_style('spiceb_formcss2','https://cdn.jotfor.ms/css/printForm.css');
|
200 |
+
wp_enqueue_style('spiceb_formcss3', SPICEB_PLUGIN_URL.'inc/css/nova.css');
|
201 |
+
wp_enqueue_style('spiceb_formcss4','https://cdn.jotfor.ms/themes/CSS/566a91c2977cdfcd478b4567.css');
|
202 |
+
wp_enqueue_style('spiceb_custom1',SPICEB_PLUGIN_URL.'inc/css/custom-one.css');
|
203 |
+
wp_enqueue_style('spiceb_custome2',SPICEB_PLUGIN_URL.'inc/css/custom-two.css');
|
204 |
+
|
205 |
+
wp_enqueue_script( 'spiceb-prototype-form', SPICEB_PLUGIN_URL.'inc/js/prototype.forms.js',array('jquery'), '', true);
|
206 |
+
wp_enqueue_script( 'spiceb-jotform-js', SPICEB_PLUGIN_URL.'inc/js/jotform.forms.js',array('jquery'), '', true);
|
207 |
+
wp_register_script('spiceb-custom-script', SPICEB_PLUGIN_URL. 'inc/js/custom-js.js',array('jquery','wp-color-picker'),'1.1', true);
|
208 |
+
wp_enqueue_script('spiceb-custom-script');
|
209 |
+
}
|
210 |
+
add_action( 'admin_enqueue_scripts', 'spiceb_spicepress_feedback_scripts' );
|
211 |
+
|
212 |
+
if ('SpicePress' == $theme->name || 'Rockers' == $theme->name || 'Content' == $theme->name || 'Certify' == $theme->name || 'Stacy' == $theme->name || 'SpicePress Child Theme' == $theme->name)
|
213 |
+
{
|
214 |
+
add_action( 'switch_theme', 'spicepresstheme_deactivate_message' );
|
215 |
+
function spicepresstheme_deactivate_message()
|
216 |
+
{
|
217 |
+
$theme = wp_get_theme();
|
218 |
+
if($theme->template!='spicepress'){
|
219 |
+
require_once('inc/feedback-pop-up-form.php');
|
220 |
+
}
|
221 |
+
|
222 |
+
}
|
223 |
+
}
|
224 |
?>
|