Skip to content

Instantly share code, notes, and snippets.

@eduardolundgren
Created March 6, 2012 02:36
Show Gist options
  • Save eduardolundgren/1983004 to your computer and use it in GitHub Desktop.
Save eduardolundgren/1983004 to your computer and use it in GitHub Desktop.
CalendarList mockups
// Um para cada calendar row
var menu = new A.SimpleMenu({
items: [
{ id: 'm1', caption: 'Menu A', fn: function() {} },
{ id: 'm2', caption: 'Menu B', fn: function() {} },
{ id: 'm3', caption: '-' },
{ id: 'm4', caption: '<div id="colorpicker"></div>' },
],
visible: false,
hiddenItems: [ ... ]
});
menu.on('render', function(event) {
A.one('#colorpicker').plug(A.ColorPicker);
});
menu.on('visibleChange', function(event) {
instance.colorpicker.setColor( menu.calendar.get('color') );
});
// Calendar List
var calendarList = new A.CalendarList({
scheduler: scheduler,
items: [ schedulerCalendar1, schedulerCalendar2, ... ],
render: '#calendarList1'
});
calendarList.get('boundingBox').delegate('click', function(event) {
menu.render().set('xy', event.currentTarget.getXY()).toggle();
menu.set('hiddenItems', []);
}, '.menu-setinha');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment