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

better spacing for library widget

This commit is contained in:
Dave Conway-Jones 2017-06-05 17:04:31 +01:00
parent 7c42b04eff
commit d8e6a7b687
No known key found for this signature in database
GPG Key ID: 81B04231572A9A2D

View File

@ -110,7 +110,7 @@ RED.library = (function() {
function buildFileList(root,data) { function buildFileList(root,data) {
var ul = document.createElement("ul"); var ul = document.createElement("ul");
var li; var li;
for (var i=0;i<data.length;i++) { for (var i=0; i<data.length; i++) {
var v = data[i]; var v = data[i];
if (typeof v === "string") { if (typeof v === "string") {
// directory // directory
@ -157,7 +157,7 @@ RED.library = (function() {
return ul; return ul;
} }
$('#node-input-name').css("width","60%").after( $('#node-input-name').css("width","66%").after(
'<div class="btn-group" style="margin-left: 5px;">'+ '<div class="btn-group" style="margin-left: 5px;">'+
'<a id="node-input-'+options.type+'-lookup" class="editor-button" data-toggle="dropdown"><i class="fa fa-book"></i> <i class="fa fa-caret-down"></i></a>'+ '<a id="node-input-'+options.type+'-lookup" class="editor-button" data-toggle="dropdown"><i class="fa fa-book"></i> <i class="fa fa-caret-down"></i></a>'+
'<ul class="dropdown-menu pull-right" role="menu">'+ '<ul class="dropdown-menu pull-right" role="menu">'+
@ -166,8 +166,6 @@ RED.library = (function() {
'</ul></div>' '</ul></div>'
); );
$('#node-input-'+options.type+'-menu-open-library').click(function(e) { $('#node-input-'+options.type+'-menu-open-library').click(function(e) {
$("#node-select-library").children().remove(); $("#node-select-library").children().remove();
var bc = $("#node-dialog-library-breadcrumbs"); var bc = $("#node-dialog-library-breadcrumbs");
@ -264,7 +262,7 @@ RED.library = (function() {
class: "primary", class: "primary",
click: function() { click: function() {
if (selectedLibraryItem) { if (selectedLibraryItem) {
for (var i=0;i<options.fields.length;i++) { for (var i=0; i<options.fields.length; i++) {
var field = options.fields[i]; var field = options.fields[i];
$("#node-input-"+field).val(selectedLibraryItem[field]); $("#node-input-"+field).val(selectedLibraryItem[field]);
} }
@ -327,7 +325,7 @@ RED.library = (function() {
} }
var queryArgs = []; var queryArgs = [];
var data = {}; var data = {};
for (var i=0;i<options.fields.length;i++) { for (var i=0; i<options.fields.length; i++) {
var field = options.fields[i]; var field = options.fields[i];
if (field == "name") { if (field == "name") {
data.name = name; data.name = name;