Skip to content

Commit aa911eb

Browse files
committed
- clean addons
1 parent 2a32fce commit aa911eb

File tree

9 files changed

+180
-930
lines changed

9 files changed

+180
-930
lines changed

addons/system-admin.json

Lines changed: 1 addition & 301 deletions
Large diffs are not rendered by default.

addons/web.json

Lines changed: 1 addition & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1 @@
1-
{
2-
"name": "web",
3-
"version": "0.1.0",
4-
"description": "Add behaviors for web",
5-
"_id": "133421d0c313d2d",
6-
"schemas": {
7-
"12e211d4cd120a6": {
8-
"_id": "12e211d4cd120a6",
9-
"_name": "Runtime",
10-
"load": "method",
11-
"ready": "event"
12-
}
13-
},
14-
"models": {
15-
"14c7c105b31a160": {
16-
"_id": "14c7c105b31a160",
17-
"_name": "Runtime",
18-
"load": {
19-
"params": [
20-
{
21-
"name": "url",
22-
"type": "string"
23-
},
24-
{
25-
"name": "async",
26-
"type": "boolean",
27-
"mandatory": false,
28-
"default": true
29-
}
30-
]
31-
},
32-
"ready": {}
33-
}
34-
},
35-
"types": {},
36-
"behaviors": {
37-
"1aaee1e6311ff39": {
38-
"_id": "1aaee1e6311ff39",
39-
"component": "runtime",
40-
"state": "load",
41-
"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.RuntimeSystem.find({\n 'subsystem': true\n }); \n if (sys) {\n sys.main();\n } \n if (systems.length + 1 + nbSubsystem.length === $db.RuntimeSystem.count()) {\n $component.get('runtime').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}",
42-
"core": true,
43-
"useCoreAPI": true
44-
},
45-
"1f6001773a18791": {
46-
"_id": "1f6001773a18791",
47-
"component": "e89c617b6b15d24",
48-
"state": "main",
49-
"action": "function main() {\n var subsystems = [],\n systems = [],\n system = null,\n scripts = [],\n script = null,\n pathToDesigner = '',\n logLevel = 'warn',\n i = 0,\n length = 0;\n \n subsystems = $db.RuntimeSystem.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 // logger\n scripts = document.querySelectorAll('script[log]');\n if (scripts.length) {\n logLevel = scripts[0].getAttribute('log');\n this.require('logger').level(logLevel);\n }\n \n // systems\n for (i = 0; i < length; i++) {\n system = systems[i];\n \n if (system.getAttribute('async') === 'false') {\n this.require('runtime').load(system.href, false);\n } else {\n this.require('runtime').load(system.href, true);\n }\n }\n if (length === 0) {\n this.require('runtime').ready();\n }\n \n // admin\n scripts = document.querySelectorAll('script[designer]');\n if (scripts.length) {\n pathToDesigner = scripts[0].getAttribute('designer');\n this.require('admin').start(pathToDesigner);\n }\n }\n}",
50-
"core": true,
51-
"useCoreAPI": true
52-
}
53-
},
54-
"components": {}
55-
}
1+
{"name":"web","version":"0.1.0","description":"Add behaviors for web","_id":"133421d0c313d2d","schemas":{"12e211d4cd120a6":{"_id":"12e211d4cd120a6","_name":"Runtime","load":"method","ready":"event"}},"models":{"14c7c105b31a160":{"_id":"14c7c105b31a160","_name":"Runtime","load":{"params":[{"name":"url","type":"string"},{"name":"async","type":"boolean","mandatory":false,"default":true}]},"ready":{}}},"types":{},"behaviors":{"1aaee1e6311ff39":{"_id":"1aaee1e6311ff39","component":"runtime","state":"load","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.RuntimeSystem.find({\n 'subsystem': true\n }); \n if (sys) {\n sys.main();\n } \n if (systems.length + 1 + nbSubsystem.length === $db.RuntimeSystem.count()) {\n $component.get('runtime').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}","core":true,"useCoreAPI":true},"1f6001773a18791":{"_id":"1f6001773a18791","component":"e89c617b6b15d24","state":"main","action":"function main() {\n var subsystems = [],\n systems = [],\n system = null,\n scripts = [],\n script = null,\n pathToDesigner = '',\n logLevel = 'warn',\n i = 0,\n length = 0;\n \n subsystems = $db.RuntimeSystem.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 // logger\n scripts = document.querySelectorAll('script[log]');\n if (scripts.length) {\n logLevel = scripts[0].getAttribute('log');\n this.require('logger').level(logLevel);\n }\n \n // systems\n for (i = 0; i < length; i++) {\n system = systems[i];\n \n if (system.getAttribute('async') === 'false') {\n this.require('runtime').load(system.href, false);\n } else {\n this.require('runtime').load(system.href, true);\n }\n }\n if (length === 0) {\n this.require('runtime').ready();\n }\n \n // admin\n scripts = document.querySelectorAll('script[designer]');\n if (scripts.length) {\n pathToDesigner = scripts[0].getAttribute('designer');\n this.require('admin').start(pathToDesigner);\n }\n }\n}","core":true,"useCoreAPI":true}},"components":{},"master":false,"subsystem":false}

addons/webType.json

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1 @@
1-
{
2-
"name": "webType",
3-
"version": "0.1.0",
4-
"description": "Add types for web",
5-
"_id": "1f6ff194df1c37a",
6-
"schemas": {},
7-
"models": {},
8-
"types": {
9-
"html": {
10-
"name": "html",
11-
"type": "string",
12-
"core": true
13-
},
14-
"css": {
15-
"name": "css",
16-
"type": "string",
17-
"core": true
18-
}
19-
},
20-
"behaviors": {},
21-
"components": {}
22-
}
1+
{"name":"webType","version":"0.1.0","description":"Add types for web","_id":"1f6ff194df1c37a","schemas":{},"models":{},"types":{"html":{"name":"html","type":"string","core":true},"css":{"name":"css","type":"string","core":true}},"behaviors":{},"components":{},"master":false,"subsystem":false}

0 commit comments

Comments
 (0)