sproutcore 1.6.0.rc.2-x86-mingw32 → 1.6.0.1-x86-mingw32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
@@ -0,0 +1,80 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
|
3
|
+
Code licensed under the BSD License:
|
4
|
+
http://developer.yahoo.com/yui/license.html
|
5
|
+
version: 3.3.0
|
6
|
+
build: 3167
|
7
|
+
*/
|
8
|
+
/* base.css, part of YUI's CSS Foundation */
|
9
|
+
h1 {
|
10
|
+
/*18px via YUI Fonts CSS foundation*/
|
11
|
+
font-size:138.5%;
|
12
|
+
}
|
13
|
+
h2 {
|
14
|
+
/*16px via YUI Fonts CSS foundation*/
|
15
|
+
font-size:123.1%;
|
16
|
+
}
|
17
|
+
h3 {
|
18
|
+
/*14px via YUI Fonts CSS foundation*/
|
19
|
+
font-size:108%;
|
20
|
+
}
|
21
|
+
h1,h2,h3 {
|
22
|
+
/* top & bottom margin based on font size */
|
23
|
+
margin:1em 0;
|
24
|
+
}
|
25
|
+
h1,h2,h3,h4,h5,h6,strong {
|
26
|
+
/*bringing boldness back to headers and the strong element*/
|
27
|
+
font-weight:bold;
|
28
|
+
}
|
29
|
+
abbr,acronym {
|
30
|
+
/*indicating to users that more info is available */
|
31
|
+
border-bottom:1px dotted #000;
|
32
|
+
cursor:help;
|
33
|
+
}
|
34
|
+
em {
|
35
|
+
/*bringing italics back to the em element*/
|
36
|
+
font-style:italic;
|
37
|
+
}
|
38
|
+
blockquote,ul,ol,dl {
|
39
|
+
/*giving blockquotes and lists room to breath*/
|
40
|
+
margin:1em;
|
41
|
+
}
|
42
|
+
ol,ul,dl {
|
43
|
+
/*bringing lists on to the page with breathing room */
|
44
|
+
margin-left:2em;
|
45
|
+
}
|
46
|
+
ol li {
|
47
|
+
/*giving OL's LIs generated numbers*/
|
48
|
+
list-style: decimal outside;
|
49
|
+
}
|
50
|
+
ul li {
|
51
|
+
/*giving UL's LIs generated disc markers*/
|
52
|
+
list-style: disc outside;
|
53
|
+
}
|
54
|
+
dl dd {
|
55
|
+
/*providing spacing for definition terms*/
|
56
|
+
margin-left:1em;
|
57
|
+
}
|
58
|
+
th,td {
|
59
|
+
/*borders and padding to make the table readable*/
|
60
|
+
border:1px solid #000;
|
61
|
+
padding:.5em;
|
62
|
+
}
|
63
|
+
th {
|
64
|
+
/*distinguishing table headers from data cells*/
|
65
|
+
font-weight:bold;
|
66
|
+
text-align:center;
|
67
|
+
}
|
68
|
+
caption {
|
69
|
+
/*coordinated margin to match cell's padding*/
|
70
|
+
margin-bottom:.5em;
|
71
|
+
/*centered so it doesn't blend in to other content*/
|
72
|
+
text-align:center;
|
73
|
+
}
|
74
|
+
p,fieldset,table,pre {
|
75
|
+
/*so things don't run into each other*/
|
76
|
+
margin-bottom:1em;
|
77
|
+
}
|
78
|
+
/* setting a consistent width, 160px;
|
79
|
+
control of type=file still not possible */
|
80
|
+
input[type=text],input[type=password],textarea{width:12.25em;*width:11.9em;}
|
@@ -11,12 +11,13 @@
|
|
11
11
|
<!DOCTYPE html>
|
12
12
|
<html<% unless @content_for_html5_manifest.blank? %> manifest="app.manifest"<% end %>>
|
13
13
|
<head>
|
14
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge<%= config.chrome_frame ? ',chrome=1' : '' %>" />
|
15
|
+
|
14
16
|
<script>
|
15
17
|
var SC_benchmarkPreloadEvents = { headStart: new Date().getTime() };
|
16
18
|
</script>
|
17
19
|
|
18
20
|
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
|
19
|
-
<meta http-equiv="X-UA-Compatible" content="IE=EDGE<%= config.chrome_frame ? ',chrome=1' : '' %>" />
|
20
21
|
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
21
22
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
22
23
|
<meta name="apple-mobile-web-app-status-bar-style" content="<%= config.status_bar_style || 'default' %>" />
|
@@ -1,12 +1,12 @@
|
|
1
|
-
$theme.
|
1
|
+
$theme.collection {
|
2
2
|
background: white;
|
3
|
-
border-right: 1px #A8B0BA solid;
|
4
3
|
|
5
4
|
&.alternating .sc-collection-item.even {
|
6
5
|
background: #eef3f6;
|
7
6
|
}
|
8
7
|
|
9
|
-
.sc-
|
8
|
+
&.alternating .sc-collection-item.even.sel,
|
9
|
+
.sc-collection-item.sel {
|
10
10
|
color: white;
|
11
11
|
background: #608AB9;
|
12
12
|
}
|
@@ -1,13 +1,13 @@
|
|
1
1
|
/* Overriding some of the styles on checkbox */
|
2
2
|
|
3
3
|
$theme.sc-list-item-view {
|
4
|
-
.
|
4
|
+
$theme.checkbox {
|
5
5
|
background-color: transparent;
|
6
6
|
border: 0 none;
|
7
7
|
margin-top: -9px;
|
8
8
|
}
|
9
9
|
|
10
|
-
.disclosure {
|
10
|
+
$theme.disclosure {
|
11
11
|
position: absolute;
|
12
12
|
left: -6px;
|
13
13
|
top: 50%;
|
@@ -6,7 +6,7 @@
|
|
6
6
|
// ==========================================================================
|
7
7
|
|
8
8
|
SC.AceTheme.Popover.workspaceRenderDelegate = SC.RenderDelegate.create({
|
9
|
-
|
9
|
+
className: 'workspace',
|
10
10
|
render: function(dataSource, context) {
|
11
11
|
context.setClass({
|
12
12
|
'top-toolbar': dataSource.get('hasTopToolbar'),
|
@@ -9,7 +9,7 @@ sc_require("theme");
|
|
9
9
|
Renders and updates the HTML representation of a button.
|
10
10
|
*/
|
11
11
|
SC.LegacyTheme.buttonRenderDelegate = SC.RenderDelegate.create({
|
12
|
-
|
12
|
+
className: 'button',
|
13
13
|
|
14
14
|
/**
|
15
15
|
Called when we need to create the HTML that represents the button.
|
@@ -6,7 +6,7 @@
|
|
6
6
|
// ==========================================================================
|
7
7
|
sc_require("theme");
|
8
8
|
SC.LegacyTheme.panelRenderDelegate = SC.RenderDelegate.create({
|
9
|
-
|
9
|
+
className: 'panel',
|
10
10
|
|
11
11
|
render: function(dataSource, context) {
|
12
12
|
context.push(
|
@@ -64,9 +64,13 @@ module SC
|
|
64
64
|
writeline(dst_path,joinlines(lines))
|
65
65
|
end
|
66
66
|
|
67
|
+
def sc_static_match
|
68
|
+
/(sc_static|static_url|sc_target)\(\s*['"]([^"']*?)['"]\s*\)/
|
69
|
+
end
|
70
|
+
|
67
71
|
# Handles occurances of sc_static() or static_url()
|
68
72
|
def replace_static_url(line)
|
69
|
-
line.gsub!(
|
73
|
+
line.gsub!(sc_static_match) do | rsrc |
|
70
74
|
entry_name = $2
|
71
75
|
entry_name = "#{$2}:index.html" if $1 == 'sc_target'
|
72
76
|
|
@@ -22,8 +22,19 @@ module SC
|
|
22
22
|
|
23
23
|
def build(dst_path)
|
24
24
|
template_name = entry.rootname[/^.*\/([^\/]*)$/, 1]
|
25
|
-
|
25
|
+
template_code = readlines(entry[:source_path])
|
26
|
+
replace_static_url(template_code)
|
27
|
+
writelines dst_path, "SC.TEMPLATES[#{template_name.inspect}] = SC.Handlebars.compile(#{template_code.to_json});"
|
26
28
|
end
|
29
|
+
|
30
|
+
def sc_static_match
|
31
|
+
/\{\{(sc_static|static_url|sc_target)\(\s*['"]([^"']*?)['"]\s*\)\}\}/
|
32
|
+
end
|
33
|
+
|
34
|
+
def static_url(url='')
|
35
|
+
url
|
36
|
+
end
|
37
|
+
|
27
38
|
end
|
28
39
|
|
29
40
|
end
|
@@ -643,15 +643,7 @@ module SC
|
|
643
643
|
javascript_entries.each do |resource_name, entries|
|
644
644
|
resource_name = resource_name.ext('js')
|
645
645
|
|
646
|
-
|
647
|
-
pf = ['source/lproj/strings.js', 'source/core.js', 'source/utils.js']
|
648
|
-
if manifest.target.target_type == :app
|
649
|
-
target_name = manifest.target.target_name.to_s.split('/')[-1]
|
650
|
-
pf.insert(2, "source/#{target_name}.js")
|
651
|
-
end
|
652
|
-
else
|
653
|
-
pf = []
|
654
|
-
end
|
646
|
+
pf = (resource_name == 'javascript.js') ? ['source/lproj/strings.js', 'source/core.js', 'source/utils.js'] : []
|
655
647
|
|
656
648
|
SC::Helpers::EntrySorter.sort(entries, pf).each do |entry|
|
657
649
|
if minify_js && entry[:minified]
|
@@ -5,17 +5,60 @@
|
|
5
5
|
# and contributors
|
6
6
|
# ===========================================================================
|
7
7
|
|
8
|
+
# We only require net/https to ensure that HTTPS is supported for
|
9
|
+
# proxy[:secure] requests
|
8
10
|
begin
|
9
11
|
require 'net/https'
|
10
12
|
SC::HTTPS_ENABLED = true
|
11
13
|
rescue LoadError => e
|
12
|
-
require 'net/http'
|
13
14
|
SC::HTTPS_ENABLED = false
|
14
15
|
end
|
15
16
|
|
17
|
+
require 'eventmachine'
|
18
|
+
require 'em-http'
|
19
|
+
require 'thin'
|
20
|
+
|
21
|
+
|
16
22
|
module SC
|
23
|
+
|
17
24
|
module Rack
|
18
25
|
|
26
|
+
class DeferrableBody
|
27
|
+
include EM::Deferrable
|
28
|
+
|
29
|
+
def initialize(options = {})
|
30
|
+
@options = options
|
31
|
+
end
|
32
|
+
|
33
|
+
def call(body)
|
34
|
+
body.each do |chunk|
|
35
|
+
@body_callback.call(prepare_chunk(chunk))
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
def prepare_chunk(chunk)
|
40
|
+
if chunked?
|
41
|
+
size = chunk.respond_to?(:bytesize) ? chunk.bytesize : chunk.length
|
42
|
+
"#{size.to_s(16)}\r\n#{chunk}\r\n"
|
43
|
+
else
|
44
|
+
# Thin doesn't like null bodies
|
45
|
+
chunk || ''
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
def each(&blk)
|
50
|
+
@body_callback = blk
|
51
|
+
end
|
52
|
+
|
53
|
+
private
|
54
|
+
|
55
|
+
def chunked?
|
56
|
+
@options[:chunked]
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
|
61
|
+
|
19
62
|
# Rack application proxies requests as needed for the given project.
|
20
63
|
class Proxy
|
21
64
|
|
@@ -25,141 +68,244 @@ module SC
|
|
25
68
|
end
|
26
69
|
|
27
70
|
def call(env)
|
28
|
-
|
71
|
+
path = env['PATH_INFO']
|
29
72
|
|
30
73
|
@proxies.each do |proxy, value|
|
31
|
-
|
32
|
-
|
74
|
+
# If the url matches a proxied url, handle it
|
75
|
+
if path.match(/^#{Regexp.escape(proxy.to_s)}/)
|
76
|
+
handle_proxy(value, proxy.to_s, env)
|
77
|
+
|
78
|
+
# Don't block waiting for a response
|
79
|
+
throw :async
|
33
80
|
end
|
34
81
|
end
|
35
82
|
|
36
83
|
return [404, {}, "not found"]
|
37
84
|
end
|
38
85
|
|
86
|
+
def chunked?(headers)
|
87
|
+
headers['Transfer-Encoding'] == "chunked"
|
88
|
+
end
|
89
|
+
|
39
90
|
def handle_proxy(proxy, proxy_url, env)
|
91
|
+
|
40
92
|
if proxy[:secure] && !SC::HTTPS_ENABLED
|
41
93
|
SC.logger << "~ WARNING: HTTPS is not supported on your system, using HTTP instead.\n"
|
42
94
|
SC.logger << " If you are using Ubuntu, you can run `apt-get install libopenssl-ruby`\n"
|
43
95
|
proxy[:secure] = false
|
44
96
|
end
|
45
97
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
params = env['QUERY_STRING']
|
98
|
+
headers = request_headers(env, proxy) # ex. {"Host"=>"localhost:4020", "Connection"=>"...
|
99
|
+
path = env['PATH_INFO'] # ex. /contacts
|
100
|
+
params = env['QUERY_STRING'] # ex. since=yesterday&unread=true
|
50
101
|
|
51
|
-
#
|
52
|
-
|
53
|
-
env.each do |key, value|
|
54
|
-
next unless key =~ /^HTTP_/
|
55
|
-
key = key.gsub(/^HTTP_/,'').downcase.sub(/^\w/){|l| l.upcase}.gsub(/_(\w)/){|l| "-#{$1.upcase}"} # remove HTTP_, dasherize and titleize
|
56
|
-
if !key.eql? "Version"
|
57
|
-
headers[key] = value
|
58
|
-
end
|
59
|
-
end
|
102
|
+
# Switch to https if proxy[:secure] configured
|
103
|
+
protocol = proxy[:secure] ? 'https' : 'http'
|
60
104
|
|
61
|
-
#
|
62
|
-
|
105
|
+
# Adjust the path if proxy[:url] configured
|
106
|
+
if proxy[:url]
|
107
|
+
path = path.sub(/^#{Regexp.escape proxy_url}/, proxy[:url])
|
108
|
+
end
|
63
109
|
|
64
|
-
|
65
|
-
|
110
|
+
# The endpoint URL
|
111
|
+
url = protocol + '://' + proxy[:to]
|
112
|
+
url += path unless path.empty?
|
113
|
+
url += '?' + params unless params.empty?
|
66
114
|
|
67
|
-
|
68
|
-
|
115
|
+
if env['CONTENT_LENGTH'] || env['HTTP_TRANSFER_ENCODING']
|
116
|
+
req_body = env['rack.input']
|
117
|
+
req_body.rewind # May not be necessary but can't hurt
|
69
118
|
|
70
|
-
|
71
|
-
url = url.sub(/^#{Regexp.escape proxy_url}/, proxy[:url])
|
119
|
+
req_body = req_body.read
|
72
120
|
end
|
73
121
|
|
74
|
-
|
75
|
-
|
76
|
-
|
122
|
+
# Options for the request
|
123
|
+
request_options = {}
|
124
|
+
request_options[:head] = headers
|
125
|
+
request_options[:body] = req_body if !!req_body
|
126
|
+
request_options[:timeout] = proxy[:timeout] if proxy[:timeout]
|
127
|
+
request_options[:redirects] = 10 if proxy[:redirect] != false
|
77
128
|
|
78
|
-
|
79
|
-
|
129
|
+
EventMachine.run {
|
130
|
+
body = nil
|
131
|
+
conn = EM::HttpRequest.new(url)
|
132
|
+
chunked = false
|
133
|
+
headers = {}
|
134
|
+
method = env['REQUEST_METHOD'].upcase
|
135
|
+
status = 0
|
80
136
|
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
137
|
+
case method
|
138
|
+
when 'GET'
|
139
|
+
http = conn.get request_options
|
140
|
+
when 'POST'
|
141
|
+
http = conn.post request_options
|
142
|
+
when 'PUT'
|
143
|
+
http = conn.put request_options
|
144
|
+
when 'DELETE'
|
145
|
+
http = conn.delete request_options
|
146
|
+
else
|
147
|
+
http = conn.head request_options
|
148
|
+
end
|
87
149
|
|
88
|
-
|
150
|
+
# Received error
|
151
|
+
http.errback {
|
152
|
+
status = http.response_header.status
|
153
|
+
path = env['PATH_INFO']
|
154
|
+
url = http.last_effective_url
|
155
|
+
SC.logger << "~ PROXY FAILED: #{method} #{path} -> #{status} #{url}\n"
|
89
156
|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
157
|
+
# If a body has been sent use it, otherwise respond with generic message
|
158
|
+
if !body
|
159
|
+
body = "Unable to proxy to #{url}. Received status: #{status}"
|
160
|
+
size = body.respond_to?(:bytesize) ? body.bytesize : body.length
|
161
|
+
headers = { 'Content-Length' => size.to_s }
|
162
|
+
body = [body]
|
163
|
+
end
|
94
164
|
|
95
|
-
|
96
|
-
|
97
|
-
|
165
|
+
env['async.callback'].call [502, headers, body]
|
166
|
+
}
|
167
|
+
|
168
|
+
# Received response
|
169
|
+
http.callback {
|
170
|
+
|
171
|
+
# Too many redirects
|
172
|
+
if redirect? status
|
173
|
+
body = "Unable to proxy to #{url}. Too many redirects."
|
174
|
+
size = body.respond_to?(:bytesize) ? body.bytesize : body.length
|
175
|
+
headers = { 'Content-Length' => size.to_s }
|
176
|
+
|
177
|
+
env['async.callback'].call [502, headers, [body]]
|
98
178
|
else
|
99
|
-
|
100
|
-
|
179
|
+
# Terminate the deferred body (which may have been chunked)
|
180
|
+
if body
|
181
|
+
body.call ['']
|
182
|
+
body.succeed
|
183
|
+
end
|
101
184
|
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
185
|
+
# Log the initial path and the final url
|
186
|
+
path = env['PATH_INFO']
|
187
|
+
url = http.last_effective_url
|
188
|
+
SC.logger << "~ PROXY: #{method} #{path} -> #{status} #{url}\n"
|
189
|
+
end
|
190
|
+
}
|
191
|
+
|
192
|
+
# Received headers
|
193
|
+
http.headers { |hash|
|
194
|
+
status = http.response_header.status
|
195
|
+
|
196
|
+
headers = response_headers(hash)
|
197
|
+
|
198
|
+
# Don't respond on redirection, but fail out on bad redirects
|
199
|
+
if redirect? status
|
200
|
+
|
201
|
+
if status == 304
|
202
|
+
env["async.callback"].call [status, headers, ['']]
|
203
|
+
SC.logger << "~ PROXY: #{method} #{path} -> #{status} #{url}\n"
|
204
|
+
elsif !headers['Location']
|
205
|
+
body = "Unable to proxy to #{url}. Received redirect with no Location."
|
206
|
+
size = body.respond_to?(:bytesize) ? body.bytesize : body.length
|
207
|
+
headers = { 'Content-Length' => size.to_s }
|
108
208
|
|
109
|
-
|
110
|
-
protocol = proxy[:secure] ? 'https' : 'http'
|
111
|
-
|
112
|
-
SC.logger << "~ PROXY: #{http_method.upcase} #{status} #{url} -> #{protocol}://#{http_host}:#{http_port}#{http_path}\n"
|
113
|
-
|
114
|
-
# display and construct specific response headers
|
115
|
-
response_headers = {}
|
116
|
-
ignore_headers = ['transfer-encoding', 'keep-alive', 'connection']
|
117
|
-
response.each do |key, value|
|
118
|
-
next if ignore_headers.include?(key.downcase)
|
119
|
-
# If this is a cookie, strip out the domain. This technically may
|
120
|
-
# break certain scenarios where services try to set cross-domain
|
121
|
-
# cookies, but those services should not be doing that anyway...
|
122
|
-
value.gsub!(/domain=[^\;]+\;? ?/,'') if key.downcase == 'set-cookie'
|
123
|
-
# content-length is returning char count not bytesize
|
124
|
-
if key.downcase == 'content-length'
|
125
|
-
if response.body.respond_to?(:bytesize)
|
126
|
-
value = response.body.bytesize.to_s
|
127
|
-
elsif response.body.respond_to?(:size)
|
128
|
-
value = response.body.size.to_s
|
129
|
-
else
|
130
|
-
value = '0'
|
209
|
+
http.close
|
131
210
|
end
|
211
|
+
|
212
|
+
else
|
213
|
+
# Stream the body right across in the format it was sent
|
214
|
+
chunked = chunked?(headers)
|
215
|
+
body = DeferrableBody.new({ :chunked => chunked })
|
216
|
+
|
217
|
+
# Start responding to the client immediately
|
218
|
+
env["async.callback"].call [status, headers, body]
|
132
219
|
end
|
220
|
+
}
|
133
221
|
|
134
|
-
|
135
|
-
|
222
|
+
# Received chunk of data
|
223
|
+
http.stream { |chunk|
|
224
|
+
# Ignore body of redirects
|
225
|
+
if !redirect? status
|
226
|
+
body.call [chunk]
|
227
|
+
end
|
228
|
+
}
|
229
|
+
}
|
230
|
+
end
|
231
|
+
|
232
|
+
def redirect?(status)
|
233
|
+
status >= 300 && status < 400
|
234
|
+
end
|
235
|
+
|
236
|
+
# collect headers...
|
237
|
+
def request_headers(env, proxy)
|
238
|
+
result = {}
|
239
|
+
env.each do |key, value|
|
240
|
+
next unless key =~ /^HTTP_/
|
241
|
+
|
242
|
+
key = headerize(key)
|
243
|
+
if !key.eql? "Version"
|
244
|
+
result[key] = value
|
136
245
|
end
|
246
|
+
end
|
247
|
+
|
248
|
+
# Rack documentation says CONTENT_TYPE and CONTENT_LENGTH aren't prefixed by HTTP_
|
249
|
+
result['Content-Type'] = env['CONTENT_TYPE'] if env['CONTENT_TYPE']
|
250
|
+
|
251
|
+
length = env['CONTENT_LENGTH']
|
252
|
+
result['Content-Length'] = length if length
|
253
|
+
|
254
|
+
# added 4/23/09 per Charles Jolley, corrects problem
|
255
|
+
# when making requests to virtual hosts
|
256
|
+
result['Host'] = proxy[:to]
|
137
257
|
|
138
|
-
|
139
|
-
|
258
|
+
result
|
259
|
+
end
|
260
|
+
|
261
|
+
# construct and display specific response headers
|
262
|
+
def response_headers(hash)
|
263
|
+
result = {}
|
264
|
+
|
265
|
+
hash.each do |key, value|
|
266
|
+
key = headerize(key)
|
140
267
|
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
268
|
+
# Because Set-Cookie header can appear more the once in the response body,
|
269
|
+
# but Rack only accepts a hash of headers, we store it in a line break separated string
|
270
|
+
# for Ruby 1.9 and as an Array for Ruby 1.8
|
271
|
+
# See http://groups.google.com/group/rack-devel/browse_thread/thread/e8759b91a82c5a10/a8dbd4574fe97d69?#a8dbd4574fe97d69
|
272
|
+
if key.downcase == 'set-cookie'
|
273
|
+
cookies = []
|
274
|
+
|
275
|
+
case value
|
276
|
+
when Array then value.each { |c| cookies << strip_domain(c) }
|
277
|
+
when Hash then value.each { |_, c| cookies << strip_domain(c) }
|
278
|
+
else cookies << strip_domain(value)
|
145
279
|
end
|
146
280
|
|
147
|
-
|
148
|
-
|
281
|
+
# Remove nil values
|
282
|
+
result['Set-Cookie'] = [result['Set-Cookie'], cookies].compact
|
149
283
|
|
150
|
-
|
151
|
-
|
152
|
-
|
284
|
+
if Thin.ruby_18?
|
285
|
+
result['Set-Cookie'].flatten!
|
286
|
+
else
|
287
|
+
result['Set-Cookie'] = result['Set-Cookie'].join("\n")
|
153
288
|
end
|
154
|
-
else
|
155
|
-
done = true
|
156
289
|
end
|
290
|
+
|
291
|
+
SC.logger << " #{key}: #{value}\n"
|
292
|
+
result[key] = value
|
157
293
|
end
|
158
294
|
|
159
|
-
|
160
|
-
|
295
|
+
::Rack::Utils::HeaderHash.new(result)
|
296
|
+
end
|
297
|
+
|
298
|
+
# remove HTTP_, dasherize and titleize
|
299
|
+
def headerize(str)
|
300
|
+
parts = str.gsub(/^HTTP_/, '').split('_')
|
301
|
+
parts.map! { |p| p.capitalize }.join('-')
|
302
|
+
end
|
161
303
|
|
162
|
-
|
304
|
+
# Strip out the domain of passed in cookie. This technically may
|
305
|
+
# break certain scenarios where services try to set cross-domain
|
306
|
+
# cookies, but those services should not be doing that anyway...
|
307
|
+
def strip_domain(cookie)
|
308
|
+
cookie.to_s.gsub!(/domain=[^\;]+\;? ?/,'')
|
163
309
|
end
|
164
310
|
end
|
165
311
|
end
|