Hello, 

<https://lh4.googleusercontent.com/-qCxQBlskyA8/UpQVRi5BSbI/AAAAAAAAAmY/cNlnyBGRiYw/s1600/tilterror.png>
My name is joshi, Im an intern and im working a dashboard project, using 
dashing with sinatra. Ive been able to upload a few cool widgets such as 
graphs and weather forecasts. At the moment I am currently trying to get 
RSS feeds from a google calender. I have been using the icalendar gem to do 
this. I tried to create my own widget called google-calendar and then 
process information through there. For anyone who has used dashing I am 
currently getting a rather annoying error, which is the image above. I have 
no idea how to fix this, 

My coffee file is empty, the only this it has is: class 
Dashing.Google_Calendar extends Dashing.Widget

and my html file: <h1 class="subtitle" data-bind="event.summary"></h1>
<table>
<tr>
<td>
<h3 class="starttime" data-bind="event.dtstart"></h3>
<h3 class="endTime" data-bind="event.dtend"></h3>
</td>
</tr>
</table>

<p class="updated-at" data-bind="updatedAtMessage"></p>

and lastly my scss file:
// 
----------------------------------------------------------------------------
// Sass declarations
// 
----------------------------------------------------------------------------
$background-color:  #ec663c;

$title-color:       rgba(255, 255, 255, 1);
$subtitle-color:    rgba(255, 255, 255, 0.7);

// 
----------------------------------------------------------------------------
// Widget-calendar styles
// 
----------------------------------------------------------------------------
.widget-google-calendar {
  transition: background-color 2s linear;
  -moz-transition: background-color 2s linear;
  -o-transition: background-color 2s linear;
  -webkit-transition: background-color 2s linear;

  background-color: $background-color;
  .subtitle {
color: $subtitle-color;
font-size: 20px;
margin: 15px 0;
  }
  h1{
    color: $title-color;
font-size: 30px;
  }

  .updated-at {
    color: rgba(255, 255, 255, 0.7);
  }


   h3 {
    font-size: 65px;
  }
}

and in my jobs folder i have attempted to fetch information from a google 
calendar of mine and try to send the event to the widget:

require 'icalendar'
require 'open-uri'

calendars = nil
eventsArr = Array.new
open("https://www.google.com/calendar/ical/[email protected]/public/basic.ics";)
 
do |cal|

calendars = Icalendar.parse(cal)
end

calendars.each do |calendar|

calendar.events do |event|
event_summary = "#{event.summary}"
starts_at = "#{event.dtstart}"
ends_at = "#{event.dtend}"
eventsArr.push({event_summary: event_summary, 
starts_at: starts_at, 
ends_at: ends_at})

SCHEDULER.every '5s' do 
send_event('gcr',{ events: events})
end
end
end


and this is my .erb file which contains the actual placement of the widget:

 <li data-row="3" data-col="6" data-sizex="1" data-sizey="1">
      <div data-id="gcr" data-view="Google_Calendar" 
style="background-color:#2db4d4"></div>
</li>

If anyone has experience in dashing help would be much appreciated.

Cheers,
Joshi 

PS: Sorry for the lengthy email.

-- 
You received this message because you are subscribed to the Google Groups 
"WellRailed" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/wellrailed.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to