Update text_marquees_controller.rb

let the text without url can't click
This commit is contained in:
chiu 2019-09-05 17:46:44 +08:00
parent cfc1cc37a3
commit 53315f52f9
1 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,4 @@
class TextMarqueesController < ApplicationController
def widget
subpart = OrbitHelper.get_current_widget
marquee = Marquee.find(OrbitHelper.widget_custom_value)
@ -7,7 +6,8 @@ class TextMarqueesController < ApplicationController
{
"text" => mqt.title,
"speed" => mqt.speed,
"url" => (mqt.url || "")
"url" => (mqt.url || ""),
"content" => (mqt.url.nil? ? "<a speed='#{speed}'>#{mqt.title}</a>" : "<a href='#{mqt.url}' target='_blank' speed='#{speed}'>#{mqt.title}</a>")
}
end
{