Compare commits
67 commits
Author | SHA1 | Date | |
---|---|---|---|
faa16696d2 | |||
b2941025f1 | |||
d234db1972 | |||
41dbc6d238 | |||
6ae1be4ca1 | |||
f078b47b86 | |||
20d46ef2d7 | |||
75abd3f0cc | |||
f01997d4e9 | |||
96e6978923 | |||
572741f5f0 | |||
ad5dbabb35 | |||
8c6b761bbd | |||
277b14fc06 | |||
f800f3c492 | |||
418399988a | |||
d3e3047bf8 | |||
3a4dab8936 | |||
698dddf846 | |||
73bb0ad051 | |||
74ba72cdfa | |||
1109667cd4 | |||
56ae9f1cbf | |||
383e3d23e4 | |||
afd38c48df | |||
c0e8970c66 | |||
9fd8c4fab1 | |||
47a5c83caf | |||
5b3f14fe70 | |||
4f07a74e69 | |||
7508cf185e | |||
477c2960a8 | |||
b33e6aeed9 | |||
342325766b | |||
ef75b50052 | |||
3eab5ff72e | |||
f87648f7d4 | |||
bb1078959c | |||
5044683aec | |||
7fc1e166c5 | |||
7de24a03e6 | |||
48a010561d | |||
be32715d3c | |||
b110e2bf51 | |||
cb4a3ebb99 | |||
0183fd3927 | |||
4e0c802fc3 | |||
6d5c6dd5a0 | |||
d9a3dc9599 | |||
a238c91440 | |||
f13a29fac3 | |||
3dd0572c5c | |||
325cb04690 | |||
c841be97cb | |||
afadc63b78 | |||
a2e1de5d3d | |||
6823f382e0 | |||
075df1d144 | |||
6b6391635e | |||
06e4734b05 | |||
f3fcd57530 | |||
7e305a8ab5 | |||
bef6f92836 | |||
3079c2f1c3 | |||
84ed4065da | |||
09427f27cf | |||
679b9e48d6 |
158
Makefile
|
@ -8,24 +8,24 @@ OTHER_FILES = \
|
|||
MIT-LICENSE.txt \
|
||||
GPL-LICENSE.txt
|
||||
|
||||
VER = $$(cat version.txt)
|
||||
VER_SED = sed s/@VERSION/"${VER}"/
|
||||
DATE = $$(git log -1 --pretty=format:%ad)
|
||||
DATE_SED = sed s/@DATE/"${DATE}"/
|
||||
VER = $(shell cat version.txt)
|
||||
VER_SED = sed s/@VERSION/"$(VER)"/
|
||||
DATE = $(shell git log -1 --pretty=format:%ad)
|
||||
DATE_SED = sed s/@DATE/"$(DATE)"/
|
||||
|
||||
JQ = $$(sed -n "s/.*JQUERY\s*=\s*[\"']\(.*\)[\"'].*/\1/p" "${SRC_DIR}/_loader.js")
|
||||
JQUI = $$(sed -n "s/.*JQUERY_UI\s*=\s*[\"']\(.*\)[\"'].*/\1/p" "${SRC_DIR}/_loader.js")
|
||||
JQ = $(shell sed -ne "s/.*JQUERY[ \t]*=[ \t]*[\"']\(.*\)[\"'].*/\1/p" "$(SRC_DIR)/_loader.js")
|
||||
JQUI = $(shell sed -ne "s/.*JQUERY_UI[ \t]*=[ \t]*[\"']\(.*\)[\"'].*/\1/p" "$(SRC_DIR)/_loader.js")
|
||||
|
||||
DEMO_FILES = $$(cd ${DEMOS_DIR}; find . -mindepth 1 -maxdepth 1 -type f)
|
||||
DEMO_SUBDIRS = $$(cd ${DEMOS_DIR}; find . -mindepth 1 -maxdepth 1 -type d)
|
||||
DEMO_RE = \(<script[^>]*_loader\.js[^>]*><\/script>\|<!--\[\[\|\]\]-->\)\s*
|
||||
DEMO_SED = sed -n "1h;1!H;\$${;g;s/${DEMO_RE}//g;p;}"
|
||||
DEMO_FILES = $(shell cd $(DEMOS_DIR); find . -mindepth 1 -maxdepth 1 -type f)
|
||||
DEMO_SUBDIRS = $(shell cd $(DEMOS_DIR); find . -mindepth 1 -maxdepth 1 -type d)
|
||||
DEMO_RE = (<script[^>]*_loader\.js[^>]*><\/script>|<!--\[\[|\]\]-->)[^<]*
|
||||
DEMO_SED = sed -ne '1h;1!H;$${;g;s/$(DEMO_RE)//g;p;}'
|
||||
|
||||
JS_SED = sed -n "s/\s*js([\"']\(.*\)[\"']).*/\1/p"
|
||||
CSS_SED = sed -n "s/\s*css([\"']\(.*\)[\"']).*/\1/p"
|
||||
JS_SED = sed -ne "s/[ \t]*js([\"']\(.*\)[\"']).*/\1/p"
|
||||
CSS_SED = sed -ne "s/[ \t]*css([\"']\(.*\)[\"']).*/\1/p"
|
||||
|
||||
concat_js = \
|
||||
files=$$(cat "$(1)/_loader.js" | ${JS_SED}); \
|
||||
files=$$($(JS_SED) "$(1)/_loader.js"); \
|
||||
if [ -f "$(1)/intro.js" ]; then \
|
||||
files="intro.js $$files"; \
|
||||
fi; \
|
||||
|
@ -33,14 +33,16 @@ concat_js = \
|
|||
files="$$files outro.js"; \
|
||||
fi; \
|
||||
old=$$PWD; \
|
||||
(cd "$(1)"; cat $$files; cd "$$old") \
|
||||
| ${VER_SED} \
|
||||
| ${DATE_SED} \
|
||||
> "$(2)"
|
||||
if ! [ X = "X$$files" ]; then \
|
||||
(cd "$(1)"; cat $$files; cd "$$old") \
|
||||
| $(VER_SED) \
|
||||
| $(DATE_SED) \
|
||||
> "$(2)" ; \
|
||||
fi
|
||||
|
||||
concat_css = \
|
||||
files=$$(cat "$(1)/_loader.js" | ${CSS_SED}); \
|
||||
if [ "$$files" ]; then \
|
||||
files=$$($(CSS_SED) "$(1)/_loader.js"); \
|
||||
if ! [ X = "X$$files" ]; then \
|
||||
old=$$PWD; \
|
||||
(cd "$(1)"; cat $$files; cd "$$old") \
|
||||
| ${VER_SED} \
|
||||
|
@ -48,61 +50,93 @@ concat_css = \
|
|||
> "$(2)"; \
|
||||
fi
|
||||
|
||||
zip:
|
||||
@rm -rf ${BUILD_DIR}/fullcalendar
|
||||
@rm -rf ${BUILD_DIR}/fullcalendar-*
|
||||
@mkdir -p ${BUILD_DIR}/fullcalendar/fullcalendar/
|
||||
FC_V_DIR = $(BUILD_DIR)/fullcalendar-$(VER)
|
||||
FC_DIR = $(FC_V_DIR)/fullcalendar
|
||||
FCJS = $(FC_DIR)/fullcalendar.js
|
||||
FCCSS = $(FC_DIR)/fullcalendar.css
|
||||
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))
|
||||
|
||||
@echo "building core..."
|
||||
@$(call concat_js,${SRC_DIR},"${BUILD_DIR}/fullcalendar/fullcalendar/fullcalendar.js")
|
||||
@$(call concat_css,${SRC_DIR},"${BUILD_DIR}/fullcalendar/fullcalendar/fullcalendar.css")
|
||||
.PHONY: all distribute dist
|
||||
all: distribute
|
||||
distribute: core plugins jquery demos others
|
||||
|
||||
@echo "compressing core js..."
|
||||
@java -jar ${BUILD_DIR}/compiler.jar --warning_level VERBOSE --jscomp_off checkTypes --externs build/externs.js \
|
||||
--js ${BUILD_DIR}/fullcalendar/fullcalendar/fullcalendar.js \
|
||||
> ${BUILD_DIR}/fullcalendar/fullcalendar/fullcalendar.min.js; \
|
||||
.PHONY: clean
|
||||
clean: Makefile
|
||||
rm -rf $(FC_ZIP)
|
||||
rm -rf $(FC_V_DIR)
|
||||
rm -rf $(DIST_DIR)
|
||||
|
||||
@echo "building plugins..."
|
||||
@for loader in ${SRC_DIR}/*/_loader.js; do \
|
||||
$(FC_V_DIR): Makefile
|
||||
mkdir -p $@
|
||||
|
||||
$(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`; \
|
||||
name=`basename $$dir`; \
|
||||
$(call concat_js,$$dir,"${BUILD_DIR}/fullcalendar/fullcalendar/$$name.js"); \
|
||||
$(call concat_js,$$dir,$(FC_DIR)/$$name.js); \
|
||||
done
|
||||
|
||||
@echo "copying jquery..."
|
||||
@mkdir -p ${BUILD_DIR}/fullcalendar/jquery
|
||||
@cp lib/${JQ} ${BUILD_DIR}/fullcalendar/jquery
|
||||
@cp lib/${JQUI} ${BUILD_DIR}/fullcalendar/jquery
|
||||
$(JQ_DIR)/$(JQ): lib/$(JQ) $(JQ_DIR)
|
||||
cp $< $@
|
||||
|
||||
@echo "building demos..."
|
||||
@mkdir -p ${BUILD_DIR}/fullcalendar/demos
|
||||
@for f in ${DEMO_FILES}; do \
|
||||
cat ${DEMOS_DIR}/$$f \
|
||||
| ${DEMO_SED} \
|
||||
$(JQ_DIR)/$(JQUI): lib/$(JQUI) $(JQ_DIR)
|
||||
cp $< $@
|
||||
|
||||
.PHONY: jquery
|
||||
jquery: $(JQ_DIR)/$(JQ) $(JQ_DIR)/$(JQUI)
|
||||
|
||||
.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-ui\.js/${JQUI}/" \
|
||||
> ${BUILD_DIR}/fullcalendar/demos/$$f; \
|
||||
> $(DEMOS_DIR)/$$f; \
|
||||
done
|
||||
@for d in ${DEMO_SUBDIRS}; do \
|
||||
cp -r ${DEMOS_DIR}/$$d ${BUILD_DIR}/fullcalendar/demos/$$d; \
|
||||
for d in $(DEMO_SUBDIRS); do \
|
||||
cp -r $(DEMOS_DIR)/$$d $(DEMOS_DIR)/$$d; \
|
||||
done
|
||||
|
||||
@echo "copying other files..."
|
||||
@cp -r ${OTHER_FILES} ${BUILD_DIR}/fullcalendar
|
||||
.PHONY: others
|
||||
others: $(FC_DIR)
|
||||
cp -r $(OTHER_FILES) $(FC_DIR)
|
||||
|
||||
@echo "zipping..."
|
||||
@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}/*
|
||||
$(FC_ZIP): $(FC_V_DIR) distribute
|
||||
zip -q -r $@ $<
|
||||
|
||||
$(DIST): $(FC_ZIP) $(DIST_DIR)
|
||||
mv $@ $<
|
||||
|
|
18
README.mkd
|
@ -45,3 +45,21 @@ 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 »](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)
|
||||
|
|
|
@ -1,4 +1,70 @@
|
|||
|
||||
version 1.5.2 (8/21/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 bug with faulty dragging of events from all-day slot in agenda views
|
||||
- bundled with jquery 1.5 and jquery-ui 1.8.9
|
||||
|
||||
version 1.4.10 (1/2/11)
|
||||
- fixed bug with resizing event to different week in 5-day month view (issue 740)
|
||||
- fixed bug with events not sticking after a removeEvents call (issue 757)
|
||||
- fixed bug with underlying parseTime method, and other uses of parseInt (issue 688)
|
||||
|
||||
version 1.4.9 (11/16/10)
|
||||
- new algorithm for vertically stacking events (issue 111)
|
||||
- resizing an event to a different week (issue 306)
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
<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.print.css' media='print' />
|
||||
<script type='text/javascript' src='../jquery/jquery.js'></script>
|
||||
<script type='text/javascript' src='../jquery/jquery-ui.js'></script>
|
||||
<script type='text/javascript' src='../fullcalendar/fullcalendar.min.js'></script>
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
<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.print.css' media='print' />
|
||||
<script type='text/javascript' src='../jquery/jquery.js'></script>
|
||||
<script type='text/javascript' src='../jquery/jquery-ui.js'></script>
|
||||
<script type='text/javascript' src='../fullcalendar/fullcalendar.min.js'></script>
|
||||
|
|
BIN
demos/cupertino/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png
Normal file
After Width: | Height: | Size: 251 B |
BIN
demos/cupertino/images/ui-bg_flat_15_cd0a0a_40x100.png
Normal file
After Width: | Height: | Size: 181 B |
BIN
demos/cupertino/images/ui-bg_glass_100_e4f1fb_1x400.png
Normal file
After Width: | Height: | Size: 119 B |
BIN
demos/cupertino/images/ui-bg_glass_50_3baae3_1x400.png
Normal file
After Width: | Height: | Size: 176 B |
BIN
demos/cupertino/images/ui-bg_glass_80_d7ebf9_1x400.png
Normal file
After Width: | Height: | Size: 124 B |
BIN
demos/cupertino/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png
Normal file
After Width: | Height: | Size: 133 B |
BIN
demos/cupertino/images/ui-bg_highlight-hard_70_000000_1x100.png
Normal file
After Width: | Height: | Size: 118 B |
BIN
demos/cupertino/images/ui-bg_highlight-soft_100_deedf7_1x100.png
Normal file
After Width: | Height: | Size: 104 B |
BIN
demos/cupertino/images/ui-bg_highlight-soft_25_ffef8f_1x100.png
Normal file
After Width: | Height: | Size: 119 B |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* jQuery UI CSS Framework @VERSION
|
||||
* jQuery UI CSS Framework 1.8.11
|
||||
*
|
||||
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
|
@ -11,7 +11,7 @@
|
|||
/* Layout helpers
|
||||
----------------------------------*/
|
||||
.ui-helper-hidden { display: none; }
|
||||
.ui-helper-hidden-accessible { position: absolute; left: -99999999px; }
|
||||
.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
|
||||
.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 { display: inline-block; }
|
||||
|
@ -42,15 +42,15 @@
|
|||
|
||||
|
||||
/*
|
||||
* jQuery UI CSS Framework @VERSION
|
||||
* jQuery UI CSS Framework 1.8.11
|
||||
*
|
||||
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* 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/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=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
|
||||
* 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
|
||||
*/
|
||||
|
||||
|
||||
|
@ -59,28 +59,28 @@
|
|||
.ui-widget { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1.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-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: #222222; }
|
||||
.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: #ffffff; }
|
||||
.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 a { color: #362b36; }
|
||||
.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 a { color: #222222; }
|
||||
|
||||
/* Interaction states
|
||||
----------------------------------*/
|
||||
.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: #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 #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: #1d5987; text-decoration: none; }
|
||||
.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: #e17009; text-decoration: none; }
|
||||
.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 a, .ui-state-default a:link, .ui-state-default a:visited { color: #2779aa; 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 a, .ui-state-hover a:hover { color: #0070a3; 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 a, .ui-state-active a:link, .ui-state-active a:visited { color: #ffffff; text-decoration: none; }
|
||||
.ui-widget :active { outline: none; }
|
||||
|
||||
/* Interaction Cues
|
||||
----------------------------------*/
|
||||
.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, .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 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: #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: #cd0a0a; }
|
||||
.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
|
||||
.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 a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; }
|
||||
.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; }
|
||||
.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-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 */
|
||||
.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_469bdd_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_6da8d5_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_f9bd01_256x240.png); }
|
||||
.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_72a7cf_256x240.png); }
|
||||
.ui-widget-content .ui-icon {background-image: url(images/ui-icons_72a7cf_256x240.png); }
|
||||
.ui-widget-header .ui-icon {background-image: url(images/ui-icons_72a7cf_256x240.png); }
|
||||
.ui-state-default .ui-icon { background-image: url(images/ui-icons_3d80b3_256x240.png); }
|
||||
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_2694e8_256x240.png); }
|
||||
.ui-state-active .ui-icon {background-image: url(images/ui-icons_ffffff_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_cd0a0a_256x240.png); }
|
||||
.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); }
|
||||
|
||||
/* positioning */
|
||||
.ui-icon-carat-1-n { background-position: 0 0; }
|
||||
|
@ -280,22 +280,22 @@
|
|||
----------------------------------*/
|
||||
|
||||
/* Corner radius */
|
||||
.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: 5px; -webkit-border-top-right-radius: 5px; border-top-right-radius: 5px; }
|
||||
.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: 5px; -webkit-border-bottom-right-radius: 5px; border-bottom-right-radius: 5px; }
|
||||
.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: 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: 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: 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: 5px; -webkit-border-radius: 5px; border-radius: 5px; }
|
||||
.ui-corner-tl { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; border-top-left-radius: 6px; }
|
||||
.ui-corner-tr { -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; border-top-right-radius: 6px; }
|
||||
.ui-corner-bl { -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; }
|
||||
.ui-corner-br { -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; }
|
||||
.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-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-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-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-all { -moz-border-radius: 6px; -webkit-border-radius: 6px; border-radius: 6px; }
|
||||
|
||||
/* Overlays */
|
||||
.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: -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 @VERSION
|
||||
.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-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; }/*
|
||||
* jQuery UI Resizable 1.8.11
|
||||
*
|
||||
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
|
@ -312,9 +312,9 @@
|
|||
.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-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*
|
||||
* jQuery UI Tabs @VERSION
|
||||
* jQuery UI Tabs 1.8.11
|
||||
*
|
||||
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
|
@ -4,6 +4,7 @@
|
|||
<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.print.css' media='print' />
|
||||
<script type='text/javascript' src='../jquery/jquery.js'></script>
|
||||
<script type='text/javascript' src='../jquery/jquery-ui.js'></script>
|
||||
<script type='text/javascript' src='../fullcalendar/fullcalendar.min.js'></script>
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
<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.print.css' media='print' />
|
||||
<script type='text/javascript' src='../jquery/jquery.js'></script>
|
||||
<script type='text/javascript' src='../jquery/jquery-ui.js'></script>
|
||||
<script type='text/javascript' src='../fullcalendar/fullcalendar.min.js'></script>
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
<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.print.css' media='print' />
|
||||
<script type='text/javascript' src='../jquery/jquery.js'></script>
|
||||
<script type='text/javascript' src='../jquery/jquery-ui.js'></script>
|
||||
<script type='text/javascript' src='../fullcalendar/fullcalendar.min.js'></script>
|
||||
|
@ -17,7 +18,7 @@
|
|||
$('#calendar').fullCalendar({
|
||||
|
||||
// US Holidays
|
||||
events: $.fullCalendar.gcalFeed('http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic'),
|
||||
events: 'http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic',
|
||||
|
||||
eventClick: function(event) {
|
||||
// opens events in a popup window
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
<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.print.css' media='print' />
|
||||
<script type='text/javascript' src='../jquery/jquery.js'></script>
|
||||
<script type='text/javascript' src='../jquery/jquery-ui.js'></script>
|
||||
<script type='text/javascript' src='../fullcalendar/fullcalendar.min.js'></script>
|
||||
|
|
Before Width: | Height: | Size: 180 B |
Before Width: | Height: | Size: 182 B |
Before Width: | Height: | Size: 124 B |
Before Width: | Height: | Size: 123 B |
Before Width: | Height: | Size: 119 B |
Before Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 104 B |
Before Width: | Height: | Size: 88 B |
Before Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.3 KiB |
|
@ -4,6 +4,7 @@
|
|||
<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.print.css' media='print' />
|
||||
<script type='text/javascript' src='../jquery/jquery.js'></script>
|
||||
<script type='text/javascript' src='../jquery/jquery-ui.js'></script>
|
||||
<script type='text/javascript' src='../fullcalendar/fullcalendar.min.js'></script>
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<link rel='stylesheet' type='text/css' href='redmond/theme.css' />
|
||||
<link rel='stylesheet' type='text/css' href='cupertino/theme.css' />
|
||||
<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.print.css' media='print' />
|
||||
<script type='text/javascript' src='../jquery/jquery.js'></script>
|
||||
<script type='text/javascript' src='../jquery/jquery-ui.js'></script>
|
||||
<script type='text/javascript' src='../fullcalendar/fullcalendar.min.js'></script>
|
||||
|
|
167
lib/jquery-1.4.4.min.js
vendored
|
@ -1,167 +0,0 @@
|
|||
/*!
|
||||
* jQuery JavaScript Library v1.4.4
|
||||
* http://jquery.com/
|
||||
*
|
||||
* Copyright 2010, John Resig
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* Includes Sizzle.js
|
||||
* http://sizzlejs.com/
|
||||
* Copyright 2010, The Dojo Foundation
|
||||
* Released under the MIT, BSD, and GPL Licenses.
|
||||
*
|
||||
* Date: Thu Nov 11 19:04:53 2010 -0500
|
||||
*/
|
||||
(function(E,B){function ka(a,b,d){if(d===B&&a.nodeType===1){d=a.getAttribute("data-"+b);if(typeof d==="string"){try{d=d==="true"?true:d==="false"?false:d==="null"?null:!c.isNaN(d)?parseFloat(d):Ja.test(d)?c.parseJSON(d):d}catch(e){}c.data(a,b,d)}else d=B}return d}function U(){return false}function ca(){return true}function la(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function Ka(a){var b,d,e,f,h,l,k,o,x,r,A,C=[];f=[];h=c.data(this,this.nodeType?"events":"__events__");if(typeof h==="function")h=
|
||||
h.events;if(!(a.liveFired===this||!h||!h.live||a.button&&a.type==="click")){if(a.namespace)A=RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)");a.liveFired=this;var J=h.live.slice(0);for(k=0;k<J.length;k++){h=J[k];h.origType.replace(X,"")===a.type?f.push(h.selector):J.splice(k--,1)}f=c(a.target).closest(f,a.currentTarget);o=0;for(x=f.length;o<x;o++){r=f[o];for(k=0;k<J.length;k++){h=J[k];if(r.selector===h.selector&&(!A||A.test(h.namespace))){l=r.elem;e=null;if(h.preType==="mouseenter"||
|
||||
h.preType==="mouseleave"){a.type=h.preType;e=c(a.relatedTarget).closest(h.selector)[0]}if(!e||e!==l)C.push({elem:l,handleObj:h,level:r.level})}}}o=0;for(x=C.length;o<x;o++){f=C[o];if(d&&f.level>d)break;a.currentTarget=f.elem;a.data=f.handleObj.data;a.handleObj=f.handleObj;A=f.handleObj.origHandler.apply(f.elem,arguments);if(A===false||a.isPropagationStopped()){d=f.level;if(A===false)b=false;if(a.isImmediatePropagationStopped())break}}return b}}function Y(a,b){return(a&&a!=="*"?a+".":"")+b.replace(La,
|
||||
"`").replace(Ma,"&")}function ma(a,b,d){if(c.isFunction(b))return c.grep(a,function(f,h){return!!b.call(f,h,f)===d});else if(b.nodeType)return c.grep(a,function(f){return f===b===d});else if(typeof b==="string"){var e=c.grep(a,function(f){return f.nodeType===1});if(Na.test(b))return c.filter(b,e,!d);else b=c.filter(b,e)}return c.grep(a,function(f){return c.inArray(f,b)>=0===d})}function na(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var e=c.data(a[d++]),f=c.data(this,
|
||||
e);if(e=e&&e.events){delete f.handle;f.events={};for(var h in e)for(var l in e[h])c.event.add(this,h,e[h][l],e[h][l].data)}}})}function Oa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function oa(a,b,d){var e=b==="width"?a.offsetWidth:a.offsetHeight;if(d==="border")return e;c.each(b==="width"?Pa:Qa,function(){d||(e-=parseFloat(c.css(a,"padding"+this))||0);if(d==="margin")e+=parseFloat(c.css(a,
|
||||
"margin"+this))||0;else e-=parseFloat(c.css(a,"border"+this+"Width"))||0});return e}function da(a,b,d,e){if(c.isArray(b)&&b.length)c.each(b,function(f,h){d||Ra.test(a)?e(a,h):da(a+"["+(typeof h==="object"||c.isArray(h)?f:"")+"]",h,d,e)});else if(!d&&b!=null&&typeof b==="object")c.isEmptyObject(b)?e(a,""):c.each(b,function(f,h){da(a+"["+f+"]",h,d,e)});else e(a,b)}function S(a,b){var d={};c.each(pa.concat.apply([],pa.slice(0,b)),function(){d[this]=a});return d}function qa(a){if(!ea[a]){var b=c("<"+
|
||||
a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d==="")d="block";ea[a]=d}return ea[a]}function fa(a){return c.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var t=E.document,c=function(){function a(){if(!b.isReady){try{t.documentElement.doScroll("left")}catch(j){setTimeout(a,1);return}b.ready()}}var b=function(j,s){return new b.fn.init(j,s)},d=E.jQuery,e=E.$,f,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,l=/\S/,k=/^\s+/,o=/\s+$/,x=/\W/,r=/\d/,A=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,
|
||||
C=/^[\],:{}\s]*$/,J=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,w=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,I=/(?:^|:|,)(?:\s*\[)+/g,L=/(webkit)[ \/]([\w.]+)/,g=/(opera)(?:.*version)?[ \/]([\w.]+)/,i=/(msie) ([\w.]+)/,n=/(mozilla)(?:.*? rv:([\w.]+))?/,m=navigator.userAgent,p=false,q=[],u,y=Object.prototype.toString,F=Object.prototype.hasOwnProperty,M=Array.prototype.push,N=Array.prototype.slice,O=String.prototype.trim,D=Array.prototype.indexOf,R={};b.fn=b.prototype={init:function(j,
|
||||
s){var v,z,H;if(!j)return this;if(j.nodeType){this.context=this[0]=j;this.length=1;return this}if(j==="body"&&!s&&t.body){this.context=t;this[0]=t.body;this.selector="body";this.length=1;return this}if(typeof j==="string")if((v=h.exec(j))&&(v[1]||!s))if(v[1]){H=s?s.ownerDocument||s:t;if(z=A.exec(j))if(b.isPlainObject(s)){j=[t.createElement(z[1])];b.fn.attr.call(j,s,true)}else j=[H.createElement(z[1])];else{z=b.buildFragment([v[1]],[H]);j=(z.cacheable?z.fragment.cloneNode(true):z.fragment).childNodes}return b.merge(this,
|
||||
j)}else{if((z=t.getElementById(v[2]))&&z.parentNode){if(z.id!==v[2])return f.find(j);this.length=1;this[0]=z}this.context=t;this.selector=j;return this}else if(!s&&!x.test(j)){this.selector=j;this.context=t;j=t.getElementsByTagName(j);return b.merge(this,j)}else return!s||s.jquery?(s||f).find(j):b(s).find(j);else if(b.isFunction(j))return f.ready(j);if(j.selector!==B){this.selector=j.selector;this.context=j.context}return b.makeArray(j,this)},selector:"",jquery:"1.4.4",length:0,size:function(){return this.length},
|
||||
toArray:function(){return N.call(this,0)},get:function(j){return j==null?this.toArray():j<0?this.slice(j)[0]:this[j]},pushStack:function(j,s,v){var z=b();b.isArray(j)?M.apply(z,j):b.merge(z,j);z.prevObject=this;z.context=this.context;if(s==="find")z.selector=this.selector+(this.selector?" ":"")+v;else if(s)z.selector=this.selector+"."+s+"("+v+")";return z},each:function(j,s){return b.each(this,j,s)},ready:function(j){b.bindReady();if(b.isReady)j.call(t,b);else q&&q.push(j);return this},eq:function(j){return j===
|
||||
-1?this.slice(j):this.slice(j,+j+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(N.apply(this,arguments),"slice",N.call(arguments).join(","))},map:function(j){return this.pushStack(b.map(this,function(s,v){return j.call(s,v,s)}))},end:function(){return this.prevObject||b(null)},push:M,sort:[].sort,splice:[].splice};b.fn.init.prototype=b.fn;b.extend=b.fn.extend=function(){var j,s,v,z,H,G=arguments[0]||{},K=1,Q=arguments.length,ga=false;
|
||||
if(typeof G==="boolean"){ga=G;G=arguments[1]||{};K=2}if(typeof G!=="object"&&!b.isFunction(G))G={};if(Q===K){G=this;--K}for(;K<Q;K++)if((j=arguments[K])!=null)for(s in j){v=G[s];z=j[s];if(G!==z)if(ga&&z&&(b.isPlainObject(z)||(H=b.isArray(z)))){if(H){H=false;v=v&&b.isArray(v)?v:[]}else v=v&&b.isPlainObject(v)?v:{};G[s]=b.extend(ga,v,z)}else if(z!==B)G[s]=z}return G};b.extend({noConflict:function(j){E.$=e;if(j)E.jQuery=d;return b},isReady:false,readyWait:1,ready:function(j){j===true&&b.readyWait--;
|
||||
if(!b.readyWait||j!==true&&!b.isReady){if(!t.body)return setTimeout(b.ready,1);b.isReady=true;if(!(j!==true&&--b.readyWait>0))if(q){var s=0,v=q;for(q=null;j=v[s++];)j.call(t,b);b.fn.trigger&&b(t).trigger("ready").unbind("ready")}}},bindReady:function(){if(!p){p=true;if(t.readyState==="complete")return setTimeout(b.ready,1);if(t.addEventListener){t.addEventListener("DOMContentLoaded",u,false);E.addEventListener("load",b.ready,false)}else if(t.attachEvent){t.attachEvent("onreadystatechange",u);E.attachEvent("onload",
|
||||
b.ready);var j=false;try{j=E.frameElement==null}catch(s){}t.documentElement.doScroll&&j&&a()}}},isFunction:function(j){return b.type(j)==="function"},isArray:Array.isArray||function(j){return b.type(j)==="array"},isWindow:function(j){return j&&typeof j==="object"&&"setInterval"in j},isNaN:function(j){return j==null||!r.test(j)||isNaN(j)},type:function(j){return j==null?String(j):R[y.call(j)]||"object"},isPlainObject:function(j){if(!j||b.type(j)!=="object"||j.nodeType||b.isWindow(j))return false;if(j.constructor&&
|
||||
!F.call(j,"constructor")&&!F.call(j.constructor.prototype,"isPrototypeOf"))return false;for(var s in j);return s===B||F.call(j,s)},isEmptyObject:function(j){for(var s in j)return false;return true},error:function(j){throw j;},parseJSON:function(j){if(typeof j!=="string"||!j)return null;j=b.trim(j);if(C.test(j.replace(J,"@").replace(w,"]").replace(I,"")))return E.JSON&&E.JSON.parse?E.JSON.parse(j):(new Function("return "+j))();else b.error("Invalid JSON: "+j)},noop:function(){},globalEval:function(j){if(j&&
|
||||
l.test(j)){var s=t.getElementsByTagName("head")[0]||t.documentElement,v=t.createElement("script");v.type="text/javascript";if(b.support.scriptEval)v.appendChild(t.createTextNode(j));else v.text=j;s.insertBefore(v,s.firstChild);s.removeChild(v)}},nodeName:function(j,s){return j.nodeName&&j.nodeName.toUpperCase()===s.toUpperCase()},each:function(j,s,v){var z,H=0,G=j.length,K=G===B||b.isFunction(j);if(v)if(K)for(z in j){if(s.apply(j[z],v)===false)break}else for(;H<G;){if(s.apply(j[H++],v)===false)break}else if(K)for(z in j){if(s.call(j[z],
|
||||
z,j[z])===false)break}else for(v=j[0];H<G&&s.call(v,H,v)!==false;v=j[++H]);return j},trim:O?function(j){return j==null?"":O.call(j)}:function(j){return j==null?"":j.toString().replace(k,"").replace(o,"")},makeArray:function(j,s){var v=s||[];if(j!=null){var z=b.type(j);j.length==null||z==="string"||z==="function"||z==="regexp"||b.isWindow(j)?M.call(v,j):b.merge(v,j)}return v},inArray:function(j,s){if(s.indexOf)return s.indexOf(j);for(var v=0,z=s.length;v<z;v++)if(s[v]===j)return v;return-1},merge:function(j,
|
||||
s){var v=j.length,z=0;if(typeof s.length==="number")for(var H=s.length;z<H;z++)j[v++]=s[z];else for(;s[z]!==B;)j[v++]=s[z++];j.length=v;return j},grep:function(j,s,v){var z=[],H;v=!!v;for(var G=0,K=j.length;G<K;G++){H=!!s(j[G],G);v!==H&&z.push(j[G])}return z},map:function(j,s,v){for(var z=[],H,G=0,K=j.length;G<K;G++){H=s(j[G],G,v);if(H!=null)z[z.length]=H}return z.concat.apply([],z)},guid:1,proxy:function(j,s,v){if(arguments.length===2)if(typeof s==="string"){v=j;j=v[s];s=B}else if(s&&!b.isFunction(s)){v=
|
||||
s;s=B}if(!s&&j)s=function(){return j.apply(v||this,arguments)};if(j)s.guid=j.guid=j.guid||s.guid||b.guid++;return s},access:function(j,s,v,z,H,G){var K=j.length;if(typeof s==="object"){for(var Q in s)b.access(j,Q,s[Q],z,H,v);return j}if(v!==B){z=!G&&z&&b.isFunction(v);for(Q=0;Q<K;Q++)H(j[Q],s,z?v.call(j[Q],Q,H(j[Q],s)):v,G);return j}return K?H(j[0],s):B},now:function(){return(new Date).getTime()},uaMatch:function(j){j=j.toLowerCase();j=L.exec(j)||g.exec(j)||i.exec(j)||j.indexOf("compatible")<0&&n.exec(j)||
|
||||
[];return{browser:j[1]||"",version:j[2]||"0"}},browser:{}});b.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(j,s){R["[object "+s+"]"]=s.toLowerCase()});m=b.uaMatch(m);if(m.browser){b.browser[m.browser]=true;b.browser.version=m.version}if(b.browser.webkit)b.browser.safari=true;if(D)b.inArray=function(j,s){return D.call(s,j)};if(!/\s/.test("\u00a0")){k=/^[\s\xA0]+/;o=/[\s\xA0]+$/}f=b(t);if(t.addEventListener)u=function(){t.removeEventListener("DOMContentLoaded",u,
|
||||
false);b.ready()};else if(t.attachEvent)u=function(){if(t.readyState==="complete"){t.detachEvent("onreadystatechange",u);b.ready()}};return E.jQuery=E.$=b}();(function(){c.support={};var a=t.documentElement,b=t.createElement("script"),d=t.createElement("div"),e="script"+c.now();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var f=d.getElementsByTagName("*"),h=d.getElementsByTagName("a")[0],l=t.createElement("select"),
|
||||
k=l.appendChild(t.createElement("option"));if(!(!f||!f.length||!h)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(h.getAttribute("style")),hrefNormalized:h.getAttribute("href")==="/a",opacity:/^0.55$/.test(h.style.opacity),cssFloat:!!h.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:k.selected,deleteExpando:true,optDisabled:false,checkClone:false,
|
||||
scriptEval:false,noCloneEvent:true,boxModel:null,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableHiddenOffsets:true};l.disabled=true;c.support.optDisabled=!k.disabled;b.type="text/javascript";try{b.appendChild(t.createTextNode("window."+e+"=1;"))}catch(o){}a.insertBefore(b,a.firstChild);if(E[e]){c.support.scriptEval=true;delete E[e]}try{delete b.test}catch(x){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function r(){c.support.noCloneEvent=
|
||||
false;d.detachEvent("onclick",r)});d.cloneNode(true).fireEvent("onclick")}d=t.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=t.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var r=t.createElement("div");r.style.width=r.style.paddingLeft="1px";t.body.appendChild(r);c.boxModel=c.support.boxModel=r.offsetWidth===2;if("zoom"in r.style){r.style.display="inline";r.style.zoom=
|
||||
1;c.support.inlineBlockNeedsLayout=r.offsetWidth===2;r.style.display="";r.innerHTML="<div style='width:4px;'></div>";c.support.shrinkWrapBlocks=r.offsetWidth!==2}r.innerHTML="<table><tr><td style='padding:0;display:none'></td><td>t</td></tr></table>";var A=r.getElementsByTagName("td");c.support.reliableHiddenOffsets=A[0].offsetHeight===0;A[0].style.display="";A[1].style.display="none";c.support.reliableHiddenOffsets=c.support.reliableHiddenOffsets&&A[0].offsetHeight===0;r.innerHTML="";t.body.removeChild(r).style.display=
|
||||
"none"});a=function(r){var A=t.createElement("div");r="on"+r;var C=r in A;if(!C){A.setAttribute(r,"return;");C=typeof A[r]==="function"}return C};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=f=h=null}})();var ra={},Ja=/^(?:\{.*\}|\[.*\])$/;c.extend({cache:{},uuid:0,expando:"jQuery"+c.now(),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},data:function(a,b,d){if(c.acceptData(a)){a=a==E?ra:a;var e=a.nodeType,f=e?a[c.expando]:null,h=
|
||||
c.cache;if(!(e&&!f&&typeof b==="string"&&d===B)){if(e)f||(a[c.expando]=f=++c.uuid);else h=a;if(typeof b==="object")if(e)h[f]=c.extend(h[f],b);else c.extend(h,b);else if(e&&!h[f])h[f]={};a=e?h[f]:h;if(d!==B)a[b]=d;return typeof b==="string"?a[b]:a}}},removeData:function(a,b){if(c.acceptData(a)){a=a==E?ra:a;var d=a.nodeType,e=d?a[c.expando]:a,f=c.cache,h=d?f[e]:e;if(b){if(h){delete h[b];d&&c.isEmptyObject(h)&&c.removeData(a)}}else if(d&&c.support.deleteExpando)delete a[c.expando];else if(a.removeAttribute)a.removeAttribute(c.expando);
|
||||
else if(d)delete f[e];else for(var l in a)delete a[l]}},acceptData:function(a){if(a.nodeName){var b=c.noData[a.nodeName.toLowerCase()];if(b)return!(b===true||a.getAttribute("classid")!==b)}return true}});c.fn.extend({data:function(a,b){var d=null;if(typeof a==="undefined"){if(this.length){var e=this[0].attributes,f;d=c.data(this[0]);for(var h=0,l=e.length;h<l;h++){f=e[h].name;if(f.indexOf("data-")===0){f=f.substr(5);ka(this[0],f,d[f])}}}return d}else if(typeof a==="object")return this.each(function(){c.data(this,
|
||||
a)});var k=a.split(".");k[1]=k[1]?"."+k[1]:"";if(b===B){d=this.triggerHandler("getData"+k[1]+"!",[k[0]]);if(d===B&&this.length){d=c.data(this[0],a);d=ka(this[0],a,d)}return d===B&&k[1]?this.data(k[0]):d}else return this.each(function(){var o=c(this),x=[k[0],b];o.triggerHandler("setData"+k[1]+"!",x);c.data(this,a,b);o.triggerHandler("changeData"+k[1]+"!",x)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var e=
|
||||
c.data(a,b);if(!d)return e||[];if(!e||c.isArray(d))e=c.data(a,b,c.makeArray(d));else e.push(d);return e}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),e=d.shift();if(e==="inprogress")e=d.shift();if(e){b==="fx"&&d.unshift("inprogress");e.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===B)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,
|
||||
a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var sa=/[\n\t]/g,ha=/\s+/,Sa=/\r/g,Ta=/^(?:href|src|style)$/,Ua=/^(?:button|input)$/i,Va=/^(?:button|input|object|select|textarea)$/i,Wa=/^a(?:rea)?$/i,ta=/^(?:radio|checkbox)$/i;c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",
|
||||
colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};c.fn.extend({attr:function(a,b){return c.access(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(x){var r=c(this);r.addClass(a.call(this,x,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ha),d=0,e=this.length;d<e;d++){var f=this[d];if(f.nodeType===
|
||||
1)if(f.className){for(var h=" "+f.className+" ",l=f.className,k=0,o=b.length;k<o;k++)if(h.indexOf(" "+b[k]+" ")<0)l+=" "+b[k];f.className=c.trim(l)}else f.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(o){var x=c(this);x.removeClass(a.call(this,o,x.attr("class")))});if(a&&typeof a==="string"||a===B)for(var b=(a||"").split(ha),d=0,e=this.length;d<e;d++){var f=this[d];if(f.nodeType===1&&f.className)if(a){for(var h=(" "+f.className+" ").replace(sa," "),
|
||||
l=0,k=b.length;l<k;l++)h=h.replace(" "+b[l]+" "," ");f.className=c.trim(h)}else f.className=""}return this},toggleClass:function(a,b){var d=typeof a,e=typeof b==="boolean";if(c.isFunction(a))return this.each(function(f){var h=c(this);h.toggleClass(a.call(this,f,h.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var f,h=0,l=c(this),k=b,o=a.split(ha);f=o[h++];){k=e?k:!l.hasClass(f);l[k?"addClass":"removeClass"](f)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,
|
||||
"__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(sa," ").indexOf(a)>-1)return true;return false},val:function(a){if(!arguments.length){var b=this[0];if(b){if(c.nodeName(b,"option")){var d=b.attributes.value;return!d||d.specified?b.value:b.text}if(c.nodeName(b,"select")){var e=b.selectedIndex;d=[];var f=b.options;b=b.type==="select-one";
|
||||
if(e<0)return null;var h=b?e:0;for(e=b?e+1:f.length;h<e;h++){var l=f[h];if(l.selected&&(c.support.optDisabled?!l.disabled:l.getAttribute("disabled")===null)&&(!l.parentNode.disabled||!c.nodeName(l.parentNode,"optgroup"))){a=c(l).val();if(b)return a;d.push(a)}}return d}if(ta.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Sa,"")}return B}var k=c.isFunction(a);return this.each(function(o){var x=c(this),r=a;if(this.nodeType===1){if(k)r=
|
||||
a.call(this,o,x.val());if(r==null)r="";else if(typeof r==="number")r+="";else if(c.isArray(r))r=c.map(r,function(C){return C==null?"":C+""});if(c.isArray(r)&&ta.test(this.type))this.checked=c.inArray(x.val(),r)>=0;else if(c.nodeName(this,"select")){var A=c.makeArray(r);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),A)>=0});if(!A.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},
|
||||
attr:function(a,b,d,e){if(!a||a.nodeType===3||a.nodeType===8)return B;if(e&&b in c.attrFn)return c(a)[b](d);e=a.nodeType!==1||!c.isXMLDoc(a);var f=d!==B;b=e&&c.props[b]||b;var h=Ta.test(b);if((b in a||a[b]!==B)&&e&&!h){if(f){b==="type"&&Ua.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");if(d===null)a.nodeType===1&&a.removeAttribute(b);else a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&
|
||||
b.specified?b.value:Va.test(a.nodeName)||Wa.test(a.nodeName)&&a.href?0:B;return a[b]}if(!c.support.style&&e&&b==="style"){if(f)a.style.cssText=""+d;return a.style.cssText}f&&a.setAttribute(b,""+d);if(!a.attributes[b]&&a.hasAttribute&&!a.hasAttribute(b))return B;a=!c.support.hrefNormalized&&e&&h?a.getAttribute(b,2):a.getAttribute(b);return a===null?B:a}});var X=/\.(.*)$/,ia=/^(?:textarea|input|select)$/i,La=/\./g,Ma=/ /g,Xa=/[^\w\s.|`]/g,Ya=function(a){return a.replace(Xa,"\\$&")},ua={focusin:0,focusout:0};
|
||||
c.event={add:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(c.isWindow(a)&&a!==E&&!a.frameElement)a=E;if(d===false)d=U;else if(!d)return;var f,h;if(d.handler){f=d;d=f.handler}if(!d.guid)d.guid=c.guid++;if(h=c.data(a)){var l=a.nodeType?"events":"__events__",k=h[l],o=h.handle;if(typeof k==="function"){o=k.handle;k=k.events}else if(!k){a.nodeType||(h[l]=h=function(){});h.events=k={}}if(!o)h.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,
|
||||
arguments):B};o.elem=a;b=b.split(" ");for(var x=0,r;l=b[x++];){h=f?c.extend({},f):{handler:d,data:e};if(l.indexOf(".")>-1){r=l.split(".");l=r.shift();h.namespace=r.slice(0).sort().join(".")}else{r=[];h.namespace=""}h.type=l;if(!h.guid)h.guid=d.guid;var A=k[l],C=c.event.special[l]||{};if(!A){A=k[l]=[];if(!C.setup||C.setup.call(a,e,r,o)===false)if(a.addEventListener)a.addEventListener(l,o,false);else a.attachEvent&&a.attachEvent("on"+l,o)}if(C.add){C.add.call(a,h);if(!h.handler.guid)h.handler.guid=
|
||||
d.guid}A.push(h);c.event.global[l]=true}a=null}}},global:{},remove:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(d===false)d=U;var f,h,l=0,k,o,x,r,A,C,J=a.nodeType?"events":"__events__",w=c.data(a),I=w&&w[J];if(w&&I){if(typeof I==="function"){w=I;I=I.events}if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(f in I)c.event.remove(a,f+b)}else{for(b=b.split(" ");f=b[l++];){r=f;k=f.indexOf(".")<0;o=[];if(!k){o=f.split(".");f=o.shift();x=RegExp("(^|\\.)"+
|
||||
c.map(o.slice(0).sort(),Ya).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(A=I[f])if(d){r=c.event.special[f]||{};for(h=e||0;h<A.length;h++){C=A[h];if(d.guid===C.guid){if(k||x.test(C.namespace)){e==null&&A.splice(h--,1);r.remove&&r.remove.call(a,C)}if(e!=null)break}}if(A.length===0||e!=null&&A.length===1){if(!r.teardown||r.teardown.call(a,o)===false)c.removeEvent(a,f,w.handle);delete I[f]}}else for(h=0;h<A.length;h++){C=A[h];if(k||x.test(C.namespace)){c.event.remove(a,r,C.handler,h);A.splice(h--,1)}}}if(c.isEmptyObject(I)){if(b=
|
||||
w.handle)b.elem=null;delete w.events;delete w.handle;if(typeof w==="function")c.removeData(a,J);else c.isEmptyObject(w)&&c.removeData(a)}}}}},trigger:function(a,b,d,e){var f=a.type||a;if(!e){a=typeof a==="object"?a[c.expando]?a:c.extend(c.Event(f),a):c.Event(f);if(f.indexOf("!")>=0){a.type=f=f.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[f]&&c.each(c.cache,function(){this.events&&this.events[f]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===
|
||||
8)return B;a.result=B;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(e=d.nodeType?c.data(d,"handle"):(c.data(d,"__events__")||{}).handle)&&e.apply(d,b);e=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+f]&&d["on"+f].apply(d,b)===false){a.result=false;a.preventDefault()}}catch(h){}if(!a.isPropagationStopped()&&e)c.event.trigger(a,b,e,true);else if(!a.isDefaultPrevented()){var l;e=a.target;var k=f.replace(X,""),o=c.nodeName(e,"a")&&k===
|
||||
"click",x=c.event.special[k]||{};if((!x._default||x._default.call(d,a)===false)&&!o&&!(e&&e.nodeName&&c.noData[e.nodeName.toLowerCase()])){try{if(e[k]){if(l=e["on"+k])e["on"+k]=null;c.event.triggered=true;e[k]()}}catch(r){}if(l)e["on"+k]=l;c.event.triggered=false}}},handle:function(a){var b,d,e,f;d=[];var h=c.makeArray(arguments);a=h[0]=c.event.fix(a||E.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;if(!b){e=a.type.split(".");a.type=e.shift();d=e.slice(0).sort();e=RegExp("(^|\\.)"+
|
||||
d.join("\\.(?:.*\\.)?")+"(\\.|$)")}a.namespace=a.namespace||d.join(".");f=c.data(this,this.nodeType?"events":"__events__");if(typeof f==="function")f=f.events;d=(f||{})[a.type];if(f&&d){d=d.slice(0);f=0;for(var l=d.length;f<l;f++){var k=d[f];if(b||e.test(k.namespace)){a.handler=k.handler;a.data=k.data;a.handleObj=k;k=k.handler.apply(this,h);if(k!==B){a.result=k;if(k===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
|
||||
fix:function(a){if(a[c.expando])return a;var b=a;a=c.Event(b);for(var d=this.props.length,e;d;){e=this.props[--d];a[e]=b[e]}if(!a.target)a.target=a.srcElement||t;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=t.documentElement;d=t.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||
|
||||
d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(a.which==null&&(a.charCode!=null||a.keyCode!=null))a.which=a.charCode!=null?a.charCode:a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==B)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,Y(a.origType,a.selector),c.extend({},a,{handler:Ka,guid:a.handler.guid}))},remove:function(a){c.event.remove(this,
|
||||
Y(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,d){if(c.isWindow(this))this.onbeforeunload=d},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};c.removeEvent=t.removeEventListener?function(a,b,d){a.removeEventListener&&a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent&&a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=
|
||||
c.now();this[c.expando]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=ca;var a=this.originalEvent;if(a)if(a.preventDefault)a.preventDefault();else a.returnValue=false},stopPropagation:function(){this.isPropagationStopped=ca;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=ca;this.stopPropagation()},isDefaultPrevented:U,isPropagationStopped:U,isImmediatePropagationStopped:U};
|
||||
var va=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},wa=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?wa:va,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?wa:va)}}});if(!c.support.submitBubbles)c.event.special.submit={setup:function(){if(this.nodeName.toLowerCase()!==
|
||||
"form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length){a.liveFired=B;return la("submit",this,arguments)}});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13){a.liveFired=B;return la("submit",this,arguments)}})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};if(!c.support.changeBubbles){var V,
|
||||
xa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(e){return e.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},Z=function(a,b){var d=a.target,e,f;if(!(!ia.test(d.nodeName)||d.readOnly)){e=c.data(d,"_change_data");f=xa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",f);if(!(e===B||f===e))if(e!=null||f){a.type="change";a.liveFired=
|
||||
B;return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:Z,beforedeactivate:Z,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return Z.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return Z.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,"_change_data",xa(a))}},setup:function(){if(this.type===
|
||||
"file")return false;for(var a in V)c.event.add(this,a+".specialChange",V[a]);return ia.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return ia.test(this.nodeName)}};V=c.event.special.change.filters;V.focus=V.beforeactivate}t.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(e){e=c.event.fix(e);e.type=b;return c.event.trigger(e,null,e.target)}c.event.special[b]={setup:function(){ua[b]++===0&&t.addEventListener(a,d,true)},teardown:function(){--ua[b]===
|
||||
0&&t.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,e,f){if(typeof d==="object"){for(var h in d)this[b](h,e,d[h],f);return this}if(c.isFunction(e)||e===false){f=e;e=B}var l=b==="one"?c.proxy(f,function(o){c(this).unbind(o,l);return f.apply(this,arguments)}):f;if(d==="unload"&&b!=="one")this.one(d,e,f);else{h=0;for(var k=this.length;h<k;h++)c.event.add(this[h],d,l,e)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault)for(var d in a)this.unbind(d,
|
||||
a[d]);else{d=0;for(var e=this.length;d<e;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,e){return this.live(b,d,e,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){var d=c.Event(a);d.preventDefault();d.stopPropagation();c.event.trigger(d,b,this[0]);return d.result}},toggle:function(a){for(var b=arguments,d=
|
||||
1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(e){var f=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,f+1);e.preventDefault();return b[f].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var ya={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,e,f,h){var l,k=0,o,x,r=h||this.selector;h=h?this:c(this.context);if(typeof d===
|
||||
"object"&&!d.preventDefault){for(l in d)h[b](l,e,d[l],r);return this}if(c.isFunction(e)){f=e;e=B}for(d=(d||"").split(" ");(l=d[k++])!=null;){o=X.exec(l);x="";if(o){x=o[0];l=l.replace(X,"")}if(l==="hover")d.push("mouseenter"+x,"mouseleave"+x);else{o=l;if(l==="focus"||l==="blur"){d.push(ya[l]+x);l+=x}else l=(ya[l]||l)+x;if(b==="live"){x=0;for(var A=h.length;x<A;x++)c.event.add(h[x],"live."+Y(l,r),{data:e,selector:r,handler:f,origType:l,origHandler:f,preType:o})}else h.unbind("live."+Y(l,r),f)}}return this}});
|
||||
c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){c.fn[b]=function(d,e){if(e==null){e=d;d=null}return arguments.length>0?this.bind(b,d,e):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});E.attachEvent&&!E.addEventListener&&c(E).bind("unload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});
|
||||
(function(){function a(g,i,n,m,p,q){p=0;for(var u=m.length;p<u;p++){var y=m[p];if(y){var F=false;for(y=y[g];y;){if(y.sizcache===n){F=m[y.sizset];break}if(y.nodeType===1&&!q){y.sizcache=n;y.sizset=p}if(y.nodeName.toLowerCase()===i){F=y;break}y=y[g]}m[p]=F}}}function b(g,i,n,m,p,q){p=0;for(var u=m.length;p<u;p++){var y=m[p];if(y){var F=false;for(y=y[g];y;){if(y.sizcache===n){F=m[y.sizset];break}if(y.nodeType===1){if(!q){y.sizcache=n;y.sizset=p}if(typeof i!=="string"){if(y===i){F=true;break}}else if(k.filter(i,
|
||||
[y]).length>0){F=y;break}}y=y[g]}m[p]=F}}}var d=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,h=false,l=true;[0,0].sort(function(){l=false;return 0});var k=function(g,i,n,m){n=n||[];var p=i=i||t;if(i.nodeType!==1&&i.nodeType!==9)return[];if(!g||typeof g!=="string")return n;var q,u,y,F,M,N=true,O=k.isXML(i),D=[],R=g;do{d.exec("");if(q=d.exec(R)){R=q[3];D.push(q[1]);if(q[2]){F=q[3];
|
||||
break}}}while(q);if(D.length>1&&x.exec(g))if(D.length===2&&o.relative[D[0]])u=L(D[0]+D[1],i);else for(u=o.relative[D[0]]?[i]:k(D.shift(),i);D.length;){g=D.shift();if(o.relative[g])g+=D.shift();u=L(g,u)}else{if(!m&&D.length>1&&i.nodeType===9&&!O&&o.match.ID.test(D[0])&&!o.match.ID.test(D[D.length-1])){q=k.find(D.shift(),i,O);i=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]}if(i){q=m?{expr:D.pop(),set:C(m)}:k.find(D.pop(),D.length===1&&(D[0]==="~"||D[0]==="+")&&i.parentNode?i.parentNode:i,O);u=q.expr?k.filter(q.expr,
|
||||
q.set):q.set;if(D.length>0)y=C(u);else N=false;for(;D.length;){q=M=D.pop();if(o.relative[M])q=D.pop();else M="";if(q==null)q=i;o.relative[M](y,q,O)}}else y=[]}y||(y=u);y||k.error(M||g);if(f.call(y)==="[object Array]")if(N)if(i&&i.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&k.contains(i,y[g])))n.push(u[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&n.push(u[g]);else n.push.apply(n,y);else C(y,n);if(F){k(F,p,n,m);k.uniqueSort(n)}return n};k.uniqueSort=function(g){if(w){h=
|
||||
l;g.sort(w);if(h)for(var i=1;i<g.length;i++)g[i]===g[i-1]&&g.splice(i--,1)}return g};k.matches=function(g,i){return k(g,null,null,i)};k.matchesSelector=function(g,i){return k(i,null,null,[g]).length>0};k.find=function(g,i,n){var m;if(!g)return[];for(var p=0,q=o.order.length;p<q;p++){var u,y=o.order[p];if(u=o.leftMatch[y].exec(g)){var F=u[1];u.splice(1,1);if(F.substr(F.length-1)!=="\\"){u[1]=(u[1]||"").replace(/\\/g,"");m=o.find[y](u,i,n);if(m!=null){g=g.replace(o.match[y],"");break}}}}m||(m=i.getElementsByTagName("*"));
|
||||
return{set:m,expr:g}};k.filter=function(g,i,n,m){for(var p,q,u=g,y=[],F=i,M=i&&i[0]&&k.isXML(i[0]);g&&i.length;){for(var N in o.filter)if((p=o.leftMatch[N].exec(g))!=null&&p[2]){var O,D,R=o.filter[N];D=p[1];q=false;p.splice(1,1);if(D.substr(D.length-1)!=="\\"){if(F===y)y=[];if(o.preFilter[N])if(p=o.preFilter[N](p,F,n,y,m,M)){if(p===true)continue}else q=O=true;if(p)for(var j=0;(D=F[j])!=null;j++)if(D){O=R(D,p,j,F);var s=m^!!O;if(n&&O!=null)if(s)q=true;else F[j]=false;else if(s){y.push(D);q=true}}if(O!==
|
||||
B){n||(F=y);g=g.replace(o.match[N],"");if(!q)return[];break}}}if(g===u)if(q==null)k.error(g);else break;u=g}return F};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var o=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+\-]*)\))?/,
|
||||
POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},relative:{"+":function(g,i){var n=typeof i==="string",m=n&&!/\W/.test(i);n=n&&!m;if(m)i=i.toLowerCase();m=0;for(var p=g.length,q;m<p;m++)if(q=g[m]){for(;(q=q.previousSibling)&&q.nodeType!==1;);g[m]=n||q&&q.nodeName.toLowerCase()===
|
||||
i?q||false:q===i}n&&k.filter(i,g,true)},">":function(g,i){var n,m=typeof i==="string",p=0,q=g.length;if(m&&!/\W/.test(i))for(i=i.toLowerCase();p<q;p++){if(n=g[p]){n=n.parentNode;g[p]=n.nodeName.toLowerCase()===i?n:false}}else{for(;p<q;p++)if(n=g[p])g[p]=m?n.parentNode:n.parentNode===i;m&&k.filter(i,g,true)}},"":function(g,i,n){var m,p=e++,q=b;if(typeof i==="string"&&!/\W/.test(i)){m=i=i.toLowerCase();q=a}q("parentNode",i,p,g,m,n)},"~":function(g,i,n){var m,p=e++,q=b;if(typeof i==="string"&&!/\W/.test(i)){m=
|
||||
i=i.toLowerCase();q=a}q("previousSibling",i,p,g,m,n)}},find:{ID:function(g,i,n){if(typeof i.getElementById!=="undefined"&&!n)return(g=i.getElementById(g[1]))&&g.parentNode?[g]:[]},NAME:function(g,i){if(typeof i.getElementsByName!=="undefined"){for(var n=[],m=i.getElementsByName(g[1]),p=0,q=m.length;p<q;p++)m[p].getAttribute("name")===g[1]&&n.push(m[p]);return n.length===0?null:n}},TAG:function(g,i){return i.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,i,n,m,p,q){g=" "+g[1].replace(/\\/g,
|
||||
"")+" ";if(q)return g;q=0;for(var u;(u=i[q])!=null;q++)if(u)if(p^(u.className&&(" "+u.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))n||m.push(u);else if(n)i[q]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var i=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=i[1]+(i[2]||1)-0;g[3]=i[3]-0}g[0]=e++;return g},ATTR:function(g,i,n,
|
||||
m,p,q){i=g[1].replace(/\\/g,"");if(!q&&o.attrMap[i])g[1]=o.attrMap[i];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,i,n,m,p){if(g[1]==="not")if((d.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,i);else{g=k.filter(g[3],i,n,true^p);n||m.push.apply(m,g);return false}else if(o.match.POS.test(g[0])||o.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===
|
||||
true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,i,n){return!!k(n[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===
|
||||
g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,i){return i===0},last:function(g,i,n,m){return i===m.length-1},even:function(g,i){return i%2===0},odd:function(g,i){return i%2===1},lt:function(g,i,n){return i<n[3]-0},gt:function(g,i,n){return i>n[3]-0},nth:function(g,i,n){return n[3]-
|
||||
0===i},eq:function(g,i,n){return n[3]-0===i}},filter:{PSEUDO:function(g,i,n,m){var p=i[1],q=o.filters[p];if(q)return q(g,n,i,m);else if(p==="contains")return(g.textContent||g.innerText||k.getText([g])||"").indexOf(i[3])>=0;else if(p==="not"){i=i[3];n=0;for(m=i.length;n<m;n++)if(i[n]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+p)},CHILD:function(g,i){var n=i[1],m=g;switch(n){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(n===
|
||||
"first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":n=i[2];var p=i[3];if(n===1&&p===0)return true;var q=i[0],u=g.parentNode;if(u&&(u.sizcache!==q||!g.nodeIndex)){var y=0;for(m=u.firstChild;m;m=m.nextSibling)if(m.nodeType===1)m.nodeIndex=++y;u.sizcache=q}m=g.nodeIndex-p;return n===0?m===0:m%n===0&&m/n>=0}},ID:function(g,i){return g.nodeType===1&&g.getAttribute("id")===i},TAG:function(g,i){return i==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===
|
||||
i},CLASS:function(g,i){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(i)>-1},ATTR:function(g,i){var n=i[1];n=o.attrHandle[n]?o.attrHandle[n](g):g[n]!=null?g[n]:g.getAttribute(n);var m=n+"",p=i[2],q=i[4];return n==null?p==="!=":p==="="?m===q:p==="*="?m.indexOf(q)>=0:p==="~="?(" "+m+" ").indexOf(q)>=0:!q?m&&n!==false:p==="!="?m!==q:p==="^="?m.indexOf(q)===0:p==="$="?m.substr(m.length-q.length)===q:p==="|="?m===q||m.substr(0,q.length+1)===q+"-":false},POS:function(g,i,n,m){var p=o.setFilters[i[2]];
|
||||
if(p)return p(g,n,i,m)}}},x=o.match.POS,r=function(g,i){return"\\"+(i-0+1)},A;for(A in o.match){o.match[A]=RegExp(o.match[A].source+/(?![^\[]*\])(?![^\(]*\))/.source);o.leftMatch[A]=RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[A].source.replace(/\\(\d+)/g,r))}var C=function(g,i){g=Array.prototype.slice.call(g,0);if(i){i.push.apply(i,g);return i}return g};try{Array.prototype.slice.call(t.documentElement.childNodes,0)}catch(J){C=function(g,i){var n=0,m=i||[];if(f.call(g)==="[object Array]")Array.prototype.push.apply(m,
|
||||
g);else if(typeof g.length==="number")for(var p=g.length;n<p;n++)m.push(g[n]);else for(;g[n];n++)m.push(g[n]);return m}}var w,I;if(t.documentElement.compareDocumentPosition)w=function(g,i){if(g===i){h=true;return 0}if(!g.compareDocumentPosition||!i.compareDocumentPosition)return g.compareDocumentPosition?-1:1;return g.compareDocumentPosition(i)&4?-1:1};else{w=function(g,i){var n,m,p=[],q=[];n=g.parentNode;m=i.parentNode;var u=n;if(g===i){h=true;return 0}else if(n===m)return I(g,i);else if(n){if(!m)return 1}else return-1;
|
||||
for(;u;){p.unshift(u);u=u.parentNode}for(u=m;u;){q.unshift(u);u=u.parentNode}n=p.length;m=q.length;for(u=0;u<n&&u<m;u++)if(p[u]!==q[u])return I(p[u],q[u]);return u===n?I(g,q[u],-1):I(p[u],i,1)};I=function(g,i,n){if(g===i)return n;for(g=g.nextSibling;g;){if(g===i)return-1;g=g.nextSibling}return 1}}k.getText=function(g){for(var i="",n,m=0;g[m];m++){n=g[m];if(n.nodeType===3||n.nodeType===4)i+=n.nodeValue;else if(n.nodeType!==8)i+=k.getText(n.childNodes)}return i};(function(){var g=t.createElement("div"),
|
||||
i="script"+(new Date).getTime(),n=t.documentElement;g.innerHTML="<a name='"+i+"'/>";n.insertBefore(g,n.firstChild);if(t.getElementById(i)){o.find.ID=function(m,p,q){if(typeof p.getElementById!=="undefined"&&!q)return(p=p.getElementById(m[1]))?p.id===m[1]||typeof p.getAttributeNode!=="undefined"&&p.getAttributeNode("id").nodeValue===m[1]?[p]:B:[]};o.filter.ID=function(m,p){var q=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&q&&q.nodeValue===p}}n.removeChild(g);
|
||||
n=g=null})();(function(){var g=t.createElement("div");g.appendChild(t.createComment(""));if(g.getElementsByTagName("*").length>0)o.find.TAG=function(i,n){var m=n.getElementsByTagName(i[1]);if(i[1]==="*"){for(var p=[],q=0;m[q];q++)m[q].nodeType===1&&p.push(m[q]);m=p}return m};g.innerHTML="<a href='#'></a>";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")o.attrHandle.href=function(i){return i.getAttribute("href",2)};g=null})();t.querySelectorAll&&
|
||||
function(){var g=k,i=t.createElement("div");i.innerHTML="<p class='TEST'></p>";if(!(i.querySelectorAll&&i.querySelectorAll(".TEST").length===0)){k=function(m,p,q,u){p=p||t;m=m.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!u&&!k.isXML(p))if(p.nodeType===9)try{return C(p.querySelectorAll(m),q)}catch(y){}else if(p.nodeType===1&&p.nodeName.toLowerCase()!=="object"){var F=p.getAttribute("id"),M=F||"__sizzle__";F||p.setAttribute("id",M);try{return C(p.querySelectorAll("#"+M+" "+m),q)}catch(N){}finally{F||
|
||||
p.removeAttribute("id")}}return g(m,p,q,u)};for(var n in g)k[n]=g[n];i=null}}();(function(){var g=t.documentElement,i=g.matchesSelector||g.mozMatchesSelector||g.webkitMatchesSelector||g.msMatchesSelector,n=false;try{i.call(t.documentElement,"[test!='']:sizzle")}catch(m){n=true}if(i)k.matchesSelector=function(p,q){q=q.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(p))try{if(n||!o.match.PSEUDO.test(q)&&!/!=/.test(q))return i.call(p,q)}catch(u){}return k(q,null,null,[p]).length>0}})();(function(){var g=
|
||||
t.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){o.order.splice(1,0,"CLASS");o.find.CLASS=function(i,n,m){if(typeof n.getElementsByClassName!=="undefined"&&!m)return n.getElementsByClassName(i[1])};g=null}}})();k.contains=t.documentElement.contains?function(g,i){return g!==i&&(g.contains?g.contains(i):true)}:t.documentElement.compareDocumentPosition?
|
||||
function(g,i){return!!(g.compareDocumentPosition(i)&16)}:function(){return false};k.isXML=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false};var L=function(g,i){for(var n,m=[],p="",q=i.nodeType?[i]:i;n=o.match.PSEUDO.exec(g);){p+=n[0];g=g.replace(o.match.PSEUDO,"")}g=o.relative[g]?g+"*":g;n=0;for(var u=q.length;n<u;n++)k(g,q[n],m);return k.filter(p,m)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=k.getText;c.isXMLDoc=k.isXML;
|
||||
c.contains=k.contains})();var Za=/Until$/,$a=/^(?:parents|prevUntil|prevAll)/,ab=/,/,Na=/^.[^:#\[\.,]*$/,bb=Array.prototype.slice,cb=c.expr.match.POS;c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,e=0,f=this.length;e<f;e++){d=b.length;c.find(a,this[e],b);if(e>0)for(var h=d;h<b.length;h++)for(var l=0;l<d;l++)if(b[l]===b[h]){b.splice(h--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,e=b.length;d<e;d++)if(c.contains(this,b[d]))return true})},
|
||||
not:function(a){return this.pushStack(ma(this,a,false),"not",a)},filter:function(a){return this.pushStack(ma(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){var d=[],e,f,h=this[0];if(c.isArray(a)){var l,k={},o=1;if(h&&a.length){e=0;for(f=a.length;e<f;e++){l=a[e];k[l]||(k[l]=c.expr.match.POS.test(l)?c(l,b||this.context):l)}for(;h&&h.ownerDocument&&h!==b;){for(l in k){e=k[l];if(e.jquery?e.index(h)>-1:c(h).is(e))d.push({selector:l,elem:h,level:o})}h=
|
||||
h.parentNode;o++}}return d}l=cb.test(a)?c(a,b||this.context):null;e=0;for(f=this.length;e<f;e++)for(h=this[e];h;)if(l?l.index(h)>-1:c.find.matchesSelector(h,a)){d.push(h);break}else{h=h.parentNode;if(!h||!h.ownerDocument||h===b)break}d=d.length>1?c.unique(d):d;return this.pushStack(d,"closest",a)},index:function(a){if(!a||typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var d=typeof a==="string"?c(a,b||this.context):
|
||||
c.makeArray(a),e=c.merge(this.get(),d);return this.pushStack(!d[0]||!d[0].parentNode||d[0].parentNode.nodeType===11||!e[0]||!e[0].parentNode||e[0].parentNode.nodeType===11?e:c.unique(e))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,
|
||||
2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,
|
||||
b){c.fn[a]=function(d,e){var f=c.map(this,b,d);Za.test(a)||(e=d);if(e&&typeof e==="string")f=c.filter(e,f);f=this.length>1?c.unique(f):f;if((this.length>1||ab.test(e))&&$a.test(a))f=f.reverse();return this.pushStack(f,a,bb.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return b.length===1?c.find.matchesSelector(b[0],a)?[b[0]]:[]:c.find.matches(a,b)},dir:function(a,b,d){var e=[];for(a=a[b];a&&a.nodeType!==9&&(d===B||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&&
|
||||
e.push(a);a=a[b]}return e},nth:function(a,b,d){b=b||1;for(var e=0;a;a=a[d])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var za=/ jQuery\d+="(?:\d+|null)"/g,$=/^\s+/,Aa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Ba=/<([\w:]+)/,db=/<tbody/i,eb=/<|&#?\w+;/,Ca=/<(?:script|object|embed|option|style)/i,Da=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/\=([^="'>\s]+\/)>/g,P={option:[1,
|
||||
"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};P.optgroup=P.option;P.tbody=P.tfoot=P.colgroup=P.caption=P.thead;P.th=P.td;if(!c.support.htmlSerialize)P._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=
|
||||
c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==B)return this.empty().append((this[0]&&this[0].ownerDocument||t).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
|
||||
wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},
|
||||
prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,
|
||||
this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,e;(e=this[d])!=null;d++)if(!a||c.filter(a,[e]).length){if(!b&&e.nodeType===1){c.cleanData(e.getElementsByTagName("*"));c.cleanData([e])}e.parentNode&&e.parentNode.removeChild(e)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
|
||||
return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,e=this.ownerDocument;if(!d){d=e.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(za,"").replace(fb,'="$1">').replace($,"")],e)[0]}else return this.cloneNode(true)});if(a===true){na(this,b);na(this.find("*"),b.find("*"))}return b},html:function(a){if(a===B)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(za,""):null;
|
||||
else if(typeof a==="string"&&!Ca.test(a)&&(c.support.leadingWhitespace||!$.test(a))&&!P[(Ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Aa,"<$1></$2>");try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(e){this.empty().append(a)}}else c.isFunction(a)?this.each(function(f){var h=c(this);h.html(a.call(this,f,h.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=
|
||||
c(this),e=d.html();d.replaceWith(a.call(this,b,e))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){var e,f,h,l=a[0],k=[];if(!c.support.checkClone&&arguments.length===3&&typeof l==="string"&&Da.test(l))return this.each(function(){c(this).domManip(a,
|
||||
b,d,true)});if(c.isFunction(l))return this.each(function(x){var r=c(this);a[0]=l.call(this,x,b?r.html():B);r.domManip(a,b,d)});if(this[0]){e=l&&l.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:c.buildFragment(a,this,k);h=e.fragment;if(f=h.childNodes.length===1?h=h.firstChild:h.firstChild){b=b&&c.nodeName(f,"tr");f=0;for(var o=this.length;f<o;f++)d.call(b?c.nodeName(this[f],"table")?this[f].getElementsByTagName("tbody")[0]||this[f].appendChild(this[f].ownerDocument.createElement("tbody")):
|
||||
this[f]:this[f],f>0||e.cacheable||this.length>1?h.cloneNode(true):h)}k.length&&c.each(k,Oa)}return this}});c.buildFragment=function(a,b,d){var e,f,h;b=b&&b[0]?b[0].ownerDocument||b[0]:t;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===t&&!Ca.test(a[0])&&(c.support.checkClone||!Da.test(a[0]))){f=true;if(h=c.fragments[a[0]])if(h!==1)e=h}if(!e){e=b.createDocumentFragment();c.clean(a,b,e,d)}if(f)c.fragments[a[0]]=h?e:1;return{fragment:e,cacheable:f}};c.fragments={};c.each({appendTo:"append",
|
||||
prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var e=[];d=c(d);var f=this.length===1&&this[0].parentNode;if(f&&f.nodeType===11&&f.childNodes.length===1&&d.length===1){d[b](this[0]);return this}else{f=0;for(var h=d.length;f<h;f++){var l=(f>0?this.clone(true):this).get();c(d[f])[b](l);e=e.concat(l)}return this.pushStack(e,a,d.selector)}}});c.extend({clean:function(a,b,d,e){b=b||t;if(typeof b.createElement==="undefined")b=b.ownerDocument||
|
||||
b[0]&&b[0].ownerDocument||t;for(var f=[],h=0,l;(l=a[h])!=null;h++){if(typeof l==="number")l+="";if(l){if(typeof l==="string"&&!eb.test(l))l=b.createTextNode(l);else if(typeof l==="string"){l=l.replace(Aa,"<$1></$2>");var k=(Ba.exec(l)||["",""])[1].toLowerCase(),o=P[k]||P._default,x=o[0],r=b.createElement("div");for(r.innerHTML=o[1]+l+o[2];x--;)r=r.lastChild;if(!c.support.tbody){x=db.test(l);k=k==="table"&&!x?r.firstChild&&r.firstChild.childNodes:o[1]==="<table>"&&!x?r.childNodes:[];for(o=k.length-
|
||||
1;o>=0;--o)c.nodeName(k[o],"tbody")&&!k[o].childNodes.length&&k[o].parentNode.removeChild(k[o])}!c.support.leadingWhitespace&&$.test(l)&&r.insertBefore(b.createTextNode($.exec(l)[0]),r.firstChild);l=r.childNodes}if(l.nodeType)f.push(l);else f=c.merge(f,l)}}if(d)for(h=0;f[h];h++)if(e&&c.nodeName(f[h],"script")&&(!f[h].type||f[h].type.toLowerCase()==="text/javascript"))e.push(f[h].parentNode?f[h].parentNode.removeChild(f[h]):f[h]);else{f[h].nodeType===1&&f.splice.apply(f,[h+1,0].concat(c.makeArray(f[h].getElementsByTagName("script"))));
|
||||
d.appendChild(f[h])}return f},cleanData:function(a){for(var b,d,e=c.cache,f=c.event.special,h=c.support.deleteExpando,l=0,k;(k=a[l])!=null;l++)if(!(k.nodeName&&c.noData[k.nodeName.toLowerCase()]))if(d=k[c.expando]){if((b=e[d])&&b.events)for(var o in b.events)f[o]?c.event.remove(k,o):c.removeEvent(k,o,b.handle);if(h)delete k[c.expando];else k.removeAttribute&&k.removeAttribute(c.expando);delete e[d]}}});var Ea=/alpha\([^)]*\)/i,gb=/opacity=([^)]*)/,hb=/-([a-z])/ig,ib=/([A-Z])/g,Fa=/^-?\d+(?:px)?$/i,
|
||||
jb=/^-?\d/,kb={position:"absolute",visibility:"hidden",display:"block"},Pa=["Left","Right"],Qa=["Top","Bottom"],W,Ga,aa,lb=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){if(arguments.length===2&&b===B)return this;return c.access(this,a,b,true,function(d,e,f){return f!==B?c.style(d,e,f):c.css(d,e)})};c.extend({cssHooks:{opacity:{get:function(a,b){if(b){var d=W(a,"opacity","opacity");return d===""?"1":d}else return a.style.opacity}}},cssNumber:{zIndex:true,fontWeight:true,opacity:true,
|
||||
zoom:true,lineHeight:true},cssProps:{"float":c.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,d,e){if(!(!a||a.nodeType===3||a.nodeType===8||!a.style)){var f,h=c.camelCase(b),l=a.style,k=c.cssHooks[h];b=c.cssProps[h]||h;if(d!==B){if(!(typeof d==="number"&&isNaN(d)||d==null)){if(typeof d==="number"&&!c.cssNumber[h])d+="px";if(!k||!("set"in k)||(d=k.set(a,d))!==B)try{l[b]=d}catch(o){}}}else{if(k&&"get"in k&&(f=k.get(a,false,e))!==B)return f;return l[b]}}},css:function(a,b,d){var e,f=c.camelCase(b),
|
||||
h=c.cssHooks[f];b=c.cssProps[f]||f;if(h&&"get"in h&&(e=h.get(a,true,d))!==B)return e;else if(W)return W(a,b,f)},swap:function(a,b,d){var e={},f;for(f in b){e[f]=a.style[f];a.style[f]=b[f]}d.call(a);for(f in b)a.style[f]=e[f]},camelCase:function(a){return a.replace(hb,lb)}});c.curCSS=c.css;c.each(["height","width"],function(a,b){c.cssHooks[b]={get:function(d,e,f){var h;if(e){if(d.offsetWidth!==0)h=oa(d,b,f);else c.swap(d,kb,function(){h=oa(d,b,f)});if(h<=0){h=W(d,b,b);if(h==="0px"&&aa)h=aa(d,b,b);
|
||||
if(h!=null)return h===""||h==="auto"?"0px":h}if(h<0||h==null){h=d.style[b];return h===""||h==="auto"?"0px":h}return typeof h==="string"?h:h+"px"}},set:function(d,e){if(Fa.test(e)){e=parseFloat(e);if(e>=0)return e+"px"}else return e}}});if(!c.support.opacity)c.cssHooks.opacity={get:function(a,b){return gb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var d=a.style;d.zoom=1;var e=c.isNaN(b)?"":"alpha(opacity="+b*100+")",f=
|
||||
d.filter||"";d.filter=Ea.test(f)?f.replace(Ea,e):d.filter+" "+e}};if(t.defaultView&&t.defaultView.getComputedStyle)Ga=function(a,b,d){var e;d=d.replace(ib,"-$1").toLowerCase();if(!(b=a.ownerDocument.defaultView))return B;if(b=b.getComputedStyle(a,null)){e=b.getPropertyValue(d);if(e===""&&!c.contains(a.ownerDocument.documentElement,a))e=c.style(a,d)}return e};if(t.documentElement.currentStyle)aa=function(a,b){var d,e,f=a.currentStyle&&a.currentStyle[b],h=a.style;if(!Fa.test(f)&&jb.test(f)){d=h.left;
|
||||
e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;h.left=b==="fontSize"?"1em":f||0;f=h.pixelLeft+"px";h.left=d;a.runtimeStyle.left=e}return f===""?"auto":f};W=Ga||aa;if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetHeight;return a.offsetWidth===0&&b===0||!c.support.reliableHiddenOffsets&&(a.style.display||c.css(a,"display"))==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var mb=c.now(),nb=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
|
||||
ob=/^(?:select|textarea)/i,pb=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,qb=/^(?:GET|HEAD)$/,Ra=/\[\]$/,T=/\=\?(&|$)/,ja=/\?/,rb=/([?&])_=[^&]*/,sb=/^(\w+:)?\/\/([^\/?#]+)/,tb=/%20/g,ub=/#.*$/,Ha=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!=="string"&&Ha)return Ha.apply(this,arguments);else if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var f=a.slice(e,a.length);a=a.slice(0,e)}e="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b===
|
||||
"object"){b=c.param(b,c.ajaxSettings.traditional);e="POST"}var h=this;c.ajax({url:a,type:e,dataType:"html",data:b,complete:function(l,k){if(k==="success"||k==="notmodified")h.html(f?c("<div>").append(l.responseText.replace(nb,"")).find(f):l.responseText);d&&h.each(d,[l.responseText,k,l])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&
|
||||
!this.disabled&&(this.checked||ob.test(this.nodeName)||pb.test(this.type))}).map(function(a,b){var d=c(this).val();return d==null?null:c.isArray(d)?c.map(d,function(e){return{name:b.name,value:e}}):{name:b.name,value:d}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:e})},
|
||||
getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:e})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return new E.XMLHttpRequest},accepts:{xml:"application/xml, text/xml",html:"text/html",
|
||||
script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},ajax:function(a){var b=c.extend(true,{},c.ajaxSettings,a),d,e,f,h=b.type.toUpperCase(),l=qb.test(h);b.url=b.url.replace(ub,"");b.context=a&&a.context!=null?a.context:b;if(b.data&&b.processData&&typeof b.data!=="string")b.data=c.param(b.data,b.traditional);if(b.dataType==="jsonp"){if(h==="GET")T.test(b.url)||(b.url+=(ja.test(b.url)?"&":"?")+(b.jsonp||"callback")+"=?");else if(!b.data||
|
||||
!T.test(b.data))b.data=(b.data?b.data+"&":"")+(b.jsonp||"callback")+"=?";b.dataType="json"}if(b.dataType==="json"&&(b.data&&T.test(b.data)||T.test(b.url))){d=b.jsonpCallback||"jsonp"+mb++;if(b.data)b.data=(b.data+"").replace(T,"="+d+"$1");b.url=b.url.replace(T,"="+d+"$1");b.dataType="script";var k=E[d];E[d]=function(m){if(c.isFunction(k))k(m);else{E[d]=B;try{delete E[d]}catch(p){}}f=m;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);r&&r.removeChild(A)}}if(b.dataType==="script"&&b.cache===null)b.cache=
|
||||
false;if(b.cache===false&&l){var o=c.now(),x=b.url.replace(rb,"$1_="+o);b.url=x+(x===b.url?(ja.test(b.url)?"&":"?")+"_="+o:"")}if(b.data&&l)b.url+=(ja.test(b.url)?"&":"?")+b.data;b.global&&c.active++===0&&c.event.trigger("ajaxStart");o=(o=sb.exec(b.url))&&(o[1]&&o[1].toLowerCase()!==location.protocol||o[2].toLowerCase()!==location.host);if(b.dataType==="script"&&h==="GET"&&o){var r=t.getElementsByTagName("head")[0]||t.documentElement,A=t.createElement("script");if(b.scriptCharset)A.charset=b.scriptCharset;
|
||||
A.src=b.url;if(!d){var C=false;A.onload=A.onreadystatechange=function(){if(!C&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){C=true;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);A.onload=A.onreadystatechange=null;r&&A.parentNode&&r.removeChild(A)}}}r.insertBefore(A,r.firstChild);return B}var J=false,w=b.xhr();if(w){b.username?w.open(h,b.url,b.async,b.username,b.password):w.open(h,b.url,b.async);try{if(b.data!=null&&!l||a&&a.contentType)w.setRequestHeader("Content-Type",
|
||||
b.contentType);if(b.ifModified){c.lastModified[b.url]&&w.setRequestHeader("If-Modified-Since",c.lastModified[b.url]);c.etag[b.url]&&w.setRequestHeader("If-None-Match",c.etag[b.url])}o||w.setRequestHeader("X-Requested-With","XMLHttpRequest");w.setRequestHeader("Accept",b.dataType&&b.accepts[b.dataType]?b.accepts[b.dataType]+", */*; q=0.01":b.accepts._default)}catch(I){}if(b.beforeSend&&b.beforeSend.call(b.context,w,b)===false){b.global&&c.active--===1&&c.event.trigger("ajaxStop");w.abort();return false}b.global&&
|
||||
c.triggerGlobal(b,"ajaxSend",[w,b]);var L=w.onreadystatechange=function(m){if(!w||w.readyState===0||m==="abort"){J||c.handleComplete(b,w,e,f);J=true;if(w)w.onreadystatechange=c.noop}else if(!J&&w&&(w.readyState===4||m==="timeout")){J=true;w.onreadystatechange=c.noop;e=m==="timeout"?"timeout":!c.httpSuccess(w)?"error":b.ifModified&&c.httpNotModified(w,b.url)?"notmodified":"success";var p;if(e==="success")try{f=c.httpData(w,b.dataType,b)}catch(q){e="parsererror";p=q}if(e==="success"||e==="notmodified")d||
|
||||
c.handleSuccess(b,w,e,f);else c.handleError(b,w,e,p);d||c.handleComplete(b,w,e,f);m==="timeout"&&w.abort();if(b.async)w=null}};try{var g=w.abort;w.abort=function(){w&&Function.prototype.call.call(g,w);L("abort")}}catch(i){}b.async&&b.timeout>0&&setTimeout(function(){w&&!J&&L("timeout")},b.timeout);try{w.send(l||b.data==null?null:b.data)}catch(n){c.handleError(b,w,null,n);c.handleComplete(b,w,e,f)}b.async||L();return w}},param:function(a,b){var d=[],e=function(h,l){l=c.isFunction(l)?l():l;d[d.length]=
|
||||
encodeURIComponent(h)+"="+encodeURIComponent(l)};if(b===B)b=c.ajaxSettings.traditional;if(c.isArray(a)||a.jquery)c.each(a,function(){e(this.name,this.value)});else for(var f in a)da(f,a[f],b,e);return d.join("&").replace(tb,"+")}});c.extend({active:0,lastModified:{},etag:{},handleError:function(a,b,d,e){a.error&&a.error.call(a.context,b,d,e);a.global&&c.triggerGlobal(a,"ajaxError",[b,a,e])},handleSuccess:function(a,b,d,e){a.success&&a.success.call(a.context,e,d,b);a.global&&c.triggerGlobal(a,"ajaxSuccess",
|
||||
[b,a])},handleComplete:function(a,b,d){a.complete&&a.complete.call(a.context,b,d);a.global&&c.triggerGlobal(a,"ajaxComplete",[b,a]);a.global&&c.active--===1&&c.event.trigger("ajaxStop")},triggerGlobal:function(a,b,d){(a.context&&a.context.url==null?c(a.context):c.event).trigger(b,d)},httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),
|
||||
e=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(e)c.etag[b]=e;return a.status===304},httpData:function(a,b,d){var e=a.getResponseHeader("content-type")||"",f=b==="xml"||!b&&e.indexOf("xml")>=0;a=f?a.responseXML:a.responseText;f&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b==="json"||!b&&e.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&e.indexOf("javascript")>=0)c.globalEval(a);return a}});
|
||||
if(E.ActiveXObject)c.ajaxSettings.xhr=function(){if(E.location.protocol!=="file:")try{return new E.XMLHttpRequest}catch(a){}try{return new E.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}};c.support.ajax=!!c.ajaxSettings.xhr();var ea={},vb=/^(?:toggle|show|hide)$/,wb=/^([+\-]=)?([\d+.\-]+)(.*)$/,ba,pa=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b,d){if(a||a===0)return this.animate(S("show",
|
||||
3),a,b,d);else{d=0;for(var e=this.length;d<e;d++){a=this[d];b=a.style.display;if(!c.data(a,"olddisplay")&&b==="none")b=a.style.display="";b===""&&c.css(a,"display")==="none"&&c.data(a,"olddisplay",qa(a.nodeName))}for(d=0;d<e;d++){a=this[d];b=a.style.display;if(b===""||b==="none")a.style.display=c.data(a,"olddisplay")||""}return this}},hide:function(a,b,d){if(a||a===0)return this.animate(S("hide",3),a,b,d);else{a=0;for(b=this.length;a<b;a++){d=c.css(this[a],"display");d!=="none"&&c.data(this[a],"olddisplay",
|
||||
d)}for(a=0;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b,d){var e=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||e?this.each(function(){var f=e?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(S("toggle",3),a,b,d);return this},fadeTo:function(a,b,d,e){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d,e)},animate:function(a,b,d,e){var f=c.speed(b,
|
||||
d,e);if(c.isEmptyObject(a))return this.each(f.complete);return this[f.queue===false?"each":"queue"](function(){var h=c.extend({},f),l,k=this.nodeType===1,o=k&&c(this).is(":hidden"),x=this;for(l in a){var r=c.camelCase(l);if(l!==r){a[r]=a[l];delete a[l];l=r}if(a[l]==="hide"&&o||a[l]==="show"&&!o)return h.complete.call(this);if(k&&(l==="height"||l==="width")){h.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(c.css(this,"display")==="inline"&&c.css(this,"float")==="none")if(c.support.inlineBlockNeedsLayout)if(qa(this.nodeName)===
|
||||
"inline")this.style.display="inline-block";else{this.style.display="inline";this.style.zoom=1}else this.style.display="inline-block"}if(c.isArray(a[l])){(h.specialEasing=h.specialEasing||{})[l]=a[l][1];a[l]=a[l][0]}}if(h.overflow!=null)this.style.overflow="hidden";h.curAnim=c.extend({},a);c.each(a,function(A,C){var J=new c.fx(x,h,A);if(vb.test(C))J[C==="toggle"?o?"show":"hide":C](a);else{var w=wb.exec(C),I=J.cur()||0;if(w){var L=parseFloat(w[2]),g=w[3]||"px";if(g!=="px"){c.style(x,A,(L||1)+g);I=(L||
|
||||
1)/J.cur()*I;c.style(x,A,I+g)}if(w[1])L=(w[1]==="-="?-1:1)*L+I;J.custom(I,L,g)}else J.custom(I,C,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var e=d.length-1;e>=0;e--)if(d[e].elem===this){b&&d[e](true);d.splice(e,1)}});b||this.dequeue();return this}});c.each({slideDown:S("show",1),slideUp:S("hide",1),slideToggle:S("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){c.fn[a]=function(d,e,f){return this.animate(b,
|
||||
d,e,f)}});c.extend({speed:function(a,b,d){var e=a&&typeof a==="object"?c.extend({},a):{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};e.duration=c.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in c.fx.speeds?c.fx.speeds[e.duration]:c.fx.speeds._default;e.old=e.complete;e.complete=function(){e.queue!==false&&c(this).dequeue();c.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,d,e){return d+e*a},swing:function(a,b,d,e){return(-Math.cos(a*
|
||||
Math.PI)/2+0.5)*e+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||c.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a=parseFloat(c.css(this.elem,this.prop));return a&&a>-1E4?a:0},custom:function(a,b,d){function e(l){return f.step(l)}
|
||||
var f=this,h=c.fx;this.startTime=c.now();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;e.elem=this.elem;if(e()&&c.timers.push(e)&&!ba)ba=setInterval(h.tick,h.interval)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;
|
||||
this.custom(this.cur(),0)},step:function(a){var b=c.now(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var e in this.options.curAnim)if(this.options.curAnim[e]!==true)d=false;if(d){if(this.options.overflow!=null&&!c.support.shrinkWrapBlocks){var f=this.elem,h=this.options;c.each(["","X","Y"],function(k,o){f.style["overflow"+o]=h.overflow[k]})}this.options.hide&&c(this.elem).hide();if(this.options.hide||
|
||||
this.options.show)for(var l in this.options.curAnim)c.style(this.elem,l,this.options.orig[l]);this.options.complete.call(this.elem)}return false}else{a=b-this.startTime;this.state=a/this.options.duration;b=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||b](this.state,a,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=
|
||||
c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||c.fx.stop()},interval:13,stop:function(){clearInterval(ba);ba=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===
|
||||
b.elem}).length};var xb=/^t(?:able|d|h)$/i,Ia=/^(?:body|html)$/i;c.fn.offset="getBoundingClientRect"in t.documentElement?function(a){var b=this[0],d;if(a)return this.each(function(l){c.offset.setOffset(this,a,l)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);try{d=b.getBoundingClientRect()}catch(e){}var f=b.ownerDocument,h=f.documentElement;if(!d||!c.contains(h,b))return d||{top:0,left:0};b=f.body;f=fa(f);return{top:d.top+(f.pageYOffset||c.support.boxModel&&
|
||||
h.scrollTop||b.scrollTop)-(h.clientTop||b.clientTop||0),left:d.left+(f.pageXOffset||c.support.boxModel&&h.scrollLeft||b.scrollLeft)-(h.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(a)return this.each(function(x){c.offset.setOffset(this,a,x)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d,e=b.offsetParent,f=b.ownerDocument,h=f.documentElement,l=f.body;d=(f=f.defaultView)?f.getComputedStyle(b,null):b.currentStyle;
|
||||
for(var k=b.offsetTop,o=b.offsetLeft;(b=b.parentNode)&&b!==l&&b!==h;){if(c.offset.supportsFixedPosition&&d.position==="fixed")break;d=f?f.getComputedStyle(b,null):b.currentStyle;k-=b.scrollTop;o-=b.scrollLeft;if(b===e){k+=b.offsetTop;o+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&xb.test(b.nodeName))){k+=parseFloat(d.borderTopWidth)||0;o+=parseFloat(d.borderLeftWidth)||0}e=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&d.overflow!=="visible"){k+=
|
||||
parseFloat(d.borderTopWidth)||0;o+=parseFloat(d.borderLeftWidth)||0}d=d}if(d.position==="relative"||d.position==="static"){k+=l.offsetTop;o+=l.offsetLeft}if(c.offset.supportsFixedPosition&&d.position==="fixed"){k+=Math.max(h.scrollTop,l.scrollTop);o+=Math.max(h.scrollLeft,l.scrollLeft)}return{top:k,left:o}};c.offset={initialize:function(){var a=t.body,b=t.createElement("div"),d,e,f,h=parseFloat(c.css(a,"marginTop"))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",
|
||||
height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";a.insertBefore(b,a.firstChild);d=b.firstChild;e=d.firstChild;f=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=e.offsetTop!==5;this.doesAddBorderForTableAndCells=
|
||||
f.offsetTop===5;e.style.position="fixed";e.style.top="20px";this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15;e.style.position=e.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==h;a.removeChild(b);c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.css(a,
|
||||
"marginTop"))||0;d+=parseFloat(c.css(a,"marginLeft"))||0}return{top:b,left:d}},setOffset:function(a,b,d){var e=c.css(a,"position");if(e==="static")a.style.position="relative";var f=c(a),h=f.offset(),l=c.css(a,"top"),k=c.css(a,"left"),o=e==="absolute"&&c.inArray("auto",[l,k])>-1;e={};var x={};if(o)x=f.position();l=o?x.top:parseInt(l,10)||0;k=o?x.left:parseInt(k,10)||0;if(c.isFunction(b))b=b.call(a,d,h);if(b.top!=null)e.top=b.top-h.top+l;if(b.left!=null)e.left=b.left-h.left+k;"using"in b?b.using.call(a,
|
||||
e):f.css(e)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),e=Ia.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.css(a,"marginTop"))||0;d.left-=parseFloat(c.css(a,"marginLeft"))||0;e.top+=parseFloat(c.css(b[0],"borderTopWidth"))||0;e.left+=parseFloat(c.css(b[0],"borderLeftWidth"))||0;return{top:d.top-e.top,left:d.left-e.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||t.body;a&&!Ia.test(a.nodeName)&&
|
||||
c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(e){var f=this[0],h;if(!f)return null;if(e!==B)return this.each(function(){if(h=fa(this))h.scrollTo(!a?e:c(h).scrollLeft(),a?e:c(h).scrollTop());else this[d]=e});else return(h=fa(f))?"pageXOffset"in h?h[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&h.document.documentElement[d]||h.document.body[d]:f[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();
|
||||
c.fn["inner"+b]=function(){return this[0]?parseFloat(c.css(this[0],d,"padding")):null};c.fn["outer"+b]=function(e){return this[0]?parseFloat(c.css(this[0],d,e?"margin":"border")):null};c.fn[d]=function(e){var f=this[0];if(!f)return e==null?null:this;if(c.isFunction(e))return this.each(function(l){var k=c(this);k[d](e.call(this,l,k[d]()))});if(c.isWindow(f))return f.document.compatMode==="CSS1Compat"&&f.document.documentElement["client"+b]||f.document.body["client"+b];else if(f.nodeType===9)return Math.max(f.documentElement["client"+
|
||||
b],f.body["scroll"+b],f.documentElement["scroll"+b],f.body["offset"+b],f.documentElement["offset"+b]);else if(e===B){f=c.css(f,d);var h=parseFloat(f);return c.isNaN(h)?f:h}else return this.css(d,typeof e==="string"?e:e+"px")}})})(window);
|
4
lib/jquery-1.7.min.js
vendored
Normal file
150
lib/jquery-ui-1.8.16.custom.min.js
vendored
Executable file
|
@ -0,0 +1,150 @@
|
|||
/*!
|
||||
* 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);
|
||||
;
|
146
lib/jquery-ui-1.8.6.custom.min.js
vendored
|
@ -1,146 +0,0 @@
|
|||
/*!
|
||||
* jQuery UI 1.8.6
|
||||
*
|
||||
* Copyright 2010, 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.6",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.6
|
||||
*
|
||||
* Copyright 2010, 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.6
|
||||
*
|
||||
* Copyright 2010, 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(a._preventClickEvent){a._preventClickEvent=false;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;this._preventClickEvent=a.target==this._mouseDownEvent.target;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.6
|
||||
*
|
||||
* Copyright 2010, 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)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=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,d(a.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(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.6"});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.6
|
||||
*
|
||||
* Copyright 2010, 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.6"});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);
|
||||
;
|
|
@ -1,5 +1,4 @@
|
|||
|
||||
|
||||
function Calendar(element, options, eventSources) {
|
||||
var t = this;
|
||||
|
||||
|
@ -11,6 +10,7 @@ function Calendar(element, options, eventSources) {
|
|||
t.refetchEvents = refetchEvents;
|
||||
t.reportEvents = reportEvents;
|
||||
t.reportEventChange = reportEventChange;
|
||||
t.rerenderEvents = rerenderEvents;
|
||||
t.changeView = changeView;
|
||||
t.select = select;
|
||||
t.unselect = unselect;
|
||||
|
@ -82,7 +82,7 @@ function Calendar(element, options, eventSources) {
|
|||
if (options.theme) {
|
||||
element.addClass('ui-widget');
|
||||
}
|
||||
content = $("<div class='fc-content " + tm + "-widget-content' style='position:relative'/>")
|
||||
content = $("<div class='fc-content' style='position:relative'/>")
|
||||
.prependTo(element);
|
||||
header = new Header(t, options);
|
||||
headerElement = header.render();
|
||||
|
@ -113,7 +113,7 @@ function Calendar(element, options, eventSources) {
|
|||
$(window).unbind('resize', windowResize);
|
||||
header.destroy();
|
||||
content.remove();
|
||||
element.removeClass('fc fc-rtl fc-ui-widget');
|
||||
element.removeClass('fc fc-rtl ui-widget');
|
||||
}
|
||||
|
||||
|
||||
|
@ -124,7 +124,8 @@ function Calendar(element, options, eventSources) {
|
|||
|
||||
|
||||
function bodyVisible() {
|
||||
return $('body')[0].offsetWidth !== 0;
|
||||
var body = $('body');
|
||||
return body.length > 0 && body [0].offsetWidth !== 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -132,6 +133,7 @@ function Calendar(element, options, eventSources) {
|
|||
/* View Rendering
|
||||
-----------------------------------------------------------------------------*/
|
||||
|
||||
// TODO: improve view switching (still weird transition in IE, and FF has whiteout problem)
|
||||
|
||||
function changeView(newViewName) {
|
||||
if (!currentView || newViewName != currentView.name) {
|
||||
|
@ -260,11 +262,13 @@ function Calendar(element, options, eventSources) {
|
|||
function calcSize() {
|
||||
if (options.contentHeight) {
|
||||
suggestedViewHeight = options.contentHeight;
|
||||
}
|
||||
else if (options.height) {
|
||||
suggestedViewHeight = options.height - (headerElement ? headerElement.height() : 0) - vsides(content[0]);
|
||||
}
|
||||
else {
|
||||
} 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 {
|
||||
suggestedViewHeight = Math.round(content.width() / Math.max(options.aspectRatio, .5));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,16 @@
|
|||
|
||||
fc.sourceNormalizers = [];
|
||||
fc.sourceFetchers = [];
|
||||
|
||||
var ajaxDefaults = {
|
||||
dataType: 'json',
|
||||
cache: false
|
||||
};
|
||||
|
||||
var eventGUID = 1;
|
||||
|
||||
function EventManager(options, sources) {
|
||||
|
||||
function EventManager(options, _sources) {
|
||||
var t = this;
|
||||
|
||||
|
||||
|
@ -24,14 +33,20 @@ function EventManager(options, sources) {
|
|||
|
||||
|
||||
// locals
|
||||
var stickySource = { events: [] };
|
||||
var sources = [ stickySource ];
|
||||
var rangeStart, rangeEnd;
|
||||
var currentFetchID = 0;
|
||||
var pendingSourceCnt = 0;
|
||||
var loadingLevel = 0;
|
||||
var dynamicEventSource = [];
|
||||
var cache = [];
|
||||
|
||||
|
||||
for (var i=0; i<_sources.length; i++) {
|
||||
_addEventSource(_sources[i]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Fetching
|
||||
-----------------------------------------------------------------------------*/
|
||||
|
@ -58,11 +73,13 @@ function EventManager(options, sources) {
|
|||
function fetchEventSource(source, fetchID) {
|
||||
_fetchEventSource(source, function(events) {
|
||||
if (fetchID == currentFetchID) {
|
||||
for (var i=0; i<events.length; i++) {
|
||||
normalizeEvent(events[i]);
|
||||
events[i].source = source;
|
||||
if (events) {
|
||||
for (var i=0; i<events.length; i++) {
|
||||
events[i].source = source;
|
||||
normalizeEvent(events[i]);
|
||||
}
|
||||
cache = cache.concat(events);
|
||||
}
|
||||
cache = cache.concat(events);
|
||||
pendingSourceCnt--;
|
||||
if (!pendingSourceCnt) {
|
||||
reportEvents(cache);
|
||||
|
@ -73,35 +90,77 @@ function EventManager(options, sources) {
|
|||
|
||||
|
||||
function _fetchEventSource(source, callback) {
|
||||
if (typeof source == 'string') {
|
||||
var params = {};
|
||||
params[options.startParam] = Math.round(rangeStart.getTime() / 1000);
|
||||
params[options.endParam] = Math.round(rangeEnd.getTime() / 1000);
|
||||
if (options.cacheParam) {
|
||||
params[options.cacheParam] = (new Date()).getTime(); // TODO: deprecate cacheParam
|
||||
var i;
|
||||
var fetchers = fc.sourceFetchers;
|
||||
var res;
|
||||
for (i=0; i<fetchers.length; i++) {
|
||||
res = fetchers[i](source, rangeStart, rangeEnd, callback);
|
||||
if (res === true) {
|
||||
// the fetcher is in charge. made its own async request
|
||||
return;
|
||||
}
|
||||
pushLoading();
|
||||
// TODO: respect cache param in ajaxSetup
|
||||
$.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();
|
||||
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();
|
||||
events(cloneDate(rangeStart), cloneDate(rangeEnd), function(events) {
|
||||
callback(events);
|
||||
}
|
||||
});
|
||||
}
|
||||
else if ($.isFunction(source)) {
|
||||
pushLoading();
|
||||
source(cloneDate(rangeStart), cloneDate(rangeEnd), function(events) {
|
||||
popLoading();
|
||||
popLoading();
|
||||
});
|
||||
}
|
||||
else if ($.isArray(events)) {
|
||||
callback(events);
|
||||
});
|
||||
}
|
||||
else {
|
||||
callback(source); // src is an array
|
||||
}
|
||||
else {
|
||||
callback();
|
||||
}
|
||||
}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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -111,23 +170,37 @@ function EventManager(options, sources) {
|
|||
-----------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
sources.push(dynamicEventSource);
|
||||
|
||||
|
||||
function addEventSource(source) {
|
||||
sources.push(source);
|
||||
pendingSourceCnt++;
|
||||
fetchEventSource(source, currentFetchID); // will eventually call reportEvents
|
||||
source = _addEventSource(source);
|
||||
if (source) {
|
||||
pendingSourceCnt++;
|
||||
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) {
|
||||
sources = $.grep(sources, function(src) {
|
||||
return src != source;
|
||||
return !isSourcesEqual(src, source);
|
||||
});
|
||||
// remove all client events from that source
|
||||
cache = $.grep(cache, function(e) {
|
||||
return e.source != source;
|
||||
return !isSourcesEqual(e.source, source);
|
||||
});
|
||||
reportEvents(cache);
|
||||
}
|
||||
|
@ -163,6 +236,10 @@ function EventManager(options, sources) {
|
|||
e.allDay = event.allDay;
|
||||
e.className = event.className;
|
||||
e.editable = event.editable;
|
||||
e.color = event.color;
|
||||
e.backgroundColor = event.backgroundColor;
|
||||
e.borderColor = event.borderColor;
|
||||
e.textColor = event.textColor;
|
||||
normalizeEvent(e);
|
||||
}
|
||||
}
|
||||
|
@ -175,8 +252,8 @@ function EventManager(options, sources) {
|
|||
normalizeEvent(event);
|
||||
if (!event.source) {
|
||||
if (stick) {
|
||||
dynamicEventSource.push(event);
|
||||
event.source = dynamicEventSource;
|
||||
stickySource.events.push(event);
|
||||
event.source = stickySource;
|
||||
}
|
||||
cache.push(event);
|
||||
}
|
||||
|
@ -189,8 +266,8 @@ function EventManager(options, sources) {
|
|||
cache = [];
|
||||
// clear all array sources
|
||||
for (var i=0; i<sources.length; i++) {
|
||||
if (typeof sources[i] == 'object') {
|
||||
sources[i] = [];
|
||||
if ($.isArray(sources[i].events)) {
|
||||
sources[i].events = [];
|
||||
}
|
||||
}
|
||||
}else{
|
||||
|
@ -203,8 +280,8 @@ function EventManager(options, sources) {
|
|||
cache = $.grep(cache, filter, true);
|
||||
// remove events from array sources
|
||||
for (var i=0; i<sources.length; i++) {
|
||||
if (typeof sources[i] == 'object') {
|
||||
sources[i] = $.grep(sources[i], filter, true);
|
||||
if ($.isArray(sources[i].events)) {
|
||||
sources[i].events = $.grep(sources[i].events, filter, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -251,6 +328,8 @@ function EventManager(options, sources) {
|
|||
|
||||
|
||||
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 + '');
|
||||
if (event.date) {
|
||||
if (!event.start) {
|
||||
|
@ -258,14 +337,14 @@ function EventManager(options, sources) {
|
|||
}
|
||||
delete event.date;
|
||||
}
|
||||
event._start = cloneDate(event.start = parseDate(event.start, options.ignoreTimezone));
|
||||
event.end = parseDate(event.end, options.ignoreTimezone);
|
||||
event._start = cloneDate(event.start = parseDate(event.start, ignoreTimezone));
|
||||
event.end = parseDate(event.end, ignoreTimezone);
|
||||
if (event.end && event.end <= event.start) {
|
||||
event.end = null;
|
||||
}
|
||||
event._end = event.end ? cloneDate(event.end) : null;
|
||||
if (event.allDay === undefined) {
|
||||
event.allDay = options.allDayDefault;
|
||||
event.allDay = firstDefined(source.allDayDefault, options.allDayDefault);
|
||||
}
|
||||
if (event.className) {
|
||||
if (typeof event.className == 'string') {
|
||||
|
@ -278,4 +357,35 @@ 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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -23,14 +23,13 @@ function Header(calendar, options) {
|
|||
tm = options.theme ? 'ui' : 'fc';
|
||||
var sections = options.header;
|
||||
if (sections) {
|
||||
element = $("<table class='fc-header'/>")
|
||||
.append($("<tr/>")
|
||||
.append($("<td class='fc-header-left'/>")
|
||||
.append(renderSection(sections.left)))
|
||||
.append($("<td class='fc-header-center'/>")
|
||||
.append(renderSection(sections.center)))
|
||||
.append($("<td class='fc-header-right'/>")
|
||||
.append(renderSection(sections.right))));
|
||||
element = $("<table class='fc-header' style='width:100%'/>")
|
||||
.append(
|
||||
$("<tr/>")
|
||||
.append(renderSection('left'))
|
||||
.append(renderSection('center'))
|
||||
.append(renderSection('right'))
|
||||
);
|
||||
return element;
|
||||
}
|
||||
}
|
||||
|
@ -41,17 +40,18 @@ function Header(calendar, options) {
|
|||
}
|
||||
|
||||
|
||||
function renderSection(buttonStr) {
|
||||
function renderSection(position) {
|
||||
var e = $("<td class='fc-header-" + position + "'/>");
|
||||
var buttonStr = options.header[position];
|
||||
if (buttonStr) {
|
||||
var tr = $("<tr/>");
|
||||
$.each(buttonStr.split(' '), function(i) {
|
||||
if (i > 0) {
|
||||
tr.append("<td><span class='fc-header-space'/></td>");
|
||||
e.append("<span class='fc-header-space'/>");
|
||||
}
|
||||
var prevButton;
|
||||
$.each(this.split(','), function(j, buttonName) {
|
||||
if (buttonName == 'title') {
|
||||
tr.append("<td><h2 class='fc-header-title'> </h2></td>");
|
||||
e.append("<span class='fc-header-title'><h2> </h2></span>");
|
||||
if (prevButton) {
|
||||
prevButton.addClass(tm + '-corner-right');
|
||||
}
|
||||
|
@ -68,20 +68,23 @@ function Header(calendar, options) {
|
|||
};
|
||||
}
|
||||
if (buttonClick) {
|
||||
if (prevButton) {
|
||||
prevButton.addClass(tm + '-no-right');
|
||||
}
|
||||
var button;
|
||||
var icon = options.theme ? smartProperty(options.buttonIcons, buttonName) : null;
|
||||
var text = smartProperty(options.buttonText, buttonName);
|
||||
if (icon) {
|
||||
button = $("<div class='fc-button-" + buttonName + " ui-state-default'>" +
|
||||
"<a><span class='ui-icon ui-icon-" + icon + "'/></a></div>");
|
||||
}
|
||||
else if (text) {
|
||||
button = $("<div class='fc-button-" + buttonName + " " + tm + "-state-default'>" +
|
||||
"<a><span>" + text + "</span></a></div>");
|
||||
}
|
||||
var icon = options.theme ? smartProperty(options.buttonIcons, buttonName) : null; // why are we using smartProperty here?
|
||||
var text = smartProperty(options.buttonText, buttonName); // why are we using smartProperty here?
|
||||
var button = $(
|
||||
"<span class='fc-button "+(tm == 'ui' ? 'ui-button' : '')+" fc-button-" + buttonName + " " + tm + "-state-default'>" +
|
||||
"<span class='fc-button-inner'>" +
|
||||
"<span class='fc-button-content'>" +
|
||||
(icon ?
|
||||
"<span class='fc-icon-wrap'>" +
|
||||
"<span class='ui-icon ui-icon-" + icon + "'/>" +
|
||||
"</span>" :
|
||||
text
|
||||
) +
|
||||
"</span>" +
|
||||
"<span class='fc-button-effect'><span></span></span>" +
|
||||
"</span>" +
|
||||
"</span>"
|
||||
);
|
||||
if (button) {
|
||||
button
|
||||
.click(function() {
|
||||
|
@ -111,10 +114,8 @@ function Header(calendar, options) {
|
|||
.removeClass(tm + '-state-down');
|
||||
}
|
||||
)
|
||||
.appendTo($("<td/>").appendTo(tr));
|
||||
if (prevButton) {
|
||||
prevButton.addClass(tm + '-no-right');
|
||||
}else{
|
||||
.appendTo(e);
|
||||
if (!prevButton) {
|
||||
button.addClass(tm + '-corner-left');
|
||||
}
|
||||
prevButton = button;
|
||||
|
@ -126,37 +127,37 @@ function Header(calendar, options) {
|
|||
prevButton.addClass(tm + '-corner-right');
|
||||
}
|
||||
});
|
||||
return $("<table/>").append(tr);
|
||||
}
|
||||
return e;
|
||||
}
|
||||
|
||||
|
||||
function updateTitle(html) {
|
||||
element.find('h2.fc-header-title')
|
||||
element.find('h2')
|
||||
.html(html);
|
||||
}
|
||||
|
||||
|
||||
function activateButton(buttonName) {
|
||||
element.find('div.fc-button-' + buttonName)
|
||||
element.find('span.fc-button-' + buttonName)
|
||||
.addClass(tm + '-state-active');
|
||||
}
|
||||
|
||||
|
||||
function deactivateButton(buttonName) {
|
||||
element.find('div.fc-button-' + buttonName)
|
||||
element.find('span.fc-button-' + buttonName)
|
||||
.removeClass(tm + '-state-active');
|
||||
}
|
||||
|
||||
|
||||
function disableButton(buttonName) {
|
||||
element.find('div.fc-button-' + buttonName)
|
||||
element.find('span.fc-button-' + buttonName)
|
||||
.addClass(tm + '-state-disabled');
|
||||
}
|
||||
|
||||
|
||||
function enableButton(buttonName) {
|
||||
element.find('div.fc-button-' + buttonName)
|
||||
element.find('span.fc-button-' + buttonName)
|
||||
.removeClass(tm + '-state-disabled');
|
||||
}
|
||||
|
||||
|
|
18
src/I18n.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
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);
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
(function() {
|
||||
|
||||
var JQUERY = 'jquery-1.4.4.min.js';
|
||||
var JQUERY_UI = 'jquery-ui-1.8.6.custom.min.js';
|
||||
var JQUERY = 'jquery-1.7.min.js';
|
||||
var JQUERY_UI = 'jquery-ui-1.8.16.custom.min.js';
|
||||
var JQUERY_LEGACY = 'jquery-1.3.2.min.js';
|
||||
var JQUERY_UI_LEGACY = 'jquery-ui-1.7.3.custom.min.js';
|
||||
|
||||
|
@ -19,6 +19,7 @@ css('main.css');
|
|||
css('common/common.css');
|
||||
css('basic/basic.css');
|
||||
css('agenda/agenda.css');
|
||||
cssprint('common/print.css');
|
||||
|
||||
if (!legacy) {
|
||||
jslib('../lib/' + JQUERY);
|
||||
|
@ -41,8 +42,12 @@ js('main.js');
|
|||
js('Calendar.js');
|
||||
js('Header.js');
|
||||
js('EventManager.js');
|
||||
js('date_util.js');
|
||||
js('util.js');
|
||||
js('I18n.js');
|
||||
|
||||
js('basic/MonthView.js');
|
||||
js('basic/FourWeeksView.js');
|
||||
js('basic/BasicWeekView.js');
|
||||
js('basic/BasicDayView.js');
|
||||
js('basic/BasicView.js');
|
||||
|
@ -60,8 +65,6 @@ js('common/OverlayManager.js');
|
|||
js('common/CoordinateGrid.js');
|
||||
js('common/HoverListener.js');
|
||||
js('common/HorizontalPositionCache.js');
|
||||
js('common/date.js');
|
||||
js('common/util.js');
|
||||
|
||||
endload();
|
||||
|
||||
|
@ -119,6 +122,11 @@ function css(file) {
|
|||
}
|
||||
|
||||
|
||||
function cssprint(file) {
|
||||
tags.push("<link rel='stylesheet' type='text/css' href='" + prefix + file + "' media='print' />");
|
||||
}
|
||||
|
||||
|
||||
function js(file) {
|
||||
tags.push("<script type='text/javascript' src='" + prefix + file + "'></script>");
|
||||
}
|
||||
|
|
|
@ -15,6 +15,9 @@ function AgendaEventRenderer() {
|
|||
DayEventRenderer.call(t);
|
||||
var opt = t.opt;
|
||||
var trigger = t.trigger;
|
||||
//var setOverflowHidden = t.setOverflowHidden;
|
||||
var isEventDraggable = t.isEventDraggable;
|
||||
var isEventResizable = t.isEventResizable;
|
||||
var eventEnd = t.eventEnd;
|
||||
var reportEvents = t.reportEvents;
|
||||
var reportEventClear = t.reportEventClear;
|
||||
|
@ -33,6 +36,8 @@ function AgendaEventRenderer() {
|
|||
var getColCnt = t.getColCnt;
|
||||
var getColWidth = t.getColWidth;
|
||||
var getSlotHeight = t.getSlotHeight;
|
||||
var getBorderHeight = t.getBorderHeight;
|
||||
var getSlotTableHeight = t.getSlotTableHeight;
|
||||
var getBodyContent = t.getBodyContent;
|
||||
var reportEventElement = t.reportEventElement;
|
||||
var showEvents = t.showEvents;
|
||||
|
@ -136,10 +141,9 @@ function AgendaEventRenderer() {
|
|||
// renders events in the 'time slots' at the bottom
|
||||
|
||||
function renderSlotSegs(segs, modifiedEventId) {
|
||||
|
||||
var i, segCnt=segs.length, seg,
|
||||
event,
|
||||
className,
|
||||
classes,
|
||||
top, bottom,
|
||||
colI, levelI, forward,
|
||||
leftmost,
|
||||
|
@ -153,11 +157,13 @@ function AgendaEventRenderer() {
|
|||
vsideCache={},
|
||||
hsideCache={},
|
||||
key, val,
|
||||
titleSpan,
|
||||
contentElement,
|
||||
height,
|
||||
slotSegmentContainer = getSlotSegmentContainer(),
|
||||
rtl, dis, dit,
|
||||
colCnt = getColCnt();
|
||||
colCnt = getColCnt(),
|
||||
borderHeight = getBorderHeight(),
|
||||
slotTableHeight = getSlotTableHeight();
|
||||
|
||||
if (rtl = opt('isRTL')) {
|
||||
dis = -1;
|
||||
|
@ -171,15 +177,11 @@ function AgendaEventRenderer() {
|
|||
for (i=0; i<segCnt; i++) {
|
||||
seg = segs[i];
|
||||
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);
|
||||
bottom = timePosition(seg.start, seg.end);
|
||||
if (bottom < slotTableHeight) {
|
||||
bottom -= borderHeight;
|
||||
}
|
||||
colI = seg.col;
|
||||
levelI = seg.level;
|
||||
forward = seg.forward || 0;
|
||||
|
@ -205,7 +207,7 @@ function AgendaEventRenderer() {
|
|||
seg.left = left;
|
||||
seg.outerWidth = outerWidth;
|
||||
seg.outerHeight = bottom - top;
|
||||
html += slotSegHtml(event, seg, className);
|
||||
html += slotSegHtml(event, seg);
|
||||
}
|
||||
slotSegmentContainer[0].innerHTML = html; // faster than html()
|
||||
eventElements = slotSegmentContainer.children();
|
||||
|
@ -246,12 +248,12 @@ function AgendaEventRenderer() {
|
|||
seg = segs[i];
|
||||
if (eventElement = seg.element) {
|
||||
val = vsideCache[key = seg.key = cssKey(eventElement[0])];
|
||||
seg.vsides = val === undefined ? (vsideCache[key] = vsides(eventElement[0], true)) : val;
|
||||
seg.vsides = val === undefined ? (vsideCache[key] = vsides(eventElement, true)) : val;
|
||||
val = hsideCache[key];
|
||||
seg.hsides = val === undefined ? (hsideCache[key] = hsides(eventElement[0], true)) : val;
|
||||
titleSpan = eventElement.find('span.fc-event-title');
|
||||
if (titleSpan.length) {
|
||||
seg.titleTop = titleSpan[0].offsetTop;
|
||||
seg.hsides = val === undefined ? (hsideCache[key] = hsides(eventElement, true)) : val;
|
||||
contentElement = eventElement.find('div.fc-event-content');
|
||||
if (contentElement.length) {
|
||||
seg.contentTop = contentElement[0].offsetTop;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -264,11 +266,11 @@ function AgendaEventRenderer() {
|
|||
height = Math.max(0, seg.outerHeight - seg.vsides);
|
||||
eventElement[0].style.height = height + 'px';
|
||||
event = seg.event;
|
||||
if (seg.titleTop !== undefined && height - seg.titleTop < 10) {
|
||||
if (seg.contentTop !== undefined && height - seg.contentTop < 10) {
|
||||
// not enough room for title, put it in the time header
|
||||
eventElement.find('span.fc-event-time')
|
||||
eventElement.find('div.fc-event-time')
|
||||
.text(formatDate(event.start, opt('timeFormat')) + ' - ' + event.title);
|
||||
eventElement.find('span.fc-event-title')
|
||||
eventElement.find('div.fc-event-title')
|
||||
.remove();
|
||||
}
|
||||
trigger('eventAfterRender', event, event, eventElement);
|
||||
|
@ -278,40 +280,78 @@ function AgendaEventRenderer() {
|
|||
}
|
||||
|
||||
|
||||
function slotSegHtml(event, seg, className) {
|
||||
return "<div class='" + className + event.className.join(' ') + "' style='position:absolute;z-index:8;top:" + seg.top + "px;left:" + seg.left + "px'>" +
|
||||
"<a" + (event.url ? " href='" + htmlEscape(event.url) + "'" : '') + ">" +
|
||||
"<span class='fc-event-bg'></span>" +
|
||||
"<span class='fc-event-time'>" + htmlEscape(formatDates(event.start, event.end, opt('timeFormat'))) + "</span>" +
|
||||
"<span class='fc-event-title'>" + htmlEscape(event.title) + "</span>" +
|
||||
"</a>" +
|
||||
((event.editable || event.editable === undefined && opt('editable')) && !opt('disableResizing') && $.fn.resizable ?
|
||||
"<div class='ui-resizable-handle ui-resizable-s'>=</div>"
|
||||
: '') +
|
||||
"</div>";
|
||||
function slotSegHtml(event, seg) {
|
||||
var html = "<";
|
||||
var url = event.url;
|
||||
var skinCss = getSkinCss(event, opt);
|
||||
var skinCssAttr = (skinCss ? " style='" + skinCss + "'" : '');
|
||||
var classes = ['fc-event', 'fc-event-skin', 'fc-event-vert'];
|
||||
if (isEventDraggable(event)) {
|
||||
classes.push('fc-event-draggable');
|
||||
}
|
||||
if (seg.isStart) {
|
||||
classes.push('fc-corner-top');
|
||||
}
|
||||
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) {
|
||||
eventElementHandlers(event, eventElement);
|
||||
if (event.editable || event.editable === undefined && opt('editable')) {
|
||||
if (isEventDraggable(event)) {
|
||||
draggableDayEvent(event, eventElement, seg.isStart);
|
||||
if (seg.isEnd) {
|
||||
resizableDayEvent(event, eventElement, seg);
|
||||
}
|
||||
}
|
||||
if (seg.isEnd && isEventResizable(event)) {
|
||||
resizableDayEvent(event, eventElement, seg);
|
||||
}
|
||||
eventElementHandlers(event, eventElement);
|
||||
// needs to be after, because resizableDayEvent might stopImmediatePropagation on click
|
||||
}
|
||||
|
||||
|
||||
function bindSlotSeg(event, eventElement, seg) {
|
||||
eventElementHandlers(event, eventElement);
|
||||
if (event.editable || event.editable === undefined && opt('editable')) {
|
||||
var timeElement = eventElement.find('span.fc-event-time');
|
||||
var timeElement = eventElement.find('div.fc-event-time');
|
||||
if (isEventDraggable(event)) {
|
||||
draggableSlotEvent(event, eventElement, timeElement);
|
||||
if (seg.isEnd) {
|
||||
resizableSlotEvent(event, eventElement, timeElement);
|
||||
}
|
||||
}
|
||||
if (seg.isEnd && isEventResizable(event)) {
|
||||
resizableSlotEvent(event, eventElement, timeElement);
|
||||
}
|
||||
eventElementHandlers(event, eventElement);
|
||||
}
|
||||
|
||||
|
||||
|
@ -323,86 +363,96 @@ function AgendaEventRenderer() {
|
|||
// when event starts out FULL-DAY
|
||||
|
||||
function draggableDayEvent(event, eventElement, isStart) {
|
||||
if (!opt('disableDragging') && eventElement.draggable) {
|
||||
var origWidth;
|
||||
var allDay=true;
|
||||
var dayDelta;
|
||||
var dis = opt('isRTL') ? -1 : 1;
|
||||
var hoverListener = getHoverListener();
|
||||
var colWidth = getColWidth();
|
||||
var slotHeight = getSlotHeight();
|
||||
var minMinute = getMinMinute();
|
||||
eventElement.draggable({
|
||||
zIndex: 9,
|
||||
opacity: opt('dragOpacity', 'month'), // use whatever the month view was using
|
||||
revertDuration: opt('dragRevertDuration'),
|
||||
start: function(ev, ui) {
|
||||
trigger('eventDragStart', eventElement, event, ev, ui);
|
||||
hideEvents(event, eventElement);
|
||||
origWidth = eventElement.width();
|
||||
hoverListener.start(function(cell, origCell, rowDelta, colDelta) {
|
||||
eventElement.draggable('option', 'revert', !cell || !rowDelta && !colDelta);
|
||||
clearOverlays();
|
||||
if (cell) {
|
||||
dayDelta = colDelta * dis;
|
||||
if (!cell.row) {
|
||||
// on full-days
|
||||
renderDayOverlay(
|
||||
addDays(cloneDate(event.start), dayDelta),
|
||||
addDays(exclEndDay(event), dayDelta)
|
||||
);
|
||||
resetElement();
|
||||
}else{
|
||||
// mouse is over bottom slots
|
||||
if (isStart && allDay) {
|
||||
if (!eventElement.draggable)
|
||||
return;
|
||||
var origWidth;
|
||||
var revert;
|
||||
var allDay=true;
|
||||
var dayDelta;
|
||||
var dis = opt('isRTL') ? -1 : 1;
|
||||
var hoverListener = getHoverListener();
|
||||
var colWidth = getColWidth();
|
||||
var slotHeight = getSlotHeight();
|
||||
var minMinute = getMinMinute();
|
||||
eventElement.draggable({
|
||||
zIndex: 9,
|
||||
opacity: opt('dragOpacity', 'month'), // use whatever the month view was using
|
||||
revertDuration: opt('dragRevertDuration'),
|
||||
start: function(ev, ui) {
|
||||
trigger('eventDragStart', eventElement, event, ev, ui);
|
||||
hideEvents(event, eventElement);
|
||||
origWidth = eventElement.width();
|
||||
hoverListener.start(function(cell, origCell, rowDelta, colDelta) {
|
||||
clearOverlays();
|
||||
if (cell) {
|
||||
//setOverflowHidden(true);
|
||||
revert = false;
|
||||
dayDelta = colDelta * dis;
|
||||
if (!cell.row) {
|
||||
// on full-days
|
||||
renderDayOverlay(
|
||||
addDays(cloneDate(event.start), dayDelta),
|
||||
addDays(exclEndDay(event), dayDelta)
|
||||
);
|
||||
resetElement();
|
||||
}else{
|
||||
// mouse is over bottom slots
|
||||
if (isStart) {
|
||||
if (allDay) {
|
||||
// convert event to temporary slot-event
|
||||
eventElement.width(colWidth - 10); // don't use entire width
|
||||
setOuterHeight(
|
||||
eventElement.width(colWidth - 10), // don't use entire width
|
||||
eventElement,
|
||||
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]);
|
||||
allDay = false;
|
||||
}
|
||||
}else{
|
||||
revert = true;
|
||||
}
|
||||
}
|
||||
}, ev, 'drag');
|
||||
},
|
||||
stop: function(ev, ui) {
|
||||
var cell = hoverListener.stop();
|
||||
clearOverlays();
|
||||
trigger('eventDragStop', eventElement, event, ev, ui);
|
||||
if (cell && (!allDay || dayDelta)) {
|
||||
// changed!
|
||||
eventElement.find('a').removeAttr('href'); // prevents safari from visiting the link
|
||||
var minuteDelta = 0;
|
||||
if (!allDay) {
|
||||
minuteDelta = Math.round((eventElement.offset().top - getBodyContent().offset().top) / slotHeight)
|
||||
* opt('slotMinutes')
|
||||
+ minMinute
|
||||
- (event.start.getHours() * 60 + event.start.getMinutes());
|
||||
}
|
||||
eventDrop(this, event, dayDelta, minuteDelta, allDay, ev, ui);
|
||||
revert = revert || (allDay && !dayDelta);
|
||||
}else{
|
||||
// hasn't moved or is out of bounds (draggable has already reverted)
|
||||
resetElement();
|
||||
if ($.browser.msie) {
|
||||
eventElement.css('filter', ''); // clear IE opacity side-effects
|
||||
}
|
||||
showEvents(event, eventElement);
|
||||
//setOverflowHidden(false);
|
||||
revert = true;
|
||||
}
|
||||
eventElement.draggable('option', 'revert', revert);
|
||||
}, ev, 'drag');
|
||||
},
|
||||
stop: function(ev, ui) {
|
||||
hoverListener.stop();
|
||||
clearOverlays();
|
||||
trigger('eventDragStop', eventElement, event, ev, ui);
|
||||
if (revert) {
|
||||
// hasn't moved or is out of bounds (draggable has already reverted)
|
||||
resetElement();
|
||||
eventElement.css('filter', ''); // clear IE opacity side-effects
|
||||
showEvents(event, eventElement);
|
||||
}else{
|
||||
// changed!
|
||||
var minuteDelta = 0;
|
||||
if (!allDay) {
|
||||
minuteDelta = Math.round((eventElement.offset().top - getBodyContent().offset().top) / slotHeight)
|
||||
* opt('slotMinutes')
|
||||
+ minMinute
|
||||
- (event.start.getHours() * 60 + event.start.getMinutes());
|
||||
}
|
||||
eventDrop(this, event, dayDelta, minuteDelta, allDay, ev, ui);
|
||||
}
|
||||
});
|
||||
function resetElement() {
|
||||
if (!allDay) {
|
||||
eventElement
|
||||
.width(origWidth)
|
||||
.height('')
|
||||
.draggable('option', 'grid', null);
|
||||
allDay = true;
|
||||
}
|
||||
//setOverflowHidden(false);
|
||||
}
|
||||
});
|
||||
function resetElement() {
|
||||
if (!allDay) {
|
||||
eventElement
|
||||
.width(origWidth)
|
||||
.height('')
|
||||
.draggable('option', 'grid', null);
|
||||
allDay = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -411,102 +461,92 @@ function AgendaEventRenderer() {
|
|||
// when event starts out IN TIMESLOTS
|
||||
|
||||
function draggableSlotEvent(event, eventElement, timeElement) {
|
||||
if (!opt('disableDragging') && eventElement.draggable) {
|
||||
var origPosition;
|
||||
var allDay=false;
|
||||
var dayDelta;
|
||||
var minuteDelta;
|
||||
var prevMinuteDelta;
|
||||
var dis = opt('isRTL') ? -1 : 1;
|
||||
var hoverListener = getHoverListener();
|
||||
var colCnt = getColCnt();
|
||||
var colWidth = getColWidth();
|
||||
var slotHeight = getSlotHeight();
|
||||
eventElement.draggable({
|
||||
zIndex: 9,
|
||||
scroll: false,
|
||||
grid: [colWidth, slotHeight],
|
||||
axis: colCnt==1 ? 'y' : false,
|
||||
opacity: opt('dragOpacity'),
|
||||
revertDuration: opt('dragRevertDuration'),
|
||||
start: function(ev, ui) {
|
||||
trigger('eventDragStart', eventElement, event, ev, ui);
|
||||
hideEvents(event, eventElement);
|
||||
if ($.browser.msie) {
|
||||
eventElement.find('span.fc-event-bg').hide(); // nested opacities mess up in IE, just hide
|
||||
}
|
||||
origPosition = eventElement.position();
|
||||
minuteDelta = prevMinuteDelta = 0;
|
||||
hoverListener.start(function(cell, origCell, rowDelta, colDelta) {
|
||||
eventElement.draggable('option', 'revert', !cell);
|
||||
clearOverlays();
|
||||
if (cell) {
|
||||
dayDelta = colDelta * dis;
|
||||
if (opt('allDaySlot') && !cell.row) {
|
||||
// over full days
|
||||
if (!allDay) {
|
||||
// convert to temporary all-day event
|
||||
allDay = true;
|
||||
timeElement.hide();
|
||||
eventElement.draggable('option', 'grid', null);
|
||||
}
|
||||
renderDayOverlay(
|
||||
addDays(cloneDate(event.start), dayDelta),
|
||||
addDays(exclEndDay(event), dayDelta)
|
||||
);
|
||||
}else{
|
||||
// on slots
|
||||
resetElement();
|
||||
}
|
||||
}
|
||||
}, ev, 'drag');
|
||||
},
|
||||
drag: function(ev, ui) {
|
||||
minuteDelta = Math.round((ui.position.top - origPosition.top) / slotHeight) * opt('slotMinutes');
|
||||
if (minuteDelta != prevMinuteDelta) {
|
||||
if (!allDay) {
|
||||
updateTimeText(minuteDelta);
|
||||
}
|
||||
prevMinuteDelta = minuteDelta;
|
||||
}
|
||||
},
|
||||
stop: function(ev, ui) {
|
||||
var cell = hoverListener.stop();
|
||||
var origPosition;
|
||||
var allDay=false;
|
||||
var dayDelta;
|
||||
var minuteDelta;
|
||||
var prevMinuteDelta;
|
||||
var dis = opt('isRTL') ? -1 : 1;
|
||||
var hoverListener = getHoverListener();
|
||||
var colCnt = getColCnt();
|
||||
var colWidth = getColWidth();
|
||||
var slotHeight = getSlotHeight();
|
||||
eventElement.draggable({
|
||||
zIndex: 9,
|
||||
scroll: false,
|
||||
grid: [colWidth, slotHeight],
|
||||
axis: colCnt==1 ? 'y' : false,
|
||||
opacity: opt('dragOpacity'),
|
||||
revertDuration: opt('dragRevertDuration'),
|
||||
start: function(ev, ui) {
|
||||
trigger('eventDragStart', eventElement, event, ev, ui);
|
||||
hideEvents(event, eventElement);
|
||||
origPosition = eventElement.position();
|
||||
minuteDelta = prevMinuteDelta = 0;
|
||||
hoverListener.start(function(cell, origCell, rowDelta, colDelta) {
|
||||
eventElement.draggable('option', 'revert', !cell);
|
||||
clearOverlays();
|
||||
trigger('eventDragStop', eventElement, event, ev, ui);
|
||||
if (cell && (dayDelta || minuteDelta || allDay)) {
|
||||
// changed!
|
||||
eventDrop(this, event, dayDelta, allDay ? 0 : minuteDelta, allDay, ev, ui);
|
||||
}else{
|
||||
// either no change or out-of-bounds (draggable has already reverted)
|
||||
resetElement();
|
||||
eventElement.css(origPosition); // sometimes fast drags make event revert to wrong position
|
||||
updateTimeText(0);
|
||||
if ($.browser.msie) {
|
||||
eventElement
|
||||
.css('filter', '') // clear IE opacity side-effects
|
||||
.find('span.fc-event-bg')
|
||||
.css('display', ''); // .show() made display=inline
|
||||
if (cell) {
|
||||
dayDelta = colDelta * dis;
|
||||
if (opt('allDaySlot') && !cell.row) {
|
||||
// over full days
|
||||
if (!allDay) {
|
||||
// convert to temporary all-day event
|
||||
allDay = true;
|
||||
timeElement.hide();
|
||||
eventElement.draggable('option', 'grid', null);
|
||||
}
|
||||
renderDayOverlay(
|
||||
addDays(cloneDate(event.start), dayDelta),
|
||||
addDays(exclEndDay(event), dayDelta)
|
||||
);
|
||||
}else{
|
||||
// on slots
|
||||
resetElement();
|
||||
}
|
||||
showEvents(event, eventElement);
|
||||
}
|
||||
}, ev, 'drag');
|
||||
},
|
||||
drag: function(ev, ui) {
|
||||
minuteDelta = Math.round((ui.position.top - origPosition.top) / slotHeight) * opt('slotMinutes');
|
||||
if (minuteDelta != prevMinuteDelta) {
|
||||
if (!allDay) {
|
||||
updateTimeText(minuteDelta);
|
||||
}
|
||||
prevMinuteDelta = minuteDelta;
|
||||
}
|
||||
});
|
||||
function updateTimeText(minuteDelta) {
|
||||
var newStart = addMinutes(cloneDate(event.start), minuteDelta);
|
||||
var newEnd;
|
||||
if (event.end) {
|
||||
newEnd = addMinutes(cloneDate(event.end), minuteDelta);
|
||||
},
|
||||
stop: function(ev, ui) {
|
||||
var cell = hoverListener.stop();
|
||||
clearOverlays();
|
||||
trigger('eventDragStop', eventElement, event, ev, ui);
|
||||
if (cell && (dayDelta || minuteDelta || allDay)) {
|
||||
// changed!
|
||||
eventDrop(this, event, dayDelta, allDay ? 0 : minuteDelta, allDay, ev, ui);
|
||||
}else{
|
||||
// either no change or out-of-bounds (draggable has already reverted)
|
||||
resetElement();
|
||||
eventElement.css('filter', ''); // clear IE opacity side-effects
|
||||
eventElement.css(origPosition); // sometimes fast drags make event revert to wrong position
|
||||
updateTimeText(0);
|
||||
showEvents(event, eventElement);
|
||||
}
|
||||
timeElement.text(formatDates(newStart, newEnd, opt('timeFormat')));
|
||||
}
|
||||
function resetElement() {
|
||||
// convert back to original slot-event
|
||||
if (allDay) {
|
||||
timeElement.css('display', ''); // show() was causing display=inline
|
||||
eventElement.draggable('option', 'grid', [colWidth, slotHeight]);
|
||||
allDay = false;
|
||||
}
|
||||
});
|
||||
function updateTimeText(minuteDelta) {
|
||||
var newStart = addMinutes(cloneDate(event.start), minuteDelta);
|
||||
var newEnd;
|
||||
if (event.end) {
|
||||
newEnd = addMinutes(cloneDate(event.end), minuteDelta);
|
||||
}
|
||||
timeElement.text(formatDates(newStart, newEnd, opt('timeFormat')));
|
||||
}
|
||||
function resetElement() {
|
||||
// convert back to original slot-event
|
||||
if (allDay) {
|
||||
timeElement.css('display', ''); // show() was causing display=inline
|
||||
eventElement.draggable('option', 'grid', [colWidth, slotHeight]);
|
||||
allDay = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -518,50 +558,45 @@ function AgendaEventRenderer() {
|
|||
|
||||
|
||||
function resizableSlotEvent(event, eventElement, timeElement) {
|
||||
if (!opt('disableResizing') && eventElement.resizable) {
|
||||
var slotDelta, prevSlotDelta;
|
||||
var slotHeight = getSlotHeight();
|
||||
eventElement.resizable({
|
||||
handles: {
|
||||
s: 'div.ui-resizable-s'
|
||||
},
|
||||
grid: slotHeight,
|
||||
start: function(ev, ui) {
|
||||
slotDelta = prevSlotDelta = 0;
|
||||
hideEvents(event, eventElement);
|
||||
if ($.browser.msie && $.browser.version == '6.0') {
|
||||
eventElement.css('overflow', 'hidden');
|
||||
}
|
||||
eventElement.css('z-index', 9);
|
||||
trigger('eventResizeStart', this, event, ev, ui);
|
||||
},
|
||||
resize: function(ev, ui) {
|
||||
// don't rely on ui.size.height, doesn't take grid into account
|
||||
slotDelta = Math.round((Math.max(slotHeight, eventElement.height()) - ui.originalSize.height) / slotHeight);
|
||||
if (slotDelta != prevSlotDelta) {
|
||||
timeElement.text(
|
||||
formatDates(
|
||||
event.start,
|
||||
(!slotDelta && !event.end) ? null : // no change, so don't display time range
|
||||
addMinutes(eventEnd(event), opt('slotMinutes')*slotDelta),
|
||||
opt('timeFormat')
|
||||
)
|
||||
);
|
||||
prevSlotDelta = slotDelta;
|
||||
}
|
||||
},
|
||||
stop: function(ev, ui) {
|
||||
trigger('eventResizeStop', this, event, ev, ui);
|
||||
if (slotDelta) {
|
||||
eventResize(this, event, 0, opt('slotMinutes')*slotDelta, ev, ui);
|
||||
}else{
|
||||
eventElement.css('z-index', 8);
|
||||
showEvents(event, eventElement);
|
||||
// BUG: if event was really short, need to put title back in span
|
||||
}
|
||||
var slotDelta, prevSlotDelta;
|
||||
var slotHeight = getSlotHeight();
|
||||
eventElement.resizable({
|
||||
handles: {
|
||||
s: 'div.ui-resizable-s'
|
||||
},
|
||||
grid: slotHeight,
|
||||
start: function(ev, ui) {
|
||||
slotDelta = prevSlotDelta = 0;
|
||||
hideEvents(event, eventElement);
|
||||
eventElement.css('z-index', 9);
|
||||
trigger('eventResizeStart', this, event, ev, ui);
|
||||
},
|
||||
resize: function(ev, ui) {
|
||||
// don't rely on ui.size.height, doesn't take grid into account
|
||||
slotDelta = Math.round((Math.max(slotHeight, eventElement.height()) - ui.originalSize.height) / slotHeight);
|
||||
if (slotDelta != prevSlotDelta) {
|
||||
timeElement.text(
|
||||
formatDates(
|
||||
event.start,
|
||||
(!slotDelta && !event.end) ? null : // no change, so don't display time range
|
||||
addMinutes(eventEnd(event), opt('slotMinutes')*slotDelta),
|
||||
opt('timeFormat')
|
||||
)
|
||||
);
|
||||
prevSlotDelta = slotDelta;
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
stop: function(ev, ui) {
|
||||
trigger('eventResizeStop', this, event, ev, ui);
|
||||
if (slotDelta) {
|
||||
eventResize(this, event, 0, opt('slotMinutes')*slotDelta, ev, ui);
|
||||
}else{
|
||||
eventElement.css('z-index', 8);
|
||||
showEvents(event, eventElement);
|
||||
// BUG: if event was really short, need to put title back in span
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
|
||||
setDefaults({
|
||||
allDaySlot: true,
|
||||
allDayText: 'all-day',
|
||||
firstHour: 6,
|
||||
slotMinutes: 30,
|
||||
minSlotNumber: 0,
|
||||
maxSlotNumber: 0,
|
||||
defaultEventMinutes: 120,
|
||||
axisFormat: 'h(:mm)tt',
|
||||
timeFormat: {
|
||||
|
@ -17,6 +18,10 @@ 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) {
|
||||
var t = this;
|
||||
|
||||
|
@ -33,7 +38,7 @@ function AgendaView(element, calendar, viewName) {
|
|||
t.dateCell = dateCell;
|
||||
t.cellDate = cellDate;
|
||||
t.cellIsAllDay = cellIsAllDay;
|
||||
t.allDayTR = allDayTR;
|
||||
t.allDayRow = getAllDayRow;
|
||||
t.allDayBounds = allDayBounds;
|
||||
t.getHoverListener = function() { return hoverListener };
|
||||
t.colContentLeft = colContentLeft;
|
||||
|
@ -42,15 +47,18 @@ function AgendaView(element, calendar, viewName) {
|
|||
t.getSlotSegmentContainer = function() { return slotSegmentContainer };
|
||||
t.getMinMinute = function() { return minMinute };
|
||||
t.getMaxMinute = function() { return maxMinute };
|
||||
t.getBodyContent = function() { return bodyContent };
|
||||
t.getBodyContent = function() { return slotContent }; // !!??
|
||||
t.getRowCnt = function() { return 1 };
|
||||
t.getColCnt = function() { return colCnt };
|
||||
t.getColWidth = function() { return colWidth };
|
||||
t.getSlotHeight = function() { return slotHeight };
|
||||
t.getBorderHeight = function() { return borderHeight };
|
||||
t.getSlotTableHeight = function() { return slotTable.height() };
|
||||
t.defaultSelectionEnd = defaultSelectionEnd;
|
||||
t.renderDayOverlay = renderDayOverlay;
|
||||
t.renderSelection = renderSelection;
|
||||
t.clearSelection = clearSelection;
|
||||
t.reportDayClick = reportDayClick; // selection mousedown hack
|
||||
t.dragStart = dragStart;
|
||||
t.dragStop = dragStop;
|
||||
|
||||
|
@ -73,23 +81,51 @@ function AgendaView(element, calendar, viewName) {
|
|||
|
||||
|
||||
// locals
|
||||
var head, body, bodyContent, bodyTable, bg;
|
||||
var colCnt;
|
||||
var slotCnt=0; // spanning all the way across
|
||||
var axisWidth, colWidth, slotHeight;
|
||||
var viewWidth, viewHeight;
|
||||
|
||||
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 tm, firstDay;
|
||||
var nwe; // no weekends (int)
|
||||
var rtl, dis, dit; // day index sign / translate
|
||||
var minMinute, maxMinute;
|
||||
|
||||
var colCnt;
|
||||
var slotCnt;
|
||||
var coordinateGrid;
|
||||
var hoverListener;
|
||||
var colContentPositions;
|
||||
var slotTopCache = {};
|
||||
var selectionHelper;
|
||||
var daySegmentContainer;
|
||||
var slotSegmentContainer;
|
||||
|
||||
var tm;
|
||||
var firstDay;
|
||||
var nwe; // no weekends (int)
|
||||
var rtl, dis, dit; // day index sign / translate
|
||||
var minMinute, maxMinute;
|
||||
var colFormat;
|
||||
|
||||
|
||||
|
||||
|
@ -101,10 +137,19 @@ function AgendaView(element, calendar, viewName) {
|
|||
|
||||
|
||||
function renderAgenda(c) {
|
||||
|
||||
colCnt = c;
|
||||
updateOptions();
|
||||
if (!dayTable) {
|
||||
buildSkeleton();
|
||||
}else{
|
||||
clearEvents();
|
||||
}
|
||||
updateCells();
|
||||
}
|
||||
|
||||
// update option-derived variables
|
||||
|
||||
|
||||
function updateOptions() {
|
||||
tm = opt('theme') ? 'ui' : 'fc';
|
||||
nwe = opt('weekends') ? 0 : 1;
|
||||
firstDay = opt('firstDay');
|
||||
|
@ -117,151 +162,202 @@ function AgendaView(element, calendar, viewName) {
|
|||
}
|
||||
minMinute = parseTime(opt('minTime'));
|
||||
maxMinute = parseTime(opt('maxTime'));
|
||||
colFormat = opt('columnFormat');
|
||||
}
|
||||
|
||||
var d0 = rtl ? addDays(cloneDate(t.visEnd), -1) : cloneDate(t.visStart),
|
||||
d = cloneDate(d0),
|
||||
today = clearTime(new Date()),
|
||||
colFormat = opt('columnFormat');
|
||||
|
||||
if (!head) { // first time rendering, build from scratch
|
||||
|
||||
var i,
|
||||
minutes,
|
||||
slotNormal = opt('slotMinutes') % 15 == 0, //...
|
||||
function buildSkeleton() {
|
||||
var headerClass = tm + "-widget-header";
|
||||
var contentClass = tm + "-widget-content";
|
||||
var s;
|
||||
var i;
|
||||
var d;
|
||||
var maxd;
|
||||
var minutes;
|
||||
var slotNormal = opt('slotMinutes') % 15 == 0;
|
||||
|
||||
// head
|
||||
s = "<div class='fc-agenda-head' style='position:relative;z-index:4'>" +
|
||||
"<table style='width:100%'>" +
|
||||
"<tr class='fc-first" + (opt('allDaySlot') ? '' : ' fc-last') + "'>" +
|
||||
"<th class='fc-leftmost " +
|
||||
tm + "-state-default'> </th>";
|
||||
for (i=0; i<colCnt; i++) {
|
||||
s += "<th class='fc-" +
|
||||
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='" + tm + "-state-default'> </th></tr>";
|
||||
if (opt('allDaySlot')) {
|
||||
s += "<tr class='fc-all-day'>" +
|
||||
"<th class='fc-axis fc-leftmost " + tm + "-state-default'>" + opt('allDayText') + "</th>" +
|
||||
"<td colspan='" + colCnt + "' class='" + tm + "-state-default'>" +
|
||||
"<div class='fc-day-content'><div style='position:relative'> </div></div></td>" +
|
||||
"<th class='" + tm + "-state-default'> </th>" +
|
||||
"</tr><tr class='fc-divider fc-last'><th colspan='" + (colCnt+2) + "' class='" +
|
||||
tm + "-state-default fc-leftmost'><div/></th></tr>";
|
||||
}
|
||||
s+= "</table></div>";
|
||||
head = $(s).appendTo(element);
|
||||
dayBind(head.find('td'));
|
||||
s =
|
||||
"<table style='width:100%' class='fc-agenda-days fc-border-separate' cellspacing='0'>" +
|
||||
"<thead>" +
|
||||
"<tr>" +
|
||||
"<th class='fc-agenda-axis " + headerClass + "'> </th>";
|
||||
for (i=0; i<colCnt; i++) {
|
||||
s +=
|
||||
"<th class='fc- fc-col" + i + ' ' + headerClass + "'/>"; // fc- needed for setDayID
|
||||
}
|
||||
s +=
|
||||
"<th class='fc-agenda-gutter " + headerClass + "'> </th>" +
|
||||
"</tr>" +
|
||||
"</thead>" +
|
||||
"<tbody>" +
|
||||
"<tr>" +
|
||||
"<th class='fc-agenda-axis " + headerClass + "'> </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'> </div>" +
|
||||
"</div>" +
|
||||
"</div>" +
|
||||
"</td>";
|
||||
}
|
||||
s +=
|
||||
"<td class='fc-agenda-gutter " + contentClass + "'> </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');
|
||||
|
||||
// all-day event container
|
||||
daySegmentContainer = $("<div style='position:absolute;z-index:8;top:0;left:0'/>").appendTo(head);
|
||||
markFirstLast(dayHead.add(dayHead.find('tr')));
|
||||
markFirstLast(dayBody.add(dayBody.find('tr')));
|
||||
|
||||
// body
|
||||
d = zeroDate();
|
||||
var maxd = addMinutes(cloneDate(d), maxMinute);
|
||||
addMinutes(d, minMinute);
|
||||
s = "<table>";
|
||||
for (i=0; d < maxd; i++) {
|
||||
minutes = d.getMinutes();
|
||||
s += "<tr class='" +
|
||||
(!i ? 'fc-first' : (!minutes ? '' : 'fc-minor')) +
|
||||
"'><th class='fc-axis fc-leftmost " + tm + "-state-default'>" +
|
||||
((!slotNormal || !minutes) ? formatDate(d, opt('axisFormat')) : ' ') +
|
||||
"</th><td class='fc-slot" + i + ' ' +
|
||||
tm + "-state-default'><div style='position:relative'> </div></td></tr>";
|
||||
addMinutes(d, opt('slotMinutes'));
|
||||
slotCnt++;
|
||||
}
|
||||
s += "</table>";
|
||||
body = $("<div class='fc-agenda-body' style='position:relative;z-index:2;overflow:auto'/>")
|
||||
.append(bodyContent = $("<div style='position:relative;overflow:hidden'>")
|
||||
.append(bodyTable = $(s)))
|
||||
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);
|
||||
slotBind(body.find('td'));
|
||||
|
||||
// slot event container
|
||||
slotSegmentContainer = $("<div style='position:absolute;z-index:8;top:0;left:0'/>").appendTo(bodyContent);
|
||||
if (opt('allDaySlot')) {
|
||||
|
||||
// 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'>";
|
||||
for (i=0; i<colCnt; i++) {
|
||||
s += "<td class='fc-" +
|
||||
dayIDs[d.getDay()] + ' ' + // needs to be first
|
||||
tm + '-state-default ' +
|
||||
(!i ? 'fc-leftmost ' : '') +
|
||||
(+d == +today ? tm + '-state-highlight fc-today' : 'fc-not-today') +
|
||||
"'><div class='fc-day-content'><div> </div></div></td>";
|
||||
addDays(d, dis);
|
||||
if (nwe) {
|
||||
skipWeekend(d, dis);
|
||||
}
|
||||
}
|
||||
s += "</tr></table></div>";
|
||||
bg = $(s).appendTo(element);
|
||||
daySegmentContainer =
|
||||
$("<div style='position:absolute;z-index:8;top:0;left:0'/>")
|
||||
.appendTo(slotLayer);
|
||||
|
||||
}else{ // skeleton already built, just modify it
|
||||
s =
|
||||
"<table style='width:100%' class='fc-agenda-allday' cellspacing='0'>" +
|
||||
"<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'> </th>" +
|
||||
"</tr>" +
|
||||
"</table>";
|
||||
allDayTable = $(s).appendTo(slotLayer);
|
||||
allDayRow = allDayTable.find('tr');
|
||||
|
||||
clearEvents();
|
||||
dayBind(allDayRow.find('td'));
|
||||
|
||||
// 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);
|
||||
}
|
||||
});
|
||||
axisFirstCells = axisFirstCells.add(allDayTable.find('th:first'));
|
||||
gutterCells = gutterCells.add(allDayTable.find('th.fc-agenda-gutter'));
|
||||
|
||||
// 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{
|
||||
$(td)
|
||||
.addClass('fc-not-today')
|
||||
.removeClass('fc-today')
|
||||
.removeClass(tm + '-state-highlight');
|
||||
}
|
||||
addDays(d, dis);
|
||||
if (nwe) {
|
||||
skipWeekend(d, dis);
|
||||
}
|
||||
});
|
||||
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 $()
|
||||
|
||||
}
|
||||
|
||||
slotScroller =
|
||||
$("<div style='position:absolute;width:100%;overflow-x:hidden;overflow-y:auto'/>")
|
||||
.appendTo(slotLayer);
|
||||
|
||||
slotContent =
|
||||
$("<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();
|
||||
maxd = addMinutes(cloneDate(d), maxMinute);
|
||||
addMinutes(d, minMinute);
|
||||
slotCnt = 0;
|
||||
for (i=0; d < maxd; i++) {
|
||||
minutes = d.getMinutes();
|
||||
s +=
|
||||
"<tr class='fc-slot" + i + ' ' + (!minutes ? '' : 'fc-minor') + "'>" +
|
||||
"<th class='fc-agenda-axis " + headerClass + "'>" +
|
||||
((!slotNormal || !minutes) ? formatDate(d, opt('axisFormat')) : ' ') +
|
||||
"</th>" +
|
||||
"<td class='" + contentClass + "'>" +
|
||||
"<div style='position:relative'> </div>" +
|
||||
"</td>" +
|
||||
"</tr>";
|
||||
addMinutes(d, opt('slotMinutes'));
|
||||
slotCnt++;
|
||||
}
|
||||
s +=
|
||||
"</tbody>" +
|
||||
"</table>";
|
||||
slotTable = $(s).appendTo(slotContent);
|
||||
slotTableFirstRow = slotTable.find('tr:first');
|
||||
slotTableSecondRow = slotTable.find('tr:nth-child(2)');
|
||||
|
||||
slotBind(slotTable.find('td'));
|
||||
|
||||
axisFirstCells = axisFirstCells.add(slotTable.find('th:first'));
|
||||
}
|
||||
|
||||
|
||||
|
||||
function updateCells() {
|
||||
var i;
|
||||
var headCell;
|
||||
var bodyCell;
|
||||
var date;
|
||||
var today = clearTime(new Date());
|
||||
for (i=0; i<colCnt; i++) {
|
||||
date = colDate(i);
|
||||
headCell = dayHeadCells.eq(i);
|
||||
headCell.html(formatDate(date, colFormat));
|
||||
bodyCell = dayBodyCells.eq(i);
|
||||
if (+date == +today) {
|
||||
bodyCell.addClass(tm + '-state-highlight fc-today');
|
||||
}else{
|
||||
bodyCell.removeClass(tm + '-state-highlight fc-today');
|
||||
}
|
||||
setDayID(headCell.add(bodyCell), date);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function setHeight(height, dateChanged) {
|
||||
|
||||
if (height === undefined) {
|
||||
height = viewHeight;
|
||||
}
|
||||
|
||||
viewHeight = height;
|
||||
slotTopCache = {};
|
||||
|
||||
var bodyHeight = height - head.height();
|
||||
bodyHeight = Math.min(bodyHeight, bodyTable.height()); // shrink to fit table
|
||||
body.height(bodyHeight);
|
||||
var headHeight = dayBody.position().top;
|
||||
|
||||
slotHeight = body.find('tr:first div').height() + 1;
|
||||
if($.type(height) === 'number') {
|
||||
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) {
|
||||
resetScroll();
|
||||
|
@ -274,75 +370,59 @@ function AgendaView(element, calendar, viewName) {
|
|||
viewWidth = width;
|
||||
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;
|
||||
setOuterWidth(
|
||||
head.find('tr:lt(2) th:first').add(body.find('tr:first th'))
|
||||
.width(1)
|
||||
.each(function() {
|
||||
axisWidth = Math.max(axisWidth, $(this).outerWidth());
|
||||
axisFirstCells
|
||||
.width('')
|
||||
.each(function(i, _cell) {
|
||||
axisWidth = Math.max(axisWidth, $(_cell).outerWidth());
|
||||
}),
|
||||
axisWidth
|
||||
);
|
||||
|
||||
// column width, except for last column
|
||||
colWidth = Math.floor((clientWidth - axisWidth) / colCnt);
|
||||
setOuterWidth(stripeTDs.slice(0, -1), colWidth);
|
||||
setOuterWidth(topTDs.slice(1, -2), colWidth);
|
||||
var slotTableWidth = slotScroller[0].clientWidth; // needs to be done after axisWidth (for IE7)
|
||||
//slotTable.width(slotTableWidth);
|
||||
|
||||
// column width for last column
|
||||
if (width != clientWidth) { // has scrollbar
|
||||
setOuterWidth(topTDs.slice(-2, -1), clientWidth - axisWidth - colWidth*(colCnt-1));
|
||||
topTDs.slice(-1).show();
|
||||
allDayLastTH.show();
|
||||
gutterWidth = slotScroller.width() - slotTableWidth;
|
||||
if (gutterWidth) {
|
||||
setOuterWidth(gutterCells, gutterWidth);
|
||||
gutterCells
|
||||
.show()
|
||||
.prev()
|
||||
.removeClass('fc-last');
|
||||
}else{
|
||||
body.css('overflow', 'hidden');
|
||||
topTDs.slice(-2, -1).width('');
|
||||
topTDs.slice(-1).hide();
|
||||
allDayLastTH.hide();
|
||||
gutterCells
|
||||
.hide()
|
||||
.prev()
|
||||
.addClass('fc-last');
|
||||
}
|
||||
|
||||
bg.css({
|
||||
top: head.find('tr').height(),
|
||||
left: axisWidth,
|
||||
width: clientWidth - axisWidth,
|
||||
height: viewHeight
|
||||
});
|
||||
colWidth = Math.floor((slotTableWidth - axisWidth) / colCnt);
|
||||
setOuterWidth(dayHeadCells.slice(0, -1), colWidth);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function resetScroll() {
|
||||
var d0 = zeroDate(),
|
||||
scrollDate = cloneDate(d0);
|
||||
var d0 = zeroDate();
|
||||
var scrollDate = cloneDate(d0);
|
||||
scrollDate.setHours(opt('firstHour'));
|
||||
var top = timePosition(d0, scrollDate) + 1, // +1 for the border
|
||||
scroll = function() {
|
||||
body.scrollTop(top);
|
||||
};
|
||||
var top = timePosition(d0, scrollDate) + borderHeight;
|
||||
function scroll() {
|
||||
slotScroller.scrollTop(top);
|
||||
}
|
||||
scroll();
|
||||
setTimeout(scroll, 0); // overrides any previous scroll state made by the browser
|
||||
}
|
||||
|
||||
|
||||
function beforeHide() {
|
||||
savedScrollTop = body.scrollTop();
|
||||
savedScrollTop = slotScroller.scrollTop();
|
||||
}
|
||||
|
||||
|
||||
function afterShow() {
|
||||
body.scrollTop(savedScrollTop);
|
||||
slotScroller.scrollTop(savedScrollTop);
|
||||
}
|
||||
|
||||
|
||||
|
@ -351,31 +431,31 @@ function AgendaView(element, calendar, viewName) {
|
|||
-----------------------------------------------------------------------*/
|
||||
|
||||
|
||||
function dayBind(tds) {
|
||||
tds.click(slotClick)
|
||||
function dayBind(cells) {
|
||||
cells.click(slotClick)
|
||||
.mousedown(daySelectionMousedown);
|
||||
}
|
||||
|
||||
|
||||
function slotBind(tds) {
|
||||
tds.click(slotClick)
|
||||
function slotBind(cells) {
|
||||
cells.click(slotClick)
|
||||
.mousedown(slotSelectionMousedown);
|
||||
}
|
||||
|
||||
|
||||
function slotClick(ev) {
|
||||
if (!opt('selectable')) { // SelectionManager will worry about dayClick
|
||||
var col = Math.min(colCnt-1, Math.floor((ev.pageX - bg.offset().left) / colWidth)),
|
||||
date = addDays(cloneDate(t.visStart), col*dis+dit),
|
||||
rowMatch = this.className.match(/fc-slot(\d+)/);
|
||||
if (!opt('selectable')) { // if selectable, SelectionManager will worry about dayClick
|
||||
var col = Math.min(colCnt-1, Math.floor((ev.pageX - dayTable.offset().left - axisWidth) / colWidth));
|
||||
var date = colDate(col);
|
||||
var rowMatch = this.parentNode.className.match(/fc-slot(\d+)/); // TODO: maybe use data
|
||||
if (rowMatch) {
|
||||
var mins = parseInt(rowMatch[1]) * opt('slotMinutes'),
|
||||
hours = Math.floor(mins/60);
|
||||
var mins = parseInt(rowMatch[1]) * opt('slotMinutes');
|
||||
var hours = Math.floor(mins/60);
|
||||
date.setHours(hours);
|
||||
date.setMinutes(mins%60 + minMinute);
|
||||
trigger('dayClick', this, date, false, ev);
|
||||
trigger('dayClick', dayBodyCells[col], date, false, ev);
|
||||
}else{
|
||||
trigger('dayClick', this, date, true, ev);
|
||||
trigger('dayClick', dayBodyCells[col], date, true, ev);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -409,9 +489,9 @@ function AgendaView(element, calendar, viewName) {
|
|||
}
|
||||
|
||||
|
||||
function renderCellOverlay(col0, row0, col1, row1) {
|
||||
var rect = coordinateGrid.rect(col0, row0, col1, row1, head);
|
||||
return renderOverlay(rect, head);
|
||||
function renderCellOverlay(row0, col0, row1, col1) { // only for all-day?
|
||||
var rect = coordinateGrid.rect(row0, col0, row1, col1, slotLayer);
|
||||
return renderOverlay(rect, slotLayer);
|
||||
}
|
||||
|
||||
|
||||
|
@ -423,13 +503,13 @@ function AgendaView(element, calendar, viewName) {
|
|||
var stretchEnd = new Date(Math.min(dayEnd, overlayEnd));
|
||||
if (stretchStart < stretchEnd) {
|
||||
var col = i*dis+dit;
|
||||
var rect = coordinateGrid.rect(0, col, 0, col, bodyContent); // only use it for horizontal coords
|
||||
var rect = coordinateGrid.rect(0, col, 0, col, slotContent); // only use it for horizontal coords
|
||||
var top = timePosition(dayStart, stretchStart);
|
||||
var bottom = timePosition(dayStart, stretchEnd);
|
||||
rect.top = top;
|
||||
rect.height = bottom - top;
|
||||
slotBind(
|
||||
renderOverlay(rect, bodyContent)
|
||||
renderOverlay(rect, slotContent)
|
||||
);
|
||||
}
|
||||
addDays(dayStart, 1);
|
||||
|
@ -445,7 +525,7 @@ function AgendaView(element, calendar, viewName) {
|
|||
|
||||
coordinateGrid = new CoordinateGrid(function(rows, cols) {
|
||||
var e, n, p;
|
||||
bg.find('td').each(function(i, _e) {
|
||||
dayHeadCells.each(function(i, _e) {
|
||||
e = $(_e);
|
||||
n = e.offset().left;
|
||||
if (i) {
|
||||
|
@ -456,20 +536,20 @@ function AgendaView(element, calendar, viewName) {
|
|||
});
|
||||
p[1] = n + e.outerWidth();
|
||||
if (opt('allDaySlot')) {
|
||||
e = head.find('td');
|
||||
e = allDayRow;
|
||||
n = e.offset().top;
|
||||
rows[0] = [n, n+e.outerHeight()];
|
||||
}
|
||||
var bodyContentTop = bodyContent.offset().top;
|
||||
var bodyTop = body.offset().top;
|
||||
var bodyBottom = bodyTop + body.outerHeight();
|
||||
var slotTableTop = slotContent.offset().top;
|
||||
var slotScrollerTop = slotScroller.offset().top;
|
||||
var slotScrollerBottom = slotScrollerTop + slotScroller.outerHeight();
|
||||
function constrain(n) {
|
||||
return Math.max(bodyTop, Math.min(bodyBottom, n));
|
||||
return Math.max(slotScrollerTop, Math.min(slotScrollerBottom, n));
|
||||
}
|
||||
for (var i=0; i<slotCnt; i++) {
|
||||
rows.push([
|
||||
constrain(bodyContentTop + slotHeight*i),
|
||||
constrain(bodyContentTop + slotHeight*(i+1))
|
||||
constrain(slotTableTop + slotHeight*i),
|
||||
constrain(slotTableTop + slotHeight*(i+1))
|
||||
]);
|
||||
}
|
||||
});
|
||||
|
@ -479,17 +559,50 @@ function AgendaView(element, calendar, viewName) {
|
|||
|
||||
|
||||
colContentPositions = new HorizontalPositionCache(function(col) {
|
||||
return bg.find('td:eq(' + col + ') div div');
|
||||
return dayBodyCellInners.eq(col);
|
||||
});
|
||||
|
||||
|
||||
function colContentLeft(col) {
|
||||
return axisWidth + colContentPositions.left(col);
|
||||
return colContentPositions.left(col);
|
||||
}
|
||||
|
||||
|
||||
function colContentRight(col) {
|
||||
return axisWidth + colContentPositions.right(col);
|
||||
return colContentPositions.right(col);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function dateCell(date) { // "cell" terminology is now confusing
|
||||
return {
|
||||
row: Math.floor(dayDiff(date, t.visStart) / 7),
|
||||
col: dayOfWeekCol(date.getDay())
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
function cellDate(cell) {
|
||||
var d = colDate(cell.col);
|
||||
var slotIndex = cell.row;
|
||||
if (opt('allDaySlot')) {
|
||||
slotIndex--;
|
||||
}
|
||||
if (slotIndex >= 0) {
|
||||
addMinutes(d, minMinute + slotIndex * opt('slotMinutes'));
|
||||
}
|
||||
return d;
|
||||
}
|
||||
|
||||
|
||||
function colDate(col) { // returns dates with 00:00:00
|
||||
return addDays(cloneDate(t.visStart), col*dis+dit);
|
||||
}
|
||||
|
||||
|
||||
function cellIsAllDay(cell) {
|
||||
return opt('allDaySlot') && !cell.row;
|
||||
}
|
||||
|
||||
|
||||
|
@ -498,12 +611,6 @@ function AgendaView(element, calendar, viewName) {
|
|||
}
|
||||
|
||||
|
||||
function dateCell(date) {
|
||||
return {
|
||||
row: Math.floor(dayDiff(date, t.visStart) / 7),
|
||||
col: dayOfWeekCol(date.getDay())
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
// get the Y coordinate of the given time on the given day (both Date objects)
|
||||
|
@ -513,49 +620,31 @@ function AgendaView(element, calendar, viewName) {
|
|||
return 0;
|
||||
}
|
||||
if (time >= addMinutes(cloneDate(day), maxMinute)) {
|
||||
return bodyContent.height();
|
||||
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] = body.find('tr:eq(' + slotI + ') td div')[0].offsetTop;
|
||||
slotTop = slotTopCache[slotI] = slotTable.find('tr:eq(' + slotI + ') td div')[0].offsetTop; //.position().top; // need this optimization???
|
||||
}
|
||||
return Math.max(0, Math.round(
|
||||
slotTop - 1 + slotHeight * ((minutes % slotMinutes) / slotMinutes)
|
||||
slotTop + slotHeight * ((minutes % slotMinutes) / slotMinutes)
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
function cellDate(cell) {
|
||||
var d = addDays(cloneDate(t.visStart), cell.col*dis+dit);
|
||||
var slotIndex = cell.row;
|
||||
if (opt('allDaySlot')) {
|
||||
slotIndex--;
|
||||
}
|
||||
if (slotIndex >= 0) {
|
||||
addMinutes(d, minMinute + slotIndex*opt('slotMinutes'));
|
||||
}
|
||||
return d;
|
||||
}
|
||||
|
||||
|
||||
function cellIsAllDay(cell) {
|
||||
return opt('allDaySlot') && !cell.row;
|
||||
}
|
||||
|
||||
|
||||
function allDayBounds() {
|
||||
return {
|
||||
left: axisWidth,
|
||||
right: viewWidth
|
||||
right: viewWidth - gutterWidth
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function allDayTR(index) {
|
||||
return head.find('tr.fc-all-day');
|
||||
function getAllDayRow(index) {
|
||||
return allDayRow;
|
||||
}
|
||||
|
||||
|
||||
|
@ -581,7 +670,7 @@ function AgendaView(element, calendar, viewName) {
|
|||
}
|
||||
|
||||
|
||||
function renderSelection(startDate, endDate, allDay) {
|
||||
function renderSelection(startDate, endDate, allDay) { // only for all-day
|
||||
if (allDay) {
|
||||
if (opt('allDaySlot')) {
|
||||
renderDayOverlay(startDate, addDays(cloneDate(endDate), 1), true);
|
||||
|
@ -598,9 +687,12 @@ function AgendaView(element, calendar, viewName) {
|
|||
if (helperOption) {
|
||||
var col = dayDiff(startDate, t.visStart) * dis + dit;
|
||||
if (col >= 0 && col < colCnt) { // only works when times are on same day
|
||||
var rect = coordinateGrid.rect(0, col, 0, col, bodyContent); // only for horizontal coords
|
||||
var rect = coordinateGrid.rect(0, col, 0, col, slotContent); // only for horizontal coords
|
||||
var top = timePosition(startDate, startDate);
|
||||
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
|
||||
rect.top = top;
|
||||
rect.height = bottom - top;
|
||||
|
@ -613,28 +705,26 @@ function AgendaView(element, calendar, viewName) {
|
|||
rect.zIndex = 8;
|
||||
selectionHelper = $(helperRes)
|
||||
.css(rect)
|
||||
.appendTo(bodyContent);
|
||||
.appendTo(slotContent);
|
||||
}
|
||||
}else{
|
||||
rect.isStart = true; // conside rect a "seg" now
|
||||
rect.isEnd = true; //
|
||||
selectionHelper = $(slotSegHtml(
|
||||
{
|
||||
title: '',
|
||||
start: startDate,
|
||||
end: endDate,
|
||||
className: [],
|
||||
className: ['fc-select-helper'],
|
||||
editable: false
|
||||
},
|
||||
rect,
|
||||
'fc-event fc-event-vert fc-corner-top fc-corner-bottom '
|
||||
rect
|
||||
));
|
||||
if ($.browser.msie) {
|
||||
selectionHelper.find('span.fc-event-bg').hide(); // nested opacities mess up in IE, just hide
|
||||
}
|
||||
selectionHelper.css('opacity', opt('dragOpacity'));
|
||||
}
|
||||
if (selectionHelper) {
|
||||
slotBind(selectionHelper);
|
||||
bodyContent.append(selectionHelper);
|
||||
slotContent.append(selectionHelper);
|
||||
setOuterWidth(selectionHelper, rect.width, true); // needs to be after appended
|
||||
setOuterHeight(selectionHelper, rect.height, true);
|
||||
}
|
||||
|
@ -658,19 +748,37 @@ function AgendaView(element, calendar, viewName) {
|
|||
function slotSelectionMousedown(ev) {
|
||||
if (ev.which == 1 && opt('selectable')) { // ev.which==1 means left mouse button
|
||||
unselect(ev);
|
||||
var _mousedownElement = this;
|
||||
var dates;
|
||||
var minSlotNumber = opt('minSlotNumber');
|
||||
if (minSlotNumber <= 0) minSlotNumber = 1;
|
||||
var maxSlotNumber = opt('maxSlotNumber');
|
||||
hoverListener.start(function(cell, origCell) {
|
||||
clearSelection();
|
||||
if (cell && cell.col == origCell.col && !cellIsAllDay(cell)) {
|
||||
var d1 = cellDate(origCell);
|
||||
var d2 = cellDate(cell);
|
||||
dates = [
|
||||
d1,
|
||||
addMinutes(cloneDate(d1), opt('slotMinutes')),
|
||||
d2,
|
||||
addMinutes(cloneDate(d2), opt('slotMinutes'))
|
||||
].sort(cmp);
|
||||
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 = [
|
||||
date1,
|
||||
addMinutes(cloneDate(date1), minSlotNumber*opt('slotMinutes')),
|
||||
date1,
|
||||
addMinutes(cloneDate(date1), maxSlotNumber*opt('slotMinutes'))
|
||||
].sort(cmp);
|
||||
} else {
|
||||
dates = [
|
||||
date1,
|
||||
addMinutes(cloneDate(date1), minSlotNumber*opt('slotMinutes')),
|
||||
date2,
|
||||
addMinutes(cloneDate(date2), opt('slotMinutes'))
|
||||
].sort(cmp);
|
||||
}
|
||||
renderSlotSelection(dates[0], dates[3]);
|
||||
}else{
|
||||
dates = null;
|
||||
|
@ -680,8 +788,7 @@ function AgendaView(element, calendar, viewName) {
|
|||
hoverListener.stop();
|
||||
if (dates) {
|
||||
if (+dates[0] == +dates[1]) {
|
||||
trigger('dayClick', _mousedownElement, dates[0], false, ev);
|
||||
// BUG: _mousedownElement will sometimes be the overlay
|
||||
reportDayClick(dates[0], false, ev);
|
||||
}
|
||||
reportSelection(dates[0], dates[3], false, ev);
|
||||
}
|
||||
|
@ -690,6 +797,11 @@ function AgendaView(element, calendar, viewName) {
|
|||
}
|
||||
|
||||
|
||||
function reportDayClick(date, allDay, ev) {
|
||||
trigger('dayClick', dayBodyCells[dayOfWeekCol(date.getDay())], date, allDay, ev);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* External Dragging
|
||||
--------------------------------------------------------------------------------*/
|
||||
|
|
|
@ -2,82 +2,86 @@
|
|||
/* Agenda Week View, Agenda Day View
|
||||
------------------------------------------------------------------------*/
|
||||
|
||||
.fc .fc-agenda th,
|
||||
.fc .fc-agenda td {
|
||||
border-width: 1px 0 0 1px;
|
||||
.fc-agenda table {
|
||||
border-collapse: separate;
|
||||
}
|
||||
|
||||
.fc .fc-agenda .fc-leftmost {
|
||||
border-left: 0;
|
||||
}
|
||||
|
||||
.fc-agenda tr.fc-first th,
|
||||
.fc-agenda tr.fc-first td {
|
||||
border-top: 0;
|
||||
}
|
||||
|
||||
.fc-agenda-head tr.fc-last th {
|
||||
border-bottom-width: 1px;
|
||||
}
|
||||
|
||||
.fc .fc-agenda-head td,
|
||||
.fc .fc-agenda-body td {
|
||||
background: none;
|
||||
}
|
||||
|
||||
.fc-agenda-head th {
|
||||
.fc-agenda-days th {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* the time axis running down the left side */
|
||||
|
||||
.fc-agenda .fc-axis {
|
||||
.fc-agenda .fc-agenda-axis {
|
||||
width: 50px;
|
||||
padding: 0 4px;
|
||||
vertical-align: middle;
|
||||
white-space: nowrap;
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* all-day event cells at top */
|
||||
|
||||
.fc-agenda-head tr.fc-all-day th {
|
||||
height: 35px;
|
||||
.fc-agenda .fc-day-content {
|
||||
padding: 2px 2px 1px;
|
||||
}
|
||||
|
||||
.fc-agenda-head td {
|
||||
padding-bottom: 10px;
|
||||
/* make axis border take precedence */
|
||||
|
||||
.fc-agenda-days .fc-agenda-axis {
|
||||
border-right-width: 1px;
|
||||
}
|
||||
|
||||
.fc .fc-divider div {
|
||||
font-size: 1px; /* for IE6/7 */
|
||||
.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 .fc-divider .fc-state-default {
|
||||
background: #eee; /* color for divider between all-day and time-slot events */
|
||||
.fc-widget-header .fc-agenda-divider-inner {
|
||||
background: #eee;
|
||||
}
|
||||
|
||||
/* body styles */
|
||||
/* slot rows */
|
||||
|
||||
.fc .fc-agenda-body td div {
|
||||
height: 20px; /* slot height */
|
||||
.fc-agenda-slots th {
|
||||
border-width: 1px 1px 0;
|
||||
}
|
||||
|
||||
.fc .fc-agenda-body tr.fc-minor th,
|
||||
.fc .fc-agenda-body tr.fc-minor td {
|
||||
.fc-agenda-slots td {
|
||||
border-width: 1px 0 0;
|
||||
background: none;
|
||||
}
|
||||
|
||||
.fc-agenda-slots td div {
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.fc-agenda-slots tr.fc-slot0 th,
|
||||
.fc-agenda-slots tr.fc-slot0 td {
|
||||
border-top-width: 0;
|
||||
}
|
||||
|
||||
.fc-agenda-slots tr.fc-minor th,
|
||||
.fc-agenda-slots tr.fc-minor td {
|
||||
border-top-style: dotted;
|
||||
}
|
||||
|
||||
.fc-agenda .fc-day-content {
|
||||
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 */
|
||||
.fc-agenda-slots tr.fc-minor th.ui-widget-header {
|
||||
*border-top-style: solid; /* doesn't work with background in IE6/7 */
|
||||
}
|
||||
|
||||
|
||||
|
@ -89,51 +93,20 @@
|
|||
border-width: 0 1px;
|
||||
}
|
||||
|
||||
.fc-event-vert a {
|
||||
border-width: 0;
|
||||
}
|
||||
|
||||
/* 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;
|
||||
.fc-event-vert .fc-event-head,
|
||||
.fc-event-vert .fc-event-content {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.fc-event-vert span.fc-event-time {
|
||||
.fc-event-vert .fc-event-time {
|
||||
white-space: nowrap;
|
||||
_white-space: normal;
|
||||
overflow: hidden;
|
||||
border: 0;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.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 */
|
||||
.fc-event-vert .fc-event-bg { /* makes the event lighter w/ a semi-transparent overlay */
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
top: 0;
|
||||
|
@ -142,7 +115,12 @@
|
|||
height: 100%;
|
||||
background: #fff;
|
||||
opacity: .3;
|
||||
filter: alpha(opacity=30); /* for IE */
|
||||
filter: alpha(opacity=30);
|
||||
}
|
||||
|
||||
.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 */
|
||||
|
@ -151,6 +129,7 @@
|
|||
bottom: 0 !important; /* importants override pre jquery ui 1.7 styles */
|
||||
width: 100% !important;
|
||||
height: 8px !important;
|
||||
overflow: hidden !important;
|
||||
line-height: 8px !important;
|
||||
font-size: 11px !important;
|
||||
font-family: monospace;
|
||||
|
@ -158,4 +137,8 @@
|
|||
cursor: s-resize;
|
||||
}
|
||||
|
||||
.fc-agenda .ui-resizable-resizing { /* TODO: better selector */
|
||||
_overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ function BasicDayView(element, calendar) {
|
|||
t.title = formatDate(date, opt('titleFormat'));
|
||||
t.start = t.visStart = cloneDate(date, true);
|
||||
t.end = t.visEnd = addDays(cloneDate(t.start), 1);
|
||||
renderBasic(1, 1, false);
|
||||
renderBasic(1, 1, 1, false);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -14,6 +14,9 @@ function BasicEventRenderer() {
|
|||
DayEventRenderer.call(t);
|
||||
var opt = t.opt;
|
||||
var trigger = t.trigger;
|
||||
//var setOverflowHidden = t.setOverflowHidden;
|
||||
var isEventDraggable = t.isEventDraggable;
|
||||
var isEventResizable = t.isEventResizable;
|
||||
var reportEvents = t.reportEvents;
|
||||
var reportEventClear = t.reportEventClear;
|
||||
var eventElementHandlers = t.eventElementHandlers;
|
||||
|
@ -76,13 +79,14 @@ function BasicEventRenderer() {
|
|||
|
||||
|
||||
function bindDaySeg(event, eventElement, seg) {
|
||||
eventElementHandlers(event, eventElement);
|
||||
if (event.editable || event.editable === undefined && opt('editable')) {
|
||||
if (isEventDraggable(event)) {
|
||||
draggableDayEvent(event, eventElement);
|
||||
if (seg.isEnd) {
|
||||
resizableDayEvent(event, eventElement, seg);
|
||||
}
|
||||
}
|
||||
if (seg.isEnd && isEventResizable(event)) {
|
||||
resizableDayEvent(event, eventElement, seg);
|
||||
}
|
||||
eventElementHandlers(event, eventElement);
|
||||
// needs to be after, because resizableDayEvent might stopImmediatePropagation on click
|
||||
}
|
||||
|
||||
|
||||
|
@ -92,47 +96,48 @@ function BasicEventRenderer() {
|
|||
|
||||
|
||||
function draggableDayEvent(event, eventElement) {
|
||||
if (!opt('disableDragging') && eventElement.draggable) {
|
||||
var hoverListener = getHoverListener();
|
||||
var dayDelta;
|
||||
eventElement.draggable({
|
||||
zIndex: 9,
|
||||
delay: 50,
|
||||
opacity: opt('dragOpacity'),
|
||||
revertDuration: opt('dragRevertDuration'),
|
||||
start: function(ev, ui) {
|
||||
trigger('eventDragStart', eventElement, event, ev, ui);
|
||||
hideEvents(event, eventElement);
|
||||
hoverListener.start(function(cell, origCell, rowDelta, colDelta) {
|
||||
eventElement.draggable('option', 'revert', !cell || !rowDelta && !colDelta);
|
||||
clearOverlays();
|
||||
if (cell) {
|
||||
dayDelta = rowDelta*7 + colDelta * (opt('isRTL') ? -1 : 1);
|
||||
renderDayOverlay(
|
||||
addDays(cloneDate(event.start), dayDelta),
|
||||
addDays(exclEndDay(event), dayDelta)
|
||||
);
|
||||
}else{
|
||||
dayDelta = 0;
|
||||
}
|
||||
}, ev, 'drag');
|
||||
},
|
||||
stop: function(ev, ui) {
|
||||
hoverListener.stop();
|
||||
if (!eventElement.draggable)
|
||||
return;
|
||||
|
||||
var hoverListener = getHoverListener();
|
||||
var dayDelta;
|
||||
eventElement.draggable({
|
||||
zIndex: 9,
|
||||
delay: 50,
|
||||
opacity: opt('dragOpacity'),
|
||||
revertDuration: opt('dragRevertDuration'),
|
||||
start: function(ev, ui) {
|
||||
trigger('eventDragStart', eventElement, event, ev, ui);
|
||||
hideEvents(event, eventElement);
|
||||
hoverListener.start(function(cell, origCell, rowDelta, colDelta) {
|
||||
eventElement.draggable('option', 'revert', !cell || !rowDelta && !colDelta);
|
||||
clearOverlays();
|
||||
trigger('eventDragStop', eventElement, event, ev, ui);
|
||||
if (dayDelta) {
|
||||
eventElement.find('a').removeAttr('href'); // prevents safari from visiting the link
|
||||
eventDrop(this, event, dayDelta, 0, event.allDay, ev, ui);
|
||||
if (cell) {
|
||||
//setOverflowHidden(true);
|
||||
dayDelta = rowDelta*7 + colDelta * (opt('isRTL') ? -1 : 1);
|
||||
renderDayOverlay(
|
||||
addDays(cloneDate(event.start), dayDelta),
|
||||
addDays(exclEndDay(event), dayDelta)
|
||||
);
|
||||
}else{
|
||||
if ($.browser.msie) {
|
||||
eventElement.css('filter', ''); // clear IE opacity side-effects
|
||||
}
|
||||
showEvents(event, eventElement);
|
||||
//setOverflowHidden(false);
|
||||
dayDelta = 0;
|
||||
}
|
||||
}, ev, 'drag');
|
||||
},
|
||||
stop: function(ev, ui) {
|
||||
hoverListener.stop();
|
||||
clearOverlays();
|
||||
trigger('eventDragStop', eventElement, event, ev, ui);
|
||||
if (dayDelta) {
|
||||
eventDrop(this, event, dayDelta, 0, event.allDay, ev, ui);
|
||||
}else{
|
||||
eventElement.css('filter', ''); // clear IE opacity side-effects
|
||||
showEvents(event, eventElement);
|
||||
}
|
||||
});
|
||||
}
|
||||
//setOverflowHidden(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
|
||||
var tdHeightBug;
|
||||
|
||||
setDefaults({
|
||||
weekMode: 'fixed'
|
||||
});
|
||||
|
@ -18,6 +16,7 @@ function BasicView(element, calendar, viewName) {
|
|||
t.defaultSelectionEnd = defaultSelectionEnd;
|
||||
t.renderSelection = renderSelection;
|
||||
t.clearSelection = clearSelection;
|
||||
t.reportDayClick = reportDayClick; // for selection (kinda hacky)
|
||||
t.dragStart = dragStart;
|
||||
t.dragStop = dragStop;
|
||||
t.defaultEventEnd = defaultEventEnd;
|
||||
|
@ -28,7 +27,7 @@ function BasicView(element, calendar, viewName) {
|
|||
t.dateCell = dateCell;
|
||||
t.cellDate = cellDate;
|
||||
t.cellIsAllDay = function() { return true };
|
||||
t.allDayTR = allDayTR;
|
||||
t.allDayRow = allDayRow;
|
||||
t.allDayBounds = allDayBounds;
|
||||
t.getRowCnt = function() { return rowCnt };
|
||||
t.getColCnt = function() { return colCnt };
|
||||
|
@ -51,18 +50,31 @@ function BasicView(element, calendar, viewName) {
|
|||
|
||||
|
||||
// locals
|
||||
var rtl, dis, dit;
|
||||
var firstDay;
|
||||
var nwe;
|
||||
var rowCnt, colCnt;
|
||||
var colWidth;
|
||||
var viewWidth, viewHeight;
|
||||
var thead, tbody;
|
||||
|
||||
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 firstDay;
|
||||
var nwe;
|
||||
var tm;
|
||||
var colFormat;
|
||||
|
||||
|
||||
|
||||
/* Rendering
|
||||
|
@ -72,10 +84,22 @@ function BasicView(element, calendar, viewName) {
|
|||
disableTextSelection(element.addClass('fc-grid'));
|
||||
|
||||
|
||||
function renderBasic(r, c, showNumbers) {
|
||||
|
||||
function renderBasic(maxr, r, c, showNumbers) {
|
||||
rowCnt = r;
|
||||
colCnt = c;
|
||||
updateOptions();
|
||||
var firstTime = !body;
|
||||
if (firstTime) {
|
||||
buildSkeleton(maxr, showNumbers);
|
||||
}else{
|
||||
clearEvents();
|
||||
}
|
||||
updateCells(firstTime);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function updateOptions() {
|
||||
rtl = opt('isRTL');
|
||||
if (rtl) {
|
||||
dis = -1;
|
||||
|
@ -86,171 +110,156 @@ function BasicView(element, calendar, viewName) {
|
|||
}
|
||||
firstDay = opt('firstDay');
|
||||
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'> </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 today = clearTime(new Date());
|
||||
var s, i, j, d = cloneDate(t.visStart);
|
||||
var cell;
|
||||
var date;
|
||||
var row;
|
||||
|
||||
if (!tbody) { // first time, build all cells from scratch
|
||||
|
||||
var table = $("<table/>").appendTo(element);
|
||||
|
||||
s = "<thead><tr>";
|
||||
for (i=0; i<colCnt; i++) {
|
||||
s += "<th class='fc-" +
|
||||
dayIDs[d.getDay()] + ' ' + // needs to be first
|
||||
tm + '-state-default' +
|
||||
(i==dit ? ' fc-leftmost' : '') +
|
||||
"'>" + formatDate(d, colFormat) + "</th>";
|
||||
addDays(d, 1);
|
||||
if (nwe) {
|
||||
skipWeekend(d);
|
||||
}
|
||||
}
|
||||
thead = $(s + "</tr></thead>").appendTo(table);
|
||||
|
||||
s = "<tbody>";
|
||||
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'> </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'> </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);
|
||||
}
|
||||
if (dowDirty) {
|
||||
headCells.each(function(i, _cell) {
|
||||
cell = $(_cell);
|
||||
date = indexDate(i);
|
||||
cell.html(formatDate(date, colFormat));
|
||||
setDayID(cell, date);
|
||||
});
|
||||
|
||||
if (rowCnt == 1) { // more changes likely (week or day view)
|
||||
|
||||
// redo column header text and class
|
||||
d = cloneDate(t.visStart);
|
||||
thead.find('th').each(function(i, th) {
|
||||
$(th).text(formatDate(d, colFormat));
|
||||
th.className = th.className.replace(/^fc-\w+(?= )/, 'fc-' + dayIDs[d.getDay()]);
|
||||
addDays(d, 1);
|
||||
if (nwe) {
|
||||
skipWeekend(d);
|
||||
}
|
||||
});
|
||||
|
||||
// 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);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
bodyCells.each(function(i, _cell) {
|
||||
cell = $(_cell);
|
||||
date = indexDate(i);
|
||||
if (date.getMonth() == month) {
|
||||
cell.removeClass('fc-other-month');
|
||||
}else{
|
||||
cell.addClass('fc-other-month');
|
||||
}
|
||||
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());
|
||||
trigger('dayRender', t, date, cell);
|
||||
if (dowDirty) {
|
||||
setDayID(cell, date);
|
||||
}
|
||||
});
|
||||
|
||||
bodyRows.each(function(i, _row) {
|
||||
row = $(_row);
|
||||
if (i < rowCnt) {
|
||||
row.show();
|
||||
if (i == rowCnt-1) {
|
||||
row.addClass('fc-last');
|
||||
}else{
|
||||
row.removeClass('fc-last');
|
||||
}
|
||||
}else{
|
||||
row.hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
function setHeight(height) {
|
||||
viewHeight = height;
|
||||
var leftTDs = tbody.find('tr td:first-child'),
|
||||
tbodyHeight = viewHeight - thead.height(),
|
||||
rowHeight1, rowHeight2;
|
||||
|
||||
var bodyHeight = viewHeight - head.height();
|
||||
var rowHeight;
|
||||
var rowHeightLast;
|
||||
var cell;
|
||||
|
||||
if (opt('weekMode') == 'variable') {
|
||||
rowHeight1 = rowHeight2 = Math.floor(tbodyHeight / (rowCnt==1 ? 2 : 6));
|
||||
rowHeight = rowHeightLast = Math.floor(bodyHeight / (rowCnt==1 ? 2 : 6));
|
||||
}else{
|
||||
rowHeight1 = Math.floor(tbodyHeight / rowCnt);
|
||||
rowHeight2 = tbodyHeight - rowHeight1*(rowCnt-1);
|
||||
}
|
||||
if (tdHeightBug === undefined) {
|
||||
// bug in firefox where cell height includes padding
|
||||
var tr = tbody.find('tr:first'),
|
||||
td = tr.find('td:first');
|
||||
td.height(rowHeight1);
|
||||
tdHeightBug = rowHeight1 != td.height();
|
||||
}
|
||||
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);
|
||||
rowHeight = Math.floor(bodyHeight / rowCnt);
|
||||
rowHeightLast = bodyHeight - rowHeight * (rowCnt-1);
|
||||
}
|
||||
|
||||
bodyFirstCells.each(function(i, _cell) {
|
||||
if (i < rowCnt) {
|
||||
cell = $(_cell);
|
||||
setMinHeight(
|
||||
cell.find('> div'),
|
||||
(i==rowCnt-1 ? rowHeightLast : rowHeight) - vsides(cell)
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -258,7 +267,7 @@ function BasicView(element, calendar, viewName) {
|
|||
viewWidth = width;
|
||||
colContentPositions.clear();
|
||||
colWidth = Math.floor(viewWidth / colCnt);
|
||||
setOuterWidth(thead.find('th').slice(0, -1), colWidth);
|
||||
setOuterWidth(headCells.slice(0, -1), colWidth);
|
||||
}
|
||||
|
||||
|
||||
|
@ -274,13 +283,9 @@ function BasicView(element, calendar, viewName) {
|
|||
|
||||
|
||||
function dayClick(ev) {
|
||||
if (!opt('selectable')) { // SelectionManager will worry about dayClick
|
||||
var n = parseInt(this.className.match(/fc\-day(\d+)/)[1]),
|
||||
date = addDays(
|
||||
cloneDate(t.visStart),
|
||||
Math.floor(n/colCnt) * 7 + n % colCnt
|
||||
);
|
||||
// TODO: what about weekends in middle of week?
|
||||
if (!opt('selectable')) { // if selectable, SelectionManager will worry about dayClick
|
||||
var index = parseInt(this.className.match(/fc\-day(\d+)/)[1]); // TODO: maybe use .data
|
||||
var date = indexDate(index);
|
||||
trigger('dayClick', this, date, true, ev);
|
||||
}
|
||||
}
|
||||
|
@ -345,6 +350,13 @@ 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
|
||||
-----------------------------------------------------------------------*/
|
||||
|
@ -382,11 +394,7 @@ function BasicView(element, calendar, viewName) {
|
|||
|
||||
coordinateGrid = new CoordinateGrid(function(rows, cols) {
|
||||
var e, n, p;
|
||||
var tds = tbody.find('tr:first td');
|
||||
if (rtl) {
|
||||
tds = $(tds.get().reverse());
|
||||
}
|
||||
tds.each(function(i, _e) {
|
||||
headCells.each(function(i, _e) {
|
||||
e = $(_e);
|
||||
n = e.offset().left;
|
||||
if (i) {
|
||||
|
@ -396,14 +404,16 @@ function BasicView(element, calendar, viewName) {
|
|||
cols[i] = p;
|
||||
});
|
||||
p[1] = n + e.outerWidth();
|
||||
tbody.find('tr').each(function(i, _e) {
|
||||
e = $(_e);
|
||||
n = e.offset().top;
|
||||
if (i) {
|
||||
p[1] = n;
|
||||
bodyRows.each(function(i, _e) {
|
||||
if (i < rowCnt) {
|
||||
e = $(_e);
|
||||
n = e.offset().top;
|
||||
if (i) {
|
||||
p[1] = n;
|
||||
}
|
||||
p = [n];
|
||||
rows[i] = p;
|
||||
}
|
||||
p = [n];
|
||||
rows[i] = p;
|
||||
});
|
||||
p[1] = n + e.outerHeight();
|
||||
});
|
||||
|
@ -413,7 +423,7 @@ function BasicView(element, calendar, viewName) {
|
|||
|
||||
|
||||
colContentPositions = new HorizontalPositionCache(function(col) {
|
||||
return tbody.find('td:eq(' + col + ') div div');
|
||||
return bodyCellTopInners.eq(col);
|
||||
});
|
||||
|
||||
|
||||
|
@ -427,27 +437,41 @@ function BasicView(element, calendar, viewName) {
|
|||
}
|
||||
|
||||
|
||||
function dayOfWeekCol(dayOfWeek) {
|
||||
return (dayOfWeek - Math.max(firstDay, nwe) + colCnt) % colCnt;
|
||||
}
|
||||
|
||||
|
||||
function dateCell(date) {
|
||||
return {
|
||||
row: Math.floor(dayDiff(date, t.visStart) / 7),
|
||||
col: dayOfWeekCol(date.getDay())*dis + dit
|
||||
col: dayOfWeekCol(date.getDay())
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
function cellDate(cell) {
|
||||
return addDays(cloneDate(t.visStart), cell.row*7 + cell.col*dis+dit);
|
||||
// TODO: what about weekends in middle of week?
|
||||
return _cellDate(cell.row, cell.col);
|
||||
}
|
||||
|
||||
|
||||
function allDayTR(i) {
|
||||
return tbody.find('tr:eq('+i+')');
|
||||
function _cellDate(row, col) {
|
||||
return addDays(cloneDate(t.visStart), row*7 + col*dis+dit);
|
||||
// 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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ function BasicWeekView(element, calendar) {
|
|||
t.end = end;
|
||||
t.visStart = visStart;
|
||||
t.visEnd = visEnd;
|
||||
renderBasic(1, weekends ? 7 : 5, false);
|
||||
renderBasic(1, 1, weekends ? 7 : 5, false);
|
||||
}
|
||||
|
||||
|
||||
|
|
46
src/basic/FourWeeksView.js
Normal file
|
@ -0,0 +1,46 @@
|
|||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -45,7 +45,7 @@ function MonthView(element, calendar) {
|
|||
t.end = end;
|
||||
t.visStart = visStart;
|
||||
t.visEnd = visEnd;
|
||||
renderBasic(rowCnt, nwe ? 5 : 7, true);
|
||||
renderBasic(6, rowCnt, nwe ? 5 : 7, true);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2,24 +2,10 @@
|
|||
/* Month View, Basic Week View, Basic Day View
|
||||
------------------------------------------------------------------------*/
|
||||
|
||||
.fc-grid table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.fc .fc-grid th {
|
||||
border-width: 0 0 0 1px;
|
||||
.fc-grid th {
|
||||
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 {
|
||||
float: right;
|
||||
padding: 0 2px;
|
||||
|
@ -35,7 +21,7 @@
|
|||
|
||||
.fc-grid .fc-day-content {
|
||||
clear: both;
|
||||
padding: 2px 2px 0; /* distance between events and day edges */
|
||||
padding: 2px 2px 1px; /* distance between events and day edges */
|
||||
}
|
||||
|
||||
/* event styles */
|
||||
|
@ -46,10 +32,6 @@
|
|||
|
||||
/* right-to-left */
|
||||
|
||||
.fc-rtl .fc-grid {
|
||||
direction: rtl;
|
||||
}
|
||||
|
||||
.fc-rtl .fc-grid .fc-day-number {
|
||||
float: left;
|
||||
}
|
||||
|
@ -58,3 +40,4 @@
|
|||
float: right;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -5,12 +5,14 @@ function CoordinateGrid(buildFunc) {
|
|||
var rows;
|
||||
var cols;
|
||||
|
||||
|
||||
t.build = function() {
|
||||
rows = [];
|
||||
cols = [];
|
||||
buildFunc(rows, cols);
|
||||
};
|
||||
|
||||
|
||||
t.cell = function(x, y) {
|
||||
var rowCnt = rows.length;
|
||||
var colCnt = cols.length;
|
||||
|
@ -30,6 +32,7 @@ function CoordinateGrid(buildFunc) {
|
|||
return (r>=0 && c>=0) ? { row:r, col:c } : null;
|
||||
};
|
||||
|
||||
|
||||
t.rect = function(row0, col0, row1, col1, originElement) { // row1,col1 is inclusive
|
||||
var origin = originElement.offset();
|
||||
return {
|
||||
|
|
|
@ -11,6 +11,8 @@ function DayEventRenderer() {
|
|||
// imports
|
||||
var opt = t.opt;
|
||||
var trigger = t.trigger;
|
||||
var isEventDraggable = t.isEventDraggable;
|
||||
var isEventResizable = t.isEventResizable;
|
||||
var eventEnd = t.eventEnd;
|
||||
var reportEventElement = t.reportEventElement;
|
||||
var showEvents = t.showEvents;
|
||||
|
@ -19,7 +21,7 @@ function DayEventRenderer() {
|
|||
var getRowCnt = t.getRowCnt;
|
||||
var getColCnt = t.getColCnt;
|
||||
var getColWidth = t.getColWidth;
|
||||
var allDayTR = t.allDayTR;
|
||||
var allDayRow = t.allDayRow;
|
||||
var allDayBounds = t.allDayBounds;
|
||||
var colContentLeft = t.colContentLeft;
|
||||
var colContentRight = t.colContentRight;
|
||||
|
@ -119,61 +121,88 @@ function DayEventRenderer() {
|
|||
var segCnt=segs.length;
|
||||
var seg;
|
||||
var event;
|
||||
var className;
|
||||
var url;
|
||||
var classes;
|
||||
var bounds = allDayBounds();
|
||||
var minLeft = bounds.left;
|
||||
var maxLeft = bounds.right;
|
||||
var cols = []; // don't really like this system (but have to do this b/c RTL works differently in basic vs agenda)
|
||||
var leftCol;
|
||||
var rightCol;
|
||||
var left;
|
||||
var right;
|
||||
var skinCss;
|
||||
var html = '';
|
||||
// calculate desired position/dimensions, create html
|
||||
for (i=0; i<segCnt; i++) {
|
||||
seg = segs[i];
|
||||
event = seg.event;
|
||||
className = 'fc-event fc-event-hori ';
|
||||
classes = ['fc-event', 'fc-event-skin', 'fc-event-hori'];
|
||||
if (isEventDraggable(event)) {
|
||||
classes.push('fc-event-draggable');
|
||||
}
|
||||
if (rtl) {
|
||||
if (seg.isStart) {
|
||||
className += 'fc-corner-right ';
|
||||
classes.push('fc-corner-right');
|
||||
}
|
||||
if (seg.isEnd) {
|
||||
className += 'fc-corner-left ';
|
||||
classes.push('fc-corner-left');
|
||||
}
|
||||
cols[0] = dayOfWeekCol(seg.end.getDay()-1);
|
||||
cols[1] = dayOfWeekCol(seg.start.getDay());
|
||||
left = seg.isEnd ? colContentLeft(cols[0]) : minLeft;
|
||||
right = seg.isStart ? colContentRight(cols[1]) : maxLeft;
|
||||
leftCol = dayOfWeekCol(seg.end.getDay()-1);
|
||||
rightCol = dayOfWeekCol(seg.start.getDay());
|
||||
left = seg.isEnd ? colContentLeft(leftCol) : minLeft;
|
||||
right = seg.isStart ? colContentRight(rightCol) : maxLeft;
|
||||
}else{
|
||||
if (seg.isStart) {
|
||||
className += 'fc-corner-left ';
|
||||
classes.push('fc-corner-left');
|
||||
}
|
||||
if (seg.isEnd) {
|
||||
className += 'fc-corner-right ';
|
||||
classes.push('fc-corner-right');
|
||||
}
|
||||
cols[0] = dayOfWeekCol(seg.start.getDay());
|
||||
cols[1] = dayOfWeekCol(seg.end.getDay()-1);
|
||||
left = seg.isStart ? colContentLeft(cols[0]) : minLeft;
|
||||
right = seg.isEnd ? colContentRight(cols[1]) : maxLeft;
|
||||
leftCol = dayOfWeekCol(seg.start.getDay());
|
||||
rightCol = dayOfWeekCol(seg.end.getDay()-1);
|
||||
left = seg.isStart ? colContentLeft(leftCol) : minLeft;
|
||||
right = seg.isEnd ? colContentRight(rightCol) : 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 +=
|
||||
"<div class='" + className + event.className.join(' ') + "' style='position:absolute;z-index:8;left:"+left+"px'>" +
|
||||
"<a" + (event.url ? " href='" + htmlEscape(event.url) + "'" : '') + ">" +
|
||||
(!event.allDay && seg.isStart ?
|
||||
"<span class='fc-event-time'>" +
|
||||
htmlEscape(formatDates(event.start, event.end, opt('timeFormat'))) +
|
||||
"</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>"
|
||||
: '') +
|
||||
" class='" + classes.join(' ') + "'" +
|
||||
" style='position:absolute;z-index:8;left:"+left+"px;" + skinCss + "'" +
|
||||
">" +
|
||||
"<div" +
|
||||
" class='fc-event-inner fc-event-skin'" +
|
||||
(skinCss ? " style='" + skinCss + "'" : '') +
|
||||
">";
|
||||
if (!event.allDay && seg.isStart) {
|
||||
html +=
|
||||
"<span class='fc-event-time'>" +
|
||||
htmlEscape(formatDates(event.start, event.end, opt('timeFormat'))) +
|
||||
"</span>";
|
||||
}
|
||||
html +=
|
||||
"<span class='fc-event-title'>" + htmlEscape(event.title) + "</span>" +
|
||||
"</div>";
|
||||
if (seg.isEnd && isEventResizable(event)) {
|
||||
html +=
|
||||
"<div class='ui-resizable-handle ui-resizable-" + (rtl ? 'w' : 'e') + "'>" +
|
||||
" " + // makes hit area a lot better for IE6/7
|
||||
"</div>";
|
||||
}
|
||||
html +=
|
||||
"</" + (url ? "a" : "div" ) + ">";
|
||||
seg.left = left;
|
||||
seg.outerWidth = right - left;
|
||||
cols.sort(cmp);
|
||||
seg.startCol = cols[0];
|
||||
seg.endCol = cols[1] + 1;
|
||||
seg.startCol = leftCol;
|
||||
seg.endCol = rightCol + 1; // needs to be exclusive
|
||||
}
|
||||
return html;
|
||||
}
|
||||
|
@ -262,7 +291,7 @@ function DayEventRenderer() {
|
|||
key = seg.key = cssKey(element[0]);
|
||||
val = hsideCache[key];
|
||||
if (val === undefined) {
|
||||
val = hsideCache[key] = hsides(element[0], true);
|
||||
val = hsideCache[key] = hsides(element, true);
|
||||
}
|
||||
seg.hsides = val;
|
||||
}
|
||||
|
@ -300,7 +329,7 @@ function DayEventRenderer() {
|
|||
key = seg.key; // created in daySegCalcHSides
|
||||
val = vmarginCache[key];
|
||||
if (val === undefined) {
|
||||
val = vmarginCache[key] = vmargins(element[0]);
|
||||
val = vmarginCache[key] = vmargins(element);
|
||||
}
|
||||
seg.outerHeight = element[0].offsetHeight + val;
|
||||
}
|
||||
|
@ -313,7 +342,7 @@ function DayEventRenderer() {
|
|||
var rowCnt = getRowCnt();
|
||||
var rowDivs = [];
|
||||
for (i=0; i<rowCnt; i++) {
|
||||
rowDivs[i] = allDayTR(i)
|
||||
rowDivs[i] = allDayRow(i)
|
||||
.find('td:first div.fc-day-content > div'); // optimal selector?
|
||||
}
|
||||
return rowDivs;
|
||||
|
@ -325,7 +354,7 @@ function DayEventRenderer() {
|
|||
var rowCnt = rowDivs.length;
|
||||
var tops = [];
|
||||
for (i=0; i<rowCnt; i++) {
|
||||
tops[i] = rowDivs[i][0].offsetTop;
|
||||
tops[i] = rowDivs[i][0].offsetTop; // !!?? but this means the element needs position:relative if in a table cell!!!!
|
||||
}
|
||||
return tops;
|
||||
}
|
||||
|
@ -355,78 +384,99 @@ function DayEventRenderer() {
|
|||
|
||||
|
||||
function resizableDayEvent(event, element, seg) {
|
||||
if (!opt('disableResizing') && seg.isEnd) {
|
||||
var rtl = opt('isRTL');
|
||||
var direction = rtl ? 'w' : 'e';
|
||||
var handle = element.find('div.ui-resizable-' + direction);
|
||||
handle.mousedown(function(ev) {
|
||||
if (ev.which != 1) {
|
||||
return; // needs to be left mouse button
|
||||
}
|
||||
var hoverListener = t.getHoverListener();
|
||||
var rowCnt = getRowCnt();
|
||||
var colCnt = getColCnt();
|
||||
var dis = rtl ? -1 : 1;
|
||||
var dit = rtl ? colCnt : 0;
|
||||
var elementTop = element.css('top');
|
||||
var dayDelta;
|
||||
var helpers;
|
||||
var eventCopy = $.extend({}, event);
|
||||
var minCell = dateCell(event.start);
|
||||
clearSelection();
|
||||
$('body')
|
||||
.css('cursor', direction + '-resize')
|
||||
.one('mouseup', mouseup);
|
||||
trigger('eventResizeStart', this, event, ev);
|
||||
hoverListener.start(function(cell, origCell) {
|
||||
if (cell) {
|
||||
var r = Math.max(minCell.row, cell.row);
|
||||
var c = cell.col;
|
||||
if (rowCnt == 1) {
|
||||
r = 0; // hack for all-day area in agenda views
|
||||
}
|
||||
if (r == minCell.row) {
|
||||
if (rtl) {
|
||||
c = Math.min(minCell.col, c);
|
||||
}else{
|
||||
c = Math.max(minCell.col, c);
|
||||
}
|
||||
}
|
||||
dayDelta = (r * colCnt + c*dis+dit) - (origCell.row * colCnt + origCell.col*dis+dit);
|
||||
var newEnd = addDays(eventEnd(event), dayDelta, true);
|
||||
if (dayDelta) {
|
||||
eventCopy.end = newEnd;
|
||||
var oldHelpers = helpers;
|
||||
helpers = renderTempDaySegs(compileDaySegs([eventCopy]), seg.row, elementTop);
|
||||
helpers.find('*').css('cursor', direction + '-resize');
|
||||
if (oldHelpers) {
|
||||
oldHelpers.remove();
|
||||
}
|
||||
hideEvents(event);
|
||||
}else{
|
||||
if (helpers) {
|
||||
showEvents(event);
|
||||
helpers.remove();
|
||||
helpers = null;
|
||||
}
|
||||
}
|
||||
clearOverlays();
|
||||
renderDayOverlay(event.start, addDays(cloneDate(newEnd), 1)); // coordinate grid already rebuild at hoverListener.start
|
||||
}
|
||||
}, ev);
|
||||
function mouseup(ev) {
|
||||
trigger('eventResizeStop', this, event, ev);
|
||||
$('body').css('cursor', 'auto');
|
||||
hoverListener.stop();
|
||||
clearOverlays();
|
||||
if (dayDelta) {
|
||||
eventResize(this, event, dayDelta, 0, ev);
|
||||
// event redraw will clear helpers
|
||||
}
|
||||
// otherwise, the drag handler already restored the old events
|
||||
var rtl = opt('isRTL');
|
||||
var direction = rtl ? 'w' : 'e';
|
||||
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) {
|
||||
if (ev.which != 1) {
|
||||
return; // needs to be left mouse button
|
||||
}
|
||||
isResizing = true;
|
||||
var hoverListener = t.getHoverListener();
|
||||
var rowCnt = getRowCnt();
|
||||
var colCnt = getColCnt();
|
||||
var dis = rtl ? -1 : 1;
|
||||
var dit = rtl ? colCnt-1 : 0;
|
||||
var elementTop = element.css('top');
|
||||
var dayDelta;
|
||||
var helpers;
|
||||
var eventCopy = $.extend({}, event);
|
||||
var minCell = dateCell(event.start);
|
||||
clearSelection();
|
||||
$('body')
|
||||
.css('cursor', direction + '-resize')
|
||||
.one('mouseup', mouseup);
|
||||
trigger('eventResizeStart', this, event, ev);
|
||||
hoverListener.start(function(cell, origCell) {
|
||||
if (cell) {
|
||||
var r = Math.max(minCell.row, cell.row);
|
||||
var c = cell.col;
|
||||
if (rowCnt == 1) {
|
||||
r = 0; // hack for all-day area in agenda views
|
||||
}
|
||||
if (r == minCell.row) {
|
||||
if (rtl) {
|
||||
c = Math.min(minCell.col, c);
|
||||
}else{
|
||||
c = Math.max(minCell.col, c);
|
||||
}
|
||||
}
|
||||
dayDelta = (r*7 + c*dis+dit) - (origCell.row*7 + origCell.col*dis+dit);
|
||||
var newEnd = addDays(eventEnd(event), dayDelta, true);
|
||||
if (dayDelta) {
|
||||
eventCopy.end = newEnd;
|
||||
var oldHelpers = helpers;
|
||||
helpers = renderTempDaySegs(compileDaySegs([eventCopy]), seg.row, elementTop);
|
||||
helpers.find('*').css('cursor', direction + '-resize');
|
||||
if (oldHelpers) {
|
||||
oldHelpers.remove();
|
||||
}
|
||||
hideEvents(event);
|
||||
}else{
|
||||
if (helpers) {
|
||||
showEvents(event);
|
||||
helpers.remove();
|
||||
helpers = null;
|
||||
}
|
||||
}
|
||||
clearOverlays();
|
||||
renderDayOverlay(event.start, addDays(cloneDate(newEnd), 1)); // coordinate grid already rebuild at hoverListener.start
|
||||
}
|
||||
}, ev);
|
||||
|
||||
function mouseup(ev) {
|
||||
trigger('eventResizeStop', this, event, ev);
|
||||
$('body').css('cursor', '');
|
||||
hoverListener.stop();
|
||||
clearOverlays();
|
||||
if (dayDelta) {
|
||||
eventResize(this, event, dayDelta, 0, ev);
|
||||
// event redraw will clear helpers
|
||||
}
|
||||
// otherwise, the drag handler already restored the old events
|
||||
|
||||
setTimeout(function() { // make this happen after the element's click event
|
||||
isResizing = false;
|
||||
},0);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@ function HoverListener(coordinateGrid) {
|
|||
|
||||
|
||||
function mouse(ev) {
|
||||
_fixUIEvent(ev);
|
||||
var newCell = coordinateGrid.cell(ev.pageX, ev.pageY);
|
||||
if (!newCell != !cell || newCell && (newCell.row != cell.row || newCell.col != cell.col)) {
|
||||
if (newCell) {
|
||||
|
@ -42,3 +43,11 @@ 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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -68,6 +68,7 @@ function SelectionManager() {
|
|||
var cellDate = t.cellDate;
|
||||
var cellIsAllDay = t.cellIsAllDay;
|
||||
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
|
||||
unselect(ev);
|
||||
var _mousedownElement = this;
|
||||
|
@ -85,8 +86,7 @@ function SelectionManager() {
|
|||
hoverListener.stop();
|
||||
if (dates) {
|
||||
if (+dates[0] == +dates[1]) {
|
||||
trigger('dayClick', _mousedownElement, dates[0], true, ev);
|
||||
// BUG: _mousedownElement will sometimes be the overlay
|
||||
reportDayClick(dates[0], true, ev);
|
||||
}
|
||||
reportSelection(dates[0], dates[1], true, ev);
|
||||
}
|
||||
|
|
|
@ -10,6 +10,9 @@ function View(element, calendar, viewName) {
|
|||
t.name = viewName;
|
||||
t.opt = opt;
|
||||
t.trigger = trigger;
|
||||
//t.setOverflowHidden = setOverflowHidden;
|
||||
t.isEventDraggable = isEventDraggable;
|
||||
t.isEventResizable = isEventResizable;
|
||||
t.reportEvents = reportEvents;
|
||||
t.eventEnd = eventEnd;
|
||||
t.reportEventElement = reportEventElement;
|
||||
|
@ -55,6 +58,28 @@ 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
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -81,6 +106,18 @@ 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
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -152,9 +189,15 @@ function View(element, calendar, viewName) {
|
|||
|
||||
|
||||
function eventDrop(e, event, dayDelta, minuteDelta, allDay, ev, ui) {
|
||||
var events;
|
||||
var oldAllDay = event.allDay;
|
||||
var eventId = event._id;
|
||||
moveEvents(eventsByID[eventId], dayDelta, minuteDelta, allDay);
|
||||
var prop = opt('eventGroupProperty') || 'id';
|
||||
if (prop != 'id')
|
||||
events = eventsByProp(prop, event[prop]);
|
||||
else
|
||||
events = eventsByID[eventId];
|
||||
moveEvents(events, dayDelta, minuteDelta, allDay);
|
||||
trigger(
|
||||
'eventDrop',
|
||||
e,
|
||||
|
@ -164,7 +207,7 @@ function View(element, calendar, viewName) {
|
|||
allDay,
|
||||
function() {
|
||||
// TODO: investigate cases where this inverse technique might not work
|
||||
moveEvents(eventsByID[eventId], -dayDelta, -minuteDelta, oldAllDay);
|
||||
moveEvents(events, -dayDelta, -minuteDelta, oldAllDay);
|
||||
reportEventChange(eventId);
|
||||
},
|
||||
ev,
|
||||
|
@ -175,8 +218,14 @@ function View(element, calendar, viewName) {
|
|||
|
||||
|
||||
function eventResize(e, event, dayDelta, minuteDelta, ev, ui) {
|
||||
var events;
|
||||
var eventId = event._id;
|
||||
elongateEvents(eventsByID[eventId], dayDelta, minuteDelta);
|
||||
var prop = opt('eventGroupProperty') || 'id';
|
||||
if (prop != 'id')
|
||||
events = eventsByProp(prop, event[prop]);
|
||||
else
|
||||
events = eventsByID[eventId];
|
||||
elongateEvents(events, dayDelta, minuteDelta);
|
||||
trigger(
|
||||
'eventResize',
|
||||
e,
|
||||
|
@ -185,7 +234,7 @@ function View(element, calendar, viewName) {
|
|||
minuteDelta,
|
||||
function() {
|
||||
// TODO: investigate cases where this inverse technique might not work
|
||||
elongateEvents(eventsByID[eventId], -dayDelta, -minuteDelta);
|
||||
elongateEvents(events, -dayDelta, -minuteDelta);
|
||||
reportEventChange(eventId);
|
||||
},
|
||||
ev,
|
||||
|
@ -210,6 +259,8 @@ function View(element, calendar, viewName) {
|
|||
addMinutes(addDays(e.start, dayDelta, true), minuteDelta);
|
||||
if (e.end) {
|
||||
e.end = addMinutes(addDays(e.end, dayDelta, true), minuteDelta);
|
||||
} else {
|
||||
e.end = defaultEventEnd(e);
|
||||
}
|
||||
normalizeEvent(e, options);
|
||||
}
|
||||
|
|
|
@ -1,42 +1,176 @@
|
|||
|
||||
/* 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
|
||||
------------------------------------------------------------------------*/
|
||||
|
||||
.fc-event,
|
||||
.fc-agenda .fc-event-time,
|
||||
.fc-event a {
|
||||
.fc-event {
|
||||
border-style: solid;
|
||||
border-color: #36c; /* default BORDER color (probably the same as background-color) */
|
||||
border-width: 0;
|
||||
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 */
|
||||
color: #fff; /* default TEXT color */
|
||||
}
|
||||
|
||||
/* Use the 'className' CalEvent property and the following
|
||||
* example CSS to change event color on a per-event basis:
|
||||
*
|
||||
* .myclass,
|
||||
* .fc-agenda .myclass .fc-event-time,
|
||||
* .myclass a {
|
||||
* background-color: black;
|
||||
* border-color: black;
|
||||
* color: red;
|
||||
* }
|
||||
*/
|
||||
|
||||
.fc-event {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.fc-event a {
|
||||
.fc-event-inner {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-style: solid;
|
||||
border-width: 0;
|
||||
overflow: hidden;
|
||||
font-size: .85em;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.fc-event-editable {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.fc-event-time,
|
||||
|
@ -44,29 +178,13 @@
|
|||
padding: 0 1px;
|
||||
}
|
||||
|
||||
/* 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 ***/
|
||||
.fc .ui-resizable-handle { /*** TODO: don't use ui-resizable anymore, change class ***/
|
||||
display: block;
|
||||
position: absolute;
|
||||
z-index: 99999;
|
||||
border: 0 !important; /* important overrides pre jquery ui 1.7 styles */
|
||||
background: url(data:image/gif;base64,AAAA) !important; /* hover fix for IE */
|
||||
overflow: hidden; /* hacky spaces (IE6/7) */
|
||||
font-size: 300%; /* */
|
||||
line-height: 50%; /* */
|
||||
}
|
||||
|
||||
|
||||
|
@ -79,30 +197,6 @@
|
|||
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 */
|
||||
|
||||
.fc-event-hori .ui-resizable-e {
|
||||
|
@ -127,3 +221,91 @@
|
|||
|
||||
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
|
||||
|
|
61
src/common/print.css
Normal file
|
@ -0,0 +1,61 @@
|
|||
/*
|
||||
* 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;
|
||||
}
|
||||
|
||||
|
|
@ -146,8 +146,8 @@ function parseDate(s, ignoreTimezone) { // ignoreTimezone defaults to true
|
|||
return new Date(s * 1000);
|
||||
}
|
||||
if (typeof s == 'string') {
|
||||
if (s.match(/^\d+$/)) { // a UNIX timestamp
|
||||
return new Date(parseInt(s) * 1000);
|
||||
if (s.match(/^\d+(\.\d+)?$/)) { // a UNIX timestamp
|
||||
return new Date(parseFloat(s) * 1000);
|
||||
}
|
||||
if (ignoreTimezone === undefined) {
|
||||
ignoreTimezone = true;
|
||||
|
@ -162,12 +162,12 @@ function parseDate(s, ignoreTimezone) { // ignoreTimezone defaults to true
|
|||
function parseISO8601(s, ignoreTimezone) { // ignoreTimezone defaults to false
|
||||
// derived from http://delete.me.uk/2005/03/iso8601.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) {
|
||||
return null;
|
||||
}
|
||||
var date = new Date(m[1], 0, 1);
|
||||
if (ignoreTimezone || !m[14]) {
|
||||
if (ignoreTimezone || !m[13]) {
|
||||
var check = new Date(m[1], 0, 1, 9, 0);
|
||||
if (m[3]) {
|
||||
date.setMonth(m[3] - 1);
|
||||
|
@ -203,9 +203,11 @@ function parseISO8601(s, ignoreTimezone) { // ignoreTimezone defaults to false
|
|||
m[10] || 0,
|
||||
m[12] ? Number("0." + m[12]) * 1000 : 0
|
||||
);
|
||||
var offset = Number(m[16]) * 60 + Number(m[17]);
|
||||
offset *= m[15] == '-' ? 1 : -1;
|
||||
date = new Date(+date + (offset * 60 * 1000));
|
||||
if (m[14]) {
|
||||
var offset = Number(m[16]) * 60 + (m[18] ? Number(m[18]) : 0);
|
||||
offset *= m[15] == '-' ? 1 : -1;
|
||||
date = new Date(+date + (offset * 60 * 1000));
|
||||
}
|
||||
}
|
||||
return date;
|
||||
}
|
||||
|
@ -220,14 +222,14 @@ function parseTime(s) { // returns minutes since start of day
|
|||
}
|
||||
var m = s.match(/(\d+)(?::(\d+))?\s*(\w+)?/);
|
||||
if (m) {
|
||||
var h = parseInt(m[1]);
|
||||
var h = parseInt(m[1], 10);
|
||||
if (m[3]) {
|
||||
h %= 12;
|
||||
if (m[3].toLowerCase().charAt(0) == 'p') {
|
||||
h += 12;
|
||||
}
|
||||
}
|
||||
return h * 60 + (m[2] ? parseInt(m[2]) : 0);
|
||||
return h * 60 + (m[2] ? parseInt(m[2], 10) : 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -271,7 +273,7 @@ function formatDates(date1, date2, format, options) {
|
|||
for (i2=i+1; i2<len; i2++) {
|
||||
if (format.charAt(i2) == ')') {
|
||||
var subres = formatDate(date, format.substring(i+1, i2), options);
|
||||
if (parseInt(subres.replace(/\D/, ''))) {
|
||||
if (parseInt(subres.replace(/\D/, ''), 10)) {
|
||||
res += subres;
|
||||
}
|
||||
i = i2;
|
|
@ -19,19 +19,23 @@ var defaults = {
|
|||
allDayDefault: true,
|
||||
ignoreTimezone: true,
|
||||
|
||||
|
||||
// event ajax
|
||||
lazyFetching: true,
|
||||
startParam: 'start',
|
||||
endParam: 'end',
|
||||
startEndDateOnly: false,
|
||||
|
||||
// time formats
|
||||
titleFormat: {
|
||||
month: 'MMMM yyyy',
|
||||
fourWeeks: "MMM d[ yyyy]{ '—'[ MMM] d yyyy}",
|
||||
week: "MMM d[ yyyy]{ '—'[ MMM] d yyyy}",
|
||||
day: 'dddd, MMM d, yyyy'
|
||||
},
|
||||
columnFormat: {
|
||||
month: 'ddd',
|
||||
fourWeeks: "ddd",
|
||||
week: 'ddd M/d',
|
||||
day: 'dddd M/d'
|
||||
},
|
||||
|
@ -54,6 +58,7 @@ var defaults = {
|
|||
today: 'today',
|
||||
month: 'month',
|
||||
week: 'week',
|
||||
fourWeeks: "4 weeks",
|
||||
day: 'day'
|
||||
},
|
||||
|
||||
|
|
144
src/gcal/gcal.js
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* FullCalendar v@VERSION Google Calendar Extension
|
||||
* FullCalendar v@VERSION Google Calendar Plugin
|
||||
*
|
||||
* Copyright (c) 2010 Adam Shaw
|
||||
* Copyright (c) 2011 Adam Shaw
|
||||
* Dual licensed under the MIT and GPL licenses, located in
|
||||
* MIT-LICENSE.txt and GPL-LICENSE.txt respectively.
|
||||
*
|
||||
|
@ -11,60 +11,102 @@
|
|||
|
||||
(function($) {
|
||||
|
||||
$.fullCalendar.gcalFeed = function(feedUrl, options) {
|
||||
|
||||
feedUrl = feedUrl.replace(/\/basic$/, '/full');
|
||||
options = options || {};
|
||||
var fc = $.fullCalendar;
|
||||
var formatDate = fc.formatDate;
|
||||
var parseISO8601 = fc.parseISO8601;
|
||||
var addDays = fc.addDays;
|
||||
var applyAll = fc.applyAll;
|
||||
|
||||
return function(start, end, callback) {
|
||||
var params = {
|
||||
'start-min': $.fullCalendar.formatDate(start, 'u'),
|
||||
'start-max': $.fullCalendar.formatDate(end, 'u'),
|
||||
'singleevents': true,
|
||||
'max-results': 9999
|
||||
};
|
||||
var ctz = options.currentTimezone;
|
||||
if (ctz) {
|
||||
params.ctz = ctz = ctz.replace(' ', '_');
|
||||
|
||||
fc.sourceNormalizers.push(function(sourceOptions) {
|
||||
if (sourceOptions.dataType == 'gcal' ||
|
||||
sourceOptions.dataType === undefined &&
|
||||
(sourceOptions.url || '').match(/^(http|https):\/\/www.google.com\/calendar\/feeds\//)) {
|
||||
sourceOptions.dataType = 'gcal';
|
||||
if (sourceOptions.editable === undefined) {
|
||||
sourceOptions.editable = false;
|
||||
}
|
||||
$.getJSON(feedUrl + "?alt=json-in-script&callback=?", params, function(data) {
|
||||
var events = [];
|
||||
if (data.feed.entry) {
|
||||
$.each(data.feed.entry, function(i, entry) {
|
||||
var startStr = entry['gd$when'][0]['startTime'],
|
||||
start = $.fullCalendar.parseISO8601(startStr, true),
|
||||
end = $.fullCalendar.parseISO8601(entry['gd$when'][0]['endTime'], true),
|
||||
allDay = startStr.indexOf('T') == -1,
|
||||
url;
|
||||
$.each(entry.link, function() {
|
||||
if (this.type == 'text/html') {
|
||||
url = this.href;
|
||||
if (ctz) {
|
||||
url += (url.indexOf('?') == -1 ? '?' : '&') + 'ctz=' + ctz;
|
||||
}
|
||||
}
|
||||
});
|
||||
if (allDay) {
|
||||
$.fullCalendar.addDays(end, -1); // make inclusive
|
||||
}
|
||||
events.push({
|
||||
id: entry['gCal$uid']['value'],
|
||||
title: entry['title']['$t'],
|
||||
url: url,
|
||||
start: start,
|
||||
end: end,
|
||||
allDay: allDay,
|
||||
location: entry['gd$where'][0]['valueString'],
|
||||
description: entry['content']['$t'],
|
||||
className: options.className,
|
||||
editable: options.editable || false
|
||||
});
|
||||
});
|
||||
}
|
||||
callback(events);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
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,
|
||||
'max-results': 9999
|
||||
});
|
||||
|
||||
var ctz = sourceOptions.currentTimezone;
|
||||
if (ctz) {
|
||||
data.ctz = ctz = ctz.replace(' ', '_');
|
||||
}
|
||||
|
||||
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 = [];
|
||||
if (data.feed.entry) {
|
||||
$.each(data.feed.entry, function(i, entry) {
|
||||
var startStr = entry['gd$when'][0]['startTime'];
|
||||
var start = parseISO8601(startStr, true);
|
||||
var end = parseISO8601(entry['gd$when'][0]['endTime'], true);
|
||||
var allDay = startStr.indexOf('T') == -1;
|
||||
var url;
|
||||
$.each(entry.link, function(i, link) {
|
||||
if (link.type == 'text/html') {
|
||||
url = link.href;
|
||||
if (ctz) {
|
||||
url += (url.indexOf('?') == -1 ? '?' : '&') + 'ctz=' + ctz;
|
||||
}
|
||||
}
|
||||
});
|
||||
if (allDay) {
|
||||
addDays(end, -1); // make inclusive
|
||||
}
|
||||
events.push({
|
||||
id: entry['gCal$uid']['value'],
|
||||
title: entry['title']['$t'],
|
||||
url: url,
|
||||
start: start,
|
||||
end: end,
|
||||
allDay: allDay,
|
||||
location: entry['gd$where'][0]['valueString'],
|
||||
description: entry['content']['$t']
|
||||
});
|
||||
});
|
||||
}
|
||||
var args = [events].concat(Array.prototype.slice.call(arguments, 1));
|
||||
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);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* For event drag & drop, requires jQuery UI draggable.
|
||||
* For event resizing, requires jQuery UI resizable.
|
||||
*
|
||||
* Copyright (c) 2010 Adam Shaw
|
||||
* Copyright (c) 2011 Adam Shaw
|
||||
* Dual licensed under the MIT and GPL licenses, located in
|
||||
* MIT-LICENSE.txt and GPL-LICENSE.txt respectively.
|
||||
*
|
||||
|
|
199
src/main.css
|
@ -1,24 +1,15 @@
|
|||
/*
|
||||
* FullCalendar v@VERSION Stylesheet
|
||||
*
|
||||
* Feel free to edit this file to customize the look of FullCalendar.
|
||||
* When upgrading to newer versions, please upgrade this file as well,
|
||||
* porting over any customizations afterwards.
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/* TODO: make font sizes look the same in all doctypes */
|
||||
|
||||
|
||||
.fc,
|
||||
.fc .fc-header,
|
||||
.fc .fc-content {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.fc {
|
||||
direction: ltr;
|
||||
text-align: left;
|
||||
|
@ -29,7 +20,13 @@
|
|||
border-spacing: 0;
|
||||
}
|
||||
|
||||
.fc td, .fc th {
|
||||
html .fc,
|
||||
.fc table {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.fc td,
|
||||
.fc th {
|
||||
padding: 0;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
@ -39,199 +36,85 @@
|
|||
/* Header
|
||||
------------------------------------------------------------------------*/
|
||||
|
||||
table.fc-header {
|
||||
width: 100%;
|
||||
.fc-header td {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.fc-header-left {
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
.fc-header-left table {
|
||||
float: left;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.fc-header-center {
|
||||
width: 50%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.fc-header-center table {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.fc-header-right {
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
.fc-header-right table {
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.fc-header-title {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.fc-header-title h2 {
|
||||
margin-top: 0;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.fc-header-space {
|
||||
.fc .fc-header-space {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
/* right-to-left */
|
||||
|
||||
.fc-rtl .fc-header-title {
|
||||
direction: rtl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Buttons
|
||||
------------------------------------------------------------------------*/
|
||||
|
||||
.fc-header .fc-state-default,
|
||||
.fc-header .ui-state-default {
|
||||
.fc-header .fc-button {
|
||||
margin-bottom: 1em;
|
||||
cursor: pointer;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.fc-header .fc-state-default {
|
||||
border-width: 1px 0;
|
||||
padding: 0 1px;
|
||||
}
|
||||
/* buttons edges butting together */
|
||||
|
||||
.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-button {
|
||||
margin-right: -1px;
|
||||
}
|
||||
|
||||
.fc-header .fc-corner-right {
|
||||
margin-right: 1px;
|
||||
padding-right: 0;
|
||||
margin-right: 1px; /* back to normal */
|
||||
}
|
||||
|
||||
/* DEFAULT button COLORS */
|
||||
|
||||
.fc-header .fc-state-default,
|
||||
.fc-header .fc-state-default a {
|
||||
border-color: #777; /* outer border */
|
||||
color: #333;
|
||||
.fc-header .ui-corner-right {
|
||||
margin-right: 0; /* back to normal */
|
||||
}
|
||||
|
||||
.fc-header .fc-state-default span {
|
||||
border-color: #fff #fff #d1d1d1; /* inner border */
|
||||
background: #e8e8e8;
|
||||
/* button layering (for border precedence) */
|
||||
|
||||
.fc-header .fc-state-hover,
|
||||
.fc-header .ui-state-hover {
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
/* PRESSED button COLORS (down and active) */
|
||||
|
||||
.fc-header .fc-state-active a {
|
||||
color: #fff;
|
||||
.fc-header .fc-state-down {
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
.fc-header .fc-state-down span,
|
||||
.fc-header .fc-state-active span {
|
||||
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;
|
||||
.fc-header .fc-state-active,
|
||||
.fc-header .ui-state-active {
|
||||
z-index: 4;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Content Area & Global Cell Styles
|
||||
/* Content
|
||||
------------------------------------------------------------------------*/
|
||||
|
||||
.fc-widget-content {
|
||||
border: 1px solid #ccc; /* outer border color */
|
||||
}
|
||||
|
||||
.fc-content {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.fc-content .fc-state-default {
|
||||
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%;
|
||||
.fc-view {
|
||||
width: 100%; /* needed for view switching (when view is absolute) */
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -59,8 +59,9 @@ $.fn.fullCalendar = function(options) {
|
|||
|
||||
|
||||
// function for adding/overriding defaults
|
||||
function setDefaults(d) {
|
||||
var setDefaults = function(d) {
|
||||
$.extend(true, defaults, d);
|
||||
}
|
||||
|
||||
|
||||
$.fullCalendar.setDefaults = setDefaults;
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
|
||||
fc.applyAll = applyAll;
|
||||
|
||||
|
||||
/* Event Date Math
|
||||
-----------------------------------------------------------------------------*/
|
||||
|
@ -138,80 +140,76 @@ function lazySegBind(container, segs, bindHandlers) {
|
|||
|
||||
|
||||
function setOuterWidth(element, width, includeMargins) {
|
||||
element.each(function(i, _element) {
|
||||
_element.style.width = Math.max(0, width - hsides(_element, includeMargins)) + 'px';
|
||||
});
|
||||
for (var i=0, e; i<element.length; i++) {
|
||||
e = $(element[i]);
|
||||
e.width(Math.max(0, width - hsides(e, includeMargins)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function setOuterHeight(element, height, includeMargins) {
|
||||
element.each(function(i, _element) {
|
||||
_element.style.height = Math.max(0, height - vsides(_element, includeMargins)) + 'px';
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 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);
|
||||
}
|
||||
for (var i=0, e; i<element.length; i++) {
|
||||
e = $(element[i]);
|
||||
e.height(Math.max(0, height - vsides(e, includeMargins)));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// 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.style.cssText += ';min-height:' + height + ';_height:' + height;
|
||||
// why can't we just use .css() ? i forget
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
@ -291,3 +289,83 @@ 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];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -84,6 +84,7 @@
|
|||
});
|
||||
|
||||
$('#calendar2').fullCalendar({
|
||||
//isRTL: true,
|
||||
droppable: true,
|
||||
dropAccept: '.for-calendar2',
|
||||
/*
|
||||
|
|
92
tests/four_weeks.html
Normal file
|
@ -0,0 +1,92 @@
|
|||
<!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>
|
|
@ -13,22 +13,27 @@
|
|||
center: 'title',
|
||||
right: 'month,agendaWeek,basicWeek,agendaDay,basicDay'
|
||||
},
|
||||
editable: true,
|
||||
//editable: true,
|
||||
eventSources: [
|
||||
{
|
||||
url: "http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic",
|
||||
editable: true,
|
||||
className: 'holiday'
|
||||
},
|
||||
/*
|
||||
$.fullCalendar.gcalFeed(
|
||||
"http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic",
|
||||
{
|
||||
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
|
||||
{
|
||||
editable: true,
|
||||
currentTimezone: 'America/Edmonton' // 'America/Los_Angeles' 'America/Los Angeles'
|
||||
}
|
||||
)
|
||||
*/
|
||||
{
|
||||
url: "https://www.google.com/calendar/feeds/ht3jlfaac5lfd6263ulfh4tql8%40group.calendar.google.com/public/basic",
|
||||
currentTimezone: 'America/Edmonton', // 'America/Los_Angeles' 'America/Los Angeles'
|
||||
editable: true
|
||||
}
|
||||
],
|
||||
eventClick: function(event) {
|
||||
console.log(event.start);
|
||||
|
@ -41,12 +46,8 @@
|
|||
</script>
|
||||
<style>
|
||||
|
||||
.holiday,
|
||||
.fc-agenda .holiday .fc-event-time,
|
||||
.holiday a {
|
||||
background: green;
|
||||
border-color: green;
|
||||
color: yellow;
|
||||
.holiday * {
|
||||
color: yellow !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<link rel='stylesheet' type='text/css' href='lib/fancybox/jquery.fancybox-1.2.6.css' />
|
||||
<script type='text/javascript' src='../lib/jquery-1.4.4.min.js'></script>
|
||||
<script type='text/javascript' src='lib/fancybox/jquery.fancybox-1.2.6.pack.js'></script>
|
||||
<link rel='stylesheet' type='text/css' href='lib/fancybox/jquery.fancybox-1.3.4.css' />
|
||||
<script type='text/javascript' src='lib/jquery-1.4.3.min.js'></script>
|
||||
<script type='text/javascript' src='lib/fancybox/jquery.fancybox-1.3.4.js'></script>
|
||||
<script type='text/javascript'>
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#fullcalendar-link').fancybox({
|
||||
frameWidth: 1100,
|
||||
frameHeight: 800
|
||||
width: 1100,
|
||||
height: 800
|
||||
});
|
||||
});
|
||||
|
||||
|
|
94
tests/issue_688_parseInt.html
Normal file
|
@ -0,0 +1,94 @@
|
|||
<!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'
|
||||
},
|
||||
defaultView: 'agendaWeek',
|
||||
minTime: '09:30',
|
||||
maxTime: '15:30',
|
||||
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>
|
94
tests/issue_740_event_resizing.html
Normal file
|
@ -0,0 +1,94 @@
|
|||
<!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'
|
||||
},
|
||||
weekends: false,
|
||||
//firstDay: 1,
|
||||
//isRTL: true,
|
||||
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>
|
95
tests/issue_750.html
Normal file
|
@ -0,0 +1,95 @@
|
|||
<!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>
|
96
tests/issue_757_removeEvents.html
Normal file
|
@ -0,0 +1,96 @@
|
|||
<!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,
|
||||
//isRTL: true,
|
||||
year: 2011,
|
||||
month: 0,
|
||||
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>
|
||||
<button onclick="$('#calendar').fullCalendar('removeEvents')">removeEvents</button>
|
||||
<button onclick="$('#calendar').fullCalendar('renderEvent', { title:'hey', start:'2011-01-09' }, true)">addEvent (with stick)</button>
|
||||
<div id='calendar'></div>
|
||||
</body>
|
||||
</html>
|
BIN
tests/lib/fancybox/blank.gif
Normal file
After Width: | Height: | Size: 43 B |
BIN
tests/lib/fancybox/fancy_close.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.6 KiB |
BIN
tests/lib/fancybox/fancy_loading.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
tests/lib/fancybox/fancy_nav_left.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
tests/lib/fancybox/fancy_nav_right.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 146 B After Width: | Height: | Size: 107 B |
Before Width: | Height: | Size: 144 B After Width: | Height: | Size: 106 B |
Before Width: | Height: | Size: 388 B After Width: | Height: | Size: 347 B |
Before Width: | Height: | Size: 374 B After Width: | Height: | Size: 324 B |
Before Width: | Height: | Size: 147 B After Width: | Height: | Size: 111 B |
Before Width: | Height: | Size: 393 B After Width: | Height: | Size: 352 B |
Before Width: | Height: | Size: 406 B After Width: | Height: | Size: 340 B |
Before Width: | Height: | Size: 142 B After Width: | Height: | Size: 103 B |
Before Width: | Height: | Size: 556 B After Width: | Height: | Size: 503 B |
Before Width: | Height: | Size: 149 B After Width: | Height: | Size: 96 B |
BIN
tests/lib/fancybox/fancy_title_over.png
Normal file
After Width: | Height: | Size: 70 B |
Before Width: | Height: | Size: 559 B After Width: | Height: | Size: 506 B |
BIN
tests/lib/fancybox/fancybox-x.png
Normal file
After Width: | Height: | Size: 203 B |