mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Split node UI rework - WIP
This commit is contained in:
@@ -150,7 +150,11 @@
|
||||
this.typeField = $("<input>",{type:'hidden'}).appendTo(this.uiSelect);
|
||||
}
|
||||
|
||||
this.selectTrigger = $('<a href="#"><i class="fa fa-sort-desc"></i></a>').prependTo(this.uiSelect);
|
||||
this.selectTrigger = $('<a href="#"></a>').prependTo(this.uiSelect);
|
||||
$('<i class="fa fa-sort-desc"></i>').appendTo(this.selectTrigger);
|
||||
if (this.types.length === 1) {
|
||||
this.selectTrigger.addClass("disabled");
|
||||
}
|
||||
this.selectLabel = $('<span></span>').appendTo(this.selectTrigger);
|
||||
|
||||
this.element.on('focus', function() {
|
||||
@@ -162,11 +166,17 @@
|
||||
this.element.on('change', function() {
|
||||
that.validate();
|
||||
})
|
||||
|
||||
this.selectTrigger.click(function(event) {
|
||||
event.preventDefault();
|
||||
that._showMenu(that.menu,that.selectTrigger);
|
||||
});
|
||||
if (this.types.length > 1) {
|
||||
this.selectTrigger.click(function(event) {
|
||||
event.preventDefault();
|
||||
that._showMenu(that.menu,that.selectTrigger);
|
||||
});
|
||||
} else {
|
||||
this.selectTrigger.click(function(event) {
|
||||
event.preventDefault();
|
||||
that.element.focus();
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
if (hasSubOptions) {
|
||||
|
@@ -57,21 +57,26 @@
|
||||
margin-top: 1px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
cursor: default;
|
||||
i {
|
||||
color: #bbb;
|
||||
}
|
||||
}
|
||||
span {
|
||||
display: inline-block;
|
||||
height: 100%;
|
||||
padding: 0 1px 0 5px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
&:not(.disabled):hover {
|
||||
text-decoration: none;
|
||||
background: $typedInput-button-background-hover;
|
||||
}
|
||||
&:focus {
|
||||
text-decoration: none;
|
||||
}
|
||||
&:active {
|
||||
&:not(.disabled):active {
|
||||
background: $typedInput-button-background-active;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
Reference in New Issue
Block a user