sproutcore 1.6.0.rc.2-x86-mingw32 → 1.6.0.1-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +12 -0
- data/VERSION.yml +1 -1
- data/bin/sc-docs +6 -1
- data/lib/buildtasks/target.rake +1 -1
- data/lib/frameworks/sproutcore/Buildfile +5 -1
- data/lib/frameworks/sproutcore/CHANGELOG.md +175 -1
- data/lib/frameworks/sproutcore/apps/test_controls/controllers/select.js +12 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/select_page.js +19 -5
- data/lib/frameworks/sproutcore/frameworks/ajax/system/request.js +28 -31
- data/lib/frameworks/sproutcore/frameworks/ajax/system/response.js +9 -2
- data/lib/frameworks/sproutcore/frameworks/core_foundation/controllers/controller.js +21 -1
- data/lib/frameworks/sproutcore/frameworks/core_foundation/mixins/responder_context.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/core_foundation/mixins/template_helpers/checkbox_support.js +6 -1
- data/lib/frameworks/sproutcore/frameworks/core_foundation/mixins/template_helpers/text_field_support.js +26 -8
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/keyboard.js +2 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/pane.js +12 -5
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/template.js +25 -9
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/locale.js +157 -5
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/render_context.js +7 -6
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/root_responder.js +9 -3
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/sparse_array.js +8 -8
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/string.js +104 -4
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/theme.js +3 -56
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/utils.js +4 -2
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controllers/object/content_destroyed.js +59 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/mixins/string.js +41 -1
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/mixins/template_helpers/text_field_support.js +10 -2
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/panes/template.js +16 -1
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/template/handlebars.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/clippingFrame.js +11 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/didAppendToDocument.js +18 -2
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/insertBefore.js +10 -6
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/keyboard.js +18 -1
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/template_collection.js +9 -1
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view.js +9 -4
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/keyboard.js +15 -3
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/manipulation.js +14 -8
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/theming.js +8 -18
- data/lib/frameworks/sproutcore/frameworks/datastore/data_sources/fixtures.js +12 -2
- data/lib/frameworks/sproutcore/frameworks/datastore/mixins/relationship_support.js +296 -0
- data/lib/frameworks/sproutcore/frameworks/datastore/models/child_record.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/models/record.js +330 -326
- data/lib/frameworks/sproutcore/frameworks/datastore/models/record_attribute.js +22 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/system/nested_store.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/system/store.js +614 -614
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/data_sources/data_source.js +14 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/nested_record.js +3 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/nested_record_array_complex.js +2 -0
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/nested_record_complex.js +2 -0
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/record/core_methods.js +20 -13
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/record_attribute.js +61 -46
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/commitChangesFromNestedStore.js +30 -30
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/commitChangesFromNestedStore.js +24 -24
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/connectDataSource.js +31 -0
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/store/pushRelationships.js +1177 -0
- data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/localized/system/datetime.js +4 -63
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/border.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/scrollable.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/alert.js +7 -8
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/menu.js +18 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/panel.js +9 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/protocols/drag_data_source.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/protocols/drop_target.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/button.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/checkbox.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/collection.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/disclosure.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/image_button.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/master_detail.js +3 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/menu.js +12 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/panel.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/picker.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/progress.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/radio.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/radio_group.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/segment.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/segmented.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/slider.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/toolbar.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/well.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/workspace.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/segmented.css +1 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/alert/ui.js +33 -22
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/panel/methods.js +20 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/checkbox/methods.js +10 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/date_field/methods.js +34 -7
- data/lib/frameworks/sproutcore/frameworks/desktop/views/button.js +14 -15
- data/lib/frameworks/sproutcore/frameworks/desktop/views/checkbox.js +40 -14
- data/lib/frameworks/sproutcore/frameworks/desktop/views/collection.js +699 -700
- data/lib/frameworks/sproutcore/frameworks/desktop/views/list_item.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/views/master_detail.js +11 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/views/menu_item.js +16 -6
- data/lib/frameworks/sproutcore/frameworks/desktop/views/progress.js +0 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/views/radio.js +49 -7
- data/lib/frameworks/sproutcore/frameworks/desktop/views/select_button.js +9 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/select_field.js +6 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/views/slider.js +4 -26
- data/lib/frameworks/sproutcore/frameworks/desktop/views/web.js +20 -19
- data/lib/frameworks/sproutcore/frameworks/experimental/Buildfile +2 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/designer/designers/view_designer.js +249 -249
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/forms/mixins/edit_mode.js +13 -5
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/forms/mixins/emptiness.js +53 -37
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/forms/render_delegates/form.js +2 -1
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/forms/render_delegates/form_row.js +3 -11
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/forms/tests/mixins/edit_mode.js +53 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/forms/tests/mixins/emptiness.js +114 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/forms/tests/views/form.js +174 -6
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/forms/tests/views/form_row.js +86 -6
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/forms/views/form.js +80 -110
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/forms/views/form_row.js +96 -97
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/polymorphism/README.md +2 -1
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/polymorphism/models/record.js +20 -36
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/ext/menu.js +121 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/ext/menu_item.js +90 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/mixins/select_view_menu.js +139 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/render_delegates/select_button.js +14 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/tests/ext/menu_resizing.js +25 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/tests/mixins/select_view_menu/bindings.js +43 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/tests/mixins/select_view_menu/check_selected.js +32 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/tests/views/popup_button/menu_setup.js +40 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/tests/views/popup_button/show_menu.js +45 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/tests/views/select/menu_width.js +49 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/tests/views/select/selected_item.js +191 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/views/popup_button.js +264 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/views/select.js +450 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/mixins/split_child.js +14 -6
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/mixins/split_thumb.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/render_delegates/split.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/render_delegates/split_divider.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/views/split.js +9 -0
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/views/thumb.js +3 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/auto_resize.js +7 -17
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/content_value_support.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/flowed_layout.js +35 -8
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inline_editable.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inline_editor.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inline_editor_delegate.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inner_frame.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/canvas_image.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/helpers/sizing.js +2 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/image.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/label.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/render_delegate.js +6 -6
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/images/favicon.ico +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/resources/text_field.css +0 -5
- data/lib/frameworks/sproutcore/frameworks/foundation/system/exception_handler.js +4 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/system/math.js +2 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/system/module.js +13 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/string_measurement.js +6 -9
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/flowed_layout/tests.js +912 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/text_field/methods.js +36 -7
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/text_field/ui.js +58 -4
- data/lib/frameworks/sproutcore/frameworks/foundation/validators/validator.js +1 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/views/field.js +0 -15
- data/lib/frameworks/sproutcore/frameworks/foundation/views/label.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/views/text_field.js +25 -14
- data/lib/frameworks/sproutcore/frameworks/handlebars/handlebars.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/core.js +15 -9
- data/lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/flatten.js +24 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/ext/array.js +2 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/ext/function.js +5 -5
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/array.js +19 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/copyable.js +3 -2
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/freezable.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/observable.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/system/binding.js +14 -14
- data/lib/frameworks/sproutcore/frameworks/runtime/system/error.js +3 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/system/logger.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/runtime/system/object.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/runtime/system/range_observer.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/system/run_loop.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/runtime/system/set.js +15 -16
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/itemType.js +6 -2
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/object/enhance.js +30 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/range_observer/create.js +17 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/system/state.js +9 -2
- data/lib/frameworks/sproutcore/frameworks/statechart/system/statechart.js +3 -1
- data/lib/frameworks/sproutcore/frameworks/testing/resources/runner.css +0 -1
- data/lib/frameworks/sproutcore/frameworks/yuireset/resources/base.css +80 -0
- data/lib/frameworks/sproutcore/frameworks/yuireset/resources/core.css +0 -4
- data/lib/frameworks/sproutcore/lib/index.rhtml +2 -1
- data/lib/frameworks/sproutcore/themes/ace/resources/collection/normal/list.css +3 -3
- data/lib/frameworks/sproutcore/themes/ace/resources/collection/normal/list_item.css +2 -2
- data/lib/frameworks/sproutcore/themes/ace/resources/form/form.css +9 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/menu/menu.css +3 -1
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/picker.js +1 -1
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/workspace.js +1 -1
- data/lib/frameworks/sproutcore/themes/legacy_theme/render_delegates/button.js +1 -1
- data/lib/frameworks/sproutcore/themes/legacy_theme/render_delegates/panel.js +1 -1
- data/lib/frameworks/sproutcore/themes/legacy_theme/render_delegates/progress.js +2 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/render_delegates/slider.js +1 -1
- data/lib/frameworks/sproutcore/themes/legacy_theme/render_delegates/well.js +1 -1
- data/lib/sproutcore/builders/base.rb +5 -1
- data/lib/sproutcore/builders/handlebars.rb +12 -1
- data/lib/sproutcore/models/target.rb +1 -9
- data/lib/sproutcore/rack/proxy.rb +238 -92
- data/lib/sproutcore/tools/docs.rb +1 -7
- data/spec/fixtures/builder_tests/apps/handlebars_test/Buildfile +1 -0
- data/spec/fixtures/builder_tests/apps/handlebars_test/{template.handlebars → templates/template.handlebars} +2 -0
- data/spec/lib/builders/handlebars_spec.rb +10 -4
- data/sproutcore.gemspec +3 -1
- metadata +73 -44
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/forms/english.lproj/default_styles.css +0 -5
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/forms/english.lproj/strings.js +0 -15
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/forms/tests/views/form_checkbox_field.js +0 -17
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/forms/tests/views/form_field.js +0 -17
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/forms/tests/views/form_label.js +0 -17
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/forms/tests/views/form_radio_field.js +0 -17
- data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/forms/tests/views/form_text_field.js +0 -17
data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/mixins/split_child.js
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
// ==========================================================================
|
7
7
|
|
8
8
|
/**
|
9
|
-
@
|
9
|
+
@namespace
|
10
10
|
Child views of SplitViews should use this mixin to get their positioning
|
11
11
|
logic and default settings.
|
12
12
|
|
@@ -14,7 +14,8 @@
|
|
14
14
|
child views. This mixin observes the position and size properties and
|
15
15
|
calls adjust().
|
16
16
|
*/
|
17
|
-
SC.SplitChild =
|
17
|
+
SC.SplitChild =
|
18
|
+
/** @scope SC.SplitChild.prototype */{
|
18
19
|
/**
|
19
20
|
* Set to YES if your Split Child is a divider view.
|
20
21
|
*
|
@@ -48,13 +49,15 @@ SC.SplitChild = {
|
|
48
49
|
* The current size of the SC.SplitView child. Use this to set the default
|
49
50
|
* size.
|
50
51
|
*
|
51
|
-
*
|
52
|
+
* If you specify a size, autoResizeStyle will default to SC.RESIZE_MANUAL;
|
53
|
+
* if you don't, SplitView will assume you want it to fill the available space
|
54
|
+
* and use SC.RESIZE_AUTOMATIC.
|
52
55
|
*
|
53
|
-
* @default
|
56
|
+
* @default undefined
|
54
57
|
*
|
55
58
|
* @type Number
|
56
59
|
*/
|
57
|
-
size:
|
60
|
+
size: undefined,
|
58
61
|
|
59
62
|
/**
|
60
63
|
* [RO] The current position of the SC.SplitView. This is read-only, and is set
|
@@ -121,9 +124,14 @@ SC.SplitChild = {
|
|
121
124
|
* SC.RESIZE_AUTOMATIC views have already been resized as much as possible.
|
122
125
|
* - SC.FIXED_SIZE: Never resize.
|
123
126
|
*
|
127
|
+
* If you specify an autoResizeStyle, it will be used. If you leave it at `undefined`,
|
128
|
+
* it will look at `size`: if a `size` is supplied, it will use `SC.RESIZE_MANUAL`; otherwise
|
129
|
+
* it will use `SC.RESIZE_AUTOMATIC`.
|
130
|
+
*
|
131
|
+
* @default based on size
|
124
132
|
* @type {AutoResizeStyle}
|
125
133
|
*/
|
126
|
-
autoResizeStyle:
|
134
|
+
autoResizeStyle: undefined,
|
127
135
|
|
128
136
|
/**
|
129
137
|
* If NO, moving the divider before this view will not resize the view, but
|
data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/split_view/mixins/split_thumb.js
CHANGED
@@ -30,7 +30,7 @@ SC.MOVES_PREVIOUS_CHILD = 'moves-previous-child';
|
|
30
30
|
SC.MOVES_NEXT_CHILD = 'moves-next-child';
|
31
31
|
|
32
32
|
/**
|
33
|
-
@
|
33
|
+
@namespace
|
34
34
|
A SplitThumb may be placed inside any view in a SplitView, and can even
|
35
35
|
be a direct child of the SplitView. It forwards its events to the SplitView
|
36
36
|
to control the movement of a divider or another child of the SplitView.
|
@@ -6,7 +6,7 @@
|
|
6
6
|
// ==========================================================================
|
7
7
|
|
8
8
|
SC.BaseTheme.splitRenderDelegate = SC.RenderDelegate.create({
|
9
|
-
|
9
|
+
className: 'split',
|
10
10
|
|
11
11
|
render: function(dataSource, context) {
|
12
12
|
context.addClass(dataSource.get('layoutDirection'));
|
@@ -291,6 +291,15 @@ SC.SplitView = SC.View.extend({
|
|
291
291
|
// as we loop using the lastChild variable.
|
292
292
|
for (idx = 0; idx < len; idx++) {
|
293
293
|
child = children[idx];
|
294
|
+
|
295
|
+
// do initial setup of things like autoResizeStyle:
|
296
|
+
if (!child.get('autoResizeStyle')) {
|
297
|
+
if (child.get('size') !== undefined) {
|
298
|
+
child.set('autoResizeStyle', SC.RESIZE_MANUAL);
|
299
|
+
} else {
|
300
|
+
child.set('autoResizeStyle', SC.RESIZE_AUTOMATIC);
|
301
|
+
}
|
302
|
+
}
|
294
303
|
|
295
304
|
// we initialize the size first thing in case the size is empty (fill)
|
296
305
|
// if it is empty, the way we position the views would lead to inconsistent
|
@@ -7,8 +7,9 @@
|
|
7
7
|
|
8
8
|
/**
|
9
9
|
@class
|
10
|
-
@deprecated
|
11
|
-
|
10
|
+
@deprecated Use a normal view and mix-in SC.SplitThumb.
|
11
|
+
|
12
|
+
Kept to allow a modicum of backwards-compatibility. Please use
|
12
13
|
a normal view and mix in SC.SplitThumb instead.
|
13
14
|
|
14
15
|
@extends SC.View
|
@@ -314,7 +314,7 @@ SC.AutoResizeManager = {
|
|
314
314
|
return SC.AutoResizeManager.doBatchResize();
|
315
315
|
}
|
316
316
|
|
317
|
-
var tag, views, view, layer, batches;
|
317
|
+
var tag, views, view, layer, batches, prepared;
|
318
318
|
|
319
319
|
// first measure all the batched views
|
320
320
|
batches = this.viewsNeedingResize;
|
@@ -322,28 +322,18 @@ SC.AutoResizeManager = {
|
|
322
322
|
if (batches.hasOwnProperty(tag)) {
|
323
323
|
views = batches[tag];
|
324
324
|
|
325
|
-
//
|
325
|
+
// now measure the rest using the same settings
|
326
326
|
while ((view = views.pop())) {
|
327
|
+
if(view.get('isVisible') && (layer = view.get('autoResizeLayer'))) {
|
328
|
+
if(!prepared) SC.prepareStringMeasurement(layer);
|
327
329
|
|
328
|
-
if(!view.get('isVisible')) continue;
|
329
|
-
|
330
|
-
layer = view.get('autoResizeLayer');
|
331
|
-
|
332
|
-
// use the layer to prepare the measurement
|
333
|
-
if(layer) {
|
334
|
-
SC.prepareStringMeasurement(layer, view.get('classNames'));
|
335
330
|
view.measureSize(YES);
|
336
|
-
break;
|
337
331
|
}
|
338
332
|
}
|
339
333
|
|
340
|
-
//
|
341
|
-
|
342
|
-
|
343
|
-
}
|
344
|
-
|
345
|
-
SC.teardownStringMeasurement();
|
346
|
-
|
334
|
+
// if they were all isVisible:NO, then prepare was never called
|
335
|
+
// so dont call teardown
|
336
|
+
if(prepared) SC.teardownStringMeasurement();
|
347
337
|
}
|
348
338
|
}
|
349
339
|
|
@@ -150,7 +150,7 @@ SC.FlowedLayout = {
|
|
150
150
|
/** @private */
|
151
151
|
_scfl_layoutPropertyDidChange: function(){
|
152
152
|
this.invokeOnce("_scfl_tile");
|
153
|
-
},
|
153
|
+
}.observes('layoutDirection', 'align', 'flowPadding', 'canWrap', 'defaultFlowSpacing'),
|
154
154
|
|
155
155
|
/** @private
|
156
156
|
Overriden to only update if it is a view we do not manage, or the width or height has changed
|
@@ -192,11 +192,15 @@ SC.FlowedLayout = {
|
|
192
192
|
observeChildLayout: function(c) {
|
193
193
|
if (c._scfl_isBeingObserved) return;
|
194
194
|
c._scfl_isBeingObserved = YES;
|
195
|
+
c.addObserver('flowSpacing', this, '_scfl_layoutPropertyDidChange');
|
195
196
|
c.addObserver('isVisible', this, '_scfl_layoutPropertyDidChange');
|
196
197
|
c.addObserver('useAbsoluteLayout', this, '_scfl_layoutPropertyDidChange');
|
197
198
|
c.addObserver('calculatedWidth', this, '_scfl_layoutPropertyDidChange');
|
198
199
|
c.addObserver('calculatedHeight', this, '_scfl_layoutPropertyDidChange');
|
199
200
|
c.addObserver('startsNewRow', this, '_scfl_layoutPropertyDidChange');
|
201
|
+
c.addObserver('isSpacer', this, '_scfl_layoutPropertyDidChange');
|
202
|
+
c.addObserver('fillWidth', this, '_scfl_layoutPropertyDidChange');
|
203
|
+
c.addObserver('fillHeight', this, '_scfl_layoutPropertyDidChange');
|
200
204
|
},
|
201
205
|
|
202
206
|
/** @private
|
@@ -204,11 +208,15 @@ SC.FlowedLayout = {
|
|
204
208
|
*/
|
205
209
|
unobserveChildLayout: function(c) {
|
206
210
|
c._scfl_isBeingObserved = NO;
|
211
|
+
c.removeObserver('flowSpacing', this, '_scfl_layoutPropertyDidChange');
|
207
212
|
c.removeObserver('isVisible', this, '_scfl_layoutPropertyDidChange');
|
208
213
|
c.removeObserver('useAbsoluteLayout', this, '_scfl_layoutPropertyDidChange');
|
209
214
|
c.removeObserver('calculatedWidth', this, '_scfl_layoutPropertyDidChange');
|
210
215
|
c.removeObserver('calculatedHeight', this, '_scfl_layoutPropertyDidChange');
|
211
216
|
c.removeObserver('startsNewRow', this, '_scfl_layoutPropertyDidChange');
|
217
|
+
c.removeObserver('isSpacer', this, '_scfl_layoutPropertyDidChange');
|
218
|
+
c.removeObserver('fillWidth', this, '_scfl_layoutPropertyDidChange');
|
219
|
+
c.removeObserver('fillHeight', this, '_scfl_layoutPropertyDidChange');
|
212
220
|
},
|
213
221
|
|
214
222
|
/**
|
@@ -233,6 +241,7 @@ SC.FlowedLayout = {
|
|
233
241
|
flowSpacingForChild: function(idx, view) {
|
234
242
|
var spacing = view.get("flowSpacing");
|
235
243
|
if (SC.none(spacing)) spacing = this.get("defaultFlowSpacing");
|
244
|
+
if (SC.none(spacing)) spacing = 0;
|
236
245
|
|
237
246
|
if (SC.typeOf(spacing) === SC.T_NUMBER) {
|
238
247
|
spacing = { left: spacing, right: spacing, bottom: spacing, top: spacing };
|
@@ -259,7 +268,7 @@ SC.FlowedLayout = {
|
|
259
268
|
flowSizeForChild: function(idx, view) {
|
260
269
|
var cw = view.get('calculatedWidth'), ch = view.get('calculatedHeight');
|
261
270
|
|
262
|
-
var calc = {}, f = view.get('frame');
|
271
|
+
var calc = {}, f = view.get('frame'), l = view.get('layout');
|
263
272
|
view._scfl_lastFrame = f;
|
264
273
|
|
265
274
|
// if there is a calculated width, use that. NOTE: if calculatedWidth === 0,
|
@@ -281,9 +290,9 @@ SC.FlowedLayout = {
|
|
281
290
|
// expands in to 0.
|
282
291
|
if (view.get('isSpacer')) {
|
283
292
|
if (this.get('layoutDirection') === SC.LAYOUT_HORIZONTAL) {
|
284
|
-
calc.width =
|
293
|
+
calc.width = l.minWidth || 0;
|
285
294
|
} else {
|
286
|
-
calc.height =
|
295
|
+
calc.height = l.minHeight || 0;
|
287
296
|
}
|
288
297
|
}
|
289
298
|
|
@@ -291,11 +300,20 @@ SC.FlowedLayout = {
|
|
291
300
|
if (
|
292
301
|
this.get('layoutDirection') === SC.LAYOUT_HORIZONTAL && view.get('fillHeight')
|
293
302
|
) {
|
294
|
-
calc.height =
|
303
|
+
calc.height = l.minHeight || 0;
|
295
304
|
} else if (
|
296
305
|
this.get('layoutDirection') === SC.LAYOUT_VERTICAL && view.get('fillWidth')
|
297
306
|
) {
|
298
|
-
calc.width =
|
307
|
+
calc.width = l.minWidth || 0;
|
308
|
+
}
|
309
|
+
|
310
|
+
// finally, RECREATE the view's layout if it is invalid (lacks a width or a height)
|
311
|
+
if (l.width == undefined) {
|
312
|
+
view.adjust('width', f.width);
|
313
|
+
}
|
314
|
+
|
315
|
+
if (l.height == undefined) {
|
316
|
+
view.adjust('height', f.height);
|
299
317
|
}
|
300
318
|
|
301
319
|
// return
|
@@ -462,7 +480,8 @@ SC.FlowedLayout = {
|
|
462
480
|
items = [], itemOffset = 0, isVertical = plan.isVertical, itemSize, itemLength,
|
463
481
|
canWrap = this.get('canWrap'),
|
464
482
|
newRowPending = NO;
|
465
|
-
|
483
|
+
|
484
|
+
var maxItemLength = 0;
|
466
485
|
var max = row.plan.maximumRowLength;
|
467
486
|
|
468
487
|
for (idx = startingAt; idx < len; idx++) {
|
@@ -521,10 +540,18 @@ SC.FlowedLayout = {
|
|
521
540
|
|
522
541
|
items.push(item);
|
523
542
|
itemOffset += itemLength;
|
543
|
+
maxItemLength = Math.max(itemLength, maxItemLength);
|
524
544
|
}
|
525
545
|
|
526
546
|
row.rowLength = itemOffset;
|
527
|
-
|
547
|
+
|
548
|
+
// if the row cannot wrap, then the minimum size for the row (and therefore collapsed size)
|
549
|
+
// is the same as the current row length: it consists of the minimum size of all items.
|
550
|
+
//
|
551
|
+
// If the row can wrap, then the longest item will determine the size of a fully
|
552
|
+
// collapsed (one item per row) layout.
|
553
|
+
var minRowLength = canWrap ? maxItemLength : row.rowLength;
|
554
|
+
row.plan.maximumCollapsedRowLength = Math.max(minRowLength, row.plan.maximumCollapsedRowLength);
|
528
555
|
row.items = items;
|
529
556
|
return idx;
|
530
557
|
},
|
@@ -49,7 +49,7 @@ SC.BEST_FIT = "fitBest";
|
|
49
49
|
SC.BEST_FIT_DOWN_ONLY = "fitBestDown";
|
50
50
|
|
51
51
|
/**
|
52
|
-
@
|
52
|
+
@namespace
|
53
53
|
|
54
54
|
InnerFrame provides the innerFrameForSize function, which will return a frame for the given size adjusted
|
55
55
|
to fit within the given outer size, according to the align and scale properties.
|
@@ -51,7 +51,7 @@ sc_require('render_delegates/render_delegate');
|
|
51
51
|
*/
|
52
52
|
|
53
53
|
SC.BaseTheme.canvasImageRenderDelegate = SC.RenderDelegate.create({
|
54
|
-
|
54
|
+
className: 'canvasImage',
|
55
55
|
|
56
56
|
/** @private
|
57
57
|
We don't have an element yet, so we do the minimal necessary setup
|
@@ -5,6 +5,8 @@
|
|
5
5
|
// License: Licensed under MIT license (see license.js)
|
6
6
|
// ==========================================================================
|
7
7
|
|
8
|
+
sc_require('render_delegates/render_delegate');
|
9
|
+
|
8
10
|
SC.RenderDelegate.reopen({
|
9
11
|
/**
|
10
12
|
A list of size names to look for when automatically determining
|
@@ -126,7 +126,7 @@
|
|
126
126
|
directive. For example:
|
127
127
|
|
128
128
|
MyTheme.buttonRenderDelegate = SC.RenderDelegate.create({
|
129
|
-
|
129
|
+
className: 'button',
|
130
130
|
render: function(dataSource, context) {
|
131
131
|
this.includeSlices(dataSource, context, SC.THREE_SLICE);
|
132
132
|
}
|
@@ -199,7 +199,7 @@
|
|
199
199
|
You can then use the helpers from your render delegates:
|
200
200
|
|
201
201
|
MyTheme.someRenderDelegate = SC.RenderDelegate.create({
|
202
|
-
|
202
|
+
className: 'some-thingy',
|
203
203
|
render: function(dataSource, context) {
|
204
204
|
this.myHelperMethod(dataSource);
|
205
205
|
}
|
@@ -270,7 +270,7 @@ SC.RenderDelegate = /** @scope SC.RenderDelegate.prototype */{
|
|
270
270
|
create a render delegate, you call this:
|
271
271
|
|
272
272
|
MyTheme.myRenderDelegate = SC.RenderDelegate.create({
|
273
|
-
|
273
|
+
className: 'my-render-delegate',
|
274
274
|
render: function(dataSource, context) {
|
275
275
|
// your code here...
|
276
276
|
}
|
@@ -310,7 +310,7 @@ SC.RenderDelegate = /** @scope SC.RenderDelegate.prototype */{
|
|
310
310
|
}
|
311
311
|
|
312
312
|
if (v && v.isEnhancement && v !== this[i]) {
|
313
|
-
v = SC._enhance(this[i] || K, v);
|
313
|
+
v = SC._enhance(this[i] || SC.K, v);
|
314
314
|
}
|
315
315
|
|
316
316
|
this[i] = v;
|
@@ -343,11 +343,11 @@ SC.RenderDelegate = /** @scope SC.RenderDelegate.prototype */{
|
|
343
343
|
},
|
344
344
|
|
345
345
|
/**
|
346
|
-
All render delegates should have a name. Any time a render delegate is
|
346
|
+
All render delegates should have a class name. Any time a render delegate is
|
347
347
|
used, this name should be added as a class name (`SC.View`s do this
|
348
348
|
automatically).
|
349
349
|
*/
|
350
|
-
|
350
|
+
className: undefined,
|
351
351
|
|
352
352
|
/**
|
353
353
|
Writes the DOM representation of this render delegate to the
|
Binary file
|
@@ -19,9 +19,6 @@
|
|
19
19
|
right: 3px;
|
20
20
|
position: absolute;
|
21
21
|
}
|
22
|
-
&.text-area .padding {
|
23
|
-
right: 0px;
|
24
|
-
}
|
25
22
|
&.sc-text-field-accessory-view {
|
26
23
|
z-index: 2;
|
27
24
|
}
|
@@ -30,8 +27,6 @@
|
|
30
27
|
top: 0px;
|
31
28
|
left: 0px;
|
32
29
|
width: 100%;
|
33
|
-
height: 100%;
|
34
|
-
line-height: 100%;
|
35
30
|
bottom: 0px;
|
36
31
|
right: 0px;
|
37
32
|
display: block;
|
@@ -36,9 +36,11 @@ SC.ExceptionHandler = {
|
|
36
36
|
@param {Exception} exception the exception thrown during execution
|
37
37
|
*/
|
38
38
|
handleException: function(exception) {
|
39
|
-
if (this.isShowingErrorDialog) return;
|
40
|
-
|
39
|
+
if (this.isShowingErrorDialog) return NO;
|
40
|
+
|
41
41
|
this._displayErrorDialog(exception);
|
42
|
+
|
43
|
+
return NO;
|
42
44
|
},
|
43
45
|
|
44
46
|
/** @private
|