diff --git a/data/web/common/style.css b/data/web/common/style.css index cf497440ad..ac82e9fe77 100644 --- a/data/web/common/style.css +++ b/data/web/common/style.css @@ -30,6 +30,18 @@ background-color: #fff; } +.documentation-item.remote-scripting { + border-left: 2px solid #4c1315; + background-color: #fcdcdc; + color: #4c1315; +} + +.documentation-item.local-scripting { + border-left: 2px solid #2d4256; + background-color: #dcf1f9; + color: #2d4256; +} + .documentation-type { color: #888; font-size: 0.8em; diff --git a/data/web/documentation/documentation.hbs b/data/web/documentation/documentation.hbs index 93957bdecf..2b7bbbd84d 100644 --- a/data/web/documentation/documentation.hbs +++ b/data/web/documentation/documentation.hbs @@ -11,7 +11,8 @@ {{/if}}
-{{description}}
+{{description}}
+{{documentation}}
{{#with restrictions}} {{>documentation}} {{/with}} diff --git a/data/web/documentation/script.js b/data/web/documentation/script.js index c2b320ce70..f9af37e558 100644 --- a/data/web/documentation/script.js +++ b/data/web/documentation/script.js @@ -18,6 +18,10 @@ window.onload = function () { return identifier; }); + documentation.sort(function (a, b) { + return a.name < b.name ? -1 : (a.name > b.name ? 1 : 0); + }); + var data = { documentation: documentation, version: version diff --git a/data/web/factories/script.js b/data/web/factories/script.js index 6334c7b2a4..4776d5656e 100644 --- a/data/web/factories/script.js +++ b/data/web/factories/script.js @@ -18,6 +18,10 @@ window.onload = function () { return identifier; }); + factories.sort(function (a, b) { + return a.name < b.name ? -1 : (a.name > b.name ? 1 : 0); + }); + var data = { factories: factories, version: version diff --git a/data/web/keybindings/keybinding.hbs b/data/web/keybindings/keybinding.hbs index 1b4d5414c2..29773e357e 100644 --- a/data/web/keybindings/keybinding.hbs +++ b/data/web/keybindings/keybinding.hbs @@ -1,9 +1,9 @@ -- {{key}} + {{key}} {{#if remoteScripting}}Remote scripting{{else}}Local scripting{{/if}}
{{script}}
diff --git a/data/web/keybindings/script.js b/data/web/keybindings/script.js index 149cba1892..6b4bdd444e 100644 --- a/data/web/keybindings/script.js +++ b/data/web/keybindings/script.js @@ -18,6 +18,10 @@ window.onload = function () { return identifier; }); + keybindings.sort(function (a, b) { + return a.key < b.key ? -1 : (a.key > b.key ? 1 : 0); + }); + var data = { keybindings: keybindings, version: version, diff --git a/data/web/luascripting/script.js b/data/web/luascripting/script.js index b43af6f884..6d43a33b07 100644 --- a/data/web/luascripting/script.js +++ b/data/web/luascripting/script.js @@ -18,6 +18,10 @@ window.onload = function () { return identifier; }); + scripting.sort(function (a, b) { + return a.library < b.library ? -1 : (a.library > b.library ? 1 : 0); + }); + var data = { scripting: scripting, version: version diff --git a/data/web/properties/script.js b/data/web/properties/script.js index 70f303f15f..f7302a5e0b 100644 --- a/data/web/properties/script.js +++ b/data/web/properties/script.js @@ -46,6 +46,10 @@ window.onload = function () { return identifier; }); + propertyOwners.sort(function (a, b) { + return a.name < b.name ? -1 : (a.name > b.name ? 1 : 0); + }); + var data = { propertyOwners: propertyOwners, version: version, diff --git a/src/interaction/interactionhandler.cpp b/src/interaction/interactionhandler.cpp index 14c8ecb044..f24ced430b 100644 --- a/src/interaction/interactionhandler.cpp +++ b/src/interaction/interactionhandler.cpp @@ -469,8 +469,8 @@ void InteractionHandler::writeKeyboardDocumentation(const std::string& type, con first = false; json << "{"; json << "\"key\": \"" << std::to_string(p.first) << "\","; - json << "\"script\": \"" << p.second.first << "\""; - json << "\"remoteScripting\": \"" << (p.second.second ? "true" : "false") << "\""; + json << "\"script\": \"" << p.second.first << "\","; + json << "\"remoteScripting\": " << (p.second.second ? "true" : "false"); json << "}"; } json << "]";