Class: Onebox::Engine::GoogleCalendarOnebox
- Inherits:
-
Object
- Object
- Onebox::Engine::GoogleCalendarOnebox
- Includes:
- Onebox::Engine
- Defined in:
- lib/onebox/engine/google_calendar_onebox.rb
Constant Summary
Constants included from Onebox::Engine
Instance Attribute Summary
Attributes included from Onebox::Engine
#errors, #options, #timeout, #uri, #url
Instance Method Summary collapse
Methods included from Onebox::Engine
all_iframe_origins, engines, included, #initialize, origins_to_regexes
Instance Method Details
#placeholder_html ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/onebox/engine/google_calendar_onebox.rb', line 18 def placeholder_html <<-HTML <div placeholder> <div class='gdocs-onebox gdocs-onebox-splash' style='display:table-cell;vertical-align:middle;width:800px;height:600px'> <div style='text-align:center;'> <div class='gdocs-onebox-logo g-calendar-logo'></div> <p>Google Calendar</p> </div> </div> </div> HTML end |
#to_html ⇒ Object
12 13 14 15 16 |
# File 'lib/onebox/engine/google_calendar_onebox.rb', line 12 def to_html url = @url.split('&').first src = ::Onebox::Helpers.normalize_url_for_output(url) "<iframe src='#{src}&rm=minimal' style='border: 0' width='800' height='600' frameborder='0' scrolling='no'>#{placeholder_html}</iframe>" end |