[yocto] [patchwork][PATCH] htdocs/js/series.js: Style active tab in series data bar
Jose Lamego
jose.a.lamego at linux.intel.com
Wed Sep 6 18:25:19 PDT 2017
There is no visual indication on which is the active tab
at the Series data bar, providing a poor UX.
This change adds the "active" styling to the Series data bar.
[YOCTO #11886]
Signed-off-by: Jose Lamego <jose.a.lamego at linux.intel.com>
---
htdocs/js/series.js | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/htdocs/js/series.js b/htdocs/js/series.js
index 857d288..ebfbbdf 100644
--- a/htdocs/js/series.js
+++ b/htdocs/js/series.js
@@ -9,6 +9,7 @@ $(document).ready(function(){
testsView=document.getElementById('tests_results')
covContent=document.getElementsByClassName('content')[0]
covTab=document.getElementById('cover-letter-tab')
+ patchesTab=document.getElementById('patches-tab')
var patches = new Array()
if ($( patchesInput[0] ).value){
patches=json_decode($( patchesInput[0] ).value, true)
@@ -21,17 +22,21 @@ $(document).ready(function(){
revTab.style.padding='15px'
patchView.style.display='none'
if (covContent){
+ covTab.classList.add('active')
coverView.style.display='block'
patchList.style.display='none'
}
else{
covTab.innerHTML = '<a href="#" data-toggle="tooltip" title="No cover letter is available for this series.">Cover letter N/A</a>'
+ patchesTab.classList.add('active')
coverView.style.display='none'
patchList.style.display='block'
}
seriesForms.style.display='none'
- document.getElementById('cover-letter-tab').onclick=function(){
+ covTab.onclick=function(){
+ covTab.classList.add('active')
+ patchesTab.classList.remove('active')
coverView.style.display='block'
patchView.style.display='none'
patchList.style.display='none'
@@ -41,7 +46,9 @@ $(document).ready(function(){
}
}
- document.getElementById('patches-tab').onclick=function(){
+ patchesTab.onclick=function(){
+ covTab.classList.remove('active')
+ patchesTab.classList.add('active')
coverView.style.display='none'
patchList.style.display='block'
patchView.style.display="none"
--
2.7.4
More information about the yocto
mailing list