common-interface 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (143) hide show
  1. data/Rakefile +66 -0
  2. data/lib/common_interface.rb +39 -0
  3. data/lib/common_interface/README.md +51 -0
  4. data/lib/common_interface/demo/basic.rb +96 -0
  5. data/lib/common_interface/demo/site.rb +10 -0
  6. data/lib/common_interface/demo/view_helper.rb +17 -0
  7. data/lib/common_interface/public/common_interface/asset_packages.yml +89 -0
  8. data/lib/common_interface/public/common_interface/images/img1.jpg +0 -0
  9. data/lib/common_interface/public/common_interface/images/img1_200.jpg +0 -0
  10. data/lib/common_interface/public/common_interface/images/img1_icon.jpg +0 -0
  11. data/lib/common_interface/public/common_interface/images/img1_thumb.jpg +0 -0
  12. data/lib/common_interface/public/common_interface/images/img2.jpg +0 -0
  13. data/lib/common_interface/public/common_interface/images/img2_200.jpg +0 -0
  14. data/lib/common_interface/public/common_interface/images/img2_icon.jpg +0 -0
  15. data/lib/common_interface/public/common_interface/images/img2_thumb.jpg +0 -0
  16. data/lib/common_interface/public/common_interface/images/img3.jpg +0 -0
  17. data/lib/common_interface/public/common_interface/images/img3_200.jpg +0 -0
  18. data/lib/common_interface/public/common_interface/images/img3_icon.jpg +0 -0
  19. data/lib/common_interface/public/common_interface/images/img3_thumb.jpg +0 -0
  20. data/lib/common_interface/public/common_interface/images/video_icon.png +0 -0
  21. data/lib/common_interface/public/common_interface/js/aspects.js +0 -0
  22. data/lib/common_interface/public/common_interface/js/basic.js +229 -0
  23. data/lib/common_interface/public/common_interface/js/files_upload.js +115 -0
  24. data/lib/common_interface/public/common_interface/js/items.js +118 -0
  25. data/lib/common_interface/public/common_interface/js/style.js +50 -0
  26. data/lib/common_interface/public/common_interface/lib/jquery.elastic.js +117 -0
  27. data/lib/common_interface/public/common_interface/lib/jquery.fancybox/blank.gif +0 -0
  28. data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_close.png +0 -0
  29. data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_loading.png +0 -0
  30. data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_nav_left.png +0 -0
  31. data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_nav_right.png +0 -0
  32. data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_shadow_e.png +0 -0
  33. data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_shadow_n.png +0 -0
  34. data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_shadow_ne.png +0 -0
  35. data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_shadow_nw.png +0 -0
  36. data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_shadow_s.png +0 -0
  37. data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_shadow_se.png +0 -0
  38. data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_shadow_sw.png +0 -0
  39. data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_shadow_w.png +0 -0
  40. data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_title_left.png +0 -0
  41. data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_title_main.png +0 -0
  42. data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_title_over.png +0 -0
  43. data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancy_title_right.png +0 -0
  44. data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancybox-x.png +0 -0
  45. data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancybox-y.png +0 -0
  46. data/lib/common_interface/public/common_interface/lib/jquery.fancybox/fancybox.png +0 -0
  47. data/lib/common_interface/public/common_interface/lib/jquery.fancybox/jquery.easing-1.3.pack.js +72 -0
  48. data/lib/common_interface/public/common_interface/lib/jquery.fancybox/jquery.fancybox-1.3.1.js +1077 -0
  49. data/lib/common_interface/public/common_interface/lib/jquery.fancybox/jquery.fancybox.css +363 -0
  50. data/lib/common_interface/public/common_interface/lib/jquery.fancybox/jquery.fancybox.js +44 -0
  51. data/lib/common_interface/public/common_interface/lib/jquery.fancybox/jquery.mousewheel-3.0.2.pack.js +13 -0
  52. data/lib/common_interface/public/common_interface/lib/jquery.form.js +660 -0
  53. data/lib/common_interface/public/common_interface/lib/jquery.hoverIntent.js +111 -0
  54. data/lib/common_interface/public/common_interface/lib/jquery.jgrowl/jquery.jgrowl.css +128 -0
  55. data/lib/common_interface/public/common_interface/lib/jquery.jgrowl/jquery.jgrowl.js +307 -0
  56. data/lib/common_interface/public/common_interface/lib/jquery.js +4376 -0
  57. data/lib/common_interface/public/common_interface/lib/jquery.json.js +178 -0
  58. data/lib/common_interface/public/common_interface/lib/jquery.swfupload/cancel.png +0 -0
  59. data/lib/common_interface/public/common_interface/lib/jquery.swfupload/jquery.swfupload.js +64 -0
  60. data/lib/common_interface/public/common_interface/lib/jquery.swfupload/style.css +8 -0
  61. data/lib/common_interface/public/common_interface/lib/jquery.swfupload/swfupload/swfupload.js +980 -0
  62. data/lib/common_interface/public/common_interface/lib/jquery.swfupload/swfupload/swfupload.queue.js +98 -0
  63. data/lib/common_interface/public/common_interface/lib/jquery.swfupload/swfupload/swfupload.swf +0 -0
  64. data/lib/common_interface/public/common_interface/lib/jquery.swfupload/swfupload/wdp_buttons_upload_61x22.png +0 -0
  65. data/lib/common_interface/public/common_interface/lib/jquery.template.js +255 -0
  66. data/lib/common_interface/public/common_interface/lib/jquery.ui/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
  67. data/lib/common_interface/public/common_interface/lib/jquery.ui/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
  68. data/lib/common_interface/public/common_interface/lib/jquery.ui/images/ui-bg_flat_10_000000_40x100.png +0 -0
  69. data/lib/common_interface/public/common_interface/lib/jquery.ui/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
  70. data/lib/common_interface/public/common_interface/lib/jquery.ui/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
  71. data/lib/common_interface/public/common_interface/lib/jquery.ui/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  72. data/lib/common_interface/public/common_interface/lib/jquery.ui/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
  73. data/lib/common_interface/public/common_interface/lib/jquery.ui/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
  74. data/lib/common_interface/public/common_interface/lib/jquery.ui/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
  75. data/lib/common_interface/public/common_interface/lib/jquery.ui/images/ui-icons_222222_256x240.png +0 -0
  76. data/lib/common_interface/public/common_interface/lib/jquery.ui/images/ui-icons_228ef1_256x240.png +0 -0
  77. data/lib/common_interface/public/common_interface/lib/jquery.ui/images/ui-icons_ef8c08_256x240.png +0 -0
  78. data/lib/common_interface/public/common_interface/lib/jquery.ui/images/ui-icons_ffd27a_256x240.png +0 -0
  79. data/lib/common_interface/public/common_interface/lib/jquery.ui/images/ui-icons_ffffff_256x240.png +0 -0
  80. data/lib/common_interface/public/common_interface/lib/jquery.ui/jquery.ui.css +406 -0
  81. data/lib/common_interface/public/common_interface/lib/jquery.ui/jquery.ui.js +71 -0
  82. data/lib/common_interface/public/common_interface/themes/default/_aspects.scss +58 -0
  83. data/lib/common_interface/public/common_interface/themes/default/_basic.scss +228 -0
  84. data/lib/common_interface/public/common_interface/themes/default/_components.scss +151 -0
  85. data/lib/common_interface/public/common_interface/themes/default/_custom_reset.scss +12 -0
  86. data/lib/common_interface/public/common_interface/themes/default/_elastic.scss +72 -0
  87. data/lib/common_interface/public/common_interface/themes/default/_items.scss +88 -0
  88. data/lib/common_interface/public/common_interface/themes/default/_mixins.scss +39 -0
  89. data/lib/common_interface/public/common_interface/themes/default/_special.scss +34 -0
  90. data/lib/common_interface/public/common_interface/themes/default/_variables.scss +15 -0
  91. data/lib/common_interface/public/common_interface/themes/default/_yui_reset.scss +127 -0
  92. data/lib/common_interface/public/common_interface/themes/default/elastic.js +307 -0
  93. data/lib/common_interface/public/common_interface/themes/default/elastic.print.css +8 -0
  94. data/lib/common_interface/public/common_interface/themes/default/reset.css +157 -0
  95. data/lib/common_interface/public/common_interface/themes/default/reset.scss +5 -0
  96. data/lib/common_interface/public/common_interface/themes/default/style.css +580 -0
  97. data/lib/common_interface/public/common_interface/themes/default/style.js +84 -0
  98. data/lib/common_interface/public/common_interface/themes/default/style.scss +11 -0
  99. data/lib/common_interface/public/common_interface/themes/simple_organization/_fixes.scss +130 -0
  100. data/lib/common_interface/public/common_interface/themes/simple_organization/_original.scss +852 -0
  101. data/lib/common_interface/public/common_interface/themes/simple_organization/img/comment-arrow.gif +0 -0
  102. data/lib/common_interface/public/common_interface/themes/simple_organization/img/comment-gravatar.gif +0 -0
  103. data/lib/common_interface/public/common_interface/themes/simple_organization/img/comment-reply.gif +0 -0
  104. data/lib/common_interface/public/common_interface/themes/simple_organization/img/logo-small.gif +0 -0
  105. data/lib/common_interface/public/common_interface/themes/simple_organization/img/logo.gif +0 -0
  106. data/lib/common_interface/public/common_interface/themes/simple_organization/img/main-two-columns-left.gif +0 -0
  107. data/lib/common_interface/public/common_interface/themes/simple_organization/img/main-two-columns.gif +0 -0
  108. data/lib/common_interface/public/common_interface/themes/simple_organization/img/sample-event.jpg +0 -0
  109. data/lib/common_interface/public/common_interface/themes/simple_organization/img/sample-gravatar.gif +0 -0
  110. data/lib/common_interface/public/common_interface/themes/simple_organization/img/sample-image.jpg +0 -0
  111. data/lib/common_interface/public/common_interface/themes/simple_organization/img/sample-thumbnail.jpg +0 -0
  112. data/lib/common_interface/public/common_interface/themes/simple_organization/original/archives.html +389 -0
  113. data/lib/common_interface/public/common_interface/themes/simple_organization/original/comments.html +486 -0
  114. data/lib/common_interface/public/common_interface/themes/simple_organization/original/empty-page.html +107 -0
  115. data/lib/common_interface/public/common_interface/themes/simple_organization/original/img/comment-arrow.gif +0 -0
  116. data/lib/common_interface/public/common_interface/themes/simple_organization/original/img/comment-gravatar.gif +0 -0
  117. data/lib/common_interface/public/common_interface/themes/simple_organization/original/img/comment-reply.gif +0 -0
  118. data/lib/common_interface/public/common_interface/themes/simple_organization/original/img/logo-small.gif +0 -0
  119. data/lib/common_interface/public/common_interface/themes/simple_organization/original/img/logo.gif +0 -0
  120. data/lib/common_interface/public/common_interface/themes/simple_organization/original/img/main-two-columns-left.gif +0 -0
  121. data/lib/common_interface/public/common_interface/themes/simple_organization/original/img/main-two-columns.gif +0 -0
  122. data/lib/common_interface/public/common_interface/themes/simple_organization/original/img/sample-event.jpg +0 -0
  123. data/lib/common_interface/public/common_interface/themes/simple_organization/original/img/sample-gravatar.gif +0 -0
  124. data/lib/common_interface/public/common_interface/themes/simple_organization/original/img/sample-image.jpg +0 -0
  125. data/lib/common_interface/public/common_interface/themes/simple_organization/original/img/sample-thumbnail.jpg +0 -0
  126. data/lib/common_interface/public/common_interface/themes/simple_organization/original/index.html +307 -0
  127. data/lib/common_interface/public/common_interface/themes/simple_organization/original/left-sidebar.html +307 -0
  128. data/lib/common_interface/public/common_interface/themes/simple_organization/original/no-subnavigation.html +290 -0
  129. data/lib/common_interface/public/common_interface/themes/simple_organization/original/single-column.html +209 -0
  130. data/lib/common_interface/public/common_interface/themes/simple_organization/original/style-demo.html +355 -0
  131. data/lib/common_interface/public/common_interface/themes/simple_organization/original/style.css +658 -0
  132. data/lib/common_interface/public/common_interface/themes/simple_organization/style.css +965 -0
  133. data/lib/common_interface/public/common_interface/themes/simple_organization/style.scss +2 -0
  134. data/lib/common_interface/public/common_interface/themes/simple_organization/tmp/comments.html +486 -0
  135. data/lib/common_interface/public/common_interface/themes/simple_organization/tmp/tmp.html +307 -0
  136. data/lib/common_interface/tmp/html.html +39 -0
  137. data/lib/common_interface/tmp/js.js +78 -0
  138. data/lib/common_interface/view_helper.rb +52 -0
  139. data/readme.md +49 -0
  140. data/spec/basic_spec.rb +63 -0
  141. data/spec/helper.rb +8 -0
  142. data/spec/spec.opts +4 -0
  143. metadata +221 -0
@@ -0,0 +1,12 @@
1
+ /* Custom Reset */
2
+ h1 {@include h1;}
3
+ h2 {@include h2;}
4
+ a {
5
+ color: $color;
6
+ text-decoration: none;
7
+ &:visited {color: $color;}
8
+ }
9
+ .as_link {@include as_link;}
10
+
11
+ /* Reset Elastic */
12
+ p, fieldset, table, pre {margin-bottom: 0px;}
@@ -0,0 +1,72 @@
1
+ /*
2
+ Elastic CSS Framework
3
+ Released under the MIT, BSD, and GPL Licenses.
4
+ More information http://delasticss.com
5
+
6
+ @author Fernando Trasviña (@azendal)
7
+ @core team Sergio de la Garza (@sgarza), Javier Ayala (@javi_ayala)
8
+ */
9
+ .dunit:after, .dcontainer:after, .dcolumns:after, .dcolumn:after, .dclearfix:after {
10
+ content: " ";
11
+ display: block;
12
+ height: 0;
13
+ clear: both;
14
+ visibility: hidden; }
15
+
16
+ .dunit, .dcontainer, .dcolumns, .dcolumn, .dclearfix {
17
+ display: block;
18
+ *zoom: 1;
19
+ *display: inline-block; }
20
+
21
+ .dfull-height {
22
+ display: block; }
23
+
24
+ .dsame-height {
25
+ display: block; }
26
+
27
+ .ddelastic-height {
28
+ height: 0; }
29
+
30
+ .dhorizontal-center {
31
+ margin: 0 auto; }
32
+
33
+ .dvertical-center {
34
+ /* margin:auto 0; */
35
+ display: block; }
36
+
37
+ .dcenter {
38
+ /* margin:auto */
39
+ margin: 0 auto; }
40
+
41
+ .dcolumn {
42
+ float: left; }
43
+
44
+ .dcolumn.dfinal {
45
+ display: block; }
46
+
47
+ .dcolumn.dfixed {
48
+ width: auto; }
49
+
50
+ .dcolumn.delastic {
51
+ display: block; }
52
+
53
+ .dinverted > .dcolumn, .dinverted > .dcontainer > .dcolumn {
54
+ float: right; }
55
+
56
+ .don-2.dcolumns > .dcolumn:not(.dfixed), .don-2.dcolumns > .dcontainer > .dcolumn:not(.dfixed) {
57
+ width: 50%; }
58
+
59
+ .don-3.dcolumns > .dcolumn:not(.dfixed), .don-3.dcolumns > .dcontainer > .dcolumn:not(.dfixed) {
60
+ width: 33.33%; }
61
+
62
+ .don-3.dcolumns > .dcolumn.dspan-2, .don-3.dcolumns > .dcontainer > .dcolumn.dspan-2 {
63
+ width: 66.66%; }
64
+
65
+ .don-4.dcolumns > .dcolumn:not(.dfixed), .don-4.dcolumns > .dcontainer > .dcolumn:not(.dfixed) {
66
+ width: 25%; }
67
+
68
+ .don-4.dcolumns > .dcolumn.dspan-2, .don-4.dcolumns > .dcontainer > .dcolumn.dspan-2 {
69
+ width: 50%; }
70
+
71
+ .don-4.dcolumns > .dcolumn.dspan-3, .don-4.dcolumns > .dcontainer > .dcolumn.dspan-2 {
72
+ width: 75%; }
@@ -0,0 +1,88 @@
1
+ /* selector */
2
+ .dselector {
3
+ .dtext a {@include as_link}
4
+ }
5
+
6
+ /* list */
7
+ .dlist {
8
+ .dcontrols {
9
+ @include small_text;
10
+ margin-left: $big_step;
11
+
12
+ a {@include as_link;}
13
+ }
14
+ }
15
+
16
+ /* file */
17
+ .dfile_item {
18
+ .ddetails {
19
+ margin-left: $step;
20
+
21
+ .dtitle {font-weight: bold;}
22
+ a {@include as_link}
23
+ }
24
+ }
25
+
26
+ /* thumb */
27
+ .dthumb_item {
28
+ float: left;
29
+ min-width: 150px;
30
+ min-height: 150px;
31
+ padding-right: $step;
32
+
33
+ .dhover_controls {@include small_text}
34
+ .dtitle {
35
+ @include small_text;
36
+ max-width: 150px;
37
+ }
38
+ }
39
+
40
+ /* line */
41
+ .dline_item {
42
+ .dicon {margin-right: $step;}
43
+ .ditem_tags {margin: 0px;}
44
+ .dsingle_line {
45
+ .ditem_tags {
46
+ margin-right: $step;
47
+ float: left;
48
+ }
49
+ }
50
+ }
51
+
52
+ /* user */
53
+ .duser {
54
+ .dproperties {margin-top: $step;}
55
+ }
56
+
57
+ /* item */
58
+ .dselectable_item {
59
+ padding-top: $step;
60
+ padding-bottom: $step;
61
+ border: #{$small_step} solid #{$inverse_color};
62
+ }
63
+
64
+ .dselectable_item_padding {
65
+ padding-left: $step;
66
+ padding-right: $step;
67
+ }
68
+
69
+ .dselectable_item_hover {border-color: $very_light_color;}
70
+
71
+ /* page */
72
+ .dpage {
73
+ ._container h1.item_title{@include h2}
74
+ }
75
+
76
+ /* folder */
77
+
78
+ /* note */
79
+
80
+ /* list */
81
+
82
+ /* list item */
83
+ .dtask_list_item {padding: $small_step;}
84
+
85
+ .dfinishedlist_item {
86
+ div, a {@include small_text}
87
+ .dcontent {text-decoration: line-through;}
88
+ }
@@ -0,0 +1,39 @@
1
+ /* Styles */
2
+ @mixin small_text {font-size: 90%;}
3
+ @mixin medium_text {
4
+ font-size: 110%;
5
+ font-weight: bold;
6
+ }
7
+ @mixin big_text {
8
+ font-size: 180%;
9
+ font-weight: bold;
10
+ }
11
+ @mixin h1 {
12
+ @include big_text;
13
+ margin-top: 0px;
14
+ margin-bottom: $big_step;
15
+ }
16
+
17
+ @mixin h2 {
18
+ font-size: 120%;
19
+ font-weight: bold;
20
+ margin-top: 0px;
21
+ margin-bottom: $step;
22
+ }
23
+
24
+ @mixin overflow {
25
+ position: absolute;
26
+ z-index: 1;
27
+ }
28
+
29
+ @mixin controls {
30
+ font-size: 100%;
31
+
32
+ a {@include as_link;}
33
+ }
34
+
35
+ @mixin as_link {
36
+ color: $select_color;
37
+ text-decoration: underline;
38
+ &:visited {color: $select_color;}
39
+ }
@@ -0,0 +1,34 @@
1
+ ._inline {display: inline;}
2
+
3
+ ._space {margin-bottom: $step;}
4
+
5
+ ._highlight {
6
+ background: $light_yellow_color;
7
+ padding-left: $step;
8
+ padding-right: $step;
9
+ }
10
+
11
+ ._tiny {
12
+ color: $light_color !important;
13
+ a {color: $light_color !important;}
14
+ }
15
+
16
+ ._hidden {display: none;}
17
+
18
+ /* Styles */
19
+ ._markup {
20
+ object {
21
+ clear: both;
22
+ display: block;
23
+ margin-bottom: $step;
24
+ }
25
+
26
+ .clear {clear: both;}
27
+ .space {clear: both;}
28
+
29
+ table tr td {
30
+ vertical-align: top;
31
+ }
32
+ }
33
+
34
+ ._clear {clear: both;}
@@ -0,0 +1,15 @@
1
+ /* Distance */
2
+ $small_step: 1px;
3
+ $step: 5px;
4
+ $big_step: 10px;
5
+
6
+ /* Colors */
7
+ $color: black;
8
+ $select_color: #2a5db0;
9
+ $inverse_color: white;
10
+ $light_color: #cccccc;
11
+ $very_light_color: #efefef;
12
+ $red_color: #dd0000;
13
+ $light_red_color: #eebbbb;
14
+ $yellow_color: #dddd00;
15
+ $light_yellow_color: #eeeebb;
@@ -0,0 +1,127 @@
1
+ /*
2
+ Copyright (c) 2008, Yahoo! Inc. All rights reserved.
3
+ Code licensed under the BSD License:
4
+ http://developer.yahoo.net/yui/license.txt
5
+ version: 3.0.0pr1
6
+ */
7
+
8
+ /*html {
9
+ color: #000;
10
+ background: #FFF; }*/
11
+
12
+ body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, textarea, p, blockquote, th, td {
13
+ margin: 0;
14
+ padding: 0; }
15
+
16
+ table {
17
+ border-collapse: collapse;
18
+ border-spacing: 0; }
19
+
20
+ fieldset, img {
21
+ border: 0; }
22
+
23
+ address, caption, cite, code, dfn, em, strong, th, var {
24
+ font-style: normal;
25
+ font-weight: normal; }
26
+
27
+ li {
28
+ list-style: none; }
29
+
30
+ caption, th {
31
+ text-align: left; }
32
+
33
+ h1, h2, h3, h4, h5, h6 {
34
+ font-size: 100%;
35
+ font-weight: normal; }
36
+
37
+ q:before, q:after {
38
+ content: ''; }
39
+
40
+ abbr, acronym {
41
+ border: 0;
42
+ font-variant: normal; }
43
+
44
+ sup {
45
+ vertical-align: text-top; }
46
+
47
+ sub {
48
+ vertical-align: text-bottom; }
49
+
50
+ input, textarea, select {
51
+ font-family: inherit;
52
+ font-size: inherit;
53
+ font-weight: inherit; }
54
+
55
+ input, textarea, select {
56
+ *font-size: 100%; }
57
+
58
+ legend {
59
+ color: #000; }
60
+
61
+ h1 {
62
+ font-size: 138.5%; }
63
+
64
+ h2 {
65
+ font-size: 123.1%; }
66
+
67
+ h3 {
68
+ font-size: 108%; }
69
+
70
+ h1, h2, h3 {
71
+ margin: 1em 0; }
72
+
73
+ h1, h2, h3, h4, h5, h6, strong {
74
+ font-weight: bold; }
75
+
76
+ abbr, acronym {
77
+ border-bottom: 1px dotted #000;
78
+ cursor: help; }
79
+
80
+ em {
81
+ font-style: italic; }
82
+
83
+ blockquote, ul, ol, dl {
84
+ margin: 1em; }
85
+
86
+ ol, ul, dl {
87
+ margin-left: 2em; }
88
+
89
+ ol li {
90
+ list-style: decimal outside; }
91
+
92
+ ul li {
93
+ list-style: disc outside; }
94
+
95
+ dl dd {
96
+ margin-left: 1em; }
97
+
98
+ th {
99
+ font-weight: bold;
100
+ text-align: center; }
101
+
102
+ caption {
103
+ margin-bottom: .5em;
104
+ text-align: center; }
105
+
106
+ p, fieldset, table, pre {
107
+ margin-bottom: 1em; }
108
+
109
+ input[type=text], input[type=password], textarea {
110
+ width: 12.25em;
111
+ *width: 11.9em; }
112
+
113
+ body {
114
+ font: 13px/1.231 arial,helvetica,clean,sans-serif;
115
+ *font-size: small;
116
+ *font: x-small; }
117
+
118
+ select, input, button, textarea {
119
+ font: 99% arial,helvetica,clean,sans-serif; }
120
+
121
+ table {
122
+ font-size: inherit;
123
+ font: 100%; }
124
+
125
+ pre, code, kbd, samp, tt {
126
+ font-family: monospace;
127
+ *font-size: 108%; }
@@ -0,0 +1,307 @@
1
+ /*
2
+ Elastic CSS Framework
3
+ Released under the MIT, BSD, and GPL Licenses.
4
+ More information http://www.elasticss.com
5
+
6
+ Elastic Engine Module
7
+ Provides
8
+ Pixel rounding
9
+ Calculations
10
+ Helpers
11
+ Events
12
+ Configuration
13
+
14
+ @author Fernando Trasviña (@azendal)
15
+ @core team Sergio de la Garza (@sgarza), Javier Ayala (@javi_ayala)
16
+ @copyright 2009 Elastic CSS framework
17
+ @version 2.0.3
18
+ */
19
+ (function($){
20
+ var CStyle = function (element, pseudoElement) {
21
+ if (window.getComputedStyle){
22
+ return window.getComputedStyle(element, pseudoElement);
23
+ }
24
+ else{
25
+ return element.currentStyle;
26
+ }
27
+ };
28
+
29
+ var width = function(element){
30
+ var width = CStyle(element).width;
31
+ if(width == 'auto' || width.indexOf('px') < 0){
32
+ return $(element).width();
33
+ }else{
34
+ return parseFloat(width);
35
+ }
36
+ };
37
+
38
+ window.Elastic = function Elastic(context){
39
+ var r,ra,i,j,k,l,il,jl,kl,ll,
40
+ econs, econ, econw, econclass, ecols, ecol, ecolclass, eg, egml, egcl, egnl, ecrw, ecw, escol, rp, ig,
41
+ efcs, efcsw, eecs, eecsw, eecw, eecrw, ecs, ecsw, ec, ecclass, eecfw,
42
+ ecolminw, ecolmaxw,
43
+ egreg = /(^|\s+)don\-(\d+)(\s+|$)/,
44
+ esreg = /(^|\s+)dspan\-(\d+)(\s+|$)/,
45
+ eareg = /(^|\s+)dadaptive\-(\d+)\-(\d+)(\s+|$)/;
46
+
47
+ eg = [];
48
+ egcl = egnl = 0;
49
+
50
+ econs = $.find('.dcolumns', context);
51
+ for(i = 0, il = econs.length; i < il; i++){
52
+ econ = econs[i];
53
+ econclass = econ.className;
54
+ if(econclass.indexOf('on-') > -1 && egreg.test(econclass)){ egml = Number(RegExp.$2);}
55
+ else{ egml = $.find('> .dcolumn, > .dcontainer > .dcolumn', econ).length; }
56
+ econ = $.find('> .dcontainer', econ)[0] || econ;
57
+ econw = width(econ);
58
+ ecrw = econw / egml;
59
+ ecw = Math.round( ecrw );
60
+
61
+ if(econclass.indexOf('dadaptive-') > -1 && eareg.test(econclass)){
62
+ ecolminw = Number(RegExp.$2);
63
+ ecolmaxw = Number(RegExp.$3);
64
+
65
+ if(ecw > ecolmaxw){
66
+ while(ecw > ecolmaxw){
67
+ egml = egml + 1;
68
+ ecrw = econw / egml;
69
+ ecw = Math.round( ecrw );
70
+ }
71
+ }
72
+ else if(ecw < ecolminw){
73
+ while(ecw < ecolminw){
74
+ egml = egml - 1;
75
+ ecrw = econw / egml;
76
+ ecw = Math.round( ecrw );
77
+ }
78
+ }
79
+ }
80
+
81
+ ecols = $.find('> .dcolumn', econ);
82
+ for(j = 0, jl = ecols.length; j < jl; j++){
83
+ efcs = []; eecs = []; ecs = [];
84
+ rp = ig = efcsw = ecsw = 0;
85
+ ecol = ecols[j];
86
+ ecolclass = ecol.className;
87
+ escol = 1;
88
+ if(ecolclass.indexOf('span-') > -1 && esreg.test(ecolclass)){ escol = Number(RegExp.$2); }
89
+ ecol.escol = escol = ( (escol <= egml) ? escol : egml);
90
+ egnl += escol;
91
+
92
+ if(egnl == egml || j == (jl - 1) || ecolclass.indexOf('dfinal') > -1){ eg.push(ecol); egcl = 0; rp = 1; }
93
+ else if(egnl < egml){ eg.push(ecol); egcl = egnl; }
94
+ else if(egnl > egml){ egcl = escol; rp = 1; ig = 1; }
95
+
96
+ if(rp){
97
+ for(k = 0, kl = eg.length; k < kl; k++){
98
+ ec = eg[k];
99
+ ecclass = ec.className;
100
+ if( ecclass.indexOf('dfixed') > -1){ efcs.push(ec); efcsw += width(ec); }
101
+ else if(ecclass.indexOf('delastic') > -1){ eecs.push(ec); }
102
+ else {
103
+ ecs.push(ec);
104
+ if(ec == eg[kl - 1]){
105
+ ec.style.width = Math.round(ecrw * ec.escol) + 'px';
106
+ }
107
+ else{
108
+ ec.style.width = Math.round(ecw * ec.escol) + 'px';
109
+ }
110
+ ecsw = ecsw + width(ec);
111
+ }
112
+ }
113
+ ll = eecs.length;
114
+ if(ll > 0){
115
+ eecfw = econw - ( ecsw + efcsw );
116
+ if(eecfw <= 0){ continue; }
117
+ eecrw = eecfw / ll;
118
+ eecw = Math.round( eecrw );
119
+ eecsw = eecw * ll;
120
+
121
+ for(l=0; l<ll; l++){ eecs[l].style.width = eecw + 'px'; }
122
+
123
+ if(eecsw > eecfw){
124
+ ra = eecsw - eecfw + 1;
125
+ for(r = 1; r < ra; r++){
126
+ eecs[eecs.length - r].style.width = (eecw - 1) + 'px';
127
+ }
128
+ }
129
+ else if(eecsw < eecfw){
130
+ ra = eecfw - eecsw + 1;
131
+ for(r = 1; r < ra; r++){
132
+ eecs[eecs.length - r].style.width = (eecw + 1) + 'px';
133
+ }
134
+ }
135
+ var tcw = 0;
136
+ for(var f = 0; f < ll - 1; f++){ tcw += Number(eecs[f].style.width.replace('px','')); }
137
+ eecs[ll-1].style.width = ( econw - ( ecsw + efcsw + (tcw) ) ) + 'px';
138
+ }
139
+ else if(ecol.escol == egml && efcs.length === 0){
140
+ ecol.style.width = econw + 'px';
141
+ }
142
+ else if(ecs.length > 0 && efcs.length === 0 && egnl == egml){
143
+ if(ecsw > econw){
144
+ ra = ecsw - econw + 1;
145
+ for(r = 1; r < ra; r++){
146
+ ecs[ecs.length - r].style.width = ( (ecw - 1) * ecs[ecs.length - r].escol ) + 'px';
147
+ }
148
+ }
149
+ else if(ecsw < econw){
150
+ ra = econw - ecsw + 1;
151
+ for(r = 1; r < ra; r++){
152
+ ecs[ecs.length - r].style.width = ( (ecw + 1) * ecs[ecs.length - r].escol ) + 'px';
153
+ }
154
+ }
155
+ var tcw = 0;
156
+ for(var f = 0; f < ecs.length - 1; f++){ tcw += Number(ecs[f].style.width.replace('px','')); }
157
+ ec.style.width = ( econw - ( tcw ) ) + 'px';
158
+ }
159
+ else if(egnl < egml && ecolclass.indexOf('dfinal') > -1){
160
+ ecol.style['margin' + ( (econclass.indexOf('dinverted') > -1) ? 'Left' : 'Right')] = (econw - ecsw - efcsw) + 'px';
161
+ }
162
+ eg = []; egnl = 0;
163
+ }
164
+ if(ig){eg = [ecol]; egnl = escol;}
165
+ }
166
+ }
167
+ for(i in Elastic.helpers){
168
+ if(Elastic.helpers.hasOwnProperty(i)){
169
+ Elastic.helpers[i](context);
170
+ }
171
+ }
172
+ };
173
+
174
+ var Elastic = window.Elastic;
175
+
176
+ Elastic.version = '2.0.3';
177
+
178
+ Elastic.reset = function Elastic_reset(context){
179
+ var doc = $(document);
180
+ doc.trigger('elastic:beforeReset');
181
+ var i,w,wl,h,hl,p,pl,m,ml;
182
+ h = $.find('.dsame-height > *, .dfull-height, .delastic-height', context);
183
+ for(i = 0, hl = h.length; i < hl; i++){h[i].style.height = '';}
184
+ p = $.find('.dvertical-center, .dcenter, .bottom', context);
185
+ for(i = 0, pl = p.length; i < pl; i++){p[i].parentNode.style.paddingTop = ''; p[i].parentNode.style.height = '';}
186
+ w = $.find('.dcolumn:not(.dfixed), .full-width', context);
187
+ for(i = 0, wl = w.length; i < wl; i++){w[i].style.width = '';}
188
+ m = $.find('.dcolumn.dfinal', context);
189
+ for(i = 0, ml = m.length; i < ml; i++){m[i].style.marginLeft = ''; m[i].style.marginRight = '';}
190
+ doc.trigger('elastic:reset');
191
+ };
192
+
193
+ // Original Code
194
+ //
195
+ // Elastic.refresh = function Elastic_refresh(context){
196
+ // var doc = $(document);
197
+ // doc.trigger('elastic:beforeRefresh');
198
+ // Elastic.reset(context);
199
+ // Elastic(context);
200
+ // doc.trigger('elastic:refresh');
201
+ // };
202
+
203
+ Elastic.refresh = function Elastic_refresh(context){
204
+ var doc = $(document);
205
+ doc.trigger('elastic:beforeRefresh');
206
+ Elastic.reset(context);
207
+ Elastic(context);
208
+ doc.trigger('elastic:refresh');
209
+ };
210
+
211
+ Elastic.configuration = {
212
+ refreshOnResize : true
213
+ };
214
+
215
+ Elastic.helpers = {
216
+ 'full-width' : function Elastic_helper_fullWidth(context){
217
+ var i, $el;
218
+ var els = $.find('.full-width', context);
219
+ var elsl = els.length;
220
+
221
+ for(i = 0; i < elsl; i++){
222
+ $el = $(els[i]);
223
+ $el.width( $el.parent().width() - ( $el.outerWidth(true) - $el.width() ) );
224
+ }
225
+ },
226
+ 'dsame-height' : function Elastic_helper_sameHeight(context){
227
+ $('.dsame-height', context).each(function(){
228
+ var columns = $('> *', this);
229
+ var maxHeight = 0;
230
+ columns.each(function(){
231
+ var currentHeight = $(this).outerHeight(true);
232
+ maxHeight = (maxHeight > currentHeight) ? maxHeight : currentHeight;
233
+ }).each(function(){
234
+ $(this).css('height', maxHeight);
235
+ });
236
+ });
237
+ },
238
+ 'dfull-height' : function Elastic_helper_fullHeight(context){
239
+ $('.dfull-height', context).each(function(){
240
+ var _this = $(this);
241
+ _this.css('height', $(this.parentNode).height() - ( _this.outerHeight(true) - _this.height() ));
242
+ });
243
+ },
244
+ 'delastic-height' : function Elastic_helper_elasticHeight(context){
245
+ $('.delastic-height', context).each(function(){
246
+ var _this = $(this);
247
+ var h = 0;
248
+ $('> *:not(.delastic-height)', this.parentNode).each(function(){
249
+ h += $(this).outerHeight(true);
250
+ });
251
+ _this.css('height', Math.round(_this.parent().height() - h));
252
+ Elastic.refresh(this);
253
+ });
254
+ },
255
+ 'dcenter' : function Elastic_helper_center(context){
256
+ $('.dvertical-center, .dcenter', context).each(function(){
257
+ var parentNode = $(this.parentNode);
258
+ var paddingTop = Math.round( ( parentNode.height() - $(this).outerHeight(true) ) / 2 );
259
+ parentNode.css({
260
+ paddingTop : paddingTop + 'px',
261
+ height : ( parentNode.css('height') ) ? ( parentNode.outerHeight() - paddingTop ) : ''
262
+ });
263
+ });
264
+ },
265
+ 'bottom' : function Elastic_helper_bottom(context){
266
+ $('.bottom', context).each(function(){
267
+ var parentNode = $(this.parentNode);
268
+ var paddingTop = Math.round( parentNode.height() - $(this).outerHeight(true) );
269
+ parentNode.css({
270
+ paddingTop : paddingTop + 'px',
271
+ height : ( parentNode.css('height') ) ? ( parentNode.outerHeight() - paddingTop ) : ''
272
+ });
273
+ });
274
+ }
275
+ };
276
+
277
+ /*
278
+ Elastic Layouts Support
279
+ */
280
+ // $(document).bind('elastic:beforeInitialize', function(){
281
+ // var r = /(^|\s+)display\s+([\w\_\-\d]+)(\s+|$)/;
282
+ // $('.display').each(function Elastic_layout(){
283
+ // r.test(this.className);
284
+ // var c = '.position-' + RegExp.$2;
285
+ // $(c).removeClass(c).appendTo(this);
286
+ // });
287
+ // });
288
+ })(jQuery);
289
+
290
+ // due to a safari 4 final bug, this initialization must be done on window.load event
291
+ // definitely a must fix either on elastic or jquery
292
+ jQuery(window).bind('load', function(){
293
+ var doc = jQuery(document);
294
+ var iw = document.body.clientWidth;
295
+ doc.trigger('elastic:beforeInitialize');
296
+ Elastic();
297
+ if(iw != document.body.clientWidth){
298
+ Elastic.refresh();
299
+ }
300
+ jQuery(window).bind('resize',function Elastic_resizeHandler(){
301
+ if(Elastic.configuration.refreshOnResize){
302
+ Elastic.refresh();
303
+ }
304
+ });
305
+ // doc.bind('elastic', Elastic.refresh);
306
+ // doc.trigger('elastic:initialize');
307
+ });