Fix cannot open image link in other window problem.
This commit is contained in:
parent
3676381088
commit
cc31ee8978
|
@ -15,7 +15,7 @@ class AdBannersController < ApplicationController
|
|||
target = ""
|
||||
end
|
||||
if !b.out_link.blank?
|
||||
image_link += "\" style=\"cursor:pointer;\" onclick=\"window.location.href=\'#{b.out_link}\'\""
|
||||
image_link += "\" style=\"cursor:pointer;\" onload=\"var el=this;(function(){if(el.parentElement==undefined||el.parentElement.tagName!='A'){el.outerHTML=('<a href=#{b.out_link} target=#{target}>'+el.outerHTML+'</a>');}})()\""
|
||||
end
|
||||
images << {
|
||||
"image_link" => image_link,
|
||||
|
|
Loading…
Reference in New Issue