alchemy 1.0.3 → 8.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (189) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +24 -17
  3. data/README.md +538 -4
  4. data/lib/alchemy.rb +3 -2
  5. metadata +61 -223
  6. data/Rakefile +0 -21
  7. data/app/assets/fonts/alchemy/LiberationSans-Bold-webfont.eot +0 -0
  8. data/app/assets/fonts/alchemy/LiberationSans-Bold-webfont.svg +0 -154
  9. data/app/assets/fonts/alchemy/LiberationSans-Bold-webfont.ttf +0 -0
  10. data/app/assets/fonts/alchemy/LiberationSans-Bold-webfont.woff +0 -0
  11. data/app/assets/fonts/alchemy/LiberationSans-BoldItalic-webfont.eot +0 -0
  12. data/app/assets/fonts/alchemy/LiberationSans-BoldItalic-webfont.svg +0 -154
  13. data/app/assets/fonts/alchemy/LiberationSans-BoldItalic-webfont.ttf +0 -0
  14. data/app/assets/fonts/alchemy/LiberationSans-BoldItalic-webfont.woff +0 -0
  15. data/app/assets/fonts/alchemy/LiberationSans-Italic-webfont.eot +0 -0
  16. data/app/assets/fonts/alchemy/LiberationSans-Italic-webfont.svg +0 -154
  17. data/app/assets/fonts/alchemy/LiberationSans-Italic-webfont.ttf +0 -0
  18. data/app/assets/fonts/alchemy/LiberationSans-Italic-webfont.woff +0 -0
  19. data/app/assets/fonts/alchemy/LiberationSans-Regular-webfont.eot +0 -0
  20. data/app/assets/fonts/alchemy/LiberationSans-Regular-webfont.svg +0 -154
  21. data/app/assets/fonts/alchemy/LiberationSans-Regular-webfont.ttf +0 -0
  22. data/app/assets/fonts/alchemy/LiberationSans-Regular-webfont.woff +0 -0
  23. data/app/assets/fonts/alchemy/Red Hat Liberation License.txt +0 -78
  24. data/app/assets/fonts/alchemy/overpass_bold-web.eot +0 -0
  25. data/app/assets/fonts/alchemy/overpass_bold-web.svg +0 -470
  26. data/app/assets/fonts/alchemy/overpass_bold-web.ttf +0 -0
  27. data/app/assets/fonts/alchemy/overpass_bold-web.woff +0 -0
  28. data/app/assets/fonts/alchemy/overpass_regular-web.eot +0 -0
  29. data/app/assets/fonts/alchemy/overpass_regular-web.svg +0 -470
  30. data/app/assets/fonts/alchemy/overpass_regular-web.ttf +0 -0
  31. data/app/assets/fonts/alchemy/overpass_regular-web.woff +0 -0
  32. data/app/assets/images/alchemy/icons/action-icons.png +0 -0
  33. data/app/assets/images/alchemy/icons/arrow_icon.png +0 -0
  34. data/app/assets/images/alchemy/icons/chosen-sprite.png +0 -0
  35. data/app/assets/images/alchemy/icons/error_icon.png +0 -0
  36. data/app/assets/images/alchemy/icons/objects.png +0 -0
  37. data/app/assets/images/alchemy/icons/spinner.gif +0 -0
  38. data/app/assets/images/alchemy/icons/spinner_head.gif +0 -0
  39. data/app/assets/images/alchemy/icons/success_icon.png +0 -0
  40. data/app/assets/images/alchemy/icons/warning_icon.png +0 -0
  41. data/app/assets/javascripts/alchemy/flash_messages.js +0 -12
  42. data/app/assets/javascripts/alchemy/forms.js +0 -25
  43. data/app/assets/javascripts/alchemy/i18n.js +0 -36
  44. data/app/assets/javascripts/alchemy/login.js +0 -130
  45. data/app/assets/javascripts/alchemy/password.js +0 -99
  46. data/app/assets/stylesheets/alchemy/components/_chosen.scss +0 -423
  47. data/app/assets/stylesheets/alchemy/components/_content.scss +0 -58
  48. data/app/assets/stylesheets/alchemy/components/_helpers.scss +0 -38
  49. data/app/assets/stylesheets/alchemy/components/_media.scss +0 -49
  50. data/app/assets/stylesheets/alchemy/components/_media_object.scss +0 -22
  51. data/app/assets/stylesheets/alchemy/components/_normalize.scss +0 -396
  52. data/app/assets/stylesheets/alchemy/components/_shared.scss +0 -18
  53. data/app/assets/stylesheets/alchemy/components/buttons/_buttons.scss +0 -278
  54. data/app/assets/stylesheets/alchemy/components/buttons/_buttons_vars.scss +0 -11
  55. data/app/assets/stylesheets/alchemy/components/flash_messages/_flash_messages.scss +0 -93
  56. data/app/assets/stylesheets/alchemy/components/flash_messages/_flash_messages_vars.scss +0 -3
  57. data/app/assets/stylesheets/alchemy/components/fonts/_liberation.scss +0 -44
  58. data/app/assets/stylesheets/alchemy/components/fonts/_overpass.scss +0 -24
  59. data/app/assets/stylesheets/alchemy/components/footer/_footer.scss +0 -53
  60. data/app/assets/stylesheets/alchemy/components/footer/_footer_vars.scss +0 -4
  61. data/app/assets/stylesheets/alchemy/components/forms/_forms.scss +0 -552
  62. data/app/assets/stylesheets/alchemy/components/forms/_forms_ie.scss +0 -45
  63. data/app/assets/stylesheets/alchemy/components/forms/_forms_mixins.scss +0 -18
  64. data/app/assets/stylesheets/alchemy/components/forms/_forms_responsive.scss +0 -167
  65. data/app/assets/stylesheets/alchemy/components/forms/_forms_vars.scss +0 -25
  66. data/app/assets/stylesheets/alchemy/components/header/_header.scss +0 -216
  67. data/app/assets/stylesheets/alchemy/components/header/_header_vars.scss +0 -11
  68. data/app/assets/stylesheets/alchemy/components/login/_login.scss +0 -173
  69. data/app/assets/stylesheets/alchemy/components/login/_login_mixins.scss +0 -7
  70. data/app/assets/stylesheets/alchemy/components/login/_login_vars.scss +0 -19
  71. data/app/assets/stylesheets/alchemy/components/sprites/_sprites.scss +0 -110
  72. data/app/assets/stylesheets/alchemy/components/sprites/_sprites_mixins.scss +0 -9
  73. data/app/assets/stylesheets/alchemy/components/text/_text.scss +0 -30
  74. data/app/assets/stylesheets/alchemy/components/text/_text_vars.scss +0 -1
  75. data/app/assets/stylesheets/alchemy/composites/content_elements.scss +0 -6
  76. data/app/assets/stylesheets/alchemy/composites/login.scss +0 -9
  77. data/app/assets/stylesheets/alchemy/composites/shell.scss +0 -4
  78. data/app/assets/stylesheets/alchemy/partials/_base.scss +0 -8
  79. data/app/assets/stylesheets/alchemy/partials/_colors.scss +0 -99
  80. data/app/assets/stylesheets/alchemy/partials/_mixins.scss +0 -24
  81. data/app/assets/stylesheets/alchemy/partials/_vars.scss +0 -31
  82. data/app/helpers/alchemy/gettext_translations.rb +0 -28
  83. data/app/helpers/alchemy/layout_helper.rb +0 -35
  84. data/app/helpers/alchemy/rails_translations.rb +0 -21
  85. data/app/helpers/alchemy/translation_helper.rb +0 -19
  86. data/app/views/alchemy/layouts/_change_password_layout.html.haml +0 -20
  87. data/app/views/alchemy/layouts/_common_i18n.haml +0 -4
  88. data/app/views/alchemy/layouts/_header_layout.haml +0 -13
  89. data/app/views/alchemy/layouts/_login_layout.html.haml +0 -58
  90. data/app/views/alchemy/layouts/_user_session_layout.haml +0 -17
  91. data/app/views/alchemy/layouts/base.html.haml +0 -20
  92. data/app/views/alchemy/layouts/shell_layout.haml +0 -10
  93. data/lib/alchemy/engine.rb +0 -8
  94. data/lib/alchemy/version.rb +0 -3
  95. data/test/alchemy_test.rb +0 -7
  96. data/test/test_helper.rb +0 -9
  97. data/vendor/assets/javascripts/alchemy/handlebars.js +0 -2201
  98. data/vendor/assets/javascripts/alchemy/html5shiv.js +0 -298
  99. data/vendor/assets/javascripts/alchemy/jquery/jquery-1.6.2.js +0 -8981
  100. data/vendor/assets/javascripts/alchemy/jquery/plugins/chosen.jquery.js +0 -1003
  101. data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/excanvas.js +0 -1427
  102. data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/excanvas.min.js +0 -1
  103. data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.colorhelpers.js +0 -179
  104. data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.colorhelpers.min.js +0 -1
  105. data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.crosshair.js +0 -167
  106. data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.crosshair.min.js +0 -1
  107. data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.fillbetween.js +0 -183
  108. data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.fillbetween.min.js +0 -1
  109. data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.image.js +0 -238
  110. data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.image.min.js +0 -1
  111. data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.js +0 -2599
  112. data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.min.js +0 -6
  113. data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.navigate.js +0 -336
  114. data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.navigate.min.js +0 -1
  115. data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.pie.js +0 -750
  116. data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.pie.min.js +0 -1
  117. data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.resize.js +0 -60
  118. data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.resize.min.js +0 -1
  119. data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.selection.js +0 -344
  120. data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.selection.min.js +0 -1
  121. data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.stack.js +0 -184
  122. data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.stack.min.js +0 -1
  123. data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.symbol.js +0 -70
  124. data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.symbol.min.js +0 -1
  125. data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.threshold.js +0 -103
  126. data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.threshold.min.js +0 -1
  127. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/blank.svg +0 -3
  128. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/custom_test.js +0 -67
  129. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svg.css +0 -9
  130. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svg.js +0 -1101
  131. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svg.min.js +0 -7
  132. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svg.pack.js +0 -7
  133. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svgfilter.js +0 -396
  134. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svgfilter.min.js +0 -7
  135. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svgfilter.pack.js +0 -7
  136. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svggraph.js +0 -1337
  137. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svggraph.min.js +0 -7
  138. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svggraph.pack.js +0 -7
  139. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/lion.svg +0 -161
  140. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/test.js +0 -714
  141. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.ajaxfileupload.js +0 -205
  142. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.ba-bbq.js +0 -1137
  143. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.ba-resize.js +0 -246
  144. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.cookie.js +0 -92
  145. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.easing.1.3.js +0 -205
  146. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.fancyqueries.js +0 -106
  147. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.flash.js +0 -288
  148. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.form.js +0 -964
  149. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.hoverIntent.js +0 -106
  150. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.jeditable.ajaxupload.js +0 -62
  151. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.jeditable.js +0 -556
  152. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.jnotify.js +0 -210
  153. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.jscrollpane.js +0 -1390
  154. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.jscrollpane.min.js +0 -11
  155. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.linkHover.js +0 -89
  156. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.loadmask.min.js +0 -10
  157. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.mousewheel.js +0 -78
  158. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.multiselect.filter.js +0 -176
  159. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.multiselect.js +0 -668
  160. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.pack.js +0 -11
  161. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.periodicalupdater.js +0 -175
  162. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.sortElements.js +0 -75
  163. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.sparkline.min.js +0 -94
  164. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.text-overflow.js +0 -60
  165. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.timepickr.js +0 -214
  166. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.timers.js +0 -142
  167. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.tipsy.js +0 -358
  168. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.treeTable.js +0 -226
  169. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.trunk8.js +0 -203
  170. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.ui.multiselect.js +0 -338
  171. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.ui.totop.js +0 -58
  172. data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.uitablefilter.js +0 -95
  173. data/vendor/assets/javascripts/alchemy/jquery/plugins/ui.spinner.js +0 -683
  174. data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  175. data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  176. data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_highlight-hard_75_dadada_1x100.png +0 -0
  177. data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_highlight-hard_75_e6e6e6_1x100.png +0 -0
  178. data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_highlight-hard_95_ffffff_1x100.png +0 -0
  179. data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_highlight-soft_80_e0e0e0_1x100.png +0 -0
  180. data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_inset-hard_65_ffffff_1x100.png +0 -0
  181. data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_inset-soft_95_fef1ec_1x100.png +0 -0
  182. data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-icons_8f8f8f_256x240.png +0 -0
  183. data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-icons_97baed_256x240.png +0 -0
  184. data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-icons_cd0a0a_256x240.png +0 -0
  185. data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/jquery-ui-1.8.11.custom.css +0 -573
  186. data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/js/jquery-1.5.1.min.js +0 -16
  187. data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/js/jquery-ui-1.8.11.custom.min.js +0 -783
  188. data/vendor/assets/javascripts/alchemy/rails.js +0 -331
  189. data/vendor/assets/javascripts/alchemy/underscore-1.3.1.js +0 -999
@@ -1,298 +0,0 @@
1
- /**
2
- * @preserve HTML5 Shiv v3.6.2pre | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
3
- */
4
- ;(function(window, document) {
5
- /*jshint evil:true */
6
- /** version */
7
- var version = '3.6.2pre';
8
-
9
- /** Preset options */
10
- var options = window.html5 || {};
11
-
12
- /** Used to skip problem elements */
13
- var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
14
-
15
- /** Not all elements can be cloned in IE **/
16
- var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;
17
-
18
- /** Detect whether the browser supports default html5 styles */
19
- var supportsHtml5Styles;
20
-
21
- /** Name of the expando, to work with multiple documents or to re-shiv one document */
22
- var expando = '_html5shiv';
23
-
24
- /** The id for the the documents expando */
25
- var expanID = 0;
26
-
27
- /** Cached data for each document */
28
- var expandoData = {};
29
-
30
- /** Detect whether the browser supports unknown elements */
31
- var supportsUnknownElements;
32
-
33
- (function() {
34
- try {
35
- var a = document.createElement('a');
36
- a.innerHTML = '<xyz></xyz>';
37
- //if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles
38
- supportsHtml5Styles = ('hidden' in a);
39
-
40
- supportsUnknownElements = a.childNodes.length == 1 || (function() {
41
- // assign a false positive if unable to shiv
42
- (document.createElement)('a');
43
- var frag = document.createDocumentFragment();
44
- return (
45
- typeof frag.cloneNode == 'undefined' ||
46
- typeof frag.createDocumentFragment == 'undefined' ||
47
- typeof frag.createElement == 'undefined'
48
- );
49
- }());
50
- } catch(e) {
51
- supportsHtml5Styles = true;
52
- supportsUnknownElements = true;
53
- }
54
-
55
- }());
56
-
57
- /*--------------------------------------------------------------------------*/
58
-
59
- /**
60
- * Creates a style sheet with the given CSS text and adds it to the document.
61
- * @private
62
- * @param {Document} ownerDocument The document.
63
- * @param {String} cssText The CSS text.
64
- * @returns {StyleSheet} The style element.
65
- */
66
- function addStyleSheet(ownerDocument, cssText) {
67
- var p = ownerDocument.createElement('p'),
68
- parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;
69
-
70
- p.innerHTML = 'x<style>' + cssText + '</style>';
71
- return parent.insertBefore(p.lastChild, parent.firstChild);
72
- }
73
-
74
- /**
75
- * Returns the value of `html5.elements` as an array.
76
- * @private
77
- * @returns {Array} An array of shived element node names.
78
- */
79
- function getElements() {
80
- var elements = html5.elements;
81
- return typeof elements == 'string' ? elements.split(' ') : elements;
82
- }
83
-
84
- /**
85
- * Returns the data associated to the given document
86
- * @private
87
- * @param {Document} ownerDocument The document.
88
- * @returns {Object} An object of data.
89
- */
90
- function getExpandoData(ownerDocument) {
91
- var data = expandoData[ownerDocument[expando]];
92
- if (!data) {
93
- data = {};
94
- expanID++;
95
- ownerDocument[expando] = expanID;
96
- expandoData[expanID] = data;
97
- }
98
- return data;
99
- }
100
-
101
- /**
102
- * returns a shived element for the given nodeName and document
103
- * @memberOf html5
104
- * @param {String} nodeName name of the element
105
- * @param {Document} ownerDocument The context document.
106
- * @returns {Object} The shived element.
107
- */
108
- function createElement(nodeName, ownerDocument, data){
109
- if (!ownerDocument) {
110
- ownerDocument = document;
111
- }
112
- if(supportsUnknownElements){
113
- return ownerDocument.createElement(nodeName);
114
- }
115
- if (!data) {
116
- data = getExpandoData(ownerDocument);
117
- }
118
- var node;
119
-
120
- if (data.cache[nodeName]) {
121
- node = data.cache[nodeName].cloneNode();
122
- } else if (saveClones.test(nodeName)) {
123
- node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
124
- } else {
125
- node = data.createElem(nodeName);
126
- }
127
-
128
- // Avoid adding some elements to fragments in IE < 9 because
129
- // * Attributes like `name` or `type` cannot be set/changed once an element
130
- // is inserted into a document/fragment
131
- // * Link elements with `src` attributes that are inaccessible, as with
132
- // a 403 response, will cause the tab/window to crash
133
- // * Script elements appended to fragments will execute when their `src`
134
- // or `text` property is set
135
- return node.canHaveChildren && !reSkip.test(nodeName) ? data.frag.appendChild(node) : node;
136
- }
137
-
138
- /**
139
- * returns a shived DocumentFragment for the given document
140
- * @memberOf html5
141
- * @param {Document} ownerDocument The context document.
142
- * @returns {Object} The shived DocumentFragment.
143
- */
144
- function createDocumentFragment(ownerDocument, data){
145
- if (!ownerDocument) {
146
- ownerDocument = document;
147
- }
148
- if(supportsUnknownElements){
149
- return ownerDocument.createDocumentFragment();
150
- }
151
- data = data || getExpandoData(ownerDocument);
152
- var clone = data.frag.cloneNode(),
153
- i = 0,
154
- elems = getElements(),
155
- l = elems.length;
156
- for(;i<l;i++){
157
- clone.createElement(elems[i]);
158
- }
159
- return clone;
160
- }
161
-
162
- /**
163
- * Shivs the `createElement` and `createDocumentFragment` methods of the document.
164
- * @private
165
- * @param {Document|DocumentFragment} ownerDocument The document.
166
- * @param {Object} data of the document.
167
- */
168
- function shivMethods(ownerDocument, data) {
169
- if (!data.cache) {
170
- data.cache = {};
171
- data.createElem = ownerDocument.createElement;
172
- data.createFrag = ownerDocument.createDocumentFragment;
173
- data.frag = data.createFrag();
174
- }
175
-
176
-
177
- ownerDocument.createElement = function(nodeName) {
178
- //abort shiv
179
- if (!html5.shivMethods) {
180
- return data.createElem(nodeName);
181
- }
182
- return createElement(nodeName, ownerDocument, data);
183
- };
184
-
185
- ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +
186
- 'var n=f.cloneNode(),c=n.createElement;' +
187
- 'h.shivMethods&&(' +
188
- // unroll the `createElement` calls
189
- getElements().join().replace(/\w+/g, function(nodeName) {
190
- data.createElem(nodeName);
191
- data.frag.createElement(nodeName);
192
- return 'c("' + nodeName + '")';
193
- }) +
194
- ');return n}'
195
- )(html5, data.frag);
196
- }
197
-
198
- /*--------------------------------------------------------------------------*/
199
-
200
- /**
201
- * Shivs the given document.
202
- * @memberOf html5
203
- * @param {Document} ownerDocument The document to shiv.
204
- * @returns {Document} The shived document.
205
- */
206
- function shivDocument(ownerDocument) {
207
- if (!ownerDocument) {
208
- ownerDocument = document;
209
- }
210
- var data = getExpandoData(ownerDocument);
211
-
212
- if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {
213
- data.hasCSS = !!addStyleSheet(ownerDocument,
214
- // corrects block display not defined in IE6/7/8/9
215
- 'article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}' +
216
- // adds styling not present in IE6/7/8/9
217
- 'mark{background:#FF0;color:#000}'
218
- );
219
- }
220
- if (!supportsUnknownElements) {
221
- shivMethods(ownerDocument, data);
222
- }
223
- return ownerDocument;
224
- }
225
-
226
- /*--------------------------------------------------------------------------*/
227
-
228
- /**
229
- * The `html5` object is exposed so that more elements can be shived and
230
- * existing shiving can be detected on iframes.
231
- * @type Object
232
- * @example
233
- *
234
- * // options can be changed before the script is included
235
- * html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false };
236
- */
237
- var html5 = {
238
-
239
- /**
240
- * An array or space separated string of node names of the elements to shiv.
241
- * @memberOf html5
242
- * @type Array|String
243
- */
244
- 'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video',
245
-
246
- /**
247
- * current version of html5shiv
248
- */
249
- 'version': version,
250
-
251
- /**
252
- * A flag to indicate that the HTML5 style sheet should be inserted.
253
- * @memberOf html5
254
- * @type Boolean
255
- */
256
- 'shivCSS': (options.shivCSS !== false),
257
-
258
- /**
259
- * Is equal to true if a browser supports creating unknown/HTML5 elements
260
- * @memberOf html5
261
- * @type boolean
262
- */
263
- 'supportsUnknownElements': supportsUnknownElements,
264
-
265
- /**
266
- * A flag to indicate that the document's `createElement` and `createDocumentFragment`
267
- * methods should be overwritten.
268
- * @memberOf html5
269
- * @type Boolean
270
- */
271
- 'shivMethods': (options.shivMethods !== false),
272
-
273
- /**
274
- * A string to describe the type of `html5` object ("default" or "default print").
275
- * @memberOf html5
276
- * @type String
277
- */
278
- 'type': 'default',
279
-
280
- // shivs the document according to the specified `html5` object options
281
- 'shivDocument': shivDocument,
282
-
283
- //creates a shived element
284
- createElement: createElement,
285
-
286
- //creates a shived documentFragment
287
- createDocumentFragment: createDocumentFragment
288
- };
289
-
290
- /*--------------------------------------------------------------------------*/
291
-
292
- // expose html5
293
- window.html5 = html5;
294
-
295
- // shiv the document
296
- shivDocument(document);
297
-
298
- }(this, document));