Archive for the ‘Web’ Category

MooTools Events Calendar – Web Embeddable Javascript Calendar

Friday, October 3rd, 2008

Month ViewThis is the official release of the unofficial MooTools Events Calendar. It is an embeddable web calendar that was built using the MooTools JavaScript framework. Currently, it is still under development, but may be sufficient for your needs. Check out the project page here: MooTools Events Calendar

-

v0.3.0 (August 5, 2009)

  • Accepts events that span across multiple days
  • MooTools v1.2.3 required.

v0.2.2 (April 11, 2009)

  • Fixed a rendering problem for people outside of the U.S.
  • Added the option for weeks to start on Monday

v0.2.1 (Feb 9, 2009)

  • bug fix - usage error with parseInt(). Events wouldn't load on the 8th and 9th of a month.
  • HTML allowed in events. This allows for events to link elsewhere.

v0.2.0 (Feb 1, 2009)

  • uses plug-ins or direct loading through the constructor for events
  • uses iCal/ISO 8601 dates/times for event input
  • different style sheets can be used for 3 different sized calendars

v0.1.0 (Oct 3, 2008)

  • month, week, and day views
  • tool tips for month view events (using Tips)
  • scrolling day events for month view (using Scroller)
  • events loaded manually or possibly through a JSON feed

Javascript Date Object – Adding and Subtracting Months

Thursday, September 18th, 2008

There is a slight problem with the Javascript Date() Object when trying to advance to the next month or go back to the previous month. For example, if your date is set to October 31, 2008 and you add one month, you'd probably expect the new date to be November 30, 2008 because November 31st doesn't exist. This, however, isn't the case. Javascript automatically advances your Date object to December 1st. This functionality is very useful in most situations(i.e. adding days to a date, determining the number of days in a month or if it's a leap year), but not for adding/subtracting months. I've put together some functions below that extend the Date() object: nextMonth() and prevMonth() See the example below for their usage and please feel free to use these in your applications.

Extends the Date Object:

function prevMonth(){
var thisMonth = this.getMonth();
this.setMonth(thisMonth-1);
if(this.getMonth() != thisMonth-1 && (this.getMonth() != 11 || (thisMonth == 11 && this.getDate() == 1)))
this.setDate(0);
}
function nextMonth(){
var thisMonth = this.getMonth();
this.setMonth(thisMonth+1);
if(this.getMonth() != thisMonth+1 && this.getMonth() != 0)
this.setDate(0);
}

Date.prototype.nextMonth = nextMonth;
Date.prototype.prevMonth = prevMonth;

Example of Usage:


function getPrevMonth(){
var today = new Date(2008,9,31); //set "today" to October 31, 2008
today.prevMonth(); //show one month earlier -> September 30, 2008 (instead of September 31, 2008 which converts to October 1st, 2008
}
function getNextMonth(){
var today = new Date(2008,9,31); //set "today" to October 31, 2008
today.nextMonth(); //show one month later -> November 30, 2008 (instead of November 31, 2008 which converts to December 1st, 2008
}

Web Based Insteon Controller – SmartLinc/NetLinc

Sunday, July 27th, 2008

NetLincThere's a new Insteon controller out there that uses a built-in web server to control your Insteon devices. It's called NetLinc and has a price tag of $119.99 from SmartHome (of coarse). I believe that this is going to be one of SmartHome's biggest Insteon products yet. In the past, Insteon controllers have been pretty locked down as far as user manipulation is concerned. With an HTTP controlled device such as this one, there isn't going to be anything to hide. I can already see the numerous custom interfaces being made for any device that has a web browser. This will also open a new market for custom floor plans that can be developed using common web design techniques (GET or POST requests). For a more complex interface, you might be able send XHR(AJAX) requests to the NetLinc to turn on, off, or check the status/state of a device!

SimpleHomeNet has already manufactured a few products that aimed to achieve the same functionality as the NetLinc. They are all quite a bit more expensive though:
EZSrve Insteon/X10 Home Automation Gateway ($209.99)

EZSrve

EZBridge PLM Combo ($199.99)

EZBridge Combo

I'll be ordering my NetLinc soon and can envision my Insteon USB PowerLinc on EBay shortly after!