mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Fix library ui
This commit is contained in:
parent
d00624f9e3
commit
775297d625
@ -246,7 +246,7 @@
|
|||||||
<form class="form-horizontal">
|
<form class="form-horizontal">
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<ul id="node-dialog-library-breadcrumbs" class="breadcrumb">
|
<ul id="node-dialog-library-breadcrumbs" class="breadcrumb">
|
||||||
<li class="active"><a href="#">Library</a> <span class="divider">/</span></li>
|
<li class="active"><a href="#">Library</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
|
@ -17,7 +17,7 @@ RED.library = function() {
|
|||||||
|
|
||||||
|
|
||||||
function loadFlowLibrary() {
|
function loadFlowLibrary() {
|
||||||
d3.json("library/flows",function(data) {
|
$.getJSON("library/flows",function(data) {
|
||||||
//console.log(data);
|
//console.log(data);
|
||||||
|
|
||||||
var buildMenu = function(data,root) {
|
var buildMenu = function(data,root) {
|
||||||
@ -84,7 +84,7 @@ RED.library = function() {
|
|||||||
li.onclick = function () {
|
li.onclick = function () {
|
||||||
var dirName = v;
|
var dirName = v;
|
||||||
return function(e) {
|
return function(e) {
|
||||||
var bcli = $('<li class="active"><a href="#">'+dirName+'</a> <span class="divider">/</span></li>');
|
var bcli = $('<li class="active"><span class="divider">/</span> <a href="#">'+dirName+'</a></li>');
|
||||||
$("a",bcli).click(function(e) {
|
$("a",bcli).click(function(e) {
|
||||||
$(this).parent().nextAll().remove();
|
$(this).parent().nextAll().remove();
|
||||||
$.getJSON("library/"+options.url+root+dirName,function(data) {
|
$.getJSON("library/"+options.url+root+dirName,function(data) {
|
||||||
@ -112,6 +112,7 @@ RED.library = function() {
|
|||||||
$(".list-selected",ul).removeClass("list-selected");
|
$(".list-selected",ul).removeClass("list-selected");
|
||||||
$(this).addClass("list-selected");
|
$(this).addClass("list-selected");
|
||||||
$.get("library/"+options.url+root+item.fn, function(data) {
|
$.get("library/"+options.url+root+item.fn, function(data) {
|
||||||
|
console.log(data);
|
||||||
selectedLibraryItem = item;
|
selectedLibraryItem = item;
|
||||||
libraryEditor.setText(data);
|
libraryEditor.setText(data);
|
||||||
});
|
});
|
||||||
@ -239,12 +240,13 @@ RED.library = function() {
|
|||||||
open: function(e) {
|
open: function(e) {
|
||||||
var form = $("form",this);
|
var form = $("form",this);
|
||||||
form.height(form.parent().height()-30);
|
form.height(form.parent().height()-30);
|
||||||
$(".form-row:last-child",form).height(form.height()-60);
|
$("#node-select-library-text").height("100%");
|
||||||
|
$(".form-row:last-child",form).children().height(form.height()-60);
|
||||||
},
|
},
|
||||||
resize: function(e) {
|
resize: function(e) {
|
||||||
var form = $("form",this);
|
var form = $("form",this);
|
||||||
form.height(form.parent().height()-30);
|
form.height(form.parent().height()-30);
|
||||||
$(".form-row:last-child",form).height(form.height()-60);
|
$(".form-row:last-child",form).children().height(form.height()-60);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user