Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Demos/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,17 @@
bg_color: 'black',
date_color: 'white',
week_color: 'orange',
caption_color: 'white'
caption_color: 'white',
close_text: 'cancel'
});

$('cal4').makeCalendar({
position: 'bottomLeft'
position: 'bottomLeft',
close_button: false
});
});

</script>

</body>
</html>
</html>
10 changes: 10 additions & 0 deletions Source/assets/css/is-calendar.css
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,13 @@ div.calendar .caption a.next {
div.calendar .caption h4 {
display: inline;
}
div.calendar div.close {
margin-top: -13px;
line-height: 22px;
font-family: arial;
cursor: pointer;
color: grey;
font-size: 10pt;
font-weight: normal;
text-align: center;
}
12 changes: 8 additions & 4 deletions Source/is-calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ var isCalendar = new Class
caption_color: 'black',
position: 'topRight',
onSelectDate: Class.empty,
edge: 'topLeft'
edge: 'topLeft',
close_button: true,
close_text: 'close'
},

initialize: function(el, options)
Expand All @@ -51,10 +53,13 @@ var isCalendar = new Class
this.calendar.dispose();

this.calendar = new Element('div' ,{'class': 'calendar'}).setStyle('background-color',this.options.bg_color);

//render title
var caption = new Element('div' ,{'class': 'caption'}).setStyle('color',this.options.caption_color);
var previousLink = new Element('a', {'class': 'previous',html: '&lt;'});
if (this.options.close_button) {
new Element('div', {'class':'close', 'html':this.options.close_text}).addEvent('click', function() { this.parentElement.parentElement.dispose(); }).inject(caption);
}
previousLink.inject(caption, 'bottom');
previousLink.addEvent('click', this.previous.bind(this));

Expand Down Expand Up @@ -122,7 +127,6 @@ var isCalendar = new Class

if(reveal)
this.calendar.reveal();

},

next: function()
Expand Down Expand Up @@ -152,4 +156,4 @@ Element.implement({
return calendar;
}

});
});