diff --git a/app/controllers/text_marquees_controller.rb b/app/controllers/text_marquees_controller.rb index d8dd4bd..eccaa2e 100644 --- a/app/controllers/text_marquees_controller.rb +++ b/app/controllers/text_marquees_controller.rb @@ -6,6 +6,7 @@ class TextMarqueesController < ApplicationController texts = marquee.marquee_texts.collect do |mqt| { "text" => mqt.title, + "speed" => mqt.speed, "url" => (mqt.url || "") } end diff --git a/app/models/marquee_text.rb b/app/models/marquee_text.rb index b240553..68bd0c8 100644 --- a/app/models/marquee_text.rb +++ b/app/models/marquee_text.rb @@ -4,6 +4,7 @@ class MarqueeText field :title, type: String, localize: true field :url, type: String, localize: true - + field :speed, type: Integer, default: 3000 + belongs_to :marquee end \ No newline at end of file diff --git a/app/views/admin/text_marquees/_text_form.html.erb b/app/views/admin/text_marquees/_text_form.html.erb index 5c3be6d..58d44a8 100644 --- a/app/views/admin/text_marquees/_text_form.html.erb +++ b/app/views/admin/text_marquees/_text_form.html.erb @@ -2,11 +2,35 @@ <%= stylesheet_link_tag "lib/main-forms" %> <% end %> <% content_for :page_specific_javascript do %> - <%= javascript_include_tag "lib/bootstrap-fileupload" %> + <%= javascript_include_tag "lib/bootstrap-fileupload" %> <%= javascript_include_tag "lib/module-area" %> <%= javascript_include_tag "validator" %> <% end %> + +