#4548 srcfpo: hide vacation icon when fedocal returns an error
Merged 2 months ago by pingou. Opened 2 months ago by jlanda.
jlanda/pagure srcfpo-fix-vacation  into  master

@@ -24,7 +24,7 @@ 

                user.created | humanize }}</span>

            {% if config['FAS_URL'] %} &bull; (<a href="{{ config['FAS_URL'].rstrip('/') }}/user/view/{{ username }}">fas</a>){%

            endif %}

-           <img src="https://apps.fedoraproject.org/calendar/api/{{ username }}/shield/vacation?connector=on&always=0" alt="" />

+           <img id="vacation" src="https://apps.fedoraproject.org/calendar/api/{{ username }}/shield/vacation?connector=on&always=0" alt="" />

            </div>

          </div>

        </div>

@@ -109,3 +109,12 @@ 

    </div>

  </div>

  {% endblock %}

+ 

+ {% block jscripts %}

+ {{ super() }}

+ <script type="text/javascript" nonce="{{ g.nonce }}">

+   $('#vacation').on('error', function() {

+     $(this).hide();

+   });

+ </script>

+ {% endblock %} 

\ No newline at end of file