sproutcore 0.9.17 → 0.9.18
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +45 -2
- data/Manifest.txt +10 -0
- data/Rakefile +1 -1
- data/app_generators/sproutcore/templates/sc-config +8 -2
- data/bin/sc-server +4 -0
- data/clients/sc_docs/english.lproj/body.css +0 -20
- data/clients/sc_docs/english.lproj/body.rhtml +1 -3
- data/clients/sc_docs/english.lproj/strings.js +1 -1
- data/clients/sc_docs/french.lproj/strings.js +14 -0
- data/clients/sc_test_runner/english.lproj/body.css +0 -20
- data/clients/sc_test_runner/english.lproj/body.rhtml +1 -3
- data/config/hoe.rb +1 -1
- data/frameworks/sproutcore/HISTORY +56 -1
- data/frameworks/sproutcore/debug/trace.js +81 -0
- data/frameworks/sproutcore/debug/unittest.js +2 -1
- data/frameworks/sproutcore/english.lproj/buttons.css +5 -2
- data/frameworks/sproutcore/english.lproj/core.css +0 -16
- data/frameworks/sproutcore/english.lproj/images/sc-theme-sprite.png +0 -0
- data/frameworks/sproutcore/english.lproj/splitview.css +83 -0
- data/frameworks/sproutcore/english.lproj/theme.css +21 -5
- data/frameworks/sproutcore/foundation/object.js +23 -0
- data/frameworks/sproutcore/foundation/string.js +4 -3
- data/frameworks/sproutcore/lib/core_views.rb +43 -8
- data/frameworks/sproutcore/lib/form_views.rb +2 -2
- data/frameworks/sproutcore/lib/index.rhtml +1 -1
- data/frameworks/sproutcore/mixins/enumerable.js +4 -8
- data/frameworks/sproutcore/mixins/selection_support.js +1 -1
- data/frameworks/sproutcore/models/collection.js +14 -3
- data/frameworks/sproutcore/models/record.js +6 -5
- data/frameworks/sproutcore/models/store.js +3 -3
- data/frameworks/sproutcore/panes/picker.js +1 -0
- data/frameworks/sproutcore/server/rails_server.js +4 -7
- data/frameworks/sproutcore/server/server.js +58 -1
- data/frameworks/sproutcore/tests/controllers/object.rhtml +1 -1
- data/frameworks/sproutcore/tests/models/collection.rhtml +160 -0
- data/frameworks/sproutcore/tests/models/model.rhtml +15 -3
- data/frameworks/sproutcore/tests/views/collection/base.rhtml +120 -47
- data/frameworks/sproutcore/tests/views/collection/source_list_rendering.rhtml +232 -0
- data/frameworks/sproutcore/tests/views/view/frame.rhtml +2 -2
- data/frameworks/sproutcore/tests/views/view/innerFrame.rhtml +87 -85
- data/frameworks/sproutcore/tests/views/view/scrollFrame.rhtml +25 -26
- data/frameworks/sproutcore/views/collection/collection.js +5 -1
- data/frameworks/sproutcore/views/field/select_field.js +1 -1
- data/frameworks/sproutcore/views/radio_group.js +2 -2
- data/frameworks/sproutcore/views/split.js +191 -174
- data/frameworks/sproutcore/views/split_divider.js +71 -68
- data/frameworks/sproutcore/views/view.js +65 -25
- data/lib/sproutcore.rb +4 -1
- data/lib/sproutcore/build_tools/html_builder.rb +50 -46
- data/lib/sproutcore/build_tools/resource_builder.rb +17 -5
- data/lib/sproutcore/bundle_installer.rb +3 -1
- data/lib/sproutcore/bundle_manifest.rb +4 -3
- data/lib/sproutcore/cssmin.rb +195 -0
- data/lib/sproutcore/generator_helper.rb +15 -0
- data/lib/sproutcore/helpers/capture_helper.rb +2 -22
- data/lib/sproutcore/helpers/dom_id_helper.rb +14 -0
- data/lib/sproutcore/helpers/static_helper.rb +6 -2
- data/lib/sproutcore/helpers/text_helper.rb +1 -1
- data/lib/sproutcore/merb.rb +2 -2
- data/lib/sproutcore/renderers/erubis.rb +43 -0
- data/lib/sproutcore/renderers/haml.rb +28 -0
- data/lib/sproutcore/renderers/sass.rb +42 -0
- data/lib/sproutcore/version.rb +1 -1
- data/lib/sproutcore/view_helpers.rb +40 -46
- data/sc_generators/controller/controller_generator.rb +1 -1
- data/sc_generators/language/USAGE +5 -7
- data/sc_generators/language/language_generator.rb +1 -1
- data/sc_generators/language/templates/strings.js +5 -1
- data/sc_generators/model/model_generator.rb +1 -1
- data/sc_generators/test/test_generator.rb +1 -1
- data/sc_generators/view/view_generator.rb +1 -1
- metadata +12 -5
@@ -0,0 +1,232 @@
|
|
1
|
+
<% content_for('final') do %>
|
2
|
+
<script>
|
3
|
+
|
4
|
+
// create some item data...
|
5
|
+
[
|
6
|
+
{ guid: '1001', name: 'item one', group: '1' },
|
7
|
+
{ guid: '1002', name: 'item two', group: '1' },
|
8
|
+
{ guid: '1003', name: 'item three', group: '2' },
|
9
|
+
{ guid: '1004', name: 'item four', group: '3' },
|
10
|
+
{ guid: '1005', name: 'item five', group: '3' },
|
11
|
+
{ guid: '1006', name: 'item six', group: '3' }
|
12
|
+
].each(function(o){ SC.Store.addRecord(SC.Record.create(o)); });
|
13
|
+
|
14
|
+
// a collection to hold the items...
|
15
|
+
testCollection = SC.Record.collection();
|
16
|
+
testCollection.refresh();
|
17
|
+
|
18
|
+
// a controller for the collection...
|
19
|
+
testController = SC.CollectionController.create();
|
20
|
+
|
21
|
+
Test.context("A grouped SC.SourceListView with its content set to a SC.CollectionController", {
|
22
|
+
|
23
|
+
"Item views should be the same width as the SC.CollectionView": function()
|
24
|
+
{
|
25
|
+
var widthOfFirstItemView = function() {
|
26
|
+
var itemView = testSourceListView.get('itemViews').first() ;
|
27
|
+
return (itemView) ? itemView.get('frame').width : null ;
|
28
|
+
} ;
|
29
|
+
|
30
|
+
widthOfFirstItemView().shouldEqual(testSourceListView.get('frame').width) ;
|
31
|
+
|
32
|
+
SC.Store.addRecord( SC.Record.create({ guid: '0999', name: 'item zero', group: '1' }) );
|
33
|
+
|
34
|
+
widthOfFirstItemView().shouldEqual(testSourceListView.get('frame').width) ;
|
35
|
+
},
|
36
|
+
|
37
|
+
"Group views should be the same width as the SC.CollectionView": function()
|
38
|
+
{
|
39
|
+
var widthOfFirstGroupView = function() {
|
40
|
+
var groupView = testSourceListView.get('groupViews').first() ;
|
41
|
+
return (groupView) ? groupView.get('frame').width : null ;
|
42
|
+
} ;
|
43
|
+
|
44
|
+
widthOfFirstGroupView().shouldEqual(testSourceListView.get('frame').width) ;
|
45
|
+
},
|
46
|
+
|
47
|
+
// setup: function()
|
48
|
+
// {
|
49
|
+
// // add a scroll view wrapper.
|
50
|
+
// scrollView = SC.ScrollView.create() ;
|
51
|
+
// scrollView.set('frame', { x: 10, y: 10, width: 100, height: 100 });
|
52
|
+
// SC.window.appendChild(scrollView);
|
53
|
+
//
|
54
|
+
// // create the view...
|
55
|
+
// testSourceListView = SC.ListView.extend({
|
56
|
+
// contentValueKey: 'name',
|
57
|
+
// groupBy: 'group',
|
58
|
+
// contentBinding: 'testController.arrangedObjects',
|
59
|
+
// selectionBinding: 'testController.selection'
|
60
|
+
// }).create();
|
61
|
+
//
|
62
|
+
// scrollView.set('content', testSourceListView) ;
|
63
|
+
// },
|
64
|
+
//
|
65
|
+
// teardown: function()
|
66
|
+
// {
|
67
|
+
// // tell SC.Store to dump all the records...
|
68
|
+
// // otherwise, since SC.Store is shared across all tests (yuk!) we'll get shared fixtues
|
69
|
+
// testCollection.get('records').each(function(r){ SC.Store.removeRecord(r); });
|
70
|
+
//
|
71
|
+
// // remove the view from SC.window... again, no shared fixtures...
|
72
|
+
// testSourceListView.removeFromParent();
|
73
|
+
// scrollView.removeFromParent() ;
|
74
|
+
//
|
75
|
+
// delete testSourceListView;
|
76
|
+
// delete testCollection;
|
77
|
+
// delete testController;
|
78
|
+
// delete scrollView ;
|
79
|
+
// }
|
80
|
+
|
81
|
+
setup: function()
|
82
|
+
{
|
83
|
+
// add a scroll view wrapper.
|
84
|
+
scrollView = SC.ScrollView.create() ;
|
85
|
+
scrollView.set('frame', { x: 10, y: 10, width: 100, height: 30 }) ;
|
86
|
+
SC.window.appendChild(scrollView) ;
|
87
|
+
|
88
|
+
// create the view...
|
89
|
+
testSourceListView = SC.SourceListView.create({
|
90
|
+
contentValueKey: 'name',
|
91
|
+
groupBy: 'group',
|
92
|
+
contentBinding: 'testController.arrangedObjects',
|
93
|
+
selectionBinding: 'testController.selection'
|
94
|
+
}) ;
|
95
|
+
scrollView.set('content', testSourceListView) ;
|
96
|
+
|
97
|
+
testController.set('content', testCollection) ;
|
98
|
+
},
|
99
|
+
|
100
|
+
teardown: function()
|
101
|
+
{
|
102
|
+
// remove the view from SC.window
|
103
|
+
testSourceListView.removeFromParent() ;
|
104
|
+
scrollView.removeFromParent() ;
|
105
|
+
|
106
|
+
delete testSourceListView ;
|
107
|
+
delete scrollView ;
|
108
|
+
|
109
|
+
testController.set('content', null) ;
|
110
|
+
}
|
111
|
+
|
112
|
+
});
|
113
|
+
|
114
|
+
Test.context("A grouped SC.SourceListView with its content set to a SC.CollectionController, after the containing SC.ScrollView has been resized", {
|
115
|
+
|
116
|
+
|
117
|
+
"Item views should be the same width as the SC.CollectionView": function()
|
118
|
+
{
|
119
|
+
var widthOfFirstItemView = function() {
|
120
|
+
var itemView = testSourceListView.get('itemViews').first() ;
|
121
|
+
return (itemView) ? itemView.get('frame').width : null ;
|
122
|
+
} ;
|
123
|
+
|
124
|
+
widthOfFirstItemView().shouldEqual(testSourceListView.get('frame').width) ;
|
125
|
+
|
126
|
+
SC.Store.addRecord( SC.Record.create({ guid: '0999', name: 'item zero', group: '1' }) );
|
127
|
+
|
128
|
+
widthOfFirstItemView().shouldEqual(testSourceListView.get('frame').width) ;
|
129
|
+
},
|
130
|
+
|
131
|
+
"Group views should be the same width as the SC.CollectionView": function()
|
132
|
+
{
|
133
|
+
var widthOfFirstGroupView = function() {
|
134
|
+
var groupView = testSourceListView.get('groupViews').first() ;
|
135
|
+
return (groupView) ? groupView.get('frame').width : null ;
|
136
|
+
} ;
|
137
|
+
|
138
|
+
widthOfFirstGroupView().shouldEqual(testSourceListView.get('frame').width) ;
|
139
|
+
},
|
140
|
+
|
141
|
+
// setup: function()
|
142
|
+
// {
|
143
|
+
// // add a scroll view wrapper.
|
144
|
+
// scrollView = SC.ScrollView.create() ;
|
145
|
+
// scrollView.set('frame', { x: 10, y: 10, width: 100, height: 100 });
|
146
|
+
// SC.window.appendChild(scrollView);
|
147
|
+
//
|
148
|
+
// // create the view...
|
149
|
+
// testSourceListView = SC.SourceListView.extend({
|
150
|
+
// contentValueKey: 'name',
|
151
|
+
// groupBy: 'group',
|
152
|
+
// contentBinding: 'testController.arrangedObjects',
|
153
|
+
// selectionBinding: 'testController.selection'
|
154
|
+
// }).create();
|
155
|
+
//
|
156
|
+
// scrollView.set('content', testSourceListView) ;
|
157
|
+
//
|
158
|
+
// // create some item data...
|
159
|
+
// [
|
160
|
+
// { guid: '1001', name: 'item one', group: '1' },
|
161
|
+
// { guid: '1002', name: 'item two', group: '1' },
|
162
|
+
// { guid: '1003', name: 'item three', group: '2' },
|
163
|
+
// { guid: '1004', name: 'item four', group: '3' },
|
164
|
+
// { guid: '1005', name: 'item five', group: '3' },
|
165
|
+
// { guid: '1006', name: 'item six', group: '3' }
|
166
|
+
// ].each(function(o){ SC.Store.addRecord(SC.Record.create(o)); });
|
167
|
+
//
|
168
|
+
// // a collection to hold the items...
|
169
|
+
// testCollection = SC.Record.collection();
|
170
|
+
// testCollection.refresh();
|
171
|
+
//
|
172
|
+
// // a controller for the collection...
|
173
|
+
// testController = SC.CollectionController.create();
|
174
|
+
// testController.set('content', testCollection);
|
175
|
+
//
|
176
|
+
// // resize the scroll view
|
177
|
+
// scrollView.viewFrameWillChange()
|
178
|
+
// scrollView.set('frame', {x: 10, y: 10, width: 200, height: 100})
|
179
|
+
// scrollView.viewFrameDidChange()
|
180
|
+
//
|
181
|
+
// },
|
182
|
+
// teardown: function()
|
183
|
+
// {
|
184
|
+
// // tell SC.Store to dump all the records...
|
185
|
+
// // otherwise, since SC.Store is shared across all tests (yuk!) we'll get shared fixtues
|
186
|
+
// testCollection.get('records').each(function(r){ SC.Store.removeRecord(r); });
|
187
|
+
//
|
188
|
+
// // remove the view from SC.window... again, no shared fixtures...
|
189
|
+
// testSourceListView.removeFromParent();
|
190
|
+
// scrollView.removeFromParent() ;
|
191
|
+
//
|
192
|
+
// delete testSourceListView;
|
193
|
+
// delete testCollection;
|
194
|
+
// delete testController;
|
195
|
+
// delete scrollView ;
|
196
|
+
// }
|
197
|
+
|
198
|
+
setup: function()
|
199
|
+
{
|
200
|
+
// add a scroll view wrapper.
|
201
|
+
scrollView = SC.ScrollView.create() ;
|
202
|
+
scrollView.set('frame', { x: 10, y: 10, width: 100, height: 30 }) ;
|
203
|
+
SC.window.appendChild(scrollView) ;
|
204
|
+
|
205
|
+
// create the view...
|
206
|
+
testSourceListView = SC.SourceListView.create({
|
207
|
+
contentValueKey: 'name',
|
208
|
+
groupBy: 'group',
|
209
|
+
contentBinding: 'testController.arrangedObjects',
|
210
|
+
selectionBinding: 'testController.selection'
|
211
|
+
}) ;
|
212
|
+
scrollView.set('content', testSourceListView) ;
|
213
|
+
|
214
|
+
testController.set('content', testCollection) ;
|
215
|
+
},
|
216
|
+
|
217
|
+
teardown: function()
|
218
|
+
{
|
219
|
+
// remove the view from SC.window
|
220
|
+
testSourceListView.removeFromParent() ;
|
221
|
+
scrollView.removeFromParent() ;
|
222
|
+
|
223
|
+
delete testSourceListView ;
|
224
|
+
delete scrollView ;
|
225
|
+
|
226
|
+
testController.set('content', null) ;
|
227
|
+
}
|
228
|
+
|
229
|
+
});
|
230
|
+
|
231
|
+
</script>
|
232
|
+
<% end %>
|
@@ -15,8 +15,8 @@ Test.context("CASE 1: Auto-layout view with no padding & no border", {
|
|
15
15
|
"frame should reflect current offset settings": function() {
|
16
16
|
var el = this.v.rootElement ;
|
17
17
|
var f = { x: el.offsetTop, y: el.offsetLeft, width: el.offsetWidth, height: el.offsetHeight };
|
18
|
-
console.log(this.v.get('frame').x) ;
|
19
|
-
console.log('this.frame', this.v.get('frame')) ;
|
18
|
+
// console.log(this.v.get('frame').x) ;
|
19
|
+
// console.log('this.frame', this.v.get('frame')) ;
|
20
20
|
SC.rectsEqual(f, this.v.get('frame')).shouldEqual(true) ;
|
21
21
|
},
|
22
22
|
|
@@ -10,91 +10,91 @@
|
|
10
10
|
|
11
11
|
<script>
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
//
|
16
|
-
//
|
17
|
-
//
|
18
|
-
//
|
19
|
-
|
20
|
-
|
21
|
-
//
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
//
|
49
|
-
//
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
//
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
//
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
//
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
13
|
+
Test.context("CASE 1: Auto-layout view with no padding & no border", {
|
14
|
+
|
15
|
+
// IMPORTANT: This test validates that innerFrame works even on elements in
|
16
|
+
// IE when hasLayout = false. Make sure you do not edit the CSS or other
|
17
|
+
// properties for this test in such a way that it would give the test
|
18
|
+
// element hasLayout.
|
19
|
+
"frame should == innerFrame": function() {
|
20
|
+
|
21
|
+
// verify hasLayout is false in IE.
|
22
|
+
if (SC.Platform.IE) {
|
23
|
+
var hasLayout = v.rootElement.currentStyle.hasLayout ;
|
24
|
+
assertEqual(hasLayout, false, 'element.hasLayout MUST be false in IE');
|
25
|
+
}
|
26
|
+
|
27
|
+
SC.rectsEqual(v.get('frame'), v.get('innerFrame')).shouldEqual(true) ;
|
28
|
+
},
|
29
|
+
|
30
|
+
"frame & innerFrame should change when CSS changed and viewFrameDidChange() is called": function() {
|
31
|
+
var origFrame = this.v.get('frame') ;
|
32
|
+
var origInnerFrame = this.v.get('innerFrame') ;
|
33
|
+
|
34
|
+
this.v.addClassName('half') ;
|
35
|
+
this.v.viewFrameDidChange() ;
|
36
|
+
|
37
|
+
SC.rectsEqual(this.v.get('frame'), origFrame).shouldEqual(false) ;
|
38
|
+
SC.rectsEqual(this.v.get('innerFrame'), origInnerFrame).shouldEqual(false) ;
|
39
|
+
|
40
|
+
this.v.removeClassName('half') ; //reset
|
41
|
+
},
|
42
|
+
|
43
|
+
setup: function() { this.v = SC.page.get('case1'); }
|
44
|
+
|
45
|
+
});
|
46
|
+
|
47
|
+
|
48
|
+
// CASE 2: Auto-layout of view with padding
|
49
|
+
// - same as Case 1, except innerFrame = frame less padding
|
50
|
+
CASE2_OFFSET = 2;
|
51
|
+
Test.context("CASE 2: Auto-layout view with padding & border", {
|
52
|
+
|
53
|
+
"innerFrame should == frame less border": function() {
|
54
|
+
var f = v.get('frame') ;
|
55
|
+
f.x += CASE2_OFFSET; f.y += CASE2_OFFSET;
|
56
|
+
f.width -= (CASE2_OFFSET*2); f.height -= (CASE2_OFFSET*2) ;
|
57
|
+
//console.log('f: %@ if: %@'.fmt($H(f).inspect(), $H(this.v.get('innerFrame')).inspect()));
|
58
|
+
|
59
|
+
SC.rectsEqual(f, v.get('innerFrame')).shouldEqual(true) ;
|
60
|
+
},
|
61
|
+
|
62
|
+
"frame & innerFrame should change when CSS changed and viewFrameDidChange is called.; innerFrame should maintain proportion": function() {
|
63
|
+
var origFrame = v.get('frame') ;
|
64
|
+
var origInnerFrame = v.get('innerFrame') ;
|
65
|
+
|
66
|
+
// verify that frames change
|
67
|
+
v.addClassName('half') ;
|
68
|
+
v.viewFrameDidChange() ;
|
69
|
+
|
70
|
+
SC.rectsEqual(v.get('frame'), origFrame).shouldEqual(false) ;
|
71
|
+
SC.rectsEqual(v.get('innerFrame'), origInnerFrame).shouldEqual(false) ;
|
72
|
+
|
73
|
+
// verify that innerFrame changes correctly.
|
74
|
+
var f = this.v.get('frame') ;
|
75
|
+
f.x += CASE2_OFFSET; f.y += CASE2_OFFSET;
|
76
|
+
f.width -= (CASE2_OFFSET*2); f.height -= (CASE2_OFFSET*2) ;
|
77
|
+
SC.rectsEqual(f, v.get('innerFrame')).shouldEqual(true) ;
|
78
|
+
|
79
|
+
v.removeClassName('half') ;
|
80
|
+
|
81
|
+
},
|
82
|
+
|
83
|
+
"changing border should change innerFrame": function() {
|
84
|
+
v.setStyle({ border: '5px red solid' }) ;
|
85
|
+
v.viewFrameDidChange() ;
|
86
|
+
var f = v.get('frame') ;
|
87
|
+
f.x += 5; f.y += 5;
|
88
|
+
f.width -= 10; f.height -= 10 ;
|
89
|
+
|
90
|
+
var got = v.get('innerFrame') ;
|
91
|
+
console.log('expected: %@ got: %@'.fmt($H(f).inspect(), $H(got).inspect()));
|
92
|
+
SC.rectsEqual(f, got).shouldEqual(true) ;
|
93
|
+
},
|
94
|
+
|
95
|
+
setup: function() { this.v = SC.page.get('case2'); }
|
96
|
+
|
97
|
+
});
|
98
98
|
|
99
99
|
// CASE 3: Manual-layout view with some padding and border
|
100
100
|
// - innerFrame should update at frame is changed.
|
@@ -171,9 +171,11 @@ Test.context("CASE 4: Positioned Child view inside of view with overflow = hidde
|
|
171
171
|
},
|
172
172
|
|
173
173
|
"nested innerframe origin should be 1,1 inside of parent": function() {
|
174
|
+
console.log('running');
|
174
175
|
var f = this.v.child.nestedChild.get('innerFrame') ;
|
175
176
|
f.x.shouldEqual(1) ;
|
176
177
|
f.y.shouldEqual(1) ;
|
178
|
+
console.log('done');
|
177
179
|
},
|
178
180
|
|
179
181
|
"setting child frame should reflect in new frame value + border offset": function() {
|
@@ -24,7 +24,6 @@ Test.context("CASE 1: Non-scrollable view - all view fits within content", {
|
|
24
24
|
// console.log('----') ;
|
25
25
|
// console.log('f:' + $H(f).inspect()) ;
|
26
26
|
// console.log('scroll:' + $H(this.v.get('scrollFrame')).inspect()) ;
|
27
|
-
// console.log('innerFrame:' + $H(this.v.get('innerFrame')).inspect()) ;
|
28
27
|
// console.log('frame:' + $H(this.v.get('frame')).inspect()) ;
|
29
28
|
|
30
29
|
SC.rectsEqual(f, this.v.get('scrollFrame')).shouldEqual(true) ;
|
@@ -61,11 +60,11 @@ Test.context("CASE 2: Non-scrollable view with hidden overflow content", {
|
|
61
60
|
var f = this.v.get('innerFrame') ;
|
62
61
|
f.x = f.y = 0 ; f.height = CHILD_HEIGHT ;
|
63
62
|
|
64
|
-
console.log('CASE 2 ----') ;
|
65
|
-
console.log('f:' + $H(f).inspect()) ;
|
66
|
-
console.log('scroll:' + $H(this.v.get('scrollFrame')).inspect()) ;
|
67
|
-
console.log('innerFrame:' + $H(this.v.get('innerFrame')).inspect()) ;
|
68
|
-
console.log('frame:' + $H(this.v.get('frame')).inspect()) ;
|
63
|
+
// console.log('CASE 2 ----') ;
|
64
|
+
// console.log('f:' + $H(f).inspect()) ;
|
65
|
+
// console.log('scroll:' + $H(this.v.get('scrollFrame')).inspect()) ;
|
66
|
+
// console.log('innerFrame:' + $H(this.v.get('innerFrame')).inspect()) ;
|
67
|
+
// console.log('frame:' + $H(this.v.get('frame')).inspect()) ;
|
69
68
|
|
70
69
|
SC.rectsEqual(f, this.v.get('scrollFrame')).shouldEqual(true) ;
|
71
70
|
},
|
@@ -112,11 +111,11 @@ Test.context("CASE 3: Scrollable view with hidden overflow content", {
|
|
112
111
|
var f = this.v.get('innerFrame') ;
|
113
112
|
f.x = f.y = 0 ; f.height = CHILD_HEIGHT ;
|
114
113
|
|
115
|
-
console.log('CASE 3 ----') ;
|
116
|
-
console.log('f:' + $H(f).inspect()) ;
|
117
|
-
console.log('scroll:' + $H(this.v.get('scrollFrame')).inspect()) ;
|
118
|
-
console.log('innerFrame:' + $H(this.v.get('innerFrame')).inspect()) ;
|
119
|
-
console.log('frame:' + $H(this.v.get('frame')).inspect()) ;
|
114
|
+
// console.log('CASE 3 ----') ;
|
115
|
+
// console.log('f:' + $H(f).inspect()) ;
|
116
|
+
// console.log('scroll:' + $H(this.v.get('scrollFrame')).inspect()) ;
|
117
|
+
// console.log('innerFrame:' + $H(this.v.get('innerFrame')).inspect()) ;
|
118
|
+
// console.log('frame:' + $H(this.v.get('frame')).inspect()) ;
|
120
119
|
|
121
120
|
SC.rectsEqual(f, this.v.get('scrollFrame')).shouldEqual(true) ;
|
122
121
|
},
|
@@ -164,11 +163,11 @@ Test.context("CASE 4: Scrollable view with scrollbar and vertical overflow conte
|
|
164
163
|
var f = this.v.get('innerFrame') ;
|
165
164
|
f.x = f.y = 0 ; f.height = CHILD_HEIGHT ;
|
166
165
|
|
167
|
-
console.log('CASE 4 ----') ;
|
168
|
-
console.log('f:' + $H(f).inspect()) ;
|
169
|
-
console.log('scroll:' + $H(this.v.get('scrollFrame')).inspect()) ;
|
170
|
-
console.log('innerFrame:' + $H(this.v.get('innerFrame')).inspect()) ;
|
171
|
-
console.log('frame:' + $H(this.v.get('frame')).inspect()) ;
|
166
|
+
// console.log('CASE 4 ----') ;
|
167
|
+
// console.log('f:' + $H(f).inspect()) ;
|
168
|
+
// console.log('scroll:' + $H(this.v.get('scrollFrame')).inspect()) ;
|
169
|
+
// console.log('innerFrame:' + $H(this.v.get('innerFrame')).inspect()) ;
|
170
|
+
// console.log('frame:' + $H(this.v.get('frame')).inspect()) ;
|
172
171
|
|
173
172
|
SC.rectsEqual(f, this.v.get('scrollFrame')).shouldEqual(true) ;
|
174
173
|
},
|
@@ -228,11 +227,11 @@ Test.context("CASE 5: Scrollable view with scrollbar and horizontal overflow con
|
|
228
227
|
var f = this.v.get('innerFrame') ;
|
229
228
|
f.x = f.y = 0 ; f.width = CHILD_WIDTH ;
|
230
229
|
|
231
|
-
console.log('CASE 5 ----') ;
|
232
|
-
console.log('f:' + $H(f).inspect()) ;
|
233
|
-
console.log('scroll:' + $H(this.v.get('scrollFrame')).inspect()) ;
|
234
|
-
console.log('innerFrame:' + $H(this.v.get('innerFrame')).inspect()) ;
|
235
|
-
console.log('frame:' + $H(this.v.get('frame')).inspect()) ;
|
230
|
+
// console.log('CASE 5 ----') ;
|
231
|
+
// console.log('f:' + $H(f).inspect()) ;
|
232
|
+
// console.log('scroll:' + $H(this.v.get('scrollFrame')).inspect()) ;
|
233
|
+
// console.log('innerFrame:' + $H(this.v.get('innerFrame')).inspect()) ;
|
234
|
+
// console.log('frame:' + $H(this.v.get('frame')).inspect()) ;
|
236
235
|
|
237
236
|
SC.rectsEqual(f, this.v.get('scrollFrame')).shouldEqual(true) ;
|
238
237
|
},
|
@@ -295,11 +294,11 @@ Test.context("CASE 6: Scrollable view with scrollbar and horizontal overflow con
|
|
295
294
|
f.x = f.y = 0 ; f.width = CHILD_WIDTH ;
|
296
295
|
f.height = CHILD_HEIGHT ;
|
297
296
|
|
298
|
-
console.log('CASE 6 ----') ;
|
299
|
-
console.log('f:' + $H(f).inspect()) ;
|
300
|
-
console.log('scroll:' + $H(this.v.get('scrollFrame')).inspect()) ;
|
301
|
-
console.log('innerFrame:' + $H(this.v.get('innerFrame')).inspect()) ;
|
302
|
-
console.log('frame:' + $H(this.v.get('frame')).inspect()) ;
|
297
|
+
// console.log('CASE 6 ----') ;
|
298
|
+
// console.log('f:' + $H(f).inspect()) ;
|
299
|
+
// console.log('scroll:' + $H(this.v.get('scrollFrame')).inspect()) ;
|
300
|
+
// console.log('innerFrame:' + $H(this.v.get('innerFrame')).inspect()) ;
|
301
|
+
// console.log('frame:' + $H(this.v.get('frame')).inspect()) ;
|
303
302
|
|
304
303
|
SC.rectsEqual(f, this.v.get('scrollFrame')).shouldEqual(true) ;
|
305
304
|
},
|