sproutcore 1.10.0 → 1.10.1
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.
- checksums.yaml +8 -8
- data/VERSION.yml +1 -1
- data/bin/sc-phantom +13 -0
- data/lib/Buildfile +3 -0
- data/lib/buildtasks/manifest.rake +3 -0
- data/lib/frameworks/sproutcore/CHANGELOG.md +24 -1
- data/lib/frameworks/sproutcore/frameworks/bootstrap/system/browser.js +1 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/root_responder.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/designer/views/designer_drop_target.js +1 -2
- data/lib/frameworks/sproutcore/frameworks/designer/views/high_light.js +1 -2
- data/lib/frameworks/sproutcore/frameworks/designer/views/page_item_view.js +1 -2
- data/lib/frameworks/sproutcore/frameworks/designer/views/selection_handles.js +1 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/menu.js +4 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/resources/progress.css +4 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/system/drag.js +44 -35
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/menu/ui.js +167 -91
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/touch.js +215 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/grid/drag_and_drop.js +7 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list/drag_and_drop.js +7 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/stacked/ui_comments.js +26 -24
- data/lib/frameworks/sproutcore/frameworks/desktop/views/collection.js +9 -18
- data/lib/frameworks/sproutcore/frameworks/desktop/views/grid.js +25 -20
- data/lib/frameworks/sproutcore/frameworks/desktop/views/list.js +29 -29
- data/lib/frameworks/sproutcore/frameworks/desktop/views/menu_item.js +107 -106
- data/lib/frameworks/sproutcore/frameworks/desktop/views/menu_scroll.js +120 -134
- data/lib/frameworks/sproutcore/frameworks/desktop/views/scroll.js +14 -7
- data/lib/frameworks/sproutcore/frameworks/desktop/views/stacked.js +2 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/content_value_support.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/foundation/system/module.js +197 -196
- data/lib/frameworks/sproutcore/frameworks/foundation/views/inline_text_field.js +7 -0
- data/lib/frameworks/sproutcore/frameworks/routing/system/routes.js +22 -10
- data/lib/frameworks/sproutcore/frameworks/routing/tests/system/routes.js +43 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/core.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/runtime/system/object.js +2 -3
- data/lib/frameworks/sproutcore/frameworks/runtime/system/run_loop.js +14 -14
- data/lib/frameworks/sproutcore/frameworks/statechart/system/statechart.js +90 -79
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/event_handling/advanced/event_queuing.js +104 -0
- data/lib/frameworks/sproutcore/frameworks/table/views/table.js +3 -0
- data/lib/frameworks/sproutcore/frameworks/template_view/handlebars.js +2 -1
- data/lib/frameworks/sproutcore/themes/ace/resources/collection/normal/grid.css +17 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/menu/menu.css +1 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/menu/menu.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/menu/menu@2x.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/panel/panel.css +2 -2
- data/lib/frameworks/sproutcore/themes/empty_theme/theme.js +1 -1
- data/lib/sproutcore/tools.rb +2 -1
- data/lib/sproutcore/tools/phantom.rb +36 -0
- data/sproutcore.gemspec +1 -1
- data/vendor/chance/lib/chance/instance.rb +5 -2
- metadata +11 -4
data/lib/frameworks/sproutcore/frameworks/statechart/tests/event_handling/advanced/event_queuing.js
ADDED
@@ -0,0 +1,104 @@
|
|
1
|
+
// ==========================================================================
|
2
|
+
// Project: SproutCore - JavaScript Application Framework
|
3
|
+
// Copyright: ©2006-2011 Strobe Inc. and contributors.
|
4
|
+
// Portions ©2008-2011 Apple Inc. All rights reserved.
|
5
|
+
// License: Licensed under MIT license (see license.js)
|
6
|
+
// ==========================================================================
|
7
|
+
|
8
|
+
var TestState, statechart, expectedEvents;
|
9
|
+
|
10
|
+
module("Statechart Event Queuing", {
|
11
|
+
setup: function() {
|
12
|
+
TestState = SC.State.extend({
|
13
|
+
_handledEvents: null,
|
14
|
+
|
15
|
+
init: function() {
|
16
|
+
sc_super();
|
17
|
+
this.reset();
|
18
|
+
},
|
19
|
+
|
20
|
+
reset: function() {
|
21
|
+
this.set('_handledEvents', []);
|
22
|
+
}
|
23
|
+
});
|
24
|
+
|
25
|
+
statechart = SC.Statechart.create({
|
26
|
+
|
27
|
+
rootState: TestState.extend({
|
28
|
+
|
29
|
+
initialSubstate: 'a',
|
30
|
+
|
31
|
+
eventA: function() {
|
32
|
+
this._handledEvents.push('eventA');
|
33
|
+
},
|
34
|
+
|
35
|
+
eventB: function() {
|
36
|
+
this._handledEvents.push('eventB');
|
37
|
+
|
38
|
+
statechart.gotoState('b');
|
39
|
+
},
|
40
|
+
|
41
|
+
eventC: function() {
|
42
|
+
this._handledEvents.push('eventC');
|
43
|
+
},
|
44
|
+
|
45
|
+
a: TestState.extend({
|
46
|
+
|
47
|
+
}),
|
48
|
+
|
49
|
+
b: TestState.extend({
|
50
|
+
enterState: function() {
|
51
|
+
statechart.sendEvent('eventC');
|
52
|
+
}
|
53
|
+
}),
|
54
|
+
|
55
|
+
c: TestState.extend({
|
56
|
+
enterState: function() {
|
57
|
+
statechart.sendEvent('eventA');
|
58
|
+
stop();
|
59
|
+
return this.performAsync('asyncFunction');
|
60
|
+
},
|
61
|
+
|
62
|
+
asyncFunction: function() {
|
63
|
+
var self = this;
|
64
|
+
setTimeout(function() {
|
65
|
+
statechart.sendEvent('eventC');
|
66
|
+
}, 100);
|
67
|
+
setTimeout(function() {
|
68
|
+
var rootState = statechart.get('rootState');
|
69
|
+
self.resumeGotoState();
|
70
|
+
same(rootState._handledEvents, expectedEvents, 'expected events were handled');
|
71
|
+
start();
|
72
|
+
}, 500);
|
73
|
+
}
|
74
|
+
})
|
75
|
+
|
76
|
+
})
|
77
|
+
|
78
|
+
});
|
79
|
+
|
80
|
+
statechart.initStatechart();
|
81
|
+
},
|
82
|
+
|
83
|
+
teardown: function() {
|
84
|
+
statechart.destroy();
|
85
|
+
statechart = null;
|
86
|
+
}
|
87
|
+
});
|
88
|
+
|
89
|
+
test("Events are sent even when queued during state transitions", function() {
|
90
|
+
var rootState = statechart.get('rootState'),
|
91
|
+
stateA = statechart.getState('a'),
|
92
|
+
stateB = statechart.getState('b');
|
93
|
+
|
94
|
+
statechart.sendEvent('eventA');
|
95
|
+
equals(rootState._handledEvents.contains('eventA'), true, 'eventA was handled');
|
96
|
+
|
97
|
+
rootState.reset();
|
98
|
+
statechart.sendEvent('eventB');
|
99
|
+
same(rootState._handledEvents, ['eventB', 'eventC'], 'eventB and eventC were handled');
|
100
|
+
|
101
|
+
rootState.reset();
|
102
|
+
expectedEvents = ['eventA', 'eventC'];
|
103
|
+
statechart.gotoState('c');
|
104
|
+
});
|
@@ -365,6 +365,9 @@ SC.TableView = SC.ListView.extend(SC.TableDelegate, {
|
|
365
365
|
containerView.adjust('minHeight', minHeight);
|
366
366
|
containerView.layoutDidChange();
|
367
367
|
|
368
|
+
// Set the calculatedHeight used by SC.ScrollView.
|
369
|
+
this.set('calculatedHeight', minHeight);
|
370
|
+
|
368
371
|
//containerView.adjust('height', height);
|
369
372
|
//containerView.layoutDidChange();
|
370
373
|
|
@@ -690,6 +690,7 @@ Handlebars.SafeString.prototype.toString = function() {
|
|
690
690
|
|
691
691
|
(function() {
|
692
692
|
var escape = {
|
693
|
+
"&": "&",
|
693
694
|
"<": "<",
|
694
695
|
">": ">",
|
695
696
|
'"': """,
|
@@ -697,7 +698,7 @@ Handlebars.SafeString.prototype.toString = function() {
|
|
697
698
|
"`": "`"
|
698
699
|
};
|
699
700
|
|
700
|
-
var badChars =
|
701
|
+
var badChars = /[&<>"'`]/g;
|
701
702
|
var possible = /[&<>"'`]/;
|
702
703
|
|
703
704
|
var escapeChar = function(chr) {
|
@@ -0,0 +1,17 @@
|
|
1
|
+
$theme.sc-grid-insertion-point {
|
2
|
+
overflow: visible;
|
3
|
+
background-color: #9ABAC9;
|
4
|
+
z-index: 1000;
|
5
|
+
}
|
6
|
+
|
7
|
+
$theme.sc-grid-insertion-point > .anchor {
|
8
|
+
position: absolute;
|
9
|
+
width: 8px;
|
10
|
+
top: -3px;
|
11
|
+
left: -3px;
|
12
|
+
height: 8px;
|
13
|
+
-webkit-border-radius: 4px;
|
14
|
+
-moz-border-radius: 4px;
|
15
|
+
border-radius: 4px;
|
16
|
+
background-color: #9ABAC9;
|
17
|
+
}
|
@@ -4,6 +4,7 @@ $theme.menu {
|
|
4
4
|
.panel-background {
|
5
5
|
background: transparent;
|
6
6
|
position: absolute;
|
7
|
+
// The top and bottom match the menuHeightPadding value.
|
7
8
|
top: -22px; right: -15px; bottom: -22px; left: -15px;
|
8
9
|
@include slices("menu.png", $left: 25, $right: 25, $top: 25, $bottom: 25, $fill: 1 1);
|
9
10
|
}
|
Binary file
|
Binary file
|
@@ -1,13 +1,13 @@
|
|
1
1
|
$theme.panel {
|
2
2
|
background: transparent;
|
3
|
-
|
3
|
+
|
4
4
|
.panel-background {
|
5
5
|
position: absolute;
|
6
6
|
left: -15px;
|
7
7
|
top: -15px;
|
8
8
|
bottom: -15px;
|
9
9
|
right: -15px;
|
10
|
-
|
10
|
+
|
11
11
|
@include slices("panel.png", $top: 25, $left: 25, $right: 25, $bottom: 25, $fill: 1 1);
|
12
12
|
}
|
13
13
|
}
|
data/lib/sproutcore/tools.rb
CHANGED
@@ -24,7 +24,7 @@ module SC
|
|
24
24
|
# tool itself when it runs.
|
25
25
|
#
|
26
26
|
class Tools < ::Thor
|
27
|
-
check_unknown_options!
|
27
|
+
check_unknown_options! :except => :phantom
|
28
28
|
|
29
29
|
def self.invoke(task_name)
|
30
30
|
start([task_name.to_s] + ARGV)
|
@@ -465,4 +465,5 @@ require "sproutcore/tools/gen"
|
|
465
465
|
require "sproutcore/tools/init"
|
466
466
|
require "sproutcore/tools/manifest"
|
467
467
|
require "sproutcore/tools/server"
|
468
|
+
require "sproutcore/tools/phantom"
|
468
469
|
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# ===========================================================================
|
2
|
+
# Project: Abbot - SproutCore Build Tools
|
3
|
+
# Copyright: ©2009 Apple Inc.
|
4
|
+
# portions copyright @2006-2013 Strobe Inc.
|
5
|
+
# and contributors
|
6
|
+
# ===========================================================================
|
7
|
+
|
8
|
+
module SC
|
9
|
+
|
10
|
+
class Tools
|
11
|
+
|
12
|
+
stop_on_unknown_option! :phantom
|
13
|
+
|
14
|
+
desc "phantom ARGS", "Runs the PhantomJS unit test runner, passing arguments straight through"
|
15
|
+
|
16
|
+
def phantom(*args)
|
17
|
+
result = false
|
18
|
+
target = find_targets('/sproutcore').first
|
19
|
+
|
20
|
+
if target
|
21
|
+
test_runner_path = File.expand_path(File.join('phantomjs', 'test_runner.js'), target.source_root)
|
22
|
+
if File.file? test_runner_path
|
23
|
+
result = system "phantomjs #{test_runner_path} #{args.join(' ')}"
|
24
|
+
else
|
25
|
+
SC.logger.fatal "Could not find PhantomJS test runner"
|
26
|
+
end
|
27
|
+
else
|
28
|
+
SC.logger.fatal "Could not find /sproutcore target"
|
29
|
+
end
|
30
|
+
|
31
|
+
exit(1) unless result
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
data/sproutcore.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.add_dependency 'json_pure', "~> 1.4"
|
20
20
|
s.add_dependency 'extlib', "~> 0.9"
|
21
21
|
s.add_dependency 'erubis', "~> 2.6"
|
22
|
-
s.add_dependency 'thor', '~> 0.
|
22
|
+
s.add_dependency 'thor', '~> 0.18'
|
23
23
|
s.add_dependency 'sass', '~> 3.1'
|
24
24
|
s.add_dependency 'haml', '~> 3.1'
|
25
25
|
|
@@ -64,6 +64,7 @@ module Chance
|
|
64
64
|
def initialize(options = {})
|
65
65
|
@options = options
|
66
66
|
@options[:theme] = "" if @options[:theme].nil?
|
67
|
+
@options[:css_charset] = "UTF-8" if @options[:css_charset].nil?
|
67
68
|
@options[:pad_sprites_for_debugging] = true if @options[:pad_sprites_for_debugging].nil?
|
68
69
|
@options[:optimize_sprites] = true if @options[:optimize_sprites].nil?
|
69
70
|
|
@@ -256,7 +257,9 @@ module Chance
|
|
256
257
|
# slices (the details will be postprocessed out).
|
257
258
|
# After that, all of the individual files (using the import CSS generated
|
258
259
|
# in Step 1)
|
259
|
-
|
260
|
+
# We insert the charset here or else Sass will not determine it correctly via the @imports.
|
261
|
+
css_charset = @options[:css_charset]
|
262
|
+
css = "@charset \"#{css_charset}\";\n@import \"#{image_css_path}\";\n" + import_css
|
260
263
|
|
261
264
|
# Step 3: Apply Sass Engine
|
262
265
|
engine = Sass::Engine.new(css, Compass.sass_engine_options.merge({
|
@@ -433,7 +436,7 @@ module Chance
|
|
433
436
|
relative_paths = @mapped_files.invert
|
434
437
|
|
435
438
|
@file_list.map {|file|
|
436
|
-
# NOTE: WE MUST CALL CHANCE PARSER NOW, because it generates our
|
439
|
+
# NOTE: WE MUST CALL CHANCE PARSER NOW, because it generates our slices.
|
437
440
|
# We can't be picky and just call it if something has changed. Thankfully,
|
438
441
|
# parser is fast. Unlike SCSS.
|
439
442
|
header_file = chance_header_for_file(relative_paths[file[:path]])
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sproutcore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.10.
|
4
|
+
version: 1.10.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Strobe, Inc., Apple Inc. and contributors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - ~>
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '0.
|
75
|
+
version: '0.18'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - ~>
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '0.
|
82
|
+
version: '0.18'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: sass
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -287,6 +287,7 @@ executables:
|
|
287
287
|
- sc-gen
|
288
288
|
- sc-init
|
289
289
|
- sc-manifest
|
290
|
+
- sc-phantom
|
290
291
|
- sc-server
|
291
292
|
- sproutcore
|
292
293
|
extensions: []
|
@@ -309,6 +310,7 @@ files:
|
|
309
310
|
- bin/sc-gen
|
310
311
|
- bin/sc-init
|
311
312
|
- bin/sc-manifest
|
313
|
+
- bin/sc-phantom
|
312
314
|
- bin/sc-server
|
313
315
|
- bin/sproutcore
|
314
316
|
- lib/Buildfile
|
@@ -473,6 +475,7 @@ files:
|
|
473
475
|
- lib/sproutcore/tools/gen.rb
|
474
476
|
- lib/sproutcore/tools/init.rb
|
475
477
|
- lib/sproutcore/tools/manifest.rb
|
478
|
+
- lib/sproutcore/tools/phantom.rb
|
476
479
|
- lib/sproutcore/tools/server.rb
|
477
480
|
- lib/sproutcore/version.rb
|
478
481
|
- spec/buildtasks/build/copy_spec.rb
|
@@ -1611,6 +1614,7 @@ files:
|
|
1611
1614
|
- lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/selection.js
|
1612
1615
|
- lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/selectNextItem.js
|
1613
1616
|
- lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/selectPreviousItem.js
|
1617
|
+
- lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/touch.js
|
1614
1618
|
- lib/frameworks/sproutcore/frameworks/desktop/tests/views/collection/ui_diagram.js
|
1615
1619
|
- lib/frameworks/sproutcore/frameworks/desktop/tests/views/date_field/methods.js
|
1616
1620
|
- lib/frameworks/sproutcore/frameworks/desktop/tests/views/date_field/ui.js
|
@@ -2053,6 +2057,7 @@ files:
|
|
2053
2057
|
- lib/frameworks/sproutcore/frameworks/statechart/system/state_route_handler_context.js
|
2054
2058
|
- lib/frameworks/sproutcore/frameworks/statechart/system/statechart.js
|
2055
2059
|
- lib/frameworks/sproutcore/frameworks/statechart/tests/debug/sequence_matcher.js
|
2060
|
+
- lib/frameworks/sproutcore/frameworks/statechart/tests/event_handling/advanced/event_queuing.js
|
2056
2061
|
- lib/frameworks/sproutcore/frameworks/statechart/tests/event_handling/advanced/without_concurrent_states.js
|
2057
2062
|
- lib/frameworks/sproutcore/frameworks/statechart/tests/event_handling/basic/with_concurrent_states.js
|
2058
2063
|
- lib/frameworks/sproutcore/frameworks/statechart/tests/event_handling/basic/without_concurrent_states.js
|
@@ -2231,6 +2236,7 @@ files:
|
|
2231
2236
|
- lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_unchecked.png
|
2232
2237
|
- lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_unchecked_active.png
|
2233
2238
|
- lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/checkbox.css
|
2239
|
+
- lib/frameworks/sproutcore/themes/ace/resources/collection/normal/grid.css
|
2234
2240
|
- lib/frameworks/sproutcore/themes/ace/resources/collection/normal/list.css
|
2235
2241
|
- lib/frameworks/sproutcore/themes/ace/resources/collection/normal/list_item.css
|
2236
2242
|
- lib/frameworks/sproutcore/themes/ace/resources/collection/source-list/selection.png
|
@@ -2250,6 +2256,7 @@ files:
|
|
2250
2256
|
- lib/frameworks/sproutcore/themes/ace/resources/menu/down.png
|
2251
2257
|
- lib/frameworks/sproutcore/themes/ace/resources/menu/menu.css
|
2252
2258
|
- lib/frameworks/sproutcore/themes/ace/resources/menu/menu.png
|
2259
|
+
- lib/frameworks/sproutcore/themes/ace/resources/menu/menu@2x.png
|
2253
2260
|
- lib/frameworks/sproutcore/themes/ace/resources/menu/menu_item.png
|
2254
2261
|
- lib/frameworks/sproutcore/themes/ace/resources/menu/up.png
|
2255
2262
|
- lib/frameworks/sproutcore/themes/ace/resources/panel/panel.css
|