sc-frank-cucumber 1.2.1.00af28c → 1.2.1.b7791c5.debug
Sign up to get free protection for your applications and to get access to all the features.
- data/frank-skeleton/frank_static_resources.bundle/bundle/ViewAttributeMapping.plist +63 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/ViewAttributeMappingMac.plist +99 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/ViewAttributeMapping.plist +63 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/ViewAttributeMappingMac.plist +99 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/images/ajax-loader.gif +0 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/images/file.gif +0 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/images/folder-closed.gif +0 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/images/folder.gif +0 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/images/loader.gif +0 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/images/loader.png +0 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/images/minus.gif +0 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/images/plus.gif +0 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/images/treeview-black-line.gif +0 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/images/treeview-black.gif +0 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/images/treeview-default-line.gif +0 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/images/treeview-default.gif +0 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/images/treeview-famfamfam-line.gif +0 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/images/treeview-famfamfam.gif +0 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/images/treeview-gray-line.gif +0 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/images/treeview-gray.gif +0 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/images/treeview-red-line.gif +0 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/images/treeview-red.gif +0 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/index.html +86 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/index.html.haml +76 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/js/accessible_views_view.coffee +41 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/js/accessible_views_view.js +46 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/js/controller.coffee +134 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/js/controller.js +139 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/js/details_view.coffee +42 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/js/details_view.js +51 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/js/dropdown_control.coffee +64 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/js/dropdown_control.js +73 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/js/ersatz_model.coffee +46 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/js/ersatz_model.js +60 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/js/ersatz_view.coffee +167 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/js/ersatz_view.js +205 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/js/experiment_bar_model.coffee +10 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/js/experiment_bar_model.js +17 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/js/experiment_bar_view.coffee +44 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/js/experiment_bar_view.js +63 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/js/frank.coffee +96 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/js/frank.js +146 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/js/lib/backbone.js +1431 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/js/lib/coffee-script.js +8 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/js/lib/jquery-ui.min.js +405 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/js/lib/jquery.min.js +4 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/js/lib/jquery.treeview.js +251 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/js/lib/json2.js +481 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/js/lib/raphael.js +5815 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/js/lib/require.js +2053 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/js/lib/underscore.js +1059 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/js/main.coffee +27 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/js/main.js +29 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/js/tabs_controller.coffee +13 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/js/tabs_controller.js +22 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/js/toast_controller.coffee +15 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/js/toast_controller.js +28 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/js/transform_stack.coffee +59 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/js/transform_stack.js +78 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/js/tree_view.coffee +53 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/js/tree_view.js +64 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/js/view_hier_model.coffee +37 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/js/view_hier_model.js +48 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/js/view_model.coffee +39 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/js/view_model.js +62 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/pictos/index.html +329 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/pictos/pictos-web.eot +0 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/pictos/pictos-web.svg +114 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/pictos/pictos-web.ttf +0 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/pictos/pictos-web.woff +0 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/pictos/pictos.css +20 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/pictos/pictos_base64.css +18 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/stylesheets/css/symbiote.css +1 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/stylesheets/sass/_elements.scss +28 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/stylesheets/sass/_header.scss +61 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/stylesheets/sass/_inspect_tabs_list_tabs.scss +194 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/stylesheets/sass/_jquery.treeview.scss +68 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/stylesheets/sass/_jqui.scss +2 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/stylesheets/sass/_layout.scss +13 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/stylesheets/sass/_mixins.sass +137 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/stylesheets/sass/_reset.scss +32 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/stylesheets/sass/_selector_test_toolbar.scss +81 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/stylesheets/sass/_solarized.scss +16 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/stylesheets/sass/_typography.scss +11 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/stylesheets/sass/_unicode.scss +3 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/stylesheets/sass/_z_index.scss +2 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/bundle/stylesheets/sass/symbiote.scss +26 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/images/ajax-loader.gif +0 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/images/file.gif +0 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/images/folder-closed.gif +0 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/images/folder.gif +0 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/images/loader.gif +0 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/images/loader.png +0 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/images/minus.gif +0 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/images/plus.gif +0 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/images/treeview-black-line.gif +0 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/images/treeview-black.gif +0 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/images/treeview-default-line.gif +0 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/images/treeview-default.gif +0 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/images/treeview-famfamfam-line.gif +0 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/images/treeview-famfamfam.gif +0 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/images/treeview-gray-line.gif +0 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/images/treeview-gray.gif +0 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/images/treeview-red-line.gif +0 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/images/treeview-red.gif +0 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/index.html +86 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/index.html.haml +76 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/js/accessible_views_view.coffee +41 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/js/accessible_views_view.js +46 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/js/controller.coffee +134 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/js/controller.js +139 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/js/details_view.coffee +42 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/js/details_view.js +51 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/js/dropdown_control.coffee +64 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/js/dropdown_control.js +73 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/js/ersatz_model.coffee +46 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/js/ersatz_model.js +60 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/js/ersatz_view.coffee +167 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/js/ersatz_view.js +205 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/js/experiment_bar_model.coffee +10 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/js/experiment_bar_model.js +17 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/js/experiment_bar_view.coffee +44 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/js/experiment_bar_view.js +63 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/js/frank.coffee +96 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/js/frank.js +146 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/js/lib/backbone.js +1431 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/js/lib/coffee-script.js +8 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/js/lib/jquery-ui.min.js +405 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/js/lib/jquery.min.js +4 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/js/lib/jquery.treeview.js +251 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/js/lib/json2.js +481 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/js/lib/raphael.js +5815 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/js/lib/require.js +2053 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/js/lib/underscore.js +1059 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/js/main.coffee +27 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/js/main.js +29 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/js/tabs_controller.coffee +13 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/js/tabs_controller.js +22 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/js/toast_controller.coffee +15 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/js/toast_controller.js +28 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/js/transform_stack.coffee +59 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/js/transform_stack.js +78 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/js/tree_view.coffee +53 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/js/tree_view.js +64 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/js/view_hier_model.coffee +37 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/js/view_hier_model.js +48 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/js/view_model.coffee +39 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/js/view_model.js +62 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/pictos/index.html +329 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/pictos/pictos-web.eot +0 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/pictos/pictos-web.svg +114 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/pictos/pictos-web.ttf +0 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/pictos/pictos-web.woff +0 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/pictos/pictos.css +20 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/pictos/pictos_base64.css +18 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/stylesheets/css/symbiote.css +1 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/stylesheets/sass/_elements.scss +28 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/stylesheets/sass/_header.scss +61 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/stylesheets/sass/_inspect_tabs_list_tabs.scss +194 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/stylesheets/sass/_jquery.treeview.scss +68 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/stylesheets/sass/_jqui.scss +2 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/stylesheets/sass/_layout.scss +13 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/stylesheets/sass/_mixins.sass +137 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/stylesheets/sass/_reset.scss +32 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/stylesheets/sass/_selector_test_toolbar.scss +81 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/stylesheets/sass/_solarized.scss +16 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/stylesheets/sass/_typography.scss +11 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/stylesheets/sass/_unicode.scss +3 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/stylesheets/sass/_z_index.scss +2 -0
- data/frank-skeleton/frank_static_resources.bundle/bundle/stylesheets/sass/symbiote.scss +26 -0
- data/frank-skeleton/frank_static_resources.bundle/js/ersatz_view.js +3 -3
- data/frank-skeleton/frank_static_resources.bundle/js/frank.js +1 -1
- data/frank-skeleton/libCocoaAsyncSocket.a +0 -0
- data/frank-skeleton/libCocoaAsyncSocketMac.a +0 -0
- data/frank-skeleton/libCocoaHTTPServer.a +0 -0
- data/frank-skeleton/libCocoaHTTPServerMac.a +0 -0
- data/frank-skeleton/libCocoaLumberjack.a +0 -0
- data/frank-skeleton/libCocoaLumberjackMac.a +0 -0
- data/frank-skeleton/libFrank.a +0 -0
- data/frank-skeleton/libFrankMac.a +0 -0
- data/frank-skeleton/libShelley.a +0 -0
- data/lib/frank-cucumber/frank_helper.rb +27 -0
- data/lib/frank-cucumber/frankifier.rb +7 -4
- data/lib/frank-cucumber/version.rb +1 -1
- metadata +173 -3
@@ -0,0 +1,134 @@
|
|
1
|
+
RELOAD_INTERVAL = 500
|
2
|
+
|
3
|
+
guessAtDeviceFamilyBasedOnViewDump = (viewHier)->
|
4
|
+
switch viewHier.accessibilityFrame.size.height
|
5
|
+
when 1024 then 'ipad'
|
6
|
+
when 480, 568 then 'iphone'
|
7
|
+
else
|
8
|
+
console.warn( "couldn't recognize device family based on screen height of " + viewHeir.accessibilityFrame.size.height + "px" )
|
9
|
+
'unknown'
|
10
|
+
|
11
|
+
define ['frank'],(frank)->
|
12
|
+
|
13
|
+
createController = ({
|
14
|
+
tabsController,
|
15
|
+
toastController,
|
16
|
+
treeView,
|
17
|
+
ersatzView,
|
18
|
+
detailsView,
|
19
|
+
accessibleViewsView,
|
20
|
+
experimentBarModel,
|
21
|
+
$asplodeButton,
|
22
|
+
$reloadButton,
|
23
|
+
$liveButton})->
|
24
|
+
|
25
|
+
treeView.model.on 'active-view-changed', (viewModel)->
|
26
|
+
|
27
|
+
treeView.model.on 'selected-view-changed', (viewModel)->
|
28
|
+
detailsView.updateModel(viewModel)
|
29
|
+
tabsController.selectViewDetailsTab()
|
30
|
+
|
31
|
+
treeView.model.on 'accessible-view-selected', (viewModel)->
|
32
|
+
viewModel.setActive()
|
33
|
+
experimentBarModel.set( selector: viewModel.getShelleySelector() )
|
34
|
+
|
35
|
+
|
36
|
+
reportActionOutcome = (action,numViews)->
|
37
|
+
message = switch numViews
|
38
|
+
when 0 then "Sorry, no views matched that selector so none were #{action}"
|
39
|
+
when 1 then "1 view was #{action}"
|
40
|
+
else "#{numViews} views were #{action}"
|
41
|
+
toastController.showToastMessage(message)
|
42
|
+
|
43
|
+
validateViewSelector = (selector)->
|
44
|
+
if selector.length == 0
|
45
|
+
toastController.showToastMessage("You haven't provided a view selector. Please enter one below.")
|
46
|
+
false
|
47
|
+
else
|
48
|
+
true
|
49
|
+
|
50
|
+
|
51
|
+
experimentBarModel.on 'flash-clicked', (model)->
|
52
|
+
[selector, selectorEngine] = [model.get('selector'), model.get('selectorEngine')]
|
53
|
+
return unless validateViewSelector(selector)
|
54
|
+
frank.sendFlashCommand(
|
55
|
+
selector,
|
56
|
+
selectorEngine
|
57
|
+
).done (data)->
|
58
|
+
reportActionOutcome( "flashed", data.length )
|
59
|
+
|
60
|
+
experimentBarModel.on 'touch-clicked', (model)->
|
61
|
+
[selector, selectorEngine] = [model.get('selector'), model.get('selectorEngine')]
|
62
|
+
return unless validateViewSelector(selector)
|
63
|
+
|
64
|
+
views = frank.sendTouchCommand(
|
65
|
+
selector,
|
66
|
+
selectorEngine
|
67
|
+
).done (data)->
|
68
|
+
reportActionOutcome( "touched", data.length )
|
69
|
+
|
70
|
+
experimentBarModel.on 'highlight-clicked', (model)->
|
71
|
+
[selector, selectorEngine] = [model.get('selector'), model.get('selectorEngine')]
|
72
|
+
return unless validateViewSelector(selector)
|
73
|
+
|
74
|
+
views = frank.getAccessibilityFramesForViewsMatchingSelector(
|
75
|
+
selector,
|
76
|
+
selectorEngine
|
77
|
+
).done (data)->
|
78
|
+
ersatzView.model.highlightSomeFramesForABit( data )
|
79
|
+
reportActionOutcome( "highlighted", data.length )
|
80
|
+
|
81
|
+
$asplodeButton.on 'click', ->
|
82
|
+
isAsploded = ersatzView.model.toggleAsploded()
|
83
|
+
$asplodeButton.toggleClass( 'down', isAsploded )
|
84
|
+
|
85
|
+
$reloadButton.on 'click', ->
|
86
|
+
reload().done ->
|
87
|
+
toastController.showToastMessage('views reloaded')
|
88
|
+
|
89
|
+
liveTimeout = undefined
|
90
|
+
reloadLoop = ->
|
91
|
+
reload()
|
92
|
+
liveTimeout = window.setTimeout( reloadLoop, RELOAD_INTERVAL )
|
93
|
+
|
94
|
+
$liveButton.on 'click', ->
|
95
|
+
window.clearTimeout(liveTimeout) if liveTimeout?
|
96
|
+
|
97
|
+
if $liveButton.hasClass('down')
|
98
|
+
toastController.showToastMessage('leaving live mode')
|
99
|
+
$liveButton.removeClass('down')
|
100
|
+
else
|
101
|
+
reloadLoop()
|
102
|
+
toastController.showToastMessage('entering live mode')
|
103
|
+
$liveButton.addClass('down')
|
104
|
+
|
105
|
+
reload = ->
|
106
|
+
deferable = $.Deferred()
|
107
|
+
$.when( frank.fetchViewHierarchy(), frank.fetchOrientation() ).done( ([rawHier,],orientation)->
|
108
|
+
deviceFamily = guessAtDeviceFamilyBasedOnViewDump(rawHier)
|
109
|
+
|
110
|
+
treeView.model.resetViewHier(rawHier)
|
111
|
+
ersatzView.model.resetViews(treeView.model.get('allViews'),deviceFamily,orientation)
|
112
|
+
|
113
|
+
accessibleViews = treeView.model.getAccessibleViews()
|
114
|
+
accessibleViewsView.collection.reset( accessibleViews )
|
115
|
+
|
116
|
+
ersatzView.render()
|
117
|
+
deferable.resolve()
|
118
|
+
).fail( (args...)->
|
119
|
+
toastController.showToastMessage('encountered an error while talking to Frank')
|
120
|
+
window.alert( "Ruh roh. Encountered an error while talking to Frank.\nSee the javascript console for all the details" )
|
121
|
+
console.log( "Failed while talking to Frank.", args )
|
122
|
+
)
|
123
|
+
|
124
|
+
deferable.promise()
|
125
|
+
|
126
|
+
boot = ->
|
127
|
+
tabsController.selectLocatorTab()
|
128
|
+
reload()
|
129
|
+
|
130
|
+
{
|
131
|
+
boot: boot
|
132
|
+
}
|
133
|
+
|
134
|
+
createController
|
@@ -0,0 +1,139 @@
|
|
1
|
+
(function() {
|
2
|
+
var RELOAD_INTERVAL,
|
3
|
+
__slice = [].slice;
|
4
|
+
|
5
|
+
RELOAD_INTERVAL = 500;
|
6
|
+
|
7
|
+
define(['frank'], function(frank) {
|
8
|
+
var createController;
|
9
|
+
createController = function(_arg) {
|
10
|
+
var $asplodeButton, $liveButton, $reloadButton, accessibleViewsView, boot, detailsView, ersatzView, experimentBarModel, liveTimeout, reload, reloadLoop, reportActionOutcome, tabsController, toastController, treeView, validateViewSelector;
|
11
|
+
tabsController = _arg.tabsController, toastController = _arg.toastController, treeView = _arg.treeView, ersatzView = _arg.ersatzView, detailsView = _arg.detailsView, accessibleViewsView = _arg.accessibleViewsView, experimentBarModel = _arg.experimentBarModel, $asplodeButton = _arg.$asplodeButton, $reloadButton = _arg.$reloadButton, $liveButton = _arg.$liveButton;
|
12
|
+
treeView.model.on('active-view-changed', function(viewModel) {});
|
13
|
+
treeView.model.on('selected-view-changed', function(viewModel) {
|
14
|
+
detailsView.updateModel(viewModel);
|
15
|
+
return tabsController.selectViewDetailsTab();
|
16
|
+
});
|
17
|
+
treeView.model.on('accessible-view-selected', function(viewModel) {
|
18
|
+
viewModel.setActive();
|
19
|
+
return experimentBarModel.set({
|
20
|
+
selector: viewModel.getShelleySelector()
|
21
|
+
});
|
22
|
+
});
|
23
|
+
reportActionOutcome = function(action, numViews) {
|
24
|
+
var message;
|
25
|
+
message = (function() {
|
26
|
+
switch (numViews) {
|
27
|
+
case 0:
|
28
|
+
return "Sorry, no views matched that selector so none were " + action;
|
29
|
+
case 1:
|
30
|
+
return "1 view was " + action;
|
31
|
+
default:
|
32
|
+
return "" + numViews + " views were " + action;
|
33
|
+
}
|
34
|
+
})();
|
35
|
+
return toastController.showToastMessage(message);
|
36
|
+
};
|
37
|
+
validateViewSelector = function(selector) {
|
38
|
+
if (selector.length === 0) {
|
39
|
+
toastController.showToastMessage("You haven't provided a view selector. Please enter one below.");
|
40
|
+
return false;
|
41
|
+
} else {
|
42
|
+
return true;
|
43
|
+
}
|
44
|
+
};
|
45
|
+
experimentBarModel.on('flash-clicked', function(model) {
|
46
|
+
var selector, selectorEngine, _ref;
|
47
|
+
_ref = [model.get('selector'), model.get('selectorEngine')], selector = _ref[0], selectorEngine = _ref[1];
|
48
|
+
if (!validateViewSelector(selector)) {
|
49
|
+
return;
|
50
|
+
}
|
51
|
+
return frank.sendFlashCommand(selector, selectorEngine).done(function(data) {
|
52
|
+
return reportActionOutcome("flashed", data.length);
|
53
|
+
});
|
54
|
+
});
|
55
|
+
experimentBarModel.on('touch-clicked', function(model) {
|
56
|
+
var selector, selectorEngine, views, _ref;
|
57
|
+
_ref = [model.get('selector'), model.get('selectorEngine')], selector = _ref[0], selectorEngine = _ref[1];
|
58
|
+
if (!validateViewSelector(selector)) {
|
59
|
+
return;
|
60
|
+
}
|
61
|
+
return views = frank.sendTouchCommand(selector, selectorEngine).done(function(data) {
|
62
|
+
return reportActionOutcome("touched", data.length);
|
63
|
+
});
|
64
|
+
});
|
65
|
+
experimentBarModel.on('highlight-clicked', function(model) {
|
66
|
+
var selector, selectorEngine, views, _ref;
|
67
|
+
_ref = [model.get('selector'), model.get('selectorEngine')], selector = _ref[0], selectorEngine = _ref[1];
|
68
|
+
if (!validateViewSelector(selector)) {
|
69
|
+
return;
|
70
|
+
}
|
71
|
+
return views = frank.getAccessibilityFramesForViewsMatchingSelector(selector, selectorEngine).done(function(data) {
|
72
|
+
ersatzView.model.highlightSomeFramesForABit(data);
|
73
|
+
return reportActionOutcome("highlighted", data.length);
|
74
|
+
});
|
75
|
+
});
|
76
|
+
$asplodeButton.on('click', function() {
|
77
|
+
var isAsploded;
|
78
|
+
isAsploded = ersatzView.model.toggleAsploded();
|
79
|
+
return $asplodeButton.toggleClass('down', isAsploded);
|
80
|
+
});
|
81
|
+
$reloadButton.on('click', function() {
|
82
|
+
return reload().done(function() {
|
83
|
+
return toastController.showToastMessage('views reloaded');
|
84
|
+
});
|
85
|
+
});
|
86
|
+
liveTimeout = void 0;
|
87
|
+
reloadLoop = function() {
|
88
|
+
reload();
|
89
|
+
return liveTimeout = window.setTimeout(reloadLoop, RELOAD_INTERVAL);
|
90
|
+
};
|
91
|
+
$liveButton.on('click', function() {
|
92
|
+
if (liveTimeout != null) {
|
93
|
+
window.clearTimeout(liveTimeout);
|
94
|
+
}
|
95
|
+
if ($liveButton.hasClass('down')) {
|
96
|
+
toastController.showToastMessage('leaving live mode');
|
97
|
+
return $liveButton.removeClass('down');
|
98
|
+
} else {
|
99
|
+
reloadLoop();
|
100
|
+
toastController.showToastMessage('entering live mode');
|
101
|
+
return $liveButton.addClass('down');
|
102
|
+
}
|
103
|
+
});
|
104
|
+
reload = function() {
|
105
|
+
var deferable;
|
106
|
+
deferable = $.Deferred();
|
107
|
+
$.when(frank.fetchViewHierarchy(), frank.fetchResolution(), frank.fetchOrientation(), frank.fetchDevice()).done(function(_arg1, resolution, orientation, deviceFamily) {
|
108
|
+
var accessibleViews, rawHier;
|
109
|
+
rawHier = _arg1[0];
|
110
|
+
if (deviceFamily == 'mac') {
|
111
|
+
$liveButton.hide();
|
112
|
+
}
|
113
|
+
treeView.model.resetViewHier(rawHier);
|
114
|
+
ersatzView.model.resetViews(treeView.model.get('allViews'), resolution, deviceFamily, orientation);
|
115
|
+
accessibleViews = treeView.model.getAccessibleViews();
|
116
|
+
accessibleViewsView.collection.reset(accessibleViews);
|
117
|
+
ersatzView.render();
|
118
|
+
return deferable.resolve();
|
119
|
+
}).fail(function() {
|
120
|
+
var args;
|
121
|
+
args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
|
122
|
+
toastController.showToastMessage('encountered an error while talking to Frank');
|
123
|
+
window.alert("Ruh roh. Encountered an error while talking to Frank.\nSee the javascript console for all the details");
|
124
|
+
return console.log("Failed while talking to Frank.", args);
|
125
|
+
});
|
126
|
+
return deferable.promise();
|
127
|
+
};
|
128
|
+
boot = function() {
|
129
|
+
tabsController.selectLocatorTab();
|
130
|
+
return reload();
|
131
|
+
};
|
132
|
+
return {
|
133
|
+
boot: boot
|
134
|
+
};
|
135
|
+
};
|
136
|
+
return createController;
|
137
|
+
});
|
138
|
+
|
139
|
+
}).call(this);
|
@@ -0,0 +1,42 @@
|
|
1
|
+
INTERESTING_PROPERTIES = ['class', 'accessibilityLabel', 'tag', 'alpha', 'isHidden']
|
2
|
+
IRREGULAR_PROPERTIES = INTERESTING_PROPERTIES.concat( 'parent', 'subviews', 'children' )
|
3
|
+
|
4
|
+
renderListItem = ( propertyName, propertyValue, cssClass )->
|
5
|
+
propertyValue ?= 'null'
|
6
|
+
|
7
|
+
if _.isObject( propertyValue )
|
8
|
+
propertyValue = JSON.stringify(propertyValue)
|
9
|
+
|
10
|
+
$("<li>").addClass(cssClass)
|
11
|
+
.append(
|
12
|
+
$('<div/>').addClass('key').text(propertyName),
|
13
|
+
$('<div/>').addClass('value').text(propertyValue)
|
14
|
+
)
|
15
|
+
|
16
|
+
define ->
|
17
|
+
DetailsView = Backbone.View.extend
|
18
|
+
el: $('#dom-detail')
|
19
|
+
|
20
|
+
updateModel: (model)->
|
21
|
+
@model = model
|
22
|
+
@refresh()
|
23
|
+
|
24
|
+
refresh: ->
|
25
|
+
$ul = $('<ul>')
|
26
|
+
|
27
|
+
for prop in INTERESTING_PROPERTIES
|
28
|
+
if @model.has(prop)
|
29
|
+
val = @model.get(prop)
|
30
|
+
$ul.append( renderListItem( prop, val, 'interesting' ) )
|
31
|
+
|
32
|
+
for prop in _.keys(@model.attributes).sort()
|
33
|
+
continue if _.contains( IRREGULAR_PROPERTIES, prop )
|
34
|
+
|
35
|
+
val = @model.get(prop)
|
36
|
+
$ul.append( renderListItem( prop, val ) )
|
37
|
+
|
38
|
+
@$el.empty().append($ul)
|
39
|
+
|
40
|
+
|
41
|
+
|
42
|
+
DetailsView
|
@@ -0,0 +1,51 @@
|
|
1
|
+
(function() {
|
2
|
+
var INTERESTING_PROPERTIES, IRREGULAR_PROPERTIES, renderListItem;
|
3
|
+
|
4
|
+
INTERESTING_PROPERTIES = ['class', 'accessibilityLabel', 'tag', 'alpha', 'isHidden'];
|
5
|
+
|
6
|
+
IRREGULAR_PROPERTIES = INTERESTING_PROPERTIES.concat('parent', 'subviews', 'children');
|
7
|
+
|
8
|
+
renderListItem = function(propertyName, propertyValue, cssClass) {
|
9
|
+
if (propertyValue == null) {
|
10
|
+
propertyValue = 'null';
|
11
|
+
}
|
12
|
+
if (_.isObject(propertyValue)) {
|
13
|
+
propertyValue = JSON.stringify(propertyValue);
|
14
|
+
}
|
15
|
+
return $("<li>").addClass(cssClass).append($('<div/>').addClass('key').text(propertyName), $('<div/>').addClass('value').text(propertyValue));
|
16
|
+
};
|
17
|
+
|
18
|
+
define(function() {
|
19
|
+
var DetailsView;
|
20
|
+
DetailsView = Backbone.View.extend({
|
21
|
+
el: $('#dom-detail'),
|
22
|
+
updateModel: function(model) {
|
23
|
+
this.model = model;
|
24
|
+
return this.refresh();
|
25
|
+
},
|
26
|
+
refresh: function() {
|
27
|
+
var $ul, prop, val, _i, _j, _len, _len1, _ref;
|
28
|
+
$ul = $('<ul>');
|
29
|
+
for (_i = 0, _len = INTERESTING_PROPERTIES.length; _i < _len; _i++) {
|
30
|
+
prop = INTERESTING_PROPERTIES[_i];
|
31
|
+
if (this.model.has(prop)) {
|
32
|
+
val = this.model.get(prop);
|
33
|
+
$ul.append(renderListItem(prop, val, 'interesting'));
|
34
|
+
}
|
35
|
+
}
|
36
|
+
_ref = _.keys(this.model.attributes).sort();
|
37
|
+
for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) {
|
38
|
+
prop = _ref[_j];
|
39
|
+
if (_.contains(IRREGULAR_PROPERTIES, prop)) {
|
40
|
+
continue;
|
41
|
+
}
|
42
|
+
val = this.model.get(prop);
|
43
|
+
$ul.append(renderListItem(prop, val));
|
44
|
+
}
|
45
|
+
return this.$el.empty().append($ul);
|
46
|
+
}
|
47
|
+
});
|
48
|
+
return DetailsView;
|
49
|
+
});
|
50
|
+
|
51
|
+
}).call(this);
|
@@ -0,0 +1,64 @@
|
|
1
|
+
define ->
|
2
|
+
|
3
|
+
DropdownModel = Backbone.Model.extend
|
4
|
+
select: ->
|
5
|
+
@collection.each (model) =>
|
6
|
+
model.set( 'selected', model == @ )
|
7
|
+
@trigger('option-clicked',@)
|
8
|
+
|
9
|
+
DropdownCollection = Backbone.Collection.extend
|
10
|
+
model: DropdownModel
|
11
|
+
|
12
|
+
DropdownView = Backbone.View.extend
|
13
|
+
tagName: 'div'
|
14
|
+
className: 'dropdown'
|
15
|
+
|
16
|
+
events:
|
17
|
+
"click .drop-indicator": 'clickedDrop'
|
18
|
+
"click .button": 'clickedItem'
|
19
|
+
|
20
|
+
initialize: ->
|
21
|
+
@collection = new DropdownCollection()
|
22
|
+
@collection.on 'all', _.bind(@render,@)
|
23
|
+
|
24
|
+
# hackery :(
|
25
|
+
$('body').on 'click', _.bind(@clickedOutsideDropdown,@)
|
26
|
+
|
27
|
+
selectedModel: ->
|
28
|
+
selected = @collection.find (m)-> m.get('selected')
|
29
|
+
selected || @collection.at(0)
|
30
|
+
unselectedModels: ->
|
31
|
+
_(@collection.reject (m)-> m.get('selected'))
|
32
|
+
|
33
|
+
createButtonFor: (model)->
|
34
|
+
$("""<button>#{model.get('text')}</button>""")
|
35
|
+
.on 'click', => @clickedItem(model)
|
36
|
+
|
37
|
+
render: ->
|
38
|
+
@$el
|
39
|
+
.empty()
|
40
|
+
.append( @createButtonFor(@selectedModel()) )
|
41
|
+
.append( $ul = $("<ul>") )
|
42
|
+
|
43
|
+
@unselectedModels().each (model)=>
|
44
|
+
$ul.append( @createButtonFor(model) )
|
45
|
+
|
46
|
+
@$el.append( """<div class="drop-indicator">v</div>""" )
|
47
|
+
|
48
|
+
clickedDrop: (e)->
|
49
|
+
e.stopPropagation() #prevent clickedOutsideDropdown from firing
|
50
|
+
@$('ul').toggleClass('shown')
|
51
|
+
|
52
|
+
clickedOutsideDropdown: ->
|
53
|
+
@$('ul').removeClass('shown')
|
54
|
+
|
55
|
+
clickedItem: (model)->
|
56
|
+
model.select()
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
{
|
62
|
+
DropdownModel : DropdownModel
|
63
|
+
DropdownView : DropdownView
|
64
|
+
}
|
@@ -0,0 +1,73 @@
|
|
1
|
+
(function() {
|
2
|
+
|
3
|
+
define(function() {
|
4
|
+
var DropdownCollection, DropdownModel, DropdownView;
|
5
|
+
DropdownModel = Backbone.Model.extend({
|
6
|
+
select: function() {
|
7
|
+
var _this = this;
|
8
|
+
this.collection.each(function(model) {
|
9
|
+
return model.set('selected', model === _this);
|
10
|
+
});
|
11
|
+
return this.trigger('option-clicked', this);
|
12
|
+
}
|
13
|
+
});
|
14
|
+
DropdownCollection = Backbone.Collection.extend({
|
15
|
+
model: DropdownModel
|
16
|
+
});
|
17
|
+
DropdownView = Backbone.View.extend({
|
18
|
+
tagName: 'div',
|
19
|
+
className: 'dropdown',
|
20
|
+
events: {
|
21
|
+
"click .drop-indicator": 'clickedDrop',
|
22
|
+
"click .button": 'clickedItem'
|
23
|
+
},
|
24
|
+
initialize: function() {
|
25
|
+
this.collection = new DropdownCollection();
|
26
|
+
this.collection.on('all', _.bind(this.render, this));
|
27
|
+
return $('body').on('click', _.bind(this.clickedOutsideDropdown, this));
|
28
|
+
},
|
29
|
+
selectedModel: function() {
|
30
|
+
var selected;
|
31
|
+
selected = this.collection.find(function(m) {
|
32
|
+
return m.get('selected');
|
33
|
+
});
|
34
|
+
return selected || this.collection.at(0);
|
35
|
+
},
|
36
|
+
unselectedModels: function() {
|
37
|
+
return _(this.collection.reject(function(m) {
|
38
|
+
return m.get('selected');
|
39
|
+
}));
|
40
|
+
},
|
41
|
+
createButtonFor: function(model) {
|
42
|
+
var _this = this;
|
43
|
+
return $("<button>" + (model.get('text')) + "</button>").on('click', function() {
|
44
|
+
return _this.clickedItem(model);
|
45
|
+
});
|
46
|
+
},
|
47
|
+
render: function() {
|
48
|
+
var $ul,
|
49
|
+
_this = this;
|
50
|
+
this.$el.empty().append(this.createButtonFor(this.selectedModel())).append($ul = $("<ul>"));
|
51
|
+
this.unselectedModels().each(function(model) {
|
52
|
+
return $ul.append(_this.createButtonFor(model));
|
53
|
+
});
|
54
|
+
return this.$el.append("<div class=\"drop-indicator\">v</div>");
|
55
|
+
},
|
56
|
+
clickedDrop: function(e) {
|
57
|
+
e.stopPropagation();
|
58
|
+
return this.$('ul').toggleClass('shown');
|
59
|
+
},
|
60
|
+
clickedOutsideDropdown: function() {
|
61
|
+
return this.$('ul').removeClass('shown');
|
62
|
+
},
|
63
|
+
clickedItem: function(model) {
|
64
|
+
return model.select();
|
65
|
+
}
|
66
|
+
});
|
67
|
+
return {
|
68
|
+
DropdownModel: DropdownModel,
|
69
|
+
DropdownView: DropdownView
|
70
|
+
};
|
71
|
+
});
|
72
|
+
|
73
|
+
}).call(this);
|
@@ -0,0 +1,46 @@
|
|
1
|
+
define ["frank"], (frank)->
|
2
|
+
|
3
|
+
ErsatzModel = Backbone.Model.extend
|
4
|
+
default:
|
5
|
+
highlightFrames = []
|
6
|
+
|
7
|
+
initialize: ->
|
8
|
+
@refreshBaseScreenshot()
|
9
|
+
|
10
|
+
highlightSomeFramesForABit: (frames)->
|
11
|
+
@set('highlightFrames',frames)
|
12
|
+
@temporaryHighlightTimeout = window.setTimeout( =>
|
13
|
+
@set('highlightFrames',[])
|
14
|
+
@temporaryHighlightTimeout = undefined
|
15
|
+
, 1500 )
|
16
|
+
|
17
|
+
resetViews: (views,deviceFamily,orientation)->
|
18
|
+
@set('allViews',views)
|
19
|
+
@set('deviceFamily',deviceFamily)
|
20
|
+
@set('orientation',orientation)
|
21
|
+
@set('highlightFrames',[])
|
22
|
+
@configureAllViews(views)
|
23
|
+
|
24
|
+
refreshBaseScreenshot: ->
|
25
|
+
@set('baseScreenshotUrl',frank.baseScreenshotUrl())
|
26
|
+
|
27
|
+
toggleAsploded: ->
|
28
|
+
isAsploded = !(@get('isAsploded'))
|
29
|
+
@set('isAsploded',isAsploded)
|
30
|
+
if isAsploded
|
31
|
+
@updateAsplodedViews()
|
32
|
+
|
33
|
+
isAsploded
|
34
|
+
|
35
|
+
updateAsplodedViews: ()->
|
36
|
+
frank.requestSnapshotRefresh().done =>
|
37
|
+
@trigger('snapshots-refreshed',@)
|
38
|
+
|
39
|
+
configureAllViews: (allViews)->
|
40
|
+
allViews.on 'change:active', (subject,isActive)=>
|
41
|
+
window.clearTimeout(@temporaryHighlightTimeout) if @temporaryHighlightTimeout?
|
42
|
+
|
43
|
+
if isActive && !@get('isAsploded')
|
44
|
+
@set('highlightFrames',[subject.get('accessibilityFrame')])
|
45
|
+
else
|
46
|
+
@set('highlightFrames',[])
|
@@ -0,0 +1,60 @@
|
|
1
|
+
(function() {
|
2
|
+
|
3
|
+
define(["frank"], function(frank) {
|
4
|
+
var ErsatzModel, highlightFrames;
|
5
|
+
return ErsatzModel = Backbone.Model.extend({
|
6
|
+
"default": highlightFrames = [],
|
7
|
+
initialize: function() {
|
8
|
+
return this.refreshBaseScreenshot();
|
9
|
+
},
|
10
|
+
highlightSomeFramesForABit: function(frames) {
|
11
|
+
var _this = this;
|
12
|
+
this.set('highlightFrames', frames);
|
13
|
+
return this.temporaryHighlightTimeout = window.setTimeout(function() {
|
14
|
+
_this.set('highlightFrames', []);
|
15
|
+
return _this.temporaryHighlightTimeout = void 0;
|
16
|
+
}, 1500);
|
17
|
+
},
|
18
|
+
resetViews: function(views, resolution, deviceFamily, orientation) {
|
19
|
+
this.set('allViews', views);
|
20
|
+
this.set('resolution', resolution);
|
21
|
+
this.set('deviceFamily', deviceFamily);
|
22
|
+
this.set('orientation', orientation);
|
23
|
+
this.set('highlightFrames', []);
|
24
|
+
return this.configureAllViews(views);
|
25
|
+
},
|
26
|
+
refreshBaseScreenshot: function() {
|
27
|
+
return this.set('baseScreenshotUrl', frank.baseScreenshotUrl());
|
28
|
+
},
|
29
|
+
toggleAsploded: function() {
|
30
|
+
var isAsploded;
|
31
|
+
isAsploded = !(this.get('isAsploded'));
|
32
|
+
this.set('isAsploded', isAsploded);
|
33
|
+
if (isAsploded) {
|
34
|
+
this.updateAsplodedViews();
|
35
|
+
}
|
36
|
+
return isAsploded;
|
37
|
+
},
|
38
|
+
updateAsplodedViews: function() {
|
39
|
+
var _this = this;
|
40
|
+
return frank.requestSnapshotRefresh().done(function() {
|
41
|
+
return _this.trigger('snapshots-refreshed', _this);
|
42
|
+
});
|
43
|
+
},
|
44
|
+
configureAllViews: function(allViews) {
|
45
|
+
var _this = this;
|
46
|
+
return allViews.on('change:active', function(subject, isActive) {
|
47
|
+
if (_this.temporaryHighlightTimeout != null) {
|
48
|
+
window.clearTimeout(_this.temporaryHighlightTimeout);
|
49
|
+
}
|
50
|
+
if (isActive && !_this.get('isAsploded')) {
|
51
|
+
return _this.set('highlightFrames', [subject.get('accessibilityFrame')]);
|
52
|
+
} else {
|
53
|
+
return _this.set('highlightFrames', []);
|
54
|
+
}
|
55
|
+
});
|
56
|
+
}
|
57
|
+
});
|
58
|
+
});
|
59
|
+
|
60
|
+
}).call(this);
|