tres 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/javascripts/tres.coffee +7 -5
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.9
|
data/javascripts/tres.coffee
CHANGED
@@ -21,9 +21,9 @@ defaultTemplate = _.template """
|
|
21
21
|
"""
|
22
22
|
# ---
|
23
23
|
|
24
|
-
# Keep a copy by reference of all screens that were
|
25
|
-
# can do things like tearing down the whole app.
|
26
|
-
Tres.
|
24
|
+
# Keep a copy by reference of all screens that were embedded so we
|
25
|
+
# can do things like tearing down the whole app by clearing them.
|
26
|
+
Tres.embedded = []
|
27
27
|
|
28
28
|
# Tres.Device handles/exposes device events (orientation change, accellerometer,
|
29
29
|
# etc), screen width, and other hardware-related goodies
|
@@ -64,7 +64,6 @@ class Tres.Screen extends Backbone.View
|
|
64
64
|
|
65
65
|
initialize: (options = {}) ->
|
66
66
|
_.extend @, options
|
67
|
-
Tres.screens.push @
|
68
67
|
|
69
68
|
# Returns the title of the screen, which will only exist if there's a
|
70
69
|
# header with a <h1> inside of it
|
@@ -89,11 +88,13 @@ class Tres.Screen extends Backbone.View
|
|
89
88
|
@render()
|
90
89
|
$body.prepend @el
|
91
90
|
@embedded = yes
|
91
|
+
Tres.embedded.push @
|
92
92
|
@
|
93
93
|
|
94
94
|
# Destroys the element associated with the screen and flags as
|
95
95
|
# not embedded
|
96
96
|
teardown: ->
|
97
|
+
@render()
|
97
98
|
@$el.remove()
|
98
99
|
@embedded = no
|
99
100
|
@
|
@@ -282,8 +283,9 @@ class Tres.App
|
|
282
283
|
# of arguments for types of screen that you'd like to stay
|
283
284
|
# intact
|
284
285
|
reboot: ->
|
285
|
-
for screen in Tres.
|
286
|
+
for screen in Tres.embedded
|
286
287
|
screen.teardown()
|
288
|
+
Tres.embedded.length = 0
|
287
289
|
|
288
290
|
# ---
|
289
291
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tres
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-04-
|
12
|
+
date: 2013-04-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: listen
|