Skip to content

Commit

Permalink
Merge pull request #2195 from 2Abendsegler/Improve-clickability-on-li…
Browse files Browse the repository at this point in the history
…st-names

[Browse Map] Improve clickability on list names of add to list popup.
  • Loading branch information
capoaira authored Sep 28, 2022
2 parents aff7484 + 23889ea commit ab7e7b9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions gc_little_helper_II.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -2447,6 +2447,8 @@ var mainGC = function() {
+ ".CacheDetailNavigation .add_to_list_count {padding-left: 4px; color: inherit;}";
// Ugly display in Add to List Popup (GS bug since weeks).
css += "#newListName {height: 42px;} .add-list-submit {display: inline-block;}";
// Improve clickability on list names of add to list popup.
css += '.add-list li button {width: 100%; text-align: left;}';
appendCssStyle(css);
$('.add-to-list').addClass('working');
function check_for_add_to_list(waitCount) {
Expand Down Expand Up @@ -10247,20 +10249,19 @@ var mainGC = function() {
try {
function checkBrowseMap(waitCount) {
if ($('.leaflet-container')[0] || $('.Map.Google')[0]) {
var css = '';
// Display Google-Maps warning, wenn Leaflet-Map nicht aktiv ist.
googleMapsWarningOnBrowseMap();
// Add layers, control to map and set default layers.
if (settings_use_gclh_layercontrol && getValue("gclhLeafletMapActive")) {
addLayersOnBrowseMap();
} else {
// Buttons auch ohne GClh halbwegs ausrichten. (GC Layer sind ok, GME ist etwas verrutscht, geht aber.)
var css = '';
css += '.leaflet-control-layers-list {right: 0px; top: 0px; height: inherit; display: none; position: absolute !important; border-radius: 7px; box-shadow: 0 1px 7px rgba(0,0,0,0.4); background-color: white; white-space: nowrap; padding: 6px;}';
if (is_page('map')) {
// Damit auch mehr als 2 Buttons handlebar.
css += '.leaflet-control-layers + .leaflet-control {position: unset; right: unset;} .leaflet-control {clear: left}';
}
appendCssStyle(css);
}
// Hide Map Header.
hideHeaderOnBrowseMap();
Expand All @@ -10284,6 +10285,9 @@ var mainGC = function() {
if (settings_show_enhanced_map_popup && getValue("gclhLeafletMapActive")) {
cachePopupOnBrowseMap();
}
// Improve clickability on list names of add to list popup.
css += '.add-list li button {width: 100%; text-align: left;} .pop-modal .status {width: initial;}';
appendCssStyle(css);
} else {waitCount++; if (waitCount <= 100) setTimeout(function(){checkBrowseMap(waitCount);}, 100);}
}
checkBrowseMap(0);
Expand Down

0 comments on commit ab7e7b9

Please sign in to comment.