arcabouco 0.2.1 → 0.2.2
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 +4 -4
- data/lib/arcabouco/version.rb +1 -1
- data/lib/assets/js/core/boot.js.coffee +2 -2
- data/lib/templates/bootstrap_code.js +13 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 26949f5548e7ebf98d33f8a306c0eddb4bd554d5
|
4
|
+
data.tar.gz: e544ff7a626d43f1444b28a8b441d5ddd61149bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf1cf0c9530e31954276254d21c7907e823f61add8cfe0e6937580a556bcee179fb35fcecce842aa3c62f498eb6da71245d183ceab88b2851371e87e89b1c1f3
|
7
|
+
data.tar.gz: 4d8424ff96fd2a5b3405b18d21c9cd726995ece3458e12aa657f646a9259e9295b95efed7614bf78750eca21637815000920749cafe8511382cad43eb03a7398
|
data/lib/arcabouco/version.rb
CHANGED
@@ -8,7 +8,7 @@ app.module_ready = (name) ->
|
|
8
8
|
|
9
9
|
app.load_modules = ->
|
10
10
|
for module,status of app._bootstrap_list
|
11
|
-
return if status ==
|
11
|
+
return if status == false
|
12
12
|
|
13
13
|
app.debug 'Loaded modules: '
|
14
14
|
for name of app._bootstrap_list
|
@@ -29,5 +29,5 @@ app.boot = ->
|
|
29
29
|
if app.document_domain
|
30
30
|
document.domain = app.document_domain
|
31
31
|
|
32
|
-
app._bootstrap_list_loader = setInterval(
|
32
|
+
app._bootstrap_list_loader = setInterval( app.load_modules, 250 )
|
33
33
|
app.load_modules()
|
@@ -26,8 +26,20 @@ function _loadCSS(src)
|
|
26
26
|
document.head.appendChild(css);
|
27
27
|
}
|
28
28
|
|
29
|
+
function checkLastUpdate()
|
30
|
+
{
|
31
|
+
// Fix to browser finding new content
|
32
|
+
_lastUpdate = Math.ceil( app._lastUpdate/1000 );
|
33
|
+
_currentUpdate = Math.ceil( (new Date()).getTime()/1000 );
|
34
|
+
if (app.enable_debug) console.log("DEBUG: Last Update: " + _lastUpdate);
|
35
|
+
if (_lastUpdate+5 < _currentUpdate) return false;
|
36
|
+
app._lastUpdate = (new Date()).getTime();
|
37
|
+
return true;
|
38
|
+
}
|
39
|
+
|
29
40
|
function bootstrapApplication()
|
30
41
|
{
|
42
|
+
if (!checkLastUpdate()) return;
|
31
43
|
if (app.bootstraped) return;
|
32
44
|
if (app.enable_debug) console.log("DEBUG: Bootstrap Application. Manifest (" + app.assets_manifest + ")");
|
33
45
|
_getJSON( app.assets_manifest, function(data) {
|
@@ -52,13 +64,6 @@ function updateApplicationDownloadProgress(progress)
|
|
52
64
|
|
53
65
|
function refreshApplicationFiles()
|
54
66
|
{
|
55
|
-
// Fix to browser finding new content
|
56
|
-
_lastUpdate = Math.ceil( app._lastUpdate/1000 );
|
57
|
-
_currentUpdate = Math.ceil( (new Date()).getTime()/1000 );
|
58
|
-
if (app.enable_debug) console.log("DEBUG: Last Update: " + _lastUpdate);
|
59
|
-
if (_lastUpdate+5 < _currentUpdate) return;
|
60
|
-
app._lastUpdate = _currentUpdate;
|
61
|
-
|
62
67
|
app.applicationCache.swapCache();
|
63
68
|
if (app.bootstraped == false) {
|
64
69
|
bootstrapApplication();
|
@@ -81,6 +86,7 @@ appcache_frame.onload = function() {
|
|
81
86
|
app.applicationCache.addEventListener('progress', function(e) { updateApplicationDownloadProgress(e); }, false);
|
82
87
|
|
83
88
|
setInterval(function() {
|
89
|
+
if (!checkLastUpdate()) return;
|
84
90
|
if (app.enable_debug) console.log("DEBUG: Checking for new assets");
|
85
91
|
app.applicationCache.update();
|
86
92
|
}, 10*60*1000);
|