Skip to content
This repository has been archived by the owner on May 6, 2018. It is now read-only.

Commit

Permalink
Cleaned up the bottom javascript within calendar.html a little bit.
Browse files Browse the repository at this point in the history
  • Loading branch information
ajvb committed Feb 18, 2014
1 parent 562058f commit c8b56c4
Showing 1 changed file with 10 additions and 17 deletions.
27 changes: 10 additions & 17 deletions boardinator_site/templates/calendar.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,12 @@ <h1>Calendar <small>Overview</small></h1>
{% block javascript %}
<script type="text/javascript">
(function() {
var cal, calendarDate, d, m, y;

var cal,
calendarDate = new Date(),
d = calendarDate.getDate(),
m = calendarDate.getMonth(),
y = calendarDate.getFullYear();

this.setDraggableEvents = function() {
return $("#events .external-event").each(function() {
var eventObject;
Expand All @@ -74,17 +78,9 @@ <h1>Calendar <small>Overview</small></h1>
});
});
};

setDraggableEvents();

calendarDate = new Date();

d = calendarDate.getDate();

m = calendarDate.getMonth();

y = calendarDate.getFullYear();


cal = $(".full-calendar").fullCalendar({
header: {
center: "title",
Expand Down Expand Up @@ -205,15 +201,12 @@ <h1>Calendar <small>Overview</small></h1>
}
]
});

}).call(this);
</script>

<script type="text/javascript">
$("#new-event").live('submit', function(e) {
var value;
e.preventDefault();
value = $("#new-event-input").val();
var value = $("#new-event-input").val();
if (value.length > 0) {
$("#events .box-content").prepend("<div class='label label-danger external-event'>" + value + "</div>");
$("#new-event-input").val("");
Expand Down

0 comments on commit c8b56c4

Please sign in to comment.