#4548 srcfpo: hide vacation icon when fedocal returns an error
Merged 11 months ago by pingou. Opened 11 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

pretty please pagure-ci rebuild

11 months ago

rebased onto 0cf7c1184e0087fc91492b952def5ac5b22d9d34

11 months ago

pretty please pagure-ci rebuild

11 months ago

rebased onto 56440d9

11 months ago

rebased onto 56440d9

11 months ago

Thanks, since this is not covered by our tests, I'll merge it directly :)

Pull-Request has been merged by pingou

11 months ago