prettify route build page
This commit is contained in:
		
							parent
							
								
									7cb7671841
								
							
						
					
					
						commit
						4e3df8121d
					
				
							
								
								
									
										39
									
								
								main.js
									
									
									
									
									
								
							
							
						
						
									
										39
									
								
								main.js
									
									
									
									
									
								
							@ -989,6 +989,10 @@
 | 
			
		||||
    document.body.appendChild(clearEl)
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  function hasMap() {
 | 
			
		||||
    return document.querySelector(".leaflet-container") !== null
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  function initMapbox() {
 | 
			
		||||
    addJs('https://api.mapbox.com/mapbox.js/plugins/leaflet-fullscreen/v1.0.1/Leaflet.fullscreen.min.js')
 | 
			
		||||
    addCss('https://api.mapbox.com/mapbox.js/plugins/leaflet-fullscreen/v1.0.1/leaflet.fullscreen.css')
 | 
			
		||||
@ -1436,6 +1440,34 @@
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  function prettifyRouteBuildPage() {
 | 
			
		||||
    let styles = `
 | 
			
		||||
      #content table table {
 | 
			
		||||
        td:nth-child(2) {
 | 
			
		||||
          width: 10%;
 | 
			
		||||
 | 
			
		||||
          select {
 | 
			
		||||
            width: 5em !important;
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        td:nth-child(3) {
 | 
			
		||||
          width: 12%;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        td:nth-child(4) {
 | 
			
		||||
          width: 12%;
 | 
			
		||||
 | 
			
		||||
          input {
 | 
			
		||||
            width: 4em;
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    `
 | 
			
		||||
 | 
			
		||||
    addStylesToHead(styles)
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  let styles = `
 | 
			
		||||
    .sticky-menu {
 | 
			
		||||
      position: sticky;
 | 
			
		||||
@ -1808,7 +1840,8 @@
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  addClearBoth()
 | 
			
		||||
  if (document.querySelector(".leaflet-container")) {
 | 
			
		||||
 | 
			
		||||
  if (hasMap()) {
 | 
			
		||||
    initMapbox()
 | 
			
		||||
    addFullscreenButton()
 | 
			
		||||
 | 
			
		||||
@ -1826,4 +1859,8 @@
 | 
			
		||||
  if (isRouteListPage()) {
 | 
			
		||||
    addStageLink()
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if (isRouteBuildPage()) {
 | 
			
		||||
    prettifyRouteBuildPage()
 | 
			
		||||
  }
 | 
			
		||||
})();
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user