sproutcore 1.5.0.rc.1 → 1.5.0.rc.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +4 -0
- data/VERSION.yml +1 -1
- data/lib/frameworks/sproutcore/Buildfile +9 -4
- data/lib/frameworks/sproutcore/README.md +1 -0
- data/lib/frameworks/sproutcore/design/{TestRunner_Design.gaffle → TestRunner_Design.graffle}/QuickLook/Preview.pdf +0 -0
- data/lib/frameworks/sproutcore/design/{TestRunner_Design.gaffle → TestRunner_Design.graffle}/QuickLook/Thumbnail.tiff +0 -0
- data/lib/frameworks/sproutcore/design/{TestRunner_Design.gaffle → TestRunner_Design.graffle}/data.plist +0 -0
- data/lib/frameworks/sproutcore/design/{TestRunner_Design.gaffle → TestRunner_Design.graffle}/image10.png +0 -0
- data/lib/frameworks/sproutcore/design/{TestRunner_Design.gaffle → TestRunner_Design.graffle}/image11.png +0 -0
- data/lib/frameworks/sproutcore/design/{TestRunner_Design.gaffle → TestRunner_Design.graffle}/image13.png +0 -0
- data/lib/frameworks/sproutcore/design/{TestRunner_Design.gaffle → TestRunner_Design.graffle}/image15.png +0 -0
- data/lib/frameworks/sproutcore/design/{TestRunner_Design.gaffle → TestRunner_Design.graffle}/image16.png +0 -0
- data/lib/frameworks/sproutcore/design/{TestRunner_Design.gaffle → TestRunner_Design.graffle}/image17.png +0 -0
- data/lib/frameworks/sproutcore/design/{TestRunner_Design.gaffle → TestRunner_Design.graffle}/image18.png +0 -0
- data/lib/frameworks/sproutcore/design/{TestRunner_Design.gaffle → TestRunner_Design.graffle}/image19.png +0 -0
- data/lib/frameworks/sproutcore/design/{TestRunner_Design.gaffle → TestRunner_Design.graffle}/image22.tiff +0 -0
- data/lib/frameworks/sproutcore/design/{TestRunner_Design.gaffle → TestRunner_Design.graffle}/image23.png +0 -0
- data/lib/frameworks/sproutcore/design/{TestRunner_Design.gaffle → TestRunner_Design.graffle}/image24.png +0 -0
- data/lib/frameworks/sproutcore/design/{TestRunner_Design.gaffle → TestRunner_Design.graffle}/image25.png +0 -0
- data/lib/frameworks/sproutcore/design/{TestRunner_Design.gaffle → TestRunner_Design.graffle}/image30.png +0 -0
- data/lib/frameworks/sproutcore/design/{TestRunner_Design.gaffle → TestRunner_Design.graffle}/image31.png +0 -0
- data/lib/frameworks/sproutcore/design/{TestRunner_Design.gaffle → TestRunner_Design.graffle}/image8.png +0 -0
- data/lib/frameworks/sproutcore/design/{TestRunner_Design.gaffle → TestRunner_Design.graffle}/image9.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/animation/core.js +23 -25
- data/lib/frameworks/sproutcore/frameworks/bootstrap/system/browser.js +160 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/controllers/array.js +73 -82
- data/lib/frameworks/sproutcore/frameworks/core_foundation/core.js +1 -3
- data/lib/frameworks/sproutcore/frameworks/{handlebars/extensions → core_foundation/ext/handlebars}/bind.js +110 -7
- data/lib/frameworks/sproutcore/frameworks/{handlebars/extensions → core_foundation/ext/handlebars}/collection.js +10 -7
- data/lib/frameworks/sproutcore/frameworks/{handlebars/extensions → core_foundation/ext/handlebars}/localization.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/{handlebars/extensions → core_foundation/ext/handlebars}/view.js +4 -2
- data/lib/frameworks/sproutcore/frameworks/{handlebars/extensions.js → core_foundation/ext/handlebars.js} +0 -57
- data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/object.js +1 -3
- data/lib/frameworks/sproutcore/frameworks/core_foundation/mixins/template_helpers/text_field_support.js +11 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/main.js +1 -3
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/pane.js +2 -4
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/application.js +14 -16
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/builder.js +29 -37
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/datetime.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/event.js +71 -19
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/locale.js +3 -7
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/page.js +5 -7
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/selection_set.js +1 -3
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/sparse_array.js +4 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/timer.js +21 -27
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/utils.js +3 -5
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controllers/array/array_case.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controllers/object/single_enumerable_case.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/sparse_array.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/template/handlebars.js +93 -1
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/clippingFrame.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/convertLayouts.js +13 -11
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/layer.js +2 -6
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/layoutStyle.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/theme.js +2 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/view.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/template.js +6 -2
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/template_collection.js +87 -32
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/layout.js +21 -25
- data/lib/frameworks/sproutcore/frameworks/datastore/data_sources/cascade.js +15 -19
- data/lib/frameworks/sproutcore/frameworks/datastore/data_sources/data_source.js +114 -167
- data/lib/frameworks/sproutcore/frameworks/datastore/data_sources/fixtures.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/datastore/models/child_attribute.js +4 -6
- data/lib/frameworks/sproutcore/frameworks/datastore/models/children_attribute.js +2 -4
- data/lib/frameworks/sproutcore/frameworks/datastore/models/fetched_attribute.js +7 -7
- data/lib/frameworks/sproutcore/frameworks/datastore/models/many_attribute.js +18 -20
- data/lib/frameworks/sproutcore/frameworks/datastore/models/record.js +74 -72
- data/lib/frameworks/sproutcore/frameworks/datastore/models/record_attribute.js +36 -29
- data/lib/frameworks/sproutcore/frameworks/datastore/models/single_attribute.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/datastore/system/child_array.js +97 -78
- data/lib/frameworks/sproutcore/frameworks/datastore/system/many_array.js +117 -97
- data/lib/frameworks/sproutcore/frameworks/datastore/system/nested_store.js +13 -13
- data/lib/frameworks/sproutcore/frameworks/datastore/system/query.js +111 -108
- data/lib/frameworks/sproutcore/frameworks/datastore/system/record_array.js +231 -198
- data/lib/frameworks/sproutcore/frameworks/datastore/system/store.js +146 -145
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/builders.js +21 -21
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/record_array/flush.js +49 -50
- data/lib/frameworks/sproutcore/frameworks/datetime/{system → frameworks/core/system}/datetime.js +122 -171
- data/lib/frameworks/sproutcore/frameworks/datetime/{tests → frameworks/core/tests}/system/datetime.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/datetime/{resources → frameworks/localized/resources}/strings.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/localized/system/datetime.js +91 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/core.js +18 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/border.js +23 -16
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_fast_path.js +56 -45
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_group.js +5 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_row_delegate.js +21 -19
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_view_delegate.js +82 -77
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/navigation_builder.js +18 -12
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/scrollable.js +29 -17
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/alert.js +148 -107
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/menu.js +31 -16
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/modal.js +16 -13
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/palette.js +38 -17
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/panel.js +37 -25
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/picker.js +247 -144
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/select_button.js +155 -100
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/sheet.js +39 -17
- data/lib/frameworks/sproutcore/frameworks/desktop/protocols/drag_data_source.js +9 -6
- data/lib/frameworks/sproutcore/frameworks/desktop/protocols/drag_source.js +18 -22
- data/lib/frameworks/sproutcore/frameworks/desktop/protocols/drop_target.js +27 -17
- data/lib/frameworks/sproutcore/frameworks/desktop/system/drag.js +77 -44
- data/lib/frameworks/sproutcore/frameworks/desktop/system/undo_manager.js +68 -33
- data/lib/frameworks/sproutcore/frameworks/desktop/views/button.js +168 -110
- data/lib/frameworks/sproutcore/frameworks/desktop/views/checkbox.js +37 -5
- data/lib/frameworks/sproutcore/frameworks/desktop/views/collection.js +187 -123
- data/lib/frameworks/sproutcore/frameworks/desktop/views/date_field.js +73 -49
- data/lib/frameworks/sproutcore/frameworks/desktop/views/disclosure.js +34 -9
- data/lib/frameworks/sproutcore/frameworks/desktop/views/file.js +51 -14
- data/lib/frameworks/sproutcore/frameworks/desktop/views/grid.js +38 -8
- data/lib/frameworks/sproutcore/frameworks/desktop/views/image_button.js +15 -9
- data/lib/frameworks/sproutcore/frameworks/desktop/views/list.js +54 -34
- data/lib/frameworks/sproutcore/frameworks/desktop/views/list_item.js +113 -42
- data/lib/frameworks/sproutcore/frameworks/desktop/views/master_detail.js +84 -28
- data/lib/frameworks/sproutcore/frameworks/desktop/views/menu_item.js +67 -51
- data/lib/frameworks/sproutcore/frameworks/desktop/views/menu_scroll.js +122 -35
- data/lib/frameworks/sproutcore/frameworks/desktop/views/navigation.js +40 -16
- data/lib/frameworks/sproutcore/frameworks/desktop/views/navigation_bar.js +28 -18
- data/lib/frameworks/sproutcore/frameworks/desktop/views/popup_button.js +27 -31
- data/lib/frameworks/sproutcore/frameworks/desktop/views/progress.js +118 -68
- data/lib/frameworks/sproutcore/frameworks/desktop/views/radio.js +117 -61
- data/lib/frameworks/sproutcore/frameworks/desktop/views/scene.js +23 -16
- data/lib/frameworks/sproutcore/frameworks/desktop/views/scroll.js +241 -77
- data/lib/frameworks/sproutcore/frameworks/desktop/views/scroller.js +134 -69
- data/lib/frameworks/sproutcore/frameworks/desktop/views/segment.js +107 -25
- data/lib/frameworks/sproutcore/frameworks/desktop/views/segmented.js +125 -48
- data/lib/frameworks/sproutcore/frameworks/desktop/views/select.js +165 -69
- data/lib/frameworks/sproutcore/frameworks/desktop/views/select_field.js +73 -24
- data/lib/frameworks/sproutcore/frameworks/desktop/views/separator.js +19 -5
- data/lib/frameworks/sproutcore/frameworks/desktop/views/source_list.js +16 -4
- data/lib/frameworks/sproutcore/frameworks/desktop/views/source_list_group.js +14 -7
- data/lib/frameworks/sproutcore/frameworks/desktop/views/split.js +43 -37
- data/lib/frameworks/sproutcore/frameworks/desktop/views/split_divider.js +8 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/views/stacked.js +14 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/views/static_content.js +16 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/views/tab.js +99 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/thumb.js +13 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/views/toolbar.js +58 -8
- data/lib/frameworks/sproutcore/frameworks/desktop/views/web.js +34 -18
- data/lib/frameworks/sproutcore/frameworks/desktop/views/well.js +25 -9
- data/lib/frameworks/sproutcore/frameworks/desktop/views/workspace.js +70 -36
- data/lib/frameworks/sproutcore/frameworks/foundation/controllers/tree.js +10 -5
- data/lib/frameworks/sproutcore/frameworks/foundation/debug/control_test_pane.js +28 -17
- data/lib/frameworks/sproutcore/frameworks/foundation/delegates/inline_text_field.js +41 -43
- data/lib/frameworks/sproutcore/frameworks/foundation/gestures/pinch.js +42 -4
- data/lib/frameworks/sproutcore/frameworks/foundation/gestures/swipe.js +94 -4
- data/lib/frameworks/sproutcore/frameworks/foundation/gestures/tap.js +41 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/auto_mixin.js +2 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/auto_resize.js +18 -9
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/collection_content.js +7 -5
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/content_display.js +7 -8
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/content_value_support.js +34 -24
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/control.js +48 -18
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inline_text_field.js +1 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/misc.js +1 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/tasks/preload_bundle.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/beginEditing.js +0 -11
- data/lib/frameworks/sproutcore/frameworks/foundation/validators/date_time.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/views/text_field.js +8 -0
- data/lib/frameworks/sproutcore/frameworks/qunit/README.md +24 -0
- data/lib/frameworks/sproutcore/frameworks/qunit/package.json +21 -0
- data/lib/frameworks/sproutcore/frameworks/qunit/qunit/qunit.css +215 -0
- data/lib/frameworks/sproutcore/frameworks/qunit/qunit/qunit.js +1442 -0
- data/lib/frameworks/sproutcore/frameworks/qunit/test/headless.html +24 -0
- data/lib/frameworks/sproutcore/frameworks/qunit/test/index.html +18 -0
- data/lib/frameworks/sproutcore/frameworks/qunit/test/logs.html +17 -0
- data/lib/frameworks/sproutcore/frameworks/qunit/test/logs.js +150 -0
- data/lib/frameworks/sproutcore/frameworks/qunit/test/same.js +1421 -0
- data/lib/frameworks/sproutcore/frameworks/qunit/test/test.js +314 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/core.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/array.js +369 -60
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/enumerable.js +2 -405
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/observable.js +3 -9
- data/lib/frameworks/sproutcore/frameworks/runtime/private/property_chain.js +50 -45
- data/lib/frameworks/sproutcore/frameworks/runtime/system/binding.js +20 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/system/object.js +0 -9
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/guidFor.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/array.js +36 -14
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/enumerable/enumerable.js +0 -34
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/enumerable/enumerable_observers.js +50 -61
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/observable.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/propertyChanges.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/registerDependentKeys.js +45 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/propertyChanges.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/object/bindings.js +5 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/object/enhance.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/testing/core.js +3 -0
- data/lib/frameworks/sproutcore/frameworks/testing/system/plan.js +0 -1
- data/lib/frameworks/sproutcore/frameworks/testing/system/runner.js +0 -1
- data/lib/gen/html_app/templates/apps/@target_name@/@target_name@.js +1 -1
- data/vendor/chance/lib/chance/instance.rb +8 -6
- metadata +41 -31
- data/lib/frameworks/sproutcore/frameworks/testing/jquery.js +0 -3559
- data/lib/frameworks/sproutcore/frameworks/testing/qunit.js +0 -827
@@ -21,7 +21,6 @@
|
|
21
21
|
be surrounded by two other views.
|
22
22
|
|
23
23
|
@extends SC.View
|
24
|
-
|
25
24
|
@author Charles Jolley
|
26
25
|
@author Lawrence Pit
|
27
26
|
@author Erich Ocean
|
@@ -30,20 +29,28 @@
|
|
30
29
|
SC.SplitDividerView = SC.View.extend(
|
31
30
|
/** @scope SC.SplitDividerView.prototype */ {
|
32
31
|
|
32
|
+
/**
|
33
|
+
@type Array
|
34
|
+
@default ['sc-split-divider-view']
|
35
|
+
@see SC.View#classNames
|
36
|
+
*/
|
33
37
|
classNames: ['sc-split-divider-view'],
|
34
38
|
|
35
39
|
/** @private */
|
36
40
|
|
41
|
+
/** @private */
|
37
42
|
mouseDown: function(evt) {
|
38
43
|
var splitView = this.get('splitView');
|
39
44
|
return (splitView) ? splitView.mouseDownInThumbView(evt, this) : sc_super();
|
40
45
|
},
|
41
46
|
|
47
|
+
/** @private */
|
42
48
|
doubleClick: function(evt) {
|
43
49
|
var splitView = this.get('splitView');
|
44
50
|
return (splitView) ? splitView.doubleClickInThumbView(evt, this) : sc_super();
|
45
51
|
},
|
46
52
|
|
53
|
+
/** @private */
|
47
54
|
touchStart: function(evt){
|
48
55
|
return this.mouseDown(evt);
|
49
56
|
}
|
@@ -16,7 +16,7 @@ sc_require('views/collection') ;
|
|
16
16
|
collections with complex displays and variable heights such as comments or
|
17
17
|
small notification queues.
|
18
18
|
|
19
|
-
|
19
|
+
## Static Layout
|
20
20
|
|
21
21
|
This view makes no attempt to size or position your child views. It assumes
|
22
22
|
you are using StaticLayout for your child views. If you don't enable static
|
@@ -29,20 +29,30 @@ sc_require('views/collection') ;
|
|
29
29
|
@extends SC.CollectionView
|
30
30
|
@since SproutCore 0.9
|
31
31
|
*/
|
32
|
-
SC.StackedView = SC.CollectionView.extend(
|
33
|
-
/** SC.StackedView.prototype */ {
|
32
|
+
SC.StackedView = SC.CollectionView.extend(
|
33
|
+
/** @scope SC.StackedView.prototype */ {
|
34
34
|
|
35
|
+
/**
|
36
|
+
@type Array
|
37
|
+
@default ['sc-stacked-view']
|
38
|
+
@see SC.View#classNames
|
39
|
+
*/
|
35
40
|
classNames: ['sc-stacked-view'],
|
36
41
|
|
37
42
|
/**
|
38
43
|
Default layout for a stacked view will fill the parent view but auto-
|
39
44
|
adjust the height of the view.
|
45
|
+
|
46
|
+
@type Hash
|
47
|
+
@default `{ top: 0, left: 0, right: 0, height: 1 }`
|
48
|
+
@see SC.View#layout
|
40
49
|
*/
|
41
50
|
layout: { top: 0, left: 0, right: 0, height: 1 },
|
42
51
|
|
43
52
|
/**
|
44
53
|
Return full range of its indexes for nowShowing
|
45
54
|
|
55
|
+
@param {Rect} rect
|
46
56
|
@returns {SC.IndexSet} full range of indexes
|
47
57
|
*/
|
48
58
|
computeNowShowing: function(rect) {
|
@@ -74,6 +84,7 @@ SC.StackedView = SC.CollectionView.extend(
|
|
74
84
|
return this;
|
75
85
|
},
|
76
86
|
|
87
|
+
/** @private */
|
77
88
|
_updateHeight: function() {
|
78
89
|
|
79
90
|
var childViews = this.get('childViews'),
|
@@ -26,13 +26,24 @@
|
|
26
26
|
@since SproutCore 1.2
|
27
27
|
@author Tom Dale
|
28
28
|
*/
|
29
|
+
SC.StaticContentView = SC.View.extend(SC.StaticLayout,
|
30
|
+
/** @scope SC.StaticContentView.prototype */ {
|
29
31
|
|
30
|
-
|
31
|
-
|
32
|
+
/**
|
33
|
+
@type Array
|
34
|
+
@default ['sc-static-content-view']
|
35
|
+
@see SC.View#classNames
|
36
|
+
*/
|
32
37
|
classNames: ['sc-static-content-view'],
|
33
38
|
|
39
|
+
/**
|
40
|
+
@type Array
|
41
|
+
@default ['content']
|
42
|
+
@see SC.View#displayProperties
|
43
|
+
*/
|
34
44
|
displayProperties: ['content'],
|
35
45
|
|
46
|
+
|
36
47
|
// ..........................................................
|
37
48
|
// PROPERTIES
|
38
49
|
//
|
@@ -42,6 +53,7 @@ SC.StaticContentView = SC.View.extend(SC.StaticLayout, {
|
|
42
53
|
the DOM, so ensure that any user-generated content has been escaped.
|
43
54
|
|
44
55
|
@type String
|
56
|
+
@default null
|
45
57
|
*/
|
46
58
|
content: null,
|
47
59
|
|
@@ -121,11 +133,13 @@ SC.StaticContentView = SC.View.extend(SC.StaticLayout, {
|
|
121
133
|
}
|
122
134
|
},
|
123
135
|
|
136
|
+
/** @private */
|
124
137
|
touchStart: function(evt){
|
125
138
|
evt.allowDefault();
|
126
139
|
return YES;
|
127
140
|
},
|
128
141
|
|
142
|
+
/** @private */
|
129
143
|
touchEnd: function(evt){
|
130
144
|
evt.allowDefault();
|
131
145
|
return YES;
|
@@ -7,8 +7,25 @@
|
|
7
7
|
|
8
8
|
sc_require('views/segmented');
|
9
9
|
|
10
|
+
/**
|
11
|
+
@static
|
12
|
+
@type String
|
13
|
+
@constant
|
14
|
+
*/
|
10
15
|
SC.TOP_LOCATION = 'top';
|
16
|
+
|
17
|
+
/**
|
18
|
+
@static
|
19
|
+
@type String
|
20
|
+
@constant
|
21
|
+
*/
|
11
22
|
SC.TOP_TOOLBAR_LOCATION = 'top-toolbar';
|
23
|
+
|
24
|
+
/**
|
25
|
+
@static
|
26
|
+
@type String
|
27
|
+
@constant
|
28
|
+
*/
|
12
29
|
SC.BOTTOM_LOCATION = 'bottom';
|
13
30
|
|
14
31
|
/**
|
@@ -24,8 +41,18 @@ SC.BOTTOM_LOCATION = 'bottom';
|
|
24
41
|
SC.TabView = SC.View.extend(
|
25
42
|
/** @scope SC.TabView.prototype */ {
|
26
43
|
|
44
|
+
/**
|
45
|
+
@type Array
|
46
|
+
@default ['sc-tab-view']
|
47
|
+
@see SC.View#classNames
|
48
|
+
*/
|
27
49
|
classNames: ['sc-tab-view'],
|
28
50
|
|
51
|
+
/**
|
52
|
+
@type Array
|
53
|
+
@default ['nowShowing']
|
54
|
+
@see SC.View#displayProperties
|
55
|
+
*/
|
29
56
|
displayProperties: ['nowShowing'],
|
30
57
|
|
31
58
|
// ..........................................................
|
@@ -34,27 +61,85 @@ SC.TabView = SC.View.extend(
|
|
34
61
|
|
35
62
|
/**
|
36
63
|
Set nowShowing with the page you want to display.
|
64
|
+
|
65
|
+
@type String
|
66
|
+
@default null
|
37
67
|
*/
|
38
68
|
nowShowing: null,
|
39
69
|
|
70
|
+
/**
|
71
|
+
@type Array
|
72
|
+
@default []
|
73
|
+
*/
|
40
74
|
items: [],
|
41
75
|
|
76
|
+
/**
|
77
|
+
@type Boolean
|
78
|
+
@default YES
|
79
|
+
*/
|
42
80
|
isEnabled: YES,
|
43
81
|
|
82
|
+
/**
|
83
|
+
@type String
|
84
|
+
@default null
|
85
|
+
*/
|
44
86
|
itemTitleKey: null,
|
87
|
+
|
88
|
+
/**
|
89
|
+
@type String
|
90
|
+
@default null
|
91
|
+
*/
|
45
92
|
itemValueKey: null,
|
93
|
+
|
94
|
+
/**
|
95
|
+
@type String
|
96
|
+
@default null
|
97
|
+
*/
|
46
98
|
itemIsEnabledKey: null,
|
99
|
+
|
100
|
+
/**
|
101
|
+
@type String
|
102
|
+
@default null
|
103
|
+
*/
|
47
104
|
itemIconKey: null,
|
105
|
+
|
106
|
+
/**
|
107
|
+
@type String
|
108
|
+
@default null
|
109
|
+
*/
|
48
110
|
itemWidthKey: null,
|
111
|
+
|
112
|
+
/**
|
113
|
+
@type String
|
114
|
+
@default null
|
115
|
+
*/
|
49
116
|
itemToolTipKey: null,
|
117
|
+
|
118
|
+
/**
|
119
|
+
@type Number
|
120
|
+
@default SC.REGULAR_BUTTON_HEIGHT
|
121
|
+
*/
|
50
122
|
tabHeight: SC.REGULAR_BUTTON_HEIGHT,
|
51
123
|
|
124
|
+
/**
|
125
|
+
Possible values:
|
126
|
+
|
127
|
+
- SC.TOP_LOCATION
|
128
|
+
- SC.TOP_TOOLBAR_LOCATION
|
129
|
+
- SC.BOTTOM_LOCATION
|
130
|
+
|
131
|
+
@type String
|
132
|
+
@default SC.TOP_LOCATION
|
133
|
+
*/
|
52
134
|
tabLocation: SC.TOP_LOCATION,
|
53
135
|
|
54
136
|
/**
|
55
137
|
If set, then the tab location will be automatically saved in the user
|
56
138
|
defaults. Browsers that support localStorage will automatically store
|
57
139
|
this information locally.
|
140
|
+
|
141
|
+
@type String
|
142
|
+
@default null
|
58
143
|
*/
|
59
144
|
userDefaultKey: null,
|
60
145
|
|
@@ -64,6 +149,7 @@ SC.TabView = SC.View.extend(
|
|
64
149
|
//
|
65
150
|
|
66
151
|
// forward important changes on to child views
|
152
|
+
/** @private */
|
67
153
|
_tab_nowShowingDidChange: function() {
|
68
154
|
var v = this.get('nowShowing');
|
69
155
|
this.get('containerView').set('nowShowing',v);
|
@@ -71,6 +157,7 @@ SC.TabView = SC.View.extend(
|
|
71
157
|
return this ;
|
72
158
|
}.observes('nowShowing'),
|
73
159
|
|
160
|
+
/** @private */
|
74
161
|
_tab_saveUserDefault: function() {
|
75
162
|
// if user default is set, save also
|
76
163
|
var v = this.get('nowShowing');
|
@@ -80,6 +167,7 @@ SC.TabView = SC.View.extend(
|
|
80
167
|
}
|
81
168
|
}.observes('nowShowing'),
|
82
169
|
|
170
|
+
/** @private */
|
83
171
|
_tab_itemsDidChange: function() {
|
84
172
|
this.get('segmentedView').set('items', this.get('items'));
|
85
173
|
return this ;
|
@@ -93,6 +181,7 @@ SC.TabView = SC.View.extend(
|
|
93
181
|
this._tab_nowShowingDidChange()._tab_itemsDidChange();
|
94
182
|
},
|
95
183
|
|
184
|
+
/** @private */
|
96
185
|
awake: function() {
|
97
186
|
sc_super();
|
98
187
|
var defaultKey = this.get('userDefaultKey');
|
@@ -104,6 +193,7 @@ SC.TabView = SC.View.extend(
|
|
104
193
|
|
105
194
|
},
|
106
195
|
|
196
|
+
/** @private */
|
107
197
|
createChildViews: function() {
|
108
198
|
var childViews = [], view, containerView, layout,
|
109
199
|
tabLocation = this.get('tabLocation'),
|
@@ -151,6 +241,7 @@ SC.TabView = SC.View.extend(
|
|
151
241
|
this.invokeOnce(this.updateLayerIfNeeded) ;
|
152
242
|
}.observes('value'),
|
153
243
|
|
244
|
+
/** @private */
|
154
245
|
init: function() {
|
155
246
|
// before we setup the rest of the view, copy key config properties
|
156
247
|
// from the owner view...
|
@@ -177,9 +268,17 @@ SC.TabView = SC.View.extend(
|
|
177
268
|
The containerView managed by this tab view. Note that TabView uses a
|
178
269
|
custom container view. You can access this view but you cannot change
|
179
270
|
it.
|
271
|
+
|
272
|
+
@type SC.View
|
273
|
+
@default SC.ContainerView
|
274
|
+
@readOnly
|
180
275
|
*/
|
181
276
|
containerView: SC.ContainerView.extend({ renderDelegateName: 'wellRenderDelegate' }),
|
182
277
|
|
278
|
+
/**
|
279
|
+
@type SC.View
|
280
|
+
@default SC.SegmentedView
|
281
|
+
*/
|
183
282
|
segmentedView: SC.SegmentedView
|
184
283
|
|
185
284
|
}) ;
|
@@ -24,12 +24,22 @@
|
|
24
24
|
SC.ThumbView = SC.View.extend(
|
25
25
|
/** @scope SC.ThumbView.prototype */ {
|
26
26
|
|
27
|
+
/**
|
28
|
+
@type Array
|
29
|
+
@default ['sc-thumb-view']
|
30
|
+
@see SC.View#classNames
|
31
|
+
*/
|
27
32
|
classNames: ['sc-thumb-view'],
|
28
33
|
|
29
34
|
/**
|
30
35
|
Enable this thumb view to control its parent split view.
|
36
|
+
|
37
|
+
@type Boolean
|
38
|
+
@default YES
|
31
39
|
*/
|
32
40
|
isEnabled: YES,
|
41
|
+
|
42
|
+
/** @private */
|
33
43
|
isEnabledBindingDefault: SC.Binding.bool(),
|
34
44
|
|
35
45
|
/** @private */
|
@@ -39,6 +49,7 @@ SC.ThumbView = SC.View.extend(
|
|
39
49
|
return sc_super() ;
|
40
50
|
},
|
41
51
|
|
52
|
+
/** @private */
|
42
53
|
mouseDown: function(evt) {
|
43
54
|
if (!this.get('isEnabled')) return NO ;
|
44
55
|
|
@@ -46,8 +57,9 @@ SC.ThumbView = SC.View.extend(
|
|
46
57
|
return (splitView) ? splitView.mouseDownInThumbView(evt, this) : sc_super();
|
47
58
|
},
|
48
59
|
|
60
|
+
/** @private */
|
49
61
|
touchStart: function(evt) {
|
50
62
|
return this.mouseDown(evt);
|
51
63
|
}
|
52
|
-
|
64
|
+
|
53
65
|
});
|
@@ -7,31 +7,61 @@
|
|
7
7
|
|
8
8
|
/**
|
9
9
|
Layout properties needed to anchor a view to the top.
|
10
|
+
|
11
|
+
@static
|
12
|
+
@constant
|
13
|
+
@type Hash
|
14
|
+
@default `{ top: 0 }`
|
10
15
|
*/
|
11
16
|
SC.ANCHOR_TOP = { top: 0 };
|
12
17
|
|
13
18
|
/**
|
14
19
|
Layout properties needed to anchor a view to the left.
|
20
|
+
|
21
|
+
@static
|
22
|
+
@constant
|
23
|
+
@type Hash
|
24
|
+
@default `{ left: 0 }`
|
15
25
|
*/
|
16
26
|
SC.ANCHOR_LEFT = { left: 0 };
|
17
27
|
|
18
28
|
/*
|
19
29
|
Layout properties to anchor a view to the top left
|
30
|
+
|
31
|
+
@static
|
32
|
+
@constant
|
33
|
+
@type Hash
|
34
|
+
@default `{ top: 0, left: 0 }`
|
20
35
|
*/
|
21
36
|
SC.ANCHOR_TOP_LEFT = { top: 0, left: 0 };
|
22
37
|
|
23
38
|
/**
|
24
39
|
Layout properties to anchoe view to the bottom.
|
40
|
+
|
41
|
+
@static
|
42
|
+
@constant
|
43
|
+
@type Hash
|
44
|
+
@default `{ bottom: 0 }`
|
25
45
|
*/
|
26
46
|
SC.ANCHOR_BOTTOM = { bottom: 0 };
|
27
47
|
|
28
48
|
/**
|
29
49
|
Layout properties to anchor a view to the right.
|
50
|
+
|
51
|
+
@static
|
52
|
+
@constant
|
53
|
+
@type Hash
|
54
|
+
@default `{ right: 0 }`
|
30
55
|
*/
|
31
56
|
SC.ANCHOR_RIGHT = { right: 0 } ;
|
32
57
|
|
33
58
|
/**
|
34
59
|
Layout properties to anchor a view to the bottom right.
|
60
|
+
|
61
|
+
@static
|
62
|
+
@constant
|
63
|
+
@type Hash
|
64
|
+
@default `{ top: 0, right: 0 }`
|
35
65
|
*/
|
36
66
|
SC.ANCHOR_BOTTOM_RIGHT = { bottom: 0, right: 0 };
|
37
67
|
|
@@ -41,7 +71,7 @@ SC.ANCHOR_BOTTOM_RIGHT = { bottom: 0, right: 0 };
|
|
41
71
|
your main toolbar buttons.
|
42
72
|
|
43
73
|
You can also override the layout property yourself or simply set the
|
44
|
-
anchorLocation to SC.ANCHOR_TOP or SC.ANCHOR_BOTTOM
|
74
|
+
anchorLocation to `SC.ANCHOR_TOP` or `SC.ANCHOR_BOTTOM`. This will configure
|
45
75
|
the layout of your toolbar automatically when it is created.
|
46
76
|
|
47
77
|
@extends SC.View
|
@@ -50,19 +80,41 @@ SC.ANCHOR_BOTTOM_RIGHT = { bottom: 0, right: 0 };
|
|
50
80
|
SC.ToolbarView = SC.View.extend(
|
51
81
|
/** @scope SC.ToolbarView.prototype */ {
|
52
82
|
|
83
|
+
/**
|
84
|
+
@type Array
|
85
|
+
@default ['sc-toolbar-view']
|
86
|
+
@see SC.View#classNames
|
87
|
+
*/
|
53
88
|
classNames: ['sc-toolbar-view'],
|
54
89
|
|
55
90
|
/**
|
56
|
-
The WAI-ARIA role for toolbar view.
|
57
|
-
changed.
|
91
|
+
The WAI-ARIA role for toolbar view.
|
58
92
|
|
59
|
-
@
|
93
|
+
@type String
|
94
|
+
@default 'toolbar'
|
95
|
+
@readOnly
|
60
96
|
*/
|
61
97
|
ariaRole: 'toolbar',
|
62
98
|
|
99
|
+
/**
|
100
|
+
@type String
|
101
|
+
@default 'toolbarRenderDelegate'
|
102
|
+
*/
|
103
|
+
renderDelegateName: 'toolbarRenderDelegate',
|
104
|
+
|
63
105
|
/**
|
64
106
|
Default anchor location. This will be applied automatically to the
|
65
|
-
toolbar layout if you set it.
|
107
|
+
toolbar layout if you set it. Possible values:
|
108
|
+
|
109
|
+
- SC.ANCHOR_TOP
|
110
|
+
- SC.ANCHOR_LEFT
|
111
|
+
- SC.ANCHOR_TOP_LEFT
|
112
|
+
- SC.ANCHOR_BOTTOM
|
113
|
+
- SC.ANCHOR_RIGHT
|
114
|
+
- SC.ANCHOR_BOTTOM_RIGHT
|
115
|
+
|
116
|
+
@type String
|
117
|
+
@default null
|
66
118
|
*/
|
67
119
|
anchorLocation: null,
|
68
120
|
|
@@ -80,9 +132,7 @@ SC.ToolbarView = SC.View.extend(
|
|
80
132
|
this.layout = SC.merge(this.layout, this.anchorLocation);
|
81
133
|
}
|
82
134
|
sc_super();
|
83
|
-
}
|
84
|
-
|
85
|
-
renderDelegateName: 'toolbarRenderDelegate'
|
135
|
+
}
|
86
136
|
|
87
137
|
});
|
88
138
|
|
@@ -4,6 +4,7 @@
|
|
4
4
|
// Portions ©2008-2011 Apple Inc. All rights reserved.
|
5
5
|
// License: Licensed under MIT license (see license.js)
|
6
6
|
// ==========================================================================
|
7
|
+
|
7
8
|
/** @class
|
8
9
|
|
9
10
|
Used to display an iframe. The source, (specified by the value property) of
|
@@ -14,21 +15,36 @@
|
|
14
15
|
@extends SC.Control
|
15
16
|
@since SproutCore 1.0
|
16
17
|
*/
|
17
|
-
SC.WebView = SC.View.extend(SC.Control,
|
18
|
-
/** @scope SC.WebView.prototype */
|
18
|
+
SC.WebView = SC.View.extend(SC.Control,
|
19
|
+
/** @scope SC.WebView.prototype */ {
|
20
|
+
|
21
|
+
/**
|
22
|
+
@type Array
|
23
|
+
@default ['sc-web-view']
|
24
|
+
@see SC.View#classNames
|
25
|
+
*/
|
19
26
|
classNames: 'sc-web-view',
|
27
|
+
|
28
|
+
/**
|
29
|
+
@type Array
|
30
|
+
@default ['value', 'shouldAutoResize']
|
31
|
+
@see SC.View#displayProperties
|
32
|
+
*/
|
20
33
|
displayProperties: ['value', 'shouldAutoResize'],
|
21
34
|
|
22
35
|
/**
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
36
|
+
The content of the iframe can be bigger than the size specifed when creating
|
37
|
+
the view. If you want the view to be auto-resized to the dimensions of the
|
38
|
+
iframe, then set the value of this property to YES.
|
39
|
+
The web view can be auto resized only if the contents are from the same
|
40
|
+
domain as the parent domain.
|
41
|
+
|
42
|
+
@type Boolean
|
43
|
+
@default NO
|
29
44
|
*/
|
30
45
|
shouldAutoResize: NO,
|
31
46
|
|
47
|
+
/** @private */
|
32
48
|
render: function(context, firstTime) {
|
33
49
|
var src = this.get('value');
|
34
50
|
if (firstTime) {
|
@@ -42,7 +58,7 @@ SC.WebView = SC.View.extend(SC.Control, {
|
|
42
58
|
}
|
43
59
|
},
|
44
60
|
|
45
|
-
/**
|
61
|
+
/** @private
|
46
62
|
Called when the layer gets created.
|
47
63
|
*/
|
48
64
|
didCreateLayer: function() {
|
@@ -52,14 +68,13 @@ SC.WebView = SC.View.extend(SC.Control, {
|
|
52
68
|
},
|
53
69
|
|
54
70
|
|
55
|
-
/**
|
56
|
-
|
57
|
-
|
58
|
-
|
71
|
+
/** @private
|
72
|
+
Called when iframe onload event is fired.
|
73
|
+
1. Resizes the view to fit the contents of the iframe using the
|
74
|
+
scroll width and scroll height of the contents of the iframe
|
59
75
|
|
60
|
-
|
61
|
-
|
62
|
-
@returns {void}
|
76
|
+
The iframe contents can be accessed only when the src is from the same
|
77
|
+
domain as the parent document
|
63
78
|
*/
|
64
79
|
iframeDidLoad: function() {
|
65
80
|
//fit the iframe to size of the contents.
|
@@ -75,13 +90,14 @@ SC.WebView = SC.View.extend(SC.Control, {
|
|
75
90
|
//TODO: try out document flows other than top to bottom.
|
76
91
|
if (!SC.browser.isIE){
|
77
92
|
this.$().width(docElement.scrollWidth);
|
78
|
-
this.$().height(docElement.scrollHeight);
|
93
|
+
this.$().height(docElement.scrollHeight);
|
79
94
|
} else {
|
80
95
|
this.$().width(docElement.scrollWidth + 12);
|
81
|
-
this.$().height(docElement.scrollHeight + 5);
|
96
|
+
this.$().height(docElement.scrollHeight + 5);
|
82
97
|
}
|
83
98
|
}
|
84
99
|
}
|
85
100
|
}
|
86
101
|
}
|
102
|
+
|
87
103
|
});
|
@@ -5,8 +5,13 @@
|
|
5
5
|
// License: Licensed under MIT license (see license.js)
|
6
6
|
// ==========================================================================
|
7
7
|
|
8
|
-
|
9
|
-
|
8
|
+
/**
|
9
|
+
@static
|
10
|
+
@constant
|
11
|
+
@type Number
|
12
|
+
@default 15
|
13
|
+
*/
|
14
|
+
SC.WELL_CONTAINER_PADDING = 15;
|
10
15
|
|
11
16
|
/** @class
|
12
17
|
|
@@ -22,22 +27,34 @@ SC.WELL_CONTAINER_PADDING=15;
|
|
22
27
|
SC.WellView = SC.ContainerView.extend(
|
23
28
|
/** @scope SC.WellView.prototype */ {
|
24
29
|
|
30
|
+
/**
|
31
|
+
@type Array
|
32
|
+
@default ['sc-well-view']
|
33
|
+
@see SC.View#classNames
|
34
|
+
*/
|
25
35
|
classNames: 'sc-well-view',
|
26
36
|
|
27
37
|
/**
|
28
38
|
Layout for the content of the container view.
|
29
|
-
@
|
39
|
+
@type Hash
|
30
40
|
*/
|
31
41
|
contentLayout: {
|
32
|
-
top:
|
33
|
-
|
34
|
-
|
42
|
+
top: SC.WELL_CONTAINER_PADDING,
|
43
|
+
bottom: SC.WELL_CONTAINER_PADDING,
|
44
|
+
left: SC.WELL_CONTAINER_PADDING,
|
45
|
+
right: SC.WELL_CONTAINER_PADDING
|
46
|
+
},
|
35
47
|
|
36
48
|
/**
|
49
|
+
@type String
|
50
|
+
@default 'wellRenderDelegate'
|
51
|
+
*/
|
52
|
+
renderDelegateName: 'wellRenderDelegate',
|
53
|
+
|
54
|
+
/** @private
|
37
55
|
Overrides createChildViews and replaces the layout of the contentView
|
38
56
|
with the one in contentLayout.
|
39
57
|
*/
|
40
|
-
|
41
58
|
createChildViews: function() {
|
42
59
|
// if contentView is defined, then create the content
|
43
60
|
var view = this.get('contentView') ;
|
@@ -48,8 +65,7 @@ SC.WellView = SC.ContainerView.extend(
|
|
48
65
|
}
|
49
66
|
},
|
50
67
|
|
51
|
-
|
52
|
-
/**
|
68
|
+
/** @private
|
53
69
|
Invoked whenever the content property changes. This method will simply
|
54
70
|
call replaceContent and set the contentLayout in the new contentView.
|
55
71
|
|