survivalkit 1.0.beta.8 → 1.0.beta.9
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.markdown +3 -0
- data/README.markdown +2 -2
- data/lib/survivalkit.rb +3 -2
- data/stylesheets/survivalkit/fonts/_font-awesome.scss +355 -0
- data/stylesheets/survivalkit/fonts/_league-gothic.scss +46 -0
- data/stylesheets/survivalkit/fonts/_ostrich-sans.scss +69 -0
- data/stylesheets/survivalkit/mixins/_ui.scss +22 -12
- data/stylesheets/survivalkit/survival-kit/_survival-kit.sass +157 -0
- data/templates/clean/manifest.rb +94 -0
- data/templates/drupal/script.js +2 -17
- data/templates/project/libs/jquery-1.8.2.min.js +2 -0
- data/templates/project/libs/modernizr-2.6.2.min.js +815 -0
- data/templates/project/manifest.rb +46 -27
- data/templates/project/script.js +2 -17
- data/templates/project/sources/FitText/README.md +52 -0
- data/templates/project/sources/FitText/example.html +60 -0
- data/templates/project/sources/FitText/jquery.fittext.js +43 -0
- data/templates/shared/fonts/font-awesome/fontawesome-webfont.eot +0 -0
- data/templates/shared/fonts/font-awesome/fontawesome-webfont.svg +255 -0
- data/templates/shared/fonts/font-awesome/fontawesome-webfont.ttf +0 -0
- data/templates/shared/fonts/font-awesome/fontawesome-webfont.woff +0 -0
- data/templates/shared/fonts/league-gothic/leaguegothic-condensed-italic-webfont.eot +0 -0
- data/templates/shared/fonts/league-gothic/leaguegothic-condensed-italic-webfont.svg +224 -0
- data/templates/shared/fonts/league-gothic/leaguegothic-condensed-italic-webfont.ttf +0 -0
- data/templates/shared/fonts/league-gothic/leaguegothic-condensed-italic-webfont.woff +0 -0
- data/templates/shared/fonts/league-gothic/leaguegothic-condensed-regular-webfont.eot +0 -0
- data/templates/shared/fonts/league-gothic/leaguegothic-condensed-regular-webfont.svg +224 -0
- data/templates/shared/fonts/league-gothic/leaguegothic-condensed-regular-webfont.ttf +0 -0
- data/templates/shared/fonts/league-gothic/leaguegothic-condensed-regular-webfont.woff +0 -0
- data/templates/shared/fonts/league-gothic/leaguegothic-italic-webfont.eot +0 -0
- data/templates/shared/fonts/league-gothic/leaguegothic-italic-webfont.svg +224 -0
- data/templates/shared/fonts/league-gothic/leaguegothic-italic-webfont.ttf +0 -0
- data/templates/shared/fonts/league-gothic/leaguegothic-italic-webfont.woff +0 -0
- data/templates/shared/fonts/league-gothic/leaguegothic-regular-webfont.eot +0 -0
- data/templates/shared/fonts/league-gothic/leaguegothic-regular-webfont.svg +223 -0
- data/templates/shared/fonts/league-gothic/leaguegothic-regular-webfont.ttf +0 -0
- data/templates/shared/fonts/league-gothic/leaguegothic-regular-webfont.woff +0 -0
- data/templates/shared/fonts/ostrich/ostrich-black-webfont.eot +0 -0
- data/templates/shared/fonts/ostrich/ostrich-black-webfont.svg +141 -0
- data/templates/shared/fonts/ostrich/ostrich-black-webfont.ttf +0 -0
- data/templates/shared/fonts/ostrich/ostrich-black-webfont.woff +0 -0
- data/templates/shared/fonts/ostrich/ostrich-bold-webfont.eot +0 -0
- data/templates/shared/fonts/ostrich/ostrich-bold-webfont.svg +141 -0
- data/templates/shared/fonts/ostrich/ostrich-bold-webfont.ttf +0 -0
- data/templates/shared/fonts/ostrich/ostrich-bold-webfont.woff +0 -0
- data/templates/shared/fonts/ostrich/ostrich-dashed-webfont.eot +0 -0
- data/templates/shared/fonts/ostrich/ostrich-dashed-webfont.svg +141 -0
- data/templates/shared/fonts/ostrich/ostrich-dashed-webfont.ttf +0 -0
- data/templates/shared/fonts/ostrich/ostrich-dashed-webfont.woff +0 -0
- data/templates/shared/fonts/ostrich/ostrich-light-webfont.eot +0 -0
- data/templates/shared/fonts/ostrich/ostrich-light-webfont.svg +140 -0
- data/templates/shared/fonts/ostrich/ostrich-light-webfont.ttf +0 -0
- data/templates/shared/fonts/ostrich/ostrich-light-webfont.woff +0 -0
- data/templates/shared/fonts/ostrich/ostrich-regular-webfont.eot +0 -0
- data/templates/shared/fonts/ostrich/ostrich-regular-webfont.svg +141 -0
- data/templates/shared/fonts/ostrich/ostrich-regular-webfont.ttf +0 -0
- data/templates/shared/fonts/ostrich/ostrich-regular-webfont.woff +0 -0
- data/templates/shared/fonts/ostrich/ostrich-rounded-webfont.eot +0 -0
- data/templates/shared/fonts/ostrich/ostrich-rounded-webfont.svg +141 -0
- data/templates/shared/fonts/ostrich/ostrich-rounded-webfont.ttf +0 -0
- data/templates/shared/fonts/ostrich/ostrich-rounded-webfont.woff +0 -0
- data/templates/shared/partials/01-variables/_colors.scss +1 -1
- data/templates/shared/partials/01-variables/_fonts.scss +10 -0
- data/templates/shared/partials/06-ui-patterns/_drupal-patterns.scss +4 -5
- data/templates/shared/partials/07-styletile/_tile-design.scss +2 -2
- data/templates/shared/style.scss +2 -1
- metadata +73 -187
- data/stylesheets/survivalkit/survival_kit/_survival-kit.scss +0 -145
- data/templates/drupal/libs/320-up/helper.js +0 -146
- data/templates/drupal/libs/320-up/imgSizer.js +0 -61
- data/templates/drupal/libs/dd_belatedpng.js +0 -13
- data/templates/drupal/libs/formalize/README.txt +0 -11
- data/templates/drupal/libs/formalize/dojo.formalize.js +0 -174
- data/templates/drupal/libs/formalize/extjs.formalize.js +0 -168
- data/templates/drupal/libs/formalize/jquery.formalize.js +0 -158
- data/templates/drupal/libs/formalize/mootools.formalize.js +0 -163
- data/templates/drupal/libs/formalize/prototype.formalize.js +0 -171
- data/templates/drupal/libs/formalize/yui.formalize.js +0 -168
- data/templates/drupal/libs/jquery-1.6.js +0 -8865
- data/templates/drupal/libs/jquery-1.6.min.js +0 -16
- data/templates/drupal/libs/modernizr-2.0.min.js +0 -4
- data/templates/drupal/libs/mootools-core-1.3.1-full-compat-yc.js +0 -485
- data/templates/drupal/libs/plugins.js +0 -58
- data/templates/drupal/libs/respond.min.js +0 -7
- data/templates/drupal/libs/selectivizr-min.js +0 -5
- data/templates/drupal/libs/selectivizr.js +0 -5
- data/templates/project/files/apple-touch-icon-114x114-precomposed.png +0 -0
- data/templates/project/files/apple-touch-icon-72x72-precomposed.png +0 -0
- data/templates/project/files/apple-touch-icon.png +0 -0
- data/templates/project/files/crossdomain.xml +0 -25
- data/templates/project/files/favicon.ico +0 -0
- data/templates/project/files/favicon.png +0 -0
- data/templates/project/files/google.yml +0 -22
- data/templates/project/files/htaccess.htaccess +0 -478
- data/templates/project/files/html/404.html +0 -22
- data/templates/project/files/html/formalize_jquery_demo.html +0 -288
- data/templates/project/files/html/formalize_jquery_disabled.html +0 -288
- data/templates/project/files/html/formalize_jquery_errors.html +0 -288
- data/templates/project/files/html/index.html +0 -100
- data/templates/project/files/html/survivalkit/elements-common.html +0 -588
- data/templates/project/files/html/survivalkit/elements-html5.html +0 -2988
- data/templates/project/files/html/survivalkit/elements-typography.html +0 -240
- data/templates/project/files/html/survivalkit/elements-ui-patterns-drupal-css.html +0 -1883
- data/templates/project/files/html/survivalkit/elements-ui-patterns-drupal.html +0 -1882
- data/templates/project/files/html/survivalkit/elements-ui-patterns.html +0 -267
- data/templates/project/files/html/survivalkit/index.html +0 -132
- data/templates/project/files/html/survivalkit/styletile/index.html +0 -1
- data/templates/project/files/html/survivalkit/styletile/styletile.html +0 -215
- data/templates/project/files/humans.txt +0 -43
- data/templates/project/files/robots.txt +0 -5
- data/templates/project/libs/320-up/helper.js +0 -146
- data/templates/project/libs/320-up/imgSizer.js +0 -61
- data/templates/project/libs/jquery-1.6.js +0 -8865
- data/templates/project/libs/jquery-1.6.min.js +0 -16
- data/templates/project/libs/modernizr-2.0.min.js +0 -4
- data/templates/project/libs/plugins.js +0 -58
- data/templates/project/libs/selectivizr.js +0 -5
- data/templates/project/templates/_flashes.html.haml +0 -4
- data/templates/project/templates/_footer.html.haml +0 -2
- data/templates/project/templates/_head.html.haml +0 -26
- data/templates/project/templates/_header.html.haml +0 -1
- data/templates/project/templates/_javascripts.html.haml +0 -27
- data/templates/project/templates/_stylesheets.html.haml +0 -5
- data/templates/project/templates/application.html.haml +0 -28
- data/templates/project/templates/old/_layout.haml +0 -1
- data/templates/project/templates/old/home.html.haml +0 -14
- data/templates/project/templates/old/layouts/default.haml +0 -62
- data/templates/project/templates/old/layouts/survivalkit/default.haml +0 -64
- data/templates/project/templates/old/layouts/survivalkit/styletile.haml +0 -64
- data/templates/project/templates/old/survivalkit/_layout.haml +0 -1
- data/templates/project/templates/old/survivalkit/elements-common.haml +0 -33
- data/templates/project/templates/old/survivalkit/elements-html5.haml +0 -71
- data/templates/project/templates/old/survivalkit/elements-typography.haml +0 -100
- data/templates/project/templates/old/survivalkit/elements-ui-patterns-drupal.haml +0 -38
- data/templates/project/templates/old/survivalkit/elements-ui-patterns.haml +0 -23
- data/templates/project/templates/old/survivalkit/index.haml +0 -2
- data/templates/project/templates/old/survivalkit/partials/common/abbr.haml +0 -8
- data/templates/project/templates/old/survivalkit/partials/common/acronym.haml +0 -8
- data/templates/project/templates/old/survivalkit/partials/common/characters.haml +0 -11
- data/templates/project/templates/old/survivalkit/partials/common/cite.haml +0 -12
- data/templates/project/templates/old/survivalkit/partials/common/code.haml +0 -8
- data/templates/project/templates/old/survivalkit/partials/common/dfn.haml +0 -8
- data/templates/project/templates/old/survivalkit/partials/common/em.haml +0 -10
- data/templates/project/templates/old/survivalkit/partials/common/forms.haml +0 -27
- data/templates/project/templates/old/survivalkit/partials/common/headers.haml +0 -23
- data/templates/project/templates/old/survivalkit/partials/common/inline-images.haml +0 -9
- data/templates/project/templates/old/survivalkit/partials/common/kbd.haml +0 -10
- data/templates/project/templates/old/survivalkit/partials/common/links.haml +0 -10
- data/templates/project/templates/old/survivalkit/partials/common/lists.haml +0 -55
- data/templates/project/templates/old/survivalkit/partials/common/others.haml +0 -35
- data/templates/project/templates/old/survivalkit/partials/common/paragraphs.haml +0 -15
- data/templates/project/templates/old/survivalkit/partials/common/pre.haml +0 -27
- data/templates/project/templates/old/survivalkit/partials/common/q.haml +0 -8
- data/templates/project/templates/old/survivalkit/partials/common/samp.haml +0 -8
- data/templates/project/templates/old/survivalkit/partials/common/strong.haml +0 -8
- data/templates/project/templates/old/survivalkit/partials/common/tables.haml +0 -43
- data/templates/project/templates/old/survivalkit/partials/common/var.haml +0 -8
- data/templates/project/templates/old/survivalkit/partials/header-styletile.haml +0 -9
- data/templates/project/templates/old/survivalkit/partials/header.haml +0 -6
- data/templates/project/templates/old/survivalkit/partials/html5/a.haml +0 -36
- data/templates/project/templates/old/survivalkit/partials/html5/abbr.haml +0 -26
- data/templates/project/templates/old/survivalkit/partials/html5/address.haml +0 -27
- data/templates/project/templates/old/survivalkit/partials/html5/all-headings.haml +0 -31
- data/templates/project/templates/old/survivalkit/partials/html5/article.haml +0 -22
- data/templates/project/templates/old/survivalkit/partials/html5/aside.haml +0 -20
- data/templates/project/templates/old/survivalkit/partials/html5/b.haml +0 -21
- data/templates/project/templates/old/survivalkit/partials/html5/bdi.haml +0 -30
- data/templates/project/templates/old/survivalkit/partials/html5/blockquote.haml +0 -32
- data/templates/project/templates/old/survivalkit/partials/html5/cite.haml +0 -46
- data/templates/project/templates/old/survivalkit/partials/html5/code.haml +0 -70
- data/templates/project/templates/old/survivalkit/partials/html5/details.haml +0 -42
- data/templates/project/templates/old/survivalkit/partials/html5/dfn.haml +0 -52
- data/templates/project/templates/old/survivalkit/partials/html5/dl.haml +0 -69
- data/templates/project/templates/old/survivalkit/partials/html5/em.haml +0 -15
- data/templates/project/templates/old/survivalkit/partials/html5/fieldset.haml +0 -49
- data/templates/project/templates/old/survivalkit/partials/html5/figure.haml +0 -48
- data/templates/project/templates/old/survivalkit/partials/html5/footer.haml +0 -37
- data/templates/project/templates/old/survivalkit/partials/html5/header.haml +0 -44
- data/templates/project/templates/old/survivalkit/partials/html5/hgroup.haml +0 -20
- data/templates/project/templates/old/survivalkit/partials/html5/hr.haml +0 -52
- data/templates/project/templates/old/survivalkit/partials/html5/i.haml +0 -28
- data/templates/project/templates/old/survivalkit/partials/html5/kbd.haml +0 -19
- data/templates/project/templates/old/survivalkit/partials/html5/label.haml +0 -18
- data/templates/project/templates/old/survivalkit/partials/html5/li.haml +0 -91
- data/templates/project/templates/old/survivalkit/partials/html5/mark.haml +0 -30
- data/templates/project/templates/old/survivalkit/partials/html5/menu.haml +0 -39
- data/templates/project/templates/old/survivalkit/partials/html5/nav.haml +0 -68
- data/templates/project/templates/old/survivalkit/partials/html5/ol.haml +0 -23
- data/templates/project/templates/old/survivalkit/partials/html5/p.haml +0 -41
- data/templates/project/templates/old/survivalkit/partials/html5/pre.haml +0 -48
- data/templates/project/templates/old/survivalkit/partials/html5/q.haml +0 -34
- data/templates/project/templates/old/survivalkit/partials/html5/ruby.haml +0 -55
- data/templates/project/templates/old/survivalkit/partials/html5/s.haml +0 -17
- data/templates/project/templates/old/survivalkit/partials/html5/samp.haml +0 -27
- data/templates/project/templates/old/survivalkit/partials/html5/sample-forms.haml +0 -52
- data/templates/project/templates/old/survivalkit/partials/html5/sample-tables.haml +0 -152
- data/templates/project/templates/old/survivalkit/partials/html5/section.haml +0 -21
- data/templates/project/templates/old/survivalkit/partials/html5/small.haml +0 -33
- data/templates/project/templates/old/survivalkit/partials/html5/strong.haml +0 -25
- data/templates/project/templates/old/survivalkit/partials/html5/sub-sup.haml +0 -58
- data/templates/project/templates/old/survivalkit/partials/html5/table.haml +0 -196
- data/templates/project/templates/old/survivalkit/partials/html5/text-summary.haml +0 -305
- data/templates/project/templates/old/survivalkit/partials/html5/thead.haml +0 -67
- data/templates/project/templates/old/survivalkit/partials/html5/time.haml +0 -31
- data/templates/project/templates/old/survivalkit/partials/html5/ul.haml +0 -21
- data/templates/project/templates/old/survivalkit/partials/menu.haml +0 -14
- data/templates/project/templates/old/survivalkit/partials/patterns-drupal/block.haml +0 -7
- data/templates/project/templates/old/survivalkit/partials/patterns-drupal/breadcrumbs.haml +0 -7
- data/templates/project/templates/old/survivalkit/partials/patterns-drupal/comments.haml +0 -69
- data/templates/project/templates/old/survivalkit/partials/patterns-drupal/field-image.haml +0 -7
- data/templates/project/templates/old/survivalkit/partials/patterns-drupal/form-comment.haml +0 -54
- data/templates/project/templates/old/survivalkit/partials/patterns-drupal/form-login.haml +0 -23
- data/templates/project/templates/old/survivalkit/partials/patterns-drupal/form-new-account.haml +0 -24
- data/templates/project/templates/old/survivalkit/partials/patterns-drupal/form-new-password.haml +0 -16
- data/templates/project/templates/old/survivalkit/partials/patterns-drupal/links.haml +0 -6
- data/templates/project/templates/old/survivalkit/partials/patterns-drupal/menu.haml +0 -10
- data/templates/project/templates/old/survivalkit/partials/patterns-drupal/messages.haml +0 -21
- data/templates/project/templates/old/survivalkit/partials/patterns-drupal/node.haml +0 -28
- data/templates/project/templates/old/survivalkit/partials/patterns-drupal/pager.haml +0 -17
- data/templates/project/templates/old/survivalkit/partials/patterns-drupal/rss-link.haml +0 -5
- data/templates/project/templates/old/survivalkit/partials/patterns-drupal/search.haml +0 -14
- data/templates/project/templates/old/survivalkit/partials/patterns-drupal/site-name.haml +0 -6
- data/templates/project/templates/old/survivalkit/partials/patterns-drupal/tabs.haml +0 -14
- data/templates/project/templates/old/survivalkit/partials/patterns-drupal/taxonomy.haml +0 -10
- data/templates/project/templates/old/survivalkit/partials/patterns-general/block.haml +0 -7
- data/templates/project/templates/old/survivalkit/partials/patterns-general/breadcrumbs.haml +0 -7
- data/templates/project/templates/old/survivalkit/partials/patterns-general/comments.haml +0 -69
- data/templates/project/templates/old/survivalkit/partials/patterns-general/field-image.haml +0 -7
- data/templates/project/templates/old/survivalkit/partials/patterns-general/form-comment.haml +0 -54
- data/templates/project/templates/old/survivalkit/partials/patterns-general/form-login.haml +0 -23
- data/templates/project/templates/old/survivalkit/partials/patterns-general/form-new-account.haml +0 -24
- data/templates/project/templates/old/survivalkit/partials/patterns-general/form-new-password.haml +0 -16
- data/templates/project/templates/old/survivalkit/partials/patterns-general/links.haml +0 -6
- data/templates/project/templates/old/survivalkit/partials/patterns-general/menu.haml +0 -10
- data/templates/project/templates/old/survivalkit/partials/patterns-general/messages.haml +0 -21
- data/templates/project/templates/old/survivalkit/partials/patterns-general/node.haml +0 -28
- data/templates/project/templates/old/survivalkit/partials/patterns-general/pager.haml +0 -17
- data/templates/project/templates/old/survivalkit/partials/patterns-general/rss-link.haml +0 -5
- data/templates/project/templates/old/survivalkit/partials/patterns-general/search.haml +0 -14
- data/templates/project/templates/old/survivalkit/partials/patterns-general/site-name.haml +0 -6
- data/templates/project/templates/old/survivalkit/partials/patterns-general/tabs.haml +0 -14
- data/templates/project/templates/old/survivalkit/partials/patterns-general/taxonomy.haml +0 -10
- data/templates/project/templates/old/survivalkit/styletile/_layout.haml +0 -1
- data/templates/project/templates/old/survivalkit/styletile/index.redirect +0 -1
- data/templates/project/templates/old/survivalkit/styletile/styletile.haml +0 -60
- data/templates/project/templates/old/view_helpers.rb +0 -25
- data/templates/shared/survivalkit/drupal7.scss +0 -3224
- data/templates/shared/survivalkit/survivalkit.scss +0 -32
@@ -1,158 +0,0 @@
|
|
1
|
-
//
|
2
|
-
// Note: This file depends on the jQuery library.
|
3
|
-
//
|
4
|
-
|
5
|
-
// Module pattern:
|
6
|
-
// http://yuiblog.com/blog/2007/06/12/module-pattern/
|
7
|
-
var FORMALIZE = (function($, window, document, undefined) {
|
8
|
-
// Private constants.
|
9
|
-
var PLACEHOLDER_SUPPORTED = 'placeholder' in document.createElement('input');
|
10
|
-
var AUTOFOCUS_SUPPORTED = 'autofocus' in document.createElement('input');
|
11
|
-
var WEBKIT = 'webkitAppearance' in document.createElement('select').style;
|
12
|
-
var IE6 = !!($.browser.msie && parseInt($.browser.version, 10) === 6);
|
13
|
-
var IE7 = !!($.browser.msie && parseInt($.browser.version, 10) === 7);
|
14
|
-
|
15
|
-
// Expose innards of FORMALIZE.
|
16
|
-
return {
|
17
|
-
// FORMALIZE.go
|
18
|
-
go: function() {
|
19
|
-
for (var i in FORMALIZE.init) {
|
20
|
-
FORMALIZE.init[i]();
|
21
|
-
}
|
22
|
-
},
|
23
|
-
// FORMALIZE.init
|
24
|
-
init: {
|
25
|
-
// FORMALIZE.init.detect_webkit
|
26
|
-
detect_webkit: function() {
|
27
|
-
if (!WEBKIT) {
|
28
|
-
return;
|
29
|
-
}
|
30
|
-
|
31
|
-
// Tweaks for Safari + Chrome.
|
32
|
-
$('html').addClass('is_webkit');
|
33
|
-
},
|
34
|
-
// FORMALIZE.init.full_input_size
|
35
|
-
full_input_size: function() {
|
36
|
-
if (!IE7 || !$('textarea, input.input_full').length) {
|
37
|
-
return;
|
38
|
-
}
|
39
|
-
|
40
|
-
// This fixes width: 100% on <textarea> and class="input_full".
|
41
|
-
// It ensures that form elements don't go wider than container.
|
42
|
-
$('textarea, input.input_full').wrap('<span class="input_full_wrap"></span>');
|
43
|
-
},
|
44
|
-
// FORMALIZE.init.ie6_skin_inputs
|
45
|
-
ie6_skin_inputs: function() {
|
46
|
-
// Test for Internet Explorer 6.
|
47
|
-
if (!IE6 || !$('input, select, textarea').length) {
|
48
|
-
// Exit if the browser is not IE6,
|
49
|
-
// or if no form elements exist.
|
50
|
-
return;
|
51
|
-
}
|
52
|
-
|
53
|
-
// For <input type="submit" />, etc.
|
54
|
-
var button_regex = /button|submit|reset/;
|
55
|
-
|
56
|
-
// For <input type="text" />, etc.
|
57
|
-
var type_regex = /date|datetime|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/;
|
58
|
-
|
59
|
-
$('input').each(function() {
|
60
|
-
var el = $(this);
|
61
|
-
|
62
|
-
// Is it a button?
|
63
|
-
if (this.getAttribute('type').match(button_regex)) {
|
64
|
-
el.addClass('ie6_button');
|
65
|
-
|
66
|
-
/* Is it disabled? */
|
67
|
-
if (this.disabled) {
|
68
|
-
el.addClass('ie6_button_disabled');
|
69
|
-
}
|
70
|
-
}
|
71
|
-
// Or is it a textual input?
|
72
|
-
else if (this.getAttribute('type').match(type_regex)) {
|
73
|
-
el.addClass('ie6_input');
|
74
|
-
|
75
|
-
/* Is it disabled? */
|
76
|
-
if (this.disabled) {
|
77
|
-
el.addClass('ie6_input_disabled');
|
78
|
-
}
|
79
|
-
}
|
80
|
-
});
|
81
|
-
|
82
|
-
$('textarea, select').each(function() {
|
83
|
-
/* Is it disabled? */
|
84
|
-
if (this.disabled) {
|
85
|
-
$(this).addClass('ie6_input_disabled');
|
86
|
-
}
|
87
|
-
});
|
88
|
-
},
|
89
|
-
// FORMALIZE.init.autofocus
|
90
|
-
autofocus: function() {
|
91
|
-
if (AUTOFOCUS_SUPPORTED || !$(':input[autofocus]').length) {
|
92
|
-
return;
|
93
|
-
}
|
94
|
-
|
95
|
-
$(':input[autofocus]:visible:first').focus();
|
96
|
-
},
|
97
|
-
// FORMALIZE.init.placeholder
|
98
|
-
placeholder: function() {
|
99
|
-
if (PLACEHOLDER_SUPPORTED || !$(':input[placeholder]').length) {
|
100
|
-
// Exit if placeholder is supported natively,
|
101
|
-
// or if page does not have any placeholder.
|
102
|
-
return;
|
103
|
-
}
|
104
|
-
|
105
|
-
FORMALIZE.misc.add_placeholder();
|
106
|
-
|
107
|
-
$(':input[placeholder]').each(function() {
|
108
|
-
var el = $(this);
|
109
|
-
var text = el.attr('placeholder');
|
110
|
-
|
111
|
-
el.focus(function() {
|
112
|
-
if (el.val() === text) {
|
113
|
-
el.val('').removeClass('placeholder_text');
|
114
|
-
}
|
115
|
-
}).blur(function() {
|
116
|
-
FORMALIZE.misc.add_placeholder();
|
117
|
-
});
|
118
|
-
|
119
|
-
// Prevent <form> from accidentally
|
120
|
-
// submitting the placeholder text.
|
121
|
-
el.closest('form').submit(function() {
|
122
|
-
if (el.val() === text) {
|
123
|
-
el.val('').removeClass('placeholder_text');
|
124
|
-
}
|
125
|
-
}).bind('reset', function() {
|
126
|
-
setTimeout(FORMALIZE.misc.add_placeholder, 50);
|
127
|
-
});
|
128
|
-
});
|
129
|
-
}
|
130
|
-
},
|
131
|
-
// FORMALIZE.misc
|
132
|
-
misc: {
|
133
|
-
// FORMALIZE.misc.add_placeholder
|
134
|
-
add_placeholder: function() {
|
135
|
-
if (PLACEHOLDER_SUPPORTED || !$(':input[placeholder]').length) {
|
136
|
-
// Exit if placeholder is supported natively,
|
137
|
-
// or if page does not have any placeholder.
|
138
|
-
return;
|
139
|
-
}
|
140
|
-
|
141
|
-
$(':input[placeholder]').each(function() {
|
142
|
-
var el = $(this);
|
143
|
-
var text = el.attr('placeholder');
|
144
|
-
|
145
|
-
if (!el.val() || el.val() === text) {
|
146
|
-
el.val(text).addClass('placeholder_text');
|
147
|
-
}
|
148
|
-
});
|
149
|
-
}
|
150
|
-
}
|
151
|
-
};
|
152
|
-
// Alias jQuery, window, document.
|
153
|
-
})(jQuery, this, this.document);
|
154
|
-
|
155
|
-
// Automatically calls all functions in FORMALIZE.init
|
156
|
-
jQuery(document).ready(function() {
|
157
|
-
FORMALIZE.go();
|
158
|
-
});
|
@@ -1,163 +0,0 @@
|
|
1
|
-
//
|
2
|
-
// Note: This file depends on the MooTools library.
|
3
|
-
//
|
4
|
-
|
5
|
-
// Module pattern:
|
6
|
-
// http://yuiblog.com/blog/2007/06/12/module-pattern/
|
7
|
-
var FORMALIZE = (function(window, document, undefined) {
|
8
|
-
// Private constants.
|
9
|
-
var PLACEHOLDER_SUPPORTED = 'placeholder' in document.createElement('input');
|
10
|
-
var AUTOFOCUS_SUPPORTED = 'autofocus' in document.createElement('input');
|
11
|
-
var WEBKIT = 'webkitAppearance' in document.createElement('select').style;
|
12
|
-
var IE6 = Browser.ie6;
|
13
|
-
var IE7 = Browser.ie7;
|
14
|
-
|
15
|
-
// Expose innards of FORMALIZE.
|
16
|
-
return {
|
17
|
-
// FORMALIZE.go
|
18
|
-
go: function() {
|
19
|
-
for (var i in FORMALIZE.init) {
|
20
|
-
FORMALIZE.init[i]();
|
21
|
-
}
|
22
|
-
},
|
23
|
-
// FORMALIZE.init
|
24
|
-
init: {
|
25
|
-
// FORMALIZE.init.detect_webkit
|
26
|
-
detect_webkit: function() {
|
27
|
-
if (!WEBKIT) {
|
28
|
-
return;
|
29
|
-
}
|
30
|
-
|
31
|
-
// Tweaks for Safari + Chrome.
|
32
|
-
$$('html')[0].addClass('is_webkit');
|
33
|
-
},
|
34
|
-
// FORMALIZE.init.full_input_size
|
35
|
-
full_input_size: function() {
|
36
|
-
if (!IE7 || !$$('textarea, input.input_full').length) {
|
37
|
-
return;
|
38
|
-
}
|
39
|
-
|
40
|
-
// This fixes width: 100% on <textarea> and class="input_full".
|
41
|
-
// It ensures that form elements don't go wider than container.
|
42
|
-
$$('textarea, input.input_full').each(function(el) {
|
43
|
-
new Element('span.input_full_wrap').wraps(el);
|
44
|
-
});
|
45
|
-
|
46
|
-
},
|
47
|
-
// FORMALIZE.init.ie6_skin_inputs
|
48
|
-
ie6_skin_inputs: function() {
|
49
|
-
// Test for Internet Explorer 6.
|
50
|
-
if (!IE6 || !$$('input, select, textarea').length) {
|
51
|
-
// Exit if the browser is not IE6,
|
52
|
-
// or if no form elements exist.
|
53
|
-
return;
|
54
|
-
}
|
55
|
-
|
56
|
-
// For <input type="submit" />, etc.
|
57
|
-
var button_regex = /button|submit|reset/;
|
58
|
-
|
59
|
-
// For <input type="text" />, etc.
|
60
|
-
var type_regex = /date|datetime|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/;
|
61
|
-
|
62
|
-
$$('input').each(function(el) {
|
63
|
-
// Is it a button?
|
64
|
-
if (el.getAttribute('type').match(button_regex)) {
|
65
|
-
el.addClass('ie6_button');
|
66
|
-
|
67
|
-
/* Is it disabled? */
|
68
|
-
if (el.disabled) {
|
69
|
-
el.addClass('ie6_button_disabled');
|
70
|
-
}
|
71
|
-
}
|
72
|
-
// Or is it a textual input?
|
73
|
-
else if (el.getAttribute('type').match(type_regex)) {
|
74
|
-
el.addClass('ie6_input');
|
75
|
-
|
76
|
-
/* Is it disabled? */
|
77
|
-
if (el.disabled) {
|
78
|
-
el.addClass('ie6_input_disabled');
|
79
|
-
}
|
80
|
-
}
|
81
|
-
});
|
82
|
-
|
83
|
-
$$('textarea, select').each(function(el) {
|
84
|
-
/* Is it disabled? */
|
85
|
-
if (el.disabled) {
|
86
|
-
el.addClass('ie6_input_disabled');
|
87
|
-
}
|
88
|
-
});
|
89
|
-
},
|
90
|
-
// FORMALIZE.init.autofocus
|
91
|
-
autofocus: function() {
|
92
|
-
if (AUTOFOCUS_SUPPORTED || !$$('[autofocus]').length) {
|
93
|
-
return;
|
94
|
-
}
|
95
|
-
|
96
|
-
$$('[autofocus]')[0].focus();
|
97
|
-
},
|
98
|
-
// FORMALIZE.init.placeholder
|
99
|
-
placeholder: function() {
|
100
|
-
if (PLACEHOLDER_SUPPORTED || !$$('[placeholder]').length) {
|
101
|
-
// Exit if placeholder is supported natively,
|
102
|
-
// or if page does not have any placeholder.
|
103
|
-
return;
|
104
|
-
}
|
105
|
-
|
106
|
-
FORMALIZE.misc.add_placeholder();
|
107
|
-
|
108
|
-
$$('[placeholder]').each(function(el) {
|
109
|
-
var text = el.get('placeholder');
|
110
|
-
|
111
|
-
el.addEvents({
|
112
|
-
focus: function() {
|
113
|
-
if (el.value === text) {
|
114
|
-
el.set('value', '').removeClass('placeholder_text');
|
115
|
-
}
|
116
|
-
},
|
117
|
-
blur: function() {
|
118
|
-
FORMALIZE.misc.add_placeholder();
|
119
|
-
}
|
120
|
-
});
|
121
|
-
|
122
|
-
// Prevent <form> from accidentally
|
123
|
-
// submitting the placeholder text.
|
124
|
-
el.getParent('form').addEvents({
|
125
|
-
'submit': function() {
|
126
|
-
if (el.value === text) {
|
127
|
-
el.set('value', '').removeClass('placeholder_text');
|
128
|
-
}
|
129
|
-
},
|
130
|
-
'reset': function() {
|
131
|
-
setTimeout(FORMALIZE.misc.add_placeholder, 50);
|
132
|
-
}
|
133
|
-
});
|
134
|
-
});
|
135
|
-
}
|
136
|
-
},
|
137
|
-
// FORMALIZE.misc
|
138
|
-
misc: {
|
139
|
-
// FORMALIZE.misc.add_placeholder
|
140
|
-
add_placeholder: function() {
|
141
|
-
if (PLACEHOLDER_SUPPORTED || !$$('[placeholder]').length) {
|
142
|
-
// Exit if placeholder is supported natively,
|
143
|
-
// or if page does not have any placeholder.
|
144
|
-
return;
|
145
|
-
}
|
146
|
-
|
147
|
-
$$('[placeholder]').each(function(el) {
|
148
|
-
var text = el.get('placeholder');
|
149
|
-
|
150
|
-
if (!el.value || el.value === text) {
|
151
|
-
el.set('value', text).addClass('placeholder_text');
|
152
|
-
}
|
153
|
-
});
|
154
|
-
}
|
155
|
-
}
|
156
|
-
};
|
157
|
-
// Alias window, document.
|
158
|
-
})(this, this.document);
|
159
|
-
|
160
|
-
// Automatically calls all functions in FORMALIZE.init
|
161
|
-
$(document).addEvent('domready', function() {
|
162
|
-
FORMALIZE.go();
|
163
|
-
});
|
@@ -1,171 +0,0 @@
|
|
1
|
-
//
|
2
|
-
// Note: This file depends on the Prototype library.
|
3
|
-
//
|
4
|
-
|
5
|
-
// Module pattern:
|
6
|
-
// http://yuiblog.com/blog/2007/06/12/module-pattern/
|
7
|
-
var FORMALIZE = (function(window, document, undefined) {
|
8
|
-
// Private constants.
|
9
|
-
var PLACEHOLDER_SUPPORTED = 'placeholder' in document.createElement('input');
|
10
|
-
var AUTOFOCUS_SUPPORTED = 'autofocus' in document.createElement('input');
|
11
|
-
var WEBKIT = 'webkitAppearance' in document.createElement('select').style;
|
12
|
-
var IE6 = IE(6);
|
13
|
-
var IE7 = IE(7);
|
14
|
-
|
15
|
-
// Internet Explorer detection.
|
16
|
-
function IE(version) {
|
17
|
-
var b = document.createElement('b');
|
18
|
-
b.innerHTML = '<!--[if IE ' + version + ']><br><![endif]-->';
|
19
|
-
return !!b.getElementsByTagName('br').length;
|
20
|
-
}
|
21
|
-
|
22
|
-
// Expose innards of FORMALIZE.
|
23
|
-
return {
|
24
|
-
// FORMALIZE.go
|
25
|
-
go: function() {
|
26
|
-
for (var i in FORMALIZE.init) {
|
27
|
-
FORMALIZE.init[i]();
|
28
|
-
}
|
29
|
-
},
|
30
|
-
// FORMALIZE.init
|
31
|
-
init: {
|
32
|
-
// FORMALIZE.init.detect_webkit
|
33
|
-
detect_webkit: function() {
|
34
|
-
if (!WEBKIT) {
|
35
|
-
return;
|
36
|
-
}
|
37
|
-
|
38
|
-
// Tweaks for Safari + Chrome.
|
39
|
-
$$('html')[0].addClassName('is_webkit');
|
40
|
-
},
|
41
|
-
// FORMALIZE.init.full_input_size
|
42
|
-
full_input_size: function() {
|
43
|
-
if (!IE7 || !$$('textarea, input.input_full').length) {
|
44
|
-
return;
|
45
|
-
}
|
46
|
-
|
47
|
-
// This fixes width: 100% on <textarea> and class="input_full".
|
48
|
-
// It ensures that form elements don't go wider than container.
|
49
|
-
$$('textarea, input.input_full').each(function(el) {
|
50
|
-
Element.wrap(el, 'span', {'class': 'input_full_wrap'});
|
51
|
-
});
|
52
|
-
},
|
53
|
-
// FORMALIZE.init.ie6_skin_inputs
|
54
|
-
ie6_skin_inputs: function() {
|
55
|
-
// Test for Internet Explorer 6.
|
56
|
-
if (!IE6 || !$$('input, select, textarea').length) {
|
57
|
-
// Exit if the browser is not IE6,
|
58
|
-
// or if no form elements exist.
|
59
|
-
return;
|
60
|
-
}
|
61
|
-
|
62
|
-
// For <input type="submit" />, etc.
|
63
|
-
var button_regex = /button|submit|reset/;
|
64
|
-
|
65
|
-
// For <input type="text" />, etc.
|
66
|
-
var type_regex = /date|datetime|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/;
|
67
|
-
|
68
|
-
$$('input').each(function(el) {
|
69
|
-
// Is it a button?
|
70
|
-
if (el.getAttribute('type').match(button_regex)) {
|
71
|
-
el.addClassName('ie6_button');
|
72
|
-
|
73
|
-
/* Is it disabled? */
|
74
|
-
if (el.disabled) {
|
75
|
-
el.addClassName('ie6_button_disabled');
|
76
|
-
}
|
77
|
-
}
|
78
|
-
// Or is it a textual input?
|
79
|
-
else if (el.getAttribute('type').match(type_regex)) {
|
80
|
-
el.addClassName('ie6_input');
|
81
|
-
|
82
|
-
/* Is it disabled? */
|
83
|
-
if (el.disabled) {
|
84
|
-
el.addClassName('ie6_input_disabled');
|
85
|
-
}
|
86
|
-
}
|
87
|
-
});
|
88
|
-
|
89
|
-
$$('textarea, select').each(function(el) {
|
90
|
-
/* Is it disabled? */
|
91
|
-
if (el.disabled) {
|
92
|
-
el.addClassName('ie6_input_disabled');
|
93
|
-
}
|
94
|
-
});
|
95
|
-
},
|
96
|
-
// FORMALIZE.init.autofocus
|
97
|
-
autofocus: function() {
|
98
|
-
if (AUTOFOCUS_SUPPORTED || !$$('[autofocus]').length) {
|
99
|
-
return;
|
100
|
-
}
|
101
|
-
|
102
|
-
$$('[autofocus]')[0].focus();
|
103
|
-
},
|
104
|
-
// FORMALIZE.init.placeholder
|
105
|
-
placeholder: function() {
|
106
|
-
if (PLACEHOLDER_SUPPORTED || !$$('[placeholder]').length) {
|
107
|
-
// Exit if placeholder is supported natively,
|
108
|
-
// or if page does not have any placeholder.
|
109
|
-
return;
|
110
|
-
}
|
111
|
-
|
112
|
-
FORMALIZE.misc.add_placeholder();
|
113
|
-
|
114
|
-
$$('[placeholder]').each(function(el) {
|
115
|
-
var text = el.getAttribute('placeholder');
|
116
|
-
var form = el.up('form');
|
117
|
-
|
118
|
-
el.observe('focus', function() {
|
119
|
-
if (el.value === text) {
|
120
|
-
el.value = '';
|
121
|
-
el.removeClassName('placeholder_text');
|
122
|
-
}
|
123
|
-
});
|
124
|
-
|
125
|
-
el.observe('blur', function() {
|
126
|
-
FORMALIZE.misc.add_placeholder();
|
127
|
-
});
|
128
|
-
|
129
|
-
// Prevent <form> from accidentally
|
130
|
-
// submitting the placeholder text.
|
131
|
-
form.observe('submit', function() {
|
132
|
-
if (el.value === text) {
|
133
|
-
el.value = '';
|
134
|
-
el.removeClassName('placeholder_text');
|
135
|
-
}
|
136
|
-
});
|
137
|
-
|
138
|
-
form.observe('reset', function() {
|
139
|
-
setTimeout(FORMALIZE.misc.add_placeholder, 50);
|
140
|
-
});
|
141
|
-
});
|
142
|
-
}
|
143
|
-
},
|
144
|
-
// FORMALIZE.misc
|
145
|
-
misc: {
|
146
|
-
// FORMALIZE.misc.add_placeholder
|
147
|
-
add_placeholder: function() {
|
148
|
-
if (PLACEHOLDER_SUPPORTED || !$$('[placeholder]').length) {
|
149
|
-
// Exit if placeholder is supported natively,
|
150
|
-
// or if page does not have any placeholder.
|
151
|
-
return;
|
152
|
-
}
|
153
|
-
|
154
|
-
$$('[placeholder]').each(function(el) {
|
155
|
-
var text = el.getAttribute('placeholder');
|
156
|
-
|
157
|
-
if (!el.value || el.value === text) {
|
158
|
-
el.value = text;
|
159
|
-
el.addClassName('placeholder_text');
|
160
|
-
}
|
161
|
-
});
|
162
|
-
}
|
163
|
-
}
|
164
|
-
};
|
165
|
-
// Alias window, document.
|
166
|
-
})(this, this.document);
|
167
|
-
|
168
|
-
// Automatically calls all functions in FORMALIZE.init
|
169
|
-
$(document).observe('dom:loaded', function() {
|
170
|
-
FORMALIZE.go();
|
171
|
-
});
|
@@ -1,168 +0,0 @@
|
|
1
|
-
//
|
2
|
-
// Note: This file depends on the YUI library.
|
3
|
-
//
|
4
|
-
|
5
|
-
// Module pattern:
|
6
|
-
// http://yuiblog.com/blog/2007/06/12/module-pattern/
|
7
|
-
var FORMALIZE = (function(window, document, undefined) {
|
8
|
-
// Private constants.
|
9
|
-
var PLACEHOLDER_SUPPORTED = 'placeholder' in document.createElement('input');
|
10
|
-
var AUTOFOCUS_SUPPORTED = 'autofocus' in document.createElement('input');
|
11
|
-
var WEBKIT = 'webkitAppearance' in document.createElement('select').style;
|
12
|
-
var IE6 = parseInt(Y.UA.ie, 10) === 6;
|
13
|
-
var IE7 = parseInt(Y.UA.ie, 10) === 7;
|
14
|
-
|
15
|
-
// Expose innards of FORMALIZE.
|
16
|
-
return {
|
17
|
-
// FORMALIZE.go
|
18
|
-
go: function() {
|
19
|
-
for (var i in FORMALIZE.init) {
|
20
|
-
FORMALIZE.init[i]();
|
21
|
-
}
|
22
|
-
},
|
23
|
-
// FORMALIZE.init
|
24
|
-
init: {
|
25
|
-
// FORMALIZE.init.detect_webkit
|
26
|
-
detect_webkit: function() {
|
27
|
-
if (!WEBKIT) {
|
28
|
-
return;
|
29
|
-
}
|
30
|
-
|
31
|
-
// Tweaks for Safari + Chrome.
|
32
|
-
Y.one('html').addClass('is_webkit');
|
33
|
-
},
|
34
|
-
// FORMALIZE.init.full_input_size
|
35
|
-
full_input_size: function() {
|
36
|
-
if (!IE7 || !Y.all('textarea, input.input_full')) {
|
37
|
-
return;
|
38
|
-
}
|
39
|
-
|
40
|
-
// This fixes width: 100% on <textarea> and class="input_full".
|
41
|
-
// It ensures that form elements don't go wider than container.
|
42
|
-
Y.all('textarea, input.input_full').each(function(el) {
|
43
|
-
var wrapper = Y.Node.create('<span class="input_full_wrap"></span>');
|
44
|
-
wrapper.append(el.replace(wrapper));
|
45
|
-
});
|
46
|
-
},
|
47
|
-
// FORMALIZE.init.ie6_skin_inputs
|
48
|
-
ie6_skin_inputs: function() {
|
49
|
-
// Test for Internet Explorer 6.
|
50
|
-
if (!IE6 || !Y.all('input, select, textarea')) {
|
51
|
-
// Exit if the browser is not IE6,
|
52
|
-
// or if no form elements exist.
|
53
|
-
return;
|
54
|
-
}
|
55
|
-
|
56
|
-
// For <input type="submit" />, etc.
|
57
|
-
var button_regex = /button|submit|reset/;
|
58
|
-
|
59
|
-
// For <input type="text" />, etc.
|
60
|
-
var type_regex = /date|datetime|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/;
|
61
|
-
|
62
|
-
Y.all('input').each(function(el) {
|
63
|
-
// Is it a button?
|
64
|
-
if (el.getAttribute('type').match(button_regex)) {
|
65
|
-
el.addClass('ie6_button');
|
66
|
-
|
67
|
-
/* Is it disabled? */
|
68
|
-
if (el.disabled) {
|
69
|
-
el.addClass('ie6_button_disabled');
|
70
|
-
}
|
71
|
-
}
|
72
|
-
// Or is it a textual input?
|
73
|
-
else if (el.getAttribute('type').match(type_regex)) {
|
74
|
-
el.addClass('ie6_input');
|
75
|
-
|
76
|
-
/* Is it disabled? */
|
77
|
-
if (el.disabled) {
|
78
|
-
el.addClass('ie6_input_disabled');
|
79
|
-
}
|
80
|
-
}
|
81
|
-
});
|
82
|
-
|
83
|
-
Y.all('textarea, select').each(function(el) {
|
84
|
-
/* Is it disabled? */
|
85
|
-
if (el.disabled) {
|
86
|
-
el.addClass('ie6_input_disabled');
|
87
|
-
}
|
88
|
-
});
|
89
|
-
},
|
90
|
-
// FORMALIZE.init.autofocus
|
91
|
-
autofocus: function() {
|
92
|
-
if (AUTOFOCUS_SUPPORTED || !Y.one('[autofocus]')) {
|
93
|
-
return;
|
94
|
-
}
|
95
|
-
|
96
|
-
Y.one('[autofocus]').focus();
|
97
|
-
},
|
98
|
-
// FORMALIZE.init.placeholder
|
99
|
-
placeholder: function() {
|
100
|
-
if (PLACEHOLDER_SUPPORTED || !Y.one('[placeholder]')) {
|
101
|
-
// Exit if placeholder is supported natively,
|
102
|
-
// or if page does not have any placeholder.
|
103
|
-
return;
|
104
|
-
}
|
105
|
-
|
106
|
-
FORMALIZE.misc.add_placeholder();
|
107
|
-
|
108
|
-
Y.all('[placeholder]').each(function(el) {
|
109
|
-
var text = el.getAttribute('placeholder');
|
110
|
-
var form = el.ancestor('form');
|
111
|
-
|
112
|
-
function add_placeholder() {
|
113
|
-
if (!el.get('value') || el.get('value') === text) {
|
114
|
-
el.set('value', text).addClass('placeholder_text');
|
115
|
-
}
|
116
|
-
}
|
117
|
-
|
118
|
-
el.on('focus', function() {
|
119
|
-
if (el.get('value') === text) {
|
120
|
-
el.set('value', '').removeClass('placeholder_text');
|
121
|
-
}
|
122
|
-
});
|
123
|
-
|
124
|
-
el.on('blur', function() {
|
125
|
-
FORMALIZE.misc.add_placeholder();
|
126
|
-
});
|
127
|
-
|
128
|
-
// Prevent <form> from accidentally
|
129
|
-
// submitting the placeholder text.
|
130
|
-
form.on('submit', function() {
|
131
|
-
if (el.get('value') === text) {
|
132
|
-
el.set('value', '').removeClass('placeholder_text');
|
133
|
-
}
|
134
|
-
});
|
135
|
-
|
136
|
-
form.on('reset', function() {
|
137
|
-
setTimeout(FORMALIZE.misc.add_placeholder, 50);
|
138
|
-
});
|
139
|
-
});
|
140
|
-
}
|
141
|
-
},
|
142
|
-
// FORMALIZE.misc
|
143
|
-
misc: {
|
144
|
-
// FORMALIZE.misc.add_placeholder
|
145
|
-
add_placeholder: function() {
|
146
|
-
if (PLACEHOLDER_SUPPORTED || !Y.one('[placeholder]')) {
|
147
|
-
// Exit if placeholder is supported natively,
|
148
|
-
// or if page does not have any placeholder.
|
149
|
-
return;
|
150
|
-
}
|
151
|
-
|
152
|
-
Y.all('[placeholder]').each(function(el) {
|
153
|
-
var text = el.getAttribute('placeholder');
|
154
|
-
|
155
|
-
if (!el.get('value') || el.get('value') === text) {
|
156
|
-
el.set('value', text).addClass('placeholder_text');
|
157
|
-
}
|
158
|
-
});
|
159
|
-
}
|
160
|
-
}
|
161
|
-
};
|
162
|
-
// Alias window, document.
|
163
|
-
})(this, this.document);
|
164
|
-
|
165
|
-
// Automatically calls all functions in FORMALIZE.init
|
166
|
-
Y.on('domready', function() {
|
167
|
-
FORMALIZE.go();
|
168
|
-
});
|