Fix bug.
This commit is contained in:
parent
37aff562a7
commit
7bdccc3b60
|
@ -31,8 +31,8 @@
|
|||
<div class="slide-img" style=" background: url('<%= image.exchange_item == "1" ? image.file.thumb.url : image.youtube_thumb %>'); background-size: cover; background-position: center;"></div>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<div class="slide-img" style="background: url('/annc_url?url=http://placehold.it/<%= banner.width %>x<%= banner.height %>/888&text=A'); background-size: cover; background-position: center;"></div>
|
||||
<div class="slide-img" style="background: url('/annc_url?url=http://placehold.it/<%= banner.width %>x<%= banner.height %>/666&text=B'); background-size: cover; background-position: center;"></div>
|
||||
<div class="slide-img" style="background: url('https://via.placeholder.com/<%= banner.width %>x<%= banner.height %>/888&text=A'); background-size: cover; background-position: center;"></div>
|
||||
<div class="slide-img" style="background: url('https://via.placeholder.com/<%= banner.width %>x<%= banner.height %>/666&text=B'); background-size: cover; background-position: center;"></div>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -186,9 +186,9 @@
|
|||
|
||||
<!-- Link -->
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= t(:link) %></label>
|
||||
<label class="control-label muted" for="ad_image_out_link"><%= t(:link) %></label>
|
||||
<div class="controls">
|
||||
<%= f.text_field :out_link, placeholder: t('ad_banner.enter_url') %>
|
||||
<%= f.text_field :out_link, placeholder: t('ad_banner.enter_url'), id: 'ad_image_out_link' %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -292,6 +292,14 @@
|
|||
$('#exchange_item_3 [data-dismiss="fileupload"]').on("click",function(){
|
||||
$("#jquery_jplayer_1").parents('.fileupload-new').css('display','none');
|
||||
})
|
||||
$('#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), '')
|
||||
window.setTimeout(function(){
|
||||
_this.val(pastedData);
|
||||
}, 0);
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Reference in New Issue