Nits and style changes
This commit is contained in:
		| @@ -5,12 +5,17 @@ | |||||||
| window._highlighters = null; | window._highlighters = null; | ||||||
| window._current_highlighter = localStorage.portal_highlighter; | window._current_highlighter = localStorage.portal_highlighter; | ||||||
| window.changing_highlighters = false; | window.changing_highlighters = false; | ||||||
|  | window._no_highlighter = 'No Highlights'; | ||||||
|  |  | ||||||
| window.addPortalHighlighter = function(name, callback) { | window.addPortalHighlighter = function(name, callback) { | ||||||
|   if(_highlighters === null) { |   if(_highlighters === null) { | ||||||
|     _highlighters = {}; |     _highlighters = {}; | ||||||
|   } |   } | ||||||
|   _highlighters[name] = callback; |   _highlighters[name] = callback; | ||||||
|  |   if(localStorage.portal_highlighter === undefined) { | ||||||
|  |     _current_highlighter = name; | ||||||
|  |     localStorage.portal_highlighter = name; | ||||||
|  |   } | ||||||
|   portalHighlighterControl(); |   portalHighlighterControl(); | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -20,12 +25,13 @@ window.portalHighlighterControl = function() { | |||||||
|       $("body").append("<select id='portal_highlight_select'></select>"); |       $("body").append("<select id='portal_highlight_select'></select>"); | ||||||
|     } |     } | ||||||
|     $("#portal_highlight_select").html(''); |     $("#portal_highlight_select").html(''); | ||||||
|     $("#portal_highlight_select").append($("<option>").attr('value','No Highlights').text('No Highlights')); |     $("#portal_highlight_select").append($("<option>").attr('value',_no_highlighter).text(_no_highlighter)); | ||||||
|     $.each(_highlighters, function(name, callback) {   |     $.each(_highlighters, function(name, callback) {   | ||||||
|       $("#portal_highlight_select").append($("<option>").attr('value',name).text(name)); |       $("#portal_highlight_select").append($("<option>").attr('value',name).text(name)); | ||||||
|     }); |     }); | ||||||
|     $("#portal_highlight_select").val(localStorage.portal_highlighter); |     $("#portal_highlight_select").val(_current_highlighter); | ||||||
|     $("#portal_highlight_select").change(function(){ changePortalHighlights($(this).val());}); |     $("#portal_highlight_select").change(function(){ changePortalHighlights($(this).val());}); | ||||||
|  |     $(".leaflet-top.leaflet-left").css('margin-top','25px'); | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -38,6 +44,7 @@ window.changePortalHighlights = function(name) { | |||||||
| } | } | ||||||
|  |  | ||||||
| window.highlightPortal = function(p) { | window.highlightPortal = function(p) { | ||||||
|  |    | ||||||
|   if(_highlighters !== null && _highlighters[_current_highlighter] !== undefined) { |   if(_highlighters !== null && _highlighters[_current_highlighter] !== undefined) { | ||||||
|     p.options.highligher = _current_highlighter; |     p.options.highligher = _current_highlighter; | ||||||
|     _highlighters[_current_highlighter]({portal: p}); |     _highlighters[_current_highlighter]({portal: p}); | ||||||
|   | |||||||
| @@ -118,3 +118,15 @@ body { | |||||||
| .leaflet-control-attribution { | .leaflet-control-attribution { | ||||||
|  |  | ||||||
| } | } | ||||||
|  |  | ||||||
|  | #portal_highlight_select{ | ||||||
|  |   position: absolute; | ||||||
|  |   top:42px; | ||||||
|  |   left:310px; | ||||||
|  |   z-index: 9999; | ||||||
|  |   font-size:11px; | ||||||
|  |   font-family: "coda",arial,helvetica,sans-serif; | ||||||
|  |   background-color:#0E3C46; | ||||||
|  |   color:#ffce00; | ||||||
|  |    | ||||||
|  | } | ||||||
|   | |||||||
| @@ -822,8 +822,8 @@ td + td { | |||||||
|  |  | ||||||
| #portal_highlight_select{ | #portal_highlight_select{ | ||||||
|   position: absolute; |   position: absolute; | ||||||
|   top:10px; |   top:5px; | ||||||
|   left:70px; |   left:10px; | ||||||
|   z-index: 9999; |   z-index: 9999; | ||||||
|   font-size:11px; |   font-size:11px; | ||||||
|   font-family: "coda",arial,helvetica,sans-serif; |   font-family: "coda",arial,helvetica,sans-serif; | ||||||
| @@ -831,3 +831,5 @@ td + td { | |||||||
|   color:#ffce00; |   color:#ffce00; | ||||||
|    |    | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user