'+
@@ -625,6 +598,7 @@ RED.palette.editor = (function() {
var buttonGroup = $('
',{class:"palette-module-button-group"}).appendTo(buttonRow);
var updateButton = $('
').html(RED._('palette.editor.update')).appendTo(buttonGroup);
+ updateButton.attr('id','up_'+Math.floor(Math.random()*1000000000));
updateButton.click(function(evt) {
evt.preventDefault();
if ($(this).hasClass('disabled')) {
@@ -652,6 +626,7 @@ RED.palette.editor = (function() {
var removeButton = $('
').html(RED._('palette.editor.remove')).appendTo(buttonGroup);
+ removeButton.attr('id','up_'+Math.floor(Math.random()*1000000000));
removeButton.click(function(evt) {
evt.preventDefault();
@@ -760,7 +735,7 @@ RED.palette.editor = (function() {
.searchBox({
delay: 300,
change: function() {
- var searchTerm = $(this).val().toLowerCase();
+ var searchTerm = $(this).val().trim().toLowerCase();
if (searchTerm.length > 0) {
filteredList = loadedList.filter(function(m) {
return (m.index.indexOf(searchTerm) > -1);
@@ -770,6 +745,8 @@ RED.palette.editor = (function() {
} else {
searchInput.searchBox('count',loadedList.length);
packageList.editableList('empty');
+ packageList.editableList('addItem',{count:loadedList.length});
+
}
}
});
@@ -816,7 +793,10 @@ RED.palette.editor = (function() {
addButton: false,
scrollOnAdd: false,
addItem: function(container,i,object) {
-
+ if (object.count) {
+ $('
',{class:"red-ui-search-empty"}).html(RED._('palette.editor.moduleCount',{count:object.count})).appendTo(container);
+ return
+ }
if (object.more) {
container.addClass('palette-module-more');
var moreRow = $('
',{class:"palette-module-header palette-module"}).appendTo(container);
@@ -962,7 +942,6 @@ RED.palette.editor = (function() {
}
return {
- init: init,
- show: showPaletteEditor
+ init: init
}
})();
diff --git a/editor/js/ui/search.js b/editor/js/ui/search.js
index 693154436..df36f7f5d 100644
--- a/editor/js/ui/search.js
+++ b/editor/js/ui/search.js
@@ -265,8 +265,6 @@ RED.search = (function() {
RED.events.on("editor:open",function() { disabled = true; });
RED.events.on("editor:close",function() { disabled = false; });
- RED.events.on("palette-editor:open",function() { disabled = true; });
- RED.events.on("palette-editor:close",function() { disabled = false; });
RED.events.on("type-search:open",function() { disabled = true; });
RED.events.on("type-search:close",function() { disabled = false; });
diff --git a/editor/js/ui/userSettings.js b/editor/js/ui/userSettings.js
index f36102f69..cd70e57e2 100644
--- a/editor/js/ui/userSettings.js
+++ b/editor/js/ui/userSettings.js
@@ -60,6 +60,9 @@ RED.userSettings = (function() {
setTimeout(function() {
$("#user-settings-tabs-content").children().hide();
$("#" + tab.id).show();
+ if (tab.pane.focus) {
+ tab.pane.focus();
+ }
},50);
}
});
@@ -68,12 +71,14 @@ RED.userSettings = (function() {
panes.forEach(function(pane) {
settingsTabs.addTab({
id: "user-settings-tab-"+pane.id,
- label: pane.title
+ label: pane.title,
+ pane: pane
});
pane.get().hide().appendTo(tabContents);
});
settingsContent.i18n();
settingsTabs.activateTab("user-settings-tab-"+(initialTab||'view'))
+ $("#sidebar-shade").show();
},
close: function() {
settingsVisible = false;
@@ -82,6 +87,8 @@ RED.userSettings = (function() {
pane.close();
}
});
+ $("#sidebar-shade").hide();
+
},
show: function() {}
}
diff --git a/red/api/locales/en-US/editor.json b/red/api/locales/en-US/editor.json
index c572ed4b0..ffbdb9407 100644
--- a/red/api/locales/en-US/editor.json
+++ b/red/api/locales/en-US/editor.json
@@ -293,6 +293,8 @@
},
"nodeCount": "__label__ node",
"nodeCount_plural": "__label__ nodes",
+ "moduleCount": "__count__ module available",
+ "moduleCount_plural": "__count__ modules available",
"inuse": "in use",
"enableall": "enable all",
"disableall": "disable all",