typus 3.1.0.rc14 → 3.1.0.rc15
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitmodules +3 -0
- data/README.md +10 -14
- data/Rakefile +7 -5
- data/app/assets/javascripts/typus.js +1 -0
- data/app/assets/javascripts/typus/jquery.application.js +0 -2
- data/app/assets/stylesheets/typus.css +13 -1
- data/app/assets/stylesheets/typus/account.css +53 -0
- data/app/assets/stylesheets/typus/actions.css +11 -0
- data/app/assets/stylesheets/typus/content.css +92 -0
- data/app/assets/stylesheets/typus/defaults.css +31 -0
- data/app/assets/stylesheets/typus/errors.css +33 -0
- data/app/assets/stylesheets/typus/footer.css +8 -0
- data/app/assets/stylesheets/typus/forms.css +52 -0
- data/app/assets/stylesheets/typus/hacks.css +20 -0
- data/app/assets/stylesheets/typus/header.css +55 -0
- data/app/assets/stylesheets/typus/layout.css +4 -0
- data/app/assets/stylesheets/typus/pagination.css +34 -8
- data/app/assets/stylesheets/typus/sidebar.css +23 -0
- data/app/assets/stylesheets/typus/tables.css +47 -0
- data/app/helpers/admin/base_helper.rb +1 -1
- data/app/helpers/admin/resources/data_types/belongs_to_helper.rb +1 -0
- data/app/helpers/admin/resources/data_types/tree_helper.rb +1 -0
- data/app/helpers/admin/resources/display_helper.rb +1 -1
- data/app/helpers/admin/resources/form_helper.rb +1 -0
- data/app/helpers/admin/resources_helper.rb +3 -5
- data/app/views/admin/account/forgot_password.html.erb +7 -1
- data/app/views/admin/base/user_guide.html.erb +61 -57
- data/app/views/admin/dashboard/show.html.erb +6 -16
- data/app/views/admin/dashboard/widgets/_applications.html.erb +31 -0
- data/app/views/admin/dashboard/widgets/_models.html.erb +23 -0
- data/app/views/admin/dashboard/widgets/_models_extended.html.erb +25 -0
- data/app/views/admin/dashboard/widgets/_resources.html.erb +23 -0
- data/app/views/admin/resources/_actions.html.erb +23 -0
- data/app/views/admin/resources/edit.html.erb +26 -20
- data/app/views/admin/resources/edit/_actions.html.erb +7 -0
- data/app/views/admin/resources/edit/_rencently_edited.html.erb +8 -0
- data/app/views/admin/resources/index.html.erb +42 -32
- data/app/views/admin/resources/new.html.erb +16 -8
- data/app/views/admin/resources/show.html.erb +22 -14
- data/app/views/admin/session/new.html.erb +9 -1
- data/app/views/admin/templates/_belongs_to.html.erb +1 -1
- data/app/views/admin/templates/_belongs_to_with_autocomplete.html.erb +1 -1
- data/app/views/admin/templates/_boolean.html.erb +1 -1
- data/app/views/admin/templates/_date.html.erb +1 -1
- data/app/views/admin/templates/_datetime.html.erb +1 -1
- data/app/views/admin/templates/_dragonfly.html.erb +1 -1
- data/app/views/admin/templates/_paperclip.html.erb +1 -1
- data/app/views/admin/templates/_password.html.erb +1 -1
- data/app/views/admin/templates/_selector.html.erb +1 -1
- data/app/views/admin/templates/_string.html.erb +1 -1
- data/app/views/admin/templates/_string_with_preview.html.erb +1 -1
- data/app/views/admin/templates/_text.html.erb +1 -1
- data/app/views/admin/templates/_text_with_ckeditor.html.erb +16 -2
- data/app/views/admin/templates/_text_with_ckeditor_and_assets.html.erb +16 -2
- data/app/views/admin/templates/_time.html.erb +1 -1
- data/app/views/admin/templates/_tree.html.erb +1 -1
- data/app/views/helpers/admin/resources/_sidebar.html.erb +36 -12
- data/app/views/helpers/admin/resources/_table.html.erb +5 -3
- data/app/views/layouts/admin/base.html.erb +16 -29
- data/app/views/layouts/admin/headless.html.erb +1 -1
- data/app/views/layouts/admin/session.html.erb +6 -0
- data/lib/support/fake_user.rb +2 -8
- data/lib/typus.rb +6 -2
- data/lib/typus/authentication/devise.rb +19 -0
- data/lib/typus/controller/headless.rb +1 -1
- data/lib/typus/orm/active_record/admin_user_v1.rb +15 -1
- data/lib/typus/orm/active_record/admin_user_v2.rb +16 -2
- data/lib/typus/orm/active_record/user/class_methods.rb +2 -3
- data/lib/typus/orm/active_record/user/instance_methods.rb +5 -2
- data/lib/typus/orm/active_record/user/instance_methods_more.rb +19 -0
- data/lib/typus/version.rb +1 -1
- data/vendor/assets/adapt/css/1200.css +357 -0
- data/vendor/assets/adapt/css/1200.min.css +1 -0
- data/vendor/assets/adapt/css/1560.css +357 -0
- data/vendor/assets/adapt/css/1560.min.css +1 -0
- data/vendor/assets/adapt/css/720.css +357 -0
- data/vendor/assets/adapt/css/720.min.css +1 -0
- data/vendor/assets/adapt/css/960.css +357 -0
- data/vendor/assets/adapt/css/960.min.css +1 -0
- data/vendor/assets/adapt/css/fluid.css +345 -0
- data/vendor/assets/adapt/css/fluid.min.css +1 -0
- data/vendor/assets/adapt/css/master.css +120 -0
- data/vendor/assets/adapt/css/mobile.css +20 -0
- data/vendor/assets/adapt/css/mobile.min.css +1 -0
- data/vendor/assets/adapt/css/reset.css +202 -0
- data/vendor/assets/adapt/css/text.css +81 -0
- data/vendor/assets/adapt/images/h1.png +0 -0
- data/vendor/assets/adapt/js/adapt.js +135 -0
- data/vendor/assets/adapt/js/adapt.min.js +1 -0
- data/vendor/assets/formalize/.gitignore +1 -0
- data/vendor/assets/formalize/css/_formalize.sass +332 -0
- data/vendor/assets/formalize/css/demo.css +47 -0
- data/vendor/assets/formalize/css/formalize.css +395 -0
- data/vendor/assets/formalize/css/reset.css +202 -0
- data/vendor/assets/formalize/css/text.css +81 -0
- data/vendor/assets/formalize/images/button.png +0 -0
- data/vendor/assets/formalize/images/select_arrow.gif +0 -0
- data/vendor/assets/formalize/js/dojo.formalize.js +166 -0
- data/vendor/assets/formalize/js/dojo.formalize.min.js +1 -0
- data/vendor/assets/formalize/js/extjs.formalize.js +163 -0
- data/vendor/assets/formalize/js/extjs.formalize.min.js +1 -0
- data/vendor/assets/formalize/js/jquery.formalize.js +150 -0
- data/vendor/assets/formalize/js/jquery.formalize.min.js +1 -0
- data/vendor/assets/formalize/js/mootools.formalize.js +155 -0
- data/vendor/assets/formalize/js/mootools.formalize.min.js +1 -0
- data/vendor/assets/formalize/js/prototype.formalize.js +163 -0
- data/vendor/assets/formalize/js/prototype.formalize.min.js +1 -0
- data/vendor/assets/formalize/js/yui.formalize.js +152 -0
- data/vendor/assets/formalize/js/yui.formalize.min.js +1 -0
- metadata +79 -47
- data/app/assets/stylesheets/typus/screen.css +0 -340
- data/app/helpers/admin/dashboard_helper.rb +0 -8
- data/app/views/admin/dashboard/_applications.html.erb +0 -21
- data/config/locales/typus.ca.models.yml +0 -17
- data/config/locales/typus.ca.yml +0 -80
- data/config/locales/typus.de.models.yml +0 -17
- data/config/locales/typus.de.yml +0 -79
- data/config/locales/typus.el.models.yml +0 -17
- data/config/locales/typus.el.yml +0 -81
- data/config/locales/typus.es.models.yml +0 -18
- data/config/locales/typus.es.yml +0 -81
- data/config/locales/typus.fr.models.yml +0 -18
- data/config/locales/typus.fr.yml +0 -85
- data/config/locales/typus.hu.models.yml +0 -17
- data/config/locales/typus.hu.yml +0 -79
- data/config/locales/typus.it.models.yml +0 -18
- data/config/locales/typus.it.yml +0 -88
- data/config/locales/typus.locale.models.yml.template +0 -17
- data/config/locales/typus.locale.yml.template +0 -80
- data/config/locales/typus.pt-BR.models.yml +0 -17
- data/config/locales/typus.pt-BR.yml +0 -79
- data/config/locales/typus.pt-PT.models.yml +0 -17
- data/config/locales/typus.pt-PT.yml +0 -83
- data/config/locales/typus.ru.models.yml +0 -17
- data/config/locales/typus.ru.yml +0 -79
- data/config/locales/typus.zh-CN.models.yml +0 -17
- data/config/locales/typus.zh-CN.yml +0 -78
@@ -0,0 +1,202 @@
|
|
1
|
+
/* `XHTML, HTML4, HTML5 Reset
|
2
|
+
----------------------------------------------------------------------------------------------------*/
|
3
|
+
|
4
|
+
a,
|
5
|
+
abbr,
|
6
|
+
acronym,
|
7
|
+
address,
|
8
|
+
applet,
|
9
|
+
article,
|
10
|
+
aside,
|
11
|
+
audio,
|
12
|
+
b,
|
13
|
+
big,
|
14
|
+
blockquote,
|
15
|
+
body,
|
16
|
+
canvas,
|
17
|
+
caption,
|
18
|
+
center,
|
19
|
+
cite,
|
20
|
+
code,
|
21
|
+
dd,
|
22
|
+
del,
|
23
|
+
details,
|
24
|
+
dfn,
|
25
|
+
dialog,
|
26
|
+
div,
|
27
|
+
dl,
|
28
|
+
dt,
|
29
|
+
em,
|
30
|
+
embed,
|
31
|
+
fieldset,
|
32
|
+
figcaption,
|
33
|
+
figure,
|
34
|
+
font,
|
35
|
+
footer,
|
36
|
+
form,
|
37
|
+
h1,
|
38
|
+
h2,
|
39
|
+
h3,
|
40
|
+
h4,
|
41
|
+
h5,
|
42
|
+
h6,
|
43
|
+
header,
|
44
|
+
hgroup,
|
45
|
+
hr,
|
46
|
+
html,
|
47
|
+
i,
|
48
|
+
iframe,
|
49
|
+
img,
|
50
|
+
ins,
|
51
|
+
kbd,
|
52
|
+
label,
|
53
|
+
legend,
|
54
|
+
li,
|
55
|
+
mark,
|
56
|
+
menu,
|
57
|
+
meter,
|
58
|
+
nav,
|
59
|
+
object,
|
60
|
+
ol,
|
61
|
+
output,
|
62
|
+
p,
|
63
|
+
pre,
|
64
|
+
progress,
|
65
|
+
q,
|
66
|
+
rp,
|
67
|
+
rt,
|
68
|
+
ruby,
|
69
|
+
s,
|
70
|
+
samp,
|
71
|
+
section,
|
72
|
+
small,
|
73
|
+
span,
|
74
|
+
strike,
|
75
|
+
strong,
|
76
|
+
sub,
|
77
|
+
summary,
|
78
|
+
sup,
|
79
|
+
table,
|
80
|
+
tbody,
|
81
|
+
td,
|
82
|
+
tfoot,
|
83
|
+
th,
|
84
|
+
thead,
|
85
|
+
time,
|
86
|
+
tr,
|
87
|
+
tt,
|
88
|
+
u,
|
89
|
+
ul,
|
90
|
+
var,
|
91
|
+
video,
|
92
|
+
xmp {
|
93
|
+
border: 0;
|
94
|
+
margin: 0;
|
95
|
+
padding: 0;
|
96
|
+
font-size: 100%;
|
97
|
+
}
|
98
|
+
|
99
|
+
html,
|
100
|
+
body {
|
101
|
+
height: 100%;
|
102
|
+
}
|
103
|
+
|
104
|
+
article,
|
105
|
+
aside,
|
106
|
+
details,
|
107
|
+
figcaption,
|
108
|
+
figure,
|
109
|
+
footer,
|
110
|
+
header,
|
111
|
+
hgroup,
|
112
|
+
menu,
|
113
|
+
nav,
|
114
|
+
section {
|
115
|
+
/*
|
116
|
+
Override the default (display: inline) for
|
117
|
+
browsers that do not recognize HTML5 tags.
|
118
|
+
|
119
|
+
IE8 (and lower) requires a shiv:
|
120
|
+
http://ejohn.org/blog/html5-shiv
|
121
|
+
*/
|
122
|
+
display: block;
|
123
|
+
}
|
124
|
+
|
125
|
+
b,
|
126
|
+
strong {
|
127
|
+
/*
|
128
|
+
Makes browsers agree.
|
129
|
+
IE + Opera = font-weight: bold.
|
130
|
+
Gecko + WebKit = font-weight: bolder.
|
131
|
+
*/
|
132
|
+
font-weight: bold;
|
133
|
+
}
|
134
|
+
|
135
|
+
img {
|
136
|
+
color: transparent;
|
137
|
+
font-size: 0;
|
138
|
+
vertical-align: middle;
|
139
|
+
/*
|
140
|
+
For IE.
|
141
|
+
http://css-tricks.com/ie-fix-bicubic-scaling-for-images
|
142
|
+
*/
|
143
|
+
-ms-interpolation-mode: bicubic;
|
144
|
+
}
|
145
|
+
|
146
|
+
li {
|
147
|
+
/*
|
148
|
+
For IE6 + IE7.
|
149
|
+
*/
|
150
|
+
display: list-item;
|
151
|
+
}
|
152
|
+
|
153
|
+
table {
|
154
|
+
border-collapse: collapse;
|
155
|
+
border-spacing: 0;
|
156
|
+
}
|
157
|
+
|
158
|
+
th,
|
159
|
+
td,
|
160
|
+
caption {
|
161
|
+
font-weight: normal;
|
162
|
+
vertical-align: top;
|
163
|
+
text-align: left;
|
164
|
+
}
|
165
|
+
|
166
|
+
q {
|
167
|
+
quotes: none;
|
168
|
+
}
|
169
|
+
|
170
|
+
q:before,
|
171
|
+
q:after {
|
172
|
+
content: '';
|
173
|
+
content: none;
|
174
|
+
}
|
175
|
+
|
176
|
+
sub,
|
177
|
+
sup,
|
178
|
+
small {
|
179
|
+
font-size: 75%;
|
180
|
+
}
|
181
|
+
|
182
|
+
sub,
|
183
|
+
sup {
|
184
|
+
line-height: 0;
|
185
|
+
position: relative;
|
186
|
+
vertical-align: baseline;
|
187
|
+
}
|
188
|
+
|
189
|
+
sub {
|
190
|
+
bottom: -0.25em;
|
191
|
+
}
|
192
|
+
|
193
|
+
sup {
|
194
|
+
top: -0.5em;
|
195
|
+
}
|
196
|
+
|
197
|
+
svg {
|
198
|
+
/*
|
199
|
+
For IE9.
|
200
|
+
*/
|
201
|
+
overflow: hidden;
|
202
|
+
}
|
@@ -0,0 +1,81 @@
|
|
1
|
+
/*
|
2
|
+
960 Grid System ~ Text CSS.
|
3
|
+
Learn more ~ http://960.gs/
|
4
|
+
|
5
|
+
Licensed under GPL and MIT.
|
6
|
+
*/
|
7
|
+
|
8
|
+
/* `Basic HTML
|
9
|
+
----------------------------------------------------------------------------------------------------*/
|
10
|
+
|
11
|
+
body {
|
12
|
+
font: 13px/1.5 'Helvetica Neue', Arial, 'Liberation Sans', FreeSans, sans-serif;
|
13
|
+
}
|
14
|
+
|
15
|
+
hr {
|
16
|
+
border: 0 #ccc solid;
|
17
|
+
border-top-width: 1px;
|
18
|
+
clear: both;
|
19
|
+
height: 0;
|
20
|
+
}
|
21
|
+
|
22
|
+
/* `Headings
|
23
|
+
----------------------------------------------------------------------------------------------------*/
|
24
|
+
|
25
|
+
h1 {
|
26
|
+
font-size: 25px;
|
27
|
+
}
|
28
|
+
|
29
|
+
h2 {
|
30
|
+
font-size: 23px;
|
31
|
+
}
|
32
|
+
|
33
|
+
h3 {
|
34
|
+
font-size: 21px;
|
35
|
+
}
|
36
|
+
|
37
|
+
h4 {
|
38
|
+
font-size: 19px;
|
39
|
+
}
|
40
|
+
|
41
|
+
h5 {
|
42
|
+
font-size: 17px;
|
43
|
+
}
|
44
|
+
|
45
|
+
h6 {
|
46
|
+
font-size: 15px;
|
47
|
+
}
|
48
|
+
|
49
|
+
/* `Spacing
|
50
|
+
----------------------------------------------------------------------------------------------------*/
|
51
|
+
|
52
|
+
ol {
|
53
|
+
list-style: decimal;
|
54
|
+
}
|
55
|
+
|
56
|
+
ul {
|
57
|
+
list-style: disc;
|
58
|
+
}
|
59
|
+
|
60
|
+
li {
|
61
|
+
margin-left: 30px;
|
62
|
+
}
|
63
|
+
|
64
|
+
p,
|
65
|
+
dl,
|
66
|
+
hr,
|
67
|
+
h1,
|
68
|
+
h2,
|
69
|
+
h3,
|
70
|
+
h4,
|
71
|
+
h5,
|
72
|
+
h6,
|
73
|
+
ol,
|
74
|
+
ul,
|
75
|
+
pre,
|
76
|
+
table,
|
77
|
+
address,
|
78
|
+
fieldset,
|
79
|
+
figure {
|
80
|
+
margin-bottom: 20px;
|
81
|
+
}
|
Binary file
|
Binary file
|
@@ -0,0 +1,166 @@
|
|
1
|
+
/*
|
2
|
+
Formalize - version 1.1
|
3
|
+
|
4
|
+
Note: This file depends on the Dojo library.
|
5
|
+
*/
|
6
|
+
|
7
|
+
// Module pattern:
|
8
|
+
// http://yuiblog.com/blog/2007/06/12/module-pattern
|
9
|
+
var FORMALIZE = (function(window, document, undefined) {
|
10
|
+
// Private constants.
|
11
|
+
var PLACEHOLDER_SUPPORTED = 'placeholder' in document.createElement('input');
|
12
|
+
var AUTOFOCUS_SUPPORTED = 'autofocus' in document.createElement('input');
|
13
|
+
var IE6 = parseInt(dojo.isIE, 10) === 6;
|
14
|
+
var IE7 = parseInt(dojo.isIE, 10) === 7;
|
15
|
+
|
16
|
+
// Expose innards of FORMALIZE.
|
17
|
+
return {
|
18
|
+
// FORMALIZE.go
|
19
|
+
go: function() {
|
20
|
+
for (var i in FORMALIZE.init) {
|
21
|
+
FORMALIZE.init[i]();
|
22
|
+
}
|
23
|
+
},
|
24
|
+
// FORMALIZE.init
|
25
|
+
init: {
|
26
|
+
// FORMALIZE.init.full_input_size
|
27
|
+
full_input_size: function() {
|
28
|
+
if (!IE7 || !dojo.query('textarea, input.input_full').length) {
|
29
|
+
return;
|
30
|
+
}
|
31
|
+
|
32
|
+
// This fixes width: 100% on <textarea> and class="input_full".
|
33
|
+
// It ensures that form elements don't go wider than container.
|
34
|
+
dojo.query('textarea, input.input_full').forEach(function(el) {
|
35
|
+
var new_el = el.cloneNode(false);
|
36
|
+
var span = document.createElement('span');
|
37
|
+
|
38
|
+
span.className = 'input_full_wrap';
|
39
|
+
span.appendChild(new_el);
|
40
|
+
el.parentNode.replaceChild(span, el);
|
41
|
+
});
|
42
|
+
},
|
43
|
+
// FORMALIZE.init.ie6_skin_inputs
|
44
|
+
ie6_skin_inputs: function() {
|
45
|
+
// Test for Internet Explorer 6.
|
46
|
+
if (!IE6 || !dojo.query('input, select, textarea').length) {
|
47
|
+
// Exit if the browser is not IE6,
|
48
|
+
// or if no form elements exist.
|
49
|
+
return;
|
50
|
+
}
|
51
|
+
|
52
|
+
// For <input type="submit" />, etc.
|
53
|
+
var button_regex = /button|submit|reset/;
|
54
|
+
|
55
|
+
// For <input type="text" />, etc.
|
56
|
+
var type_regex = /date|datetime|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/;
|
57
|
+
|
58
|
+
dojo.query('input').forEach(function(el) {
|
59
|
+
// Is it a button?
|
60
|
+
if (el.getAttribute('type').match(button_regex)) {
|
61
|
+
dojo.addClass(el, 'ie6_button');
|
62
|
+
|
63
|
+
/* Is it disabled? */
|
64
|
+
if (el.disabled) {
|
65
|
+
dojo.addClass(el, 'ie6_button_disabled');
|
66
|
+
}
|
67
|
+
}
|
68
|
+
// Or is it a textual input?
|
69
|
+
else if (el.getAttribute('type').match(type_regex)) {
|
70
|
+
dojo.addClass(el, 'ie6_input');
|
71
|
+
|
72
|
+
/* Is it disabled? */
|
73
|
+
if (el.disabled) {
|
74
|
+
dojo.addClass(el, 'ie6_input_disabled');
|
75
|
+
}
|
76
|
+
}
|
77
|
+
});
|
78
|
+
|
79
|
+
dojo.query('textarea, select').forEach(function(el) {
|
80
|
+
/* Is it disabled? */
|
81
|
+
if (el.disabled) {
|
82
|
+
dojo.addClass(el, 'ie6_input_disabled');
|
83
|
+
}
|
84
|
+
});
|
85
|
+
},
|
86
|
+
// FORMALIZE.init.autofocus
|
87
|
+
autofocus: function() {
|
88
|
+
if (AUTOFOCUS_SUPPORTED || !dojo.query('[autofocus]').length) {
|
89
|
+
return;
|
90
|
+
}
|
91
|
+
|
92
|
+
dojo.query('[autofocus]')[0].focus();
|
93
|
+
},
|
94
|
+
// FORMALIZE.init.placeholder
|
95
|
+
placeholder: function() {
|
96
|
+
if (PLACEHOLDER_SUPPORTED || !dojo.query('[placeholder]').length) {
|
97
|
+
// Exit if placeholder is supported natively,
|
98
|
+
// or if page does not have any placeholder.
|
99
|
+
return;
|
100
|
+
}
|
101
|
+
|
102
|
+
FORMALIZE.misc.add_placeholder();
|
103
|
+
|
104
|
+
dojo.query('[placeholder]').forEach(function(el) {
|
105
|
+
dojo.connect(el, 'onfocus', function() {
|
106
|
+
var text = el.getAttribute('placeholder');
|
107
|
+
|
108
|
+
if (el.value === text) {
|
109
|
+
el.value = '';
|
110
|
+
dojo.removeClass(el, 'placeholder_text');
|
111
|
+
}
|
112
|
+
});
|
113
|
+
|
114
|
+
dojo.connect(el, 'onblur', function() {
|
115
|
+
FORMALIZE.misc.add_placeholder();
|
116
|
+
});
|
117
|
+
});
|
118
|
+
|
119
|
+
// Prevent <form> from accidentally
|
120
|
+
// submitting the placeholder text.
|
121
|
+
dojo.query('form').forEach(function(form) {
|
122
|
+
dojo.connect(form, 'onsubmit', function() {
|
123
|
+
dojo.query('[placeholder]', form).forEach(function(el) {
|
124
|
+
var text = el.getAttribute('placeholder');
|
125
|
+
|
126
|
+
if (el.value === text) {
|
127
|
+
el.value = '';
|
128
|
+
dojo.removeClass(el, 'placeholder_text');
|
129
|
+
}
|
130
|
+
});
|
131
|
+
});
|
132
|
+
|
133
|
+
dojo.connect(form, 'onreset', function() {
|
134
|
+
setTimeout(FORMALIZE.misc.add_placeholder, 50);
|
135
|
+
});
|
136
|
+
});
|
137
|
+
}
|
138
|
+
},
|
139
|
+
// FORMALIZE.misc
|
140
|
+
misc: {
|
141
|
+
// FORMALIZE.misc.add_placeholder
|
142
|
+
add_placeholder: function() {
|
143
|
+
if (PLACEHOLDER_SUPPORTED || !dojo.query('[placeholder]').length) {
|
144
|
+
// Exit if placeholder is supported natively,
|
145
|
+
// or if page does not have any placeholder.
|
146
|
+
return;
|
147
|
+
}
|
148
|
+
|
149
|
+
dojo.query('[placeholder]').forEach(function(el) {
|
150
|
+
var text = el.getAttribute('placeholder');
|
151
|
+
|
152
|
+
if (!el.value || el.value === text) {
|
153
|
+
el.value = text;
|
154
|
+
dojo.addClass(el, 'placeholder_text');
|
155
|
+
}
|
156
|
+
});
|
157
|
+
}
|
158
|
+
}
|
159
|
+
};
|
160
|
+
// Alias window, document.
|
161
|
+
})(this, this.document);
|
162
|
+
|
163
|
+
// Automatically calls all functions in FORMALIZE.init
|
164
|
+
dojo.addOnLoad(function() {
|
165
|
+
FORMALIZE.go();
|
166
|
+
});
|