sproutcore 0.9.1 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (208) hide show
  1. data/History.txt +233 -0
  2. data/Manifest.txt +67 -34
  3. data/bin/sc-build +12 -1
  4. data/bin/sc-gen +1 -1
  5. data/bin/sproutcore +14 -0
  6. data/clients/sc_docs/controllers/docs.js +38 -8
  7. data/clients/sc_docs/english.lproj/body.css +80 -127
  8. data/clients/sc_docs/english.lproj/body.rhtml +43 -23
  9. data/clients/sc_docs/english.lproj/no_docs.rhtml +2 -1
  10. data/clients/sc_docs/english.lproj/tabs.rhtml +16 -0
  11. data/clients/sc_docs/main.js +14 -9
  12. data/clients/sc_docs/models/doc.js +1 -1
  13. data/clients/sc_docs/tests/controllers/docs.rhtml +1 -2
  14. data/clients/sc_docs/tests/models/doc.rhtml +1 -2
  15. data/clients/sc_docs/tests/views/doc_frame.rhtml +1 -2
  16. data/clients/sc_docs/tests/views/doc_label_view.rhtml +1 -2
  17. data/clients/sc_docs/views/doc_frame.js +1 -1
  18. data/clients/sc_test_runner/controllers/runner.js +31 -8
  19. data/clients/sc_test_runner/english.lproj/body.css +62 -122
  20. data/clients/sc_test_runner/english.lproj/body.rhtml +62 -26
  21. data/clients/sc_test_runner/main.js +1 -6
  22. data/clients/sc_test_runner/models/test.js +14 -1
  23. data/clients/sc_test_runner/views/runner_frame.js +4 -2
  24. data/clients/view_builder/builders/builder.js +339 -0
  25. data/clients/view_builder/builders/button.js +81 -0
  26. data/clients/view_builder/controllers/document.js +21 -0
  27. data/clients/view_builder/core.js +19 -0
  28. data/clients/view_builder/english.lproj/body.css +77 -0
  29. data/clients/view_builder/english.lproj/body.rhtml +41 -0
  30. data/clients/{sc_docs → view_builder}/english.lproj/controls.css +0 -0
  31. data/clients/view_builder/english.lproj/strings.js +14 -0
  32. data/clients/view_builder/main.js +38 -0
  33. data/clients/view_builder/tests/controllers/document.rhtml +20 -0
  34. data/clients/view_builder/tests/views/builder.rhtml +20 -0
  35. data/clients/view_builder/views/builder.js +23 -0
  36. data/frameworks/prototype/prototype.js +1 -1
  37. data/frameworks/sproutcore/Core.js +32 -7
  38. data/frameworks/sproutcore/README +1 -1
  39. data/frameworks/sproutcore/animation/animation.js +411 -0
  40. data/frameworks/sproutcore/controllers/array.js +17 -9
  41. data/frameworks/sproutcore/controllers/collection.js +9 -110
  42. data/frameworks/sproutcore/controllers/controller.js +1 -1
  43. data/frameworks/sproutcore/controllers/object.js +2 -1
  44. data/frameworks/sproutcore/drag/drag.js +267 -56
  45. data/frameworks/sproutcore/drag/drag_data_source.js +24 -16
  46. data/frameworks/sproutcore/drag/drag_source.js +53 -42
  47. data/frameworks/sproutcore/drag/drop_target.js +2 -2
  48. data/frameworks/sproutcore/english.lproj/buttons.css +337 -236
  49. data/frameworks/sproutcore/english.lproj/core.css +115 -0
  50. data/frameworks/sproutcore/english.lproj/icons.css +227 -0
  51. data/{clients/sc_docs → frameworks/sproutcore}/english.lproj/images/indicator.gif +0 -0
  52. data/frameworks/sproutcore/english.lproj/images/sc-theme-sprite.png +0 -0
  53. data/frameworks/sproutcore/english.lproj/images/sc-theme-ysprite.png +0 -0
  54. data/frameworks/sproutcore/english.lproj/images/shared-icons.png +0 -0
  55. data/frameworks/sproutcore/english.lproj/menu.css +1 -1
  56. data/frameworks/sproutcore/english.lproj/strings.js +1 -1
  57. data/frameworks/sproutcore/english.lproj/theme.css +405 -31
  58. data/frameworks/sproutcore/foundation/application.js +15 -11
  59. data/frameworks/sproutcore/foundation/benchmark.js +1 -1
  60. data/frameworks/sproutcore/foundation/binding.js +2 -2
  61. data/frameworks/sproutcore/foundation/date.js +1 -1
  62. data/frameworks/sproutcore/foundation/error.js +1 -1
  63. data/frameworks/sproutcore/foundation/input_manager.js +32 -21
  64. data/frameworks/sproutcore/foundation/mock.js +1 -1
  65. data/frameworks/sproutcore/foundation/node_descriptor.js +9 -6
  66. data/frameworks/sproutcore/foundation/object.js +249 -177
  67. data/frameworks/sproutcore/foundation/page.js +5 -2
  68. data/frameworks/sproutcore/foundation/path_module.js +11 -10
  69. data/frameworks/sproutcore/foundation/responder.js +5 -2
  70. data/frameworks/sproutcore/foundation/routes.js +17 -13
  71. data/frameworks/sproutcore/foundation/run_loop.js +249 -11
  72. data/frameworks/sproutcore/foundation/server.js +1 -1
  73. data/frameworks/sproutcore/foundation/set.js +3 -3
  74. data/frameworks/sproutcore/foundation/string.js +5 -3
  75. data/frameworks/sproutcore/foundation/timer.js +371 -0
  76. data/frameworks/sproutcore/foundation/undo_manager.js +1 -1
  77. data/frameworks/sproutcore/foundation/unittest.js +3 -3
  78. data/frameworks/sproutcore/foundation/utils.js +161 -2
  79. data/frameworks/sproutcore/globals/panels.js +1 -1
  80. data/frameworks/sproutcore/globals/popups.js +4 -3
  81. data/frameworks/sproutcore/globals/window.js +44 -4
  82. data/frameworks/sproutcore/lib/button_views.rb +328 -0
  83. data/frameworks/sproutcore/lib/collection_view.rb +80 -0
  84. data/frameworks/sproutcore/lib/core_views.rb +281 -0
  85. data/frameworks/sproutcore/lib/form_views.rb +253 -0
  86. data/frameworks/sproutcore/lib/index.rhtml +2 -0
  87. data/frameworks/sproutcore/lib/menu_views.rb +88 -0
  88. data/frameworks/sproutcore/{foundation → mixins}/array.js +60 -29
  89. data/frameworks/sproutcore/mixins/control.js +265 -0
  90. data/frameworks/sproutcore/mixins/delegate_support.js +66 -0
  91. data/frameworks/sproutcore/{foundation → mixins}/observable.js +176 -6
  92. data/frameworks/sproutcore/mixins/scrollable.js +245 -0
  93. data/frameworks/sproutcore/mixins/selection_support.js +148 -0
  94. data/frameworks/sproutcore/mixins/validatable.js +152 -0
  95. data/frameworks/sproutcore/models/collection.js +5 -5
  96. data/frameworks/sproutcore/models/record.js +1 -1
  97. data/frameworks/sproutcore/models/store.js +1 -1
  98. data/frameworks/sproutcore/panes/dialog.js +1 -1
  99. data/frameworks/sproutcore/panes/manager.js +1 -1
  100. data/frameworks/sproutcore/panes/menu.js +1 -1
  101. data/frameworks/sproutcore/panes/overlay.js +2 -2
  102. data/frameworks/sproutcore/panes/panel.js +1 -1
  103. data/frameworks/sproutcore/panes/picker.js +1 -1
  104. data/frameworks/sproutcore/tests/controllers/array.rhtml +44 -4
  105. data/frameworks/sproutcore/tests/foundation/timer/invalidate.rhtml +33 -0
  106. data/frameworks/sproutcore/tests/foundation/timer/invokeLater.rhtml +145 -0
  107. data/frameworks/sproutcore/tests/foundation/timer/isPaused.rhtml +70 -0
  108. data/frameworks/sproutcore/tests/foundation/timer/schedule.rhtml +145 -0
  109. data/frameworks/sproutcore/tests/views/{scroll.rhtml → checkbox.rhtml} +3 -3
  110. data/frameworks/sproutcore/tests/views/{collection.rhtml → collection/base.rhtml} +33 -32
  111. data/frameworks/sproutcore/tests/views/collection/incremental_rendering.rhtml +260 -0
  112. data/frameworks/sproutcore/tests/views/image_cell.rhtml +19 -0
  113. data/frameworks/sproutcore/tests/views/label_item.rhtml +2 -4
  114. data/frameworks/sproutcore/tests/views/list.rhtml +2 -3
  115. data/frameworks/sproutcore/tests/views/list_item.rhtml +20 -0
  116. data/frameworks/sproutcore/tests/views/slider.rhtml +20 -0
  117. data/frameworks/sproutcore/tests/views/text_cell.rhtml +19 -0
  118. data/frameworks/sproutcore/tests/views/view/clippingFrame.rhtml +395 -0
  119. data/frameworks/sproutcore/tests/views/view/frame.rhtml +353 -0
  120. data/frameworks/sproutcore/tests/views/view/innerFrame.rhtml +347 -0
  121. data/frameworks/sproutcore/tests/views/view/isVisibleInWindow.rhtml +148 -0
  122. data/frameworks/sproutcore/tests/views/view/scrollFrame.rhtml +468 -0
  123. data/frameworks/sproutcore/validators/credit_card.js +33 -13
  124. data/frameworks/sproutcore/validators/date.js +26 -6
  125. data/frameworks/sproutcore/validators/email.js +21 -3
  126. data/frameworks/sproutcore/validators/not_empty.js +11 -1
  127. data/frameworks/sproutcore/validators/number.js +18 -4
  128. data/frameworks/sproutcore/validators/password.js +12 -1
  129. data/frameworks/sproutcore/validators/validator.js +204 -194
  130. data/frameworks/sproutcore/views/{button.js → button/button.js} +96 -94
  131. data/frameworks/sproutcore/views/button/checkbox.js +29 -0
  132. data/frameworks/sproutcore/views/button/disclosure.js +42 -0
  133. data/frameworks/sproutcore/views/button/radio.js +29 -0
  134. data/frameworks/sproutcore/views/{collection.js → collection/collection.js} +1373 -1024
  135. data/frameworks/sproutcore/views/collection/grid.js +124 -46
  136. data/frameworks/sproutcore/views/collection/image_cell.js +17 -46
  137. data/frameworks/sproutcore/views/collection/list.js +45 -35
  138. data/frameworks/sproutcore/views/collection/source_list.js +386 -0
  139. data/frameworks/sproutcore/views/collection/table.js +118 -0
  140. data/frameworks/sproutcore/views/container.js +7 -2
  141. data/frameworks/sproutcore/views/error_explanation.js +23 -10
  142. data/frameworks/sproutcore/views/{checkbox_field.js → field/checkbox_field.js} +16 -6
  143. data/frameworks/sproutcore/views/field/field.js +219 -0
  144. data/frameworks/sproutcore/views/{radio_field.js → field/radio_field.js} +27 -12
  145. data/frameworks/sproutcore/views/{select_field.js → field/select_field.js} +116 -90
  146. data/frameworks/sproutcore/views/{text_field.js → field/text_field.js} +57 -8
  147. data/frameworks/sproutcore/views/{textarea_field.js → field/textarea_field.js} +13 -3
  148. data/frameworks/sproutcore/views/filter_button.js +2 -2
  149. data/frameworks/sproutcore/views/form.js +3 -3
  150. data/frameworks/sproutcore/views/image.js +128 -21
  151. data/frameworks/sproutcore/views/inline_text_editor.js +1 -1
  152. data/frameworks/sproutcore/views/label.js +149 -92
  153. data/frameworks/sproutcore/views/list_item.js +225 -0
  154. data/frameworks/sproutcore/views/menu_item.js +10 -4
  155. data/frameworks/sproutcore/views/pagination.js +11 -4
  156. data/frameworks/sproutcore/views/popup_button.js +25 -21
  157. data/frameworks/sproutcore/views/popup_menu.js +10 -4
  158. data/frameworks/sproutcore/views/progress.js +29 -16
  159. data/frameworks/sproutcore/views/radio_group.js +1 -1
  160. data/frameworks/sproutcore/views/scroll.js +60 -20
  161. data/frameworks/sproutcore/views/segmented.js +1 -1
  162. data/frameworks/sproutcore/views/slider.js +132 -0
  163. data/frameworks/sproutcore/views/source_list_group.js +130 -0
  164. data/frameworks/sproutcore/views/spinner.js +1 -1
  165. data/frameworks/sproutcore/views/split.js +292 -0
  166. data/frameworks/sproutcore/views/split_divider.js +109 -0
  167. data/frameworks/sproutcore/views/tab.js +1 -1
  168. data/frameworks/sproutcore/views/toolbar.js +1 -1
  169. data/frameworks/sproutcore/views/view.js +1272 -591
  170. data/generators/client/templates/english.lproj/body.css +1 -1
  171. data/generators/controller/controller_generator.rb +1 -1
  172. data/generators/controller/templates/test.rhtml +2 -1
  173. data/generators/model/templates/test.rhtml +1 -1
  174. data/generators/test/templates/test.rhtml +1 -1
  175. data/generators/view/templates/test.rhtml +1 -1
  176. data/jsdoc/templates/sproutcore/class.tmpl +241 -338
  177. data/jsdoc/templates/sproutcore/default.css +105 -155
  178. data/jsdoc/templates/sproutcore/index.tmpl +43 -8
  179. data/jsdoc/templates/sproutcore/publish.js +9 -4
  180. data/lib/sproutcore/build_tools/html_builder.rb +29 -13
  181. data/lib/sproutcore/build_tools/resource_builder.rb +1 -1
  182. data/lib/sproutcore/bundle.rb +86 -25
  183. data/lib/sproutcore/jsdoc.rb +2 -0
  184. data/lib/sproutcore/version.rb +1 -1
  185. data/lib/sproutcore/view_helpers.rb +36 -3
  186. data/tasks/deployment.rake +1 -1
  187. metadata +69 -36
  188. data/clients/sc_docs/english.lproj/icons/small/next.png +0 -0
  189. data/clients/sc_docs/english.lproj/icons/small/reset.png +0 -0
  190. data/clients/sc_docs/english.lproj/images/gradients.png +0 -0
  191. data/clients/sc_docs/english.lproj/images/toolbar.png +0 -0
  192. data/clients/sc_docs/english.lproj/warning.rhtml +0 -6
  193. data/clients/sc_test_runner/english.lproj/warning.rhtml +0 -6
  194. data/frameworks/sproutcore/english.lproj/buttons.png +0 -0
  195. data/frameworks/sproutcore/english.lproj/collections.css +0 -82
  196. data/frameworks/sproutcore/english.lproj/images/buttons-sprite.png +0 -0
  197. data/frameworks/sproutcore/views/collection/collection_item.js +0 -36
  198. data/frameworks/sproutcore/views/collection/text_cell.js +0 -128
  199. data/frameworks/sproutcore/views/field.js +0 -214
  200. data/frameworks/sproutcore/views/workspace.js +0 -170
  201. data/generators/client/templates/english.lproj/controls.css +0 -0
  202. data/generators/framework/templates/english.lproj/body.css +0 -0
  203. data/generators/framework/templates/english.lproj/body.rhtml +0 -3
  204. data/generators/framework/templates/english.lproj/controls.css +0 -0
  205. data/lib/sproutcore/view_helpers/button_views.rb +0 -302
  206. data/lib/sproutcore/view_helpers/core_views.rb +0 -292
  207. data/lib/sproutcore/view_helpers/form_views.rb +0 -258
  208. data/lib/sproutcore/view_helpers/menu_views.rb +0 -94
@@ -1,4 +1,5 @@
1
- <% view :no_docs_panel, :panel => true, :width => 400 do %>
1
+
2
+ <% view :no_docs_panel, :width => 400 do %>
2
3
  <div>
3
4
  <h1>Client Has No Documents</h1>
4
5
  <p style="font-size: 15px;">This client does not currently have any unit tests. To add a unit test, open a terminal to the root directly and type:</p>
@@ -0,0 +1,16 @@
1
+ <%= view :runner_tab,
2
+ :tag => :iframe,
3
+ :visible => false,
4
+ :view => 'Docs.DocFrameView',
5
+ :bind => { :doc => 'Docs.docsController.selectedDoc' } %>
6
+
7
+ <% view :rebuilding_tab, :visible => false do %>
8
+ <div class="dialog">
9
+ <h1>
10
+ <img src="<%= static_url('indicator') %>" /> Rebuilding Reference Documentation...<br />(This may take awhile)
11
+ </h1>
12
+ </div>
13
+ <% end %>
14
+
15
+ <% view :empty_tab do %>
16
+ <% end %>
@@ -4,18 +4,23 @@
4
4
 
5
5
  function main() {
6
6
  SC.page.awake() ;
7
-
8
- console.log('main') ;
9
- var clientRoot = window.location.pathname.toString().replace(/-docs\/.*/,'-docs').substr(1,window.location.pathname.length);
10
- var clientName = clientRoot.match(/([^\/]+)\/-docs/)[1];
11
- Docs.hidePanels() ;
7
+
8
+ // SproutCore loads the files from a pre-generated location unlike when
9
+ // this apps runs on your local box, hence this logic.
10
+ if (window.location.hostname.toString().indexOf('sproutcore.com') >= 0) {
11
+ var clientRoot = 'sproutcore/-docs' ;
12
+ var clientName = 'sproutcore' ;
13
+ var canRebuild = NO ;
14
+ } else {
15
+ var clientRoot = window.location.pathname.toString().replace(/-docs\/.*/,'-docs').substr(1,window.location.pathname.length);
16
+ var clientName = clientRoot.match(/([^\/]+)\/-docs/)[1];
17
+ var canRebuild = YES ;
18
+ }
19
+
12
20
  Docs.docsController.set('selection',[]) ;
13
21
  Docs.docsController.set('clientRoot', clientRoot) ;
14
22
  Docs.docsController.set('clientName', clientName) ;
23
+ Docs.docsController.set('canRebuild', canRebuild) ;
15
24
  Docs.docsController.reloadDocs() ;
16
25
  } ;
17
26
 
18
- Docs.hidePanels = function() {
19
- SC.page.get('warningPanel').set('isVisible', false) ;
20
- SC.page.get('noDocsPanel').set('isVisible',false) ;
21
- } ;
@@ -5,5 +5,5 @@
5
5
  require('core');
6
6
 
7
7
  Docs.Doc = SC.Record.extend({
8
-
8
+ icon: 'sc-icon-document-16'
9
9
  }) ;
@@ -14,8 +14,7 @@ Test.context("Docs.DocsController",{
14
14
 
15
15
  }) ;
16
16
 
17
- appMain = main; main = null ; // Cancel main() so app does not start
18
-
17
+ if (window.main && (appMain = main)) main = null ;
19
18
  </script>
20
19
 
21
20
  <% end %>
@@ -14,8 +14,7 @@ Test.context("Docs.Doc",{
14
14
 
15
15
  }) ;
16
16
 
17
- appMain = main; main = null ; // Cancel main() so app does not start
18
-
17
+ if (window.main && (appMain = main)) main = null ;
19
18
  </script>
20
19
 
21
20
  <% end %>
@@ -14,8 +14,7 @@ Test.context("Docs.DocFrameView",{
14
14
 
15
15
  }) ;
16
16
 
17
- appMain = main; main = null ; // Cancel main() so app does not start
18
-
17
+ if (window.main && (appMain = main)) main = null ;
19
18
  </script>
20
19
 
21
20
  <% end %>
@@ -14,8 +14,7 @@ Test.context("Docs.DocLabelView",{
14
14
 
15
15
  }) ;
16
16
 
17
- appMain = main; main = null ; // Cancel main() so app does not start
18
-
17
+ if (window.main && (appMain = main)) main = null ;
19
18
  </script>
20
19
 
21
20
  <% end %>
@@ -28,6 +28,6 @@ Docs.DocFrameView = SC.View.extend({
28
28
  this.rootElement.src = url ;
29
29
  }
30
30
 
31
- }.observes('doc')
31
+ }.observes('doc', 'isVisibleInWindow')
32
32
 
33
33
  }) ;
@@ -14,7 +14,9 @@ TestRunner.runnerController = SC.Object.create({
14
14
 
15
15
  // This is displayed as the main UI label.
16
16
  displayClientName: function() {
17
- return "%@ Tests".fmt((this.get('clientName') || '').humanize().capitalize()) ;
17
+ var clientName = (this.get('clientName') || '').humanize().capitalize();
18
+ if (clientName == 'Sproutcore') clientName = 'SproutCore' ;
19
+ return "%@ Tests".fmt(clientName) ;
18
20
  }.property('clientName'),
19
21
 
20
22
  arrangedObjects: [],
@@ -45,18 +47,37 @@ TestRunner.runnerController = SC.Object.create({
45
47
  return '' ;
46
48
  }
47
49
  }.property('testState'),
50
+
51
+ testStateIsRunning: function() {
52
+ return (this.get('testState') === TestRunner.TEST_RUNNING) ;
53
+ }.property('testState'),
48
54
 
49
55
  isRunning: NO,
50
56
  isContinuousIntegrationEnabled: NO,
51
57
 
52
58
  runTestLabel: function() {
53
- return (this.get('isRunning')) ? "Stop Tests" : "Run Tests" ;
59
+ return (this.get('isRunning')) ? "Stop All Tests" : "Run All Tests" ;
54
60
  }.property('isRunning'),
55
61
 
56
62
  toggleRunTests: function() {
57
63
  this.toggleProperty('isRunning') ;
58
64
  },
59
65
 
66
+ rerunCurrentTest: function() {
67
+ var test = this.get('selectedTest') ;
68
+ if (test) {
69
+ this.set('selection', []) ;
70
+ this.set('selection', [test]) ;
71
+ }
72
+ },
73
+
74
+ canRerunCurrentTest: function() {
75
+ if (this.get('isRunning')) return NO ;
76
+ var state = this.get('testState') ;
77
+ var ret = (state === TestRunner.TEST_FAILED || state === TestRunner.TEST_PASSED) ? YES : NO ;
78
+ return ret;
79
+ }.property('isRunning', 'testState'),
80
+
60
81
  reloadTests: function() {
61
82
 
62
83
  // Use Ajax to ask the server for the latest set of tests for the
@@ -85,16 +106,18 @@ TestRunner.runnerController = SC.Object.create({
85
106
  // working away immediately.
86
107
  if (recs.length == 0) {
87
108
  SC.page.get('noTestsPanel').set('isVisible',true) ;
88
- setTimeout(this.reloadTests.bind(this),2000) ;
109
+ this.invokeLater(this.reloadTests,2000) ;
89
110
  } else {
90
111
  SC.page.get('noTestsPanel').set('isVisible',false) ;
91
112
  }
92
113
 
93
114
  // sort the records by name and set as the new arrangedObjects.
94
115
  recs = recs.sort(function(a,b) {
95
- a = a.get('name') || '';
96
- b = b.get('name') || '';
97
- return a.localeCompare(b) ;
116
+ var a_g = a.get('group') || '';
117
+ var b_g = b.get('group') || '';
118
+
119
+ var ret = a_g.localeCompare(b_g) ;
120
+ return (ret != 0) ? ret : (a.get('title') || '').localeCompare(b.get('title') || '') ;
98
121
  }) ;
99
122
 
100
123
  var hadArrangedObjects = this.get('arrangedObjects').length > 0 ;
@@ -122,9 +145,9 @@ TestRunner.runnerController = SC.Object.create({
122
145
  var tests = this.get('arrangedObjects') ;
123
146
  var firstTest = (tests && tests.length > 0) ? [tests[0]] : [] ;
124
147
  this.set('selection', []) ; // clear selection.
125
- setTimeout(function() {
148
+ var t = function() {
126
149
  this.set('selection', firstTest) ;
127
- }.bind(this),1) ;
150
+ }.invokeLater(this,1) ;
128
151
  }
129
152
  }
130
153
  }.observes('isRunning'),
@@ -1,151 +1,91 @@
1
+ /* @override
2
+ http://localhost:4020/static/sc_docs/en/_cache/body-1208633994.css
3
+ http://localhost:4020/static/sc_docs/en/_cache/body-1208635640.css
4
+ */
1
5
 
6
+ /* @group Core */
2
7
 
3
- /* @group Workspace */
4
-
5
- #workspace {
6
- background-color: #8db69a;
8
+ body {
7
9
  position: absolute ;
8
- top: 0;
9
10
  left: 0;
10
- right: 0;
11
- bottom: 0;
11
+ right: 0;
12
+ top: 0;
13
+ bottom: 0;
14
+ padding: 0;
15
+ margin: 0;
16
+ overflow: hidden ;
12
17
  }
13
18
 
14
- #workspace .container {
15
- position: absolute ;
16
- top: 49px;
17
- left: 171px;
18
- right: 0px;
19
- bottom: 26px;
20
- background-color: white ;
21
- overflow: auto;
19
+ .workspace .sidebar {
20
+ position: absolute;
21
+ left: 0;
22
+ top: 0;
23
+ width: 200px;
24
+ bottom: 0;
22
25
  }
23
26
 
24
- #workspace .container iframe {
25
- border: none ;
26
- width: 100%;
27
- height: 100%;
28
- outline: hidden ;
27
+ .sc-theme .workspace.horizontal .sc-split-divider-view {
28
+ position: absolute;
29
+ left: 200px;
30
+ top: 0;
31
+ bottom: 0;
29
32
  }
30
33
 
31
- #workspace .footer {
32
- position: absolute ;
33
- bottom: 0px;
34
- left: 0px;
35
- height: 26px;
36
- right: 0px;
37
- background: static_url('images/gradients') repeat-x left -72px;
38
- border-top: 1px solid #62806d;
39
- text-align: center ;
40
- font-weight: bold ;
34
+ .workspace .document_view {
35
+ position: absolute;
36
+ left: 205px;
37
+ right: 0;
38
+ top: 0;
39
+ bottom: 0;
40
+ border: none ;
41
+ background-color: #aaa ;
41
42
  }
42
43
 
43
- #workspace .footer div {
44
- margin-top: 5px;
44
+ .document_view iframe {
45
+ position: absolute ;
46
+ left: 0;
47
+ top: 0;
48
+ width: 100%;
49
+ height: 100%;
50
+ border: none ;
51
+ padding: 0;
52
+ margin: 0;
53
+ background: white;
45
54
  }
46
55
 
47
56
 
48
- /* @end */
49
-
50
- /* @group Toolbar */
51
-
52
- #workspace .toolbar {
53
- position: absolute ;
54
- top: 0;
55
- left: 0px;
56
- right: 0px;
57
- height: 48px;
58
- border-bottom: 1px solid #62806d;
59
- background: static_url('images/gradients') repeat-x center top;
57
+ .left.app-label {
58
+ padding-top: 5px;
60
59
  }
61
-
62
- #workspace .toolbar .buttons {
63
- text-align: right ;
64
- position: absolute ;
65
- top: 13px ;
66
- right: 10px ;
60
+
61
+ .sc-theme .app-label .sc-label-view {
62
+ text-shadow: white 0px 1px 0px;
63
+ font-weight: bold ;
64
+ font-size: 15px;
67
65
  }
68
66
 
69
- #workspace .toolbar h1 {
70
- border: none ;
71
- padding: 0;
72
- margin : 0;
73
- position: absolute ;
74
- left: 8px;
75
- top: 4px;
76
- font-size: 28px;
77
- font-weight: normal ;
67
+ .app-label img {
68
+ width: 27px;
69
+ height: 27px;
70
+ vertical-align: middle;
71
+ position: relative ;
72
+ top: -3px;
73
+ margin-right: 2px;
78
74
  }
79
75
 
80
76
  /* @end */
81
77
 
82
78
  /* @group Sidebar */
83
79
 
84
- #workspace .sidebar {
80
+ .sidebar .source_list {
85
81
  position: absolute ;
86
- top: 49px;
87
- left: 0px;
88
- width: 170px;
89
- bottom: 26px;
90
- background-color: #e0efed;
91
- border-right: 1px #62806d solid;
92
- overflow: auto ;
93
- }
94
-
95
- .sidebar {
96
- list-style-type: none ;
97
- padding: 0;
98
- margin: 0;
99
- }
100
-
101
- .sidebar a {
102
- display: block ;
103
- text-decoration: none ;
104
- color: black ;
105
- border: 1px solid #e0efed;
106
- padding-bottom: 4px;
107
- padding-top: 7px ;
108
- padding-left: 8px ;
109
- border-left-style: none;
110
- border-right-style: none;
111
- -moz-user-select: none;
112
- -khtml-user-select: none;
113
- user-select: none;
114
- }
115
-
116
- .sidebar a.sel {
117
- border: 1px solid #1e504a;
118
- color: white ;
119
- font-weight: bold;
120
- padding-top: 6px;
121
- background: static_url('images/gradients') repeat-x center -144px;
122
- border-top-color: #188b7d;
123
- border-right-style: none;
124
- border-left-style: none;
125
- }
126
-
127
- .sidebar a.sel:active {
128
- border: 1px solid #1e504a;
129
- color: white ;
130
- font-weight: bold;
131
- padding-top: 6px;
132
- background: static_url('images/gradients') repeat-x center -144px;
133
- border-top-color: #188b7d;
134
- border-right-style: none;
135
- border-left-style: none;
82
+ top: 0;
83
+ left: 0;
84
+ right: 0;
85
+ bottom: 0;
86
+ border: none ;
136
87
  }
137
88
 
138
- .sidebar a:active {
139
- background-color: #cedfdf;
140
- border: 1px solid #cedfdf;
141
- border-right-style: none;
142
- border-left-style: none;
143
- }
89
+ /* @end */
144
90
 
145
- .sidebar hr {
146
- border: none ;
147
- border-top: #ccc solid 1px;
148
- margin: 4px 8px;
149
- }
150
91
 
151
- /* @end */
@@ -1,35 +1,71 @@
1
1
  <% content_for('body') do %>
2
2
 
3
- <% view :workspace do %>
4
-
5
- <% # PRIMARY TOOLBAR -%>
6
- <div class="toolbar">
7
- <%= label_view :outlet => true, :tag => 'h1', :bind => {
8
- :content => 'TestRunner.runnerController.displayClientName'
9
- } %>
10
- <div class="buttons">
11
- <%= checkbox_view :outlet => true, :label => "Continuous Integration", :bind => { :value => 'TestRunner.runnerController.isContinuousIntegrationEnabled' } %>
12
- <%= button_view :outlet => true, :label => "Run Tests", :image => static_url('icons/small/reset'), :bind => {
13
- :label_text => 'TestRunner.runnerController.runTestLabel' }, :action => 'TestRunner.runnerController.toggleRunTests' %>
3
+ <% view :header, :class => 'sc-header sc-square-theme' do %>
4
+ <div class="left app-label">
5
+ <img src="<%= static_url('images/sproutcore-logo.png') %>" /><%= label_view :outlet => true, :tag => :span,
6
+ :bind => { :value => 'TestRunner.runnerController.displayClientName' } %>
7
+ </div>
8
+ <div class="center">
9
+ </div>
10
+ <div class="right">
11
+ <%= checkbox_view :outlet => true, :label => "Continuous Integration", :bind => { :value => 'TestRunner.runnerController.isContinuousIntegrationEnabled' } %>
12
+ <%= button_view :outlet => true, :title => "Run All Tests", :bind => {
13
+ :title => 'TestRunner.runnerController.runTestLabel' }, :action => 'TestRunner.runnerController.toggleRunTests' %>
14
14
  </div>
15
- </div>
15
+ <% end %>
16
16
 
17
- <%= collection_view :outlet => :sidebar, :class => :sidebar, :bind => {
18
- :content => 'TestRunner.runnerController.arrangedObjects',
19
- :selection => 'TestRunner.runnerController.selection'
20
- }, :example_view => 'TestRunner.TestLabelView' %>
21
17
 
22
- <div class="container">
23
- <%= view :outlet => :runner_frame, :tag => :iframe, :view => 'TestRunner.RunnerFrameView', :bind => {
24
- :test => 'TestRunner.runnerController.selectedTest',
25
- :state => 'TestRunner.runnerController.testState' } %>
26
- </div>
18
+ <% split_view :workspace, :class => 'sc-app-workspace header footer', :direction => :horizontal do %>
19
+ <% view :sidebar, :outlet => true do %>
20
+ <% scroll_view :source_list, :outlet => true do %>
21
+ <%= source_list_view :outlet => true,
22
+ :group => :group,
23
+ :group_visible_key => true,
24
+ :content_value_key => :title,
25
+ :content_icon_key => :icon,
26
+ :bind => {
27
+ :content => 'TestRunner.runnerController.arrangedObjects',
28
+ :selection => 'TestRunner.runnerController.selection'
29
+ } %>
30
+
31
+ <% end %>
32
+ <% end %>
33
+
34
+ <%= split_divider_view :outlet => true, :width => 5 %>
27
35
 
28
- <% # FOOTER -%>
29
- <div class="footer">
30
- <%= label_view :outlet => :runner_status, :bind => { :content => 'TestRunner.runnerController.testStateLabel' } %>
31
- </div>
36
+ <% view :document_view, :outlet => true do %>
37
+ <%= view :outlet => :runner_frame, :tag => :iframe,
38
+ :view => 'TestRunner.RunnerFrameView',
39
+ :bind => {
40
+ :test => 'TestRunner.runnerController.selectedTest',
41
+ :state => 'TestRunner.runnerController.testState'
42
+ } %>
43
+ <% end %>
44
+
45
+ <% end %>
32
46
 
47
+ <% view :footer, :class => 'sc-footer sc-square-theme' do %>
48
+ <div class="left">
49
+ </div>
50
+ <div class="center">
51
+ <%= image_view :outlet => true,
52
+ :value => static_url('indicator'),
53
+ :style => 'vertical-align: middle; position: relative; top: -1px;',
54
+ :bind => {
55
+ :visible => 'TestRunner.runnerController.testStateIsRunning'
56
+ } %>
57
+ <%= label_view :outlet => :runner_status, :tag => 'span',
58
+ :bind => {
59
+ :value => 'TestRunner.runnerController.testStateLabel'
60
+ } %>
61
+ </div>
62
+ <div class="right">
63
+ <%= button_view :outlet => true, :title => 'Rerun Current Test',
64
+ :action => 'TestRunner.runnerController.rerunCurrentTest',
65
+ :bind => {
66
+ :enabled => 'TestRunner.runnerController.canRerunCurrentTest'
67
+ } %>
68
+ </div>
33
69
  <% end %>
34
70
 
35
71
  <script>
@@ -37,4 +73,4 @@ window.urlPrefix = "<%= bundle.url_prefix %>";
37
73
  window.indexPrefix = "<%= bundle.index_prefix %>";
38
74
  </script>
39
75
 
40
- <% end %>
76
+ <% end %>