1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Add subflow edit button to palette tooltip

This commit is contained in:
Nick O'Leary 2021-01-29 10:42:04 +00:00
parent 9c1ce5543d
commit e5b7ccb612
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -170,9 +170,16 @@ RED.palette = (function() {
metaData = typeInfo.set.module+" : "; metaData = typeInfo.set.module+" : ";
} }
metaData += type; metaData += type;
if (/^subflow:/.test(type)) {
$('<button type="button" onclick="RED.workspaces.show(\''+type.substring(8).replace(/'/g,"\\'")+'\'); return false;" class="red-ui-button red-ui-button-small" style="float: right; margin-left: 5px;"><i class="fa fa-pencil"></i></button>').appendTo(popOverContent)
}
var safeType = type.replace(/'/g,"\\'"); var safeType = type.replace(/'/g,"\\'");
$('<button type="button" onclick="RED.sidebar.info.outliner.search(\'type:'+safeType+'\'); RED.sidebar.info.show(); return false;" class="red-ui-button red-ui-button-small" style="float: right; margin-left: 5px;"><i class="fa fa-search"></i></button>').appendTo(popOverContent)
$('<button type="button" onclick="RED.sidebar.help.show(\''+safeType+'\'); return false;" class="red-ui-button red-ui-button-small" style="float: right"><i class="fa fa-book"></i></button>').appendTo(popOverContent) $('<button type="button" onclick="RED.search.show(\'type:'+safeType+'\'); return false;" class="red-ui-button red-ui-button-small" style="float: right; margin-left: 5px;"><i class="fa fa-search"></i></button>').appendTo(popOverContent)
$('<button type="button" onclick="RED.sidebar.help.show(\''+safeType+'\'); return false;" class="red-ui-button red-ui-button-small" style="float: right; margin-left: 5px;"><i class="fa fa-book"></i></button>').appendTo(popOverContent)
$('<p>',{style:"font-size: 0.8em"}).text(metaData).appendTo(popOverContent); $('<p>',{style:"font-size: 0.8em"}).text(metaData).appendTo(popOverContent);
} }
} catch(err) { } catch(err) {