Skip to content

Commit

Permalink
fix: Fix error detection; add red dot for tab with errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
last-partizan committed Oct 9, 2020
1 parent aaa2dcf commit 9a93cf6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ backward compatibility:
padding: 0;
}

.ui-tabs .ui-tab-has-errors a::after {
content: "•";
color: #ba2121;
position: absolute;
font-size: 1.8rem;
}

.inline-group .tabular .ui-tabs .ui-tabs-panel {
padding: 5px;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,14 @@ var google, django, gettext;
'><a href="#' + tabId + '">' + lang.replace('_', '-') + '</a></li>');
tabsList.append(tab);
tabsContainer.append(panel);
if (container.hasClass("errors"))
activeTab = tabsList.length;
if (container.hasClass("errors")) {
activeTab = tabsList.find("li").length - 1;
tab.addClass("ui-tab-has-errors");
}
});
insertionPoint.el[insertionPoint.insert](tabsContainer);
tabsContainer.tabs({
active: activeTab,
active: activeTab,
});
tabs.push(tabsContainer);
});
Expand Down Expand Up @@ -348,8 +350,10 @@ var google, django, gettext;
'><a href="#' + tabId + '">' + lang.replace('_', '-') + '</a></li>');
tabsList.append($tab);
tabsContainer.append($panel);
if (container.hasClass("errors"))
activeTab = tabsList.length;
if (container.hasClass("errors")) {
activeTab = tabsList.find("li").length - 1;
tab.addClass("ui-tab-has-errors");
}
});
insertionPoint.el[insertionPoint.insert](tabsContainer);
tabsContainer.tabs({
Expand Down

0 comments on commit 9a93cf6

Please sign in to comment.