',{class:"palette-editor-tab"}).appendTo(content);
editorTabs.addTab({
id: 'nodes',
@@ -659,7 +744,7 @@ RED.palette.editor = (function() {
- var installTab = $('
',{class:"palette-editor-tab hide"}).appendTo("#palette-editor");
+ var installTab = $('
',{class:"palette-editor-tab hide"}).appendTo(content);
editorTabs.addTab({
id: 'install',
@@ -874,79 +959,6 @@ RED.palette.editor = (function() {
}
]
})
-
-
- RED.events.on('registry:module-updated', function(ns) {
- refreshNodeModule(ns.module);
- });
- RED.events.on('registry:node-set-enabled', function(ns) {
- refreshNodeModule(ns.module);
- });
- RED.events.on('registry:node-set-disabled', function(ns) {
- refreshNodeModule(ns.module);
- });
- RED.events.on('registry:node-type-added', function(nodeType) {
- if (!/^subflow:/.test(nodeType)) {
- var ns = RED.nodes.registry.getNodeSetForType(nodeType);
- refreshNodeModule(ns.module);
- }
- });
- RED.events.on('registry:node-type-removed', function(nodeType) {
- if (!/^subflow:/.test(nodeType)) {
- var ns = RED.nodes.registry.getNodeSetForType(nodeType);
- refreshNodeModule(ns.module);
- }
- });
- RED.events.on('registry:node-set-added', function(ns) {
- refreshNodeModule(ns.module);
- for (var i=0;i
',{id:"user-settings-tabs-container"}).appendTo(trayBody);
+ var settingsContent = $('
').appendTo(trayBody);
+ var tabContainer = $('
',{id:"user-settings-tabs-container"}).appendTo(settingsContent);
$('
',{id:"user-settings-tabs"}).appendTo(tabContainer);
- var tabContents = $('
',{id:"user-settings-tabs-content"}).appendTo(trayBody);
-
- createViewPane().hide().appendTo(tabContents);
- RED.keyboard.getSettingsPane().hide().appendTo(tabContents);
-
- $('
').appendTo(tabContents);
-
-
- var tabs = RED.tabs.create({
+ var settingsTabs = RED.tabs.create({
id: "user-settings-tabs",
vertical: true,
onchange: function(tab) {
- $("#user-settings-tabs-content").children().hide();
- $("#" + tab.id).show();
+ setTimeout(function() {
+ $("#user-settings-tabs-content").children().hide();
+ $("#" + tab.id).show();
+ },50);
}
});
- tabs.addTab({
- id: "user-settings-tab-view",
- label: "View"
+ var tabContents = $('
',{id:"user-settings-tabs-content"}).appendTo(settingsContent);
+
+ panes.forEach(function(pane) {
+ settingsTabs.addTab({
+ id: "user-settings-tab-"+pane.id,
+ label: pane.title
+ });
+ pane.get().hide().appendTo(tabContents);
});
- tabs.addTab({
- id: "user-settings-tab-keyboard",
- label: "Keyboard"
- });
- tabs.addTab({
- id: "user-settings-tab-palette",
- label: "Palette"
- });
- if (initialTab) {
- tabs.activateTab("user-settings-tab-"+initialTab)
- }
+ settingsContent.i18n();
+ settingsTabs.activateTab("user-settings-tab-"+(initialTab||'view'))
},
close: function() {
settingsVisible = false;
-
- viewSettings.forEach(function(section) {
- section.options.forEach(function(opt) {
- var input = $("#user-settings-"+opt.setting);
- if (opt.toggle) {
- setSelected(opt.setting,input.prop('checked'));
- } else {
- setSelected(opt.setting,input.val());
- }
- });
- })
-
-
+ panes.forEach(function(pane) {
+ if (pane.close) {
+ pane.close();
+ }
+ });
},
show: function() {}
}
@@ -171,6 +160,24 @@ RED.userSettings = (function() {
RED.actions.add("core:show-user-settings",show);
RED.actions.add("core:show-help", function() { show('keyboard')});
+ addPane({
+ id:'view',
+ title: 'View',
+ get: createViewPane,
+ close: function() {
+ viewSettings.forEach(function(section) {
+ section.options.forEach(function(opt) {
+ var input = $("#user-settings-"+opt.setting);
+ if (opt.toggle) {
+ setSelected(opt.setting,input.prop('checked'));
+ } else {
+ setSelected(opt.setting,input.val());
+ }
+ });
+ })
+ }
+ })
+
viewSettings.forEach(function(section) {
section.options.forEach(function(opt) {
allSettings[opt.setting] = opt;
@@ -195,6 +202,8 @@ RED.userSettings = (function() {
}
return {
init: init,
- toggle: toggle
+ toggle: toggle,
+ show: show,
+ add: addPane
};
})();
diff --git a/editor/sass/palette-editor.scss b/editor/sass/palette-editor.scss
index 3f24a3e5c..48e007e10 100644
--- a/editor/sass/palette-editor.scss
+++ b/editor/sass/palette-editor.scss
@@ -14,13 +14,16 @@
* limitations under the License.
**/
+#user-settings-tab-palette {
+ height: 100%;
+}
+
#palette-editor {
text-align: left;
- display: none;
position: absolute;
top: 0px;
right: 0;
- bottom: 25px;
+ bottom: 0;
left:0;
padding: 0;
box-sizing:border-box;
@@ -51,7 +54,7 @@
}
.red-ui-editableList-item-content {
- padding: 12px 8px;
+ padding: 12px 16px;
}
&:last-child {
// border-bottom: 1px solid $primary-border-color;
@@ -61,7 +64,7 @@
}
.palette-editor-tab {
position:absolute;
- top:115px;
+ top:35px;
left:0;
right:0;
bottom:0
diff --git a/editor/templates/index.mst b/editor/templates/index.mst
index 4194eda27..0e92457d9 100644
--- a/editor/templates/index.mst
+++ b/editor/templates/index.mst
@@ -60,10 +60,6 @@
-