mrmap-community / Mapbender2.8

Other
3 stars 1 forks source link

Two 'Fenster schließen' in the Tab 'Nutzungsbedingungen' #137

Closed dpakprajul closed 11 months ago

dpakprajul commented 1 year ago

Problem

There are two Fenster schließen link in the tab Nutzungsbedingungen. When tried on both, they the same functionality, i.e. it closed the window (tab) in the browser. One is Fenster schließen with ß and another is Fenster schliessen with double s. The problem with two duplicates can be seen in the Karten container only. The scripts are coming from the mod_showMetadata.php:850:

//window close button top
        $html .= '<div style="padding:10px;display:block;text-align:center;"><a href="javascript:window.close()">'._mb('Close window').'</a>

and Fenster schliessen seems to be loading from the mod_getWmcDisclaimer.php:139.

echo "<div style='padding:10px;display:block;text-align:center;'><a href='javascript:window.close()'>Fenster schliessen</a></div>";

But showing the close window button twice in a single page will be unnecessary and should be handled.

grafik

The Fenster schliessen came as a result of function from another php: mod_getWmcDisclaimer.php. Check https://www.geoportal.hessen.de/mapbender/php/mod_getWmcDisclaimer.php?id=current&withHeader=true The above link can be achieved when you click on Nutzungsbedingungen. and looks like this: grafik _When another script used this script as their child, then the two duplicates appear. When javascript:window.close() is removed, it will be disappear fromt the Tab of the Metadata, but will be also removed in the Use Constraints page (link)_. So it should be handled carefully.

Possible solution might be:

It should load echo "<div style='padding:10px;display:block;text-align:center;'><a href='javascript:window.close()'>Fenster schliessen</a></div>"; when opened through its own script. When opened through another script like mod_showMetadata.php, it should not be loaded!

dpakprajul commented 1 year ago

Before:

grafik

After

grafik