Skip to content

Commit 4c837cb

Browse files
committed
Change attribute to active remote designing (fix #37)
1 parent dcaf67c commit 4c837cb

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

build/system-runtime.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1695,7 +1695,7 @@
16951695
"_id": "13010167f313f87",
16961696
"component": "Runtime",
16971697
"state": "system",
1698-
"action": "function system(params) {\n var RuntimeSystem = null,\n system = {},\n systemId = '',\n result = [],\n conf = {},\n channel = this.require('channel');\n \n if (params) {\n if (typeof params === 'string') {\n conf.master = true;\n conf.name = params;\n } else {\n conf = params;\n conf.master = true;\n }\n RuntimeSystem = this.require('RuntimeSystem');\n system = new RuntimeSystem(conf);\n \n system.state('installed'); \n channel.$systemInstalled(system.id());\n system.state('resolved');\n channel.$systemResolved(system.id());\n } else {\n result = $db.RuntimeSystem.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}",
1698+
"action": "function system(params) {\n var RuntimeSystem = null,\n system = {},\n systemId = '',\n result = [],\n conf = {};\n \n if (params) {\n if (typeof params === 'string') {\n conf.master = true;\n conf.name = params;\n } else {\n conf = params;\n conf.master = true;\n }\n RuntimeSystem = this.require('RuntimeSystem');\n system = new RuntimeSystem(conf);\n system.state('active');\n } else {\n result = $db.RuntimeSystem.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}",
16991699
"core": true,
17001700
"useCoreAPI": true
17011701
},
@@ -1913,7 +1913,7 @@
19131913
"_id": "1cb9d103d41dd97",
19141914
"component": "e89c617b6b15d24",
19151915
"state": "start",
1916-
"action": "function start() {\n var subsystems = [],\n systems = [],\n system = null,\n scripts = [],\n script = null,\n mode = '',\n logLevel = 'warn',\n i = 0,\n length = 0;\n\n // in a browser\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 // mode\n scripts = document.querySelectorAll('script[mode]');\n if (scripts.length) {\n mode = scripts[0].getAttribute('mode');\n \n if (mode === 'dev') {\n document.addEventListener('dragenter', function (e) {\n e.stopPropagation();\n e.preventDefault();\n }, false);\n\n document.addEventListener('dragover', function (e) {\n e.stopPropagation();\n e.preventDefault();\n }, false);\n\n document.addEventListener('drop', function (e) {\n e.stopPropagation();\n e.preventDefault();\n var files = e.dataTransfer.files;\n var reader = new FileReader();\n var json = '';\n reader.onload = function (event) {\n json += event.target.result;\n };\n reader.onloadend = function () {\n var sys = JSON.parse(json);\n runtime.install(sys);\n };\n reader.readAsText(files[0], 'UTF-8');\n });\n }\n if (mode === 'admin') {\n this.require('admin').start();\n }\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').install(system.href, false);\n } else {\n this.require('runtime').install(system.href, true);\n }\n }\n\n // designer (deprecated)\n scripts = document.querySelectorAll('script[designer]');\n if (scripts.length) {\n this.require('admin').start();\n }\n\n // ready event\n if (length === 0) {\n this.require('runtime').ready();\n }\n }\n}",
1916+
"action": "function start() {\n var subsystems = [],\n systems = [],\n system = null,\n scripts = [],\n script = null,\n mode = '',\n logLevel = 'warn',\n i = 0,\n length = 0;\n\n // in a browser\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 // mode\n scripts = document.querySelectorAll('script[mode]');\n if (scripts.length) {\n mode = scripts[0].getAttribute('mode');\n \n if (mode === 'dev') {\n document.addEventListener('dragenter', function (e) {\n e.stopPropagation();\n e.preventDefault();\n }, false);\n\n document.addEventListener('dragover', function (e) {\n e.stopPropagation();\n e.preventDefault();\n }, false);\n\n document.addEventListener('drop', function (e) {\n e.stopPropagation();\n e.preventDefault();\n var files = e.dataTransfer.files;\n var reader = new FileReader();\n var json = '';\n reader.onload = function (event) {\n json += event.target.result;\n };\n reader.onloadend = function () {\n var sys = JSON.parse(json);\n runtime.install(sys);\n };\n reader.readAsText(files[0], 'UTF-8');\n });\n }\n if (mode === 'design') {\n this.require('admin').start();\n }\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').install(system.href, false);\n } else {\n this.require('runtime').install(system.href, true);\n }\n }\n\n // designer (deprecated)\n scripts = document.querySelectorAll('script[designer]');\n if (scripts.length) {\n this.require('admin').start();\n }\n\n // ready event\n if (length === 0) {\n this.require('runtime').ready();\n }\n }\n}",
19171917
"useCoreAPI": true,
19181918
"core": true
19191919
},

build/system/system.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1619,7 +1619,7 @@ var system = {
16191619
"_id": "13010167f313f87",
16201620
"component": "Runtime",
16211621
"state": "system",
1622-
"action": "function system(params) {\n var RuntimeSystem = null,\n system = {},\n systemId = '',\n result = [],\n conf = {},\n channel = this.require('channel');\n \n if (params) {\n if (typeof params === 'string') {\n conf.master = true;\n conf.name = params;\n } else {\n conf = params;\n conf.master = true;\n }\n RuntimeSystem = this.require('RuntimeSystem');\n system = new RuntimeSystem(conf);\n \n system.state('installed'); \n channel.$systemInstalled(system.id());\n system.state('resolved');\n channel.$systemResolved(system.id());\n } else {\n result = $db.RuntimeSystem.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}",
1622+
"action": "function system(params) {\n var RuntimeSystem = null,\n system = {},\n systemId = '',\n result = [],\n conf = {};\n \n if (params) {\n if (typeof params === 'string') {\n conf.master = true;\n conf.name = params;\n } else {\n conf = params;\n conf.master = true;\n }\n RuntimeSystem = this.require('RuntimeSystem');\n system = new RuntimeSystem(conf);\n system.state('active');\n } else {\n result = $db.RuntimeSystem.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}",
16231623
"core": true,
16241624
"useCoreAPI": true
16251625
},
@@ -1837,7 +1837,7 @@ var system = {
18371837
"_id": "1cb9d103d41dd97",
18381838
"component": "e89c617b6b15d24",
18391839
"state": "start",
1840-
"action": "function start() {\n var subsystems = [],\n systems = [],\n system = null,\n scripts = [],\n script = null,\n mode = '',\n logLevel = 'warn',\n i = 0,\n length = 0;\n\n // in a browser\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 // mode\n scripts = document.querySelectorAll('script[mode]');\n if (scripts.length) {\n mode = scripts[0].getAttribute('mode');\n \n if (mode === 'dev') {\n document.addEventListener('dragenter', function (e) {\n e.stopPropagation();\n e.preventDefault();\n }, false);\n\n document.addEventListener('dragover', function (e) {\n e.stopPropagation();\n e.preventDefault();\n }, false);\n\n document.addEventListener('drop', function (e) {\n e.stopPropagation();\n e.preventDefault();\n var files = e.dataTransfer.files;\n var reader = new FileReader();\n var json = '';\n reader.onload = function (event) {\n json += event.target.result;\n };\n reader.onloadend = function () {\n var sys = JSON.parse(json);\n runtime.install(sys);\n };\n reader.readAsText(files[0], 'UTF-8');\n });\n }\n if (mode === 'admin') {\n this.require('admin').start();\n }\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').install(system.href, false);\n } else {\n this.require('runtime').install(system.href, true);\n }\n }\n\n // designer (deprecated)\n scripts = document.querySelectorAll('script[designer]');\n if (scripts.length) {\n this.require('admin').start();\n }\n\n // ready event\n if (length === 0) {\n this.require('runtime').ready();\n }\n }\n}",
1840+
"action": "function start() {\n var subsystems = [],\n systems = [],\n system = null,\n scripts = [],\n script = null,\n mode = '',\n logLevel = 'warn',\n i = 0,\n length = 0;\n\n // in a browser\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 // mode\n scripts = document.querySelectorAll('script[mode]');\n if (scripts.length) {\n mode = scripts[0].getAttribute('mode');\n \n if (mode === 'dev') {\n document.addEventListener('dragenter', function (e) {\n e.stopPropagation();\n e.preventDefault();\n }, false);\n\n document.addEventListener('dragover', function (e) {\n e.stopPropagation();\n e.preventDefault();\n }, false);\n\n document.addEventListener('drop', function (e) {\n e.stopPropagation();\n e.preventDefault();\n var files = e.dataTransfer.files;\n var reader = new FileReader();\n var json = '';\n reader.onload = function (event) {\n json += event.target.result;\n };\n reader.onloadend = function () {\n var sys = JSON.parse(json);\n runtime.install(sys);\n };\n reader.readAsText(files[0], 'UTF-8');\n });\n }\n if (mode === 'design') {\n this.require('admin').start();\n }\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').install(system.href, false);\n } else {\n this.require('runtime').install(system.href, true);\n }\n }\n\n // designer (deprecated)\n scripts = document.querySelectorAll('script[designer]');\n if (scripts.length) {\n this.require('admin').start();\n }\n\n // ready event\n if (length === 0) {\n this.require('runtime').ready();\n }\n }\n}",
18411841
"useCoreAPI": true,
18421842
"core": true
18431843
},

dist/system-runtime.js

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

dist/system-runtime.min.js

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

src/system/system-runtime.json

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

0 commit comments

Comments
 (0)