mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-11-04 00:02:37 +01:00 
			
		
		
		
	Regions UI: Show selected region name in header
This commit is contained in:
		
							parent
							
								
									c954d8000b
								
							
						
					
					
						commit
						558b808a18
					
				@ -11073,6 +11073,7 @@ div.ui-dialog div.autoscaler div.field-group div.form-container form div.form-it
 | 
			
		||||
 | 
			
		||||
/*Regions*/
 | 
			
		||||
.region-switcher {
 | 
			
		||||
  display: inline-block;
 | 
			
		||||
  z-index: 2002;
 | 
			
		||||
  position: relative;
 | 
			
		||||
  background: url(../images/bg-gradients.png) 0px -1px;
 | 
			
		||||
@ -11084,7 +11085,6 @@ div.ui-dialog div.autoscaler div.field-group div.form-container form div.form-it
 | 
			
		||||
  border-radius: 4px;
 | 
			
		||||
  border-top: 1px solid #717171;
 | 
			
		||||
  border-bottom: 1px solid #FFFFFF;
 | 
			
		||||
  width: 32px;
 | 
			
		||||
  height: 28px;
 | 
			
		||||
  float: left;
 | 
			
		||||
  margin: 4px 13px 0 0;
 | 
			
		||||
@ -11213,10 +11213,26 @@ div.ui-dialog div.autoscaler div.field-group div.form-container form div.form-it
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.region-switcher .icon {
 | 
			
		||||
  display: inline-block;
 | 
			
		||||
  float: left;
 | 
			
		||||
  display: block;
 | 
			
		||||
  width: 100%;
 | 
			
		||||
  height: 100%;
 | 
			
		||||
  width: 26px;
 | 
			
		||||
  height: 26px;
 | 
			
		||||
  background: url(../images/sprites.png) -15px -1313px;
 | 
			
		||||
  position: absolute;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.region-switcher .title {
 | 
			
		||||
  display: inline-block;
 | 
			
		||||
  float: right;
 | 
			
		||||
  padding: 9px 9px 0 34px;
 | 
			
		||||
  color: #FFFFFF;
 | 
			
		||||
  font-size: 12px;
 | 
			
		||||
  font-weight: bold;
 | 
			
		||||
  max-width: 67px;
 | 
			
		||||
  overflow: hidden;
 | 
			
		||||
  text-overflow: ellipsis;
 | 
			
		||||
  white-space: nowrap;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.region-switcher:hover,
 | 
			
		||||
 | 
			
		||||
@ -37,6 +37,10 @@
 | 
			
		||||
 | 
			
		||||
              if (region.id == activeRegionID) {
 | 
			
		||||
                $li.addClass('active');
 | 
			
		||||
 | 
			
		||||
                $regionSwitcherButton.find('.title')
 | 
			
		||||
                  .html(_s(region.name))
 | 
			
		||||
                  .attr('title', _s(region.name));
 | 
			
		||||
              }
 | 
			
		||||
              
 | 
			
		||||
              $regionList.append($li);
 | 
			
		||||
@ -62,7 +66,8 @@
 | 
			
		||||
    var $regionSwitcherButton = $('<div>').addClass('region-switcher')
 | 
			
		||||
    .attr('title', 'Select region')
 | 
			
		||||
    .append(
 | 
			
		||||
      $('<span>').addClass('icon').html(' ')
 | 
			
		||||
      $('<span>').addClass('icon').html(' '),
 | 
			
		||||
      $('<span>').addClass('title').html('')
 | 
			
		||||
    );
 | 
			
		||||
 | 
			
		||||
    var closeRegionSelector = function(args) {
 | 
			
		||||
@ -72,7 +77,6 @@
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    var switchRegion = function(url) {
 | 
			
		||||
 | 
			
		||||
      closeRegionSelector({
 | 
			
		||||
        complete: function() {
 | 
			
		||||
          $('#container').prepend($('<div>').addClass('loading-overlay'));
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user