Difference between revisions of "Rename tab in Elections Stats Dashboard"

From UnionCloud Support
Jump to: navigation, search
(Created page with "// Fix for changing 'halls' to 'schools' $(function(){ if($(".uc-election-dashboard").length > 0){ $(".hall a").text("Schools"); if($(".hall.active").leng...")
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
// Fix for changing 'halls' to 'schools'
+
If you want to change the Name of one of the tabs on the Election Stats Dashboard, and you have access to [[Global Javascript]] you can do this using the following lines of code]]
$(function(){   
+
 
    if($(".uc-election-dashboard").length > 0){
+
To rename the Halls tab to Schools for example use the code below;
      $(".hall a").text("Schools");
+
<syntaxhighlight lang="javascript" line='line'>
+
    // Fix for changing 'halls' to 'schools'
      if($(".hall.active").length > 0){  
+
    $(function(){   
        $(".uc-top-turnouts-headings").text("Schools");
+
        if($(".uc-election-dashboard").length > 0){
      }
+
          $(".hall a").text("Schools");
  }
+
   
})
+
          if($(".hall.active").length > 0){  
 +
            $(".uc-top-turnouts-headings").text("Schools");
 +
          }
 +
      }
 +
    })
 +
</syntaxhighlight>

Latest revision as of 15:10, 29 March 2017

If you want to change the Name of one of the tabs on the Election Stats Dashboard, and you have access to Global Javascript you can do this using the following lines of code]]

To rename the Halls tab to Schools for example use the code below;

 1     // Fix for changing 'halls' to 'schools'
 2     $(function(){   
 3         if($(".uc-election-dashboard").length > 0){
 4           $(".hall a").text("Schools");
 5      
 6           if($(".hall.active").length > 0){ 
 7             $(".uc-top-turnouts-headings").text("Schools");
 8           }
 9        }
10     })