mirror of https://github.com/node-red/node-red.git
Merge pull request #5355 from GogoVega/improve-next-previous-tab-action
Allow actions show-next-tab and previous to looppull/5401/head^2
commit
92ca0eea83
|
|
@ -443,12 +443,18 @@ RED.tabs = (function() {
|
|||
}
|
||||
function activatePreviousTab() {
|
||||
var previous = findPreviousVisibleTab();
|
||||
if (previous.length === 0) {
|
||||
previous = ul.find("li.red-ui-tab:not(.hide-tab)").last();
|
||||
}
|
||||
if (previous.length > 0) {
|
||||
activateTab(previous.find("a"));
|
||||
}
|
||||
}
|
||||
function activateNextTab() {
|
||||
var next = findNextVisibleTab();
|
||||
if (next.length === 0) {
|
||||
next = ul.find("li.red-ui-tab:not(.hide-tab)").first();
|
||||
}
|
||||
if (next.length > 0) {
|
||||
activateTab(next.find("a"));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue