goat 0.3.21 → 0.3.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/goat.gemspec +1 -1
- data/lib/goat/dynamic.rb +1 -1
- data/lib/goat/goat.js +12 -5
- metadata +4 -4
data/goat.gemspec
CHANGED
data/lib/goat/dynamic.rb
CHANGED
@@ -66,9 +66,9 @@ module Dynamic
|
|
66
66
|
def let(bindings, &block)
|
67
67
|
save = {}
|
68
68
|
save_keys = variables.keys
|
69
|
+
save_keys.each {|k, v| save[k] = self[k]}
|
69
70
|
bindings.to_hash.collect { |key, value|
|
70
71
|
self.variable(key)
|
71
|
-
save[key] = self[key]
|
72
72
|
self[key] = value
|
73
73
|
}
|
74
74
|
block.call
|
data/lib/goat/goat.js
CHANGED
@@ -197,8 +197,12 @@ Goat.LoadingIndicator = {
|
|
197
197
|
|
198
198
|
(function(ld) {
|
199
199
|
function initIndicator() {
|
200
|
-
if(!ld.url || !ld.where)
|
200
|
+
if(!ld.url || !ld.where) {
|
201
|
+
console.error("Loading indicator not configured");
|
202
|
+
return;
|
203
|
+
}
|
201
204
|
ld.indicator = $("<img id=\"loading_indicator\" src=\"" + ld.url + "\">");
|
205
|
+
new Image(ld.url);
|
202
206
|
}
|
203
207
|
|
204
208
|
function show() {
|
@@ -213,7 +217,6 @@ Goat.LoadingIndicator = {
|
|
213
217
|
|
214
218
|
$(document).ready(function() {
|
215
219
|
initIndicator();
|
216
|
-
new Image(ld.url);
|
217
220
|
});
|
218
221
|
|
219
222
|
ld.show = show;
|
@@ -369,9 +372,13 @@ $.extend(Goat, {
|
|
369
372
|
if(t == 'component_updated') {
|
370
373
|
Goat.RT.updateReceived(m);
|
371
374
|
} else if(t == 'redirect') {
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
+
if(m["location"]) {
|
376
|
+
console.log("Redirecting to " + m['location']);
|
377
|
+
sleep(2);
|
378
|
+
window.location = m['location'];
|
379
|
+
} else {
|
380
|
+
console.error("Tried to redirect to null. Buggy message: " + m);
|
381
|
+
}
|
375
382
|
} else if(t == 'page_expired') {
|
376
383
|
alert("Due to inactivity, you'll need to refresh this page.");
|
377
384
|
Goat.setPageDead();
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: goat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 61
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 23
|
10
|
+
version: 0.3.23
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Patrick Collison
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-12-
|
18
|
+
date: 2010-12-17 00:00:00 +00:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|