Compare commits

..

4 commits

Author SHA1 Message Date
Adam Shaw 6121203053 updated changelog and incremented version for 1.4.11 2011-02-22 21:47:22 -08:00
Adam Shaw a4e2f63457 upgraded to jquery 1.5 and jquery-ui 1.8.9 2011-02-22 20:49:55 -08:00
Adam Shaw 55145a9252 readded omitted rerenderEvents method (backported) 2011-02-22 20:38:02 -08:00
Adam Shaw eb5c0ba7a7 readded the omitted rerenderEvents method 2011-02-22 20:29:51 -08:00
136 changed files with 3125 additions and 4912 deletions

156
Makefile
View file

@ -8,24 +8,24 @@ OTHER_FILES = \
MIT-LICENSE.txt \ MIT-LICENSE.txt \
GPL-LICENSE.txt GPL-LICENSE.txt
VER = $(shell cat version.txt) VER = $$(cat version.txt)
VER_SED = sed s/@VERSION/"$(VER)"/ VER_SED = sed s/@VERSION/"${VER}"/
DATE = $(shell git log -1 --pretty=format:%ad) DATE = $$(git log -1 --pretty=format:%ad)
DATE_SED = sed s/@DATE/"$(DATE)"/ DATE_SED = sed s/@DATE/"${DATE}"/
JQ = $(shell sed -ne "s/.*JQUERY[ \t]*=[ \t]*[\"']\(.*\)[\"'].*/\1/p" "$(SRC_DIR)/_loader.js") JQ = $$(sed -n "s/.*JQUERY\s*=\s*[\"']\(.*\)[\"'].*/\1/p" "${SRC_DIR}/_loader.js")
JQUI = $(shell sed -ne "s/.*JQUERY_UI[ \t]*=[ \t]*[\"']\(.*\)[\"'].*/\1/p" "$(SRC_DIR)/_loader.js") JQUI = $$(sed -n "s/.*JQUERY_UI\s*=\s*[\"']\(.*\)[\"'].*/\1/p" "${SRC_DIR}/_loader.js")
DEMO_FILES = $(shell cd $(DEMOS_DIR); find . -mindepth 1 -maxdepth 1 -type f) DEMO_FILES = $$(cd ${DEMOS_DIR}; find . -mindepth 1 -maxdepth 1 -type f)
DEMO_SUBDIRS = $(shell cd $(DEMOS_DIR); find . -mindepth 1 -maxdepth 1 -type d) DEMO_SUBDIRS = $$(cd ${DEMOS_DIR}; find . -mindepth 1 -maxdepth 1 -type d)
DEMO_RE = (<script[^>]*_loader\.js[^>]*><\/script>|<!--\[\[|\]\]-->)[^<]* DEMO_RE = \(<script[^>]*_loader\.js[^>]*><\/script>\|<!--\[\[\|\]\]-->\)\s*
DEMO_SED = sed -ne '1h;1!H;$${;g;s/$(DEMO_RE)//g;p;}' DEMO_SED = sed -n "1h;1!H;\$${;g;s/${DEMO_RE}//g;p;}"
JS_SED = sed -ne "s/[ \t]*js([\"']\(.*\)[\"']).*/\1/p" JS_SED = sed -n "s/\s*js([\"']\(.*\)[\"']).*/\1/p"
CSS_SED = sed -ne "s/[ \t]*css([\"']\(.*\)[\"']).*/\1/p" CSS_SED = sed -n "s/\s*css([\"']\(.*\)[\"']).*/\1/p"
concat_js = \ concat_js = \
files=$$($(JS_SED) "$(1)/_loader.js"); \ files=$$(cat "$(1)/_loader.js" | ${JS_SED}); \
if [ -f "$(1)/intro.js" ]; then \ if [ -f "$(1)/intro.js" ]; then \
files="intro.js $$files"; \ files="intro.js $$files"; \
fi; \ fi; \
@ -33,16 +33,14 @@ concat_js = \
files="$$files outro.js"; \ files="$$files outro.js"; \
fi; \ fi; \
old=$$PWD; \ old=$$PWD; \
if ! [ X = "X$$files" ]; then \
(cd "$(1)"; cat $$files; cd "$$old") \ (cd "$(1)"; cat $$files; cd "$$old") \
| $(VER_SED) \ | ${VER_SED} \
| $(DATE_SED) \ | ${DATE_SED} \
> "$(2)" ; \ > "$(2)"
fi
concat_css = \ concat_css = \
files=$$($(CSS_SED) "$(1)/_loader.js"); \ files=$$(cat "$(1)/_loader.js" | ${CSS_SED}); \
if ! [ X = "X$$files" ]; then \ if [ "$$files" ]; then \
old=$$PWD; \ old=$$PWD; \
(cd "$(1)"; cat $$files; cd "$$old") \ (cd "$(1)"; cat $$files; cd "$$old") \
| ${VER_SED} \ | ${VER_SED} \
@ -50,93 +48,61 @@ concat_css = \
> "$(2)"; \ > "$(2)"; \
fi fi
FC_V_DIR = $(BUILD_DIR)/fullcalendar-$(VER) zip:
FC_DIR = $(FC_V_DIR)/fullcalendar @rm -rf ${BUILD_DIR}/fullcalendar
FCJS = $(FC_DIR)/fullcalendar.js @rm -rf ${BUILD_DIR}/fullcalendar-*
FCCSS = $(FC_DIR)/fullcalendar.css @mkdir -p ${BUILD_DIR}/fullcalendar/fullcalendar/
FCPCSS = $(FC_DIR)/fullcalendar.print.css
FCMJS = $(FC_DIR)/fullcalendar.min.js
JQ_DIR = $(FC_V_DIR)/jquery
DEMOS_DIR = $(FC_V_DIR)/demos
FC_ZIP = $(FC_V_DIR).zip
DIST = $(DIST_DIR)/$(shell basename $(FC_ZIP))
.PHONY: all distribute dist @echo "building core..."
all: distribute @$(call concat_js,${SRC_DIR},"${BUILD_DIR}/fullcalendar/fullcalendar/fullcalendar.js")
distribute: core plugins jquery demos others @$(call concat_css,${SRC_DIR},"${BUILD_DIR}/fullcalendar/fullcalendar/fullcalendar.css")
.PHONY: clean @echo "compressing core js..."
clean: Makefile @java -jar ${BUILD_DIR}/compiler.jar --warning_level VERBOSE --jscomp_off checkTypes --externs build/externs.js \
rm -rf $(FC_ZIP) --js ${BUILD_DIR}/fullcalendar/fullcalendar/fullcalendar.js \
rm -rf $(FC_V_DIR) > ${BUILD_DIR}/fullcalendar/fullcalendar/fullcalendar.min.js; \
rm -rf $(DIST_DIR)
$(FC_V_DIR): Makefile @echo "building plugins..."
mkdir -p $@ @for loader in ${SRC_DIR}/*/_loader.js; do \
$(FC_DIR):
mkdir -p $@
$(DEMOS_DIR):
mkdir -p $@
$(JQ_DIR):
mkdir -p $@
$(DIST_DIR):
mkdir -p $@
$(FCJS): $(FC_DIR)
$(call concat_js,$(SRC_DIR),$@)
$(FCCSS): $(FC_DIR)
$(call concat_css,$(SRC_DIR),$@)
$(FCPCSS): $(SRC_DIR)/common/print.css $(FC_DIR)
$(VER_SED) $< | $(DATE_SED) > $@
.PHONY: core
core: $(FCJS) $(FCCSS) $(FCPCSS)
$(FCMJS): $(FCJS)
java -jar $(BUILD_DIR)/compiler.jar --warning_level VERBOSE --jscomp_off checkTypes --externs build/externs.js --js $< > $@
.PHONY: plugins
plugins: $(FCMJS) core
for loader in $(SRC_DIR)/*/_loader.js; do \
dir=`dirname $$loader`; \ dir=`dirname $$loader`; \
name=`basename $$dir`; \ name=`basename $$dir`; \
$(call concat_js,$$dir,$(FC_DIR)/$$name.js); \ $(call concat_js,$$dir,"${BUILD_DIR}/fullcalendar/fullcalendar/$$name.js"); \
done done
$(JQ_DIR)/$(JQ): lib/$(JQ) $(JQ_DIR) @echo "copying jquery..."
cp $< $@ @mkdir -p ${BUILD_DIR}/fullcalendar/jquery
@cp lib/${JQ} ${BUILD_DIR}/fullcalendar/jquery
@cp lib/${JQUI} ${BUILD_DIR}/fullcalendar/jquery
$(JQ_DIR)/$(JQUI): lib/$(JQUI) $(JQ_DIR) @echo "building demos..."
cp $< $@ @mkdir -p ${BUILD_DIR}/fullcalendar/demos
@for f in ${DEMO_FILES}; do \
.PHONY: jquery cat ${DEMOS_DIR}/$$f \
jquery: $(JQ_DIR)/$(JQ) $(JQ_DIR)/$(JQUI) | ${DEMO_SED} \
.PHONY: demos
demos: $(FC_DIR) $(DEMOS_DIR)
for f in $(DEMO_FILES); do \
cat $(DEMOS_DIR)/$$f \
| $(DEMO_SED) \
| sed "s/jquery\.js/${JQ}/" \ | sed "s/jquery\.js/${JQ}/" \
| sed "s/jquery-ui\.js/${JQUI}/" \ | sed "s/jquery-ui\.js/${JQUI}/" \
> $(DEMOS_DIR)/$$f; \ > ${BUILD_DIR}/fullcalendar/demos/$$f; \
done done
for d in $(DEMO_SUBDIRS); do \ @for d in ${DEMO_SUBDIRS}; do \
cp -r $(DEMOS_DIR)/$$d $(DEMOS_DIR)/$$d; \ cp -r ${DEMOS_DIR}/$$d ${BUILD_DIR}/fullcalendar/demos/$$d; \
done done
.PHONY: others @echo "copying other files..."
others: $(FC_DIR) @cp -r ${OTHER_FILES} ${BUILD_DIR}/fullcalendar
cp -r $(OTHER_FILES) $(FC_DIR)
$(FC_ZIP): $(FC_V_DIR) distribute @echo "zipping..."
zip -q -r $@ $< @mv ${BUILD_DIR}/fullcalendar ${BUILD_DIR}/fullcalendar-${VER}
@cd ${BUILD_DIR}; for f in fullcalendar-*; do \
zip -q -r $$f.zip $$f; \
done
@mv ${BUILD_DIR}/fullcalendar-${VER} ${BUILD_DIR}/fullcalendar
@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-*
@rm -rf ${DIST_DIR}/*
$(DIST): $(FC_ZIP) $(DIST_DIR)
mv $@ $<

View file

@ -45,21 +45,3 @@ Here is an example of doing it within an element having an `id` of `calendar`:
}); });
To see a full list of all available options, please consult the [FullCalendar documentation &raquo;](http://arshaw.com/fullcalendar/docs/) To see a full list of all available options, please consult the [FullCalendar documentation &raquo;](http://arshaw.com/fullcalendar/docs/)
I18n
----
To localize fullCalendar You can use i18n for jquery datepicker.
$.fullCalendar.applyLocale($.datepicker.regional['ru']);
Other texts could be modified via method setDefaults:
$.fullCalendar.setDefaults({
buttonText: {
month: 'month',
week: 'week',
day: 'day'
}
});
See all available locales here: [I18n](https://github.com/sergio-fry/fullcalendar/wiki/I18n)

View file

@ -1,61 +1,5 @@
version 1.5.2 (8/21/11) version 1.4.11 (1/22/11)
- correctly process UTC "Z" ISO8601 date strings (issue 750)
version 1.5.1 (4/9/11)
- more flexible ISO8601 date parsing (issue 814)
- more flexible parsing of UNIX timestamps (issue 826)
- FullCalendar now buildable from source on a Mac (issue 795)
- FullCalendar QA'd in FF4 (issue 883)
- upgraded to jQuery 1.5.2 (which supports IE9) and jQuery UI 1.8.11
version 1.5 (3/19/11)
- slicker default styling for buttons
- reworked a lot of the calendar's HTML and accompanying CSS
(solves issues 327 and 395)
- more printer-friendly (fullcalendar-print.css)
- fullcalendar now inherits styles from jquery-ui themes differently.
styles for buttons are distinct from styles for calendar cells.
(solves issue 299)
- can now color events through FullCalendar options and Event-Object properties (issue 117)
THIS IS NOW THE PREFERRED METHOD OF COLORING EVENTS (as opposed to using className and CSS)
- FullCalendar options:
- eventColor (changes both background and border)
- eventBackgroundColor
- eventBorderColor
- eventTextColor
- Event-Object options:
- color (changes both background and border)
- backgroundColor
- borderColor
- textColor
- can now specify an event source as an *object* with a `url` property (json feed) or
an `events` property (function or array) with additional properties that will
be applied to the entire event source:
- color (changes both background and border)
- backgroundColor
- borderColor
- textColor
- className
- editable
- allDayDefault
- ignoreTimezone
- startParam (for a feed)
- endParam (for a feed)
- ANY OF THE JQUERY $.ajax OPTIONS
allows for easily changing from GET to POST and sending additional parameters (issue 386)
allows for easily attaching ajax handlers such as `error` (issue 754)
allows for turning caching on (issue 355)
- Google Calendar feeds are now specified differently:
- specify a simple string of your feed's URL
- specify an *object* with a `url` property of your feed's URL.
you can include any of the new Event-Source options in this object.
- the old `$.fullCalendar.gcalFeed` method still works
- no more IE7 SSL popup (issue 504)
- remove `cacheParam` - use json event source `cache` option instead
- latest jquery/jquery-ui
version 1.4.11 (2/22/11)
- fixed rerenderEvents bug (issue 790) - fixed rerenderEvents bug (issue 790)
- fixed bug with faulty dragging of events from all-day slot in agenda views - fixed bug with faulty dragging of events from all-day slot in agenda views
- bundled with jquery 1.5 and jquery-ui 1.8.9 - bundled with jquery 1.5 and jquery-ui 1.8.9

View file

@ -4,7 +4,6 @@
<script type='text/javascript' src='../src/_loader.js'></script> <script type='text/javascript' src='../src/_loader.js'></script>
<!--[[ <!--[[
<link rel='stylesheet' type='text/css' href='../fullcalendar/fullcalendar.css' /> <link rel='stylesheet' type='text/css' href='../fullcalendar/fullcalendar.css' />
<link rel='stylesheet' type='text/css' href='../fullcalendar/fullcalendar.print.css' media='print' />
<script type='text/javascript' src='../jquery/jquery.js'></script> <script type='text/javascript' src='../jquery/jquery.js'></script>
<script type='text/javascript' src='../jquery/jquery-ui.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/fullcalendar.min.js'></script>

View file

@ -4,7 +4,6 @@
<script type='text/javascript' src='../src/_loader.js'></script> <script type='text/javascript' src='../src/_loader.js'></script>
<!--[[ <!--[[
<link rel='stylesheet' type='text/css' href='../fullcalendar/fullcalendar.css' /> <link rel='stylesheet' type='text/css' href='../fullcalendar/fullcalendar.css' />
<link rel='stylesheet' type='text/css' href='../fullcalendar/fullcalendar.print.css' media='print' />
<script type='text/javascript' src='../jquery/jquery.js'></script> <script type='text/javascript' src='../jquery/jquery.js'></script>
<script type='text/javascript' src='../jquery/jquery-ui.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/fullcalendar.min.js'></script>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 251 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 181 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 176 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 B

View file

@ -4,7 +4,6 @@
<script type='text/javascript' src='../src/_loader.js'></script> <script type='text/javascript' src='../src/_loader.js'></script>
<!--[[ <!--[[
<link rel='stylesheet' type='text/css' href='../fullcalendar/fullcalendar.css' /> <link rel='stylesheet' type='text/css' href='../fullcalendar/fullcalendar.css' />
<link rel='stylesheet' type='text/css' href='../fullcalendar/fullcalendar.print.css' media='print' />
<script type='text/javascript' src='../jquery/jquery.js'></script> <script type='text/javascript' src='../jquery/jquery.js'></script>
<script type='text/javascript' src='../jquery/jquery-ui.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/fullcalendar.min.js'></script>

View file

@ -4,7 +4,6 @@
<script type='text/javascript' src='../src/_loader.js'></script> <script type='text/javascript' src='../src/_loader.js'></script>
<!--[[ <!--[[
<link rel='stylesheet' type='text/css' href='../fullcalendar/fullcalendar.css' /> <link rel='stylesheet' type='text/css' href='../fullcalendar/fullcalendar.css' />
<link rel='stylesheet' type='text/css' href='../fullcalendar/fullcalendar.print.css' media='print' />
<script type='text/javascript' src='../jquery/jquery.js'></script> <script type='text/javascript' src='../jquery/jquery.js'></script>
<script type='text/javascript' src='../jquery/jquery-ui.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/fullcalendar.min.js'></script>

View file

@ -5,7 +5,6 @@
<script type='text/javascript' src='../src/gcal/_loader.js'></script> <script type='text/javascript' src='../src/gcal/_loader.js'></script>
<!--[[ <!--[[
<link rel='stylesheet' type='text/css' href='../fullcalendar/fullcalendar.css' /> <link rel='stylesheet' type='text/css' href='../fullcalendar/fullcalendar.css' />
<link rel='stylesheet' type='text/css' href='../fullcalendar/fullcalendar.print.css' media='print' />
<script type='text/javascript' src='../jquery/jquery.js'></script> <script type='text/javascript' src='../jquery/jquery.js'></script>
<script type='text/javascript' src='../jquery/jquery-ui.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/fullcalendar.min.js'></script>
@ -18,7 +17,7 @@
$('#calendar').fullCalendar({ $('#calendar').fullCalendar({
// US Holidays // US Holidays
events: 'http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic', events: $.fullCalendar.gcalFeed('http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic'),
eventClick: function(event) { eventClick: function(event) {
// opens events in a popup window // opens events in a popup window

View file

@ -4,7 +4,6 @@
<script type='text/javascript' src='../src/_loader.js'></script> <script type='text/javascript' src='../src/_loader.js'></script>
<!--[[ <!--[[
<link rel='stylesheet' type='text/css' href='../fullcalendar/fullcalendar.css' /> <link rel='stylesheet' type='text/css' href='../fullcalendar/fullcalendar.css' />
<link rel='stylesheet' type='text/css' href='../fullcalendar/fullcalendar.print.css' media='print' />
<script type='text/javascript' src='../jquery/jquery.js'></script> <script type='text/javascript' src='../jquery/jquery.js'></script>
<script type='text/javascript' src='../jquery/jquery-ui.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/fullcalendar.min.js'></script>

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View file

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

View file

@ -1,7 +1,7 @@
/* /*
* jQuery UI CSS Framework 1.8.11 * jQuery UI CSS Framework @VERSION
* *
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses. * Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license * http://jquery.org/license
* *
@ -11,7 +11,7 @@
/* Layout helpers /* Layout helpers
----------------------------------*/ ----------------------------------*/
.ui-helper-hidden { display: none; } .ui-helper-hidden { display: none; }
.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } .ui-helper-hidden-accessible { position: absolute; left: -99999999px; }
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } .ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
.ui-helper-clearfix { display: inline-block; } .ui-helper-clearfix { display: inline-block; }
@ -42,15 +42,15 @@
/* /*
* jQuery UI CSS Framework 1.8.11 * jQuery UI CSS Framework @VERSION
* *
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses. * Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license * http://jquery.org/license
* *
* http://docs.jquery.com/UI/Theming/API * http://docs.jquery.com/UI/Theming/API
* *
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Lucida%20Grande,%20Lucida%20Sans,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=6px&bgColorHeader=deedf7&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=100&borderColorHeader=aed0ea&fcHeader=222222&iconColorHeader=72a7cf&bgColorContent=f2f5f7&bgTextureContent=04_highlight_hard.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=362b36&iconColorContent=72a7cf&bgColorDefault=d7ebf9&bgTextureDefault=02_glass.png&bgImgOpacityDefault=80&borderColorDefault=aed0ea&fcDefault=2779aa&iconColorDefault=3d80b3&bgColorHover=e4f1fb&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=74b2e2&fcHover=0070a3&iconColorHover=2694e8&bgColorActive=3baae3&bgTextureActive=02_glass.png&bgImgOpacityActive=50&borderColorActive=2694e8&fcActive=ffffff&iconColorActive=ffffff&bgColorHighlight=ffef8f&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=25&borderColorHighlight=f9dd34&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=cd0a0a&bgTextureError=01_flat.png&bgImgOpacityError=15&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffffff&bgColorOverlay=eeeeee&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=90&opacityOverlay=80&bgColorShadow=000000&bgTextureShadow=04_highlight_hard.png&bgImgOpacityShadow=70&opacityShadow=30&thicknessShadow=7px&offsetTopShadow=-7px&offsetLeftShadow=-7px&cornerRadiusShadow=8px * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Lucida%20Grande,%20Lucida%20Sans,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=5px&bgColorHeader=5c9ccc&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=55&borderColorHeader=4297d7&fcHeader=ffffff&iconColorHeader=d8e7f3&bgColorContent=fcfdfd&bgTextureContent=06_inset_hard.png&bgImgOpacityContent=100&borderColorContent=a6c9e2&fcContent=222222&iconColorContent=469bdd&bgColorDefault=dfeffc&bgTextureDefault=02_glass.png&bgImgOpacityDefault=85&borderColorDefault=c5dbec&fcDefault=2e6e9e&iconColorDefault=6da8d5&bgColorHover=d0e5f5&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=79b7e7&fcHover=1d5987&iconColorHover=217bc0&bgColorActive=f5f8f9&bgTextureActive=06_inset_hard.png&bgImgOpacityActive=100&borderColorActive=79b7e7&fcActive=e17009&iconColorActive=f9bd01&bgColorHighlight=fbec88&bgTextureHighlight=01_flat.png&bgImgOpacityHighlight=55&borderColorHighlight=fad42e&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
*/ */
@ -59,28 +59,28 @@
.ui-widget { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1.1em; } .ui-widget { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1.1em; }
.ui-widget .ui-widget { font-size: 1em; } .ui-widget .ui-widget { font-size: 1em; }
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1em; } .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1em; }
.ui-widget-content { border: 1px solid #dddddd; background: #f2f5f7 url(images/ui-bg_highlight-hard_100_f2f5f7_1x100.png) 50% top repeat-x; color: #362b36; } .ui-widget-content { border: 1px solid #a6c9e2; background: #fcfdfd url(images/ui-bg_inset-hard_100_fcfdfd_1x100.png) 50% bottom repeat-x; color: #222222; }
.ui-widget-content a { color: #362b36; } .ui-widget-content a { color: #222222; }
.ui-widget-header { border: 1px solid #aed0ea; background: #deedf7 url(images/ui-bg_highlight-soft_100_deedf7_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; } .ui-widget-header { border: 1px solid #4297d7; background: #5c9ccc url(images/ui-bg_gloss-wave_55_5c9ccc_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; }
.ui-widget-header a { color: #222222; } .ui-widget-header a { color: #ffffff; }
/* Interaction states /* Interaction states
----------------------------------*/ ----------------------------------*/
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #aed0ea; background: #d7ebf9 url(images/ui-bg_glass_80_d7ebf9_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #2779aa; } .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #c5dbec; background: #dfeffc url(images/ui-bg_glass_85_dfeffc_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #2e6e9e; }
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #2779aa; text-decoration: none; } .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #2e6e9e; text-decoration: none; }
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #74b2e2; background: #e4f1fb url(images/ui-bg_glass_100_e4f1fb_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #0070a3; } .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #79b7e7; background: #d0e5f5 url(images/ui-bg_glass_75_d0e5f5_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #1d5987; }
.ui-state-hover a, .ui-state-hover a:hover { color: #0070a3; text-decoration: none; } .ui-state-hover a, .ui-state-hover a:hover { color: #1d5987; text-decoration: none; }
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #2694e8; background: #3baae3 url(images/ui-bg_glass_50_3baae3_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #ffffff; } .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #79b7e7; background: #f5f8f9 url(images/ui-bg_inset-hard_100_f5f8f9_1x100.png) 50% 50% repeat-x; font-weight: bold; color: #e17009; }
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #ffffff; text-decoration: none; } .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #e17009; text-decoration: none; }
.ui-widget :active { outline: none; } .ui-widget :active { outline: none; }
/* Interaction Cues /* Interaction Cues
----------------------------------*/ ----------------------------------*/
.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #f9dd34; background: #ffef8f url(images/ui-bg_highlight-soft_25_ffef8f_1x100.png) 50% top repeat-x; color: #363636; } .ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fad42e; background: #fbec88 url(images/ui-bg_flat_55_fbec88_40x100.png) 50% 50% repeat-x; color: #363636; }
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; } .ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #cd0a0a url(images/ui-bg_flat_15_cd0a0a_40x100.png) 50% 50% repeat-x; color: #ffffff; } .ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; }
.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; } .ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; } .ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } .ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } .ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } .ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
@ -89,14 +89,14 @@
----------------------------------*/ ----------------------------------*/
/* states and images */ /* states and images */
.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_72a7cf_256x240.png); } .ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_469bdd_256x240.png); }
.ui-widget-content .ui-icon {background-image: url(images/ui-icons_72a7cf_256x240.png); } .ui-widget-content .ui-icon {background-image: url(images/ui-icons_469bdd_256x240.png); }
.ui-widget-header .ui-icon {background-image: url(images/ui-icons_72a7cf_256x240.png); } .ui-widget-header .ui-icon {background-image: url(images/ui-icons_d8e7f3_256x240.png); }
.ui-state-default .ui-icon { background-image: url(images/ui-icons_3d80b3_256x240.png); } .ui-state-default .ui-icon { background-image: url(images/ui-icons_6da8d5_256x240.png); }
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_2694e8_256x240.png); } .ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_217bc0_256x240.png); }
.ui-state-active .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } .ui-state-active .ui-icon {background-image: url(images/ui-icons_f9bd01_256x240.png); }
.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); } .ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); }
.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } .ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png); }
/* positioning */ /* positioning */
.ui-icon-carat-1-n { background-position: 0 0; } .ui-icon-carat-1-n { background-position: 0 0; }
@ -280,22 +280,22 @@
----------------------------------*/ ----------------------------------*/
/* Corner radius */ /* Corner radius */
.ui-corner-tl { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; border-top-left-radius: 6px; } .ui-corner-tl { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; border-top-left-radius: 5px; }
.ui-corner-tr { -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; border-top-right-radius: 6px; } .ui-corner-tr { -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; border-top-right-radius: 5px; }
.ui-corner-bl { -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; } .ui-corner-bl { -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; border-bottom-left-radius: 5px; }
.ui-corner-br { -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; } .ui-corner-br { -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; border-bottom-right-radius: 5px; }
.ui-corner-top { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; border-top-left-radius: 6px; -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; border-top-right-radius: 6px; } .ui-corner-top { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; border-top-left-radius: 5px; -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; border-top-right-radius: 5px; }
.ui-corner-bottom { -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; } .ui-corner-bottom { -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; border-bottom-left-radius: 5px; -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; border-bottom-right-radius: 5px; }
.ui-corner-right { -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; border-top-right-radius: 6px; -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; } .ui-corner-right { -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; border-top-right-radius: 5px; -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; border-bottom-right-radius: 5px; }
.ui-corner-left { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; border-top-left-radius: 6px; -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; } .ui-corner-left { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; border-top-left-radius: 5px; -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; border-bottom-left-radius: 5px; }
.ui-corner-all { -moz-border-radius: 6px; -webkit-border-radius: 6px; border-radius: 6px; } .ui-corner-all { -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; }
/* Overlays */ /* Overlays */
.ui-widget-overlay { background: #eeeeee url(images/ui-bg_diagonals-thick_90_eeeeee_40x40.png) 50% 50% repeat; opacity: .80;filter:Alpha(Opacity=80); } .ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
.ui-widget-shadow { margin: -7px 0 0 -7px; padding: 7px; background: #000000 url(images/ui-bg_highlight-hard_70_000000_1x100.png) 50% top repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/* .ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/*
* jQuery UI Resizable 1.8.11 * jQuery UI Resizable @VERSION
* *
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses. * Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license * http://jquery.org/license
* *
@ -312,9 +312,9 @@
.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } .ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } .ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* .ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*
* jQuery UI Tabs 1.8.11 * jQuery UI Tabs @VERSION
* *
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses. * Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license * http://jquery.org/license
* *

View file

@ -4,7 +4,6 @@
<script type='text/javascript' src='../src/_loader.js'></script> <script type='text/javascript' src='../src/_loader.js'></script>
<!--[[ <!--[[
<link rel='stylesheet' type='text/css' href='../fullcalendar/fullcalendar.css' /> <link rel='stylesheet' type='text/css' href='../fullcalendar/fullcalendar.css' />
<link rel='stylesheet' type='text/css' href='../fullcalendar/fullcalendar.print.css' media='print' />
<script type='text/javascript' src='../jquery/jquery.js'></script> <script type='text/javascript' src='../jquery/jquery.js'></script>
<script type='text/javascript' src='../jquery/jquery-ui.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/fullcalendar.min.js'></script>

View file

@ -1,11 +1,10 @@
<!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> <html>
<head> <head>
<link rel='stylesheet' type='text/css' href='cupertino/theme.css' /> <link rel='stylesheet' type='text/css' href='redmond/theme.css' />
<script type='text/javascript' src='../src/_loader.js'></script> <script type='text/javascript' src='../src/_loader.js'></script>
<!--[[ <!--[[
<link rel='stylesheet' type='text/css' href='../fullcalendar/fullcalendar.css' /> <link rel='stylesheet' type='text/css' href='../fullcalendar/fullcalendar.css' />
<link rel='stylesheet' type='text/css' href='../fullcalendar/fullcalendar.print.css' media='print' />
<script type='text/javascript' src='../jquery/jquery.js'></script> <script type='text/javascript' src='../jquery/jquery.js'></script>
<script type='text/javascript' src='../jquery/jquery-ui.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/fullcalendar.min.js'></script>

16
lib/jquery-1.5.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,150 +0,0 @@
/*!
* jQuery UI 1.8.16
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI
*/
(function(c,j){function k(a,b){var d=a.nodeName.toLowerCase();if("area"===d){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&l(a)}return(/input|select|textarea|button|object/.test(d)?!a.disabled:"a"==d?a.href||b:b)&&l(a)}function l(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.16",
keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({propAttr:c.fn.prop||c.fn.attr,_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d=
this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this,
"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"),10);if(!isNaN(b)&&b!==0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart":
"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,m,n){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(m)g-=parseFloat(c.curCSS(f,"border"+this+"Width",true))||0;if(n)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight,
outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c(this).css(h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c(this).css(h,d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){return k(a,!isNaN(c.attr(a,"tabindex")))},tabbable:function(a){var b=c.attr(a,
"tabindex"),d=isNaN(b);return(d||b>=0)&&k(a,!d)}});c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&
a.element[0].parentNode)for(var e=0;e<b.length;e++)a.options[b[e][0]]&&b[e][1].apply(a.element,d)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(a,b){if(c(a).css("overflow")==="hidden")return false;b=b&&b==="left"?"scrollLeft":"scrollTop";var d=false;if(a[b]>0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a<b+d},isOver:function(a,b,d,e,h,i){return c.ui.isOverAxis(a,d,h)&&
c.ui.isOverAxis(b,e,i)}})}})(jQuery);
;/*!
* jQuery UI Widget 1.8.16
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Widget
*/
(function(b,j){if(b.cleanData){var k=b.cleanData;b.cleanData=function(a){for(var c=0,d;(d=a[c])!=null;c++)try{b(d).triggerHandler("remove")}catch(e){}k(a)}}else{var l=b.fn.remove;b.fn.remove=function(a,c){return this.each(function(){if(!c)if(!a||b.filter(a,[this]).length)b("*",this).add([this]).each(function(){try{b(this).triggerHandler("remove")}catch(d){}});return l.call(b(this),a,c)})}}b.widget=function(a,c,d){var e=a.split(".")[0],f;a=a.split(".")[1];f=e+"-"+a;if(!d){d=c;c=b.Widget}b.expr[":"][f]=
function(h){return!!b.data(h,a)};b[e]=b[e]||{};b[e][a]=function(h,g){arguments.length&&this._createWidget(h,g)};c=new c;c.options=b.extend(true,{},c.options);b[e][a].prototype=b.extend(true,c,{namespace:e,widgetName:a,widgetEventPrefix:b[e][a].prototype.widgetEventPrefix||a,widgetBaseClass:f},d);b.widget.bridge(a,b[e][a])};b.widget.bridge=function(a,c){b.fn[a]=function(d){var e=typeof d==="string",f=Array.prototype.slice.call(arguments,1),h=this;d=!e&&f.length?b.extend.apply(null,[true,d].concat(f)):
d;if(e&&d.charAt(0)==="_")return h;e?this.each(function(){var g=b.data(this,a),i=g&&b.isFunction(g[d])?g[d].apply(g,f):g;if(i!==g&&i!==j){h=i;return false}}):this.each(function(){var g=b.data(this,a);g?g.option(d||{})._init():b.data(this,a,new c(d,this))});return h}};b.Widget=function(a,c){arguments.length&&this._createWidget(a,c)};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(a,c){b.data(c,this.widgetName,this);this.element=b(c);this.options=
b.extend(true,{},this.options,this._getCreateOptions(),a);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+
"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(a,c){var d=a;if(arguments.length===0)return b.extend({},this.options);if(typeof a==="string"){if(c===j)return this.options[a];d={};d[a]=c}this._setOptions(d);return this},_setOptions:function(a){var c=this;b.each(a,function(d,e){c._setOption(d,e)});return this},_setOption:function(a,c){this.options[a]=c;if(a==="disabled")this.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",
c);return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(a,c,d){var e=this.options[a];c=b.Event(c);c.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();d=d||{};if(c.originalEvent){a=b.event.props.length;for(var f;a;){f=b.event.props[--a];c[f]=c.originalEvent[f]}}this.element.trigger(c,d);return!(b.isFunction(e)&&e.call(this.element[0],c,d)===false||c.isDefaultPrevented())}}})(jQuery);
;/*!
* jQuery UI Mouse 1.8.16
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Mouse
*
* Depends:
* jquery.ui.widget.js
*/
(function(b){var d=false;b(document).mouseup(function(){d=false});b.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var a=this;this.element.bind("mousedown."+this.widgetName,function(c){return a._mouseDown(c)}).bind("click."+this.widgetName,function(c){if(true===b.data(c.target,a.widgetName+".preventClickEvent")){b.removeData(c.target,a.widgetName+".preventClickEvent");c.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+
this.widgetName)},_mouseDown:function(a){if(!d){this._mouseStarted&&this._mouseUp(a);this._mouseDownEvent=a;var c=this,f=a.which==1,g=typeof this.options.cancel=="string"&&a.target.nodeName?b(a.target).closest(this.options.cancel).length:false;if(!f||g||!this._mouseCapture(a))return true;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){c.mouseDelayMet=true},this.options.delay);if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a)){this._mouseStarted=
this._mouseStart(a)!==false;if(!this._mouseStarted){a.preventDefault();return true}}true===b.data(a.target,this.widgetName+".preventClickEvent")&&b.removeData(a.target,this.widgetName+".preventClickEvent");this._mouseMoveDelegate=function(e){return c._mouseMove(e)};this._mouseUpDelegate=function(e){return c._mouseUp(e)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);a.preventDefault();return d=true}},_mouseMove:function(a){if(b.browser.msie&&
!(document.documentMode>=9)&&!a.button)return this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a);return a.preventDefault()}if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==false)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=
false;a.target==this._mouseDownEvent.target&&b.data(a.target,this.widgetName+".preventClickEvent",true);this._mouseStop(a)}return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);
;/*
* jQuery UI Draggable 1.8.16
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Draggables
*
* Depends:
* jquery.ui.core.js
* jquery.ui.mouse.js
* jquery.ui.widget.js
*/
(function(d){d.widget("ui.draggable",d.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper==
"original"&&!/^(?:r|a|f)/.test(this.element.css("position")))this.element[0].style.position="relative";this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this}},_mouseCapture:function(a){var b=
this.options;if(this.helper||b.disabled||d(a.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(a);if(!this.handle)return false;if(b.iframeFix)d(b.iframeFix===true?"iframe":b.iframeFix).each(function(){d('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(d(this).offset()).appendTo("body")});return true},_mouseStart:function(a){var b=this.options;
this.helper=this._createHelper(a);this._cacheHelperProportions();if(d.ui.ddmanager)d.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});
this.originalPosition=this.position=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);b.containment&&this._setContainment();if(this._trigger("start",a)===false){this._clear();return false}this._cacheHelperProportions();d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(a,true);d.ui.ddmanager&&d.ui.ddmanager.dragStart(this,a);return true},
_mouseDrag:function(a,b){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");if(!b){b=this._uiHash();if(this._trigger("drag",a,b)===false){this._mouseUp({});return false}this.position=b.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);return false},_mouseStop:function(a){var b=
false;if(d.ui.ddmanager&&!this.options.dropBehaviour)b=d.ui.ddmanager.drop(this,a);if(this.dropped){b=this.dropped;this.dropped=false}if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original")return false;if(this.options.revert=="invalid"&&!b||this.options.revert=="valid"&&b||this.options.revert===true||d.isFunction(this.options.revert)&&this.options.revert.call(this.element,b)){var c=this;d(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,
10),function(){c._trigger("stop",a)!==false&&c._clear()})}else this._trigger("stop",a)!==false&&this._clear();return false},_mouseUp:function(a){this.options.iframeFix===true&&d("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)});d.ui.ddmanager&&d.ui.ddmanager.dragStop(this,a);return d.ui.mouse.prototype._mouseUp.call(this,a)},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(a){var b=!this.options.handle||
!d(this.options.handle,this.element).length?true:false;d(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==a.target)b=true});return b},_createHelper:function(a){var b=this.options;a=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[a])):b.helper=="clone"?this.element.clone().removeAttr("id"):this.element;a.parents("body").length||a.appendTo(b.appendTo=="parent"?this.element[0].parentNode:b.appendTo);a[0]!=this.element[0]&&!/(fixed|absolute)/.test(a.css("position"))&&
a.css("position","absolute");return a},_adjustOffsetFromHelper:function(a){if(typeof a=="string")a=a.split(" ");if(d.isArray(a))a={left:+a[0],top:+a[1]||0};if("left"in a)this.offset.click.left=a.left+this.margins.left;if("right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;if("top"in a)this.offset.click.top=a.top+this.margins.top;if("bottom"in a)this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=
this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&d.browser.msie)a={top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"),
10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),
10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var a=this.options;if(a.containment=="parent")a.containment=this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[a.containment=="document"?0:d(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,a.containment=="document"?0:d(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,
(a.containment=="document"?0:d(window).scrollLeft())+d(a.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a.containment=="document"?0:d(window).scrollTop())+(d(a.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)&&a.containment.constructor!=Array){a=d(a.containment);var b=a[0];if(b){a.offset();var c=d(b).css("overflow")!=
"hidden";this.containment=[(parseInt(d(b).css("borderLeftWidth"),10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0),(parseInt(d(b).css("borderTopWidth"),10)||0)+(parseInt(d(b).css("paddingTop"),10)||0),(c?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),10)||0)-(parseInt(d(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(c?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"),
10)||0)-(parseInt(d(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom];this.relative_container=a}}else if(a.containment.constructor==Array)this.containment=a.containment},_convertPositionTo:function(a,b){if(!b)b=this.position;a=a=="absolute"?1:-1;var c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName);return{top:b.top+
this.offset.relative.top*a+this.offset.parent.top*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:c.scrollTop())*a),left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:c.scrollLeft())*a)}},_generatePosition:function(a){var b=this.options,c=this.cssPosition=="absolute"&&
!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName),e=a.pageX,h=a.pageY;if(this.originalPosition){var g;if(this.containment){if(this.relative_container){g=this.relative_container.offset();g=[this.containment[0]+g.left,this.containment[1]+g.top,this.containment[2]+g.left,this.containment[3]+g.top]}else g=this.containment;if(a.pageX-this.offset.click.left<g[0])e=g[0]+this.offset.click.left;
if(a.pageY-this.offset.click.top<g[1])h=g[1]+this.offset.click.top;if(a.pageX-this.offset.click.left>g[2])e=g[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>g[3])h=g[3]+this.offset.click.top}if(b.grid){h=b.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/b.grid[1])*b.grid[1]:this.originalPageY;h=g?!(h-this.offset.click.top<g[1]||h-this.offset.click.top>g[3])?h:!(h-this.offset.click.top<g[1])?h-b.grid[1]:h+b.grid[1]:h;e=b.grid[0]?this.originalPageX+Math.round((e-this.originalPageX)/
b.grid[0])*b.grid[0]:this.originalPageX;e=g?!(e-this.offset.click.left<g[0]||e-this.offset.click.left>g[2])?e:!(e-this.offset.click.left<g[0])?e-b.grid[0]:e+b.grid[0]:e}}return{top:h-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:c.scrollTop()),left:e-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(d.browser.safari&&d.browser.version<
526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:c.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove();this.helper=null;this.cancelHelperRemoval=false},_trigger:function(a,b,c){c=c||this._uiHash();d.ui.plugin.call(this,a,[b,c]);if(a=="drag")this.positionAbs=this._convertPositionTo("absolute");return d.Widget.prototype._trigger.call(this,a,b,
c)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});d.extend(d.ui.draggable,{version:"1.8.16"});d.ui.plugin.add("draggable","connectToSortable",{start:function(a,b){var c=d(this).data("draggable"),f=c.options,e=d.extend({},b,{item:c.element});c.sortables=[];d(f.connectToSortable).each(function(){var h=d.data(this,"sortable");if(h&&!h.options.disabled){c.sortables.push({instance:h,shouldRevert:h.options.revert});
h.refreshPositions();h._trigger("activate",a,e)}})},stop:function(a,b){var c=d(this).data("draggable"),f=d.extend({},b,{item:c.element});d.each(c.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;c.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert)this.instance.options.revert=true;this.instance._mouseStop(a);this.instance.options.helper=this.instance.options._helper;c.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})}else{this.instance.cancelHelperRemoval=
false;this.instance._trigger("deactivate",a,f)}})},drag:function(a,b){var c=d(this).data("draggable"),f=this;d.each(c.sortables,function(){this.instance.positionAbs=c.positionAbs;this.instance.helperProportions=c.helperProportions;this.instance.offset.click=c.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=d(f).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item",true);
this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return b.helper[0]};a.target=this.instance.currentItem[0];this.instance._mouseCapture(a,true);this.instance._mouseStart(a,true,true);this.instance.offset.click.top=c.offset.click.top;this.instance.offset.click.left=c.offset.click.left;this.instance.offset.parent.left-=c.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=c.offset.parent.top-this.instance.offset.parent.top;
c._trigger("toSortable",a);c.dropped=this.instance.element;c.currentItem=c.element;this.instance.fromOutside=c}this.instance.currentItem&&this.instance._mouseDrag(a)}else if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",a,this.instance._uiHash(this.instance));this.instance._mouseStop(a,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();this.instance.placeholder&&
this.instance.placeholder.remove();c._trigger("fromSortable",a);c.dropped=false}})}});d.ui.plugin.add("draggable","cursor",{start:function(){var a=d("body"),b=d(this).data("draggable").options;if(a.css("cursor"))b._cursor=a.css("cursor");a.css("cursor",b.cursor)},stop:function(){var a=d(this).data("draggable").options;a._cursor&&d("body").css("cursor",a._cursor)}});d.ui.plugin.add("draggable","opacity",{start:function(a,b){a=d(b.helper);b=d(this).data("draggable").options;if(a.css("opacity"))b._opacity=
a.css("opacity");a.css("opacity",b.opacity)},stop:function(a,b){a=d(this).data("draggable").options;a._opacity&&d(b.helper).css("opacity",a._opacity)}});d.ui.plugin.add("draggable","scroll",{start:function(){var a=d(this).data("draggable");if(a.scrollParent[0]!=document&&a.scrollParent[0].tagName!="HTML")a.overflowOffset=a.scrollParent.offset()},drag:function(a){var b=d(this).data("draggable"),c=b.options,f=false;if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){if(!c.axis||c.axis!=
"x")if(b.overflowOffset.top+b.scrollParent[0].offsetHeight-a.pageY<c.scrollSensitivity)b.scrollParent[0].scrollTop=f=b.scrollParent[0].scrollTop+c.scrollSpeed;else if(a.pageY-b.overflowOffset.top<c.scrollSensitivity)b.scrollParent[0].scrollTop=f=b.scrollParent[0].scrollTop-c.scrollSpeed;if(!c.axis||c.axis!="y")if(b.overflowOffset.left+b.scrollParent[0].offsetWidth-a.pageX<c.scrollSensitivity)b.scrollParent[0].scrollLeft=f=b.scrollParent[0].scrollLeft+c.scrollSpeed;else if(a.pageX-b.overflowOffset.left<
c.scrollSensitivity)b.scrollParent[0].scrollLeft=f=b.scrollParent[0].scrollLeft-c.scrollSpeed}else{if(!c.axis||c.axis!="x")if(a.pageY-d(document).scrollTop()<c.scrollSensitivity)f=d(document).scrollTop(d(document).scrollTop()-c.scrollSpeed);else if(d(window).height()-(a.pageY-d(document).scrollTop())<c.scrollSensitivity)f=d(document).scrollTop(d(document).scrollTop()+c.scrollSpeed);if(!c.axis||c.axis!="y")if(a.pageX-d(document).scrollLeft()<c.scrollSensitivity)f=d(document).scrollLeft(d(document).scrollLeft()-
c.scrollSpeed);else if(d(window).width()-(a.pageX-d(document).scrollLeft())<c.scrollSensitivity)f=d(document).scrollLeft(d(document).scrollLeft()+c.scrollSpeed)}f!==false&&d.ui.ddmanager&&!c.dropBehaviour&&d.ui.ddmanager.prepareOffsets(b,a)}});d.ui.plugin.add("draggable","snap",{start:function(){var a=d(this).data("draggable"),b=a.options;a.snapElements=[];d(b.snap.constructor!=String?b.snap.items||":data(draggable)":b.snap).each(function(){var c=d(this),f=c.offset();this!=a.element[0]&&a.snapElements.push({item:this,
width:c.outerWidth(),height:c.outerHeight(),top:f.top,left:f.left})})},drag:function(a,b){for(var c=d(this).data("draggable"),f=c.options,e=f.snapTolerance,h=b.offset.left,g=h+c.helperProportions.width,n=b.offset.top,o=n+c.helperProportions.height,i=c.snapElements.length-1;i>=0;i--){var j=c.snapElements[i].left,l=j+c.snapElements[i].width,k=c.snapElements[i].top,m=k+c.snapElements[i].height;if(j-e<h&&h<l+e&&k-e<n&&n<m+e||j-e<h&&h<l+e&&k-e<o&&o<m+e||j-e<g&&g<l+e&&k-e<n&&n<m+e||j-e<g&&g<l+e&&k-e<o&&
o<m+e){if(f.snapMode!="inner"){var p=Math.abs(k-o)<=e,q=Math.abs(m-n)<=e,r=Math.abs(j-g)<=e,s=Math.abs(l-h)<=e;if(p)b.position.top=c._convertPositionTo("relative",{top:k-c.helperProportions.height,left:0}).top-c.margins.top;if(q)b.position.top=c._convertPositionTo("relative",{top:m,left:0}).top-c.margins.top;if(r)b.position.left=c._convertPositionTo("relative",{top:0,left:j-c.helperProportions.width}).left-c.margins.left;if(s)b.position.left=c._convertPositionTo("relative",{top:0,left:l}).left-c.margins.left}var t=
p||q||r||s;if(f.snapMode!="outer"){p=Math.abs(k-n)<=e;q=Math.abs(m-o)<=e;r=Math.abs(j-h)<=e;s=Math.abs(l-g)<=e;if(p)b.position.top=c._convertPositionTo("relative",{top:k,left:0}).top-c.margins.top;if(q)b.position.top=c._convertPositionTo("relative",{top:m-c.helperProportions.height,left:0}).top-c.margins.top;if(r)b.position.left=c._convertPositionTo("relative",{top:0,left:j}).left-c.margins.left;if(s)b.position.left=c._convertPositionTo("relative",{top:0,left:l-c.helperProportions.width}).left-c.margins.left}if(!c.snapElements[i].snapping&&
(p||q||r||s||t))c.options.snap.snap&&c.options.snap.snap.call(c.element,a,d.extend(c._uiHash(),{snapItem:c.snapElements[i].item}));c.snapElements[i].snapping=p||q||r||s||t}else{c.snapElements[i].snapping&&c.options.snap.release&&c.options.snap.release.call(c.element,a,d.extend(c._uiHash(),{snapItem:c.snapElements[i].item}));c.snapElements[i].snapping=false}}}});d.ui.plugin.add("draggable","stack",{start:function(){var a=d(this).data("draggable").options;a=d.makeArray(d(a.stack)).sort(function(c,f){return(parseInt(d(c).css("zIndex"),
10)||0)-(parseInt(d(f).css("zIndex"),10)||0)});if(a.length){var b=parseInt(a[0].style.zIndex)||0;d(a).each(function(c){this.style.zIndex=b+c});this[0].style.zIndex=b+a.length}}});d.ui.plugin.add("draggable","zIndex",{start:function(a,b){a=d(b.helper);b=d(this).data("draggable").options;if(a.css("zIndex"))b._zIndex=a.css("zIndex");a.css("zIndex",b.zIndex)},stop:function(a,b){a=d(this).data("draggable").options;a._zIndex&&d(b.helper).css("zIndex",a._zIndex)}})})(jQuery);
;/*
* jQuery UI Resizable 1.8.16
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Resizables
*
* Depends:
* jquery.ui.core.js
* jquery.ui.mouse.js
* jquery.ui.widget.js
*/
(function(e){e.widget("ui.resizable",e.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1E3},_create:function(){var b=this,a=this.options;this.element.addClass("ui-resizable");e.extend(this,{_aspectRatio:!!a.aspectRatio,aspectRatio:a.aspectRatio,originalElement:this.element,
_proportionallyResizeElements:[],_helper:a.helper||a.ghost||a.animate?a.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){/relative/.test(this.element.css("position"))&&e.browser.opera&&this.element.css({position:"relative",top:"auto",left:"auto"});this.element.wrap(e('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),
top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=
this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=a.handles||(!e(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",
nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all")this.handles="n,e,s,w,se,sw,ne,nw";var c=this.handles.split(",");this.handles={};for(var d=0;d<c.length;d++){var f=e.trim(c[d]),g=e('<div class="ui-resizable-handle '+("ui-resizable-"+f)+'"></div>');/sw|se|ne|nw/.test(f)&&g.css({zIndex:++a.zIndex});"se"==f&&g.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[f]=".ui-resizable-"+f;this.element.append(g)}}this._renderAxis=function(h){h=h||this.element;for(var i in this.handles){if(this.handles[i].constructor==
String)this.handles[i]=e(this.handles[i],this.element).show();if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var j=e(this.handles[i],this.element),l=0;l=/sw|ne|nw|se|n|s/.test(i)?j.outerHeight():j.outerWidth();j=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join("");h.css(j,l);this._proportionallyResize()}e(this.handles[i])}};this._renderAxis(this.element);this._handles=e(".ui-resizable-handle",this.element).disableSelection();
this._handles.mouseover(function(){if(!b.resizing){if(this.className)var h=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);b.axis=h&&h[1]?h[1]:"se"}});if(a.autoHide){this._handles.hide();e(this.element).addClass("ui-resizable-autohide").hover(function(){if(!a.disabled){e(this).removeClass("ui-resizable-autohide");b._handles.show()}},function(){if(!a.disabled)if(!b.resizing){e(this).addClass("ui-resizable-autohide");b._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();
var b=function(c){e(c).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){b(this.element);var a=this.element;a.after(this.originalElement.css({position:a.css("position"),width:a.outerWidth(),height:a.outerHeight(),top:a.css("top"),left:a.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);b(this.originalElement);return this},_mouseCapture:function(b){var a=
false;for(var c in this.handles)if(e(this.handles[c])[0]==b.target)a=true;return!this.options.disabled&&a},_mouseStart:function(b){var a=this.options,c=this.element.position(),d=this.element;this.resizing=true;this.documentScroll={top:e(document).scrollTop(),left:e(document).scrollLeft()};if(d.is(".ui-draggable")||/absolute/.test(d.css("position")))d.css({position:"absolute",top:c.top,left:c.left});e.browser.opera&&/relative/.test(d.css("position"))&&d.css({position:"relative",top:"auto",left:"auto"});
this._renderProxy();c=m(this.helper.css("left"));var f=m(this.helper.css("top"));if(a.containment){c+=e(a.containment).scrollLeft()||0;f+=e(a.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:c,top:f};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:c,top:f};this.sizeDiff=
{width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:b.pageX,top:b.pageY};this.aspectRatio=typeof a.aspectRatio=="number"?a.aspectRatio:this.originalSize.width/this.originalSize.height||1;a=e(".ui-resizable-"+this.axis).css("cursor");e("body").css("cursor",a=="auto"?this.axis+"-resize":a);d.addClass("ui-resizable-resizing");this._propagate("start",b);return true},_mouseDrag:function(b){var a=this.helper,c=this.originalMousePosition,d=this._change[this.axis];
if(!d)return false;c=d.apply(this,[b,b.pageX-c.left||0,b.pageY-c.top||0]);this._updateVirtualBoundaries(b.shiftKey);if(this._aspectRatio||b.shiftKey)c=this._updateRatio(c,b);c=this._respectSize(c,b);this._propagate("resize",b);a.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();this._updateCache(c);this._trigger("resize",b,this.ui());return false},
_mouseStop:function(b){this.resizing=false;var a=this.options,c=this;if(this._helper){var d=this._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName);d=f&&e.ui.hasScroll(d[0],"left")?0:c.sizeDiff.height;f=f?0:c.sizeDiff.width;f={width:c.helper.width()-f,height:c.helper.height()-d};d=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null;var g=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null;a.animate||this.element.css(e.extend(f,
{top:g,left:d}));c.helper.height(c.size.height);c.helper.width(c.size.width);this._helper&&!a.animate&&this._proportionallyResize()}e("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",b);this._helper&&this.helper.remove();return false},_updateVirtualBoundaries:function(b){var a=this.options,c,d,f;a={minWidth:k(a.minWidth)?a.minWidth:0,maxWidth:k(a.maxWidth)?a.maxWidth:Infinity,minHeight:k(a.minHeight)?a.minHeight:0,maxHeight:k(a.maxHeight)?a.maxHeight:
Infinity};if(this._aspectRatio||b){b=a.minHeight*this.aspectRatio;d=a.minWidth/this.aspectRatio;c=a.maxHeight*this.aspectRatio;f=a.maxWidth/this.aspectRatio;if(b>a.minWidth)a.minWidth=b;if(d>a.minHeight)a.minHeight=d;if(c<a.maxWidth)a.maxWidth=c;if(f<a.maxHeight)a.maxHeight=f}this._vBoundaries=a},_updateCache:function(b){this.offset=this.helper.offset();if(k(b.left))this.position.left=b.left;if(k(b.top))this.position.top=b.top;if(k(b.height))this.size.height=b.height;if(k(b.width))this.size.width=
b.width},_updateRatio:function(b){var a=this.position,c=this.size,d=this.axis;if(k(b.height))b.width=b.height*this.aspectRatio;else if(k(b.width))b.height=b.width/this.aspectRatio;if(d=="sw"){b.left=a.left+(c.width-b.width);b.top=null}if(d=="nw"){b.top=a.top+(c.height-b.height);b.left=a.left+(c.width-b.width)}return b},_respectSize:function(b){var a=this._vBoundaries,c=this.axis,d=k(b.width)&&a.maxWidth&&a.maxWidth<b.width,f=k(b.height)&&a.maxHeight&&a.maxHeight<b.height,g=k(b.width)&&a.minWidth&&
a.minWidth>b.width,h=k(b.height)&&a.minHeight&&a.minHeight>b.height;if(g)b.width=a.minWidth;if(h)b.height=a.minHeight;if(d)b.width=a.maxWidth;if(f)b.height=a.maxHeight;var i=this.originalPosition.left+this.originalSize.width,j=this.position.top+this.size.height,l=/sw|nw|w/.test(c);c=/nw|ne|n/.test(c);if(g&&l)b.left=i-a.minWidth;if(d&&l)b.left=i-a.maxWidth;if(h&&c)b.top=j-a.minHeight;if(f&&c)b.top=j-a.maxHeight;if((a=!b.width&&!b.height)&&!b.left&&b.top)b.top=null;else if(a&&!b.top&&b.left)b.left=
null;return b},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var b=this.helper||this.element,a=0;a<this._proportionallyResizeElements.length;a++){var c=this._proportionallyResizeElements[a];if(!this.borderDif){var d=[c.css("borderTopWidth"),c.css("borderRightWidth"),c.css("borderBottomWidth"),c.css("borderLeftWidth")],f=[c.css("paddingTop"),c.css("paddingRight"),c.css("paddingBottom"),c.css("paddingLeft")];this.borderDif=e.map(d,function(g,h){g=parseInt(g,10)||
0;h=parseInt(f[h],10)||0;return g+h})}e.browser.msie&&(e(b).is(":hidden")||e(b).parents(":hidden").length)||c.css({height:b.height()-this.borderDif[0]-this.borderDif[2]||0,width:b.width()-this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:function(){var b=this.options;this.elementOffset=this.element.offset();if(this._helper){this.helper=this.helper||e('<div style="overflow:hidden;"></div>');var a=e.browser.msie&&e.browser.version<7,c=a?1:0;a=a?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+
a,height:this.element.outerHeight()+a,position:"absolute",left:this.elementOffset.left-c+"px",top:this.elementOffset.top-c+"px",zIndex:++b.zIndex});this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(b,a){return{width:this.originalSize.width+a}},w:function(b,a){return{left:this.originalPosition.left+a,width:this.originalSize.width-a}},n:function(b,a,c){return{top:this.originalPosition.top+c,height:this.originalSize.height-c}},s:function(b,a,c){return{height:this.originalSize.height+
c}},se:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,a,c]))},sw:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,a,c]))},ne:function(b,a,c){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,a,c]))},nw:function(b,a,c){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,a,c]))}},_propagate:function(b,a){e.ui.plugin.call(this,b,[a,this.ui()]);
b!="resize"&&this._trigger(b,a,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});e.extend(e.ui.resizable,{version:"1.8.16"});e.ui.plugin.add("resizable","alsoResize",{start:function(){var b=e(this).data("resizable").options,a=function(c){e(c).each(function(){var d=e(this);d.data("resizable-alsoresize",{width:parseInt(d.width(),
10),height:parseInt(d.height(),10),left:parseInt(d.css("left"),10),top:parseInt(d.css("top"),10),position:d.css("position")})})};if(typeof b.alsoResize=="object"&&!b.alsoResize.parentNode)if(b.alsoResize.length){b.alsoResize=b.alsoResize[0];a(b.alsoResize)}else e.each(b.alsoResize,function(c){a(c)});else a(b.alsoResize)},resize:function(b,a){var c=e(this).data("resizable");b=c.options;var d=c.originalSize,f=c.originalPosition,g={height:c.size.height-d.height||0,width:c.size.width-d.width||0,top:c.position.top-
f.top||0,left:c.position.left-f.left||0},h=function(i,j){e(i).each(function(){var l=e(this),q=e(this).data("resizable-alsoresize"),p={},r=j&&j.length?j:l.parents(a.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(r,function(n,o){if((n=(q[o]||0)+(g[o]||0))&&n>=0)p[o]=n||null});if(e.browser.opera&&/relative/.test(l.css("position"))){c._revertToRelativePosition=true;l.css({position:"absolute",top:"auto",left:"auto"})}l.css(p)})};typeof b.alsoResize=="object"&&!b.alsoResize.nodeType?
e.each(b.alsoResize,function(i,j){h(i,j)}):h(b.alsoResize)},stop:function(){var b=e(this).data("resizable"),a=b.options,c=function(d){e(d).each(function(){var f=e(this);f.css({position:f.data("resizable-alsoresize").position})})};if(b._revertToRelativePosition){b._revertToRelativePosition=false;typeof a.alsoResize=="object"&&!a.alsoResize.nodeType?e.each(a.alsoResize,function(d){c(d)}):c(a.alsoResize)}e(this).removeData("resizable-alsoresize")}});e.ui.plugin.add("resizable","animate",{stop:function(b){var a=
e(this).data("resizable"),c=a.options,d=a._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName),g=f&&e.ui.hasScroll(d[0],"left")?0:a.sizeDiff.height;f={width:a.size.width-(f?0:a.sizeDiff.width),height:a.size.height-g};g=parseInt(a.element.css("left"),10)+(a.position.left-a.originalPosition.left)||null;var h=parseInt(a.element.css("top"),10)+(a.position.top-a.originalPosition.top)||null;a.element.animate(e.extend(f,h&&g?{top:h,left:g}:{}),{duration:c.animateDuration,easing:c.animateEasing,
step:function(){var i={width:parseInt(a.element.css("width"),10),height:parseInt(a.element.css("height"),10),top:parseInt(a.element.css("top"),10),left:parseInt(a.element.css("left"),10)};d&&d.length&&e(d[0]).css({width:i.width,height:i.height});a._updateCache(i);a._propagate("resize",b)}})}});e.ui.plugin.add("resizable","containment",{start:function(){var b=e(this).data("resizable"),a=b.element,c=b.options.containment;if(a=c instanceof e?c.get(0):/parent/.test(c)?a.parent().get(0):c){b.containerElement=
e(a);if(/document/.test(c)||c==document){b.containerOffset={left:0,top:0};b.containerPosition={left:0,top:0};b.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}}else{var d=e(a),f=[];e(["Top","Right","Left","Bottom"]).each(function(i,j){f[i]=m(d.css("padding"+j))});b.containerOffset=d.offset();b.containerPosition=d.position();b.containerSize={height:d.innerHeight()-f[3],width:d.innerWidth()-f[1]};c=b.containerOffset;
var g=b.containerSize.height,h=b.containerSize.width;h=e.ui.hasScroll(a,"left")?a.scrollWidth:h;g=e.ui.hasScroll(a)?a.scrollHeight:g;b.parentData={element:a,left:c.left,top:c.top,width:h,height:g}}}},resize:function(b){var a=e(this).data("resizable"),c=a.options,d=a.containerOffset,f=a.position;b=a._aspectRatio||b.shiftKey;var g={top:0,left:0},h=a.containerElement;if(h[0]!=document&&/static/.test(h.css("position")))g=d;if(f.left<(a._helper?d.left:0)){a.size.width+=a._helper?a.position.left-d.left:
a.position.left-g.left;if(b)a.size.height=a.size.width/c.aspectRatio;a.position.left=c.helper?d.left:0}if(f.top<(a._helper?d.top:0)){a.size.height+=a._helper?a.position.top-d.top:a.position.top;if(b)a.size.width=a.size.height*c.aspectRatio;a.position.top=a._helper?d.top:0}a.offset.left=a.parentData.left+a.position.left;a.offset.top=a.parentData.top+a.position.top;c=Math.abs((a._helper?a.offset.left-g.left:a.offset.left-g.left)+a.sizeDiff.width);d=Math.abs((a._helper?a.offset.top-g.top:a.offset.top-
d.top)+a.sizeDiff.height);f=a.containerElement.get(0)==a.element.parent().get(0);g=/relative|absolute/.test(a.containerElement.css("position"));if(f&&g)c-=a.parentData.left;if(c+a.size.width>=a.parentData.width){a.size.width=a.parentData.width-c;if(b)a.size.height=a.size.width/a.aspectRatio}if(d+a.size.height>=a.parentData.height){a.size.height=a.parentData.height-d;if(b)a.size.width=a.size.height*a.aspectRatio}},stop:function(){var b=e(this).data("resizable"),a=b.options,c=b.containerOffset,d=b.containerPosition,
f=b.containerElement,g=e(b.helper),h=g.offset(),i=g.outerWidth()-b.sizeDiff.width;g=g.outerHeight()-b.sizeDiff.height;b._helper&&!a.animate&&/relative/.test(f.css("position"))&&e(this).css({left:h.left-d.left-c.left,width:i,height:g});b._helper&&!a.animate&&/static/.test(f.css("position"))&&e(this).css({left:h.left-d.left-c.left,width:i,height:g})}});e.ui.plugin.add("resizable","ghost",{start:function(){var b=e(this).data("resizable"),a=b.options,c=b.size;b.ghost=b.originalElement.clone();b.ghost.css({opacity:0.25,
display:"block",position:"relative",height:c.height,width:c.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof a.ghost=="string"?a.ghost:"");b.ghost.appendTo(b.helper)},resize:function(){var b=e(this).data("resizable");b.ghost&&b.ghost.css({position:"relative",height:b.size.height,width:b.size.width})},stop:function(){var b=e(this).data("resizable");b.ghost&&b.helper&&b.helper.get(0).removeChild(b.ghost.get(0))}});e.ui.plugin.add("resizable","grid",{resize:function(){var b=
e(this).data("resizable"),a=b.options,c=b.size,d=b.originalSize,f=b.originalPosition,g=b.axis;a.grid=typeof a.grid=="number"?[a.grid,a.grid]:a.grid;var h=Math.round((c.width-d.width)/(a.grid[0]||1))*(a.grid[0]||1);a=Math.round((c.height-d.height)/(a.grid[1]||1))*(a.grid[1]||1);if(/^(se|s|e)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a}else if(/^(ne)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}else{if(/^(sw)$/.test(g)){b.size.width=d.width+h;b.size.height=
d.height+a}else{b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}b.position.left=f.left-h}}});var m=function(b){return parseInt(b,10)||0},k=function(b){return!isNaN(parseInt(b,10))}})(jQuery);
;

147
lib/jquery-ui-1.8.9.custom.min.js vendored Normal file
View file

@ -0,0 +1,147 @@
/*!
* jQuery UI 1.8.9
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI
*/
(function(c,j){function k(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.9",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,
NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d=this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,
"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");
if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"),10);if(!isNaN(b)&&b!==0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,l,m){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(l)g-=parseFloat(c.curCSS(f,
"border"+this+"Width",true))||0;if(m)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight,outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c(this).css(h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c(this).css(h,
d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){var b=a.nodeName.toLowerCase(),d=c.attr(a,"tabindex");if("area"===b){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&k(a)}return(/input|select|textarea|button|object/.test(b)?!a.disabled:"a"==b?a.href||!isNaN(d):!isNaN(d))&&k(a)},tabbable:function(a){var b=c.attr(a,"tabindex");return(isNaN(b)||b>=0)&&c(a).is(":focusable")}});
c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&a.element[0].parentNode)for(var e=0;e<b.length;e++)a.options[b[e][0]]&&
b[e][1].apply(a.element,d)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(a,b){if(c(a).css("overflow")==="hidden")return false;b=b&&b==="left"?"scrollLeft":"scrollTop";var d=false;if(a[b]>0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a<b+d},isOver:function(a,b,d,e,h,i){return c.ui.isOverAxis(a,d,h)&&c.ui.isOverAxis(b,e,i)}})}})(jQuery);
;/*!
* jQuery UI Widget 1.8.9
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Widget
*/
(function(b,j){if(b.cleanData){var k=b.cleanData;b.cleanData=function(a){for(var c=0,d;(d=a[c])!=null;c++)b(d).triggerHandler("remove");k(a)}}else{var l=b.fn.remove;b.fn.remove=function(a,c){return this.each(function(){if(!c)if(!a||b.filter(a,[this]).length)b("*",this).add([this]).each(function(){b(this).triggerHandler("remove")});return l.call(b(this),a,c)})}}b.widget=function(a,c,d){var e=a.split(".")[0],f;a=a.split(".")[1];f=e+"-"+a;if(!d){d=c;c=b.Widget}b.expr[":"][f]=function(h){return!!b.data(h,
a)};b[e]=b[e]||{};b[e][a]=function(h,g){arguments.length&&this._createWidget(h,g)};c=new c;c.options=b.extend(true,{},c.options);b[e][a].prototype=b.extend(true,c,{namespace:e,widgetName:a,widgetEventPrefix:b[e][a].prototype.widgetEventPrefix||a,widgetBaseClass:f},d);b.widget.bridge(a,b[e][a])};b.widget.bridge=function(a,c){b.fn[a]=function(d){var e=typeof d==="string",f=Array.prototype.slice.call(arguments,1),h=this;d=!e&&f.length?b.extend.apply(null,[true,d].concat(f)):d;if(e&&d.charAt(0)==="_")return h;
e?this.each(function(){var g=b.data(this,a),i=g&&b.isFunction(g[d])?g[d].apply(g,f):g;if(i!==g&&i!==j){h=i;return false}}):this.each(function(){var g=b.data(this,a);g?g.option(d||{})._init():b.data(this,a,new c(d,this))});return h}};b.Widget=function(a,c){arguments.length&&this._createWidget(a,c)};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(a,c){b.data(c,this.widgetName,this);this.element=b(c);this.options=b.extend(true,{},this.options,
this._getCreateOptions(),a);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},
widget:function(){return this.element},option:function(a,c){var d=a;if(arguments.length===0)return b.extend({},this.options);if(typeof a==="string"){if(c===j)return this.options[a];d={};d[a]=c}this._setOptions(d);return this},_setOptions:function(a){var c=this;b.each(a,function(d,e){c._setOption(d,e)});return this},_setOption:function(a,c){this.options[a]=c;if(a==="disabled")this.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",c);return this},
enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(a,c,d){var e=this.options[a];c=b.Event(c);c.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();d=d||{};if(c.originalEvent){a=b.event.props.length;for(var f;a;){f=b.event.props[--a];c[f]=c.originalEvent[f]}}this.element.trigger(c,d);return!(b.isFunction(e)&&e.call(this.element[0],c,d)===false||c.isDefaultPrevented())}}})(jQuery);
;/*!
* jQuery UI Mouse 1.8.9
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Mouse
*
* Depends:
* jquery.ui.widget.js
*/
(function(c){c.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var a=this;this.element.bind("mousedown."+this.widgetName,function(b){return a._mouseDown(b)}).bind("click."+this.widgetName,function(b){if(true===c.data(b.target,a.widgetName+".preventClickEvent")){c.removeData(b.target,a.widgetName+".preventClickEvent");b.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(a){a.originalEvent=
a.originalEvent||{};if(!a.originalEvent.mouseHandled){this._mouseStarted&&this._mouseUp(a);this._mouseDownEvent=a;var b=this,e=a.which==1,f=typeof this.options.cancel=="string"?c(a.target).parents().add(a.target).filter(this.options.cancel).length:false;if(!e||f||!this._mouseCapture(a))return true;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){b.mouseDelayMet=true},this.options.delay);if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a)){this._mouseStarted=
this._mouseStart(a)!==false;if(!this._mouseStarted){a.preventDefault();return true}}this._mouseMoveDelegate=function(d){return b._mouseMove(d)};this._mouseUpDelegate=function(d){return b._mouseUp(d)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);a.preventDefault();return a.originalEvent.mouseHandled=true}},_mouseMove:function(a){if(c.browser.msie&&!(document.documentMode>=9)&&!a.button)return this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a);
return a.preventDefault()}if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==false)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;a.target==this._mouseDownEvent.target&&c.data(a.target,this.widgetName+".preventClickEvent",
true);this._mouseStop(a)}return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);
;/*
* jQuery UI Draggable 1.8.9
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Draggables
*
* Depends:
* jquery.ui.core.js
* jquery.ui.mouse.js
* jquery.ui.widget.js
*/
(function(d){d.widget("ui.draggable",d.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper==
"original"&&!/^(?:r|a|f)/.test(this.element.css("position")))this.element[0].style.position="relative";this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this}},_mouseCapture:function(a){var b=
this.options;if(this.helper||b.disabled||d(a.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(a);if(!this.handle)return false;return true},_mouseStart:function(a){var b=this.options;this.helper=this._createHelper(a);this._cacheHelperProportions();if(d.ui.ddmanager)d.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-
this.margins.top,left:this.offset.left-this.margins.left};d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);b.containment&&this._setContainment();if(this._trigger("start",a)===false){this._clear();return false}this._cacheHelperProportions();
d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(a,true);return true},_mouseDrag:function(a,b){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");if(!b){b=this._uiHash();if(this._trigger("drag",a,b)===false){this._mouseUp({});return false}this.position=b.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||
this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);return false},_mouseStop:function(a){var b=false;if(d.ui.ddmanager&&!this.options.dropBehaviour)b=d.ui.ddmanager.drop(this,a);if(this.dropped){b=this.dropped;this.dropped=false}if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original")return false;if(this.options.revert=="invalid"&&!b||this.options.revert=="valid"&&b||this.options.revert===true||d.isFunction(this.options.revert)&&
this.options.revert.call(this.element,b)){var c=this;d(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){c._trigger("stop",a)!==false&&c._clear()})}else this._trigger("stop",a)!==false&&this._clear();return false},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(a){var b=!this.options.handle||!d(this.options.handle,this.element).length?true:false;d(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==
a.target)b=true});return b},_createHelper:function(a){var b=this.options;a=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[a])):b.helper=="clone"?this.element.clone():this.element;a.parents("body").length||a.appendTo(b.appendTo=="parent"?this.element[0].parentNode:b.appendTo);a[0]!=this.element[0]&&!/(fixed|absolute)/.test(a.css("position"))&&a.css("position","absolute");return a},_adjustOffsetFromHelper:function(a){if(typeof a=="string")a=a.split(" ");if(d.isArray(a))a={left:+a[0],top:+a[1]||
0};if("left"in a)this.offset.click.left=a.left+this.margins.left;if("right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;if("top"in a)this.offset.click.top=a.top+this.margins.top;if("bottom"in a)this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],
this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&d.browser.msie)a={top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top-
(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var a=this.options;if(a.containment==
"parent")a.containment=this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[(a.containment=="document"?0:d(window).scrollLeft())-this.offset.relative.left-this.offset.parent.left,(a.containment=="document"?0:d(window).scrollTop())-this.offset.relative.top-this.offset.parent.top,(a.containment=="document"?0:d(window).scrollLeft())+d(a.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a.containment=="document"?
0:d(window).scrollTop())+(d(a.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)&&a.containment.constructor!=Array){var b=d(a.containment)[0];if(b){a=d(a.containment).offset();var c=d(b).css("overflow")!="hidden";this.containment=[a.left+(parseInt(d(b).css("borderLeftWidth"),10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0)-this.margins.left,a.top+(parseInt(d(b).css("borderTopWidth"),
10)||0)+(parseInt(d(b).css("paddingTop"),10)||0)-this.margins.top,a.left+(c?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),10)||0)-(parseInt(d(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,a.top+(c?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"),10)||0)-(parseInt(d(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}}else if(a.containment.constructor==
Array)this.containment=a.containment},_convertPositionTo:function(a,b){if(!b)b=this.position;a=a=="absolute"?1:-1;var c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName);return{top:b.top+this.offset.relative.top*a+this.offset.parent.top*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():
f?0:c.scrollTop())*a),left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:c.scrollLeft())*a)}},_generatePosition:function(a){var b=this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName),e=a.pageX,g=a.pageY;
if(this.originalPosition){if(this.containment){if(a.pageX-this.offset.click.left<this.containment[0])e=this.containment[0]+this.offset.click.left;if(a.pageY-this.offset.click.top<this.containment[1])g=this.containment[1]+this.offset.click.top;if(a.pageX-this.offset.click.left>this.containment[2])e=this.containment[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>this.containment[3])g=this.containment[3]+this.offset.click.top}if(b.grid){g=this.originalPageY+Math.round((g-this.originalPageY)/
b.grid[1])*b.grid[1];g=this.containment?!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:!(g-this.offset.click.top<this.containment[1])?g-b.grid[1]:g+b.grid[1]:g;e=this.originalPageX+Math.round((e-this.originalPageX)/b.grid[0])*b.grid[0];e=this.containment?!(e-this.offset.click.left<this.containment[0]||e-this.offset.click.left>this.containment[2])?e:!(e-this.offset.click.left<this.containment[0])?e-b.grid[0]:e+b.grid[0]:e}}return{top:g-this.offset.click.top-
this.offset.relative.top-this.offset.parent.top+(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:c.scrollTop()),left:e-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:c.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");this.helper[0]!=
this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove();this.helper=null;this.cancelHelperRemoval=false},_trigger:function(a,b,c){c=c||this._uiHash();d.ui.plugin.call(this,a,[b,c]);if(a=="drag")this.positionAbs=this._convertPositionTo("absolute");return d.Widget.prototype._trigger.call(this,a,b,c)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});d.extend(d.ui.draggable,{version:"1.8.9"});
d.ui.plugin.add("draggable","connectToSortable",{start:function(a,b){var c=d(this).data("draggable"),f=c.options,e=d.extend({},b,{item:c.element});c.sortables=[];d(f.connectToSortable).each(function(){var g=d.data(this,"sortable");if(g&&!g.options.disabled){c.sortables.push({instance:g,shouldRevert:g.options.revert});g._refreshItems();g._trigger("activate",a,e)}})},stop:function(a,b){var c=d(this).data("draggable"),f=d.extend({},b,{item:c.element});d.each(c.sortables,function(){if(this.instance.isOver){this.instance.isOver=
0;c.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert)this.instance.options.revert=true;this.instance._mouseStop(a);this.instance.options.helper=this.instance.options._helper;c.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",a,f)}})},drag:function(a,b){var c=d(this).data("draggable"),f=this;d.each(c.sortables,function(){this.instance.positionAbs=
c.positionAbs;this.instance.helperProportions=c.helperProportions;this.instance.offset.click=c.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=d(f).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return b.helper[0]};a.target=this.instance.currentItem[0];this.instance._mouseCapture(a,
true);this.instance._mouseStart(a,true,true);this.instance.offset.click.top=c.offset.click.top;this.instance.offset.click.left=c.offset.click.left;this.instance.offset.parent.left-=c.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=c.offset.parent.top-this.instance.offset.parent.top;c._trigger("toSortable",a);c.dropped=this.instance.element;c.currentItem=c.element;this.instance.fromOutside=c}this.instance.currentItem&&this.instance._mouseDrag(a)}else if(this.instance.isOver){this.instance.isOver=
0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",a,this.instance._uiHash(this.instance));this.instance._mouseStop(a,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();this.instance.placeholder&&this.instance.placeholder.remove();c._trigger("fromSortable",a);c.dropped=false}})}});d.ui.plugin.add("draggable","cursor",{start:function(){var a=d("body"),b=d(this).data("draggable").options;if(a.css("cursor"))b._cursor=
a.css("cursor");a.css("cursor",b.cursor)},stop:function(){var a=d(this).data("draggable").options;a._cursor&&d("body").css("cursor",a._cursor)}});d.ui.plugin.add("draggable","iframeFix",{start:function(){var a=d(this).data("draggable").options;d(a.iframeFix===true?"iframe":a.iframeFix).each(function(){d('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(d(this).offset()).appendTo("body")})},
stop:function(){d("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});d.ui.plugin.add("draggable","opacity",{start:function(a,b){a=d(b.helper);b=d(this).data("draggable").options;if(a.css("opacity"))b._opacity=a.css("opacity");a.css("opacity",b.opacity)},stop:function(a,b){a=d(this).data("draggable").options;a._opacity&&d(b.helper).css("opacity",a._opacity)}});d.ui.plugin.add("draggable","scroll",{start:function(){var a=d(this).data("draggable");if(a.scrollParent[0]!=
document&&a.scrollParent[0].tagName!="HTML")a.overflowOffset=a.scrollParent.offset()},drag:function(a){var b=d(this).data("draggable"),c=b.options,f=false;if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){if(!c.axis||c.axis!="x")if(b.overflowOffset.top+b.scrollParent[0].offsetHeight-a.pageY<c.scrollSensitivity)b.scrollParent[0].scrollTop=f=b.scrollParent[0].scrollTop+c.scrollSpeed;else if(a.pageY-b.overflowOffset.top<c.scrollSensitivity)b.scrollParent[0].scrollTop=f=b.scrollParent[0].scrollTop-
c.scrollSpeed;if(!c.axis||c.axis!="y")if(b.overflowOffset.left+b.scrollParent[0].offsetWidth-a.pageX<c.scrollSensitivity)b.scrollParent[0].scrollLeft=f=b.scrollParent[0].scrollLeft+c.scrollSpeed;else if(a.pageX-b.overflowOffset.left<c.scrollSensitivity)b.scrollParent[0].scrollLeft=f=b.scrollParent[0].scrollLeft-c.scrollSpeed}else{if(!c.axis||c.axis!="x")if(a.pageY-d(document).scrollTop()<c.scrollSensitivity)f=d(document).scrollTop(d(document).scrollTop()-c.scrollSpeed);else if(d(window).height()-
(a.pageY-d(document).scrollTop())<c.scrollSensitivity)f=d(document).scrollTop(d(document).scrollTop()+c.scrollSpeed);if(!c.axis||c.axis!="y")if(a.pageX-d(document).scrollLeft()<c.scrollSensitivity)f=d(document).scrollLeft(d(document).scrollLeft()-c.scrollSpeed);else if(d(window).width()-(a.pageX-d(document).scrollLeft())<c.scrollSensitivity)f=d(document).scrollLeft(d(document).scrollLeft()+c.scrollSpeed)}f!==false&&d.ui.ddmanager&&!c.dropBehaviour&&d.ui.ddmanager.prepareOffsets(b,a)}});d.ui.plugin.add("draggable",
"snap",{start:function(){var a=d(this).data("draggable"),b=a.options;a.snapElements=[];d(b.snap.constructor!=String?b.snap.items||":data(draggable)":b.snap).each(function(){var c=d(this),f=c.offset();this!=a.element[0]&&a.snapElements.push({item:this,width:c.outerWidth(),height:c.outerHeight(),top:f.top,left:f.left})})},drag:function(a,b){for(var c=d(this).data("draggable"),f=c.options,e=f.snapTolerance,g=b.offset.left,n=g+c.helperProportions.width,m=b.offset.top,o=m+c.helperProportions.height,h=
c.snapElements.length-1;h>=0;h--){var i=c.snapElements[h].left,k=i+c.snapElements[h].width,j=c.snapElements[h].top,l=j+c.snapElements[h].height;if(i-e<g&&g<k+e&&j-e<m&&m<l+e||i-e<g&&g<k+e&&j-e<o&&o<l+e||i-e<n&&n<k+e&&j-e<m&&m<l+e||i-e<n&&n<k+e&&j-e<o&&o<l+e){if(f.snapMode!="inner"){var p=Math.abs(j-o)<=e,q=Math.abs(l-m)<=e,r=Math.abs(i-n)<=e,s=Math.abs(k-g)<=e;if(p)b.position.top=c._convertPositionTo("relative",{top:j-c.helperProportions.height,left:0}).top-c.margins.top;if(q)b.position.top=c._convertPositionTo("relative",
{top:l,left:0}).top-c.margins.top;if(r)b.position.left=c._convertPositionTo("relative",{top:0,left:i-c.helperProportions.width}).left-c.margins.left;if(s)b.position.left=c._convertPositionTo("relative",{top:0,left:k}).left-c.margins.left}var t=p||q||r||s;if(f.snapMode!="outer"){p=Math.abs(j-m)<=e;q=Math.abs(l-o)<=e;r=Math.abs(i-g)<=e;s=Math.abs(k-n)<=e;if(p)b.position.top=c._convertPositionTo("relative",{top:j,left:0}).top-c.margins.top;if(q)b.position.top=c._convertPositionTo("relative",{top:l-c.helperProportions.height,
left:0}).top-c.margins.top;if(r)b.position.left=c._convertPositionTo("relative",{top:0,left:i}).left-c.margins.left;if(s)b.position.left=c._convertPositionTo("relative",{top:0,left:k-c.helperProportions.width}).left-c.margins.left}if(!c.snapElements[h].snapping&&(p||q||r||s||t))c.options.snap.snap&&c.options.snap.snap.call(c.element,a,d.extend(c._uiHash(),{snapItem:c.snapElements[h].item}));c.snapElements[h].snapping=p||q||r||s||t}else{c.snapElements[h].snapping&&c.options.snap.release&&c.options.snap.release.call(c.element,
a,d.extend(c._uiHash(),{snapItem:c.snapElements[h].item}));c.snapElements[h].snapping=false}}}});d.ui.plugin.add("draggable","stack",{start:function(){var a=d(this).data("draggable").options;a=d.makeArray(d(a.stack)).sort(function(c,f){return(parseInt(d(c).css("zIndex"),10)||0)-(parseInt(d(f).css("zIndex"),10)||0)});if(a.length){var b=parseInt(a[0].style.zIndex)||0;d(a).each(function(c){this.style.zIndex=b+c});this[0].style.zIndex=b+a.length}}});d.ui.plugin.add("draggable","zIndex",{start:function(a,
b){a=d(b.helper);b=d(this).data("draggable").options;if(a.css("zIndex"))b._zIndex=a.css("zIndex");a.css("zIndex",b.zIndex)},stop:function(a,b){a=d(this).data("draggable").options;a._zIndex&&d(b.helper).css("zIndex",a._zIndex)}})})(jQuery);
;/*
* jQuery UI Resizable 1.8.9
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Resizables
*
* Depends:
* jquery.ui.core.js
* jquery.ui.mouse.js
* jquery.ui.widget.js
*/
(function(e){e.widget("ui.resizable",e.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1E3},_create:function(){var b=this,a=this.options;this.element.addClass("ui-resizable");e.extend(this,{_aspectRatio:!!a.aspectRatio,aspectRatio:a.aspectRatio,originalElement:this.element,
_proportionallyResizeElements:[],_helper:a.helper||a.ghost||a.animate?a.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){/relative/.test(this.element.css("position"))&&e.browser.opera&&this.element.css({position:"relative",top:"auto",left:"auto"});this.element.wrap(e('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),
top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=
this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=a.handles||(!e(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",
nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all")this.handles="n,e,s,w,se,sw,ne,nw";var c=this.handles.split(",");this.handles={};for(var d=0;d<c.length;d++){var f=e.trim(c[d]),g=e('<div class="ui-resizable-handle '+("ui-resizable-"+f)+'"></div>');/sw|se|ne|nw/.test(f)&&g.css({zIndex:++a.zIndex});"se"==f&&g.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[f]=".ui-resizable-"+f;this.element.append(g)}}this._renderAxis=function(h){h=h||this.element;for(var i in this.handles){if(this.handles[i].constructor==
String)this.handles[i]=e(this.handles[i],this.element).show();if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var j=e(this.handles[i],this.element),k=0;k=/sw|ne|nw|se|n|s/.test(i)?j.outerHeight():j.outerWidth();j=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join("");h.css(j,k);this._proportionallyResize()}e(this.handles[i])}};this._renderAxis(this.element);this._handles=e(".ui-resizable-handle",this.element).disableSelection();
this._handles.mouseover(function(){if(!b.resizing){if(this.className)var h=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);b.axis=h&&h[1]?h[1]:"se"}});if(a.autoHide){this._handles.hide();e(this.element).addClass("ui-resizable-autohide").hover(function(){e(this).removeClass("ui-resizable-autohide");b._handles.show()},function(){if(!b.resizing){e(this).addClass("ui-resizable-autohide");b._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var b=function(c){e(c).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};
if(this.elementIsWrapper){b(this.element);var a=this.element;a.after(this.originalElement.css({position:a.css("position"),width:a.outerWidth(),height:a.outerHeight(),top:a.css("top"),left:a.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);b(this.originalElement);return this},_mouseCapture:function(b){var a=false;for(var c in this.handles)if(e(this.handles[c])[0]==b.target)a=true;return!this.options.disabled&&a},_mouseStart:function(b){var a=this.options,c=this.element.position(),
d=this.element;this.resizing=true;this.documentScroll={top:e(document).scrollTop(),left:e(document).scrollLeft()};if(d.is(".ui-draggable")||/absolute/.test(d.css("position")))d.css({position:"absolute",top:c.top,left:c.left});e.browser.opera&&/relative/.test(d.css("position"))&&d.css({position:"relative",top:"auto",left:"auto"});this._renderProxy();c=m(this.helper.css("left"));var f=m(this.helper.css("top"));if(a.containment){c+=e(a.containment).scrollLeft()||0;f+=e(a.containment).scrollTop()||0}this.offset=
this.helper.offset();this.position={left:c,top:f};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:c,top:f};this.sizeDiff={width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:b.pageX,top:b.pageY};this.aspectRatio=typeof a.aspectRatio=="number"?a.aspectRatio:
this.originalSize.width/this.originalSize.height||1;a=e(".ui-resizable-"+this.axis).css("cursor");e("body").css("cursor",a=="auto"?this.axis+"-resize":a);d.addClass("ui-resizable-resizing");this._propagate("start",b);return true},_mouseDrag:function(b){var a=this.helper,c=this.originalMousePosition,d=this._change[this.axis];if(!d)return false;c=d.apply(this,[b,b.pageX-c.left||0,b.pageY-c.top||0]);if(this._aspectRatio||b.shiftKey)c=this._updateRatio(c,b);c=this._respectSize(c,b);this._propagate("resize",
b);a.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();this._updateCache(c);this._trigger("resize",b,this.ui());return false},_mouseStop:function(b){this.resizing=false;var a=this.options,c=this;if(this._helper){var d=this._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName);d=f&&e.ui.hasScroll(d[0],"left")?0:c.sizeDiff.height;
f={width:c.size.width-(f?0:c.sizeDiff.width),height:c.size.height-d};d=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null;var g=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null;a.animate||this.element.css(e.extend(f,{top:g,left:d}));c.helper.height(c.size.height);c.helper.width(c.size.width);this._helper&&!a.animate&&this._proportionallyResize()}e("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",
b);this._helper&&this.helper.remove();return false},_updateCache:function(b){this.offset=this.helper.offset();if(l(b.left))this.position.left=b.left;if(l(b.top))this.position.top=b.top;if(l(b.height))this.size.height=b.height;if(l(b.width))this.size.width=b.width},_updateRatio:function(b){var a=this.position,c=this.size,d=this.axis;if(b.height)b.width=c.height*this.aspectRatio;else if(b.width)b.height=c.width/this.aspectRatio;if(d=="sw"){b.left=a.left+(c.width-b.width);b.top=null}if(d=="nw"){b.top=
a.top+(c.height-b.height);b.left=a.left+(c.width-b.width)}return b},_respectSize:function(b){var a=this.options,c=this.axis,d=l(b.width)&&a.maxWidth&&a.maxWidth<b.width,f=l(b.height)&&a.maxHeight&&a.maxHeight<b.height,g=l(b.width)&&a.minWidth&&a.minWidth>b.width,h=l(b.height)&&a.minHeight&&a.minHeight>b.height;if(g)b.width=a.minWidth;if(h)b.height=a.minHeight;if(d)b.width=a.maxWidth;if(f)b.height=a.maxHeight;var i=this.originalPosition.left+this.originalSize.width,j=this.position.top+this.size.height,
k=/sw|nw|w/.test(c);c=/nw|ne|n/.test(c);if(g&&k)b.left=i-a.minWidth;if(d&&k)b.left=i-a.maxWidth;if(h&&c)b.top=j-a.minHeight;if(f&&c)b.top=j-a.maxHeight;if((a=!b.width&&!b.height)&&!b.left&&b.top)b.top=null;else if(a&&!b.top&&b.left)b.left=null;return b},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var b=this.helper||this.element,a=0;a<this._proportionallyResizeElements.length;a++){var c=this._proportionallyResizeElements[a];if(!this.borderDif){var d=[c.css("borderTopWidth"),
c.css("borderRightWidth"),c.css("borderBottomWidth"),c.css("borderLeftWidth")],f=[c.css("paddingTop"),c.css("paddingRight"),c.css("paddingBottom"),c.css("paddingLeft")];this.borderDif=e.map(d,function(g,h){g=parseInt(g,10)||0;h=parseInt(f[h],10)||0;return g+h})}e.browser.msie&&(e(b).is(":hidden")||e(b).parents(":hidden").length)||c.css({height:b.height()-this.borderDif[0]-this.borderDif[2]||0,width:b.width()-this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:function(){var b=this.options;this.elementOffset=
this.element.offset();if(this._helper){this.helper=this.helper||e('<div style="overflow:hidden;"></div>');var a=e.browser.msie&&e.browser.version<7,c=a?1:0;a=a?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+a,height:this.element.outerHeight()+a,position:"absolute",left:this.elementOffset.left-c+"px",top:this.elementOffset.top-c+"px",zIndex:++b.zIndex});this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(b,a){return{width:this.originalSize.width+
a}},w:function(b,a){return{left:this.originalPosition.left+a,width:this.originalSize.width-a}},n:function(b,a,c){return{top:this.originalPosition.top+c,height:this.originalSize.height-c}},s:function(b,a,c){return{height:this.originalSize.height+c}},se:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,a,c]))},sw:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,a,c]))},ne:function(b,a,c){return e.extend(this._change.n.apply(this,
arguments),this._change.e.apply(this,[b,a,c]))},nw:function(b,a,c){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,a,c]))}},_propagate:function(b,a){e.ui.plugin.call(this,b,[a,this.ui()]);b!="resize"&&this._trigger(b,a,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});e.extend(e.ui.resizable,
{version:"1.8.9"});e.ui.plugin.add("resizable","alsoResize",{start:function(){var b=e(this).data("resizable").options,a=function(c){e(c).each(function(){var d=e(this);d.data("resizable-alsoresize",{width:parseInt(d.width(),10),height:parseInt(d.height(),10),left:parseInt(d.css("left"),10),top:parseInt(d.css("top"),10),position:d.css("position")})})};if(typeof b.alsoResize=="object"&&!b.alsoResize.parentNode)if(b.alsoResize.length){b.alsoResize=b.alsoResize[0];a(b.alsoResize)}else e.each(b.alsoResize,
function(c){a(c)});else a(b.alsoResize)},resize:function(b,a){var c=e(this).data("resizable");b=c.options;var d=c.originalSize,f=c.originalPosition,g={height:c.size.height-d.height||0,width:c.size.width-d.width||0,top:c.position.top-f.top||0,left:c.position.left-f.left||0},h=function(i,j){e(i).each(function(){var k=e(this),q=e(this).data("resizable-alsoresize"),p={},r=j&&j.length?j:k.parents(a.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(r,function(n,o){if((n=
(q[o]||0)+(g[o]||0))&&n>=0)p[o]=n||null});if(e.browser.opera&&/relative/.test(k.css("position"))){c._revertToRelativePosition=true;k.css({position:"absolute",top:"auto",left:"auto"})}k.css(p)})};typeof b.alsoResize=="object"&&!b.alsoResize.nodeType?e.each(b.alsoResize,function(i,j){h(i,j)}):h(b.alsoResize)},stop:function(){var b=e(this).data("resizable"),a=b.options,c=function(d){e(d).each(function(){var f=e(this);f.css({position:f.data("resizable-alsoresize").position})})};if(b._revertToRelativePosition){b._revertToRelativePosition=
false;typeof a.alsoResize=="object"&&!a.alsoResize.nodeType?e.each(a.alsoResize,function(d){c(d)}):c(a.alsoResize)}e(this).removeData("resizable-alsoresize")}});e.ui.plugin.add("resizable","animate",{stop:function(b){var a=e(this).data("resizable"),c=a.options,d=a._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName),g=f&&e.ui.hasScroll(d[0],"left")?0:a.sizeDiff.height;f={width:a.size.width-(f?0:a.sizeDiff.width),height:a.size.height-g};g=parseInt(a.element.css("left"),10)+(a.position.left-
a.originalPosition.left)||null;var h=parseInt(a.element.css("top"),10)+(a.position.top-a.originalPosition.top)||null;a.element.animate(e.extend(f,h&&g?{top:h,left:g}:{}),{duration:c.animateDuration,easing:c.animateEasing,step:function(){var i={width:parseInt(a.element.css("width"),10),height:parseInt(a.element.css("height"),10),top:parseInt(a.element.css("top"),10),left:parseInt(a.element.css("left"),10)};d&&d.length&&e(d[0]).css({width:i.width,height:i.height});a._updateCache(i);a._propagate("resize",
b)}})}});e.ui.plugin.add("resizable","containment",{start:function(){var b=e(this).data("resizable"),a=b.element,c=b.options.containment;if(a=c instanceof e?c.get(0):/parent/.test(c)?a.parent().get(0):c){b.containerElement=e(a);if(/document/.test(c)||c==document){b.containerOffset={left:0,top:0};b.containerPosition={left:0,top:0};b.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}}else{var d=e(a),f=[];e(["Top",
"Right","Left","Bottom"]).each(function(i,j){f[i]=m(d.css("padding"+j))});b.containerOffset=d.offset();b.containerPosition=d.position();b.containerSize={height:d.innerHeight()-f[3],width:d.innerWidth()-f[1]};c=b.containerOffset;var g=b.containerSize.height,h=b.containerSize.width;h=e.ui.hasScroll(a,"left")?a.scrollWidth:h;g=e.ui.hasScroll(a)?a.scrollHeight:g;b.parentData={element:a,left:c.left,top:c.top,width:h,height:g}}}},resize:function(b){var a=e(this).data("resizable"),c=a.options,d=a.containerOffset,
f=a.position;b=a._aspectRatio||b.shiftKey;var g={top:0,left:0},h=a.containerElement;if(h[0]!=document&&/static/.test(h.css("position")))g=d;if(f.left<(a._helper?d.left:0)){a.size.width+=a._helper?a.position.left-d.left:a.position.left-g.left;if(b)a.size.height=a.size.width/c.aspectRatio;a.position.left=c.helper?d.left:0}if(f.top<(a._helper?d.top:0)){a.size.height+=a._helper?a.position.top-d.top:a.position.top;if(b)a.size.width=a.size.height*c.aspectRatio;a.position.top=a._helper?d.top:0}a.offset.left=
a.parentData.left+a.position.left;a.offset.top=a.parentData.top+a.position.top;c=Math.abs((a._helper?a.offset.left-g.left:a.offset.left-g.left)+a.sizeDiff.width);d=Math.abs((a._helper?a.offset.top-g.top:a.offset.top-d.top)+a.sizeDiff.height);f=a.containerElement.get(0)==a.element.parent().get(0);g=/relative|absolute/.test(a.containerElement.css("position"));if(f&&g)c-=a.parentData.left;if(c+a.size.width>=a.parentData.width){a.size.width=a.parentData.width-c;if(b)a.size.height=a.size.width/a.aspectRatio}if(d+
a.size.height>=a.parentData.height){a.size.height=a.parentData.height-d;if(b)a.size.width=a.size.height*a.aspectRatio}},stop:function(){var b=e(this).data("resizable"),a=b.options,c=b.containerOffset,d=b.containerPosition,f=b.containerElement,g=e(b.helper),h=g.offset(),i=g.outerWidth()-b.sizeDiff.width;g=g.outerHeight()-b.sizeDiff.height;b._helper&&!a.animate&&/relative/.test(f.css("position"))&&e(this).css({left:h.left-d.left-c.left,width:i,height:g});b._helper&&!a.animate&&/static/.test(f.css("position"))&&
e(this).css({left:h.left-d.left-c.left,width:i,height:g})}});e.ui.plugin.add("resizable","ghost",{start:function(){var b=e(this).data("resizable"),a=b.options,c=b.size;b.ghost=b.originalElement.clone();b.ghost.css({opacity:0.25,display:"block",position:"relative",height:c.height,width:c.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof a.ghost=="string"?a.ghost:"");b.ghost.appendTo(b.helper)},resize:function(){var b=e(this).data("resizable");b.ghost&&b.ghost.css({position:"relative",
height:b.size.height,width:b.size.width})},stop:function(){var b=e(this).data("resizable");b.ghost&&b.helper&&b.helper.get(0).removeChild(b.ghost.get(0))}});e.ui.plugin.add("resizable","grid",{resize:function(){var b=e(this).data("resizable"),a=b.options,c=b.size,d=b.originalSize,f=b.originalPosition,g=b.axis;a.grid=typeof a.grid=="number"?[a.grid,a.grid]:a.grid;var h=Math.round((c.width-d.width)/(a.grid[0]||1))*(a.grid[0]||1);a=Math.round((c.height-d.height)/(a.grid[1]||1))*(a.grid[1]||1);if(/^(se|s|e)$/.test(g)){b.size.width=
d.width+h;b.size.height=d.height+a}else if(/^(ne)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}else{if(/^(sw)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a}else{b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}b.position.left=f.left-h}}});var m=function(b){return parseInt(b,10)||0},l=function(b){return!isNaN(parseInt(b,10))}})(jQuery);
;

View file

@ -1,4 +1,5 @@
function Calendar(element, options, eventSources) { function Calendar(element, options, eventSources) {
var t = this; var t = this;
@ -82,7 +83,7 @@ function Calendar(element, options, eventSources) {
if (options.theme) { if (options.theme) {
element.addClass('ui-widget'); element.addClass('ui-widget');
} }
content = $("<div class='fc-content' style='position:relative'/>") content = $("<div class='fc-content " + tm + "-widget-content' style='position:relative'/>")
.prependTo(element); .prependTo(element);
header = new Header(t, options); header = new Header(t, options);
headerElement = header.render(); headerElement = header.render();
@ -113,7 +114,7 @@ function Calendar(element, options, eventSources) {
$(window).unbind('resize', windowResize); $(window).unbind('resize', windowResize);
header.destroy(); header.destroy();
content.remove(); content.remove();
element.removeClass('fc fc-rtl ui-widget'); element.removeClass('fc fc-rtl fc-ui-widget');
} }
@ -124,8 +125,7 @@ function Calendar(element, options, eventSources) {
function bodyVisible() { function bodyVisible() {
var body = $('body'); return $('body')[0].offsetWidth !== 0;
return body.length > 0 && body [0].offsetWidth !== 0;
} }
@ -133,7 +133,6 @@ function Calendar(element, options, eventSources) {
/* View Rendering /* View Rendering
-----------------------------------------------------------------------------*/ -----------------------------------------------------------------------------*/
// TODO: improve view switching (still weird transition in IE, and FF has whiteout problem)
function changeView(newViewName) { function changeView(newViewName) {
if (!currentView || newViewName != currentView.name) { if (!currentView || newViewName != currentView.name) {
@ -262,13 +261,11 @@ function Calendar(element, options, eventSources) {
function calcSize() { function calcSize() {
if (options.contentHeight) { if (options.contentHeight) {
suggestedViewHeight = options.contentHeight; suggestedViewHeight = options.contentHeight;
} else if (options.height) {
if(options.height.toString().match(new RegExp("^[0-9]+(px)?$"))) {
suggestedViewHeight = parseInt(options.height) - (headerElement ? headerElement.height() : 0) - vsides(content);
} else {
suggestedViewHeight = options.height;
} }
} else { else if (options.height) {
suggestedViewHeight = options.height - (headerElement ? headerElement.height() : 0) - vsides(content[0]);
}
else {
suggestedViewHeight = Math.round(content.width() / Math.max(options.aspectRatio, .5)); suggestedViewHeight = Math.round(content.width() / Math.max(options.aspectRatio, .5));
} }
} }

View file

@ -1,16 +1,7 @@
fc.sourceNormalizers = [];
fc.sourceFetchers = [];
var ajaxDefaults = {
dataType: 'json',
cache: false
};
var eventGUID = 1; var eventGUID = 1;
function EventManager(options, sources) {
function EventManager(options, _sources) {
var t = this; var t = this;
@ -33,8 +24,6 @@ function EventManager(options, _sources) {
// locals // locals
var stickySource = { events: [] };
var sources = [ stickySource ];
var rangeStart, rangeEnd; var rangeStart, rangeEnd;
var currentFetchID = 0; var currentFetchID = 0;
var pendingSourceCnt = 0; var pendingSourceCnt = 0;
@ -42,11 +31,6 @@ function EventManager(options, _sources) {
var cache = []; var cache = [];
for (var i=0; i<_sources.length; i++) {
_addEventSource(_sources[i]);
}
/* Fetching /* Fetching
-----------------------------------------------------------------------------*/ -----------------------------------------------------------------------------*/
@ -73,13 +57,11 @@ function EventManager(options, _sources) {
function fetchEventSource(source, fetchID) { function fetchEventSource(source, fetchID) {
_fetchEventSource(source, function(events) { _fetchEventSource(source, function(events) {
if (fetchID == currentFetchID) { if (fetchID == currentFetchID) {
if (events) {
for (var i=0; i<events.length; i++) { for (var i=0; i<events.length; i++) {
events[i].source = source;
normalizeEvent(events[i]); normalizeEvent(events[i]);
events[i].source = source;
} }
cache = cache.concat(events); cache = cache.concat(events);
}
pendingSourceCnt--; pendingSourceCnt--;
if (!pendingSourceCnt) { if (!pendingSourceCnt) {
reportEvents(cache); reportEvents(cache);
@ -90,77 +72,35 @@ function EventManager(options, _sources) {
function _fetchEventSource(source, callback) { function _fetchEventSource(source, callback) {
var i; if (typeof source == 'string') {
var fetchers = fc.sourceFetchers; var params = {};
var res; params[options.startParam] = Math.round(rangeStart.getTime() / 1000);
for (i=0; i<fetchers.length; i++) { params[options.endParam] = Math.round(rangeEnd.getTime() / 1000);
res = fetchers[i](source, rangeStart, rangeEnd, callback); if (options.cacheParam) {
if (res === true) { params[options.cacheParam] = (new Date()).getTime(); // TODO: deprecate cacheParam
// the fetcher is in charge. made its own async request
return;
} }
else if (typeof res == 'object') {
// the fetcher returned a new source. process it
_fetchEventSource(res, callback);
return;
}
}
var events = source.events;
if (events) {
if ($.isFunction(events)) {
pushLoading(); pushLoading();
events(cloneDate(rangeStart), cloneDate(rangeEnd), function(events) { // TODO: respect cache param in ajaxSetup
callback(events); $.ajax({
url: source,
dataType: 'json',
data: params,
cache: options.cacheParam || false, // don't let jquery prevent caching if cacheParam is being used
success: function(events) {
popLoading(); popLoading();
callback(events);
}
}); });
} }
else if ($.isArray(events)) { else if ($.isFunction(source)) {
pushLoading();
source(cloneDate(rangeStart), cloneDate(rangeEnd), function(events) {
popLoading();
callback(events); callback(events);
});
} }
else { else {
callback(); callback(source); // src is an array
}
}else{
var url = source.url;
var eventTransform = source.eventTransform || options.eventTransform;
if (url) {
var success = source.success;
var error = source.error;
var complete = source.complete;
var data = $.extend({}, source.data || {});
var startParam = firstDefined(source.startParam, options.startParam);
var endParam = firstDefined(source.endParam, options.endParam);
if (startParam) {
data[startParam] = (options.startEndDateOnly) ? (rangeStart.getYear()+'-'+(rangeStart.getMonth()+1)+'-'+rangeStart.getDate()) : Math.round(+rangeStart / 1000);
}
if (endParam) {
data[endParam] = (options.startEndDateOnly) ? (rangeEnd.getYear()+'-'+(rangeEnd.getMonth()+1)+'-'+rangeEnd.getDate()) : Math.round(+rangeEnd / 1000);
}
pushLoading();
$.ajax($.extend({}, ajaxDefaults, source, {
data: data,
success: function(events) {
events = events || [];
var res = applyAll(success, this, arguments);
if ($.isArray(res)) {
events = res;
}
callback(events && eventTransform
? $.map(events, eventTransform)
: events);
},
error: function() {
applyAll(error, this, arguments);
callback();
},
complete: function() {
applyAll(complete, this, arguments);
popLoading();
}
}));
}else{
callback();
}
} }
} }
@ -170,37 +110,24 @@ function EventManager(options, _sources) {
-----------------------------------------------------------------------------*/ -----------------------------------------------------------------------------*/
// first event source is reserved for "sticky" events
sources.unshift([]);
function addEventSource(source) { function addEventSource(source) {
source = _addEventSource(source); sources.push(source);
if (source) {
pendingSourceCnt++; pendingSourceCnt++;
fetchEventSource(source, currentFetchID); // will eventually call reportEvents fetchEventSource(source, currentFetchID); // will eventually call reportEvents
} }
}
function _addEventSource(source) {
if ($.isFunction(source) || $.isArray(source)) {
source = { events: source };
}
else if (typeof source == 'string') {
source = { url: source };
}
if (typeof source == 'object') {
normalizeSource(source);
sources.push(source);
return source;
}
}
function removeEventSource(source) { function removeEventSource(source) {
sources = $.grep(sources, function(src) { sources = $.grep(sources, function(src) {
return !isSourcesEqual(src, source); return src != source;
}); });
// remove all client events from that source // remove all client events from that source
cache = $.grep(cache, function(e) { cache = $.grep(cache, function(e) {
return !isSourcesEqual(e.source, source); return e.source != source;
}); });
reportEvents(cache); reportEvents(cache);
} }
@ -236,10 +163,6 @@ function EventManager(options, _sources) {
e.allDay = event.allDay; e.allDay = event.allDay;
e.className = event.className; e.className = event.className;
e.editable = event.editable; e.editable = event.editable;
e.color = event.color;
e.backgroundColor = event.backgroundColor;
e.borderColor = event.borderColor;
e.textColor = event.textColor;
normalizeEvent(e); normalizeEvent(e);
} }
} }
@ -252,8 +175,8 @@ function EventManager(options, _sources) {
normalizeEvent(event); normalizeEvent(event);
if (!event.source) { if (!event.source) {
if (stick) { if (stick) {
stickySource.events.push(event); sources[0].push(event);
event.source = stickySource; event.source = sources[0];
} }
cache.push(event); cache.push(event);
} }
@ -266,8 +189,8 @@ function EventManager(options, _sources) {
cache = []; cache = [];
// clear all array sources // clear all array sources
for (var i=0; i<sources.length; i++) { for (var i=0; i<sources.length; i++) {
if ($.isArray(sources[i].events)) { if (typeof sources[i] == 'object') {
sources[i].events = []; sources[i] = [];
} }
} }
}else{ }else{
@ -280,8 +203,9 @@ function EventManager(options, _sources) {
cache = $.grep(cache, filter, true); cache = $.grep(cache, filter, true);
// remove events from array sources // remove events from array sources
for (var i=0; i<sources.length; i++) { for (var i=0; i<sources.length; i++) {
if ($.isArray(sources[i].events)) { if (typeof sources[i] == 'object') {
sources[i].events = $.grep(sources[i].events, filter, true); sources[i] = $.grep(sources[i], filter, true);
// TODO: event objects' sources will no longer be correct reference :(
} }
} }
} }
@ -328,8 +252,6 @@ function EventManager(options, _sources) {
function normalizeEvent(event) { function normalizeEvent(event) {
var source = event.source || {};
var ignoreTimezone = firstDefined(source.ignoreTimezone, options.ignoreTimezone);
event._id = event._id || (event.id === undefined ? '_fc' + eventGUID++ : event.id + ''); event._id = event._id || (event.id === undefined ? '_fc' + eventGUID++ : event.id + '');
if (event.date) { if (event.date) {
if (!event.start) { if (!event.start) {
@ -337,14 +259,14 @@ function EventManager(options, _sources) {
} }
delete event.date; delete event.date;
} }
event._start = cloneDate(event.start = parseDate(event.start, ignoreTimezone)); event._start = cloneDate(event.start = parseDate(event.start, options.ignoreTimezone));
event.end = parseDate(event.end, ignoreTimezone); event.end = parseDate(event.end, options.ignoreTimezone);
if (event.end && event.end <= event.start) { if (event.end && event.end <= event.start) {
event.end = null; event.end = null;
} }
event._end = event.end ? cloneDate(event.end) : null; event._end = event.end ? cloneDate(event.end) : null;
if (event.allDay === undefined) { if (event.allDay === undefined) {
event.allDay = firstDefined(source.allDayDefault, options.allDayDefault); event.allDay = options.allDayDefault;
} }
if (event.className) { if (event.className) {
if (typeof event.className == 'string') { if (typeof event.className == 'string') {
@ -357,35 +279,4 @@ function EventManager(options, _sources) {
} }
/* Utils
------------------------------------------------------------------------------*/
function normalizeSource(source) {
if (source.className) {
// TODO: repeat code, same code for event classNames
if (typeof source.className == 'string') {
source.className = source.className.split(/\s+/);
}
}else{
source.className = [];
}
var normalizers = fc.sourceNormalizers;
for (var i=0; i<normalizers.length; i++) {
normalizers[i](source);
}
}
function isSourcesEqual(source1, source2) {
return source1 && source2 && getSourcePrimitive(source1) == getSourcePrimitive(source2);
}
function getSourcePrimitive(source) {
return ((typeof source == 'object') ? (source.events || source.url) : '') || source;
}
} }

View file

@ -23,13 +23,14 @@ function Header(calendar, options) {
tm = options.theme ? 'ui' : 'fc'; tm = options.theme ? 'ui' : 'fc';
var sections = options.header; var sections = options.header;
if (sections) { if (sections) {
element = $("<table class='fc-header' style='width:100%'/>") element = $("<table class='fc-header'/>")
.append( .append($("<tr/>")
$("<tr/>") .append($("<td class='fc-header-left'/>")
.append(renderSection('left')) .append(renderSection(sections.left)))
.append(renderSection('center')) .append($("<td class='fc-header-center'/>")
.append(renderSection('right')) .append(renderSection(sections.center)))
); .append($("<td class='fc-header-right'/>")
.append(renderSection(sections.right))));
return element; return element;
} }
} }
@ -40,18 +41,17 @@ function Header(calendar, options) {
} }
function renderSection(position) { function renderSection(buttonStr) {
var e = $("<td class='fc-header-" + position + "'/>");
var buttonStr = options.header[position];
if (buttonStr) { if (buttonStr) {
var tr = $("<tr/>");
$.each(buttonStr.split(' '), function(i) { $.each(buttonStr.split(' '), function(i) {
if (i > 0) { if (i > 0) {
e.append("<span class='fc-header-space'/>"); tr.append("<td><span class='fc-header-space'/></td>");
} }
var prevButton; var prevButton;
$.each(this.split(','), function(j, buttonName) { $.each(this.split(','), function(j, buttonName) {
if (buttonName == 'title') { if (buttonName == 'title') {
e.append("<span class='fc-header-title'><h2>&nbsp;</h2></span>"); tr.append("<td><h2 class='fc-header-title'>&nbsp;</h2></td>");
if (prevButton) { if (prevButton) {
prevButton.addClass(tm + '-corner-right'); prevButton.addClass(tm + '-corner-right');
} }
@ -68,23 +68,20 @@ function Header(calendar, options) {
}; };
} }
if (buttonClick) { if (buttonClick) {
var icon = options.theme ? smartProperty(options.buttonIcons, buttonName) : null; // why are we using smartProperty here? if (prevButton) {
var text = smartProperty(options.buttonText, buttonName); // why are we using smartProperty here? prevButton.addClass(tm + '-no-right');
var button = $( }
"<span class='fc-button "+(tm == 'ui' ? 'ui-button' : '')+" fc-button-" + buttonName + " " + tm + "-state-default'>" + var button;
"<span class='fc-button-inner'>" + var icon = options.theme ? smartProperty(options.buttonIcons, buttonName) : null;
"<span class='fc-button-content'>" + var text = smartProperty(options.buttonText, buttonName);
(icon ? if (icon) {
"<span class='fc-icon-wrap'>" + button = $("<div class='fc-button-" + buttonName + " ui-state-default'>" +
"<span class='ui-icon ui-icon-" + icon + "'/>" + "<a><span class='ui-icon ui-icon-" + icon + "'/></a></div>");
"</span>" : }
text else if (text) {
) + button = $("<div class='fc-button-" + buttonName + " " + tm + "-state-default'>" +
"</span>" + "<a><span>" + text + "</span></a></div>");
"<span class='fc-button-effect'><span></span></span>" + }
"</span>" +
"</span>"
);
if (button) { if (button) {
button button
.click(function() { .click(function() {
@ -114,8 +111,10 @@ function Header(calendar, options) {
.removeClass(tm + '-state-down'); .removeClass(tm + '-state-down');
} }
) )
.appendTo(e); .appendTo($("<td/>").appendTo(tr));
if (!prevButton) { if (prevButton) {
prevButton.addClass(tm + '-no-right');
}else{
button.addClass(tm + '-corner-left'); button.addClass(tm + '-corner-left');
} }
prevButton = button; prevButton = button;
@ -127,37 +126,37 @@ function Header(calendar, options) {
prevButton.addClass(tm + '-corner-right'); prevButton.addClass(tm + '-corner-right');
} }
}); });
return $("<table/>").append(tr);
} }
return e;
} }
function updateTitle(html) { function updateTitle(html) {
element.find('h2') element.find('h2.fc-header-title')
.html(html); .html(html);
} }
function activateButton(buttonName) { function activateButton(buttonName) {
element.find('span.fc-button-' + buttonName) element.find('div.fc-button-' + buttonName)
.addClass(tm + '-state-active'); .addClass(tm + '-state-active');
} }
function deactivateButton(buttonName) { function deactivateButton(buttonName) {
element.find('span.fc-button-' + buttonName) element.find('div.fc-button-' + buttonName)
.removeClass(tm + '-state-active'); .removeClass(tm + '-state-active');
} }
function disableButton(buttonName) { function disableButton(buttonName) {
element.find('span.fc-button-' + buttonName) element.find('div.fc-button-' + buttonName)
.addClass(tm + '-state-disabled'); .addClass(tm + '-state-disabled');
} }
function enableButton(buttonName) { function enableButton(buttonName) {
element.find('span.fc-button-' + buttonName) element.find('div.fc-button-' + buttonName)
.removeClass(tm + '-state-disabled'); .removeClass(tm + '-state-disabled');
} }

View file

@ -1,18 +0,0 @@
var applyLocale = function(locale) {
setDefaults({
isRTL: locale.isRTL,
firstDay: locale.firstDay,
monthNames: locale.monthNames,
monthNamesShort: locale.monthNamesShort,
dayNames: locale.dayNames,
dayNamesShort: locale.dayNamesShort,
buttonText: {
today: locale.currentText
}
});
}
$.fullCalendar.applyLocale = function(locale) {
applyLocale(locale);
}

View file

@ -1,7 +1,7 @@
(function() { (function() {
var JQUERY = 'jquery-1.7.min.js'; var JQUERY = 'jquery-1.5.min.js';
var JQUERY_UI = 'jquery-ui-1.8.16.custom.min.js'; var JQUERY_UI = 'jquery-ui-1.8.9.custom.min.js';
var JQUERY_LEGACY = 'jquery-1.3.2.min.js'; var JQUERY_LEGACY = 'jquery-1.3.2.min.js';
var JQUERY_UI_LEGACY = 'jquery-ui-1.7.3.custom.min.js'; var JQUERY_UI_LEGACY = 'jquery-ui-1.7.3.custom.min.js';
@ -19,7 +19,6 @@ css('main.css');
css('common/common.css'); css('common/common.css');
css('basic/basic.css'); css('basic/basic.css');
css('agenda/agenda.css'); css('agenda/agenda.css');
cssprint('common/print.css');
if (!legacy) { if (!legacy) {
jslib('../lib/' + JQUERY); jslib('../lib/' + JQUERY);
@ -42,12 +41,8 @@ js('main.js');
js('Calendar.js'); js('Calendar.js');
js('Header.js'); js('Header.js');
js('EventManager.js'); js('EventManager.js');
js('date_util.js');
js('util.js');
js('I18n.js');
js('basic/MonthView.js'); js('basic/MonthView.js');
js('basic/FourWeeksView.js');
js('basic/BasicWeekView.js'); js('basic/BasicWeekView.js');
js('basic/BasicDayView.js'); js('basic/BasicDayView.js');
js('basic/BasicView.js'); js('basic/BasicView.js');
@ -65,6 +60,8 @@ js('common/OverlayManager.js');
js('common/CoordinateGrid.js'); js('common/CoordinateGrid.js');
js('common/HoverListener.js'); js('common/HoverListener.js');
js('common/HorizontalPositionCache.js'); js('common/HorizontalPositionCache.js');
js('common/date.js');
js('common/util.js');
endload(); endload();
@ -122,11 +119,6 @@ function css(file) {
} }
function cssprint(file) {
tags.push("<link rel='stylesheet' type='text/css' href='" + prefix + file + "' media='print' />");
}
function js(file) { function js(file) {
tags.push("<script type='text/javascript' src='" + prefix + file + "'></script>"); tags.push("<script type='text/javascript' src='" + prefix + file + "'></script>");
} }

View file

@ -15,9 +15,6 @@ function AgendaEventRenderer() {
DayEventRenderer.call(t); DayEventRenderer.call(t);
var opt = t.opt; var opt = t.opt;
var trigger = t.trigger; var trigger = t.trigger;
//var setOverflowHidden = t.setOverflowHidden;
var isEventDraggable = t.isEventDraggable;
var isEventResizable = t.isEventResizable;
var eventEnd = t.eventEnd; var eventEnd = t.eventEnd;
var reportEvents = t.reportEvents; var reportEvents = t.reportEvents;
var reportEventClear = t.reportEventClear; var reportEventClear = t.reportEventClear;
@ -36,8 +33,6 @@ function AgendaEventRenderer() {
var getColCnt = t.getColCnt; var getColCnt = t.getColCnt;
var getColWidth = t.getColWidth; var getColWidth = t.getColWidth;
var getSlotHeight = t.getSlotHeight; var getSlotHeight = t.getSlotHeight;
var getBorderHeight = t.getBorderHeight;
var getSlotTableHeight = t.getSlotTableHeight;
var getBodyContent = t.getBodyContent; var getBodyContent = t.getBodyContent;
var reportEventElement = t.reportEventElement; var reportEventElement = t.reportEventElement;
var showEvents = t.showEvents; var showEvents = t.showEvents;
@ -141,9 +136,10 @@ function AgendaEventRenderer() {
// renders events in the 'time slots' at the bottom // renders events in the 'time slots' at the bottom
function renderSlotSegs(segs, modifiedEventId) { function renderSlotSegs(segs, modifiedEventId) {
var i, segCnt=segs.length, seg, var i, segCnt=segs.length, seg,
event, event,
classes, className,
top, bottom, top, bottom,
colI, levelI, forward, colI, levelI, forward,
leftmost, leftmost,
@ -157,13 +153,11 @@ function AgendaEventRenderer() {
vsideCache={}, vsideCache={},
hsideCache={}, hsideCache={},
key, val, key, val,
contentElement, titleSpan,
height, height,
slotSegmentContainer = getSlotSegmentContainer(), slotSegmentContainer = getSlotSegmentContainer(),
rtl, dis, dit, rtl, dis, dit,
colCnt = getColCnt(), colCnt = getColCnt();
borderHeight = getBorderHeight(),
slotTableHeight = getSlotTableHeight();
if (rtl = opt('isRTL')) { if (rtl = opt('isRTL')) {
dis = -1; dis = -1;
@ -177,11 +171,15 @@ function AgendaEventRenderer() {
for (i=0; i<segCnt; i++) { for (i=0; i<segCnt; i++) {
seg = segs[i]; seg = segs[i];
event = seg.event; event = seg.event;
className = 'fc-event fc-event-vert ';
if (seg.isStart) {
className += 'fc-corner-top ';
}
if (seg.isEnd) {
className += 'fc-corner-bottom ';
}
top = timePosition(seg.start, seg.start); top = timePosition(seg.start, seg.start);
bottom = timePosition(seg.start, seg.end); bottom = timePosition(seg.start, seg.end);
if (bottom < slotTableHeight) {
bottom -= borderHeight;
}
colI = seg.col; colI = seg.col;
levelI = seg.level; levelI = seg.level;
forward = seg.forward || 0; forward = seg.forward || 0;
@ -207,7 +205,7 @@ function AgendaEventRenderer() {
seg.left = left; seg.left = left;
seg.outerWidth = outerWidth; seg.outerWidth = outerWidth;
seg.outerHeight = bottom - top; seg.outerHeight = bottom - top;
html += slotSegHtml(event, seg); html += slotSegHtml(event, seg, className);
} }
slotSegmentContainer[0].innerHTML = html; // faster than html() slotSegmentContainer[0].innerHTML = html; // faster than html()
eventElements = slotSegmentContainer.children(); eventElements = slotSegmentContainer.children();
@ -248,12 +246,12 @@ function AgendaEventRenderer() {
seg = segs[i]; seg = segs[i];
if (eventElement = seg.element) { if (eventElement = seg.element) {
val = vsideCache[key = seg.key = cssKey(eventElement[0])]; val = vsideCache[key = seg.key = cssKey(eventElement[0])];
seg.vsides = val === undefined ? (vsideCache[key] = vsides(eventElement, true)) : val; seg.vsides = val === undefined ? (vsideCache[key] = vsides(eventElement[0], true)) : val;
val = hsideCache[key]; val = hsideCache[key];
seg.hsides = val === undefined ? (hsideCache[key] = hsides(eventElement, true)) : val; seg.hsides = val === undefined ? (hsideCache[key] = hsides(eventElement[0], true)) : val;
contentElement = eventElement.find('div.fc-event-content'); titleSpan = eventElement.find('span.fc-event-title');
if (contentElement.length) { if (titleSpan.length) {
seg.contentTop = contentElement[0].offsetTop; seg.titleTop = titleSpan[0].offsetTop;
} }
} }
} }
@ -266,11 +264,11 @@ function AgendaEventRenderer() {
height = Math.max(0, seg.outerHeight - seg.vsides); height = Math.max(0, seg.outerHeight - seg.vsides);
eventElement[0].style.height = height + 'px'; eventElement[0].style.height = height + 'px';
event = seg.event; event = seg.event;
if (seg.contentTop !== undefined && height - seg.contentTop < 10) { if (seg.titleTop !== undefined && height - seg.titleTop < 10) {
// not enough room for title, put it in the time header // not enough room for title, put it in the time header
eventElement.find('div.fc-event-time') eventElement.find('span.fc-event-time')
.text(formatDate(event.start, opt('timeFormat')) + ' - ' + event.title); .text(formatDate(event.start, opt('timeFormat')) + ' - ' + event.title);
eventElement.find('div.fc-event-title') eventElement.find('span.fc-event-title')
.remove(); .remove();
} }
trigger('eventAfterRender', event, event, eventElement); trigger('eventAfterRender', event, event, eventElement);
@ -280,78 +278,40 @@ function AgendaEventRenderer() {
} }
function slotSegHtml(event, seg) { function slotSegHtml(event, seg, className) {
var html = "<"; return "<div class='" + className + event.className.join(' ') + "' style='position:absolute;z-index:8;top:" + seg.top + "px;left:" + seg.left + "px'>" +
var url = event.url; "<a" + (event.url ? " href='" + htmlEscape(event.url) + "'" : '') + ">" +
var skinCss = getSkinCss(event, opt); "<span class='fc-event-bg'></span>" +
var skinCssAttr = (skinCss ? " style='" + skinCss + "'" : ''); "<span class='fc-event-time'>" + htmlEscape(formatDates(event.start, event.end, opt('timeFormat'))) + "</span>" +
var classes = ['fc-event', 'fc-event-skin', 'fc-event-vert']; "<span class='fc-event-title'>" + htmlEscape(event.title) + "</span>" +
if (isEventDraggable(event)) { "</a>" +
classes.push('fc-event-draggable'); ((event.editable || event.editable === undefined && opt('editable')) && !opt('disableResizing') && $.fn.resizable ?
} "<div class='ui-resizable-handle ui-resizable-s'>=</div>"
if (seg.isStart) { : '') +
classes.push('fc-corner-top'); "</div>";
}
if (seg.isEnd) {
classes.push('fc-corner-bottom');
}
classes = classes.concat(event.className);
if (event.source) {
classes = classes.concat(event.source.className || []);
}
if (url) {
html += "a href='" + htmlEscape(event.url) + "'";
}else{
html += "div";
}
html +=
" class='" + classes.join(' ') + "'" +
" style='position:absolute;z-index:8;top:" + seg.top + "px;left:" + seg.left + "px;" + skinCss + "'" +
">" +
"<div class='fc-event-inner fc-event-skin'" + skinCssAttr + ">" +
"<div class='fc-event-head fc-event-skin'" + skinCssAttr + ">" +
"<div class='fc-event-time'>" +
htmlEscape(formatDates(event.start, event.end, opt('timeFormat'))) +
"</div>" +
"</div>" +
"<div class='fc-event-content'>" +
"<div class='fc-event-title'>" +
htmlEscape(event.title) +
"</div>" +
"</div>" +
"<div class='fc-event-bg'></div>" +
"</div>"; // close inner
if (seg.isEnd && isEventResizable(event)) {
html +=
"<div class='ui-resizable-handle ui-resizable-s'>=</div>";
}
html +=
"</" + (url ? "a" : "div") + ">";
return html;
} }
function bindDaySeg(event, eventElement, seg) { function bindDaySeg(event, eventElement, seg) {
if (isEventDraggable(event)) { eventElementHandlers(event, eventElement);
if (event.editable || event.editable === undefined && opt('editable')) {
draggableDayEvent(event, eventElement, seg.isStart); draggableDayEvent(event, eventElement, seg.isStart);
} if (seg.isEnd) {
if (seg.isEnd && isEventResizable(event)) {
resizableDayEvent(event, eventElement, seg); resizableDayEvent(event, eventElement, seg);
} }
eventElementHandlers(event, eventElement); }
// needs to be after, because resizableDayEvent might stopImmediatePropagation on click
} }
function bindSlotSeg(event, eventElement, seg) { function bindSlotSeg(event, eventElement, seg) {
var timeElement = eventElement.find('div.fc-event-time'); eventElementHandlers(event, eventElement);
if (isEventDraggable(event)) { if (event.editable || event.editable === undefined && opt('editable')) {
var timeElement = eventElement.find('span.fc-event-time');
draggableSlotEvent(event, eventElement, timeElement); draggableSlotEvent(event, eventElement, timeElement);
} if (seg.isEnd) {
if (seg.isEnd && isEventResizable(event)) {
resizableSlotEvent(event, eventElement, timeElement); resizableSlotEvent(event, eventElement, timeElement);
} }
eventElementHandlers(event, eventElement); }
} }
@ -363,8 +323,7 @@ function AgendaEventRenderer() {
// when event starts out FULL-DAY // when event starts out FULL-DAY
function draggableDayEvent(event, eventElement, isStart) { function draggableDayEvent(event, eventElement, isStart) {
if (!eventElement.draggable) if (!opt('disableDragging') && eventElement.draggable) {
return;
var origWidth; var origWidth;
var revert; var revert;
var allDay=true; var allDay=true;
@ -385,7 +344,6 @@ function AgendaEventRenderer() {
hoverListener.start(function(cell, origCell, rowDelta, colDelta) { hoverListener.start(function(cell, origCell, rowDelta, colDelta) {
clearOverlays(); clearOverlays();
if (cell) { if (cell) {
//setOverflowHidden(true);
revert = false; revert = false;
dayDelta = colDelta * dis; dayDelta = colDelta * dis;
if (!cell.row) { if (!cell.row) {
@ -404,7 +362,8 @@ function AgendaEventRenderer() {
setOuterHeight( setOuterHeight(
eventElement, eventElement,
slotHeight * Math.round( slotHeight * Math.round(
(event.end ? ((event.end - event.start) / MINUTE_MS) : opt('defaultEventMinutes')) / opt('slotMinutes') (event.end ? ((event.end - event.start) / MINUTE_MS) : opt('defaultEventMinutes'))
/ opt('slotMinutes')
) )
); );
eventElement.draggable('option', 'grid', [colWidth, 1]); eventElement.draggable('option', 'grid', [colWidth, 1]);
@ -416,8 +375,6 @@ function AgendaEventRenderer() {
} }
revert = revert || (allDay && !dayDelta); revert = revert || (allDay && !dayDelta);
}else{ }else{
resetElement();
//setOverflowHidden(false);
revert = true; revert = true;
} }
eventElement.draggable('option', 'revert', revert); eventElement.draggable('option', 'revert', revert);
@ -430,10 +387,13 @@ function AgendaEventRenderer() {
if (revert) { if (revert) {
// hasn't moved or is out of bounds (draggable has already reverted) // hasn't moved or is out of bounds (draggable has already reverted)
resetElement(); resetElement();
if ($.browser.msie) {
eventElement.css('filter', ''); // clear IE opacity side-effects eventElement.css('filter', ''); // clear IE opacity side-effects
}
showEvents(event, eventElement); showEvents(event, eventElement);
}else{ }else{
// changed! // changed!
eventElement.find('a').removeAttr('href'); // prevents safari from visiting the link
var minuteDelta = 0; var minuteDelta = 0;
if (!allDay) { if (!allDay) {
minuteDelta = Math.round((eventElement.offset().top - getBodyContent().offset().top) / slotHeight) minuteDelta = Math.round((eventElement.offset().top - getBodyContent().offset().top) / slotHeight)
@ -443,7 +403,6 @@ function AgendaEventRenderer() {
} }
eventDrop(this, event, dayDelta, minuteDelta, allDay, ev, ui); eventDrop(this, event, dayDelta, minuteDelta, allDay, ev, ui);
} }
//setOverflowHidden(false);
} }
}); });
function resetElement() { function resetElement() {
@ -456,11 +415,13 @@ function AgendaEventRenderer() {
} }
} }
} }
}
// when event starts out IN TIMESLOTS // when event starts out IN TIMESLOTS
function draggableSlotEvent(event, eventElement, timeElement) { function draggableSlotEvent(event, eventElement, timeElement) {
if (!opt('disableDragging') && eventElement.draggable) {
var origPosition; var origPosition;
var allDay=false; var allDay=false;
var dayDelta; var dayDelta;
@ -481,6 +442,9 @@ function AgendaEventRenderer() {
start: function(ev, ui) { start: function(ev, ui) {
trigger('eventDragStart', eventElement, event, ev, ui); trigger('eventDragStart', eventElement, event, ev, ui);
hideEvents(event, eventElement); hideEvents(event, eventElement);
if ($.browser.msie) {
eventElement.find('span.fc-event-bg').hide(); // nested opacities mess up in IE, just hide
}
origPosition = eventElement.position(); origPosition = eventElement.position();
minuteDelta = prevMinuteDelta = 0; minuteDelta = prevMinuteDelta = 0;
hoverListener.start(function(cell, origCell, rowDelta, colDelta) { hoverListener.start(function(cell, origCell, rowDelta, colDelta) {
@ -526,9 +490,14 @@ function AgendaEventRenderer() {
}else{ }else{
// either no change or out-of-bounds (draggable has already reverted) // either no change or out-of-bounds (draggable has already reverted)
resetElement(); resetElement();
eventElement.css('filter', ''); // clear IE opacity side-effects
eventElement.css(origPosition); // sometimes fast drags make event revert to wrong position eventElement.css(origPosition); // sometimes fast drags make event revert to wrong position
updateTimeText(0); updateTimeText(0);
if ($.browser.msie) {
eventElement
.css('filter', '') // clear IE opacity side-effects
.find('span.fc-event-bg')
.css('display', ''); // .show() made display=inline
}
showEvents(event, eventElement); showEvents(event, eventElement);
} }
} }
@ -550,6 +519,7 @@ function AgendaEventRenderer() {
} }
} }
} }
}
@ -558,6 +528,7 @@ function AgendaEventRenderer() {
function resizableSlotEvent(event, eventElement, timeElement) { function resizableSlotEvent(event, eventElement, timeElement) {
if (!opt('disableResizing') && eventElement.resizable) {
var slotDelta, prevSlotDelta; var slotDelta, prevSlotDelta;
var slotHeight = getSlotHeight(); var slotHeight = getSlotHeight();
eventElement.resizable({ eventElement.resizable({
@ -568,6 +539,9 @@ function AgendaEventRenderer() {
start: function(ev, ui) { start: function(ev, ui) {
slotDelta = prevSlotDelta = 0; slotDelta = prevSlotDelta = 0;
hideEvents(event, eventElement); hideEvents(event, eventElement);
if ($.browser.msie && $.browser.version == '6.0') {
eventElement.css('overflow', 'hidden');
}
eventElement.css('z-index', 9); eventElement.css('z-index', 9);
trigger('eventResizeStart', this, event, ev, ui); trigger('eventResizeStart', this, event, ev, ui);
}, },
@ -598,6 +572,7 @@ function AgendaEventRenderer() {
} }
}); });
} }
}
} }

View file

@ -1,10 +1,9 @@
setDefaults({ setDefaults({
allDaySlot: true, allDaySlot: true,
allDayText: 'all-day', allDayText: 'all-day',
firstHour: 6, firstHour: 6,
slotMinutes: 30, slotMinutes: 30,
minSlotNumber: 0,
maxSlotNumber: 0,
defaultEventMinutes: 120, defaultEventMinutes: 120,
axisFormat: 'h(:mm)tt', axisFormat: 'h(:mm)tt',
timeFormat: { timeFormat: {
@ -18,10 +17,6 @@ setDefaults({
}); });
// TODO: make it work in quirks mode (event corners, all-day height)
// TODO: test liquid width, especially in IE6
function AgendaView(element, calendar, viewName) { function AgendaView(element, calendar, viewName) {
var t = this; var t = this;
@ -38,7 +33,7 @@ function AgendaView(element, calendar, viewName) {
t.dateCell = dateCell; t.dateCell = dateCell;
t.cellDate = cellDate; t.cellDate = cellDate;
t.cellIsAllDay = cellIsAllDay; t.cellIsAllDay = cellIsAllDay;
t.allDayRow = getAllDayRow; t.allDayTR = allDayTR;
t.allDayBounds = allDayBounds; t.allDayBounds = allDayBounds;
t.getHoverListener = function() { return hoverListener }; t.getHoverListener = function() { return hoverListener };
t.colContentLeft = colContentLeft; t.colContentLeft = colContentLeft;
@ -47,18 +42,15 @@ function AgendaView(element, calendar, viewName) {
t.getSlotSegmentContainer = function() { return slotSegmentContainer }; t.getSlotSegmentContainer = function() { return slotSegmentContainer };
t.getMinMinute = function() { return minMinute }; t.getMinMinute = function() { return minMinute };
t.getMaxMinute = function() { return maxMinute }; t.getMaxMinute = function() { return maxMinute };
t.getBodyContent = function() { return slotContent }; // !!?? t.getBodyContent = function() { return bodyContent };
t.getRowCnt = function() { return 1 }; t.getRowCnt = function() { return 1 };
t.getColCnt = function() { return colCnt }; t.getColCnt = function() { return colCnt };
t.getColWidth = function() { return colWidth }; t.getColWidth = function() { return colWidth };
t.getSlotHeight = function() { return slotHeight }; t.getSlotHeight = function() { return slotHeight };
t.getBorderHeight = function() { return borderHeight };
t.getSlotTableHeight = function() { return slotTable.height() };
t.defaultSelectionEnd = defaultSelectionEnd; t.defaultSelectionEnd = defaultSelectionEnd;
t.renderDayOverlay = renderDayOverlay; t.renderDayOverlay = renderDayOverlay;
t.renderSelection = renderSelection; t.renderSelection = renderSelection;
t.clearSelection = clearSelection; t.clearSelection = clearSelection;
t.reportDayClick = reportDayClick; // selection mousedown hack
t.dragStart = dragStart; t.dragStart = dragStart;
t.dragStop = dragStop; t.dragStop = dragStop;
@ -81,51 +73,23 @@ function AgendaView(element, calendar, viewName) {
// locals // locals
var head, body, bodyContent, bodyTable, bg;
var dayTable;
var dayHead;
var dayHeadCells;
var dayBody;
var dayBodyCells;
var dayBodyCellInners;
var dayBodyFirstCell;
var dayBodyFirstCellStretcher;
var slotLayer;
var daySegmentContainer;
var allDayTable;
var allDayRow;
var slotScroller;
var slotContent;
var slotSegmentContainer;
var slotTable;
var slotTableFirstRow;
var slotTableSecondRow;
var axisFirstCells;
var gutterCells;
var selectionHelper;
var viewWidth;
var viewHeight;
var axisWidth;
var colWidth;
var gutterWidth;
var slotHeight; // TODO: what if slotHeight changes? (see issue 650)
var borderHeight;
var savedScrollTop;
var colCnt; var colCnt;
var slotCnt; var slotCnt=0; // spanning all the way across
var axisWidth, colWidth, slotHeight; // TODO: what if slotHeight changes? (see issue 650)
var viewWidth, viewHeight;
var savedScrollTop;
var tm, firstDay;
var nwe; // no weekends (int)
var rtl, dis, dit; // day index sign / translate
var minMinute, maxMinute;
var coordinateGrid; var coordinateGrid;
var hoverListener; var hoverListener;
var colContentPositions; var colContentPositions;
var slotTopCache = {}; var slotTopCache = {};
var selectionHelper;
var tm; var daySegmentContainer;
var firstDay; var slotSegmentContainer;
var nwe; // no weekends (int)
var rtl, dis, dit; // day index sign / translate
var minMinute, maxMinute;
var colFormat;
@ -137,19 +101,10 @@ function AgendaView(element, calendar, viewName) {
function renderAgenda(c) { function renderAgenda(c) {
colCnt = c; colCnt = c;
updateOptions();
if (!dayTable) {
buildSkeleton();
}else{
clearEvents();
}
updateCells();
}
// update option-derived variables
function updateOptions() {
tm = opt('theme') ? 'ui' : 'fc'; tm = opt('theme') ? 'ui' : 'fc';
nwe = opt('weekends') ? 0 : 1; nwe = opt('weekends') ? 0 : 1;
firstDay = opt('firstDay'); firstDay = opt('firstDay');
@ -162,202 +117,151 @@ function AgendaView(element, calendar, viewName) {
} }
minMinute = parseTime(opt('minTime')); minMinute = parseTime(opt('minTime'));
maxMinute = parseTime(opt('maxTime')); maxMinute = parseTime(opt('maxTime'));
var d0 = rtl ? addDays(cloneDate(t.visEnd), -1) : cloneDate(t.visStart),
d = cloneDate(d0),
today = clearTime(new Date()),
colFormat = opt('columnFormat'); colFormat = opt('columnFormat');
}
if (!head) { // first time rendering, build from scratch
var i,
minutes,
slotNormal = opt('slotMinutes') % 15 == 0, //...
function buildSkeleton() { // head
var headerClass = tm + "-widget-header"; s = "<div class='fc-agenda-head' style='position:relative;z-index:4'>" +
var contentClass = tm + "-widget-content"; "<table style='width:100%'>" +
var s; "<tr class='fc-first" + (opt('allDaySlot') ? '' : ' fc-last') + "'>" +
var i; "<th class='fc-leftmost " +
var d; tm + "-state-default'>&nbsp;</th>";
var maxd;
var minutes;
var slotNormal = opt('slotMinutes') % 15 == 0;
s =
"<table style='width:100%' class='fc-agenda-days fc-border-separate' cellspacing='0'>" +
"<thead>" +
"<tr>" +
"<th class='fc-agenda-axis " + headerClass + "'>&nbsp;</th>";
for (i=0; i<colCnt; i++) { for (i=0; i<colCnt; i++) {
s += s += "<th class='fc-" +
"<th class='fc- fc-col" + i + ' ' + headerClass + "'/>"; // fc- needed for setDayID dayIDs[d.getDay()] + ' ' + // needs to be first
tm + '-state-default' +
"'>" + formatDate(d, colFormat) + "</th>";
addDays(d, dis);
if (nwe) {
skipWeekend(d, dis);
} }
s +=
"<th class='fc-agenda-gutter " + headerClass + "'>&nbsp;</th>" +
"</tr>" +
"</thead>" +
"<tbody>" +
"<tr>" +
"<th class='fc-agenda-axis " + headerClass + "'>&nbsp;</th>";
for (i=0; i<colCnt; i++) {
s +=
"<td class='fc- fc-col" + i + ' ' + contentClass + "'>" + // fc- needed for setDayID
"<div>" +
"<div class='fc-day-content'>" +
"<div style='position:relative'>&nbsp;</div>" +
"</div>" +
"</div>" +
"</td>";
} }
s += s += "<th class='" + tm + "-state-default'>&nbsp;</th></tr>";
"<td class='fc-agenda-gutter " + contentClass + "'>&nbsp;</td>" +
"</tr>" +
"</tbody>" +
"</table>";
dayTable = $(s).appendTo(element);
dayHead = dayTable.find('thead');
dayHeadCells = dayHead.find('th').slice(1, -1);
dayBody = dayTable.find('tbody');
dayBodyCells = dayBody.find('td').slice(0, -1);
dayBodyCellInners = dayBodyCells.find('div.fc-day-content div');
dayBodyFirstCell = dayBodyCells.eq(0);
dayBodyFirstCellStretcher = dayBodyFirstCell.find('> div');
markFirstLast(dayHead.add(dayHead.find('tr')));
markFirstLast(dayBody.add(dayBody.find('tr')));
axisFirstCells = dayHead.find('th:first');
gutterCells = dayTable.find('.fc-agenda-gutter');
slotLayer =
$("<div style='position:absolute;z-index:2;left:0;width:100%'/>")
.appendTo(element);
if (opt('allDaySlot')) { if (opt('allDaySlot')) {
s += "<tr class='fc-all-day'>" +
daySegmentContainer = "<th class='fc-axis fc-leftmost " + tm + "-state-default'>" + opt('allDayText') + "</th>" +
$("<div style='position:absolute;z-index:8;top:0;left:0'/>") "<td colspan='" + colCnt + "' class='" + tm + "-state-default'>" +
.appendTo(slotLayer); "<div class='fc-day-content'><div style='position:relative'>&nbsp;</div></div></td>" +
"<th class='" + tm + "-state-default'>&nbsp;</th>" +
s = "</tr><tr class='fc-divider fc-last'><th colspan='" + (colCnt+2) + "' class='" +
"<table style='width:100%' class='fc-agenda-allday' cellspacing='0'>" + tm + "-state-default fc-leftmost'><div/></th></tr>";
"<tr>" +
"<th class='" + headerClass + " fc-agenda-axis'>" + opt('allDayText') + "</th>" +
"<td>" +
"<div class='fc-day-content'><div style='position:relative'/></div>" +
"</td>" +
"<th class='" + headerClass + " fc-agenda-gutter'>&nbsp;</th>" +
"</tr>" +
"</table>";
allDayTable = $(s).appendTo(slotLayer);
allDayRow = allDayTable.find('tr');
dayBind(allDayRow.find('td'));
axisFirstCells = axisFirstCells.add(allDayTable.find('th:first'));
gutterCells = gutterCells.add(allDayTable.find('th.fc-agenda-gutter'));
slotLayer.append(
"<div class='fc-agenda-divider " + headerClass + "'>" +
"<div class='fc-agenda-divider-inner'/>" +
"</div>"
);
}else{
daySegmentContainer = $([]); // in jQuery 1.4, we can just do $()
} }
s+= "</table></div>";
head = $(s).appendTo(element);
dayBind(head.find('td'));
slotScroller = // all-day event container
$("<div style='position:absolute;width:100%;overflow-x:hidden;overflow-y:auto'/>") daySegmentContainer = $("<div style='position:absolute;z-index:8;top:0;left:0'/>").appendTo(head);
.appendTo(slotLayer);
slotContent = // body
$("<div style='position:relative;width:100%;overflow:hidden'/>")
.appendTo(slotScroller);
slotSegmentContainer =
$("<div style='position:absolute;z-index:8;top:0;left:0'/>")
.appendTo(slotContent);
s =
"<table class='fc-agenda-slots' style='width:100%' cellspacing='0'>" +
"<tbody>";
d = zeroDate(); d = zeroDate();
maxd = addMinutes(cloneDate(d), maxMinute); var maxd = addMinutes(cloneDate(d), maxMinute);
addMinutes(d, minMinute); addMinutes(d, minMinute);
slotCnt = 0; s = "<table>";
for (i=0; d < maxd; i++) { for (i=0; d < maxd; i++) {
minutes = d.getMinutes(); minutes = d.getMinutes();
s += s += "<tr class='" +
"<tr class='fc-slot" + i + ' ' + (!minutes ? '' : 'fc-minor') + "'>" + (!i ? 'fc-first' : (!minutes ? '' : 'fc-minor')) +
"<th class='fc-agenda-axis " + headerClass + "'>" + "'><th class='fc-axis fc-leftmost " + tm + "-state-default'>" +
((!slotNormal || !minutes) ? formatDate(d, opt('axisFormat')) : '&nbsp;') + ((!slotNormal || !minutes) ? formatDate(d, opt('axisFormat')) : '&nbsp;') +
"</th>" + "</th><td class='fc-slot" + i + ' ' +
"<td class='" + contentClass + "'>" + tm + "-state-default'><div style='position:relative'>&nbsp;</div></td></tr>";
"<div style='position:relative'>&nbsp;</div>" +
"</td>" +
"</tr>";
addMinutes(d, opt('slotMinutes')); addMinutes(d, opt('slotMinutes'));
slotCnt++; slotCnt++;
} }
s += s += "</table>";
"</tbody>" + body = $("<div class='fc-agenda-body' style='position:relative;z-index:2;overflow:auto'/>")
"</table>"; .append(bodyContent = $("<div style='position:relative;overflow:hidden'>")
slotTable = $(s).appendTo(slotContent); .append(bodyTable = $(s)))
slotTableFirstRow = slotTable.find('tr:first'); .appendTo(element);
slotTableSecondRow = slotTable.find('tr:nth-child(2)'); slotBind(body.find('td'));
slotBind(slotTable.find('td')); // slot event container
slotSegmentContainer = $("<div style='position:absolute;z-index:8;top:0;left:0'/>").appendTo(bodyContent);
axisFirstCells = axisFirstCells.add(slotTable.find('th:first')); // background stripes
} d = cloneDate(d0);
s = "<div class='fc-agenda-bg' style='position:absolute;z-index:1'>" +
"<table style='width:100%;height:100%'><tr class='fc-first'>";
function updateCells() {
var i;
var headCell;
var bodyCell;
var date;
var today = clearTime(new Date());
for (i=0; i<colCnt; i++) { for (i=0; i<colCnt; i++) {
date = colDate(i); s += "<td class='fc-" +
headCell = dayHeadCells.eq(i); dayIDs[d.getDay()] + ' ' + // needs to be first
headCell.html(formatDate(date, colFormat)); tm + '-state-default ' +
bodyCell = dayBodyCells.eq(i); (!i ? 'fc-leftmost ' : '') +
if (+date == +today) { (+d == +today ? tm + '-state-highlight fc-today' : 'fc-not-today') +
bodyCell.addClass(tm + '-state-highlight fc-today'); "'><div class='fc-day-content'><div>&nbsp;</div></div></td>";
addDays(d, dis);
if (nwe) {
skipWeekend(d, dis);
}
}
s += "</tr></table></div>";
bg = $(s).appendTo(element);
}else{ // skeleton already built, just modify it
clearEvents();
// redo column header text and class
head.find('tr:first th').slice(1, -1).each(function(i, th) {
$(th).text(formatDate(d, colFormat));
th.className = th.className.replace(/^fc-\w+(?= )/, 'fc-' + dayIDs[d.getDay()]);
addDays(d, dis);
if (nwe) {
skipWeekend(d, dis);
}
});
// change classes of background stripes
d = cloneDate(d0);
bg.find('td').each(function(i, td) {
td.className = td.className.replace(/^fc-\w+(?= )/, 'fc-' + dayIDs[d.getDay()]);
if (+d == +today) {
$(td)
.removeClass('fc-not-today')
.addClass('fc-today')
.addClass(tm + '-state-highlight');
}else{ }else{
bodyCell.removeClass(tm + '-state-highlight fc-today'); $(td)
.addClass('fc-not-today')
.removeClass('fc-today')
.removeClass(tm + '-state-highlight');
} }
setDayID(headCell.add(bodyCell), date); addDays(d, dis);
if (nwe) {
skipWeekend(d, dis);
} }
});
}
} }
function setHeight(height, dateChanged) { function setHeight(height, dateChanged) {
if (height === undefined) { if (height === undefined) {
height = viewHeight; height = viewHeight;
} }
viewHeight = height; viewHeight = height;
slotTopCache = {}; slotTopCache = {};
var headHeight = dayBody.position().top; var bodyHeight = height - head.height();
bodyHeight = Math.min(bodyHeight, bodyTable.height()); // shrink to fit table
body.height(bodyHeight);
if($.type(height) === 'number') { slotHeight = body.find('tr:first div').height() + 1;
var allDayHeight = slotScroller.position().top; // including divider
var bodyHeight = Math.min( // total body height, including borders
height - headHeight, // when scrollbars
slotTable.height() + allDayHeight + 1 // when no scrollbars. +1 for bottom border
);
slotScroller.height(bodyHeight - allDayHeight - 1);
dayBodyFirstCellStretcher.height(bodyHeight - vsides(dayBodyFirstCell));
} else {
slotScroller.height(height);
dayBodyFirstCellStretcher.height(slotScroller.height());
}
slotLayer.css('top', headHeight);
slotHeight = slotTableSecondRow.outerHeight();
borderHeight = slotHeight - slotTableFirstRow.outerHeight();
if (dateChanged) { if (dateChanged) {
resetScroll(); resetScroll();
@ -370,59 +274,75 @@ function AgendaView(element, calendar, viewName) {
viewWidth = width; viewWidth = width;
colContentPositions.clear(); colContentPositions.clear();
body.width(width).css('overflow', 'auto');
bodyTable.width('');
var topTDs = head.find('tr:first th'),
allDayLastTH = head.find('tr.fc-all-day th:last'),
stripeTDs = bg.find('td'),
clientWidth = body[0].clientWidth;
bodyTable.width(clientWidth);
clientWidth = body[0].clientWidth; // in ie6, sometimes previous clientWidth was wrongly reported
bodyTable.width(clientWidth);
// time-axis width
axisWidth = 0; axisWidth = 0;
setOuterWidth( setOuterWidth(
axisFirstCells head.find('tr:lt(2) th:first').add(body.find('tr:first th'))
.width('') .width(1)
.each(function(i, _cell) { .each(function() {
axisWidth = Math.max(axisWidth, $(_cell).outerWidth()); axisWidth = Math.max(axisWidth, $(this).outerWidth());
}), }),
axisWidth axisWidth
); );
var slotTableWidth = slotScroller[0].clientWidth; // needs to be done after axisWidth (for IE7) // column width, except for last column
//slotTable.width(slotTableWidth); colWidth = Math.floor((clientWidth - axisWidth) / colCnt);
setOuterWidth(stripeTDs.slice(0, -1), colWidth);
setOuterWidth(topTDs.slice(1, -2), colWidth);
gutterWidth = slotScroller.width() - slotTableWidth; // column width for last column
if (gutterWidth) { if (width != clientWidth) { // has scrollbar
setOuterWidth(gutterCells, gutterWidth); setOuterWidth(topTDs.slice(-2, -1), clientWidth - axisWidth - colWidth*(colCnt-1));
gutterCells topTDs.slice(-1).show();
.show() allDayLastTH.show();
.prev()
.removeClass('fc-last');
}else{ }else{
gutterCells body.css('overflow', 'hidden');
.hide() topTDs.slice(-2, -1).width('');
.prev() topTDs.slice(-1).hide();
.addClass('fc-last'); allDayLastTH.hide();
} }
colWidth = Math.floor((slotTableWidth - axisWidth) / colCnt); bg.css({
setOuterWidth(dayHeadCells.slice(0, -1), colWidth); top: head.find('tr').height(),
left: axisWidth,
width: clientWidth - axisWidth,
height: viewHeight
});
} }
function resetScroll() { function resetScroll() {
var d0 = zeroDate(); var d0 = zeroDate(),
var scrollDate = cloneDate(d0); scrollDate = cloneDate(d0);
scrollDate.setHours(opt('firstHour')); scrollDate.setHours(opt('firstHour'));
var top = timePosition(d0, scrollDate) + borderHeight; var top = timePosition(d0, scrollDate) + 1, // +1 for the border
function scroll() { scroll = function() {
slotScroller.scrollTop(top); body.scrollTop(top);
} };
scroll(); scroll();
setTimeout(scroll, 0); // overrides any previous scroll state made by the browser setTimeout(scroll, 0); // overrides any previous scroll state made by the browser
} }
function beforeHide() { function beforeHide() {
savedScrollTop = slotScroller.scrollTop(); savedScrollTop = body.scrollTop();
} }
function afterShow() { function afterShow() {
slotScroller.scrollTop(savedScrollTop); body.scrollTop(savedScrollTop);
} }
@ -431,31 +351,31 @@ function AgendaView(element, calendar, viewName) {
-----------------------------------------------------------------------*/ -----------------------------------------------------------------------*/
function dayBind(cells) { function dayBind(tds) {
cells.click(slotClick) tds.click(slotClick)
.mousedown(daySelectionMousedown); .mousedown(daySelectionMousedown);
} }
function slotBind(cells) { function slotBind(tds) {
cells.click(slotClick) tds.click(slotClick)
.mousedown(slotSelectionMousedown); .mousedown(slotSelectionMousedown);
} }
function slotClick(ev) { function slotClick(ev) {
if (!opt('selectable')) { // if selectable, SelectionManager will worry about dayClick if (!opt('selectable')) { // SelectionManager will worry about dayClick
var col = Math.min(colCnt-1, Math.floor((ev.pageX - dayTable.offset().left - axisWidth) / colWidth)); var col = Math.min(colCnt-1, Math.floor((ev.pageX - bg.offset().left) / colWidth)),
var date = colDate(col); date = addDays(cloneDate(t.visStart), col*dis+dit),
var rowMatch = this.parentNode.className.match(/fc-slot(\d+)/); // TODO: maybe use data rowMatch = this.className.match(/fc-slot(\d+)/);
if (rowMatch) { if (rowMatch) {
var mins = parseInt(rowMatch[1]) * opt('slotMinutes'); var mins = parseInt(rowMatch[1]) * opt('slotMinutes'),
var hours = Math.floor(mins/60); hours = Math.floor(mins/60);
date.setHours(hours); date.setHours(hours);
date.setMinutes(mins%60 + minMinute); date.setMinutes(mins%60 + minMinute);
trigger('dayClick', dayBodyCells[col], date, false, ev); trigger('dayClick', this, date, false, ev);
}else{ }else{
trigger('dayClick', dayBodyCells[col], date, true, ev); trigger('dayClick', this, date, true, ev);
} }
} }
} }
@ -489,9 +409,9 @@ function AgendaView(element, calendar, viewName) {
} }
function renderCellOverlay(row0, col0, row1, col1) { // only for all-day? function renderCellOverlay(col0, row0, col1, row1) {
var rect = coordinateGrid.rect(row0, col0, row1, col1, slotLayer); var rect = coordinateGrid.rect(col0, row0, col1, row1, head);
return renderOverlay(rect, slotLayer); return renderOverlay(rect, head);
} }
@ -503,13 +423,13 @@ function AgendaView(element, calendar, viewName) {
var stretchEnd = new Date(Math.min(dayEnd, overlayEnd)); var stretchEnd = new Date(Math.min(dayEnd, overlayEnd));
if (stretchStart < stretchEnd) { if (stretchStart < stretchEnd) {
var col = i*dis+dit; var col = i*dis+dit;
var rect = coordinateGrid.rect(0, col, 0, col, slotContent); // only use it for horizontal coords var rect = coordinateGrid.rect(0, col, 0, col, bodyContent); // only use it for horizontal coords
var top = timePosition(dayStart, stretchStart); var top = timePosition(dayStart, stretchStart);
var bottom = timePosition(dayStart, stretchEnd); var bottom = timePosition(dayStart, stretchEnd);
rect.top = top; rect.top = top;
rect.height = bottom - top; rect.height = bottom - top;
slotBind( slotBind(
renderOverlay(rect, slotContent) renderOverlay(rect, bodyContent)
); );
} }
addDays(dayStart, 1); addDays(dayStart, 1);
@ -525,7 +445,7 @@ function AgendaView(element, calendar, viewName) {
coordinateGrid = new CoordinateGrid(function(rows, cols) { coordinateGrid = new CoordinateGrid(function(rows, cols) {
var e, n, p; var e, n, p;
dayHeadCells.each(function(i, _e) { bg.find('td').each(function(i, _e) {
e = $(_e); e = $(_e);
n = e.offset().left; n = e.offset().left;
if (i) { if (i) {
@ -536,20 +456,20 @@ function AgendaView(element, calendar, viewName) {
}); });
p[1] = n + e.outerWidth(); p[1] = n + e.outerWidth();
if (opt('allDaySlot')) { if (opt('allDaySlot')) {
e = allDayRow; e = head.find('td');
n = e.offset().top; n = e.offset().top;
rows[0] = [n, n+e.outerHeight()]; rows[0] = [n, n+e.outerHeight()];
} }
var slotTableTop = slotContent.offset().top; var bodyContentTop = bodyContent.offset().top;
var slotScrollerTop = slotScroller.offset().top; var bodyTop = body.offset().top;
var slotScrollerBottom = slotScrollerTop + slotScroller.outerHeight(); var bodyBottom = bodyTop + body.outerHeight();
function constrain(n) { function constrain(n) {
return Math.max(slotScrollerTop, Math.min(slotScrollerBottom, n)); return Math.max(bodyTop, Math.min(bodyBottom, n));
} }
for (var i=0; i<slotCnt; i++) { for (var i=0; i<slotCnt; i++) {
rows.push([ rows.push([
constrain(slotTableTop + slotHeight*i), constrain(bodyContentTop + slotHeight*i),
constrain(slotTableTop + slotHeight*(i+1)) constrain(bodyContentTop + slotHeight*(i+1))
]); ]);
} }
}); });
@ -559,23 +479,26 @@ function AgendaView(element, calendar, viewName) {
colContentPositions = new HorizontalPositionCache(function(col) { colContentPositions = new HorizontalPositionCache(function(col) {
return dayBodyCellInners.eq(col); return bg.find('td:eq(' + col + ') div div');
}); });
function colContentLeft(col) { function colContentLeft(col) {
return colContentPositions.left(col); return axisWidth + colContentPositions.left(col);
} }
function colContentRight(col) { function colContentRight(col) {
return colContentPositions.right(col); return axisWidth + colContentPositions.right(col);
} }
function dayOfWeekCol(dayOfWeek) {
return ((dayOfWeek - Math.max(firstDay, nwe) + colCnt) % colCnt)*dis+dit;
}
function dateCell(date) { // "cell" terminology is now confusing function dateCell(date) {
return { return {
row: Math.floor(dayDiff(date, t.visStart) / 7), row: Math.floor(dayDiff(date, t.visStart) / 7),
col: dayOfWeekCol(date.getDay()) col: dayOfWeekCol(date.getDay())
@ -583,8 +506,30 @@ function AgendaView(element, calendar, viewName) {
} }
// get the Y coordinate of the given time on the given day (both Date objects)
function timePosition(day, time) { // both date objects. day holds 00:00 of current day
day = cloneDate(day, true);
if (time < addMinutes(cloneDate(day), minMinute)) {
return 0;
}
if (time >= addMinutes(cloneDate(day), maxMinute)) {
return bodyContent.height();
}
var slotMinutes = opt('slotMinutes'),
minutes = time.getHours()*60 + time.getMinutes() - minMinute,
slotI = Math.floor(minutes / slotMinutes),
slotTop = slotTopCache[slotI];
if (slotTop === undefined) {
slotTop = slotTopCache[slotI] = body.find('tr:eq(' + slotI + ') td div')[0].offsetTop;
}
return Math.max(0, Math.round(
slotTop - 1 + slotHeight * ((minutes % slotMinutes) / slotMinutes)
));
}
function cellDate(cell) { function cellDate(cell) {
var d = colDate(cell.col); var d = addDays(cloneDate(t.visStart), cell.col*dis+dit);
var slotIndex = cell.row; var slotIndex = cell.row;
if (opt('allDaySlot')) { if (opt('allDaySlot')) {
slotIndex--; slotIndex--;
@ -596,55 +541,21 @@ function AgendaView(element, calendar, viewName) {
} }
function colDate(col) { // returns dates with 00:00:00
return addDays(cloneDate(t.visStart), col*dis+dit);
}
function cellIsAllDay(cell) { function cellIsAllDay(cell) {
return opt('allDaySlot') && !cell.row; return opt('allDaySlot') && !cell.row;
} }
function dayOfWeekCol(dayOfWeek) {
return ((dayOfWeek - Math.max(firstDay, nwe) + colCnt) % colCnt)*dis+dit;
}
// get the Y coordinate of the given time on the given day (both Date objects)
function timePosition(day, time) { // both date objects. day holds 00:00 of current day
day = cloneDate(day, true);
if (time < addMinutes(cloneDate(day), minMinute)) {
return 0;
}
if (time >= addMinutes(cloneDate(day), maxMinute)) {
return slotTable.height();
}
var slotMinutes = opt('slotMinutes'),
minutes = time.getHours()*60 + time.getMinutes() - minMinute,
slotI = Math.floor(minutes / slotMinutes),
slotTop = slotTopCache[slotI];
if (slotTop === undefined) {
slotTop = slotTopCache[slotI] = slotTable.find('tr:eq(' + slotI + ') td div')[0].offsetTop; //.position().top; // need this optimization???
}
return Math.max(0, Math.round(
slotTop + slotHeight * ((minutes % slotMinutes) / slotMinutes)
));
}
function allDayBounds() { function allDayBounds() {
return { return {
left: axisWidth, left: axisWidth,
right: viewWidth - gutterWidth right: viewWidth
} }
} }
function getAllDayRow(index) { function allDayTR(index) {
return allDayRow; return head.find('tr.fc-all-day');
} }
@ -670,7 +581,7 @@ function AgendaView(element, calendar, viewName) {
} }
function renderSelection(startDate, endDate, allDay) { // only for all-day function renderSelection(startDate, endDate, allDay) {
if (allDay) { if (allDay) {
if (opt('allDaySlot')) { if (opt('allDaySlot')) {
renderDayOverlay(startDate, addDays(cloneDate(endDate), 1), true); renderDayOverlay(startDate, addDays(cloneDate(endDate), 1), true);
@ -687,12 +598,9 @@ function AgendaView(element, calendar, viewName) {
if (helperOption) { if (helperOption) {
var col = dayDiff(startDate, t.visStart) * dis + dit; var col = dayDiff(startDate, t.visStart) * dis + dit;
if (col >= 0 && col < colCnt) { // only works when times are on same day if (col >= 0 && col < colCnt) { // only works when times are on same day
var rect = coordinateGrid.rect(0, col, 0, col, slotContent); // only for horizontal coords var rect = coordinateGrid.rect(0, col, 0, col, bodyContent); // only for horizontal coords
var top = timePosition(startDate, startDate); var top = timePosition(startDate, startDate);
var bottom = timePosition(startDate, endDate); var bottom = timePosition(startDate, endDate);
if (bottom < slotTable.height()) {
bottom -= borderHeight;
}
if (bottom > top) { // protect against selections that are entirely before or after visible range if (bottom > top) { // protect against selections that are entirely before or after visible range
rect.top = top; rect.top = top;
rect.height = bottom - top; rect.height = bottom - top;
@ -705,26 +613,28 @@ function AgendaView(element, calendar, viewName) {
rect.zIndex = 8; rect.zIndex = 8;
selectionHelper = $(helperRes) selectionHelper = $(helperRes)
.css(rect) .css(rect)
.appendTo(slotContent); .appendTo(bodyContent);
} }
}else{ }else{
rect.isStart = true; // conside rect a "seg" now
rect.isEnd = true; //
selectionHelper = $(slotSegHtml( selectionHelper = $(slotSegHtml(
{ {
title: '', title: '',
start: startDate, start: startDate,
end: endDate, end: endDate,
className: ['fc-select-helper'], className: [],
editable: false editable: false
}, },
rect rect,
'fc-event fc-event-vert fc-corner-top fc-corner-bottom '
)); ));
if ($.browser.msie) {
selectionHelper.find('span.fc-event-bg').hide(); // nested opacities mess up in IE, just hide
}
selectionHelper.css('opacity', opt('dragOpacity')); selectionHelper.css('opacity', opt('dragOpacity'));
} }
if (selectionHelper) { if (selectionHelper) {
slotBind(selectionHelper); slotBind(selectionHelper);
slotContent.append(selectionHelper); bodyContent.append(selectionHelper);
setOuterWidth(selectionHelper, rect.width, true); // needs to be after appended setOuterWidth(selectionHelper, rect.width, true); // needs to be after appended
setOuterHeight(selectionHelper, rect.height, true); setOuterHeight(selectionHelper, rect.height, true);
} }
@ -748,37 +658,19 @@ function AgendaView(element, calendar, viewName) {
function slotSelectionMousedown(ev) { function slotSelectionMousedown(ev) {
if (ev.which == 1 && opt('selectable')) { // ev.which==1 means left mouse button if (ev.which == 1 && opt('selectable')) { // ev.which==1 means left mouse button
unselect(ev); unselect(ev);
var _mousedownElement = this;
var dates; var dates;
var minSlotNumber = opt('minSlotNumber');
if (minSlotNumber <= 0) minSlotNumber = 1;
var maxSlotNumber = opt('maxSlotNumber');
hoverListener.start(function(cell, origCell) { hoverListener.start(function(cell, origCell) {
clearSelection(); clearSelection();
if (cell && cell.col == origCell.col && !cellIsAllDay(cell)) { if (cell && cell.col == origCell.col && !cellIsAllDay(cell)) {
var d1 = cellDate(origCell); var d1 = cellDate(origCell);
var d2 = cellDate(cell); var d2 = cellDate(cell);
if (d2>d1) {
var date1 = d1
var date2 = d2
} else {
var date1 = d2
var date2 = d1
}
if (maxSlotNumber != 0 && (date2-date1) >= maxSlotNumber*opt('slotMinutes')*60000) {
dates = [ dates = [
date1, d1,
addMinutes(cloneDate(date1), minSlotNumber*opt('slotMinutes')), addMinutes(cloneDate(d1), opt('slotMinutes')),
date1, d2,
addMinutes(cloneDate(date1), maxSlotNumber*opt('slotMinutes')) addMinutes(cloneDate(d2), opt('slotMinutes'))
].sort(cmp); ].sort(cmp);
} else {
dates = [
date1,
addMinutes(cloneDate(date1), minSlotNumber*opt('slotMinutes')),
date2,
addMinutes(cloneDate(date2), opt('slotMinutes'))
].sort(cmp);
}
renderSlotSelection(dates[0], dates[3]); renderSlotSelection(dates[0], dates[3]);
}else{ }else{
dates = null; dates = null;
@ -788,7 +680,8 @@ function AgendaView(element, calendar, viewName) {
hoverListener.stop(); hoverListener.stop();
if (dates) { if (dates) {
if (+dates[0] == +dates[1]) { if (+dates[0] == +dates[1]) {
reportDayClick(dates[0], false, ev); trigger('dayClick', _mousedownElement, dates[0], false, ev);
// BUG: _mousedownElement will sometimes be the overlay
} }
reportSelection(dates[0], dates[3], false, ev); reportSelection(dates[0], dates[3], false, ev);
} }
@ -797,11 +690,6 @@ function AgendaView(element, calendar, viewName) {
} }
function reportDayClick(date, allDay, ev) {
trigger('dayClick', dayBodyCells[dayOfWeekCol(date.getDay())], date, allDay, ev);
}
/* External Dragging /* External Dragging
--------------------------------------------------------------------------------*/ --------------------------------------------------------------------------------*/

View file

@ -2,86 +2,82 @@
/* Agenda Week View, Agenda Day View /* Agenda Week View, Agenda Day View
------------------------------------------------------------------------*/ ------------------------------------------------------------------------*/
.fc-agenda table { .fc .fc-agenda th,
border-collapse: separate; .fc .fc-agenda td {
border-width: 1px 0 0 1px;
} }
.fc-agenda-days th { .fc .fc-agenda .fc-leftmost {
text-align: center; border-left: 0;
} }
.fc-agenda .fc-agenda-axis { .fc-agenda tr.fc-first th,
width: 50px; .fc-agenda tr.fc-first td {
padding: 0 4px; border-top: 0;
vertical-align: middle;
text-align: right;
white-space: nowrap;
font-weight: normal;
} }
.fc-agenda .fc-day-content { .fc-agenda-head tr.fc-last th {
padding: 2px 2px 1px; border-bottom-width: 1px;
} }
/* make axis border take precedence */ .fc .fc-agenda-head td,
.fc .fc-agenda-body td {
.fc-agenda-days .fc-agenda-axis {
border-right-width: 1px;
}
.fc-agenda-days .fc-col0 {
border-left-width: 0;
}
/* all-day area */
.fc-agenda-allday th {
border-width: 0 1px;
}
.fc-agenda-allday .fc-day-content {
min-height: 34px; /* TODO: doesnt work well in quirksmode */
_height: 34px;
}
/* divider (between all-day and slots) */
.fc-agenda-divider-inner {
height: 2px;
overflow: hidden;
}
.fc-widget-header .fc-agenda-divider-inner {
background: #eee;
}
/* slot rows */
.fc-agenda-slots th {
border-width: 1px 1px 0;
}
.fc-agenda-slots td {
border-width: 1px 0 0;
background: none; background: none;
} }
.fc-agenda-slots td div { .fc-agenda-head th {
height: 20px; text-align: center;
} }
.fc-agenda-slots tr.fc-slot0 th, /* the time axis running down the left side */
.fc-agenda-slots tr.fc-slot0 td {
border-top-width: 0; .fc-agenda .fc-axis {
width: 50px;
padding: 0 4px;
vertical-align: middle;
white-space: nowrap;
text-align: right;
font-weight: normal;
} }
.fc-agenda-slots tr.fc-minor th, /* all-day event cells at top */
.fc-agenda-slots tr.fc-minor td {
.fc-agenda-head tr.fc-all-day th {
height: 35px;
}
.fc-agenda-head td {
padding-bottom: 10px;
}
.fc .fc-divider div {
font-size: 1px; /* for IE6/7 */
height: 2px;
}
.fc .fc-divider .fc-state-default {
background: #eee; /* color for divider between all-day and time-slot events */
}
/* body styles */
.fc .fc-agenda-body td div {
height: 20px; /* slot height */
}
.fc .fc-agenda-body tr.fc-minor th,
.fc .fc-agenda-body tr.fc-minor td {
border-top-style: dotted; border-top-style: dotted;
} }
.fc-agenda-slots tr.fc-minor th.ui-widget-header { .fc-agenda .fc-day-content {
*border-top-style: solid; /* doesn't work with background in IE6/7 */ padding: 2px 2px 0; /* distance between events and day edges */
}
/* vertical background columns */
.fc .fc-agenda-bg .ui-state-highlight {
background-image: none; /* tall column, don't want repeating background image */
} }
@ -93,20 +89,51 @@
border-width: 0 1px; border-width: 0 1px;
} }
.fc-event-vert .fc-event-head, .fc-event-vert a {
.fc-event-vert .fc-event-content { border-width: 0;
position: relative;
z-index: 2;
width: 100%;
overflow: hidden;
} }
.fc-event-vert .fc-event-time { /* for fake rounded corners */
.fc-content .fc-corner-top {
margin-top: 1px;
}
.fc-content .fc-corner-top a {
margin-top: -1px;
border-top-width: 1px;
}
.fc-content .fc-corner-bottom {
margin-bottom: 1px;
}
.fc-content .fc-corner-bottom a {
margin-bottom: -1px;
border-bottom-width: 1px;
}
/* event content */
.fc-event-vert span {
display: block;
position: relative;
z-index: 2;
}
.fc-event-vert span.fc-event-time {
white-space: nowrap; white-space: nowrap;
_white-space: normal;
overflow: hidden;
border: 0;
font-size: 10px; font-size: 10px;
} }
.fc-event-vert .fc-event-bg { /* makes the event lighter w/ a semi-transparent overlay */ .fc-event-vert span.fc-event-title {
line-height: 13px;
}
.fc-event-vert span.fc-event-bg { /* makes the event lighter w/ a semi-transparent overlay */
position: absolute; position: absolute;
z-index: 1; z-index: 1;
top: 0; top: 0;
@ -115,12 +142,7 @@
height: 100%; height: 100%;
background: #fff; background: #fff;
opacity: .3; opacity: .3;
filter: alpha(opacity=30); filter: alpha(opacity=30); /* for IE */
}
.fc .ui-draggable-dragging .fc-event-bg, /* TODO: something nicer like .fc-opacity */
.fc-select-helper .fc-event-bg {
display: none\9; /* for IE6/7/8. nested opacity filters while dragging don't work */
} }
/* resizable */ /* resizable */
@ -129,7 +151,6 @@
bottom: 0 !important; /* importants override pre jquery ui 1.7 styles */ bottom: 0 !important; /* importants override pre jquery ui 1.7 styles */
width: 100% !important; width: 100% !important;
height: 8px !important; height: 8px !important;
overflow: hidden !important;
line-height: 8px !important; line-height: 8px !important;
font-size: 11px !important; font-size: 11px !important;
font-family: monospace; font-family: monospace;
@ -137,8 +158,4 @@
cursor: s-resize; cursor: s-resize;
} }
.fc-agenda .ui-resizable-resizing { /* TODO: better selector */
_overflow: hidden;
}

View file

@ -30,7 +30,7 @@ function BasicDayView(element, calendar) {
t.title = formatDate(date, opt('titleFormat')); t.title = formatDate(date, opt('titleFormat'));
t.start = t.visStart = cloneDate(date, true); t.start = t.visStart = cloneDate(date, true);
t.end = t.visEnd = addDays(cloneDate(t.start), 1); t.end = t.visEnd = addDays(cloneDate(t.start), 1);
renderBasic(1, 1, 1, false); renderBasic(1, 1, false);
} }

View file

@ -14,9 +14,6 @@ function BasicEventRenderer() {
DayEventRenderer.call(t); DayEventRenderer.call(t);
var opt = t.opt; var opt = t.opt;
var trigger = t.trigger; var trigger = t.trigger;
//var setOverflowHidden = t.setOverflowHidden;
var isEventDraggable = t.isEventDraggable;
var isEventResizable = t.isEventResizable;
var reportEvents = t.reportEvents; var reportEvents = t.reportEvents;
var reportEventClear = t.reportEventClear; var reportEventClear = t.reportEventClear;
var eventElementHandlers = t.eventElementHandlers; var eventElementHandlers = t.eventElementHandlers;
@ -79,14 +76,13 @@ function BasicEventRenderer() {
function bindDaySeg(event, eventElement, seg) { function bindDaySeg(event, eventElement, seg) {
if (isEventDraggable(event)) { eventElementHandlers(event, eventElement);
if (event.editable || event.editable === undefined && opt('editable')) {
draggableDayEvent(event, eventElement); draggableDayEvent(event, eventElement);
} if (seg.isEnd) {
if (seg.isEnd && isEventResizable(event)) {
resizableDayEvent(event, eventElement, seg); resizableDayEvent(event, eventElement, seg);
} }
eventElementHandlers(event, eventElement); }
// needs to be after, because resizableDayEvent might stopImmediatePropagation on click
} }
@ -96,9 +92,7 @@ function BasicEventRenderer() {
function draggableDayEvent(event, eventElement) { function draggableDayEvent(event, eventElement) {
if (!eventElement.draggable) if (!opt('disableDragging') && eventElement.draggable) {
return;
var hoverListener = getHoverListener(); var hoverListener = getHoverListener();
var dayDelta; var dayDelta;
eventElement.draggable({ eventElement.draggable({
@ -113,14 +107,12 @@ function BasicEventRenderer() {
eventElement.draggable('option', 'revert', !cell || !rowDelta && !colDelta); eventElement.draggable('option', 'revert', !cell || !rowDelta && !colDelta);
clearOverlays(); clearOverlays();
if (cell) { if (cell) {
//setOverflowHidden(true);
dayDelta = rowDelta*7 + colDelta * (opt('isRTL') ? -1 : 1); dayDelta = rowDelta*7 + colDelta * (opt('isRTL') ? -1 : 1);
renderDayOverlay( renderDayOverlay(
addDays(cloneDate(event.start), dayDelta), addDays(cloneDate(event.start), dayDelta),
addDays(exclEndDay(event), dayDelta) addDays(exclEndDay(event), dayDelta)
); );
}else{ }else{
//setOverflowHidden(false);
dayDelta = 0; dayDelta = 0;
} }
}, ev, 'drag'); }, ev, 'drag');
@ -130,15 +122,18 @@ function BasicEventRenderer() {
clearOverlays(); clearOverlays();
trigger('eventDragStop', eventElement, event, ev, ui); trigger('eventDragStop', eventElement, event, ev, ui);
if (dayDelta) { if (dayDelta) {
eventElement.find('a').removeAttr('href'); // prevents safari from visiting the link
eventDrop(this, event, dayDelta, 0, event.allDay, ev, ui); eventDrop(this, event, dayDelta, 0, event.allDay, ev, ui);
}else{ }else{
if ($.browser.msie) {
eventElement.css('filter', ''); // clear IE opacity side-effects eventElement.css('filter', ''); // clear IE opacity side-effects
}
showEvents(event, eventElement); showEvents(event, eventElement);
} }
//setOverflowHidden(false);
} }
}); });
} }
}
} }

View file

@ -1,4 +1,6 @@
var tdHeightBug;
setDefaults({ setDefaults({
weekMode: 'fixed' weekMode: 'fixed'
}); });
@ -16,7 +18,6 @@ function BasicView(element, calendar, viewName) {
t.defaultSelectionEnd = defaultSelectionEnd; t.defaultSelectionEnd = defaultSelectionEnd;
t.renderSelection = renderSelection; t.renderSelection = renderSelection;
t.clearSelection = clearSelection; t.clearSelection = clearSelection;
t.reportDayClick = reportDayClick; // for selection (kinda hacky)
t.dragStart = dragStart; t.dragStart = dragStart;
t.dragStop = dragStop; t.dragStop = dragStop;
t.defaultEventEnd = defaultEventEnd; t.defaultEventEnd = defaultEventEnd;
@ -27,7 +28,7 @@ function BasicView(element, calendar, viewName) {
t.dateCell = dateCell; t.dateCell = dateCell;
t.cellDate = cellDate; t.cellDate = cellDate;
t.cellIsAllDay = function() { return true }; t.cellIsAllDay = function() { return true };
t.allDayRow = allDayRow; t.allDayTR = allDayTR;
t.allDayBounds = allDayBounds; t.allDayBounds = allDayBounds;
t.getRowCnt = function() { return rowCnt }; t.getRowCnt = function() { return rowCnt };
t.getColCnt = function() { return colCnt }; t.getColCnt = function() { return colCnt };
@ -50,30 +51,17 @@ function BasicView(element, calendar, viewName) {
// locals // locals
var head;
var headCells;
var body;
var bodyRows;
var bodyCells;
var bodyFirstCells;
var bodyCellTopInners;
var daySegmentContainer;
var viewWidth;
var viewHeight;
var colWidth;
var rowCnt, colCnt;
var coordinateGrid;
var hoverListener;
var colContentPositions;
var rtl, dis, dit; var rtl, dis, dit;
var firstDay; var firstDay;
var nwe; var nwe;
var tm; var rowCnt, colCnt;
var colFormat; var colWidth;
var viewWidth, viewHeight;
var thead, tbody;
var daySegmentContainer;
var coordinateGrid;
var hoverListener;
var colContentPositions;
@ -84,22 +72,10 @@ function BasicView(element, calendar, viewName) {
disableTextSelection(element.addClass('fc-grid')); disableTextSelection(element.addClass('fc-grid'));
function renderBasic(maxr, r, c, showNumbers) { function renderBasic(r, c, showNumbers) {
rowCnt = r; rowCnt = r;
colCnt = c; colCnt = c;
updateOptions();
var firstTime = !body;
if (firstTime) {
buildSkeleton(maxr, showNumbers);
}else{
clearEvents();
}
updateCells(firstTime);
}
function updateOptions() {
rtl = opt('isRTL'); rtl = opt('isRTL');
if (rtl) { if (rtl) {
dis = -1; dis = -1;
@ -110,156 +86,171 @@ function BasicView(element, calendar, viewName) {
} }
firstDay = opt('firstDay'); firstDay = opt('firstDay');
nwe = opt('weekends') ? 0 : 1; nwe = opt('weekends') ? 0 : 1;
tm = opt('theme') ? 'ui' : 'fc';
colFormat = opt('columnFormat');
}
var tm = opt('theme') ? 'ui' : 'fc';
var colFormat = opt('columnFormat');
function buildSkeleton(maxRowCnt, showNumbers) {
var s;
var headerClass = tm + "-widget-header";
var contentClass = tm + "-widget-content";
var i, j;
var table;
s =
"<table class='fc-border-separate' style='width:100%' cellspacing='0'>" +
"<thead>" +
"<tr>";
for (i=0; i<colCnt; i++) {
s +=
"<th class='fc- " + headerClass + "'/>"; // need fc- for setDayID
}
s +=
"</tr>" +
"</thead>" +
"<tbody>";
for (i=0; i<maxRowCnt; i++) {
s +=
"<tr class='fc-week" + i + "'>";
for (j=0; j<colCnt; j++) {
s +=
"<td class='fc- " + contentClass + " fc-day" + (i*colCnt+j) + "'>" + // need fc- for setDayID
"<div>" +
(showNumbers ?
"<div class='fc-day-number'/>" :
''
) +
"<div class='fc-day-content'>" +
"<div style='position:relative'>&nbsp;</div>" +
"</div>" +
"</div>" +
"</td>";
}
s +=
"</tr>";
}
s +=
"</tbody>" +
"</table>";
table = $(s).appendTo(element);
head = table.find('thead');
headCells = head.find('th');
body = table.find('tbody');
bodyRows = body.find('tr');
bodyCells = body.find('td');
bodyFirstCells = bodyCells.filter(':first-child');
bodyCellTopInners = bodyRows.eq(0).find('div.fc-day-content div');
markFirstLast(head.add(head.find('tr'))); // marks first+last tr/th's
markFirstLast(bodyRows); // marks first+last td's
bodyRows.eq(0).addClass('fc-first'); // fc-last is done in updateCells
dayBind(bodyCells);
daySegmentContainer =
$("<div style='position:absolute;z-index:8;top:0;left:0'/>")
.appendTo(element);
}
function updateCells(firstTime) {
var dowDirty = firstTime || rowCnt == 1; // could the cells' day-of-weeks need updating?
var month = t.start.getMonth(); var month = t.start.getMonth();
var today = clearTime(new Date()); var today = clearTime(new Date());
var cell; var s, i, j, d = cloneDate(t.visStart);
var date;
var row;
if (dowDirty) { if (!tbody) { // first time, build all cells from scratch
headCells.each(function(i, _cell) {
cell = $(_cell);
date = indexDate(i);
cell.html(formatDate(date, colFormat));
setDayID(cell, date);
});
}
bodyCells.each(function(i, _cell) { var table = $("<table/>").appendTo(element);
cell = $(_cell);
date = indexDate(i); s = "<thead><tr>";
if (date.getMonth() == month) { for (i=0; i<colCnt; i++) {
cell.removeClass('fc-other-month'); s += "<th class='fc-" +
}else{ dayIDs[d.getDay()] + ' ' + // needs to be first
cell.addClass('fc-other-month'); tm + '-state-default' +
(i==dit ? ' fc-leftmost' : '') +
"'>" + formatDate(d, colFormat) + "</th>";
addDays(d, 1);
if (nwe) {
skipWeekend(d);
} }
if (+date == +today) {
cell.addClass(tm + '-state-highlight fc-today');
}else{
cell.removeClass(tm + '-state-highlight fc-today');
} }
cell.find('div.fc-day-number').text(date.getDate()); thead = $(s + "</tr></thead>").appendTo(table);
trigger('dayRender', t, date, cell);
if (dowDirty) { s = "<tbody>";
setDayID(cell, date); d = cloneDate(t.visStart);
for (i=0; i<rowCnt; i++) {
s += "<tr class='fc-week" + i + "'>";
for (j=0; j<colCnt; j++) {
s += "<td class='fc-" +
dayIDs[d.getDay()] + ' ' + // needs to be first
tm + '-state-default fc-day' + (i*colCnt+j) +
(j==dit ? ' fc-leftmost' : '') +
(rowCnt>1 && d.getMonth() != month ? ' fc-other-month' : '') +
(+d == +today ?
' fc-today '+tm+'-state-highlight' :
' fc-not-today') + "'>" +
(showNumbers ? "<div class='fc-day-number'>" + d.getDate() + "</div>" : '') +
"<div class='fc-day-content'><div style='position:relative'>&nbsp;</div></div></td>";
addDays(d, 1);
if (nwe) {
skipWeekend(d);
}
}
s += "</tr>";
}
tbody = $(s + "</tbody>").appendTo(table);
dayBind(tbody.find('td'));
daySegmentContainer = $("<div style='position:absolute;z-index:8;top:0;left:0'/>").appendTo(element);
}else{ // NOT first time, reuse as many cells as possible
clearEvents();
var prevRowCnt = tbody.find('tr').length;
if (rowCnt < prevRowCnt) {
tbody.find('tr:gt(' + (rowCnt-1) + ')').remove(); // remove extra rows
}
else if (rowCnt > prevRowCnt) { // needs to create new rows...
s = '';
for (i=prevRowCnt; i<rowCnt; i++) {
s += "<tr class='fc-week" + i + "'>";
for (j=0; j<colCnt; j++) {
s += "<td class='fc-" +
dayIDs[d.getDay()] + ' ' + // needs to be first
tm + '-state-default fc-new fc-day' + (i*colCnt+j) +
(j==dit ? ' fc-leftmost' : '') + "'>" +
(showNumbers ? "<div class='fc-day-number'></div>" : '') +
"<div class='fc-day-content'><div style='position:relative'>&nbsp;</div></div>" +
"</td>";
addDays(d, 1);
if (nwe) {
skipWeekend(d);
}
}
s += "</tr>";
}
tbody.append(s);
}
dayBind(tbody.find('td.fc-new').removeClass('fc-new'));
// re-label and re-class existing cells
d = cloneDate(t.visStart);
tbody.find('td').each(function() {
var td = $(this);
if (rowCnt > 1) {
if (d.getMonth() == month) {
td.removeClass('fc-other-month');
}else{
td.addClass('fc-other-month');
}
}
if (+d == +today) {
td.removeClass('fc-not-today')
.addClass('fc-today')
.addClass(tm + '-state-highlight');
}else{
td.addClass('fc-not-today')
.removeClass('fc-today')
.removeClass(tm + '-state-highlight');
}
td.find('div.fc-day-number').text(d.getDate());
addDays(d, 1);
if (nwe) {
skipWeekend(d);
} }
}); });
bodyRows.each(function(i, _row) { if (rowCnt == 1) { // more changes likely (week or day view)
row = $(_row);
if (i < rowCnt) { // redo column header text and class
row.show(); d = cloneDate(t.visStart);
if (i == rowCnt-1) { thead.find('th').each(function(i, th) {
row.addClass('fc-last'); $(th).text(formatDate(d, colFormat));
}else{ th.className = th.className.replace(/^fc-\w+(?= )/, 'fc-' + dayIDs[d.getDay()]);
row.removeClass('fc-last'); addDays(d, 1);
} if (nwe) {
}else{ skipWeekend(d);
row.hide();
} }
}); });
// redo cell day-of-weeks
d = cloneDate(t.visStart);
tbody.find('td').each(function(i, td) {
td.className = td.className.replace(/^fc-\w+(?= )/, 'fc-' + dayIDs[d.getDay()]);
addDays(d, 1);
if (nwe) {
skipWeekend(d);
}
});
} }
}
}
function setHeight(height) { function setHeight(height) {
viewHeight = height; viewHeight = height;
var leftTDs = tbody.find('tr td:first-child'),
var bodyHeight = viewHeight - head.height(); tbodyHeight = viewHeight - thead.height(),
var rowHeight; rowHeight1, rowHeight2;
var rowHeightLast;
var cell;
if (opt('weekMode') == 'variable') { if (opt('weekMode') == 'variable') {
rowHeight = rowHeightLast = Math.floor(bodyHeight / (rowCnt==1 ? 2 : 6)); rowHeight1 = rowHeight2 = Math.floor(tbodyHeight / (rowCnt==1 ? 2 : 6));
}else{ }else{
rowHeight = Math.floor(bodyHeight / rowCnt); rowHeight1 = Math.floor(tbodyHeight / rowCnt);
rowHeightLast = bodyHeight - rowHeight * (rowCnt-1); rowHeight2 = tbodyHeight - rowHeight1*(rowCnt-1);
} }
if (tdHeightBug === undefined) {
bodyFirstCells.each(function(i, _cell) { // bug in firefox where cell height includes padding
if (i < rowCnt) { var tr = tbody.find('tr:first'),
cell = $(_cell); td = tr.find('td:first');
setMinHeight( td.height(rowHeight1);
cell.find('> div'), tdHeightBug = rowHeight1 != td.height();
(i==rowCnt-1 ? rowHeightLast : rowHeight) - vsides(cell) }
); if (tdHeightBug) {
leftTDs.slice(0, -1).height(rowHeight1);
leftTDs.slice(-1).height(rowHeight2);
}else{
setOuterHeight(leftTDs.slice(0, -1), rowHeight1);
setOuterHeight(leftTDs.slice(-1), rowHeight2);
} }
});
} }
@ -267,7 +258,7 @@ function BasicView(element, calendar, viewName) {
viewWidth = width; viewWidth = width;
colContentPositions.clear(); colContentPositions.clear();
colWidth = Math.floor(viewWidth / colCnt); colWidth = Math.floor(viewWidth / colCnt);
setOuterWidth(headCells.slice(0, -1), colWidth); setOuterWidth(thead.find('th').slice(0, -1), colWidth);
} }
@ -283,9 +274,13 @@ function BasicView(element, calendar, viewName) {
function dayClick(ev) { function dayClick(ev) {
if (!opt('selectable')) { // if selectable, SelectionManager will worry about dayClick if (!opt('selectable')) { // SelectionManager will worry about dayClick
var index = parseInt(this.className.match(/fc\-day(\d+)/)[1]); // TODO: maybe use .data var n = parseInt(this.className.match(/fc\-day(\d+)/)[1]),
var date = indexDate(index); date = addDays(
cloneDate(t.visStart),
Math.floor(n/colCnt) * 7 + n % colCnt
);
// TODO: what about weekends in middle of week?
trigger('dayClick', this, date, true, ev); trigger('dayClick', this, date, true, ev);
} }
} }
@ -350,13 +345,6 @@ function BasicView(element, calendar, viewName) {
} }
function reportDayClick(date, allDay, ev) {
var cell = dateCell(date);
var _element = bodyCells[cell.row*colCnt + cell.col];
trigger('dayClick', _element, date, allDay, ev);
}
/* External Dragging /* External Dragging
-----------------------------------------------------------------------*/ -----------------------------------------------------------------------*/
@ -394,7 +382,11 @@ function BasicView(element, calendar, viewName) {
coordinateGrid = new CoordinateGrid(function(rows, cols) { coordinateGrid = new CoordinateGrid(function(rows, cols) {
var e, n, p; var e, n, p;
headCells.each(function(i, _e) { var tds = tbody.find('tr:first td');
if (rtl) {
tds = $(tds.get().reverse());
}
tds.each(function(i, _e) {
e = $(_e); e = $(_e);
n = e.offset().left; n = e.offset().left;
if (i) { if (i) {
@ -404,8 +396,7 @@ function BasicView(element, calendar, viewName) {
cols[i] = p; cols[i] = p;
}); });
p[1] = n + e.outerWidth(); p[1] = n + e.outerWidth();
bodyRows.each(function(i, _e) { tbody.find('tr').each(function(i, _e) {
if (i < rowCnt) {
e = $(_e); e = $(_e);
n = e.offset().top; n = e.offset().top;
if (i) { if (i) {
@ -413,7 +404,6 @@ function BasicView(element, calendar, viewName) {
} }
p = [n]; p = [n];
rows[i] = p; rows[i] = p;
}
}); });
p[1] = n + e.outerHeight(); p[1] = n + e.outerHeight();
}); });
@ -423,7 +413,7 @@ function BasicView(element, calendar, viewName) {
colContentPositions = new HorizontalPositionCache(function(col) { colContentPositions = new HorizontalPositionCache(function(col) {
return bodyCellTopInners.eq(col); return tbody.find('td:eq(' + col + ') div div');
}); });
@ -437,41 +427,27 @@ function BasicView(element, calendar, viewName) {
} }
function dayOfWeekCol(dayOfWeek) {
return (dayOfWeek - Math.max(firstDay, nwe) + colCnt) % colCnt;
}
function dateCell(date) { function dateCell(date) {
return { return {
row: Math.floor(dayDiff(date, t.visStart) / 7), row: Math.floor(dayDiff(date, t.visStart) / 7),
col: dayOfWeekCol(date.getDay()) col: dayOfWeekCol(date.getDay())*dis + dit
}; };
} }
function cellDate(cell) { function cellDate(cell) {
return _cellDate(cell.row, cell.col); return addDays(cloneDate(t.visStart), cell.row*7 + cell.col*dis+dit);
// TODO: what about weekends in middle of week?
} }
function _cellDate(row, col) { function allDayTR(i) {
return addDays(cloneDate(t.visStart), row*7 + col*dis+dit); return tbody.find('tr:eq('+i+')');
// what about weekends in middle of week?
}
function indexDate(index) {
return _cellDate(Math.floor(index/colCnt), index%colCnt);
}
function dayOfWeekCol(dayOfWeek) {
return ((dayOfWeek - Math.max(firstDay, nwe) + colCnt) % colCnt) * dis + dit;
}
function allDayRow(i) {
return bodyRows.eq(i);
} }

View file

@ -39,7 +39,7 @@ function BasicWeekView(element, calendar) {
t.end = end; t.end = end;
t.visStart = visStart; t.visStart = visStart;
t.visEnd = visEnd; t.visEnd = visEnd;
renderBasic(1, 1, weekends ? 7 : 5, false); renderBasic(1, weekends ? 7 : 5, false);
} }

View file

@ -1,46 +0,0 @@
fcViews.fourWeeks = FourWeeksView;
function FourWeeksView(element, calendar) {
var t = this;
// exports
t.render = render;
// imports
BasicView.call(t, element, calendar, 'fourWeeks');
var opt = t.opt;
var renderBasic = t.renderBasic;
var formatDates = calendar.formatDates;
function render(date, delta) {
if (delta) {
addDays(date, delta * 7);
}
var start = addDays(cloneDate(date), -((date.getDay() - opt('firstDay') + 7) % 7));
var end = addDays(cloneDate(start), 7*4);
var visStart = cloneDate(start);
var visEnd = cloneDate(end);
var weekends = opt('weekends');
if (!weekends) {
skipWeekend(visStart);
skipWeekend(visEnd, -1, true);
}
t.title = formatDates(
visStart,
addDays(cloneDate(visEnd), -1),
opt('titleFormat')
);
t.start = start;
t.end = end;
t.visStart = visStart;
t.visEnd = visEnd;
renderBasic(4, 4, weekends ? 7 : 5, true);
}
}

View file

@ -45,7 +45,7 @@ function MonthView(element, calendar) {
t.end = end; t.end = end;
t.visStart = visStart; t.visStart = visStart;
t.visEnd = visEnd; t.visEnd = visEnd;
renderBasic(6, rowCnt, nwe ? 5 : 7, true); renderBasic(rowCnt, nwe ? 5 : 7, true);
} }

View file

@ -2,10 +2,24 @@
/* Month View, Basic Week View, Basic Day View /* Month View, Basic Week View, Basic Day View
------------------------------------------------------------------------*/ ------------------------------------------------------------------------*/
.fc-grid th { .fc-grid table {
width: 100%;
}
.fc .fc-grid th {
border-width: 0 0 0 1px;
text-align: center; text-align: center;
} }
.fc .fc-grid td {
border-width: 1px 0 0 1px;
}
.fc-grid th.fc-leftmost,
.fc-grid td.fc-leftmost {
border-left: 0;
}
.fc-grid .fc-day-number { .fc-grid .fc-day-number {
float: right; float: right;
padding: 0 2px; padding: 0 2px;
@ -21,7 +35,7 @@
.fc-grid .fc-day-content { .fc-grid .fc-day-content {
clear: both; clear: both;
padding: 2px 2px 1px; /* distance between events and day edges */ padding: 2px 2px 0; /* distance between events and day edges */
} }
/* event styles */ /* event styles */
@ -32,6 +46,10 @@
/* right-to-left */ /* right-to-left */
.fc-rtl .fc-grid {
direction: rtl;
}
.fc-rtl .fc-grid .fc-day-number { .fc-rtl .fc-grid .fc-day-number {
float: left; float: left;
} }
@ -40,4 +58,3 @@
float: right; float: right;
} }

View file

@ -5,14 +5,12 @@ function CoordinateGrid(buildFunc) {
var rows; var rows;
var cols; var cols;
t.build = function() { t.build = function() {
rows = []; rows = [];
cols = []; cols = [];
buildFunc(rows, cols); buildFunc(rows, cols);
}; };
t.cell = function(x, y) { t.cell = function(x, y) {
var rowCnt = rows.length; var rowCnt = rows.length;
var colCnt = cols.length; var colCnt = cols.length;
@ -32,7 +30,6 @@ function CoordinateGrid(buildFunc) {
return (r>=0 && c>=0) ? { row:r, col:c } : null; return (r>=0 && c>=0) ? { row:r, col:c } : null;
}; };
t.rect = function(row0, col0, row1, col1, originElement) { // row1,col1 is inclusive t.rect = function(row0, col0, row1, col1, originElement) { // row1,col1 is inclusive
var origin = originElement.offset(); var origin = originElement.offset();
return { return {

View file

@ -11,8 +11,6 @@ function DayEventRenderer() {
// imports // imports
var opt = t.opt; var opt = t.opt;
var trigger = t.trigger; var trigger = t.trigger;
var isEventDraggable = t.isEventDraggable;
var isEventResizable = t.isEventResizable;
var eventEnd = t.eventEnd; var eventEnd = t.eventEnd;
var reportEventElement = t.reportEventElement; var reportEventElement = t.reportEventElement;
var showEvents = t.showEvents; var showEvents = t.showEvents;
@ -21,7 +19,7 @@ function DayEventRenderer() {
var getRowCnt = t.getRowCnt; var getRowCnt = t.getRowCnt;
var getColCnt = t.getColCnt; var getColCnt = t.getColCnt;
var getColWidth = t.getColWidth; var getColWidth = t.getColWidth;
var allDayRow = t.allDayRow; var allDayTR = t.allDayTR;
var allDayBounds = t.allDayBounds; var allDayBounds = t.allDayBounds;
var colContentLeft = t.colContentLeft; var colContentLeft = t.colContentLeft;
var colContentRight = t.colContentRight; var colContentRight = t.colContentRight;
@ -121,88 +119,61 @@ function DayEventRenderer() {
var segCnt=segs.length; var segCnt=segs.length;
var seg; var seg;
var event; var event;
var url; var className;
var classes;
var bounds = allDayBounds(); var bounds = allDayBounds();
var minLeft = bounds.left; var minLeft = bounds.left;
var maxLeft = bounds.right; var maxLeft = bounds.right;
var leftCol; var cols = []; // don't really like this system (but have to do this b/c RTL works differently in basic vs agenda)
var rightCol;
var left; var left;
var right; var right;
var skinCss;
var html = ''; var html = '';
// calculate desired position/dimensions, create html // calculate desired position/dimensions, create html
for (i=0; i<segCnt; i++) { for (i=0; i<segCnt; i++) {
seg = segs[i]; seg = segs[i];
event = seg.event; event = seg.event;
classes = ['fc-event', 'fc-event-skin', 'fc-event-hori']; className = 'fc-event fc-event-hori ';
if (isEventDraggable(event)) {
classes.push('fc-event-draggable');
}
if (rtl) { if (rtl) {
if (seg.isStart) { if (seg.isStart) {
classes.push('fc-corner-right'); className += 'fc-corner-right ';
} }
if (seg.isEnd) { if (seg.isEnd) {
classes.push('fc-corner-left'); className += 'fc-corner-left ';
} }
leftCol = dayOfWeekCol(seg.end.getDay()-1); cols[0] = dayOfWeekCol(seg.end.getDay()-1);
rightCol = dayOfWeekCol(seg.start.getDay()); cols[1] = dayOfWeekCol(seg.start.getDay());
left = seg.isEnd ? colContentLeft(leftCol) : minLeft; left = seg.isEnd ? colContentLeft(cols[0]) : minLeft;
right = seg.isStart ? colContentRight(rightCol) : maxLeft; right = seg.isStart ? colContentRight(cols[1]) : maxLeft;
}else{ }else{
if (seg.isStart) { if (seg.isStart) {
classes.push('fc-corner-left'); className += 'fc-corner-left ';
} }
if (seg.isEnd) { if (seg.isEnd) {
classes.push('fc-corner-right'); className += 'fc-corner-right ';
} }
leftCol = dayOfWeekCol(seg.start.getDay()); cols[0] = dayOfWeekCol(seg.start.getDay());
rightCol = dayOfWeekCol(seg.end.getDay()-1); cols[1] = dayOfWeekCol(seg.end.getDay()-1);
left = seg.isStart ? colContentLeft(leftCol) : minLeft; left = seg.isStart ? colContentLeft(cols[0]) : minLeft;
right = seg.isEnd ? colContentRight(rightCol) : maxLeft; right = seg.isEnd ? colContentRight(cols[1]) : maxLeft;
}
classes = classes.concat(event.className);
if (event.source) {
classes = classes.concat(event.source.className || []);
}
url = event.url;
skinCss = getSkinCss(event, opt);
if (url) {
html += "<a href='" + htmlEscape(url) + "'";
}else{
html += "<div";
} }
html += html +=
" class='" + classes.join(' ') + "'" + "<div class='" + className + event.className.join(' ') + "' style='position:absolute;z-index:8;left:"+left+"px'>" +
" style='position:absolute;z-index:8;left:"+left+"px;" + skinCss + "'" + "<a" + (event.url ? " href='" + htmlEscape(event.url) + "'" : '') + ">" +
">" + (!event.allDay && seg.isStart ?
"<div" +
" class='fc-event-inner fc-event-skin'" +
(skinCss ? " style='" + skinCss + "'" : '') +
">";
if (!event.allDay && seg.isStart) {
html +=
"<span class='fc-event-time'>" + "<span class='fc-event-time'>" +
htmlEscape(formatDates(event.start, event.end, opt('timeFormat'))) + htmlEscape(formatDates(event.start, event.end, opt('timeFormat'))) +
"</span>"; "</span>"
} :'') +
html +=
"<span class='fc-event-title'>" + htmlEscape(event.title) + "</span>" + "<span class='fc-event-title'>" + htmlEscape(event.title) + "</span>" +
"</a>" +
(seg.isEnd && (event.editable || event.editable === undefined && opt('editable')) && !opt('disableResizing') ?
"<div class='ui-resizable-handle ui-resizable-" + (rtl ? 'w' : 'e') + "'></div>"
: '') +
"</div>"; "</div>";
if (seg.isEnd && isEventResizable(event)) {
html +=
"<div class='ui-resizable-handle ui-resizable-" + (rtl ? 'w' : 'e') + "'>" +
"&nbsp;&nbsp;&nbsp;" + // makes hit area a lot better for IE6/7
"</div>";
}
html +=
"</" + (url ? "a" : "div" ) + ">";
seg.left = left; seg.left = left;
seg.outerWidth = right - left; seg.outerWidth = right - left;
seg.startCol = leftCol; cols.sort(cmp);
seg.endCol = rightCol + 1; // needs to be exclusive seg.startCol = cols[0];
seg.endCol = cols[1] + 1;
} }
return html; return html;
} }
@ -291,7 +262,7 @@ function DayEventRenderer() {
key = seg.key = cssKey(element[0]); key = seg.key = cssKey(element[0]);
val = hsideCache[key]; val = hsideCache[key];
if (val === undefined) { if (val === undefined) {
val = hsideCache[key] = hsides(element, true); val = hsideCache[key] = hsides(element[0], true);
} }
seg.hsides = val; seg.hsides = val;
} }
@ -329,7 +300,7 @@ function DayEventRenderer() {
key = seg.key; // created in daySegCalcHSides key = seg.key; // created in daySegCalcHSides
val = vmarginCache[key]; val = vmarginCache[key];
if (val === undefined) { if (val === undefined) {
val = vmarginCache[key] = vmargins(element); val = vmarginCache[key] = vmargins(element[0]);
} }
seg.outerHeight = element[0].offsetHeight + val; seg.outerHeight = element[0].offsetHeight + val;
} }
@ -342,7 +313,7 @@ function DayEventRenderer() {
var rowCnt = getRowCnt(); var rowCnt = getRowCnt();
var rowDivs = []; var rowDivs = [];
for (i=0; i<rowCnt; i++) { for (i=0; i<rowCnt; i++) {
rowDivs[i] = allDayRow(i) rowDivs[i] = allDayTR(i)
.find('td:first div.fc-day-content > div'); // optimal selector? .find('td:first div.fc-day-content > div'); // optimal selector?
} }
return rowDivs; return rowDivs;
@ -354,7 +325,7 @@ function DayEventRenderer() {
var rowCnt = rowDivs.length; var rowCnt = rowDivs.length;
var tops = []; var tops = [];
for (i=0; i<rowCnt; i++) { for (i=0; i<rowCnt; i++) {
tops[i] = rowDivs[i][0].offsetTop; // !!?? but this means the element needs position:relative if in a table cell!!!! tops[i] = rowDivs[i][0].offsetTop;
} }
return tops; return tops;
} }
@ -384,35 +355,19 @@ function DayEventRenderer() {
function resizableDayEvent(event, element, seg) { function resizableDayEvent(event, element, seg) {
if (!opt('disableResizing') && seg.isEnd) {
var rtl = opt('isRTL'); var rtl = opt('isRTL');
var direction = rtl ? 'w' : 'e'; var direction = rtl ? 'w' : 'e';
var handle = element.find('div.ui-resizable-' + direction); var handle = element.find('div.ui-resizable-' + direction);
var isResizing = false;
// TODO: look into using jquery-ui mouse widget for this stuff
disableTextSelection(element); // prevent native <a> selection for IE
element
.mousedown(function(ev) { // prevent native <a> selection for others
ev.preventDefault();
})
.click(function(ev) {
if (isResizing) {
ev.preventDefault(); // prevent link from being visited (only method that worked in IE6)
ev.stopImmediatePropagation(); // prevent fullcalendar eventClick handler from being called
// (eventElementHandlers needs to be bound after resizableDayEvent)
}
});
handle.mousedown(function(ev) { handle.mousedown(function(ev) {
if (ev.which != 1) { if (ev.which != 1) {
return; // needs to be left mouse button return; // needs to be left mouse button
} }
isResizing = true;
var hoverListener = t.getHoverListener(); var hoverListener = t.getHoverListener();
var rowCnt = getRowCnt(); var rowCnt = getRowCnt();
var colCnt = getColCnt(); var colCnt = getColCnt();
var dis = rtl ? -1 : 1; var dis = rtl ? -1 : 1;
var dit = rtl ? colCnt-1 : 0; var dit = rtl ? colCnt : 0;
var elementTop = element.css('top'); var elementTop = element.css('top');
var dayDelta; var dayDelta;
var helpers; var helpers;
@ -459,10 +414,9 @@ function DayEventRenderer() {
renderDayOverlay(event.start, addDays(cloneDate(newEnd), 1)); // coordinate grid already rebuild at hoverListener.start renderDayOverlay(event.start, addDays(cloneDate(newEnd), 1)); // coordinate grid already rebuild at hoverListener.start
} }
}, ev); }, ev);
function mouseup(ev) { function mouseup(ev) {
trigger('eventResizeStop', this, event, ev); trigger('eventResizeStop', this, event, ev);
$('body').css('cursor', ''); $('body').css('cursor', 'auto');
hoverListener.stop(); hoverListener.stop();
clearOverlays(); clearOverlays();
if (dayDelta) { if (dayDelta) {
@ -470,14 +424,10 @@ function DayEventRenderer() {
// event redraw will clear helpers // event redraw will clear helpers
} }
// otherwise, the drag handler already restored the old events // otherwise, the drag handler already restored the old events
setTimeout(function() { // make this happen after the element's click event
isResizing = false;
},0);
} }
}); });
} }
}
} }

View file

@ -20,7 +20,6 @@ function HoverListener(coordinateGrid) {
function mouse(ev) { function mouse(ev) {
_fixUIEvent(ev);
var newCell = coordinateGrid.cell(ev.pageX, ev.pageY); var newCell = coordinateGrid.cell(ev.pageX, ev.pageY);
if (!newCell != !cell || newCell && (newCell.row != cell.row || newCell.col != cell.col)) { if (!newCell != !cell || newCell && (newCell.row != cell.row || newCell.col != cell.col)) {
if (newCell) { if (newCell) {
@ -43,11 +42,3 @@ function HoverListener(coordinateGrid) {
} }
function _fixUIEvent(event) { // jQuery 1.7 workaround (for issue 1168)
if (event.pageX === undefined) {
event.pageX = event.originalEvent.pageX;
event.pageY = event.originalEvent.pageY;
}
}

View file

@ -68,7 +68,6 @@ function SelectionManager() {
var cellDate = t.cellDate; var cellDate = t.cellDate;
var cellIsAllDay = t.cellIsAllDay; var cellIsAllDay = t.cellIsAllDay;
var hoverListener = t.getHoverListener(); var hoverListener = t.getHoverListener();
var reportDayClick = t.reportDayClick; // this is hacky and sort of weird
if (ev.which == 1 && opt('selectable')) { // which==1 means left mouse button if (ev.which == 1 && opt('selectable')) { // which==1 means left mouse button
unselect(ev); unselect(ev);
var _mousedownElement = this; var _mousedownElement = this;
@ -86,7 +85,8 @@ function SelectionManager() {
hoverListener.stop(); hoverListener.stop();
if (dates) { if (dates) {
if (+dates[0] == +dates[1]) { if (+dates[0] == +dates[1]) {
reportDayClick(dates[0], true, ev); trigger('dayClick', _mousedownElement, dates[0], true, ev);
// BUG: _mousedownElement will sometimes be the overlay
} }
reportSelection(dates[0], dates[1], true, ev); reportSelection(dates[0], dates[1], true, ev);
} }

View file

@ -10,9 +10,6 @@ function View(element, calendar, viewName) {
t.name = viewName; t.name = viewName;
t.opt = opt; t.opt = opt;
t.trigger = trigger; t.trigger = trigger;
//t.setOverflowHidden = setOverflowHidden;
t.isEventDraggable = isEventDraggable;
t.isEventResizable = isEventResizable;
t.reportEvents = reportEvents; t.reportEvents = reportEvents;
t.eventEnd = eventEnd; t.eventEnd = eventEnd;
t.reportEventElement = reportEventElement; t.reportEventElement = reportEventElement;
@ -58,28 +55,6 @@ function View(element, calendar, viewName) {
} }
/*
function setOverflowHidden(bool) {
element.css('overflow', bool ? 'hidden' : '');
}
*/
function isEventDraggable(event) {
return isEventEditable(event) && !opt('disableDragging');
}
function isEventResizable(event) { // but also need to make sure the seg.isEnd == true
return isEventEditable(event) && !opt('disableResizing');
}
function isEventEditable(event) {
return firstDefined(event.editable, (event.source || {}).editable, opt('editable'));
}
/* Event Data /* Event Data
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
@ -106,18 +81,6 @@ function View(element, calendar, viewName) {
} }
// returns all events with a matching propery value
function eventsByProp(property, value)
{
var id, i, len, events = [];
for(id in eventsByID)
for(i=0, len=eventsByID[id].length; i<len; i++)
if (eventsByID[id][i][property] == value)
events.push(eventsByID[id][i]);
return events;
}
/* Event Elements /* Event Elements
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
@ -189,15 +152,9 @@ function View(element, calendar, viewName) {
function eventDrop(e, event, dayDelta, minuteDelta, allDay, ev, ui) { function eventDrop(e, event, dayDelta, minuteDelta, allDay, ev, ui) {
var events;
var oldAllDay = event.allDay; var oldAllDay = event.allDay;
var eventId = event._id; var eventId = event._id;
var prop = opt('eventGroupProperty') || 'id'; moveEvents(eventsByID[eventId], dayDelta, minuteDelta, allDay);
if (prop != 'id')
events = eventsByProp(prop, event[prop]);
else
events = eventsByID[eventId];
moveEvents(events, dayDelta, minuteDelta, allDay);
trigger( trigger(
'eventDrop', 'eventDrop',
e, e,
@ -207,7 +164,7 @@ function View(element, calendar, viewName) {
allDay, allDay,
function() { function() {
// TODO: investigate cases where this inverse technique might not work // TODO: investigate cases where this inverse technique might not work
moveEvents(events, -dayDelta, -minuteDelta, oldAllDay); moveEvents(eventsByID[eventId], -dayDelta, -minuteDelta, oldAllDay);
reportEventChange(eventId); reportEventChange(eventId);
}, },
ev, ev,
@ -218,14 +175,8 @@ function View(element, calendar, viewName) {
function eventResize(e, event, dayDelta, minuteDelta, ev, ui) { function eventResize(e, event, dayDelta, minuteDelta, ev, ui) {
var events;
var eventId = event._id; var eventId = event._id;
var prop = opt('eventGroupProperty') || 'id'; elongateEvents(eventsByID[eventId], dayDelta, minuteDelta);
if (prop != 'id')
events = eventsByProp(prop, event[prop]);
else
events = eventsByID[eventId];
elongateEvents(events, dayDelta, minuteDelta);
trigger( trigger(
'eventResize', 'eventResize',
e, e,
@ -234,7 +185,7 @@ function View(element, calendar, viewName) {
minuteDelta, minuteDelta,
function() { function() {
// TODO: investigate cases where this inverse technique might not work // TODO: investigate cases where this inverse technique might not work
elongateEvents(events, -dayDelta, -minuteDelta); elongateEvents(eventsByID[eventId], -dayDelta, -minuteDelta);
reportEventChange(eventId); reportEventChange(eventId);
}, },
ev, ev,
@ -259,8 +210,6 @@ function View(element, calendar, viewName) {
addMinutes(addDays(e.start, dayDelta, true), minuteDelta); addMinutes(addDays(e.start, dayDelta, true), minuteDelta);
if (e.end) { if (e.end) {
e.end = addMinutes(addDays(e.end, dayDelta, true), minuteDelta); e.end = addMinutes(addDays(e.end, dayDelta, true), minuteDelta);
} else {
e.end = defaultEventEnd(e);
} }
normalizeEvent(e, options); normalizeEvent(e, options);
} }

View file

@ -1,176 +1,42 @@
/* Cell Styles
------------------------------------------------------------------------*/
.fc-widget-header, /* <th>, usually */
.fc-widget-content { /* <td>, usually */
border: 1px solid #ccc;
}
.fc-state-highlight { /* <td> today cell */ /* TODO: add .fc-today to <th> */
background: #ffc;
}
.fc-cell-overlay { /* semi-transparent rectangle while dragging */
background: #9cf;
opacity: .2;
filter: alpha(opacity=20); /* for IE */
}
/* Buttons
------------------------------------------------------------------------*/
.fc-button {
position: relative;
display: inline-block;
cursor: pointer;
}
.fc-state-default { /* non-theme */
border-style: solid;
border-width: 1px 0;
}
.fc-button-inner {
position: relative;
float: left;
overflow: hidden;
}
.fc-state-default .fc-button-inner { /* non-theme */
border-style: solid;
border-width: 0 1px;
}
.fc-button-content {
position: relative;
float: left;
height: 1.9em;
line-height: 1.9em;
padding: 0 .6em;
white-space: nowrap;
}
/* icon (for jquery ui) */
.fc-button-content .fc-icon-wrap {
position: relative;
float: left;
top: 50%;
}
.fc-button-content .ui-icon {
position: relative;
float: left;
margin-top: -50%;
*margin-top: 0;
*top: -50%;
}
/* gloss effect */
.fc-state-default .fc-button-effect {
position: absolute;
top: 50%;
left: 0;
}
.fc-state-default .fc-button-effect span {
position: absolute;
top: -100px;
left: 0;
width: 500px;
height: 100px;
border-width: 100px 0 0 1px;
border-style: solid;
border-color: #fff;
background: #444;
opacity: .09;
filter: alpha(opacity=9);
}
/* button states (determines colors) */
.fc-state-default,
.fc-state-default .fc-button-inner {
border-style: solid;
border-color: #ccc #bbb #aaa;
background: #F3F3F3;
color: #000;
}
.fc-state-hover,
.fc-state-hover .fc-button-inner {
border-color: #999;
}
.fc-state-down,
.fc-state-down .fc-button-inner {
border-color: #555;
background: #777;
}
.fc-state-active,
.fc-state-active .fc-button-inner {
border-color: #555;
background: #777;
color: #fff;
}
.fc-state-disabled,
.fc-state-disabled .fc-button-inner {
color: #999;
border-color: #ddd;
}
.fc-state-disabled {
cursor: default;
}
.fc-state-disabled .fc-button-effect {
display: none;
}
/* Global Event Styles /* Global Event Styles
------------------------------------------------------------------------*/ ------------------------------------------------------------------------*/
.fc-event { .fc-event,
.fc-agenda .fc-event-time,
.fc-event a {
border-style: solid; border-style: solid;
border-width: 0; border-color: #36c; /* default BORDER color (probably the same as background-color) */
font-size: .85em;
cursor: default;
}
a.fc-event,
.fc-event-draggable {
cursor: pointer;
}
a.fc-event {
text-decoration: none;
}
.fc-rtl .fc-event {
text-align: right;
}
.fc-event-skin {
border-color: #36c; /* default BORDER color */
background-color: #36c; /* default BACKGROUND color */ background-color: #36c; /* default BACKGROUND color */
color: #fff; /* default TEXT color */ color: #fff; /* default TEXT color */
} }
.fc-event-inner { /* Use the 'className' CalEvent property and the following
position: relative; * example CSS to change event color on a per-event basis:
width: 100%; *
height: 100%; * .myclass,
border-style: solid; * .fc-agenda .myclass .fc-event-time,
border-width: 0; * .myclass a {
* background-color: black;
* border-color: black;
* color: red;
* }
*/
.fc-event {
text-align: left;
}
.fc-event a {
overflow: hidden; overflow: hidden;
font-size: .85em;
text-decoration: none;
cursor: pointer;
}
.fc-event-editable {
cursor: pointer;
} }
.fc-event-time, .fc-event-time,
@ -178,13 +44,29 @@ a.fc-event {
padding: 0 1px; padding: 0 1px;
} }
.fc .ui-resizable-handle { /*** TODO: don't use ui-resizable anymore, change class ***/ /* for fake rounded corners */
.fc-event a {
display: block;
position: relative;
width: 100%;
height: 100%;
}
/* right-to-left */
.fc-rtl .fc-event a {
text-align: right;
}
/* resizable */
.fc .ui-resizable-handle { /*** TODO: don't use ui-resizable anoymore, change class ***/
display: block; display: block;
position: absolute; position: absolute;
z-index: 99999; z-index: 99999;
overflow: hidden; /* hacky spaces (IE6/7) */ border: 0 !important; /* important overrides pre jquery ui 1.7 styles */
font-size: 300%; /* */ background: url(data:image/gif;base64,AAAA) !important; /* hover fix for IE */
line-height: 50%; /* */
} }
@ -197,6 +79,30 @@ a.fc-event {
margin-bottom: 1px; margin-bottom: 1px;
} }
.fc-event-hori a {
border-width: 0;
}
/* for fake rounded corners */
.fc-content .fc-corner-left {
margin-left: 1px;
}
.fc-content .fc-corner-left a {
margin-left: -1px;
border-left-width: 1px;
}
.fc-content .fc-corner-right {
margin-right: 1px;
}
.fc-content .fc-corner-right a {
margin-right: -1px;
border-right-width: 1px;
}
/* resizable */ /* resizable */
.fc-event-hori .ui-resizable-e { .fc-event-hori .ui-resizable-e {
@ -221,91 +127,3 @@ a.fc-event {
/* Fake Rounded Corners (for buttons and events)
------------------------------------------------------------*/
.fc-corner-left {
margin-left: 1px;
}
.fc-corner-left .fc-button-inner,
.fc-corner-left .fc-event-inner {
margin-left: -1px;
}
.fc-corner-right {
margin-right: 1px;
}
.fc-corner-right .fc-button-inner,
.fc-corner-right .fc-event-inner {
margin-right: -1px;
}
.fc-corner-top {
margin-top: 1px;
}
.fc-corner-top .fc-event-inner {
margin-top: -1px;
}
.fc-corner-bottom {
margin-bottom: 1px;
}
.fc-corner-bottom .fc-event-inner {
margin-bottom: -1px;
}
/* Fake Rounded Corners SPECIFICALLY FOR EVENTS
-----------------------------------------------------------------*/
.fc-corner-left .fc-event-inner {
border-left-width: 1px;
}
.fc-corner-right .fc-event-inner {
border-right-width: 1px;
}
.fc-corner-top .fc-event-inner {
border-top-width: 1px;
}
.fc-corner-bottom .fc-event-inner {
border-bottom-width: 1px;
}
/* Reusable Separate-border Table
------------------------------------------------------------*/
table.fc-border-separate {
border-collapse: separate;
}
.fc-border-separate th,
.fc-border-separate td {
border-width: 1px 0 0 1px;
}
.fc-border-separate th.fc-last,
.fc-border-separate td.fc-last {
border-right-width: 1px;
}
.fc-border-separate tr.fc-last th,
.fc-border-separate tr.fc-last td {
border-bottom-width: 1px;
}
.fc-border-separate tbody tr.fc-first td,
.fc-border-separate tbody tr.fc-first th {
border-top-width: 0;
}

View file

@ -146,8 +146,8 @@ function parseDate(s, ignoreTimezone) { // ignoreTimezone defaults to true
return new Date(s * 1000); return new Date(s * 1000);
} }
if (typeof s == 'string') { if (typeof s == 'string') {
if (s.match(/^\d+(\.\d+)?$/)) { // a UNIX timestamp if (s.match(/^\d+$/)) { // a UNIX timestamp
return new Date(parseFloat(s) * 1000); return new Date(parseInt(s, 10) * 1000);
} }
if (ignoreTimezone === undefined) { if (ignoreTimezone === undefined) {
ignoreTimezone = true; ignoreTimezone = true;
@ -162,12 +162,12 @@ function parseDate(s, ignoreTimezone) { // ignoreTimezone defaults to true
function parseISO8601(s, ignoreTimezone) { // ignoreTimezone defaults to false function parseISO8601(s, ignoreTimezone) { // ignoreTimezone defaults to false
// derived from http://delete.me.uk/2005/03/iso8601.html // derived from http://delete.me.uk/2005/03/iso8601.html
// TODO: for a know glitch/feature, read tests/issue_206_parseDate_dst.html // TODO: for a know glitch/feature, read tests/issue_206_parseDate_dst.html
var m = s.match(/^([0-9]{4})(-([0-9]{2})(-([0-9]{2})([T ]([0-9]{2}):([0-9]{2})(:([0-9]{2})(\.([0-9]+))?)?(Z|(([-+])([0-9]{2})(:?([0-9]{2}))?))?)?)?)?$/); var m = s.match(/^([0-9]{4})(-([0-9]{2})(-([0-9]{2})([T ]([0-9]{2}):([0-9]{2})(:([0-9]{2})(\.([0-9]+))?)?(Z|(([-+])([0-9]{2}):([0-9]{2})))?)?)?)?$/);
if (!m) { if (!m) {
return null; return null;
} }
var date = new Date(m[1], 0, 1); var date = new Date(m[1], 0, 1);
if (ignoreTimezone || !m[13]) { if (ignoreTimezone || !m[14]) {
var check = new Date(m[1], 0, 1, 9, 0); var check = new Date(m[1], 0, 1, 9, 0);
if (m[3]) { if (m[3]) {
date.setMonth(m[3] - 1); date.setMonth(m[3] - 1);
@ -203,12 +203,10 @@ function parseISO8601(s, ignoreTimezone) { // ignoreTimezone defaults to false
m[10] || 0, m[10] || 0,
m[12] ? Number("0." + m[12]) * 1000 : 0 m[12] ? Number("0." + m[12]) * 1000 : 0
); );
if (m[14]) { var offset = Number(m[16]) * 60 + Number(m[17]);
var offset = Number(m[16]) * 60 + (m[18] ? Number(m[18]) : 0);
offset *= m[15] == '-' ? 1 : -1; offset *= m[15] == '-' ? 1 : -1;
date = new Date(+date + (offset * 60 * 1000)); date = new Date(+date + (offset * 60 * 1000));
} }
}
return date; return date;
} }

View file

@ -1,61 +0,0 @@
/*
* FullCalendar v@VERSION Print Stylesheet
*
* Include this stylesheet on your page to get a more printer-friendly calendar.
* When including this stylesheet, use the media='print' attribute of the <link> tag.
* Make sure to include this stylesheet IN ADDITION to the regular fullcalendar.css.
*
* Copyright (c) 2011 Adam Shaw
* Dual licensed under the MIT and GPL licenses, located in
* MIT-LICENSE.txt and GPL-LICENSE.txt respectively.
*
* Date: @DATE
*
*/
/* Events
-----------------------------------------------------*/
.fc-event-skin {
background: none !important;
color: #000 !important;
}
/* horizontal events */
.fc-event-hori {
border-width: 0 0 1px 0 !important;
border-bottom-style: dotted !important;
border-bottom-color: #000 !important;
padding: 1px 0 0 0 !important;
}
.fc-event-hori .fc-event-inner {
border-width: 0 !important;
padding: 0 1px !important;
}
/* vertical events */
.fc-event-vert {
border-width: 0 0 0 1px !important;
border-left-style: dotted !important;
border-left-color: #000 !important;
padding: 0 1px 0 0 !important;
}
.fc-event-vert .fc-event-inner {
border-width: 0 !important;
padding: 1px 0 !important;
}
.fc-event-bg {
display: none !important;
}
.fc-event .ui-resizable-handle {
display: none !important;
}

View file

@ -1,6 +1,4 @@
fc.applyAll = applyAll;
/* Event Date Math /* Event Date Math
-----------------------------------------------------------------------------*/ -----------------------------------------------------------------------------*/
@ -140,79 +138,83 @@ function lazySegBind(container, segs, bindHandlers) {
function setOuterWidth(element, width, includeMargins) { function setOuterWidth(element, width, includeMargins) {
for (var i=0, e; i<element.length; i++) { element.each(function(i, _element) {
e = $(element[i]); _element.style.width = Math.max(0, width - hsides(_element, includeMargins)) + 'px';
e.width(Math.max(0, width - hsides(e, includeMargins))); });
}
} }
function setOuterHeight(element, height, includeMargins) { function setOuterHeight(element, height, includeMargins) {
for (var i=0, e; i<element.length; i++) {
e = $(element[i]);
e.height(Math.max(0, height - vsides(e, includeMargins)));
}
}
// TODO: curCSS has been deprecated (jQuery 1.4.3 - 10/16/2010)
function hsides(element, includeMargins) {
return hpadding(element) + hborders(element) + (includeMargins ? hmargins(element) : 0);
}
function hpadding(element) {
return (parseFloat($.curCSS(element[0], 'paddingLeft', true)) || 0) +
(parseFloat($.curCSS(element[0], 'paddingRight', true)) || 0);
}
function hmargins(element) {
return (parseFloat($.curCSS(element[0], 'marginLeft', true)) || 0) +
(parseFloat($.curCSS(element[0], 'marginRight', true)) || 0);
}
function hborders(element) {
return (parseFloat($.curCSS(element[0], 'borderLeftWidth', true)) || 0) +
(parseFloat($.curCSS(element[0], 'borderRightWidth', true)) || 0);
}
function vsides(element, includeMargins) {
return vpadding(element) + vborders(element) + (includeMargins ? vmargins(element) : 0);
}
function vpadding(element) {
return (parseFloat($.curCSS(element[0], 'paddingTop', true)) || 0) +
(parseFloat($.curCSS(element[0], 'paddingBottom', true)) || 0);
}
function vmargins(element) {
return (parseFloat($.curCSS(element[0], 'marginTop', true)) || 0) +
(parseFloat($.curCSS(element[0], 'marginBottom', true)) || 0);
}
function vborders(element) {
return (parseFloat($.curCSS(element[0], 'borderTopWidth', true)) || 0) +
(parseFloat($.curCSS(element[0], 'borderBottomWidth', true)) || 0);
}
function setMinHeight(element, height) {
height = (typeof height == 'number' ? height + 'px' : height);
element.each(function(i, _element) { element.each(function(i, _element) {
_element.style.cssText += ';min-height:' + height + ';_height:' + height; _element.style.height = Math.max(0, height - vsides(_element, includeMargins)) + 'px';
// why can't we just use .css() ? i forget
}); });
} }
// TODO: curCSS has been deprecated
function hsides(_element, includeMargins) {
return (parseFloat($.curCSS(_element, 'paddingLeft', true)) || 0) +
(parseFloat($.curCSS(_element, 'paddingRight', true)) || 0) +
(parseFloat($.curCSS(_element, 'borderLeftWidth', true)) || 0) +
(parseFloat($.curCSS(_element, 'borderRightWidth', true)) || 0) +
(includeMargins ? hmargins(_element) : 0);
}
function hmargins(_element) {
return (parseFloat($.curCSS(_element, 'marginLeft', true)) || 0) +
(parseFloat($.curCSS(_element, 'marginRight', true)) || 0);
}
function vsides(_element, includeMargins) {
return (parseFloat($.curCSS(_element, 'paddingTop', true)) || 0) +
(parseFloat($.curCSS(_element, 'paddingBottom', true)) || 0) +
(parseFloat($.curCSS(_element, 'borderTopWidth', true)) || 0) +
(parseFloat($.curCSS(_element, 'borderBottomWidth', true)) || 0) +
(includeMargins ? vmargins(_element) : 0);
}
function vmargins(_element) {
return (parseFloat($.curCSS(_element, 'marginTop', true)) || 0) +
(parseFloat($.curCSS(_element, 'marginBottom', true)) || 0);
}
function setMinHeight(element, h) {
h = typeof h == 'number' ? h + 'px' : h;
element[0].style.cssText += ';min-height:' + h + ';_height:' + h;
}
/* Position Calculation
-----------------------------------------------------------------------------*/
// nasty bugs in opera 9.25
// position()'s top returning incorrectly with TR/TD or elements within TD
var topBug;
function topCorrect(tr) { // tr/th/td or anything else
if (topBug !== false) {
var cell;
if (tr.is('th,td')) {
tr = (cell = tr).parent();
}
if (topBug === undefined && tr.is('tr')) {
topBug = tr.position().top != tr.children().position().top;
}
if (topBug) {
return tr.parent().position().top + (cell ? tr.position().top - cell.position().top : 0);
}
}
return 0;
}
/* Misc Utils /* Misc Utils
-----------------------------------------------------------------------------*/ -----------------------------------------------------------------------------*/
@ -289,83 +291,3 @@ function enableTextSelection(element) {
*/ */
function markFirstLast(e) {
e.children()
.removeClass('fc-first fc-last')
.filter(':first-child')
.addClass('fc-first')
.end()
.filter(':last-child')
.addClass('fc-last');
}
function setDayID(cell, date) {
cell.each(function(i, _cell) {
_cell.className = _cell.className.replace(/^fc-\w*/, 'fc-' + dayIDs[date.getDay()]);
// TODO: make a way that doesn't rely on order of classes
});
}
function getSkinCss(event, opt) {
var source = event.source || {};
var eventColor = event.color;
var sourceColor = source.color;
var optionColor = opt('eventColor');
var backgroundColor =
event.backgroundColor ||
eventColor ||
source.backgroundColor ||
sourceColor ||
opt('eventBackgroundColor') ||
optionColor;
var borderColor =
event.borderColor ||
eventColor ||
source.borderColor ||
sourceColor ||
opt('eventBorderColor') ||
optionColor;
var textColor =
event.textColor ||
source.textColor ||
opt('eventTextColor');
var statements = [];
if (backgroundColor) {
statements.push('background-color:' + backgroundColor);
}
if (borderColor) {
statements.push('border-color:' + borderColor);
}
if (textColor) {
statements.push('color:' + textColor);
}
return statements.join(';');
}
function applyAll(functions, thisObj, args) {
if ($.isFunction(functions)) {
functions = [ functions ];
}
if (functions) {
var i;
var ret;
for (i=0; i<functions.length; i++) {
ret = functions[i].apply(thisObj, args) || ret;
}
return ret;
}
}
function firstDefined() {
for (var i=0; i<arguments.length; i++) {
if (arguments[i] !== undefined) {
return arguments[i];
}
}
}

View file

@ -19,23 +19,19 @@ var defaults = {
allDayDefault: true, allDayDefault: true,
ignoreTimezone: true, ignoreTimezone: true,
// event ajax // event ajax
lazyFetching: true, lazyFetching: true,
startParam: 'start', startParam: 'start',
endParam: 'end', endParam: 'end',
startEndDateOnly: false,
// time formats // time formats
titleFormat: { titleFormat: {
month: 'MMMM yyyy', month: 'MMMM yyyy',
fourWeeks: "MMM d[ yyyy]{ '&#8212;'[ MMM] d yyyy}",
week: "MMM d[ yyyy]{ '&#8212;'[ MMM] d yyyy}", week: "MMM d[ yyyy]{ '&#8212;'[ MMM] d yyyy}",
day: 'dddd, MMM d, yyyy' day: 'dddd, MMM d, yyyy'
}, },
columnFormat: { columnFormat: {
month: 'ddd', month: 'ddd',
fourWeeks: "ddd",
week: 'ddd M/d', week: 'ddd M/d',
day: 'dddd M/d' day: 'dddd M/d'
}, },
@ -58,7 +54,6 @@ var defaults = {
today: 'today', today: 'today',
month: 'month', month: 'month',
week: 'week', week: 'week',
fourWeeks: "4 weeks",
day: 'day' day: 'day'
}, },

View file

@ -1,7 +1,7 @@
/* /*
* FullCalendar v@VERSION Google Calendar Plugin * FullCalendar v@VERSION Google Calendar Extension
* *
* Copyright (c) 2011 Adam Shaw * Copyright (c) 2010 Adam Shaw
* Dual licensed under the MIT and GPL licenses, located in * Dual licensed under the MIT and GPL licenses, located in
* MIT-LICENSE.txt and GPL-LICENSE.txt respectively. * MIT-LICENSE.txt and GPL-LICENSE.txt respectively.
* *
@ -11,73 +11,41 @@
(function($) { (function($) {
$.fullCalendar.gcalFeed = function(feedUrl, options) {
var fc = $.fullCalendar; feedUrl = feedUrl.replace(/\/basic$/, '/full');
var formatDate = fc.formatDate; options = options || {};
var parseISO8601 = fc.parseISO8601;
var addDays = fc.addDays;
var applyAll = fc.applyAll;
return function(start, end, callback) {
fc.sourceNormalizers.push(function(sourceOptions) { var params = {
if (sourceOptions.dataType == 'gcal' || 'start-min': $.fullCalendar.formatDate(start, 'u'),
sourceOptions.dataType === undefined && 'start-max': $.fullCalendar.formatDate(end, 'u'),
(sourceOptions.url || '').match(/^(http|https):\/\/www.google.com\/calendar\/feeds\//)) {
sourceOptions.dataType = 'gcal';
if (sourceOptions.editable === undefined) {
sourceOptions.editable = false;
}
}
});
fc.sourceFetchers.push(function(sourceOptions, start, end) {
if (sourceOptions.dataType == 'gcal') {
return transformOptions(sourceOptions, start, end);
}
});
function transformOptions(sourceOptions, start, end) {
var success = sourceOptions.success;
var data = $.extend({}, sourceOptions.data || {}, {
'start-min': formatDate(start, 'u'),
'start-max': formatDate(end, 'u'),
'singleevents': true, 'singleevents': true,
'max-results': 9999 'max-results': 9999
}); };
var ctz = options.currentTimezone;
var ctz = sourceOptions.currentTimezone;
if (ctz) { if (ctz) {
data.ctz = ctz = ctz.replace(' ', '_'); params.ctz = ctz = ctz.replace(' ', '_');
} }
$.getJSON(feedUrl + "?alt=json-in-script&callback=?", params, function(data) {
return $.extend({}, sourceOptions, {
url: sourceOptions.url.replace(/\/basic$/, '/full') + '?alt=json-in-script&callback=?',
dataType: 'jsonp',
data: data,
startParam: false,
endParam: false,
success: function(data) {
var events = []; var events = [];
if (data.feed.entry) { if (data.feed.entry) {
$.each(data.feed.entry, function(i, entry) { $.each(data.feed.entry, function(i, entry) {
var startStr = entry['gd$when'][0]['startTime']; var startStr = entry['gd$when'][0]['startTime'],
var start = parseISO8601(startStr, true); start = $.fullCalendar.parseISO8601(startStr, true),
var end = parseISO8601(entry['gd$when'][0]['endTime'], true); end = $.fullCalendar.parseISO8601(entry['gd$when'][0]['endTime'], true),
var allDay = startStr.indexOf('T') == -1; allDay = startStr.indexOf('T') == -1,
var url; url;
$.each(entry.link, function(i, link) { $.each(entry.link, function() {
if (link.type == 'text/html') { if (this.type == 'text/html') {
url = link.href; url = this.href;
if (ctz) { if (ctz) {
url += (url.indexOf('?') == -1 ? '?' : '&') + 'ctz=' + ctz; url += (url.indexOf('?') == -1 ? '?' : '&') + 'ctz=' + ctz;
} }
} }
}); });
if (allDay) { if (allDay) {
addDays(end, -1); // make inclusive $.fullCalendar.addDays(end, -1); // make inclusive
} }
events.push({ events.push({
id: entry['gCal$uid']['value'], id: entry['gCal$uid']['value'],
@ -87,26 +55,16 @@ function transformOptions(sourceOptions, start, end) {
end: end, end: end,
allDay: allDay, allDay: allDay,
location: entry['gd$where'][0]['valueString'], location: entry['gd$where'][0]['valueString'],
description: entry['content']['$t'] description: entry['content']['$t'],
className: options.className,
editable: options.editable || false
}); });
}); });
} }
var args = [events].concat(Array.prototype.slice.call(arguments, 1)); callback(events);
var res = applyAll(success, this, args);
if ($.isArray(res)) {
return res;
}
return events;
}
}); });
} }
}
// legacy
fc.gcalFeed = function(url, sourceOptions) {
return $.extend({}, sourceOptions, { url: url, dataType: 'gcal' });
};
})(jQuery); })(jQuery);

View file

@ -7,7 +7,7 @@
* For event drag & drop, requires jQuery UI draggable. * For event drag & drop, requires jQuery UI draggable.
* For event resizing, requires jQuery UI resizable. * For event resizing, requires jQuery UI resizable.
* *
* Copyright (c) 2011 Adam Shaw * Copyright (c) 2010 Adam Shaw
* Dual licensed under the MIT and GPL licenses, located in * Dual licensed under the MIT and GPL licenses, located in
* MIT-LICENSE.txt and GPL-LICENSE.txt respectively. * MIT-LICENSE.txt and GPL-LICENSE.txt respectively.
* *

View file

@ -1,15 +1,24 @@
/* /*
* FullCalendar v@VERSION Stylesheet * FullCalendar v@VERSION Stylesheet
* *
* Copyright (c) 2011 Adam Shaw * Feel free to edit this file to customize the look of FullCalendar.
* Dual licensed under the MIT and GPL licenses, located in * When upgrading to newer versions, please upgrade this file as well,
* MIT-LICENSE.txt and GPL-LICENSE.txt respectively. * porting over any customizations afterwards.
* *
* Date: @DATE * Date: @DATE
* *
*/ */
/* TODO: make font sizes look the same in all doctypes */
.fc,
.fc .fc-header,
.fc .fc-content {
font-size: 1em;
}
.fc { .fc {
direction: ltr; direction: ltr;
text-align: left; text-align: left;
@ -20,13 +29,7 @@
border-spacing: 0; border-spacing: 0;
} }
html .fc, .fc td, .fc th {
.fc table {
font-size: 1em;
}
.fc td,
.fc th {
padding: 0; padding: 0;
vertical-align: top; vertical-align: top;
} }
@ -36,85 +39,199 @@ html .fc,
/* Header /* Header
------------------------------------------------------------------------*/ ------------------------------------------------------------------------*/
.fc-header td { table.fc-header {
white-space: nowrap; width: 100%;
} }
.fc-header-left { .fc-header-left {
width: 25%; width: 25%;
text-align: left; }
.fc-header-left table {
float: left;
} }
.fc-header-center { .fc-header-center {
width: 50%;
text-align: center; text-align: center;
} }
.fc-header-center table {
margin: 0 auto;
}
.fc-header-right { .fc-header-right {
width: 25%; width: 25%;
text-align: right; }
.fc-header-right table {
float: right;
} }
.fc-header-title { .fc-header-title {
display: inline-block;
vertical-align: top;
}
.fc-header-title h2 {
margin-top: 0; margin-top: 0;
white-space: nowrap; white-space: nowrap;
} }
.fc .fc-header-space { .fc-header-space {
padding-left: 10px; padding-left: 10px;
} }
.fc-header .fc-button { /* right-to-left */
margin-bottom: 1em;
vertical-align: top; .fc-rtl .fc-header-title {
direction: rtl;
} }
/* buttons edges butting together */
.fc-header .fc-button {
margin-right: -1px; /* Buttons
------------------------------------------------------------------------*/
.fc-header .fc-state-default,
.fc-header .ui-state-default {
margin-bottom: 1em;
cursor: pointer;
}
.fc-header .fc-state-default {
border-width: 1px 0;
padding: 0 1px;
}
.fc-header .fc-state-default,
.fc-header .fc-state-default a {
border-style: solid;
}
.fc-header .fc-state-default a {
display: block;
border-width: 0 1px;
margin: 0 -1px;
width: 100%;
text-decoration: none;
}
.fc-header .fc-state-default span {
display: block;
border-style: solid;
border-width: 1px 0 1px 1px;
padding: 3px 5px;
}
.fc-header .ui-state-default {
padding: 4px 6px;
}
.fc-header .fc-state-default span,
.fc-header .ui-state-default span {
white-space: nowrap;
}
/* for adjacent buttons */
.fc-header .fc-no-right {
padding-right: 0;
}
.fc-header .fc-no-right a {
margin-right: 0;
border-right: 0;
}
.fc-header .ui-no-right {
border-right: 0;
}
/* for fake rounded corners */
.fc-header .fc-corner-left {
margin-left: 1px;
padding-left: 0;
} }
.fc-header .fc-corner-right { .fc-header .fc-corner-right {
margin-right: 1px; /* back to normal */ margin-right: 1px;
padding-right: 0;
} }
.fc-header .ui-corner-right { /* DEFAULT button COLORS */
margin-right: 0; /* back to normal */
.fc-header .fc-state-default,
.fc-header .fc-state-default a {
border-color: #777; /* outer border */
color: #333;
} }
/* button layering (for border precedence) */ .fc-header .fc-state-default span {
border-color: #fff #fff #d1d1d1; /* inner border */
.fc-header .fc-state-hover, background: #e8e8e8;
.fc-header .ui-state-hover {
z-index: 2;
} }
.fc-header .fc-state-down { /* PRESSED button COLORS (down and active) */
z-index: 3;
.fc-header .fc-state-active a {
color: #fff;
} }
.fc-header .fc-state-active, .fc-header .fc-state-down span,
.fc-header .ui-state-active { .fc-header .fc-state-active span {
z-index: 4; background: #888;
border-color: #808080 #808080 #909090; /* inner border */
}
/* DISABLED button COLORS */
.fc-header .fc-state-disabled a {
color: #999;
}
.fc-header .fc-state-disabled,
.fc-header .fc-state-disabled a {
border-color: #ccc; /* outer border */
}
.fc-header .fc-state-disabled span {
border-color: #fff #fff #f0f0f0; /* inner border */
background: #f0f0f0;
} }
/* Content /* Content Area & Global Cell Styles
------------------------------------------------------------------------*/ ------------------------------------------------------------------------*/
.fc-widget-content {
border: 1px solid #ccc; /* outer border color */
}
.fc-content { .fc-content {
clear: both; clear: both;
} }
.fc-view { .fc-content .fc-state-default {
width: 100%; /* needed for view switching (when view is absolute) */ border-style: solid;
border-color: #ccc; /* inner border color */
}
.fc-content .fc-state-highlight { /* today */
background: #ffc;
}
.fc-content .fc-not-today { /* override jq-ui highlight (TODO: ui-widget-content) */
background: none;
}
.fc-cell-overlay { /* semi-transparent rectangle while dragging */
background: #9cf;
opacity: .2;
filter: alpha(opacity=20); /* for IE */
}
.fc-view { /* prevents dragging outside of widget */
width: 100%;
overflow: hidden; overflow: hidden;
} }

View file

@ -59,9 +59,8 @@ $.fn.fullCalendar = function(options) {
// function for adding/overriding defaults // function for adding/overriding defaults
var setDefaults = function(d) { function setDefaults(d) {
$.extend(true, defaults, d); $.extend(true, defaults, d);
} }
$.fullCalendar.setDefaults = setDefaults;

View file

@ -84,7 +84,6 @@
}); });
$('#calendar2').fullCalendar({ $('#calendar2').fullCalendar({
//isRTL: true,
droppable: true, droppable: true,
dropAccept: '.for-calendar2', dropAccept: '.for-calendar2',
/* /*

View file

@ -1,92 +0,0 @@
<!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?debug'></script>
<script type='text/javascript'>
$(document).ready(function() {
var date = new Date();
var d = date.getDate();
var m = date.getMonth();
var y = date.getFullYear();
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,fourWeeks,agendaWeek,basicWeek,agendaDay,basicDay'
},
//defaultView: 'fourWeeks',
editable: true,
events: [
{
title: 'All Day Event',
start: new Date(y, m, 1)
},
{
title: 'Long Event',
start: new Date(y, m, d-5),
end: new Date(y, m, d-2)
},
{
id: 999,
title: 'Repeating Event',
start: new Date(y, m, d-3, 16, 0),
allDay: false
},
{
id: 999,
title: 'Repeating Event',
start: new Date(y, m, d+4, 16, 0),
allDay: false
},
{
title: 'Meeting',
start: new Date(y, m, d, 10, 30),
allDay: false
},
{
title: 'Lunch',
start: new Date(y, m, d, 12, 5),
end: new Date(y, m, d, 14, 43),
allDay: false
},
{
title: 'Birthday Party',
start: new Date(y, m, d+1, 19, 0),
end: new Date(y, m, d+1, 22, 30),
allDay: false
},
{
title: 'Click for Google',
start: new Date(y, m, 28),
end: new Date(y, m, 29),
url: 'http://google.com/'
}
]
});
});
</script>
<style type='text/css'>
body {
margin-top: 40px;
text-align: center;
font-size: 13px;
font-family: "Lucida Grande",Helvetica,Arial,Verdana,sans-serif;
}
#calendar {
width: 900px;
margin: 0 auto;
}
</style>
</head>
<body>
<div id='calendar'></div>
</body>
</html>

View file

@ -13,27 +13,22 @@
center: 'title', center: 'title',
right: 'month,agendaWeek,basicWeek,agendaDay,basicDay' right: 'month,agendaWeek,basicWeek,agendaDay,basicDay'
}, },
//editable: true,
eventSources: [
{
url: "http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic",
editable: true, editable: true,
className: 'holiday' eventSources: [
},
/*
$.fullCalendar.gcalFeed( $.fullCalendar.gcalFeed(
"http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic", "http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic",
{ {
editable: true, editable: true,
className: 'holiday' className: ['holiday']
} }
), ),
*/ $.fullCalendar.gcalFeed(
"http://www.google.com/calendar/feeds/b62ul6i1vvfh9vqabsal835028%40group.calendar.google.com/public/basic", // most recent event in Nov 2009
{ {
url: "https://www.google.com/calendar/feeds/ht3jlfaac5lfd6263ulfh4tql8%40group.calendar.google.com/public/basic", editable: true,
currentTimezone: 'America/Edmonton', // 'America/Los_Angeles' 'America/Los Angeles' currentTimezone: 'America/Edmonton' // 'America/Los_Angeles' 'America/Los Angeles'
editable: true
} }
)
], ],
eventClick: function(event) { eventClick: function(event) {
console.log(event.start); console.log(event.start);
@ -46,8 +41,12 @@
</script> </script>
<style> <style>
.holiday * { .holiday,
color: yellow !important; .fc-agenda .holiday .fc-event-time,
.holiday a {
background: green;
border-color: green;
color: yellow;
} }
</style> </style>

View file

@ -1,15 +1,15 @@
<!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> <html>
<head> <head>
<link rel='stylesheet' type='text/css' href='lib/fancybox/jquery.fancybox-1.3.4.css' /> <link rel='stylesheet' type='text/css' href='lib/fancybox/jquery.fancybox-1.2.6.css' />
<script type='text/javascript' src='lib/jquery-1.4.3.min.js'></script> <script type='text/javascript' src='../lib/jquery-1.4.4.min.js'></script>
<script type='text/javascript' src='lib/fancybox/jquery.fancybox-1.3.4.js'></script> <script type='text/javascript' src='lib/fancybox/jquery.fancybox-1.2.6.pack.js'></script>
<script type='text/javascript'> <script type='text/javascript'>
$(document).ready(function() { $(document).ready(function() {
$('#fullcalendar-link').fancybox({ $('#fullcalendar-link').fancybox({
width: 1100, frameWidth: 1100,
height: 800 frameHeight: 800
}); });
}); });

View file

@ -1,95 +0,0 @@
<!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?debug'></script>
<script type='text/javascript'>
$(document).ready(function() {
var date = new Date();
var d = date.getDate();
var m = date.getMonth();
var y = date.getFullYear();
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,basicWeek,agendaDay,basicDay'
},
editable: true,
year: 2011,
month: 6, // august
ignoreTimezone: false,
events: [
{
title: 'All Day Event',
start: '2011-07-05T12:00:00Z', // august
allDay: false
},
{
title: 'Long Event',
start: new Date(y, m, d-5),
end: new Date(y, m, d-2)
},
{
id: 999,
title: 'Repeating Event',
start: new Date(y, m, d-3, 16, 0),
allDay: false
},
{
id: 999,
title: 'Repeating Event',
start: new Date(y, m, d+4, 16, 0),
allDay: false
},
{
title: 'Meeting',
start: new Date(y, m, d, 10, 30),
allDay: false
},
{
title: 'Lunch',
start: new Date(y, m, d, 12, 5),
end: new Date(y, m, d, 14, 43),
allDay: false
},
{
title: 'Birthday Party',
start: new Date(y, m, d+1, 19, 0),
end: new Date(y, m, d+1, 22, 30),
allDay: false
},
{
title: 'Click for Google',
start: new Date(y, m, 28),
end: new Date(y, m, 29),
url: 'http://google.com/'
}
]
});
});
</script>
<style type='text/css'>
body {
margin-top: 40px;
text-align: center;
font-size: 13px;
font-family: "Lucida Grande",Helvetica,Arial,Verdana,sans-serif;
}
#calendar {
width: 900px;
margin: 0 auto;
}
</style>
</head>
<body>
<div id='calendar'></div>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 B

After

Width:  |  Height:  |  Size: 146 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 B

After

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 347 B

After

Width:  |  Height:  |  Size: 388 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 324 B

After

Width:  |  Height:  |  Size: 374 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 B

After

Width:  |  Height:  |  Size: 147 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 352 B

After

Width:  |  Height:  |  Size: 393 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 340 B

After

Width:  |  Height:  |  Size: 406 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 B

After

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 503 B

After

Width:  |  Height:  |  Size: 556 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 B

After

Width:  |  Height:  |  Size: 149 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 506 B

After

Width:  |  Height:  |  Size: 559 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 203 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 176 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

View file

@ -1,72 +0,0 @@
/*
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
*
* Uses the built in easing capabilities added In jQuery 1.1
* to offer multiple easing options
*
* TERMS OF USE - jQuery Easing
*
* Open source under the BSD License.
*
* Copyright © 2008 George McGinley Smith
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* Neither the name of the author nor the names of contributors may be used to endorse
* or promote products derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
// t: current time, b: begInnIng value, c: change In value, d: duration
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('h.i[\'1a\']=h.i[\'z\'];h.O(h.i,{y:\'D\',z:9(x,t,b,c,d){6 h.i[h.i.y](x,t,b,c,d)},17:9(x,t,b,c,d){6 c*(t/=d)*t+b},D:9(x,t,b,c,d){6-c*(t/=d)*(t-2)+b},13:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t+b;6-c/2*((--t)*(t-2)-1)+b},X:9(x,t,b,c,d){6 c*(t/=d)*t*t+b},U:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t+1)+b},R:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t+b;6 c/2*((t-=2)*t*t+2)+b},N:9(x,t,b,c,d){6 c*(t/=d)*t*t*t+b},M:9(x,t,b,c,d){6-c*((t=t/d-1)*t*t*t-1)+b},L:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t+b;6-c/2*((t-=2)*t*t*t-2)+b},K:9(x,t,b,c,d){6 c*(t/=d)*t*t*t*t+b},J:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t*t*t+1)+b},I:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t*t+b;6 c/2*((t-=2)*t*t*t*t+2)+b},G:9(x,t,b,c,d){6-c*8.C(t/d*(8.g/2))+c+b},15:9(x,t,b,c,d){6 c*8.n(t/d*(8.g/2))+b},12:9(x,t,b,c,d){6-c/2*(8.C(8.g*t/d)-1)+b},Z:9(x,t,b,c,d){6(t==0)?b:c*8.j(2,10*(t/d-1))+b},Y:9(x,t,b,c,d){6(t==d)?b+c:c*(-8.j(2,-10*t/d)+1)+b},W:9(x,t,b,c,d){e(t==0)6 b;e(t==d)6 b+c;e((t/=d/2)<1)6 c/2*8.j(2,10*(t-1))+b;6 c/2*(-8.j(2,-10*--t)+2)+b},V:9(x,t,b,c,d){6-c*(8.o(1-(t/=d)*t)-1)+b},S:9(x,t,b,c,d){6 c*8.o(1-(t=t/d-1)*t)+b},Q:9(x,t,b,c,d){e((t/=d/2)<1)6-c/2*(8.o(1-t*t)-1)+b;6 c/2*(8.o(1-(t-=2)*t)+1)+b},P:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6-(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b},H:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6 a*8.j(2,-10*t)*8.n((t*d-s)*(2*8.g)/p)+c+b},T:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d/2)==2)6 b+c;e(!p)p=d*(.3*1.5);e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);e(t<1)6-.5*(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b;6 a*8.j(2,-10*(t-=1))*8.n((t*d-s)*(2*8.g)/p)*.5+c+b},F:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*(t/=d)*t*((s+1)*t-s)+b},E:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},16:9(x,t,b,c,d,s){e(s==u)s=1.l;e((t/=d/2)<1)6 c/2*(t*t*(((s*=(1.B))+1)*t-s))+b;6 c/2*((t-=2)*t*(((s*=(1.B))+1)*t+s)+2)+b},A:9(x,t,b,c,d){6 c-h.i.v(x,d-t,0,c,d)+b},v:9(x,t,b,c,d){e((t/=d)<(1/2.k)){6 c*(7.q*t*t)+b}m e(t<(2/2.k)){6 c*(7.q*(t-=(1.5/2.k))*t+.k)+b}m e(t<(2.5/2.k)){6 c*(7.q*(t-=(2.14/2.k))*t+.11)+b}m{6 c*(7.q*(t-=(2.18/2.k))*t+.19)+b}},1b:9(x,t,b,c,d){e(t<d/2)6 h.i.A(x,t*2,0,c,d)*.5+b;6 h.i.v(x,t*2-d,0,c,d)*.5+c*.5+b}});',62,74,'||||||return||Math|function|||||if|var|PI|jQuery|easing|pow|75|70158|else|sin|sqrt||5625|asin|||undefined|easeOutBounce|abs||def|swing|easeInBounce|525|cos|easeOutQuad|easeOutBack|easeInBack|easeInSine|easeOutElastic|easeInOutQuint|easeOutQuint|easeInQuint|easeInOutQuart|easeOutQuart|easeInQuart|extend|easeInElastic|easeInOutCirc|easeInOutCubic|easeOutCirc|easeInOutElastic|easeOutCubic|easeInCirc|easeInOutExpo|easeInCubic|easeOutExpo|easeInExpo||9375|easeInOutSine|easeInOutQuad|25|easeOutSine|easeInOutBack|easeInQuad|625|984375|jswing|easeInOutBounce'.split('|'),0,{}))
/*
*
* TERMS OF USE - EASING EQUATIONS
*
* Open source under the BSD License.
*
* Copyright © 2001 Robert Penner
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* Neither the name of the author nor the names of contributors may be used to endorse
* or promote products derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/

View file

@ -0,0 +1,283 @@
div#fancy_overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: none;
z-index: 30;
}
div#fancy_loading {
position: absolute;
height: 40px;
width: 40px;
cursor: pointer;
display: none;
overflow: hidden;
background: transparent;
z-index: 100;
}
div#fancy_loading div {
position: absolute;
top: 0;
left: 0;
width: 40px;
height: 480px;
background: transparent url('fancy_progress.png') no-repeat;
}
div#fancy_outer {
position: absolute;
top: 0;
left: 0;
z-index: 90;
padding: 20px 20px 40px 20px;
margin: 0;
background: transparent;
display: none;
}
div#fancy_inner {
position: relative;
width:100%;
height:100%;
background: #FFF;
}
div#fancy_content {
margin: 0;
z-index: 100;
position: absolute;
}
div#fancy_div {
background: #000;
color: #FFF;
height: 100%;
width: 100%;
z-index: 100;
}
img#fancy_img {
position: absolute;
top: 0;
left: 0;
border:0;
padding: 0;
margin: 0;
z-index: 100;
width: 100%;
height: 100%;
}
div#fancy_close {
position: absolute;
top: -12px;
right: -15px;
height: 30px;
width: 30px;
background: url('fancy_closebox.png') top left no-repeat;
cursor: pointer;
z-index: 181;
display: none;
}
#fancy_frame {
position: relative;
width: 100%;
height: 100%;
display: none;
}
#fancy_ajax {
width: 100%;
height: 100%;
overflow: auto;
}
a#fancy_left, a#fancy_right {
position: absolute;
bottom: 0px;
height: 100%;
width: 35%;
cursor: pointer;
z-index: 111;
display: none;
background-image: url("data:image/gif;base64,AAAA");
outline: none;
overflow: hidden;
}
a#fancy_left {
left: 0px;
}
a#fancy_right {
right: 0px;
}
span.fancy_ico {
position: absolute;
top: 50%;
margin-top: -15px;
width: 30px;
height: 30px;
z-index: 112;
cursor: pointer;
display: block;
}
span#fancy_left_ico {
left: -9999px;
background: transparent url('fancy_left.png') no-repeat;
}
span#fancy_right_ico {
right: -9999px;
background: transparent url('fancy_right.png') no-repeat;
}
a#fancy_left:hover, a#fancy_right:hover {
visibility: visible;
background-color: transparent;
}
a#fancy_left:hover span {
left: 20px;
}
a#fancy_right:hover span {
right: 20px;
}
#fancy_bigIframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: transparent;
}
div#fancy_bg {
position: absolute;
top: 0; left: 0;
width: 100%;
height: 100%;
z-index: 70;
border: 0;
padding: 0;
margin: 0;
}
div.fancy_bg {
position: absolute;
display: block;
z-index: 70;
border: 0;
padding: 0;
margin: 0;
}
div#fancy_bg_n {
top: -20px;
left: 0;
width: 100%;
height: 20px;
background: transparent url('fancy_shadow_n.png') repeat-x;
}
div#fancy_bg_ne {
top: -20px;
right: -20px;
width: 20px;
height: 20px;
background: transparent url('fancy_shadow_ne.png') no-repeat;
}
div#fancy_bg_e {
right: -20px;
height: 100%;
width: 20px;
background: transparent url('fancy_shadow_e.png') repeat-y;
}
div#fancy_bg_se {
bottom: -20px;
right: -20px;
width: 20px;
height: 20px;
background: transparent url('fancy_shadow_se.png') no-repeat;
}
div#fancy_bg_s {
bottom: -20px;
left: 0;
width: 100%;
height: 20px;
background: transparent url('fancy_shadow_s.png') repeat-x;
}
div#fancy_bg_sw {
bottom: -20px;
left: -20px;
width: 20px;
height: 20px;
background: transparent url('fancy_shadow_sw.png') no-repeat;
}
div#fancy_bg_w {
left: -20px;
height: 100%;
width: 20px;
background: transparent url('fancy_shadow_w.png') repeat-y;
}
div#fancy_bg_nw {
top: -20px;
left: -20px;
width: 20px;
height: 20px;
background: transparent url('fancy_shadow_nw.png') no-repeat;
}
div#fancy_title {
position: absolute;
z-index: 100;
display: none;
}
div#fancy_title div {
color: #FFF;
font: bold 12px Arial;
padding-bottom: 3px;
white-space: nowrap;
}
div#fancy_title table {
margin: 0 auto;
}
div#fancy_title table td {
padding: 0;
vertical-align: middle;
}
td#fancy_title_left {
height: 32px;
width: 15px;
background: transparent url('fancy_title_left.png') repeat-x;
}
td#fancy_title_main {
height: 32px;
background: transparent url('fancy_title_main.png') repeat-x;
}
td#fancy_title_right {
height: 32px;
width: 15px;
background: transparent url('fancy_title_right.png') repeat-x;
}

Some files were not shown because too many files have changed in this diff Show more