uki 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (235) hide show
  1. data/.gitignore +7 -0
  2. data/.gitmodules +3 -0
  3. data/LICENSE +20 -0
  4. data/Rakefile +23 -0
  5. data/Readme.rdoc +9 -0
  6. data/VERSION +1 -0
  7. data/bin/uki +102 -0
  8. data/frameworks/jspec/lib/images/bg.png +0 -0
  9. data/frameworks/jspec/lib/images/hr.png +0 -0
  10. data/frameworks/jspec/lib/images/loading.gif +0 -0
  11. data/frameworks/jspec/lib/images/sprites.bg.png +0 -0
  12. data/frameworks/jspec/lib/images/sprites.png +0 -0
  13. data/frameworks/jspec/lib/images/vr.png +0 -0
  14. data/frameworks/jspec/lib/jspec.css +149 -0
  15. data/frameworks/jspec/lib/jspec.growl.js +115 -0
  16. data/frameworks/jspec/lib/jspec.jquery.js +72 -0
  17. data/frameworks/jspec/lib/jspec.js +1756 -0
  18. data/frameworks/jspec/lib/jspec.shell.js +39 -0
  19. data/frameworks/jspec/lib/jspec.timers.js +90 -0
  20. data/frameworks/jspec/lib/jspec.xhr.js +195 -0
  21. data/frameworks/uki/README.rdoc +179 -0
  22. data/frameworks/uki/compiler.jar +0 -0
  23. data/frameworks/uki/run.rb +2 -0
  24. data/frameworks/uki/spec/commands/example_command.rb +19 -0
  25. data/frameworks/uki/spec/dom.html +39 -0
  26. data/frameworks/uki/spec/support/images/bg.png +0 -0
  27. data/frameworks/uki/spec/support/images/hr.png +0 -0
  28. data/frameworks/uki/spec/support/images/loading.gif +0 -0
  29. data/frameworks/uki/spec/support/images/sprites.bg.png +0 -0
  30. data/frameworks/uki/spec/support/images/sprites.png +0 -0
  31. data/frameworks/uki/spec/support/images/vr.png +0 -0
  32. data/frameworks/uki/spec/support/jspec.css +149 -0
  33. data/frameworks/uki/spec/support/jspec.js +1773 -0
  34. data/frameworks/uki/spec/support/jspec.xhr.js +193 -0
  35. data/frameworks/uki/spec/support/spec.helper.js +1 -0
  36. data/frameworks/uki/spec/unit/background.spec.js +29 -0
  37. data/frameworks/uki/spec/unit/builder.spec.js +51 -0
  38. data/frameworks/uki/spec/unit/data/model.spec.js +29 -0
  39. data/frameworks/uki/spec/unit/dom/dnd.spec.js +71 -0
  40. data/frameworks/uki/spec/unit/dom/event.spec.js +78 -0
  41. data/frameworks/uki/spec/unit/dom.spec.js +28 -0
  42. data/frameworks/uki/spec/unit/geometry.spec.js +79 -0
  43. data/frameworks/uki/spec/unit/selector.spec.js +140 -0
  44. data/frameworks/uki/spec/unit/theme/template.spec.js +31 -0
  45. data/frameworks/uki/spec/unit/utils.spec.js +176 -0
  46. data/frameworks/uki/spec/unit/view/base.spec.js +86 -0
  47. data/frameworks/uki/spec/unit/view/container.spec.js +73 -0
  48. data/frameworks/uki/spec/unit/view.spec.js +13 -0
  49. data/frameworks/uki/src/airport.js +1 -0
  50. data/frameworks/uki/src/uki-core/attachment.js +175 -0
  51. data/frameworks/uki/src/uki-core/background/css.js +37 -0
  52. data/frameworks/uki/src/uki-core/background/cssBox.js +73 -0
  53. data/frameworks/uki/src/uki-core/background/multi.js +20 -0
  54. data/frameworks/uki/src/uki-core/background/null.js +10 -0
  55. data/frameworks/uki/src/uki-core/background/rows.js +77 -0
  56. data/frameworks/uki/src/uki-core/background/sliced9.js +206 -0
  57. data/frameworks/uki/src/uki-core/background.js +35 -0
  58. data/frameworks/uki/src/uki-core/builder.js +68 -0
  59. data/frameworks/uki/src/uki-core/collection.js +278 -0
  60. data/frameworks/uki/src/uki-core/const.js +17 -0
  61. data/frameworks/uki/src/uki-core/dom/dnd.js +93 -0
  62. data/frameworks/uki/src/uki-core/dom/event.js +194 -0
  63. data/frameworks/uki/src/uki-core/dom/nativeLayout.js +18 -0
  64. data/frameworks/uki/src/uki-core/dom/offset.js +130 -0
  65. data/frameworks/uki/src/uki-core/dom/w3cdnd.js +333 -0
  66. data/frameworks/uki/src/uki-core/dom.js +109 -0
  67. data/frameworks/uki/src/uki-core/geometry.js +658 -0
  68. data/frameworks/uki/src/uki-core/image.js +90 -0
  69. data/frameworks/uki/src/uki-core/selector.js +201 -0
  70. data/frameworks/uki/src/uki-core/theme/base.js +39 -0
  71. data/frameworks/uki/src/uki-core/theme/template.js +26 -0
  72. data/frameworks/uki/src/uki-core/theme.js +45 -0
  73. data/frameworks/uki/src/uki-core/uki.js +45 -0
  74. data/frameworks/uki/src/uki-core/utils.js +399 -0
  75. data/frameworks/uki/src/uki-core/view/base.js +480 -0
  76. data/frameworks/uki/src/uki-core/view/container.js +155 -0
  77. data/frameworks/uki/src/uki-core/view/focusable.js +93 -0
  78. data/frameworks/uki/src/uki-core/view/observable.js +66 -0
  79. data/frameworks/uki/src/uki-core/view/styleable.js +70 -0
  80. data/frameworks/uki/src/uki-core/view/utils.js +66 -0
  81. data/frameworks/uki/src/uki-core/view.js +21 -0
  82. data/frameworks/uki/src/uki-core.js +36 -0
  83. data/frameworks/uki/src/uki-data/data.js +1 -0
  84. data/frameworks/uki/src/uki-data/model.js +28 -0
  85. data/frameworks/uki/src/uki-data/observable.js +34 -0
  86. data/frameworks/uki/src/uki-data.js +1 -0
  87. data/frameworks/uki/src/uki-more/more/utils.js +20 -0
  88. data/frameworks/uki/src/uki-more/more/view/listContainer.js +4 -0
  89. data/frameworks/uki/src/uki-more/more/view/multiselectList.js +196 -0
  90. data/frameworks/uki/src/uki-more/more/view/radioButton.js +27 -0
  91. data/frameworks/uki/src/uki-more/more/view/splitTable.js +79 -0
  92. data/frameworks/uki/src/uki-more/more/view/toggleButton.js +24 -0
  93. data/frameworks/uki/src/uki-more/more/view/treeList/render.js +53 -0
  94. data/frameworks/uki/src/uki-more/more/view/treeList.js +110 -0
  95. data/frameworks/uki/src/uki-more/more/view.js +2 -0
  96. data/frameworks/uki/src/uki-more/more.js +1 -0
  97. data/frameworks/uki/src/uki-more.js +4 -0
  98. data/frameworks/uki/src/uki-theamless.js +15 -0
  99. data/frameworks/uki/src/uki-theme/airport/i/button/down-c.gif +0 -0
  100. data/frameworks/uki/src/uki-theme/airport/i/button/down-c.png +0 -0
  101. data/frameworks/uki/src/uki-theme/airport/i/button/down-h.gif +0 -0
  102. data/frameworks/uki/src/uki-theme/airport/i/button/down-h.png +0 -0
  103. data/frameworks/uki/src/uki-theme/airport/i/button/down-m.png +0 -0
  104. data/frameworks/uki/src/uki-theme/airport/i/button/down-v.png +0 -0
  105. data/frameworks/uki/src/uki-theme/airport/i/button/focusRing-c.png +0 -0
  106. data/frameworks/uki/src/uki-theme/airport/i/button/focusRing-h.png +0 -0
  107. data/frameworks/uki/src/uki-theme/airport/i/button/focusRing-m.png +0 -0
  108. data/frameworks/uki/src/uki-theme/airport/i/button/focusRing-v.png +0 -0
  109. data/frameworks/uki/src/uki-theme/airport/i/button/focusRing.png +0 -0
  110. data/frameworks/uki/src/uki-theme/airport/i/button/hover-c.gif +0 -0
  111. data/frameworks/uki/src/uki-theme/airport/i/button/hover-c.png +0 -0
  112. data/frameworks/uki/src/uki-theme/airport/i/button/hover-h.gif +0 -0
  113. data/frameworks/uki/src/uki-theme/airport/i/button/hover-h.png +0 -0
  114. data/frameworks/uki/src/uki-theme/airport/i/button/hover-m.png +0 -0
  115. data/frameworks/uki/src/uki-theme/airport/i/button/hover-v.png +0 -0
  116. data/frameworks/uki/src/uki-theme/airport/i/button/hover.png +0 -0
  117. data/frameworks/uki/src/uki-theme/airport/i/button/normal-c.gif +0 -0
  118. data/frameworks/uki/src/uki-theme/airport/i/button/normal-c.png +0 -0
  119. data/frameworks/uki/src/uki-theme/airport/i/button/normal-h.gif +0 -0
  120. data/frameworks/uki/src/uki-theme/airport/i/button/normal-h.png +0 -0
  121. data/frameworks/uki/src/uki-theme/airport/i/button/normal-m.png +0 -0
  122. data/frameworks/uki/src/uki-theme/airport/i/button/normal-v.png +0 -0
  123. data/frameworks/uki/src/uki-theme/airport/i/button/normal.png +0 -0
  124. data/frameworks/uki/src/uki-theme/airport/i/checkbox/checkbox.png +0 -0
  125. data/frameworks/uki/src/uki-theme/airport/i/checkbox/focus.png +0 -0
  126. data/frameworks/uki/src/uki-theme/airport/i/checkbox/normal.gif +0 -0
  127. data/frameworks/uki/src/uki-theme/airport/i/checkbox/normal.png +0 -0
  128. data/frameworks/uki/src/uki-theme/airport/i/panel/dark-h.gif +0 -0
  129. data/frameworks/uki/src/uki-theme/airport/i/panel/dark-h.png +0 -0
  130. data/frameworks/uki/src/uki-theme/airport/i/panel/dark-m.png +0 -0
  131. data/frameworks/uki/src/uki-theme/airport/i/panel/dark.png +0 -0
  132. data/frameworks/uki/src/uki-theme/airport/i/popup/normal.png +0 -0
  133. data/frameworks/uki/src/uki-theme/airport/i/radio/focus.png +0 -0
  134. data/frameworks/uki/src/uki-theme/airport/i/radio/normal.gif +0 -0
  135. data/frameworks/uki/src/uki-theme/airport/i/radio/normal.png +0 -0
  136. data/frameworks/uki/src/uki-theme/airport/i/radio/radio.png +0 -0
  137. data/frameworks/uki/src/uki-theme/airport/i/shadow/large-c.png +0 -0
  138. data/frameworks/uki/src/uki-theme/airport/i/shadow/large-h.png +0 -0
  139. data/frameworks/uki/src/uki-theme/airport/i/shadow/large-m.png +0 -0
  140. data/frameworks/uki/src/uki-theme/airport/i/shadow/large-v.png +0 -0
  141. data/frameworks/uki/src/uki-theme/airport/i/shadow/large.png +0 -0
  142. data/frameworks/uki/src/uki-theme/airport/i/slider/bar-m.gif +0 -0
  143. data/frameworks/uki/src/uki-theme/airport/i/slider/bar-m.png +0 -0
  144. data/frameworks/uki/src/uki-theme/airport/i/slider/bar-v.gif +0 -0
  145. data/frameworks/uki/src/uki-theme/airport/i/slider/bar-v.png +0 -0
  146. data/frameworks/uki/src/uki-theme/airport/i/slider/bar.png +0 -0
  147. data/frameworks/uki/src/uki-theme/airport/i/slider/focus.png +0 -0
  148. data/frameworks/uki/src/uki-theme/airport/i/slider/handle.gif +0 -0
  149. data/frameworks/uki/src/uki-theme/airport/i/splitPane/horizontal.gif +0 -0
  150. data/frameworks/uki/src/uki-theme/airport/i/splitPane/horizontal.png +0 -0
  151. data/frameworks/uki/src/uki-theme/airport/i/splitPane/vertical.gif +0 -0
  152. data/frameworks/uki/src/uki-theme/airport/i/x.gif +0 -0
  153. data/frameworks/uki/src/uki-theme/airport.js +322 -0
  154. data/frameworks/uki/src/uki-theme/aristo/i/button/down-c.gif +0 -0
  155. data/frameworks/uki/src/uki-theme/aristo/i/button/down-c.png +0 -0
  156. data/frameworks/uki/src/uki-theme/aristo/i/button/down-h.png +0 -0
  157. data/frameworks/uki/src/uki-theme/aristo/i/button/down-m.png +0 -0
  158. data/frameworks/uki/src/uki-theme/aristo/i/button/down-v.png +0 -0
  159. data/frameworks/uki/src/uki-theme/aristo/i/button/down.png +0 -0
  160. data/frameworks/uki/src/uki-theme/aristo/i/button/focusRing-c.png +0 -0
  161. data/frameworks/uki/src/uki-theme/aristo/i/button/focusRing-h.png +0 -0
  162. data/frameworks/uki/src/uki-theme/aristo/i/button/focusRing-m.png +0 -0
  163. data/frameworks/uki/src/uki-theme/aristo/i/button/focusRing-v.png +0 -0
  164. data/frameworks/uki/src/uki-theme/aristo/i/button/focusRing.png +0 -0
  165. data/frameworks/uki/src/uki-theme/aristo/i/button/normal-c.gif +0 -0
  166. data/frameworks/uki/src/uki-theme/aristo/i/button/normal-c.png +0 -0
  167. data/frameworks/uki/src/uki-theme/aristo/i/button/normal-h.png +0 -0
  168. data/frameworks/uki/src/uki-theme/aristo/i/button/normal-m.png +0 -0
  169. data/frameworks/uki/src/uki-theme/aristo/i/button/normal-v.png +0 -0
  170. data/frameworks/uki/src/uki-theme/aristo/i/button/normal.png +0 -0
  171. data/frameworks/uki/src/uki-theme/aristo/i/checkbox/focus.png +0 -0
  172. data/frameworks/uki/src/uki-theme/aristo/i/checkbox/normal.gif +0 -0
  173. data/frameworks/uki/src/uki-theme/aristo/i/checkbox/normal.png +0 -0
  174. data/frameworks/uki/src/uki-theme/aristo/i/panel/normal-h.png +0 -0
  175. data/frameworks/uki/src/uki-theme/aristo/i/panel/normal-m.png +0 -0
  176. data/frameworks/uki/src/uki-theme/aristo/i/panel/normal.png +0 -0
  177. data/frameworks/uki/src/uki-theme/aristo/i/popup/normal.png +0 -0
  178. data/frameworks/uki/src/uki-theme/aristo/i/radio/focus.png +0 -0
  179. data/frameworks/uki/src/uki-theme/aristo/i/radio/normal.gif +0 -0
  180. data/frameworks/uki/src/uki-theme/aristo/i/radio/normal.png +0 -0
  181. data/frameworks/uki/src/uki-theme/aristo/i/shadow/large-c.png +0 -0
  182. data/frameworks/uki/src/uki-theme/aristo/i/shadow/large-h.png +0 -0
  183. data/frameworks/uki/src/uki-theme/aristo/i/shadow/large-m.png +0 -0
  184. data/frameworks/uki/src/uki-theme/aristo/i/shadow/large-v.png +0 -0
  185. data/frameworks/uki/src/uki-theme/aristo/i/shadow/large.png +0 -0
  186. data/frameworks/uki/src/uki-theme/aristo/i/slider/bar-m.gif +0 -0
  187. data/frameworks/uki/src/uki-theme/aristo/i/slider/bar-m.png +0 -0
  188. data/frameworks/uki/src/uki-theme/aristo/i/slider/bar-v.gif +0 -0
  189. data/frameworks/uki/src/uki-theme/aristo/i/slider/bar-v.png +0 -0
  190. data/frameworks/uki/src/uki-theme/aristo/i/slider/bar.png +0 -0
  191. data/frameworks/uki/src/uki-theme/aristo/i/slider/handle.gif +0 -0
  192. data/frameworks/uki/src/uki-theme/aristo/i/slider/handle.png +0 -0
  193. data/frameworks/uki/src/uki-theme/aristo/i/splitPane/horizontal.gif +0 -0
  194. data/frameworks/uki/src/uki-theme/aristo/i/splitPane/horizontal.png +0 -0
  195. data/frameworks/uki/src/uki-theme/aristo/i/splitPane/vertical.gif +0 -0
  196. data/frameworks/uki/src/uki-theme/aristo/i/x.gif +0 -0
  197. data/frameworks/uki/src/uki-theme/aristo.js +217 -0
  198. data/frameworks/uki/src/uki-view/view/box.js +1 -0
  199. data/frameworks/uki/src/uki-view/view/button.js +126 -0
  200. data/frameworks/uki/src/uki-view/view/checkbox.js +36 -0
  201. data/frameworks/uki/src/uki-view/view/flow.js +48 -0
  202. data/frameworks/uki/src/uki-view/view/image.js +9 -0
  203. data/frameworks/uki/src/uki-view/view/label.js +123 -0
  204. data/frameworks/uki/src/uki-view/view/list/render.js +23 -0
  205. data/frameworks/uki/src/uki-view/view/list.js +442 -0
  206. data/frameworks/uki/src/uki-view/view/popup.js +113 -0
  207. data/frameworks/uki/src/uki-view/view/radio.js +57 -0
  208. data/frameworks/uki/src/uki-view/view/scrollPane.js +139 -0
  209. data/frameworks/uki/src/uki-view/view/slider.js +154 -0
  210. data/frameworks/uki/src/uki-view/view/splitPane.js +213 -0
  211. data/frameworks/uki/src/uki-view/view/table/column.js +96 -0
  212. data/frameworks/uki/src/uki-view/view/table/header.js +53 -0
  213. data/frameworks/uki/src/uki-view/view/table/render.js +25 -0
  214. data/frameworks/uki/src/uki-view/view/table.js +71 -0
  215. data/frameworks/uki/src/uki-view/view/textField.js +145 -0
  216. data/frameworks/uki/src/uki-view/view/toolbar.js +93 -0
  217. data/frameworks/uki/src/uki-view.js +15 -0
  218. data/frameworks/uki/src/uki.js +2 -0
  219. data/frameworks/uki/thin.yaml +11 -0
  220. data/frameworks/uki/uki.rb +38 -0
  221. data/frameworks/uki/uki.ru +2 -0
  222. data/lib/uki/include_js.rb +50 -0
  223. data/lib/uki/project.rb +207 -0
  224. data/lib/uki/routes.rb +20 -0
  225. data/lib/uki/server.rb +42 -0
  226. data/lib/uki.rb +9 -0
  227. data/templates/index.html.erb +10 -0
  228. data/templates/model.js.erb +5 -0
  229. data/templates/myapp.js.erb +44 -0
  230. data/templates/package.js.erb +3 -0
  231. data/templates/spec.html.erb +23 -0
  232. data/templates/spec.js.erb +6 -0
  233. data/templates/view.js.erb +10 -0
  234. data/uki.gemspec +281 -0
  235. metadata +317 -0
@@ -0,0 +1,217 @@
1
+ (function() {
2
+ var defaultCss = 'position:absolute;z-index:100;-moz-user-focus:none;font-family:Arial,Helvetica,sans-serif;';
3
+
4
+ function u(url) {
5
+ return uki.theme.aristo.imagePath + url;
6
+ }
7
+
8
+ function shadowData() {
9
+ var prefix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ErkJggg==", u(prefix + "c.gif")],
12
+ v: [u(prefix + "v.png"), "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAECAYAAADxjg1nAAAAWklEQVQYGdXBWwpAQAAAwLEeSUqy9z/hSkpSnh9OsTMFGlSo0aJDjwEjJkREREwYMaBHhxY1KpQIKPxePLhx4cSBHRtWLJiRkJAwY8GKDTsOnLiCTAWZCjL1AeihFg5/1kytAAAAAElFTkSuQmCC", u(prefix + "v.gif")],
13
+ h: [u(prefix + "h.png"), "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAuCAYAAAAPxrguAAAAe0lEQVQoz5XSWwtAQBCG4XEMOST+/y8kOYScKRe8WzZbc7FPX7PNtLaIuPI49l0vUBIewT/LuO/7BRETMRMpExkh/w9KD+WVhBASAu20jnZjFsEkGAQh7ISNsBIWwkwYCT2hI9SEilASiv+g9KgEH6ZhomVi0E47fW7sAEmnGr/QVlzBAAAAAElFTkSuQmCC", u(prefix + "h.gif")],
14
+ m: [u(prefix + "m.png"), "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAEUlEQVQIHWNgYGD4i4ZJFQAAAkoP0RsgosoAAAAASUVORK5CYII=", u(prefix + "m.gif"), true]
15
+ };
16
+ };
17
+
18
+ uki.theme.aristo = uki.extend({}, uki.theme.Base, {
19
+ imagePath: '/src/uki-theme/aristo/i/',
20
+
21
+ backgrounds: {
22
+ 'button-normal': function() {
23
+ return new uki.background.Multi(
24
+ new uki.background.Css({color:'#4F4F4F', textShadow: '0 1px 1px #FFF'}),
25
+ new uki.background.Sliced9({
26
+ c: [u("button/normal-c.png"), "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAaklEQVQIHR3IsQnAIBSE4Vc5t0VACKRRcQcdQS3EwhGcIBAQFJzAeBY/fHfknGMhhCvG+CIYH22IWuuac55gfOS9b733NcY4wfjIGNNyzquUcoLxkVJKWGtXSukEa61v4pwzKeWzx4dgfD8jSmlbMWsU7wAAAABJRU5ErkJggg==", u("button/normal-c.gif")],
27
+ v: [u("button/normal-v.png"), "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAASCAYAAAB4i6/FAAAAMUlEQVQYlWPauXPn/9evX6NgkBjT////GbBhpn///jFgw9SW+Pv3LwoeHEYNqB3YMABC6UUSNdq8VQAAAABJRU5ErkJggg=="],
28
+ h: [u("button/normal-h.png"), "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAAGCAYAAACW9l3DAAAAL0lEQVQ4jd3DsQ0AAAgCMP6fecfN8A2zI/5Bk2Jm0hx3l+awneaQlObY3TQHyTR/qltsRWlgKkcAAAAASUVORK5CYII="],
29
+ m: [u("button/normal-m.png"), "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAASCAYAAAAOsR1OAAAAO0lEQVRIx+3TQQ0AMAgDwD3wbxQNwGSQkKuDS9vIzHmHEzOnfS+6GxAQcBFYVRoENFENAgL6ICAg4EY+lUo2nQwj3VIAAAAASUVORK5CYII=", false, true]
30
+ }, "3 3 3 3")
31
+ );
32
+
33
+ },
34
+
35
+ 'button-down': function() {
36
+ return new uki.background.Multi(
37
+ new uki.background.Css({color:'#4F4F4F', textShadow: '0 1px 1px #FFF'}),
38
+ new uki.background.Sliced9({
39
+ c: [u("button/down-c.png"), "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAaElEQVQIWy3IsQnAIBRF0V85t4UgBFLpEOIEoiIWruAGgYBauIHxSYoDl0ucc6aUEtvzE3i0QxpjVkrpQOOR1rrlnFcp5UDjkXOu9d7XGONA41EIQdZa15zzQO93kbWWee/vGOMLaLwPaeVo7EtpfccAAAAASUVORK5CYII=", u("button/down-c.gif")],
40
+ v: [u("button/down-v.png"), "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAASCAYAAAB4i6/FAAAALklEQVQYlWOaPn36/2PHjqFgkBgTIyMjAzbMBAQMODBVJZiZmVHwILeDHs7FhgE+ABVnNkJwegAAAABJRU5ErkJggg=="],
41
+ h: [u("button/down-h.png"), "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAAGCAYAAACW9l3DAAAAL0lEQVQ4jd3DsQ0AAAgCMP5fecdNvmF3xT9oUpBMc+xumkNSmsN2muPu0hwzk+YPxjZnBePCUX8AAAAASUVORK5CYII="],
42
+ m: [u("button/down-m.png"), "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAASCAYAAAAOsR1OAAAAO0lEQVRIx+3TAQ0AQAhCURH7x6LWXQw392nwBijJq8MZSZd9Nd0NECDARaBtGgQIkA/SIEAmChAgwI185scEA6HpneEAAAAASUVORK5CYII=", false, true]
43
+ }, "3 3 3 3")
44
+ );
45
+ },
46
+
47
+ 'button-focus': function() {
48
+ if (uki.image.needAlphaFix) return new uki.background.CssBox('filter:progid:DXImageTransform.Microsoft.Blur(pixelradius=3);background:#7594D2;', { inset: '-5 -5 -4 -5', zIndex: -2 } );
49
+
50
+ var prefix = "button/focusRing-";
51
+ return new uki.background.Sliced9({
52
+ c: [u(prefix + "c.png"), "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAtUlEQVQokWNgQABGBof9LNqhq9hkQo9xgjCIDRIDy6GA0FXMKp7b2NX9jvCqJB4S1Y47IgfCIDZYDCgHUgM3GSSgkLBfQCfxoKxO3Ak93fijdiAMYoPEQHJgTWCbgFaCTAFJ6MafMNZNPOGvl3AiC4RBbJAYSA6kBuw8kDtBVoNNBis+WQWzGsQGiYHkwE4F+QnsOaB7QU4AmcqABsA2AeVAakBqSddAspNI9jTpwUpGxJGUNADqMZr1BXNgDAAAAABJRU5ErkJggg=="],
53
+ v: [u(prefix + "v.png"), "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAUCAYAAAC58NwRAAAAf0lEQVQoU2MQj93JrZlwQlUn/qS3TsLJegY0ABIDyYHUgNQyqPsd4dWJPa6pl3giRDfxeB+6BpAYSA6kBqSWQSl0N79m7FEdvcSTkUA8DV0DSAwkB1IDUgvWoBN3Qk83/ni0buKJGegaQGIgOZCaUQ2jGgZeA0nJm+QMRGoWBQCeEP1BW4HCpgAAAABJRU5ErkJggg=="],
54
+ h: [u(prefix + "h.png"), "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAAMCAYAAAD79EROAAAAOUlEQVRIx2NQCt3NP1Qwg3rkCb2hghl0Y45HDxXMoJNwYsZQwQyjYBQMNTCkMtiQKrqGVKUwlKpbAHD4HlOhFuXbAAAAAElFTkSuQmCC"]
55
+ }, "6 6 6 6", { inset: '-4 -4 -3 -4', zIndex: 2 });
56
+ },
57
+
58
+ 'toolbar-button-normal': function() {
59
+ return new uki.background.Css('#CCC');
60
+ },
61
+
62
+ 'toolbar-button-hover': function() {
63
+ return new uki.background.Css('#E0E0E0');
64
+ },
65
+
66
+ 'toolbar-button-down': function() {
67
+ return new uki.background.Css('#AAA');
68
+ },
69
+
70
+ 'toolbar-button-focus': function() {
71
+ return new uki.background.Css('#CCC');
72
+ },
73
+
74
+ 'toolbar-popup-button-hover': function() {
75
+ return new uki.background.Css({ background: '#4086FF', color: '#FFF' });
76
+ },
77
+
78
+ 'panel': function() {
79
+ return new uki.background.Sliced9({
80
+ h: [u("panel/normal-h.png"), "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAECAYAAACtBE5DAAAAKUlEQVQImWPg4OD4jw0z7Ny58z82zFBTU/O/trb2P4yGsRnY2dn/Y8MAQGMuukQjPaUAAAAASUVORK5CYII="],
81
+ m: [u("panel/normal-m.png"), "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAuCAYAAAALM2gTAAAAnUlEQVQ4jZ1TAQoEIQgU//+i+llRHrOgtKKynTAZaGNOxr138WitCY8xyGPOSSwiFIEpMd5701qL1APPCSww9TAEwxoPVVoc3Niot0CUjSQ+C3+rcfLDK+pbwdSbJClVJKBReZjsYR/3kpyZ554996vBCOHT1p1HJ+oGdZZO1CJe3com0QfuqdJh+HOu7rUqH+rzV7MpCaki2VMq4Ad4BnPhvzp+XwAAAABJRU5ErkJggg==", false, true]
82
+ }, "2 0 2 0");
83
+ },
84
+ 'input': function() {
85
+ return new uki.background.CssBox(
86
+ 'background:white;border: 1px solid #787878;border-top-color:#555;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;',
87
+ { inset: '0 0 0 0' }
88
+ );
89
+ },
90
+ 'slider-bar': function() {
91
+ var prefix = "slider/bar-";
92
+ return new uki.background.Sliced9({
93
+ v: [u(prefix + "v.png"), "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAASCAYAAAB4i6/FAAAASUlEQVQY02NgGHqgvLz8PzKGC7a0tP1ftnwNGIPYYEkQsW//0f/Hjp8FYxAbLjFjxiy4BIgNlvj//38auh0gMbA9IAYyHvDQAACE3VpNVzKSLwAAAABJRU5ErkJggg==", u(prefix + "v.gif")],
94
+ m: [u(prefix + "m.png"), "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARMAAAASCAYAAAB4gjqpAAAAUUlEQVQYGe3BwRFAMBAAwItJIVTAR0taSE9eVHiKOA9jdjcCAAAAAAAAgJ9rY4wMgKK+bnsAVPV5XgKgagqAF/T7OgOgqmXmEQAAAAAAAHzTAx6DCNiUJps4AAAAAElFTkSuQmCC", u(prefix + "m.gif"), true]
95
+ }, "0 3 0 3", {fixedSize: '0 18'});
96
+ },
97
+ list: function(rowHeight) {
98
+ return new uki.background.Rows(rowHeight, '#EDF3FE');
99
+ },
100
+ 'popup-normal': function() {
101
+ return new uki.background.CssBox('opacity:0.95;background:#ECEDEE;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;border:1px solid #CCC');
102
+ },
103
+ 'shadow-big': function() {
104
+ return new uki.background.Sliced9(shadowData(), "23 23 23 23", {zIndex: -2, inset: '-4 -10 -12 -10'});
105
+ },
106
+ 'shadow-medium': function() {
107
+ return new uki.background.Sliced9(shadowData(), "23 23 23 23", {zIndex: -2, inset: '-1 -6 -6 -6'});
108
+ }
109
+ },
110
+
111
+ images: {
112
+ 'slider-handle': function() {
113
+ return uki.image(u("slider/handle.png"), "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAmCAYAAAAm56DSAAACvklEQVRIx2NgwASMQMwExKxAzAHE3EDMA6U5oOJMUHV4AcwQnsKJS6LqFm5d1Lxi74WOtUd+gWgQHyQONRxmKE6DOLzistXqF2/fufTwlf+Hbz79f/35x/+vv/4B0yA+SBwkD1IHdSkTNoM4gzKrLRqX7X2948K9/3ff//p/9sX3/wcff/u//f4XMA3ig8RB8iB1brEZOugGgvzOxs0tKlE1f+vVnRfv/z/6+Mv/zbc+4sQg+a1n7/wvm71+D1CvMNTL4DBkBmK+pIaJRQv3X/i/9da7/+uvvyWIQeoW7D//P6FxYj5QPy/MdWxALF4waemRpSfv/F91+SUczzpw5b9zdOZ/aX1LMA3iI8uvOnP3P0gfSD/UHAZOIFYonrH2w8JTj/4vPfcMjh2iMv+ruYb91/ZPAtM24Wko8gtPPvxfNGPtW5B+qDngaFYrmrHu/wKgYchYxzv2v0l82X+LtHowreUZhSI/H2hY4bS1v4H6VaHmgP2rkT1h8cfph27+n33sLhx75beADbLKbAbT7rlNKPLTD974n9W/6D1QvzrUHIjLYusnne7cfOr/tIM34RjED6ieDDYIRGOTB+lDdhk4zFzj8zrL5m39P2nvNaJx6dwt/52is1qQwwwcmywsLJbRdZMeVC3Z/b935yWCuGLhjv+hpe2ngHrNkGMTnM5AXlU2sEiIapjyoQRoY+e2czgxSB6kTkJFKwyoTwU5nTFCTRUFYj0RGaUo39z6s1mTVvyvXLLnf9O64/9bN50G0yA+SBwkLyKrHAFUr4OeA+B5E+pcXSB2MfEO6/fOrbsUWt3/ObJhyn8QDeKDxEHyUIPE8GV2DqhNIKebQjX5AXEglHaBiqtA1XEQKoZYoWEgBo0lUFGjAaUVoOK8hMozbCUtJzT98EJpTlJK2tFie7TYHi22R4vt0WJ7UBfbAGWiV6nRlq1tAAAAAElFTkSuQmCC", u("slider/handle.gif"));
114
+ },
115
+ 'slider-focus': function() {
116
+ if (uki.image.needAlphaFix) {
117
+ var i = new uki.createElement('div', 'width:12px;height:18px;filter:progid:DXImageTransform.Microsoft.Blur(pixelradius=4);background:#7594D2;');
118
+ i.width = 20;
119
+ i.height = 28;
120
+ return i;
121
+ }
122
+ var i = uki.createElement(
123
+ 'div',
124
+ 'width:24px;height:24px;padding-left:1px',
125
+ uki.imageHTML(u("radio/focus.png"), "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAABcElEQVRIx92VP0oEMRTGt9ADeAERq21E8ACLNp7AUrRbWdzdDDa6IBhnM5YqaCPCiiewyPzBA1gK1oIsHsNCNL9owBl1HYWM6MBjSPK+7+W99yWp1X7jm5dyrLUVTwTyYqotdb0dJjOdUM86Y8w86/jhX5q82TwZF1JPrkd6rtNPF40tiTBb7qps1Rlj5lnHD39wpchbMp4WKmmIKF0x/+0gSg8DlZ0KlZ05Y8w8669+DXAjgzjy7m68IPrJmoiS/Y29S907vr7fGdw+hOfDJ2eMmWcdP/zBfRqEGpKm3TnkKj3aPLi6kYO7x7fERWMdP/xfcAZveN71hEbZWpKu2RGgUcRFs0HIxODhgS8XADXQMGpK2l/t/KNMbLkMHh74cgGQHKqgcdT2O+TOwIGHB758AKNrpIc6ig0ta+Cs2gwPfLkAHB6rbyPBn5A7Aw8PfP8sgPceeFeR93Pg/SR7v4u836aVvAeVvGiVvMl/7nsGaBHOn+3vxvEAAAAASUVORK5CYII=")
126
+ );
127
+ i.width = 24;
128
+ i.height = 24;
129
+ return i;
130
+ // var i = uki.image(u("radio/focus.png"), "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAABcElEQVRIx92VP0oEMRTGt9ADeAERq21E8ACLNp7AUrRbWdzdDDa6IBhnM5YqaCPCiiewyPzBA1gK1oIsHsNCNL9owBl1HYWM6MBjSPK+7+W99yWp1X7jm5dyrLUVTwTyYqotdb0dJjOdUM86Y8w86/jhX5q82TwZF1JPrkd6rtNPF40tiTBb7qps1Rlj5lnHD39wpchbMp4WKmmIKF0x/+0gSg8DlZ0KlZ05Y8w8669+DXAjgzjy7m68IPrJmoiS/Y29S907vr7fGdw+hOfDJ2eMmWcdP/zBfRqEGpKm3TnkKj3aPLi6kYO7x7fERWMdP/xfcAZveN71hEbZWpKu2RGgUcRFs0HIxODhgS8XADXQMGpK2l/t/KNMbLkMHh74cgGQHKqgcdT2O+TOwIGHB758AKNrpIc6ig0ta+Cs2gwPfLkAHB6rbyPBn5A7Aw8PfP8sgPceeFeR93Pg/SR7v4u836aVvAeVvGiVvMl/7nsGaBHOn+3vxvEAAAAASUVORK5CYII=");
131
+ },
132
+ checkbox: function() {
133
+ return uki.image(u("checkbox/normal.png"), "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAABsCAYAAABn5uLmAAAFnklEQVRYw+1X3W9TZRj/nX6cfqwdbbezre3ouo4xyLKBIIZI4MaARhPligsuDGZ/hDMYcFwpJpIQo4kyg5qgzsQLEyMJCEj4yPxIQJgInQznSrt1Y233RU9Pz/F5T9eup93WreFikZ7kaXue87y/8zzP+76/91egjMvpCfic/s1fo7HRkvUZ2Mc7fX28yeA+wkF3iOPgXQ4knZbQ99lHYiwW583TCXN4ZGR/DojXuXtaGxu625o8sJj4ZbM5efIkkjDy67wB1K6zCeE/ri1kJMvprrr6eoTnAGkmuSTIr1cu4cfL11Ht9qPZ58WWzq2tP506rj7TZdJNC/GkgqQoIS2lF7XQgyF88+XnsAke2Ox2vPbqfkpAFjQ9kqhuZktdophE74cfwFBdA4O5Cq+8uA+26mrNmExGkoTUvH3y/jEk4vHcPbOvTn2MREqBye7A9i0d8AcCqp+N0wBJlHoqlcZYOIKB27dx6sR7SCZTqu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nY6OPjmUJD+PTqDLq0exv1jxfNiNZkTVBTf4mJIOD8DV6oD4peL54RrIclVKiwOn0msANLYGiN+c4SW24XMCQstwbZ/8/SECo2ZUwFsfi04UMOSjOHG2OgZ+MxVfBkNyZIWnmqdGQAwMDTO+tWkPS97H29vYFDUlXj8Ph6CYtCb1ev5IT1ktC9HAsFstpyCyNdFXTf1S2XkholjQWNx/fpZl+KknIX6Ur7guNK94iZQAVbZG1B0RTiTJ1djEf5TvLFlosxXKk36KllZPRoqWV0+yi0gg5SqUJOp1uVWWxcRqGJIfKkKxPK2FIFsfil9SQiUTiIN02rCChCL18jWvI/wDVil9tndgPIAAAAABJRU5ErkJggg==", u("checkbox/normal.gif"));
134
+ },
135
+ 'checkbox-focus': function() {
136
+ if (uki.image.needAlphaFix) {
137
+ var i = new uki.createElement('div', 'width:18px;height:18px;filter:progid:DXImageTransform.Microsoft.Blur(pixelradius=3);background:#7594D2;');
138
+ i.width = 26;
139
+ i.height = 26;
140
+ return i;
141
+ }
142
+ return uki.image(u("checkbox/focus.png"), "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAABdklEQVRIie2Wv0rDUBSHUxRFRHQRFxWRioTeZHEXVxHqYgaRNrmrj+Ai+AAdi6trH0AQh6K05uYpfBQ934m0EnHQcIuDB+5y7/l9J+dPchMEU2sER8P5VjJY2ExeljY6D8v77dHKbvK4+t3iHD/80aFXzhdLBnPN4/tFBE37vN7qjrbDzO2ZTh6GnbExXRdXl+5zLn74o1O9cOB9xjfY3MmGa8Y+bSGO0vGhSYuT2Lqz2BbnUZpfVBf7nOOn/gQWPRwNMslE0iIyh1HqDiLrTuPMXZqsuI5s3hNQX/Zuq6vcz3v44Y8OPRx4H+UKAmpHevrkCi+ubu5e33660KGHo2WmJ5g2SGpImjzJb+DTIJKJcODB1QBMgTZUakm6dQKghwMPrgbQ+ss00DBqWidA2TNpvPC0DxjzzMiVU1H0a5VI9HDgwZ0EKEdTxk+mo14GMmHCgfcf4I8F8DpF3t8D72+y92+R96+p9/vA/402gzt5Bn8VHu0d2HhIetPffvAAAAAASUVORK5CYII=");
143
+ },
144
+ radio: function() {
145
+ return uki.image(u("radio/normal.png"), "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAABsCAYAAABn5uLmAAAH80lEQVRYw+1WbVBTZxZGp02lTHVoHcfiaPuHnXWXrj9wOruWcZzZdR3dLW47Q3cKI6uiGaUfrG21u5XFrKAFt7aCiKDWyFdhsvIhJBCUhATkM4lEkI9A5EPkw0BIQC0D3Zmz73O93CaQmPhju3+SmWdOznnOOffc9773vY+f3//wtzQhu/ydxILqSyeuag3JRTfnYOEjDt5jhwNJX685XlAtz6+7Q3WmYeoanaLxx//hLHzEwSPPXY8lB05cCjleqLYojX101zZHhrEZ0g59T5X9jzgLH3HwyIs5+tVrqHPqEhQU+mJ8TmVb1e1+qh96ROU9U24BXmEw0xeXy5WsVOS0Jh9+JT2QXWMkRc8klXRZPQJ5V2pa6YNvsvc5rpn/oXMyTX6zmWTtDwRc0Nyh30YdpDUbfsNZ+I68TH+XUIf6+UaBn2aV2LJb7lH+rREBWyIP0s+2vke/3LmXs2F/Fjvx2c2D9ElmkRX1841WfZJZTFdYI0eE/GEXbfzLEfq1+Bhnf7E90omXskaHMop+QP18o9Wxqfn287UmuthwV8COuCSuyaaDiZzd9tFxJ/68tptiz+RNol6YKFpytjmlvIUytCYB8P909CzXBNYVjzrHiQJ/v+fTxCOXFZSm6vQah7+V0++iPz7muEb+IpHojahjaf1f5N2g01VtHvG3bCVFfH6qidWud3xq2AergkPDIiMl6fbP2JVSKm65BXjkBf38V2+zupUL370XGF5f9Vrwu+F//acuNq2Q/p5XTceLG+lEmY6z8BEHjzyWv27hzvbj3xl/ntz0Zvj7p/74scQYcfTr6fcl6QQLH3HwDGsZli161xx+In5c3HsYwzaGHbwN4+MrXU3i8jzipwvkH+1q3gby8aV+P/VvSVlZ2c6KiooLVVVV+hs3bszCwkf8aesi/LK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aeGfYDxPktOjWTN7AotO8haO9wCPPI+Skh+WywWO2vI7du3v8AW7fXY+MR3s767qiu5riFMp9bdJo2hnbPwEQePPNZk3cKdzb1rGBHk/v37NyWmXzx1vqDIKC0qm84pURAsfMTB79mzZy27sHsNiStgXNw7s2GsaBv7vwMWPh9f6WoSl+cRpsPTwNphn8DC5xf2/6Ah2Zd0J/u2X2BSR88wCwsfca/ObPb9epV918sGBgY4yQepNzs7y1n4iINHntsptFrtenbVB1BjMzMznAh9+PChAPiIg0ceU7qLNaREIlnGxjaOjo5yRVNTU24BHvKP5cuZ9nTWkOyzHAMVZrfbOfXqCchDPpM2P2pI7AkmDqpxFchgb4HpUSfsKbZHAnQ6nRXSFwvqLZDPJI4F9VyjqKio5dA8T9PW7sAGmEP9k0+RWLyCrdHk0NAQN663QH5jY+M46oWJ2KPXms1mjvQWyEedMBHukamww0aj8ZkEO3Qkq4sT1girHhcXt06j0ZigVrF7PQHSuLq6Wr13794gx5NgKcZLT0/fWlNTM4HJnqb4wSOPKbhNrJGzhmQL9jzOmaSkpDCmbDUtLS2clobCx1rAwkcc/MmTJ9+Kjo5+ZeHOnj8hRSDZ+ROcl5d3hBXUq1QqG7s6wcJHHHxMTMzLuLjbkwBXwLi4d74ghP3fAAsfcfCuJnF5EmA6PA2sHfYJLHx+YV1O8V/z08PdXvu9NwAAAABJRU5ErkJggg==", u("radio/normal.gif"));
146
+ },
147
+ 'radio-focus': function() {
148
+ if (uki.image.needAlphaFix) return uki.theme.aristo.image('checkbox-focus');
149
+ return uki.image(u("radio/focus.png"), "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAABcElEQVRIx92VP0oEMRTGt9ADeAERq21E8ACLNp7AUrRbWdzdDDa6IBhnM5YqaCPCiiewyPzBA1gK1oIsHsNCNL9owBl1HYWM6MBjSPK+7+W99yWp1X7jm5dyrLUVTwTyYqotdb0dJjOdUM86Y8w86/jhX5q82TwZF1JPrkd6rtNPF40tiTBb7qps1Rlj5lnHD39wpchbMp4WKmmIKF0x/+0gSg8DlZ0KlZ05Y8w8669+DXAjgzjy7m68IPrJmoiS/Y29S907vr7fGdw+hOfDJ2eMmWcdP/zBfRqEGpKm3TnkKj3aPLi6kYO7x7fERWMdP/xfcAZveN71hEbZWpKu2RGgUcRFs0HIxODhgS8XADXQMGpK2l/t/KNMbLkMHh74cgGQHKqgcdT2O+TOwIGHB758AKNrpIc6ig0ta+Cs2gwPfLkAHB6rbyPBn5A7Aw8PfP8sgPceeFeR93Pg/SR7v4u836aVvAeVvGiVvMl/7nsGaBHOn+3vxvEAAAAASUVORK5CYII=");
150
+ }
151
+ },
152
+
153
+ imageSrcs: {
154
+ x: function() {
155
+ return [u("x.gif"), "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIHWNgAAIAAAUAAY27m/MAAAAASUVORK5CYII="];
156
+ },
157
+ 'splitPane-horizontal': function() {
158
+ return [u("splitPane/horizontal.gif"), "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAICAYAAAA870V8AAAAFUlEQVQIW2MoLy//zwAEYJq6HGQAAJuVIXm0sEPnAAAAAElFTkSuQmCC"];
159
+ },
160
+ 'splitPane-vertical': function() {
161
+ return [u("splitPane/vertical.gif"), "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAADCAYAAABfwxXFAAAAE0lEQVQIHWMsLy//z0AOYMSnEwAIngTLoazFLgAAAABJRU5ErkJggg=="];
162
+ }
163
+ },
164
+
165
+ doms: {
166
+ 'resizer': function(params) {
167
+ var template = new uki.theme.Template('position:absolute;width:5px;top:0;height:${height}px;cursor:col-resize;cursor:ew-resize;z-index:101;background:url(' + uki.theme.imageSrc('x') + ')'),
168
+ node = uki.createElement('div', template.render(params));
169
+
170
+ if (!node.style.cursor || window.opera) node.style.cursor = 'e-resize';
171
+ return node;
172
+ },
173
+ 'splitPane-vertical': function(params) {
174
+ var commonVerticalStyle = 'cursor:row-resize;cursor:ns-resize;z-index:200;overflow:hidden;',
175
+ handle = params.handleWidth == 1 ?
176
+ uki.createElement('div',
177
+ defaultCss + 'width:100%;height:5px;margin-top:-2px;' +
178
+ commonVerticalStyle + 'background: url(' + uki.theme.imageSrc('x') + ')',
179
+ '<div style="' +
180
+ defaultCss + 'background:#999;width:100%;height:1px;left:0px;top:2px;overflow:hidden;' +
181
+ '"></div>') :
182
+ uki.createElement('div',
183
+ defaultCss + 'width:100%;height:' + (params.handleWidth - 2) + 'px;' +
184
+ 'border: 1px solid #CCC;border-width: 1px 0;' + commonVerticalStyle +
185
+ 'background: url(' + uki.theme.imageSrc('splitPane-vertical') + ') 50% 50% no-repeat;');
186
+ if (!handle.style.cursor || window.opera) handle.style.cursor = 'n-resize';
187
+ return handle;
188
+ },
189
+
190
+ 'splitPane-horizontal': function(params) {
191
+ var commonHorizontalStyle = 'cursor:col-resize;cursor:ew-resize;z-index:200;overflow:hidden;',
192
+ handle = params.handleWidth == 1 ?
193
+ uki.createElement('div',
194
+ defaultCss + 'height:100%;width:5px;margin-left:-2px;' +
195
+ commonHorizontalStyle + 'background: url(' + uki.theme.imageSrc('x') + ')',
196
+ '<div style="' +
197
+ defaultCss + 'background:#999;height:100%;width:1px;top:0px;left:2px;overflow:hidden;' +
198
+ '"></div>') :
199
+ uki.createElement('div',
200
+ defaultCss + 'height:100%;width:' + (params.handleWidth - 2) + 'px;' +
201
+ 'border: 1px solid #CCC;border-width: 0 1px;' + commonHorizontalStyle +
202
+ 'background: url(' + uki.theme.imageSrc('splitPane-horizontal') + ') 50% 50% no-repeat;');
203
+ if (!handle.style.cursor || window.opera) handle.style.cursor = 'e-resize';
204
+ return handle;
205
+
206
+ }
207
+ }
208
+ });
209
+
210
+ uki.theme.aristo.backgrounds['button-hover'] = uki.theme.aristo.backgrounds['button-normal'];
211
+ uki.theme.aristo.backgrounds['input-focus'] = uki.theme.aristo.backgrounds['button-focus'];
212
+ uki.theme.aristo.backgrounds['popup-shadow'] = uki.theme.aristo.backgrounds['shadow-medium'];
213
+ uki.theme.aristo.backgrounds['toolbar-popup'] = uki.theme.aristo.backgrounds['popup-normal'];
214
+ uki.theme.aristo.backgrounds['toolbar-popup-shadow'] = uki.theme.aristo.backgrounds['shadow-medium'];
215
+
216
+ uki.theme.register(uki.theme.aristo);
217
+ })();
@@ -0,0 +1 @@
1
+ uki.view.declare('uki.view.Box', uki.view.Container, {});
@@ -0,0 +1,126 @@
1
+ include('label.js');
2
+
3
+ uki.view.declare('uki.view.Button', uki.view.Label, uki.view.Focusable, function(Base, Focusable) {
4
+ var proto = this;
5
+
6
+ this._backgroundPrefix = 'button-';
7
+
8
+ this._setup = function() {
9
+ Base._setup.call(this);
10
+ uki.extend(this, {
11
+ _inset: new Inset(0, 4),
12
+ defaultCss: Base.defaultCss + "cursor:default;-moz-user-select:none;-webkit-user-select:none;" //text-shadow:0 1px 0px rgba(255,255,255,0.8)
13
+ });
14
+ };
15
+
16
+ uki.addProps(this, ['backgroundPrefix']);
17
+
18
+ uki.each(['normal', 'hover', 'down', 'focus', 'disabled'], function(i, name) {
19
+ var property = name + '-background';
20
+ this[property] = function(bg) {
21
+ if (bg) this['_' + property] = bg;
22
+ return this['_' + property] = this['_' + property] ||
23
+ uki.theme.background(this._backgroundPrefix + name, {height: this.rect().height, view: this});
24
+ };
25
+ }, this);
26
+
27
+ this._createLabelClone = function(autosize) {
28
+ var clone = Base._createLabelClone.call(this, autosize);
29
+ // clone.style.fontWeight = this.style('fontWeight');
30
+ return clone;
31
+ };
32
+
33
+ this._layoutDom = function(rect) {
34
+ Base._layoutDom.call(this, rect);
35
+ if (this._firstLayout) {
36
+ this['hover-background']();
37
+ this['down-background']();
38
+
39
+ this._backgroundByName(this._backgroundName || 'normal');
40
+ }
41
+ };
42
+
43
+ this._updateBg = function() {
44
+ var name = this._disabled ? 'disabled' : this._down ? 'down' : this._over ? 'hover' : 'normal';
45
+ this._backgroundByName(name);
46
+ };
47
+
48
+ this._createDom = function() {
49
+ // dom
50
+ this._dom = uki.createElement('div', this.defaultCss + 'color:#333;text-align:center;');
51
+ this._label = uki.createElement('div', Base.defaultCss +
52
+ "font-size:12px;line-height:12px;white-space:nowrap;"); // text-shadow:0 1px 0px rgba(255,255,255,0.8);
53
+ this._dom.appendChild(this._label);
54
+ this.style('fontWeight', 'bold');
55
+
56
+ this._dom.appendChild(uki.createElement('div', 'left:0;top:0;width:100%;height:100%;position:absolute;background:url(' + uki.theme.imageSrc('x') + ');'));
57
+
58
+ this.textSelectable(this.textSelectable());
59
+ this._initFocusable();
60
+
61
+ uki.dom.bind(document, 'mouseup', uki.proxy(this._mouseup, this));
62
+ this.bind('mousedown', this._mousedown);
63
+ this.bind('mouseenter', this._mouseenter);
64
+ this.bind('mouseleave', this._mouseleave);
65
+ this.bind('keyup', this._keyup);
66
+ this.bind('keydown', this._keydown);
67
+ };
68
+
69
+ this._mouseup = function(e) {
70
+ if (!this._down) return;
71
+ this._down = false;
72
+ this._updateBg();
73
+ };
74
+
75
+ this._mousedown = function(e) {
76
+ this._down = true;
77
+ this._updateBg();
78
+ };
79
+
80
+ this._mouseenter = function(e) {
81
+ this._over = true;
82
+ this._updateBg();
83
+ };
84
+
85
+ this._mouseleave = function(e) {
86
+ this._over = false;
87
+ this._updateBg();
88
+ };
89
+
90
+ this._focus = function(e) {
91
+ this['focus-background']().attachTo(this);
92
+ Focusable._focus.call(this, e);
93
+ };
94
+
95
+ this._keydown = function(e) {
96
+ if ((e.which == 32 || e.which == 13) && !this._down) this._mousedown();
97
+ };
98
+
99
+ this._keyup = function(e) {
100
+ if ((e.which == 32 || e.which == 13) && this._down) {
101
+ this._mouseup();
102
+ this.trigger('click', {domEvent: e, source: this});
103
+ }
104
+ if (e.which == 27 && this._down) {
105
+ this._mouseup();
106
+ }
107
+ };
108
+
109
+ this._blur = function(e) {
110
+ this['focus-background']().detach();
111
+ Focusable._blur.call(this, e);
112
+ };
113
+
114
+ this._backgroundByName = function(name) {
115
+ var bg = this[name + '-background']();
116
+ if (this._background == bg) return;
117
+ if (this._background) this._background.detach();
118
+ bg.attachTo(this);
119
+ this._background = bg;
120
+ this._backgroundName = name;
121
+ };
122
+
123
+ this._bindToDom = function(name) {
124
+ return uki.view.Focusable._bindToDom.call(this, name) || uki.view.Label.prototype._bindToDom.call(this, name);
125
+ };
126
+ });
@@ -0,0 +1,36 @@
1
+ uki.view.declare('uki.view.Checkbox', uki.view.Button, function(Base) {
2
+
3
+ this._backgroundPrefix = 'checkbox-';
4
+
5
+ uki.each(['checked-normal', 'checked-hover', 'checked-disabled'], function(i, name) {
6
+ var property = name + '-background';
7
+ this[property] = function(bg) {
8
+ if (bg) this['_' + property] = bg;
9
+ return this['_' + property] = this['_' + property] ||
10
+ uki.theme.background(this._backgroundPrefix + name, {height: this.rect().height, view: this});
11
+ };
12
+ }, this);
13
+
14
+ this._setup = function() {
15
+ Base._setup.call(this);
16
+ this._focusable = false;
17
+ };
18
+
19
+ this._updateBg = function() {
20
+ var name = this._disabled ? 'disabled' : this._over ? 'hover' : 'normal';
21
+ if (this._checked) name = 'checked-' + name;
22
+ this._backgroundByName(name);
23
+ };
24
+
25
+ this.value = this.checked = uki.newProp('_checked', function(state) {
26
+ this._checked = !!state;
27
+ this._updateBg();
28
+ });
29
+
30
+ this._mouseup = function(e) {
31
+ if (!this._down) return;
32
+ this._down = false;
33
+ if (!this._disabled) this.checked(!this.checked())
34
+ };
35
+
36
+ });
@@ -0,0 +1,48 @@
1
+ uki.view.declare('uki.view.VFlow', uki.view.Container, function(Base) {
2
+ this.contentsSize = function() {
3
+ var value = uki.reduce(0, this._childViews, function(sum, e) {
4
+ return sum + (e.visible() ? e.rect().height : 0);
5
+ } );
6
+ return new Size( this.contentsWidth(), value );
7
+ };
8
+
9
+ this.hidePartlyVisible = uki.newProp('_hidePartlyVisible');
10
+
11
+ this._layoutChildViews = function(oldRect) {
12
+ var offset = 0, rect, view;
13
+ for (var i=0, childViews = this.childViews(); i < childViews.length; i++) {
14
+ view = childViews[i];
15
+ view.rect(new Rect(view._rect.x, offset, view._rect.width, view._rect.height));
16
+ if (this._hidePartlyVisible) {
17
+ view.visible(view._rect.height + offset <= this._rect.height);
18
+ }
19
+ if (view.visible()) offset += view._rect.height;
20
+ };
21
+ Base._layoutChildViews.call(this);
22
+ };
23
+ });
24
+
25
+ uki.view.declare('uki.view.HFlow', uki.view.Container, function(Base) {
26
+ this.hidePartlyVisible = uki.newProp('_hidePartlyVisible');
27
+
28
+ this.contentsSize = function() {
29
+ var value = uki.reduce(0, this._childViews, function(sum, e) {
30
+ return sum + (e.visible() ? e.rect().width : 0);
31
+ } );
32
+ return new Size( value, this.contentsHeight() );
33
+ };
34
+
35
+ this._layoutChildViews = function(oldRect) {
36
+ var offset = 0, rect, view;
37
+ for (var i=0, childViews = this.childViews(); i < childViews.length; i++) {
38
+ view = childViews[i];
39
+ view.rect(new Rect(offset, view._rect.y, view._rect.width, view._rect.height));
40
+ if (this._hidePartlyVisible) {
41
+ view.visible(view._rect.width + offset <= this._rect.width);
42
+ }
43
+ if (view.visible()) offset += view._rect.width;
44
+ };
45
+ Base._layoutChildViews.call(this);
46
+ };
47
+
48
+ });
@@ -0,0 +1,9 @@
1
+ uki.view.declare('uki.view.Image', uki.view.Base, function() {
2
+ this.typeName = function() { return 'uki.view.Image'; };
3
+
4
+ uki.delegateProp(this, 'src', '_dom');
5
+
6
+ this._createDom = function() {
7
+ this._dom = uki.createElement('img', this.defaultCss)
8
+ };
9
+ });
@@ -0,0 +1,123 @@
1
+ include('../../uki-core/const.js');
2
+
3
+ uki.view.declare('uki.view.Label', uki.view.Base, function(Base) {
4
+
5
+ this._setup = function() {
6
+ Base._setup.call(this);
7
+ uki.extend(this, {
8
+ _scrollable: false,
9
+ _textSelectable: false,
10
+ _inset: new Inset()
11
+ });
12
+ };
13
+
14
+ this._style = function(name, value) {
15
+ if (value !== undefined && 'fontWeight fontSize textDecoration color'.indexOf(name) != -1) {
16
+ this._label.style[name] = value;
17
+ }
18
+ return Base._style.call(this, name, value);
19
+ };
20
+
21
+ this.textSelectable = function(state) {
22
+ if (state !== undefined && !this._textSelectProp) {
23
+ this._label.unselectable = state ? '' : 'on';
24
+ }
25
+ return Base.textSelectable.call(this, state);
26
+ };
27
+
28
+ /**
29
+ * Warning! this operation is expensive
30
+ */
31
+ this.contentsSize = function(autosize) {
32
+ var clone = this._createLabelClone(autosize), inset = this.inset(), size;
33
+
34
+ uki.dom.probe(clone, function() {
35
+ size = new Size(clone.offsetWidth + inset.width(), clone.offsetHeight + inset.height());
36
+ });
37
+
38
+ return size;
39
+ };
40
+
41
+ this.text = function(text) {
42
+ return text === undefined ? this.html() : this.html(uki.escapeHTML(text));
43
+ };
44
+
45
+ this.html = function(html) {
46
+ if (html === undefined) return this._label.innerHTML;
47
+ this._label.innerHTML = html;
48
+ return this;
49
+ };
50
+
51
+ this.inset = uki.newProp('_inset', function(inset) {
52
+ this._inset = Inset.create(inset);
53
+ });
54
+
55
+ this.scrollable = uki.newProp('_scrollable', function(state) {
56
+ this._scrollable = state;
57
+ this._label.style.overflow = state ? 'auto' : 'hidden';
58
+ });
59
+
60
+ this.multiline = uki.newProp('_multiline', function(state) {
61
+ this._multiline = state;
62
+ this._label.style.whiteSpace = state ? '' : 'nowrap';
63
+ });
64
+
65
+ this._createLabelClone = function(autosize) {
66
+ var clone = this._label.cloneNode(true),
67
+ inset = this.inset(), rect = this.rect();
68
+
69
+ if (autosize & ANCHOR_WIDTH) {
70
+ clone.style.width = clone.style.right = '';
71
+ } else if (uki.supportNativeLayout) {
72
+ clone.style.right = '';
73
+ clone.style.width = rect.width - inset.width() + 'px';
74
+ }
75
+ if (autosize & ANCHOR_HEIGHT) {
76
+ clone.style.height = clone.style.bottom = '';
77
+ } else if (uki.supportNativeLayout) {
78
+ clone.style.bottom = '';
79
+ clone.style.height = rect.height - inset.height() + 'px';
80
+ }
81
+ clone.style.paddingTop = 0;
82
+ clone.style.visibility = 'hidden';
83
+ return clone;
84
+ };
85
+
86
+ this._createDom = function() {
87
+ Base._createDom.call(this);
88
+ this._label = uki.createElement('div', Base.defaultCss +
89
+ "font-size:12px;white-space:nowrap;"); // text-shadow:0 1px 0px rgba(255,255,255,0.8);
90
+ this._dom.appendChild(this._label);
91
+ this.textSelectable(this.textSelectable());
92
+ };
93
+
94
+ this._layoutDom = function() {
95
+ Base._layoutDom.apply(this, arguments);
96
+
97
+ var inset = this._inset;
98
+ if (!this.multiline()) {
99
+ var fz = parseInt(this.style('fontSize'), 10) || 12;
100
+ this._label.style.lineHeight = (this._rect.height - inset.top - inset.bottom) + 'px';
101
+ // this._label.style.paddingTop = MAX(0, this._rect.height/2 - fz/2) + 'px';
102
+ }
103
+ var l;
104
+
105
+ if (uki.supportNativeLayout) {
106
+ l = {
107
+ left: inset.left,
108
+ top: inset.top,
109
+ right: inset.right,
110
+ bottom: inset.bottom
111
+ };
112
+ } else {
113
+ l = {
114
+ left: inset.left,
115
+ top: inset.top,
116
+ width: this._rect.width - inset.width(),
117
+ height: this._rect.height - inset.height()
118
+ };
119
+ }
120
+ this._lastLabelLayout = uki.dom.layout(this._label.style, l, this._lastLabelLayout);
121
+ };
122
+
123
+ });
@@ -0,0 +1,23 @@
1
+ include('../list.js');
2
+
3
+ /**
4
+ * Flyweight view rendering
5
+ * Used in lists, tables, grids
6
+ */
7
+ uki.view.list.Render = uki.newClass({
8
+ init: function() {},
9
+
10
+ /**
11
+ * Renders data to an html string
12
+ * @param Object data Data to render
13
+ * @return String html
14
+ */
15
+ render: function(data, rect, i) {
16
+ return '<div style="line-height: ' + rect.height + 'px; font-size: 12px; padding: 0 4px;">' + data + '</div>';
17
+ },
18
+
19
+ setSelected: function(container, data, state, focus) {
20
+ container.style.backgroundColor = state && focus ? '#3875D7' : state ? '#CCC' : '';
21
+ container.style.color = state && focus ? '#FFF' : '#000';
22
+ }
23
+ });