da-js 1.2.1 → 1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,46 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>Test</title>
5
- <%= "<script src='../vendor/jquery-#{@jquery_version}.js'></script>" %>
6
- <script src="/assets/javascripts/da-js.js"></script>
7
- <script>$.fx.off = true;</script>
8
- </head>
9
- <body>
10
- <h1>Test: Conditional Visibility</h1>
11
- <form id="simple_form" action="">
12
- <div class="field">
13
- <label for="country">Country</label>
14
- <select id="country">
15
- <option></option>
16
- <option>Austria</option>
17
- <option>Other …</option>
18
- </select>
19
- </div>
20
- <div class="field" data-visible-if="$('#country option:last').is(':selected')">
21
- <label for="country_other">Other Country</label>
22
- <input id="country_other">
23
- </div>
24
- <div class="field">
25
- <label for="message_checkbox">I want to leave a message</label>
26
- <input type="checkbox" id="message_checkbox" checked>
27
- </div>
28
- <div class="field" data-visible-if="$('#message_checkbox')[0].checked">
29
- <label for="message">Message</label>
30
- <textarea id="message"></textarea>
31
- </div>
32
-
33
- <div class="field">
34
- <label for="amount">Amount</label>
35
- <input type="string" id="amount">
36
- <span id="amount_info" data-visible-if="$('#amount').val() != ''">You’ve entered something!</span>
37
- </div>
38
- </form>
39
-
40
- <script>
41
- $("form").conditionalVisibility(<%= params[:options] %>);
42
- </script>
43
-
44
-
45
- </body>
46
- </html>
@@ -1,273 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>Test</title>
5
- <%= "<script src='../vendor/jquery-#{@jquery_version}.js'></script>" %>
6
- <script src="/assets/javascripts/da-js.js"></script>
7
- <style type="text/css">
8
- form {
9
- background: #eee;
10
- padding: 1em;
11
- margin: 0 0 2em 0;
12
- }
13
- h2 {
14
- margin: 0;
15
- font-size: 1.25em;
16
- }
17
- .changed { outline: 1px solid #C93; }
18
- </style>
19
- </head>
20
- <body>
21
- <h1>Test: Form Change Tracker</h1>
22
- <form id="simple_form" action="">
23
- <h2>Simple Form</h2>
24
- <p>
25
- A simple form as it may appear in non-Rails applications.
26
- </p>
27
- <label for="simple_form_textfield">textfield:</label>
28
- <input id="simple_form_textfield" name="textfield">
29
-
30
- <label for="simple_form_textarea">textarea:</label>
31
- <textarea id="simple_form_textarea" name="textarea"></textarea>
32
-
33
- <label for="simple_form_checkbox">checkbox:</label>
34
- <input id="simple_form_checkbox" name="checkbox" type="checkbox" value="1">
35
-
36
- <input id='simple_form_radiobutton_1' name='radiobutton' type='radio' value='1'>
37
- <label for='simple_form_radiobutton_1'>radiobutton 1</label>
38
- <input id='simple_form_radiobutton_2' name='radiobutton' type='radio' value='2'>
39
- <label for='simple_form_radiobutton_2'>radiobutton 2</label>
40
- <input id='simple_form_radiobutton_3' name='radiobutton' type='radio' value='3'>
41
- <label for='simple_form_radiobutton_3'>radiobutton 3</label>
42
-
43
- <label for="simple_form_select">select:</label>
44
- <select id="simple_form_select" name="select">
45
- <option></option>
46
- <option value="1">option 1</option>
47
- <option value="2">option 2</option>
48
- </select>
49
-
50
- </form>
51
-
52
- <form id="simple_form_prefilled" action="">
53
- <h2>Simple Form (prefilled)</h2>
54
- <label for="simple_form_prefilled_textfield">textfield:</label>
55
- <input id="simple_form_prefilled_textfield" name="textfield" value="text">
56
-
57
- <label for="simple_form_prefilled_textarea">textarea:</label>
58
- <textarea id="simple_form_prefilled_textarea" name="textarea">text</textarea>
59
- <label for="simple_form_prefilled_checkbox">checkbox:</label>
60
- <input id="simple_form_prefilled_checkbox" name="checkbox" type="checkbox" value="1" checked>
61
-
62
- <input id='simple_form_prefilled_radiobutton_1' name='radiobutton' type='radio' value='1' checked>
63
- <label for='simple_form_prefilled_radiobutton_1'>radiobutton 1</label>
64
- <input id='simple_form_prefilled_radiobutton_2' name='radiobutton' type='radio' value='2'>
65
- <label for='simple_form_prefilled_radiobutton_2'>radiobutton 2</label>
66
- <input id='simple_form_prefilled_radiobutton_3' name='radiobutton' type='radio' value='3'>
67
- <label for='simple_form_prefilled_radiobutton_3'>radiobutton 3</label>
68
-
69
- <label for="simple_form_prefilled_select">select:</label>
70
- <select id="simple_form_prefilled_select" name="select">
71
- <option></option>
72
- <option value="1" selected>option 1</option>
73
- <option value="2">option 2</option>
74
- </select>
75
- </form>
76
-
77
- <form id="scaffold_form" action="">
78
- <h2>Scaffold Form</h2>
79
- <p>
80
- A form generated by Rails' scaffolding. Labels and Inputs are wrapped in &lt;div class="field"&gt;…&lt;/div&gt;. Checkbox has an additional hidden field with the same name and value="0".
81
- </p>
82
- <div class="field">
83
- <label for="scaffold_form_textfield">textfield:</label>
84
- <input id="scaffold_form_textfield" name="scaffold_form[textfield]">
85
- </div>
86
- <div class="field">
87
- <label for="scaffold_form_textarea">textarea:</label>
88
- <textarea id="scaffold_form_textarea" name="scaffold_form[textarea]"></textarea>
89
- </div>
90
- <div class="field">
91
- <label for="scaffold_form_checkbox">checkbox:</label>
92
- <input name="scaffold_form[checkbox]" type="hidden" value="0">
93
- <input id="scaffold_form_checkbox" name="scaffold_form[checkbox]" type="checkbox" value="1">
94
- </div>
95
- <div class="field">
96
- <input id='scaffold_form_radiobutton_1' name='scaffold_form[radiobutton]' type='radio' value='1'>
97
- <label for='scaffold_form_radiobutton_1'>radiobutton 1</label>
98
- <input id='scaffold_form_radiobutton_2' name='scaffold_form[radiobutton]' type='radio' value='2'>
99
- <label for='scaffold_form_radiobutton_2'>radiobutton 2</label>
100
- <input id='scaffold_form_radiobutton_3' name='scaffold_form[radiobutton]' type='radio' value='3'>
101
- <label for='scaffold_form_radiobutton_3'>radiobutton 3</label>
102
- </div>
103
- <div class="field">
104
- <label for="scaffold_form_select">select:</label>
105
- <select id="scaffold_form_select" name="scaffold_form[select]">
106
- <option></option>
107
- <option value="1">option 1</option>
108
- <option value="2">option 2</option>
109
- </select>
110
- </div>
111
- </form>
112
-
113
- <form id="scaffold_form_prefilled" action="">
114
- <h2>Scaffold Form Prefilled</h2>
115
- <div class="field">
116
- <label for="scaffold_form_prefilled_textfield">textfield:</label>
117
- <input id="scaffold_form_prefilled_textfield" name="scaffold_form_prefilled[textfield]" value="text">
118
- </div>
119
- <div class="field">
120
- <label for="scaffold_form_prefilled_textarea">textarea:</label>
121
- <textarea id="scaffold_form_prefilled_textarea" name="scaffold_form_prefilled[textarea]">text</textarea>
122
- </div>
123
- <div class="field">
124
- <label for="scaffold_form_prefilled_checkbox">checkbox:</label>
125
- <input name="scaffold_form_prefilled[checkbox]" type="hidden" value="0">
126
- <input id="scaffold_form_prefilled_checkbox" name="scaffold_form_prefilled[checkbox]" type="checkbox" value="1" checked>
127
- </div>
128
- <div class="field">
129
- <input id='scaffold_form_prefilled_radiobutton_1' name='scaffold_form_prefilled[radiobutton]' type='radio' value='1' checked>
130
- <label for='scaffold_form_prefilled_radiobutton_1'>radiobutton 1</label>
131
- <input id='scaffold_form_prefilled_radiobutton_2' name='scaffold_form_prefilled[radiobutton]' type='radio' value='2'>
132
- <label for='scaffold_form_prefilled_radiobutton_2'>radiobutton 2</label>
133
- <input id='scaffold_form_prefilled_radiobutton_3' name='scaffold_form_prefilled[radiobutton]' type='radio' value='3'>
134
- <label for='scaffold_form_prefilled_radiobutton_3'>radiobutton 3</label>
135
- </div>
136
- <div class="field">
137
- <label for="scaffold_form_prefilled_select">select:</label>
138
- <select id="scaffold_form_prefilled_select" name="scaffold_form_prefilled[select]">
139
- <option></option>
140
- <option value="1" selected>option 1</option>
141
- <option value="2">option 2</option>
142
- </select>
143
- </div>
144
- </form>
145
-
146
- <form accept-charset="UTF-8" action="" id="formtastic" novalidate="novalidate">
147
- <h2>Formtastic Form</h2>
148
- <p>
149
- A form generated by <a href="https://github.com/justinfrench/formtastic">Formtastic</a>.
150
- </p>
151
- <div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /><input name="authenticity_token" type="hidden" value="XKE2QlUw7L5WK3oez+nORpWaoGb76jO/8gPEEZlELm0="></div>
152
- <fieldset class="inputs">
153
- <ol>
154
- <li class="string input optional stringish" id="formtastic_textfield_input">
155
- <label class=" label" for="formtastic_textfield">textfield</label>
156
- <input id="formtastic_textfield" maxlength="255" name="formtastic[textfield]" type="text">
157
- </li>
158
- <li class="text input optional" id="formtastic_textarea_input">
159
- <label class=" label" for="formtastic_textarea">textarea</label>
160
- <textarea id="formtastic_textarea" name="formtastic[textarea]" rows="20"></textarea>
161
- </li>
162
- <li class="check_boxes input optional" id="formtastic_checkbox_input">
163
- <fieldset class="choices">
164
- <legend class="label"><label>checkbox</label></legend>
165
- <input id="formtastic_checkbox_none" name="formtastic[checkbox][]" type="hidden" value="">
166
- <ol class="choices-group">
167
- <li class="choice">
168
- <label for="formtastic_checkbox_1">
169
- <input id="formtastic_checkbox_1" name="formtastic[checkbox][]" type="checkbox" value="1">checkbox
170
- </label>
171
- </li>
172
- </ol>
173
- </fieldset>
174
- </li>
175
- <li class="radio input optional" id="formtastic_radiobutton_input">
176
- <fieldset class="choices"><legend class="label"><label>radiobuttons</label></legend>
177
- <ol class="choices-group">
178
- <li class="choice">
179
- <label for="formtastic_radiobutton_1">
180
- <input id="formtastic_radiobutton_1" name="formtastic[radiobutton]" type="radio" value="1">radiobutton 1
181
- </label>
182
- </li>
183
- <li class="choice">
184
- <label for="formtastic_radiobutton_2">
185
- <input id="formtastic_radiobutton_2" name="formtastic[radiobutton]" type="radio" value="2">radiobutton 2
186
- </label>
187
- </li>
188
- <li class="choice">
189
- <label for="formtastic_radiobutton_3">
190
- <input id="formtastic_radiobutton_3" name="formtastic[radiobutton]" type="radio" value="3">radiobutton 3
191
- </label>
192
- </li>
193
- </ol>
194
- </fieldset>
195
- </li>
196
- <li class="select input optional" id="formtastic_select_input">
197
- <label class=" label" for="formtastic_select">select</label>
198
- <select id="formtastic_select" name="formtastic[select]">
199
- <option value=""></option>
200
- <option value="1">option 1</option>
201
- <option value="2">option 2</option>
202
- </select>
203
- </li>
204
- </ol>
205
- </fieldset>
206
- </form>
207
-
208
- <form accept-charset="UTF-8" action="" id="formtastic_prefilled" novalidate="novalidate">
209
- <h2>Formtastic Form (prefilled)</h2>
210
- <div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /><input name="authenticity_token" type="hidden" value="XKE2QlUw7L5WK3oez+nORpWaoGb76jO/8gPEEZlELm0="></div>
211
- <fieldset class="inputs">
212
- <ol>
213
- <li class="string input optional stringish" id="formtastic_prefilled_textfield_input">
214
- <label class=" label" for="formtastic_prefilled_textfield">textfield</label>
215
- <input id="formtastic_prefilled_textfield" maxlength="255" name="formtastic_prefilled[textfield]" type="text" value="text">
216
- </li>
217
- <li class="text input optional" id="formtastic_prefilled_textarea_input">
218
- <label class=" label" for="formtastic_prefilled_textarea">textarea</label>
219
- <textarea id="formtastic_prefilled_textarea" name="formtastic_prefilled[textarea]" rows="20">text</textarea>
220
- </li>
221
- <li class="check_boxes input optional" id="formtastic_prefilled_checkbox_input">
222
- <fieldset class="choices">
223
- <legend class="label"><label>checkbox</label></legend>
224
- <input id="formtastic_prefilled_checkbox_none" name="formtastic_prefilled[checkbox][]" type="hidden" value="">
225
- <ol class="choices-group">
226
- <li class="choice">
227
- <label for="formtastic_prefilled_checkbox_1">
228
- <input id="formtastic_prefilled_checkbox_1" name="formtastic_prefilled[checkbox][]" type="checkbox" value="1" checked>checkbox
229
- </label>
230
- </li>
231
- </ol>
232
- </fieldset>
233
- </li>
234
- <li class="radio input optional" id="formtastic_prefilled_radiobutton_input">
235
- <fieldset class="choices"><legend class="label"><label>radiobuttons</label></legend>
236
- <ol class="choices-group">
237
- <li class="choice">
238
- <label for="formtastic_prefilled_radiobutton_1">
239
- <input id="formtastic_prefilled_radiobutton_1" name="formtastic_prefilled[radiobutton]" type="radio" value="1" checked>radiobutton 1
240
- </label>
241
- </li>
242
- <li class="choice">
243
- <label for="formtastic_prefilled_radiobutton_2">
244
- <input id="formtastic_prefilled_radiobutton_2" name="formtastic_prefilled[radiobutton]" type="radio" value="2">radiobutton 2
245
- </label>
246
- </li>
247
- <li class="choice">
248
- <label for="formtastic_prefilled_radiobutton_3">
249
- <input id="formtastic_prefilled_radiobutton_3" name="formtastic_prefilled[radiobutton]" type="radio" value="3">radiobutton 3
250
- </label>
251
- </li>
252
- </ol>
253
- </fieldset>
254
- </li>
255
- <li class="select input optional" id="formtastic_prefilled_select_input">
256
- <label class=" label" for="formtastic_prefilled_select">select</label>
257
- <select id="formtastic_prefilled_select" name="formtastic_prefilled[select]">
258
- <option value=""></option>
259
- <option value="1" selected>option 1</option>
260
- <option value="2">option 2</option>
261
- </select>
262
- </li>
263
- </ol>
264
- </fieldset>
265
- </form>
266
-
267
- <script>
268
- $("form").formChangeTracker();
269
- </script>
270
-
271
-
272
- </body>
273
- </html>
@@ -1,17 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>Test</title>
5
- <%= "<script src='../vendor/jquery-#{@jquery_version}.js'></script>" %>
6
- <script src="/assets/javascripts/da-js.js"></script>
7
- <script>$.fx.off = true;</script>
8
- </head>
9
- <body>
10
- <h1>Test: Numeric Value</h1>
11
- <form>
12
- <input id="textfield">
13
- </form>
14
- <span id="non_input_element_english"> 1,234.56 </span>
15
- <span id="non_input_element_german"> 5.678,9 </span>
16
- </body>
17
- </html>