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

Add tip to tab description editor

(and remove icons)
This commit is contained in:
Dave Conway-Jones 2017-04-16 21:08:32 +01:00
parent 1c470ab9e3
commit 2ac9c11ec9
No known key found for this signature in database
GPG Key ID: 81B04231572A9A2D
2 changed files with 7 additions and 4 deletions

View File

@ -136,7 +136,7 @@ RED.workspaces = (function() {
height -= $(rows[i]).outerHeight(true); height -= $(rows[i]).outerHeight(true);
} }
height -= (parseInt($("#dialog-form").css("marginTop"))+parseInt($("#dialog-form").css("marginBottom"))); height -= (parseInt($("#dialog-form").css("marginTop"))+parseInt($("#dialog-form").css("marginBottom")));
height -= 20; height -= 28;
$(".node-text-editor").css("height",height+"px"); $(".node-text-editor").css("height",height+"px");
tabflowEditor.resize(); tabflowEditor.resize();
}, },
@ -149,13 +149,13 @@ RED.workspaces = (function() {
'</div>').appendTo(dialogForm); '</div>').appendTo(dialogForm);
$('<div class="form-row">'+ $('<div class="form-row">'+
'<label for="node-input-disabled-btn" data-i18n="[append]editor:workspace.status"><i class="fa fa-toggle-on"></i> </label>'+ '<label for="node-input-disabled-btn" data-i18n="editor:workspace.status"></label>'+
'<button id="node-input-disabled-btn" class="editor-button"><i class="fa fa-toggle-on"></i> <span id="node-input-disabled-label"></span></button> '+ '<button id="node-input-disabled-btn" class="editor-button"><i class="fa fa-toggle-on"></i> <span id="node-input-disabled-label"></span></button> '+
'<input type="checkbox" id="node-input-disabled" style="display: none;"/>'+ '<input type="checkbox" id="node-input-disabled" style="display: none;"/>'+
'</div>').appendTo(dialogForm); '</div>').appendTo(dialogForm);
$('<div class="form-row node-text-editor-row">'+ $('<div class="form-row node-text-editor-row">'+
'<label for="node-input-info" data-i18n="[append]editor:workspace.info" style="width:300px;"><i class="fa fa-info-circle"></i> </label>'+ '<label for="node-input-info" data-i18n="editor:workspace.info" style="width:300px;"></label>'+
'<div style="height:250px;" class="node-text-editor" id="node-input-info"></div>'+ '<div style="height:250px;" class="node-text-editor" id="node-input-info"></div>'+
'</div>').appendTo(dialogForm); '</div>').appendTo(dialogForm);
tabflowEditor = RED.editor.createEditor({ tabflowEditor = RED.editor.createEditor({
@ -164,6 +164,8 @@ RED.workspaces = (function() {
value: "" value: ""
}); });
$('<div class="form-tips" data-i18n="editor:workspace.tip"></div>').appendTo(dialogForm);
dialogForm.find('#node-input-disabled-btn').on("click",function(e) { dialogForm.find('#node-input-disabled-btn').on("click",function(e) {
var i = $(this).find("i"); var i = $(this).find("i");
if (i.hasClass('fa-toggle-off')) { if (i.hasClass('fa-toggle-off')) {

View File

@ -22,7 +22,8 @@
"status": "Status", "status": "Status",
"enabled": "Enabled", "enabled": "Enabled",
"disabled":"Disabled", "disabled":"Disabled",
"info": "Information, in markdown format" "info": "Description",
"tip": "Description will accept Markdown and will appear in the Info tab."
}, },
"menu": { "menu": {
"label": { "label": {