Permalink
Browse files

refactored js, split into more files (much more manageable). tested

  • Loading branch information...
arshaw committed Sep 19, 2010
1 parent 91e436d commit e2dbcaf15d58e79af8c1f5f6b4253e8e7f528622
Showing with 5,005 additions and 5,257 deletions.
  1. +76 −50 Makefile
  2. +1 −0 build/externs.js
  3. +7 −21 {examples → demos}/agenda-views.html
  4. +7 −21 {examples → demos}/basic-views.html
  5. +7 −21 {examples → demos}/default.html
  6. +7 −21 {examples → demos}/external-dragging.html
  7. +67 −0 demos/gcal.html
  8. 0 {examples → demos}/json-events.php
  9. +63 −0 demos/json.html
  10. BIN {examples → demos}/redmond/images/ui-bg_flat_0_aaaaaa_40x100.png
  11. BIN demos/redmond/images/ui-bg_flat_55_fbec88_40x100.png
  12. BIN {examples → demos}/redmond/images/ui-bg_glass_75_d0e5f5_1x400.png
  13. BIN {examples → demos}/redmond/images/ui-bg_glass_85_dfeffc_1x400.png
  14. BIN {examples → demos}/redmond/images/ui-bg_glass_95_fef1ec_1x400.png
  15. BIN {examples → demos}/redmond/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png
  16. BIN {examples → demos}/redmond/images/ui-bg_inset-hard_100_f5f8f9_1x100.png
  17. BIN {examples → demos}/redmond/images/ui-bg_inset-hard_100_fcfdfd_1x100.png
  18. BIN {examples → demos}/redmond/images/ui-icons_217bc0_256x240.png
  19. BIN {examples → demos}/redmond/images/ui-icons_2e83ff_256x240.png
  20. BIN {examples → demos}/redmond/images/ui-icons_469bdd_256x240.png
  21. BIN {examples → demos}/redmond/images/ui-icons_6da8d5_256x240.png
  22. BIN {examples → demos}/redmond/images/ui-icons_cd0a0a_256x240.png
  23. BIN {examples → demos}/redmond/images/ui-icons_d8e7f3_256x240.png
  24. BIN demos/redmond/images/ui-icons_f9bd01_256x240.png
  25. +73 −148 {examples → demos}/redmond/theme.css
  26. +7 −21 {examples → demos}/selectable.html
  27. +7 −21 {examples → demos}/theme.html
  28. +0 −79 examples/gcal.html
  29. +0 −77 examples/json.html
  30. BIN examples/redmond/images/ui-bg_flat_55_fbec88_40x100.png
  31. BIN examples/redmond/images/ui-icons_f9bd01_256x240.png
  32. 0 {tests/jquery-legacy → lib}/jquery-1.3.2.min.js
  33. 0 src/jquery/jquery.js → lib/jquery-1.4.2.min.js
  34. 0 {tests/jquery-legacy → lib}/jquery-ui-1.7.3.custom.min.js
  35. +65 −63 src/jquery/jquery-ui-custom.js → lib/jquery-ui-1.8.4.custom.min.js
  36. +480 −0 src/Calendar.js
  37. +288 −0 src/EventManager.js
  38. +164 −0 src/Header.js
  39. +132 −0 src/_loader.js
  40. +0 −1,249 src/agenda.js
  41. +36 −0 src/agenda/AgendaDayView.js
  42. +595 −0 src/agenda/AgendaEventRenderer.js
  43. +702 −0 src/agenda/AgendaView.js
  44. +46 −0 src/agenda/AgendaWeekView.js
  45. 0 src/{css → agenda}/agenda.css
  46. +37 −0 src/basic/BasicDayView.js
  47. +149 −0 src/basic/BasicEventRenderer.js
  48. +453 −0 src/basic/BasicView.js
  49. +46 −0 src/basic/BasicWeekView.js
  50. +52 −0 src/basic/MonthView.js
  51. 0 src/{css/grid.css → basic/basic.css}
  52. +43 −0 src/common/CoordinateGrid.js
  53. +232 −0 src/common/DayEventRenderer.js
  54. +27 −0 src/common/HorizontalPositionCache.js
  55. +44 −0 src/common/HoverListener.js
  56. +37 −0 src/common/OverlayManager.js
  57. +98 −0 src/common/SelectionManager.js
  58. +213 −0 src/common/View.js
  59. +129 −0 src/common/common.css
  60. +40 −291 src/{util.js → common/date.js}
  61. +285 −0 src/common/util.js
  62. +92 −0 src/defaults.js
  63. +6 −0 src/gcal/_loader.js
  64. +3 −4 src/{ → gcal}/gcal.js
  65. +0 −792 src/grid.js
  66. +19 −0 src/intro.js
  67. +3 −126 src/{css → }/main.css
  68. +27 −875 src/main.js
  69. +0 −20 src/misc/head.txt
  70. 0 src/{misc/foot.txt → outro.js}
  71. +0 −45 src/selection_util.js
  72. +0 −375 src/view.js
  73. +2 −3 tests/dbclick.html
  74. +2 −3 tests/droppable.html
  75. +2 −3 tests/fullheight.html
  76. +3 −2 tests/gcal.html
  77. +20 −22 tests/iframe.html
  78. +2 −3 tests/issue_206_parseDate_dst.html
  79. +2 −3 tests/issue_220_buttons_ie6.html
  80. +2 −1 tests/issue_221_quick_remove_source.html
  81. +6 −7 tests/issue_230_height_json_events.html
  82. +2 −3 tests/issue_244_aspectRatio_0.html
  83. +2 −3 tests/issue_251_empty_end_date.html
  84. +2 −2 tests/issue_333_blinking.html
  85. +2 −3 tests/issue_429_gotoDate.html
  86. +2 −3 tests/issue_477_event_width.html
  87. +0 −721 tests/jquery-ui/jquery.ui.tabs.js
  88. BIN tests/{ → lib}/fancybox/fancy_closebox.png
  89. BIN tests/{ → lib}/fancybox/fancy_left.png
  90. BIN tests/{ → lib}/fancybox/fancy_progress.png
  91. BIN tests/{ → lib}/fancybox/fancy_right.png
  92. BIN tests/{ → lib}/fancybox/fancy_shadow_e.png
  93. BIN tests/{ → lib}/fancybox/fancy_shadow_n.png
  94. BIN tests/{ → lib}/fancybox/fancy_shadow_ne.png
  95. BIN tests/{ → lib}/fancybox/fancy_shadow_nw.png
  96. BIN tests/{ → lib}/fancybox/fancy_shadow_s.png
  97. BIN tests/{ → lib}/fancybox/fancy_shadow_se.png
  98. BIN tests/{ → lib}/fancybox/fancy_shadow_sw.png
  99. BIN tests/{ → lib}/fancybox/fancy_shadow_w.png
  100. BIN tests/{ → lib}/fancybox/fancy_title_left.png
  101. BIN tests/{ → lib}/fancybox/fancy_title_main.png
  102. BIN tests/{ → lib}/fancybox/fancy_title_right.png
  103. 0 tests/{ → lib}/fancybox/jquery.fancybox-1.2.6.css
  104. 0 tests/{ → lib}/fancybox/jquery.fancybox-1.2.6.js
  105. 0 tests/{ → lib}/fancybox/jquery.fancybox-1.2.6.pack.js
  106. 0 tests/{ → lib}/firebug-lite/ChangeLog
  107. BIN tests/{ → lib}/firebug-lite/errorIcon.png
  108. 0 tests/{ → lib}/firebug-lite/firebug-lite-compressed.js
  109. 0 tests/{ → lib}/firebug-lite/firebug-lite.css
  110. 0 tests/{ → lib}/firebug-lite/firebug-lite.js
  111. BIN tests/{ → lib}/firebug-lite/firebug.gif
  112. BIN tests/{ → lib}/firebug-lite/firebug_logo.png
  113. BIN tests/{ → lib}/firebug-lite/infoIcon.png
  114. BIN tests/{ → lib}/firebug-lite/progress.gif
  115. BIN tests/{ → lib}/firebug-lite/spacer.gif
  116. BIN tests/{ → lib}/firebug-lite/tree_close.gif
  117. BIN tests/{ → lib}/firebug-lite/tree_open.gif
  118. BIN tests/{ → lib}/firebug-lite/warningIcon.png
  119. +35 −0 tests/lib/jquery.ui.tabs.min.js
  120. +2 −3 tests/liquidwidth.html
  121. +0 −105 tests/loader.js
  122. +2 −1 tests/locale.html
  123. +2 −4 tests/many_agenda_events.html
  124. +2 −4 tests/many_events.html
  125. +2 −3 tests/method_destroy.html
  126. +3 −2 tests/methods.html
  127. +5 −6 tests/options.html
  128. +2 −3 tests/plain.html
  129. +3 −4 tests/selectable.html
  130. +3 −3 tests/skip-redraw-test.html
  131. +8 −5 tests/sources.html
  132. +4 −4 tests/tabs.html
  133. +4 −4 tests/theming.html
  134. +11 −3 tests/triggers.html
  135. +1 −1 version.txt
View
126 Makefile
@@ -1,69 +1,95 @@
SRC_DIR = src
-EXAMPLES_DIR = examples
BUILD_DIR = build
DIST_DIR = dist
-
-JS_SRC_FILES = \
- ${SRC_DIR}/main.js \
- ${SRC_DIR}/grid.js \
- ${SRC_DIR}/agenda.js \
- ${SRC_DIR}/view.js \
- ${SRC_DIR}/selection_util.js \
- ${SRC_DIR}/util.js
-
-CSS_SRC_FILES = \
- ${SRC_DIR}/css/main.css \
- ${SRC_DIR}/css/grid.css \
- ${SRC_DIR}/css/agenda.css
-
+DEMOS_DIR = demos
OTHER_FILES = \
- ${SRC_DIR}/jquery \
- changelog.txt
-
-VER = `cat version.txt`
+ changelog.txt \
+ MIT-LICENSE.txt \
+ GPL-LICENSE.txt
+
+VER = $$(cat version.txt)
VER_SED = sed s/@VERSION/"${VER}"/
-DATE = `git log -1 | grep Date: | sed 's/[^:]*: *//'`
+DATE = $$(git log -1 --pretty=format:%ad)
DATE_SED = sed s/@DATE/"${DATE}"/
+JQ = $$(sed -n "s/.*JQUERY\s*=\s*[\"']\(.*\)[\"'].*/\1/p" "${SRC_DIR}/_loader.js")
+JQUI = $$(sed -n "s/.*JQUERY_UI\s*=\s*[\"']\(.*\)[\"'].*/\1/p" "${SRC_DIR}/_loader.js")
+
+DEMO_FILES = $$(cd ${DEMOS_DIR}; find . -mindepth 1 -maxdepth 1 -type f)
+DEMO_SUBDIRS = $$(cd ${DEMOS_DIR}; find . -mindepth 1 -maxdepth 1 -type d)
+DEMO_RE = \(<script[^>]*_loader\.js[^>]*><\/script>\|<!--\[\[\|\]\]-->\)\s*
+DEMO_SED = sed -n "1h;1!H;\$${;g;s/${DEMO_RE}//g;p;}"
+
+JS_SED = sed -n "s/\s*js([\"']\(.*\)[\"']).*/\1/p"
+CSS_SED = sed -n "s/\s*css([\"']\(.*\)[\"']).*/\1/p"
+
+concat_js = \
+ files=$$(cat "$(1)/_loader.js" | ${JS_SED}); \
+ if [ -f "$(1)/intro.js" ]; then \
+ files="intro.js $$files"; \
+ fi; \
+ if [ -f "$(1)/outro.js" ]; then \
+ files="$$files outro.js"; \
+ fi; \
+ old=$$PWD; \
+ (cd "$(1)"; cat $$files; cd "$$old") \
+ | ${VER_SED} \
+ | ${DATE_SED} \
+ > "$(2)"
+
+concat_css = \
+ files=$$(cat "$(1)/_loader.js" | ${CSS_SED}); \
+ if [ "$$files" ]; then \
+ old=$$PWD; \
+ (cd "$(1)"; cat $$files; cd "$$old") \
+ | ${VER_SED} \
+ | ${DATE_SED} \
+ > "$(2)"; \
+ fi
+
zip:
@rm -rf ${BUILD_DIR}/fullcalendar
@rm -rf ${BUILD_DIR}/fullcalendar-*
- @mkdir -p ${BUILD_DIR}/fullcalendar
+ @mkdir -p ${BUILD_DIR}/fullcalendar/fullcalendar/
- @echo "building js..."
- @cat ${SRC_DIR}/misc/head.txt ${JS_SRC_FILES} ${SRC_DIR}/misc/foot.txt \
- | ${VER_SED} | ${DATE_SED} \
- > ${BUILD_DIR}/fullcalendar/fullcalendar.js
- @cat ${SRC_DIR}/gcal.js \
- | ${VER_SED} | ${DATE_SED} \
- > ${BUILD_DIR}/fullcalendar/gcal.js
-
- @echo "compressing js..."
- @java -jar ${BUILD_DIR}/compiler.jar --js ${BUILD_DIR}/fullcalendar/fullcalendar.js \
- > ${BUILD_DIR}/fullcalendar/fullcalendar.min.js
-
- @echo "building css..."
- @cat ${CSS_SRC_FILES} \
- | ${VER_SED} | ${DATE_SED} \
- > ${BUILD_DIR}/fullcalendar/fullcalendar.css
+ @echo "building core..."
+ @$(call concat_js,${SRC_DIR},"${BUILD_DIR}/fullcalendar/fullcalendar/fullcalendar.js")
+ @$(call concat_css,${SRC_DIR},"${BUILD_DIR}/fullcalendar/fullcalendar/fullcalendar.css")
+
+ @echo "compressing core js..."
+ @java -jar ${BUILD_DIR}/compiler.jar --warning_level VERBOSE --jscomp_off checkTypes --externs build/externs.js \
+ --js ${BUILD_DIR}/fullcalendar/fullcalendar/fullcalendar.js \
+ > ${BUILD_DIR}/fullcalendar/fullcalendar/fullcalendar.min.js; \
- @echo "building examples..."
- @mkdir -p ${BUILD_DIR}/fullcalendar/examples
- @for f in `cd ${EXAMPLES_DIR}; find . -mindepth 1 -maxdepth 1 -type f`; do \
- cat ${EXAMPLES_DIR}/$$f \
- | sed -n '1h;1!H;$${;g;s/<!--\s*<src>.*<\/src>\s*-->\s*//g;p;}' \
- | sed -n '1h;1!H;$${;g;s/<!--\s*<dist>\s*//g;p;}' \
- | sed -n '1h;1!H;$${;g;s/<\/dist>\s*-->\s*//g;p;}' \
- > ${BUILD_DIR}/fullcalendar/examples/$$f; \
+ @echo "building plugins..."
+ @for loader in ${SRC_DIR}/*/_loader.js; do \
+ dir=`dirname $$loader`; \
+ name=`basename $$dir`; \
+ $(call concat_js,$$dir,"${BUILD_DIR}/fullcalendar/fullcalendar/$$name.js"); \
+ done
+
+ @echo "copying jquery..."
+ @mkdir -p ${BUILD_DIR}/fullcalendar/jquery
+ @cp lib/${JQ} ${BUILD_DIR}/fullcalendar/jquery
+ @cp lib/${JQUI} ${BUILD_DIR}/fullcalendar/jquery
+
+ @echo "building demos..."
+ @mkdir -p ${BUILD_DIR}/fullcalendar/demos
+ @for f in ${DEMO_FILES}; do \
+ cat ${DEMOS_DIR}/$$f \
+ | ${DEMO_SED} \
+ | sed "s/jquery\.js/${JQ}/" \
+ | sed "s/jquery-ui\.js/${JQUI}/" \
+ > ${BUILD_DIR}/fullcalendar/demos/$$f; \
done
- @for d in `cd ${EXAMPLES_DIR}; find . -mindepth 1 -maxdepth 1 -type d`; do \
- cp -r ${EXAMPLES_DIR}/$$d ${BUILD_DIR}/fullcalendar/examples/$$d; \
+ @for d in ${DEMO_SUBDIRS}; do \
+ cp -r ${DEMOS_DIR}/$$d ${BUILD_DIR}/fullcalendar/demos/$$d; \
done
-
+
@echo "copying other files..."
@cp -r ${OTHER_FILES} ${BUILD_DIR}/fullcalendar
-
+
@echo "zipping..."
@mv ${BUILD_DIR}/fullcalendar ${BUILD_DIR}/fullcalendar-${VER}
@cd ${BUILD_DIR}; for f in fullcalendar-*; do \
@@ -74,7 +100,7 @@ zip:
@mkdir -p ${DIST_DIR}
@mv ${BUILD_DIR}/fullcalendar-${VER}.zip ${DIST_DIR}
@echo "done."
-
+
clean:
@rm -rf ${BUILD_DIR}/fullcalendar
@rm -rf ${BUILD_DIR}/fullcalendar-*
View
@@ -0,0 +1 @@
+var jQuery;
@@ -1,27 +1,13 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
-<!--<src>-->
-<link rel='stylesheet' type='text/css' href='../src/css/main.css' />
-<link rel='stylesheet' type='text/css' href='../src/css/grid.css' />
-<link rel='stylesheet' type='text/css' href='../src/css/agenda.css' />
-<script type='text/javascript' src='../src/jquery/jquery.js'></script>
-<script type='text/javascript' src='../src/jquery/jquery-ui-custom.js'></script>
-<script type='text/javascript' src='../src/main.js'></script>
-<script type='text/javascript' src='../src/grid.js'></script>
-<script type='text/javascript' src='../src/agenda.js'></script>
-<script type='text/javascript' src='../src/view.js'></script>
-<script type='text/javascript' src='../src/selection_util.js'></script>
-<script type='text/javascript' src='../src/util.js'></script>
-<!--</src>-->
-<!--
-<dist>
-<link rel='stylesheet' type='text/css' href='../fullcalendar.css' />
+<script type='text/javascript' src='../src/_loader.js'></script>
+<!--[[
+<link rel='stylesheet' type='text/css' href='../fullcalendar/fullcalendar.css' />
<script type='text/javascript' src='../jquery/jquery.js'></script>
-<script type='text/javascript' src='../jquery/jquery-ui-custom.js'></script>
-<script type='text/javascript' src='../fullcalendar.min.js'></script>
-</dist>
--->
+<script type='text/javascript' src='../jquery/jquery-ui.js'></script>
+<script type='text/javascript' src='../fullcalendar/fullcalendar.min.js'></script>
+]]-->
<script type='text/javascript'>
$(document).ready(function() {
@@ -1,27 +1,13 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
-<!--<src>-->
-<link rel='stylesheet' type='text/css' href='../src/css/main.css' />
-<link rel='stylesheet' type='text/css' href='../src/css/grid.css' />
-<link rel='stylesheet' type='text/css' href='../src/css/agenda.css' />
-<script type='text/javascript' src='../src/jquery/jquery.js'></script>
-<script type='text/javascript' src='../src/jquery/jquery-ui-custom.js'></script>
-<script type='text/javascript' src='../src/main.js'></script>
-<script type='text/javascript' src='../src/grid.js'></script>
-<script type='text/javascript' src='../src/agenda.js'></script>
-<script type='text/javascript' src='../src/view.js'></script>
-<script type='text/javascript' src='../src/selection_util.js'></script>
-<script type='text/javascript' src='../src/util.js'></script>
-<!--</src>-->
-<!--
-<dist>
-<link rel='stylesheet' type='text/css' href='../fullcalendar.css' />
+<script type='text/javascript' src='../src/_loader.js'></script>
+<!--[[
+<link rel='stylesheet' type='text/css' href='../fullcalendar/fullcalendar.css' />
<script type='text/javascript' src='../jquery/jquery.js'></script>
-<script type='text/javascript' src='../jquery/jquery-ui-custom.js'></script>
-<script type='text/javascript' src='../fullcalendar.min.js'></script>
-</dist>
--->
+<script type='text/javascript' src='../jquery/jquery-ui.js'></script>
+<script type='text/javascript' src='../fullcalendar/fullcalendar.min.js'></script>
+]]-->
<script type='text/javascript'>
$(document).ready(function() {
@@ -1,27 +1,13 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
-<!--<src>-->
-<link rel='stylesheet' type='text/css' href='../src/css/main.css' />
-<link rel='stylesheet' type='text/css' href='../src/css/grid.css' />
-<link rel='stylesheet' type='text/css' href='../src/css/agenda.css' />
-<script type='text/javascript' src='../src/jquery/jquery.js'></script>
-<script type='text/javascript' src='../src/jquery/jquery-ui-custom.js'></script>
-<script type='text/javascript' src='../src/main.js'></script>
-<script type='text/javascript' src='../src/grid.js'></script>
-<script type='text/javascript' src='../src/agenda.js'></script>
-<script type='text/javascript' src='../src/view.js'></script>
-<script type='text/javascript' src='../src/selection_util.js'></script>
-<script type='text/javascript' src='../src/util.js'></script>
-<!--</src>-->
-<!--
-<dist>
-<link rel='stylesheet' type='text/css' href='../fullcalendar.css' />
+<script type='text/javascript' src='../src/_loader.js'></script>
+<!--[[
+<link rel='stylesheet' type='text/css' href='../fullcalendar/fullcalendar.css' />
<script type='text/javascript' src='../jquery/jquery.js'></script>
-<script type='text/javascript' src='../jquery/jquery-ui-custom.js'></script>
-<script type='text/javascript' src='../fullcalendar.min.js'></script>
-</dist>
--->
+<script type='text/javascript' src='../jquery/jquery-ui.js'></script>
+<script type='text/javascript' src='../fullcalendar/fullcalendar.min.js'></script>
+]]-->
<script type='text/javascript'>
$(document).ready(function() {
@@ -1,27 +1,13 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
-<!--<src>-->
-<link rel='stylesheet' type='text/css' href='../src/css/main.css' />
-<link rel='stylesheet' type='text/css' href='../src/css/grid.css' />
-<link rel='stylesheet' type='text/css' href='../src/css/agenda.css' />
-<script type='text/javascript' src='../src/jquery/jquery.js'></script>
-<script type='text/javascript' src='../src/jquery/jquery-ui-custom.js'></script>
-<script type='text/javascript' src='../src/main.js'></script>
-<script type='text/javascript' src='../src/grid.js'></script>
-<script type='text/javascript' src='../src/agenda.js'></script>
-<script type='text/javascript' src='../src/view.js'></script>
-<script type='text/javascript' src='../src/selection_util.js'></script>
-<script type='text/javascript' src='../src/util.js'></script>
-<!--</src>-->
-<!--
-<dist>
-<link rel='stylesheet' type='text/css' href='../fullcalendar.css' />
+<script type='text/javascript' src='../src/_loader.js'></script>
+<!--[[
+<link rel='stylesheet' type='text/css' href='../fullcalendar/fullcalendar.css' />
<script type='text/javascript' src='../jquery/jquery.js'></script>
-<script type='text/javascript' src='../jquery/jquery-ui-custom.js'></script>
-<script type='text/javascript' src='../fullcalendar.min.js'></script>
-</dist>
--->
+<script type='text/javascript' src='../jquery/jquery-ui.js'></script>
+<script type='text/javascript' src='../fullcalendar/fullcalendar.min.js'></script>
+]]-->
<script type='text/javascript'>
$(document).ready(function() {
View
@@ -0,0 +1,67 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+<script type='text/javascript' src='../src/_loader.js'></script>
+<script type='text/javascript' src='../src/gcal/_loader.js'></script>
+<!--[[
+<link rel='stylesheet' type='text/css' href='../fullcalendar/fullcalendar.css' />
+<script type='text/javascript' src='../jquery/jquery.js'></script>
+<script type='text/javascript' src='../jquery/jquery-ui.js'></script>
+<script type='text/javascript' src='../fullcalendar/fullcalendar.min.js'></script>
+<script type='text/javascript' src='../fullcalendar/gcal.js'></script>
+]]-->
+<script type='text/javascript'>
+
+ $(document).ready(function() {
+
+ $('#calendar').fullCalendar({
+
+ // US Holidays
+ events: $.fullCalendar.gcalFeed('http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic'),
+
+ eventClick: function(event) {
+ // opens events in a popup window
+ window.open(event.url, 'gcalevent', 'width=700,height=600');
+ return false;
+ },
+
+ loading: function(bool) {
+ if (bool) {
+ $('#loading').show();
+ }else{
+ $('#loading').hide();
+ }
+ }
+
+ });
+
+ });
+
+</script>
+<style type='text/css'>
+
+ body {
+ margin-top: 40px;
+ text-align: center;
+ font-size: 14px;
+ font-family: "Lucida Grande",Helvetica,Arial,Verdana,sans-serif;
+ }
+
+ #loading {
+ position: absolute;
+ top: 5px;
+ right: 5px;
+ }
+
+ #calendar {
+ width: 900px;
+ margin: 0 auto;
+ }
+
+</style>
+</head>
+<body>
+<div id='loading' style='display:none'>loading...</div>
+<div id='calendar'></div>
+</body>
+</html>
File renamed without changes.
Oops, something went wrong.

0 comments on commit e2dbcaf

Please sign in to comment.