Fix for Issue 29 (languages)

This commit is contained in:
sean kenny
2014-09-04 13:51:52 +01:00
parent 4140f6aae9
commit 79ef1f0820
65 changed files with 125 additions and 11767 deletions
+3 -23
View File
@@ -1,3 +1,4 @@
module.exports = function(grunt) {
var _ = require('underscore');
@@ -11,11 +12,10 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-jscs-checker');
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-karma');
grunt.loadNpmTasks('grunt-bump');
grunt.loadNpmTasks('lumbar');
// This will eventually get passed to grunt.initConfig()
// Initialize multitasks...
var config = {
@@ -23,7 +23,6 @@ module.exports = function(grunt) {
uglify: {},
copy: {},
compress: {},
shell: {},
clean: {
temp: 'build/temp'
}
@@ -47,7 +46,6 @@ module.exports = function(grunt) {
// Bare minimum for debugging
grunt.registerTask('dev', [
'shell:assume-unchanged',
'lumbar:build',
'languages'
]);
@@ -122,7 +120,7 @@ module.exports = function(grunt) {
]);
config.generateLanguages = {
moment: 'lib/moment/lang/',
moment: grunt.file.expand('lib/moment/{locale,lang}/')[0], // lang directory is pre-moment-2.8
datepicker: 'lib/jquery-ui/ui/i18n/',
fullCalendar: 'lang/',
dest: 'build/temp/lang/',
@@ -376,24 +374,6 @@ module.exports = function(grunt) {
/* dist & git hacks
----------------------------------------------------------------------------------------------------
// These shell commands are used to force/unforce git from thinking that files have changed.
// Used to ignore changes when dist files are overwritten, but not committed, during development.
*/
config.shell['assume-unchanged'] = {
command: 'git ls-files -z dist/ | xargs -0 git update-index --assume-unchanged'
};
config.shell['no-assume-unchanged'] = {
command: 'git update-index --no-assume-unchanged `git ls-files dist`'
};
config.shell['list-assume-unchanged'] = {
command: 'git ls-files -v | grep \'^h\''
};
// finally, give grunt the config object...
grunt.initConfig(config);
+2 -2
View File
@@ -7,11 +7,11 @@
"homepage": "http://arshaw.com/fullcalendar/",
"dependencies": {
"jquery": ">=1.7.1",
"jquery": "~1.11.1",
"moment": ">=2.5.0"
},
"devDependencies": {
"jquery-ui": "1.8.17 - 1.10.4",
"jquery-ui": "~1.10.4",
"jquery-simulate-ext": "~1.3.0",
"jquery-mockjax": "~1.5.3",
"jasmine-jquery": "~2.0.3",
-371
View File
@@ -1,371 +0,0 @@
version 1.6.3 (8/10/13)
- viewRender callback (PR 15)
- viewDestroy callback (PR 15)
- eventDestroy callback (PR 111)
- handleWindowResize option (PR 54)
- eventStartEditable/startEditable options (PR 49)
- eventDurationEditable/durationEditable options (PR 49)
- specify function for $.ajax `data` parameter for JSON event sources (PR 59)
- fixed bug with agenda event dropping in wrong column (PR 55)
- easier event element z-index customization (PR 58)
- classNames on past/future days (PR 88)
- allow null/undefined event titles (PR 84)
- small optimize for agenda event rendering (PR 56)
- deprecated:
- viewDisplay
- disableDragging
- disableResizing
- bundled with latest jQuery (1.10.2) and jQuery UI (1.10.3)
version 1.6.2 (7/18/13)
- hiddenDays option (issue 686)
- bugfix: when eventRender returns false, incorrect stacking of events (issue 762)
- bugfix: couldn't change event.backgroundImage when calling updateEvent (thx stephenharris)
version 1.6.1 (4/14/13)
- fixed event inner content overflow bug (issue 1783)
- fixed table header className bug (1772)
- removed text-shadow on events (better for general use, thx tkrotoff)
version 1.6.0 (3/18/13)
- visual facelift, with bootstrap-inspired buttons and colors
- simplified HTML/CSS for events and buttons
- dayRender, for modifying a day cell (issue 191, thx althaus)
- week numbers on side of calendar (issue 295)
- weekNumber
- weekNumberCalculation
- weekNumberTitle
- "W" formatting variable
- finer snapping granularity for agenda view events (issue 495, thx ms-doodle-com)
- eventAfterAllRender (issue 753, thx pdrakeweb)
- eventDataTransform (thx joeyspo)
- data-date attributes on cells (thx Jae)
- expose $.fullCalendar.dateFormatters
- when clicking fast on buttons, prevent text selection
- bundled with latest jQuery (1.9.1) and jQuery UI (1.10.2)
- Grunt/Lumbar build system for internal development
- build for Bower package manager
- build for jQuery plugin site
version 1.5.4 (9/5/12)
- made compatible with jQuery 1.8.* (thx archaeron)
- bundled with jQuery 1.8.1 and jQuery UI 1.8.23
version 1.5.3 (2/6/12)
- fixed dragging issue with jQuery UI 1.8.16 (issue 1168)
- bundled with jQuery 1.7.1 and jQuery UI 1.8.17
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)
- backgroudColor
- 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)
- bug: some events not rendered with consecutive calls to addEventSource (issue 679)
version 1.4.8 (10/16/10)
- ignoreTimezone option (set to `false` to process UTC offsets in ISO8601 dates)
- bugfixes
- event refetching not being called under certain conditions (issues 417, 554)
- event refetching being called multiple times under certain conditions (issues 586, 616)
- selection cannot be triggered by right mouse button (issue 558)
- agenda view left axis sized incorrectly (issue 465)
- IE js error when calendar is too narrow (issue 517)
- agenda view looks strange when no scrollbars (issue 235)
- improved parsing of ISO8601 dates with UTC offsets
- $.fullCalendar.version
- an internal refactor of the code, for easier future development and modularity
version 1.4.7 (7/5/10)
- "dropping" external objects onto the calendar
- droppable (boolean, to turn on/off)
- dropAccept (to filter which events the calendar will accept)
- drop (trigger)
- selectable options can now be specified with a View Option Hash
- bugfixes
- dragged & reverted events having wrong time text (issue 406)
- bug rendering events that have an endtime with seconds, but no hours/minutes (issue 477)
- gotoDate date overflow bug (issue 429)
- wrong date reported when clicking on edge of last column in agenda views (412)
- support newlines in event titles
- select/unselect callbacks now passes native js event
version 1.4.6 (5/31/10)
- "selecting" days or timeslots
- options: selectable, selectHelper, unselectAuto, unselectCancel
- callbacks: select, unselect
- methods: select, unselect
- when dragging an event, the highlighting reflects the duration of the event
- code compressing by Google Closure Compiler
- bundled with jQuery 1.4.2 and jQuery UI 1.8.1
version 1.4.5 (2/21/10)
- lazyFetching option, which can force the calendar to fetch events on every view/date change
- scroll state of agenda views are preserved when switching back to view
- bugfixes
- calling methods on an uninitialized fullcalendar throws error
- IE6/7 bug where an entire view becomes invisible (issue 320)
- error when rendering a hidden calendar (in jquery ui tabs for example) in IE (issue 340)
- interconnected bugs related to calendar resizing and scrollbars
- when switching views or clicking prev/next, calendar would "blink" (issue 333)
- liquid-width calendar's events shifted (depending on initial height of browser) (issue 341)
- more robust underlying algorithm for calendar resizing
version 1.4.4 (2/3/10)
- optimized event rendering in all views (events render in 1/10 the time)
- gotoDate() does not force the calendar to unnecessarily rerender
- render() method now correctly readjusts height
version 1.4.3 (12/22/09)
- added destroy method
- Google Calendar event pages respect currentTimezone
- caching now handled by jQuery's ajax
- protection from setting aspectRatio to zero
- bugfixes
- parseISO8601 and DST caused certain events to display day before
- button positioning problem in IE6
- ajax event source removed after recently being added, events still displayed
- event not displayed when end is an empty string
- dynamically setting calendar height when no events have been fetched, throws error
version 1.4.2 (12/02/09)
- eventAfterRender trigger
- getDate & getView methods
- height & contentHeight options (explicitly sets the pixel height)
- minTime & maxTime options (restricts shown hours in agenda view)
- getters [for all options] and setters [for height, contentHeight, and aspectRatio ONLY! stay tuned..]
- render method now readjusts calendar's size
- bugfixes
- lightbox scripts that use iframes (like fancybox)
- day-of-week classNames were off when firstDay=1
- guaranteed space on right side of agenda events (even when stacked)
- accepts ISO8601 dates with a space (instead of 'T')
version 1.4.1 (10/31/09)
- can exclude weekends with new 'weekends' option
- gcal feed 'currentTimezone' option
- bugfixes
- year/month/date option sometimes wouldn't set correctly (depending on current date)
- daylight savings issue caused agenda views to start at 1am (for BST users)
- cleanup of gcal.js code
version 1.4 (10/19/09)
- agendaWeek and agendaDay views
- added some options for agenda views:
- allDaySlot
- allDayText
- firstHour
- slotMinutes
- defaultEventMinutes
- axisFormat
- modified some existing options/triggers to work with agenda views:
- dragOpacity and timeFormat can now accept a "View Hash" (a new concept)
- dayClick now has an allDay parameter
- eventDrop now has an an allDay parameter
(this will affect those who use revertFunc, adjust parameter list)
- added 'prevYear' and 'nextYear' for buttons in header
- minor change for theme users, ui-state-hover not applied to active/inactive buttons
- added event-color-changing example in docs
- better defaults for right-to-left themed button icons
version 1.3.2 (10/13/09)
- Bugfixes (please upgrade from 1.3.1!)
- squashed potential infinite loop when addMonths and addDays
is called with an invalid date
- $.fullCalendar.parseDate() now correctly parses IETF format
- when switching views, the 'today' button sticks inactive, fixed
- gotoDate now can accept a single Date argument
- documentation for changes in 1.3.1 and 1.3.2 now on website
version 1.3.1 (9/30/09)
- Important Bugfixes (please upgrade from 1.3!)
- When current date was late in the month, for long months, and prev/next buttons
were clicked in month-view, some months would be skipped/repeated
- In certain time zones, daylight savings time would cause certain days
to be misnumbered in month-view
- Subtle change in way week interval is chosen when switching from month to basicWeek/basicDay view
- Added 'allDayDefault' option
- Added 'changeView' and 'render' methods
version 1.3 (9/21/09)
- different 'views': month/basicWeek/basicDay
- more flexible 'header' system for buttons
- themable by jQuery UI themes
- resizable events (require jQuery UI resizable plugin)
- rescoped & rewritten CSS, enhanced default look
- cleaner css & rendering techniques for right-to-left
- reworked options & API to support multiple views / be consistent with jQuery UI
- refactoring of entire codebase
- broken into different JS & CSS files, assembled w/ build scripts
- new test suite for new features, uses firebug-lite
- refactored docs
- Options
+ date
+ defaultView
+ aspectRatio
+ disableResizing
+ monthNames (use instead of $.fullCalendar.monthNames)
+ monthNamesShort (use instead of $.fullCalendar.monthAbbrevs)
+ dayNames (use instead of $.fullCalendar.dayNames)
+ dayNamesShort (use instead of $.fullCalendar.dayAbbrevs)
+ theme
+ buttonText
+ buttonIcons
x draggable -> editable/disableDragging
x fixedWeeks -> weekMode
x abbrevDayHeadings -> columnFormat
x buttons/title -> header
x eventDragOpacity -> dragOpacity
x eventRevertDuration -> dragRevertDuration
x weekStart -> firstDay
x rightToLeft -> isRTL
x showTime (use 'allDay' CalEvent property instead)
- Triggered Actions
+ eventResizeStart
+ eventResizeStop
+ eventResize
x monthDisplay -> viewDisplay
x resize -> windowResize
'eventDrop' params changed, can revert if ajax cuts out
- CalEvent Properties
x showTime -> allDay
x draggable -> editable
'end' is now INCLUSIVE when allDay=true
'url' now produces a real <a> tag, more native clicking/tab behavior
- Methods:
+ renderEvent
x prevMonth -> prev
x nextMonth -> next
x prevYear/nextYear -> moveDate
x refresh -> rerenderEvents/refetchEvents
x removeEvent -> removeEvents
x getEventsByID -> clientEvents
- Utilities:
'formatDate' format string completely changed (inspired by jQuery UI datepicker + datejs)
'formatDates' added to support date-ranges
- Google Calendar Options:
x draggable -> editable
- Bugfixes
- gcal extension fetched 25 results max, now fetches all
version 1.2.1 (6/29/09)
- bugfixes
- allows and corrects invalid end dates for events
- doesn't throw an error in IE while rendering when display:none
- fixed 'loading' callback when used w/ multiple addEventSource calls
- gcal className can now be an array
version 1.2 (5/31/09)
- expanded API
- 'className' CalEvent attribute
- 'source' CalEvent attribute
- dynamically get/add/remove/update events of current month
- locale improvements: change month/day name text
- better date formatting ($.fullCalendar.formatDate)
- multiple 'event sources' allowed
- dynamically add/remove event sources
- options for prevYear and nextYear buttons
- docs have been reworked (include addition of Google Calendar docs)
- changed behavior of parseDate for number strings
(now interpets as unix timestamp, not MS times)
- bugfixes
- rightToLeft month start bug
- off-by-one errors with month formatting commands
- events from previous months sticking when clicking prev/next quickly
- Google Calendar API changed to work w/ multiple event sources
- can also provide 'className' and 'draggable' options
- date utilties moved from $ to $.fullCalendar
- more documentation in source code
- minified version of fullcalendar.js
- test suit (available from svn)
- top buttons now use <button> w/ an inner <span> for better css cusomization
- thus CSS has changed. IF UPGRADING FROM PREVIOUS VERSIONS,
UPGRADE YOUR FULLCALENDAR.CSS FILE!!!
version 1.1 (5/10/09)
- Added the following options:
- weekStart
- rightToLeft
- titleFormat
- timeFormat
- cacheParam
- resize
- Fixed rendering bugs
- Opera 9.25 (events placement & window resizing)
- IE6 (window resizing)
- Optimized window resizing for ALL browsers
- Events on same day now sorted by start time (but first by timespan)
- Correct z-index when dragging
- Dragging contained in overflow DIV for IE6
- Modified fullcalendar.css
- for right-to-left support
- for variable start-of-week
- for IE6 resizing bug
- for THEAD and TBODY (in 1.0, just used TBODY, restructured in 1.1)
- IF UPGRADING FROM FULLCALENDAR 1.0, YOU MUST UPGRADE FULLCALENDAR.CSS
!!!!!!!!!!!
-95
View File
@@ -1,95 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<link href='../fullcalendar/fullcalendar.css' rel='stylesheet' />
<link href='../fullcalendar/fullcalendar.print.css' rel='stylesheet' media='print' />
<script src='../jquery/jquery-1.10.2.min.js'></script>
<script src='../jquery/jquery-ui-1.10.3.custom.min.js'></script>
<script src='../fullcalendar/fullcalendar.min.js'></script>
<script>
$(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,agendaDay'
},
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, 0),
end: new Date(y, m, d, 14, 0),
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>
body {
margin-top: 40px;
text-align: center;
font-size: 14px;
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
View File
@@ -1,95 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<link href='../fullcalendar/fullcalendar.css' rel='stylesheet' />
<link href='../fullcalendar/fullcalendar.print.css' rel='stylesheet' media='print' />
<script src='../jquery/jquery-1.10.2.min.js'></script>
<script src='../jquery/jquery-ui-1.10.3.custom.min.js'></script>
<script src='../fullcalendar/fullcalendar.min.js'></script>
<script>
$(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,basicWeek,basicDay'
},
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, 0),
end: new Date(y, m, d, 14, 0),
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>
body {
margin-top: 40px;
text-align: center;
font-size: 14px;
font-family: "Lucida Grande",Helvetica,Arial,Verdana,sans-serif;
}
#calendar {
width: 900px;
margin: 0 auto;
}
</style>
</head>
<body>
<div id='calendar'></div>
</body>
</html>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 312 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 206 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 336 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 346 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 332 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 249 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 387 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 309 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

-523
View File
@@ -1,523 +0,0 @@
/*! jQuery UI - v1.10.3 - 2013-08-10
* http://jqueryui.com
* Includes: jquery.ui.core.css, jquery.ui.tabs.css
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Lucida%20Grande%2CLucida%20Sans%2CArial%2Csans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=6px&bgColorHeader=deedf7&bgTextureHeader=highlight_soft&bgImgOpacityHeader=100&borderColorHeader=aed0ea&fcHeader=222222&iconColorHeader=72a7cf&bgColorContent=f2f5f7&bgTextureContent=highlight_hard&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=362b36&iconColorContent=72a7cf&bgColorDefault=d7ebf9&bgTextureDefault=glass&bgImgOpacityDefault=80&borderColorDefault=aed0ea&fcDefault=2779aa&iconColorDefault=3d80b3&bgColorHover=e4f1fb&bgTextureHover=glass&bgImgOpacityHover=100&borderColorHover=74b2e2&fcHover=0070a3&iconColorHover=2694e8&bgColorActive=3baae3&bgTextureActive=glass&bgImgOpacityActive=50&borderColorActive=2694e8&fcActive=ffffff&iconColorActive=ffffff&bgColorHighlight=ffef8f&bgTextureHighlight=highlight_soft&bgImgOpacityHighlight=25&borderColorHighlight=f9dd34&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=cd0a0a&bgTextureError=flat&bgImgOpacityError=15&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffffff&bgColorOverlay=eeeeee&bgTextureOverlay=diagonals_thick&bgImgOpacityOverlay=90&opacityOverlay=80&bgColorShadow=000000&bgTextureShadow=highlight_hard&bgImgOpacityShadow=70&opacityShadow=30&thicknessShadow=7px&offsetTopShadow=-7px&offsetLeftShadow=-7px&cornerRadiusShadow=8px
* Copyright 2013 jQuery Foundation and other contributors Licensed MIT */
/* Layout helpers
----------------------------------*/
.ui-helper-hidden {
display: none;
}
.ui-helper-hidden-accessible {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 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:before,
.ui-helper-clearfix:after {
content: "";
display: table;
border-collapse: collapse;
}
.ui-helper-clearfix:after {
clear: both;
}
.ui-helper-clearfix {
min-height: 0; /* support: IE7 */
}
.ui-helper-zfix {
width: 100%;
height: 100%;
top: 0;
left: 0;
position: absolute;
opacity: 0;
filter:Alpha(Opacity=0);
}
.ui-front {
z-index: 100;
}
/* Interaction Cues
----------------------------------*/
.ui-state-disabled {
cursor: default !important;
}
/* Icons
----------------------------------*/
/* states and images */
.ui-icon {
display: block;
text-indent: -99999px;
overflow: hidden;
background-repeat: no-repeat;
}
/* Misc visuals
----------------------------------*/
/* Overlays */
.ui-widget-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.ui-tabs {
position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
padding: .2em;
}
.ui-tabs .ui-tabs-nav {
margin: 0;
padding: .2em .2em 0;
}
.ui-tabs .ui-tabs-nav li {
list-style: none;
float: left;
position: relative;
top: 0;
margin: 1px .2em 0 0;
border-bottom-width: 0;
padding: 0;
white-space: nowrap;
}
.ui-tabs .ui-tabs-nav li a {
float: left;
padding: .5em 1em;
text-decoration: none;
}
.ui-tabs .ui-tabs-nav li.ui-tabs-active {
margin-bottom: -1px;
padding-bottom: 1px;
}
.ui-tabs .ui-tabs-nav li.ui-tabs-active a,
.ui-tabs .ui-tabs-nav li.ui-state-disabled a,
.ui-tabs .ui-tabs-nav li.ui-tabs-loading a {
cursor: text;
}
.ui-tabs .ui-tabs-nav li a, /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a {
cursor: pointer;
}
.ui-tabs .ui-tabs-panel {
display: block;
border-width: 0;
padding: 1em 1.4em;
background: none;
}
/* Component containers
----------------------------------*/
.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 #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 #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,
.ui-state-hover a:link,
.ui-state-hover a:visited {
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;
}
/* Interaction Cues
----------------------------------*/
.ui-state-highlight,
.ui-widget-content .ui-state-highlight,
.ui-widget-header .ui-state-highlight {
border: 1px solid #f9dd34;
background: #ffef8f url(images/ui-bg_highlight-soft_25_ffef8f_1x100.png) 50% top repeat-x;
color: #363636;
}
.ui-state-highlight a,
.ui-widget-content .ui-state-highlight a,
.ui-widget-header .ui-state-highlight a {
color: #363636;
}
.ui-state-error,
.ui-widget-content .ui-state-error,
.ui-widget-header .ui-state-error {
border: 1px solid #cd0a0a;
background: #cd0a0a url(images/ui-bg_flat_15_cd0a0a_40x100.png) 50% 50% repeat-x;
color: #ffffff;
}
.ui-state-error 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;
}
.ui-state-disabled .ui-icon {
filter:Alpha(Opacity=35); /* For IE8 - See #6059 */
}
/* Icons
----------------------------------*/
/* states and images */
.ui-icon {
width: 16px;
height: 16px;
}
.ui-icon,
.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_ffffff_256x240.png);
}
/* positioning */
.ui-icon-blank { background-position: 16px 16px; }
.ui-icon-carat-1-n { background-position: 0 0; }
.ui-icon-carat-1-ne { background-position: -16px 0; }
.ui-icon-carat-1-e { background-position: -32px 0; }
.ui-icon-carat-1-se { background-position: -48px 0; }
.ui-icon-carat-1-s { background-position: -64px 0; }
.ui-icon-carat-1-sw { background-position: -80px 0; }
.ui-icon-carat-1-w { background-position: -96px 0; }
.ui-icon-carat-1-nw { background-position: -112px 0; }
.ui-icon-carat-2-n-s { background-position: -128px 0; }
.ui-icon-carat-2-e-w { background-position: -144px 0; }
.ui-icon-triangle-1-n { background-position: 0 -16px; }
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
.ui-icon-triangle-1-e { background-position: -32px -16px; }
.ui-icon-triangle-1-se { background-position: -48px -16px; }
.ui-icon-triangle-1-s { background-position: -64px -16px; }
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
.ui-icon-triangle-1-w { background-position: -96px -16px; }
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
.ui-icon-arrow-1-n { background-position: 0 -32px; }
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
.ui-icon-arrow-1-e { background-position: -32px -32px; }
.ui-icon-arrow-1-se { background-position: -48px -32px; }
.ui-icon-arrow-1-s { background-position: -64px -32px; }
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
.ui-icon-arrow-1-w { background-position: -96px -32px; }
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
.ui-icon-arrow-4 { background-position: 0 -80px; }
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
.ui-icon-extlink { background-position: -32px -80px; }
.ui-icon-newwin { background-position: -48px -80px; }
.ui-icon-refresh { background-position: -64px -80px; }
.ui-icon-shuffle { background-position: -80px -80px; }
.ui-icon-transfer-e-w { background-position: -96px -80px; }
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
.ui-icon-folder-collapsed { background-position: 0 -96px; }
.ui-icon-folder-open { background-position: -16px -96px; }
.ui-icon-document { background-position: -32px -96px; }
.ui-icon-document-b { background-position: -48px -96px; }
.ui-icon-note { background-position: -64px -96px; }
.ui-icon-mail-closed { background-position: -80px -96px; }
.ui-icon-mail-open { background-position: -96px -96px; }
.ui-icon-suitcase { background-position: -112px -96px; }
.ui-icon-comment { background-position: -128px -96px; }
.ui-icon-person { background-position: -144px -96px; }
.ui-icon-print { background-position: -160px -96px; }
.ui-icon-trash { background-position: -176px -96px; }
.ui-icon-locked { background-position: -192px -96px; }
.ui-icon-unlocked { background-position: -208px -96px; }
.ui-icon-bookmark { background-position: -224px -96px; }
.ui-icon-tag { background-position: -240px -96px; }
.ui-icon-home { background-position: 0 -112px; }
.ui-icon-flag { background-position: -16px -112px; }
.ui-icon-calendar { background-position: -32px -112px; }
.ui-icon-cart { background-position: -48px -112px; }
.ui-icon-pencil { background-position: -64px -112px; }
.ui-icon-clock { background-position: -80px -112px; }
.ui-icon-disk { background-position: -96px -112px; }
.ui-icon-calculator { background-position: -112px -112px; }
.ui-icon-zoomin { background-position: -128px -112px; }
.ui-icon-zoomout { background-position: -144px -112px; }
.ui-icon-search { background-position: -160px -112px; }
.ui-icon-wrench { background-position: -176px -112px; }
.ui-icon-gear { background-position: -192px -112px; }
.ui-icon-heart { background-position: -208px -112px; }
.ui-icon-star { background-position: -224px -112px; }
.ui-icon-link { background-position: -240px -112px; }
.ui-icon-cancel { background-position: 0 -128px; }
.ui-icon-plus { background-position: -16px -128px; }
.ui-icon-plusthick { background-position: -32px -128px; }
.ui-icon-minus { background-position: -48px -128px; }
.ui-icon-minusthick { background-position: -64px -128px; }
.ui-icon-close { background-position: -80px -128px; }
.ui-icon-closethick { background-position: -96px -128px; }
.ui-icon-key { background-position: -112px -128px; }
.ui-icon-lightbulb { background-position: -128px -128px; }
.ui-icon-scissors { background-position: -144px -128px; }
.ui-icon-clipboard { background-position: -160px -128px; }
.ui-icon-copy { background-position: -176px -128px; }
.ui-icon-contact { background-position: -192px -128px; }
.ui-icon-image { background-position: -208px -128px; }
.ui-icon-video { background-position: -224px -128px; }
.ui-icon-script { background-position: -240px -128px; }
.ui-icon-alert { background-position: 0 -144px; }
.ui-icon-info { background-position: -16px -144px; }
.ui-icon-notice { background-position: -32px -144px; }
.ui-icon-help { background-position: -48px -144px; }
.ui-icon-check { background-position: -64px -144px; }
.ui-icon-bullet { background-position: -80px -144px; }
.ui-icon-radio-on { background-position: -96px -144px; }
.ui-icon-radio-off { background-position: -112px -144px; }
.ui-icon-pin-w { background-position: -128px -144px; }
.ui-icon-pin-s { background-position: -144px -144px; }
.ui-icon-play { background-position: 0 -160px; }
.ui-icon-pause { background-position: -16px -160px; }
.ui-icon-seek-next { background-position: -32px -160px; }
.ui-icon-seek-prev { background-position: -48px -160px; }
.ui-icon-seek-end { background-position: -64px -160px; }
.ui-icon-seek-start { background-position: -80px -160px; }
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
.ui-icon-seek-first { background-position: -80px -160px; }
.ui-icon-stop { background-position: -96px -160px; }
.ui-icon-eject { background-position: -112px -160px; }
.ui-icon-volume-off { background-position: -128px -160px; }
.ui-icon-volume-on { background-position: -144px -160px; }
.ui-icon-power { background-position: 0 -176px; }
.ui-icon-signal-diag { background-position: -16px -176px; }
.ui-icon-signal { background-position: -32px -176px; }
.ui-icon-battery-0 { background-position: -48px -176px; }
.ui-icon-battery-1 { background-position: -64px -176px; }
.ui-icon-battery-2 { background-position: -80px -176px; }
.ui-icon-battery-3 { background-position: -96px -176px; }
.ui-icon-circle-plus { background-position: 0 -192px; }
.ui-icon-circle-minus { background-position: -16px -192px; }
.ui-icon-circle-close { background-position: -32px -192px; }
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
.ui-icon-circle-zoomin { background-position: -176px -192px; }
.ui-icon-circle-zoomout { background-position: -192px -192px; }
.ui-icon-circle-check { background-position: -208px -192px; }
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
.ui-icon-circlesmall-close { background-position: -32px -208px; }
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
.ui-icon-squaresmall-close { background-position: -80px -208px; }
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
/* Misc visuals
----------------------------------*/
/* Corner radius */
.ui-corner-all,
.ui-corner-top,
.ui-corner-left,
.ui-corner-tl {
border-top-left-radius: 6px;
}
.ui-corner-all,
.ui-corner-top,
.ui-corner-right,
.ui-corner-tr {
border-top-right-radius: 6px;
}
.ui-corner-all,
.ui-corner-bottom,
.ui-corner-left,
.ui-corner-bl {
border-bottom-left-radius: 6px;
}
.ui-corner-all,
.ui-corner-bottom,
.ui-corner-right,
.ui-corner-br {
border-bottom-right-radius: 6px;
}
/* Overlays */
.ui-widget-overlay {
background: #eeeeee url(images/ui-bg_diagonals-thick_90_eeeeee_40x40.png) 50% 50% repeat;
opacity: .8;
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: .3;
filter: Alpha(Opacity=30);
border-radius: 8px;
}
-90
View File
@@ -1,90 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<link href='../fullcalendar/fullcalendar.css' rel='stylesheet' />
<link href='../fullcalendar/fullcalendar.print.css' rel='stylesheet' media='print' />
<script src='../jquery/jquery-1.10.2.min.js'></script>
<script src='../jquery/jquery-ui-1.10.3.custom.min.js'></script>
<script src='../fullcalendar/fullcalendar.min.js'></script>
<script>
$(document).ready(function() {
var date = new Date();
var d = date.getDate();
var m = date.getMonth();
var y = date.getFullYear();
$('#calendar').fullCalendar({
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, 0),
end: new Date(y, m, d, 14, 0),
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>
body {
margin-top: 40px;
text-align: center;
font-size: 14px;
font-family: "Lucida Grande",Helvetica,Arial,Verdana,sans-serif;
}
#calendar {
width: 900px;
margin: 0 auto;
}
</style>
</head>
<body>
<div id='calendar'></div>
</body>
</html>
-154
View File
@@ -1,154 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<link href='../fullcalendar/fullcalendar.css' rel='stylesheet' />
<link href='../fullcalendar/fullcalendar.print.css' rel='stylesheet' media='print' />
<script src='../jquery/jquery-1.10.2.min.js'></script>
<script src='../jquery/jquery-ui-1.10.3.custom.min.js'></script>
<script src='../fullcalendar/fullcalendar.min.js'></script>
<script>
$(document).ready(function() {
/* initialize the external events
-----------------------------------------------------------------*/
$('#external-events div.external-event').each(function() {
// create an Event Object (http://arshaw.com/fullcalendar/docs/event_data/Event_Object/)
// it doesn't need to have a start or end
var eventObject = {
title: $.trim($(this).text()) // use the element's text as the event title
};
// store the Event Object in the DOM element so we can get to it later
$(this).data('eventObject', eventObject);
// make the event draggable using jQuery UI
$(this).draggable({
zIndex: 999,
revert: true, // will cause the event to go back to its
revertDuration: 0 // original position after the drag
});
});
/* initialize the calendar
-----------------------------------------------------------------*/
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
editable: true,
droppable: true, // this allows things to be dropped onto the calendar !!!
drop: function(date, allDay) { // this function is called when something is dropped
// retrieve the dropped element's stored Event Object
var originalEventObject = $(this).data('eventObject');
// we need to copy it, so that multiple events don't have a reference to the same object
var copiedEventObject = $.extend({}, originalEventObject);
// assign it the date that was reported
copiedEventObject.start = date;
copiedEventObject.allDay = allDay;
// render the event on the calendar
// the last `true` argument determines if the event "sticks" (http://arshaw.com/fullcalendar/docs/event_rendering/renderEvent/)
$('#calendar').fullCalendar('renderEvent', copiedEventObject, true);
// is the "remove after drop" checkbox checked?
if ($('#drop-remove').is(':checked')) {
// if so, remove the element from the "Draggable Events" list
$(this).remove();
}
}
});
});
</script>
<style>
body {
margin-top: 40px;
text-align: center;
font-size: 14px;
font-family: "Lucida Grande",Helvetica,Arial,Verdana,sans-serif;
}
#wrap {
width: 1100px;
margin: 0 auto;
}
#external-events {
float: left;
width: 150px;
padding: 0 10px;
border: 1px solid #ccc;
background: #eee;
text-align: left;
}
#external-events h4 {
font-size: 16px;
margin-top: 0;
padding-top: 1em;
}
.external-event { /* try to mimick the look of a real event */
margin: 10px 0;
padding: 2px 4px;
background: #3366CC;
color: #fff;
font-size: .85em;
cursor: pointer;
}
#external-events p {
margin: 1.5em 0;
font-size: 11px;
color: #666;
}
#external-events p input {
margin: 0;
vertical-align: middle;
}
#calendar {
float: right;
width: 900px;
}
</style>
</head>
<body>
<div id='wrap'>
<div id='external-events'>
<h4>Draggable Events</h4>
<div class='external-event'>My Event 1</div>
<div class='external-event'>My Event 2</div>
<div class='external-event'>My Event 3</div>
<div class='external-event'>My Event 4</div>
<div class='external-event'>My Event 5</div>
<p>
<input type='checkbox' id='drop-remove' /> <label for='drop-remove'>remove after drop</label>
</p>
</div>
<div id='calendar'></div>
<div style='clear:both'></div>
</div>
</body>
</html>
-64
View File
@@ -1,64 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<link href='../fullcalendar/fullcalendar.css' rel='stylesheet' />
<link href='../fullcalendar/fullcalendar.print.css' rel='stylesheet' media='print' />
<script src='../jquery/jquery-1.10.2.min.js'></script>
<script src='../jquery/jquery-ui-1.10.3.custom.min.js'></script>
<script src='../fullcalendar/fullcalendar.min.js'></script>
<script src='../fullcalendar/gcal.js'></script>
<script>
$(document).ready(function() {
$('#calendar').fullCalendar({
// US Holidays
events: 'http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic',
eventClick: function(event) {
// opens events in a popup window
window.open(event.url, 'gcalevent', 'width=700,height=600');
return false;
},
loading: function(bool) {
if (bool) {
$('#loading').show();
}else{
$('#loading').hide();
}
}
});
});
</script>
<style>
body {
margin-top: 40px;
text-align: center;
font-size: 14px;
font-family: "Lucida Grande",Helvetica,Arial,Verdana,sans-serif;
}
#loading {
position: absolute;
top: 5px;
right: 5px;
}
#calendar {
width: 900px;
margin: 0 auto;
}
</style>
</head>
<body>
<div id='loading' style='display:none'>loading...</div>
<div id='calendar'></div>
</body>
</html>
-25
View File
@@ -1,25 +0,0 @@
<?php
$year = date('Y');
$month = date('m');
echo json_encode(array(
array(
'id' => 111,
'title' => "Event1",
'start' => "$year-$month-10",
'url' => "http://yahoo.com/"
),
array(
'id' => 222,
'title' => "Event2",
'start' => "$year-$month-20",
'end' => "$year-$month-22",
'url' => "http://yahoo.com/"
)
));
?>
-61
View File
@@ -1,61 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<link href='../fullcalendar/fullcalendar.css' rel='stylesheet' />
<link href='../fullcalendar/fullcalendar.print.css' rel='stylesheet' media='print' />
<script src='../jquery/jquery-1.10.2.min.js'></script>
<script src='../jquery/jquery-ui-1.10.3.custom.min.js'></script>
<script src='../fullcalendar/fullcalendar.min.js'></script>
<script>
$(document).ready(function() {
$('#calendar').fullCalendar({
editable: true,
events: "json-events.php",
eventDrop: function(event, delta) {
alert(event.title + ' was moved ' + delta + ' days\n' +
'(should probably update your database)');
},
loading: function(bool) {
if (bool) $('#loading').show();
else $('#loading').hide();
}
});
});
</script>
<style>
body {
margin-top: 40px;
text-align: center;
font-size: 14px;
font-family: "Lucida Grande",Helvetica,Arial,Verdana,sans-serif;
}
#loading {
position: absolute;
top: 5px;
right: 5px;
}
#calendar {
width: 900px;
margin: 0 auto;
}
</style>
</head>
<body>
<div id='loading' style='display:none'>loading...</div>
<div id='calendar'></div>
<p>json-events.php needs to be running in the same directory.</p>
</body>
</html>
-112
View File
@@ -1,112 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<link href='../fullcalendar/fullcalendar.css' rel='stylesheet' />
<link href='../fullcalendar/fullcalendar.print.css' rel='stylesheet' media='print' />
<script src='../jquery/jquery-1.10.2.min.js'></script>
<script src='../jquery/jquery-ui-1.10.3.custom.min.js'></script>
<script src='../fullcalendar/fullcalendar.min.js'></script>
<script>
$(document).ready(function() {
var date = new Date();
var d = date.getDate();
var m = date.getMonth();
var y = date.getFullYear();
var calendar = $('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
selectable: true,
selectHelper: true,
select: function(start, end, allDay) {
var title = prompt('Event Title:');
if (title) {
calendar.fullCalendar('renderEvent',
{
title: title,
start: start,
end: end,
allDay: allDay
},
true // make the event "stick"
);
}
calendar.fullCalendar('unselect');
},
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, 0),
end: new Date(y, m, d, 14, 0),
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>
body {
margin-top: 40px;
text-align: center;
font-size: 14px;
font-family: "Lucida Grande",Helvetica,Arial,Verdana,sans-serif;
}
#calendar {
width: 900px;
margin: 0 auto;
}
</style>
</head>
<body>
<div id='calendar'></div>
</body>
</html>
-97
View File
@@ -1,97 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<link rel='stylesheet' href='cupertino/theme.css' />
<link href='../fullcalendar/fullcalendar.css' rel='stylesheet' />
<link href='../fullcalendar/fullcalendar.print.css' rel='stylesheet' media='print' />
<script src='../jquery/jquery-1.10.2.min.js'></script>
<script src='../jquery/jquery-ui-1.10.3.custom.min.js'></script>
<script src='../fullcalendar/fullcalendar.min.js'></script>
<script>
$(document).ready(function() {
var date = new Date();
var d = date.getDate();
var m = date.getMonth();
var y = date.getFullYear();
$('#calendar').fullCalendar({
theme: true,
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
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, 0),
end: new Date(y, m, d, 14, 0),
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>
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>
-589
View File
@@ -1,589 +0,0 @@
/*!
* FullCalendar v1.6.3 Stylesheet
* Docs & License: http://arshaw.com/fullcalendar/
* (c) 2013 Adam Shaw, Sean Kenny - resource view
*/
.fc {
direction: ltr;
text-align: left;
}
.fc table {
border-collapse: collapse;
border-spacing: 0;
}
html .fc,
.fc table {
font-size: 1em;
}
.fc td,
.fc th {
padding: 0;
vertical-align: top;
}
/* Header
------------------------------------------------------------------------*/
.fc-header td {
white-space: nowrap;
}
.fc-header-left {
width: 25%;
text-align: left;
}
.fc-header-center {
text-align: center;
}
.fc-header-right {
width: 25%;
text-align: right;
}
.fc-header-title {
display: inline-block;
vertical-align: top;
}
.fc-header-title h2 {
margin-top: 0;
white-space: nowrap;
}
.fc .fc-header-space {
padding-left: 10px;
}
.fc-header .fc-button {
margin-bottom: 1em;
vertical-align: top;
}
/* buttons edges butting together */
.fc-header .fc-button {
margin-right: -1px;
}
.fc-header .fc-corner-right, /* non-theme */
.fc-header .ui-corner-right { /* theme */
margin-right: 0; /* back to normal */
}
/* button layering (for border precedence) */
.fc-header .fc-state-hover,
.fc-header .ui-state-hover {
z-index: 2;
}
.fc-header .fc-state-down {
z-index: 3;
}
.fc-header .fc-state-active,
.fc-header .ui-state-active {
z-index: 4;
}
/* Content
------------------------------------------------------------------------*/
.fc-content {
clear: both;
zoom: 1; /* for IE7, gives accurate coordinates for [un]freezeContentHeight */
}
.fc-view {
width: 100%;
overflow: hidden;
}
/* Cell Styles
------------------------------------------------------------------------*/
.fc-widget-header, /* <th>, usually */
.fc-widget-content { /* <td>, usually */
border: 1px solid #ddd;
}
.fc-state-highlight { /* <td> today cell */ /* TODO: add .fc-today to <th> */
background: #fcf8e3;
}
.fc-cell-overlay { /* semi-transparent rectangle while dragging */
background: #bce8f1;
opacity: .3;
filter: alpha(opacity=30); /* for IE */
}
/* Buttons
------------------------------------------------------------------------*/
.fc-button {
position: relative;
display: inline-block;
padding: 0 .6em;
overflow: hidden;
height: 1.9em;
line-height: 1.9em;
white-space: nowrap;
cursor: pointer;
}
.fc-state-default { /* non-theme */
border: 1px solid;
}
.fc-state-default.fc-corner-left { /* non-theme */
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
}
.fc-state-default.fc-corner-right { /* non-theme */
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
}
/*
Our default prev/next buttons use HTML entities like &lsaquo; &rsaquo; &laquo; &raquo;
and we'll try to make them look good cross-browser.
*/
.fc-text-arrow {
margin: 0 .1em;
font-size: 2em;
font-family: "Courier New", Courier, monospace;
vertical-align: baseline; /* for IE7 */
}
.fc-button-prev .fc-text-arrow,
.fc-button-next .fc-text-arrow { /* for &lsaquo; &rsaquo; */
font-weight: bold;
}
/* icon (for jquery ui) */
.fc-button .fc-icon-wrap {
position: relative;
float: left;
top: 50%;
}
.fc-button .ui-icon {
position: relative;
float: left;
margin-top: -50%;
*margin-top: 0;
*top: -50%;
}
/*
button states
borrowed from twitter bootstrap (http://twitter.github.com/bootstrap/)
*/
.fc-state-default {
background-color: #f5f5f5;
background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
background-repeat: repeat-x;
border-color: #e6e6e6 #e6e6e6 #bfbfbf;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
color: #333;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
}
.fc-state-hover,
.fc-state-down,
.fc-state-active,
.fc-state-disabled {
color: #333333;
background-color: #e6e6e6;
}
.fc-state-hover {
color: #333333;
text-decoration: none;
background-position: 0 -15px;
-webkit-transition: background-position 0.1s linear;
-moz-transition: background-position 0.1s linear;
-o-transition: background-position 0.1s linear;
transition: background-position 0.1s linear;
}
.fc-state-down,
.fc-state-active {
background-color: #cccccc;
background-image: none;
outline: 0;
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
}
.fc-state-disabled {
cursor: default;
background-image: none;
opacity: 0.65;
filter: alpha(opacity=65);
box-shadow: none;
}
/* Global Event Styles
------------------------------------------------------------------------*/
.fc-event-container > * {
z-index: 8;
}
.fc-event-container > .ui-draggable-dragging,
.fc-event-container > .ui-resizable-resizing {
z-index: 9;
}
.fc-event {
border: 1px solid #3a87ad; /* default BORDER color */
background-color: #3a87ad; /* default BACKGROUND color */
color: #fff; /* default TEXT color */
font-size: .85em;
cursor: default;
}
a.fc-event {
text-decoration: none;
}
a.fc-event,
.fc-event-draggable {
cursor: pointer;
}
.fc-rtl .fc-event {
text-align: right;
}
.fc-event-inner {
width: 100%;
height: 100%;
overflow: hidden;
}
.fc-event-time,
.fc-event-title {
padding: 0 1px;
}
.fc .ui-resizable-handle {
display: block;
position: absolute;
z-index: 99999;
overflow: hidden; /* hacky spaces (IE6/7) */
font-size: 300%; /* */
line-height: 50%; /* */
}
/* Horizontal Events
------------------------------------------------------------------------*/
.fc-event-hori {
border-width: 1px 0;
margin-bottom: 1px;
}
.fc-ltr .fc-event-hori.fc-event-start,
.fc-rtl .fc-event-hori.fc-event-end {
border-left-width: 1px;
border-top-left-radius: 3px;
border-bottom-left-radius: 3px;
}
.fc-ltr .fc-event-hori.fc-event-end,
.fc-rtl .fc-event-hori.fc-event-start {
border-right-width: 1px;
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
}
/* resizable */
.fc-event-hori .ui-resizable-e {
top: 0 !important; /* importants override pre jquery ui 1.7 styles */
right: -3px !important;
width: 7px !important;
height: 100% !important;
cursor: e-resize;
}
.fc-event-hori .ui-resizable-w {
top: 0 !important;
left: -3px !important;
width: 7px !important;
height: 100% !important;
cursor: w-resize;
}
.fc-event-hori .ui-resizable-handle {
_padding-bottom: 14px; /* IE6 had 0 height */
}
/* 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;
}
/* Month View, Basic Week View, Basic Day View
------------------------------------------------------------------------*/
.fc-grid th {
text-align: center;
}
.fc .fc-week-number {
width: 22px;
text-align: center;
}
.fc .fc-week-number div {
padding: 0 2px;
}
.fc-grid .fc-day-number {
float: right;
padding: 0 2px;
}
.fc-grid .fc-other-month .fc-day-number {
opacity: 0.3;
filter: alpha(opacity=30); /* for IE */
/* opacity with small font can sometimes look too faded
might want to set the 'color' property instead
making day-numbers bold also fixes the problem */
}
.fc-grid .fc-day-content {
clear: both;
padding: 2px 2px 1px; /* distance between events and day edges */
}
/* event styles */
.fc-grid .fc-event-time {
font-weight: bold;
}
/* right-to-left */
.fc-rtl .fc-grid .fc-day-number {
float: left;
}
.fc-rtl .fc-grid .fc-event-time {
float: right;
}
/* Agenda Week View, Agenda Day View
------------------------------------------------------------------------*/
.fc-agenda table {
border-collapse: separate;
}
.fc-agenda-days th {
text-align: center;
}
.fc-agenda .fc-agenda-axis {
width: 50px;
padding: 0 4px;
vertical-align: middle;
text-align: right;
white-space: nowrap;
font-weight: normal;
}
.fc-agenda .fc-week-number {
font-weight: bold;
}
.fc-agenda .fc-day-content {
padding: 2px 2px 1px;
}
/* make axis border take precedence */
.fc-agenda-days .fc-agenda-axis {
border-right-width: 1px;
}
.fc-agenda-days .fc-col0 {
border-left-width: 0;
}
/* all-day area */
.fc-agenda-allday th {
border-width: 0 1px;
}
.fc-agenda-allday .fc-day-content {
min-height: 34px; /* TODO: doesnt work well in quirksmode */
_height: 34px;
}
/* divider (between all-day and slots) */
.fc-agenda-divider-inner {
height: 2px;
overflow: hidden;
}
.fc-widget-header .fc-agenda-divider-inner {
background: #eee;
}
/* slot rows */
.fc-agenda-slots th {
border-width: 1px 1px 0;
}
.fc-agenda-slots td {
border-width: 1px 0 0;
background: none;
}
.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-slots tr.fc-minor th.ui-widget-header {
*border-top-style: solid; /* doesn't work with background in IE6/7 */
}
/* Vertical Events
------------------------------------------------------------------------*/
.fc-event-vert {
border-width: 0 1px;
}
.fc-event-vert.fc-event-start {
border-top-width: 1px;
border-top-left-radius: 3px;
border-top-right-radius: 3px;
}
.fc-event-vert.fc-event-end {
border-bottom-width: 1px;
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;
}
.fc-event-vert .fc-event-time {
white-space: nowrap;
font-size: 10px;
}
.fc-event-vert .fc-event-inner {
position: relative;
z-index: 2;
}
.fc-event-vert .fc-event-bg { /* makes the event lighter w/ a semi-transparent overlay */
position: absolute;
z-index: 1;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: #fff;
opacity: .25;
filter: alpha(opacity=25);
}
.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 */
.fc-event-vert .ui-resizable-s {
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;
text-align: center;
cursor: s-resize;
}
.fc-agenda .ui-resizable-resizing { /* TODO: better selector */
_overflow: hidden;
}
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
@@ -1,32 +0,0 @@
/*!
* FullCalendar v1.6.3 Print Stylesheet
* Docs & License: http://arshaw.com/fullcalendar/
* (c) 2013 Adam Shaw, Sean Kenny - resource view
*/
/*
* 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.
*/
/* Events
-----------------------------------------------------*/
.fc-event {
background: #fff !important;
color: #000 !important;
}
/* for vertical events */
.fc-event-bg {
display: none !important;
}
.fc-event .ui-resizable-handle {
display: none !important;
}
-107
View File
@@ -1,107 +0,0 @@
/*!
* FullCalendar v1.6.3 Google Calendar Plugin
* Docs & License: http://arshaw.com/fullcalendar/
* (c) 2013 Adam Shaw, Sean Kenny - resource view
*/
(function($) {
var fc = $.fullCalendar;
var formatDate = fc.formatDate;
var parseISO8601 = fc.parseISO8601;
var addDays = fc.addDays;
var applyAll = fc.applyAll;
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;
}
}
});
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);
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-21
View File
@@ -1,21 +0,0 @@
Copyright (c) 2013 Adam Shaw
Copyright (c) 2013 Sean Kenny
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+7 -15
View File
@@ -1,7 +1,6 @@
#!/usr/bin/env bash
cd "`dirname $0`/.."
proj_dir="$PWD"
echo
echo "This script assumes the following:"
@@ -27,23 +26,16 @@ read cdnjs_dir_override
if [[ "$cdnjs_dir_override" ]]
then
cdnjs_dir="$cdnjs_dir_override"
fi
fi
echo "Updating local copy of CDNJS..." && \
cd "$cdnjs_dir" && \
git pull upstream master && \
\
echo "Copying over our changes..." && \
cd "$proj_dir" && \
cp -r -f dist/cdnjs/* "$cdnjs_dir/ajax/libs/fullcalendar/" && \
\
echo "Running CDNJS's tests..." && \
cd "$cdnjs_dir" && \
cp -r -f dist/cdnjs/* "$cdnjs_dir/ajax/libs/fullcalendar" && \
cd $cdnjs_dir && \
npm test && \
\
echo "Building commit..." && \
git add "ajax/libs/fullcalendar/" && \
git add "ajax/libs/fullcalendar" && \
git commit -e -m "fullcalendar v$version" && \
echo && \
echo 'Pulling from upstream...' && \
git pull --rebase upstream master && \
echo && \
echo 'DONE. It is now up to you to run `'"cd $cdnjs_dir && git push origin master"'` and submit the PR to CDNJS.' && \
echo
+2 -7
View File
@@ -16,10 +16,6 @@ module.exports = function(config) {
// You must run `bower install es5-shim` first.
//'../lib/es5-shim/es5-shim.js',
// For IE8 testing, we'll need jQuery 1.x. Before running karma, force the version:
// `bower install jquery#1` and choose 1
// to undo: `bower update jquery`
'../lib/moment/moment.js',
'../lib/jquery/dist/jquery.js',
'../lib/jquery-ui/ui/jquery-ui.js',
@@ -43,14 +39,13 @@ module.exports = function(config) {
'../dist/lang-all.js',
'../dist/fullcalendar.css',
'../tests/base.css',
'../tests/automated/*.js'
// For IE8 testing. Because it can't handle running all the tests at once.
// Comment out the *.js line and run karma with each of the lines below.
// Comment the above line and run karma with each of the below lines uncommented.
//'../tests/automated/{a,b,c,d,e,f,g,h,i,j,k,l}*.js'
//'../tests/automated/{m,n}*.js' // mostly moment tests
//'../tests/automated/{o,p,q,r,s,t,u,v,w,x,y,z}*.js'
'../tests/automated/*.js'
],
// list of files to exclude
+7 -17
View File
@@ -6,25 +6,15 @@ read -p "Enter the new version number with no 'v' (for example '1.0.1'): " versi
if [[ ! "$version" ]]
then
exit
exit;
fi
grunt bump --setversion=$version && \
grunt dist && \
grunt shell:no-assume-unchanged && \
git add *.json && \
git add -f dist/*.js dist/*.css dist/lang/*.js && \
git commit -a -e -m "version $version" && \
git tag -a v$version -m "version $version"
status=$?
# regardless of error/success, undo the temporary no-assume-unchanged
git reset
grunt shell:assume-unchanged
if [ $status -eq 0 ]
then
echo
echo 'DONE. It is now up to you to run `'"git push origin master && git push origin v$version"'`'
echo
fi
git commit -e -m "version $version" && \
git tag -a v$version -m "version $version" && \
echo && \
echo 'DONE. It is now up to you to run `'"git push origin master && git push origin v$version"'`' && \
echo
+8 -6
View File
@@ -36,7 +36,7 @@ module.exports = function(grunt) {
});
// code for resetting the language back to English
combinedJS += '\nmoment.lang("en");';
combinedJS += '\n(moment.locale || moment.lang).call(moment, "en");'; // works with moment-pre-2.8
combinedJS += '\n$.fullCalendar.lang("en");';
combinedJS += '\nif ($.datepicker) $.datepicker.setDefaults($.datepicker.regional[""]);';
@@ -133,9 +133,11 @@ module.exports = function(grunt) {
}
);
js = js.replace( // replace the `return` statement so execution continues
/^(\s*)return moment\.lang\(/m,
'$1moment.lang('
// replace the `return` statement so execution continues
// compatible with moment-pre-2.8
js = js.replace(
/^(\s*)return moment\.(defineLocale|lang)\(/m,
'$1(moment.defineLocale || moment.lang).call(moment, '
);
return js;
@@ -149,7 +151,7 @@ module.exports = function(grunt) {
return '-' + m1.toUpperCase();
});
var path = pathLib.join(config.datepicker, 'jquery.ui.datepicker-' + datepickerLangCode + '.js');
var path = config.datepicker + '/jquery.ui.datepicker-' + datepickerLangCode + '.js';
var js;
try {
@@ -206,4 +208,4 @@ module.exports = function(grunt) {
}
};
};
-1
View File
@@ -2,5 +2,4 @@
cd "`dirname $0`/.."
grunt shell:assume-unchanged
grunt lumbar:watch
+1 -1
View File
@@ -181,4 +181,4 @@
<div id='calendar'></div>
</body>
</html>
</html>
+2 -2
View File
@@ -7,11 +7,11 @@
"homepage": "http://arshaw.com/fullcalendar/",
"dependencies": {
"jquery": ">=1.7.1",
"jquery": "~1.11.1",
"moment": ">=2.5.0"
},
"optionalDependencies": {
"jquery-ui": ">=1.8.17"
"jquery-ui": "~1.10.4"
},
"title": "FullCalendar",
-10
View File
@@ -1,10 +0,0 @@
$.fullCalendar.lang("id", {
defaultButtonText: {
month: "Bulan",
week: "Minggu",
day: "Hari",
list: "Agenda"
},
allDayText: "Sehari penuh"
});
-1
View File
@@ -15,7 +15,6 @@
"grunt-contrib-clean": "^0.4.1",
"grunt-contrib-jshint": "^0.8.0",
"grunt-jscs-checker": "^0.4.4",
"grunt-shell": "^0.7.0",
"grunt-karma": "^0.8.3",
"grunt-bump": "0.0.14",
"lumbar": "^2.0.1",
+24 -12
View File
@@ -64,26 +64,33 @@ function Calendar(element, instanceOptions) {
// -----------------------------------------------------------------------------------
// Apply overrides to the current language's data
var langData = createObject( // make a cheap clone
moment.localeData(options.lang)
);
// Returns moment's internal locale data. If doesn't exist, returns English.
// Works with moment-pre-2.8
function getLocaleData(langCode) {
var f = moment.localeData || moment.langData;
return f.call(moment, langCode) ||
f.call(moment, 'en'); // the newer localData could return null, so fall back to en
}
var localeData = createObject(getLocaleData(options.lang)); // make a cheap copy
if (options.monthNames) {
langData._months = options.monthNames;
localeData._months = options.monthNames;
}
if (options.monthNamesShort) {
langData._monthsShort = options.monthNamesShort;
localeData._monthsShort = options.monthNamesShort;
}
if (options.dayNames) {
langData._weekdays = options.dayNames;
localeData._weekdays = options.dayNames;
}
if (options.dayNamesShort) {
langData._weekdaysShort = options.dayNamesShort;
localeData._weekdaysShort = options.dayNamesShort;
}
if (options.firstDay != null) {
var _week = createObject(langData._week); // _week: { dow: # }
var _week = createObject(localeData._week); // _week: { dow: # }
_week.dow = options.firstDay;
langData._week = _week;
localeData._week = _week;
}
@@ -116,7 +123,12 @@ function Calendar(element, instanceOptions) {
mom = fc.moment.parseZone.apply(null, arguments); // let the input decide the zone
}
mom._lang = langData;
if ('_locale' in mom) { // moment 2.8 and above
mom._locale = localeData;
}
else { // pre-moment-2.8
mom._lang = localeData;
}
return mom;
};
@@ -204,7 +216,7 @@ function Calendar(element, instanceOptions) {
// a function that returns a formatStr // TODO: in future, precompute this
if (typeof formatStr === 'function') {
formatStr = formatStr.call(t, options, langData);
formatStr = formatStr.call(t, options, localeData);
}
return formatRange(m1, m2, formatStr, null, options.isRTL);
@@ -216,7 +228,7 @@ function Calendar(element, instanceOptions) {
// a function that returns a formatStr // TODO: in future, precompute this
if (typeof formatStr === 'function') {
formatStr = formatStr.call(t, options, langData);
formatStr = formatStr.call(t, options, localeData);
}
return formatDate(mom, formatStr);
+5 -1
View File
@@ -73,11 +73,15 @@ function formatDateWithChunk(date, chunk) {
// rendering of one date, without any separator.
function formatRange(date1, date2, formatStr, separator, isRTL) {
var localeData;
date1 = fc.moment.parseZone(date1);
date2 = fc.moment.parseZone(date2);
localeData = (date1.localeData || date1.lang).call(date1); // works with moment-pre-2.8
// Expand localized format strings, like "LL" -> "MMMM D YYYY"
formatStr = date1.localeData().longDateFormat(formatStr) || formatStr;
formatStr = localeData.longDateFormat(formatStr) || formatStr;
// BTW, this is not important for `formatDate` because it is impossible to put custom tokens
// or non-zero areas in Moment's localized format strings.
-108
View File
@@ -1,108 +0,0 @@
describe('addEventSource', function() {
var options;
var eventArray = [
{ id: 0, title: 'event zero', start: '2014-06-24', className: 'event-zero' },
{ id: 1, title: 'event one', start: '2014-06-24', className: 'event-non-zero event-one' },
{ id: 2, title: 'event two', start: '2014-06-24', className: 'event-non-zero event-two' }
];
beforeEach(function() {
affix('#cal');
options = {
defaultDate: '2014-06-24',
defaultView: 'month'
};
});
it('correctly adds an array source', function(done) {
go(
function() {
$('#cal').fullCalendar('addEventSource', eventArray);
},
null,
done
);
});
it('correctly adds a function source', function(done) {
go(
function() {
$('#cal').fullCalendar('addEventSource', function(start, end, timezone, callback) {
callback(eventArray);
});
},
null,
done
);
});
it('correctly adds an extended array source', function(done) {
go(
function() {
$('#cal').fullCalendar('addEventSource', {
className: 'arraysource',
events: eventArray
});
},
function() {
expect($('.arraysource').length).toEqual(3);
},
done
);
});
it('correctly adds an extended array source', function(done) {
go(
function() {
$('#cal').fullCalendar('addEventSource', {
className: 'funcsource',
events: function(start, end, timezone, callback) {
callback(eventArray);
}
});
},
function() {
expect($('.funcsource').length).toEqual(3);
},
done
);
});
function go(addFunc, extraTestFunc, doneFunc) {
var callCnt = 0;
options.eventAfterAllRender = function() {
callCnt++;
if (callCnt == 2) { // once for initial render. second time for addEventSource
called = true;
checkAllEvents();
if (extraTestFunc) {
extraTestFunc();
}
// move the calendar back out of view, then back in (for issue 2191)
$('#cal').fullCalendar('next');
$('#cal').fullCalendar('prev');
checkAllEvents();
if (extraTestFunc) {
extraTestFunc();
}
doneFunc();
}
};
$('#cal').fullCalendar(options);
addFunc();
}
// Checks to make sure all events have been rendered and that the calendar
// has internal info on all the events.
function checkAllEvents() {
expect($('#cal').fullCalendar('clientEvents').length).toEqual(3);
expect($('.fc-event').length).toEqual(3);
}
});
+3
View File
@@ -37,6 +37,8 @@ describe('constructor', function() {
expect(options).toEqual(optionsCopy);
});
/*
TODO: implement this behavior
it('should not modify the eventSources array', function() {
var options = {
defaultView: 'month',
@@ -54,6 +56,7 @@ describe('constructor', function() {
$('#calendar').fullCalendar(options);
expect(options).toEqual(optionsCopy);
});
*/
describe('when called on a div', function() {
-27
View File
@@ -1,27 +0,0 @@
describe('destroy', function() {
beforeEach(function() {
affix('#cal');
});
describe('when calendar is LTR', function() {
it('cleans up all classNames on the root element', function() {
$('#cal').fullCalendar({
isRTL: false
});
$('#cal').fullCalendar('destroy');
expect($('#cal')[0].className).toBe('');
});
});
describe('when calendar is RTL', function() {
it('cleans up all classNames on the root element', function() {
$('#cal').fullCalendar({
isRTL: true
});
$('#cal').fullCalendar('destroy');
expect($('#cal')[0].className).toBe('');
});
});
});
-142
View File
@@ -1,142 +0,0 @@
describe('displayEventEnd', function() {
var options;
beforeEach(function() {
affix('#cal');
options = {
defaultDate: '2014-06-13',
timeFormat: 'H:mm'
};
});
afterEach(function() {
$('#cal').fullCalendar('destroy');
});
[ 'month', 'agendaWeek' ].forEach(function(viewName) {
describe('when in ' + viewName + ' view', function() {
beforeEach(function() {
options.defaultView = viewName;
});
describe('when off', function() {
beforeEach(function() {
options.displayEventEnd = false;
});
describe('with an all-day event', function() {
beforeEach(function() {
options.events = [ {
title: 'timed event',
start: '2014-06-13',
end: '2014-06-13',
allDay: true
} ];
});
it('displays no time text', function(done) {
options.eventAfterAllRender = function() {
expect($('.fc-event-time').length).toBe(0);
done();
};
$('#cal').fullCalendar(options);
});
});
describe('with a timed event with no end time', function(done) {
beforeEach(function() {
options.events = [ {
title: 'timed event',
start: '2014-06-13T01:00:00',
allDay: false
} ];
});
it('displays only the start time text', function(done) {
options.eventAfterAllRender = function() {
expect($('.fc-event-time')).toHaveText('1:00');
done();
};
$('#cal').fullCalendar(options);
});
});
describe('with a timed event with an end time', function() {
beforeEach(function() {
options.events = [ {
title: 'timed event',
start: '2014-06-13T01:00:00',
end: '2014-06-13T02:00:00',
allDay: false
} ];
});
it('displays only the start time text', function(done) {
options.eventAfterAllRender = function() {
expect($('.fc-event-time')).toHaveText('1:00');
done();
};
$('#cal').fullCalendar(options);
});
});
});
describe('when on', function() {
beforeEach(function() {
options.displayEventEnd = true;
});
describe('with an all-day event', function() {
beforeEach(function() {
options.events = [ {
title: 'timed event',
start: '2014-06-13',
end: '2014-06-13',
allDay: true
} ];
});
it('displays no time text', function(done) {
options.eventAfterAllRender = function() {
expect($('.fc-event-time').length).toBe(0);
done();
};
$('#cal').fullCalendar(options);
});
});
describe('with a timed event with no end time', function(done) {
beforeEach(function() {
options.events = [ {
title: 'timed event',
start: '2014-06-13T01:00:00',
allDay: false
} ];
});
it('displays only the start time text', function(done) {
options.eventAfterAllRender = function() {
expect($('.fc-event-time')).toHaveText('1:00');
done();
};
$('#cal').fullCalendar(options);
});
});
describe('with a timed event with an end time', function() {
beforeEach(function() {
options.events = [ {
title: 'timed event',
start: '2014-06-13T01:00:00',
end: '2014-06-13T02:00:00',
allDay: false
} ];
});
it('displays both the start and end time text', function(done) {
options.eventAfterAllRender = function() {
expect($('.fc-event-time')).toHaveText('1:00 - 2:00');
done();
};
$('#cal').fullCalendar(options);
});
});
});
});
});
});
+28 -385
View File
@@ -1,389 +1,32 @@
describe('eventDrop', function() {
var options;
beforeEach(function() {
options = {
defaultDate: '2014-06-11',
// can't do event dragging yet.
// need to work out how fullCalendar is intercepting events.
/*
xdescribe('when event is dragged from one cell to another', function() {
it('should move to the new cell', function() {
var eventName = 'xyzAllDayEvent';
$('#calendar').fullCalendar({
editable: true
});
$('#calendar').fullCalendar('addEventSource', {
events: [
{
title: eventName,
start: new Date()
}
]
});
var el = $('div .fc-event');
var offsetBefore = el.offset();
dump(offsetBefore);
var options = {
dx: 200,
dy: 0,
moves: 10,
handle: 'corner'
};
affix('#cal');
el.simulate('drag', options);
dump(el.offset());
});
afterEach(function() {
$('#cal').fullCalendar('destroy');
});
describe('when in month view', function() {
beforeEach(function() {
options.defaultView = 'month';
});
describe('when dragging an all-day event to another day', function() {
it('should be given correct arguments, with whole-day delta', function(done) {
options.events = [ {
title: 'all-day event',
start: '2014-06-11',
allDay: true
} ];
init(
function() {
$('.fc-event')
.simulate('mouseover') // for our dumb optimization
.simulate('drag-n-drop', {
dx: $('.fc-day').width() * 2,
dy: $('.fc-day').height()
});
},
function(event, delta, revertFunc) {
expect(delta.asDays()).toBe(9);
expect(delta.hours()).toBe(0);
expect(delta.minutes()).toBe(0);
expect(delta.seconds()).toBe(0);
expect(delta.milliseconds()).toBe(0);
expect(event.start).toEqualMoment('2014-06-20');
expect(event.end).toBeNull();
revertFunc();
expect(event.start).toEqualMoment('2014-06-11');
expect(event.end).toBeNull();
done();
}
);
});
});
describe('when gragging a timed event to another day', function() {
it('should be given correct arguments, with whole-day delta', function(done) {
options.events = [ {
title: 'timed event',
start: '2014-06-11T06:00:00',
allDay: false
} ];
init(
function() {
$('.fc-event')
.simulate('mouseover') // for our dumb optimization
.simulate('drag-n-drop', {
dx: $('.fc-day').width() * -2,
dy: $('.fc-day').height()
});
},
function(event, delta, revertFunc) {
expect(delta.asDays()).toBe(5);
expect(delta.hours()).toBe(0);
expect(delta.minutes()).toBe(0);
expect(delta.seconds()).toBe(0);
expect(delta.milliseconds()).toBe(0);
expect(event.start).toEqualMoment('2014-06-16T06:00:00');
expect(event.end).toBeNull();
revertFunc();
expect(event.start).toEqualMoment('2014-06-11T06:00:00');
expect(event.end).toBeNull();
done();
}
);
});
});
});
describe('when in agenda view', function() {
beforeEach(function() {
options.defaultView = 'agendaWeek';
});
describe('when dragging a timed event to another time on a different day', function() {
it('should be given correct arguments and delta with days/time', function(done) {
options.events = [ {
title: 'timed event',
start: '2014-06-11T06:00:00',
allDay: false
} ];
init(
function() {
$('.fc-event')
.simulate('mouseover') // for our dumb optimization
.simulate('drag-n-drop', {
dx: $('th.fc-wed').width(), // 1 day
dy: $('tr.fc-slot1').height() * 3 // 1.5 hours
});
},
function(event, delta, revertFunc) {
expect(delta.days()).toBe(1);
expect(delta.hours()).toBe(1);
expect(delta.minutes()).toBe(30);
expect(delta.seconds()).toBe(0);
expect(delta.milliseconds()).toBe(0);
expect(event.start).toEqualMoment('2014-06-12T07:30:00');
expect(event.end).toBeNull();
revertFunc();
expect(event.start).toEqualMoment('2014-06-11T06:00:00');
expect(event.end).toBeNull();
done();
}
);
});
});
describe('when dragging an all-day event to another all-day', function() {
it('should be given correct arguments, with whole-day delta', function(done) {
options.events = [ {
title: 'all-day event',
start: '2014-06-11',
allDay: true
} ];
init(
function() {
$('.fc-event')
.simulate('mouseover') // for our dumb optimization
.simulate('drag-n-drop', {
dx: $('th.fc-wed').width() * 2 // 2 days
});
},
function(event, delta, revertFunc) {
expect(delta.days()).toBe(2);
expect(delta.hours()).toBe(0);
expect(delta.minutes()).toBe(0);
expect(delta.seconds()).toBe(0);
expect(delta.milliseconds()).toBe(0);
expect(event.start).toEqualMoment('2014-06-13');
expect(event.end).toBeNull();
revertFunc();
expect(event.start).toEqualMoment('2014-06-11');
expect(event.end).toBeNull();
done();
}
);
});
});
describe('when dragging an all-day event to a time slot on a different day', function() {
it('should be given correct arguments and delta with days/time', function(done) {
options.scrollTime = '01:00:00';
options.height = 400; // short enough to make scrolling happen
options.events = [ {
title: 'all-day event',
start: '2014-06-11',
allDay: true
} ];
init(
function() {
$('.fc-event')
.simulate('mouseover') // for our dumb optimization
.simulate('drag-n-drop', {
dx: $('th.fc-wed').width() * -1,
dy: $('.fc-agenda-allday').outerHeight() + $('.fc-agenda-divider').outerHeight()
});
},
function(event, delta, revertFunc) {
expect(delta.days()).toBe(-1);
expect(delta.hours()).toBe(1);
expect(delta.minutes()).toBe(0);
expect(delta.seconds()).toBe(0);
expect(delta.milliseconds()).toBe(0);
expect(event.start).toEqualMoment('2014-06-10T01:00:00');
expect(event.end).toBeNull();
expect(event.allDay).toBe(false);
revertFunc();
expect(event.start).toEqualMoment('2014-06-11');
expect(event.end).toBeNull();
expect(event.allDay).toBe(true);
done();
}
);
});
});
describe('when dragging a timed event to an all-day slot on a different day', function() {
it('should be given correct arguments, with whole-day delta', function(done) {
var eventElm;
options.scrollTime = '01:00:00';
options.height = 400; // short enough to make scrolling happen
options.events = [ {
title: 'timed event',
start: '2014-06-11T01:00:00',
allDay: false
} ];
init(
function() {
eventElm = $('.fc-event')
.simulate('mouseover') // for our dumb optimization
.simulate('drag', {
dx: $('th.fc-wed').width() * -1,
dy: -$('.fc-agenda-allday').outerHeight(),
callback: function() {
// the all day slot works off of mouse-moving coordinates
var offset = eventElm.offset();
$('.fc-agenda-allday .fc-day-content')
.simulate('mouseover', {
clientX: offset.left + 10,
clientY: offset.top + 10
})
.simulate('mousemove', {
clientX: offset.left + 10,
clientY: offset.top + 10
});
setTimeout(function() {
eventElm.simulate('drop');
}, 100);
}
});
},
function(event, delta, revertFunc) {
expect(delta.days()).toBe(-1);
expect(delta.hours()).toBe(0);
expect(delta.minutes()).toBe(0);
expect(delta.seconds()).toBe(0);
expect(delta.milliseconds()).toBe(0);
expect(event.start).toEqualMoment('2014-06-10');
expect(event.end).toBeNull();
expect(event.allDay).toBe(true);
revertFunc();
expect(event.start).toEqualMoment('2014-06-11T01:00:00');
expect(event.end).toBeNull();
expect(event.allDay).toBe(false);
done();
}
);
});
});
describe('when dragging a timed event with no end time', function() {
it('should continue to only show the updated start time', function(done) {
var dragged = false;
var eventElm;
options.scrollTime = '01:00:00';
options.height = 400; // short enough to make scrolling happen
options.events = [ {
title: 'timed event',
start: '2014-06-11T01:00:00',
allDay: false
} ];
init(
function() {
eventElm = $('.fc-event')
.simulate('mouseover') // for our dumb optimization
.simulate('drag', {
dy: $('tr.fc-slot1').height() * 3, // 1.5 hours
callback: function() {
dragged = true;
expect(eventElm.find('.fc-event-time')).toHaveText('2:30');
eventElm.simulate('drop');
}
});
},
function() {
expect(dragged).toBe(true);
done();
}
);
});
});
describe('when dragging a timed event with an end time', function() {
it('should continue to show the updated start and end time', function(done) {
var dragged = false;
var eventElm;
options.scrollTime = '01:00:00';
options.height = 400; // short enough to make scrolling happen
options.events = [ {
title: 'timed event',
start: '2014-06-11T01:00:00',
end: '2014-06-11T02:00:00',
allDay: false
} ];
init(
function() {
eventElm = $('.fc-event')
.simulate('mouseover') // for our dumb optimization
.simulate('drag', {
dy: $('tr.fc-slot1').height() * 3, // 1.5 hours
callback: function() {
dragged = true;
expect(eventElm.find('.fc-event-time')).toHaveText('2:30 - 3:30');
eventElm.simulate('drop');
}
});
},
function() {
expect(dragged).toBe(true);
done();
}
);
});
});
});
// Initialize a calendar, run a drag, and do type-checking of all arguments for all handlers.
// TODO: more descrimination instead of just checking for 'object'
function init(dragFunc, dropHandler) {
var eventsRendered = false;
options.eventAfterAllRender = function() {
if (!eventsRendered) { // because event rerendering will happen upon drop
dragFunc();
eventsRendered = true;
}
};
options.eventDragStart = function(event, jsEvent, uiEvent, view) {
expect(this instanceof Element).toBe(true);
expect(this).toHaveClass('fc-event');
expect(typeof event).toBe('object');
expect(typeof jsEvent).toBe('object');
expect(typeof uiEvent).toBe('object');
expect(typeof view).toBe('object');
};
options.eventDragStop = function(event, jsEvent, uiEvent, view) {
expect(options.eventDragStart).toHaveBeenCalled();
expect(this instanceof Element).toBe(true);
expect(this).toHaveClass('fc-event');
expect(typeof event).toBe('object');
expect(typeof jsEvent).toBe('object');
expect(typeof uiEvent).toBe('object');
expect(typeof view).toBe('object');
};
options.eventDrop = function(event, delta, revertFunc, jsEvent, uiEvent, view) {
expect(options.eventDragStop).toHaveBeenCalled();
expect(this instanceof Element).toBe(true);
expect(this).toHaveClass('fc-event');
expect(typeof event).toBe('object');
expect(moment.isDuration(delta)).toBe(true);
expect(typeof revertFunc).toBe('function');
expect(typeof jsEvent).toBe('object');
expect(typeof uiEvent).toBe('object');
expect(typeof view).toBe('object');
dropHandler.apply(this, arguments);
};
spyOn(options, 'eventDragStart').and.callThrough();
spyOn(options, 'eventDragStop').and.callThrough();
setTimeout(function() { // hack. agenda view scroll state would get messed up between tests
$('#cal').fullCalendar(options);
}, 0);
}
});
});
*/
-312
View File
@@ -1,312 +0,0 @@
describe('eventResize', function() {
var options;
beforeEach(function() {
options = {
defaultDate: '2014-06-11',
editable: true
};
affix('#cal');
});
afterEach(function() {
$('#cal').fullCalendar('destroy');
});
describe('when in month view', function() {
beforeEach(function() {
options.defaultView = 'month';
});
describe('when resizing an all-day event', function() {
it('should have correct arguments with a whole-day delta', function(done) {
options.events = [ {
title: 'all-day event',
start: '2014-06-11',
allDay: true
} ];
init(
function() {
$('.fc-event .ui-resizable-handle')
.simulate('mouseover') // for our dumb optimization
.simulate('drag-n-drop', {
dx: $('.fc-day').width() * -2,
dy: $('.fc-day').height()
});
},
function(event, delta, revertFunc) {
expect(delta.asDays()).toBe(5);
expect(delta.hours()).toBe(0);
expect(delta.minutes()).toBe(0);
expect(delta.seconds()).toBe(0);
expect(delta.milliseconds()).toBe(0);
expect(event.start).toEqualMoment('2014-06-11');
expect(event.end).toEqualMoment('2014-06-17');
revertFunc();
expect(event.start).toEqualMoment('2014-06-11');
expect(event.end).toBeNull();
done();
}
);
});
});
describe('when rendering a timed event', function() {
it('should not have resize capabilities', function(done) {
options.events = [ {
title: 'timed event',
start: '2014-06-11T08:00:00',
allDay: false
} ];
options.eventAfterAllRender = function() {
expect($('.fc-event .ui-resizable-handle').length).toBe(0);
done();
};
$('#cal').fullCalendar(options);
});
});
});
describe('when in agenda view', function() {
beforeEach(function() {
options.defaultView = 'agendaWeek';
});
describe('when resizing an all-day event', function() {
it('should have correct arguments with a whole-day delta', function(done) {
options.events = [ {
title: 'all-day event',
start: '2014-06-11',
allDay: true
} ];
init(
function() {
$('.fc-event .ui-resizable-handle')
.simulate('mouseover') // for our dumb optimization
.simulate('drag-n-drop', {
dx: $('th.fc-wed').width() * 1.5 // two days
});
},
function(event, delta, revertFunc) {
expect(delta.asDays()).toBe(2);
expect(delta.hours()).toBe(0);
expect(delta.minutes()).toBe(0);
expect(delta.seconds()).toBe(0);
expect(delta.milliseconds()).toBe(0);
expect(event.start).toEqualMoment('2014-06-11');
expect(event.end).toEqualMoment('2014-06-14');
revertFunc();
expect(event.start).toEqualMoment('2014-06-11');
expect(event.end).toBeNull();
done();
}
);
});
});
describe('when resizing a timed event with an end', function() {
beforeEach(function() {
options.events = [ {
title: 'timed event event',
start: '2014-06-11T05:00:00',
end: '2014-06-11T07:00:00',
allDay: false
} ];
});
it('should have correct arguments with a timed delta', function(done) {
init(
function() {
$('.fc-event .ui-resizable-handle')
.simulate('mouseover') // for our dumb optimization
.simulate('drag-n-drop', {
dy: $('tr.fc-slot1').height() * 4.5 // 5 slots, so 2.5 hours
});
},
function(event, delta, revertFunc) {
expect(delta.days()).toBe(0);
expect(delta.hours()).toBe(2);
expect(delta.minutes()).toBe(30);
expect(delta.seconds()).toBe(0);
expect(delta.milliseconds()).toBe(0);
expect(event.start).toEqualMoment('2014-06-11T05:00:00');
expect(event.end).toEqualMoment('2014-06-11T09:30:00');
revertFunc();
expect(event.start).toEqualMoment('2014-06-11T05:00:00');
expect(event.end).toEqualMoment('2014-06-11T07:00:00');
done();
}
);
});
it('should display the correct time text while resizing', function(done) {
var dy;
var handle;
init(
function() {
dy = $('tr.fc-slot1').height() * 4.5; // 5 slots, so 2.5 hours
handle = $('.fc-event .ui-resizable-handle')
.simulate('mouseover') // for our dumb optimization
.simulate('drag', {
dy: dy,
callback: function() {
expect($('.fc-event-time')).toHaveText('5:00 - 9:30');
handle.simulate('drag', {
// BUG with jquery-simulate-ext
// I guess the delta is still relative to the original position, so should be zero.
// But zero causes nothing to happen, so make it a tiny non-zero delta.
dy: -1,
callback: function() {
expect($('.fc-event-time')).toHaveText('5:00 - 7:00');
handle.simulate('drop', {
callback: function() {
done();
}
});
}
});
}
});
},
function() {
// this wasn't firing for some reason. do it in the drop callback instead
//done();
}
);
});
it('should not fire the windowResize handler', function(done) { // bug 1116
options.windowResize = function() { };
options.windowResizeDelay = 0;
spyOn(options, 'windowResize');
init(
function() {
$('.fc-event .ui-resizable-handle')
.simulate('mouseover') // for our dumb optimization
.simulate('drag-n-drop', {
dy: 200,
interpolation: {
stepCount: 10,
duration: 100
}
});
},
function() { // if an unintended rerender happened, won't get here anyway
expect(options.windowResize).not.toHaveBeenCalled();
done();
}
);
});
});
describe('when resizing a timed event without an end', function() {
beforeEach(function() {
options.events = [ {
title: 'timed event event',
start: '2014-06-11T05:00:00',
allDay: false
} ];
});
it('should display the correct time text while resizing', function(done) {
var dy;
var handle;
init(
function() {
dy = $('tr.fc-slot1').height() * 4.5; // 5 slots, so 2.5 hours
handle = $('.fc-event .ui-resizable-handle')
.simulate('mouseover') // for our dumb optimization
.simulate('drag', {
dy: dy,
callback: function() {
expect($('.fc-event-time')).toHaveText('5:00 - 9:30');
handle.simulate('drag', {
// BUG with jquery-simulate-ext
// I guess the delta is still relative to the original position, so should be zero.
// But zero causes nothing to happen, so make it a tiny non-zero delta.
dy: -1,
callback: function() {
expect($('.fc-event-time')).toHaveText('5:00');
handle.simulate('drop', {
callback: function() {
done();
}
});
}
});
}
});
},
function() {
// this wasn't firing for some reason. do it in the drop callback instead
//done();
}
);
});
});
});
// Initialize a calendar, run a resize, and do type-checking of all arguments for all handlers.
// TODO: more descrimination instead of just checking for 'object'
function init(resizeStartFunc, resizeDoneFunc) {
var eventsRendered = false;
options.eventAfterAllRender = function() {
if (!eventsRendered) { // because event rerendering will happen when resize is over
resizeStartFunc();
eventsRendered = true;
}
};
options.eventResizeStart = function(event, jsEvent, uiEvent, view) {
expect(this instanceof Element).toBe(true);
expect(this).toHaveClass('fc-event');
expect(typeof event).toBe('object');
expect(typeof jsEvent).toBe('object');
expect(typeof uiEvent).toBe('object');
expect(typeof view).toBe('object');
};
options.eventResizeStop = function(event, jsEvent, uiEvent, view) {
expect(options.eventResizeStart).toHaveBeenCalled();
expect(this instanceof Element).toBe(true);
expect(this).toHaveClass('fc-event');
expect(typeof event).toBe('object');
expect(typeof jsEvent).toBe('object');
expect(typeof uiEvent).toBe('object');
expect(typeof view).toBe('object');
};
options.eventResize = function(event, delta, revertFunc, jsEvent, uiEvent, view) {
expect(options.eventResizeStop).toHaveBeenCalled();
expect(this instanceof Element).toBe(true);
expect(this).toHaveClass('fc-event');
expect(typeof event).toBe('object');
expect(moment.isDuration(delta)).toBe(true);
expect(typeof revertFunc).toBe('function');
expect(typeof jsEvent).toBe('object');
expect(typeof uiEvent).toBe('object'); // might be a non-jqui dummy object
expect(typeof view).toBe('object');
resizeDoneFunc.apply(this, arguments);
};
spyOn(options, 'eventResizeStart').and.callThrough();
spyOn(options, 'eventResizeStop').and.callThrough();
setTimeout(function() { // hack. agenda view scroll state would get messed up between tests
$('#cal').fullCalendar(options);
}, 0);
}
});
-13
View File
@@ -118,17 +118,4 @@ describe('events as a function', function() {
$('#cal').fullCalendar(options);
});
it('requests the correct dates when days at the start/end of the month are hidden', function(done) {
options.currentView = 'month';
options.defaultDate = '2013-06-01'; // June 2013 has first day as Saturday, and last as Sunday!
options.weekends = false;
options.weekMode = 'variable';
options.events = function(start, end, timezone, callback) {
expect(start).toEqualMoment('2013-06-03');
expect(end).toEqualMoment('2013-06-29');
done();
};
$('#cal').fullCalendar(options);
});
});
-67
View File
@@ -1,67 +0,0 @@
describe('FCMoment::time', function() {
describe('getter', function() {
// the scenario where an ambiguously-timed moment's 00:00 time is checked
// is taken care of in moment-ambig.js
it('should return 00:00 for a moment with 00:00 time', function() {
var mom = $.fullCalendar.moment.utc('2014-06-08T00:00:00');
var time = mom.time();
expect(time).toEqualDuration('00:00');
});
it('should return the time of a moment with a time', function() {
var mom = $.fullCalendar.moment.utc('2014-06-08T07:30:00');
var time = mom.time();
expect(time).toEqualDuration('07:30');
});
});
describe('setter', function() {
// the scenario where an ambiguously-timed moment is given a time via the setter
// is taken care of in moment-ambig.js
describe('when setting with a Duration', function() {
it('should give a moment with 00:00 a time', function() {
var mom = $.fullCalendar.moment.utc('2014-06-08T00:00:00');
var dur = moment.duration('13:25');
mom.time(dur);
expect(mom).toEqualMoment('2014-06-08T13:25:00+00:00');
});
it('should overwrite the time of a moment with a time', function() {
var mom = $.fullCalendar.moment.utc('2014-06-08T05:00:00');
var dur = moment.duration('13:25');
mom.time(dur);
expect(mom).toEqualMoment('2014-06-08T13:25:00+00:00');
});
it('should move to next day if greater than 24 hours', function() {
var mom = $.fullCalendar.moment.utc('2014-06-08T00:00:00');
var dur = moment.duration('1.01:00:00'); // 1 day, 1 hour
mom.time(dur);
expect(mom).toEqualMoment('2014-06-09T01:00:00+00:00');
});
});
describe('when setting with another Moment', function() {
it('should give a moment with 00:00 a time', function() {
var mom1 = $.fullCalendar.moment.utc('2014-06-09T00:00:00');
var mom2 = $.fullCalendar.moment.utc('2014-07-22T05:30:00'); // a Tues, so .days() -> 2
mom1.time(mom2);
expect(mom1).toEqualMoment('2014-06-09T05:30:00+00:00');
});
it('should overwrite the time of a moment with a time', function() {
var mom1 = $.fullCalendar.moment.utc('2014-06-09T04:15:00');
var mom2 = $.fullCalendar.moment.utc('2014-07-22T05:30:00'); // a Tues, so .days() -> 2
mom1.time(mom2);
expect(mom1).toEqualMoment('2014-06-09T05:30:00+00:00');
});
});
});
});
-150
View File
@@ -1,150 +0,0 @@
describe('removeEvents', function() {
var options;
var eventArray = [
{ id: 0, title: 'event zero', start: '2014-06-24', className: 'event-zero' },
{ id: 1, title: 'event one', start: '2014-06-24', className: 'event-non-zero event-one' },
{ id: 2, title: 'event two', start: '2014-06-24', className: 'event-non-zero event-two' }
];
var eventFunc = function(start, end, timezone, callback) {
callback(eventArray);
};
beforeEach(function() {
affix('#cal');
options = {
defaultDate: '2014-06-24',
defaultView: 'month'
};
});
$.each({
'with an array of events': eventArray,
'with an event function': eventFunc
}, function(description, events) {
describe(description, function() {
it('can remove all events if no args specified', function(done) {
go(
events,
function() {
$('#cal').fullCalendar('removeEvents');
},
function() {
expect($('#cal').fullCalendar('clientEvents').length).toEqual(0);
expect($('.fc-event').length).toEqual(0);
},
done
);
});
it('can remove events with a numeric ID', function(done) {
go(
events,
function() {
$('#cal').fullCalendar('removeEvents', 1);
},
function() {
expect($('#cal').fullCalendar('clientEvents').length).toEqual(2);
expect($('.fc-event').length).toEqual(2);
expect($('.event-zero').length).toEqual(1);
expect($('.event-two').length).toEqual(1);
},
done
);
});
it('can remove events with a string ID', function(done) {
go(
events,
function() {
$('#cal').fullCalendar('removeEvents', '1');
},
function() {
expect($('#cal').fullCalendar('clientEvents').length).toEqual(2);
expect($('.fc-event').length).toEqual(2);
expect($('.event-zero').length).toEqual(1);
expect($('.event-two').length).toEqual(1);
},
done
);
});
it('can remove events with a filter function', function(done) {
go(
events,
function() {
$('#cal').fullCalendar('removeEvents', function(event) {
return $.inArray('event-one', event.className) !== -1;
});
},
function() {
expect($('#cal').fullCalendar('clientEvents').length).toEqual(2);
expect($('.fc-event').length).toEqual(2);
expect($('.event-zero').length).toEqual(1);
expect($('.event-two').length).toEqual(1);
},
done
);
});
it('can remove an event with ID 0', function(done) { // for issue 2082
go(
events,
function() {
$('#cal').fullCalendar('removeEvents', 0);
},
function() {
expect($('#cal').fullCalendar('clientEvents').length).toEqual(2);
expect($('.fc-event').length).toEqual(2);
expect($('.event-zero').length).toEqual(0);
expect($('.event-non-zero').length).toEqual(2);
},
done
);
});
});
});
// Verifies the actions in removeFunc executed correctly by calling checkFunc.
function go(events, removeFunc, checkFunc, doneFunc) {
var called = false;
options.events = events;
options.eventAfterAllRender = function() {
if (!called) { // don't execute on subsequent removeEvents/next/prev
called = true;
checkAllEvents(); // make sure all events initially rendered correctly
removeFunc(); // remove the events
checkFunc(); // check correctness
// move the calendar back out of view, then back in
$('#cal').fullCalendar('next');
$('#cal').fullCalendar('prev');
// array event sources should maintain the same state
// whereas "dynamic" event sources should refetch and reset the state
if ($.isArray(events)) {
checkFunc(); // for issue 2187
}
else {
checkAllEvents();
}
doneFunc();
}
};
$('#cal').fullCalendar(options);
}
// Checks to make sure all events have been rendered and that the calendar
// has internal info on all the events.
function checkAllEvents() {
expect($('#cal').fullCalendar('clientEvents').length).toEqual(3);
expect($('.fc-event').length).toEqual(3);
}
});
-2
View File
@@ -11,7 +11,6 @@ describe('scrollTime', function() {
it('accepts a string Duration', function() {
options.scrollTime = '02:00:00';
options.height = 400; // short enough to make scrolling happen
$('#cal').fullCalendar(options);
var slotCell = $('.fc-slot4 td'); // 2am slot
var slotTop = slotCell.position().top;
@@ -25,7 +24,6 @@ describe('scrollTime', function() {
it('accepts a Duration object', function() {
options.scrollTime = { hours: 2 };
options.height = 400; // short enough to make scrolling happen
$('#cal').fullCalendar(options);
var slotCell = $('.fc-slot4 td'); // 2am slot
var slotTop = slotCell.position().top;
+24
View File
@@ -38,6 +38,10 @@ describe('select callback', function() {
$('#cal').fullCalendar(options);
$('.fc-day[data-date="2014-04-28"]').simulate('drag-n-drop', {
dropTarget: '.fc-day[data-date="2014-05-06"]',
interpolation: {
stepCount: 10,
duration: 100
},
callback: function() {
expect(options.select).toHaveBeenCalled();
done();
@@ -59,6 +63,10 @@ describe('select callback', function() {
$('#cal').fullCalendar(options);
$('.fc-day[data-date="2014-04-28"]').simulate('drag-n-drop', {
dropTarget: '.fc-day[data-date="2014-04-28"]',
interpolation: {
stepCount: 10,
duration: 100
},
callback: function() {
expect(options.select).toHaveBeenCalled();
done();
@@ -87,6 +95,10 @@ describe('select callback', function() {
$('#cal').fullCalendar(options);
$('.fc-agenda-allday .fc-day-content').simulate('drag-n-drop', { // middle will be 2014-05-28
dx: $('.fc-sun').outerWidth() * (isRTL ? -1 : 1), // the width of one column
interpolation: {
stepCount: 10,
duration: 100
},
callback: function() {
expect(options.select).toHaveBeenCalled();
done();
@@ -107,6 +119,10 @@ describe('select callback', function() {
spyOn(options, 'select').and.callThrough();
$('#cal').fullCalendar(options);
$('.fc-agenda-allday .fc-day-content').simulate('drag-n-drop', { // middle will be 2014-05-28
interpolation: {
stepCount: 10,
duration: 100
},
callback: function() {
expect(options.select).toHaveBeenCalled();
done();
@@ -130,6 +146,10 @@ describe('select callback', function() {
$('#cal').fullCalendar(options);
$('tr.fc-slot18 td').simulate('drag-n-drop', { // middle will be 2014-05-28T09:00:00
dy: $('tr.fc-slot18 td').outerHeight() * 2, // move down two slots
interpolation: {
stepCount: 10,
duration: 100
},
callback: function() {
expect(options.select).toHaveBeenCalled();
done();
@@ -150,6 +170,10 @@ describe('select callback', function() {
spyOn(options, 'select').and.callThrough();
$('#cal').fullCalendar(options);
$('tr.fc-slot18 td').simulate('drag-n-drop', { // middle will be 2014-05-28T09:00:00
interpolation: {
stepCount: 10,
duration: 100
},
callback: function() {
expect(options.select).toHaveBeenCalled();
done();
-1
View File
@@ -101,7 +101,6 @@ describe('select method', function() {
beforeEach(function() {
options.defaultView = 'agendaWeek';
options.scrollTime = '01:00:00'; // so that most events will be below the divider
options.height = 400; // short enought to make scrolling happen
});
describe('when called with timed moments', function() {
describe('when in bounds', function() {
-27
View File
@@ -1,27 +0,0 @@
ddescribe('', function() {
var options;
beforeEach(function() {
//affix('#cal');
$('body').append('<div id="cal"></div>');
options = {
defaultDate: ''
};
});
afterEach(function() {
//$('#cal').fullCalendar('destroy');
});
describe('', function() {
beforeEach(function() {
options.defaultView = '';
});
iit('', function() {
$('#cal').fullCalendar(options);
});
});
});
-18
View File
@@ -113,15 +113,6 @@ describe('weekMode', function() {
});
});
it('should not display an empty week when no visible days and weekMode is set to liquid', function() {
$('#cal').fullCalendar({
defaultDate: '2013-06-01', // June 2013 has first day as Saturday, and last as Sunday!
weekMode: 'liquid',
weekends: false
});
expect($('.fc-week').length).toBe(4);
});
describe('when weekMode is set to variable', function() {
beforeEach(function() {
$('#cal').fullCalendar({
@@ -154,13 +145,4 @@ describe('weekMode', function() {
expect(fiveWeekHeight).toEqual(sixWeekHeight);
});
});
it('should not display an empty week when no visible days and weekMode is set to variable', function() {
$('#cal').fullCalendar({
defaultDate: '2013-06-01', // June 2013 has first day as Saturday, and last as Sunday!
weekMode: 'variable',
weekends: false
});
expect($('.fc-week').length).toBe(4);
});
});
-7
View File
File diff suppressed because one or more lines are too long
-7
View File
File diff suppressed because one or more lines are too long
+9 -46
View File
@@ -1,64 +1,27 @@
beforeEach(function() {
jasmine.addMatchers({
toEqualMoment: function() {
return {
compare: function(actual, expected) {
var actualStr = $.fullCalendar.moment.parseZone(actual).format();
var expectedStr = $.fullCalendar.moment.parseZone(expected).format();
var result = {
pass: actualStr === expectedStr
return {
pass: $.fullCalendar.moment.parseZone(actual).format() ===
$.fullCalendar.moment.parseZone(expected).format()
};
if (!result.pass) {
result.message = 'Moment ' + actualStr + ' does not equal ' + expectedStr;
}
return result;
}
};
},
toEqualNow: function() {
return {
compare: function(actual) {
var actualMoment = $.fullCalendar.moment.parseZone(actual);
var result = {
pass: Math.abs(actualMoment - new Date()) < 1000 // within a second of current datetime
return {
pass: Math.abs(
$.fullCalendar.moment.parseZone(actual) -
new Date()
) < 1000 // within a second of current datetime
};
if (!result.pass) {
result.message = 'Moment ' + actualMoment.format() + ' is not close enough to now';
}
return result;
}
};
},
toEqualDuration: function() {
return {
compare: function(actual, expected) {
var actualStr = serializeDuration(moment.duration(actual));
var expectedStr = serializeDuration(moment.duration(expected));
var result = {
pass: actualStr === expectedStr
};
if (!result.pass) {
result.message = 'Duration ' + actualStr + ' does not equal ' + expectedStr;
}
return result;
}
};
}
});
function serializeDuration(duration) {
return Math.floor(duration.asDays()) + '.' +
pad(duration.hours(), 2) + ':' +
pad(duration.minutes(), 2) + ':' +
pad(duration.seconds(), 2) + '.' +
pad(duration.milliseconds(), 3);
}
function pad(n, width) {
n = n + '';
return n.length >= width ? n : new Array(width - n.length + 1).join('0') + n;
}
});
});
-23
View File
@@ -28,27 +28,4 @@
};
}
/*
Give jquery-simulate-ext drag-n-drop a default interpolation.
*/
var originalSimulate = $.fn.simulate;
$.fn.simulate = function(eventName, options) {
if (eventName == 'drag' || eventName == 'drop' || eventName == 'drag-n-drop') {
options = options || {};
if (options.interpolation === undefined) {
options.interpolation = {
stepCount: 10,
duration: 100
};
}
return originalSimulate.call(this, eventName, options);
}
return originalSimulate.apply(this, arguments);
};
})(jQuery);