mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Merge branch 'pr_2990' into dev
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
/**
|
||||
* options:
|
||||
* - addButton : boolean|string - text for add label, default 'add'
|
||||
* - buttons : array - list of custom buttons (objects with fields 'label', 'icon', 'title', 'click')
|
||||
* - buttons : array - list of custom buttons (objects with fields 'id', 'label', 'icon', 'title', 'click')
|
||||
* - height : number|'auto'
|
||||
* - resize : function - called when list as a whole is resized
|
||||
* - resizeItem : function(item) - called to resize individual item
|
||||
@@ -94,7 +94,7 @@
|
||||
}
|
||||
|
||||
buttons.forEach(function(button) {
|
||||
var element = $('<a href="#" class="red-ui-button red-ui-button-small red-ui-editableList-addButton" style="margin-top: 4px; margin-right: 5px;"></a>')
|
||||
var element = $('<button type="button" class="red-ui-button red-ui-button-small red-ui-editableList-addButton" style="margin-top: 4px; margin-right: 5px;"></button>')
|
||||
.appendTo(that.topContainer)
|
||||
.on("click", function(evt) {
|
||||
evt.preventDefault();
|
||||
@@ -103,6 +103,9 @@
|
||||
}
|
||||
});
|
||||
|
||||
if (button.id) {
|
||||
element.attr("id", button.id);
|
||||
}
|
||||
if (button.title) {
|
||||
element.attr("title", button.title);
|
||||
}
|
||||
|
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
**/
|
||||
RED.tray = (function() {
|
||||
RED.tray = (function() {
|
||||
|
||||
var stack = [];
|
||||
var editorStack;
|
||||
@@ -288,9 +288,9 @@ RED.tray = (function() {
|
||||
right: -(tray.tray.width()+10)+"px"
|
||||
});
|
||||
setTimeout(function() {
|
||||
if (tray.options.close) {
|
||||
tray.options.close();
|
||||
}
|
||||
try {
|
||||
if (tray.options.close) { tray.options.close(); }
|
||||
} catch (ex) { }
|
||||
tray.tray.remove();
|
||||
if (stack.length > 0) {
|
||||
var oldTray = stack[stack.length-1];
|
||||
|
Reference in New Issue
Block a user