Skip to content

Commit 3a810d9

Browse files
Erwan CarriouErwan Carriou
authored andcommitted
- clean system
1 parent a888ad6 commit 3a810d9

28 files changed

+370
-370
lines changed

addons/web.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@
3232
"_id": "1aaee1e6311ff39",
3333
"component": "monoco",
3434
"state": "load",
35-
"action": "function load(url, async) { var xhr = null, callbackLoad = null; xhr = new XMLHttpRequest(); callbackLoad = function callbackLoad(system) { var sysId = $db.system(system), sys = $component.get(sysId), systems = document.querySelectorAll('link[rel=system]'), nbSubsystem = $db.MonocoSystem.find({ 'subsystem': true }); if (sys) { sys.main(); } if (systems.length + 1 + nbSubsystem.length === $db.MonocoSystem.count()) { $component.get('monoco').ready(); } }; if (async) { xhr.open('GET', url, true); xhr.onreadystatechange = function () { if (xhr.readyState === 4) { if (xhr.status === 200) { callbackLoad(JSON.parse(xhr.response)); } } }; xhr.send(null); } else { xhr.open('GET', url, false); xhr.send(null); if (xhr.status === 200) { callbackLoad(JSON.parse(xhr.response)); } }}",
35+
"action": "function load(url, async) {\n var xhr = null,\n callbackLoad = null;\n xhr = new XMLHttpRequest();\n \n callbackLoad = function callbackLoad(system) {\n var sysId = $db.system(system),\n sys = $component.get(sysId),\n systems = document.querySelectorAll('link[rel=system]'),\n nbSubsystem = $db.MonocoSystem.find({\n 'subsystem': true\n }); \n if (sys) {\n sys.main();\n } \n if (systems.length + 1 + nbSubsystem.length === $db.MonocoSystem.count()) {\n $component.get('monoco').ready();\n }\n };\n \n if (async) {\n xhr.open('GET', url, true);\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4) {\n if (xhr.status === 200) {\n callbackLoad(JSON.parse(xhr.response));\n }\n }\n };\n xhr.send(null);\n } else {\n xhr.open('GET', url, false);\n xhr.send(null);\n if (xhr.status === 200) {\n callbackLoad(JSON.parse(xhr.response));\n }\n }\n}",
3636
"core": true,
3737
"useCoreAPI": true
3838
},
3939
"1f6001773a18791": {
4040
"_id": "1f6001773a18791",
4141
"component": "e89c617b6b15d24",
4242
"state": "main",
43-
"action": "function main() { var subsystems = [], systems = [], system = null, i = 0, length = 0; subsystems = $db.MonocoSystem.find({ 'subsystem': true }); subsystems.forEach(function (subsystem) { var subsystemId = subsystem._id; this.require(subsystemId).main(); }, this); if (typeof document !== 'undefined') { systems = document.querySelectorAll('link[rel=system]'); length = systems.length; for (i = 0; i < length; i++) { system = systems[i]; if (system.getAttribute('async') === 'false') { this.require('monoco').load(system.href, false); } else { this.require('monoco').load(system.href, true); } } if (length === 0) { this.require('monoco').ready(); } }}",
43+
"action": "function main() {\n var subsystems = [],\n systems = [],\n system = null,\n i = 0,\n length = 0;\n \n subsystems = $db.MonocoSystem.find({\n 'subsystem': true\n });\n subsystems.forEach(function (subsystem) {\n var subsystemId = subsystem._id;\n this.require(subsystemId).main();\n }, this); \n \n if (typeof document !== 'undefined') {\n systems = document.querySelectorAll('link[rel=system]');\n length = systems.length;\n \n for (i = 0; i < length; i++) {\n system = systems[i];\n \n if (system.getAttribute('async') === 'false') {\n this.require('monoco').load(system.href, false);\n } else {\n this.require('monoco').load(system.href, true);\n }\n }\n if (length === 0) {\n this.require('monoco').ready();\n }\n }\n}",
4444
"core": true,
4545
"useCoreAPI": true
4646
}

build/monoco-min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/monoco.js

Lines changed: 66 additions & 66 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/monoco.json

Lines changed: 65 additions & 65 deletions
Large diffs are not rendered by default.

build/system/system.js

Lines changed: 65 additions & 65 deletions
Large diffs are not rendered by default.

doc/files/build_system_system.js.html

Lines changed: 65 additions & 65 deletions
Large diffs are not rendered by default.

src/addons/web.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@
3232
"_id": "1aaee1e6311ff39",
3333
"component": "monoco",
3434
"state": "load",
35-
"action": "function load(url, async) { var xhr = null, callbackLoad = null; xhr = new XMLHttpRequest(); callbackLoad = function callbackLoad(system) { var sysId = $db.system(system), sys = $component.get(sysId), systems = document.querySelectorAll('link[rel=system]'), nbSubsystem = $db.MonocoSystem.find({ 'subsystem': true }); if (sys) { sys.main(); } if (systems.length + 1 + nbSubsystem.length === $db.MonocoSystem.count()) { $component.get('monoco').ready(); } }; if (async) { xhr.open('GET', url, true); xhr.onreadystatechange = function () { if (xhr.readyState === 4) { if (xhr.status === 200) { callbackLoad(JSON.parse(xhr.response)); } } }; xhr.send(null); } else { xhr.open('GET', url, false); xhr.send(null); if (xhr.status === 200) { callbackLoad(JSON.parse(xhr.response)); } }}",
35+
"action": "function load(url, async) {\n var xhr = null,\n callbackLoad = null;\n xhr = new XMLHttpRequest();\n \n callbackLoad = function callbackLoad(system) {\n var sysId = $db.system(system),\n sys = $component.get(sysId),\n systems = document.querySelectorAll('link[rel=system]'),\n nbSubsystem = $db.MonocoSystem.find({\n 'subsystem': true\n }); \n if (sys) {\n sys.main();\n } \n if (systems.length + 1 + nbSubsystem.length === $db.MonocoSystem.count()) {\n $component.get('monoco').ready();\n }\n };\n \n if (async) {\n xhr.open('GET', url, true);\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4) {\n if (xhr.status === 200) {\n callbackLoad(JSON.parse(xhr.response));\n }\n }\n };\n xhr.send(null);\n } else {\n xhr.open('GET', url, false);\n xhr.send(null);\n if (xhr.status === 200) {\n callbackLoad(JSON.parse(xhr.response));\n }\n }\n}",
3636
"core": true,
3737
"useCoreAPI": true
3838
},
3939
"1f6001773a18791": {
4040
"_id": "1f6001773a18791",
4141
"component": "e89c617b6b15d24",
4242
"state": "main",
43-
"action": "function main() { var subsystems = [], systems = [], system = null, i = 0, length = 0; subsystems = $db.MonocoSystem.find({ 'subsystem': true }); subsystems.forEach(function (subsystem) { var subsystemId = subsystem._id; this.require(subsystemId).main(); }, this); if (typeof document !== 'undefined') { systems = document.querySelectorAll('link[rel=system]'); length = systems.length; for (i = 0; i < length; i++) { system = systems[i]; if (system.getAttribute('async') === 'false') { this.require('monoco').load(system.href, false); } else { this.require('monoco').load(system.href, true); } } if (length === 0) { this.require('monoco').ready(); } }}",
43+
"action": "function main() {\n var subsystems = [],\n systems = [],\n system = null,\n i = 0,\n length = 0;\n \n subsystems = $db.MonocoSystem.find({\n 'subsystem': true\n });\n subsystems.forEach(function (subsystem) {\n var subsystemId = subsystem._id;\n this.require(subsystemId).main();\n }, this); \n \n if (typeof document !== 'undefined') {\n systems = document.querySelectorAll('link[rel=system]');\n length = systems.length;\n \n for (i = 0; i < length; i++) {\n system = systems[i];\n \n if (system.getAttribute('async') === 'false') {\n this.require('monoco').load(system.href, false);\n } else {\n this.require('monoco').load(system.href, true);\n }\n }\n if (length === 0) {\n this.require('monoco').ready();\n }\n }\n}",
4444
"core": true,
4545
"useCoreAPI": true
4646
}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"component": "Monoco",
3-
"state": "error",
4-
"action": "function error(data) { console.error('monoco: ' + data.message, data.error); }",
5-
"core": true
2+
"component": "Monoco",
3+
"state": "error",
4+
"action": "function error(data) {\n console.error('monoco: ' + data.message, data.error);\n}",
5+
"core": true
66
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"component": "Monoco",
3-
"state": "system",
4-
"action": "function system(name) { var System = null, system = {}, systemId = '', result = [], conf = {}; if (name) { conf.master = true; conf.name = name; System = this.require('MonocoSystem'); system = new System(conf); } else { result = $db.MonocoSystem.find({ 'master': true }); if (result.length) { systemId = result[0]._id; system = $component.get(systemId); } } return system;}",
5-
"core": true,
6-
"useCoreAPI": true
2+
"component": "Monoco",
3+
"state": "system",
4+
"action": "function system(name) {\n var System = null,\n system = {},\n systemId = '',\n result = [],\n conf = {};\n \n if (name) {\n conf.master = true;\n conf.name = name;\n System = this.require('MonocoSystem');\n system = new System(conf);\n } else {\n result = $db.MonocoSystem.find({\n 'master': true\n });\n if (result.length) {\n systemId = result[0]._id;\n system = $component.get(systemId);\n }\n }\n return system;\n}",
5+
"core": true,
6+
"useCoreAPI": true
77
}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"component": "Monoco",
3-
"state": "warning",
4-
"action": "function warning(message) { console.warn('monoco: ' + message); }",
5-
"core": true
2+
"component": "Monoco",
3+
"state": "warning",
4+
"action": "function warning(message) {\n console.warn('monoco: ' + message);\n}",
5+
"core": true
66
}

0 commit comments

Comments
 (0)