Change placeholder src.

This commit is contained in:
BoHung Chiu 2022-11-18 20:39:46 +08:00
parent 7bdccc3b60
commit 82497389d4
1 changed files with 4 additions and 4 deletions

View File

@ -53,7 +53,7 @@
<% if @ad_image.file.file %>
<%= image_tag @ad_image.file.url %>
<% else %>
<img src="/annc_url?url=http://www.placehold.it/200x80/EFEFEF/AAAAAA&text=<%= @ad_banner.width %>x<%= @ad_banner.height %>" />
<img src="https://via.placeholder.com/200x80/EFEFEF/AAAAAA&text=<%= @ad_banner.width %>x<%= @ad_banner.height %>" />
<% end %>
</div>
<div class="fileupload-preview fileupload-exists thumbnail pull-left"></div>
@ -116,7 +116,7 @@
<% if @ad_image.video_snapshot.file %>
<%= image_tag @ad_image.video_snapshot.url %>
<% else %>
<img src="/annc_url?url=http://www.placehold.it/200x80/EFEFEF/AAAAAA&text=<%= @ad_banner.width %>x<%= @ad_banner.height %>" />
<img src="https://via.placeholder.com/200x80/EFEFEF/AAAAAA&text=<%= @ad_banner.width %>x<%= @ad_banner.height %>" />
<% end %>
</div>
<div class="fileupload-preview fileupload-exists thumbnail pull-left"></div>
@ -295,11 +295,11 @@
$('#ad_image_out_link').on('paste', function(e){
var pastedData = e.originalEvent.clipboardData.getData('text');
var _this = $(this);
pastedData = pastedData.replace(new RegExp('^http(s|)://' + window.location.host), '')
pastedData = pastedData.replace(new RegExp('^http(s|)://' + window.location.host), '');
window.setTimeout(function(){
_this.val(pastedData);
}, 0);
})
});
})
</script>