Add fallback for failed app logo rendering
This commit is contained in:
parent
fd4022a55c
commit
7e8bd0f411
4 changed files with 8 additions and 2 deletions
5
app/assets/javascripts/api/authorization_page.js
Normal file
5
app/assets/javascripts/api/authorization_page.js
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
$(document).ready(function() {
|
||||
$("#js-app-logo").error(function () {
|
||||
$(this).attr("src", ImagePaths.get("user/default.png"));
|
||||
});
|
||||
});
|
||||
|
|
@ -45,3 +45,4 @@
|
|||
//= require bootstrap-switch
|
||||
//= require blueimp-gallery
|
||||
//= require leaflet
|
||||
//= require api/authorization_page
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.application-img
|
||||
- if app.image
|
||||
= image_tag app.image, class: "img-responsive"
|
||||
= image_tag app.image, class: "img-responsive", id: "js-app-logo"
|
||||
- else
|
||||
%i.entypo-browser
|
||||
.application-authorizations
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.application-img
|
||||
- if app.image
|
||||
= image_tag app.image, class: "img-responsive"
|
||||
= image_tag app.image, class: "img-responsive", id: "js-app-logo"
|
||||
- else
|
||||
%i.entypo-browser
|
||||
.application-authorizations
|
||||
|
|
|
|||
Loading…
Reference in a new issue