Permalink
Browse files

close agenda on click

  • Loading branch information...
1 parent 6b14ba3 commit 2d25e19b28c1df13c58a213138015ccd7614f4a5 @digitaltom digitaltom committed Mar 11, 2013
Showing with 26 additions and 13 deletions.
  1. +0 −1 TODO
  2. +26 −12 js/hackweek.js
View
1 TODO
@@ -20,7 +20,6 @@ General
* Agenda Effects
* Different Agendas for different office
* Fix Height and Width
-* Click outside to close the current agenda
3- Projects
View
@@ -51,19 +51,25 @@ $(function () {
})
/* agenda */
- $("#monday, #monday-content").mouseover(function () {
+
+ $("#monday, #monday-content").on('mouseover click', function(event) {
+ event.stopPropagation()
slidein_agenda_day($('#monday-content'), 0 * 200)
})
- $("#tuesday, #tuesday-content").mouseover(function () {
+ $("#tuesday, #tuesday-content").on('mouseover click', function(event) {
+ event.stopPropagation()
slidein_agenda_day($('#tuesday-content'), 1 * 200)
})
- $("#wednesday, #wednesday-content").mouseover(function () {
+ $("#wednesday, #wednesday-content").on('mouseover click', function(event) {
+ event.stopPropagation()
slidein_agenda_day($('#wednesday-content'), 2 * 200)
})
- $("#thursday, #thursday-content").mouseover(function () {
+ $("#thursday, #thursday-content").on('mouseover click', function(event) {
+ event.stopPropagation()
slidein_agenda_day($('#thursday-content'), 3 * 200)
})
- $("#friday, #friday-content").mouseover(function () {
+ $("#friday, #friday-content").on('mouseover click', function(event) {
+ event.stopPropagation()
slidein_agenda_day($('#friday-content'), 4 * 200)
})
@@ -84,28 +90,36 @@ $(function () {
}, 800);
}
- $("#agenda-de-link").click(function () {
+
+ $("#agenda").click(function () {
+ $(".agenda-day-content").stop().animate({
+ 'width': '0px', 'opacity': 0
+ }, 800);
+ })
+
+ $("#agenda-de-link").click(function (event) {
+ event.stopPropagation()
set_agenda_location('de')
})
- $("#agenda-us-link").click(function () {
+ $("#agenda-us-link").click(function (event) {
+ event.stopPropagation()
set_agenda_location('us')
})
- $("#agenda-cz-link").click(function () {
+ $("#agenda-cz-link").click(function (event) {
+ event.stopPropagation()
set_agenda_location('cz')
})
- $("#agenda-chn-link").click(function () {
+ $("#agenda-chn-link").click(function (event) {
+ event.stopPropagation()
set_agenda_location('chn')
})
-
if ($.cookie("agenda-location")) {
set_agenda_location($.cookie("agenda-location"))
} else {
set_agenda_location('de')
}
-
-
/* auto open current agenda day */
var today = new Date();
if( today.getMonth()+1 == 4 && today.getYear() == 113) {

0 comments on commit 2d25e19

Please sign in to comment.