sproutcore 1.10.0.rc.3 → 1.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/VERSION.yml +1 -1
- data/lib/buildtasks/manifest.rake +3 -2
- data/lib/frameworks/sproutcore/Buildfile +3 -1
- data/lib/frameworks/sproutcore/CHANGELOG.md +26 -2
- data/lib/frameworks/sproutcore/apps/showcase/resources/main_page.js +3 -0
- data/lib/frameworks/sproutcore/apps/showcase/views/views_item_view.js +1 -1
- data/lib/frameworks/sproutcore/apps/welcome/english.lproj/main_page.js +3 -0
- data/lib/frameworks/sproutcore/frameworks/bootstrap/system/browser.js +5 -5
- data/lib/frameworks/sproutcore/frameworks/bootstrap/tests/system/browser.js +9 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/pane_statechart.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/browser.js +6 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/root_responder.js +17 -55
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/animation.js +57 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/isVisible.js +24 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/view_states_test.js +31 -13
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view.js +8 -5
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/animation.js +24 -20
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/layout.js +39 -29
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/statechart.js +400 -242
- data/lib/frameworks/sproutcore/frameworks/datastore/models/record.js +37 -32
- data/lib/frameworks/sproutcore/frameworks/datastore/models/record_attribute.js +1 -8
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/modal.js +3 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/panel.js +4 -5
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/panel/ui.js +53 -6
- data/lib/frameworks/sproutcore/frameworks/desktop/views/collection.js +9 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/views/grid.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/views/scroll.js +16 -12
- data/lib/frameworks/sproutcore/frameworks/desktop/views/scroller.js +16 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/auto_resize.js +10 -8
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/auto_resize_test.js +102 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/validators/password.js +15 -7
- data/lib/frameworks/sproutcore/frameworks/runtime/system/run_loop.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/testing/system/runner.js +4 -0
- data/lib/frameworks/sproutcore/phantomjs/minimist.js +181 -0
- data/lib/frameworks/sproutcore/phantomjs/q.js +1937 -0
- data/lib/frameworks/sproutcore/phantomjs/test_runner.js +733 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/button.css +2 -2
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/button.css +11 -11
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/button.css +5 -5
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/jumbo/button.css +3 -3
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/small/button.css +3 -3
- data/lib/frameworks/sproutcore/themes/ace/resources/button/popup/select.css +1 -1
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/checkbox.css +3 -3
- data/lib/frameworks/sproutcore/themes/ace/resources/collection/source-list/source_list_view.css +4 -4
- data/lib/frameworks/sproutcore/themes/ace/resources/disclosure/ace/disclosure.css +6 -6
- data/lib/frameworks/sproutcore/themes/ace/resources/imagebutton/ace/imagebutton.css +5 -5
- data/lib/frameworks/sproutcore/themes/ace/resources/menu/menu.css +16 -16
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover.css +42 -42
- data/lib/frameworks/sproutcore/themes/ace/resources/progress/ace/progress.css +19 -19
- data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio.css +12 -12
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/horizontal/horizontal.css +7 -7
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/horizontal/horizontal_touch.css +18 -18
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/vertical/vertical.css +8 -8
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/vertical/vertical_touch.css +16 -16
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented.css +2 -2
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/segmented.css +13 -13
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/14px/slider.css +11 -11
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/16px/slider.css +11 -11
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/22px/slider.css +11 -11
- data/lib/frameworks/sproutcore/themes/ace/resources/split/split.css +6 -6
- data/lib/frameworks/sproutcore/themes/ace/resources/toolbar/toolbar.css +2 -2
- data/lib/frameworks/sproutcore/themes/iphone_theme/english.lproj/button.css +3 -3
- data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/button.css +18 -18
- data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/checkbox.css +7 -7
- data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/collection.css +2 -2
- data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/core.css +7 -7
- data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/disclosure.css +3 -3
- data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/list_item.css +4 -4
- data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/menu.css +3 -3
- data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/menu_item_view.css +5 -5
- data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/panel.css +7 -7
- data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/picker.css +3 -3
- data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/progress.css +5 -5
- data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/radio.css +4 -4
- data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/scroller.css +3 -3
- data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/segmented.css +7 -7
- data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/slider.css +2 -2
- data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/split_view.css +2 -2
- data/lib/frameworks/sproutcore/themes/legacy_theme/english.lproj/toolbar.css +3 -3
- data/lib/sproutcore/tools/server.rb +9 -3
- metadata +8 -83
- data/lib/frameworks/sproutcore/design/Assorted Images/sproutcore-startup-landscape.jpg +0 -0
- data/lib/frameworks/sproutcore/design/Assorted Images/sproutcore-startup-landscape.png +0 -0
- data/lib/frameworks/sproutcore/design/Assorted Images/sproutcore-startup-portrait.jpg +0 -0
- data/lib/frameworks/sproutcore/design/Assorted Images/sproutcore-startup-portrait.png +0 -0
- data/lib/frameworks/sproutcore/design/Assorted Images/sproutcore-startup.png +0 -0
- data/lib/frameworks/sproutcore/design/Record State Table.numbers +0 -0
- data/lib/frameworks/sproutcore/design/greenhouse-statechart.pdf +0 -0
- data/lib/frameworks/sproutcore/tests/phantomjs_runner.phantomjs +0 -611
- data/lib/frameworks/sproutcore/themes/ace/designs/dark.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/light.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/panel/PanelPane.opacity +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/panel/Pointers.opacity +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch_handle.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch_off.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch_on.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/16/10.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/16/100.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/16/102.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/16/110.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/16/120.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/16/127.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/16/18.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/16/19.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/16/2.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/16/24.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/16/26.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/16/27.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/16/28.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/16/29.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/16/30.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/16/31.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/16/33.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/16/37.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/16/41.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/16/99.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/24/10.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/24/100.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/24/102.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/24/110.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/24/120.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/24/127.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/24/18.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/24/19.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/24/2.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/24/24.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/24/26.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/24/27.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/24/28.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/24/29.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/24/30.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/24/31.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/24/33.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/24/37.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/24/41.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/24/99.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/32/10.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/32/100.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/32/102.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/32/110.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/32/120.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/32/127.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/32/18.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/32/19.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/32/2.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/32/24.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/32/26.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/32/27.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/32/28.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/32/29.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/32/30.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/32/31.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/32/33.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/32/37.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/32/41.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/32/99.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/48/10.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/48/18.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/48/19.png +0 -0
- data/lib/frameworks/sproutcore/themes/legacy_theme/Source/icons/48/2.png +0 -0
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YmFiZjRlOTRmZjI1ZWY4NGI4ZGVjYjNmZjgyY2MzNzY2ODlmMWFhMg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MTk5ODA0ZmRiZmRmZjkwYzViZGY3OGIyNjgwMTIxMzYwMWE4NDEyZg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OGY5N2UwMWM5YmQ5ZTExOTJiYjViYjY3YWRkMWE3ZmU3ZGJhNzBhNGY2N2Vl
|
10
|
+
OTlhOWVkMGFhMzBhNjFiY2EyZTExMGQ5MzdlMzIxYjBhZWZiNTI3MDY1YjAy
|
11
|
+
ZmNlYzI0YzhjOTFjNWNkNmI1YWZmY2U2MDY5Y2MyMjMwMWJlMzI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OTM5NjA3NThiYTcwNjUyODA4Yjc4YThiNmM0ZjEwYmI2NDk0ZDVlZDI4MmEy
|
14
|
+
YTkzMGM3NWRlNWIzNWFhOTMwM2MyMmM2NzYxZDNkZWZlZTlkYWIxZGU3Zjk1
|
15
|
+
NWRhNGZjMTdmMDcwMWM1ZmEzMThjNDEwYmYzMGZkMTNjMWEwMjU=
|
data/VERSION.yml
CHANGED
@@ -96,15 +96,16 @@ namespace :manifest do
|
|
96
96
|
manifest = env[:manifest]
|
97
97
|
|
98
98
|
# these directories are to be excluded unless CONFIG.load_"dirname" = true
|
99
|
-
|
99
|
+
exclude_dirnames = %w(debug tests fixtures protocols).reject do |k|
|
100
100
|
CONFIG[:"load_#{k}"]
|
101
101
|
end
|
102
|
+
exclude_dirnames.concat [*CONFIG[:exclude]]
|
102
103
|
|
103
104
|
# loop through entries and hide those that do not below...
|
104
105
|
manifest.entries.each do |entry|
|
105
106
|
|
106
107
|
# if in /dirname or /foo.lproj/dirname -- hide it!
|
107
|
-
|
108
|
+
exclude_dirnames.each do |dirname|
|
108
109
|
if entry[:filename] =~ /^(([^\/]+)\.lproj\/)?#{dirname}\/.+$/
|
109
110
|
entry.hide!
|
110
111
|
next
|
@@ -48,7 +48,9 @@ config :designer, :required => [:runtime, :foundation, :desktop, :templat
|
|
48
48
|
config :"experimental/split_view", :test_required => [:desktop]
|
49
49
|
|
50
50
|
# WRAPPER FRAMEWORKS
|
51
|
-
config :sproutcore,
|
51
|
+
config :sproutcore,
|
52
|
+
:required => [:desktop, :datastore, :statechart],
|
53
|
+
:exclude => ['phantomjs']
|
52
54
|
|
53
55
|
config :qunit, :required => []
|
54
56
|
config :testing, :required => [:jquery], :test_required => [], :debug_required => []
|
@@ -1,8 +1,32 @@
|
|
1
1
|
CHANGE LOG
|
2
2
|
==========
|
3
3
|
|
4
|
-
1.10.0
|
5
|
-
|
4
|
+
1.10.0.0
|
5
|
+
-----------
|
6
|
+
|
7
|
+
### CHANGES & FEATURES
|
8
|
+
|
9
|
+
* Allows adjust to be called after animate in the same run loop. Adjust can occur cleanly, which won't affect the animation or it can clash, in which case it will override the animation.
|
10
|
+
* Improves internal code structure to support optimization by JS engines.
|
11
|
+
* Makes the conditional that attempts to lock all textfields from receiving focus behind a modal pane, fail more quickly (this also prevents getting the pane on views that may not yet have a pane).
|
12
|
+
|
13
|
+
### DEPRECATIONS & REMOVALS
|
14
|
+
|
15
|
+
* Removes 26.6MB of design files from within the framework. This means that these files are no longer downloaded and duplicated in each clone of the framework nor are any of them included in the gem (although many were stripped out of the gem anyhow). These files are still available at https://github.com/sproutcore/design.
|
16
|
+
|
17
|
+
### BUG FIXES
|
18
|
+
|
19
|
+
* Removes the blockers that prevented all browsers that support touch events from using mouse events. Note: a browser's support of touch events is no indication of a touch capable device or even that the touch capable device will not need to send mouse events (via a plugged in mouse for example). When implementing touch support in a custom control, you should call evt.preventDefault in touchEnd to prevent additional mouse events from being sent by the browser.
|
20
|
+
* Prevents extremely bizarre bug where an iPad will fail to detect the os in iOS, in spite of following the correct code path. The correct value is assigned to an array and then re-read from the same array a moment later. For some unknown reason, when the value is re-read from the array it would return the old value. Side effects of this are that all hacks looking for mobile safari would fail (including touch handling in text fields).
|
21
|
+
* Fixes a regression in SC.ScrollView that threw an exception when beginning a new touch drag while a previous one was still decelerating.
|
22
|
+
* Prevents successive clicks with two different mouse buttons from being considered a double click.
|
23
|
+
* Fixes a bad conditional that coerced 0 frame widths to a false value. This caused excessive reloads of SC.GridView.
|
24
|
+
* Fixes #1093 issue where a view would fail to be hidden if its pane was removed mid-transition.
|
25
|
+
* Fixes #1087 issue with triggering and canceling animation in same runloop.
|
26
|
+
* Fixes bug where PanelPane's ModalPane would appear if isModal becomes true while the PanelPane is transitioning out.
|
27
|
+
|
28
|
+
1.10.0.rc.1, 1.10.0.rc.2, 1.10.0.rc.3
|
29
|
+
-----------
|
6
30
|
|
7
31
|
### CHANGES & FEATURES
|
8
32
|
|
@@ -33,6 +33,9 @@ Showcase.mainPage = SC.Page.design({
|
|
33
33
|
classNames: ['main-source-list'],
|
34
34
|
contentBinding: SC.Binding.oneWay('Showcase.sourceTreeController.arrangedObjects'),
|
35
35
|
contentValueKey: 'name',
|
36
|
+
|
37
|
+
// Show all the items for best performance since the list is short.
|
38
|
+
contentIndexesInRect: function () { return null; }.property().cacheable(),
|
36
39
|
selectionBinding: SC.Binding.from('Showcase.sourceTreeController.selection')
|
37
40
|
})
|
38
41
|
}),
|
@@ -42,6 +42,9 @@ Welcome.mainPage = SC.Page.design({
|
|
42
42
|
contentIconKey: "targetIcon",
|
43
43
|
hasContentIcon: YES,
|
44
44
|
|
45
|
+
// Show all the items for best performance since the list is short.
|
46
|
+
contentIndexesInRect: function () { return null; }.property().cacheable(),
|
47
|
+
|
45
48
|
target: "Welcome.targetsController",
|
46
49
|
action: "loadApplication"
|
47
50
|
})
|
@@ -129,7 +129,7 @@ SC.detectBrowser = function (userAgent, language) {
|
|
129
129
|
conExp = '(?:[\\/:\\::\\s:;])', // Match the connecting character
|
130
130
|
numExp = '(\\S+[^\\s:;:\\)]|)', // Match the "number"
|
131
131
|
nameAndVersion,
|
132
|
-
osAndVersion,
|
132
|
+
os, osAndVersion,
|
133
133
|
override;
|
134
134
|
|
135
135
|
// Use the current values if none are provided.
|
@@ -265,9 +265,9 @@ SC.detectBrowser = function (userAgent, language) {
|
|
265
265
|
[null, SC.BROWSER.unknown, '0'];
|
266
266
|
|
267
267
|
// Normalize the os name.
|
268
|
-
if (isIOSDevice) {
|
269
|
-
else if (osAndVersion[1] === 'mac os x' || osAndVersion[1] === 'mac os') {
|
270
|
-
else if (osAndVersion[1] === 'windows nt') {
|
268
|
+
if (isIOSDevice) { os = SC.OS.ios; }
|
269
|
+
else if (osAndVersion[1] === 'mac os x' || osAndVersion[1] === 'mac os') { os = SC.OS.mac; }
|
270
|
+
else if (osAndVersion[1] === 'windows nt') { os = SC.OS.win; }
|
271
271
|
|
272
272
|
// Normalize the os version.
|
273
273
|
osAndVersion[2] = osAndVersion[2] ? osAndVersion[2].replace(/_/g, '.') : '0';
|
@@ -277,7 +277,7 @@ SC.detectBrowser = function (userAgent, language) {
|
|
277
277
|
@name SC.browser.os
|
278
278
|
@type SC.OS|SC.BROWSER.unknown
|
279
279
|
*/
|
280
|
-
browser.os =
|
280
|
+
browser.os = os;
|
281
281
|
|
282
282
|
/**
|
283
283
|
@name SC.browser.osVersion
|
@@ -445,6 +445,15 @@ var userAgents = {
|
|
445
445
|
engine: SC.ENGINE.webkit,
|
446
446
|
engineVersion: '533.17.9'
|
447
447
|
},
|
448
|
+
"Mozilla/5.0 (iPad; CPU OS 7_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53": {
|
449
|
+
device: SC.DEVICE.ipad,
|
450
|
+
name: SC.BROWSER.safari,
|
451
|
+
version: '7.0',
|
452
|
+
os: SC.OS.ios,
|
453
|
+
osVersion: '7.0',
|
454
|
+
engine: SC.ENGINE.webkit,
|
455
|
+
engineVersion: '537.51.1'
|
456
|
+
},
|
448
457
|
|
449
458
|
// Android
|
450
459
|
|
@@ -12,7 +12,7 @@ sc_require("panes/pane");
|
|
12
12
|
SC.Pane.reopen({
|
13
13
|
|
14
14
|
/** @private */
|
15
|
-
|
15
|
+
_notifyDidAttach: function () {
|
16
16
|
// hook into root responder
|
17
17
|
var responder = (this.rootResponder = SC.RootResponder.responder);
|
18
18
|
responder.panes.add(this);
|
@@ -39,7 +39,7 @@ SC.Pane.reopen({
|
|
39
39
|
},
|
40
40
|
|
41
41
|
/** @private */
|
42
|
-
|
42
|
+
_notifyWillDetach: function () {
|
43
43
|
sc_super();
|
44
44
|
|
45
45
|
// Legacy.
|
@@ -9,6 +9,12 @@
|
|
9
9
|
SC.mixin(SC.browser,
|
10
10
|
/** @scope SC.browser */ {
|
11
11
|
|
12
|
+
/* @private Internal property for the cache of pre-determined experimental names. */
|
13
|
+
_cachedNames: null,
|
14
|
+
|
15
|
+
/* @private Internal property for the test element used for style testing. */
|
16
|
+
_testEl: null,
|
17
|
+
|
12
18
|
/** @private */
|
13
19
|
_testSupportFor: function (target, propertyName, testValue) {
|
14
20
|
/*jshint eqnull:true*/
|
@@ -627,11 +627,8 @@ SC.RootResponder = SC.Object.extend(
|
|
627
627
|
@returns {void}
|
628
628
|
*/
|
629
629
|
setup: function () {
|
630
|
-
// handle touch events
|
631
|
-
this.listenFor(['touchstart', 'touchmove', 'touchend', 'touchcancel'], document);
|
632
|
-
|
633
630
|
// handle basic events
|
634
|
-
this.listenFor(['keydown', 'keyup', 'beforedeactivate', 'mousedown', 'mouseup', 'click', 'dblclick', 'mousemove', 'selectstart', 'contextmenu'], document)
|
631
|
+
this.listenFor(['touchstart', 'touchmove', 'touchend', 'touchcancel', 'keydown', 'keyup', 'beforedeactivate', 'mousedown', 'mouseup', 'click', 'dblclick', 'mousemove', 'selectstart', 'contextmenu'], document)
|
635
632
|
.listenFor(['resize'], window);
|
636
633
|
|
637
634
|
if (SC.browser.isIE8OrLower) this.listenFor(['focusin', 'focusout'], document);
|
@@ -1272,7 +1269,6 @@ SC.RootResponder = SC.Object.extend(
|
|
1272
1269
|
// As a workaround just let the browser to use the default behavior.
|
1273
1270
|
if (this.ignoreTouchHandle(evt)) return YES;
|
1274
1271
|
|
1275
|
-
|
1276
1272
|
var hidingTouchIntercept = NO;
|
1277
1273
|
|
1278
1274
|
SC.run(function () {
|
@@ -1772,17 +1768,11 @@ SC.RootResponder = SC.Object.extend(
|
|
1772
1768
|
//
|
1773
1769
|
|
1774
1770
|
mousedown: function (evt) {
|
1775
|
-
if (SC.platform.touch) {
|
1776
|
-
evt.allowDefault();
|
1777
|
-
this._lastMouseDownCustomHandling = YES;
|
1778
|
-
return YES;
|
1779
|
-
}
|
1780
|
-
|
1781
1771
|
// First, save the click count. The click count resets if the mouse down
|
1782
1772
|
// event occurs more than 250 ms later than the mouse up event or more
|
1783
|
-
// than 8 pixels away from the mouse down event.
|
1773
|
+
// than 8 pixels away from the mouse down event or if the button used is different.
|
1784
1774
|
this._clickCount += 1;
|
1785
|
-
if (!this._lastMouseUpAt || ((Date.now() - this._lastMouseUpAt) > 250)) {
|
1775
|
+
if (!this._lastMouseUpAt || this._lastClickWhich !== evt.which || ((Date.now() - this._lastMouseUpAt) > 250)) {
|
1786
1776
|
this._clickCount = 1;
|
1787
1777
|
} else {
|
1788
1778
|
var deltaX = this._lastMouseDownX - evt.clientX,
|
@@ -1793,6 +1783,7 @@ SC.RootResponder = SC.Object.extend(
|
|
1793
1783
|
}
|
1794
1784
|
evt.clickCount = this._clickCount;
|
1795
1785
|
|
1786
|
+
this._lastClickWhich = evt.which;
|
1796
1787
|
this._lastMouseDownX = evt.clientX;
|
1797
1788
|
this._lastMouseDownY = evt.clientY;
|
1798
1789
|
|
@@ -1822,12 +1813,6 @@ SC.RootResponder = SC.Object.extend(
|
|
1822
1813
|
dragView = this._drag,
|
1823
1814
|
handler = null;
|
1824
1815
|
|
1825
|
-
if (SC.platform.touch) {
|
1826
|
-
evt.allowDefault();
|
1827
|
-
this._lastMouseUpCustomHandling = YES;
|
1828
|
-
return YES;
|
1829
|
-
}
|
1830
|
-
|
1831
1816
|
if (dragView) {
|
1832
1817
|
SC.run(function () {
|
1833
1818
|
dragView.tryToPerform('mouseUp', evt);
|
@@ -1937,10 +1922,6 @@ SC.RootResponder = SC.Object.extend(
|
|
1937
1922
|
trigger calls to mouseDragged.
|
1938
1923
|
*/
|
1939
1924
|
mousemove: function (evt) {
|
1940
|
-
if (SC.platform.touch) {
|
1941
|
-
evt.allowDefault();
|
1942
|
-
return YES;
|
1943
|
-
}
|
1944
1925
|
|
1945
1926
|
if (SC.browser.isIE) {
|
1946
1927
|
if (this._lastMoveX === evt.clientX && this._lastMoveY === evt.clientY) return;
|
@@ -2051,54 +2032,35 @@ SC.RootResponder = SC.Object.extend(
|
|
2051
2032
|
// ..........................................................
|
2052
2033
|
// ANIMATION HANDLING
|
2053
2034
|
//
|
2035
|
+
|
2036
|
+
/* @private Handler for animationstart events. */
|
2054
2037
|
animationstart: function (evt) {
|
2055
|
-
var view;
|
2056
|
-
|
2057
|
-
view = this.targetViewForEvent(evt);
|
2058
|
-
this.sendEvent('animationDidStart', evt, view);
|
2059
|
-
} catch (e) {
|
2060
|
-
SC.Logger.warn('Exception during animationDidStart: %@'.fmt(e));
|
2061
|
-
throw e;
|
2062
|
-
}
|
2038
|
+
var view = this.targetViewForEvent(evt);
|
2039
|
+
this.sendEvent('animationDidStart', evt, view);
|
2063
2040
|
|
2064
2041
|
return view ? evt.hasCustomEventHandling : YES;
|
2065
2042
|
},
|
2066
2043
|
|
2044
|
+
/* @private Handler for animationiteration events. */
|
2067
2045
|
animationiteration: function (evt) {
|
2068
|
-
var view;
|
2069
|
-
|
2070
|
-
view = this.targetViewForEvent(evt);
|
2071
|
-
this.sendEvent('animationDidIterate', evt, view);
|
2072
|
-
} catch (e) {
|
2073
|
-
SC.Logger.warn('Exception during animationDidIterate: %@'.fmt(e));
|
2074
|
-
throw e;
|
2075
|
-
}
|
2046
|
+
var view = this.targetViewForEvent(evt);
|
2047
|
+
this.sendEvent('animationDidIterate', evt, view);
|
2076
2048
|
|
2077
2049
|
return view ? evt.hasCustomEventHandling : YES;
|
2078
2050
|
},
|
2079
2051
|
|
2052
|
+
/* @private Handler for animationend events. */
|
2080
2053
|
animationend: function (evt) {
|
2081
|
-
var view;
|
2082
|
-
|
2083
|
-
view = this.targetViewForEvent(evt);
|
2084
|
-
this.sendEvent('animationDidEnd', evt, view);
|
2085
|
-
} catch (e) {
|
2086
|
-
SC.Logger.warn('Exception during animationDidEnd: %@'.fmt(e));
|
2087
|
-
throw e;
|
2088
|
-
}
|
2054
|
+
var view = this.targetViewForEvent(evt);
|
2055
|
+
this.sendEvent('animationDidEnd', evt, view);
|
2089
2056
|
|
2090
2057
|
return view ? evt.hasCustomEventHandling : YES;
|
2091
2058
|
},
|
2092
2059
|
|
2060
|
+
/* @private Handler for transitionend events. */
|
2093
2061
|
transitionend: function (evt) {
|
2094
|
-
var view;
|
2095
|
-
|
2096
|
-
view = this.targetViewForEvent(evt);
|
2097
|
-
this.sendEvent('transitionDidEnd', evt, view);
|
2098
|
-
} catch (e) {
|
2099
|
-
SC.Logger.warn('Exception during transitionDidEnd: %@'.fmt(e));
|
2100
|
-
throw e;
|
2101
|
-
}
|
2062
|
+
var view = this.targetViewForEvent(evt);
|
2063
|
+
this.sendEvent('transitionDidEnd', evt, view);
|
2102
2064
|
|
2103
2065
|
return view ? evt.hasCustomEventHandling : YES;
|
2104
2066
|
}
|
@@ -64,6 +64,63 @@ if (SC.platform.supportsCSSTransitions) {
|
|
64
64
|
}, 5);
|
65
65
|
});
|
66
66
|
|
67
|
+
test("animate + adjust: no conflict", function () {
|
68
|
+
stop(1000);
|
69
|
+
|
70
|
+
SC.run(function () {
|
71
|
+
view.animate('left', 100, { duration: 0.1 });
|
72
|
+
view.adjust('top', 100);
|
73
|
+
view.adjust({ 'width': null, 'right': 100 });
|
74
|
+
});
|
75
|
+
|
76
|
+
setTimeout(function () {
|
77
|
+
equals(view.get('layout').left, 100, 'left is');
|
78
|
+
equals(view.get('layout').top, 100, 'top is');
|
79
|
+
equals(view.get('layout').right, 100, 'right is');
|
80
|
+
equals(view.get('layout').width, undefined, 'width is');
|
81
|
+
|
82
|
+
SC.run(function () {
|
83
|
+
view.animate('top', 200, { duration: 0.1 });
|
84
|
+
view.adjust('left', 0);
|
85
|
+
view.adjust({ 'width': 100, 'right': null });
|
86
|
+
});
|
87
|
+
|
88
|
+
setTimeout(function () {
|
89
|
+
equals(view.get('layout').left, 0, 'left is');
|
90
|
+
equals(view.get('layout').top, 200, 'top is');
|
91
|
+
equals(view.get('layout').right, undefined, 'right is');
|
92
|
+
equals(view.get('layout').width, 100, 'width is');
|
93
|
+
|
94
|
+
start();
|
95
|
+
}, 200);
|
96
|
+
}, 200);
|
97
|
+
});
|
98
|
+
|
99
|
+
test("animate + adjust: conflict", function () {
|
100
|
+
stop(1000);
|
101
|
+
|
102
|
+
SC.run(function () {
|
103
|
+
view.animate('left', 100, { duration: 0.1 });
|
104
|
+
view.adjust('left', 200);
|
105
|
+
});
|
106
|
+
|
107
|
+
setTimeout(function () {
|
108
|
+
equals(view.get('layout').left, 200, 'left is');
|
109
|
+
|
110
|
+
SC.run(function () {
|
111
|
+
view.animate('top', 200, { duration: 0.1 });
|
112
|
+
// Adjust back to current value should still cancel the animation.
|
113
|
+
view.adjust('top', 0);
|
114
|
+
});
|
115
|
+
|
116
|
+
setTimeout(function () {
|
117
|
+
equals(view.get('layout').top, 0, 'top is');
|
118
|
+
|
119
|
+
start();
|
120
|
+
}, 200);
|
121
|
+
}, 200);
|
122
|
+
});
|
123
|
+
|
67
124
|
test("callbacks work in general", function () {
|
68
125
|
stop(2000);
|
69
126
|
|
@@ -95,3 +95,27 @@ test("a view with visibility can have a child view without visibility", function
|
|
95
95
|
|
96
96
|
ok(!errored, "Inserting a pane containing a child with visibility that itself has a child without visibility does not cause an error");
|
97
97
|
});
|
98
|
+
|
99
|
+
// Test for issue #1093.
|
100
|
+
test("a view whose pane is removed during an isVisible transition gets correctly hidden", function() {
|
101
|
+
SC.RunLoop.begin();
|
102
|
+
var pane = SC.Pane.create({
|
103
|
+
childViews: ['childView'],
|
104
|
+
childView: SC.View.extend({
|
105
|
+
transitionHide: { run: function (view) {
|
106
|
+
view.animate('opacity', 0, 0.4, function () { this.didTransitionOut(); });
|
107
|
+
}}
|
108
|
+
})
|
109
|
+
});
|
110
|
+
pane.append();
|
111
|
+
pane.childView.set('isVisible', NO);
|
112
|
+
equals(pane.childView.get('viewState'), SC.CoreView.ATTACHED_HIDING, 'View is transitioning');
|
113
|
+
pane.remove();
|
114
|
+
SC.RunLoop.end();
|
115
|
+
SC.RunLoop.begin();
|
116
|
+
pane.append();
|
117
|
+
ok(pane.childView.$().hasClass('sc-hidden'), 'View was successfully hidden.')
|
118
|
+
pane.remove();
|
119
|
+
pane.destroy();
|
120
|
+
SC.RunLoop.end();
|
121
|
+
});
|
data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/view_states_test.js
CHANGED
@@ -46,6 +46,10 @@ test("Test unrendered state.", function () {
|
|
46
46
|
// _doUpdateLayout()
|
47
47
|
|
48
48
|
// UNHANDLED ACTIONS
|
49
|
+
handled = view._doShow();
|
50
|
+
ok(!handled, "Calling _doShow() should not be handled");
|
51
|
+
equals(view.viewState, SC.CoreView.UNRENDERED, "Calling _doShow() doesn't change state");
|
52
|
+
|
49
53
|
handled = view._doAttach(document.body);
|
50
54
|
ok(!handled, "Calling _doAttach(document.body) should not be handled");
|
51
55
|
equals(view.viewState, SC.CoreView.UNRENDERED, "Calling _doAttach(document.body) doesn't change state");
|
@@ -58,7 +62,9 @@ test("Test unrendered state.", function () {
|
|
58
62
|
ok(!handled, "Calling _doDetach() should not be handled");
|
59
63
|
equals(view.viewState, SC.CoreView.UNRENDERED, "Calling _doDetach() doesn't change state");
|
60
64
|
|
61
|
-
|
65
|
+
SC.run(function () {
|
66
|
+
handled = view._doHide();
|
67
|
+
});
|
62
68
|
ok(!handled, "Calling _doHide() should not be handled");
|
63
69
|
equals(view.viewState, SC.CoreView.UNRENDERED, "Calling _doHide() doesn't change state");
|
64
70
|
|
@@ -73,10 +79,6 @@ test("Test unrendered state.", function () {
|
|
73
79
|
|
74
80
|
// HANDLED ACTIONS
|
75
81
|
|
76
|
-
handled = view._doShow();
|
77
|
-
ok(handled, "Calling _doShow() should be handled");
|
78
|
-
equals(view.viewState, SC.CoreView.UNRENDERED, "Calling _doShow() doesn't change state");
|
79
|
-
|
80
82
|
handled = view._doRender();
|
81
83
|
ok(handled, "Calling _doRender() should be handled");
|
82
84
|
equals(view.viewState, SC.CoreView.UNATTACHED, "Calling _doRender() changes state");
|
@@ -121,7 +123,9 @@ test("Test unattached state.", function () {
|
|
121
123
|
|
122
124
|
// HANDLED ACTIONS
|
123
125
|
|
124
|
-
|
126
|
+
SC.run(function () {
|
127
|
+
handled = view._doHide();
|
128
|
+
});
|
125
129
|
ok(handled, "Calling _doHide() should be handled");
|
126
130
|
equals(view.viewState, SC.CoreView.UNATTACHED, "Calling _doHide() doesn't change state");
|
127
131
|
|
@@ -233,7 +237,9 @@ test("Test attached_shown state.", function () {
|
|
233
237
|
view._doRender();
|
234
238
|
view._doAttach(document.body);
|
235
239
|
|
236
|
-
|
240
|
+
SC.run(function () {
|
241
|
+
handled = view._doHide();
|
242
|
+
});
|
237
243
|
ok(handled, "Calling _doHide() should be handled");
|
238
244
|
equals(view.viewState, SC.CoreView.ATTACHED_HIDDEN, "Calling _doHide() changes state");
|
239
245
|
|
@@ -267,7 +273,7 @@ test("Calling destroy layer, clears the layer from all child views.", function
|
|
267
273
|
module("SC.View Adoption", {
|
268
274
|
|
269
275
|
setup: function () {
|
270
|
-
parentView = SC.
|
276
|
+
parentView = SC.Pane.create();
|
271
277
|
},
|
272
278
|
|
273
279
|
teardown: function () {
|
@@ -364,7 +370,9 @@ test("Test showing and hiding parentView updates child views.", function () {
|
|
364
370
|
ok(view.get('isVisibleInWindow'), "isVisibleInWindow should be true");
|
365
371
|
|
366
372
|
// Hide the parentView.
|
367
|
-
|
373
|
+
SC.run(function () {
|
374
|
+
parentView._doHide();
|
375
|
+
});
|
368
376
|
equals(parentView.viewState, SC.CoreView.ATTACHED_HIDDEN, "A hidden parentView that is attached should be in the state");
|
369
377
|
equals(view.viewState, SC.CoreView.ATTACHED_HIDDEN_BY_PARENT, "A child view of attached_hidden parentView should be in the state");
|
370
378
|
equals(child.viewState, SC.CoreView.ATTACHED_HIDDEN_BY_PARENT, "A child view of attached_hidden parentView's child view should be in the state");
|
@@ -375,13 +383,18 @@ test("Test showing and hiding parentView updates child views.", function () {
|
|
375
383
|
ok(handled, "Calling _doShow() on parentView should be handled");
|
376
384
|
equals(view.viewState, SC.CoreView.ATTACHED_SHOWN, "Calling _doShow() on parentView changes state on view.");
|
377
385
|
equals(child.viewState, SC.CoreView.ATTACHED_SHOWN, "Calling _doShow() on parentView changes state on child");
|
378
|
-
|
386
|
+
|
387
|
+
SC.run(function () {
|
388
|
+
handled = view._doHide();
|
389
|
+
});
|
379
390
|
ok(handled, "Calling _doHide() should be handled");
|
380
391
|
equals(view.viewState, SC.CoreView.ATTACHED_HIDDEN, "Calling _doHide() on view changes state on view");
|
381
392
|
equals(child.viewState, SC.CoreView.ATTACHED_HIDDEN_BY_PARENT, "Calling _doHide() on view changes state on child");
|
382
393
|
|
383
394
|
// Reset
|
384
|
-
|
395
|
+
SC.run(function () {
|
396
|
+
parentView._doHide();
|
397
|
+
});
|
385
398
|
view.destroy();
|
386
399
|
child = SC.View.create();
|
387
400
|
view = SC.View.create({ childViews: [child] });
|
@@ -423,11 +436,16 @@ test("Test hiding with transitionHide", function () {
|
|
423
436
|
|
424
437
|
// Hide the parentView with transitionHide
|
425
438
|
parentView.set('transitionHide', transitionHide);
|
426
|
-
|
439
|
+
SC.run(function () {
|
440
|
+
parentView._doHide();
|
441
|
+
});
|
427
442
|
ok(parentView.get('isVisibleInWindow'), "isVisibleInWindow of parentView should be false");
|
428
443
|
ok(view.get('isVisibleInWindow'), "isVisibleInWindow should be true");
|
429
444
|
ok(child.get('isVisibleInWindow'), "isVisibleInWindow of child should be true");
|
430
|
-
|
445
|
+
|
446
|
+
SC.run(function () {
|
447
|
+
parentView.didTransitionOut();
|
448
|
+
});
|
431
449
|
ok(!parentView.get('isVisibleInWindow'), "isVisibleInWindow of parentView should be false after didTransitionOut");
|
432
450
|
ok(!view.get('isVisibleInWindow'), "isVisibleInWindow should be false after didTransitionOut");
|
433
451
|
ok(!child.get('isVisibleInWindow'), "isVisibleInWindow of child should be false after didTransitionOut");
|