Ankündigung

Einklappen
Keine Ankündigung bisher.

Popup problem in graphics design page

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    Popup problem in graphics design page

    Hello,

    Popup does not work on graphical pages. It doesn't work properly on my pages or example3.graphic pages. It works on the page that index.html retrieves directly, but not on other footer pages.

    Here's a link where its fix is explained, but only works on a page that goes directly.

    https://github.com/Martin-Gleiss/sma...eadme_menu.txt

    Br, Tomas
    Zuletzt geändert von tfinell; 08.06.2020, 05:50.

    #2
    Hi Tomas,

    I have tested example3.graphics pages again on my Raspberry Pi and also in a simulation environment on my PC - both using Apache as web server. The error you descibe is not reproducible here right now with Firefox or Edge. All integrated popups (eg. ovdevice.dimmer or the plot popups) work as expected.

    However there seems to be a bug with the pulldown menu (top right corner) on the pages selectable by the footer menu exept the one directly called by index.html. If the menu button is clicked, only the attribute "#&ui-state=dialog" is being appended to the URL in the address field. If this happens, no popup is working any more. I'll try to fix this but currently there is only the workaround solution to press the "back" button in your browser in order to make the appended attribute disappear and then perform a page reload.

    Concerning the fix you mentioned above there is one hint: smartVISU is working with unique identifiers for the popups and widgets. The page name is part of these ids. If you call the same page once by "index.php" and once by "overview/eg.html" there will be two sets of ids for the same page. In order to prevent this, the page "overview/eg.html" contains the command
    Code:
    {% set page="eg" %}
    If you now rename your own pages (which you did, as i know ) you need to change that statement, as well. Otherwise the footer menu will not work correctly:

    Code:
    <li><a href="index.php" id="overview_eg" data-prefetch="true"
    class="footer-menu ui-btn-icon-top {{ page starts with 'eg' ? 'ui-btn-active ui-state-persist' : ''}}">Erdgeschoss</a></li>
    There is a bug concernig plots (e.g. plot.period). I forgot to delete the obsolete "plot.html" in /pages/example3.graphic/widgets. Please delete this there and also from /pages/<yourPages>/widgets. plot.html is automatically being imported from the right location /widgets in the root directory.

    best regards
    Wolfram

    Kommentar


      #3
      Hello Wolfram,

      I have already implemented these to my code:

      Code:
      {% set page="eg" %}
      
      <li><a href="index.php" id="overview_eg" data-prefetch="true" class="footer-menu ui-btn-icon-top {{ page starts with 'eg' ? 'ui-btn-active ui-state-persist' : ''}}">Erdgeschoss</a></li>
      All the other popups work fine except top right corner pulldown menu. Thank you for working on this. I wait for the fix.

      BR,
      Tomas

      Kommentar


        #4
        Hi Tomas,

        good that the popups work as expected now. Of course you can replace 'eg' by 'alakerta' as long as you do that consistently everywhere

        The fix for the popup menu is easy: just make sure that duplicate ids are avoided. If I bind a popup to a page it can not have the same id on the next page. Now, that I've learned that I changed "overview/base.html" as follows (see the highlighted insertions):
        Code:
        {% block body %}
        <div data-role="page" id="{{ page }}" class="base" data-theme="a">
        	<div data-role="header"  id="{{ page }}-header" data-position="fixed" data-tap-toggle="false" data-theme="a">
        		<a href="#" data-rel="back" data-icon="arrow-l">Zurück</a>
        		<h1 style="font-size: 1.5em;">
        			{{ page starts with 'dg' ? 'Dachgeschoss' : ''}}
        			{{ page starts with 'eg' ? 'Erdgeschoss' : ''}}
        			{{ page starts with 'garten' ? 'Außenbereich' : ''}}
        			{{ page starts with 'room' ? 'Raum' : ''}}
        			{{ page starts with 'config' ? 'Konfiguration' : ''}}
        			{{ page starts with 'wp' ? 'Wärmepumpe' : ''}}
        		</h1>
        		<a href="#{{page}}-popupMenu" data-rel="popup" data-icon="grid" class="ui-btn-right">Menü</a>
        	</div>
        	<div data-role="popup" id="{{page}}-popupMenu" data-theme="b">
        			{% include 'overview/menu_popup.html' %}
        	</div>
        Hope this works for you, as well. If yes, please mark this thread as "solved" ("gelöst").

        Best regards
        Wolfram

        Kommentar


          #5
          Thank you Wofram,

          That solved the problem.

          BR,

          Tomas

          Kommentar

          Lädt...
          X